From 2e30c879fd9c80dec2bf1b2c66062ee4b3d014e5 Mon Sep 17 00:00:00 2001 From: Kosolpattanadurong Thitiwat Date: Sat, 2 Nov 2024 00:00:36 +0800 Subject: [PATCH 1/3] add applicant overview page --- src/app/applicant/page.tsx | 133 +++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 src/app/applicant/page.tsx diff --git a/src/app/applicant/page.tsx b/src/app/applicant/page.tsx new file mode 100644 index 0000000..b1077e7 --- /dev/null +++ b/src/app/applicant/page.tsx @@ -0,0 +1,133 @@ +"use client"; + +import NavBar from "@/components/Navbar"; +import Footer from "@/components/Footer" +import Carousel from "@/components/Carousel"; +import { JobData, JobDataType } from "@/lib/positions/job-data"; +import Link from "next/link"; +import { useState } from "react"; + +const inputData = { + "ui-ux-designer": { + title: "UI/UX Designer", + department: "Software Development", + semester: "Semester 1", + positionsAvailable: "1-5 Positions Available", + description: "As a UIUX designer, you will learn from and work closely with a team of designers, engineers, and design lead to create a fit-for-purpose, convenient, and engaging user interface for applications NUS Fintech Society would build.", + requirements: "You love tech and love to design!" + }, + "software-engineer": { + title: "Software Engineer", + department: "Software Development", + semester: "Semester 1", + positionsAvailable: "5-10 Positions Available", + description: "As a software engineer, you will be involved in the entire software development lifecycle, from requirements gathering to deployment and maintenance. You will work with a team of talented engineers to build innovative solutions for NUS Fintech Society.", + requirements: "Strong programming skills in at least one language (e.g., Python, Java, C++)", + }, + "data-scientist": { + title: "Data Scientist", + department: "Data Science", + semester: "Semester 2", + positionsAvailable: "2-4 Positions Available", + description: "As a data scientist, you will leverage your data analysis and machine learning skills to extract valuable insights from large datasets. You will work on projects such as fraud detection, risk assessment, and algorithmic trading.", + requirements: "Experience with data analysis tools (e.g., Python, R, SQL) and machine learning frameworks (e.g., TensorFlow, PyTorch)", + } +} + + +export default function ApplicantDashboard() { + return ( +
+ + +
+ + +
+
+
+ ); +} + +function PositionApplied() { + + return ( +
+
+ Positions Applied +
+ {/*FIX: Fetching from database*/} + {Object.values(inputData).map(job => { + return () + })} +
+ ) +} + +function PositionSaved() { + + return ( +
+
+ Positions Saved +
+ {/*FIX: Fetching from database*/} + {Object.values(inputData).map(job => { + return () + })} +
+ ) +} + +// Card components (require a lot of refactoring) +function PositionCardApplied(JobData: JobDataType) { + const [isShowMore, setIsShowMore] = useState(false) + return ( +
+
+
+ {JobData.title} +
+
{JobData.department} - {JobData.semester}
+ {isShowMore &&
{JobData.description}
} +
+
+
[Application Status]
+
+ {/* Conditional Rendering */} + {isShowMore === false ? ( + + ) : ( + + )} +
+ +
+
+ ); +} + +function PositionCardSaved(JobData: JobDataType) { + + return ( +
+
+
+ {JobData.title} +
+
{JobData.department} - {JobData.semester}
+
+
+ {/*FIX must redirect to /positions/route */} + + +
+
+ ); +} \ No newline at end of file From c42fa0c1ab5fe9ea507784b0d0bdde200e8101d7 Mon Sep 17 00:00:00 2001 From: Kosolpattanadurong Thitiwat Date: Sat, 2 Nov 2024 00:00:43 +0800 Subject: [PATCH 2/3] add placeholder for carousel --- src/components/Carousel.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/components/Carousel.tsx diff --git a/src/components/Carousel.tsx b/src/components/Carousel.tsx new file mode 100644 index 0000000..beb93d2 --- /dev/null +++ b/src/components/Carousel.tsx @@ -0,0 +1,9 @@ +export default function Carousel() { + return ( +
+
+ Carousel of NFS Images and Events (must be implemented) +
+
+ ); +} From 12c44f108ebebd89d86e5d4aa6f0e538a4f7562d Mon Sep 17 00:00:00 2001 From: Kosolpattanadurong Thitiwat Date: Sun, 3 Nov 2024 00:25:32 +0800 Subject: [PATCH 3/3] make it responsive --- src/app/applicant/page.tsx | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/app/applicant/page.tsx b/src/app/applicant/page.tsx index b1077e7..070e660 100644 --- a/src/app/applicant/page.tsx +++ b/src/app/applicant/page.tsx @@ -40,7 +40,7 @@ export default function ApplicantDashboard() {
-
+
@@ -56,7 +56,7 @@ function PositionApplied() {
Positions Applied
- {/*FIX: Fetching from database*/} + {/*TODO: Fetching from database*/} {Object.values(inputData).map(job => { return () })} @@ -71,7 +71,7 @@ function PositionSaved() {
Positions Saved
- {/*FIX: Fetching from database*/} + {/*TODO: Fetching from database*/} {Object.values(inputData).map(job => { return () })} @@ -81,27 +81,30 @@ function PositionSaved() { // Card components (require a lot of refactoring) function PositionCardApplied(JobData: JobDataType) { - const [isShowMore, setIsShowMore] = useState(false) + const [isShowMore, setIsShowMore] = useState(false); + const ApplicationStatus = "Completed ✅" return ( -
+
{JobData.title}
{JobData.department} - {JobData.semester}
- {isShowMore &&
{JobData.description}
} + {isShowMore &&
+ {JobData.description} +
}
-
[Application Status]
-
+
{ApplicationStatus}
+
{/* Conditional Rendering */} {isShowMore === false ? ( ) : ( )}
@@ -114,7 +117,7 @@ function PositionCardApplied(JobData: JobDataType) { function PositionCardSaved(JobData: JobDataType) { return ( -
+
{JobData.title} @@ -122,7 +125,7 @@ function PositionCardSaved(JobData: JobDataType) {
{JobData.department} - {JobData.semester}
- {/*FIX must redirect to /positions/route */} + {/*TODO must redirect to /positions/route */}