1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 04:03:29 +00:00

fix(risk-insights): update data service and activity component for NewApplicationDetail type

RiskInsightsDataService:
- Import NewApplicationDetail type from models
- Update newApplications$ type to Observable<NewApplicationDetail[]>
- Correctly expose orchestrator's enriched application data

AllActivityComponent:
- Import NewApplicationDetail type
- Update newApplications property to NewApplicationDetail[]
- Subscription and dialog data passing now type-safe

Fixes TypeScript compilation errors after orchestrator type change.
This commit is contained in:
Alex
2025-10-31 16:23:34 -04:00
parent 6f5d96ea75
commit 5e7f2429aa
2 changed files with 4 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ import {
ReportState,
DrawerDetails,
DrawerType,
NewApplicationDetail,
RiskInsightsEnrichedData,
ReportStatus,
} from "../../models";
@@ -38,7 +39,7 @@ export class RiskInsightsDataService {
readonly hasCiphers$: Observable<boolean | null> = of(null);
// New applications that need review (reviewedDate === null)
readonly newApplications$: Observable<string[]> = of([]);
readonly newApplications$: Observable<NewApplicationDetail[]> = of([]);
// ------------------------- Drawer Variables ---------------------
// Drawer variables unified into a single BehaviorSubject

View File

@@ -5,6 +5,7 @@ import { firstValueFrom } from "rxjs";
import {
AllActivitiesService,
NewApplicationDetail,
ReportStatus,
RiskInsightsDataService,
} from "@bitwarden/bit-common/dirt/reports/risk-insights";
@@ -40,7 +41,7 @@ export class AllActivityComponent implements OnInit {
totalCriticalAppsCount = 0;
totalCriticalAppsAtRiskCount = 0;
newApplicationsCount = 0;
newApplications: string[] = [];
newApplications: NewApplicationDetail[] = [];
passwordChangeMetricHasProgressBar = false;
destroyRef = inject(DestroyRef);