From 1235affe2dfd4e472af661c6f6778cb48debebb1 Mon Sep 17 00:00:00 2001 From: vicent Date: Wed, 1 Jun 2022 13:47:46 +0200 Subject: [PATCH] fix: show correct css --- modules/zone/front/calendar/index.js | 4 ++-- modules/zone/front/events/index.js | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/zone/front/calendar/index.js b/modules/zone/front/calendar/index.js index 262567a86..3bc7158ef 100644 --- a/modules/zone/front/calendar/index.js +++ b/modules/zone/front/calendar/index.js @@ -173,9 +173,9 @@ class Controller extends Component { getClass(day) { let stamp = day.getTime(); - if (this.geoExclusions[stamp] && !this.days[stamp]) + if (this.geoExclusions[stamp]) return 'geoExcluded'; - else if (this.exclusions[stamp] && !this.days[stamp]) + else if (this.exclusions[stamp]) return 'excluded'; else return ''; } diff --git a/modules/zone/front/events/index.js b/modules/zone/front/events/index.js index 31685c338..56b6a82e0 100644 --- a/modules/zone/front/events/index.js +++ b/modules/zone/front/events/index.js @@ -85,12 +85,11 @@ class Controller extends Section { editExclusion() { this.isNew = false; - - if (this.geoExclusions) { + if (this.geoExclusions && this.geoExclusions.length) { this.excludeSelected = angular.copy(this.geoExclusions[0]); this.excludeSelected.type = 'specificLocations'; } - if (this.exclusions) { + if (this.exclusions && this.exclusions.length) { this.excludeSelected = angular.copy(this.exclusions[0]); this.excludeSelected.type = 'all'; } @@ -244,7 +243,6 @@ class Controller extends Section { geoIds: geoIds }; - console.log(excludeSelected); if (this.isNew) req = this.$http.post(this.geoExclusionsPath, params); else @@ -269,7 +267,12 @@ class Controller extends Section { } this.$q.all(reqs) - .then(() => this.refresh()); + .then(() => { + this.excludeSelected = null; + this.geoExclusions = null; + this.exclusions = null; + this.refresh(); + }); } set excludeSearch(value) {