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}}
-
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:
- Security Amount: {{estimatedFees.securityAmount | currency}}
- Insured Value: {{estimatedFees.insuredValue | currency}}
@@ -98,9 +97,12 @@ export class FeesDialogComponent {
}
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.total = validFees.reduce((total, fee) => total + fee, 0);
}
diff --git a/src/app/carnet/terms-conditions/terms-conditions.component.html b/src/app/carnet/terms-conditions/terms-conditions.component.html
index 92d3bd3..ae92c29 100644
--- a/src/app/carnet/terms-conditions/terms-conditions.component.html
+++ b/src/app/carnet/terms-conditions/terms-conditions.component.html
@@ -24,7 +24,6 @@
- LDI Premium: {{estimatedFees.ldiPremium | currency}}
-
Additional Charges:
- Security Amount: {{estimatedFees.securityAmount | currency}}
diff --git a/src/app/carnet/terms-conditions/terms-conditions.component.ts b/src/app/carnet/terms-conditions/terms-conditions.component.ts
index be1cb65..0dca427 100644
--- a/src/app/carnet/terms-conditions/terms-conditions.component.ts
+++ b/src/app/carnet/terms-conditions/terms-conditions.component.ts
@@ -144,9 +144,12 @@ export class TermsConditionsComponent {
}
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.total = validFees.reduce((total, fee) => total + fee, 0);
}
}
\ No newline at end of file
diff --git a/src/app/carnet/travel-plan/travel-plan.component.ts b/src/app/carnet/travel-plan/travel-plan.component.ts
index 0ba69f8..6eb199c 100644
--- a/src/app/carnet/travel-plan/travel-plan.component.ts
+++ b/src/app/carnet/travel-plan/travel-plan.component.ts
@@ -91,7 +91,7 @@ export class TravelPlanComponent {
if (this.selectedAvailableVisitCountry.actionType === 'FYI') {
this.fyiAction(this.selectedAvailableVisitCountry);
- } else if (this.selectedAvailableVisitCountry.actionType === 'WARNING') {
+ } else if (this.selectedAvailableVisitCountry.actionType === 'WARN') {
this.warningAction(this.selectedAvailableVisitCountry);
} else if (this.selectedAvailableVisitCountry.actionType === 'ACTION') {
this.takeAction(this.selectedAvailableVisitCountry);