Merge pull request #1802 from Safelite/feature/CSR-2005

This commit is contained in:
CarlNation 2024-03-14 17:02:47 -04:00 committed by GitHub
commit d4ccc7095d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 4 deletions

View file

@ -129,6 +129,11 @@ export async function navigateToHeritageFunnel({ shouldSaveSession, pageNameToLo
heritageParms["forceEndToEndInsurance"] = true;
}
// if they are going to heritage and already have a policy number then this is a nav back flow
if (store.getters.policy.policyNumber) {
heritageParms["insuranceNavBack"] = true;
}
router.navigateToExternalUrl(externalUrls.HERITAGE_FUNNEL, heritageParms);
}

View file

@ -166,6 +166,7 @@ async function saveSessionHelper(
customerPortalLoginToken: savedSessionInfo.data.customerPortalLoginToken,
lockToken: savedSessionInfo.data.lockToken,
settledTenderAmount: savedSessionInfo.data.settledTenderAmount,
billToAccountNumber: savedSessionInfo.data.billToAccountNumber,
},
false
);

View file

@ -119,6 +119,7 @@ export default {
return {
searchableInsuranceCompanyList: [],
originalList: [],
selectedParentAccount: "",
};
},
methods: {
@ -142,8 +143,11 @@ export default {
// Go back to Quote page
this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
},
forwardButtonAction() {
this.dispatchStoreAction(
async forwardButtonAction() {
// await any pending save-sessions. if you don't, we will save the new parent account into vuex and then a pending async save-session response overwrites it
await store.getters.applicationUser.saveSessionPromise;
await this.dispatchStoreAction(
this.storeActions.SAVE_PARENT_ACCOUNT_NUMBER,
this.selectedParentAccount,
false
@ -156,12 +160,12 @@ export default {
});
},
selectParentAccountNumber(parentAccountName) {
if (!this.insuranceCompanyList) {
if (!this.searchableInsuranceCompanyList) {
console.error("No insurance companies found");
return;
}
var selectedItem = this.insuranceCompanyList.filter((item) => {
var selectedItem = this.searchableInsuranceCompanyList.filter((item) => {
return item.accountName === parentAccountName;
});

View file

@ -1069,6 +1069,7 @@ export const actions = {
customerPortalLoginToken,
lockToken,
settledTenderAmount,
billToAccountNumber,
}
) {
context.commit(storeMutations.UPDATE_REFERRAL_NUMBER, referralNumber);
@ -1084,6 +1085,7 @@ export const actions = {
context.commit(storeMutations.LOCK_TOKEN, lockToken);
context.commit(storeMutations.Customer_Portal_Login_Token, customerPortalLoginToken);
context.commit(storeMutations.UPDATE_SETTLED_TENDER_AMOUNT, settledTenderAmount);
context.commit(storeMutations.UPDATE_BILL_TO_ACCT_NUMBER, billToAccountNumber);
},
logPageView(