Skip to content

Commit

Permalink
values of selected filters are arranged #1869
Browse files Browse the repository at this point in the history
  • Loading branch information
sevannerse committed Feb 26, 2021
1 parent 739c2eb commit 18c4b34
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions resources/assets/js/components/AkauntingSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ export default {
let option = '';
let operator = '=';
let value = '';
let value_assigned = false;
this.filter_list.forEach(function (_filter, i) {
let filter_values = this.convertOption(_filter.values);
Expand Down Expand Up @@ -630,18 +631,18 @@ export default {
this.option_values[_filter.key] = filter_values;
if (filter_values.length > 0) {
filter_values.forEach(function (value, j) {
if (value.key == filter[1]) {
this.selected_values.push(value);
this.option_values[_filter.key].splice(j, 1);
}
}, this);
} else {
if (cookie != undefined && cookie[_filter.key]) {
this.selected_values.push(cookie[_filter.key]);
filter_values.forEach(function (value, j) {
if (value.key == filter[1]) {
this.selected_values.push(value);
this.option_values[_filter.key].splice(j, 1);
value_assigned = true
}
}, this);
if (!value_assigned && (cookie != undefined && cookie[_filter.key])) {
this.selected_values.push(cookie[_filter.key]);
}
}
}, this);
Expand Down

0 comments on commit 18c4b34

Please sign in to comment.