60 lines
1.4 KiB
TypeScript
60 lines
1.4 KiB
TypeScript
import type { Employee } from './employee'
|
|
|
|
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
|
|
isValid?: boolean
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
export type WeeklyWorkHourRowSummary = {
|
|
employeeId: number
|
|
firstName: string
|
|
lastName: string
|
|
siteName?: string | null
|
|
contractName?: string | null
|
|
trackingMode?: 'TIME' | 'PRESENCE' | null
|
|
daily: WeeklyWorkHourDailySummary[]
|
|
weeklyDayMinutes: number
|
|
weeklyNightMinutes: number
|
|
weeklyTotalMinutes: number
|
|
weeklyPresenceCount?: number
|
|
weeklyOvertime25Minutes?: number
|
|
weeklyOvertime50Minutes?: number
|
|
}
|
|
|
|
export type WeeklyWorkHourSummary = {
|
|
weekStart: string
|
|
weekEnd: string
|
|
days: string[]
|
|
rows: WeeklyWorkHourRowSummary[]
|
|
}
|