From 200dcd12e42eab0c642e068e54ab48e042bddefc Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 16 Sep 2022 10:38:29 -0400 Subject: [PATCH 1/2] Fixed some issues with the logic in arePagePrerequisitesValid --- src/layouts/quote/quote.vue | 6 ++---- src/router/index.js | 5 ----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 75f4454c5..fc8abe92b 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -75,10 +75,8 @@ export default { }, methods: { arePagePrerequisitesValid() { - if (store.getters.order.damage.isRepair || store.getters.order.lineItems.glassParts.length > 0) { - return true; - } - return false; + store.getters.order.lineItems.glassParts = []; + return store.getters.order.damage.isRepair || (store.getters.order.lineItems?.glassParts != null && store.getters.order.lineItems.glassParts.length > 0); } }, computed: { diff --git a/src/router/index.js b/src/router/index.js index 7684e9f90..6983356fd 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -25,11 +25,6 @@ import { applicationConfig } from "../constants/application-config"; import quote from "@/layouts/quote/quote.vue"; const routes = [ - { - path: "/quote", // This is a temporary route for testing. - name: "quote", - component: quote, - }, { path: "/", name: "root", From 197cd207142fee8840d6c957dfe13a6ed7ba598c Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Fri, 16 Sep 2022 10:40:19 -0400 Subject: [PATCH 2/2] Fixed some issues with the logic in arePagePrerequisitesValid 2 --- src/layouts/quote/quote.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index fc8abe92b..62d2aa2f8 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -75,7 +75,6 @@ export default { }, methods: { arePagePrerequisitesValid() { - store.getters.order.lineItems.glassParts = []; return store.getters.order.damage.isRepair || (store.getters.order.lineItems?.glassParts != null && store.getters.order.lineItems.glassParts.length > 0); } },