fix : affichage des absences dans les heures vue semaine + refacto

This commit is contained in:
2026-02-20 12:20:34 +01:00
parent d9fa301159
commit fb52be128e
21 changed files with 513 additions and 112 deletions

View File

@@ -1,7 +1,25 @@
export const TRACKING_MODES = {
TIME: 'TIME',
PRESENCE: 'PRESENCE'
} as const
export type TrackingMode = (typeof TRACKING_MODES)[keyof typeof TRACKING_MODES]
export const CONTRACT_TYPES = {
FORFAIT: 'FORFAIT',
H35: '35H',
H39: '39H',
INTERIM: 'INTERIM',
CUSTOM: 'CUSTOM'
} as const
export type ContractType = (typeof CONTRACT_TYPES)[keyof typeof CONTRACT_TYPES]
export type Contract = {
id: number
name: string
trackingMode: 'TIME' | 'PRESENCE'
trackingMode: TrackingMode
type: ContractType
weeklyHours?: number | null
isActive?: boolean
}

View File

@@ -1,4 +1,5 @@
import type { Employee } from './employee'
import type { ContractType, TrackingMode } from './contract'
export type WorkHour = {
id: number
@@ -33,6 +34,9 @@ export type WeeklyWorkHourDailySummary = {
nightMinutes: number
totalMinutes: number
present?: number | null
hasAbsence?: boolean
absenceLabel?: string | null
absenceColor?: string | null
}
export type WeeklyWorkHourRowSummary = {
@@ -41,7 +45,8 @@ export type WeeklyWorkHourRowSummary = {
lastName: string
siteName?: string | null
contractName?: string | null
trackingMode?: 'TIME' | 'PRESENCE' | null
contractType?: ContractType | null
trackingMode?: TrackingMode | null
daily: WeeklyWorkHourDailySummary[]
weeklyDayMinutes: number
weeklyNightMinutes: number