targo-frontend/src/modules/timesheets/models/shift.models.ts

40 lines
849 B
TypeScript

export const SHIFT_TYPES: ShiftType[] = [
'REGULAR',
'EVENING',
'EMERGENCY',
'OVERTIME',
'HOLIDAY',
'VACATION',
'SICK'
];
export type ShiftType = 'REGULAR' | 'EVENING' | 'EMERGENCY' | 'OVERTIME' | 'HOLIDAY' | 'VACATION' | 'SICK' ;
export type ShiftLegendItem = {
type: ShiftType;
color: string;
label_type: string;
text_color?: string;
};
export interface Shift {
id: number;
date: string;
type: ShiftType;
start_time: string;
end_time: string;
comment: string | undefined;
is_approved: boolean;
is_remote: boolean;
}
export const default_shift: Readonly<Shift> = {
id: -1,
date: '',
start_time: '',
end_time: '',
type: 'REGULAR',
comment: '',
is_approved: false,
is_remote: false,
};