Updates for Military zip front end.
This commit is contained in:
parent
5d47859618
commit
532a017064
1 changed files with 3 additions and 21 deletions
|
|
@ -10,10 +10,6 @@
|
|||
cmsWidgetName="AlertMilitaryBaseZipWidget"
|
||||
v-if="zipContainsMilitaryBase"
|
||||
alertClass="alert-warning" />
|
||||
<div>shouldDisableForwardAction: {{ shouldDisableForwardAction }}</div>
|
||||
<div>
|
||||
<button @click="toggleZip">Toggle Zip</button>
|
||||
</div>
|
||||
</div>
|
||||
<serviceZipModalQuestion
|
||||
v-model="serviceZipCodeQuestion"
|
||||
|
|
@ -68,17 +64,12 @@ export default {
|
|||
isZipServiceableMobile: null,
|
||||
isZipServiceableInShop: null,
|
||||
mobileFeePart: null,
|
||||
};
|
||||
return {
|
||||
serviceLocationZip: 0,
|
||||
zipContainsMilitaryBase: false,
|
||||
};
|
||||
},
|
||||
async beforeRouteEnter(to, from, next) {
|
||||
// Call APIs
|
||||
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
||||
const zip = store.getters.order.serviceLocation.zipCode;
|
||||
|
||||
const serviceZipCode = store.getters.order.serviceLocation.zipCode;
|
||||
const serviceType = store.getters.damage.isRepair ? "Repair" : "Replace";
|
||||
const parentAccountNumber = store.getters.payment.parentAccountNumber;
|
||||
|
|
@ -103,7 +94,7 @@ export default {
|
|||
},
|
||||
{
|
||||
resultKey: "zipCodeData",
|
||||
promise: baseMixin.methods.getZipCodeData(zip),
|
||||
promise: baseMixin.methods.getZipCodeData(serviceZipCode),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -114,7 +105,7 @@ export default {
|
|||
vm.setCmsContent(resultMap.cmsContent);
|
||||
vm.setData(resultMap.mobileFeePart);
|
||||
vm.zipContainsMilitaryBase = resultMap.zipCodeData.containsMilitaryBase;
|
||||
vm.serviceLocationZip = zip;
|
||||
vm.zipCode = serviceZipCode;
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -157,8 +148,6 @@ export default {
|
|||
this.isVehicleProtected = newValue.isVehicleProtected;
|
||||
},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
shouldDisableForwardAction() {
|
||||
return this.zipContainsMilitaryBase;
|
||||
},
|
||||
|
|
@ -217,16 +206,9 @@ export default {
|
|||
forwardButtonAction() {
|
||||
navigateToHeritageFunnel({ loadingModal: this.$refs.loadingModal });
|
||||
},
|
||||
toggleZip() {
|
||||
if (this.serviceLocationZip == 43228) {
|
||||
this.serviceLocationZip = 45433;
|
||||
} else {
|
||||
this.serviceLocationZip = 43228;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
serviceLocationZip(current, previous) {
|
||||
zipCode(current, previous) {
|
||||
if (current !== previous) {
|
||||
baseMixin.methods.getZipCodeData(current).then((r) => {
|
||||
this.zipContainsMilitaryBase = r.containsMilitaryBase;
|
||||
|
|
|
|||
Loading…
Reference in a new issue