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.
|
||||
*/
|
||||
async forwardButtonAction() {
|
||||
if (this.selectedAnswer !== null) {
|
||||
if (this.selectedAnswer == null) {
|
||||
this.navigateForward();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const selectedReferral =
|
||||
this.mainStore.applicationUser.duplicateOrders.find((o) => o.correlationId === this.selectedAnswer);
|
||||
|
||||
if (selectedReferral) {
|
||||
await this.mainStore
|
||||
.loadSession(selectedReferral)
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
this.navigateForward();
|
||||
});
|
||||
return;
|
||||
await this.mainStore.loadSession(selectedReferral);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`Error on loading session from duplicate check ${err}`);
|
||||
} finally {
|
||||
this.navigateForward();
|
||||
}
|
||||
this.navigateForward();
|
||||
},
|
||||
navigateForward() {
|
||||
if (!this.mainStore.order.policy.policyLookupSuccessful) {
|
||||
|
|
@ -164,6 +167,7 @@ export default {
|
|||
}
|
||||
|
||||
const policyVehicles = useMainStore().order.policy.vehicles ?? [];
|
||||
|
||||
if (!this.mainStore.order.loadedFromDupeCheck) {
|
||||
if (policyVehicles.length !== 0) {
|
||||
this.$router.navigate(
|
||||
|
|
|
|||
Loading…
Reference in a new issue