Merge pull request #1726 from Safelite/rlsmerge/2024.02.15-to-end-to-end
Release merge 2024.02.15 to End-To-End-Insurance
This commit is contained in:
commit
7ce96c19a2
2 changed files with 16 additions and 18 deletions
|
|
@ -153,11 +153,11 @@ const MOBILE_FEE_PART_TYPE = "MOBILE FEE";
|
|||
// DEFINE VALIDATION RULES
|
||||
defineRule("mobile-location-required", (value) => {
|
||||
if (
|
||||
value.addressQuestions.streetAddress == "" ||
|
||||
value.addressQuestions.city == "" ||
|
||||
value.addressQuestions.state == "" ||
|
||||
value.addressQuestions.zipCode == "" ||
|
||||
value.isVehicleProtected == null
|
||||
!value.addressQuestions.streetAddress ||
|
||||
!value.addressQuestions.city ||
|
||||
!value.addressQuestions.state ||
|
||||
!value.addressQuestions.zipCode ||
|
||||
!value.isVehicleProtected
|
||||
) {
|
||||
return errorMessages.MOBILE_LOCATION_REQUIRED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,10 +155,9 @@ export default {
|
|||
...(lineItems.vaps ?? []),
|
||||
...(lineItems.promos ?? []),
|
||||
];
|
||||
const subtotal = baseMixin.methods.getTotalPriceOfAllLineItemsAndChildParts(
|
||||
combinedLineItems,
|
||||
false
|
||||
);
|
||||
const subtotal = baseMixin.methods
|
||||
.getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, false)
|
||||
.toFixed(2);
|
||||
|
||||
// // get correct zip code
|
||||
const providerZip = order.serviceLocation.provider.address.zipCode;
|
||||
|
|
@ -168,26 +167,25 @@ export default {
|
|||
: providerZip;
|
||||
|
||||
// // calculate total
|
||||
const total = baseMixin.methods.getTotalPriceOfAllLineItemsAndChildParts(
|
||||
combinedLineItems,
|
||||
true
|
||||
);
|
||||
const total = baseMixin.methods
|
||||
.getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, true)
|
||||
.toFixed(2);
|
||||
|
||||
const payload = {
|
||||
serviceZipCode: serviceZip,
|
||||
damageType: order.damage.isRepair ? "repair" : "replace",
|
||||
accountType: order.payment.isInsurance ? "insurance" : "cash",
|
||||
promoCodes: promoString,
|
||||
vehicleYear: order.vehicle.year,
|
||||
vehicleYear: `${order.vehicle.year}`,
|
||||
vehicleMake: order.vehicle.make,
|
||||
vehicleModel: order.vehicle.model,
|
||||
vehicleStyle: order.vehicle.style,
|
||||
glassToReplace: glassString,
|
||||
workOrderId: order.workOrderId,
|
||||
providerCtu: order.serviceLocation.zipCodeCtu,
|
||||
workOrderId: parseInt(order.workOrderId),
|
||||
providerCtu: parseInt(order.serviceLocation.zipCodeCtu),
|
||||
orderNumber: order.workOrderNumber,
|
||||
priceTotal: total,
|
||||
priceSubTotal: subtotal,
|
||||
priceTotal: parseFloat(total),
|
||||
priceSubTotal: parseFloat(subtotal),
|
||||
isRecalibrationOnOrder: store.getters.isRecalibrationOnSubmittedOrder,
|
||||
appointmentType: order.serviceLocation.appointmentType,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue