From 0963b665606cd7272a04d74b549490911f14f457 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 23 Mar 2022 13:06:17 +0100 Subject: [PATCH] fix(worker_calendar): absence in holiday day --- modules/worker/front/calendar/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/worker/front/calendar/index.js b/modules/worker/front/calendar/index.js index 92bad1f0f..9072f5149 100644 --- a/modules/worker/front/calendar/index.js +++ b/modules/worker/front/calendar/index.js @@ -198,7 +198,7 @@ class Controller extends Section { const event = this.events[stamp]; const calendar = $event.target.closest('vn-calendar').$ctrl; - if (event) { + if (event && event.absenceId) { if (event.type == this.absenceType.code) this.delete(calendar, day, event); else @@ -228,6 +228,7 @@ class Controller extends Section { this.repaintCanceller(() => this.refresh() .then(calendar.repaint()) + .then(() => this.repaint()) .then(() => this.getContractHolidays()) .then(() => this.getYearHolidays()) ); @@ -264,6 +265,7 @@ class Controller extends Section { this.repaintCanceller(() => this.refresh() .then(calendar.repaint()) + .then(() => this.repaint()) .then(() => this.getContractHolidays()) .then(() => this.getYearHolidays()) );