3448-worker_calendar-payedHolidays #846

Merged
carlosjr merged 11 commits from 3448-worker_calendar-payedHolidays into dev 2022-01-17 09:09:46 +00:00
1 changed files with 14 additions and 0 deletions
Showing only changes of commit e1c4f144a7 - Show all commits

View File

@ -23,6 +23,7 @@ class Controller extends Section {
this.refresh()
.then(() => this.repaint())
.then(() => this.getContractHolidays())
.then(() => this.getPayedHolidays())
.then(() => this.getYearHolidays());
}
@ -36,6 +37,7 @@ class Controller extends Section {
this.refresh()
.then(() => this.repaint())
.then(() => this.getContractHolidays())
.then(() => this.getPayedHolidays())
.then(() => this.getYearHolidays());
}
}
@ -104,6 +106,15 @@ class Controller extends Section {
}, data => this.contractHolidays = data);
}
getPayedHolidays() {
this.getContractHolidays();
if (this.contractHolidays !== undefined) {// && business.reasonEndFk !== null
const daysToPay = this.contractHolidays.totalHolidays - this.contractHolidays.holidaysEnjoyed;
console.log(this.businessId, this.contractHolidays.totalHolidays, this.contractHolidays.holidaysEnjoyed);
console.log(daysToPay);
}
}
getYearHolidays() {
this.getHolidays({
year: this.year
@ -225,6 +236,7 @@ class Controller extends Section {
this.refresh()
.then(calendar.repaint())
.then(() => this.getContractHolidays())
.then(() => this.getPayedHolidays())
.then(() => this.getYearHolidays())
);
});
@ -246,6 +258,7 @@ class Controller extends Section {
this.refresh()
.then(calendar.repaint())
.then(() => this.getContractHolidays())
.then(() => this.getPayedHolidays())
.then(() => this.getYearHolidays())
);
});
@ -261,6 +274,7 @@ class Controller extends Section {
this.refresh()
.then(calendar.repaint())
.then(() => this.getContractHolidays())
.then(() => this.getPayedHolidays())
.then(() => this.getYearHolidays())
);
});