Merge pull request #2063 from Safelite/feature/CSR-2299
CSR-2299 multiple leadgen
This commit is contained in:
commit
30fa92ca57
1 changed files with 21 additions and 3 deletions
|
|
@ -97,8 +97,6 @@ const routes = [
|
|||
);
|
||||
updateOrCreateFunnelCookie();
|
||||
}
|
||||
//Update external parameter state
|
||||
updateExternalParameterState();
|
||||
|
||||
//Affiliate Cookies
|
||||
const affiliateCookies = getAffiliateCookies();
|
||||
|
|
@ -115,12 +113,14 @@ const routes = [
|
|||
to.query.fmgPage
|
||||
);
|
||||
|
||||
//Update external parameter state
|
||||
updateExternalParameterState();
|
||||
|
||||
// clear part related state because heritage selected a new vehicle
|
||||
if (
|
||||
to.query.fmgPage === fmgPageValues.VEHICLE &&
|
||||
eval(getFunnelCookie()?.HasDelayedClaimRegistration)
|
||||
) {
|
||||
console.log(new Date() + "Router: Policy Vehicle Changed");
|
||||
store.commit(storeMutations.RESET_GLASS_PARTS_STATE);
|
||||
}
|
||||
|
||||
|
|
@ -634,6 +634,24 @@ function getRedirectedStartPage() {
|
|||
}
|
||||
|
||||
function updateExternalParameterState() {
|
||||
// if there is an existing external parameter state then they have already been through from an external source(LeadGen) and
|
||||
// are returning. clear out prior related things that need to be selected again like parts and damage type.
|
||||
if (
|
||||
store.getters.externalParameterState?.isExternalParameter ==
|
||||
externalParameterStatus.INACTIVE
|
||||
) {
|
||||
store.commit(storeMutations.RESET_VEHICLE_STATE);
|
||||
store.commit(storeMutations.UPDATE_SERVICE_ZIP, {
|
||||
state: null,
|
||||
zipCode: null,
|
||||
zipCodeCtu: null,
|
||||
});
|
||||
store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, null);
|
||||
store.commit(storeMutations.UPDATE_NUMBER_OF_CHIPS, null);
|
||||
store.commit(storeMutations.RESET_DAMAGE_STATE);
|
||||
store.commit(storeMutations.RESET_GLASS_PARTS_STATE);
|
||||
}
|
||||
|
||||
const externalParameterYear = getQuerystringParameter(queryStrings.VEHICLE_YEAR);
|
||||
const externalParameterMake = getQuerystringParameter(queryStrings.VEHICLE_MAKE);
|
||||
const externalParameterModel = getQuerystringParameter(queryStrings.VEHICLE_MODEL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue