formatting

This commit is contained in:
Matt Caimi 2023-02-24 09:23:13 -05:00
parent 823e45f054
commit 22cc5a7be5

View file

@ -63,7 +63,7 @@ export default {
internalModel: this.copyModel(this.modelValue), internalModel: this.copyModel(this.modelValue),
displayInvalidZipAlert: false, displayInvalidZipAlert: false,
modalName: "MobileLocationModalWidget", modalName: "MobileLocationModalWidget",
mobileFee: "", mobileFee: "",
}; };
}, },
props: { props: {
@ -78,11 +78,11 @@ export default {
zipCode: "", zipCode: "",
}, },
isVehicleProtected: null, isVehicleProtected: null,
serviceZipCode: "" serviceZipCode: "",
}), }),
}, },
isZipServiceableMobile: Boolean, isZipServiceableMobile: Boolean,
isZipServiceableInShop: Boolean, isZipServiceableInShop: Boolean,
linkWidgetName: String, linkWidgetName: String,
modalWidgetName: String, modalWidgetName: String,
alertNonServiceableZipWidgetName: String, alertNonServiceableZipWidgetName: String,
@ -91,7 +91,7 @@ export default {
mounted() { mounted() {
this.getMobileFee().then((result) => { this.getMobileFee().then((result) => {
this.mobileFee = result; this.mobileFee = result;
}); });
}, },
computed: { computed: {
mobileLocationLinkPromptText() { mobileLocationLinkPromptText() {
@ -140,7 +140,7 @@ export default {
zipCode: modelToCopy.addressQuestions.zipCode, zipCode: modelToCopy.addressQuestions.zipCode,
}, },
isVehicleProtected: modelToCopy.isVehicleProtected, isVehicleProtected: modelToCopy.isVehicleProtected,
serviceZipCode: modelToCopy.serviceZipCode serviceZipCode: modelToCopy.serviceZipCode,
}; };
}, },
@ -156,9 +156,9 @@ export default {
if (!this.internalModel.serviceZipCode) { if (!this.internalModel.serviceZipCode) {
return ""; return "";
} }
const zipCodeData = await this.getZipCodeData(this.internalModel.serviceZipCode); const zipCodeData = await this.getZipCodeData(this.internalModel.serviceZipCode);
// Get the Mobile Fee Part // Get the Mobile Fee Part
const mobileFeePart = await baseMixin.methods.dispatchStoreAction( const mobileFeePart = await baseMixin.methods.dispatchStoreAction(
storeActions.GET_MOBILE_FEE_PART, storeActions.GET_MOBILE_FEE_PART,
@ -169,11 +169,11 @@ export default {
// Get the Mobile Fee Part Price // Get the Mobile Fee Part Price
const pricingResults = await baseMixin.methods.dispatchStoreAction( const pricingResults = await baseMixin.methods.dispatchStoreAction(
storeActions.PRICE_ORDER_ITEMS, storeActions.PRICE_ORDER_ITEMS,
{ {
availableLineItems: [mobileFeePart.data], availableLineItems: [mobileFeePart.data],
serviceZipCode: zipCodeData.zipCode, serviceZipCode: zipCodeData.zipCode,
zipCodeCtu: zipCodeData.zipCodeCtu zipCodeCtu: zipCodeData.zipCodeCtu,
}, },
false false
); );
@ -220,14 +220,14 @@ export default {
this.displayInvalidZipAlert = true; this.displayInvalidZipAlert = true;
} else { } else {
// Update the page level model // Update the page level model
this.internalModel.serviceZipCode = this.internalModel.addressQuestions.zipCode; this.internalModel.serviceZipCode = this.internalModel.addressQuestions.zipCode;
this.$emit("update:modelValue", this.internalModel); this.$emit("update:modelValue", this.internalModel);
// Emit the update service zip code information to the parent to update the service zipcode details // Emit the update service zip code information to the parent to update the service zipcode details
this.$emit("updated-zip-code", { this.$emit("updated-zip-code", {
zipCode: this.internalModel.addressQuestions.zipCode, zipCode: this.internalModel.addressQuestions.zipCode,
state: zipCodeData.state, state: zipCodeData.state,
isServiceable: zipCodeData.isServiceable isServiceable: zipCodeData.isServiceable,
}); });
this.closeModal(); this.closeModal();
@ -241,7 +241,7 @@ export default {
"modelValue.serviceZipCode": { "modelValue.serviceZipCode": {
async handler(newValue) { async handler(newValue) {
this.mobileFee = await this.getMobileFee(newValue); this.mobileFee = await this.getMobileFee(newValue);
}, },
}, },
}, },
components: { components: {