Merge branch 'develop' into feature/SSR-428

This commit is contained in:
shnsuku 2023-04-25 17:27:03 +05:30 committed by GitHub
commit b66087d32a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 155 additions and 36 deletions

View file

@ -9,7 +9,7 @@
cmsWidgetName="SiteFooterWidget" cmsWidgetName="SiteFooterWidget"
ref="siteFooter" ref="siteFooter"
:isForwardActionDisabled="!meta.valid" :isForwardActionDisabled="!meta.valid"
@ForwardClicked="forwardButtonAction" @ForwardClicked="navigateForward"
@back-clicked="backButtonAction" @back-clicked="backButtonAction"
/> />
</div> </div>
@ -68,6 +68,10 @@ export default {
}, },
navigateForward() { navigateForward() {
this.$router.navigate(
this.navigationScenarios.CLICKED_FORWARD,
this.$route
);
}, },
}, },
components: { components: {

View file

@ -1,10 +1,13 @@
<template> <template>
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm" v-slot="{ meta }" > <Form @submit="onSubmit"
@invalid-submit="onInvalidSubmit"
ref="theForm"
v-slot="{ meta }" >
<div class="page-container-grouped-styles"> <div class="page-container-grouped-styles">
<div class="fade-on-route-transition position-relative"> <div class="fade-on-route-transition position-relative">
<siteHeader cmsWidgetName="SiteHeaderWidget" /> <siteHeader cmsWidgetName="SiteHeaderWidget" />
<siteSubHeader cmsWidgetName="SiteSubHeader" id="sub-header" /> <siteSubHeader cmsWidgetName="SiteSubHeader" id="sub-header" />
<button v-on:click="forwardButtonAction">Temp Forward Button</button>
<div> <div>
<siteFooter <siteFooter
cmsWidgetName="SiteFooterWidget" cmsWidgetName="SiteFooterWidget"
@ -124,10 +127,12 @@ export default {
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route); this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
}, },
forwardButtonAction() { forwardButtonAction() {
if(this.SelectedshopLocation == "Schedule with Safelite") //todo
{ this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE, this.$route);
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE, this.$route); //if(this.SelectedshopLocation == "Schedule with Safelite")
} //{
// this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE, this.$route);
//}
}, },
closeSteeringModal() { closeSteeringModal() {
this.$refs["SteeringModal"].closeModal(); this.$refs["SteeringModal"].closeModal();

View file

@ -9,7 +9,7 @@
cmsWidgetName="SiteFooterWidget" cmsWidgetName="SiteFooterWidget"
ref="siteFooter" ref="siteFooter"
:isForwardActionDisabled="!meta.valid" :isForwardActionDisabled="!meta.valid"
@ForwardClicked="forwardButtonAction" @ForwardClicked="navigateForward"
@back-clicked="backButtonAction" @back-clicked="backButtonAction"
/> />
</div> </div>
@ -57,14 +57,11 @@ export default {
backButtonAction() { backButtonAction() {
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route); this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
}, },
forwardButtonAction() {
async forwardButtonAction() { },
return this.navigateForward();
},
navigateForward() { navigateForward() {
this.$router.navigate( this.$router.navigate(
this.navigationScenarios.CLICKED_FORWARD_WITH_REVIEW, this.navigationScenarios.CLICKED_FORWARD,
this.$route this.$route
); );
}, },

View file

@ -65,6 +65,8 @@ export default {
}, },
forwardButtonAction() { forwardButtonAction() {
//validate and save here
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD, this.$route);
}, },
navigateForward() { navigateForward() {

View file

@ -150,7 +150,10 @@ export default {
*/ */
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route); this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
}, },
async forwardButtonAction() {}, async forwardButtonAction() {
//validate and save data here
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD, this.$route);
},
resetDependentState() {}, resetDependentState() {},
}, },
components: { components: {

View file

@ -0,0 +1,86 @@
<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-Submit</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';
import { useMainStore } from '@/store';
export default {
name: "tpa-submit",
mixins: [BaseFormMixin],
data() {
},
setup() {
const mainStore = useMainStore();
return { mainStore };
},
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>
<style lang="scss">
</style>

View file

@ -5,19 +5,21 @@ export const issPageValues = {
ADDRESS_LOOKUP: 'address-lookup', ADDRESS_LOOKUP: 'address-lookup',
ADDRESS_VEHICLES: 'address-vehicles', ADDRESS_VEHICLES: 'address-vehicles',
CAPABILITY_QUESTIONS: 'capability-questions', CAPABILITY_QUESTIONS: 'capability-questions',
CONTACT_DETAILS: 'contact-details',
ESTIMATE: 'estimate', ESTIMATE: 'estimate',
COVERAGE_STATEMENT: 'coverage-statement', COVERAGE_STATEMENT: 'coverage-statement',
LICENSE_PLATE_LOOKUP: 'license-plate-lookup', LICENSE_PLATE_LOOKUP: 'license-plate-lookup',
MOLDING_QUESTIONS: 'molding-questions', MOLDING_QUESTIONS: 'molding-questions',
PAYMENT_PAGE: 'payment-page',
PART_QUESTIONS: 'part-questions', PART_QUESTIONS: 'part-questions',
POLICY_HOLDER_DETAILS: 'policy-holder-details', POLICY_HOLDER_DETAILS: 'policy-holder-details',
PROVIDER_PREFERENCE: 'provider-preference', PROVIDER_PREFERENCE: 'provider-preference',
REVIEW_PAGE: 'review-page', REVIEW_PAGE: 'review-page',
REVEAL: 'reveal', REVEAL: 'reveal',
REVIEW_ORDER: 'review-order',
SERVICE_LOCATION: 'service-location', SERVICE_LOCATION: 'service-location',
SERVICE_PACKAGE: 'service-package',
TPA_CONFIRMATION:'tpa-confirmation', TPA_CONFIRMATION:'tpa-confirmation',
SERVICE_PACKAGES: 'service-packages',
SCHEDULE_PAGE: 'schedule-page',
VEHICLE_DAMAGE: 'vehicle-damage', VEHICLE_DAMAGE: 'vehicle-damage',
VEHICLE_LOOKUP: 'vehicle-lookup', VEHICLE_LOOKUP: 'vehicle-lookup',
VEHICLE_MAKE: 'vehicle-make', VEHICLE_MAKE: 'vehicle-make',
@ -25,6 +27,7 @@ export const issPageValues = {
VEHICLE_PARTS: 'vehicle-parts', VEHICLE_PARTS: 'vehicle-parts',
VEHICLE_STYLE: 'vehicle-style', VEHICLE_STYLE: 'vehicle-style',
VEHICLE_YEAR: 'vehicle-year', VEHICLE_YEAR: 'vehicle-year',
VIN_LOOKUP: 'vin-lookup' VIN_LOOKUP: 'vin-lookup',
TPA_SUBMIT: 'tpa-submit'
}; };

View file

@ -44,8 +44,6 @@ const navigationScenarios = {
CLICKED_FORWARD_COVERAGE_STATEMENT: "CLICKED_FORWARD_COVERAGE_STATEMENT", CLICKED_FORWARD_COVERAGE_STATEMENT: "CLICKED_FORWARD_COVERAGE_STATEMENT",
CLICKED_FORWARD_WITH_SAFELITE: "CLICKED_FORWARD_WITH_SAFELITE", CLICKED_FORWARD_WITH_SAFELITE: "CLICKED_FORWARD_WITH_SAFELITE",
CLICKED_FORWARD_WITH_REVIEW:"CLICKED_FORWARD_WITH_REVIEW",
}; };

View file

@ -435,7 +435,7 @@ const routingTable = function(store) {
}, },
{ {
scenario: navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE, scenario: navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE,
destinationIssPageValue: issPageValues.SERVICE_LOCATION destinationIssPageValue: issPageValues.SERVICE_PACKAGES
} }
] ]
}, },
@ -444,11 +444,11 @@ const routingTable = function(store) {
maps: [ maps: [
{ {
scenario: navigationScenarios.CLICKED_BACK, scenario: navigationScenarios.CLICKED_BACK,
destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE, destinationIssPageValue: issPageValues.SERVICE_PACKAGES,
}, },
{ {
scenario: navigationScenarios.CLICKED_FORWARD, scenario: navigationScenarios.CLICKED_FORWARD,
destinationIssPageValue: issPageValues.SERVICE_PACKAGES destinationIssPageValue: issPageValues.SCHEDULE_PAGE
} }
] ]
}, },
@ -458,6 +458,10 @@ const routingTable = function(store) {
{ {
scenario: navigationScenarios.CLICKED_BACK, scenario: navigationScenarios.CLICKED_BACK,
destinationIssPageValue: issPageValues.SERVICE_LOCATION destinationIssPageValue: issPageValues.SERVICE_LOCATION
},
{
scenario: navigationScenarios.CLICKED_FORWARD,
destinationIssPageValue: issPageValues.CONTACT_DETAILS
} }
] ]
}, },
@ -467,11 +471,15 @@ const routingTable = function(store) {
{ {
scenario: navigationScenarios.CLICKED_BACK, scenario: navigationScenarios.CLICKED_BACK,
destinationIssPageValue: issPageValues.SCHEDULE_PAGE destinationIssPageValue: issPageValues.SCHEDULE_PAGE
},
{
scenario: navigationScenarios.CLICKED_FORWARD,
destinationIssPageValue: issPageValues.REVIEW_PAGE
} }
] ]
}, },
{ {
issPageValue: issPageValues.SERVICE_PACKAGE, issPageValue: issPageValues.SERVICE_PACKAGES,
maps: [ maps: [
{ {
scenario: navigationScenarios.CLICKED_BACK, scenario: navigationScenarios.CLICKED_BACK,
@ -479,7 +487,7 @@ const routingTable = function(store) {
}, },
{ {
scenario: navigationScenarios.CLICKED_FORWARD, scenario: navigationScenarios.CLICKED_FORWARD,
destinationIssPageValue: issPageValues.REVIEW_ORDER destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE
} }
] ]
}, },
@ -493,7 +501,7 @@ const routingTable = function(store) {
}, },
{ {
scenario: navigationScenarios.CLICKED_FORWARD_WITH_REVIEW, scenario: navigationScenarios.CLICKED_FORWARD_WITH_REVIEW,
destinationIssPageValue: issPageValues.PAYMENT_PAGE destinationIssPageValue: issPageValues.PAYMENT_PAGE
}, },
], ],
@ -508,7 +516,7 @@ const routingTable = function(store) {
} }
] ]
}, },
{ {
issPageValue: issPageValues.TPA_CONFIRMATION, issPageValue: issPageValues.TPA_CONFIRMATION,
maps: [ maps: [
@ -521,6 +529,19 @@ const routingTable = function(store) {
], ],
}, },
{
issPageValue: issPageValues.TPA_SUBMIT,
maps: [
{
scenario: navigationScenarios.CLICKED_BACK,
destinationIssPageValue: issPageValues.TPA_SEARCH
},
{
scenario: navigationScenarios.CLICKED_FORWARD,
destinationIssPageValue: issPageValues.TPA_CONFIRMATION,
},
]
}
]; ];
}; };

View file

@ -1280,14 +1280,14 @@ function addPricesToLineItems(lineItems, pricingLineItems) {
return lineItems; return lineItems;
} }
function getLineItemQueryStringForPricing(lineItems) { function getLineItemQueryStringForPricing(lineItems){
return lineItems return lineItems.map((lineItem, index) => {
.map((lineItem) => { let queryStringSnippet = `&LineItems[${index}].partNumber=${lineItem.partNumber}`;
let queryStringSnippet = `&LineItems=${lineItem.partNumber}`; if (lineItem.childParts) {
if (lineItem.childParts) { queryStringSnippet += getLineItemQueryStringForPricing(lineItem.childParts);
queryStringSnippet += getLineItemQueryStringForPricing(lineItem.childParts); }
}
return queryStringSnippet; return queryStringSnippet;
}) }).join('');
.join('');
} }