1781-zoneHoliday #994

Merged
joan merged 49 commits from 1781-zoneHoliday into dev 2022-08-03 06:41:31 +00:00
2 changed files with 10 additions and 7 deletions
Showing only changes of commit 1235affe2d - Show all commits

View File

@ -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 '';
}

View File

@ -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) {