From cc14384fcfa29c0594060463d741ec7de1b01a6e Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 2 Nov 2023 11:37:52 +0200 Subject: [PATCH] Fix stakeholder types initilization --- src/app/admin/admin.module.ts | 0 src/app/app.component.ts | 11 +++++------ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 src/app/admin/admin.module.ts diff --git a/src/app/admin/admin.module.ts b/src/app/admin/admin.module.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 8023ab1..5c78487 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -35,7 +35,6 @@ export class AppComponent extends BaseComponent implements OnInit { title = 'irish-monitor'; loading: boolean = false; stakeholderEntities = StakeholderEntities; - stakeholderTypes = stakeholderTypes; view: boolean = false; hasHeader: boolean = true; header: Header = { @@ -65,11 +64,11 @@ export class AppComponent extends BaseComponent implements OnInit { (this.stakeholderEntities as any)['ORGANIZATION'] = 'RPO'; (this.stakeholderEntities as any)['ORGANIZATIONS'] = 'RFOs'; - this.stakeholderTypes = [ - {value: 'funder', label: StakeholderEntities.FUNDER}, - {value: 'organization', label: StakeholderEntities.ORGANIZATION}, - {value: 'country', label: StakeholderEntities.COUNTRY} - ]; + stakeholderTypes.length = 0; + stakeholderTypes.push( + {value: 'funder', label: StakeholderEntities.FUNDER}, + {value: 'organization', label: StakeholderEntities.ORGANIZATION}, + {value: 'country', label: StakeholderEntities.COUNTRY}); this.menuItems = [ new MenuItem("national", this.stakeholderEntities.COUNTRY + ' ' + this.stakeholderEntities.STAKEHOLDER, "", "/", false, [], null, {}, null, null, null, null),