From 87b2e7f448a6acbf77c110bcf49277e4c65d44bc Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Thu, 3 Apr 2025 21:07:14 +0000 Subject: [PATCH] upd login --- .gitignore | 5 + README.md | 2 +- backend/README.md | 6 +- backend/package.json | 4 +- backend/src/config.js | 4 +- backend/src/db/db.config.js | 2 +- .../db/seeders/20231127130745-sample-data.js | 215 ++++++++++++++++-- backend/src/index.js | 4 +- backend/src/services/notifications/list.js | 2 +- docker/docker-compose.yml | 2 +- frontend/README.md | 2 +- frontend/src/components/AsideMenuLayer.tsx | 2 +- .../components/WebPageComponents/Header.tsx | 2 +- frontend/src/pages/_app.tsx | 4 +- frontend/src/pages/index.tsx | 16 +- frontend/src/pages/login.tsx | 7 +- frontend/src/pages/privacy-policy.tsx | 2 +- frontend/src/pages/terms-of-use.tsx | 2 +- frontend/src/pages/web_pages/about.tsx | 14 +- frontend/src/pages/web_pages/contact.tsx | 10 +- frontend/src/pages/web_pages/faq.tsx | 10 +- frontend/src/pages/web_pages/home.tsx | 16 +- frontend/src/pages/web_pages/services.tsx | 12 +- 23 files changed, 268 insertions(+), 77 deletions(-) diff --git a/.gitignore b/.gitignore index e427ff3..d0eb167 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ node_modules/ */node_modules/ */build/ + +**/node_modules/ +**/build/ +.DS_Store +.env \ No newline at end of file diff --git a/README.md b/README.md index 4367cd0..d7e1f4b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# app for Allison +# Welcome ## This project was generated by [Flatlogic Platform](https://flatlogic.com). diff --git a/backend/README.md b/backend/README.md index 73a400c..9fa1787 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,4 +1,4 @@ -#app for Allison - template backend, +#Welcome - template backend, #### Run App on local machine: @@ -38,10 +38,10 @@ - Type this command to creating a new database. - - `postgres=> CREATE DATABASE db_app_for_allison;` + - `postgres=> CREATE DATABASE db_welcome;` - Then give that new user privileges to the new database then quit the `psql`. - - `postgres=> GRANT ALL PRIVILEGES ON DATABASE db_app_for_allison TO admin;` + - `postgres=> GRANT ALL PRIVILEGES ON DATABASE db_welcome TO admin;` - `postgres=> \q` --- diff --git a/backend/package.json b/backend/package.json index dc682c4..f5c7c19 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { - "name": "appforallison", - "description": "app for Allison - template backend", + "name": "welcome", + "description": "Welcome - template backend", "scripts": { "start": "npm run db:migrate && npm run db:seed && npm run watch", "db:migrate": "sequelize-cli db:migrate", diff --git a/backend/src/config.js b/backend/src/config.js index 99070b0..20cd52b 100644 --- a/backend/src/config.js +++ b/backend/src/config.js @@ -3,7 +3,7 @@ const os = require('os'); const config = { gcloud: { bucket: 'fldemo-files', - hash: '88f66c693c2211a3d0b6ee246243595b', + hash: 'afeefb9d49f5b7977577876b99532ac7', }, bcrypt: { saltRounds: 12, @@ -36,7 +36,7 @@ const config = { }, uploadDir: os.tmpdir(), email: { - from: 'app for Allison ', + from: 'Welcome ', host: 'email-smtp.us-east-1.amazonaws.com', port: 587, auth: { diff --git a/backend/src/db/db.config.js b/backend/src/db/db.config.js index aa77388..08535d4 100644 --- a/backend/src/db/db.config.js +++ b/backend/src/db/db.config.js @@ -13,7 +13,7 @@ module.exports = { username: 'postgres', dialect: 'postgres', password: '', - database: 'db_app_for_allison', + database: 'db_welcome', host: process.env.DB_HOST || 'localhost', logging: console.log, seederStorage: 'sequelize', diff --git a/backend/src/db/seeders/20231127130745-sample-data.js b/backend/src/db/seeders/20231127130745-sample-data.js index 20a4e95..bfd4362 100644 --- a/backend/src/db/seeders/20231127130745-sample-data.js +++ b/backend/src/db/seeders/20231127130745-sample-data.js @@ -35,7 +35,7 @@ const ApplicationsData = [ applied_date: new Date('2023-10-02T11:00:00Z'), - stage: 'Offer', + stage: 'Applied', // type code here for "relation_one" field }, @@ -47,7 +47,7 @@ const ApplicationsData = [ applied_date: new Date('2023-10-03T12:00:00Z'), - stage: 'Applied', + stage: 'Rejected', // type code here for "relation_one" field }, @@ -63,6 +63,18 @@ const ApplicationsData = [ // type code here for "relation_one" field }, + + { + // type code here for "relation_one" field + + // type code here for "relation_one" field + + applied_date: new Date('2023-10-05T14:00:00Z'), + + stage: 'Applied', + + // type code here for "relation_one" field + }, ]; const CandidatesData = [ @@ -85,7 +97,7 @@ const CandidatesData = [ email: 'liam.harris@candidates.com', - status: 'Qualified', + status: 'Hired', // type code here for "relation_one" field @@ -99,7 +111,7 @@ const CandidatesData = [ email: 'olivia.walker@candidates.com', - status: 'Hired', + status: 'Interviewing', // type code here for "relation_one" field @@ -113,6 +125,20 @@ const CandidatesData = [ email: 'noah.young@candidates.com', + status: 'Hired', + + // type code here for "relation_one" field + + // type code here for "relation_many" field + + // type code here for "relation_one" field + }, + + { + name: 'Ava King', + + email: 'ava.king@candidates.com', + status: 'New', // type code here for "relation_one" field @@ -163,6 +189,16 @@ const HrManagersData = [ // type code here for "relation_one" field }, + + { + name: 'Mia Adams', + + email: 'mia.adams@hr.com', + + // type code here for "relation_many" field + + // type code here for "relation_one" field + }, ]; const JobsData = [ @@ -205,6 +241,16 @@ const JobsData = [ // type code here for "relation_one" field }, + + { + title: 'Marketing Specialist', + + description: 'Develop marketing strategies and campaigns.', + + // type code here for "relation_many" field + + // type code here for "relation_one" field + }, ]; const RecruitersData = [ @@ -247,15 +293,21 @@ const RecruitersData = [ // type code here for "relation_one" field }, + + { + name: 'Ethan Clark', + + email: 'ethan.clark@recruitment.com', + + // type code here for "relation_many" field + + // type code here for "relation_one" field + }, ]; const OrganizationsData = [ { - name: 'Lucretius', - }, - - { - name: 'William Herschel', + name: 'Emil Fischer', }, { @@ -265,13 +317,21 @@ const OrganizationsData = [ { name: 'John Dalton', }, + + { + name: 'Edward Teller', + }, + + { + name: 'Anton van Leeuwenhoek', + }, ]; const LikesData = [ { // type code here for "relation_one" field - amount: 'Wilhelm Wundt', + amount: 'Francis Crick', // type code here for "relation_one" field }, @@ -279,7 +339,7 @@ const LikesData = [ { // type code here for "relation_one" field - amount: 'Thomas Hunt Morgan', + amount: 'Carl Linnaeus', // type code here for "relation_one" field }, @@ -287,7 +347,7 @@ const LikesData = [ { // type code here for "relation_one" field - amount: 'Franz Boas', + amount: 'Edwin Hubble', // type code here for "relation_one" field }, @@ -295,7 +355,15 @@ const LikesData = [ { // type code here for "relation_one" field - amount: 'Frederick Gowland Hopkins', + amount: 'Werner Heisenberg', + + // type code here for "relation_one" field + }, + + { + // type code here for "relation_one" field + + amount: 'Anton van Leeuwenhoek', // type code here for "relation_one" field }, @@ -347,6 +415,17 @@ async function associateUserWithOrganization() { if (User3?.setOrganization) { await User3.setOrganization(relatedOrganization3); } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const User4 = await Users.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (User4?.setOrganization) { + await User4.setOrganization(relatedOrganization4); + } } async function associateApplicationWithCandidate() { @@ -393,6 +472,17 @@ async function associateApplicationWithCandidate() { if (Application3?.setCandidate) { await Application3.setCandidate(relatedCandidate3); } + + const relatedCandidate4 = await Candidates.findOne({ + offset: Math.floor(Math.random() * (await Candidates.count())), + }); + const Application4 = await Applications.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Application4?.setCandidate) { + await Application4.setCandidate(relatedCandidate4); + } } async function associateApplicationWithJob() { @@ -439,6 +529,17 @@ async function associateApplicationWithJob() { if (Application3?.setJob) { await Application3.setJob(relatedJob3); } + + const relatedJob4 = await Jobs.findOne({ + offset: Math.floor(Math.random() * (await Jobs.count())), + }); + const Application4 = await Applications.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Application4?.setJob) { + await Application4.setJob(relatedJob4); + } } async function associateApplicationWithOrganization() { @@ -485,6 +586,17 @@ async function associateApplicationWithOrganization() { if (Application3?.setOrganization) { await Application3.setOrganization(relatedOrganization3); } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Application4 = await Applications.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Application4?.setOrganization) { + await Application4.setOrganization(relatedOrganization4); + } } async function associateCandidateWithRecruiter() { @@ -531,6 +643,17 @@ async function associateCandidateWithRecruiter() { if (Candidate3?.setRecruiter) { await Candidate3.setRecruiter(relatedRecruiter3); } + + const relatedRecruiter4 = await Recruiters.findOne({ + offset: Math.floor(Math.random() * (await Recruiters.count())), + }); + const Candidate4 = await Candidates.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Candidate4?.setRecruiter) { + await Candidate4.setRecruiter(relatedRecruiter4); + } } // Similar logic for "relation_many" @@ -579,6 +702,17 @@ async function associateCandidateWithOrganization() { if (Candidate3?.setOrganization) { await Candidate3.setOrganization(relatedOrganization3); } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Candidate4 = await Candidates.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Candidate4?.setOrganization) { + await Candidate4.setOrganization(relatedOrganization4); + } } // Similar logic for "relation_many" @@ -627,6 +761,17 @@ async function associateHrManagerWithOrganization() { if (HrManager3?.setOrganization) { await HrManager3.setOrganization(relatedOrganization3); } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const HrManager4 = await HrManagers.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (HrManager4?.setOrganization) { + await HrManager4.setOrganization(relatedOrganization4); + } } // Similar logic for "relation_many" @@ -675,6 +820,17 @@ async function associateJobWithOrganization() { if (Job3?.setOrganization) { await Job3.setOrganization(relatedOrganization3); } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Job4 = await Jobs.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Job4?.setOrganization) { + await Job4.setOrganization(relatedOrganization4); + } } // Similar logic for "relation_many" @@ -723,6 +879,17 @@ async function associateRecruiterWithOrganization() { if (Recruiter3?.setOrganization) { await Recruiter3.setOrganization(relatedOrganization3); } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Recruiter4 = await Recruiters.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Recruiter4?.setOrganization) { + await Recruiter4.setOrganization(relatedOrganization4); + } } async function associateLikeWithOrganization() { @@ -769,6 +936,17 @@ async function associateLikeWithOrganization() { if (Like3?.setOrganization) { await Like3.setOrganization(relatedOrganization3); } + + const relatedOrganization4 = await Organizations.findOne({ + offset: Math.floor(Math.random() * (await Organizations.count())), + }); + const Like4 = await Likes.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Like4?.setOrganization) { + await Like4.setOrganization(relatedOrganization4); + } } async function associateLikeWithUser() { @@ -815,6 +993,17 @@ async function associateLikeWithUser() { if (Like3?.setUser) { await Like3.setUser(relatedUser3); } + + const relatedUser4 = await Users.findOne({ + offset: Math.floor(Math.random() * (await Users.count())), + }); + const Like4 = await Likes.findOne({ + order: [['id', 'ASC']], + offset: 4, + }); + if (Like4?.setUser) { + await Like4.setUser(relatedUser4); + } } module.exports = { diff --git a/backend/src/index.js b/backend/src/index.js index b2ee0c6..898593c 100644 --- a/backend/src/index.js +++ b/backend/src/index.js @@ -51,9 +51,9 @@ const options = { openapi: '3.0.0', info: { version: '1.0.0', - title: 'app for Allison', + title: 'Welcome', description: - 'app for Allison Online REST API for Testing and Prototyping application. You can perform all major operations with your entities - create, delete and etc.', + 'Welcome Online REST API for Testing and Prototyping application. You can perform all major operations with your entities - create, delete and etc.', }, servers: [ { diff --git a/backend/src/services/notifications/list.js b/backend/src/services/notifications/list.js index 3ea7a6a..c99c718 100644 --- a/backend/src/services/notifications/list.js +++ b/backend/src/services/notifications/list.js @@ -1,6 +1,6 @@ const errors = { app: { - title: 'app for Allison', + title: 'Welcome', }, auth: { diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 5b66cb0..9b8b889 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -15,7 +15,7 @@ services: - ./data/db:/var/lib/postgresql/data environment: - POSTGRES_HOST_AUTH_METHOD=trust - - POSTGRES_DB=db_app_for_allison + - POSTGRES_DB=db_welcome ports: - "5432:5432" backend: diff --git a/frontend/README.md b/frontend/README.md index 77a28a0..97fceb3 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,4 +1,4 @@ -# app for Allison +# Welcome ## This project was generated by Flatlogic Platform. diff --git a/frontend/src/components/AsideMenuLayer.tsx b/frontend/src/components/AsideMenuLayer.tsx index 63e17e4..1f27217 100644 --- a/frontend/src/components/AsideMenuLayer.tsx +++ b/frontend/src/components/AsideMenuLayer.tsx @@ -75,7 +75,7 @@ export default function AsideMenuLayer({ >
- app for Allison + Welcome {organizationName &&

{organizationName}

} diff --git a/frontend/src/components/WebPageComponents/Header.tsx b/frontend/src/components/WebPageComponents/Header.tsx index 1c882e7..14ab067 100644 --- a/frontend/src/components/WebPageComponents/Header.tsx +++ b/frontend/src/components/WebPageComponents/Header.tsx @@ -19,7 +19,7 @@ export default function WebSiteHeader({ const websiteHeder = useAppSelector((state) => state.style.websiteHeder); const borders = useAppSelector((state) => state.style.borders); - const style = HeaderStyle.PAGES_RIGHT; + const style = HeaderStyle.PAGES_LEFT; const design = HeaderDesigns.DEFAULT_DESIGN; return ( diff --git a/frontend/src/pages/_app.tsx b/frontend/src/pages/_app.tsx index 59f97ea..665b943 100644 --- a/frontend/src/pages/_app.tsx +++ b/frontend/src/pages/_app.tsx @@ -71,9 +71,9 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) { } }, []); - const title = 'app for Allison'; + const title = 'Welcome'; - const description = 'app for Allison generated by Flatlogic'; + const description = 'Welcome generated by Flatlogic'; const url = 'https://flatlogic.com/'; diff --git a/frontend/src/pages/index.tsx b/frontend/src/pages/index.tsx index 2ffd2f3..16abeec 100644 --- a/frontend/src/pages/index.tsx +++ b/frontend/src/pages/index.tsx @@ -27,7 +27,7 @@ import FaqSection from '../components/WebPageComponents/FaqComponent'; export default function WebSite() { const cardsStyle = useAppSelector((state) => state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'app for Allison'; + const projectName = 'Welcome'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -125,10 +125,10 @@ export default function WebSite() { content={`Discover our comprehensive recruitment platform designed to help recruiters source, qualify, and assess candidates efficiently. Learn about our features, team, and how we can assist in your hiring journey.`} /> - +
- +
); } diff --git a/frontend/src/pages/login.tsx b/frontend/src/pages/login.tsx index 3bac77b..4eb8c00 100644 --- a/frontend/src/pages/login.tsx +++ b/frontend/src/pages/login.tsx @@ -50,7 +50,7 @@ export default function Login() { remember: true, }); - const title = 'app for Allison'; + const title = 'Welcome'; // Fetch Pexels image/video useEffect(() => { @@ -195,10 +195,7 @@ export default function Login() {
-

- {' '} - app for Allison -

+

Welcome

diff --git a/frontend/src/pages/privacy-policy.tsx b/frontend/src/pages/privacy-policy.tsx index 1ea1273..8977592 100644 --- a/frontend/src/pages/privacy-policy.tsx +++ b/frontend/src/pages/privacy-policy.tsx @@ -5,7 +5,7 @@ import LayoutGuest from '../layouts/Guest'; import { getPageTitle } from '../config'; export default function PrivacyPolicy() { - const title = 'app for Allison'; + const title = 'Welcome'; const [projectUrl, setProjectUrl] = useState(''); useEffect(() => { diff --git a/frontend/src/pages/terms-of-use.tsx b/frontend/src/pages/terms-of-use.tsx index 9703ddd..37e98fd 100644 --- a/frontend/src/pages/terms-of-use.tsx +++ b/frontend/src/pages/terms-of-use.tsx @@ -5,7 +5,7 @@ import LayoutGuest from '../layouts/Guest'; import { getPageTitle } from '../config'; export default function PrivacyPolicy() { - const title = 'app for Allison'; + const title = 'Welcome'; const [projectUrl, setProjectUrl] = useState(''); useEffect(() => { diff --git a/frontend/src/pages/web_pages/about.tsx b/frontend/src/pages/web_pages/about.tsx index 9017236..f49d959 100644 --- a/frontend/src/pages/web_pages/about.tsx +++ b/frontend/src/pages/web_pages/about.tsx @@ -24,7 +24,7 @@ import ContactFormSection from '../../components/WebPageComponents/ContactFormCo export default function WebSite() { const cardsStyle = useAppSelector((state) => state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'app for Allison'; + const projectName = 'Welcome'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -89,10 +89,10 @@ export default function WebSite() { content={`Discover the mission, values, and team behind ${projectName}. Learn how our innovative recruitment platform is transforming the hiring process for businesses worldwide.`} /> - +
- +
); } diff --git a/frontend/src/pages/web_pages/contact.tsx b/frontend/src/pages/web_pages/contact.tsx index 96d7d57..404cf4c 100644 --- a/frontend/src/pages/web_pages/contact.tsx +++ b/frontend/src/pages/web_pages/contact.tsx @@ -18,7 +18,7 @@ import ContactFormSection from '../../components/WebPageComponents/ContactFormCo export default function WebSite() { const cardsStyle = useAppSelector((state) => state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'app for Allison'; + const projectName = 'Welcome'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -62,10 +62,10 @@ export default function WebSite() { content={`Reach out to ${projectName} for any inquiries or support. Our team is here to assist you with your recruitment needs and ensure a seamless experience.`} /> - +
- +
); } diff --git a/frontend/src/pages/web_pages/faq.tsx b/frontend/src/pages/web_pages/faq.tsx index 82d81da..12de4a2 100644 --- a/frontend/src/pages/web_pages/faq.tsx +++ b/frontend/src/pages/web_pages/faq.tsx @@ -18,7 +18,7 @@ import FaqSection from '../../components/WebPageComponents/FaqComponent'; export default function WebSite() { const cardsStyle = useAppSelector((state) => state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'app for Allison'; + const projectName = 'Welcome'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -95,10 +95,10 @@ export default function WebSite() { content={`Find answers to common questions about ${projectName}. Learn more about our features, services, and how we can assist you in optimizing your recruitment process.`} /> - +
- + ); } diff --git a/frontend/src/pages/web_pages/home.tsx b/frontend/src/pages/web_pages/home.tsx index ea03ae8..75e1f37 100644 --- a/frontend/src/pages/web_pages/home.tsx +++ b/frontend/src/pages/web_pages/home.tsx @@ -27,7 +27,7 @@ import FaqSection from '../../components/WebPageComponents/FaqComponent'; export default function WebSite() { const cardsStyle = useAppSelector((state) => state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'app for Allison'; + const projectName = 'Welcome'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -125,10 +125,10 @@ export default function WebSite() { content={`Discover our comprehensive recruitment platform designed to help recruiters source, qualify, and assess candidates efficiently. Learn about our features, team, and how we can assist in your hiring journey.`} /> - +
- + ); } diff --git a/frontend/src/pages/web_pages/services.tsx b/frontend/src/pages/web_pages/services.tsx index 50071d9..a981772 100644 --- a/frontend/src/pages/web_pages/services.tsx +++ b/frontend/src/pages/web_pages/services.tsx @@ -21,7 +21,7 @@ import FeaturesSection from '../../components/WebPageComponents/FeaturesComponen export default function WebSite() { const cardsStyle = useAppSelector((state) => state.style.cardsStyle); const bgColor = useAppSelector((state) => state.style.bgLayoutColor); - const projectName = 'app for Allison'; + const projectName = 'Welcome'; useEffect(() => { const darkElement = document.querySelector('body .dark'); @@ -104,10 +104,10 @@ export default function WebSite() { content={`Explore the range of services offered by ${projectName} to enhance your recruitment process. From candidate sourcing to data-driven insights, learn how we can support your hiring needs.`} /> - +
- + ); }