WIP
This commit is contained in:
parent
621b2c18a4
commit
a4dd4340b0
5 changed files with 37 additions and 61 deletions
|
|
@ -26,6 +26,7 @@
|
||||||
iconRight ? 'icon-right' : '',
|
iconRight ? 'icon-right' : '',
|
||||||
cornerStyle === 'rounded' ? 'rounded-pill' : '',
|
cornerStyle === 'rounded' ? 'rounded-pill' : '',
|
||||||
]"
|
]"
|
||||||
|
:autocomplete="preventAutoFill && 'do-not-autofill'"
|
||||||
:validationRules="validationRules"
|
:validationRules="validationRules"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
@blur="handleChange"
|
@blur="handleChange"
|
||||||
|
|
@ -76,6 +77,7 @@ export default {
|
||||||
questionAlignment: String, // Left or center. Left is default.
|
questionAlignment: String, // Left or center. Left is default.
|
||||||
cornerStyle: String, // Rounded or square. Square is default.
|
cornerStyle: String, // Rounded or square. Square is default.
|
||||||
includeSearchIcon: Boolean,
|
includeSearchIcon: Boolean,
|
||||||
|
preventAutoFill: Boolean,
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const propsClone = Object.assign({}, props);
|
const propsClone = Object.assign({}, props);
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ export default {
|
||||||
streetAddress: "",
|
streetAddress: "",
|
||||||
apartmentNumberOrBusinessName: "",
|
apartmentNumberOrBusinessName: "",
|
||||||
city: "",
|
city: "",
|
||||||
state: null,
|
state: "",
|
||||||
zipCode: "",
|
zipCode: "",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -65,10 +65,10 @@ export default {
|
||||||
zipCode: "",
|
zipCode: "",
|
||||||
},
|
},
|
||||||
isVehicleProtected: null,
|
isVehicleProtected: null,
|
||||||
isZipServiceableMobile: null,
|
|
||||||
isZipServiceableInShop: null,
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
isZipServiceableMobile: Boolean,
|
||||||
|
isZipServiceableInShop: Boolean,
|
||||||
serviceZipCode: String,
|
serviceZipCode: String,
|
||||||
linkWidgetName: String,
|
linkWidgetName: String,
|
||||||
modalWidgetName: String,
|
modalWidgetName: String,
|
||||||
|
|
@ -173,6 +173,12 @@ export default {
|
||||||
modelValue(newValue) {
|
modelValue(newValue) {
|
||||||
this.internalModel = this.copyModel(newValue);
|
this.internalModel = this.copyModel(newValue);
|
||||||
},
|
},
|
||||||
|
internalModel: {
|
||||||
|
handler(newValue) {
|
||||||
|
console.log(newValue);
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
textLink,
|
textLink,
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,15 @@
|
||||||
<funnelHeader cmsWidgetName="FunnelHeaderWidget" />
|
<funnelHeader cmsWidgetName="FunnelHeaderWidget" />
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||||
<serviceZipModalQuestion
|
<serviceZipModalQuestion
|
||||||
v-model="serviceZipQuestionModel"
|
v-model="serviceZipCodeQuestion"
|
||||||
@service-zip-updated="resetMobileLocation"
|
@service-zip-updated="resetMobileLocation"
|
||||||
linkWidgetName="ServiceZipLinkWidget"
|
linkWidgetName="ServiceZipLinkWidget"
|
||||||
modalWidgetName="ServiceZipModalWidget"
|
modalWidgetName="ServiceZipModalWidget"
|
||||||
textboxQuestionWidgetName="ServiceZipQuestionWidget"
|
textboxQuestionWidgetName="ServiceZipQuestionWidget"
|
||||||
alertInvalidZipWidgetName="AlertInvalidZipWidget" />
|
alertInvalidZipWidgetName="AlertInvalidZipWidget" />
|
||||||
<mobileLocationModalQuestions
|
<mobileLocationModalQuestions
|
||||||
|
v-model="mobileLocationQuestions"
|
||||||
ref="mobileLocationModalQuestions"
|
ref="mobileLocationModalQuestions"
|
||||||
v-model="mobileLocationQuestionsModel"
|
|
||||||
linkWidgetName="MobileLocationLinkWidget"
|
linkWidgetName="MobileLocationLinkWidget"
|
||||||
modalWidgetName="MobileLocationModalWidget"
|
modalWidgetName="MobileLocationModalWidget"
|
||||||
mobileFeeDisclaimerWidgetName="MobileFeeDisclaimerWidget"
|
mobileFeeDisclaimerWidgetName="MobileFeeDisclaimerWidget"
|
||||||
|
|
@ -45,15 +45,27 @@ export default {
|
||||||
name: "service-location",
|
name: "service-location",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isServiceable: null,
|
// serviceState: "",
|
||||||
streetAddress: "",
|
// serviceZipCode: "",
|
||||||
apartmentNumberOrBusinessName: "",
|
// isServiceable: null,
|
||||||
city: "",
|
// isVehicleProtected: null,
|
||||||
state: "",
|
// isZipServiceableMobile: null,
|
||||||
zipCode: "",
|
// isZipServiceableInShop: null,
|
||||||
isVehicleProtected: null,
|
serviceZipCodeQuestion: {
|
||||||
isZipServiceableMobile: null,
|
state: "",
|
||||||
isZipServiceableInShop: null,
|
zipCode: "",
|
||||||
|
isServiceable: null,
|
||||||
|
},
|
||||||
|
mobileLocationQuestions: {
|
||||||
|
addressQuestions: {
|
||||||
|
streetAddress: "",
|
||||||
|
apartmentNumberOrBusinessName: "",
|
||||||
|
city: "",
|
||||||
|
state: "",
|
||||||
|
zipCode: "",
|
||||||
|
},
|
||||||
|
isVehicleProtected: null,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -76,65 +88,20 @@ export default {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
serviceZipQuestionModel: {
|
|
||||||
get: function () {
|
|
||||||
return {
|
|
||||||
state: this.state,
|
|
||||||
zipCode: this.zipCode,
|
|
||||||
isServiceable: this.isServiceable,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
set: function (newValue) {
|
|
||||||
this.state = newValue.state;
|
|
||||||
this.zipCode = newValue.zipCode;
|
|
||||||
this.isServiceable = newValue.isServiceable;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mobileLocationQuestionsModel: {
|
|
||||||
get: function () {
|
|
||||||
return {
|
|
||||||
addressQuestions: {
|
|
||||||
streetAddress: this.streetAddress,
|
|
||||||
apartmentNumberOrBusinessName: this.apartmentNumberOrBusinessName,
|
|
||||||
city: this.city,
|
|
||||||
state: this.state,
|
|
||||||
zipCode: this.zipCode,
|
|
||||||
},
|
|
||||||
isVehicleProtected: this.isVehicleProtected,
|
|
||||||
isZipServiceableMobile: this.isZipServiceableMobile,
|
|
||||||
isZipServiceableInShop: this.isZipServiceableInShop,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
set: function (newValue) {
|
|
||||||
this.streetAddress = newValue.addressQuestions.streetAddress;
|
|
||||||
this.apartmentNumberOrBusinessName =
|
|
||||||
newValue.addressQuestions.apartmentNumberOrBusinessName;
|
|
||||||
this.city = newValue.addressQuestions.city;
|
|
||||||
this.state = newValue.addressQuestions.state;
|
|
||||||
this.zipCode = newValue.addressQuestions.zipCode;
|
|
||||||
this.isVehicleProtected = newValue.isVehicleProtected;
|
|
||||||
this.isZipServiceableMobile = newValue.isZipServiceableMobile;
|
|
||||||
this.isZipServiceableInShop = newValue.isZipServiceableInShop;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
resetMobileLocation() {
|
resetMobileLocation() {
|
||||||
this.mobileLocationQuestionsModel = {
|
this.mobileLocationQuestions = {
|
||||||
addressQuestions: {
|
addressQuestions: {
|
||||||
streetAddress: "",
|
streetAddress: "",
|
||||||
apartmentNumberOrBusinessName: "",
|
apartmentNumberOrBusinessName: "",
|
||||||
city: "",
|
city: "",
|
||||||
state: null,
|
state: "",
|
||||||
zipCode: "",
|
zipCode: "",
|
||||||
},
|
},
|
||||||
isVehicleProtected: null,
|
isVehicleProtected: null,
|
||||||
isZipServiceableMobile: null,
|
|
||||||
isZipServiceableInShop: null,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$refs.mobileLocationModalQuestions.resetComponent();
|
this.$refs.mobileLocationModalQuestions.resetComponent();
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
inputId="serviceZipCode"
|
inputId="serviceZipCode"
|
||||||
questionAlignment="center"
|
questionAlignment="center"
|
||||||
mask="#####"
|
mask="#####"
|
||||||
|
:preventAutoFill="true"
|
||||||
:displayQuestionText="false"
|
:displayQuestionText="false"
|
||||||
isRequired
|
isRequired
|
||||||
validationRules="zip-required|zip-format" />
|
validationRules="zip-required|zip-format" />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue