[Trunk|Connect]: Search Communities: Remove status and role filters when user logged out
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@55352 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
00a1d831ac
commit
77f285703f
|
@ -240,20 +240,24 @@ export class SearchCommunitiesComponent {
|
|||
*/
|
||||
private checkFilters(params: Map<string, string>) {
|
||||
let typeResults: CommunityInfo[] = this.applyFilter('type', params);
|
||||
let statusResults: CommunityInfo[] = this.applyFilter('status' , params);
|
||||
let roleResults: CommunityInfo[] = this.applyFilter('role', params);
|
||||
let statusResults: CommunityInfo[] = this.results;
|
||||
let roleResults: CommunityInfo[] = this.results;
|
||||
if(Session.isLoggedIn()) {
|
||||
statusResults = this.applyFilter('status', params);
|
||||
roleResults = this.applyFilter('role', params);
|
||||
this.resetFilterNumbers('status');
|
||||
this.updateFilterNumbers(typeResults.filter(value => {
|
||||
return roleResults.includes(value);
|
||||
}), 'status');
|
||||
this.resetFilterNumbers('type');
|
||||
this.updateFilterNumbers(statusResults.filter(value => {
|
||||
return roleResults.includes(value);
|
||||
}), 'type');
|
||||
this.resetFilterNumbers('role');
|
||||
this.updateFilterNumbers(statusResults.filter(value => {
|
||||
return typeResults.includes(value);
|
||||
}), 'role');
|
||||
}
|
||||
this.resetFilterNumbers('type');
|
||||
this.updateFilterNumbers(statusResults.filter(value => {
|
||||
return roleResults.includes(value);
|
||||
}), 'type');
|
||||
this.results = statusResults.filter(value => {
|
||||
return typeResults.includes(value);
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue