Skip to content

Commit

Permalink
Fixing ISE reports to show all regulatory citations
Browse files Browse the repository at this point in the history
  • Loading branch information
MathesonBrett committed Feb 7, 2025
1 parent 3fb5d2c commit 05f362c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,36 +308,18 @@
<br>
<strong> Sub-Risk Area: </strong> {{ observation?.finding?.sub_Risk }}
<br>
<strong> Regulatory Citation: </strong>
<strong>Regulatory Citation: </strong>
<br>
<span *ngIf="regCitationsMap.has(observation?.question?.mat_Question_Id)">
<label class="btn form-check-label btn-copy" style="text-align: right; font-weight: normal; font-size: 14px;
flex-direction: column; line-height: 150%;" title="Copy to Clipboard"
[cdkCopyToClipboard]="getReferenceCopyText(observation?.question?.mat_Question_Id)">
<span class="cset-icons-copy"></span>
</label>
{{ regCitationsMap.get(observation?.question?.mat_Question_Id) }}
</span>
<span *ngIf="!regCitationsMap.has(observation?.question?.mat_Question_Id)">(No Regulatory Citations available)</span>
<br>
<div *ngIf="this.masterActionItemsMap.has(observation?.finding?.finding_Id)">
<div *ngIf="observation?.finding?.citations != null && observation?.finding?.citations != ''">
{{
(this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation
== null
||
this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation
== '') ?
' ' :
this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation
+ ', ' }}{{ observation?.finding?.citations }}
</div>
<div *ngIf="(observation?.finding?.citations == null || observation?.finding?.citations == '')
&& this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation != null
&& this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation != ''">
{{
this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation
}}
</div>
<div *ngIf="(this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation == null
|| this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation == '')
&& (observation?.finding?.citations == null || observation?.finding?.citations == '')">
(no Regulatory Citations available)
</div>
</div>
<div *ngIf="!this.masterActionItemsMap.has(observation?.finding?.finding_Id)">
(no Regulatory Citations available)
</div>
</div>

<div *ngIf="observation?.finding?.type === 'Supplemental Fact'">
Expand Down
74 changes: 13 additions & 61 deletions CSETWebNg/src/app/reports/ise-merit/ise-merit.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-------------------------->
<div *ngIf="!loading">
<div class="report-body mb-5">
<div class="report-body mb-5">

<div class="flex-container">
<div class="column mt-3">
Expand Down Expand Up @@ -291,64 +290,18 @@
<br>
<strong>Regulatory Citation: </strong>
<br>
<div *ngIf="this.masterActionItemsMap.has(observation?.finding?.finding_Id)">
<div
*ngIf="observation?.finding?.citations != null && observation?.finding?.citations != ''">
<label class="btn form-check-label btn-copy" style="text-align: right; font-weight: normal;font-size: 14px;
flex-direction: column; line-height: 150%;"
title="Copy to Clipboard"
[cdkCopyToClipboard]="((this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation == null
|| this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation == '') ?
' ' : this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation + ', ') + observation?.finding?.citations">
<span class="cset-icons-copy"></span>
</label>
{{
(this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation
== null
||
this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation
== '') ?
' ' :
this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation
+ ', ' }}{{ observation?.finding?.citations }}
</div>
<div
*ngIf="(observation?.finding?.citations == null || observation?.finding?.citations == '')
&& this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation != null
&& this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation != ''">
<label class="btn form-check-label btn-copy" style="text-align: right; font-weight: normal;font-size: 14px;
flex-direction: column; line-height: 150%;"
title="Copy to Clipboard"
[cdkCopyToClipboard]="this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation">
<span class="cset-icons-copy"></span>
</label>
{{
this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation
}}
</div>
<div
*ngIf="(this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation == null
|| this.masterActionItemsMap.get(observation?.finding?.finding_Id)[0].regulatory_Citation == '')
&& (observation?.finding?.citations == null || observation?.finding?.citations == '')">
<label class="btn form-check-label btn-copy" style="text-align: right; font-weight: normal;font-size: 14px;
flex-direction: column; line-height: 150%;"
title="Copy to Clipboard"
[cdkCopyToClipboard]="'(no Regulatory Citations available)'">
<span class="cset-icons-copy"></span>
</label>
(no Regulatory Citations available)
</div>
</div>
<div *ngIf="!this.masterActionItemsMap.has(observation?.finding?.finding_Id)">
<label class="btn form-check-label btn-copy" style="text-align: right; font-weight: normal;font-size: 14px;
flex-direction: column; line-height: 150%;" title="Copy to Clipboard"
[cdkCopyToClipboard]="'(no Regulatory Citations available)'">
<span *ngIf="regCitationsMap.has(observation?.question?.mat_Question_Id)">
<label class="btn form-check-label btn-copy" style="text-align: right; font-weight: normal; font-size: 14px;
flex-direction: column; line-height: 150%;" title="Copy to Clipboard"
[cdkCopyToClipboard]="getReferenceCopyText(observation?.question?.mat_Question_Id)">
<span class="cset-icons-copy"></span>
</label>
(no Regulatory Citations available)
</div>

{{ regCitationsMap.get(observation?.question?.mat_Question_Id) }}
</span>
<span *ngIf="!regCitationsMap.has(observation?.question?.mat_Question_Id)">(No Regulatory Citations available)</span>
<br>
</div>

<div *ngIf="observation?.finding?.type === 'Supplemental Fact'">
<label class="btn form-check-label btn-copy" style="text-align: right; font-weight: normal; font-size: 14px;
flex-direction: column; line-height: 150%;" title="Copy to Clipboard"
Expand All @@ -359,9 +312,9 @@
<strong> Supplemental Fact: </strong>
<br>
<span *ngIf="observation?.finding?.supp_Guidance != ''" style="white-space: pre-wrap;"
[innerHtml]="observation?.finding?.supp_Guidance"></span>
<span *ngIf="observation?.finding?.supp_Guidance == ''">(no Supplemental Fact
available)</span>
[innerHtml]="observation?.finding?.supp_Guidance">
</span>
<span *ngIf="observation?.finding?.supp_Guidance == ''">(no Supplemental Fact available)</span>

<br>
<!-- <label class="btn form-check-label btn-copy" style="text-align: right; font-weight: normal; font-size: 14px;
Expand Down Expand Up @@ -411,5 +364,4 @@
</div>
</ng-template>
</div>
</div>
</div>
9 changes: 1 addition & 8 deletions CSETWebNg/src/app/reports/ise-merit/ise-merit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export class IseMeritComponent implements OnInit {
this.loadingCounter++;
});

this.loadingCounter++;

this.acetSvc.getAssessmentInformation().subscribe(
(r: any) => {
Expand Down Expand Up @@ -209,9 +210,6 @@ export class IseMeritComponent implements OnInit {
}
this.relaventIssues = true;

if (i == this.response?.length - 1) {
this.finishLoading(true);
}
})
}
}
Expand Down Expand Up @@ -241,11 +239,6 @@ export class IseMeritComponent implements OnInit {
});
}

finishLoading(doneLoading: boolean) {
if (doneLoading) {
this.loading = false;
}
}

getActionItemsToCopy(findingId: any) {
let combinedText = "";
Expand Down

0 comments on commit 05f362c

Please sign in to comment.