INSR-10442: Fix circular dependency
This commit is contained in:
parent
ac8b485760
commit
696a673ec7
3 changed files with 8 additions and 12 deletions
|
|
@ -1,9 +1,8 @@
|
||||||
import { useMainStore } from '@/store';
|
|
||||||
// USAA coverage overrides
|
// USAA coverage overrides
|
||||||
export function updateClaimRegistrationPayload(payload) {
|
export function updateClaimRegistrationPayload(payload, order) {
|
||||||
const mainStore = useMainStore();
|
const isITAC = order.insuranceCoverage.coverageType === coverageType.ITAC;
|
||||||
payload.additionalInfo = {
|
payload.additionalInfo = {
|
||||||
offeredItac: mainStore.isITAC.toString(),
|
offeredItac: isITAC.toString(),
|
||||||
qualifiedForItac: mainStore.isITAC.toString()
|
qualifiedForItac: isITAC.toString()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
import { useMainStore } from '@/store';
|
export async function updateClientSpecificFieldsForClaimRegistration(payload, order) {
|
||||||
|
const parentAccountNumber = order.parentAccountNumber;
|
||||||
export async function updateClientSpecificFieldsForClaimRegistration(payload) {
|
|
||||||
const mainStore = useMainStore();
|
|
||||||
const parentAccountNumber = mainStore?.order?.parentAccountNumber;
|
|
||||||
if (!parentAccountNumber) { return; }
|
if (!parentAccountNumber) { return; }
|
||||||
|
|
||||||
let clientMapper;
|
let clientMapper;
|
||||||
|
|
@ -14,6 +11,6 @@ export async function updateClientSpecificFieldsForClaimRegistration(payload) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof clientMapper.updateClaimRegistrationPayload === 'function') {
|
if (typeof clientMapper.updateClaimRegistrationPayload === 'function') {
|
||||||
await clientMapper.updateClaimRegistrationPayload(payload);
|
await clientMapper.updateClaimRegistrationPayload(payload, order);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -714,7 +714,7 @@ export const useMainStore = defineStore({
|
||||||
if (this.issConfig.useMemberNumber) {
|
if (this.issConfig.useMemberNumber) {
|
||||||
payload.memberNumber = this.order.policy.policyNumber;
|
payload.memberNumber = this.order.policy.policyNumber;
|
||||||
}
|
}
|
||||||
await updateClientSpecificFieldsForClaimRegistration(payload);
|
await updateClientSpecificFieldsForClaimRegistration(payload, this.order);
|
||||||
const response = await globalMethods.callHttpClient({
|
const response = await globalMethods.callHttpClient({
|
||||||
method: endpoints.RegisterClaim.method,
|
method: endpoints.RegisterClaim.method,
|
||||||
endpoint: endpoints.RegisterClaim.url,
|
endpoint: endpoints.RegisterClaim.url,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue