Skip to content

Commit

Permalink
Merge pull request #3520 from cisagov/feature/acet661
Browse files Browse the repository at this point in the history
Feature/acet661
  • Loading branch information
randywoods authored Sep 19, 2023
2 parents 7fad327 + dff44ac commit d1afd17
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h4>Organization Details</h4>

<div class="form-row">
<div class="form-group col-md-3">
<label class="mb-1" for="charter">Charter</label><span style="color:red; font-size: 12px;"> (Required)</span>
<label class="mb-1" for="charter">Charter</label>
<input type="text" (focus)="$event.target.select()" [maxlength]="5" class="form-control"
id="charter" name="charter" [(ngModel)]="assessment.charter" digitsOnly
[formControl]="assessmentCharterControl" [matAutocomplete]="autoCharter"
Expand All @@ -128,7 +128,8 @@ <h4>Organization Details</h4>
</div>

<div class="form-group">
<label class="mb-1" for="creditUnion">Credit Union Name</label><span style="color:red; font-size: 12px"> (Required)</span>
<label class="mb-1" for="creditUnion">Credit Union Name</label>
<span *ngIf="ncuaSvc.creditUnionName === '' || ncuaSvc.creditUnionName === null" style="color:red; font-size: 12px"> (Required)</span>
<input type="text" (focus)="$event.target.select()" maxlength="100" class="form-control"
id="creditUnion" name="creditUnion" [(ngModel)]="assessment.creditUnion"
[formControl]="assessmentControl" [matAutocomplete]="auto" (blur)="update($event)" tabindex="0">
Expand Down Expand Up @@ -165,7 +166,7 @@ <h4>Organization Details</h4>
<div class="form-row">
<div class="form-group col-md-6">
<span class="mb-1" for="assets">Assets </span>
<span style="color:red; font-size: 12px;">(Required)</span>
<span *ngIf="ncuaSvc.assetsAsNumber == 0" style="color:red; font-size: 12px;">(Required)</span>
<input type="text" maxlength="21" class="form-control" id="assets" name="assets" tabindex="0"
[(ngModel)]="assessment.assets" (blur)="updateAssets()" currencyMask [options]="{ align: 'left', allowNegative: false, precision: 0 }" >
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class AssessmentDetailNcuaComponent implements OnInit {
assessmentEffectiveDate: Date = new Date();

contactInitials: string = "";
lastModifiedTimestamp: string = "";
lastModifiedTimestamp: string = Date.now().toString();

assessmentControl = new UntypedFormControl('');
assessmentCharterControl = new UntypedFormControl('');
Expand Down Expand Up @@ -134,8 +134,12 @@ export class AssessmentDetailNcuaComponent implements OnInit {
this.assessSvc.getLastModified().subscribe((data: string) => {
let myArray = data.split(" ");
this.lastModifiedTimestamp = myArray[1];
});

// NCUA specifically asked for the ISE assessment name to update to the 'ISE format' as soon as the page loads.
// The time stamp (above) is the final piece of that format that is necessary, so we update the assess name here.
this.createAssessmentName();
});

}

/**
Expand All @@ -150,6 +154,7 @@ export class AssessmentDetailNcuaComponent implements OnInit {

this.assessSvc.getAssessmentContacts().then((response: any) => {
this.contactInitials = "_" + response.contactList[0].firstName;
this.createAssessmentName();
});

this.assessSvc.updateAssessmentDetails(this.assessment);
Expand Down Expand Up @@ -181,9 +186,6 @@ export class AssessmentDetailNcuaComponent implements OnInit {
this.assessment.assessmentDate = null;
this.assessmentEffectiveDate = null;
}

if (this.assessment.assessmentName === "New Assessment")
this.createAssessmentName();

}

Expand Down Expand Up @@ -216,13 +218,11 @@ export class AssessmentDetailNcuaComponent implements OnInit {
let i = 0;
while (i < this.creditUnionOptions.length) {
if (e.target.value == this.creditUnionOptions[i].name) {
console.log("Credit Union Name match found at: " + i);
this.populateAssessmentFields(i);
break;
}

if ((e.target.value.padStart(5, '0')) === (this.creditUnionOptions[i].charter.toString())) {
console.log("Charter Number match found at: " + i);
this.populateAssessmentFields(i);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,13 @@ <h4>ACET Reports</h4>
<div *ngIf="assessSvc.isISE() && !isMobile" class="d-flex flex-column justify-content-start align-items-start mb-4">
<h4>ISE Reports</h4>

<!-- Don't submit to MERIT without a CU name and charter! -->
<div *ngIf="ncuaSvc.creditUnionName == '' || ncuaSvc.creditUnionCharterNumber == '00000'">
<!-- Don't submit to MERIT without a Credit Union name or asset value above $0 -->
<div *ngIf="ncuaSvc.creditUnionName == '' || ncuaSvc.creditUnionName === null || ncuaSvc.assetsAsNumber == 0">
<div 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">
"Submit" button is disabled until a Credit Union Name and Charter Number have been entered.
</div>
"Submit" button is disabled until all required fields on the 'Assessment Configuration' page have been specified.
</div>
</div>
</div>

Expand Down Expand Up @@ -597,7 +597,7 @@ <h4>Pipeline Security Directive (SD02-Series)</h4>
<button class="btn btn-primary" aria-label="Submit" (click)="ncuaSvc.submitToMerit(this.findings)" tabindex="0"
[disabled]="(disableIseReportLinks && !assessSvc.assessment.isE_StateLed) ||
(ncuaSvc.switchStatus && ncuaSvc.creditUnionName == '') ||
(ncuaSvc.switchStatus && ncuaSvc.creditUnionCharterNumber == '00000') ||
(ncuaSvc.switchStatus && ncuaSvc.assetsAsNumber == 0) ||
ncuaSvc.unassignedIssues ||
ncuaSvc.submitInProgress">
Submit
Expand Down

0 comments on commit d1afd17

Please sign in to comment.