1781-zoneHoliday #994
|
@ -72,25 +72,27 @@ class Controller extends Section {
|
||||||
else
|
else
|
||||||
this.createInclusion(type, days, weekday);
|
this.createInclusion(type, days, weekday);
|
||||||
} else {
|
} else {
|
||||||
if (geoExclusions.length)
|
if (geoExclusions.length) {
|
||||||
this.editExclusion(geoExclusions);
|
this.geoExclusions = geoExclusions;
|
||||||
else if (exclusions.length)
|
this.editExclusion();
|
||||||
this.editExclusion(exclusions);
|
} else if (exclusions.length) {
|
||||||
else
|
this.exclusions = exclusions;
|
||||||
|
this.editExclusion();
|
||||||
|
} else
|
||||||
this.createExclusion(days);
|
this.createExclusion(days);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
editExclusion(allTypeExclusions) {
|
editExclusion() {
|
||||||
this.isNew = false;
|
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.excludeSelected.type = 'specificLocations';
|
||||||
this.geoExclusions = allTypeExclusions;
|
}
|
||||||
} else {
|
if (this.exclusions) {
|
||||||
|
this.excludeSelected = angular.copy(this.exclusions[0]);
|
||||||
this.excludeSelected.type = 'all';
|
this.excludeSelected.type = 'all';
|
||||||
this.exclusions = allTypeExclusions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$.excludeDialog.show();
|
this.$.excludeDialog.show();
|
||||||
|
|
Loading…
Reference in New Issue