1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

Dont skip payment details if triallength is zero (#15268)

This commit is contained in:
cyprain-okeke
2025-06-30 13:58:41 +01:00
committed by GitHub
parent 8fec95671d
commit 043d8b3533
2 changed files with 8 additions and 3 deletions

View File

@@ -38,13 +38,17 @@
[loading]="loading && (trialPaymentOptional$ | async)" [loading]="loading && (trialPaymentOptional$ | async)"
(click)="orgNameEntrySubmit()" (click)="orgNameEntrySubmit()"
> >
{{ (trialPaymentOptional$ | async) ? ("startTrial" | i18n) : ("next" | i18n) }} {{
(trialPaymentOptional$ | async) && trialLength > 0
? ("startTrial" | i18n)
: ("next" | i18n)
}}
</button> </button>
</app-vertical-step> </app-vertical-step>
<app-vertical-step <app-vertical-step
label="Billing" label="Billing"
[subLabel]="billingSubLabel" [subLabel]="billingSubLabel"
*ngIf="!(trialPaymentOptional$ | async) && !isSecretsManagerFree" *ngIf="(trialPaymentOptional$ | async) && trialLength === 0 && !isSecretsManagerFree"
> >
<app-trial-billing-step <app-trial-billing-step
*ngIf="stepper.selectedIndex === 2" *ngIf="stepper.selectedIndex === 2"

View File

@@ -225,7 +225,8 @@ export class CompleteTrialInitiationComponent implements OnInit, OnDestroy {
async orgNameEntrySubmit(): Promise<void> { async orgNameEntrySubmit(): Promise<void> {
const isTrialPaymentOptional = await firstValueFrom(this.trialPaymentOptional$); const isTrialPaymentOptional = await firstValueFrom(this.trialPaymentOptional$);
if (isTrialPaymentOptional) { /** Only skip payment if the flag is on AND trialLength > 0 */
if (isTrialPaymentOptional && this.trialLength > 0) {
await this.createOrganizationOnTrial(); await this.createOrganizationOnTrial();
} else { } else {
await this.conditionallyCreateOrganization(); await this.conditionallyCreateOrganization();