CASH-502
show mobile location question on mobile service selected
This commit is contained in:
parent
743a06bfae
commit
7a9ac690e5
2 changed files with 18 additions and 14 deletions
|
|
@ -114,8 +114,7 @@
|
||||||
:selectedAppointmentType="selectedAppointmentType"
|
:selectedAppointmentType="selectedAppointmentType"
|
||||||
:shopProviderData="shopProviderData"
|
:shopProviderData="shopProviderData"
|
||||||
:isDisplayed="isShopQuestionDisplayed"
|
:isDisplayed="isShopQuestionDisplayed"
|
||||||
cmsWidgetName="ShopQuestionWidget"
|
cmsWidgetName="ShopQuestionWidget" />
|
||||||
:isInshopOnly="isInshopOnly" />
|
|
||||||
|
|
||||||
<contentGroupModal ref="RecalModal" cmsWidgetName="RecalModal" />
|
<contentGroupModal ref="RecalModal" cmsWidgetName="RecalModal" />
|
||||||
|
|
||||||
|
|
@ -176,11 +175,12 @@ const MOBILE_FEE_PART_TYPE = "MOBILE FEE";
|
||||||
// DEFINE VALIDATION RULES
|
// DEFINE VALIDATION RULES
|
||||||
defineRule("mobile-location-required", (value) => {
|
defineRule("mobile-location-required", (value) => {
|
||||||
if (
|
if (
|
||||||
!value.addressQuestions.streetAddress ||
|
(!value.addressQuestions.streetAddress ||
|
||||||
!value.addressQuestions.city ||
|
!value.addressQuestions.city ||
|
||||||
!value.addressQuestions.state ||
|
!value.addressQuestions.state ||
|
||||||
!value.addressQuestions.zipCode ||
|
!value.addressQuestions.zipCode ||
|
||||||
!value.isVehicleProtected
|
!value.isVehicleProtected) &&
|
||||||
|
value.isMobileSelected
|
||||||
) {
|
) {
|
||||||
return errorMessages.MOBILE_LOCATION_REQUIRED;
|
return errorMessages.MOBILE_LOCATION_REQUIRED;
|
||||||
}
|
}
|
||||||
|
|
@ -754,6 +754,13 @@ export default {
|
||||||
setMobileLocationInValid(isMobileLocationInValid) {
|
setMobileLocationInValid(isMobileLocationInValid) {
|
||||||
this.isMobileAddressValid = !isMobileLocationInValid;
|
this.isMobileAddressValid = !isMobileLocationInValid;
|
||||||
},
|
},
|
||||||
|
displayMobileAddressQuestion(openMobileLocation) {
|
||||||
|
var mobileLocationQuestionsRef = this.$refs.mobileLocationQuestions;
|
||||||
|
var isMobileAddressComplete = mobileLocationQuestionsRef.isMobileAddressComplete;
|
||||||
|
if (isMobileAddressComplete) {
|
||||||
|
mobileLocationQuestionsRef.isMobileLocationOpened = openMobileLocation;
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
zipCode: {
|
zipCode: {
|
||||||
|
|
@ -765,8 +772,10 @@ export default {
|
||||||
this.selectedProvider = new Provider(
|
this.selectedProvider = new Provider(
|
||||||
this.shopProviderData.mobileProviderNumber
|
this.shopProviderData.mobileProviderNumber
|
||||||
);
|
);
|
||||||
|
this.displayMobileAddressQuestion(true);
|
||||||
} else {
|
} else {
|
||||||
this.selectedProvider = new Provider();
|
this.selectedProvider = new Provider();
|
||||||
|
this.displayMobileAddressQuestion(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -778,14 +787,10 @@ export default {
|
||||||
this.selectedProvider = new Provider(
|
this.selectedProvider = new Provider(
|
||||||
this.shopProviderData.mobileProviderNumber
|
this.shopProviderData.mobileProviderNumber
|
||||||
);
|
);
|
||||||
var mobileLocationQuestionsRef = this.$refs.mobileLocationQuestions;
|
this.displayMobileAddressQuestion(true);
|
||||||
var isMobileAddressComplete =
|
|
||||||
mobileLocationQuestionsRef.isMobileAddressComplete;
|
|
||||||
if (isMobileAddressComplete) {
|
|
||||||
mobileLocationQuestionsRef.isMobileLocationOpened = true;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.selectedProvider = new Provider();
|
this.selectedProvider = new Provider();
|
||||||
|
this.displayMobileAddressQuestion(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,6 @@ export default {
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
validationRules: String,
|
validationRules: String,
|
||||||
isDisplayed: Boolean,
|
isDisplayed: Boolean,
|
||||||
isInshopOnly: Boolean,
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
questionText() {
|
questionText() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue