a
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-07-13 15:02:27 +02:00
parent 6fbadf7e4e
commit f0d532e4bc
2 changed files with 8 additions and 6 deletions

View File

@ -33,12 +33,14 @@ class Controller extends ModuleCard {
};
this.$http.get(`Workers/${this.$params.id}`, {filter})
.then(res => this.worker = res.data)
.then(() =>
this.$http.get(`Workers/${this.$params.id}/activeContract`)
.then(res => {
if (res.data) this.worker.hasWorkCenter = res.data.workCenterFk;
}));
this.$http.get(`Workers/${this.$params.id}/activeContract`)
.then(activeContract => {
const worker = res.data;
if (activeContract.data) worker.hasWorkCenter = res.data.workCenterFk;
this.worker = worker;
});
});
}
}

View File

@ -151,7 +151,7 @@ class Controller extends Section {
}
getAbsences() {
if (!this.worker.hasWorkerCenter) return;
if (!this.worker.hasWorkCenter) return;
const fullYear = this.started.getFullYear();
let params = {
workerFk: this.$params.id,