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:
@@ -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"
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user