mirror of
https://github.com/bitwarden/browser
synced 2026-01-06 18:43:25 +00:00
[PM-25463] Work towards complete usage of Payments domain (#16532)
* Use payment domain * Fixing lint and test issue * Fix organization plans tax issue * PM-26297: Use existing billing address for tax calculation if it exists * PM-26344: Check existing payment method on submit
This commit is contained in:
@@ -5,8 +5,6 @@ import { filter, firstValueFrom, map, Observable, switchMap } from "rxjs";
|
||||
|
||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||
import { MessageListener } from "@bitwarden/common/platform/messaging";
|
||||
import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { BannerModule } from "@bitwarden/components";
|
||||
@@ -41,7 +39,6 @@ export class VaultBannersComponent implements OnInit {
|
||||
private router: Router,
|
||||
private accountService: AccountService,
|
||||
private messageListener: MessageListener,
|
||||
private configService: ConfigService,
|
||||
) {
|
||||
this.premiumBannerVisible$ = this.activeUserId$.pipe(
|
||||
filter((userId): userId is UserId => userId != null),
|
||||
@@ -75,16 +72,12 @@ export class VaultBannersComponent implements OnInit {
|
||||
}
|
||||
|
||||
async navigateToPaymentMethod(organizationId: string): Promise<void> {
|
||||
const managePaymentDetailsOutsideCheckout = await this.configService.getFeatureFlag(
|
||||
FeatureFlag.PM21881_ManagePaymentDetailsOutsideCheckout,
|
||||
);
|
||||
const route = managePaymentDetailsOutsideCheckout ? "payment-details" : "payment-method";
|
||||
const navigationExtras = {
|
||||
state: { launchPaymentModalAutomatically: true },
|
||||
};
|
||||
|
||||
await this.router.navigate(
|
||||
["organizations", organizationId, "billing", route],
|
||||
["organizations", organizationId, "billing", "payment-details"],
|
||||
navigationExtras,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user