-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3997 from cisagov/feat/CSET-2813
Report refactor: Feat/cset 2813
- Loading branch information
Showing
38 changed files
with
317 additions
and
836 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
...p/assessment/results/reports/report-list/report-list-acet/report-list-acet.component.html
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
...app/assessment/results/reports/report-list/report-list-acet/report-list-acet.component.ts
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
...p/assessment/results/reports/report-list/report-list-c2m2/report-list-c2m2.component.html
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
...app/assessment/results/reports/report-list/report-list-c2m2/report-list-c2m2.component.ts
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
...app/assessment/results/reports/report-list/report-list-cis/report-list-cis.component.html
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
...c/app/assessment/results/reports/report-list/report-list-cis/report-list-cis.component.ts
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
...p/assessment/results/reports/report-list/report-list-cmmc/report-list-cmmc.component.html
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
...app/assessment/results/reports/report-list/report-list-cmmc/report-list-cmmc.component.ts
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
...assessment/results/reports/report-list/report-list-cmmc2/report-list-cmmc2.component.html
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
...p/assessment/results/reports/report-list/report-list-cmmc2/report-list-cmmc2.component.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
CSETWebNg/src/app/assessment/results/reports/report-list/report-list-common.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; | ||
|
||
|
||
@Component({ | ||
selector: 'app-report-list-common', | ||
templateUrl: './report-list-common.component.html' | ||
}) | ||
|
||
export class ReportListCommonComponent implements OnChanges{ | ||
@Input() sectionId: string; | ||
|
||
jsonData: any; | ||
reportList: any[] = []; | ||
|
||
constructor() { | ||
// Load JSON data | ||
this.jsonData = require('./report-list.json'); | ||
} | ||
|
||
ngOnChanges(changes: SimpleChanges): void { | ||
if (changes['sectionId']) { | ||
this.reportList = this.getReportList(this.sectionId); | ||
} | ||
} | ||
|
||
getReportList(sectionId: string): any[] { | ||
const result = this.jsonData.find(item => item.title === sectionId); | ||
// Check if the result exists and return the reportList or an empty array if not found | ||
return result ? result.reportList : []; | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
...app/assessment/results/reports/report-list/report-list-crr/report-list-crr.component.html
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
...c/app/assessment/results/reports/report-list/report-list-crr/report-list-crr.component.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.