Changeset 08f82ec for jobvista-frontend/src/views/applications
- Timestamp:
- 06/20/24 11:57:13 (5 months ago)
- Branches:
- main
- Children:
- 0f0add0
- Parents:
- befb988
- Location:
- jobvista-frontend/src/views/applications
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
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>
Note:
See TracChangeset
for help on using the changeset viewer.