Auto stash before merge of "feature/Digital/SSR-275" and "develop"
This commit is contained in:
parent
95f0507747
commit
e462b23af5
2 changed files with 46 additions and 20 deletions
|
|
@ -59,10 +59,12 @@
|
||||||
{
|
{
|
||||||
const clientParams = JSON.parse(resp.data.parameters);
|
const clientParams = JSON.parse(resp.data.parameters);
|
||||||
|
|
||||||
|
console.log(clientParams);
|
||||||
|
|
||||||
let finalParams = [];
|
let finalParams = [];
|
||||||
for ( let cparam in clientParams)
|
for ( let cparam in clientParams)
|
||||||
{
|
{
|
||||||
let cname = cparam.toLowerCase();
|
let cname = clientParams[cparam].toLowerCase();
|
||||||
|
|
||||||
for ( let qsparam in queryStringParams)
|
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.accountNumber = data.accountNumber;
|
||||||
this.mainStore.issConfig.styleSheet = data.styleSheet;
|
this.mainStore.issConfig.styleSheet = data.styleSheet;
|
||||||
|
|
||||||
console.log(data.clientFlags);
|
|
||||||
console.log(data.parameters);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
const clientFlags = JSON.parse(data.clientFlags);
|
const clientFlags = JSON.parse(data.clientFlags);
|
||||||
|
|
||||||
console.log(clientFlags.clientDisplayName);
|
|
||||||
|
|
||||||
if ( clientFlags.TPAEnabled )
|
if ( clientFlags.TPAEnabled )
|
||||||
{
|
{
|
||||||
console.log("TPA Flow Enabled!");
|
console.log("TPA Flow Enabled!");
|
||||||
|
|
@ -122,9 +119,14 @@
|
||||||
},
|
},
|
||||||
populateStoreItemsFromParams(params) {
|
populateStoreItemsFromParams(params) {
|
||||||
|
|
||||||
|
console.log("populate is running");
|
||||||
|
|
||||||
// Populate store items from parameters.
|
// Populate store items from parameters.
|
||||||
for ( let param in params)
|
for ( let param in params)
|
||||||
{
|
{
|
||||||
|
// ["PolicyNumber","LossDate","Timestamp","Token","Signature","ReturnURL","ReturnURL2"]
|
||||||
|
//console.log("param: " + params[param])
|
||||||
|
|
||||||
let name = param.toLowerCase();
|
let name = param.toLowerCase();
|
||||||
let value = params[param];
|
let value = params[param];
|
||||||
|
|
||||||
|
|
@ -133,6 +135,21 @@
|
||||||
case "policynumber":
|
case "policynumber":
|
||||||
this.mainStore.order.policy.policyNumber = value;
|
this.mainStore.order.policy.policyNumber = value;
|
||||||
break;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -23,15 +23,19 @@ const routes = [
|
||||||
async beforeEnter(to, from, next) {
|
async beforeEnter(to, from, next) {
|
||||||
try {
|
try {
|
||||||
to.query.issPage = !to.query.issPage ? issPageValues.WELCOME_PAGE : to.query.issPage;
|
to.query.issPage = !to.query.issPage ? issPageValues.WELCOME_PAGE : to.query.issPage;
|
||||||
|
|
||||||
if (analyticsMixin.methods.noSession()) {
|
// Do not run these for the main entry page - as it is not part of the user flow.
|
||||||
await analyticsMixin.methods.initSession();
|
if ( to.query.issPage != issPageValues.ENTRY_PAGE )
|
||||||
} else {
|
{
|
||||||
updateSessionIdCookie();
|
if (analyticsMixin.methods.noSession()) {
|
||||||
|
await analyticsMixin.methods.initSession();
|
||||||
|
} else {
|
||||||
|
updateSessionIdCookie();
|
||||||
|
}
|
||||||
|
|
||||||
|
await runExperiments(to.query.issPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
await runExperiments(to.query.issPage);
|
|
||||||
|
|
||||||
// Process ISS cookie.
|
// Process ISS cookie.
|
||||||
updateOrCreateISSCookie();
|
updateOrCreateISSCookie();
|
||||||
|
|
||||||
|
|
@ -78,11 +82,16 @@ router.afterEach((to, from) => {
|
||||||
// Update lastPageVisited in the store
|
// Update lastPageVisited in the store
|
||||||
store.updateLastPageVisited(to.name);
|
store.updateLastPageVisited(to.name);
|
||||||
|
|
||||||
// Push page view to GA
|
console.log("Page: " + to.query.issPage);
|
||||||
analyticsMixin.methods.pushPageViewToGA();
|
|
||||||
|
|
||||||
// Push experiments to Data Layer
|
if ( to.query.issPage != issPageValues.ENTRY_PAGE )
|
||||||
analyticsMixin.methods.pushExperimentsToDataLayer();
|
{
|
||||||
|
// Push page view to GA
|
||||||
|
analyticsMixin.methods.pushPageViewToGA();
|
||||||
|
|
||||||
|
// Push experiments to Data Layer
|
||||||
|
analyticsMixin.methods.pushExperimentsToDataLayer();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Get route information by page name.
|
// Get route information by page name.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue