This commit is contained in:
Leah Schumann 2023-03-29 09:21:02 -04:00
parent 788dfca3b5
commit 67154e9192

View file

@ -16,7 +16,12 @@
<alert <alert
class="my-4" class="my-4"
cmsWidgetName="AlertMilitaryBaseZipWidget" cmsWidgetName="AlertMilitaryBaseZipWidget"
v-if="showMilitaryZipAlert" v-if="displayMilitaryZipAlert"
alertClass="alert-warning" />
<alert
class="my-4"
cmsWidgetName="AlertNoServiceWarningWidget"
v-if="displayNoServiceWarningAlert"
alertClass="alert-warning" /> alertClass="alert-warning" />
<serviceTypeQuestion <serviceTypeQuestion
v-model="selectedServiceType" v-model="selectedServiceType"
@ -189,12 +194,26 @@ export default {
this.mobileLocationValidationField = "isValid"; this.mobileLocationValidationField = "isValid";
}, },
}, },
showMilitaryZipAlert() { displayMilitaryZipAlert() {
const isZipServiceableMobile = const isZipServiceableMobile =
this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile; this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile;
return this.zipContainsMilitaryBase && isZipServiceableMobile; return this.zipContainsMilitaryBase && isZipServiceableMobile;
}, },
displayNoServiceWarningAlert() {
let mobileAvailable;
if (this.IsRecalibrationServiceableMobile == null) {
mobileAvailable = this.isGlassServiceableMobile;
} else {
mobileAvailable =
this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile;
}
const inshopAvailable =
this.isGlassServiceableInshop && this.isRecalibrationServiceableInshop;
return inshopAvailable && !mobileAvailable;
},
}, },
methods: { methods: {
arePagePrerequisitesValid() { arePagePrerequisitesValid() {