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