1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-03 10:13:31 +00:00

feat(dirt): expose newApplications$ in data service

Expose orchestrator's newApplications$ observable and save method
through RiskInsightsDataService facade. Maintains clean separation
between orchestrator (business logic) and components (UI).

- Expose newApplications$ observable
- Expose saveApplicationReviewStatus() delegation method
- Maintains facade pattern consistency

Related to PM-27284
This commit is contained in:
Alex
2025-10-28 17:41:34 -04:00
parent 2c090852de
commit 1846293b9b

View File

@@ -29,6 +29,9 @@ export class RiskInsightsDataService {
readonly isGeneratingReport$: Observable<boolean> = of(false);
readonly criticalReportResults$: Observable<RiskInsightsEnrichedData | null> = of(null);
// New applications that need review (reviewedDate === null)
readonly newApplications$: Observable<string[]> = of([]);
// ------------------------- Drawer Variables ---------------------
// Drawer variables unified into a single BehaviorSubject
private drawerDetailsSubject = new BehaviorSubject<DrawerDetails>({
@@ -48,6 +51,7 @@ export class RiskInsightsDataService {
this.organizationDetails$ = this.orchestrator.organizationDetails$;
this.enrichedReportData$ = this.orchestrator.enrichedReportData$;
this.criticalReportResults$ = this.orchestrator.criticalReportResults$;
this.newApplications$ = this.orchestrator.newApplications$;
// Expose the loading state
this.isLoading$ = this.reportState$.pipe(
@@ -242,4 +246,8 @@ export class RiskInsightsDataService {
removeCriticalApplication(hostname: string) {
return this.orchestrator.removeCriticalApplication$(hostname);
}
saveApplicationReviewStatus(selectedCriticalApps: string[]) {
return this.orchestrator.saveApplicationReviewStatus$(selectedCriticalApps);
}
}