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