feat(frontend e back-end): termini e condizioni
All checks were successful
Build, Test and Deploy / test-backend (push) Successful in 38s
Build, Test and Deploy / build-and-push (push) Successful in 1m3s
Build, Test and Deploy / deploy (push) Successful in 11s

This commit is contained in:
2026-02-26 22:24:51 +01:00
parent 6f3e601f21
commit 80a41b0cc2
20 changed files with 504 additions and 31 deletions

View File

@@ -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 }}

View File

@@ -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) {