feat(frontend e back-end): termini e condizioni
This commit is contained in:
@@ -98,6 +98,22 @@
|
||||
</div>
|
||||
</app-card>
|
||||
|
||||
<div class="legal-consent">
|
||||
<label class="checkbox-container">
|
||||
<input type="checkbox" formControlName="acceptLegal">
|
||||
<span class="checkmark"></span>
|
||||
<span>
|
||||
{{ 'LEGAL.CONSENT.LABEL_PREFIX' | translate }}
|
||||
<a href="/terms" target="_blank" rel="noopener">{{ 'LEGAL.CONSENT.TERMS_LINK' | translate }}</a>
|
||||
{{ 'LEGAL.CONSENT.AND' | translate }}
|
||||
<a href="/privacy" target="_blank" rel="noopener">{{ 'LEGAL.CONSENT.PRIVACY_LINK' | translate }}</a>.
|
||||
</span>
|
||||
</label>
|
||||
<div class="consent-error" *ngIf="checkoutForm.get('acceptLegal')?.invalid && checkoutForm.get('acceptLegal')?.touched">
|
||||
{{ 'LEGAL.CONSENT.REQUIRED_ERROR' | translate }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<app-button type="submit" [disabled]="checkoutForm.invalid || isSubmitting()" [fullWidth]="true">
|
||||
{{ (isSubmitting() ? 'CHECKOUT.PROCESSING' : 'CHECKOUT.PLACE_ORDER') | translate }}
|
||||
|
||||
@@ -49,6 +49,7 @@ export class CheckoutComponent implements OnInit {
|
||||
customerType: ['PRIVATE', Validators.required], // Default to PRIVATE
|
||||
|
||||
shippingSameAsBilling: [true],
|
||||
acceptLegal: [false, Validators.requiredTrue],
|
||||
|
||||
billingAddress: this.fb.group({
|
||||
firstName: ['', Validators.required],
|
||||
@@ -189,7 +190,9 @@ export class CheckoutComponent implements OnInit {
|
||||
city: formVal.shippingAddress.city,
|
||||
countryCode: formVal.shippingAddress.countryCode
|
||||
},
|
||||
shippingSameAsBilling: formVal.shippingSameAsBilling
|
||||
shippingSameAsBilling: formVal.shippingSameAsBilling,
|
||||
acceptTerms: formVal.acceptLegal,
|
||||
acceptPrivacy: formVal.acceptLegal
|
||||
};
|
||||
|
||||
if (!this.sessionId) {
|
||||
|
||||
Reference in New Issue
Block a user