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>
86 lines
2.0 KiB
TypeScript
86 lines
2.0 KiB
TypeScript
import type { Employee } from './employee'
|
|
import type { ContractType, TrackingMode } from './contract'
|
|
|
|
export type WorkHour = {
|
|
id: number
|
|
employee: Employee
|
|
workDate: string
|
|
morningFrom?: string | null
|
|
morningTo?: string | null
|
|
afternoonFrom?: string | null
|
|
afternoonTo?: string | null
|
|
eveningFrom?: string | null
|
|
eveningTo?: string | null
|
|
isPresentMorning?: boolean
|
|
isPresentAfternoon?: boolean
|
|
isSiteValid?: boolean
|
|
isValid?: boolean
|
|
updatedAt?: string | null
|
|
}
|
|
|
|
export type WorkHourEntryPayload = {
|
|
employeeId: number
|
|
morningFrom?: string | null
|
|
morningTo?: string | null
|
|
afternoonFrom?: string | null
|
|
afternoonTo?: string | null
|
|
eveningFrom?: string | null
|
|
eveningTo?: string | null
|
|
isPresentMorning?: boolean
|
|
isPresentAfternoon?: boolean
|
|
}
|
|
|
|
export type WeeklyWorkHourDailySummary = {
|
|
date: string
|
|
dayMinutes: number
|
|
nightMinutes: number
|
|
totalMinutes: number
|
|
present?: number | null
|
|
hasAbsence?: boolean
|
|
absenceLabel?: string | null
|
|
absenceColor?: string | null
|
|
}
|
|
|
|
export type WeeklyWorkHourRowSummary = {
|
|
employeeId: number
|
|
firstName: string
|
|
lastName: string
|
|
siteName?: string | null
|
|
contractName?: string | null
|
|
contractType?: ContractType | null
|
|
trackingMode?: TrackingMode | null
|
|
daily: WeeklyWorkHourDailySummary[]
|
|
weeklyDayMinutes: number
|
|
weeklyNightMinutes: number
|
|
weeklyTotalMinutes: number
|
|
weeklyPresenceCount?: number
|
|
weeklyOvertimeTotalMinutes?: number
|
|
weeklyOvertime25Minutes?: number
|
|
weeklyOvertime50Minutes?: number
|
|
weeklyRecoveryMinutes?: number
|
|
}
|
|
|
|
export type WeeklyWorkHourSummary = {
|
|
weekStart: string
|
|
weekEnd: string
|
|
days: string[]
|
|
rows: WeeklyWorkHourRowSummary[]
|
|
}
|
|
|
|
export type WorkHourDayContextRow = {
|
|
employeeId: number
|
|
hasContractAtDate: boolean
|
|
absenceLabel?: string | null
|
|
absenceColor?: string | null
|
|
absenceHalf?: 'AM' | 'PM' | null
|
|
absentMorning: boolean
|
|
absentAfternoon: boolean
|
|
creditedMinutes: number
|
|
creditedPresenceUnits: number
|
|
}
|
|
|
|
export type WorkHourDayContext = {
|
|
workDate: string
|
|
rows: WorkHourDayContextRow[]
|
|
}
|