[Monitor | Trunk]: Hide private stakeholders
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor@60097 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
48d529488c
commit
e9ce82d27f
|
@ -244,11 +244,11 @@ export class HomeComponent {
|
|||
this.subscriberErrorMessage = "";
|
||||
this.subscriptions.push(this._stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL).subscribe(
|
||||
stakeholders => {
|
||||
stakeholders = stakeholders.filter(stakeholder => stakeholder.visibility !== 'PRIVATE');
|
||||
if (!stakeholders || stakeholders.length == 0) {
|
||||
this.status = this.errorCodes.NONE;
|
||||
} else {
|
||||
this.stakeholders = stakeholders;
|
||||
console.debug(stakeholders);
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
|
|
|
@ -128,6 +128,7 @@ export class SearchStakeholdersComponent {
|
|||
if (!data) {
|
||||
return;
|
||||
}
|
||||
data = data.filter(stakeholder => stakeholder.visibility !== 'PRIVATE');
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.totalResults[i] = data[i];
|
||||
this.totalResults[i].isManager = this.isStakeholderManager(data[i]);
|
||||
|
@ -168,8 +169,7 @@ export class SearchStakeholdersComponent {
|
|||
let ret = [];
|
||||
for (let result of this.results) {
|
||||
if(result.visibility === 'PUBLIC' ||
|
||||
(result.visibility === 'RESTRICTED' && this.isStakeholderMember(result)) ||
|
||||
(result.visibility === 'PRIVATE' && this.isStakeholderManager(result))
|
||||
(result.visibility === 'RESTRICTED' && this.isStakeholderMember(result))
|
||||
) {
|
||||
ret.push(result);
|
||||
}
|
||||
|
@ -308,12 +308,12 @@ export class SearchStakeholdersComponent {
|
|||
results.push(this.results[i]);
|
||||
break;
|
||||
}
|
||||
} else if (value.replace(/["']/g, "") == 'private') {
|
||||
} /*else if (value.replace(/["']/g, "") == 'private') {
|
||||
if (this.results[i].visibility === 'PRIVATE') {
|
||||
results.push(this.results[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -459,8 +459,8 @@ export class SearchStakeholdersComponent {
|
|||
if (this.user) {
|
||||
filter_names.push("Accessibility");
|
||||
filter_ids.push("access");
|
||||
value_names.push(["Public", "Restricted", "Private"]);
|
||||
value_original_ids.push(["public", "restricted", "private"]);
|
||||
value_names.push(["Public", "Restricted"]);
|
||||
value_original_ids.push(["public", "restricted"]);
|
||||
filter_names.push("Role");
|
||||
filter_ids.push("role");
|
||||
value_names.push(["Manager", "Member"]);
|
||||
|
|
Loading…
Reference in New Issue