5918-worker.time-control_resend #1685

Merged
alexm merged 14 commits from 5918-worker.time-control_resend into dev 2023-10-18 09:10:19 +00:00
1 changed files with 4 additions and 4 deletions
Showing only changes of commit 9da5c4c1db - Show all commits

View File

@ -113,21 +113,21 @@ class Controller extends Section {
} }
isMailSended() { isMailSended() {
const filter = { const filterTimeControl = {
where: { where: {
year: this._date.getFullYear(), year: this._date.getFullYear(),
week: this.getWeekNumber(this._date) week: this.getWeekNumber(this._date)
}, },
limit: 1 limit: 1
}; };
this.$http.get('WorkerTimeControlMails', {filter}) this.$http.get('WorkerTimeControlMails', {filterTimeControl})
.then(res => { .then(res => {
if (!res.data.length) { if (!res.data.length) {
this.canResend = false; this.canResend = false;
return; return;
} }
const filter = { const filterDepartment = {
where: { where: {
workerFk: this.$params.id workerFk: this.$params.id
}, },
@ -135,7 +135,7 @@ class Controller extends Section {
relation: 'department' relation: 'department'
} }
}; };
this.$http.get('WorkerDepartments', {filter}) this.$http.get('WorkerDepartments', {filterDepartment})
.then(res => { .then(res => {
const department = res.data[0].department; const department = res.data[0].department;
if (department.isTeleworking) this.canResend = true; if (department.isTeleworking) this.canResend = true;