Changeset 08f82ec for jobvista-frontend/src/views
- Timestamp:
- 06/20/24 11:57:13 (5 months ago)
- Branches:
- main
- Children:
- 0f0add0
- Parents:
- befb988
- Location:
- jobvista-frontend/src/views
- Files:
-
- 10 added
- 15 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
jobvista-frontend/src/views/admin_panel/AdminPanel.css
rbefb988 r08f82ec 3 3 } 4 4 5 .table tbody tr:nth-child(even) { 6 background-color: #fff; /* Light gray */ 7 } 8 9 .table tbody tr:nth-child(odd) { 10 background-color: #f2f2f2; /* White */ 11 } 5 12 /* The switch - the box around the slider */ 6 13 .switch { -
jobvista-frontend/src/views/admin_panel/AdminPanel.js
rbefb988 r08f82ec 54 54 return ( 55 55 <div className="custom-container mt-5"> 56 <table className="table table-striped">56 <table className="table"> 57 57 <thead> 58 58 <tr> -
jobvista-frontend/src/views/applications/ApplicationDetailsModal.js
rbefb988 r08f82ec 32 32 33 33 useEffect(() => { 34 if (application) {35 dispatch(ApplicationActions.downloadResume(application.fileName, (success, response) => {36 if (success) {34 if (application) { 35 ApplicationActions.downloadResume(application.id, (success, response) => { 36 if (success) { 37 37 setResumeUrl(response); 38 38 } 39 }) )39 }) 40 40 } 41 }, [application]) 41 }, []) 42 43 function getFileName(path) { 44 let fileName = path.split('\\').pop().split('/').pop(); 45 46 fileName = fileName.trim(); 47 48 return fileName; 49 } 42 50 43 51 return (<div className="modal-wrap"> 44 52 <button onClick={toggleModal} className="application-button">View application</button> 45 <Modal open={modal} onClose={toggleModal} center 53 <Modal open={modal} onClose={toggleModal} center> 46 54 <div className="head-modal"> 47 55 <h3>{application.jobSeekerName}'s application for {application.jobAdTitle}</h3> … … 49 57 </div> 50 58 51 <div className="modal-content" 59 <div className="modal-content"> 52 60 <form> 53 61 <div className="row"> 54 62 <div className="col-md-6"> 55 63 <label className="label">Why are you interested in joining our company?</label> 56 <textarea disabled type="text" defaultValue={application.questionAnswers[0]} disabled placeholder="Write your answer here..." className="application-textarea"/>57 58 64 <textarea disabled type="text" defaultValue={application.questionAnswers[0]} disabled 65 placeholder="Write your answer here..." className="application-textarea"/> 66 <br/><br/> 59 67 <label className="label">What makes you a good fit for this position?</label> 60 <textarea disabled type="text" defaultValue={application.questionAnswers[1]} placeholder="Write your answer here..." className="application-textarea"/> 61 62 63 <label className="label">What do you hope to achieve in your first 6 months in this role?</label> 64 <textarea disabled type="text" defaultValue={application.questionAnswers[2]} placeholder="Write your answer here..." className="application-textarea"/> 68 <textarea disabled type="text" defaultValue={application.questionAnswers[1]} 69 placeholder="Write your answer here..." className="application-textarea"/> 70 <br/><br/> 71 <label className="label">What do you hope to achieve in your first 6 months in this 72 role?</label> 73 <textarea disabled type="text" defaultValue={application.questionAnswers[2]} 74 placeholder="Write your answer here..." className="application-textarea"/> 65 75 66 76 </div> … … 68 78 <label htmlFor="start">Curriculum vitae (CV)</label> 69 79 <br/> 70 <a className="resume-link" href={resumeUrl} target="_blank" rel="noopener noreferrer">{application.fileName}</a> 80 <a className="resume-link" href={resumeUrl} target="_blank" 81 rel="noopener noreferrer">{getFileName(application.fileName)}</a> 71 82 <br/> 72 83 73 84 <br/> 74 85 <label className="label">Message to the recruiter</label> 75 <textarea disabled type="text" defaultValue={application.message} placeholder="Optional..." className="application-textarea"/> 86 <textarea disabled type="text" defaultValue={application.message} placeholder="Optional..." 87 className="application-textarea"/> 76 88 77 89 </div> -
jobvista-frontend/src/views/applications/Applications.css
rbefb988 r08f82ec 32 32 padding: 20px 20px; 33 33 display: flex; 34 justify-content: center;35 gap: 20px;34 /*justify-content: center;*/ 35 /*gap: 20px;*/ 36 36 margin: 15px 0; 37 37 /*z-index: -1000;*/ … … 39 39 .application-card .app-job-seeker-pic { 40 40 border: 1px solid gray; 41 border-radius: 50% 41 border-radius: 50%; 42 margin-right: 20px; 42 43 } 43 44 .application-card .app-job-seeker-pic img { … … 45 46 } 46 47 48 .application-card .app-company-logo { 49 width: 8%; 50 } 51 47 52 .application-card .app-info { 48 width: 6 0%;53 width: 65%; 49 54 display: inline-flex; 50 55 flex-direction: column; … … 56 61 .application-card .app-info .jobAd-title { 57 62 font-weight: 600; 63 font-size: 1.2rem; 58 64 /*text-transform: uppercase;*/ 59 65 font-family: 'Segoe UI', sans-serif; 60 /*font-size: 22px;*/ 66 text-decoration: none; 67 color: black 61 68 } 62 .application-card .app-info .jobAd-title 69 70 . 63 71 64 72 .application-card .app-info .contact-info { … … 78 86 79 87 .application-card .app-status { 80 width: 40%;88 width: 28%; 81 89 display: inline-flex; 82 90 justify-content: end; -
jobvista-frontend/src/views/applications/ApplicationsByJobSeeker.js
rbefb988 r08f82ec 7 7 import {RecruiterActions} from "../../redux/actions/recruiterActions"; 8 8 import {sortElementsBy} from "../../utils/utils"; 9 import {Link} from "react-router-dom"; 9 10 10 11 export const ApplicationsByJobSeeker = () => { … … 97 98 98 99 <div className="app-info"> 99 <div className="jobAd-title">{application.jobAdTitle}</div> 100 <Link to={`/job-advertisements/${application.jobAdId}`} className="jobAd-title">{application.jobAdTitle}</Link> 101 {/*<h5 className="jobAd-title"></h5>*/} 100 102 <div className="contact-info"> 101 103 <div className="contact-item"> -
jobvista-frontend/src/views/applications/ApplyToJobAdModal.js
rbefb988 r08f82ec 51 51 52 52 dispatch(ApplicationActions.submitApplication( 53 formData, (success, response) => {54 if (success) {53 formData, (success) => { 54 if (success) { 55 55 toggleModal() 56 56 notifyJobAdApply() … … 66 66 67 67 return (<div className="modal-wrap"> 68 {role ===Roles.JOBSEEKER &&68 {role === Roles.JOBSEEKER && 69 69 <> 70 {jobAd.active && <button onClick={toggleModal} className="apply-button apply">Apply now</button> 71 {!jobAd.active && <button className="card-button apply disabled">Apply now</button> 70 {jobAd.active && <button onClick={toggleModal} className="apply-button apply">Apply now</button>} 71 {!jobAd.active && <button className="card-button apply disabled">Apply now</button>} 72 72 </> 73 73 } 74 <Modal open={modal} onClose={toggleModal} center 74 <Modal open={modal} onClose={toggleModal} center> 75 75 <div className="head-modal"> 76 76 <h3>Applying to {jobAd.title} at {jobAd.recruiterName}</h3> … … 78 78 </div> 79 79 80 <div className="modal-content" 80 <div className="modal-content"> 81 81 <form onSubmit={handleSubmit(submitApplication)}> 82 82 <div className="row"> … … 92 92 <p style={{color: "red"}}>{errors.answerTwo?.message}</p> 93 93 94 <label className="label">What do you hope to achieve in your first 6 months in this role?</label> 95 <textarea type="text" placeholder="Write your answer here..." 96 {...register("answerThree")} className="application-textarea"/> 94 <label className="label">What do you hope to achieve in your first 6 months in this 95 role?</label> 96 <textarea type="text" placeholder="Write your answer here..." 97 {...register("answerThree")} className="application-textarea"/> 97 98 <p style={{color: "red"}}>{errors.answerThree?.message}</p> 98 99 … … 101 102 <label htmlFor="start">Curriculum vitae (CV)</label> 102 103 <br/> 103 <input {...register("file")} className="resume-link" onChange={(e) => setResumeFile(e.target.files[0])} required type="file" id="fileUpload" accept=".pdf"/> 104 <input {...register("file")} className="resume-link" 105 onChange={(e) => setResumeFile(e.target.files[0])} required type="file" 106 id="fileUpload" accept=".pdf"/> 104 107 105 108 <br/> … … 109 112 110 113 <br/><br/> 111 <p style={{color: "red"}}>Please note that your personal data from your account will be used to identify and process your application.</p> 114 <p style={{color: "red"}}>Please note that your personal data from your account will be used 115 to identify and process your application.</p> 112 116 </div> 113 117 </div> -
jobvista-frontend/src/views/auth/SignUpRecruiterForm.js
rbefb988 r08f82ec 13 13 const schema = yup.object().shape({ 14 14 companyNameReg: yup.string().required("Company name is required."), 15 phoneNumberReg: yup. number().required("Phone number is required"),15 phoneNumberReg: yup.string().required("Phone number is required"), 16 16 companyEmailReg: yup.string().required("Email is required.").email("Email is not valid."), 17 17 passwordReg: yup.string().min(6, "Password must be at least 6 characters.").required("Password is required."), … … 32 32 // theme: success ? 'success' : 'error' 33 33 // }); 34 success && navigate("/ ");34 success && navigate("/no-access"); 35 35 })); 36 36 } catch (err) { -
jobvista-frontend/src/views/dashboard/Dashboard.js
rbefb988 r08f82ec 34 34 35 35 36 37 // const [user, setUser] = useState(null);38 //39 // useEffect(() => {40 // const token = localStorage.getItem(AUTH_TOKEN);41 // if (token!=null) {42 // try {43 // const decodedToken = jwtDecode(token);44 // setUser({45 // name: decodedToken.name,46 // role: decodedToken.role,47 // hasAccess: decodedToken.access,48 // });49 // } catch (error) {50 // console.error('Failed to decode token', error);51 // }52 // }53 // console.log(user)54 // }, [auth]);55 56 // useEffect(() => {57 // if (auth) {58 // setRole(auth.role);59 // }60 // console.log(props)61 // }, [auth]);62 63 36 useEffect(() => { 64 37 if (!jobDispatched && jobAdvertisementsState.length == 0) { … … 72 45 73 46 } else { 74 setJobAdvertisements( jobAdvertisementsState)47 setJobAdvertisements(sortElementsBy(jobAdvertisementsState, "postedOn")) 75 48 console.log("Fetch all job advertisements STATE") 76 49 … … 160 133 jobAdvertisements.map((jobAd, index) => ( 161 134 <div key={index} className="col"> 162 <div className="custom-card ">135 <div className="custom-card dashboard-card"> 163 136 <div className="card-head"> 164 137 <span className="hourly-salary"><b>${jobAd.startingSalary}/hr</b></span> … … 187 160 </div> 188 161 189 <div className="aligned"> 190 <Link to={`/job-advertisements/${jobAd.id}`} className="card-button">Read 191 more</Link> 192 </div> 193 162 </div> 163 <div className="card-foot"> 164 <Link to={`/job-advertisements/${jobAd.id}`} className="card-button">Read 165 more</Link> 194 166 </div> 195 167 </div> -
jobvista-frontend/src/views/job_advertisements/AddJobAdModal.js
rbefb988 r08f82ec 43 43 44 44 const addJobAdvertisement = async (values) => { 45 //const description = values.description.replace(/\n/g, "\\n");46 45 try { 47 46 dispatch(JobAdvertisementActions.addJobAdvertisement( … … 55 54 jobType: values.jobType.value, 56 55 employmentStatus: values.employmentStatus.value, 57 }, (success , response) => {56 }, (success) => { 58 57 if (success) { 59 // console.log("Job Advertisement added")60 58 toggleModal() 61 59 notifyJobAdPost() -
jobvista-frontend/src/views/job_advertisements/DeleteJobAdModal.js
rbefb988 r08f82ec 26 26 }; 27 27 28 const addJobAdvertisement = async () => {28 const deleteJobAdvertisement = async () => { 29 29 try { 30 dispatch(JobAdvertisementActions.deleteJobAdvertisement(jobAd.props.id, (success , response) => {30 dispatch(JobAdvertisementActions.deleteJobAdvertisement(jobAd.props.id, (success) => { 31 31 if (success) { 32 // console.log("Job Advertisement deleted")33 32 toggleModal() 34 33 notifyJobAdDelete() … … 54 53 <div className="modal-delete-buttons"> 55 54 <button className="cancel-btn" onClick={toggleModal}>Cancel</button> 56 <button className="delete-btn" onClick={ addJobAdvertisement}> Delete</button>55 <button className="delete-btn" onClick={deleteJobAdvertisement}> Delete</button> 57 56 </div> 58 57 </div> -
jobvista-frontend/src/views/job_advertisements/EditJobAdModal.js
rbefb988 r08f82ec 54 54 jobType: values.jobType.value, 55 55 employmentStatus: values.employmentStatus.value, 56 }, jobAd.props.id, (success , response) => {56 }, jobAd.props.id, (success) => { 57 57 if(success) { 58 // console.log("Job Advertisement edited")59 58 toggleModal() 60 59 notifyJobAdEdit() -
jobvista-frontend/src/views/job_advertisements/JobAdDetails.css
rbefb988 r08f82ec 20 20 /*scrollbar-width: thin; !* "auto" hides scrollbar on some browsers, "thin" shows a thin scrollbar *!*/ 21 21 /*scrollbar-color: #999999 #fff;*/ 22 } 23 24 .min-wrap { 25 min-height: 80vh; 22 26 } 23 27 -
jobvista-frontend/src/views/job_advertisements/JobAdDetails.js
rbefb988 r08f82ec 63 63 <div className="row"> 64 64 <div className="col-md-9"> 65 <div className="details-wrap ">65 <div className="details-wrap min-wrap"> 66 66 <div className="row"> 67 67 <div className="col-md-9"> -
jobvista-frontend/src/views/job_advertisements/JobManagementHub.js
rbefb988 r08f82ec 66 66 67 67 let filterJobAdvertisements = () => { 68 JobAdvertisementActions.filterJobAdvertisementsByRecruiter( {68 JobAdvertisementActions.filterJobAdvertisementsByRecruiter(auth.id, { 69 69 searchTerm: searchTerm, industry: selectedIndustry, sortOrder: selectedSortOrder 70 70 }, (success, response) => { … … 127 127 {jobAdvertisementsByRecruiter && jobAdvertisementsByRecruiter.map((jobAd, index) => ( 128 128 <div key={index} className="col"> 129 <div className="custom-card ">129 <div className="custom-card hub-card"> 130 130 <div className="card-head"> 131 131 <span className="hourly-salary"><b>${jobAd.startingSalary}/hr</b></span> … … 150 150 </div> 151 151 152 <div className="aligned"> 153 <Link to={`/job-management-hub/applications/${jobAd.id}`} 154 className="card-button solo">View applications</Link> 155 </div> 152 </div> 156 153 154 155 <div className="card-foot"> 156 <Link to={`/job-management-hub/applications/${jobAd.id}`} 157 className="card-button">View applications</Link> 157 158 </div> 158 159 </div> -
jobvista-frontend/src/views/shared_css/Modal.css
rbefb988 r08f82ec 89 89 .application-textarea { 90 90 height: 100px; 91 /*margin-bottom: 20px;*/ 91 92 } 92 93 -
jobvista-frontend/src/views/static/Header.css
rbefb988 r08f82ec 19 19 20 20 .navbar { 21 width: calc(100% - 17px);21 width: 100%; 22 22 height: 80px; 23 23 background-color: #f8f9fa;
Note:
See TracChangeset
for help on using the changeset viewer.