fix: show correct css
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2022-06-01 13:47:46 +02:00
parent c7471fdac4
commit 1235affe2d
2 changed files with 10 additions and 7 deletions

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