- Timestamp:
- 06/17/24 21:59:14 (2 weeks ago)
- Branches:
- main
- Children:
- 08f82ec
- Parents:
- b248810
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
jobvista-frontend/src/views/job_advertisements/JobAdDetails.js
rb248810 rbefb988 10 10 import {AddJobAdModal} from "./AddJobAdModal"; 11 11 import {ApplyToJobAdModal} from "../applications/ApplyToJobAdModal"; 12 import {Link} from "react-router-dom"; 13 import {RecruiterActions} from "../../redux/actions/recruiterActions"; 12 14 13 15 … … 20 22 const auth = useSelector(state => state.auth.currentUser); 21 23 24 let logosState = useSelector(state => state.images.logos) 25 const [logoDispatched, setLogoDispatched] = useState(false) 26 const [logoView, setLogoView] = useState(null); 27 22 28 useEffect(() => { 23 29 setRole(auth.role) 24 30 }, [auth]) 31 32 useEffect(() => { 33 if (jobAd) { 34 if (!logoDispatched && !logosState[jobAd.recruiterId]) { 35 dispatch(RecruiterActions.downloadLogo(jobAd.recruiterId, (success, response) => { 36 if (success) { 37 setLogoView(response) 38 setLogoDispatched(true) 39 } 40 })) 41 } else { 42 setLogoView(logosState[jobAd.recruiterId]) 43 } 44 45 } 46 47 }, [jobAd]) 25 48 26 49 … … 41 64 <div className="col-md-9"> 42 65 <div className="details-wrap"> 66 <div className="row"> 67 <div className="col-md-9"> 68 <div className="title"> 69 <h2>{jobAd.title} </h2> 70 <span className="job-type"> {jobAd.jobType===JobType.JOB ? "Job" : "Internship"}</span> 71 {!jobAd.active && <span className="expired">Expired</span>} 72 </div> 43 73 44 <div className="title"> 45 <h2>{jobAd.title} </h2> 46 <span className="job-type"> {jobAd.jobType===JobType.JOB ? "Job" : "Internship"}</span> 47 {!jobAd.active && <span className="expired">Expired</span>} 74 <p className="details-head-info"> 75 <span><b>{jobAd.recruiterName}</b></span> • <span>{jobAd.industry}</span> • <span>{formatRelativeTime(jobAd.postedOn)}</span> 76 </p> 77 78 <p><i className="fa-solid fa-money-check-dollar"></i> <span>Hourly rate: ${jobAd.startingSalary}</span></p> 79 <p><i className="fa-solid fa-briefcase"></i> Employment status: {jobAd.employmentStatus==="FULL_TIME" ? "Full-time" : "Part-time"}</p> 80 <p><i className="fa-solid fa-calendar-days"></i> Active until: {new Date(jobAd.activeUntil).toLocaleString('default', { day: 'numeric', month: 'long', year: 'numeric' })}</p> 81 82 </div> 83 <div className="col-md-3"> 84 {jobAd.recruiterId && 85 <> 86 <img 87 // loading gif 88 src={logosState[jobAd.recruiterId]} 89 alt="" 90 width={200} height={200} 91 /> 92 </> 93 } 94 95 </div> 48 96 </div> 49 97 50 <p className="details-head-info">51 <span><b>{jobAd.recruiterName}</b></span> • <span>{jobAd.industry}</span> • <span>{formatRelativeTime(jobAd.postedOn)}</span>52 </p>53 54 <p><i className="fa-solid fa-money-check-dollar"></i> <span>Hourly rate: ${jobAd.startingSalary}</span></p>55 <p><i className="fa-solid fa-briefcase"></i> Employment status: {jobAd.employmentStatus==="FULL_TIME" ? "Full-time" : "Part-time"}</p>56 <p><i className="fa-solid fa-calendar-days"></i> Active until: {new Date(jobAd.activeUntil).toLocaleString('default', { day: 'numeric', month: 'long', year: 'numeric' })}</p>57 98 58 99 <h4>About the job</h4> … … 66 107 <div className="col-md-3"> 67 108 <div className="details-wrap"> 68 < h3>{jobAd.recruiterName}</h3>109 <Link className="recruiter-link" to={`/recruiters/${jobAd.recruiterId}`}>{jobAd.recruiterName} </Link> 69 110 70 {/*TO DO - AFTER IMPLEMENTING FORM FOR UPDATING PERSONAL INFO*/}71 111 <h4>About the company</h4> 72 112 <p> 73 For over two decades, we have been harnessing technology to drive meaningful change. Working side by side with leading brands, we build strategies, products and solutions tailored to unique needs –regardless of industry, region or scale. By combining world-class engineering, industry expertise and a people-centric mindset, we consult and partner with our customers to create technological solutions that drive innovation and transform businesses. 74 <br/><br/> 75 From ideation to production, we support our customers with bespoke solutions across various industries, including payments, insurance, finance and banking, technology, media and entertainment, telecommunications, retail and consumer goods, supply chain and logistics, healthcare and life sciences, energy and resources, government, automotive and travel. 113 {recruiterDetails.companyDescription 114 ? recruiterDetails.companyDescription.length > 710 115 ? `${recruiterDetails.companyDescription.substring(0, 710)}...` 116 : recruiterDetails.companyDescription 117 : "There is no info about this company yet." 118 } 119 </p> 76 120 121 <p> 122 <i className="fa-solid fa-envelope"></i> <span className="span-about"> {recruiterDetails.contactEmail}</span> <br/> 123 <i className="fa-solid fa-phone"></i> <span className="span-about"> {recruiterDetails.contactPhoneNumber}</span> <br/> 124 {recruiterDetails.receptionist && <><i className="fa-solid fa-user-tie"></i> <span className="span-about"> {recruiterDetails.receptionist}</span> </>} 77 125 </p> 78 <p><span><i className="fa-solid fa-envelope"></i> {recruiterDetails.email}</span> • <span> 79 <i className="fa-solid fa-phone"></i> {recruiterDetails.phoneNumber}</span> 80 </p> 126 127 <div className="d-flex justify-content-center mt-4"> 128 <Link className="card-button" to={`/recruiters/${jobAd.recruiterId}`}>Read more </Link> 129 </div> 81 130 </div> 82 131 </div>
Note:
See TracChangeset
for help on using the changeset viewer.