feat : ajout de la clôture de contrat et de la création de contrat

This commit is contained in:
2026-03-03 11:59:41 +01:00
parent 0b01e7772c
commit fc2b184c50
12 changed files with 712 additions and 121 deletions

View File

@@ -0,0 +1,17 @@
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)
}