Updating issConfig accountNumber to parentAccountNumber.

This commit is contained in:
Jeremy Zimmerman 2023-09-29 13:57:27 -04:00
parent d923437c9b
commit f990980ab5
7 changed files with 12 additions and 12 deletions

View file

@ -145,8 +145,8 @@ function processPageData(baseResponse, clientResponse) {
export function fetchCmsContentForPage(issPage) { export function fetchCmsContentForPage(issPage) {
const store = useMainStore(); const store = useMainStore();
const { clientName } = store.issConfig; const { clientName } = store.issConfig;
const { accountNumber } = store.issConfig; const { parentAccountNumber } = store.issConfig;
const clientOverride = clientName.length > 0 && accountNumber > 0; const clientOverride = clientName.length > 0 && parentAccountNumber > 0;
return ( return (
store store

View file

@ -87,7 +87,7 @@ export default ({
setupHeader() { setupHeader() {
const answers = this.getCmsContent(this.cmsWidgetName, 'Answers'); const answers = this.getCmsContent(this.cmsWidgetName, 'Answers');
if (Array.isArray(answers)) { if (Array.isArray(answers)) {
this.headerAnswers = answers.filter((x) => x.AccountNumber == this.mainStore.issConfig.accountNumber)[0]; this.headerAnswers = answers.filter((x) => x.AccountNumber == this.mainStore.issConfig.parentAccountNumber)[0];
this.headerAnswers = !this.headerAnswers ? answers.filter((x) => x.AccountNumber === '0')[0] : this.headerAnswers; this.headerAnswers = !this.headerAnswers ? answers.filter((x) => x.AccountNumber === '0')[0] : this.headerAnswers;
} }
} }

View file

@ -98,7 +98,7 @@ export default {
async populateISSConfigValues(data) { async populateISSConfigValues(data) {
this.mainStore.issConfig.clientName = data.accountName; this.mainStore.issConfig.clientName = data.accountName;
this.mainStore.issConfig.clientDisplayName = data.accountName; // Defaults to use the client name. this.mainStore.issConfig.clientDisplayName = data.accountName; // Defaults to use the client name.
this.mainStore.issConfig.accountNumber = data.parentAccountNumber; this.mainStore.issConfig.parentAccountNumber = data.parentAccountNumber;
this.mainStore.issConfig.styleSheet = data.styleSheet; this.mainStore.issConfig.styleSheet = data.styleSheet;
this.mainStore.issConfig.isCoverageEnabled = data.coverageEnabled; this.mainStore.issConfig.isCoverageEnabled = data.coverageEnabled;

View file

@ -236,7 +236,7 @@ export default {
const mainStore = useMainStore(); const mainStore = useMainStore();
// Set order account number from the issConfig. // Set order account number from the issConfig.
mainStore.order.accountNumber = mainStore.issConfig.accountNumber; mainStore.order.accountNumber = mainStore.issConfig.parentAccountNumber;
return { mainStore }; return { mainStore };
}, },

View file

@ -26,7 +26,7 @@ const routes = [
const issPageToUse = !to.query.issPage ? issPageValues.WELCOME_PAGE : to.query.issPage; const issPageToUse = !to.query.issPage ? issPageValues.WELCOME_PAGE : to.query.issPage;
if ((issPageToUse === issPageValues.ACCESS_DENIED if ((issPageToUse === issPageValues.ACCESS_DENIED
|| (issPageToUse !== issPageValues.ENTRY_PAGE && !useMainStore().issConfig.accountNumber)) || (issPageToUse !== issPageValues.ENTRY_PAGE && !useMainStore().issConfig.parentAccountNumber))
&& process.env.VUE_APP_CURRENT_ENVIRONMENT !== 'Localhost' && process.env.VUE_APP_CURRENT_ENVIRONMENT !== 'Localhost'
) { ) {
return await GoToAccessIsDenied(next); return await GoToAccessIsDenied(next);

View file

@ -150,7 +150,7 @@ const getDefaultState = () => ({
clientName: 'Generic Insurance', // this is the default and will be overriden by the client's name clientName: 'Generic Insurance', // this is the default and will be overriden by the client's name
clientDisplayName: 'Generic Insurance', // this is the default and will be overridden by the client's name or client display name. clientDisplayName: 'Generic Insurance', // this is the default and will be overridden by the client's name or client display name.
styleSheet: '', // Stylesheet used by the client. styleSheet: '', // Stylesheet used by the client.
accountNumber: 0, // Account number used by the client. parentAccountNumber: 0, // Parent account number used by the client.
isCoverageEnabled: false, // Indicates if we should be calling coverage on this flow. isCoverageEnabled: false, // Indicates if we should be calling coverage on this flow.
isClaimRegistrationRequired: false, // Indicates if the claim registration call needs to be made for a client to complete coverage verification. isClaimRegistrationRequired: false, // Indicates if the claim registration call needs to be made for a client to complete coverage verification.
isAuthenticated: false, // Indicates if user is authenticated or not. isAuthenticated: false, // Indicates if user is authenticated or not.
@ -406,7 +406,7 @@ export const useMainStore = defineStore({
payload: payload:
{ {
correlationId: this.order.referralCorrelationId, correlationId: this.order.referralCorrelationId,
accountNumber: this.issConfig.accountNumber?.toString() ?? '', accountNumber: this.issConfig.parentAccountNumber?.toString() ?? '',
insured: { insured: {
firstName: this.order.customer.firstName, firstName: this.order.customer.firstName,
lastName: this.order.customer.lastName, lastName: this.order.customer.lastName,
@ -474,7 +474,7 @@ export const useMainStore = defineStore({
globalMethods.callHttpClient({ globalMethods.callHttpClient({
method: endpoints.DuplicateSearch.method, method: endpoints.DuplicateSearch.method,
endpoint: endpoints.DuplicateSearch.url( endpoint: endpoints.DuplicateSearch.url(
this.issConfig.accountNumber, this.issConfig.parentAccountNumber,
this.order.policy.policyNumber, this.order.policy.policyNumber,
this.order.customer.phoneNumber?.replaceAll('-', '') this.order.customer.phoneNumber?.replaceAll('-', '')
) )
@ -895,7 +895,7 @@ export const useMainStore = defineStore({
coverageStatus: payment.insuranceCoverage?.coverageStatus coverageStatus: payment.insuranceCoverage?.coverageStatus
}, },
isInsurance: payment.isInsurance ?? true, isInsurance: payment.isInsurance ?? true,
parentAccountNumber: this.issConfig.accountNumber parentAccountNumber: this.issConfig.parentAccountNumber
}, },
serviceLocation: { serviceLocation: {
address: { address: {
@ -1144,7 +1144,7 @@ export const useMainStore = defineStore({
resetISSConfigState() { resetISSConfigState() {
this.issConfig.clientName = 'Generic Insurance'; this.issConfig.clientName = 'Generic Insurance';
this.issConfig.clientDisplayName = 'Generic Insurance'; this.issConfig.clientDisplayName = 'Generic Insurance';
this.issConfig.accountNumber = 0; this.issConfig.parentAccountNumber = 0;
this.issConfig.styleSheet = ''; this.issConfig.styleSheet = '';
this.issConfig.isCoverageEnabled = false; this.issConfig.isCoverageEnabled = false;
this.issConfig.isAuthenticated = false; this.issConfig.isAuthenticated = false;

View file

@ -751,7 +751,7 @@ describe('Store', () => {
coverageStatus coverageStatus
} }
}; };
store.issConfig.accountNumber = accountNumber; store.issConfig.parentAccountNumber = accountNumber;
store.order.payment = payment; store.order.payment = payment;
globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve({})); globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve({}));