Compare commits
1 Commits
dev
...
hotfix_wor
Author | SHA1 | Date |
---|---|---|
Vicent Llopis | f0d532e4bc |
|
@ -33,12 +33,14 @@ class Controller extends ModuleCard {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$http.get(`Workers/${this.$params.id}`, {filter})
|
this.$http.get(`Workers/${this.$params.id}`, {filter})
|
||||||
.then(res => this.worker = res.data)
|
.then(res => {
|
||||||
.then(() =>
|
|
||||||
this.$http.get(`Workers/${this.$params.id}/activeContract`)
|
this.$http.get(`Workers/${this.$params.id}/activeContract`)
|
||||||
.then(res => {
|
.then(activeContract => {
|
||||||
if (res.data) this.worker.hasWorkCenter = res.data.workCenterFk;
|
const worker = res.data;
|
||||||
}));
|
if (activeContract.data) worker.hasWorkCenter = res.data.workCenterFk;
|
||||||
|
this.worker = worker;
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
getAbsences() {
|
getAbsences() {
|
||||||
if (!this.worker.hasWorkerCenter) return;
|
if (!this.worker.hasWorkCenter) return;
|
||||||
const fullYear = this.started.getFullYear();
|
const fullYear = this.started.getFullYear();
|
||||||
let params = {
|
let params = {
|
||||||
workerFk: this.$params.id,
|
workerFk: this.$params.id,
|
||||||
|
|
Loading…
Reference in New Issue