Fix code conflict.

This commit is contained in:
Bryan Mauger 2024-04-22 13:36:55 -04:00
parent 50dc339660
commit cfbb50131a

View file

@ -76,6 +76,10 @@ export default {
vm.setCmsContent(cmsContent);
});
},
setup() {
const mainStore = useMainStore();
return { mainStore };
},
data() {
return {
selectedAnswer: null,
@ -131,7 +135,7 @@ export default {
Text: duplicateOrderText,
Name: o.referralNumber,
SubText: toTitleCase(subtext),
value: o,
value: o.correlationId,
};
}) ?? []
);
@ -145,19 +149,21 @@ export default {
* @summary Steps to perform when forward button clicked.
*/
async forwardButtonAction() {
if (
this.selectedAnswer !== null &&
typeof this.selectedAnswer === 'object'
) {
await useMainStore()
.loadSession(this.selectedAnswer)
.catch(() => {})
.finally(() => {
this.navigateForward();
});
return;
if (this.selectedAnswer !== null) {
const selectedReferral =
this.mainStore.applicationUser.duplicateOrders.find(
(o) => o.correlationId === this.selectedAnswer
);
if (selectedReferral) {
await this.mainStore
.loadSession(selectedReferral)
.catch(() => {})
.finally(() => {
this.navigateForward();
});
return;
}
}
this.navigateForward();
},
navigateForward() {