mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
Fix the failing billing steps (#15459)
This commit is contained in:
@@ -48,7 +48,7 @@
|
|||||||
<app-vertical-step
|
<app-vertical-step
|
||||||
label="Billing"
|
label="Billing"
|
||||||
[subLabel]="billingSubLabel"
|
[subLabel]="billingSubLabel"
|
||||||
*ngIf="(trialPaymentOptional$ | async) && trialLength === 0 && !isSecretsManagerFree"
|
*ngIf="showBillingStep$ | async"
|
||||||
>
|
>
|
||||||
<app-trial-billing-step
|
<app-trial-billing-step
|
||||||
*ngIf="stepper.selectedIndex === 2"
|
*ngIf="stepper.selectedIndex === 2"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { StepperSelectionEvent } from "@angular/cdk/stepper";
|
|||||||
import { Component, OnDestroy, OnInit, ViewChild } from "@angular/core";
|
import { Component, OnDestroy, OnInit, ViewChild } from "@angular/core";
|
||||||
import { FormBuilder, Validators } from "@angular/forms";
|
import { FormBuilder, Validators } from "@angular/forms";
|
||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
import { firstValueFrom, Subject, switchMap, takeUntil } from "rxjs";
|
import { combineLatest, firstValueFrom, map, Subject, switchMap, takeUntil } from "rxjs";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
InputPasswordFlow,
|
InputPasswordFlow,
|
||||||
@@ -101,6 +101,9 @@ export class CompleteTrialInitiationComponent implements OnInit, OnDestroy {
|
|||||||
protected trialPaymentOptional$ = this.configService.getFeatureFlag$(
|
protected trialPaymentOptional$ = this.configService.getFeatureFlag$(
|
||||||
FeatureFlag.TrialPaymentOptional,
|
FeatureFlag.TrialPaymentOptional,
|
||||||
);
|
);
|
||||||
|
protected allowTrialLengthZero$ = this.configService.getFeatureFlag$(
|
||||||
|
FeatureFlag.AllowTrialLengthZero,
|
||||||
|
);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected router: Router,
|
protected router: Router,
|
||||||
@@ -334,6 +337,18 @@ export class CompleteTrialInitiationComponent implements OnInit, OnDestroy {
|
|||||||
return this.productTier;
|
return this.productTier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readonly showBillingStep$ = combineLatest([
|
||||||
|
this.trialPaymentOptional$,
|
||||||
|
this.allowTrialLengthZero$,
|
||||||
|
]).pipe(
|
||||||
|
map(([trialPaymentOptional, allowTrialLengthZero]) => {
|
||||||
|
return (
|
||||||
|
(!trialPaymentOptional && !this.isSecretsManagerFree) ||
|
||||||
|
(trialPaymentOptional && allowTrialLengthZero && this.trialLength === 0)
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
/** Create an organization unless the trial is for secrets manager */
|
/** Create an organization unless the trial is for secrets manager */
|
||||||
async conditionallyCreateOrganization(): Promise<void> {
|
async conditionallyCreateOrganization(): Promise<void> {
|
||||||
if (!this.isSecretsManagerFree) {
|
if (!this.isSecretsManagerFree) {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export enum FeatureFlag {
|
|||||||
PM17772_AdminInitiatedSponsorships = "pm-17772-admin-initiated-sponsorships",
|
PM17772_AdminInitiatedSponsorships = "pm-17772-admin-initiated-sponsorships",
|
||||||
PM19956_RequireProviderPaymentMethodDuringSetup = "pm-19956-require-provider-payment-method-during-setup",
|
PM19956_RequireProviderPaymentMethodDuringSetup = "pm-19956-require-provider-payment-method-during-setup",
|
||||||
UseOrganizationWarningsService = "use-organization-warnings-service",
|
UseOrganizationWarningsService = "use-organization-warnings-service",
|
||||||
|
AllowTrialLengthZero = "pm-20322-allow-trial-length-0",
|
||||||
|
|
||||||
/* Data Insights and Reporting */
|
/* Data Insights and Reporting */
|
||||||
EnableRiskInsightsNotifications = "enable-risk-insights-notifications",
|
EnableRiskInsightsNotifications = "enable-risk-insights-notifications",
|
||||||
@@ -114,6 +115,7 @@ export const DefaultFeatureFlagValue = {
|
|||||||
[FeatureFlag.PM17772_AdminInitiatedSponsorships]: FALSE,
|
[FeatureFlag.PM17772_AdminInitiatedSponsorships]: FALSE,
|
||||||
[FeatureFlag.PM19956_RequireProviderPaymentMethodDuringSetup]: FALSE,
|
[FeatureFlag.PM19956_RequireProviderPaymentMethodDuringSetup]: FALSE,
|
||||||
[FeatureFlag.UseOrganizationWarningsService]: FALSE,
|
[FeatureFlag.UseOrganizationWarningsService]: FALSE,
|
||||||
|
[FeatureFlag.AllowTrialLengthZero]: FALSE,
|
||||||
|
|
||||||
/* Key Management */
|
/* Key Management */
|
||||||
[FeatureFlag.PrivateKeyRegeneration]: FALSE,
|
[FeatureFlag.PrivateKeyRegeneration]: FALSE,
|
||||||
|
|||||||
Reference in New Issue
Block a user