feedback updates
This commit is contained in:
parent
fe21c846c8
commit
cbe7a1e8b0
@ -47,15 +47,6 @@
|
||||
<span>{{estimatedFees.ldiPremium | currency}}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="estimatedFees.securityAmount" class="summary-item">
|
||||
<span>Security Amount: </span>
|
||||
<span>{{estimatedFees.securityAmount | currency}}</span>
|
||||
</div>
|
||||
<div *ngIf="estimatedFees.insuredValue" class="summary-item">
|
||||
<span>Insured Value: </span>
|
||||
<span>{{estimatedFees.insuredValue | currency}}</span>
|
||||
</div>
|
||||
|
||||
<div class="summary-item total">
|
||||
<strong>Total:</strong>
|
||||
<strong>{{ orderTotal | currency }}</strong>
|
||||
|
||||
@ -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';
|
||||
}
|
||||
|
||||
@ -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 || ''
|
||||
});
|
||||
|
||||
@ -28,7 +28,6 @@ import { NotificationService } from '../../core/services/common/notification.ser
|
||||
<li *ngIf="estimatedFees.ldiPremium">LDI Premium: {{estimatedFees.ldiPremium | currency}}</li>
|
||||
</ul>
|
||||
<hr/>
|
||||
<p>Additional Charges:</p>
|
||||
<ul>
|
||||
<li *ngIf="estimatedFees.securityAmount">Security Amount: {{estimatedFees.securityAmount | currency}}</li>
|
||||
<li *ngIf="estimatedFees.insuredValue">Insured Value: {{estimatedFees.insuredValue | currency}}</li>
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
<li *ngIf="estimatedFees.ldiPremium">LDI Premium: {{estimatedFees.ldiPremium | currency}}</li>
|
||||
</ul>
|
||||
<hr />
|
||||
<p>Additional Charges:</p>
|
||||
<ul>
|
||||
<li *ngIf="estimatedFees.securityAmount">Security Amount: {{estimatedFees.securityAmount | currency}}
|
||||
</li>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user