5918-worker.time-control_resend #1685
|
@ -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)
|
||||||
vicent marked this conversation as resolved
Outdated
|
|||||||
},
|
},
|
||||||
vicent marked this conversation as resolved
Outdated
jgallego
commented
enviar el workerFk enviar el workerFk
vicent
commented
No se envía el workerFk, pq puede que ese workerFk no tenga ningún registro. Se ha solucionado poniendo un limit 1 en la petición. No se envía el workerFk, pq puede que ese workerFk no tenga ningún registro. Se ha solucionado poniendo un limit 1 en la petición.
|
|||||||
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;
|
||||||
|
|
Loading…
Reference in New Issue
ací al final no pugueres posar el workerFk?
Teu havia possat en la nota de ahir:
No se envía el workerFk, pq puede que ese workerFk no tenga ningún registro. Se ha solucionado poniendo un limit 1 en la petición.
Just lo que soluciona esta tarea es poder enviar el registro horario aunq no se li haja enviat la ninguna volta.