rename callback
This commit is contained in:
parent
d2425ae5fa
commit
44c3bed329
|
@ -58,7 +58,7 @@
|
|||
*ngIf="deprecateStripeSourcesAPI"
|
||||
[showAccountCredit]="false"
|
||||
></app-payment-v2>
|
||||
<app-tax-info [trialFlow]="true" (onCountryChanged)="changedCountry()"></app-tax-info>
|
||||
<app-tax-info [trialFlow]="true" (countryChanged)="changedCountry()"></app-tax-info>
|
||||
</div>
|
||||
<div class="tw-flex tw-space-x-2">
|
||||
<button type="submit" buttonType="primary" bitButton [loading]="form.loading">
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
<bit-section>
|
||||
<h3 bitTypography="h2">{{ "paymentInformation" | i18n }}</h3>
|
||||
<app-payment-v2 [showBankAccount]="false"></app-payment-v2>
|
||||
<app-tax-info (onTaxInformationChanged)="onTaxInformationChanged()"></app-tax-info>
|
||||
<app-tax-info (taxInformationChanged)="onTaxInformationChanged()"></app-tax-info>
|
||||
<div class="tw-mb-4">
|
||||
<div class="tw-text-muted tw-text-sm tw-flex tw-flex-col">
|
||||
<span>{{ "planPrice" | i18n }}: {{ subtotal | currency: "USD $" }}</span>
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
<bit-section>
|
||||
<h3 bitTypography="h2">{{ "paymentInformation" | i18n }}</h3>
|
||||
<app-payment [hideBank]="true"></app-payment>
|
||||
<app-tax-info (onTaxInformationChanged)="onTaxInformationChanged()" />
|
||||
<app-tax-info (taxInformationChanged)="onTaxInformationChanged()" />
|
||||
<div id="price" class="tw-my-4">
|
||||
<div class="tw-text-muted tw-text-sm">
|
||||
{{ "planPrice" | i18n }}: {{ subtotal | currency: "USD $" }}
|
||||
|
|
|
@ -361,8 +361,8 @@
|
|||
</app-payment-v2>
|
||||
<app-tax-info
|
||||
*ngIf="showPayment || upgradeRequiresPaymentMethod || isPaymentSourceEmpty()"
|
||||
(onCountryChanged)="changedCountry()"
|
||||
(onTaxInformationChanged)="onTaxInformationChanged()"
|
||||
(countryChanged)="changedCountry()"
|
||||
(taxInformationChanged)="onTaxInformationChanged()"
|
||||
></app-tax-info>
|
||||
<div id="price" class="tw-mt-4">
|
||||
<p class="tw-text-lg tw-mb-1">
|
||||
|
|
|
@ -441,8 +441,8 @@
|
|||
*ngIf="deprecateStripeSourcesAPI && (createOrganization || upgradeRequiresPaymentMethod)"
|
||||
></app-payment-v2>
|
||||
<app-tax-info
|
||||
(onCountryChanged)="changedCountry()"
|
||||
(onTaxInformationChanged)="onTaxInformationChanged()"
|
||||
(countryChanged)="changedCountry()"
|
||||
(taxInformationChanged)="onTaxInformationChanged()"
|
||||
class="tw-my-4"
|
||||
/>
|
||||
<div id="price" class="tw-my-4">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
[showBankAccount]="!!organizationId"
|
||||
[initialPaymentMethod]="initialPaymentMethod"
|
||||
></app-payment-v2>
|
||||
<app-tax-info (onCountryChanged)="onCountryChanged()"></app-tax-info>
|
||||
<app-tax-info (countryChanged)="onCountryChanged()"></app-tax-info>
|
||||
</ng-container>
|
||||
<ng-container bitDialogFooter>
|
||||
<button type="submit" bitButton bitFormButton buttonType="primary" [bitAction]="submit">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
>
|
||||
<ng-container bitDialogContent>
|
||||
<app-payment [hideBank]="!organizationId" [hideCredit]="true"></app-payment>
|
||||
<app-tax-info (onCountryChanged)="changeCountry()"></app-tax-info>
|
||||
<app-tax-info (countryChanged)="changeCountry()"></app-tax-info>
|
||||
</ng-container>
|
||||
<ng-container bitDialogFooter>
|
||||
<button type="submit" bitButton bitFormButton buttonType="primary">
|
||||
|
|
|
@ -24,8 +24,8 @@ export class TaxInfoComponent implements OnInit, OnDestroy {
|
|||
private destroy$ = new Subject<void>();
|
||||
|
||||
@Input() trialFlow = false;
|
||||
@Output() onCountryChanged = new EventEmitter();
|
||||
@Output() onTaxInformationChanged: EventEmitter<void> = new EventEmitter<void>();
|
||||
@Output() countryChanged = new EventEmitter();
|
||||
@Output() taxInformationChanged: EventEmitter<void> = new EventEmitter<void>();
|
||||
|
||||
taxFormGroup = new FormGroup({
|
||||
country: new FormControl<string>(null, [Validators.required]),
|
||||
|
@ -121,7 +121,7 @@ export class TaxInfoComponent implements OnInit, OnDestroy {
|
|||
this.taxFormGroup.controls.country.value,
|
||||
);
|
||||
|
||||
this.onCountryChanged.emit();
|
||||
this.countryChanged.emit();
|
||||
});
|
||||
|
||||
this.taxFormGroup.controls.country.valueChanges
|
||||
|
@ -144,21 +144,21 @@ export class TaxInfoComponent implements OnInit, OnDestroy {
|
|||
this.taxFormGroup.controls.state.setValue(null);
|
||||
}
|
||||
|
||||
this.onCountryChanged.emit();
|
||||
this.countryChanged.emit();
|
||||
});
|
||||
this.onTaxInformationChanged.emit();
|
||||
this.taxInformationChanged.emit();
|
||||
});
|
||||
|
||||
this.taxFormGroup.controls.postalCode.valueChanges
|
||||
.pipe(debounceTime(1000), takeUntil(this.destroy$))
|
||||
.subscribe(() => {
|
||||
this.onTaxInformationChanged.emit();
|
||||
this.taxInformationChanged.emit();
|
||||
});
|
||||
|
||||
this.taxFormGroup.controls.taxId.valueChanges
|
||||
.pipe(debounceTime(1000), takeUntil(this.destroy$))
|
||||
.subscribe(() => {
|
||||
this.onTaxInformationChanged.emit();
|
||||
this.taxInformationChanged.emit();
|
||||
});
|
||||
|
||||
this.loading = false;
|
||||
|
|
Loading…
Reference in New Issue