Skip to content

Commit

Permalink
chore: removed fiscal code for pro from this release
Browse files Browse the repository at this point in the history
  • Loading branch information
urz9999 committed Oct 5, 2023
1 parent 1e63bb9 commit 78de105
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ <h2>Upgrade to Pro</h2>
(keyup)="checkAndConfirm();">
<small class="text-error" *ngIf="(emailFormControl.dirty || emailFormControl.touched) && emailFormControl.errors">Insert a valid email address</small>
</div>
<small><strong>Fiscal Code (only for italian customers)</strong></small>
<br>
<div class="form-field">
<!-- <label>Email address*</label> -->
<input spellcheck="false" formControlName="fiscalCode" type="text" class="form-control" placeholder="fiscal code, only for italian customers"
(keyup)="checkAndConfirm();">
<small class="text-error" *ngIf="(fiscalCodeFormControl.dirty || fiscalCodeFormControl.touched) && fiscalCodeFormControl.errors">Insert a valid fiscal code</small>
</div>
<!-- <small><strong>Fiscal Code (only for italian customers)</strong></small>-->
<!-- <br>-->
<!-- <div class="form-field">-->
<!-- &lt;!&ndash; <label>Email address*</label> &ndash;&gt;-->
<!-- <input spellcheck="false" formControlName="fiscalCode" type="text" class="form-control" placeholder="fiscal code, only for italian customers"-->
<!-- (keyup)="checkAndConfirm();">-->
<!-- <small class="text-error" *ngIf="(fiscalCodeFormControl.dirty || fiscalCodeFormControl.touched) && fiscalCodeFormControl.errors">Insert a valid fiscal code</small>-->
<!-- </div>-->
</form>
<br>
<br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ export class LeappProPreCheckoutDialogComponent implements OnInit {

public emailFormControl = new FormControl("", [Validators.required, Validators.email]);
public planFormControl = new FormControl("annually");
public fiscalCodeFormControl = new FormControl("", [Validators.pattern(/^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$/)]);
// public fiscalCodeFormControl = new FormControl("", [Validators.pattern(/^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$/)]);

public form = new FormGroup({
email: this.emailFormControl,
plan: this.planFormControl,
fiscalCode: this.fiscalCodeFormControl,
// fiscalCode: this.fiscalCodeFormControl,
});

public selectedPeriod: BillingPeriod = BillingPeriod.yearly;
public isEmailValid = false;
public isCFValid = false;
// public isCFValid = false;
public price: any;
private prices: any[];

Expand Down Expand Up @@ -68,14 +68,14 @@ export class LeappProPreCheckoutDialogComponent implements OnInit {
}

async upgradeToLeappPro(): Promise<void> {
if (this.isEmailValid && this.isCFValid) {
if (this.isEmailValid /* && this.isCFValid*/) {
let checkoutUrl = "";
try {
this.isRedirectingToCheckout = true;
checkoutUrl = await this.appProviderService.teamService.createCheckoutSession(
this.emailFormControl.value,
this.price,
this.fiscalCodeFormControl?.value
this.price
// this.fiscalCodeFormControl?.value
);
this.isRedirectingToCheckout = false;
} catch (error) {
Expand Down Expand Up @@ -142,7 +142,7 @@ export class LeappProPreCheckoutDialogComponent implements OnInit {
this.emailFormControl.markAsTouched();
this.isEmailValid = this.emailFormControl.valid;

this.fiscalCodeFormControl.markAsTouched();
this.isCFValid = this.fiscalCodeFormControl.valid;
// this.fiscalCodeFormControl.markAsTouched();
// this.isCFValid = this.fiscalCodeFormControl.valid;
}
}

0 comments on commit 78de105

Please sign in to comment.