Merged latest from develop
This commit is contained in:
commit
72315f779e
10 changed files with 198 additions and 29 deletions
|
|
@ -61,6 +61,7 @@ const storeActions = {
|
||||||
SAVE_VEHICLE_DAMAGE: "saveVehicleDamage",
|
SAVE_VEHICLE_DAMAGE: "saveVehicleDamage",
|
||||||
SAVE_VIN_LOOKUP: "saveVinLookup",
|
SAVE_VIN_LOOKUP: "saveVinLookup",
|
||||||
SAVE_SERVICE_LOCATION: "saveServiceLocation",
|
SAVE_SERVICE_LOCATION: "saveServiceLocation",
|
||||||
|
SAVE_SCHEDULE: "saveSchedule",
|
||||||
SAVE_EMAIL: "saveEmail",
|
SAVE_EMAIL: "saveEmail",
|
||||||
SAVE_REGISTRATION_LICENSE_PLATE_LOOKUP: "saveRegistrationLicensePlateLookup",
|
SAVE_REGISTRATION_LICENSE_PLATE_LOOKUP: "saveRegistrationLicensePlateLookup",
|
||||||
SAVE_VIN: "saveVin",
|
SAVE_VIN: "saveVin",
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ const storeMutations = {
|
||||||
UPDATE_REGISTRATION: "updateRegistration",
|
UPDATE_REGISTRATION: "updateRegistration",
|
||||||
|
|
||||||
UPDATE_SERVICE_LOCATION: "updateServiceLocation",
|
UPDATE_SERVICE_LOCATION: "updateServiceLocation",
|
||||||
|
UPDATE_SCHEDULE: "updateSchedule",
|
||||||
|
|
||||||
UPDATE_CUSTOMER_EMAIL_ADDRESS: "updateCustomerEmailAddress",
|
UPDATE_CUSTOMER_EMAIL_ADDRESS: "updateCustomerEmailAddress",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="text-block w-100 mt-2"
|
class="text-block w-100"
|
||||||
:class="[justifyText, typeStyle, fontWeight]"
|
:class="[justifyText, typeStyle, fontWeight, margin]"
|
||||||
v-html="this.TextBlockCopy"></div>
|
v-html="this.TextBlockCopy"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -11,6 +11,11 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
customText: String, // used to allow the insert of token values into textblock
|
customText: String, // used to allow the insert of token values into textblock
|
||||||
justifyText: String, // left, right, center
|
justifyText: String, // left, right, center
|
||||||
|
margin: {
|
||||||
|
// bootstrap margin to apply to the block.
|
||||||
|
type: String,
|
||||||
|
default: "mt-2",
|
||||||
|
},
|
||||||
typeStyle: String, // h1-h6, body, small, label, caption (see Figma or Confluence documentation)
|
typeStyle: String, // h1-h6, body, small, label, caption (see Figma or Confluence documentation)
|
||||||
fontWeight: String, // bold=500, default is 400
|
fontWeight: String, // bold=500, default is 400
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
|
|
|
||||||
3
src/layouts/review/review.spec.js
Normal file
3
src/layouts/review/review.spec.js
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
describe("Review Page", () => {
|
||||||
|
test.todo("Add more tests as specific functionality is added.");
|
||||||
|
});
|
||||||
102
src/layouts/review/review.vue
Normal file
102
src/layouts/review/review.vue
Normal file
|
|
@ -0,0 +1,102 @@
|
||||||
|
<template>
|
||||||
|
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm">
|
||||||
|
<!-- When customer-details is added: v-slot="{ meta }" -->
|
||||||
|
<div class="page-container-grouped-styles">
|
||||||
|
<funnelHeader cmsWidgetName="FunnelHeaderWidget" />
|
||||||
|
<vehicleBanner
|
||||||
|
cmsWidgetName="VehicleBannerWidget"
|
||||||
|
:displayGenericVehicleImage="false" />
|
||||||
|
|
||||||
|
<textBlock
|
||||||
|
:customText="subHeaderTitle"
|
||||||
|
typeStyle="h5"
|
||||||
|
justifyText="text-center"
|
||||||
|
margin="mt-1"
|
||||||
|
class="dark-header" />
|
||||||
|
<textBlock
|
||||||
|
:customText="subHeaderBody"
|
||||||
|
typeStyle="body"
|
||||||
|
justifyText="left"
|
||||||
|
margin="mt-0 mb-2" />
|
||||||
|
|
||||||
|
<buttonMain
|
||||||
|
ref="buttonMain"
|
||||||
|
isPrimary
|
||||||
|
:buttonText="forwardButtonText"
|
||||||
|
loaderColor="white"
|
||||||
|
@click-event="forwardButtonAction" />
|
||||||
|
|
||||||
|
<funnelFooter
|
||||||
|
cmsWidgetName="FunnelFooterWidget"
|
||||||
|
@back-clicked="backButtonAction"
|
||||||
|
@ForwardClicked="forwardButtonAction" />
|
||||||
|
</div>
|
||||||
|
</Form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import funnelHeader from "@/fmg-components/funnel-header/funnel-header";
|
||||||
|
import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer";
|
||||||
|
import vehicleBanner from "@/fmg-components/vehicle-banner/vehicle-banner";
|
||||||
|
import buttonMain from "@/ux-components/button-main/button-main";
|
||||||
|
import textBlock from "@/digital-components/text-block/text-block";
|
||||||
|
|
||||||
|
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
|
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "review",
|
||||||
|
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);
|
||||||
|
|
||||||
|
next((vm) => {
|
||||||
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
arePagePrerequisitesValid() {
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
backButtonAction() {},
|
||||||
|
forwardButtonAction() {},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
subHeaderTitle() {
|
||||||
|
return this.getCmsContent("FunnelSubHeaderWidget", "HeaderText");
|
||||||
|
},
|
||||||
|
subHeaderBody() {
|
||||||
|
return this.getCmsContent("FunnelSubHeaderWidget", "BodyText");
|
||||||
|
},
|
||||||
|
forwardButtonText() {
|
||||||
|
return this.getCmsContent("FunnelFooterWidget", "ForwardButtonText");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
funnelHeader,
|
||||||
|
funnelFooter,
|
||||||
|
vehicleBanner,
|
||||||
|
buttonMain,
|
||||||
|
textBlock,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.dark-header {
|
||||||
|
color: $black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -174,7 +174,19 @@ export default {
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
|
this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||||
},
|
},
|
||||||
forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
|
//TODO: replace properties with real values once they are available
|
||||||
|
await this.dispatchStoreAction(
|
||||||
|
this.storeActions.SAVE_SCHEDULE,
|
||||||
|
{
|
||||||
|
date: "2023-07-04T00:00:00",
|
||||||
|
startTime: "2023-07-04T12:00:00",
|
||||||
|
endTime: "2023-07-04T17:00:00",
|
||||||
|
routeCode: "03341-01820-S-B*20232*11 AM",
|
||||||
|
},
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
navigateToHeritageFunnel({ loadingModal: this.$refs.loadingModal });
|
navigateToHeritageFunnel({ loadingModal: this.$refs.loadingModal });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -388,10 +388,12 @@ export default {
|
||||||
isVehicleProtected: this.isVehicleProtected,
|
isVehicleProtected: this.isVehicleProtected,
|
||||||
provider: {
|
provider: {
|
||||||
providerNumber: this.selectedProvider?.providerNumber,
|
providerNumber: this.selectedProvider?.providerNumber,
|
||||||
address: this.selectedProvider?.address?.streetAddress,
|
address: {
|
||||||
city: this.selectedProvider?.address?.city,
|
streetAddress: this.selectedProvider?.address?.streetAddress,
|
||||||
state: this.selectedProvider?.address?.state,
|
city: this.selectedProvider?.address?.city,
|
||||||
zip: this.selectedProvider?.address?.zipCode,
|
state: this.selectedProvider?.address?.state,
|
||||||
|
zip: this.selectedProvider?.address?.zipCode,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ import textLink from "@/ux-components/text-link/text-link";
|
||||||
import { storeActions } from "@/constants/store-actions.js";
|
import { storeActions } from "@/constants/store-actions.js";
|
||||||
|
|
||||||
// Supporting files
|
// Supporting files
|
||||||
import { defineRule, useField } from "vee-validate";
|
import { defineRule } from "vee-validate";
|
||||||
import { required } from "@/helpers/validation-rules";
|
import { required } from "@/helpers/validation-rules";
|
||||||
import { errorMessages } from "@/constants/error-messages";
|
import { errorMessages } from "@/constants/error-messages";
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
|
|
@ -216,7 +216,7 @@ export default {
|
||||||
if (this.selectedAppointmentType) {
|
if (this.selectedAppointmentType) {
|
||||||
const selectedShopIndex = this.getSelectedProviderIndex(
|
const selectedShopIndex = this.getSelectedProviderIndex(
|
||||||
newValue,
|
newValue,
|
||||||
this.modelValue
|
this.modelValue.providerNumber
|
||||||
);
|
);
|
||||||
|
|
||||||
if (selectedShopIndex >= 3) {
|
if (selectedShopIndex >= 3) {
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ import { applicationConfig } from "../constants/application-config";
|
||||||
// Components
|
// Components
|
||||||
import datePicker from "@/digital-components/date-picker/date-picker.vue";
|
import datePicker from "@/digital-components/date-picker/date-picker.vue";
|
||||||
import demoDatePicker from "@/layouts/demo-date-picker/demo-date-picker.vue";
|
import demoDatePicker from "@/layouts/demo-date-picker/demo-date-picker.vue";
|
||||||
|
import review from "@/layouts/review/review";
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
|
|
@ -43,6 +44,11 @@ const routes = [
|
||||||
name: "date-picker",
|
name: "date-picker",
|
||||||
component: datePicker,
|
component: datePicker,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/review", // This is a temporary route for testing.
|
||||||
|
name: "review",
|
||||||
|
component: review,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/",
|
path: "/",
|
||||||
name: "root",
|
name: "root",
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,12 @@ const getDefaultState = () => {
|
||||||
appointmentType: null,
|
appointmentType: null,
|
||||||
provider: {
|
provider: {
|
||||||
providerNumber: null,
|
providerNumber: null,
|
||||||
address: null,
|
address: {
|
||||||
city: null,
|
streetAddress: null,
|
||||||
state: null,
|
city: null,
|
||||||
zip: null,
|
state: null,
|
||||||
|
zip: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
customer: {
|
customer: {
|
||||||
|
|
@ -77,6 +79,12 @@ const getDefaultState = () => {
|
||||||
},
|
},
|
||||||
parentAccountNumber: 0,
|
parentAccountNumber: 0,
|
||||||
},
|
},
|
||||||
|
schedule: {
|
||||||
|
date: null,
|
||||||
|
startTime: null,
|
||||||
|
endTime: null,
|
||||||
|
routeCode: null,
|
||||||
|
},
|
||||||
referralNumber: null,
|
referralNumber: null,
|
||||||
referralDate: null,
|
referralDate: null,
|
||||||
referralCorrelationId: null,
|
referralCorrelationId: null,
|
||||||
|
|
@ -244,10 +252,22 @@ export const mutations = {
|
||||||
if (serviceLocationInfo.provider) {
|
if (serviceLocationInfo.provider) {
|
||||||
state.order.serviceLocation.provider.providerNumber =
|
state.order.serviceLocation.provider.providerNumber =
|
||||||
serviceLocationInfo.provider?.providerNumber;
|
serviceLocationInfo.provider?.providerNumber;
|
||||||
state.order.serviceLocation.provider.address = serviceLocationInfo.provider?.address;
|
state.order.serviceLocation.provider.address.streetAddress =
|
||||||
state.order.serviceLocation.provider.city = serviceLocationInfo.provider?.city;
|
serviceLocationInfo.provider?.address?.streetAddress;
|
||||||
state.order.serviceLocation.provider.state = serviceLocationInfo.provider?.state;
|
state.order.serviceLocation.provider.address.city =
|
||||||
state.order.serviceLocation.provider.zip = serviceLocationInfo.provider?.zip;
|
serviceLocationInfo.provider?.address?.city;
|
||||||
|
state.order.serviceLocation.provider.address.state =
|
||||||
|
serviceLocationInfo.provider?.address?.state;
|
||||||
|
state.order.serviceLocation.provider.address.zip =
|
||||||
|
serviceLocationInfo.provider?.address?.zip;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updateSchedule(state, scheduleInfo) {
|
||||||
|
if (scheduleInfo) {
|
||||||
|
state.order.schedule.date = scheduleInfo.date;
|
||||||
|
state.order.schedule.startTime = scheduleInfo.startTime;
|
||||||
|
state.order.schedule.endTime = scheduleInfo.endTime;
|
||||||
|
state.order.schedule.routeCode = scheduleInfo.routeCode;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -394,14 +414,14 @@ export const mutations = {
|
||||||
|
|
||||||
state.order.serviceLocation.provider.providerNumber =
|
state.order.serviceLocation.provider.providerNumber =
|
||||||
sessionInformation.order.serviceLocation.provider?.providerNumber;
|
sessionInformation.order.serviceLocation.provider?.providerNumber;
|
||||||
state.order.serviceLocation.provider.address =
|
state.order.serviceLocation.provider.address.streetAddress =
|
||||||
sessionInformation.order.serviceLocation.provider?.address;
|
sessionInformation.order.serviceLocation.provider?.address?.streetAddress;
|
||||||
state.order.serviceLocation.provider.city =
|
state.order.serviceLocation.provider.address.city =
|
||||||
sessionInformation.order.serviceLocation.provider?.city;
|
sessionInformation.order.serviceLocation.provider?.address?.city;
|
||||||
state.order.serviceLocation.provider.state =
|
state.order.serviceLocation.provider.address.state =
|
||||||
sessionInformation.order.serviceLocation.provider?.state;
|
sessionInformation.order.serviceLocation.provider?.address?.state;
|
||||||
state.order.serviceLocation.provider.zip =
|
state.order.serviceLocation.provider.address.zip =
|
||||||
sessionInformation.order.serviceLocation.provider?.zip;
|
sessionInformation.order.serviceLocation.provider?.address?.zip;
|
||||||
|
|
||||||
state.order.payment.isInsurance = sessionInformation.order.payment.isInsurance;
|
state.order.payment.isInsurance = sessionInformation.order.payment.isInsurance;
|
||||||
state.order.payment.insuranceCoverage.isVerified =
|
state.order.payment.insuranceCoverage.isVerified =
|
||||||
|
|
@ -415,6 +435,11 @@ export const mutations = {
|
||||||
state.applicationUser.crmCustomerId = sessionInformation.applicationUser.crmCustomerId;
|
state.applicationUser.crmCustomerId = sessionInformation.applicationUser.crmCustomerId;
|
||||||
state.applicationUser.pageData = sessionInformation.applicationUser.pageData;
|
state.applicationUser.pageData = sessionInformation.applicationUser.pageData;
|
||||||
state.applicationUser.lastPage = sessionInformation.applicationUser.lastPage;
|
state.applicationUser.lastPage = sessionInformation.applicationUser.lastPage;
|
||||||
|
|
||||||
|
state.order.schedule.date = sessionInformation.order.schedule?.date;
|
||||||
|
state.order.schedule.startTime = sessionInformation.order.schedule?.startTime;
|
||||||
|
state.order.schedule.endTime = sessionInformation.order.schedule?.endTime;
|
||||||
|
state.order.schedule.routeCode = sessionInformation.order.schedule?.routeCode;
|
||||||
},
|
},
|
||||||
updateExperiments(state, experiments) {
|
updateExperiments(state, experiments) {
|
||||||
state.applicationUser.experiments = experiments;
|
state.applicationUser.experiments = experiments;
|
||||||
|
|
@ -1166,12 +1191,21 @@ export const actions = {
|
||||||
isVehicleProtected: order.serviceLocation.isVehicleProtected,
|
isVehicleProtected: order.serviceLocation.isVehicleProtected,
|
||||||
provider: {
|
provider: {
|
||||||
providerNumber: order.serviceLocation.provider?.providerNumber,
|
providerNumber: order.serviceLocation.provider?.providerNumber,
|
||||||
address: order.serviceLocation.provider?.address,
|
address: {
|
||||||
city: order.serviceLocation.provider?.city,
|
streetAddress:
|
||||||
state: order.serviceLocation.provider?.state,
|
order.serviceLocation.provider?.address?.streetAddress,
|
||||||
zip: order.serviceLocation.provider?.zip,
|
city: order.serviceLocation.provider?.address?.city,
|
||||||
|
state: order.serviceLocation.provider?.address?.state,
|
||||||
|
zip: order.serviceLocation.provider?.address?.zip,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
schedule: {
|
||||||
|
date: order.schedule?.date,
|
||||||
|
startTime: order.schedule?.startTime,
|
||||||
|
endTime: order.schedule?.endTime,
|
||||||
|
routeCode: order.schedule?.routeCode,
|
||||||
|
},
|
||||||
existingPromoCode: null,
|
existingPromoCode: null,
|
||||||
referralCorrelationId: order.referralCorrelationId,
|
referralCorrelationId: order.referralCorrelationId,
|
||||||
referralDate: order.referralDate,
|
referralDate: order.referralDate,
|
||||||
|
|
@ -1615,6 +1649,9 @@ export const actions = {
|
||||||
return availableLineItems;
|
return availableLineItems;
|
||||||
},
|
},
|
||||||
// Misc order actions
|
// Misc order actions
|
||||||
|
saveSchedule(context, scheduleInfo) {
|
||||||
|
context.commit(storeMutations.UPDATE_SCHEDULE, scheduleInfo);
|
||||||
|
},
|
||||||
saveServiceLocation(context, serviceLocationInfo) {
|
saveServiceLocation(context, serviceLocationInfo) {
|
||||||
context.commit(storeMutations.UPDATE_SERVICE_LOCATION, serviceLocationInfo);
|
context.commit(storeMutations.UPDATE_SERVICE_LOCATION, serviceLocationInfo);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue