diff --git a/onecgiar-pr-client/src/app/pages/outcome-indicator/pages/outcome-indicator-home/outcome-indicator-home.component.ts b/onecgiar-pr-client/src/app/pages/outcome-indicator/pages/outcome-indicator-home/outcome-indicator-home.component.ts index d77801886..6ac04380d 100644 --- a/onecgiar-pr-client/src/app/pages/outcome-indicator/pages/outcome-indicator-home/outcome-indicator-home.component.ts +++ b/onecgiar-pr-client/src/app/pages/outcome-indicator/pages/outcome-indicator-home/outcome-indicator-home.component.ts @@ -29,7 +29,9 @@ export class OutcomeIndicatorHomeComponent { { header: 'Expected target', key: 'expected_target', width: 22 }, { header: 'Actual target achieved', key: 'actual_target_achieved', width: 30 }, { header: 'Achieved status', key: 'achieved_status', width: 22 }, - { header: 'Reporting status', key: 'reporting_status', width: 22 } + { header: 'Reporting status', key: 'reporting_status', width: 22 }, + { header: 'Narrative', key: 'indicator_achieved_narrative', width: 50 }, + { header: 'Supporting results', key: 'indicator_supporting_results', width: 60 } ]; const wscolsWPs = [ @@ -40,7 +42,9 @@ export class OutcomeIndicatorHomeComponent { { header: 'Expected target', key: 'expected_target', width: 22 }, { header: 'Actual target achieved', key: 'actual_target_achieved', width: 30 }, { header: 'Achieved status', key: 'achieved_status', width: 22 }, - { header: 'Reporting status', key: 'reporting_status', width: 22 } + { header: 'Reporting status', key: 'reporting_status', width: 22 }, + { header: 'Narrative', key: 'indicator_achieved_narrative', width: 50 }, + { header: 'Supporting results', key: 'indicator_supporting_results', width: 60 } ]; this.exportTablesSE.exportOutcomesIndicatorsToExcel( diff --git a/onecgiar-pr-client/src/app/shared/services/export-tables.service.ts b/onecgiar-pr-client/src/app/shared/services/export-tables.service.ts index 88938bd54..91543e61c 100644 --- a/onecgiar-pr-client/src/app/shared/services/export-tables.service.ts +++ b/onecgiar-pr-client/src/app/shared/services/export-tables.service.ts @@ -235,6 +235,10 @@ export class ExportTablesService { indicatorType = `${prefix} ${data.indicators[0]?.indicator_name}`; } + const supportingResults = !data.indicators[0]?.indicator_supporting_results + ? 'Not defined' + : data.indicators[0]?.indicator_supporting_results.map(item => `• ${item.result_type} ${item.result_code} - ${item.result_title}`).join('\n'); + worksheet.addRow({ toc_result_title: data.toc_result_description ?? 'Not defined', indicator_name: data.indicators[0]?.indicator_description ?? 'Not defined', @@ -244,7 +248,9 @@ export class ExportTablesService { achieved_status: this.outcomeIService.achievedStatus(data.indicators[0]?.indicator_target_value, data.indicators[0]?.indicator_achieved_value) ? 'Yes' : 'No', - reporting_status: data.indicators[0]?.indicator_submission_status ? 'Submitted' : 'Editing' + reporting_status: data.indicators[0]?.indicator_submission_status ? 'Submitted' : 'Editing', + indicator_achieved_narrative: data.indicators[0]?.indicator_achieved_narrative ?? 'Not defined', + indicator_supporting_results: supportingResults }); } @@ -256,6 +262,9 @@ export class ExportTablesService { const prefix = indicator.is_indicator_custom ? 'Custom - ' : 'Standard - '; indicatorType = `${prefix} ${indicator.indicator_name}`; } + const supportingResults = !indicator.indicator_supporting_results + ? 'Not defined' + : indicator.indicator_supporting_results.map(item => `• ${item.result_type} ${item.result_code} - ${item.result_title}`).join('\n'); worksheet.addRow({ workpackage_name: `${data.workpackage_short_name}: ${data.workpackage_name}`, @@ -265,7 +274,9 @@ export class ExportTablesService { expected_target: indicator.indicator_target_value ?? 'Not defined', actual_target_achieved: indicator.indicator_achieved_value ?? 'Not defined', achieved_status: this.outcomeIService.achievedStatus(indicator.indicator_target_value, indicator.indicator_achieved_value) ? 'Yes' : 'No', - reporting_status: indicator.indicator_submission_status ? 'Submitted' : 'Editing' + reporting_status: indicator.indicator_submission_status ? 'Submitted' : 'Editing', + indicator_achieved_narrative: indicator.indicator_achieved_narrative ?? 'Not defined', + indicator_supporting_results: supportingResults }); }); }); diff --git a/onecgiar-pr-server/src/api/contribution-to-indicators/repositories/contribution-to-indicators.repository.ts b/onecgiar-pr-server/src/api/contribution-to-indicators/repositories/contribution-to-indicators.repository.ts index e789f68bb..a01af234b 100644 --- a/onecgiar-pr-server/src/api/contribution-to-indicators/repositories/contribution-to-indicators.repository.ts +++ b/onecgiar-pr-server/src/api/contribution-to-indicators/repositories/contribution-to-indicators.repository.ts @@ -54,10 +54,10 @@ export class ContributionToIndicatorsRepository extends Repository