Skip to content

Commit

Permalink
Merge pull request #4475 from cisagov/feature/CSET-2290
Browse files Browse the repository at this point in the history
Added Facilitator select and Self Assessment checkbox to IOD demog
  • Loading branch information
itsmostafa authored Mar 4, 2025
2 parents fed8018 + 078b15d commit 2975452
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,22 @@ <h5>{{ assessment.typeTitle || 'Blank Assessment' }}</h5>

<app-assessment-contacts (triggerChange)="refreshContacts()"></app-assessment-contacts>

<hr class="w-100 hr-sal my-5" />
<hr class="w-100 hr-sal my-4" />

<div *ngIf="showFacilitator()" class="mb-4">
<label class="form-label" for="facilitator">{{t('contact.facilitator')}}</label>
<select class="form-select" id="facilitator" tabindex="0" name="facilitator" (change)="updateDemographics()"
[(ngModel)]="demographics.facilitatorId">
<option [ngValue]="null">-- {{t('select facilitator')}} --</option>
<option *ngFor="let contact of contacts" [value]="contact.assessmentContactId">{{contact.firstName}}
{{contact.lastName}}</option>
</select>
<div class="mt-2">
<input type="checkbox" name="self-assessment" id="self-assessment" class="checkbox-custom mt-1"
[(ngModel)]="demographics.selfAssessment" [checked]="demographics.selfAssessment" (change)="updateDemographics()">
<label for="self-assessment" class="checkbox-custom-label d-inline">{{ t('self assessment') }}</label>
</div>
</div>

<div class="row mb-4">
<div class="col">
Expand Down Expand Up @@ -176,7 +191,7 @@ <h5>{{ assessment.typeTitle || 'Blank Assessment' }}</h5>
</div>

<!-- #6 -->
<div class="mb-5">
<div class="mb-4">
<label for="disruptedSectors" class="form-label">
Please select in order of criticality, the two critical infrastructure
sectors which, if they were unavailable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { DemographicIodService } from '../../../../services/demographic-iod.serv
import { DemographicService } from '../../../../services/demographic.service';

@Component({
selector: 'app-assessment-config-iod',
templateUrl: './assessment-config-iod.component.html',
styleUrls: ['./assessment-config-iod.component.scss'],
standalone: false
selector: 'app-assessment-config-iod',
templateUrl: './assessment-config-iod.component.html',
styleUrls: ['./assessment-config-iod.component.scss'],
standalone: false
})
export class AssessmentConfigIodComponent implements OnInit {
iodDemographics: DemographicsIod = {};
Expand Down Expand Up @@ -43,7 +43,7 @@ export class AssessmentConfigIodComponent implements OnInit {

if (this.configSvc.config.debug.showCmmcConversion ?? false) {
this.assessSvc.getAssessmentDetail().subscribe((data: AssessmentDetail) => {
if (data.maturityModel.modelName == "CMMC2") {
if (data.maturityModel?.modelName == "CMMC2") {
this.showUpgrade = true;
this.targetModel = "CMMC2F"
}
Expand Down Expand Up @@ -127,4 +127,8 @@ export class AssessmentConfigIodComponent implements OnInit {
showStateName() {
return this.configSvc.behaviors.showStateName;
}

showFacilitator() {
return this.configSvc.behaviors.showFacilitatorDropDown;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,32 @@ <h4>{{t('titles.service demographics')}}</h4>

<form class="mb-3">
<ng-container *ngIf="showCriticalServiceIdentifyingInfo()">
<div>
<div class="mb-3">
<label for="criticalServiceName" class="form-label">{{t('critical service name')}}</label>
<input [ngClass]="{ 'alert-danger': !demographics.criticalService && showErrors() }" class="form-control"
tabindex="0" type="text" maxlength="50" name="criticalServiceName" id="criticalServiceName"
[(ngModel)]="demographics.criticalService" placeholder="{{t('critical service name')}}"
(change)="updateBaseDemographics()" />
</div>
<div>

<div class="mb-3">
<label for="criticalServiceDescription" class="form-label">{{t('critical service description')}}</label>
<input [ngClass]="{
'alert-danger': !csiServiceDemographic.criticalServiceDescription && showErrors()
}" class="form-control" tabindex="0" type="text" maxlength="150" name="criticalServiceDescription"
id="criticalServiceDescription" [(ngModel)]="csiServiceDemographic.criticalServiceDescription"
placeholder="{{t('critical service description')}}" (change)="update()" />
</div>
<div>

<div class="mb-3">
<label for="itIcsName" class="form-label">Name of IT/ICS System (supporting the Critical Service)</label>
<input [ngClass]="{ 'alert-danger': !csiServiceDemographic.itIcsName && showErrors() }" class="form-control"
tabindex="0" type="text" maxlength="50" name="itIcsName" id="itIcsName"
[(ngModel)]="csiServiceDemographic.itIcsName"
placeholder="Name of IT/ICS System (supporting the Critical Service)" (change)="update()" />
</div>
<div>

<div class="mb-3">
<label class="form-label" for="multisiteService">Multi-site Service?</label>
<div class="btn-group btn-group-toggle d-block mb-2" id="multisiteService" data-toggle="buttons" ngbRadioGroup>
<label ngbButtonLabel class="btn btn-level border-2 mb-1" [class.active]="csiServiceDemographic.multiSite">
Expand Down

0 comments on commit 2975452

Please sign in to comment.