1763-worker_time_control_add #17

Merged
bernat merged 10 commits from 1763-worker_time_control_add into dev 2019-10-15 05:35:54 +00:00
2 changed files with 3 additions and 8 deletions

View File

@ -33,10 +33,7 @@ module.exports = Self => {
const subordinate = await Worker.findById(data.workerFk);
return Self.create({
userFk: subordinate.userFk,
timed: data.timed,
manual: 1
});
return Self.rawSql('CALL vn.workerTimeControl_add(?, ?, ?, ?)', [
subordinate.userFk, null, data.timed, true]);
};
};

View File

@ -235,9 +235,7 @@ class Controller {
if (response === 'ACCEPT') {
let data = {workerFk: this.worker.id, timed: this.newTime};
let query = `/api/WorkerTimeControls/addTime`;
this.$http.post(query, data).then(() => {
this.refresh();
});
this.$http.post(query, data).then(() => this.refresh());
}
}
}