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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user