Merge pull request #268 from Safelite/feature/Digital/SSR-416
Added TPA Search page
This commit is contained in:
commit
8c4760fa87
3 changed files with 85 additions and 0 deletions
71
src/layouts/tpa-search/tpa-search.vue
Normal file
71
src/layouts/tpa-search/tpa-search.vue
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<template>
|
||||
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm" v-slot="{ meta }" >
|
||||
<div class="page-container-grouped-styles">
|
||||
<div class="fade-on-route-transition position-relative">
|
||||
<siteHeader cmsWidgetName="SiteHeaderWidget"/>
|
||||
<div class="container-fluid pb-2">
|
||||
<p>Placeholder for TPA-Search</p>
|
||||
<siteFooter
|
||||
cmsWidgetName="SiteFooterWidget"
|
||||
ref="siteFooter"
|
||||
:isForwardActionDisabled="!meta.valid"
|
||||
@ForwardClicked="forwardButtonAction"
|
||||
@back-clicked="backButtonAction"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
</template>
|
||||
<script>
|
||||
// Components
|
||||
import siteHeader from '@/iss-components/site-header/site-header';
|
||||
import siteFooter from "@/iss-components/site-footer/site-footer";
|
||||
// Supporting files
|
||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||
import { Form } from "vee-validate";
|
||||
import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
||||
export default {
|
||||
name: "tpa-search",
|
||||
mixins: [BaseFormMixin],
|
||||
data() {
|
||||
},
|
||||
async beforeRouteEnter(to, from, next)
|
||||
{
|
||||
// Call APIs
|
||||
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
|
||||
// Settle promises and get results
|
||||
const promiseResultMap = [
|
||||
{
|
||||
resultKey: "cmsContent",
|
||||
promise: cmsContentPromise,
|
||||
},];
|
||||
//use resultMap to populate layout content.
|
||||
let resultMap = await settleAllPromises(promiseResultMap);
|
||||
next((vm) => {
|
||||
vm.setCmsContent(resultMap.cmsContent);
|
||||
});
|
||||
},
|
||||
methods:
|
||||
{
|
||||
backButtonAction() {
|
||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||
},
|
||||
forwardButtonAction() {
|
||||
return this.navigateForward();
|
||||
},
|
||||
navigateForward() {
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_FORWARD,
|
||||
this.$route
|
||||
);
|
||||
},
|
||||
},
|
||||
components: {
|
||||
siteHeader,
|
||||
siteFooter,
|
||||
Form,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
@ -30,5 +30,6 @@ export const issPageValues = {
|
|||
VIN_LOOKUP: 'vin-lookup',
|
||||
TPA_SUBMIT: 'tpa-submit',
|
||||
BAILOUT_PAGE: 'bailout-page',
|
||||
TPA_SEARCH: 'tpa-search'
|
||||
};
|
||||
|
||||
|
|
@ -545,6 +545,19 @@ const routingTable = function(store) {
|
|||
destinationIssPageValue: issPageValues.TPA_CONFIRMATION,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
issPageValue: issPageValues.TPA_SEARCH,
|
||||
maps: [
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_BACK,
|
||||
destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_FORWARD,
|
||||
destinationIssPageValue: issPageValues.TPA_SUBMIT,
|
||||
},
|
||||
]
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue