diff --git a/client/src/App.jsx b/client/src/App.jsx index e3e94c49..1214b440 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -129,6 +129,7 @@ function App() { const THEME = createTheme({ typography: { fontFamily: `"Inter"`, + "fontWeightBold": 600 }, }); @@ -153,11 +154,12 @@ function App() { element={} /> - } - /> - + }> + } + /> + navigate("/job-applications")}> @@ -92,7 +93,7 @@ function JobApplicationComponent({ flexDirection: "row", width: "98%", justifyContent: "space-between", - alignItems: "center", + alignItems: "flex-start", }} > diff --git a/client/src/components/job-postings-dashboard-component/job-postings-dashboard-details/editJobPostForm.css b/client/src/components/job-postings-dashboard-component/job-postings-dashboard-details/editJobPostForm.css new file mode 100644 index 00000000..416424fd --- /dev/null +++ b/client/src/components/job-postings-dashboard-component/job-postings-dashboard-details/editJobPostForm.css @@ -0,0 +1,4 @@ +.MuiTypography-root { + margin-bottom: auto !important; + /* line-height: 1.75 !important; */ +} \ No newline at end of file diff --git a/client/src/components/job-postings-dashboard-component/job-postings-dashboard-details/editJobPostForm.jsx b/client/src/components/job-postings-dashboard-component/job-postings-dashboard-details/editJobPostForm.jsx index bca254af..960be71c 100644 --- a/client/src/components/job-postings-dashboard-component/job-postings-dashboard-details/editJobPostForm.jsx +++ b/client/src/components/job-postings-dashboard-component/job-postings-dashboard-details/editJobPostForm.jsx @@ -1,5 +1,6 @@ // eslint-disable-next-line no-unused-vars import * as React from "react"; +import "./editJobPostForm.css" import { Box, Typography, @@ -101,6 +102,27 @@ function EditJobPostingFormComponent({ setMaxCompensation(value); }; + const formatSalaryRange = (min, max, rateOfPayFrequency) => { + // Convert to numbers + const minNum = Number(min); + const maxNum = Number(max); + + switch (rateOfPayFrequency) { + case "Annually": { + const formattedMin = `${Math.floor(minNum / 1000)}K`; + const formattedMax = `${Math.floor(maxNum / 1000)}K`; + + return `$${formattedMin} - $${formattedMax}/year`; + } case "Hourly": { + return `$${minNum} - $${maxNum}/hour` + } case "Weekly": { + return `$${minNum} - $${maxNum}/week` + } + default: + return `$${minNum} - $${maxNum} ${rateOfPayFrequency}`; + } + }; + const renderViewValue = ( typeValue, value, @@ -109,6 +131,7 @@ function EditJobPostingFormComponent({ forceError = false, ) => { if (value !== undefined && value !== null && !forceError) { + console.log(typeValue, value) return ( {prefix} @@ -135,23 +158,6 @@ function EditJobPostingFormComponent({ setFormSubmissionErrorDialog(false); }; - const formatSalaryRange = (min, max, rateOfPayFrequency) => { - // Convert to numbers - const minNum = Number(min); - const maxNum = Number(max); - - switch (rateOfPayFrequency) { - case "Annually": { - const formattedMin = `${Math.floor(minNum / 1000)}K`; - const formattedMax = `${Math.floor(maxNum / 1000)}K`; - - return `$${formattedMin}/year - $${formattedMax}/year`; - } - default: - return `$${minNum} - $${maxNum} ${rateOfPayFrequency}`; - } - }; - const handleSubmit = async (event) => { event.preventDefault(); setIsLoading(true); @@ -196,10 +202,10 @@ function EditJobPostingFormComponent({ sx={{ width: "90%", borderRadius: 2, - boxShadow: 3, + boxShadow: 1, ml: 9, mb: 2, - border: "1px solid #e0e0e0", + border: "0.5px solid #e0e0e0", }} >
@@ -223,7 +229,7 @@ function EditJobPostingFormComponent({ - + @@ -302,7 +308,7 @@ function EditJobPostingFormComponent({ {isEditMode ? ( <> - + Minimum Compensation @@ -329,7 +335,8 @@ function EditJobPostingFormComponent({ /> - + + Maximum Compensation @@ -405,7 +412,7 @@ function EditJobPostingFormComponent({ ) : ( - renderViewValue("Job Type", employmentType) + renderViewValue("Job Type", employmentType.join(", ")) )} @@ -572,7 +579,7 @@ EditJobPostingFormComponent.propTypes = { jobPost: JobLeadType.isRequired, setJobPost: PropTypes.func.isRequired, setSnackBarMessage: PropTypes.func.isRequired, - isEditMode: PropTypes.func.isRequired, + isEditMode: PropTypes.bool.isRequired, setIsEditMode: PropTypes.func.isRequired, // eslint-disable-next-line }; diff --git a/client/src/components/job-postings-dashboard-component/job-postings-dashboard-details/index.jsx b/client/src/components/job-postings-dashboard-component/job-postings-dashboard-details/index.jsx index 94571c08..b07040a3 100644 --- a/client/src/components/job-postings-dashboard-component/job-postings-dashboard-details/index.jsx +++ b/client/src/components/job-postings-dashboard-component/job-postings-dashboard-details/index.jsx @@ -49,9 +49,12 @@ function JobDetails({ setJobPostData, setSnackBarMessage }) { return ( - - navigate("/all-job-postings")}> - + + navigate("/all-job-postings")} sx={{paddingLeft: "1rem", paddingRight:"0"}}> + @@ -66,9 +69,13 @@ function JobDetails({ setJobPostData, setSnackBarMessage }) { - + {/* Job Details Section */} - + {/* Application Form Section */} - - + + ({ @@ -43,10 +46,12 @@ const StyledPaper = styled(Paper)(({ theme }) => ({ borderRadius: theme.shape.borderRadius, })); -const StyledContainer = styled(Container)(({ theme }) => ({ - paddingTop: theme.spacing(4), - paddingBottom: theme.spacing(4), -})); +// const StyledContainer = styled(Container)(({ theme }) => ({ +// paddingTop: theme.spacing(4), +// paddingBottom: theme.spacing(4), +// marginLeft: theme.spacing(10) +// // marginLeft: theme.spacing(15), +// })); function CustomDialog({ open, onClose, title, message }) { return ( @@ -319,7 +324,11 @@ function JobPostingPage() { const formattedMin = `${Math.floor(minNum / 1000)}K`; const formattedMax = `${Math.floor(maxNum / 1000)}K`; - return `$${formattedMin}/year - $${formattedMax}/year`; + return `$${formattedMin} - $${formattedMax}/year`; + } case "Hourly": { + return `$${minNum} - $${maxNum}/hour` + } case "Weekly": { + return `$${minNum} - $${maxNum}/week` } default: return `$${minNum} - $${maxNum} ${rateOfPayFrequency}`; @@ -373,35 +382,23 @@ function JobPostingPage() { }; return ( - + {/* Top Section with Job Title and Company */} window.history.back()} > - - - + @@ -418,8 +415,13 @@ function JobPostingPage() { {/* Main Content */} - - + + {/* Information Header (Slightly Bigger but Compact) */} @@ -440,7 +442,7 @@ function JobPostingPage() { jobPosting.rateOfPayFrequency, ), }, - { label: "Job Type", value: jobPosting.jobType }, + { label: "Job Type", value: jobPosting.jobType.join(", ") }, { label: "Hours per Week", value: `${jobPosting.hoursPerWeek} hours`, @@ -454,7 +456,7 @@ function JobPostingPage() { key={item.label} sx={{ display: "grid", - gridTemplateColumns: "1fr 1.2fr", // Slightly more compact column sizing + gridTemplateColumns: "1fr 2fr", // Slightly more compact column sizing alignItems: "center", py: 1.2, // Reduced padding for compact layout borderBottom: index < 6 ? "1px solid #E0E0E0" : "none", @@ -532,7 +534,7 @@ function JobPostingPage() { {/* Right Section */} - + {" "} {/* Reduced width from md={7} to md={6.5} */} @@ -817,7 +819,7 @@ function JobPostingPage() { open={isSuccessDialog} onBack={() => setIsSuccessDialog(false)} /> - + ); } diff --git a/client/src/pages/view-job-post/index.styles.jsx b/client/src/pages/view-job-post/index.styles.jsx new file mode 100644 index 00000000..b56f1e74 --- /dev/null +++ b/client/src/pages/view-job-post/index.styles.jsx @@ -0,0 +1,17 @@ +import { Box } from "@mui/material"; + +import styled from "styled-components"; + +const MainContainer = styled.div` + width: 100%; + margin-top: 2rem; + justify-content: center; +`; + +const Divider = styled(Box)` + border-bottom: 1px solid #0000001f; + border-color: divider; + margin-bottom: 10px; +`; + +export { Divider, MainContainer };