mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
Fix restart subscription modal showing twice from switcher (#16973)
This commit is contained in:
@@ -22,7 +22,6 @@
|
|||||||
[route]="['../', org.id]"
|
[route]="['../', org.id]"
|
||||||
(mainContentClicked)="toggle()"
|
(mainContentClicked)="toggle()"
|
||||||
[routerLinkActiveOptions]="{ exact: true }"
|
[routerLinkActiveOptions]="{ exact: true }"
|
||||||
(click)="showInactiveSubscriptionDialog(org)"
|
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
slot="end"
|
slot="end"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
import { combineLatest, firstValueFrom, map, Observable, switchMap } from "rxjs";
|
import { combineLatest, map, Observable, switchMap } from "rxjs";
|
||||||
|
|
||||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||||
@@ -12,7 +12,6 @@ import { AccountService } from "@bitwarden/common/auth/abstractions/account.serv
|
|||||||
import { BillingApiServiceAbstraction } from "@bitwarden/common/billing/abstractions/billing-api.service.abstraction";
|
import { BillingApiServiceAbstraction } from "@bitwarden/common/billing/abstractions/billing-api.service.abstraction";
|
||||||
import { DialogService, NavigationModule } from "@bitwarden/components";
|
import { DialogService, NavigationModule } from "@bitwarden/components";
|
||||||
import { OrganizationWarningsModule } from "@bitwarden/web-vault/app/billing/organizations/warnings/organization-warnings.module";
|
import { OrganizationWarningsModule } from "@bitwarden/web-vault/app/billing/organizations/warnings/organization-warnings.module";
|
||||||
import { OrganizationWarningsService } from "@bitwarden/web-vault/app/billing/organizations/warnings/services";
|
|
||||||
|
|
||||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||||
@@ -76,7 +75,6 @@ export class OrgSwitcherComponent {
|
|||||||
private organizationService: OrganizationService,
|
private organizationService: OrganizationService,
|
||||||
protected billingApiService: BillingApiServiceAbstraction,
|
protected billingApiService: BillingApiServiceAbstraction,
|
||||||
private accountService: AccountService,
|
private accountService: AccountService,
|
||||||
private organizationWarningsService: OrganizationWarningsService,
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
protected toggle(event?: MouseEvent) {
|
protected toggle(event?: MouseEvent) {
|
||||||
@@ -84,9 +82,4 @@ export class OrgSwitcherComponent {
|
|||||||
this.open = !this.open;
|
this.open = !this.open;
|
||||||
this.openChange.emit(this.open);
|
this.openChange.emit(this.open);
|
||||||
}
|
}
|
||||||
|
|
||||||
showInactiveSubscriptionDialog = async (organization: Organization) =>
|
|
||||||
await firstValueFrom(
|
|
||||||
this.organizationWarningsService.showInactiveSubscriptionDialog$(organization),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user