Merge pull request #1790 from Safelite/feature/fakeEndToEnd
CSR-1072 allow end to end insurance local development without having to run heritage locally
This commit is contained in:
commit
3bf5086e0f
2 changed files with 22 additions and 0 deletions
|
|
@ -22,6 +22,9 @@ const queryStrings = {
|
||||||
LAST_FOUR: "last_four",
|
LAST_FOUR: "last_four",
|
||||||
DISPLAY_PIA_ALERT: "displayPiaAlert",
|
DISPLAY_PIA_ALERT: "displayPiaAlert",
|
||||||
PAGE_ERROR: "pageerror",
|
PAGE_ERROR: "pageerror",
|
||||||
|
REFERRAL_NUMBER: "rn",
|
||||||
|
PARENT_ACCOUNT: "pa",
|
||||||
|
CORRELATION_ID: "ci",
|
||||||
};
|
};
|
||||||
|
|
||||||
export { queryStrings };
|
export { queryStrings };
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,25 @@ const routes = [
|
||||||
if (!to.query.fmgPage?.startsWith("payment")) {
|
if (!to.query.fmgPage?.startsWith("payment")) {
|
||||||
//payment pages used to return from safelitehop so exclude here
|
//payment pages used to return from safelitehop so exclude here
|
||||||
// Remove the parameter after quote release
|
// Remove the parameter after quote release
|
||||||
|
|
||||||
|
// for testing end to end locally, see if there is a referralNumber on the querystring
|
||||||
|
// that could have changed in heritage and then stick it in the store and then update the cookie
|
||||||
|
// so load-session runs properly. this can be removed when heritage goes away
|
||||||
|
const referralNumber = getQuerystringParameter(
|
||||||
|
queryStrings.REFERRAL_NUMBER
|
||||||
|
);
|
||||||
|
const parentAccount = getQuerystringParameter(queryStrings.PARENT_ACCOUNT);
|
||||||
|
const correlationId = getQuerystringParameter(queryStrings.CORRELATION_ID);
|
||||||
|
if (referralNumber) {
|
||||||
|
store.commit(storeMutations.UPDATE_REFERRAL_NUMBER, referralNumber);
|
||||||
|
store.commit(storeMutations.UPDATE_PARENT_ACCT_NUMBER, parentAccount);
|
||||||
|
store.commit(
|
||||||
|
storeMutations.UPDATE_REFERRAL_CORRELATION_ID,
|
||||||
|
correlationId
|
||||||
|
);
|
||||||
|
updateOrCreateFunnelCookie();
|
||||||
|
}
|
||||||
|
|
||||||
const loadSessionResponse = await loadSessionIfPresent(
|
const loadSessionResponse = await loadSessionIfPresent(
|
||||||
to.query.isInsurance != null
|
to.query.isInsurance != null
|
||||||
? to.query.isInsurance == "true"
|
? to.query.isInsurance == "true"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue