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) {
const store = useMainStore();
const { clientName } = store.issConfig;
const { accountNumber } = store.issConfig;
const clientOverride = clientName.length > 0 && accountNumber > 0;
const { parentAccountNumber } = store.issConfig;
const clientOverride = clientName.length > 0 && parentAccountNumber > 0;
return (
store

View file

@ -87,7 +87,7 @@ export default ({
setupHeader() {
const answers = this.getCmsContent(this.cmsWidgetName, '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;
}
}

View file

@ -98,7 +98,7 @@ export default {
async populateISSConfigValues(data) {
this.mainStore.issConfig.clientName = data.accountName;
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.isCoverageEnabled = data.coverageEnabled;

View file

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

View file

@ -26,7 +26,7 @@ const routes = [
const issPageToUse = !to.query.issPage ? issPageValues.WELCOME_PAGE : to.query.issPage;
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'
) {
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
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.
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.
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.
@ -406,7 +406,7 @@ export const useMainStore = defineStore({
payload:
{
correlationId: this.order.referralCorrelationId,
accountNumber: this.issConfig.accountNumber?.toString() ?? '',
accountNumber: this.issConfig.parentAccountNumber?.toString() ?? '',
insured: {
firstName: this.order.customer.firstName,
lastName: this.order.customer.lastName,
@ -474,7 +474,7 @@ export const useMainStore = defineStore({
globalMethods.callHttpClient({
method: endpoints.DuplicateSearch.method,
endpoint: endpoints.DuplicateSearch.url(
this.issConfig.accountNumber,
this.issConfig.parentAccountNumber,
this.order.policy.policyNumber,
this.order.customer.phoneNumber?.replaceAll('-', '')
)
@ -895,7 +895,7 @@ export const useMainStore = defineStore({
coverageStatus: payment.insuranceCoverage?.coverageStatus
},
isInsurance: payment.isInsurance ?? true,
parentAccountNumber: this.issConfig.accountNumber
parentAccountNumber: this.issConfig.parentAccountNumber
},
serviceLocation: {
address: {
@ -1144,7 +1144,7 @@ export const useMainStore = defineStore({
resetISSConfigState() {
this.issConfig.clientName = 'Generic Insurance';
this.issConfig.clientDisplayName = 'Generic Insurance';
this.issConfig.accountNumber = 0;
this.issConfig.parentAccountNumber = 0;
this.issConfig.styleSheet = '';
this.issConfig.isCoverageEnabled = false;
this.issConfig.isAuthenticated = false;

View file

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