moved range to slot for shift planing

This commit is contained in:
2025-10-11 00:52:10 +02:00
parent ebce18e880
commit 4875f13321
4 changed files with 69 additions and 39 deletions

View File

@@ -13,24 +13,30 @@ export interface TemplateShiftSlot {
id: string;
templateId: string;
dayOfWeek: number;
timeRange: TemplateShiftTimeRange;
timeSlot: TemplateShiftTimeSlot;
requiredEmployees: number;
color?: string;
}
export interface TemplateShiftTimeRange {
export interface TemplateShiftTimeSlot {
id: string;
name: string; // e.g., "Frühschicht", "Spätschicht"
startTime: string;
endTime: string;
}
export const DEFAULT_TIME_SLOTS: TemplateShiftTimeSlot[] = [
{ id: 'morning', name: 'Vormittag', startTime: '08:00', endTime: '12:00' },
{ id: 'afternoon', name: 'Nachmittag', startTime: '11:30', endTime: '15:30' },
];
export interface CreateShiftTemplateRequest {
name: string;
description?: string;
isDefault: boolean;
shifts: Omit<TemplateShiftSlot, 'id' | 'templateId'>[];
timeSlots: TemplateShiftTimeRange[];
timeSlots: TemplateShiftTimeSlot[];
}
export interface UpdateShiftTemplateRequest {
@@ -38,5 +44,5 @@ export interface UpdateShiftTemplateRequest {
description?: string;
isDefault?: boolean;
shifts?: Omit<TemplateShiftSlot, 'id' | 'templateId'>[];
timeSlots?: TemplateShiftTimeRange[];
timeSlots?: TemplateShiftTimeSlot[];
}