1763-worker_time_control_add #17
|
@ -33,10 +33,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
const subordinate = await Worker.findById(data.workerFk);
|
const subordinate = await Worker.findById(data.workerFk);
|
||||||
|
|
||||||
return Self.create({
|
return Self.rawSql('CALL vn.workerTimeControl_add(?, ?, ?, ?)', [
|
||||||
userFk: subordinate.userFk,
|
subordinate.userFk, null, data.timed, true]);
|
||||||
timed: data.timed,
|
|
||||||
manual: 1
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -235,9 +235,7 @@ class Controller {
|
||||||
if (response === 'ACCEPT') {
|
if (response === 'ACCEPT') {
|
||||||
let data = {workerFk: this.worker.id, timed: this.newTime};
|
let data = {workerFk: this.worker.id, timed: this.newTime};
|
||||||
let query = `/api/WorkerTimeControls/addTime`;
|
let query = `/api/WorkerTimeControls/addTime`;
|
||||||
this.$http.post(query, data).then(() => {
|
this.$http.post(query, data).then(() => this.refresh());
|
||||||
this.refresh();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue