Fix a bug in filters numbers
This commit is contained in:
parent
93598f3707
commit
7a6221e568
|
@ -1 +1 @@
|
||||||
Subproject commit 045665ae107501603df4ad02ed95c9842c9c8a3e
|
Subproject commit 104c54a3e861d65817aac59c56640457664eeaab
|
|
@ -217,20 +217,19 @@ export class SearchStakeholdersComponent {
|
||||||
*/
|
*/
|
||||||
private checkFilters(params) {
|
private checkFilters(params) {
|
||||||
let typeResults: StakeholderInfo[] = this.applyFilter('type', params);
|
let typeResults: StakeholderInfo[] = this.applyFilter('type', params);
|
||||||
let accessResults: StakeholderInfo[] = this.results;
|
let accessResults: StakeholderInfo[] = this.applyFilter('access', params);
|
||||||
let roleResults: StakeholderInfo[] = this.results;
|
let roleResults: StakeholderInfo[] = this.results;
|
||||||
accessResults = this.applyFilter('access', params);
|
|
||||||
roleResults = this.applyFilter('role', params);
|
|
||||||
this.resetFilterNumbers('access');
|
|
||||||
this.updateFilterNumbers(typeResults.filter(value => {
|
|
||||||
return roleResults.includes(value);
|
|
||||||
}), 'access');
|
|
||||||
if (this.user) {
|
if (this.user) {
|
||||||
|
roleResults = this.applyFilter('role', params);
|
||||||
this.resetFilterNumbers('role');
|
this.resetFilterNumbers('role');
|
||||||
this.updateFilterNumbers(accessResults.filter(value => {
|
this.updateFilterNumbers(accessResults.filter(value => {
|
||||||
return typeResults.includes(value);
|
return typeResults.includes(value);
|
||||||
}), 'role');
|
}), 'role');
|
||||||
}
|
}
|
||||||
|
this.resetFilterNumbers('access');
|
||||||
|
this.updateFilterNumbers(typeResults.filter(value => {
|
||||||
|
return roleResults.includes(value);
|
||||||
|
}), 'access');
|
||||||
this.resetFilterNumbers('type');
|
this.resetFilterNumbers('type');
|
||||||
this.updateFilterNumbers(accessResults.filter(value => {
|
this.updateFilterNumbers(accessResults.filter(value => {
|
||||||
return roleResults.includes(value);
|
return roleResults.includes(value);
|
||||||
|
@ -356,7 +355,7 @@ export class SearchStakeholdersComponent {
|
||||||
this.filters[i].values[0].number++;
|
this.filters[i].values[0].number++;
|
||||||
} else if (results[k].visibility === 'RESTRICTED') {
|
} else if (results[k].visibility === 'RESTRICTED') {
|
||||||
this.filters[i].values[1].number++;
|
this.filters[i].values[1].number++;
|
||||||
} else {
|
} else if (this.user) {
|
||||||
this.filters[i].values[2].number++;
|
this.filters[i].values[2].number++;
|
||||||
}
|
}
|
||||||
} else if (this.filters[i].filterId == 'role') {
|
} else if (this.filters[i].filterId == 'role') {
|
||||||
|
|
Loading…
Reference in New Issue