From bf7946a5ba80fba374c3a6709c5bd2d5d67c4f42 Mon Sep 17 00:00:00 2001 From: John Harrington <84741727+harr1424@users.noreply.github.com> Date: Thu, 2 Oct 2025 09:06:06 -0700 Subject: [PATCH] address remaining review items --- .../export-scope-callout.component.ts | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts b/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts index a85048c23fa..7ffa847a72d 100644 --- a/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts +++ b/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts @@ -9,7 +9,9 @@ import { OrganizationService } from "@bitwarden/common/admin-console/abstraction import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; import { getById } from "@bitwarden/common/platform/misc/rxjs-operators"; +import { OrganizationId } from "@bitwarden/common/types/guid"; import { CalloutModule } from "@bitwarden/components"; +import { ExportFormat } from "@bitwarden/vault-export-core"; @Component({ selector: "tools-export-scope-callout", @@ -25,9 +27,9 @@ export class ExportScopeCalloutComponent { }; /* Optional OrganizationId, if not provided, it will display individual vault export message */ - readonly organizationId = input(); + readonly organizationId = input(); /* Optional export format, determines which individual export description to display */ - readonly exportFormat = input(); + readonly exportFormat = input(); /* The description key to use for organizational exports */ readonly orgExportDescription = input(); @@ -47,8 +49,8 @@ export class ExportScopeCalloutComponent { } private async getScopeMessage( - organizationId: string, - exportFormat: string, + organizationId: OrganizationId | undefined, + exportFormat: ExportFormat | undefined, orgExportDescription: string, ): Promise { const userId = await firstValueFrom(getUserId(this.accountService.activeAccount$)); @@ -64,18 +66,19 @@ export class ExportScopeCalloutComponent { description: orgExportDescription, scopeIdentifier: org?.name ?? "", }; - } else { - this.scopeConfig = { - // exporting from individual vault - title: "exportingPersonalVaultTitle", - description: - exportFormat === "zip" - ? "exportingIndividualVaultWithAttachmentsDescription" - : "exportingIndividualVaultDescription", - scopeIdentifier: - (await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.email)))) ?? - "", - }; + + return; } + + // exporting from individual vault + this.scopeConfig = { + title: "exportingPersonalVaultTitle", + description: + exportFormat === "zip" + ? "exportingIndividualVaultWithAttachmentsDescription" + : "exportingIndividualVaultDescription", + scopeIdentifier: + (await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.email)))) ?? "", + }; } }