From a6fadcb6772c14945257077e14fc3aea4e24c747 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 23 Sep 2024 10:10:54 -0400 Subject: [PATCH 1/2] CSR-1600 CSR-1600 clear work order number if ctu changes on referral with delete substatus used in pia. --- src/layouts/payment-method/payment-method.vue | 30 +++++++++---------- src/layouts/service-zip/service-zip.vue | 4 +-- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index ff7e6a8d8..0083efead 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -551,23 +551,21 @@ export default { }, async setupPia() { this.$refs.loadingModal.showModal(); - - // if we don't have a work order in delete substatus, set the flag and submit. // we need a work order number for pia so we can pass it to safeliteHop. - if (!store.getters.order.workOrderNumber) { - try { - await submitWorkOrder({ - pageNameToLog: "payment-method", - submitAfterSave: false, - createDeleteStatusWorkOrderForPia: true, - }); - } catch (error) { - console.log("error: response from pia submit work order:" + error.message); - this.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE); - this.$route.query[queryStrings.DISPLAY_PIA_ALERT] = true; - return; - } + // this will create one in delete substatus. + try { + await submitWorkOrder({ + pageNameToLog: "payment-method", + submitAfterSave: false, + createDeleteStatusWorkOrderForPia: true, + }); + } catch (error) { + console.log("error: response from pia submit work order:" + error.message); + this.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE); + this.$route.query[queryStrings.DISPLAY_PIA_ALERT] = true; + return; } + this.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE); this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_PAY_NOW, @@ -594,7 +592,7 @@ export default { ); }, shouldHideRecalibration() { - return this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE); + return this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE).toLower() === "true"; }, showApplePay() { return baseMixin.methods.showApplePay(); diff --git a/src/layouts/service-zip/service-zip.vue b/src/layouts/service-zip/service-zip.vue index 34efac1a1..a60eb4aff 100644 --- a/src/layouts/service-zip/service-zip.vue +++ b/src/layouts/service-zip/service-zip.vue @@ -213,7 +213,7 @@ export default { const supportingItemsPromise = await this.dispatchStoreActionWithLogging( storeActions.GET_SUPPORTING_ITEMS, null, - "estimate" + "service-zip" ); const promiseResultMap = [ @@ -232,7 +232,7 @@ export default { ); // call saveSession here - navigateWithSaving saves too late in the flow - await saveSession({ pageNameToLog: "estimate" }); + await saveSession({ pageNameToLog: "service-zip" }); return this.$router.navigateWithSaving( this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS, this.$route From 0b7354d54ef2b57922faf1bcaabd076da64d8ca4 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 23 Sep 2024 10:43:34 -0400 Subject: [PATCH 2/2] CSR-1600 test CSR-1600 test --- src/layouts/payment-method/payment-method.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 0083efead..89a31d454 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -565,7 +565,7 @@ export default { this.$route.query[queryStrings.DISPLAY_PIA_ALERT] = true; return; } - + this.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE); this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_PAY_NOW, @@ -592,7 +592,9 @@ export default { ); }, shouldHideRecalibration() { - return this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE).toLower() === "true"; + return ( + this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE).toLowerCase() === "true" + ); }, showApplePay() { return baseMixin.methods.showApplePay();