feat(worker_calendar): repaint, fix front test and add fixtures
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-03-23 14:02:48 +01:00
parent 0963b66560
commit 254fee5036
3 changed files with 18 additions and 4 deletions

View File

@ -2503,3 +2503,15 @@ INSERT INTO `vn`.`docuware` (`code`, `fileCabinetName`, `dialogName` , `find`)
INSERT INTO `vn`.`docuwareConfig` (`url`)
VALUES
('https://verdnatura.docuware.cloud/docuware/platform');
INSERT INTO `vn`.`calendarHolidaysName` (`id`, `name`)
VALUES
(1, 'dayOfIT');
INSERT INTO `vn`.`calendarHolidaysType` (`id`, `name`, `hexColour`)
VALUES
(1, 'test', 'E9AA01');
INSERT INTO `vn`.`calendarHolidays` (`id`, `calendarHolidaysTypeFk`, `dated`, `calendarHolidaysNameFk`, `workCenterFk`)
VALUES
(1, 1, CONCAT(YEAR(CURDATE()), '-12-09'), 1, 1);

View File

@ -228,9 +228,9 @@ class Controller extends Section {
this.repaintCanceller(() =>
this.refresh()
.then(calendar.repaint())
.then(() => this.repaint())
.then(() => this.getContractHolidays())
.then(() => this.getYearHolidays())
.then(() => this.repaint())
);
});
}
@ -265,9 +265,9 @@ class Controller extends Section {
this.repaintCanceller(() =>
this.refresh()
.then(calendar.repaint())
.then(() => this.repaint())
.then(() => this.getContractHolidays())
.then(() => this.getYearHolidays())
.then(() => this.repaint())
);
});
}

View File

@ -191,7 +191,8 @@ describe('Worker', () => {
const selectedDay = new Date();
const expectedEvent = {
dated: selectedDay,
type: 'holiday'
type: 'holiday',
absenceId: 1
};
const $event = {
target: {
@ -214,7 +215,8 @@ describe('Worker', () => {
const selectedDay = new Date();
const expectedEvent = {
dated: selectedDay,
type: 'leaveOfAbsence'
type: 'leaveOfAbsence',
absenceId: 1
};
const $event = {
target: {