From 87bac3566ff092b5cbcefb045c42942d2aeaec04 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Thu, 7 Dec 2023 15:21:58 -0500 Subject: [PATCH 1/3] Reload on self-navigation to avoid total locks on vehicle --- src/router/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/router/index.js b/src/router/index.js index 7769d8a2d..a20fe828f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -172,6 +172,8 @@ router.beforeEach(async (to, from, next) => { if (isInIframe && notToPIAReturn) { const newUrl = `${window.top.location.origin}${to.href}`; window.top.location.href = newUrl; + } else if (toQueryPage === fromQueryPage) { + router.go(0); } else { next(); } From 241783cb88b3c155bb606ebdfc560e5a6f5ffc1e Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Thu, 7 Dec 2023 15:22:27 -0500 Subject: [PATCH 2/3] Block advancing past vehicle page until carId is also retrieved --- src/layouts/vehicle/vehicle.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue index 282133743..f32af0bfb 100644 --- a/src/layouts/vehicle/vehicle.vue +++ b/src/layouts/vehicle/vehicle.vue @@ -60,7 +60,7 @@ @@ -294,6 +294,15 @@ export default { else if (this.imageUrl == null && this.carId !== null) return false; else return true; }, + allDataRetrieved() { + return ( + !!this.selectedYear && + !!this.selectedMake && + !!this.selectedModel && + !!this.selectedStyle && + !!this.carId + ); + }, }, methods: { getVehicle(year, make, model, style) { From 967f81857b81b4f553b8932e785d85b4224fa6c9 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Thu, 7 Dec 2023 15:40:22 -0500 Subject: [PATCH 3/3] Clear carId when other fields on page change. --- src/layouts/vehicle/vehicle.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue index f32af0bfb..46c6a5b61 100644 --- a/src/layouts/vehicle/vehicle.vue +++ b/src/layouts/vehicle/vehicle.vue @@ -232,12 +232,14 @@ export default { this.selectedMake = null; this.selectedModel = null; this.selectedStyle = null; + this.carId = null; } } else { this.makeOptions = []; this.selectedMake = null; this.selectedModel = null; this.selectedStyle = null; + this.carId = null; } }, async selectedMake(make) { @@ -248,11 +250,13 @@ export default { else { this.selectedModel = null; this.selectedStyle = null; + this.carId = null; } } else { this.modelOptions = []; this.selectedModel = null; this.selectedStyle = null; + this.carId = null; } }, async selectedModel(model) { @@ -269,10 +273,14 @@ export default { if (sameStyle) { this.getVehicleDetails(); } - } else this.selectedStyle = null; + } else { + this.selectedStyle = null; + this.carId = null; + } } else { this.styleOptions = []; this.selectedStyle = null; + this.carId = null; } }, async selectedStyle(style) { @@ -280,6 +288,7 @@ export default { this.getVehicleDetails(); } else { this.imageUrl = null; + this.carId = null; } }, },