Merge branch 'release/syp-release' into feature/CASH-61-ajc
This commit is contained in:
commit
1087f87f04
18 changed files with 26 additions and 575 deletions
|
|
@ -124,10 +124,6 @@ const endpoints = {
|
||||||
url: "/order/api/v1/order/load-session",
|
url: "/order/api/v1/order/load-session",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
},
|
},
|
||||||
SaveQuote: {
|
|
||||||
url: "/order/api/v1/order/initiate-saved-progress-email",
|
|
||||||
method: "POST",
|
|
||||||
},
|
|
||||||
GetSignature: {
|
GetSignature: {
|
||||||
url: "/order/api/v1/order/sign",
|
url: "/order/api/v1/order/sign",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ const storeActions = {
|
||||||
GET_MOBILE_PREMIUM_FEE: "getMobilePremiumFee",
|
GET_MOBILE_PREMIUM_FEE: "getMobilePremiumFee",
|
||||||
SAVE_SESSION: "saveSession",
|
SAVE_SESSION: "saveSession",
|
||||||
LOAD_SESSION: "loadSession",
|
LOAD_SESSION: "loadSession",
|
||||||
SAVE_QUOTE: "saveQuote",
|
|
||||||
UPDATE_STORE_WITH_SAVE_SESSION_RESPONSE: "updateStoreWithSaveSessionResponse",
|
UPDATE_STORE_WITH_SAVE_SESSION_RESPONSE: "updateStoreWithSaveSessionResponse",
|
||||||
VALIDATE_ZIP: "validateZip",
|
VALIDATE_ZIP: "validateZip",
|
||||||
PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA: "priceOrderItemsAndSaveServerData",
|
PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA: "priceOrderItemsAndSaveServerData",
|
||||||
|
|
|
||||||
|
|
@ -25,17 +25,17 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body ps-5 pe-5 pb-4 pt-1">
|
<div class="modal-body ps-5 pe-5 pb-4 pt-1">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<div class="modal-footer px-5 py-4">
|
</div>
|
||||||
<modalButtonMain
|
<div class="modal-footer px-5 py-4">
|
||||||
isPrimary
|
<modalButtonMain
|
||||||
class="w-100"
|
isPrimary
|
||||||
id="modalbtn"
|
class="w-100"
|
||||||
ref="modalButtonMain"
|
id="modalbtn"
|
||||||
loaderColor="white"
|
ref="modalButtonMain"
|
||||||
:buttonText="footerButtonText"
|
loaderColor="white"
|
||||||
@click-event="validateAndEmit"
|
:buttonText="footerButtonText"
|
||||||
:class="isFooterButtonDisabled && 'form-test-invalid'" />
|
@click-event="validateAndEmit"
|
||||||
</div>
|
:class="isFooterButtonDisabled && 'form-test-invalid'" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -53,7 +53,6 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
headerText: String,
|
headerText: String,
|
||||||
footerButtonText: String,
|
footerButtonText: String,
|
||||||
suppressPageScroll: Boolean,
|
|
||||||
onModalOpenedCallback: {
|
onModalOpenedCallback: {
|
||||||
type: Function,
|
type: Function,
|
||||||
},
|
},
|
||||||
|
|
@ -108,10 +107,8 @@ export default {
|
||||||
onModalClosed() {
|
onModalClosed() {
|
||||||
this.resetButtonStyle();
|
this.resetButtonStyle();
|
||||||
this.onModalClosedCallback?.();
|
this.onModalClosedCallback?.();
|
||||||
if (this.suppressPageScroll) document.querySelector("body").classList.remove("prevent-modal-scroll");
|
|
||||||
},
|
},
|
||||||
openModal() {
|
openModal() {
|
||||||
if (this.suppressPageScroll) document.querySelector("body").classList.add("prevent-modal-scroll");
|
|
||||||
const modal = Modal.getOrCreateInstance(document.getElementById(this.modalId));
|
const modal = Modal.getOrCreateInstance(document.getElementById(this.modalId));
|
||||||
modal.show();
|
modal.show();
|
||||||
this.$emit("isModalOpened", true);
|
this.$emit("isModalOpened", true);
|
||||||
|
|
@ -234,29 +231,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.save-progress-modal-question {
|
|
||||||
p.modal-body {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.modal-body {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
.textbox-question {
|
|
||||||
padding: .25rem 0;
|
|
||||||
label {
|
|
||||||
text-align: left;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.modal-disclaimer {
|
|
||||||
font-size: .75rem;
|
|
||||||
order: 2;
|
|
||||||
}
|
|
||||||
.modal-footer {
|
|
||||||
padding: 1.5rem 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
body {
|
body {
|
||||||
.modal-backdrop {
|
.modal-backdrop {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6 col-xl-4 question-chain-wrapper">
|
<div class="col-md-6 col-xl-4">
|
||||||
<div v-for="(questionsDatum, i) in questionsData" :key="questionsDatum.key">
|
<div v-for="(questionsDatum, i) in questionsData" :key="questionsDatum.key">
|
||||||
<questionChain
|
<questionChain
|
||||||
ref="questionChain"
|
ref="questionChain"
|
||||||
|
|
@ -37,8 +37,6 @@
|
||||||
:validationRules="validationRules" />
|
:validationRules="validationRules" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<slot></slot>
|
|
||||||
|
|
||||||
<navbar
|
<navbar
|
||||||
ref="navbar"
|
ref="navbar"
|
||||||
cmsWidgetName="FunnelFooterWidget"
|
cmsWidgetName="FunnelFooterWidget"
|
||||||
|
|
@ -114,13 +112,5 @@ export default {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.question-chain-wrapper {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
.nav-bar {
|
|
||||||
order: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
import { mount, shallowMount } from "@vue/test-utils";
|
|
||||||
import saveProgressModalQuestion from "./save-progress-modal-question";
|
|
||||||
import { getMountOptions } from "@/helpers/unit-test-helper.js";
|
|
||||||
|
|
||||||
jest.mock("@/digital-components/modal/modal", () => ({
|
|
||||||
methods: {
|
|
||||||
openModal: jest.fn(),
|
|
||||||
resetButtonStyle: jest.fn(),
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe("save-progress-modal-question ", () => {
|
|
||||||
describe("when openModal is run ", () => {
|
|
||||||
test("the modal should open ", () => {
|
|
||||||
// Arrange
|
|
||||||
const { wrapper } = setupMocks({
|
|
||||||
props: {
|
|
||||||
modelValue: "",
|
|
||||||
modalWidgetName: "testModal",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
// Act
|
|
||||||
wrapper.vm.openModal();
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
expect(wrapper.vm.modal).not.toBeNull();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function setupMocks({ options, props }) {
|
|
||||||
const mountOptions = getMountOptions({
|
|
||||||
...options,
|
|
||||||
});
|
|
||||||
|
|
||||||
const mockBaseMixin = {
|
|
||||||
methods: {
|
|
||||||
getCmsContent: jest.fn(),
|
|
||||||
dispatchStoreAction: jest.fn(),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
if (props) mountOptions.propsData = props;
|
|
||||||
|
|
||||||
mountOptions.global.mixins = [mockBaseMixin];
|
|
||||||
|
|
||||||
const wrapper = mount(saveProgressModalQuestion, mountOptions);
|
|
||||||
|
|
||||||
return { wrapper };
|
|
||||||
}
|
|
||||||
|
|
@ -1,193 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="save-progress-modal-question">
|
|
||||||
<buttonMain
|
|
||||||
ref="buttonMain"
|
|
||||||
v-if="!isProgressSaved"
|
|
||||||
:buttonText="buttonText"
|
|
||||||
loaderColor="white"
|
|
||||||
:suppressLoader="true"
|
|
||||||
@click-event="openModal" />
|
|
||||||
<alert
|
|
||||||
class="my-4"
|
|
||||||
v-else
|
|
||||||
cmsWidgetName="SaveProgressModalAlertWidget"
|
|
||||||
alertClass="alert-success" />
|
|
||||||
<modal
|
|
||||||
:ref="modalName"
|
|
||||||
:headerText="modalHeaderText"
|
|
||||||
suppressPageScroll
|
|
||||||
:footerButtonText="modalButtonText"
|
|
||||||
@footer-button-event="saveProgress">
|
|
||||||
<p class="modal-body">{{ modalBodyText }}</p>
|
|
||||||
<saveProgressQuestion
|
|
||||||
ref="saveProgressQuestion"
|
|
||||||
v-model="userInput"
|
|
||||||
cmsWidgetName="SaveProgressQuestionWidget" />
|
|
||||||
<p class="modal-disclaimer" v-html="modalDisclaimerText"></p>
|
|
||||||
</modal>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import saveProgressQuestion from "@/fmg-components/save-progress-modal-question/save-progress-question/save-progress-question";
|
|
||||||
import modal from "@/digital-components/modal/modal";
|
|
||||||
import { storeActions } from "@/constants/store-actions.js";
|
|
||||||
import buttonMain from "@/ux-components/button-main/button-main";
|
|
||||||
import alert from "@/ux-components/alert/alert";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "save-progress-modal-question",
|
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
userInput: "",
|
|
||||||
isProgressSaved: false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
modelValue: Object,
|
|
||||||
modalWidgetName: String,
|
|
||||||
pageName: String,
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
buttonText() {
|
|
||||||
return this.getCmsContent(this.modalWidgetName, "SubheaderText");
|
|
||||||
},
|
|
||||||
modalHeaderText() {
|
|
||||||
return this.getCmsContent(this.modalWidgetName, "HeaderText");
|
|
||||||
},
|
|
||||||
modalBodyText() {
|
|
||||||
return this.getCmsContent(this.modalWidgetName, "BodyText");
|
|
||||||
},
|
|
||||||
modalButtonText() {
|
|
||||||
return this.getCmsContent(this.modalWidgetName, "FooterText");
|
|
||||||
},
|
|
||||||
modalDisclaimerText() {
|
|
||||||
return this.getCmsContent(this.modalWidgetName, "FooterText2");
|
|
||||||
},
|
|
||||||
modalName() {
|
|
||||||
return this.modalWidgetName;
|
|
||||||
},
|
|
||||||
modal() {
|
|
||||||
return this.$refs[this.modalName];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
openModal() {
|
|
||||||
this.modal.openModal();
|
|
||||||
this.modal.resetButtonStyle();
|
|
||||||
},
|
|
||||||
async saveProgress() {
|
|
||||||
// save email address to store
|
|
||||||
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.userInput, false);
|
|
||||||
|
|
||||||
// hide save progress button; show success message alert
|
|
||||||
this.isProgressSaved = true;
|
|
||||||
|
|
||||||
this.modal.closeModal();
|
|
||||||
|
|
||||||
// send store call to send to new API (that triggers an email send)
|
|
||||||
this.$emit("save-progress");
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
components: {
|
|
||||||
modal,
|
|
||||||
buttonMain,
|
|
||||||
saveProgressQuestion,
|
|
||||||
alert,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.save-progress-modal-question {
|
|
||||||
order: 2;
|
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
|
|
||||||
.btn-secondary {
|
|
||||||
position: relative;
|
|
||||||
background: $blue-100;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
border-radius: $border-radius-lg;
|
|
||||||
color: $blue;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: .875rem;
|
|
||||||
transition: all 150ms linear;
|
|
||||||
height: 3.5rem;
|
|
||||||
width: 100%;
|
|
||||||
text-decoration: underline;
|
|
||||||
text-underline-offset: .5rem;
|
|
||||||
&:hover {
|
|
||||||
background: linear-gradient(270deg, $blue 0%, $blue-800 100%);
|
|
||||||
color: $white;
|
|
||||||
}
|
|
||||||
&:focus, // Mouse, touch, stylus focus
|
|
||||||
&:focus-visible {
|
|
||||||
// Keyboard focus for accessibility
|
|
||||||
outline: none;
|
|
||||||
box-shadow:
|
|
||||||
0 0 0 3px $white,
|
|
||||||
0 0 0 5.5px $blue-700;
|
|
||||||
color: $white;
|
|
||||||
background: linear-gradient(270deg, rgba(6, 87, 124, 1) 0%, rgba(6, 87, 124, 1) 100%);
|
|
||||||
}
|
|
||||||
&:disabled {
|
|
||||||
background: transparent;
|
|
||||||
color: $gray-550 !important;
|
|
||||||
font-weight: 400;
|
|
||||||
height: 48px;
|
|
||||||
border: 1px solid $gray-550;
|
|
||||||
border-radius: $border-radius-lg;
|
|
||||||
cursor: pointer;
|
|
||||||
pointer-events: all;
|
|
||||||
}
|
|
||||||
&.has-loader {
|
|
||||||
color: $blue;
|
|
||||||
background-color: $blue;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
&.delay {
|
|
||||||
// fixes flicker while transitioning between states
|
|
||||||
transition: background 0s 0s ease-in-out;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
:deep(.alert) {
|
|
||||||
border-radius: $border-radius-lg;
|
|
||||||
border: 1px solid $green;
|
|
||||||
}
|
|
||||||
:deep(.alert-heading) {
|
|
||||||
position: relative;
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 1rem;
|
|
||||||
color: $black;
|
|
||||||
text-align: left;
|
|
||||||
padding-left: 1.5rem;
|
|
||||||
&::before {
|
|
||||||
position: absolute;
|
|
||||||
content: "";
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%230C7E47' d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm3.7 6.171-4.449 4.45a.559.559 0 0 1-.8 0l-2.16-2.16a.563.563 0 0 1 .792-.8l1.76 1.76 4.066-4.042a.563.563 0 1 1 .792.8v-.008Z'/%3E%3C/svg%3E");
|
|
||||||
width: 1rem;
|
|
||||||
height: 1rem;
|
|
||||||
top: 6px;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.applied-promo {
|
|
||||||
font-size: 0.875rem;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 24px;
|
|
||||||
color: $green;
|
|
||||||
|
|
||||||
.promo-code {
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.alert {
|
|
||||||
color: $red;
|
|
||||||
font-size: 0.875rem;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 24px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
import { shallowMount } from "@vue/test-utils";
|
|
||||||
import saveProgressQuestion from "./save-progress-question";
|
|
||||||
|
|
||||||
describe("save-progress-question.vue", () => {
|
|
||||||
it("Should get the modelValue", async () => {
|
|
||||||
// Arrange
|
|
||||||
const text = "test";
|
|
||||||
const wrapper = shallowMount(saveProgressQuestion, {
|
|
||||||
props: {
|
|
||||||
modelValue: text,
|
|
||||||
},
|
|
||||||
attachTo: document.body,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Act
|
|
||||||
const modelValueText = wrapper.vm.value;
|
|
||||||
wrapper.vm.value = "test also";
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
expect(modelValueText).toEqual("test");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("Should emit to set value", async () => {
|
|
||||||
// Arrange
|
|
||||||
const text = "test";
|
|
||||||
const wrapper = shallowMount(saveProgressQuestion, {
|
|
||||||
props: {
|
|
||||||
modelValue: text,
|
|
||||||
},
|
|
||||||
attachTo: document.body,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Act
|
|
||||||
const modelValueText = wrapper.vm.value;
|
|
||||||
wrapper.vm.value = "test also";
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
expect(wrapper.emitted("update:modelValue")).toEqual([["test also"]]);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
<template>
|
|
||||||
<textboxQuestion
|
|
||||||
ref="saveProgressInputTextQuestion"
|
|
||||||
:cmsWidgetName="cmsWidgetName"
|
|
||||||
v-model="value"
|
|
||||||
inputId="saveProgressUserInput"
|
|
||||||
questionAlignment="center"
|
|
||||||
cornerStyle="rounded"
|
|
||||||
:displayQuestionText="true"
|
|
||||||
isRequired
|
|
||||||
@input="validateEmail"
|
|
||||||
validationRules="email-address-required|email-address-format" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import textboxQuestion from "@/digital-components/textbox-question/textbox-question";
|
|
||||||
|
|
||||||
//Supporting Files
|
|
||||||
import { defineRule } from "vee-validate";
|
|
||||||
import { required, regex } from "@/helpers/validation-rules";
|
|
||||||
import { errorMessages } from "@/constants/error-messages";
|
|
||||||
|
|
||||||
// Define Validation Rules
|
|
||||||
defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIRED));
|
|
||||||
defineRule(
|
|
||||||
"email-address-format",
|
|
||||||
regex(
|
|
||||||
/^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9-]+)\.([a-zA-Z]{2,})$/,
|
|
||||||
errorMessages.EMAIL_ADDRESS_FORMAT
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
const EMAIL_REGEX = /[^a-zA-Z0-9_\-.+@]/g;
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "save-progress-question",
|
|
||||||
props: {
|
|
||||||
modelValue: String,
|
|
||||||
cmsWidgetName: String,
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
value: {
|
|
||||||
get: function () {
|
|
||||||
return this.modelValue;
|
|
||||||
},
|
|
||||||
set: function (newValue) {
|
|
||||||
this.$emit("update:modelValue", newValue);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
validateEmail() {
|
|
||||||
setTimeout(() => {
|
|
||||||
this.value = this.value.replace(EMAIL_REGEX, "");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
textboxQuestion,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
@ -98,23 +98,6 @@ export async function submitWorkOrder({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function saveQuote({ pageNameToLog }) {
|
|
||||||
// save session back to sv2 so the email gets saved just in case they refresh or step away and come back later
|
|
||||||
await saveSession({
|
|
||||||
pageNameToLog: pageNameToLog,
|
|
||||||
shouldAwaitSaveSessionQueue: true,
|
|
||||||
submitAfterSave: false,
|
|
||||||
createUnscheduledStatusWorkOrderForPIA: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
return await baseMixin.methods.dispatchStoreActionWithLogging(
|
|
||||||
storeActions.SAVE_QUOTE,
|
|
||||||
{},
|
|
||||||
pageNameToLog,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// PRIVATE FUNCTIONS //
|
// PRIVATE FUNCTIONS //
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,12 @@ export class Logger {
|
||||||
}
|
}
|
||||||
|
|
||||||
formatLogEntry(message, details) {
|
formatLogEntry(message, details) {
|
||||||
return `Application: ${applicationConfig.APPLICATION_NAME}\n${message}\n${
|
const refSeqNumber = store.getters.order.referralSequenceNumber ?? "";
|
||||||
|
const year = store.getters.vehicle.year ?? "";
|
||||||
|
const make = store.getters.vehicle.make ?? "";
|
||||||
|
const model = store.getters.vehicle.model ?? "";
|
||||||
|
const vehicle = `${year} ${make} ${model}`;
|
||||||
|
return `${new Date()} ReferralSequenceNumber: ${refSeqNumber}\nVehicle: ${vehicle}\nApplication: ${applicationConfig.APPLICATION_NAME}\n${message}\n${
|
||||||
details ? JSON.stringify(details, undefined, 2) : ""
|
details ? JSON.stringify(details, undefined, 2) : ""
|
||||||
}`;
|
}`;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,22 +12,13 @@
|
||||||
@forwardButtonAction="forwardButtonAction"
|
@forwardButtonAction="forwardButtonAction"
|
||||||
@back-click="navigateBack"
|
@back-click="navigateBack"
|
||||||
:key="currentGlassIndex"
|
:key="currentGlassIndex"
|
||||||
:index="currentGlassIndex">
|
:index="currentGlassIndex" />
|
||||||
|
|
||||||
<!-- save progress goes into <slot> on questions-page-layout -->
|
|
||||||
<saveProgressModalQuestion
|
|
||||||
modalWidgetName="SaveProgressModalWidget"
|
|
||||||
v-if="!isEmailInStoreOnPageLoad"
|
|
||||||
@save-progress="saveProgress" />
|
|
||||||
|
|
||||||
</questions-page-layout>
|
|
||||||
</Form>
|
</Form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Components
|
// Components
|
||||||
import questionsPageLayout from "@/fmg-components/layouts/questions-page-layout/questions-page-layout";
|
import questionsPageLayout from "@/fmg-components/layouts/questions-page-layout/questions-page-layout";
|
||||||
import saveProgressModalQuestion from "@/fmg-components/save-progress-modal-question/save-progress-modal-question";
|
|
||||||
|
|
||||||
// Supporting Files
|
// Supporting Files
|
||||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
|
|
@ -40,7 +31,6 @@ import { required } from "@/helpers/validation-rules";
|
||||||
import { errorMessages } from "@/constants/error-messages";
|
import { errorMessages } from "@/constants/error-messages";
|
||||||
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
|
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
import { saveQuote } from "@/helpers/heritage-integration/order-helper.js";
|
|
||||||
|
|
||||||
// DEFINE VALIDATION RULES
|
// DEFINE VALIDATION RULES
|
||||||
defineRule("questions-required", required(errorMessages.OPTION_REQUIRED));
|
defineRule("questions-required", required(errorMessages.OPTION_REQUIRED));
|
||||||
|
|
@ -62,12 +52,9 @@ export default {
|
||||||
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
|
||||||
const emailFromStore = store.getters.order.customer.emailAddress;
|
|
||||||
|
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next(async (vm) => {
|
next(async (vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.isEmailInStoreOnPageLoad = emailFromStore?.length > 0;
|
|
||||||
if (store.getters.externalParameterState?.isExternalParameter) {
|
if (store.getters.externalParameterState?.isExternalParameter) {
|
||||||
if (store.getters.externalParameterServiceZip.zipCode) {
|
if (store.getters.externalParameterServiceZip.zipCode) {
|
||||||
await baseMixin.methods.dispatchStoreAction(
|
await baseMixin.methods.dispatchStoreAction(
|
||||||
|
|
@ -89,7 +76,6 @@ export default {
|
||||||
questionsData: null,
|
questionsData: null,
|
||||||
selectedAnswers: {},
|
selectedAnswers: {},
|
||||||
currentGlassIndex: 0,
|
currentGlassIndex: 0,
|
||||||
isEmailInStoreOnPageLoad: null,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -159,9 +145,6 @@ export default {
|
||||||
this.questionsData
|
this.questionsData
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
saveProgress() {
|
|
||||||
saveQuote({ pageNameToLog: "capability-questions" });
|
|
||||||
},
|
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
const questionAnswersArray = this.questionsData.map((glass) => {
|
const questionAnswersArray = this.questionsData.map((glass) => {
|
||||||
// get answerResult2 of returned answer
|
// get answerResult2 of returned answer
|
||||||
|
|
@ -222,7 +205,6 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
Form,
|
Form,
|
||||||
questionsPageLayout,
|
questionsPageLayout,
|
||||||
saveProgressModalQuestion,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -12,22 +12,13 @@
|
||||||
@forwardButtonAction="forwardButtonAction"
|
@forwardButtonAction="forwardButtonAction"
|
||||||
@back-click="navigateBack"
|
@back-click="navigateBack"
|
||||||
:key="currentGlassIndex"
|
:key="currentGlassIndex"
|
||||||
:index="currentGlassIndex">
|
:index="currentGlassIndex" />
|
||||||
|
|
||||||
<!-- save progress goes into <slot> on questions-page-layout -->
|
|
||||||
<saveProgressModalQuestion
|
|
||||||
modalWidgetName="SaveProgressModalWidget"
|
|
||||||
v-if="!isEmailInStoreOnPageLoad"
|
|
||||||
@save-progress="saveProgress" />
|
|
||||||
|
|
||||||
</questions-page-layout>
|
|
||||||
</Form>
|
</Form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Components
|
// Components
|
||||||
import questionsPageLayout from "@/fmg-components/layouts/questions-page-layout/questions-page-layout";
|
import questionsPageLayout from "@/fmg-components/layouts/questions-page-layout/questions-page-layout";
|
||||||
import saveProgressModalQuestion from "@/fmg-components/save-progress-modal-question/save-progress-modal-question";
|
|
||||||
|
|
||||||
// Supporting Files
|
// Supporting Files
|
||||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
|
|
@ -40,7 +31,6 @@ import { required } from "@/helpers/validation-rules";
|
||||||
import { errorMessages } from "@/constants/error-messages";
|
import { errorMessages } from "@/constants/error-messages";
|
||||||
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
|
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
import { saveQuote } from "@/helpers/heritage-integration/order-helper.js";
|
|
||||||
|
|
||||||
// DEFINE VALIDATION RULES
|
// DEFINE VALIDATION RULES
|
||||||
defineRule("questions-required", required(errorMessages.OPTION_REQUIRED));
|
defineRule("questions-required", required(errorMessages.OPTION_REQUIRED));
|
||||||
|
|
@ -62,12 +52,9 @@ export default {
|
||||||
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
|
||||||
const emailFromStore = store.getters.order.customer.emailAddress;
|
|
||||||
|
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next(async (vm) => {
|
next(async (vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.isEmailInStoreOnPageLoad = emailFromStore?.length > 0;
|
|
||||||
if (store.getters.externalParameterState?.isExternalParameter) {
|
if (store.getters.externalParameterState?.isExternalParameter) {
|
||||||
if (store.getters.externalParameterServiceZip.zipCode) {
|
if (store.getters.externalParameterServiceZip.zipCode) {
|
||||||
await baseMixin.methods.dispatchStoreAction(
|
await baseMixin.methods.dispatchStoreAction(
|
||||||
|
|
@ -90,7 +77,6 @@ export default {
|
||||||
questionsData: null,
|
questionsData: null,
|
||||||
selectedAnswers: {},
|
selectedAnswers: {},
|
||||||
currentGlassIndex: 0,
|
currentGlassIndex: 0,
|
||||||
isEmailInStoreOnPageLoad: null,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -159,9 +145,6 @@ export default {
|
||||||
this.questionsData
|
this.questionsData
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
saveProgress() {
|
|
||||||
saveQuote({ pageNameToLog: "molding-questions" });
|
|
||||||
},
|
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
const questionAnswersArray = this.questionsData.map((glass) => {
|
const questionAnswersArray = this.questionsData.map((glass) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -206,7 +189,6 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
Form,
|
Form,
|
||||||
questionsPageLayout,
|
questionsPageLayout,
|
||||||
saveProgressModalQuestion,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -12,22 +12,13 @@
|
||||||
@forwardButtonAction="forwardButtonAction"
|
@forwardButtonAction="forwardButtonAction"
|
||||||
@back-click="navigateBack"
|
@back-click="navigateBack"
|
||||||
:key="currentGlassIndex"
|
:key="currentGlassIndex"
|
||||||
:index="currentGlassIndex">
|
:index="currentGlassIndex" />
|
||||||
|
|
||||||
<!-- save progress goes into <slot> on questions-page-layout -->
|
|
||||||
<saveProgressModalQuestion
|
|
||||||
modalWidgetName="SaveProgressModalWidget"
|
|
||||||
v-if="!isEmailInStoreOnPageLoad"
|
|
||||||
@save-progress="saveProgress" />
|
|
||||||
|
|
||||||
</questions-page-layout>
|
|
||||||
</Form>
|
</Form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Components
|
// Components
|
||||||
import questionsPageLayout from "@/fmg-components/layouts/questions-page-layout/questions-page-layout";
|
import questionsPageLayout from "@/fmg-components/layouts/questions-page-layout/questions-page-layout";
|
||||||
import saveProgressModalQuestion from "@/fmg-components/save-progress-modal-question/save-progress-modal-question";
|
|
||||||
|
|
||||||
// Supporting Files
|
// Supporting Files
|
||||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
|
|
@ -40,7 +31,6 @@ import { required } from "@/helpers/validation-rules";
|
||||||
import { errorMessages } from "@/constants/error-messages";
|
import { errorMessages } from "@/constants/error-messages";
|
||||||
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
|
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
import { saveQuote } from "@/helpers/heritage-integration/order-helper.js";
|
|
||||||
|
|
||||||
// DEFINE VALIDATION RULES
|
// DEFINE VALIDATION RULES
|
||||||
defineRule("questions-required", required(errorMessages.OPTION_REQUIRED));
|
defineRule("questions-required", required(errorMessages.OPTION_REQUIRED));
|
||||||
|
|
@ -62,12 +52,9 @@ export default {
|
||||||
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
|
||||||
const emailFromStore = store.getters.order.customer.emailAddress;
|
|
||||||
|
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next(async (vm) => {
|
next(async (vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.isEmailInStoreOnPageLoad = emailFromStore?.length > 0;
|
|
||||||
if (store.getters.externalParameterState?.isExternalParameter) {
|
if (store.getters.externalParameterState?.isExternalParameter) {
|
||||||
if (store.getters.externalParameterServiceZip.zipCode) {
|
if (store.getters.externalParameterServiceZip.zipCode) {
|
||||||
const serviceState = store.getters.order.serviceLocation.state;
|
const serviceState = store.getters.order.serviceLocation.state;
|
||||||
|
|
@ -91,7 +78,6 @@ export default {
|
||||||
questionsData: null,
|
questionsData: null,
|
||||||
selectedAnswers: {},
|
selectedAnswers: {},
|
||||||
currentGlassIndex: 0,
|
currentGlassIndex: 0,
|
||||||
isEmailInStoreOnPageLoad: null,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -158,9 +144,6 @@ export default {
|
||||||
this.questionsData
|
this.questionsData
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
saveProgress() {
|
|
||||||
saveQuote({ pageNameToLog: "part-questions" });
|
|
||||||
},
|
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
const questionAnswersArray = this.questionsData.map((glass) => {
|
const questionAnswersArray = this.questionsData.map((glass) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -202,7 +185,6 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
Form,
|
Form,
|
||||||
questionsPageLayout,
|
questionsPageLayout,
|
||||||
saveProgressModalQuestion,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -121,9 +121,6 @@ store.getters = {
|
||||||
isInsurance: false,
|
isInsurance: false,
|
||||||
parentAccountNumber: applicationConfig.CASH_PARENT_ACCOUNT_NUMBER,
|
parentAccountNumber: applicationConfig.CASH_PARENT_ACCOUNT_NUMBER,
|
||||||
},
|
},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -139,9 +136,6 @@ afterEach(() => {
|
||||||
insuranceCoverage: {},
|
insuranceCoverage: {},
|
||||||
isInsurance: false,
|
isInsurance: false,
|
||||||
},
|
},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -269,9 +263,6 @@ describe("quote.vue", () => {
|
||||||
glassParts: ["item", "item2"],
|
glassParts: ["item", "item2"],
|
||||||
},
|
},
|
||||||
payment: {},
|
payment: {},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
},
|
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
zipCode: "12345",
|
zipCode: "12345",
|
||||||
zipCodeCtu: "value",
|
zipCodeCtu: "value",
|
||||||
|
|
@ -318,9 +309,6 @@ describe("quote.vue", () => {
|
||||||
glassParts: ["item", "item2"],
|
glassParts: ["item", "item2"],
|
||||||
},
|
},
|
||||||
payment: {},
|
payment: {},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
},
|
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
zipCode: "12345",
|
zipCode: "12345",
|
||||||
zipCodeCtu: "value",
|
zipCodeCtu: "value",
|
||||||
|
|
@ -367,9 +355,6 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: null,
|
isInsurance: null,
|
||||||
},
|
},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
},
|
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -411,9 +396,6 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: null,
|
isInsurance: null,
|
||||||
},
|
},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
},
|
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -456,9 +438,6 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: true,
|
isInsurance: true,
|
||||||
},
|
},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
},
|
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -501,9 +480,6 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: false,
|
isInsurance: false,
|
||||||
},
|
},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
},
|
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -547,9 +523,6 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: null, // Ensure that previous selection isn't overriding selection
|
isInsurance: null, // Ensure that previous selection isn't overriding selection
|
||||||
},
|
},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
},
|
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -595,9 +568,6 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: null, // Ensure that previous selection isn't overriding selection
|
isInsurance: null, // Ensure that previous selection isn't overriding selection
|
||||||
},
|
},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
},
|
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -642,9 +612,6 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: null,
|
isInsurance: null,
|
||||||
},
|
},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
},
|
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: "AZ",
|
state: "AZ",
|
||||||
},
|
},
|
||||||
|
|
@ -750,9 +717,6 @@ describe("quote.vue", () => {
|
||||||
isInsurance: true,
|
isInsurance: true,
|
||||||
inactivePromos: [],
|
inactivePromos: [],
|
||||||
},
|
},
|
||||||
customer: {
|
|
||||||
emailAddress: "test@test.com",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
externalParameterState: { isExternalParameter: 1 },
|
externalParameterState: { isExternalParameter: 1 },
|
||||||
externalParameterQuote: {
|
externalParameterQuote: {
|
||||||
|
|
|
||||||
|
|
@ -77,11 +77,6 @@
|
||||||
@back-clicked="backButtonAction"
|
@back-clicked="backButtonAction"
|
||||||
@ForwardClicked="forwardButtonAction" />
|
@ForwardClicked="forwardButtonAction" />
|
||||||
|
|
||||||
<saveProgressModalQuestion
|
|
||||||
modalWidgetName="SaveProgressModalWidget"
|
|
||||||
v-if="!isEmailInStoreOnPageLoad"
|
|
||||||
@save-progress="saveProgress" />
|
|
||||||
|
|
||||||
<textBlock
|
<textBlock
|
||||||
cmsWidgetName="quoteDisclaimer"
|
cmsWidgetName="quoteDisclaimer"
|
||||||
justifyText="center"
|
justifyText="center"
|
||||||
|
|
@ -105,7 +100,6 @@ import contentGroupModal from "@/fmg-components/content-group-modal/content-grou
|
||||||
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
|
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
|
||||||
import afterpayModalBanner from "@/layouts/quote/afterpay-modal-banner/afterpay-modal-banner";
|
import afterpayModalBanner from "@/layouts/quote/afterpay-modal-banner/afterpay-modal-banner";
|
||||||
import recalDisclaimer from "@/layouts/quote/recal-disclaimer/recal-disclaimer.vue";
|
import recalDisclaimer from "@/layouts/quote/recal-disclaimer/recal-disclaimer.vue";
|
||||||
import saveProgressModalQuestion from "@/fmg-components/save-progress-modal-question/save-progress-modal-question";
|
|
||||||
|
|
||||||
// Supporting files
|
// Supporting files
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
|
|
@ -140,7 +134,6 @@ import { packageNames } from "@/constants/package-names";
|
||||||
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
||||||
import { containsRecalParts } from "@/helpers/recal-helper";
|
import { containsRecalParts } from "@/helpers/recal-helper";
|
||||||
import { externalParameterStatus } from "@/constants/external-parameters";
|
import { externalParameterStatus } from "@/constants/external-parameters";
|
||||||
import { saveQuote } from "@/helpers/heritage-integration/order-helper.js";
|
|
||||||
|
|
||||||
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
||||||
|
|
||||||
|
|
@ -190,8 +183,6 @@ export default {
|
||||||
];
|
];
|
||||||
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
const emailFromStore = store.getters.order.customer.emailAddress;
|
|
||||||
|
|
||||||
const lineItems = deepClone(store.getters.order.lineItems);
|
const lineItems = deepClone(store.getters.order.lineItems);
|
||||||
lineItems.vaps = lineItems.vaps ?? [];
|
lineItems.vaps = lineItems.vaps ?? [];
|
||||||
const nullSafeGlassParts = lineItems.glassParts ?? [];
|
const nullSafeGlassParts = lineItems.glassParts ?? [];
|
||||||
|
|
@ -272,7 +263,6 @@ export default {
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next(async (vm) => {
|
next(async (vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.isEmailInStoreOnPageLoad = emailFromStore?.length > 0;
|
|
||||||
vm.addableVaps = addableVaps;
|
vm.addableVaps = addableVaps;
|
||||||
vm.lineItems = lineItems;
|
vm.lineItems = lineItems;
|
||||||
vm.availableLineItems = pricingResults;
|
vm.availableLineItems = pricingResults;
|
||||||
|
|
@ -419,7 +409,6 @@ export default {
|
||||||
servicePackage: null,
|
servicePackage: null,
|
||||||
holdParentAccountNumber: null,
|
holdParentAccountNumber: null,
|
||||||
holdBillToAccountNumber: null,
|
holdBillToAccountNumber: null,
|
||||||
isEmailInStoreOnPageLoad: null,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -466,9 +455,6 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async handleClick() {
|
|
||||||
await saveQuote({ pageNameToLog: "quote" });
|
|
||||||
},
|
|
||||||
openModalAction(modalName) {
|
openModalAction(modalName) {
|
||||||
this.$refs[modalName].openModal();
|
this.$refs[modalName].openModal();
|
||||||
},
|
},
|
||||||
|
|
@ -509,9 +495,6 @@ export default {
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
vehicleQuestionsMixin.methods.navigateBack(this);
|
vehicleQuestionsMixin.methods.navigateBack(this);
|
||||||
},
|
},
|
||||||
saveProgress() {
|
|
||||||
saveQuote({ pageNameToLog: "quote" });
|
|
||||||
},
|
|
||||||
forwardButtonAction() {
|
forwardButtonAction() {
|
||||||
this.dispatchStoreAction(
|
this.dispatchStoreAction(
|
||||||
this.storeActions.SAVE_PAYMENT_TYPE,
|
this.storeActions.SAVE_PAYMENT_TYPE,
|
||||||
|
|
@ -697,7 +680,6 @@ export default {
|
||||||
afterpayModalBanner,
|
afterpayModalBanner,
|
||||||
promoModalQuestion,
|
promoModalQuestion,
|
||||||
recalDisclaimer,
|
recalDisclaimer,
|
||||||
saveProgressModalQuestion,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1931,49 +1931,6 @@ export const actions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// Session API Actions
|
// Session API Actions
|
||||||
saveQuote(context, { pageNameToLog, payload }) {
|
|
||||||
const vehicle = context.getters.vehicle;
|
|
||||||
const damage = context.getters.damage;
|
|
||||||
const order = context.state.order;
|
|
||||||
const applicationUser = context.getters.applicationUser;
|
|
||||||
const lineItems = context.state.order.lineItems;
|
|
||||||
const excludeRecalInquote = context.getters.shouldHideRecalibration;
|
|
||||||
|
|
||||||
return globalMethods.callHttpClient({
|
|
||||||
method: endpoints.SaveQuote.method,
|
|
||||||
endpoint: endpoints.SaveQuote.url,
|
|
||||||
payload: {
|
|
||||||
referralCorrelationId: order.referralCorrelationId,
|
|
||||||
referralNumber: order.referralNumber?.toString(),
|
|
||||||
referralSequenceNumber: order.referralSequenceNumber,
|
|
||||||
emailAddress: order.customer.emailAddress,
|
|
||||||
lastPage: pageNameToLog,
|
|
||||||
isRepair: damage.isRepair,
|
|
||||||
firstName: order.customer.firstName,
|
|
||||||
lastName: order.customer.lastName,
|
|
||||||
savedSessionId: applicationUser.savedSessionId,
|
|
||||||
serviceState: order.serviceLocation.state,
|
|
||||||
serviceZipCode: order.serviceLocation.zipCode,
|
|
||||||
parentAccountNumber: order.payment.parentAccountNumber,
|
|
||||||
excludeRecalInquote: excludeRecalInquote,
|
|
||||||
year: vehicle.year,
|
|
||||||
make: vehicle.make,
|
|
||||||
model: vehicle.model,
|
|
||||||
isInsurance: order.payment.isInsurance ?? false,
|
|
||||||
isVerified: order.payment.insuranceCoverage.isVerified ?? false,
|
|
||||||
lineItems: {
|
|
||||||
glassParts: lineItems.glassParts,
|
|
||||||
supportingItems: lineItems.supportingItems,
|
|
||||||
vaps: lineItems.vaps,
|
|
||||||
serverData: lineItems.serverData,
|
|
||||||
promos: lineItems.promos,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
logApiCall: true,
|
|
||||||
pageNameToLog: pageNameToLog,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
saveSession(context, { pageNameToLog, payload }) {
|
saveSession(context, { pageNameToLog, payload }) {
|
||||||
const vehicle = context.getters.vehicle;
|
const vehicle = context.getters.vehicle;
|
||||||
const damage = context.getters.damage;
|
const damage = context.getters.damage;
|
||||||
|
|
@ -2051,7 +2008,8 @@ export const actions = {
|
||||||
order.payment.insuranceCoverage.coverageStatus?.toString(),
|
order.payment.insuranceCoverage.coverageStatus?.toString(),
|
||||||
coverageVerificationType:
|
coverageVerificationType:
|
||||||
order.payment.insuranceCoverage.coverageVerificationType,
|
order.payment.insuranceCoverage.coverageVerificationType,
|
||||||
coverageSubStatus: order.payment.insuranceCoverage.coverageSubStatus,
|
coverageSubStatus:
|
||||||
|
order.payment.insuranceCoverage.coverageSubStatus,
|
||||||
},
|
},
|
||||||
isInsurance: order.payment.isInsurance,
|
isInsurance: order.payment.isInsurance,
|
||||||
parentAccountNumber: order.payment.parentAccountNumber,
|
parentAccountNumber: order.payment.parentAccountNumber,
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.modal-open:not(.prevent-modal-scroll) {
|
.modal-open {
|
||||||
.container-fluid {
|
.container-fluid {
|
||||||
&.page-container-grouped-styles {
|
&.page-container-grouped-styles {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
:class="[
|
:class="[
|
||||||
isPrimary ? 'btn-primary' : 'btn-secondary',
|
isPrimary ? 'btn-primary' : 'btn-secondary',
|
||||||
isFloat ? 'float-end' : '',
|
isFloat ? 'float-end' : '',
|
||||||
(isLoaderDisplayed && !suppressLoader) ? 'has-loader' : '',
|
isLoaderDisplayed ? 'has-loader' : '',
|
||||||
]"
|
]"
|
||||||
@click="clicked">
|
@click="clicked">
|
||||||
<span class="m-0">{{ this.buttonText }}</span>
|
<span class="m-0">{{ this.buttonText }}</span>
|
||||||
|
|
@ -47,7 +47,7 @@ export default {
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
if (!this.isDisabled) {
|
if (!this.isDisabled) {
|
||||||
if (!this.suppressLoader) this.isLoaderDisplayed = true;
|
this.isLoaderDisplayed = true;
|
||||||
this.$emit("click-event");
|
this.$emit("click-event");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue