diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/CmmcBusiness.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/CmmcBusiness.cs index 9beed8339c..d982165d32 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/CmmcBusiness.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Business/Maturity/CmmcBusiness.cs @@ -70,6 +70,16 @@ public CmmcScores GetCmmcScores(int assessmentId) { var response = new CmmcScores(); + var selectedLevel = _context.ASSESSMENT_SELECTED_LEVELS + .Where(x => x.Assessment_Id == assessmentId && x.Level_Name == Constants.Constants.MaturityLevel) + .FirstOrDefault(); + + if (selectedLevel != null) + { + response.TargetLevel = int.Parse(selectedLevel.Standard_Specific_Sal_Level); + } + + // Level 1 response.Level1Score = GetScoreForLevel(assessmentId, 1); @@ -125,9 +135,18 @@ join q in _context.MATURITY_QUESTIONS on a.Question_Or_Requirement_Id equals q.M /// Returns a list of scorecards, one for each active level. /// /// - public List GetLevelScorecards(int assessmentId) + public ScorecardResponse GetLevelScorecards(int assessmentId) { - var response = new List(); + var response = new ScorecardResponse(); + + var selectedLevel = _context.ASSESSMENT_SELECTED_LEVELS + .Where(x => x.Assessment_Id == assessmentId && x.Level_Name == Constants.Constants.MaturityLevel) + .FirstOrDefault(); + + if (selectedLevel != null) + { + response.TargetLevel = int.Parse(selectedLevel.Standard_Specific_Sal_Level); + } var biz = new MaturityBusiness(_context, _assessmentUtil, _adminTabBusiness); @@ -142,19 +161,19 @@ public List GetLevelScorecards(int assessmentId) var l1 = FilterByLevel(x, 1); if (l1.Domains.Count > 0) { - response.Add(l1); + response.LevelScorecards.Add(l1); } var l2 = FilterByLevel(x, 2); if (l2.Domains.Count > 0) { - response.Add(l2); + response.LevelScorecards.Add(l2); } var l3 = FilterByLevel(x, 3); if (l3.Domains.Count > 0) { - response.Add(l3); + response.LevelScorecards.Add(l3); } return response; diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CmmcScoreModel.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CmmcScoreModel.cs index b87d51631c..419c895359 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CmmcScoreModel.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CmmcScoreModel.cs @@ -9,6 +9,13 @@ namespace CSETWebCore.Model.Maturity { + public class ScorecardResponse + { + public int TargetLevel { get; set; } = 0; + public List LevelScorecards { get; set; } = []; + } + + public class CmmcScoreModel { public int Level { get; set; } @@ -25,6 +32,7 @@ public CmmcScoreModel() } } + public class CmmcDomain { public string DomainName { get; set; } @@ -37,6 +45,7 @@ public CmmcDomain() } } + public class CmmcQuestion { public int QuestionId { get; set; } diff --git a/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CmmcScores.cs b/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CmmcScores.cs index 4f4c0820d1..0bcea33c85 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CmmcScores.cs +++ b/CSETWebApi/CSETWeb_Api/CSETWebCore.Model/Maturity/CmmcScores.cs @@ -8,6 +8,9 @@ namespace CSETWebCore.Model.Maturity { public class CmmcScores { + public int TargetLevel { get; set; } = 0; + + public int Level1Score { get; set; } public int Level1MaxScore { get; set; } diff --git a/CSETWebNg/src/app/app-routing.module.ts b/CSETWebNg/src/app/app-routing.module.ts index ac559a76f6..bd656e37a9 100644 --- a/CSETWebNg/src/app/app-routing.module.ts +++ b/CSETWebNg/src/app/app-routing.module.ts @@ -150,7 +150,7 @@ import { RraSummaryAllComponent } from './assessment/results/mat-rra/rra-summary import { CrrResultsPage } from './assessment/results/crr/crr-results-page/crr-results-page.component'; import { CrrSummaryResultsComponent } from './assessment/results/crr/crr-summary-results/crr-summary-results.component'; import { TsaAssessmentCompleteComponent } from './assessment/results/tsa-assessment-complete/tsa-assessment-complete.component'; -import { SprsScoreComponent } from './assessment/results/mat-cmmc2/sprs-score/sprs-score.component'; +import { SprsScoreComponent } from './assessment/results/mat-cmmc2/scorecard/sprs-score/sprs-score.component'; import { Cmmc2LevelResultsComponent } from './assessment/results/mat-cmmc2/cmmc2-level-results/cmmc2-level-results.component'; import { Cmmc2DomainResultsComponent } from './assessment/results/mat-cmmc2/cmmc2-domain-results/cmmc2-domain-results.component'; import { ExecutiveCMMC2Component } from './reports/cmmc2/executive-cmmc2/executive-cmmc2.component'; @@ -241,7 +241,8 @@ import { AllReviewedComponent } from './reports/all-reviewed/all-reviewed.compon import { AnalyticsResultsComponent } from './assessment/results/analytics-results/analytics-results.component'; import { Cmmc2LevelsComponent } from './assessment/prepare/maturity/cmmc2-levels/cmmc2-levels.component'; import { Cmmc2ScoresComponent } from './assessment/results/mat-cmmc2/cmmc2-scores/cmmc2-scores.component'; -import { Cmmc2ScorecardComponent } from './assessment/results/mat-cmmc2/cmmc2-scorecard/cmmc2-scorecard.component'; +import { Cmmc2ScorecardPageComponent } from './assessment/results/mat-cmmc2/scorecard/cmmc2-scorecard/cmmc2-scorecard-page.component'; +import { Cmmc2ScorecardReportComponent } from './reports/cmmc2/cmmc2-scorecard-report/cmmc2-scorecard-report.component'; const appRoutes: Routes = [ @@ -465,7 +466,7 @@ const appRoutes: Routes = [ { path: 'cmmc-gaps', component: CmmcGapsComponent }, { path: 'sprs-score', component: SprsScoreComponent }, { path: 'cmmc2-scores', component: Cmmc2ScoresComponent }, - { path: 'cmmc2-scorecard', component: Cmmc2ScorecardComponent }, + { path: 'cmmc2-scorecard', component: Cmmc2ScorecardPageComponent }, { path: 'cmmc2-level-results', component: Cmmc2LevelResultsComponent }, { path: 'cmmc2-domain-results', component: Cmmc2DomainResultsComponent }, { path: 'rra-summary-all', component: RraSummaryAllComponent }, @@ -552,6 +553,7 @@ const appRoutes: Routes = [ { path: 'cmmcCommentsMarked', component: CmmcCommentsMarkedComponent }, { path: 'cmmcAltJustifications', component: CmmcAltJustificationsComponent }, { path: 'cmmc2DeficiencyReport', component: Cmmc2DeficiencyComponent }, + { path: 'cmmc2ScorecardReport', component: Cmmc2ScorecardReportComponent }, { path: 'cmmc2CommentsMarked', component: Cmmc2CommentsMarkedComponent }, { path: 'executivecmmc2', component: ExecutiveCMMC2Component }, { path: 'edm', component: EdmComponent }, diff --git a/CSETWebNg/src/app/app.module.ts b/CSETWebNg/src/app/app.module.ts index 4baf1cdb8f..dd9aba1aec 100644 --- a/CSETWebNg/src/app/app.module.ts +++ b/CSETWebNg/src/app/app.module.ts @@ -298,9 +298,9 @@ import { CmmcGapsComponent } from './assessment/results/mat-cmmc/cmmc-gaps/cmmc- import { Cmmc2ScoresComponent } from './assessment/results/mat-cmmc2/cmmc2-scores/cmmc2-scores.component'; import { Cmmc2Level1ScoreComponent } from './assessment/results/mat-cmmc2/cmmc2-level1-score/cmmc2-level1-score.component'; import { Cmmc2Level2ScoreComponent } from './assessment/results/mat-cmmc2/cmmc2-level2-score/cmmc2-level2-score.component'; -import { Cmmc2Level3ScoreComponent } from './assessment/results/mat-cmmc2/cmmc2-level3-score/cmmc2-level3-score.component'; -import { Cmmc2ScorecardComponent } from './assessment/results/mat-cmmc2/cmmc2-scorecard/cmmc2-scorecard.component'; -import { LevelScorecardComponent } from './assessment/results/mat-cmmc2/level-scorecard/level-scorecard.component'; +import { Cmmc2Level3ScoreComponent } from './assessment/results/mat-cmmc2/scorecard/cmmc2-level3-score/cmmc2-level3-score.component'; +import { Cmmc2ScorecardPageComponent } from './assessment/results/mat-cmmc2/scorecard/cmmc2-scorecard/cmmc2-scorecard-page.component'; +import { LevelScorecardComponent } from './assessment/results/mat-cmmc2/scorecard/level-scorecard/level-scorecard.component'; import { Cmmc2LevelResultsComponent } from './assessment/results/mat-cmmc2/cmmc2-level-results/cmmc2-level-results.component'; import { Cmmc2DomainResultsComponent } from './assessment/results/mat-cmmc2/cmmc2-domain-results/cmmc2-domain-results.component'; import { ExecutiveCMMC2Component } from './reports/cmmc2/executive-cmmc2/executive-cmmc2.component'; @@ -417,7 +417,7 @@ import { TsaAssessmentCompleteComponent } from './assessment/results/tsa-assessm import { LoginTsaComponent } from './initial/login-tsa/login-tsa.component'; import { FeatureOptionTsaComponent } from './assessment/prepare/assessment-info/assessment-config-tsa/feature-option-tsa/feature-option-tsa.component'; import { AboutTsaComponent } from './dialogs/about-tsa/about-tsa.component'; -import { SprsScoreComponent } from './assessment/results/mat-cmmc2/sprs-score/sprs-score.component'; +import { SprsScoreComponent } from './assessment/results/mat-cmmc2/scorecard/sprs-score/sprs-score.component'; import { AssessmentConfigTsaComponent } from './assessment/prepare/assessment-info/assessment-config-tsa/assessment-config-tsa.component'; import { TutorialCmmc2Component } from './assessment/prepare/maturity/tutorial-cmmc2/tutorial-cmmc2.component'; import { TopMenusComponent } from './layout/top-menus/top-menus.component'; @@ -510,6 +510,7 @@ import { CrrSideTocComponent } from './reports/crr/crr-report/crr-side-toc/crr-s import { CrrMainTocComponent } from './reports/crr/crr-report/crr-main-toc/crr-main-toc.component'; import { Cmmc2CommentsMarkedComponent } from './reports/cmmc2/cmmc2-comments-marked/cmmc2-comments-marked.component'; import { Cmmc2DeficiencyComponent } from './reports/cmmc2/cmmc2-deficiency/cmmc2-deficiency.component'; +import { Cmmc2ScorecardReportComponent } from './reports/cmmc2/cmmc2-scorecard-report/cmmc2-scorecard-report.component'; import { IseAnsweredQuestionsComponent } from './reports/ise-answeredquestions/ise-answeredquestions.component'; import { IseMeritComponent } from './reports/ise-merit/ise-merit.component'; import { IseDonutChartComponent } from './reports/ise-donut-chart/ise-donut-chart.component'; @@ -848,7 +849,7 @@ import { AnalyticsResultsComponent } from './assessment/results/analytics-result Cmmc2Level1ScoreComponent, Cmmc2Level2ScoreComponent, Cmmc2Level3ScoreComponent, - Cmmc2ScorecardComponent, + Cmmc2ScorecardPageComponent, LevelScorecardComponent, Cmmc2LevelResultsComponent, Cmmc2DomainResultsComponent, @@ -1064,6 +1065,7 @@ import { AnalyticsResultsComponent } from './assessment/results/analytics-result CrrMainTocComponent, Cmmc2CommentsMarkedComponent, Cmmc2DeficiencyComponent, + Cmmc2ScorecardReportComponent, PrivacyWarningComponent, PrivacyWarningRejectComponent, SearchPageComponent, diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-results/cmmc2-results.component.html b/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-results/cmmc2-results.component.html index f454d3813b..7a032b940f 100644 --- a/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-results/cmmc2-results.component.html +++ b/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-results/cmmc2-results.component.html @@ -44,10 +44,6 @@

{{t('titles.performance by level')}}

{{l.chart}}
-
-
Compliant: {{l.compliancePercent}}%
-
Non Compliant {{l.nonCompliancePercent}}%
-
diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-scorecard/cmmc2-scorecard.component.ts b/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-scorecard/cmmc2-scorecard.component.ts deleted file mode 100644 index d2dcb8e9f7..0000000000 --- a/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-scorecard/cmmc2-scorecard.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { AssessmentService } from '../../../../services/assessment.service'; -import { MaturityService } from '../../../../services/maturity.service'; - -@Component({ - selector: 'app-cmmc2-scorecard', - templateUrl: './cmmc2-scorecard.component.html', - styleUrl: './cmmc2-scorecard.component.scss' -}) -export class Cmmc2ScorecardComponent implements OnInit { - - levels: any[]; - - /** - * - */ - constructor( - public assessSvc: AssessmentService, - public maturitySvc: MaturityService - ) {} - - /** - * - */ - ngOnInit(): void { - this.maturitySvc.getCmmcScorecards().subscribe((x: any[]) => { - this.levels = x; - }); - } - - level(l: number) { - if (!!this.levels) { - return this.levels[l]; - } - return null; - } -} diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-level3-score/cmmc2-level3-score.component.html b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-level3-score/cmmc2-level3-score.component.html similarity index 100% rename from CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-level3-score/cmmc2-level3-score.component.html rename to CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-level3-score/cmmc2-level3-score.component.html diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-level3-score/cmmc2-level3-score.component.scss b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-level3-score/cmmc2-level3-score.component.scss similarity index 100% rename from CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-level3-score/cmmc2-level3-score.component.scss rename to CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-level3-score/cmmc2-level3-score.component.scss diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-level3-score/cmmc2-level3-score.component.ts b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-level3-score/cmmc2-level3-score.component.ts similarity index 100% rename from CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-level3-score/cmmc2-level3-score.component.ts rename to CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-level3-score/cmmc2-level3-score.component.ts diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-scorecard/cmmc2-scorecard.component.html b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-scorecard/cmmc2-scorecard-page.component.html similarity index 80% rename from CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-scorecard/cmmc2-scorecard.component.html rename to CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-scorecard/cmmc2-scorecard-page.component.html index b0ee49dfca..15e9d6711f 100644 --- a/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-scorecard/cmmc2-scorecard.component.html +++ b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-scorecard/cmmc2-scorecard-page.component.html @@ -29,19 +29,19 @@

{{t('titles.cmmc scorecard')}}

Level 1

- +
-
+

Level 2

- +
-
+

Level 3

- +
diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-scorecard/cmmc2-scorecard.component.scss b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-scorecard/cmmc2-scorecard-page.component.scss similarity index 100% rename from CSETWebNg/src/app/assessment/results/mat-cmmc2/cmmc2-scorecard/cmmc2-scorecard.component.scss rename to CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-scorecard/cmmc2-scorecard-page.component.scss diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-scorecard/cmmc2-scorecard-page.component.ts b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-scorecard/cmmc2-scorecard-page.component.ts new file mode 100644 index 0000000000..2c5388258b --- /dev/null +++ b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/cmmc2-scorecard/cmmc2-scorecard-page.component.ts @@ -0,0 +1,40 @@ +import { Component, OnInit } from '@angular/core'; +import { AssessmentService } from '../../../../../services/assessment.service'; +import { MaturityService } from '../../../../../services/maturity.service'; + +@Component({ + selector: 'app-cmmc2-scorecard-page', + templateUrl: './cmmc2-scorecard-page.component.html', + styleUrl: './cmmc2-scorecard-page.component.scss' +}) +export class Cmmc2ScorecardPageComponent implements OnInit { + + scorecards: any[]; + + targetLevel: number; + + /** + * + */ + constructor( + public maturitySvc: MaturityService + ) {} + + /** + * + */ + ngOnInit(): void { + this.maturitySvc.getCmmcScorecards().subscribe((x: any) => { + this.targetLevel = x.targetLevel; + this.scorecards = x.levelScorecards; + }); + } + + scorecardForLevel(l: number) { + if (!!this.scorecards) { + const sc = this.scorecards.find(x => x.level == l); + return sc; + } + return null; + } +} diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/level-scorecard/level-scorecard.component.html b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/level-scorecard/level-scorecard.component.html similarity index 94% rename from CSETWebNg/src/app/assessment/results/mat-cmmc2/level-scorecard/level-scorecard.component.html rename to CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/level-scorecard/level-scorecard.component.html index 33ec10b610..f574316ac7 100644 --- a/CSETWebNg/src/app/assessment/results/mat-cmmc2/level-scorecard/level-scorecard.component.html +++ b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/level-scorecard/level-scorecard.component.html @@ -45,7 +45,7 @@ {{q.title}} - {{t('answer-options.labels.' + q.answerText.toLowerCase() + + {{t('answer-options.labels.' + q.answerText.toLowerCase() + '-cmmc')}} {{q.score == 0 ? '' : q.score}} diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/level-scorecard/level-scorecard.component.scss b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/level-scorecard/level-scorecard.component.scss similarity index 100% rename from CSETWebNg/src/app/assessment/results/mat-cmmc2/level-scorecard/level-scorecard.component.scss rename to CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/level-scorecard/level-scorecard.component.scss diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/level-scorecard/level-scorecard.component.ts b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/level-scorecard/level-scorecard.component.ts similarity index 65% rename from CSETWebNg/src/app/assessment/results/mat-cmmc2/level-scorecard/level-scorecard.component.ts rename to CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/level-scorecard/level-scorecard.component.ts index ec3c9d7d3d..0c38aecc67 100644 --- a/CSETWebNg/src/app/assessment/results/mat-cmmc2/level-scorecard/level-scorecard.component.ts +++ b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/level-scorecard/level-scorecard.component.ts @@ -1,10 +1,10 @@ import { Component, Input } from '@angular/core'; -import { LayoutService } from '../../../../services/layout.service'; +import { LayoutService } from '../../../../../services/layout.service'; @Component({ selector: 'app-level-scorecard', templateUrl: './level-scorecard.component.html', - styleUrl: './level-scorecard.component.scss' + styleUrls: ['../../../../../reports/reports.scss','./level-scorecard.component.scss'] }) export class LevelScorecardComponent { diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/sprs-score/sprs-score.component.html b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/sprs-score/sprs-score.component.html similarity index 100% rename from CSETWebNg/src/app/assessment/results/mat-cmmc2/sprs-score/sprs-score.component.html rename to CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/sprs-score/sprs-score.component.html diff --git a/CSETWebNg/src/app/assessment/results/mat-cmmc2/sprs-score/sprs-score.component.ts b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/sprs-score/sprs-score.component.ts similarity index 89% rename from CSETWebNg/src/app/assessment/results/mat-cmmc2/sprs-score/sprs-score.component.ts rename to CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/sprs-score/sprs-score.component.ts index a57a820d27..8dc9246d08 100644 --- a/CSETWebNg/src/app/assessment/results/mat-cmmc2/sprs-score/sprs-score.component.ts +++ b/CSETWebNg/src/app/assessment/results/mat-cmmc2/scorecard/sprs-score/sprs-score.component.ts @@ -23,9 +23,9 @@ //////////////////////////////// import { Component, OnInit } from '@angular/core'; import { Title } from '@angular/platform-browser'; -import { LayoutService } from '../../../../services/layout.service'; -import { MaturityService } from '../../../../services/maturity.service'; -import { NavigationService } from '../../../../services/navigation/navigation.service'; +import { LayoutService } from '../../../../../services/layout.service'; +import { MaturityService } from '../../../../../services/maturity.service'; +import { NavigationService } from '../../../../../services/navigation/navigation.service'; @Component({ selector: 'app-sprs-score', diff --git a/CSETWebNg/src/app/assessment/results/reports/report-list/report-list.json b/CSETWebNg/src/app/assessment/results/reports/report-list/report-list.json index be97836f76..2b35416476 100644 --- a/CSETWebNg/src/app/assessment/results/reports/report-list/report-list.json +++ b/CSETWebNg/src/app/assessment/results/reports/report-list/report-list.json @@ -59,7 +59,7 @@ "linkUrl": "executivecmmc2" }, { - "linkUrl": "cmmc2Scorecard" + "linkUrl": "cmmc2ScorecardReport" }, { "linkUrl": "cmmc2CommentsMarked" diff --git a/CSETWebNg/src/app/reports/cmmc2/cmmc2-scorecard-report/cmmc2-scorecard-report.component.html b/CSETWebNg/src/app/reports/cmmc2/cmmc2-scorecard-report/cmmc2-scorecard-report.component.html new file mode 100644 index 0000000000..2d6eb37f1d --- /dev/null +++ b/CSETWebNg/src/app/reports/cmmc2/cmmc2-scorecard-report/cmmc2-scorecard-report.component.html @@ -0,0 +1,58 @@ + +
+ + + +
+ +
+ + +
+ +

+ {{t('cmmc.scoring.scorecard description')}} +

+ +
+

Level 1

+ +
+ + +
+

Level 2

+ +
+ + +
+

Level 3

+ +
+
+ +
\ No newline at end of file diff --git a/CSETWebNg/src/app/reports/cmmc2/cmmc2-scorecard-report/cmmc2-scorecard-report.component.scss b/CSETWebNg/src/app/reports/cmmc2/cmmc2-scorecard-report/cmmc2-scorecard-report.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/CSETWebNg/src/app/reports/cmmc2/cmmc2-scorecard-report/cmmc2-scorecard-report.component.ts b/CSETWebNg/src/app/reports/cmmc2/cmmc2-scorecard-report/cmmc2-scorecard-report.component.ts new file mode 100644 index 0000000000..6a134c2647 --- /dev/null +++ b/CSETWebNg/src/app/reports/cmmc2/cmmc2-scorecard-report/cmmc2-scorecard-report.component.ts @@ -0,0 +1,59 @@ +import { Component, Input } from '@angular/core'; +import { AssessmentService } from '../../../services/assessment.service'; +import { MaturityService } from '../../../services/maturity.service'; + +@Component({ + selector: 'app-cmmc2-scorecard-report', + templateUrl: './cmmc2-scorecard-report.component.html', + styleUrls: ['../../../reports/reports.scss'] +}) +export class Cmmc2ScorecardReportComponent { + + assessmentDate: string; + assessorName: string; + facilityName: string; + + @Input() + scorecards: any[]; + + targetLevel: number; + +/** + * + */ + constructor( + public assessSvc: AssessmentService, + public maturitySvc: MaturityService + ) { } + + /** + * + */ + ngOnInit(): void { + this.maturitySvc.getCmmcReportData().subscribe((r: any) => { + const info = r.reportData.information; + this.assessmentDate = info.assessment_Date; + this.assessorName = info.assessor_Name; + this.facilityName = info.facility_Name; + }); + + this.maturitySvc.getCmmcScorecards().subscribe((x: any) => { + this.targetLevel = x.targetLevel; + this.scorecards = x.levelScorecards; + }); + } + + /** + * + */ + scorecardForLevel(l: number) { + return this.scorecards?.find(x => x.level == l); + } + + /** + * + */ + printReport() { + window.print(); + } +} diff --git a/CSETWebNg/src/app/reports/cmmc2/executive-cmmc2/executive-cmmc2.component.html b/CSETWebNg/src/app/reports/cmmc2/executive-cmmc2/executive-cmmc2.component.html index eb3871b641..10055f15a6 100644 --- a/CSETWebNg/src/app/reports/cmmc2/executive-cmmc2/executive-cmmc2.component.html +++ b/CSETWebNg/src/app/reports/cmmc2/executive-cmmc2/executive-cmmc2.component.html @@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------> -
+
@@ -60,7 +60,37 @@

+

+ Scoring By Level +

+ +

+ {{t('cmmc.scoring.score charts description 1')}} +

+

+ {{t('cmmc.scoring.score charts description 2')}} +

+

+ {{t('cmmc.scoring.score charts description 3')}} +

+ +
+ + + + + + + + +
+ +
@@ -70,7 +100,7 @@

The figure shows the organization's progress throughout the CMMC based on the individual target level and overall cybersecurity assessment.

-
+
@@ -93,8 +119,9 @@

Compliance by Domain

-

The following chart shows the percentage of practices met for each - domain at target level {{targetLevel}}.

+

+ {{ t('cmmc.scoring.perf by domain desc', {targetLevel: targetLevel}) }} +

{{chartDomain}} @@ -108,7 +135,11 @@

Compliance by Domain

-
+ + + + +
\ No newline at end of file diff --git a/CSETWebNg/src/app/reports/cmmc2/executive-cmmc2/executive-cmmc2.component.ts b/CSETWebNg/src/app/reports/cmmc2/executive-cmmc2/executive-cmmc2.component.ts index 78f05632a7..f6bcda0f71 100644 --- a/CSETWebNg/src/app/reports/cmmc2/executive-cmmc2/executive-cmmc2.component.ts +++ b/CSETWebNg/src/app/reports/cmmc2/executive-cmmc2/executive-cmmc2.component.ts @@ -45,6 +45,8 @@ export class ExecutiveCMMC2Component implements OnInit, AfterViewInit { responseLevels: any; responseDomains: any; + scores: any; + responseSprs: any; sprsGauge = ''; @@ -75,10 +77,9 @@ export class ExecutiveCMMC2Component implements OnInit, AfterViewInit { this.reportSvc.getReport('executivematurity').subscribe( (r: any) => { this.responseGeneral = r; - - this.targetLevel = r.maturityModels.find(m => m.maturityModelName == 'CMMC2')?.targetLevel; + this.targetLevel = r.maturityModels.find(m => m.maturityModelName == 'CMMC2F' || m.maturityModelName == 'CMMC2')?.targetLevel; }, - error => console.log('Executive report load Error: ' + (error).message) + error => console.error('Executive report load Error: ' + (error).message) ); this.maturitySvc.getSprsScore().subscribe((r: any) => { @@ -91,10 +92,20 @@ export class ExecutiveCMMC2Component implements OnInit, AfterViewInit { * */ ngAfterViewInit() { + this.populateScoringCharts(); this.populateLevelsCharts(); this.populateDomainChart(); } + /** + * + */ + populateScoringCharts() { + this.maturitySvc.getCmmcScores().subscribe(x => { + this.scores = x; + }); + } + /** * */ @@ -102,8 +113,6 @@ export class ExecutiveCMMC2Component implements OnInit, AfterViewInit { this.maturitySvc.getComplianceByLevel().subscribe((r: any) => { this.responseLevels = r; - this.responseLevels.reverse(); - r.forEach(level => { let g = level.answerDistribution.find(a => a.value == 'Y'); @@ -124,7 +133,7 @@ export class ExecutiveCMMC2Component implements OnInit, AfterViewInit { }); setTimeout(() => { - level.chart = this.chartSvc.buildDoughnutChart('level' + level.levelValue, x); + level.chart = this.chartSvc.buildDoughnutChart('level' + level.levelValue, x, 'CMMC2F'); }, 10); }); diff --git a/CSETWebNg/src/app/reports/reports.scss b/CSETWebNg/src/app/reports/reports.scss index 640ab58d91..8d7b3c4273 100644 --- a/CSETWebNg/src/app/reports/reports.scss +++ b/CSETWebNg/src/app/reports/reports.scss @@ -534,7 +534,7 @@ table.assessment-summary th { } .table.table-td-small th, .table.table-td-small td { - font-size: .875em; + font-size: .875em !important; } // force transparent diff --git a/CSETWebNg/src/app/services/chart.service.ts b/CSETWebNg/src/app/services/chart.service.ts index b989a13ae1..68025e456c 100644 --- a/CSETWebNg/src/app/services/chart.service.ts +++ b/CSETWebNg/src/app/services/chart.service.ts @@ -451,6 +451,10 @@ export class ChartService { case 'N': case 'No': return '#DC3545'; + case "I": + case "Incomplete": + case "Inc": + return '#B17300'; default: return '#000000'; } diff --git a/CSETWebNg/src/assets/i18n/en.json b/CSETWebNg/src/assets/i18n/en.json index 68fa846bb0..eaf080d245 100644 --- a/CSETWebNg/src/assets/i18n/en.json +++ b/CSETWebNg/src/assets/i18n/en.json @@ -792,11 +792,11 @@ "sectionTitle": "Capability Maturity Model Certification (CMMC) 2.0", "1": { "title": "CMMC 2.0 - Executive Summary", - "desc": "The report includes graphs to highlight compliance by level, compliance by domain, and the SPRS Scorecard. Additionally, it includes a compilation of all CMMC practices and their responses, along with their corresponding assessment objectives and SPRS value." + "desc": "The report includes graphs to highlight compliance by level, compliance by domain, and scoring by level." }, "2": { - "title": "CMMC 2.0 - Deficiency Report", - "desc": "The report contains a list of all CMMC practices that were marked as “No” or unanswered during the assessment process. This report serves to identify potential deficiencies or gaps in the contractor’s cybersecurity practices." + "title": "CMMC 2.0 - Scorecard Report", + "desc": "The report lists all practices, how they were answered and any scoring deductions for unmet practices." }, "3": { "title": "CMMC 2.0 - Comments and Marked for Review", diff --git a/CSETWebNg/src/assets/settings/config.json b/CSETWebNg/src/assets/settings/config.json index eacd1db720..48dc5e02f4 100644 --- a/CSETWebNg/src/assets/settings/config.json +++ b/CSETWebNg/src/assets/settings/config.json @@ -290,6 +290,12 @@ "buttonCss": "btn-na", "chartSegmentColor": "#0a4b6e", "consideredMissed": true + }, + { + "code": "I", + "buttonLabelKey": "inc", + "buttonCss": "btn-inc", + "consideredMissed": true } ] },