Skip to content

Commit

Permalink
fix: cfa display (#1338)
Browse files Browse the repository at this point in the history
* fix: cfa display

* fix: conditional recruiter
  • Loading branch information
kevbarns authored Jul 5, 2024
1 parent 22dc5f8 commit e818bf3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/components/espace_pro/OffresTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ export const OffresTabs = ({ recruiter }: { recruiter: IRecruiterJson }) => {
const { user } = useAuth()
const confirmationSuppression = useDisclosure()
const [currentOffre, setCurrentOffre] = useState()
const { establishment_raison_sociale, geo_coordinates } = recruiter
const jobs: (IJob & { candidatures: number; geo_coordinates: string })[] = recruiter.jobs ?? []

const jobs: (IJob & { candidatures: number; geo_coordinates: string })[] = recruiter?.jobs ?? []

if (jobs.length === 0) {
return null
}

const jobsWithGeoCoords = jobs.map((job) => ({ ...job, geo_coordinates }))
const jobsWithGeoCoords = jobs.map((job) => ({ ...job, geo_coordinates: recruiter.geo_coordinates }))

const offresTermine = jobsWithGeoCoords.filter((x) => x.job_status === "Annulée")
const offresTermineNbr = offresTermine.length
Expand Down Expand Up @@ -117,7 +117,7 @@ export const OffresTabs = ({ recruiter }: { recruiter: IRecruiterJson }) => {
onClick={() =>
router.push({
pathname: `/espace-pro/administration/entreprise/${router.query.establishment_id}/offre/${row._id}`,
query: { establishment_raison_sociale },
query: { establishment_raison_sociale: recruiter?.establishment_raison_sociale },
})
}
>
Expand Down

0 comments on commit e818bf3

Please sign in to comment.