1781-zoneHoliday #994

Merged
joan merged 49 commits from 1781-zoneHoliday into dev 2022-08-03 06:41:31 +00:00
1 changed files with 13 additions and 11 deletions
Showing only changes of commit c7471fdac4 - Show all commits

View File

@ -72,25 +72,27 @@ class Controller extends Section {
else
this.createInclusion(type, days, weekday);
} else {
if (geoExclusions.length)
this.editExclusion(geoExclusions);
else if (exclusions.length)
this.editExclusion(exclusions);
else
if (geoExclusions.length) {
this.geoExclusions = geoExclusions;
this.editExclusion();
} else if (exclusions.length) {
this.exclusions = exclusions;
this.editExclusion();
} else
this.createExclusion(days);
}
}
editExclusion(allTypeExclusions) {
editExclusion() {
this.isNew = false;
this.excludeSelected = angular.copy(allTypeExclusions[0]);
if (this.excludeSelected.geoFk) {
if (this.geoExclusions) {
this.excludeSelected = angular.copy(this.geoExclusions[0]);
this.excludeSelected.type = 'specificLocations';
this.geoExclusions = allTypeExclusions;
} else {
}
if (this.exclusions) {
this.excludeSelected = angular.copy(this.exclusions[0]);
this.excludeSelected.type = 'all';
this.exclusions = allTypeExclusions;
}
this.$.excludeDialog.show();