8282-testToMaster #3284

Merged
alexm merged 157 commits from 8282-testToMaster into master 2024-12-10 06:18:52 +00:00
1 changed files with 1 additions and 2 deletions
Showing only changes of commit eaa62909ff - Show all commits

View File

@ -62,9 +62,8 @@ module.exports = Self => {
await models.ACL.checkAccessAcl(ctx, 'Worker', 'canCreateAbsenceInPast', 'WRITE');
const now = Date.vnNew();
const newDate = new Date(args.dated).getTime();
const nowDate = now.getTime();
if ((nowDate > newDate) && !canCreateAbsenceInPast)
if ((now.getTime() > newDate) && !canCreateAbsenceInPast)
throw new UserError(`Holidays to past days not available`);
const labour = await models.WorkerLabour.findById(args.businessFk,