Skip to content

Commit 02868ba

Browse files
committed
feat: set default filter to filter inactive redirects
1 parent 2dd4516 commit 02868ba

File tree

1 file changed

+3
-6
lines changed
  • src/Resources/app/administration/src/module/tinect-redirects/page/tinect-redirects-index

1 file changed

+3
-6
lines changed

src/Resources/app/administration/src/module/tinect-redirects/page/tinect-redirects-index/index.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default {
2424
sortDirection: 'DESC',
2525
filter: {
2626
salesChannelDomainId: null,
27-
active: null,
27+
active: 0,
2828
hidden: 0,
2929
}
3030
};
@@ -86,17 +86,14 @@ export default {
8686
const criteria = new Criteria(this.page, this.limit);
8787

8888
criteria.setTerm(this.term);
89+
criteria.addFilter(Criteria.equals('active', this.filter.active));
8990
criteria.addFilter(Criteria.equals('hidden', this.filter.hidden));
9091
criteria.addSorting(Criteria.sort(this.sortBy, this.sortDirection, this.naturalSorting));
9192

9293
if (this.filter.salesChannelDomainId) {
9394
criteria.addFilter(Criteria.equals('salesChannelDomainId', this.filter.salesChannelDomainId));
9495
}
9596

96-
if (this.filter.active) {
97-
criteria.addFilter(Criteria.equals('active', this.filter.active));
98-
}
99-
10097
return criteria;
10198
},
10299
},
@@ -125,7 +122,7 @@ export default {
125122
resetFilter() {
126123
this.filter = {
127124
salesChannelDomainId: null,
128-
active: null,
125+
active: 0,
129126
hidden: 0,
130127
};
131128
},

0 commit comments

Comments
 (0)