Merge branch 'dev/matthieu/tickets' of git.targo.ca:Targo/targo_backend
This commit is contained in:
commit
1517b7e32c
|
|
@ -70,7 +70,7 @@ export class SchedulePresetsApplyService {
|
||||||
const created_shifts: ShiftDto[] = [];
|
const created_shifts: ShiftDto[] = [];
|
||||||
|
|
||||||
for (const preset_shift of default_preset_shifts) {
|
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' };
|
if (!date) return { success: false, error: 'INVALID_PRESET_DATE' };
|
||||||
|
|
||||||
const shift = await this.createShiftFromPreset(preset_shift, date, timesheet.id)
|
const shift = await this.createShiftFromPreset(preset_shift, date, timesheet.id)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user