feat : modification de la gestion des jours fériés
All checks were successful
Auto Tag Develop / tag (push) Successful in 6s

This commit is contained in:
2026-04-16 15:52:19 +02:00
parent 13c71abddc
commit a8fe244b5c
42 changed files with 1752 additions and 167 deletions

View File

@@ -19,6 +19,7 @@ export type ContractHistoryItem = {
periodId?: number | null
suspensions?: ContractSuspension[]
isDriver?: boolean
workDaysHours?: Record<number, number> | null
}
export type Employee = {

View File

@@ -59,6 +59,7 @@ export type WeeklyWorkHourDailySummary = {
hasLunch?: boolean
hasDinner?: boolean
hasOvernight?: boolean
virtualHolidayMinutes?: number
}
export type WeeklyWorkHourRowSummary = {
@@ -108,6 +109,7 @@ export type WorkHourDayContextRow = {
isDriverContract?: boolean
hasFormation?: boolean
formationLabel?: string | null
virtualHolidayMinutes?: number
}
export type WorkHourDayContext = {

View File

@@ -35,6 +35,7 @@ export const createEmployee = async (payload: {
contractStartDate?: string
contractEndDate?: string | null
isDriverInput?: boolean
workDaysHoursInput?: Record<number, number> | null
}) => {
const api = useApi()
return api.post<Employee>('/employees', {
@@ -45,7 +46,8 @@ export const createEmployee = async (payload: {
contractNature: payload.contractNature,
contractStartDate: payload.contractStartDate,
contractEndDate: payload.contractEndDate ?? null,
isDriverInput: payload.isDriverInput ?? false
isDriverInput: payload.isDriverInput ?? false,
workDaysHoursInput: payload.workDaysHoursInput ?? null
}, {
toastSuccessKey: 'success.employee.create',
toastErrorKey: 'errors.employee.create'
@@ -66,6 +68,7 @@ export const updateEmployee = async (
contractComment?: string | null
displayOrder?: number
isDriverInput?: boolean
workDaysHoursInput?: Record<number, number> | null
}
) => {
const api = useApi()
@@ -97,6 +100,9 @@ export const updateEmployee = async (
if (payload.isDriverInput !== undefined) {
body.isDriverInput = payload.isDriverInput
}
if (payload.workDaysHoursInput !== undefined) {
body.workDaysHoursInput = payload.workDaysHoursInput
}
return api.patch<Employee>(`/employees/${id}`, body, {
toastSuccessKey: 'success.employee.update',