From 98f8120c39943375db105b36e129c6789587cb0e Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 14 Aug 2025 12:57:21 -0400 Subject: [PATCH] pass orgId to modal component to be used in policy route --- .../all-applications.component.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-applications.component.ts b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-applications.component.ts index 2f388c845be..4a0333f3369 100644 --- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-applications.component.ts +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/all-applications.component.ts @@ -65,6 +65,7 @@ export class AllApplicationsComponent implements OnInit { }; private hasShownNoDataModal = false; // Flag to prevent multiple modals + private organizationId: string | null = null; destroyRef = inject(DestroyRef); constructor( @@ -86,9 +87,9 @@ export class AllApplicationsComponent implements OnInit { } async ngOnInit() { - const organizationId = this.activatedRoute.snapshot.paramMap.get("organizationId"); + this.organizationId = this.activatedRoute.snapshot.paramMap.get("organizationId"); - if (organizationId) { + if (this.organizationId) { this.dataService.reportResults$ .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((report) => { @@ -111,15 +112,13 @@ export class AllApplicationsComponent implements OnInit { // Set flag to prevent multiple modals this.hasShownNoDataModal = true; - const result = this.dialogService.open(NoDataModalComponent, { - data: {}, + this.dialogService.open(NoDataModalComponent, { + data: { + organizationId: this.organizationId, + riskInsightsDataService: this.dataService, + }, disableClose: false, }); - - if (result) { - // User clicked "Run Report" - trigger the report - this.dataService.triggerReport(); - } } /**