refactor: generatePlan returns {assignments, skippedDates}
This commit is contained in:
1 parent
e4ae866375
commit
790ea72987
3 files changed
+16
-14
No files matched your search
+2
-1
@@ -98,7 +98,8 @@ export function renderCalendar() {
|
||||
state.calendar.holidays, state.calendar.companyClosures);
|
||||
const prefix = currentYear + '-' + String(currentMonth).padStart(2,'0');
|
||||
const historyWithoutMonth = state.history.filter(h => !h.date.startsWith(prefix));
|
||||
currentPlan = generatePlan(workdays, state.employees, historyWithoutMonth);
|
||||
const result = generatePlan(workdays, state.employees, historyWithoutMonth);
|
||||
currentPlan = result.assignments;
|
||||
addHistoryEntries(state, currentPlan);
|
||||
saveState();
|
||||
renderGrid(wrapper, exportBtn);
|
||||
|
||||
Reference in new issue
Block a user