Updates
This commit is contained in:
parent
ef244574bd
commit
ff8be8e0dc
1 changed files with 49 additions and 1 deletions
|
|
@ -34,7 +34,14 @@
|
||||||
},
|
},
|
||||||
async validateClientTagOnEntry() {
|
async validateClientTagOnEntry() {
|
||||||
|
|
||||||
const clientTag = this.$route.query.ClientTag;
|
// Dump the query string parameters into an array. Remove casing on the key for easy compare.
|
||||||
|
let queryStringParams = [];
|
||||||
|
for ( let param in this.$route.query)
|
||||||
|
{
|
||||||
|
queryStringParams[param.toLowerCase()] = this.$route.query[param];
|
||||||
|
}
|
||||||
|
|
||||||
|
const clientTag = queryStringParams["clienttag"];
|
||||||
const clientTagPresent = !!clientTag;
|
const clientTagPresent = !!clientTag;
|
||||||
let authorized = false;
|
let authorized = false;
|
||||||
|
|
||||||
|
|
@ -48,6 +55,29 @@
|
||||||
this.mainStore.issConfig.accountNumber = resp.data.accountNumber;
|
this.mainStore.issConfig.accountNumber = resp.data.accountNumber;
|
||||||
this.mainStore.issConfig.styleSheet = resp.data.styleSheet;
|
this.mainStore.issConfig.styleSheet = resp.data.styleSheet;
|
||||||
authorized = true;
|
authorized = true;
|
||||||
|
|
||||||
|
if ( resp.data.parameters?.length > 0 )
|
||||||
|
{
|
||||||
|
const clientParams = JSON.parse(resp.data.parameters);
|
||||||
|
|
||||||
|
let finalParams = [];
|
||||||
|
for ( let cparam in clientParams)
|
||||||
|
{
|
||||||
|
let cname = cparam.toLowerCase();
|
||||||
|
|
||||||
|
for ( let qsparam in queryStringParams)
|
||||||
|
{
|
||||||
|
let qsname = qsparam.toLowerCase();
|
||||||
|
|
||||||
|
if ( cname === qsname )
|
||||||
|
{
|
||||||
|
finalParams[cname] = queryStringParams[cname];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//this.populateStoreItemsFromParams(finalParams);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,6 +89,24 @@
|
||||||
window.location = "/?issPage=" + issPageValues.WELCOME_PAGE;
|
window.location = "/?issPage=" + issPageValues.WELCOME_PAGE;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
populateStoreItemsFromParams(params) {
|
||||||
|
|
||||||
|
const mainStore = useMainStore();
|
||||||
|
|
||||||
|
// Populate store items from parameters.
|
||||||
|
for ( let param in params)
|
||||||
|
{
|
||||||
|
let name = param.toLowerCase();
|
||||||
|
let value = params[param];
|
||||||
|
|
||||||
|
switch (name)
|
||||||
|
{
|
||||||
|
case "policynumber":
|
||||||
|
mainStore.order.policy.policyNumber = value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue