workers without active contract no longer set calendar and timeControl at fault #684
|
@ -91,8 +91,10 @@ class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
getActiveContract() {
|
getActiveContract() {
|
||||||
this.$http.get(`Workers/${this.worker.id}/activeContract`)
|
this.$http.get(`Workers/${this.worker.id}/activeContract`).then(res => {
|
||||||
.then(res => this.businessId = res.data.businessFk);
|
if (res.data)
|
||||||
|
this.businessId = res.data.businessFk;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getContractHolidays() {
|
getContractHolidays() {
|
||||||
|
|
|
@ -90,7 +90,10 @@ class Controller extends Section {
|
||||||
|
|
||||||
getActiveContract() {
|
getActiveContract() {
|
||||||
return this.$http.get(`Workers/${this.worker.id}/activeContract`)
|
return this.$http.get(`Workers/${this.worker.id}/activeContract`)
|
||||||
.then(res => this.businessId = res.data.businessFk);
|
.then(res => {
|
||||||
|
if (res.data)
|
||||||
|
this.businessId = res.data.businessFk;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchHours() {
|
fetchHours() {
|
||||||
|
@ -111,6 +114,8 @@ class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
getAbsences() {
|
getAbsences() {
|
||||||
|
if (!this.businessId) return;
|
||||||
|
|
||||||
const fullYear = this.started.getFullYear();
|
const fullYear = this.started.getFullYear();
|
||||||
let params = {
|
let params = {
|
||||||
businessFk: this.businessId,
|
businessFk: this.businessId,
|
||||||
|
|
Loading…
Reference in New Issue