From 482591cf2229d96a7a0b8dd5bfb38a40e8ca3466 Mon Sep 17 00:00:00 2001 From: Johnny shultz Date: Mon, 19 May 2025 08:58:52 -0400 Subject: [PATCH 1/4] CASH-719 CASH-719 defect fix for coming in from leadgen using other/not sure for vehicleDamage option --- src/layouts/vehicle-damage/vehicle-damage.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 391004a70..3912979ea 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -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(); } From f245bfe6308f96b6ffc1f6b4dd5d9fd929067f91 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 19 May 2025 09:44:13 -0400 Subject: [PATCH 2/4] CASH-715 policy vehicle change CASH-715 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. --- src/store/index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 753d8509b..4662c02e2 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -3788,8 +3788,16 @@ function supportingItemsEqual(supportingItemsA, supportingItemsB) { // check to see if we have an appointment date on the order object. // 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) { +async function resetScheduleIfUnavailable(context, order, pageNameToLog) { + // 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; } From 6f8718e835caf2602c8c18ff0c375a78148d69cc Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 19 May 2025 09:47:06 -0400 Subject: [PATCH 3/4] prettier --- src/store/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 4662c02e2..c7f823c3c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -3788,14 +3788,14 @@ function supportingItemsEqual(supportingItemsA, supportingItemsB) { // check to see if we have an appointment date on the order object. // 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) { +async function resetScheduleIfUnavailable(context, order, pageNameToLog) { // 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() + " 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; From 473ac2ad6630ef6f74f4f73ea4b23ba824b9e0bc Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 19 May 2025 10:25:43 -0400 Subject: [PATCH 4/4] CASH-715 CASH-715 undefined check --- src/store/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index c7f823c3c..4f360cc18 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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),