Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [ ] Pas de régression - [ ] TU/TI/TF rédigée - [ ] TU/TI/TF OK - [ ] CHANGELOG modifié Reviewed-on: #6 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
18 lines
563 B
TypeScript
18 lines
563 B
TypeScript
export const CONTRACT_NATURES = ['CDI', 'CDD', 'INTERIM'] as const
|
|
|
|
export type ContractNature = (typeof CONTRACT_NATURES)[number]
|
|
|
|
export const contractNatureLabel = (value?: ContractNature) => {
|
|
if (value === 'CDD') return 'CDD'
|
|
if (value === 'INTERIM') return 'Intérim'
|
|
return 'CDI'
|
|
}
|
|
|
|
export const requiresContractEndDate = (nature: ContractNature) => {
|
|
return nature === 'CDD' || nature === 'INTERIM'
|
|
}
|
|
|
|
export const isContractNature = (value: string): value is ContractNature => {
|
|
return (CONTRACT_NATURES as readonly string[]).includes(value)
|
|
}
|