From 1846293b9b41a8991daa114d36cfc799cd3bcd9f Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 28 Oct 2025 17:41:34 -0400 Subject: [PATCH] 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 --- .../services/view/risk-insights-data.service.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/view/risk-insights-data.service.ts b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/view/risk-insights-data.service.ts index 6855274498a..4dee99ae044 100644 --- a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/view/risk-insights-data.service.ts +++ b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/view/risk-insights-data.service.ts @@ -29,6 +29,9 @@ export class RiskInsightsDataService { readonly isGeneratingReport$: Observable = of(false); readonly criticalReportResults$: Observable = of(null); + // New applications that need review (reviewedDate === null) + readonly newApplications$: Observable = of([]); + // ------------------------- Drawer Variables --------------------- // Drawer variables unified into a single BehaviorSubject private drawerDetailsSubject = new BehaviorSubject({ @@ -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); + } }