From 9ab70d867ad7e6359e01d0117a88c4b24180aac4 Mon Sep 17 00:00:00 2001 From: rmroot Date: Tue, 21 Jan 2025 11:09:14 -0600 Subject: [PATCH 1/2] updated list ordering for KPIs based off feedback --- .../keyPerformanceIndicatorOptions.ts | 84 ++++++++++--------- .../helper-pipes/kpi-list-filter.pipe.ts | 21 ++++- 2 files changed, 63 insertions(+), 42 deletions(-) diff --git a/src/app/shared/constants/keyPerformanceIndicatorOptions.ts b/src/app/shared/constants/keyPerformanceIndicatorOptions.ts index 97f52a7f..0e20110f 100644 --- a/src/app/shared/constants/keyPerformanceIndicatorOptions.ts +++ b/src/app/shared/constants/keyPerformanceIndicatorOptions.ts @@ -32,12 +32,7 @@ export interface KeyPerformanceIndicatorOption { }; export const KeyPerformanceIndicatorOptions: Array = [ - { - primaryKPI: 'Strategic Relationship Impact', - label: 'Strategic Relationship Impact', - htmlLabel: 'Strategic Relationship Impact', - optionValue: 'strategicRelationshipImpact' - }, + //operations { primaryKPI: 'Operations', label: 'Productivity', @@ -46,9 +41,9 @@ export const KeyPerformanceIndicatorOptions: Array { - return option.label; + return this.getPrimaryOrder(option); }, 'asc'); } -} + + getPrimaryOrder(option: KeyPerformanceIndicatorOption): number { + switch (option.primaryKPI) { + case 'Operations': + return 1; + case 'Employee and Workplace Environment': + return 2; + case 'Sustainability (Environmental Impact)': + return 3; + case 'Strategic Relationship Impact': + return 4; + case 'Other': + return 5; + } + } +} \ No newline at end of file From e5fd9aae8794467d229f4c2ed57b00017b04f763 Mon Sep 17 00:00:00 2001 From: rmroot Date: Tue, 21 Jan 2025 11:38:45 -0600 Subject: [PATCH 2/2] quick fix to routing --- .../kpi-search-form/kpi-list/kpi-list.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/shared-facility-forms/kpi-search-form/kpi-list/kpi-list.component.ts b/src/app/shared/shared-facility-forms/kpi-search-form/kpi-list/kpi-list.component.ts index 63a86425..23e12120 100644 --- a/src/app/shared/shared-facility-forms/kpi-search-form/kpi-list/kpi-list.component.ts +++ b/src/app/shared/shared-facility-forms/kpi-search-form/kpi-list/kpi-list.component.ts @@ -112,7 +112,7 @@ export class KpiListComponent { goToKpiDetails(kpi: IdbKeyPerformanceIndicator) { if (this.router.url.includes('portfolio')) { - this.router.navigateByUrl('portfolio/company/' + kpi.companyId + '/performance-indicators/details/' + kpi.guid); + this.router.navigateByUrl('portfolio/facility/' + kpi.facilityId + '/performance-indicators/details/' + kpi.guid); } else { let onSiteVisit: IdbOnSiteVisit = this.onSiteVisitIdbService.selectedVisit.getValue(); this.router.navigateByUrl('setup-wizard/pre-visit/' + onSiteVisit.guid + '/facility-kpi-detail/' + kpi.guid);