diff --git a/src/helpers/client-mappers/Client900040Coverage.js b/src/helpers/client-mappers/Client900040Coverage.js index 316946ba..44aaac68 100644 --- a/src/helpers/client-mappers/Client900040Coverage.js +++ b/src/helpers/client-mappers/Client900040Coverage.js @@ -1,9 +1,8 @@ -import { useMainStore } from '@/store'; // USAA coverage overrides -export function updateClaimRegistrationPayload(payload) { - const mainStore = useMainStore(); +export function updateClaimRegistrationPayload(payload, order) { + const isITAC = order.insuranceCoverage.coverageType === coverageType.ITAC; payload.additionalInfo = { - offeredItac: mainStore.isITAC.toString(), - qualifiedForItac: mainStore.isITAC.toString() + offeredItac: isITAC.toString(), + qualifiedForItac: isITAC.toString() }; } \ No newline at end of file diff --git a/src/helpers/coverage-helper.js b/src/helpers/coverage-helper.js index 8cd5333f..ee2be8f0 100644 --- a/src/helpers/coverage-helper.js +++ b/src/helpers/coverage-helper.js @@ -1,8 +1,5 @@ -import { useMainStore } from '@/store'; - -export async function updateClientSpecificFieldsForClaimRegistration(payload) { - const mainStore = useMainStore(); - const parentAccountNumber = mainStore?.order?.parentAccountNumber; +export async function updateClientSpecificFieldsForClaimRegistration(payload, order) { + const parentAccountNumber = order.parentAccountNumber; if (!parentAccountNumber) { return; } let clientMapper; @@ -14,6 +11,6 @@ export async function updateClientSpecificFieldsForClaimRegistration(payload) { } if (typeof clientMapper.updateClaimRegistrationPayload === 'function') { - await clientMapper.updateClaimRegistrationPayload(payload); + await clientMapper.updateClaimRegistrationPayload(payload, order); } } \ No newline at end of file diff --git a/src/store/index.js b/src/store/index.js index 9de98893..a6a8258e 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -714,7 +714,7 @@ export const useMainStore = defineStore({ if (this.issConfig.useMemberNumber) { payload.memberNumber = this.order.policy.policyNumber; } - await updateClientSpecificFieldsForClaimRegistration(payload); + await updateClientSpecificFieldsForClaimRegistration(payload, this.order); const response = await globalMethods.callHttpClient({ method: endpoints.RegisterClaim.method, endpoint: endpoints.RegisterClaim.url,