Merge branch 'dev/matthieu/tickets' of git.targo.ca:Targo/targo_backend

This commit is contained in:
Matthieu Haineault 2026-02-27 13:41:33 -05:00
commit 1517b7e32c

View File

@ -70,7 +70,7 @@ export class SchedulePresetsApplyService {
const created_shifts: ShiftDto[] = [];
for (const preset_shift of default_preset_shifts) {
const date = dated_map.find(date => date.getUTCDay() === WEEKDAY_MAP[preset_shift.week_day])
const date = dated_map.find(date => date.getUTCDay() === WEEKDAY_MAP.findIndex(weekday => weekday === preset_shift.week_day))
if (!date) return { success: false, error: 'INVALID_PRESET_DATE' };
const shift = await this.createShiftFromPreset(preset_shift, date, timesheet.id)