+
diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue
index 6fa8728ba..6102373aa 100644
--- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue
+++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue
@@ -1,34 +1,39 @@
+ v-html="mobileLocationLinkPromptText">
+
-
-
+
+
@@ -36,33 +41,36 @@
// Components
import textLink from "@/ux-components/text-link/text-link";
import modal from "@/digital-components/modal/modal";
-import buttonQuestion from "@/digital-components/button-question/button-question";
import alert from "@/ux-components/alert/alert";
-import textboxQuestion from "@/digital-components/textbox-question/textbox-question";
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 textBlock from "@/digital-components/text-block/text-block";
// Supporting Files
-import { defineRule } from "vee-validate";
+import { defineRule, useForm } from "vee-validate";
import { required, regex } from "@/helpers/validation-rules";
import { errorMessages } from "@/constants/error-messages";
import { storeActions } from "@/constants/store-actions.js";
import baseMixin from "@/mixins/base-mixin.js";
-import TextBlock from "../../../digital-components/text-block/text-block.vue";
// Define Validation Rules
-defineRule("zip-required", required(errorMessages.SERVICE_ZIP_REQUIRED));
-defineRule("zip-format", regex(/(^\d{5}$)|(^\d{5}-\d{4}$)/, errorMessages.SERVICE_ZIP_FORMAT));
+
export default {
name: "mobile-location-modal-questions",
emits: ["update:modelValue"], // The component emits an event
data() {
return {
- isVehicleProtectedAnswers: [],
+ answers: [],
};
},
+ setup() {
+ const modalForm = useForm();
+
+ return {
+ modalForm,
+ }
+ },
props: {
modelValue: {
type: Object,
@@ -81,43 +89,28 @@ export default {
},
cmsWidgetName: String,
modalWidgetName: String,
- textboxQuestionWidgetName: String,
+ mobileFeeDisclaimerWidgetName: String,
+ workspaceRequirementsWidgetName: String,
alertNonServiceableZipWidgetName: String,
alertInvalidZipWidgetName: String,
},
- methods: {
- loadInitialData() {
- return baseMixin.methods.dispatchStoreAction(storeActions.GET_VEHICLE_YEARS, {});
- },
- initializeComponent(initialData) {
- this.isVehicleProtectedAnswers = initialData;
- },
- openModal() {
- this.$refs.mobileServiceModal.openModal();
- },
- closeModal() {
- this.$refs.mobileServiceModal.closeModal();
- },
- focusOnZipInput() {
- this.$nextTick(() => {
- console.log(this.$refs);
- const input = this.$refs.streetAddressField;
- input.focus();
- });
- },
- saveMobileLocationData() {},
- },
computed: {
+ mobileLocationLinkPromptText() {
+ return this.getCmsContent(this.cmsWidgetName, "HeaderText");
+ },
+ mobileLocationLinkText() {
+ return this.getCmsContent(this.cmsWidgetName, "BodyText");
+ },
getModalId() {
return "#" + this.modalWidgetName;
},
- questionText() {
- return this.getCmsContent(this.cmsWidgetName, "HeaderText");
+ modalHeaderText() {
+ return this.getCmsContent(this.modalWidgetName, "HeaderText");
},
- mobileLocationDisplayText() {
- return this.getCmsContent(this.cmsWidgetName, "FooterText");
+ modalFooterText() {
+ return this.getCmsContent(this.modalWidgetName, "FooterText");
},
- mobileQuestionModel: {
+ mobileLocationQuestionModel: {
get: function () {
return this.modelValue;
},
@@ -126,6 +119,30 @@ export default {
},
},
},
+ methods: {
+ loadInitialData() {
+ return baseMixin.methods.dispatchStoreAction(storeActions.GET_VEHICLE_YEARS, {});
+ },
+ initializeComponent(initialData) {
+ this.answers = initialData;
+ },
+ openModal() {
+ this.$refs.mobileLocationModal.openModal();
+ },
+ closeModal() {
+ this.$refs.mobileLocationModal.closeModal();
+ },
+ async saveMobileLocationData() {
+ const componentValidation = await this.modalForm.validate();
+ if (componentValidation.valid) {
+ this.closeModal();
+ } else {
+ this.$refs.mobileLocationModal.resetButtonStyle();
+ }
+
+ },
+ },
+
mounted() {},
components: {
textLink,
@@ -148,4 +165,9 @@ export default {
vertical-align: middle;
margin-right: 0.5em;
}
+
+.address-questions {
+ margin-top: 0em;
+}
+
diff --git a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue
index 4fb06a201..45b80caa6 100644
--- a/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue
+++ b/src/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue
@@ -6,14 +6,24 @@
groupName="isVehicleProtected"
textPosition="text-center"
v-model="selectedValue"
+ validationRules="option-required"
isRequired />
+
+