Merge branch 'release/2025.05.22' into feature/Digital/CASH-712
This commit is contained in:
commit
fb5818ba75
2 changed files with 19 additions and 6 deletions
|
|
@ -192,7 +192,12 @@ export default {
|
|||
vm.selectedWindshieldOptions.selectedWindshieldReplaceOptions.push(
|
||||
damageLocationsSelected.SINGLE
|
||||
);
|
||||
return vm.forwardButtonAction();
|
||||
if (
|
||||
store.getters.externalParameterState.isExternalParameter &&
|
||||
store.getters.externalParameterDamage.damageType !== "other"
|
||||
) {
|
||||
return vm.forwardButtonAction();
|
||||
}
|
||||
}
|
||||
baseMixin.methods.ResetExternalParamsAndHideModal();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3621,25 +3621,25 @@ export function mapTaxedLineItemsToStoreFormat(availableLineItems, storeLineItem
|
|||
export function getArrayOfAllLineItemsAndChildParts(lineItems) {
|
||||
let consolidatedLineItemsArray = [];
|
||||
|
||||
if (lineItems.glassParts != null)
|
||||
if (lineItems?.glassParts != null)
|
||||
consolidatedLineItemsArray = [
|
||||
...consolidatedLineItemsArray,
|
||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.glassParts),
|
||||
];
|
||||
|
||||
if (lineItems.supportingItems != null)
|
||||
if (lineItems?.supportingItems != null)
|
||||
consolidatedLineItemsArray = [
|
||||
...consolidatedLineItemsArray,
|
||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.supportingItems),
|
||||
];
|
||||
|
||||
if (lineItems.vaps != null)
|
||||
if (lineItems?.vaps != null)
|
||||
consolidatedLineItemsArray = [
|
||||
...consolidatedLineItemsArray,
|
||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.vaps),
|
||||
];
|
||||
|
||||
if (lineItems.promos != null)
|
||||
if (lineItems?.promos != null)
|
||||
consolidatedLineItemsArray = [
|
||||
...consolidatedLineItemsArray,
|
||||
...getFlattenedArrayOfLineItemsWithChildParts(lineItems.promos),
|
||||
|
|
@ -3789,7 +3789,15 @@ function supportingItemsEqual(supportingItemsA, supportingItemsB) {
|
|||
// if so, make sure it's not in the past. if in the past, clear schedule info in store.
|
||||
// if date not in past, then call schedule service to verify appointment is still available.
|
||||
async function resetScheduleIfUnavailable(context, order, pageNameToLog) {
|
||||
if (!order.schedule?.date) {
|
||||
// lineItems empty can happen when a customer goes all the way through scheduling as cash but then
|
||||
// switches to insurance AND also switches vehicles during policy lookup. If you call shop-time-slots
|
||||
// without parts, you get 500 errors so skip the call.
|
||||
const lineItems = getArrayOfAllLineItemsAndChildParts(order.lineItems);
|
||||
|
||||
if (!order.schedule?.date || lineItems.length === 0) {
|
||||
console.log(new Date() + " no schedule date or lineItems. skip resetSchedule logic.");
|
||||
console.log(new Date() + " schedule.schedule.date" + JSON.stringify(order.schedule));
|
||||
console.log(new Date() + " lineItems" + JSON.stringify(order.lineItems));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue