fix(front-end): improvements
All checks were successful
Build, Test and Deploy / test-backend (push) Successful in 41s
Build, Test and Deploy / build-and-push (push) Successful in 49s
Build, Test and Deploy / deploy (push) Successful in 9s

This commit is contained in:
2026-02-25 10:53:08 +01:00
parent 4ddd33662d
commit 54d12f4da0
12 changed files with 112 additions and 92 deletions

View File

@@ -7,6 +7,7 @@ import { QuoteEstimatorService } from '../calculator/services/quote-estimator.se
import { AppInputComponent } from '../../shared/components/app-input/app-input.component';
import { AppButtonComponent } from '../../shared/components/app-button/app-button.component';
import { AppCardComponent } from '../../shared/components/app-card/app-card.component';
import { AppToggleSelectorComponent, ToggleOption } from '../../shared/components/app-toggle-selector/app-toggle-selector.component';
@Component({
selector: 'app-checkout',
@@ -17,7 +18,8 @@ import { AppCardComponent } from '../../shared/components/app-card/app-card.comp
TranslateModule,
AppInputComponent,
AppButtonComponent,
AppCardComponent
AppCardComponent,
AppToggleSelectorComponent
],
templateUrl: './checkout.component.html',
styleUrls: ['./checkout.component.scss']
@@ -35,6 +37,11 @@ export class CheckoutComponent implements OnInit {
isSubmitting = signal(false); // Add signal for submit state
quoteSession = signal<any>(null); // Add signal for session details
userTypeOptions: ToggleOption[] = [
{ label: 'CONTACT.TYPE_PRIVATE', value: 'PRIVATE' },
{ label: 'CONTACT.TYPE_COMPANY', value: 'BUSINESS' }
];
constructor() {
this.checkoutForm = this.fb.group({
email: ['', [Validators.required, Validators.email]],
@@ -73,9 +80,9 @@ export class CheckoutComponent implements OnInit {
return this.checkoutForm.get('customerType')?.value === 'BUSINESS';
}
setCustomerType(isCompany: boolean) {
const type = isCompany ? 'BUSINESS' : 'PRIVATE';
setCustomerType(type: string) {
this.checkoutForm.patchValue({ customerType: type });
const isCompany = type === 'BUSINESS';
const billingGroup = this.checkoutForm.get('billingAddress') as FormGroup;
const companyControl = billingGroup.get('companyName');