WIP resolve conflict
Copied entire forwardButtonAction method from develop.
This commit is contained in:
parent
9648964c27
commit
565bc57c9c
1 changed files with 42 additions and 16 deletions
|
|
@ -304,26 +304,29 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
await this.mainStore
|
await this.mainStore.validateZip({ zip: this.welcomePageModel.policyZipCode })
|
||||||
.validateZip({ zip: this.welcomePageModel.policyZipCode })
|
|
||||||
.then(async (zipInfo) => {
|
.then(async (zipInfo) => {
|
||||||
if (zipInfo?.data?.isValid === true) {
|
if (zipInfo?.data?.isValid === true) {
|
||||||
this.mainStore.updatePolicyData(this.welcomePageModel);
|
this.mainStore.updatePolicyData(this.welcomePageModel);
|
||||||
await this.mainStore
|
|
||||||
.getDuplicateReferrals()
|
this.mainStore.order.serviceLocation.zipCodeCtu = zipInfo.data.zipCodeCtu?.toString();
|
||||||
.then(
|
|
||||||
() => {},
|
const billToInfo = await this.getBillToInfo(
|
||||||
() => {}
|
this.mainStore.issConfig.parentAccountNumber,
|
||||||
)
|
this.mainStore.order.serviceLocation.zipCodeCtu
|
||||||
|
);
|
||||||
|
|
||||||
|
if (billToInfo !== null) {
|
||||||
|
this.mainStore.issConfig.billToAccountNumber = billToInfo.billToAccountNumber;
|
||||||
|
this.mainStore.issConfig.itacCashBillToNumber = billToInfo.itacCashBillToNumber;
|
||||||
|
this.mainStore.issConfig.itacFnrBillToNumber = billToInfo.itacFnrBillToNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
await this.mainStore.getDuplicateReferrals()
|
||||||
|
.then(() => {}, () => {})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
if (
|
if (this.isCoverageEnabled && !this.maxCoverageLookupAttemptsReached) {
|
||||||
this.isCoverageEnabled
|
await this.mainStore.getCoveragePolicyInfo()?.then(() => {}, () => {});
|
||||||
&& !this.maxCoverageLookupAttemptsReached
|
|
||||||
) {
|
|
||||||
await this.mainStore.getCoveragePolicyInfo()?.then(
|
|
||||||
() => {},
|
|
||||||
() => {}
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
this.mainStore.order.policy.policyLookupSuccessful = false;
|
this.mainStore.order.policy.policyLookupSuccessful = false;
|
||||||
}
|
}
|
||||||
|
|
@ -335,6 +338,29 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
async getBillToInfo(parentAccountNumber, providerNumber) {
|
||||||
|
try {
|
||||||
|
const payload = {
|
||||||
|
parentAccountNumber: parentAccountNumber.toString(),
|
||||||
|
providerNumber: providerNumber.toString(),
|
||||||
|
billToSelectionCriteria: {
|
||||||
|
typeOfClaim: 'GLASS ONLY',
|
||||||
|
lineOfBusiness: 'PERSONAL'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await globalMethods.callHttpClient({
|
||||||
|
method: endpoints.GetBillToInfo.method,
|
||||||
|
endpoint: endpoints.GetBillToInfo.url,
|
||||||
|
payload
|
||||||
|
});
|
||||||
|
|
||||||
|
return response.data;
|
||||||
|
} catch (err) {
|
||||||
|
console.error(`Error Status Code: ${err.data?.status}: ${err.data?.title}`);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
navigateForward() {
|
navigateForward() {
|
||||||
if (this.mainStore.applicationUser.duplicateOrders?.length > 0 ?? false) {
|
if (this.mainStore.applicationUser.duplicateOrders?.length > 0 ?? false) {
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue