From b8fd27fdc6ebdd4d5d85fef5163a2e464b46e582 Mon Sep 17 00:00:00 2001 From: Daniel Huang Date: Tue, 2 Dec 2025 22:39:10 -0500 Subject: [PATCH 1/2] fixed the frontend boxes --- apps/backend/scripts/seed.config.json | 6 +- .../ApplicantView/ApplicationDetailsCard.tsx | 65 ++++ .../ApplicationResponsesList.tsx | 61 +++ .../ApplicantView/RecruitmentStageCard.tsx | 27 ++ .../components/ApplicantView/user.tsx | 347 +++++++++++------- .../applicant/components/FileUploadBox.tsx | 10 +- 6 files changed, 380 insertions(+), 136 deletions(-) create mode 100644 apps/frontend/src/features/applicant/components/ApplicantView/ApplicationDetailsCard.tsx create mode 100644 apps/frontend/src/features/applicant/components/ApplicantView/ApplicationResponsesList.tsx create mode 100644 apps/frontend/src/features/applicant/components/ApplicantView/RecruitmentStageCard.tsx diff --git a/apps/backend/scripts/seed.config.json b/apps/backend/scripts/seed.config.json index 5c0c8672..452ee019 100644 --- a/apps/backend/scripts/seed.config.json +++ b/apps/backend/scripts/seed.config.json @@ -1,8 +1,8 @@ { "personalUser": { - "firstName": "Ryaken", - "lastName": "Nakamoto", - "email": "nakamoto.r@husky.neu.edu", + "firstName": "Daniel", + "lastName": "Huang", + "email": "huang.danie@husky.neu.edu", "status": "Admin" } } diff --git a/apps/frontend/src/features/applicant/components/ApplicantView/ApplicationDetailsCard.tsx b/apps/frontend/src/features/applicant/components/ApplicantView/ApplicationDetailsCard.tsx new file mode 100644 index 00000000..d07ffcdb --- /dev/null +++ b/apps/frontend/src/features/applicant/components/ApplicantView/ApplicationDetailsCard.tsx @@ -0,0 +1,65 @@ +import { Box, Typography, Stack } from '@mui/material'; +import { Application } from '@sharedTypes/types/application.types'; + +interface ApplicationDetailsCardProps { + application: Application; +} + +export const ApplicationDetailsCard = ({ + application, +}: ApplicationDetailsCardProps) => { + return ( + + + Application Details + + + + + + Year + + {application.year} + + + + Semester + + {application.semester} + + + + Position + + {application.position} + + + + Stage + + {application.stage} + + + + Status + + {application.stageProgress} + + + + Applications + + {application.numApps} + + + + + ); +}; diff --git a/apps/frontend/src/features/applicant/components/ApplicantView/ApplicationResponsesList.tsx b/apps/frontend/src/features/applicant/components/ApplicantView/ApplicationResponsesList.tsx new file mode 100644 index 00000000..aacd4b16 --- /dev/null +++ b/apps/frontend/src/features/applicant/components/ApplicantView/ApplicationResponsesList.tsx @@ -0,0 +1,61 @@ +import { + Typography, + List, + ListItem, + ListItemIcon, + ListItemText, + Box, +} from '@mui/material'; +import { DoneOutline } from '@mui/icons-material'; +import { Response } from '@sharedTypes/types/application.types'; + +interface ApplicationResponsesListProps { + responses: Response[]; +} + +export const ApplicationResponsesList = ({ + responses, +}: ApplicationResponsesListProps) => { + if (!responses || responses.length === 0) { + return null; + } + + return ( + + + Application Responses + + + {responses.map((response, index) => ( + + + + + + {response.question} + + } + secondary={ + + {response.answer} + + } + sx={{ m: 0 }} + /> + + ))} + + + ); +}; diff --git a/apps/frontend/src/features/applicant/components/ApplicantView/RecruitmentStageCard.tsx b/apps/frontend/src/features/applicant/components/ApplicantView/RecruitmentStageCard.tsx new file mode 100644 index 00000000..689cf18f --- /dev/null +++ b/apps/frontend/src/features/applicant/components/ApplicantView/RecruitmentStageCard.tsx @@ -0,0 +1,27 @@ +import { Box, Typography } from '@mui/material'; + +interface RecruitmentStageCardProps { + stage: string; +} + +export const RecruitmentStageCard = ({ stage }: RecruitmentStageCardProps) => { + return ( + + + Recruitment Stage + + + {stage} + + + ); +}; diff --git a/apps/frontend/src/features/applicant/components/ApplicantView/user.tsx b/apps/frontend/src/features/applicant/components/ApplicantView/user.tsx index 11e17abb..9d9e346e 100644 --- a/apps/frontend/src/features/applicant/components/ApplicantView/user.tsx +++ b/apps/frontend/src/features/applicant/components/ApplicantView/user.tsx @@ -8,6 +8,7 @@ import { ListItemText, Box, CircularProgress, + Container, } from '@mui/material'; import { DoneOutline } from '@mui/icons-material'; import useLoginContext from '@features/auth/components/LoginPage/useLoginContext'; @@ -42,163 +43,251 @@ export const ApplicantView = ({ user }: ApplicantViewProps) => { } }, [selectedApplication]); + const isPMChallengeStage = + selectedApplication?.stage === ApplicationStage.PM_CHALLENGE; + return ( "', + position: 'fixed', + bottom: '15%', + right: '8%', + fontSize: '120px', + color: '#00FFFF', + opacity: 0.08, + fontFamily: 'monospace', + fontWeight: 'bold', + pointerEvents: 'none', + zIndex: 0, }, }} > + {/* Gradient Blur Effects */} + + - - Welcome back, {fullName || 'User'}! - + + + Welcome back, {fullName || 'User'}! + - {isLoading ? ( - - ) : ( -
- {selectedApplication && ( - <> - - Recruitment Stage - - {selectedApplication.stage} - - - {!isLoading && - selectedApplication && - String(selectedApplication.stage) === - ApplicationStage.PM_CHALLENGE && ( - - )} - + {isLoading ? ( + + + + ) : selectedApplication ? ( + + {/* Recruitment Stage Card */} + + + Recruitment Stage + + + {selectedApplication.stage} + + + + {/* PM Challenge Upload Box */} + {isPMChallengeStage && ( + + )} + + {/* Application Details Card */} + + Application Details - - - Year: {selectedApplication.year} - - - Semester: {selectedApplication.semester} - - - Position: {selectedApplication.position} - - - Stage: {selectedApplication.stage} - - - Status: {selectedApplication.stageProgress} - - - Applications: {selectedApplication.numApps} - + + + + Year + + + {selectedApplication.year} + + + + + Semester + + + {selectedApplication.semester} + + + + + Position + + + {selectedApplication.position} + + + + + Stage + + + {selectedApplication.stage} + + + + + Status + + + {selectedApplication.stageProgress} + + + + + Applications + + + {selectedApplication.numApps} + + + - - Application Responses - - - {selectedApplication.response.map((response, index) => ( - - - - - - {`A: ${response.answer}`} - - } - sx={{ m: 0 }} - /> - - ))} - - - )} -
- )} -
+ {/* Application Responses */} + {selectedApplication.response && + selectedApplication.response.length > 0 && ( + + + Application Responses + + + {selectedApplication.response.map((response, index) => ( + + + + + + {response.question} + + } + secondary={ + + {response.answer} + + } + sx={{ m: 0 }} + /> + + ))} + + + )} + + ) : ( + + + No application data available + + + )} +
+
); }; diff --git a/apps/frontend/src/features/applicant/components/FileUploadBox.tsx b/apps/frontend/src/features/applicant/components/FileUploadBox.tsx index 095f2ff3..e4efd041 100644 --- a/apps/frontend/src/features/applicant/components/FileUploadBox.tsx +++ b/apps/frontend/src/features/applicant/components/FileUploadBox.tsx @@ -89,10 +89,11 @@ const FileUploadBox: React.FC = ({ sx={{ backgroundColor: '#403f3f', borderRadius: 2, - p: 3, - mt: 4, + py: 1, + px: 1.5, textAlign: 'center', - width: 717, + maxWidth: '100%', + boxSizing: 'border-box', }} > = ({ sx={{ border: '1px dashed #999', borderRadius: 1, - p: 3, + py: 1.5, + px: 1, cursor: 'pointer', '&:hover': { borderColor: '#d81b60' }, }} From 6b5305b045d9bdc72d7bab0b248452f10b7dfd58 Mon Sep 17 00:00:00 2001 From: ryaken-nakamoto Date: Wed, 3 Dec 2025 21:56:24 -0500 Subject: [PATCH 2/2] merge fix --- .../components/ApplicantView/user.tsx | 85 +++++++++---------- .../applicant/components/FileUploadBox.tsx | 1 + 2 files changed, 40 insertions(+), 46 deletions(-) diff --git a/apps/frontend/src/features/applicant/components/ApplicantView/user.tsx b/apps/frontend/src/features/applicant/components/ApplicantView/user.tsx index d1c03710..5a89e602 100644 --- a/apps/frontend/src/features/applicant/components/ApplicantView/user.tsx +++ b/apps/frontend/src/features/applicant/components/ApplicantView/user.tsx @@ -8,7 +8,6 @@ import { ListItemText, Box, CircularProgress, - Container, } from '@mui/material'; import { DoneOutline } from '@mui/icons-material'; import useLoginContext from '@features/auth/components/LoginPage/useLoginContext'; @@ -62,7 +61,7 @@ export const ApplicantView = ({ user }: ApplicantViewProps) => { left: '8%', fontSize: '120px', color: '#8A2BE2', - opacity: 0.08, + opacity: 0.3, fontFamily: 'monospace', fontWeight: 'bold', pointerEvents: 'none', @@ -75,7 +74,7 @@ export const ApplicantView = ({ user }: ApplicantViewProps) => { right: '8%', fontSize: '120px', color: '#00FFFF', - opacity: 0.08, + opacity: 0.3, fontFamily: 'monospace', fontWeight: 'bold', pointerEvents: 'none', @@ -99,6 +98,8 @@ export const ApplicantView = ({ user }: ApplicantViewProps) => { maxWidth: 900, position: 'relative', zIndex: 1, + boxSizing: 'border-box', + mx: 'auto', }} > { p: 4, borderRadius: 2, boxShadow: '0 8px 32px rgba(0, 0, 0, 0.4)', + width: '100%', }} > Welcome back, {fullName || 'User'}! - {isLoading ? ( - - ) : ( -
- {selectedApplication && ( - <> - - Recruitment Stage - - {selectedApplication.stage} - - - {!isLoading && selectedApplication && isPM && - String(selectedApplication.stage) === - ApplicationStage.PM_CHALLENGE && ( - - )} + {isLoading ? ( + + + + ) : selectedApplication ? ( + + + Recruitment Stage + + {selectedApplication.stage} + + + {isPM && + String(selectedApplication.stage) === + ApplicationStage.PM_CHALLENGE && ( + + )} + Application Details @@ -158,6 +160,7 @@ export const ApplicantView = ({ user }: ApplicantViewProps) => { width: '100%', alignSelf: 'center', mt: 1, + boxSizing: 'border-box', }} > @@ -201,19 +204,9 @@ export const ApplicantView = ({ user }: ApplicantViewProps) => { {selectedApplication.stageProgress} - - - Applications - - - {selectedApplication.numApps} - - - - {/* Application Responses */} {selectedApplication.response && selectedApplication.response.length > 0 && ( @@ -270,7 +263,7 @@ export const ApplicantView = ({ user }: ApplicantViewProps) => { )} - + ); }; diff --git a/apps/frontend/src/features/applicant/components/FileUploadBox.tsx b/apps/frontend/src/features/applicant/components/FileUploadBox.tsx index 6d7d79d2..f7701a13 100644 --- a/apps/frontend/src/features/applicant/components/FileUploadBox.tsx +++ b/apps/frontend/src/features/applicant/components/FileUploadBox.tsx @@ -93,6 +93,7 @@ const FileUploadBox: React.FC = ({ px: 1.5, textAlign: 'center', width: '100%', + boxSizing: 'border-box', }} >