insert timeControl from procedure
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
parent
8ce804a099
commit
e1cea99cc0
|
@ -32,14 +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, data.timed, true]); */
|
||||
return Self.rawSql('CALL vn.workerTimeControl_add(?, ?, ?, ?)', [
|
||||
subordinate.userFk, null, timed, true]);
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue