mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 06:55:45 +01:00
starting from new for scheduling
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -156,7 +156,10 @@ export class ShiftAssignmentService {
|
||||
}
|
||||
|
||||
// Set cache for scheduler
|
||||
IntelligentShiftScheduler.scheduledShiftsCache.set(shiftPlan.id, scheduledShifts);
|
||||
IntelligentShiftScheduler.scheduledShiftsCache.set(shiftPlan.id, {
|
||||
shifts: scheduledShifts,
|
||||
timestamp: Date.now()
|
||||
});
|
||||
|
||||
// 🔥 RUN SCHEDULING FOR FIRST WEEK ONLY
|
||||
const schedulingResult = await IntelligentShiftScheduler.generateOptimalSchedule(
|
||||
@@ -344,7 +347,7 @@ export class ShiftAssignmentService {
|
||||
// Group pattern shifts by day-timeSlot for easy lookup
|
||||
const patternMap = new Map<string, string[]>();
|
||||
|
||||
weeklyPattern.weekShifts.forEach(patternShift => {
|
||||
weeklyPattern.weekShifts.forEach((patternShift: ScheduledShift) => {
|
||||
const dayOfWeek = this.getDayOfWeek(patternShift.date);
|
||||
const patternKey = `${dayOfWeek}-${patternShift.timeSlotId}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user