From cbe7a1e8b09cde93ac75bd33aa247d66de00e6fd Mon Sep 17 00:00:00 2001 From: Cyril Joseph Date: Sat, 6 Dec 2025 09:30:37 -0400 Subject: [PATCH] feedback updates --- src/app/carnet/checkout/checkout.component.html | 9 --------- src/app/carnet/checkout/checkout.component.ts | 9 ++++++--- src/app/carnet/goods/goods.component.ts | 8 ++++---- src/app/carnet/shipping/fees-dialog.component.ts | 10 ++++++---- .../terms-conditions/terms-conditions.component.html | 1 - .../terms-conditions/terms-conditions.component.ts | 9 ++++++--- src/app/carnet/travel-plan/travel-plan.component.ts | 2 +- 7 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/app/carnet/checkout/checkout.component.html b/src/app/carnet/checkout/checkout.component.html index c59ea04..433a762 100644 --- a/src/app/carnet/checkout/checkout.component.html +++ b/src/app/carnet/checkout/checkout.component.html @@ -47,15 +47,6 @@ {{estimatedFees.ldiPremium | currency}} -
- Security Amount: - {{estimatedFees.securityAmount | currency}} -
-
- Insured Value: - {{estimatedFees.insuredValue | currency}} -
-
Total: {{ orderTotal | currency }} diff --git a/src/app/carnet/checkout/checkout.component.ts b/src/app/carnet/checkout/checkout.component.ts index a57d0a2..c2bdb26 100644 --- a/src/app/carnet/checkout/checkout.component.ts +++ b/src/app/carnet/checkout/checkout.component.ts @@ -172,9 +172,12 @@ export class CheckoutComponent { } calculateTotal(): void { - const validFees = Object.values(this.estimatedFees).filter( - (fee): fee is number => typeof fee === 'number' - ); + const excludedProperties = ['securityAmount', 'insuredValue', 'securityType']; + const validFees = Object.entries(this.estimatedFees) + .filter(([key]) => !excludedProperties.includes(key)) + .map(([, value]) => value) + .filter((fee): fee is number => typeof fee === 'number'); + this.orderTotal = validFees.reduce((total, fee) => total + fee, 0); this.orderDetails.price = this.orderTotal?.toString() ?? '0.00'; } diff --git a/src/app/carnet/goods/goods.component.ts b/src/app/carnet/goods/goods.component.ts index 1c55dea..a92db03 100644 --- a/src/app/carnet/goods/goods.component.ts +++ b/src/app/carnet/goods/goods.component.ts @@ -79,8 +79,8 @@ export class GoodsComponent { commercialSample: [false], professionalEquipment: [false], exhibitionsFair: [false], - roadVehiclesUsed: ['N'], - horseUsed: ['N'], + roadVehiclesUsed: [''], + horseUsed: [''], authorizedRepresentatives: ['', Validators.required] }, { validator: this.atLeastOneRequired } ); @@ -176,8 +176,8 @@ export class GoodsComponent { this.goodsForm.patchValue({ commercialSample: data.commercialSample || false, professionalEquipment: data.professionalEquipment || false, - exhibitionsFair: data.exhibitionsFair || 'N', - roadVehiclesUsed: data.roadVehiclesUsed || 'N', + exhibitionsFair: data.exhibitionsFair || '', + roadVehiclesUsed: data.roadVehiclesUsed || '', horseUsed: data.horseUsed || false, authorizedRepresentatives: data.authorizedRepresentatives || '' }); diff --git a/src/app/carnet/shipping/fees-dialog.component.ts b/src/app/carnet/shipping/fees-dialog.component.ts index 79ba86c..95bbbf6 100644 --- a/src/app/carnet/shipping/fees-dialog.component.ts +++ b/src/app/carnet/shipping/fees-dialog.component.ts @@ -28,7 +28,6 @@ import { NotificationService } from '../../core/services/common/notification.ser
  • LDI Premium: {{estimatedFees.ldiPremium | currency}}

  • -

    Additional Charges:


    -

    Additional Charges: