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: {
|
||||
async forwardButtonAction() {
|
||||
await this.mainStore
|
||||
.validateZip({ zip: this.welcomePageModel.policyZipCode })
|
||||
await this.mainStore.validateZip({ zip: this.welcomePageModel.policyZipCode })
|
||||
.then(async (zipInfo) => {
|
||||
if (zipInfo?.data?.isValid === true) {
|
||||
this.mainStore.updatePolicyData(this.welcomePageModel);
|
||||
await this.mainStore
|
||||
.getDuplicateReferrals()
|
||||
.then(
|
||||
() => {},
|
||||
() => {}
|
||||
)
|
||||
|
||||
this.mainStore.order.serviceLocation.zipCodeCtu = zipInfo.data.zipCodeCtu?.toString();
|
||||
|
||||
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 () => {
|
||||
if (
|
||||
this.isCoverageEnabled
|
||||
&& !this.maxCoverageLookupAttemptsReached
|
||||
) {
|
||||
await this.mainStore.getCoveragePolicyInfo()?.then(
|
||||
() => {},
|
||||
() => {}
|
||||
);
|
||||
if (this.isCoverageEnabled && !this.maxCoverageLookupAttemptsReached) {
|
||||
await this.mainStore.getCoveragePolicyInfo()?.then(() => {}, () => {});
|
||||
} else {
|
||||
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() {
|
||||
if (this.mainStore.applicationUser.duplicateOrders?.length > 0 ?? false) {
|
||||
this.$router.navigate(
|
||||
|
|
|
|||
Loading…
Reference in a new issue