Merge pull request #1993 from Safelite/feature/CSR-1600

CSR-1600
This commit is contained in:
CarlNation 2024-09-23 10:50:55 -04:00 committed by GitHub
commit 18c0fdccfa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 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,9 @@ export default {
);
},
shouldHideRecalibration() {
return this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE);
return (
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE).toLowerCase() === "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