[angular-16-irish-monitor | FIXED | DONE]: Manage stakeholders retrieve types from configuration.

This commit is contained in:
Konstantinos Triantafyllou 2024-01-03 11:00:11 +02:00
parent cba56ca4c0
commit 21f49bbc6c
1 changed files with 3 additions and 23 deletions

View File

@ -35,14 +35,8 @@ export class ManageStakeholdersComponent extends StakeholderBaseComponent implem
public tab: Tab = 'all';
public currentPage: number = 1;
public currentTemplatesPage: number = 1;
public pageSize: number = 10;
public typeOptions: Option[] = [
{value: 'all', label: 'All'},
{value: 'country', label: 'National'},
{value: 'organization', label: 'RPO'},
{value: 'funder', label: 'RFO'},
{value: 'datasource', label: 'Repository Monitor'},
];
public pageSize: number = 15;
public typeOptions: Option[];
/**
* Filtered Stakeholders
*/
@ -52,11 +46,6 @@ export class ManageStakeholdersComponent extends StakeholderBaseComponent implem
* Top filters
*/
public filters: UntypedFormGroup;
public all: Option = {
value: 'all',
label: 'All'
};
public callback: Function;
/**
@ -76,6 +65,7 @@ export class ManageStakeholdersComponent extends StakeholderBaseComponent implem
}
ngOnInit(): void {
this.typeOptions = [{value: 'all', label: 'All'}].concat(this.stakeholderUtils.types);
this.buildFilters();
this.title = 'Manage Profiles';
this.setMetadata();
@ -120,16 +110,6 @@ export class ManageStakeholdersComponent extends StakeholderBaseComponent implem
}));
}
// onStatusChange(value) {
// this.displayDefaultStakeholders = this.filterStatus(this.defaultStakeholders, value);
// this.displayStakeholders = this.filterStatus(this.stakeholders, value);
// }
// onKeywordChange(value) {
// this.displayDefaultStakeholders = this.filterByKeyword(this.defaultStakeholders, value);
// this.displayStakeholders = this.filterByKeyword(this.stakeholders, value);
// }
private filterByStatus(stakeholders: Stakeholder[], value): Stakeholder[] {
if (value === 'all') {
return stakeholders;