Merge branch 'develop' into feature/humphries/INSR-8489
This commit is contained in:
commit
f71c821f4a
5 changed files with 45 additions and 20 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -21667,7 +21667,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.18.0",
|
||||
"version": "8.20.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.20.1.tgz",
|
||||
"integrity": "sha512-It4dO0K5v//JtTXuPkfEOaI3uUN87iYPnqo/ZzqCoG3g8uhA66QUMs/SrM0YK7/NAu+r4LMh/9dq2A7k+rHs+w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
|
|
|||
|
|
@ -33,30 +33,41 @@ export class Logger {
|
|||
|
||||
formatLogEntry(message, details) {
|
||||
let json = '';
|
||||
if (details) {
|
||||
if (details instanceof Error) {
|
||||
json = JSON.stringify(details, Object.getOwnPropertyNames(details), 2);
|
||||
} else {
|
||||
json = JSON.stringify(details, undefined, 2)
|
||||
const store = useMainStore();
|
||||
const sessionKey = getSessionKeyValue();
|
||||
|
||||
try
|
||||
{
|
||||
if (details) {
|
||||
if (details instanceof Error) {
|
||||
json = JSON.stringify(details, Object.getOwnPropertyNames(details), 2);
|
||||
} else {
|
||||
json = JSON.stringify(details, undefined, 2)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
json = `Failed to serialize log details: ${error}`;
|
||||
}
|
||||
|
||||
return `Application: ${applicationConfig.APPLICATION_NAME} \n${message} \n${json}`;
|
||||
return [
|
||||
`Application: ${applicationConfig.APPLICATION_NAME}`,
|
||||
`ClientTag: ${store.issConfig?.clientTag}`,
|
||||
`ParentAccountNumber: ${store.issConfig?.parentAccountNumber}`,
|
||||
`ClientName: ${store.issConfig?.clientName}`,
|
||||
`LastPageVisited: ${store.applicationUser?.lastPageVisited}`,
|
||||
`SessionLogSequenceNumber: ${sessionKey}`,
|
||||
`ReferralSequenceNumber: ${store.order?.referralSequenceNumber}`,
|
||||
`ReferralNumber: ${store.order?.referralNumber}`,
|
||||
`EON: ${store.order?.eon}`,
|
||||
`Message: ${message}`,
|
||||
`JSON: ${json}`
|
||||
].join('\n');
|
||||
}
|
||||
|
||||
writeLogEntry(endpoint, logEntry) {
|
||||
const store = useMainStore();
|
||||
const sessionKey = getSessionKeyValue();
|
||||
|
||||
// TODO: Work in progress.
|
||||
/*
|
||||
if ( store.applicationUser.logErrorCalls> 10 ) {
|
||||
console.error("Exceeded maximum log error calls for this session. Further logging will be suppressed to prevent potential infinite loops.");
|
||||
return;
|
||||
}
|
||||
|
||||
store.applicationUser.logErrorCalls += 1;
|
||||
*/
|
||||
return new Promise((resolve, reject) => {
|
||||
// If running locally or in the Dev environment show the log entries in the console.
|
||||
if (
|
||||
|
|
|
|||
|
|
@ -116,13 +116,20 @@ export default {
|
|||
mixins: [BaseFormMixin, analyticsMixIn],
|
||||
async beforeRouteEnter(to, from, next) {
|
||||
const fromPage = from?.query?.issPage || 'external';
|
||||
|
||||
// Only log bailout event if user is coming from a different page.
|
||||
// This ensures that we cannot get stuck in a loop, if the bailout-page ever bails out.
|
||||
if (fromPage !== issPageValues.BAILOUT_PAGE) {
|
||||
const bailoutCode = useMainStore().pageData(issPageValues.BAILOUT_PAGE).bailoutCode;
|
||||
const bailoutPageData = useMainStore().pageData(issPageValues.BAILOUT_PAGE);
|
||||
const bailoutCode = bailoutPageData.bailoutCode;
|
||||
const bailoutString = Object.keys(BailoutCode).find(key => BailoutCode[key] === bailoutCode);
|
||||
|
||||
// Log Bailout info to the error log for quick searching.
|
||||
global.$logger.logError(`Bailout - Page: ${fromPage} - BailoutCode: ${bailoutCode} - BailoutString: ${bailoutString}`, bailoutPageData);
|
||||
|
||||
// Log a couple main bailout items to GA and session log events.
|
||||
analyticsMixIn.methods.pushEventToGA(GaCategories.BAILOUT, bailoutString, fromPage, true, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
// Call APIs
|
||||
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ export default {
|
|||
margin: 0rem;
|
||||
padding: 1.25rem 1.25rem .625rem 1.25rem;
|
||||
.modal-title {
|
||||
font-weight: $font-weight-bolder;
|
||||
font-weight: 600;
|
||||
font-size: .875rem;
|
||||
line-height: 1.25rem;
|
||||
text-align: start;
|
||||
|
|
@ -416,6 +416,12 @@ export default {
|
|||
font-weight: $font-weight-bold;
|
||||
color: $black;
|
||||
}
|
||||
.recal-modal-body {
|
||||
font-size: .9375rem;
|
||||
b {
|
||||
color: $black;
|
||||
}
|
||||
}
|
||||
.recal-modal-image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
|
|
|
|||
|
|
@ -245,7 +245,6 @@ export const getDefaultState = () => ({
|
|||
duplicateOrders: [],
|
||||
hasSentSaveQuoteEmail: null,
|
||||
coverageLookupAttempts: 0,
|
||||
//logErrorCalls: 0,
|
||||
firstHit: true
|
||||
},
|
||||
issConfig: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue