Contains Military zip emit on Location questions modal
This commit is contained in:
parent
14541d110c
commit
c4f0624f10
2 changed files with 12 additions and 3 deletions
|
|
@ -65,6 +65,7 @@ import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/servi
|
|||
export default {
|
||||
name: "mobile-location-modal-questions",
|
||||
emits: ["update:modelValue", "updated-mobile-fee-part"],
|
||||
emits: ["update:modelValue", "updated-zip-code", "updated-contains-military-base"], // The component emits an event
|
||||
data() {
|
||||
return {
|
||||
internalModel: deepClone(this.modelValue),
|
||||
|
|
@ -187,6 +188,7 @@ export default {
|
|||
|
||||
// Update the page level model
|
||||
this.$emit("update:modelValue", this.internalModel);
|
||||
this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase);
|
||||
this.closeModal();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
:mobileFeePart="mobileFeePart"
|
||||
@updated-mobile-fee-part="setMobileFeePart"
|
||||
linkWidgetName="ServiceZipLinkWidget"
|
||||
modalWidgetName="ServiceZipModalWidget"
|
||||
modalWidgetName="ServiceZipModalWidget"
|
||||
@updated-contains-military-base="setContainsMilitaryBase" />
|
||||
<alert
|
||||
class="my-4"
|
||||
cmsWidgetName="AlertMilitaryBaseZipWidget"
|
||||
v-if="zipContainsMilitaryBase"
|
||||
v-if="showMilitaryZipAlert"
|
||||
alertClass="alert-warning" />
|
||||
<mobileLocationModalQuestions
|
||||
v-model="mobileLocationQuestions"
|
||||
|
|
@ -23,7 +23,8 @@
|
|||
@updated-mobile-fee-part="setMobileFeePart"
|
||||
ref="mobileLocationModalQuestions"
|
||||
linkWidgetName="MobileLocationLinkWidget"
|
||||
modalWidgetName="MobileLocationModalWidget" />
|
||||
modalWidgetName="MobileLocationModalWidget"
|
||||
@updated-contains-military-base="setContainsMilitaryBase" />
|
||||
<funnel-footer
|
||||
cmsWidgetName="FunnelFooterWidget"
|
||||
ref="funnelFooter"
|
||||
|
|
@ -142,6 +143,12 @@ export default {
|
|||
this.isVehicleProtected = newValue.isVehicleProtected;
|
||||
},
|
||||
},
|
||||
showMilitaryZipAlert() {
|
||||
return (
|
||||
this.zipContainsMilitaryBase &&
|
||||
(this.isZipServiceableMobile == null || this.isZipServiceableMobile === true)
|
||||
);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
arePagePrerequisitesValid() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue