Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/acet806 #4375

Merged
merged 6 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,15 @@ <h4>{{ t('organization details') }}</h4>
<div *ngIf="assessment.charterType == 2 || assessment.charter >= 60000" (click)="toggleJoint()"
tabindex="0" class="state-led cursor-pointer"
[ngClass]="{'state-led-selected': assessment.isE_StateLed}"
matTooltip="NCUA examiners should check this box ONLY when completing a limited review of the ISE statements on state-led examinations. State examiners should check this box for all assessments.">
matTooltip="This checkbox bypasses NCUA required procedures and should only be used by State Supervisory Authorities.">
<div class="row">
<div class="col-2">
<h3 *ngIf="!assessment.isE_StateLed">&#x2610;</h3>
<h3 *ngIf="assessment.isE_StateLed">&#x2611;</h3>
</div>
<div style="padding-top: 5px;">State-led examination?</div>
<div class="col-10">
<div style="padding-top: 5px;">State-led examination?</div>
</div>
</div>
</div>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h2 style="color: white;">Issues</h2>
<div *ngIf="this.observation.auto_Generated === 0">
<div class="row">
<div class="col-12">
<label for="manual-actions" class="form-label font-weight-bold">Action Items</label>
<label for="manual-actions" class="form-label font-weight-bold">Action Required</label>
<textarea id="manual-actions" type="text" rows="5" autocomplete="off" class="form-control"
[(ngModel)]="observation.actionItems"></textarea>
</div>
Expand All @@ -111,7 +111,7 @@ <h2 style="color: white;">Issues</h2>
<tr style="text-align: center;">
<th scope="col">Stmt #</th>
<th scope="col">Statement Text</th>
<th scope="col">Action Items</th>
<th scope="col">Action Required</th>
</tr>
</thead>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export class IssuesComponent implements OnInit {
this.observationSvc.getObservation(this.observation.answer_Id, this.observation.observation_Id, this.observation.question_Id, questionType).subscribe((response: Observation) => {

this.observation = response;
this.observation.title = this.issueTitle; // using the temp name we set earlier so it's not "overriden" for the user

this.questionsSvc.getActionItems(this.questionID, this.observation.observation_Id).subscribe(
(data: any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
[matTooltip]="hasComment(q) ? 'Notes with content':'Notes'"
matTooltipPosition="below"
[class.answer-selected]="q.extrasExpanded === true || hasComment(q)">
<input name="q_{{ q.questionId }}_C" id="checkbox_comment" type="checkbox"
<input name="q_{{ q.questionId }}_C" id="checkbox_comment" class="btn-check" type="checkbox"
(keydown)="checkKeyPress($event, q, 'comment')" (click)="toggleComment(q)">
<span class="cset-icons-comment fs-base"></span>
</label>
Expand All @@ -142,7 +142,7 @@
<label class="me-0 ms-2 btn form-check-label btn-mfr"
[class.answer-selected]="q.markForReview === true"
matTooltip="This control requires further review.">
<input name="q_{{ q.questionId }}_F" type="checkbox"
<input name="q_{{ q.questionId }}_F" class="btn-check" type="checkbox"
(keydown)="checkKeyPress($event, q, 'mfr')" (click)="saveMFR(q);" tabindex="0"
[checked]="q.markForReview === true">
<span class="cset-icons-flag-dark fs-base"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,13 +756,27 @@ export class QuestionBlockIseComponent implements OnInit {
* SCUEP q's 1- 7 and CORE/CORE+ q's 1 - 10 use one domain, CORE/CORE+ q's 11+ have a different domain
* this checks the q's parentQuestionId to see if it's SCUEP 1 - 7 or CORE/CORE+ 1 - 10 and sets the name accordingly
*/
let name = "";
let groupingPrefix = "";
if (this.myGrouping.questions[0].questionId <= 7674) {
name = ("Information Security Program, " + this.myGrouping.title);
groupingPrefix = "Information Security Program,";
} else {
name = ("Cybersecurity Controls, " + this.myGrouping.title);
groupingPrefix = "Cybersecurity Controls,";
}

let myArray = this.myGrouping.title.split(" ");
let questionNum = Number(myArray[0]);

let sliceValue = 0;
if (questionNum <= 9) {
sliceValue = 2;
} else {
sliceValue = 3;
}

let title = this.myGrouping.title.slice(sliceValue);

let observationName = groupingPrefix + title;

const observation: Observation = {
question_Id: parentId,
questionType: this.myGrouping.questions[0].questionType,
Expand All @@ -777,7 +791,7 @@ export class QuestionBlockIseComponent implements OnInit {
recommendations: '',
resolution_Date: null,
vulnerabilities: '',
title: name,
title: observationName,
type: null,
risk_Area: 'Transaction',
sub_Risk: 'Information Systems & Technology Controls',
Expand Down
5 changes: 5 additions & 0 deletions CSETWebNg/src/app/layout/top-menus/top-menus.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@
<span class="cset-icons-pdf-doc fs-base me-2 align-middle"></span>
<span>ISE User Guide</span>
</a>
<a *ngIf="isGuideVisible('ISE')" mat-menu-item target="_blank"
href="{{docUrl}}cdDocs_ACET/ISE_Checklist.pdf">
<span class="cset-icons-pdf-doc fs-base me-2 align-middle"></span>
<span>ISE Checklist</span>
</a>
<a *ngIf="isGuideVisible('TSA')" mat-menu-item target="_blank" href="{{docUrl}}htmlhelp_tsa/index.htm">
<span class="cset-icons-book-open fs-base me-2 align-middle"></span>
<span>TSA</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,29 +281,28 @@
</div>
<div *ngIf="observation?.finding?.type !== 'Supplemental Fact'">

<strong> Action Items: </strong>
<strong> Action Required: </strong>
<br>
<div *ngIf="observation?.finding?.auto_Generated != 1">
<div *ngIf="observation?.finding?.actionItems != null" style="white-space: pre-wrap;"
[innerHTML]="observation?.finding?.actionItems">
</div>
<div *ngIf="observation?.actionItems == null">
(no Action Items available)
(no actions available)
</div>
</div>
<div *ngIf="this.masterActionItemsMap.has(observation?.finding?.finding_Id) && observation?.finding?.auto_Generated == 1">
<div *ngFor="let allActionsInFinding of this.masterActionItemsMap.get(observation?.finding?.finding_Id); let i = index">
<div *ngIf="allActionsInFinding.action_Items != '' && allActionsInFinding.action_Items != '.'">
{{ this.getChildQuestionNumber(allActionsInFinding.question_Title) }}: {{
allActionsInFinding.action_Items }}
{{ allActionsInFinding.action_Items }}
</div>
<div *ngIf="(allActionsInFinding.action_Items == '' || allActionsInFinding.action_Items == '.') && observation?.finding?.actionItems == null">
(no Action Items available)
(no actions available)
</div>
</div>
</div>
<div *ngIf="!this.masterActionItemsMap.has(observation?.finding?.finding_Id) && observation?.finding?.auto_Generated == 1">
(no Action Items available)
(no actions available)
</div>
<strong> Risk Area: </strong> {{ observation?.finding?.risk_Area }}
<br>
Expand Down Expand Up @@ -358,8 +357,7 @@
{{ file.title }} (<strong>Section:</strong> {{ file.sectionRef }})
</div>
</span>
<span *ngIf="!sourceFilesMap.has(observation?.finding?.finding_Id)">(no Resources
available)</span>
<span *ngIf="!sourceFilesMap.has(observation?.finding?.finding_Id)">(no Resources available)</span>
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class IseExaminationComponent implements OnInit {

sourceFilesMap: Map<number, any[]> = new Map<number, any[]>();
regCitationsMap: Map<number, any[]> = new Map<number, any[]>();
showActionItemsMap: Map<string, any[]> = new Map<string, any[]>(); //stores what action items to show (answered 'No')
showActionItemsMap: Map<string, any[]> = new Map<string, any[]>(); //stores what action required to show (answered 'No')

examinerFindings: string[] = [];
examinerFindingsTotal: number = 0;
Expand Down Expand Up @@ -102,9 +102,6 @@ export class IseExaminationComponent implements OnInit {
this.response = r;
this.examLevel = this.response?.matAnsweredQuestions[0]?.assessmentFactors[0]?.components[0]?.questions[0]?.maturityLevel;

console.log("this.response.matAnsweredQuestions");
console.log(this.response.matAnsweredQuestions[0]);

// goes through domains
for (let i = 0; i < this.response?.matAnsweredQuestions[0]?.assessmentFactors?.length; i++) {
let domain = this.response?.matAnsweredQuestions[0]?.assessmentFactors[i];
Expand All @@ -122,15 +119,18 @@ export class IseExaminationComponent implements OnInit {
}

// goes through questions
let scuepQuestions = [];
let coreQuestions = [];
let corePlusQuestions = [];
let questionsInCorrectOrder = [];

for (let k = 0; k < subcat?.questions?.length; k++) {
let question = subcat?.questions[k];

// Sorts questions into CORE and CORE+
if (question.maturityLevel == "CORE") {
// Sorts questions into specific categories
if (question.maturityLevel == "SCUEP") {
scuepQuestions.push(question);
} else if (question.maturityLevel == "CORE") {
coreQuestions.push(question);
} else if (question.maturityLevel == "CORE+") {
corePlusQuestions.push(question);
Expand All @@ -139,7 +139,14 @@ export class IseExaminationComponent implements OnInit {
// Ensures correct question order even if CORE questions have a higher id than a CORE+
if (k === subcat?.questions?.length - 1) {
questionsInCorrectOrder = (coreQuestions.concat(corePlusQuestions));
subcat.questions = questionsInCorrectOrder;

if (this.examLevel != "SCUEP") {
subcat.questions = questionsInCorrectOrder;
} else {
subcat.questions = scuepQuestions;
}

scuepQuestions = [];
coreQuestions = [];
corePlusQuestions = [];
questionsInCorrectOrder = [];
Expand Down Expand Up @@ -217,15 +224,14 @@ export class IseExaminationComponent implements OnInit {
let sourceDocList = this.files?.listTabs[0]?.sourceDocumentsList;

for (let i = 0; i < sourceDocList?.length; i++) {
if (!this.sourceFilesMap.has(observation.finding.observation_Id)) {

this.sourceFilesMap.set(observation.finding.observation_Id, [sourceDocList[i]]);
if (!this.sourceFilesMap.has(observation.finding.finding_Id)) {
this.sourceFilesMap.set(observation.finding.finding_Id, [sourceDocList[i]]);
} else {
let tempFileArray = this.sourceFilesMap.get(observation.finding.observation_Id);
let tempFileArray = this.sourceFilesMap.get(observation.finding.finding_Id);

tempFileArray.push(sourceDocList[i]);

this.sourceFilesMap.set(observation.finding.observation_Id, tempFileArray);
this.sourceFilesMap.set(observation.finding.finding_Id, tempFileArray);
}
}
}
Expand Down Expand Up @@ -273,7 +279,6 @@ export class IseExaminationComponent implements OnInit {
},
error => console.log('Assessment Answered Questions Error: ' + (<Error>error).message)
);

}

/**
Expand Down
15 changes: 7 additions & 8 deletions CSETWebNg/src/app/reports/ise-merit/ise-merit.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,37 +238,37 @@
title="Copy to Clipboard" [cdkCopyToClipboard]="getActionItemsToCopy(observation?.finding?.finding_Id)">
<span class="cset-icons-copy"></span>
</label>
<strong> Action Items: </strong>
<strong> Action Required: </strong>
<br>
<div *ngIf="observation?.finding?.auto_Generated != 1">
<div *ngIf="observation?.finding?.actionItems != null"
style="white-space: pre-wrap;" [innerHTML]="observation?.finding?.actionItems">
</div>
<div *ngIf="observation?.finding?.actionItems == null">
(no Action Items available)
(no actions available)
</div>
</div>
<div *ngIf="this.masterActionItemsMap.has(observation?.finding?.finding_Id) && observation?.finding?.auto_Generated == 1">
<div *ngFor="let allActionsInFinding of this.masterActionItemsMap.get(observation?.finding?.finding_Id); let i = index">
<div *ngIf="allActionsInFinding.action_Items != '' && allActionsInFinding.action_Items != '.'">
{{ this.getChildQuestionNumber(allActionsInFinding.question_Title) }}: {{ allActionsInFinding.action_Items }}
{{ allActionsInFinding.action_Items }}
</div>

<div
*ngIf="(allActionsInFinding.action_Items == '' || allActionsInFinding.action_Items == '.') && observation?.finding?.actionItems == null">
(no Action Items available)
(no actions available)
</div>
</div>
</div>

<div
*ngIf="!this.masterActionItemsMap.has(observation?.finding?.finding_Id) && observation?.finding?.auto_Generated == 1">
(no Action Items available)
(no actions available)

</div>

<!-- <div *ngIf="(this.masterActionItemsMap.get(observation?.finding?.finding_Id) == null || this.masterActionItemsMap.get(observation?.finding?.finding_Id) == '') && finding?.finding?.actionItems == null">
(no Action Items available)
(no actions available)
</div> -->

<!-- <label class="btn form-check-label btn-copy" style="text-align: right; font-weight: normal; font-size: 14px;
Expand Down Expand Up @@ -380,8 +380,7 @@
{{ file.title }} (<strong>Section:</strong> {{ file.sectionRef }})
</div>
</span>
<span *ngIf="!sourceFilesMap.has(observation?.finding?.finding_Id)">(no Resources
available)</span>
<span *ngIf="!sourceFilesMap.has(observation?.finding?.finding_Id)">(no Resources available)</span>
</div>

<hr class="page-line">
Expand Down
2 changes: 1 addition & 1 deletion CSETWebNg/src/app/reports/ise-merit/ise-merit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export class IseMeritComponent implements OnInit {
}
}
if (array?.length == 0) {
return "(no Action Items available)";
return "(no actions available)";
}

let formattedItems = array.join("");
Expand Down
Loading