mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 05:53:42 +00:00
[Account Recovery][PM-18721] update as const / type
This commit is contained in:
@@ -53,12 +53,12 @@ export type AccountRecoveryDialogData = {
|
||||
organizationId: OrganizationId;
|
||||
};
|
||||
|
||||
export const AccountRecoveryDialogResultTypes = {
|
||||
export const AccountRecoveryDialogResultType = {
|
||||
Ok: "ok",
|
||||
} as const;
|
||||
|
||||
type AccountRecoveryDialogResultType =
|
||||
(typeof AccountRecoveryDialogResultTypes)[keyof typeof AccountRecoveryDialogResultTypes];
|
||||
export type AccountRecoveryDialogResultType =
|
||||
(typeof AccountRecoveryDialogResultType)[keyof typeof AccountRecoveryDialogResultType];
|
||||
|
||||
/**
|
||||
* Used in a dialog for initiating the account recovery process against a
|
||||
@@ -144,7 +144,7 @@ export class AccountRecoveryDialogComponent {
|
||||
this.parentSubmittingBehaviorSubject.next(false);
|
||||
}
|
||||
|
||||
this.dialogRef.close(AccountRecoveryDialogResultTypes.Ok);
|
||||
this.dialogRef.close(AccountRecoveryDialogResultType.Ok);
|
||||
}
|
||||
|
||||
protected handleIsSubmittingChange(isSubmitting: boolean) {
|
||||
|
||||
@@ -69,7 +69,7 @@ import { openEntityEventsDialog } from "../manage/entity-events.component";
|
||||
|
||||
import {
|
||||
AccountRecoveryDialogComponent,
|
||||
AccountRecoveryDialogResultTypes,
|
||||
AccountRecoveryDialogResultType,
|
||||
} from "./components/account-recovery/account-recovery-dialog.component";
|
||||
import { BulkConfirmDialogComponent } from "./components/bulk/bulk-confirm-dialog.component";
|
||||
import { BulkDeleteDialogComponent } from "./components/bulk/bulk-delete-dialog.component";
|
||||
@@ -758,7 +758,7 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
|
||||
});
|
||||
|
||||
const result = await lastValueFrom(dialogRef.closed);
|
||||
if (result === AccountRecoveryDialogResultTypes.Ok) {
|
||||
if (result === AccountRecoveryDialogResultType.Ok) {
|
||||
await this.load();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user