SSR-1254. Fix existing claim still appear after WO is submitted. (#703)
This commit is contained in:
parent
eba95cc80b
commit
bcd0076e44
1 changed files with 13 additions and 9 deletions
|
|
@ -139,20 +139,23 @@ export default {
|
||||||
* @summary Steps to perform when forward button clicked.
|
* @summary Steps to perform when forward button clicked.
|
||||||
*/
|
*/
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
if (this.selectedAnswer !== null) {
|
if (this.selectedAnswer == null) {
|
||||||
|
this.navigateForward();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
const selectedReferral =
|
const selectedReferral =
|
||||||
this.mainStore.applicationUser.duplicateOrders.find((o) => o.correlationId === this.selectedAnswer);
|
this.mainStore.applicationUser.duplicateOrders.find((o) => o.correlationId === this.selectedAnswer);
|
||||||
|
|
||||||
if (selectedReferral) {
|
if (selectedReferral) {
|
||||||
await this.mainStore
|
await this.mainStore.loadSession(selectedReferral);
|
||||||
.loadSession(selectedReferral)
|
|
||||||
.catch(() => {})
|
|
||||||
.finally(() => {
|
|
||||||
this.navigateForward();
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error(`Error on loading session from duplicate check ${err}`);
|
||||||
|
} finally {
|
||||||
|
this.navigateForward();
|
||||||
}
|
}
|
||||||
this.navigateForward();
|
|
||||||
},
|
},
|
||||||
navigateForward() {
|
navigateForward() {
|
||||||
if (!this.mainStore.order.policy.policyLookupSuccessful) {
|
if (!this.mainStore.order.policy.policyLookupSuccessful) {
|
||||||
|
|
@ -164,6 +167,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const policyVehicles = useMainStore().order.policy.vehicles ?? [];
|
const policyVehicles = useMainStore().order.policy.vehicles ?? [];
|
||||||
|
|
||||||
if (!this.mainStore.order.loadedFromDupeCheck) {
|
if (!this.mainStore.order.loadedFromDupeCheck) {
|
||||||
if (policyVehicles.length !== 0) {
|
if (policyVehicles.length !== 0) {
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue