1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-05 11:13:44 +00:00

pass orgId to modal component to be used in policy route

This commit is contained in:
Alex
2025-08-14 12:57:21 -04:00
parent 5f195f26a7
commit 98f8120c39

View File

@@ -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();
}
}
/**