Added service-type-location component to page

This commit is contained in:
Leah Schumann 2023-03-07 14:05:15 -05:00
parent eea249d3c2
commit 663682c7a4

View file

@ -4,13 +4,20 @@
<loadingModal ref="loadingModal" /> <loadingModal ref="loadingModal" />
<funnelHeader cmsWidgetName="FunnelHeaderWidget" /> <funnelHeader cmsWidgetName="FunnelHeaderWidget" />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" /> <funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
<div class="fade-on-route-transition sub-container make-tall">
<serviceZipModalQuestion <serviceZipModalQuestion
v-model="serviceZipCodeQuestion" v-model="serviceZipCodeQuestion"
@updated-service-zip-code="resetMobileLocation" @updated-service-zip-code="resetMobileLocation"
ref="serviceZipCodeQuestion" ref="serviceZipCodeQuestion"
linkWidgetName="ServiceZipLinkWidget" linkWidgetName="ServiceZipLinkWidget"
modalWidgetName="ServiceZipModalWidget" /> modalWidgetName="ServiceZipModalWidget" />
<serviceTypeQuestion
v-model="selectedServiceType"
ref="serviceType"
groupName="ServiceTypeQuestion"
cmsWidgetName="ServiceTypeQuestionWidget"/>
<mobileLocationModalQuestions <mobileLocationModalQuestions
v-if="selectedServiceType === 'Mobile'"
v-model="mobileLocationQuestions" v-model="mobileLocationQuestions"
ref="mobileLocationModalQuestions" ref="mobileLocationModalQuestions"
linkWidgetName="MobileLocationLinkWidget" linkWidgetName="MobileLocationLinkWidget"
@ -22,6 +29,8 @@
@back-clicked="backButtonAction" @back-clicked="backButtonAction"
@ForwardClicked="forwardButtonAction" /> @ForwardClicked="forwardButtonAction" />
</div> </div>
</div>
</Form> </Form>
</template> </template>
@ -29,11 +38,15 @@
// Components // Components
import serviceZipModalQuestion from "@/layouts/service-location/service-zip-modal-question/service-zip-modal-question"; import serviceZipModalQuestion from "@/layouts/service-location/service-zip-modal-question/service-zip-modal-question";
import mobileLocationModalQuestions from "@/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions"; import mobileLocationModalQuestions from "@/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions";
import serviceTypeQuestion from "@/layouts/service-location/service-type-question/service-type-question";
import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; import funnelHeader from "@/fmg-components/funnel-header/funnel-header";
import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer";
import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header";
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue"; import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
import { Form } from "vee-validate"; import { Form, defineRule } from "vee-validate";
import { required, regex } from "@/helpers/validation-rules";
import { errorMessages } from "@/constants/error-messages";
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
import { settleAllPromises } from "@/helpers/layout-helper"; import { settleAllPromises } from "@/helpers/layout-helper";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
@ -53,6 +66,7 @@ export default {
isZipServiceableMobile: null, isZipServiceableMobile: null,
isZipServiceableInShop: null, isZipServiceableInShop: null,
mobileFeePart: null, mobileFeePart: null,
selectedServiceType: null
}; };
}, },
async beforeRouteEnter(to, from, next) { async beforeRouteEnter(to, from, next) {
@ -129,11 +143,12 @@ export default {
}, },
methods: { methods: {
arePagePrerequisitesValid() { arePagePrerequisitesValid() {
return ( return true;
store.getters.lineItems.supportingItems !== null && // return (
store.getters.order.serviceLocation.zipCode !== null && // store.getters.lineItems.supportingItems !== null &&
store.getters.payment.isInsurance !== null // store.getters.order.serviceLocation.zipCode !== null &&
); // store.getters.payment.isInsurance !== null
// );
}, },
setData(mobileFeePart) { setData(mobileFeePart) {
if (mobileFeePart) { if (mobileFeePart) {
@ -179,6 +194,7 @@ export default {
}, },
components: { components: {
serviceZipModalQuestion, serviceZipModalQuestion,
serviceTypeQuestion,
mobileLocationModalQuestions, mobileLocationModalQuestions,
funnelHeader, funnelHeader,
funnelFooter, funnelFooter,
@ -188,3 +204,11 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss">
.question-text {
& > span {
text-align: center;
}
}
</style>