-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: LBA-2004 Refacto de la page de détail des recruteurs lba (#1412)
* feat: texte pas d'email dispo pour candidature * feat: refactor component and adding distance to search if relevant * feat: refacto sub component * feat: refacto renaming * feat: bloc intro candidature spont plus refacto fichiers * feat: changement titre * feat: suppression obsolète * feat: progress * feat: progress * feat: bloc 1 ok * feat: should be ok * feat: rename * fix: type check * feat: utilisation context et refacto * feat: use component * feat: externalisation de la marge
- Loading branch information
Showing
20 changed files
with
404 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 0 additions & 81 deletions
81
ui/components/ItemDetail/CandidatureLba/CandidatureLbaExplanation.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
ui/components/ItemDetail/ItemDetailServices/ItemDistanceToCenter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ILbaItemFormation2, ILbaItemFtJob, ILbaItemLbaCompany, ILbaItemLbaJob } from "@/../shared" | ||
import { Text } from "@chakra-ui/react" | ||
import { useContext } from "react" | ||
|
||
import { DisplayContext } from "@/context/DisplayContextProvider" | ||
|
||
export default function ItemDistanceToCenter({ item }: { item: ILbaItemFormation2 | ILbaItemLbaCompany | ILbaItemLbaJob | ILbaItemFtJob }) { | ||
const { formValues } = useContext(DisplayContext) | ||
|
||
return formValues?.location?.value && (item?.place?.distance ?? -1) >= 0 ? ( | ||
<Text color="grey.425" fontSize={14}> | ||
{item?.place?.distance} km(s) du lieu de recherche | ||
</Text> | ||
) : ( | ||
<></> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
ui/components/ItemDetail/ItemDetailServices/getCompanyGoogleSearchLink.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ILbaItemFormation2, ILbaItemFtJob, ILbaItemLbaCompany, ILbaItemLbaJob } from "@/../shared" | ||
|
||
export const getCompanyGoogleSearchLink = (item: ILbaItemLbaJob | ILbaItemLbaCompany | ILbaItemFtJob | ILbaItemFormation2) => { | ||
return `https://www.google.fr/search?q=${encodeURIComponent(`${item.company.name} ${item.place.city || item.place.address}`)}` | ||
} |
17 changes: 17 additions & 0 deletions
17
ui/components/ItemDetail/ItemDetailServices/getCompanySize.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ILbaItemFormation2, ILbaItemFtJob, ILbaItemLbaCompany, ILbaItemLbaJob } from "@/../shared" | ||
|
||
import { endsWithNumber } from "@/utils/strutils" | ||
|
||
export const getCompanySize = (item: ILbaItemLbaJob | ILbaItemLbaCompany | ILbaItemFtJob | ILbaItemFormation2) => { | ||
let companySize = item?.company?.size?.toLowerCase() | ||
if (!companySize) { | ||
companySize = "non renseigné" | ||
} else if (companySize.startsWith("0")) { | ||
companySize = "0 à 9 salariés" | ||
} | ||
if (endsWithNumber(companySize)) { | ||
companySize += " salariés" | ||
} | ||
|
||
return companySize | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.