Minor formating changes
This commit is contained in:
parent
da2ae89453
commit
0e1be70c23
3 changed files with 4 additions and 25 deletions
|
|
@ -43,7 +43,7 @@
|
||||||
<script>
|
<script>
|
||||||
import buttonMain from "@/ux-components/button-main/button-main";
|
import buttonMain from "@/ux-components/button-main/button-main";
|
||||||
import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
import { useForm, useIsFormTouched, useIsFormDirty, useIsFormValid } from "vee-validate";
|
import { useForm } from "vee-validate";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "modal",
|
name: "modal",
|
||||||
|
|
@ -62,18 +62,11 @@ export default {
|
||||||
|
|
||||||
const { meta, validate, resetForm } = useForm();
|
const { meta, validate, resetForm } = useForm();
|
||||||
|
|
||||||
const isFormTouched = useIsFormTouched();
|
|
||||||
const isFormDirty = useIsFormDirty();
|
|
||||||
const isFormValid = useIsFormValid();
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
modalId,
|
modalId,
|
||||||
meta,
|
meta,
|
||||||
validate,
|
validate,
|
||||||
resetForm,
|
resetForm,
|
||||||
isFormTouched,
|
|
||||||
isFormDirty,
|
|
||||||
isFormValid,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,6 @@ import modal from "@/digital-components/modal/modal";
|
||||||
import alert from "@/ux-components/alert/alert";
|
import alert from "@/ux-components/alert/alert";
|
||||||
import addressQuestions from "@/layouts/address-lookup/customer-questions/address-questions/address-questions";
|
import addressQuestions from "@/layouts/address-lookup/customer-questions/address-questions/address-questions";
|
||||||
import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question";
|
import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question";
|
||||||
import store from "@/store";
|
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
import { deepClone } from "@/layouts/service-location/helpers/object-cloning-helper/object-cloning-helper";
|
import { deepClone } from "@/layouts/service-location/helpers/object-cloning-helper/object-cloning-helper";
|
||||||
|
|
@ -140,7 +139,6 @@ export default {
|
||||||
modalFooterText() {
|
modalFooterText() {
|
||||||
return this.getCmsContent(this.modalWidgetName, "FooterText");
|
return this.getCmsContent(this.modalWidgetName, "FooterText");
|
||||||
},
|
},
|
||||||
|
|
||||||
addressModel: {
|
addressModel: {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this.modelValue.addressQuestions;
|
return this.modelValue.addressQuestions;
|
||||||
|
|
@ -154,15 +152,12 @@ export default {
|
||||||
closeModal() {
|
closeModal() {
|
||||||
this.$refs[this.modalName].closeModal();
|
this.$refs[this.modalName].closeModal();
|
||||||
},
|
},
|
||||||
|
|
||||||
onModalOpened() {
|
onModalOpened() {
|
||||||
this.internalModel = deepClone(this.modelValue);
|
this.internalModel = deepClone(this.modelValue);
|
||||||
},
|
},
|
||||||
|
|
||||||
onModalClosed() {
|
onModalClosed() {
|
||||||
this.internalModel = deepClone(this.modelValue);
|
this.internalModel = deepClone(this.modelValue);
|
||||||
},
|
},
|
||||||
|
|
||||||
resetComponent(updatedServiceZipCodeInfo) {
|
resetComponent(updatedServiceZipCodeInfo) {
|
||||||
// Reset the validation form, setting the initial values
|
// Reset the validation form, setting the initial values
|
||||||
// for the state and zipCode to those that were entered
|
// for the state and zipCode to those that were entered
|
||||||
|
|
@ -195,12 +190,13 @@ export default {
|
||||||
|
|
||||||
const mobileFeePart = await getPricedMobileFeePart(serviceZipCode);
|
const mobileFeePart = await getPricedMobileFeePart(serviceZipCode);
|
||||||
|
|
||||||
// emit it to parent
|
// emit additional data to parent
|
||||||
this.$emit("updated-mobile-fee-part", mobileFeePart);
|
this.$emit("updated-mobile-fee-part", mobileFeePart);
|
||||||
|
this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase);
|
||||||
|
|
||||||
// Update the page level model
|
// Update the page level model
|
||||||
this.$emit("update:modelValue", this.internalModel);
|
this.$emit("update:modelValue", this.internalModel);
|
||||||
this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase);
|
|
||||||
this.closeModal();
|
this.closeModal();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -96,49 +96,39 @@ export default {
|
||||||
resetAlerts() {
|
resetAlerts() {
|
||||||
this.displayInvalidZipAlert = false;
|
this.displayInvalidZipAlert = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
resetsOnZipInput() {
|
resetsOnZipInput() {
|
||||||
this.resetAlerts();
|
this.resetAlerts();
|
||||||
},
|
},
|
||||||
|
|
||||||
focusOnZipInput() {
|
focusOnZipInput() {
|
||||||
const input = document.getElementById(this.serviceZipCodeTextInputId);
|
const input = document.getElementById(this.serviceZipCodeTextInputId);
|
||||||
input?.focus();
|
input?.focus();
|
||||||
},
|
},
|
||||||
|
|
||||||
copyModel(modelToCopy) {
|
copyModel(modelToCopy) {
|
||||||
return {
|
return {
|
||||||
state: modelToCopy.state,
|
state: modelToCopy.state,
|
||||||
zipCode: modelToCopy.zipCode,
|
zipCode: modelToCopy.zipCode,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
openModal() {
|
openModal() {
|
||||||
this.$refs[this.modalName].openModal();
|
this.$refs[this.modalName].openModal();
|
||||||
},
|
},
|
||||||
|
|
||||||
closeModal() {
|
closeModal() {
|
||||||
this.$refs[this.modalName].closeModal();
|
this.$refs[this.modalName].closeModal();
|
||||||
},
|
},
|
||||||
|
|
||||||
resetModalButtonStyle() {
|
resetModalButtonStyle() {
|
||||||
this.$refs[this.modalName].resetButtonStyle();
|
this.$refs[this.modalName].resetButtonStyle();
|
||||||
},
|
},
|
||||||
|
|
||||||
onInputIdAssigned(inputId) {
|
onInputIdAssigned(inputId) {
|
||||||
this.serviceZipCodeTextInputId = inputId;
|
this.serviceZipCodeTextInputId = inputId;
|
||||||
},
|
},
|
||||||
|
|
||||||
onModalOpened() {
|
onModalOpened() {
|
||||||
this.internalModel.zipCode = this.modelValue.zipCode;
|
this.internalModel.zipCode = this.modelValue.zipCode;
|
||||||
this.focusOnZipInput();
|
this.focusOnZipInput();
|
||||||
},
|
},
|
||||||
|
|
||||||
onModalClosed() {
|
onModalClosed() {
|
||||||
this.internalModel.zipCode = this.modelValue.zipCode;
|
this.internalModel.zipCode = this.modelValue.zipCode;
|
||||||
this.resetsOnZipInput();
|
this.resetsOnZipInput();
|
||||||
},
|
},
|
||||||
|
|
||||||
async setZipCode() {
|
async setZipCode() {
|
||||||
if (this.internalModel.zipCode !== this.modelValue.zipCode) {
|
if (this.internalModel.zipCode !== this.modelValue.zipCode) {
|
||||||
this.resetAlerts();
|
this.resetAlerts();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue