Skip to content

Commit

Permalink
Merge pull request #3739 from cisagov/feature/acet774
Browse files Browse the repository at this point in the history
Feature/acet774
  • Loading branch information
randywoods authored Feb 12, 2024
2 parents f42d745 + fa19232 commit 2ba6fae
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 306 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ public int UpdateObservation(Observation observation)
/// </summary>
public List<ActionItems> GetActionItems(int parentId, int observation_id)
{
var actionItems = new List<ActionItems>(
var actionItems = new List<ActionItems>();

);
var table = from questions in _context.MATURITY_QUESTIONS
join actions in _context.ISE_ACTIONS on questions.Mat_Question_Id equals actions.Mat_Question_Id
join o in _context.ISE_ACTIONS_FINDINGS on new { Mat_Question_Id = questions.Mat_Question_Id, Finding_Id = observation_id }
equals new { Mat_Question_Id = o.Mat_Question_Id, Finding_Id = o.Finding_Id }
into overrides
from o in overrides.DefaultIfEmpty()
orderby questions.Mat_Question_Id ascending
where questions.Parent_Question_Id == parentId
select new { actions = actions, overrides = o };
foreach (var row in table.ToList())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ export class MergeExaminationsComponent implements OnInit {
this.questionSvc.getDetails(parentId, 'Maturity').subscribe(
(details) => {
let myIssues = [];
details.findings.forEach(find => {
myIssues.push(find);
details.observations.forEach(obs => {
myIssues.push(obs);
});

if (myIssues.length > 0) {
Expand Down Expand Up @@ -350,13 +350,13 @@ export class MergeExaminationsComponent implements OnInit {
issueArray.forEach((issue, index) => {
let actionItemsOverride: ActionItemText[] = [];

this.questionSvc.getActionItems(parentKey, issue.finding_Id).subscribe((data: any) => {
this.questionSvc.getActionItems(parentKey, issue.observation_Id).subscribe((data: any) => {

for (let i = 0; i < data.length; i++) {
actionItemsOverride.push({ Mat_Question_Id: data[i].question_Id, ActionItemOverrideText: data[i].action_Items });
}

issue.finding_Id = 0;
issue.observation_Id = 0;
issue.answer_Id = this.newAnswerIds.get(parentKey);

this.observationSvc.saveObservation(issue).subscribe((response: any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<span class="p-md-3 p-2 fs-medium cset-icons-exclamation-triangle"></span>
<span class="fs-base-2 p-2 d-flex flex-column justify-content-center flex-11a">

<div class="mt-2 mr-4">Some reports are disabled until all issues are resolved</div>
<br />

<div class="mt-2 mr-4" *ngIf="!isAssessmentPageFilled()">
The following required fields are missing from the "Demographics" page:
<ul class="list-type">
Expand Down Expand Up @@ -110,286 +113,4 @@
</div>
</div>
</div>
</div>




<!--
<div *ngIf="disableIseReportLinks || ncuaSvc.unassignedIssues
|| (!isAssessmentPageFilled() && !assessSvc.assessment.isE_StateLed); else readyToSubmit"
class="alert-warning mt-2 mb-2 d-flex flex-row justify-content-center align-items-center flex-11a ng-star-inserted">
<span class="p-md-3 p-2 fs-medium cset-icons-exclamation-triangle"></span>
Don't submit to MERIT without a Credit Union name or asset value above $0
If state-led, we don't care about the submit button, because it's hidden
<span *ngIf="!isAssessmentPageFilled()" class="fs-base-2 p-2 d-flex flex-column justify-content-center flex-11a">
<div class="!ncuaSvc.isE_StateLed">
<span class="mt-2 mr-4" *ngIf="!disableIseReportLinks && !ncuaSvc.unassignedIssues">
"Submit" button is disabled until all required fields on <br>the
"Demographics" page have been specified.
<br><br>
<span>The following required fields are missing from the "Demographics" page:</span>
<ul class="list-type">
<span *ngFor="let field of missingFields; let i = index">
<li>{{ field }}</li>
</span>
</ul>
</span>
</div>
<div class="ncuaSvc.isE_StateLed">
<span class="mt-2 mr-4" *ngIf="!disableIseReportLinks && !ncuaSvc.unassignedIssues">
<span>The following required fields are missing from the "Demographics" page:</span>
<ul class="list-type">
<span *ngFor="let field of missingFields; let i = index">
<li>{{ field }}</li>
</span>
</ul>
</span>
</div>
<span *ngIf="disableIseReportLinks">
have all 3 types of warnings
<span *ngIf="ncuaSvc.unassignedIssues"><br />
non-state-led
<span *ngIf="!assessSvc.assessment.isE_StateLed">
"Submit" button and some reports are disabled until
<ul class="list-type">
<li>all required fields on the "Demographics" page have been specified,</li>
<li>all statements have been answered, and</li>
<li>all Issues have an "Issue Type" assigned.</li>
</ul>
<br>
<span>The following required fields are missing from the "Demographics" page:</span>
<ul class="list-type">
<span *ngFor="let field of missingFields; let i = index">
<li>{{ field }}</li>
</span>
</ul>
</span>
state-led
<span class="mt-2 mr-4" *ngIf="assessSvc.assessment.isE_StateLed">
<span>The following required fields are missing from the "Demographics" page:</span>
<ul class="list-type">
<span *ngFor="let field of missingFields; let i = index">
<li>{{ field }}</li>
</span>
</ul>
There are unanswered statements. Some domains will be incomplete.
<br /><br />
Some reports are disabled until all Issues have
an "Issue Type" assigned.<br /><br />
</span>
singular
<span *ngIf="ncuaSvc.unassignedIssueTitles.length == 1">
Assign an "Issue Type" to the following issue which was
<br />generated on the "Statements" page:
</span>
plural
<span *ngIf="ncuaSvc.unassignedIssueTitles.length > 1">
Assign an "Issue Type" to the following issues which were
<br />generated on the "Statements" page:
</span>
<ul class="list-type">
<span *ngFor="let title of ncuaSvc.unassignedIssueTitles; let i = index">
<li>{{ title }}</li>
</span>
</ul>
</span>
Assessment Config and Unanswered Statements
<span *ngIf="!ncuaSvc.unassignedIssues">
non-state-led
<span *ngIf="!assessSvc.assessment.isE_StateLed">
<br />"Submit" button and some reports are disabled until
<ul class="list-type">
<li>all required fields on the "Demographics" page have been specified and</li>
<li>all statements have been answered.</li>
</ul>
<br>
<span>The following required fields are missing from the "Demographics" page:</span>
<ul class="list-type">
<span *ngFor="let field of missingFields; let i = index">
<li>{{ field }}</li>
</span>
</ul>
</span>
state-led
<span *ngIf="assessSvc.assessment.isE_StateLed">
<span class="mt-2 mr-4">
<span>The following required fields are missing from the "Demographics" page:</span>
<ul class="list-type">
<span *ngFor="let field of missingFields; let i = index">
<li>{{ field }}</li>
</span>
</ul>
There are unanswered statements. Some domains will be incomplete.
</span>
</span>
</span>
</span>
</span>
<span *ngIf="disableIseReportLinks && !ncuaSvc.unassignedIssues && isAssessmentPageFilled()">
Submit and reports disabled because unanswered statements
<span *ngIf="!assessSvc.assessment.isE_StateLed && isAssessmentPageFilled(); else stateLedUnanswered"
class="fs-base-2 p-2 d-flex flex-column justify-content-center flex-11a">
"Submit" button and some reports are disabled until all statements have been answered.
</span>
can get here in the case it's state-led and isAssessmentPageFilled() is false
<span *ngIf="assessSvc.assessment.isE_StateLed"
class="fs-base-2 p-2 d-flex flex-column justify-content-center flex-11a">
<span class="mt-2 mr-4">
<span>The following required fields are missing from the "Demographics" page:</span>
<ul class="list-type">
<span *ngFor="let field of missingFields; let i = index">
<li>{{ field }}</li>
</span>
</ul>
There are unanswered statements. Some domains will be incomplete.
</span>
</span>
</span>
only Issue Type warning
<span *ngIf="(!disableIseReportLinks && ncuaSvc.unassignedIssues) && isAssessmentPageFilled()"
class="fs-base-2 p-2 d-flex flex-column justify-content-center flex-11a">
non-state-led
<span *ngIf="!assessSvc.assessment.isE_StateLed">
<br />"Submit" button and some reports are disabled until all
Issues have an "Issue Type" assigned.<br /><br />
</span>
state-led
<span *ngIf="assessSvc.assessment.isE_StateLed">
<br />Some reports are disabled until all
Issues have an "Issue Type" assigned.<br /><br />
</span>
singular
<span *ngIf="ncuaSvc.unassignedIssueTitles.length == 1">
Assign an "Issue Type" to the following issue which was
<br />generated on the "Statements" page:
</span>
plural
<span *ngIf="ncuaSvc.unassignedIssueTitles.length > 1">
Assign an "Issue Type" to the following issues which were
<br />generated on the "Statements" page:
</span>
<ul class="list-type">
<span *ngFor="let title of ncuaSvc.unassignedIssueTitles; let i = index">
<li>{{ title }}</li>
</span>
</ul>
</span>
Unanswered Statements and Issue Types (also with state-led and Issue Type)
<span *ngIf="ncuaSvc.unassignedIssues && disableIseReportLinks && isAssessmentPageFilled()"
class="fs-base-2 p-2 d-flex flex-column justify-content-center flex-11a"><br />
Unanswered and Issue Type for non-state-led
<span *ngIf="!assessSvc.assessment.isE_StateLed">
"Submit" button and some reports are disabled until
<ul class="list-type">
<li>all statements have been answered and</li>
<li>all Issues have an "Issue Type" assigned.</li>
</ul>
</span>
Unanswered and Issue Type for state-led
<span *ngIf="assessSvc.assessment.isE_StateLed">
There are unanswered statements. Some domains will be incomplete.
<br /><br />
Some reports are disabled until all Issues have
an "Issue Type" assigned.<br /><br />
</span>
singular
<span *ngIf="ncuaSvc.unassignedIssueTitles.length == 1">
Assign an "Issue Type" to the following issue which was
<br />generated on the "Statements" page:
</span>
plural
<span *ngIf="ncuaSvc.unassignedIssueTitles.length > 1">
Assign an "Issue Type" to the following issues which were
<br />generated on the "Statements" page:
</span>
<ul class="list-type">
<span *ngFor="let title of ncuaSvc.unassignedIssueTitles; let i = index">
<li>{{ title }}</li>
</span>
</ul>
</span>
Assessment Config and Issue Types
<span *ngIf="!isAssessmentPageFilled() && ncuaSvc.unassignedIssues && !disableIseReportLinks"
class="fs-base-2 p-2 d-flex flex-column justify-content-center flex-11a"><br />
Assessment Config and Issue Type for non-state-led
<span *ngIf="!assessSvc.assessment.isE_StateLed">
"Submit" button and some reports are disabled until
<ul class="list-type">
<li>all required fields on the "Demographics" page have been specified and</li>
<li>all Issues have an "Issue Type" assigned.</li>
</ul>
<br>
<span>The following required fields are missing from the "Demographics" page:</span>
<ul class="list-type">
<span *ngFor="let field of missingFields; let i = index">
<li>{{ field }}</li>
</span>
</ul>
<br>
</span>
Unanswered and Issue Type for state-led
<span *ngIf="assessSvc.assessment.isE_StateLed">
<span class="mt-2 mr-4">
<span>The following required fields are missing from the "Demographics" page:</span>
<ul class="list-type">
<span *ngFor="let field of missingFields; let i = index">
<li>{{ field }}</li>
</span>
</ul>
</span><br>
Some reports are disabled until all Issues have
an "Issue Type" assigned<br /><br />
</span>
singular
<span *ngIf="ncuaSvc.unassignedIssueTitles.length == 1">
Assign an "Issue Type" to the following issue which was
<br />generated on the "Statements" page:
</span>
plural
<span *ngIf="ncuaSvc.unassignedIssueTitles.length > 1">
Assign an "Issue Type" to the following issues which were
<br />generated on the "Statements" page:
</span>
<ul class="list-type">
<span *ngFor="let title of ncuaSvc.unassignedIssueTitles; let i = index">
<li>{{ title }}</li>
</span>
</ul>
</span>
</div>
If no warnings exist that disable the "Submit" button, check if it has already been submitted
(or if it's state-led and doesn't need a reminder to submit)
<ng-template #readyToSubmit>
<div *ngIf="(!iseHasBeenSubmitted && !ncuaSvc.iseHasBeenSubmitted) && !ncuaSvc.ISE_StateLed"
class="alert-warning mt-2 mb-2 d-flex flex-row justify-content-center align-items-center flex-11a ng-star-inserted">
<span class="p-md-3 p-2 fs-medium cset-icons-exclamation-triangle"></span>
<div class="fs-base-2 p-2 d-flex flex-column justify-content-center flex-11a">
This assessment has not been submitted yet. If this assessment is complete, please click submit.
</div>
</div>
</ng-template>
-->
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -298,39 +298,31 @@ <h4>{{ t('acet.acet reports') }}</h4>
</div>

<div *ngIf="assessSvc.isISE() && !isMobile" class="d-flex flex-column justify-content-start align-items-start mb-4">
<!-- <div *ngIf="assessSvc.isISE() && !isMobile"
class="d-flex flex-column justify-content-start align-items-start mb-4"> -->
<h4>ISE Reports</h4>

<app-ise-warnings [iseHasBeenSubmitted]="iseHasBeenSubmitted"
[disableIseReportLinks]="disableIseReportLinks"></app-ise-warnings>
<app-ise-warnings [iseHasBeenSubmitted]="iseHasBeenSubmitted" [disableIseReportLinks]="disableIseReportLinks"></app-ise-warnings>

<button (click)="clickReportLink('isemerit')" tabindex="0" class="btn btn-link btn-link-dark text-left"
[disabled]="
(disableIseReportLinks && !assessSvc.assessment.isE_StateLed) ||
this.ncuaSvc.unassignedIssues
">
[disabled]="disableIseReportLinks || this.ncuaSvc.unassignedIssues">
ISE MERIT SCOPE REPORT (copy paste to Execution Result)
</button>

<button (click)="clickReportLink('iseexamination')" tabindex="0" class="btn btn-link btn-link-dark text-left"
[disabled]="
(disableIseReportLinks && !assessSvc.assessment.isE_StateLed) ||
this.ncuaSvc.unassignedIssues
">
[disabled]="disableIseReportLinks || this.ncuaSvc.unassignedIssues">
ISE EXAMINATION REPORT (attach as Document in Scope Task)
</button>
<button (click)="clickReportLink('iseansweredquestions')" tabindex="0"
class="btn btn-link btn-link-dark text-left">

<button (click)="clickReportLink('iseansweredquestions')" tabindex="0" class="btn btn-link btn-link-dark text-left">
ISE Answered Statements
</button>

<button (click)="clickReportLink('iseexaminer')" tabindex="0" class="btn btn-link btn-link-dark text-left">
ISE Examiner Notes
</button>

<div *ngIf="this.ncuaSvc.submitInProgress" class="spinner-container" style="margin: 2em auto">
<div style="max-width: 50px; max-height: 50px"></div>
</div>
<!-- </div> -->
</div>

<div *ngIf="
Expand Down
Loading

0 comments on commit 2ba6fae

Please sign in to comment.