SSR-1254. Fix existing claim still appear after WO is submitted. (#703)

This commit is contained in:
Johan Gunawan 2024-05-14 12:37:03 -04:00 committed by GitHub
parent eba95cc80b
commit bcd0076e44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(