From 1910497b2e059605c37961837b3a4615b1334be6 Mon Sep 17 00:00:00 2001 From: Kroell Date: Mon, 24 Apr 2023 13:02:15 -0400 Subject: [PATCH] military zip alert --- .../service-location/service-location.vue | 52 ++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 037423df..f5652c18 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -12,7 +12,15 @@ + { vm.setCmsContent(resultMap.cmsContent); + vm.setData( + resultMap.zipCodeData, + resultMap.serviceabilityDetails, + ) }); }, setup() { @@ -111,7 +124,10 @@ export default { zipCode: this.mainStore.order.customer.address.zipCode, state: this.mainStore.order.customer.address.state, isServiceZipServiceable: null, + isGlassServiceableMobile: null, + isRecalibrationServiceableMobile: null, selectedAppointmentType: "", + zipContainsMilitaryBase: false, }; }, computed: { @@ -138,6 +154,16 @@ export default { this.$nextTick(); }, + }, + isServiceableMobile() { + if (this.isRecalibrationServiceableMobile !== null) { + return this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile; + } else { + return this.isGlassServiceableMobile; + } + }, + displayMilitaryZipAlert() { + return this.zipContainsMilitaryBase && this.isServiceableMobile; } }, methods: { @@ -154,7 +180,30 @@ export default { //validate and save data here this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD, this.$route); }, - resetDependentState() {}, + resetDependentState() { + + }, + setData(zipCodeData, serviceabilityDetails) { + if (zipCodeData) { + this.zipContainsMilitaryBase = zipCodeData.containsMilitaryBase; + } + if (serviceabilityDetails) { + this.setServiceabilityDetails(serviceabilityDetails); + } + }, + setContainsMilitaryBase(val) { + if (this.zipContainsMilitaryBase !== val) { + this.zipContainsMilitaryBase = val; + } + }, + setServiceabilityDetails(serviceabilityDetails) { + this.isGlassServiceableInshop = serviceabilityDetails.isGlassServiceableInshop; + this.isRecalibrationServiceableInshop = + serviceabilityDetails.isRecalibrationServiceableInshop; + this.isGlassServiceableMobile = serviceabilityDetails.isGlassServiceableMobile; + this.isRecalibrationServiceableMobile = + serviceabilityDetails.isRecalibrationServiceableMobile; + }, }, components: { siteFooter, @@ -163,6 +212,7 @@ export default { buttonQuestion, Form, serviceZipModalQuestion, + alert }, };