solved conflicts
gitea/salix/test Something is wrong with the build of this commit Details

This commit is contained in:
Joan Sanchez 2019-10-17 14:01:23 +02:00
parent 0e40d11c6d
commit 6f691353a3
1 changed files with 6 additions and 5 deletions

View File

@ -32,11 +32,12 @@ module.exports = Self => {
throw new UserError(`You don't have enough privileges`);
const subordinate = await Worker.findById(data.workerFk);
const timed = new Date(data.timed);
return Self.create({
userFk: subordinate.userFk,
timed: data.timed,
manual: 1
});
let offset = timed.getTimezoneOffset() * 60000;
timed.setTime(timed.getTime() - offset);
return Self.rawSql('CALL vn.workerTimeControl_add(?, ?, ?, ?)', [
subordinate.userFk, null, timed, true]);
};
};