From a4a7fbfc6146b6c80e1fb58b03678e875fefc418 Mon Sep 17 00:00:00 2001 From: Brett <43300357+MathesonBrett@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:28:00 -0700 Subject: [PATCH] Combining action items into one box --- .../ise-merit/ise-merit.component.html | 42 +++++++------------ .../reports/ise-merit/ise-merit.component.ts | 37 +++++++++++----- 2 files changed, 43 insertions(+), 36 deletions(-) diff --git a/CSETWebNg/src/app/reports/ise-merit/ise-merit.component.html b/CSETWebNg/src/app/reports/ise-merit/ise-merit.component.html index e03573374c..efe44ec71a 100644 --- a/CSETWebNg/src/app/reports/ise-merit/ise-merit.component.html +++ b/CSETWebNg/src/app/reports/ise-merit/ise-merit.component.html @@ -39,19 +39,10 @@
ncua
-
- +
{{this.demographics?.information?.assessment_Name}}
-
{{this.demographics?.information?.assessment_Date | - localizeDate}} -
+
{{this.demographics?.information?.assessment_Date | localizeDate}}
{{this.demographics?.information?.assessor_Name}}
@@ -243,6 +234,10 @@
+ Action Items:
@@ -253,16 +248,14 @@ (no Action Items available)
-
-
-
-
= new Map(); + // 12/3/24: Jon wants the action items all combined into one big paragraph. If he decided he doesn't want this + // in the future, just remove any code that references "combinedActionItems" it'll go back to the way it was. + combinedActionItems: Map = new Map(); + + // actionItemsMap: Map> = new Map>(); // finding_Id, // manualOrAutoMap: Map = new Map(); @@ -122,26 +127,39 @@ export class IseMeritComponent implements OnInit { this.acetSvc.getActionItemsReport(this.ncuaSvc.translateExamLevelToInt(examLevelString)).subscribe((findingData: any) => { this.actionData = findingData; + + let combinedCount = 1; for (let i = 0; i < this.actionData?.length; i++) { let actionItemRow = this.actionData[i]; - if (actionItemRow.action_Items != '') { //filters out 'deleted' action items + // filters out 'deleted' action items + if (actionItemRow.action_Items != '') { if (!this.masterActionItemsMap.has(actionItemRow.observation_Id)) { - this.masterActionItemsMap.set(actionItemRow.observation_Id, [actionItemRow]); - } else { + this.combinedActionItems.set(actionItemRow.observation_Id, ""); + combinedCount = 1; + } + else + { let tempActionArray = this.masterActionItemsMap.get(actionItemRow.observation_Id); - tempActionArray.push(actionItemRow); - this.masterActionItemsMap.set(actionItemRow.observation_Id, tempActionArray); + + let combinedText = this.combinedActionItems.get(actionItemRow.observation_Id); + combinedText += (combinedCount + ". " + actionItemRow.action_Items + " "); + this.combinedActionItems.set(actionItemRow.observation_Id, combinedText); + combinedCount++; + } } } - this.loadingCounter++; + console.log("this.combinedActionItems"); + console.log(this.combinedActionItems); + this.loadingCounter++; }); + this.loadingCounter++; this.acetSvc.getAssessmentInformation().subscribe( @@ -169,13 +187,12 @@ export class IseMeritComponent implements OnInit { for (let i = 0; i < sourceDocList?.length; i++) { if (!this.sourceFilesMap.has(observation.finding.finding_Id)) { - this.sourceFilesMap.set(observation.finding.finding_Id, [sourceDocList[i]]); - } else { + } + else + { let tempFileArray = this.sourceFilesMap.get(observation.finding.finding_Id); - tempFileArray.push(sourceDocList[i]); - this.sourceFilesMap.set(observation.finding.finding_Id, tempFileArray); } }