Auto stash before merge of "feature/Digital/SSR-275" and "develop"

This commit is contained in:
Jeremy Zimmerman 2023-03-03 15:43:06 -05:00
parent 95f0507747
commit e462b23af5
2 changed files with 46 additions and 20 deletions

View file

@ -59,10 +59,12 @@
{
const clientParams = JSON.parse(resp.data.parameters);
console.log(clientParams);
let finalParams = [];
for ( let cparam in clientParams)
{
let cname = cparam.toLowerCase();
let cname = clientParams[cparam].toLowerCase();
for ( let qsparam in queryStringParams)
{
@ -74,8 +76,8 @@
}
}
}
//this.populateStoreItemsFromParams(finalParams);
this.populateStoreItemsFromParams(finalParams);
}
}
}
@ -94,15 +96,10 @@
this.mainStore.issConfig.accountNumber = data.accountNumber;
this.mainStore.issConfig.styleSheet = data.styleSheet;
console.log(data.clientFlags);
console.log(data.parameters);
try
{
const clientFlags = JSON.parse(data.clientFlags);
console.log(clientFlags.clientDisplayName);
if ( clientFlags.TPAEnabled )
{
console.log("TPA Flow Enabled!");
@ -122,9 +119,14 @@
},
populateStoreItemsFromParams(params) {
console.log("populate is running");
// Populate store items from parameters.
for ( let param in params)
{
// ["PolicyNumber","LossDate","Timestamp","Token","Signature","ReturnURL","ReturnURL2"]
//console.log("param: " + params[param])
let name = param.toLowerCase();
let value = params[param];
@ -133,6 +135,21 @@
case "policynumber":
this.mainStore.order.policy.policyNumber = value;
break;
case "lossdate":
this.mainStore.order.policy.dateOfLoss = value;
break;
// Not implemented yet.
case "returnurl":
case "returnurl2":
break;
// Not stored
case "timestamp":
case "token":
case "signature":
break;
}
}
},

View file

@ -23,15 +23,19 @@ const routes = [
async beforeEnter(to, from, next) {
try {
to.query.issPage = !to.query.issPage ? issPageValues.WELCOME_PAGE : to.query.issPage;
if (analyticsMixin.methods.noSession()) {
await analyticsMixin.methods.initSession();
} else {
updateSessionIdCookie();
// Do not run these for the main entry page - as it is not part of the user flow.
if ( to.query.issPage != issPageValues.ENTRY_PAGE )
{
if (analyticsMixin.methods.noSession()) {
await analyticsMixin.methods.initSession();
} else {
updateSessionIdCookie();
}
await runExperiments(to.query.issPage);
}
await runExperiments(to.query.issPage);
// Process ISS cookie.
updateOrCreateISSCookie();
@ -78,11 +82,16 @@ router.afterEach((to, from) => {
// Update lastPageVisited in the store
store.updateLastPageVisited(to.name);
// Push page view to GA
analyticsMixin.methods.pushPageViewToGA();
console.log("Page: " + to.query.issPage);
// Push experiments to Data Layer
analyticsMixin.methods.pushExperimentsToDataLayer();
if ( to.query.issPage != issPageValues.ENTRY_PAGE )
{
// Push page view to GA
analyticsMixin.methods.pushPageViewToGA();
// Push experiments to Data Layer
analyticsMixin.methods.pushExperimentsToDataLayer();
}
});
// Get route information by page name.