From d35888dab507e360a9b5da7ffb9aa756a8261877 Mon Sep 17 00:00:00 2001 From: Boshitha Gunarathna Date: Mon, 25 Nov 2024 14:20:25 +0530 Subject: [PATCH 01/28] Update CandidateHome.tsx --- .../src/pages/Candidate/CandidateHome.tsx | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx b/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx index 72c819b..30986cf 100644 --- a/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx +++ b/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx @@ -10,12 +10,12 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from ". const CandidateHome: React.FC = () => { { Header } const jobPosts = [ - { id: 1, title: "Frontend Developer", description: "Create beautiful, responsive user interfaces with React and TypeScript.", company: "TechCorp", date: "2021-09-01", type: "full-time" }, - { id: 2, title: "Backend Developer", description: "Build scalable backend systems using Python, Django, and SQL.", company: "TechCorp", date: "2021-09-05", type: "full-time" }, - { id: 3, title: "Full Stack Developer", description: "Join our team to work on both front-end and back-end development.", company: "TechCorp", date: "2021-09-10", type: "full-time" }, - { id: 4, title: "UX/UI Designer", description: "Design and improve the user experience and interface of the platform.", company: "TechCorp", date: "2021-09-15", type: "full-time" }, - { id: 5, title: "Data Scientist", description: "Analyze data and build predictive models to guide business decisions.", company: "TechCorp", date: "2021-09-20", type: "full-time" }, - { id: 6, title: "DevOps Engineer", description: "Manage and improve our deployment pipelines and infrastructure.", company: "TechCorp", date: "2021-09-25", type: "full-time" }, + { jobID: 1, jobRole: "Frontend Developer", description: "Create beautiful, responsive user interfaces with React and TypeScript.", company: "TechCorp", location: "New York", salary: 90000, jobType: "Full-time", date: "2021-09-01" }, + { jobID: 2, jobRole: "Backend Developer", description: "Build scalable backend systems using Python, Django, and SQL.", company: "TechCorp", location: "San Francisco", salary: 95000, jobType: "Full-time", date: "2021-09-05" }, + { jobID: 3, jobRole: "Full Stack Developer", description: "Join our team to work on both front-end and back-end development.", company: "TechCorp", location: "Chicago", salary: 105000, jobType: "Full-time", date: "2021-09-10" }, + { jobID: 4, jobRole: "UX/UI Designer", description: "Design and improve the user experience and interface of the platform.", company: "TechCorp", location: "Los Angeles", salary: 85000, jobType: "Full-time", date: "2021-09-15" }, + { jobID: 5, jobRole: "Data Scientist", description: "Analyze data and build predictive models to guide business decisions.", company: "TechCorp", location: "Austin", salary: 120000, jobType: "Full-time", date: "2021-09-20" }, + { jobID: 6, jobRole: "DevOps Engineer", description: "Manage and improve our deployment pipelines and infrastructure.", company: "TechCorp", location: "Dallas", salary: 110000, jobType: "Full-time", date: "2021-09-25" }, ]; const [searchQuery, setSearchQuery] = useState(''); @@ -25,7 +25,7 @@ const CandidateHome: React.FC = () => { const filteredJobPosts = jobPosts .filter((job) => - job.title.toLowerCase().includes(searchQuery.toLowerCase()) || + job.jobRole.toLowerCase().includes(searchQuery.toLowerCase()) || job.description.toLowerCase().includes(searchQuery.toLowerCase()) ) .filter((job) => { @@ -37,7 +37,7 @@ const CandidateHome: React.FC = () => { if (dateFilter === 'month') return (today.getTime() - jobDate.getTime()) / (1000 * 60 * 60 * 24) <= 30; return true; }) - .filter((job) => (typeFilter === 'all' ? true : job.type === typeFilter)) + .filter((job) => (typeFilter === 'all' ? true : job.jobType === typeFilter)) .sort((a, b) => { if (orderBy === 'newest') return new Date(b.date).getTime() - new Date(a.date).getTime(); if (orderBy === 'oldest') return new Date(a.date).getTime() - new Date(b.date).getTime(); @@ -53,7 +53,6 @@ const CandidateHome: React.FC = () => {

Find your dream job and kickstart your career with us today.

Welcome to Our Job Portal

