diff --git a/CSETWebNg/src/app/assessment/questions/issues/issues.component.html b/CSETWebNg/src/app/assessment/questions/issues/issues.component.html index 889738b867..8741f7e898 100644 --- a/CSETWebNg/src/app/assessment/questions/issues/issues.component.html +++ b/CSETWebNg/src/app/assessment/questions/issues/issues.component.html @@ -38,7 +38,7 @@

Issues

+ [(ngModel)]="observation.title">
@@ -46,7 +46,7 @@

Issues

* (required) - @@ -55,19 +55,19 @@

Issues

-
+
+ [(ngModel)]="observation.risk_Area">
+ [(ngModel)]="observation.sub_Risk">
@@ -76,32 +76,32 @@

Issues

+ [(ngModel)]="observation.description">
- +
+ [(ngModel)]="observation.supp_Guidance">
- -
+ +
+ [(ngModel)]="observation.actionItems">
-
+

Items marked in red indicate a higher level of risk

@@ -146,7 +146,7 @@

Issues

+ [(ngModel)]="observation.citations">
@@ -155,7 +155,7 @@

Issues

- diff --git a/CSETWebNg/src/app/assessment/questions/question-block-ise/question-block-ise.component.html b/CSETWebNg/src/app/assessment/questions/question-block-ise/question-block-ise.component.html index 2c4e6ea984..78f540994f 100644 --- a/CSETWebNg/src/app/assessment/questions/question-block-ise/question-block-ise.component.html +++ b/CSETWebNg/src/app/assessment/questions/question-block-ise/question-block-ise.component.html @@ -199,27 +199,27 @@ -
Issue {{ i+1 }}
-
{{find.title}}
+
{{obs.title}}
-
Yes
-
-
+
Yes
+
-
diff --git a/CSETWebNg/src/app/assessment/questions/question-block-ise/question-block-ise.component.ts b/CSETWebNg/src/app/assessment/questions/question-block-ise/question-block-ise.component.ts index 931eba3c67..55dc411aec 100644 --- a/CSETWebNg/src/app/assessment/questions/question-block-ise/question-block-ise.component.ts +++ b/CSETWebNg/src/app/assessment/questions/question-block-ise/question-block-ise.component.ts @@ -131,16 +131,16 @@ export class QuestionBlockIseComponent implements OnInit { this.extras = details; this.extras.questionId = this.myGrouping.questions[0].questionId; - this.extras.observations.forEach(find => { - if (find.auto_Generated === 1) { - find.question_Id = this.myGrouping.questions[0].questionId; + this.extras.observations.forEach(obs => { + if (obs.auto_Generated === 1) { + obs.question_Id = this.myGrouping.questions[0].questionId; // This is a check for post-merging ISE assessments. // If an issue existed, but all answers were changed to "Yes" on merge, delete the issue. - if (this.ncuaSvc.questionCheck.get(find.question_Id) !== undefined) { - this.ncuaSvc.issueFindingId.set(find.question_Id, find.observation_Id); + if (this.ncuaSvc.questionCheck.get(obs.question_Id) !== undefined) { + this.ncuaSvc.issueObservationId.set(obs.question_Id, obs.observation_Id); } else { - this.deleteIssue(find.observation_Id, true); + this.deleteIssue(obs.observation_Id, true); } } @@ -225,15 +225,15 @@ export class QuestionBlockIseComponent implements OnInit { }); } - deleteIssueMaps(findingId: number) { - const iterator = this.ncuaSvc.issueFindingId.entries(); + deleteIssueMaps(observation: number) { + const iterator = this.ncuaSvc.issueObservationId.entries(); let parentKey = 0; for (let value of iterator) { - if (value[1] === findingId) { + if (value[1] === observation) { parentKey = value[0]; this.ncuaSvc.questionCheck.delete(parentKey); - this.ncuaSvc.issueFindingId.delete(parentKey); + this.ncuaSvc.issueObservationId.delete(parentKey); this.ncuaSvc.deleteHistory.add(parentKey); } } @@ -338,7 +338,7 @@ export class QuestionBlockIseComponent implements OnInit { value++; this.ncuaSvc.questionCheck.set(q.parentQuestionId, value); - if (value >= 1 && !this.ncuaSvc.issueFindingId.has(q.parentQuestionId)) { + if (value >= 1 && !this.ncuaSvc.issueObservationId.has(q.parentQuestionId)) { if (!this.ncuaSvc.deleteHistory.has(q.parentQuestionId)) { this.autoGenerateIssue(q.parentQuestionId, 0); } @@ -348,10 +348,10 @@ export class QuestionBlockIseComponent implements OnInit { if (value < 1) { this.ncuaSvc.questionCheck.delete(q.parentQuestionId); - if (this.ncuaSvc.issueFindingId.has(q.parentQuestionId)) { - let findId = this.ncuaSvc.issueFindingId.get(q.parentQuestionId); - this.ncuaSvc.issueFindingId.delete(q.parentQuestionId); - this.deleteIssue(findId, true); + if (this.ncuaSvc.issueObservationId.has(q.parentQuestionId)) { + let observationId = this.ncuaSvc.issueObservationId.get(q.parentQuestionId); + this.ncuaSvc.issueObservationId.delete(q.parentQuestionId); + this.deleteIssue(observationId, true); } } else { this.ncuaSvc.questionCheck.set(q.parentQuestionId, value); @@ -741,9 +741,9 @@ export class QuestionBlockIseComponent implements OnInit { /** * - * @param findid + * @param observationid */ - addEditIssue(parentId, findid) { + addEditIssue(parentId, observationId) { /* * Per the customer's requests, an Issue's title should include the main * grouping header text and the sub grouping header text. @@ -758,11 +758,11 @@ export class QuestionBlockIseComponent implements OnInit { name = ("Cybersecurity Controls, " + this.myGrouping.title); } - const find: Observation = { + const observation: Observation = { question_Id: parentId, questionType: this.myGrouping.questions[0].questionType, answer_Id: this.myGrouping.questions[0].answer_Id, - observation_Id: findid, + observation_Id: observationId, summary: '', observation_Contacts: null, impact: '', @@ -784,28 +784,28 @@ export class QuestionBlockIseComponent implements OnInit { }; this.dialog.open(IssuesComponent, { - data: find, + data: observation, disableClose: true, }).afterClosed().subscribe(result => { let stringResult = result.toString(); if (stringResult != 'true') { - find.observation_Id = result; + observation.observation_Id = result; - this.observationSvc.saveObservation(find, true).subscribe((r: any) => { + this.observationSvc.saveObservation(observation, true).subscribe((r: any) => { this.myGrouping.questions[0].hasObservation = (this.extras.observations.length > 0); - this.myGrouping.questions[0].answer_Id = find.answer_Id; + this.myGrouping.questions[0].answer_Id = observation.answer_Id; }); } else { - const answerID = find.answer_Id; + const answerID = observation.answer_Id; // if (result == true) { this.observationSvc.getAllObservations(answerID).subscribe( (response: Observation[]) => { this.extras.observations = response; this.myGrouping.questions[0].hasObservation = (this.extras.observations.length > 0); - this.myGrouping.questions[0].answer_Id = find.answer_Id; + this.myGrouping.questions[0].answer_Id = observation.answer_Id; } ), @@ -816,20 +816,19 @@ export class QuestionBlockIseComponent implements OnInit { } - isIssueEmpty(finding: Observation) { - if (finding.actionItems == null - && finding.citations == null - && finding.description == null - && finding.issue == null - && finding.type == null) { + isIssueEmpty(observation: Observation) { + if (observation.actionItems == null + && observation.citations == null + && observation.description == null + && observation.issue == null + && observation.type == null) { return true; } return false; } // ISE "issues" should be generated if an examiner answers 'No' to - // 2 or more important questions with no popup. - autoGenerateIssue(parentId, findId) { + autoGenerateIssue(parentId, observationId) { let name = ""; let desc = ""; @@ -839,16 +838,16 @@ export class QuestionBlockIseComponent implements OnInit { name = ("Cybersecurity Controls, " + this.myGrouping.title); } - this.questionsSvc.getActionItems(parentId, findId).subscribe( + this.questionsSvc.getActionItems(parentId, observationId).subscribe( (data: any) => { // Used to generate a description for ISE reports even if a user doesn't open the issue. desc = data[0]?.description; - const find: Observation = { + const obs: Observation = { question_Id: parentId, questionType: this.myGrouping.questions[0].questionType, answer_Id: this.myGrouping.questions[0].answer_Id, - observation_Id: findId, + observation_Id: observationId, summary: '', observation_Contacts: null, impact: '', @@ -869,20 +868,20 @@ export class QuestionBlockIseComponent implements OnInit { supp_Guidance: null }; - this.ncuaSvc.issueFindingId.set(parentId, findId); + this.ncuaSvc.issueObservationId.set(parentId, observationId); - this.observationSvc.saveObservation(find).subscribe(() => { - const answerID = find.answer_Id; + this.observationSvc.saveObservation(obs).subscribe(() => { + const answerID = obs.answer_Id; this.observationSvc.getAllObservations(answerID).subscribe( (response: Observation[]) => { for (let i = 0; i < response.length; i++) { if (response[i].auto_Generated === 1) { - this.ncuaSvc.issueFindingId.set(parentId, response[i].observation_Id); + this.ncuaSvc.issueObservationId.set(parentId, response[i].observation_Id); } } this.extras.observations = response; this.myGrouping.questions[0].hasObservation = (this.extras.observations.length > 0); - this.myGrouping.questions[0].answer_Id = find.answer_Id; + this.myGrouping.questions[0].answer_Id = obs.answer_Id; }, error => console.log('Error updating observations | ' + (error).message) ); diff --git a/CSETWebNg/src/app/assessment/results/reports/ise-warnings/ise-warnings.component.html b/CSETWebNg/src/app/assessment/results/reports/ise-warnings/ise-warnings.component.html index 293f805ace..e964df7ca9 100644 --- a/CSETWebNg/src/app/assessment/results/reports/ise-warnings/ise-warnings.component.html +++ b/CSETWebNg/src/app/assessment/results/reports/ise-warnings/ise-warnings.component.html @@ -20,32 +20,141 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------> + +
+
+
+ + + +
+ The following required fields are missing from the "Demographics" page: +
    + +
  • {{ field }}
  • +
    +
+
+ +
+ There are unanswered statements. Some domains will be incomplete. +

+
+ +
+ Some reports are disabled until all Issues have + an "Issue Type" assigned.

+ + Assign an "Issue Type" to the following issues which were +
generated on the "Statements" page: +
    + +
  • {{ title }}
  • +
    +
+
+ +
+
+
+
+ + +
+
+
+ + + +
"Submit" button and some reports are disabled until all issues are resolved
+
+ +
+ The following required fields are missing from the "Demographics" page: +
    + +
  • {{ field }}
  • +
    +
+
+ +
+ There are unanswered examination statements that need to be answered. +

+
+ +
+ All Issues require an "Issue Type" to be assigned. Assign an "Issue Type"
+ to the following issues which were generated on the "Statements" page: +
    + +
  • {{ title }}
  • +
    +
+
+ +
+
+
+
+ + +
+
+
+
+ +
+ This assessment has not been submitted yet. If this assessment is complete, please click submit. +
+
+
+
+
+ + + + + + 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 - - "Submit" button is disabled until all required fields on
the - "Demographics" page have been specified. -

- The following required fields are missing from the "Demographics" page: -
    - -
  • {{ field }}
  • -
    -
-
+
+ + "Submit" button is disabled until all required fields on
the + "Demographics" page have been specified. +

+ The following required fields are missing from the "Demographics" page: +
    + +
  • {{ field }}
  • +
    +
+
+
+ +
+ + The following required fields are missing from the "Demographics" page: +
    + +
  • {{ field }}
  • +
    +
+
+
- + have all 3 types of warnings
- + non-state-led "Submit" button and some reports are disabled until
    @@ -61,20 +170,27 @@
- - + state-led + + The following required fields are missing from the "Demographics" page: +
    + +
  • {{ field }}
  • +
    +
+ There are unanswered statements. Some domains will be incomplete.

Some reports are disabled until all Issues have an "Issue Type" assigned.

- + singular Assign an "Issue Type" to the following issue which was
generated on the "Statements" page:
- + plural Assign an "Issue Type" to the following issues which were
generated on the "Statements" page: @@ -86,9 +202,9 @@
- + Assessment Config and Unanswered Statements - + non-state-led
"Submit" button and some reports are disabled until
    @@ -103,9 +219,17 @@
- + state-led + + The following required fields are missing from the "Demographics" page: +
    + +
  • {{ field }}
  • +
    +
There are unanswered statements. Some domains will be incomplete. +
@@ -113,40 +237,47 @@
- + Submit and reports disabled because unanswered statements "Submit" button and some reports are disabled until all statements have been answered. - + can get here in the case it's state-led and isAssessmentPageFilled() is false + + The following required fields are missing from the "Demographics" page: +
    + +
  • {{ field }}
  • +
    +
There are unanswered statements. Some domains will be incomplete. +
- + only Issue Type warning - + non-state-led
"Submit" button and some reports are disabled until all Issues have an "Issue Type" assigned.

- + state-led
Some reports are disabled until all Issues have an "Issue Type" assigned.

- + singular Assign an "Issue Type" to the following issue which was
generated on the "Statements" page:
- + plural Assign an "Issue Type" to the following issues which were
generated on the "Statements" page: @@ -158,10 +289,10 @@
- + Unanswered Statements and Issue Types (also with state-led and Issue Type)
- + Unanswered and Issue Type for non-state-led "Submit" button and some reports are disabled until
    @@ -170,7 +301,7 @@
- + Unanswered and Issue Type for state-led There are unanswered statements. Some domains will be incomplete.

@@ -178,12 +309,12 @@ an "Issue Type" assigned.

- + singular Assign an "Issue Type" to the following issue which was
generated on the "Statements" page:
- + plural Assign an "Issue Type" to the following issues which were
generated on the "Statements" page: @@ -196,10 +327,10 @@
- + Assessment Config and Issue Types
- + Assessment Config and Issue Type for non-state-led "Submit" button and some reports are disabled until
    @@ -216,18 +347,26 @@
    - + Unanswered and Issue Type for state-led + + The following required fields are missing from the "Demographics" page: +
      + +
    • {{ field }}
    • +
      +
    +

    Some reports are disabled until all Issues have an "Issue Type" assigned

    - + singular Assign an "Issue Type" to the following issue which was
    generated on the "Statements" page:
    - + plural Assign an "Issue Type" to the following issues which were
    generated on the "Statements" page: @@ -242,8 +381,8 @@
- +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)
@@ -252,4 +391,5 @@ This assessment has not been submitted yet. If this assessment is complete, please click submit.
-
\ No newline at end of file + +--> diff --git a/CSETWebNg/src/app/assessment/results/reports/ise-warnings/ise-warnings.component.ts b/CSETWebNg/src/app/assessment/results/reports/ise-warnings/ise-warnings.component.ts index 04189fe55f..01764d2c65 100644 --- a/CSETWebNg/src/app/assessment/results/reports/ise-warnings/ise-warnings.component.ts +++ b/CSETWebNg/src/app/assessment/results/reports/ise-warnings/ise-warnings.component.ts @@ -10,7 +10,7 @@ import { NCUAService } from '../../../../services/ncua.service'; }) export class IseWarningsComponent { @Input() iseHasBeenSubmitted; - @Input() disableIseReportLinks; + @Input() disableIseReportLinks; // <-- Checks for unanswered questions missingFields = []; @@ -20,15 +20,15 @@ export class IseWarningsComponent { ) {} ngOnInit() { - this.getMissingFields(); + this.checkMissingFields(); } - getMissingFields() { + checkMissingFields() { if (this.ncuaSvc.creditUnionName == '' || this.ncuaSvc.creditUnionName === null) { this.missingFields.push("Credit union name"); } - if (this.ncuaSvc.assetsAsNumber == 0 || this.ncuaSvc.assetsAsString == null) { + if (this.ncuaSvc.assetsAsNumber == 0 || this.ncuaSvc.assetsAsString == null || this.assessSvc.assessment.assets == null) { this.missingFields.push("Assets"); } } diff --git a/CSETWebNg/src/app/services/ncua.service.ts b/CSETWebNg/src/app/services/ncua.service.ts index 4c560eabb4..258827e0e6 100644 --- a/CSETWebNg/src/app/services/ncua.service.ts +++ b/CSETWebNg/src/app/services/ncua.service.ts @@ -83,7 +83,7 @@ export class NCUAService { // Variables to manage ISE issues state issuesFinishedLoading: boolean = false; questionCheck = new Map(); - issueFindingId = new Map(); + issueObservationId = new Map(); deleteHistory = new Set(); // Keeps track of Issues with unassigned Types for report notification @@ -295,7 +295,7 @@ export class NCUAService { // Clears necessary variables on assessment drop reset() { this.questionCheck.clear(); - this.issueFindingId.clear(); + this.issueObservationId.clear(); this.deleteHistory.clear(); }