feat : ajout d'un champ commentaire sur les contrats + correction de plusieurs bugs

This commit is contained in:
2026-03-06 16:58:29 +01:00
parent 4cf2608cdd
commit e794ad2514
28 changed files with 235 additions and 59 deletions

View File

@@ -8,6 +8,7 @@ export type ContractHistoryItem = {
contractNature: 'CDI' | 'CDD' | 'INTERIM'
startDate: string
endDate?: string | null
comment?: string | null
}
export type Employee = {

View File

@@ -15,6 +15,7 @@ export type WorkHour = {
isPresentAfternoon?: boolean
isSiteValid?: boolean
isValid?: boolean
updatedAt?: string | null
}
export type WorkHourEntryPayload = {

View File

@@ -61,6 +61,7 @@ export const updateEmployee = async (
contractStartDate?: string
contractEndDate?: string | null
contractPaidLeaveSettled?: boolean
contractComment?: string | null
displayOrder?: number
}
) => {
@@ -87,6 +88,9 @@ export const updateEmployee = async (
if (payload.contractPaidLeaveSettled !== undefined) {
body.contractPaidLeaveSettled = payload.contractPaidLeaveSettled
}
if (payload.contractComment !== undefined) {
body.contractComment = payload.contractComment ?? null
}
return api.patch<Employee>(`/employees/${id}`, body, {
toastSuccessKey: 'success.employee.update',