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

View File

@@ -225,7 +225,8 @@ export class CompleteTrialInitiationComponent implements OnInit, OnDestroy {
async orgNameEntrySubmit(): Promise<void> {
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();
} else {
await this.conditionallyCreateOrganization();