-
{/* Main content area */} @@ -124,10 +123,9 @@ const CandidateHome: React.FC = () => { All Types - Full Time - Part Time - Contract - Internship + Full Time + Part Time + Contract @@ -141,12 +139,14 @@ const CandidateHome: React.FC = () => { {filteredJobPosts.length > 0 ? (
{filteredJobPosts.map((job) => ( -
-
{job.title}
+
+
{job.jobRole}
{job.company}

{job.description}

+

{job.location}

+

${job.salary}

@@ -154,8 +154,7 @@ const CandidateHome: React.FC = () => {
- -
+
))} @@ -164,7 +163,6 @@ const CandidateHome: React.FC = () => {

No jobs found. Try adjusting your filters.

)}
- From ef4f446e89b40ab3977c4e73a7a210703ee8c39d Mon Sep 17 00:00:00 2001 From: Boshitha Gunarathna Date: Mon, 25 Nov 2024 14:21:54 +0530 Subject: [PATCH 02/28] Update candidateHeader.css --- frontend/AIPT/src/components/Candidate/candidateHeader.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/AIPT/src/components/Candidate/candidateHeader.css b/frontend/AIPT/src/components/Candidate/candidateHeader.css index 103df0b..918079b 100644 --- a/frontend/AIPT/src/components/Candidate/candidateHeader.css +++ b/frontend/AIPT/src/components/Candidate/candidateHeader.css @@ -24,7 +24,7 @@ } .header-scrolled { - background-color: #d3d3d3; + background-color: #32007d; transition: background-color 0.3s ease; } From 716a7ad68e3cf0fcbc493620e133c80a38c98f68 Mon Sep 17 00:00:00 2001 From: Boshitha Gunarathna Date: Mon, 25 Nov 2024 14:21:57 +0530 Subject: [PATCH 03/28] Update CandidateHome.tsx --- frontend/AIPT/src/pages/Candidate/CandidateHome.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx b/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx index 30986cf..ba884f9 100644 --- a/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx +++ b/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx @@ -46,7 +46,7 @@ const CandidateHome: React.FC = () => { return (
-
+
{/* Header Banner Section */}
From 81d8a1fc41658cbbbe8dde10a59660d33608d0f7 Mon Sep 17 00:00:00 2001 From: Boshitha Gunarathna Date: Mon, 25 Nov 2024 14:26:10 +0530 Subject: [PATCH 04/28] Update CandidateHome.css --- frontend/AIPT/src/pages/Styles/CandidateHome.css | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/AIPT/src/pages/Styles/CandidateHome.css b/frontend/AIPT/src/pages/Styles/CandidateHome.css index 3f06444..3b7d340 100644 --- a/frontend/AIPT/src/pages/Styles/CandidateHome.css +++ b/frontend/AIPT/src/pages/Styles/CandidateHome.css @@ -148,7 +148,6 @@ body { z-index: 0; } - .banner-text { flex: 1; max-width: 60%; From 53d5c604f7724f7cbb25871b64714fc2c823a19f Mon Sep 17 00:00:00 2001 From: Boshitha Gunarathna Date: Mon, 25 Nov 2024 14:26:12 +0530 Subject: [PATCH 05/28] Update CandidateHome.tsx --- frontend/AIPT/src/pages/Candidate/CandidateHome.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx b/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx index ba884f9..2f1b677 100644 --- a/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx +++ b/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx @@ -7,6 +7,7 @@ import { Input } from "../../components/ui/input"; import { Button } from "../../components/ui/button"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../components/ui/select"; + const CandidateHome: React.FC = () => { { Header } const jobPosts = [ @@ -53,6 +54,7 @@ const CandidateHome: React.FC = () => {

Find your dream job and kickstart your career with us today.

Welcome to Our Job Portal

+
{/* Main content area */} From d13f8a9552f935df9bc4b8c20ecd177c13b172c2 Mon Sep 17 00:00:00 2001 From: Boshitha Gunarathna Date: Mon, 25 Nov 2024 14:26:18 +0530 Subject: [PATCH 06/28] Update CandidateHeader.tsx --- frontend/AIPT/src/components/Candidate/CandidateHeader.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/AIPT/src/components/Candidate/CandidateHeader.tsx b/frontend/AIPT/src/components/Candidate/CandidateHeader.tsx index f7cd6be..3723b93 100644 --- a/frontend/AIPT/src/components/Candidate/CandidateHeader.tsx +++ b/frontend/AIPT/src/components/Candidate/CandidateHeader.tsx @@ -1,3 +1,4 @@ + import React, { useEffect, useState } from 'react'; import './candidateHeader.css'; import { Link, useLocation } from 'react-router-dom'; @@ -14,6 +15,7 @@ function logout() { const CandidateHeader: React.FC = ({ title }) => { const [isDropdownOpen, setIsDropdownOpen] = useState(false); + const [isScrolled, setIsScrolled] = useState(false); const location = useLocation(); @@ -42,6 +44,7 @@ const CandidateHeader: React.FC = ({ title }) => { console.log("Is scrolled?", isScrolled); return ( +
From 0268653591617552a4f651fb38e907b80e74a24b Mon Sep 17 00:00:00 2001 From: Boshitha Gunarathna Date: Mon, 25 Nov 2024 14:26:20 +0530 Subject: [PATCH 07/28] Update candidateHeader.css --- frontend/AIPT/src/components/Candidate/candidateHeader.css | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/AIPT/src/components/Candidate/candidateHeader.css b/frontend/AIPT/src/components/Candidate/candidateHeader.css index 918079b..dbe61e4 100644 --- a/frontend/AIPT/src/components/Candidate/candidateHeader.css +++ b/frontend/AIPT/src/components/Candidate/candidateHeader.css @@ -13,6 +13,7 @@ width: 100%; box-sizing: border-box; transition: background-color 0.3s ease, box-shadow 0.3s ease; + transition: background-color 0.3s ease, box-shadow 0.3s ease; left: 0; } From 9e99df6eb26993a97f8bd7a42ed3a5a4251b9b43 Mon Sep 17 00:00:00 2001 From: Boshitha Gunarathna Date: Mon, 25 Nov 2024 16:39:56 +0530 Subject: [PATCH 08/28] Create footer.css --- .../AIPT/src/components/Candidate/footer.css | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 frontend/AIPT/src/components/Candidate/footer.css diff --git a/frontend/AIPT/src/components/Candidate/footer.css b/frontend/AIPT/src/components/Candidate/footer.css new file mode 100644 index 0000000..1299eca --- /dev/null +++ b/frontend/AIPT/src/components/Candidate/footer.css @@ -0,0 +1,168 @@ +footer { + background: linear-gradient(to right, #1e293b, #1f2937); + color: #e2e8f0; + font-family: 'Arial', sans-serif; + } + + footer .container { + max-width: 1200px; + margin: 0 auto; + } + + footer h3, footer h4 { + font-weight: bold; + } + + footer a { + color: #94a3b8; + text-decoration: none; + transition: color 0.3s ease-in-out; + } + + footer a:hover { + color: #ffffff; + } + + footer ul { + list-style: none; + padding: 0; + margin: 0; + } + + footer li { + margin: 0; + } + + footer input[type="email"] { + width: 100%; + max-width: 300px; + padding: 10px; + border-radius: 6px; + border: none; + background-color: #2d3748; + color: #ffffff; + } + + footer input[type="email"]::placeholder { + color: #a0aec0; + } + + footer button { + padding: 10px 20px; + border: none; + border-radius: 6px; + background-color: #3b82f6; + color: #ffffff; + cursor: pointer; + font-weight: bold; + transition: background-color 0.3s ease-in-out; + } + + footer button:hover { + background-color: #2563eb; + } + + footer svg { + fill: currentColor; + } + + footer .flex { + display: flex; + flex-wrap: wrap; + } + + footer .gap-3 { + gap: 0.75rem; + } + + footer .gap-6 { + gap: 1.5rem; + } + + footer .text-gray-400 { + color: #94a3b8; + } + + footer .hover\\:text-white:hover { + color: #ffffff; + } + + footer .text-sm { + font-size: 0.875rem; + } + + footer .border-t { + border-top: 1px solid #374151; + } + + footer .py-12 { + padding-top: 3rem; + padding-bottom: 3rem; + } + + footer .pt-8 { + padding-top: 2rem; + } + + footer .space-y-2 > * + * { + margin-top: 0.5rem; + } + + footer .space-y-4 > * + * { + margin-top: 1rem; + } + + footer .grid { + display: grid; + } + + footer .grid-cols-1 { + grid-template-columns: 1fr; + } + + footer .md\\:grid-cols-2 { + grid-template-columns: repeat(2, 1fr); + } + + footer .lg\\:grid-cols-4 { + grid-template-columns: repeat(4, 1fr); + } + + footer .gap-12 { + gap: 3rem; + } + + footer .rounded-lg { + border-radius: 0.5rem; + } + + footer .focus\\:outline-none:focus { + outline: none; + } + + footer .focus\\:ring-2:focus { + box-shadow: 0 0 0 2px #3b82f6; + } + + footer .bg-gradient-to-r { + background: linear-gradient(to right, var(--tw-gradient-stops)); + } + + footer .from-blue-400 { + --tw-gradient-from: #60a5fa; + --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(96, 165, 250, 0)); + } + + footer .to-purple-500 { + --tw-gradient-to: #a78bfa; + } + + footer .bg-clip-text { + background-clip: text; + -webkit-background-clip: text; + } + + footer .text-transparent { + color: transparent; + } + \ No newline at end of file From e05bb8c22bc1a8ef78567243377afff4ffb31c38 Mon Sep 17 00:00:00 2001 From: Boshitha Gunarathna Date: Mon, 25 Nov 2024 16:40:01 +0530 Subject: [PATCH 09/28] Create Footer.tsx --- .../AIPT/src/components/Candidate/Footer.tsx | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 frontend/AIPT/src/components/Candidate/Footer.tsx diff --git a/frontend/AIPT/src/components/Candidate/Footer.tsx b/frontend/AIPT/src/components/Candidate/Footer.tsx new file mode 100644 index 0000000..2eeeef8 --- /dev/null +++ b/frontend/AIPT/src/components/Candidate/Footer.tsx @@ -0,0 +1,142 @@ +import React from 'react'; +import { Mail, Phone, MapPin, Facebook, Twitter, Instagram, ArrowUpCircle } from 'lucide-react'; +import './footer.css'; + +const Footer = () => { + const scrollToTop = () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }; + + const currentYear = new Date().getFullYear(); + const quickLinks = ['About Us', 'Services', 'Portfolio', 'Careers', 'Contact']; + const socialLinks = [ + { icon: Facebook, name: 'Facebook', href: '#' }, + { icon: Twitter, name: 'Twitter', href: '#' }, + { icon: Instagram, name: 'Instagram', href: '#' }, + ]; + + return ( +
+ {/* Wave SVG Divider */} + {/*
+ +
*/} + +
+ {/* Footer Content */} +
+ {/* Company Info */} +
+

+ CompanyName +

+

+ Crafting digital experiences that inspire and innovate. We're committed to excellence in everything we do. +

+
+ + {/* Quick Links */} +
+

Quick Links

+ +
+ + {/* Contact Info */} +
+

Contact Us

+
+
+
+
+
+
+
+
+
+ + {/* Newsletter */} +
+

Stay Updated

+

Subscribe to our newsletter for updates and insights.

+
+ + +
+
+
+ + {/* Social Links & Copyright */} +
+
+
+ {socialLinks.map(({ icon: Icon, name, href }, index) => ( + + + ))} +
+
© {currentYear} CompanyName. All rights reserved.
+ +
+
+
+
+ ); +}; + +export default Footer; From 469bf2ea720b8e63f964c8fce5bfc8d43bd47631 Mon Sep 17 00:00:00 2001 From: Boshitha Gunarathna Date: Mon, 25 Nov 2024 16:40:04 +0530 Subject: [PATCH 10/28] Update select.tsx --- frontend/AIPT/src/components/ui/select.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/AIPT/src/components/ui/select.tsx b/frontend/AIPT/src/components/ui/select.tsx index dd94d30..ecd5ea1 100644 --- a/frontend/AIPT/src/components/ui/select.tsx +++ b/frontend/AIPT/src/components/ui/select.tsx @@ -36,12 +36,13 @@ const SelectContent = React.forwardRef< {children} -)) +)); SelectItem.displayName = SelectPrimitive.Item.displayName export { From cfdbee9e6afeb0b0e3581f4bcef7651e89baf72f Mon Sep 17 00:00:00 2001 From: Boshitha Gunarathna Date: Mon, 25 Nov 2024 16:40:06 +0530 Subject: [PATCH 11/28] Update CandidateHome.tsx --- .../src/pages/Candidate/CandidateHome.tsx | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx b/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx index 2f1b677..43514c9 100644 --- a/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx +++ b/frontend/AIPT/src/pages/Candidate/CandidateHome.tsx @@ -1,23 +1,38 @@ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import '../Styles/CandidateHome.css'; import Header from '../../components/Candidate/CandidateHeader'; +import Footer from '../../components/Candidate/Footer'; import { Search, Calendar, ArrowUpDown, Filter } from 'lucide-react'; import { Card, CardHeader, CardContent, CardFooter } from "../../components/ui/card"; import { Input } from "../../components/ui/input"; import { Button } from "../../components/ui/button"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../components/ui/select"; +import axios from 'axios'; + const CandidateHome: React.FC = () => { { Header } - const jobPosts = [ - { jobID: 1, jobRole: "Frontend Developer", description: "Create beautiful, responsive user interfaces with React and TypeScript.", company: "TechCorp", location: "New York", salary: 90000, jobType: "Full-time", date: "2021-09-01" }, - { jobID: 2, jobRole: "Backend Developer", description: "Build scalable backend systems using Python, Django, and SQL.", company: "TechCorp", location: "San Francisco", salary: 95000, jobType: "Full-time", date: "2021-09-05" }, - { jobID: 3, jobRole: "Full Stack Developer", description: "Join our team to work on both front-end and back-end development.", company: "TechCorp", location: "Chicago", salary: 105000, jobType: "Full-time", date: "2021-09-10" }, - { jobID: 4, jobRole: "UX/UI Designer", description: "Design and improve the user experience and interface of the platform.", company: "TechCorp", location: "Los Angeles", salary: 85000, jobType: "Full-time", date: "2021-09-15" }, - { jobID: 5, jobRole: "Data Scientist", description: "Analyze data and build predictive models to guide business decisions.", company: "TechCorp", location: "Austin", salary: 120000, jobType: "Full-time", date: "2021-09-20" }, - { jobID: 6, jobRole: "DevOps Engineer", description: "Manage and improve our deployment pipelines and infrastructure.", company: "TechCorp", location: "Dallas", salary: 110000, jobType: "Full-time", date: "2021-09-25" }, - ]; + + const [jobPosts, setJobPosts] = useState([]); + useEffect(() => { + axios.get('http://localhost:5000/api/jobs/all') + .then(response => { + setJobPosts(response.data); + }) + .catch(error => { + console.error("There was an error fetching the jobs:", error); + }); + }, []); + + // const jobPosts = [ + // { jobID: 1, jobRole: "Frontend Developer", description: "Create beautiful, responsive user interfaces with React and TypeScript.", company: "TechCorp", location: "New York", salary: 90000, jobType: "Full-time", date: "2021-09-01" }, + // { jobID: 2, jobRole: "Backend Developer", description: "Build scalable backend systems using Python, Django, and SQL.", company: "TechCorp", location: "San Francisco", salary: 95000, jobType: "Full-time", date: "2021-09-05" }, + // { jobID: 3, jobRole: "Full Stack Developer", description: "Join our team to work on both front-end and back-end development.", company: "TechCorp", location: "Chicago", salary: 105000, jobType: "Full-time", date: "2021-09-10" }, + // { jobID: 4, jobRole: "UX/UI Designer", description: "Design and improve the user experience and interface of the platform.", company: "TechCorp", location: "Los Angeles", salary: 85000, jobType: "Full-time", date: "2021-09-15" }, + // { jobID: 5, jobRole: "Data Scientist", description: "Analyze data and build predictive models to guide business decisions.", company: "TechCorp", location: "Austin", salary: 120000, jobType: "Full-time", date: "2021-09-20" }, + // { jobID: 6, jobRole: "DevOps Engineer", description: "Manage and improve our deployment pipelines and infrastructure.", company: "TechCorp", location: "Dallas", salary: 110000, jobType: "Full-time", date: "2021-09-25" }, + // ]; const [searchQuery, setSearchQuery] = useState(''); const [dateFilter, setDateFilter] = useState('all'); @@ -167,6 +182,7 @@ const CandidateHome: React.FC = () => {
+