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