CSR-997 | new serivce-location page

initial setup for the new service-location page, just has header, subheader, footer so far. also created test file
This commit is contained in:
Matt Caimi 2022-12-28 14:42:17 -05:00
parent dff0307828
commit a292b7c843
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,3 @@
describe("service-location.vue", () => {
test.todo("test this");
});

View file

@ -0,0 +1,65 @@
<template>
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm" v-slot="{ meta }">
<div class="page-container-grouped-styles">
<funnelHeader cmsWidgetName="FunnelHeaderWidget" />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
<funnel-footer
cmsWidgetName="FunnelFooterWidget"
:isForwardActionDisabled="!meta.valid"
@back-clicked="backButtonAction"
@ForwardClicked="forwardButtonAction" />
</div>
</Form>
</template>
<script>
// Components
import funnelHeader from "@/common-components/funnel-header/funnel-header";
import funnelFooter from "@/common-components/funnel-footer/funnel-footer";
import funnelSubHeader from "@/common-components/funnel-sub-header/funnel-sub-header";
import { Form } from "vee-validate";
// Supporting files
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
import { settleAllPromises } from "@/helpers/layout-helper";
export default {
name: "service-location",
data() {
return {};
},
async beforeRouteEnter(to, from, next) {
// Call APIs
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
// Settle promises and get results
const promiseResultMap = [
{
resultKey: "cmsContent",
promise: cmsContentPromise,
},
];
const resultMap = await settleAllPromises(promiseResultMap);
// Call the "next" function to complete the transition to this page.
next((vm) => {
vm.setCmsContent(resultMap.cmsContent);
});
},
methods: {
arePagePrerequisitesValid() {
return true;
},
backButtonAction() {},
forwardButtonAction() {},
},
components: {
funnelHeader,
funnelFooter,
funnelSubHeader,
Form,
},
};
</script>