CSR-1600 clear work order number if ctu changes on referral with delete substatus used in pia.
This commit is contained in:
CarlNation 2024-09-23 10:10:54 -04:00
parent 355daf1dbc
commit a6fadcb677
2 changed files with 16 additions and 18 deletions

View file

@ -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();

View file

@ -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