Merge branch 'release/2025.05.22' into rls-merge-2025.05.08-to-2025.05.22
This commit is contained in:
commit
ff6a1b0b80
15 changed files with 320 additions and 137 deletions
|
|
@ -23,7 +23,6 @@ const GaActions = {
|
|||
SUBMITTED: "Submitted",
|
||||
DISPLAYED: "Displayed",
|
||||
CASH_QUOTE_DISPLAYED: "Cash quote displayed",
|
||||
SERVICE_PACKAGE_PRICE: "Service package price",
|
||||
MOBILE_AVAILABLE: "mobile_available",
|
||||
SHOPS_FIRST_DISPLAYED: "shops_first_displayed",
|
||||
MORE_LOCATIONS_CLICKED: "more_locations_clicked",
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ const storeMutations = {
|
|||
UPDATE_SETTLED_TENDER_AMOUNT: "updateSettledTenderAmount",
|
||||
UPDATE_IS_RECAL_ACK_OPT_IN: "updateIsRecalAckOptIn",
|
||||
UPDATE_IS_MSR_FEE_APPLICABLE: "updateIsMSRFeeApplicable",
|
||||
UPDATE_CASH_PRICE_SUBTOTAL: "updateCashPriceSubTotal",
|
||||
|
||||
// EVENT BUS MUTATIONS
|
||||
ADD_EVENT_TO_BUS: "addEventToBus",
|
||||
|
|
|
|||
|
|
@ -119,12 +119,14 @@ export default {
|
|||
},
|
||||
onModalOpened() {
|
||||
this.onModalOpenedCallback?.();
|
||||
this.$emit("isModalOpened", true);
|
||||
},
|
||||
onModalClosed() {
|
||||
this.resetButtonStyle();
|
||||
this.onModalClosedCallback?.();
|
||||
if (this.suppressPageScroll)
|
||||
document.querySelector("body").classList.remove("prevent-modal-scroll");
|
||||
this.$emit("isModalOpened", false);
|
||||
},
|
||||
openModal() {
|
||||
if (this.suppressPageScroll)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<span class="salesforce-webchat"></span>
|
||||
<span class="salesforce-webchat">
|
||||
<button v-show="hideSalesforceWebchatLaunchButton" class="salesforce-chat-button"></button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
@ -49,12 +51,121 @@ export default {
|
|||
};
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
.embeddedServiceHelpButton .helpButton .uiButton {
|
||||
background-color: #167cac;
|
||||
font-family: "Arial", sans-serif;
|
||||
<style lang="scss">
|
||||
.salesforce-webchat {
|
||||
.salesforce-chat-button {
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' id='Layer_2' x='0' y='0' style='enable-background:new 0 0 24 24' version='1.1' viewBox='0 0 24 24'%3E%3Cstyle%3E .st0%7Bfill:%232e6fb6%7D %3C/style%3E%3Ccircle cx='12' cy='12' r='12' class='st0'/%3E%3Cpath d='M18.3 12c0 3.5-2.8 6.3-6.3 6.3-1.2 0-2.4-.4-3.4-1l-2.3.7s-.5.1-.3-.4.5-1.7.7-2.2c-.6-1-1-2.1-1-3.3 0-3.5 2.8-6.3 6.3-6.3 3.5-.1 6.3 2.7 6.3 6.2z' style='fill:%23fff'/%3E%3Ccircle cx='10.2' cy='12' r='.6' class='st0'/%3E%3Ccircle cx='12' cy='12' r='.6' class='st0'/%3E%3Ccircle cx='13.8' cy='12' r='.6' class='st0'/%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 1.5rem 1.5rem;
|
||||
background-position: center;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
.embeddedServiceHelpButton .helpButton .uiButton:focus {
|
||||
outline: 1px solid #167cac;
|
||||
|
||||
.dockableContainer {
|
||||
&.showDockableContainer {
|
||||
font-family: AvertaRegular;
|
||||
color: $gray-600;
|
||||
.sidebarBody {
|
||||
button {
|
||||
background: $blue;
|
||||
color: $white;
|
||||
&:hover {
|
||||
background: $blue-700 !important;
|
||||
}
|
||||
}
|
||||
.form-element__help {
|
||||
color: $red;
|
||||
}
|
||||
.embeddedServiceSidebarFormField {
|
||||
.uiInput {
|
||||
.uiLabel-left {
|
||||
color: $gray-600;
|
||||
}
|
||||
}
|
||||
}
|
||||
.embeddedServiceSidebarButton {
|
||||
&.uiButton--inverse {
|
||||
.label {
|
||||
color: $white;
|
||||
text-decoration: underline;
|
||||
}
|
||||
&:not(:disabled):focus {
|
||||
background-color: $blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
.embeddedServiceLiveAgentStateChatAvatar {
|
||||
&.isLightningOutContext {
|
||||
.agentIconColor0 {
|
||||
background-color: $blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
.embeddedServiceLiveAgentStateChatInputFooter {
|
||||
.footerMenuWrapper {
|
||||
.footer-menu-items {
|
||||
.slds-dropdown__item {
|
||||
> a {
|
||||
padding-left: 0;
|
||||
max-width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.embeddedServiceLiveAgentStateChatInputFooter {
|
||||
.footerMenuWrapper {
|
||||
.footer-menu-items {
|
||||
a {
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.chatHeaderBranding {
|
||||
background-color: $blue;
|
||||
}
|
||||
span {
|
||||
&.required {
|
||||
color: $red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.embeddedServiceHelpButton {
|
||||
.helpButton {
|
||||
.uiButton {
|
||||
background-color: $blue !important;
|
||||
}
|
||||
}
|
||||
.embeddedServiceIcon {
|
||||
display: inline-block !important;
|
||||
}
|
||||
}
|
||||
.modalContainer {
|
||||
&.sidebarMinimized {
|
||||
&.layout-docted {
|
||||
&.embeddedServiceSidebar {
|
||||
.embeddedServiceSidebarMinimizedDefaultUI {
|
||||
.helpButton,
|
||||
.sidebarHeader {
|
||||
&.minimizedContainer {
|
||||
.embeddedServiceSidebarMinimizedDefaultUI {
|
||||
background-color: $blue;
|
||||
border: 1px solid $blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,21 @@
|
|||
<template>
|
||||
<div
|
||||
class="funnel-header d-flex justify-content-center align-items-center flex-column"
|
||||
v-if="imageSrc">
|
||||
<!-- HIDDEN FOR 05.08 <salesforceWebchat hideSalesforceWebchatLaunchButton />-->
|
||||
<img class="logo-image img-fluid" :src="imageSrc" alt="Safelite logo" />
|
||||
<!-- // menu-modal temporarily not in use until the hamburger menu is re-implemented for use with the progress bar. See display: none below. -->
|
||||
<menuModal />
|
||||
<!-- // menu-modal temporarily not in use until the hamburger menu is re-implemented for use with the progress bar. See display: none below. -->
|
||||
<progressBar />
|
||||
<div class="funnel-header" v-if="imageSrc">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="button-container">
|
||||
<!-- HIDDEN FOR 05.08 <salesforceWebchat hideSalesforceWebchatLaunchButton /> -->
|
||||
</div>
|
||||
<div class="site-logo">
|
||||
<img class="logo-image img-fluid" :src="imageSrc" alt="Safelite logo" />
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<!-- // menu-modal temporarily not in use until the hamburger menu is re-implemented for use with the progress bar. See display: none below. -->
|
||||
<menuModal />
|
||||
<!-- // menu-modal temporarily not in use until the hamburger menu is re-implemented for use with the progress bar. See display: none below. -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex w-100">
|
||||
<progressBar />
|
||||
</div>
|
||||
</div>
|
||||
<template v-for="globalAlert in globalAlertMessages" :key="globalAlert.id">
|
||||
<transition name="fade" mode="out-in">
|
||||
|
|
@ -45,7 +53,7 @@ export default {
|
|||
cmsWidgetName: String,
|
||||
hideSalesforceWebchatLaunchButton: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -100,16 +108,23 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.menu-modal-container) {
|
||||
display: none; // This is temporary until the hamburger menu is re-implemented for use with the progress bar
|
||||
}
|
||||
.funnel-header {
|
||||
position: relative;
|
||||
padding-top: 0.97rem;
|
||||
}
|
||||
padding: 1rem 0;
|
||||
|
||||
.logo-image {
|
||||
width: auto;
|
||||
height: 1.1875rem;
|
||||
.button-container {
|
||||
width: 1.5rem;
|
||||
height: 1.625rem;
|
||||
}
|
||||
|
||||
.logo-image {
|
||||
width: auto;
|
||||
height: 1.1875rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
:deep(.menu-modal-container) {
|
||||
display: none; // This is temporary until the hamburger menu is re-implemented for use with the progress bar
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -11,21 +11,6 @@
|
|||
<div class="bar3"></div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="menu-modal-container">
|
||||
<button
|
||||
aria-hidden="true"
|
||||
tabindex="-1"
|
||||
class="menu-button"
|
||||
type="button"
|
||||
:class="[isActive ? 'active' : '']"
|
||||
@click="toggleModal"
|
||||
aria-label="Hamburger Menu (modal window)">
|
||||
<div class="bar1"></div>
|
||||
<div class="bar2"></div>
|
||||
<div class="bar3"></div>
|
||||
</button>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div
|
||||
class="modal menu-modal fade"
|
||||
data-bs-backdrop="false"
|
||||
|
|
@ -123,9 +108,6 @@ export default {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.menu-modal-container {
|
||||
position: absolute;
|
||||
padding: 1.47rem 0 1.47rem 1.47rem;
|
||||
right: 0;
|
||||
button {
|
||||
border: none;
|
||||
&.menu-button {
|
||||
|
|
@ -164,7 +146,7 @@ export default {
|
|||
}
|
||||
.modal {
|
||||
&.menu-modal {
|
||||
left: auto;
|
||||
//left: auto;
|
||||
height: calc(100% - 56px);
|
||||
top: 56px;
|
||||
border-top: 1px solid $gray-300;
|
||||
|
|
|
|||
|
|
@ -83,6 +83,22 @@ export async function saveSession({
|
|||
if (!store.getters.applicationUser.savedSessionId || shouldAwaitSaveSessionQueue) {
|
||||
await saveSessionPromise;
|
||||
}
|
||||
|
||||
const lineItems = store.getters.order?.lineItems ?? {};
|
||||
const combinedLineItems = [
|
||||
...(lineItems.glassParts || []),
|
||||
...(lineItems.supportingItems || []),
|
||||
...(lineItems.vaps || []),
|
||||
...(lineItems.promos || []),
|
||||
];
|
||||
|
||||
const cashPriceSubtotal = combinedLineItems.length
|
||||
? baseMixin.methods
|
||||
.getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, false)
|
||||
.toFixed(2)
|
||||
: "";
|
||||
|
||||
store.commit(storeMutations.UPDATE_CASH_PRICE_SUBTOTAL, cashPriceSubtotal);
|
||||
}
|
||||
|
||||
export async function submitWorkOrder({
|
||||
|
|
|
|||
|
|
@ -789,8 +789,10 @@ export default {
|
|||
});
|
||||
this.$nextTick(() => {
|
||||
const availablePackageNames = this.$refs.servicePackage?.servicePackageAnswers;
|
||||
var eventLabel = "";
|
||||
availablePackageNames?.forEach((tier) => {
|
||||
var priceLabel = "";
|
||||
|
||||
if (availablePackageNames?.length > 1 || availablePackageNames?.length == 1) {
|
||||
var tier = availablePackageNames[0];
|
||||
if (tier) {
|
||||
let lineItemsToPrice = this.availableLineItems;
|
||||
if (this.isRecalibrationOnOrder && this.shouldHideRecalibration) {
|
||||
|
|
@ -815,14 +817,11 @@ export default {
|
|||
baseMixin.methods.filterOutFees(lineItemsToPrice)
|
||||
);
|
||||
price += this.$refs.servicePackage.getVapsPrice(tier.value);
|
||||
const formattedPrice = parseFloat(price).toFixed(2);
|
||||
eventLabel += tier.value + "_" + formattedPrice;
|
||||
priceLabel = price.toFixed(2);
|
||||
}
|
||||
eventLabel += ",";
|
||||
});
|
||||
eventLabel = eventLabel.slice(0, -1);
|
||||
|
||||
this.pushEventToGA("quote", this.GaActions.SERVICE_PACKAGE_PRICE, eventLabel, true);
|
||||
}
|
||||
const subTotalLabel = this.Variables?.CASH_SUBTOTAL;
|
||||
this.pushVariableToDataLayer?.({ [subTotalLabel]: priceLabel });
|
||||
});
|
||||
},
|
||||
async skip(insuranceSelection, packageSelection) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ import servicePackageRadioExperiment from "@/experiment-components/service-packa
|
|||
import servicePackageRadioAfterpayExperiment from "@/experiment-components/service-package-radio-for-afterpay";
|
||||
import { partTypeStrings } from "@/constants/part-type-strings";
|
||||
import { packageNames } from "@/constants/package-names";
|
||||
import store from "@/store";
|
||||
import { storeMutations } from "@/constants/store-mutations";
|
||||
import {
|
||||
shouldFrontWipersBeAvailable,
|
||||
shouldRearWipersBeAvailable,
|
||||
|
|
@ -161,6 +163,7 @@ export default {
|
|||
isInsuranceSelected: this.isInsuranceSelected,
|
||||
},
|
||||
}));
|
||||
|
||||
this.$emit("currentNumberOfPackages", modifiedAnswers.length);
|
||||
return modifiedAnswers;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -375,6 +375,10 @@ export default {
|
|||
setTimeout(() => {
|
||||
this.$refs.datePicker.showAnotherMonth().then((moreSelectableDatesData) => {
|
||||
this.selectableDatesData = moreSelectableDatesData;
|
||||
if (selectableDatesData?.days?.length > 0) {
|
||||
this.selectedDate = selectableDatesData.days[0].date;
|
||||
}
|
||||
|
||||
this.setDisplayWaitList();
|
||||
});
|
||||
}, 50);
|
||||
|
|
|
|||
|
|
@ -1,72 +1,70 @@
|
|||
<template>
|
||||
<transition name="fade" mode="out-in">
|
||||
<div class="mobile-location-questions">
|
||||
<div class="text-center" :id="componentId">
|
||||
<label
|
||||
for="mobileLocationLinkPromptId"
|
||||
:aria-label="mobileLocationLinkPromptText"
|
||||
class="form-label fw-bold w-100 ps-4 pe-4 pt-4 text-black"
|
||||
v-html="mobileLocationLinkPromptText"></label>
|
||||
<div class="update-mobile-location-text-link">
|
||||
<textLink
|
||||
ref="mobileLocationLink"
|
||||
id="mobileLocationLinkPromptId"
|
||||
linkType="text"
|
||||
:text="mobileLocationLinkText"
|
||||
href="#!"
|
||||
@click-event="openModal" />
|
||||
</div>
|
||||
<div v-show="errorMessage" class="row my-1 form-test-error">
|
||||
<span
|
||||
class="d-inline-flex small mt-0 center-error-message"
|
||||
aria-atomic="true"
|
||||
aria-live="polite">
|
||||
{{ errorMessage }}
|
||||
</span>
|
||||
</div>
|
||||
<textBlock
|
||||
v-if="mobileFeeApplies"
|
||||
:customText="mobileFeeText"
|
||||
cmsWidgetName="MobileFeeDisclaimerWidget"
|
||||
typeStyle="caption" />
|
||||
<div class="mobile-location-questions">
|
||||
<div class="text-center" :id="componentId">
|
||||
<label
|
||||
for="mobileLocationLinkPromptId"
|
||||
:aria-label="mobileLocationLinkPromptText"
|
||||
class="form-label fw-bold w-100 ps-4 pe-4 pt-4 text-black"
|
||||
v-html="mobileLocationLinkPromptText"></label>
|
||||
<div class="update-mobile-location-text-link">
|
||||
<textLink
|
||||
ref="mobileLocationLink"
|
||||
id="mobileLocationLinkPromptId"
|
||||
linkType="text"
|
||||
:text="mobileLocationLinkText"
|
||||
href="#!"
|
||||
@click-event="openModal" />
|
||||
</div>
|
||||
<modal
|
||||
:ref="modalName"
|
||||
:headerText="modalHeaderText"
|
||||
:footerButtonText="modalFooterText"
|
||||
:onModalOpenedCallback="onModalOpened"
|
||||
:onModalClosedCallback="onModalClosed"
|
||||
@isModalOpened="setModalStatus"
|
||||
@footer-button-event="setMobileLocation">
|
||||
<template v-if="isModalOpened">
|
||||
<addressQuestions
|
||||
ref="addressQuestions"
|
||||
v-model="internalModel.addressQuestions"
|
||||
captureApartmentNumberOrBusinessName="true"
|
||||
preserveCityAndStateOnReset="true" />
|
||||
<vehicleProtectedQuestion
|
||||
ref="vehicleProtectedQuestion"
|
||||
v-model="internalModel.isVehicleProtected"
|
||||
cmsWidgetName="VehicleProtectedQuestionWidget" />
|
||||
<textBlock cmsWidgetName="WorkspaceRequirementsWidget" typeStyle="caption" />
|
||||
<alert
|
||||
ref="alertInvalidZip"
|
||||
v-if="displayInvalidZipAlert"
|
||||
class="my-4"
|
||||
cmsWidgetName="AlertInvalidZipWidget"
|
||||
alertClass="alert-danger"
|
||||
v-bind:isDismissible="false" />
|
||||
<alert
|
||||
ref="alertMismatchStateAndZip"
|
||||
v-if="displayMismatchStateAndZipAlert"
|
||||
class="my-4"
|
||||
cmsWidgetName="AlertMismatchStateAndZipWidget"
|
||||
alertClass="alert-danger"
|
||||
v-bind:isDismissible="false" />
|
||||
</template>
|
||||
</modal>
|
||||
<div v-show="errorMessage" class="row my-1 form-test-error">
|
||||
<span
|
||||
class="d-inline-flex small mt-0 center-error-message"
|
||||
aria-atomic="true"
|
||||
aria-live="polite">
|
||||
{{ errorMessage }}
|
||||
</span>
|
||||
</div>
|
||||
<textBlock
|
||||
v-if="mobileFeeApplies"
|
||||
:customText="mobileFeeText"
|
||||
cmsWidgetName="MobileFeeDisclaimerWidget"
|
||||
typeStyle="caption" />
|
||||
</div>
|
||||
</transition>
|
||||
<modal
|
||||
:ref="modalName"
|
||||
:headerText="modalHeaderText"
|
||||
:footerButtonText="modalFooterText"
|
||||
:onModalOpenedCallback="onModalOpened"
|
||||
:onModalClosedCallback="onModalClosed"
|
||||
@isModalOpened="setModalStatus"
|
||||
@footer-button-event="setMobileLocation">
|
||||
<template v-if="isModalOpened">
|
||||
<addressQuestions
|
||||
ref="addressQuestions"
|
||||
v-model="internalModel.addressQuestions"
|
||||
captureApartmentNumberOrBusinessName="true"
|
||||
preserveCityAndStateOnReset="true" />
|
||||
<vehicleProtectedQuestion
|
||||
ref="vehicleProtectedQuestion"
|
||||
v-model="internalModel.isVehicleProtected"
|
||||
cmsWidgetName="VehicleProtectedQuestionWidget" />
|
||||
<textBlock cmsWidgetName="WorkspaceRequirementsWidget" typeStyle="caption" />
|
||||
<alert
|
||||
ref="alertInvalidZip"
|
||||
v-if="displayInvalidZipAlert"
|
||||
class="my-4"
|
||||
cmsWidgetName="AlertInvalidZipWidget"
|
||||
alertClass="alert-danger"
|
||||
v-bind:isDismissible="false" />
|
||||
<alert
|
||||
ref="alertMismatchStateAndZip"
|
||||
v-if="displayMismatchStateAndZipAlert"
|
||||
class="my-4"
|
||||
cmsWidgetName="AlertMismatchStateAndZipWidget"
|
||||
alertClass="alert-danger"
|
||||
v-bind:isDismissible="false" />
|
||||
</template>
|
||||
</modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
@ -99,6 +97,7 @@ export default {
|
|||
"updated-contains-military-base",
|
||||
"updated-bill-to-account-number",
|
||||
"setMobileLocationAndProceed",
|
||||
"updated-modal-opened",
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -150,6 +149,7 @@ export default {
|
|||
zipCode: "",
|
||||
},
|
||||
isVehicleProtected: null,
|
||||
isMobileSelected: false,
|
||||
}),
|
||||
},
|
||||
mobileFeePart: {
|
||||
|
|
@ -169,17 +169,7 @@ export default {
|
|||
return this.getCmsContent(this.linkWidgetName, "HeaderText");
|
||||
},
|
||||
mobileLocationLinkText() {
|
||||
if (
|
||||
this.addressModel.streetAddress &&
|
||||
this.addressModel.streetAddress !== "" &&
|
||||
this.addressModel.city &&
|
||||
this.addressModel.city !== "" &&
|
||||
this.addressModel.state &&
|
||||
this.addressModel.state !== "" &&
|
||||
this.addressModel.zipCode &&
|
||||
this.addressModel.zipCode !== "" &&
|
||||
this.internalModel.isVehicleProtected !== null
|
||||
) {
|
||||
if (this.isMobileAddressComplete()) {
|
||||
return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`;
|
||||
}
|
||||
return this.getCmsContent(this.linkWidgetName, "BodyText");
|
||||
|
|
@ -218,6 +208,19 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
isMobileAddressComplete() {
|
||||
return (
|
||||
this.addressModel.streetAddress &&
|
||||
this.addressModel.streetAddress !== "" &&
|
||||
this.addressModel.city &&
|
||||
this.addressModel.city !== "" &&
|
||||
this.addressModel.state &&
|
||||
this.addressModel.state !== "" &&
|
||||
this.addressModel.zipCode &&
|
||||
this.addressModel.zipCode !== "" &&
|
||||
this.internalModel.isVehicleProtected !== null
|
||||
);
|
||||
},
|
||||
openModal() {
|
||||
this.modal.openModal();
|
||||
},
|
||||
|
|
@ -226,6 +229,7 @@ export default {
|
|||
},
|
||||
setModalStatus(isOpened) {
|
||||
this.isModalOpened = isOpened;
|
||||
this.$emit("updated-modal-opened", isOpened);
|
||||
},
|
||||
closeModal() {
|
||||
this.modal.closeModal();
|
||||
|
|
|
|||
|
|
@ -343,6 +343,7 @@ describe("service-location.vue", () => {
|
|||
zipCode: "43054",
|
||||
},
|
||||
isVehicleProtected: true,
|
||||
isMobileSelectedAndModalClosed: true,
|
||||
};
|
||||
wrapper.vm.mobileLocationQuestions = mobileLocationQuestions;
|
||||
|
||||
|
|
@ -355,6 +356,7 @@ describe("service-location.vue", () => {
|
|||
zipCode: "61606",
|
||||
},
|
||||
isVehicleProtected: null,
|
||||
isMobileSelectedAndModalClosed: false,
|
||||
};
|
||||
|
||||
// Act
|
||||
|
|
@ -457,6 +459,7 @@ describe("service-location.vue", () => {
|
|||
zipCode: "",
|
||||
},
|
||||
isVehicleProtected: null,
|
||||
isMobileSelectedAndModalClosed: false,
|
||||
};
|
||||
wrapper.vm.mobileLocationQuestions = mobileLocationQuestions;
|
||||
const newMobileLocationQuestions = {
|
||||
|
|
@ -468,6 +471,7 @@ describe("service-location.vue", () => {
|
|||
zipCode: "43054",
|
||||
},
|
||||
isVehicleProtected: true,
|
||||
isMobileSelectedAndModalClosed: true,
|
||||
};
|
||||
|
||||
wrapper.vm.closeModalAction = jest.fn();
|
||||
|
|
@ -517,6 +521,7 @@ describe("service-location.vue", () => {
|
|||
zipCode: "",
|
||||
},
|
||||
isVehicleProtected: null,
|
||||
isMobileSelectedAndModalClosed: false,
|
||||
mobileFeePart: null,
|
||||
};
|
||||
wrapper.vm.mobileLocationQuestions = mobileLocationQuestions;
|
||||
|
|
@ -530,6 +535,7 @@ describe("service-location.vue", () => {
|
|||
zipCode: "43081",
|
||||
},
|
||||
isVehicleProtected: true,
|
||||
isMobileSelectedAndModalClosed: true,
|
||||
mobileFeePart: null,
|
||||
};
|
||||
|
||||
|
|
@ -593,6 +599,7 @@ describe("service-location.vue", () => {
|
|||
zipCode: "43081",
|
||||
},
|
||||
isVehicleProtected: "YesAnswer",
|
||||
isMobileSelectedAndModalClosed: true,
|
||||
};
|
||||
|
||||
wrapper.vm.closeModalAction = jest.fn();
|
||||
|
|
@ -1433,5 +1440,7 @@ function setupMocks({ mountOptionsMockData = {} }) {
|
|||
const mountOptions = getMountOptions(mountOptionsMockData);
|
||||
const wrapper = shallowMount(serviceLocation, mountOptions);
|
||||
wrapper.vm.setCmsContent = baseMixin.methods.setCmsContent;
|
||||
wrapper.vm.$refs.mobileLocationQuestions.isMobileAddressComplete = jest.fn();
|
||||
wrapper.vm.$refs.mobileLocationQuestions.openModal = jest.fn();
|
||||
return { wrapper, apiPromise };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
<div class="col-md-6 col-xl-4">
|
||||
<mobileLocationModalQuestions
|
||||
customComponentId="mobileLocationQuestions"
|
||||
v-if="selectedAppointmentType === 'Mobile'"
|
||||
v-show="selectedAppointmentType === 'Mobile'"
|
||||
v-model="mobileLocationQuestions"
|
||||
:mobileFeePart="mobileFeePart"
|
||||
:mobileFeeApplies="mobileFeeApplies"
|
||||
|
|
@ -98,6 +98,7 @@
|
|||
@updated-serviceability="setServiceabilityDetails"
|
||||
@updated-contains-military-base="setContainsMilitaryBase"
|
||||
@updated-mobile-ctu="setCtuForMobile"
|
||||
@updated-modal-opened="setMobileLocationModalOpened"
|
||||
validationRules="mobile-location-required"
|
||||
ref="mobileLocationQuestions"
|
||||
linkWidgetName="MobileLocationLinkWidget"
|
||||
|
|
@ -173,11 +174,12 @@ const MOBILE_FEE_PART_TYPE = "MOBILE FEE";
|
|||
// DEFINE VALIDATION RULES
|
||||
defineRule("mobile-location-required", (value) => {
|
||||
if (
|
||||
!value.addressQuestions.streetAddress ||
|
||||
!value.addressQuestions.city ||
|
||||
!value.addressQuestions.state ||
|
||||
!value.addressQuestions.zipCode ||
|
||||
!value.isVehicleProtected
|
||||
value.isMobileSelectedAndModalClosed &&
|
||||
(!value.addressQuestions.streetAddress ||
|
||||
!value.addressQuestions.city ||
|
||||
!value.addressQuestions.state ||
|
||||
!value.addressQuestions.zipCode ||
|
||||
!value.isVehicleProtected)
|
||||
) {
|
||||
return errorMessages.MOBILE_LOCATION_REQUIRED;
|
||||
}
|
||||
|
|
@ -211,6 +213,7 @@ export default {
|
|||
billToAccountNumber: null,
|
||||
shopProviderData: null,
|
||||
navigatingForward: false,
|
||||
mobileLocationModalOpened: false,
|
||||
};
|
||||
},
|
||||
async beforeRouteEnter(to, from, next) {
|
||||
|
|
@ -301,6 +304,9 @@ export default {
|
|||
zipCode: this.zipCode,
|
||||
},
|
||||
isVehicleProtected: this.isVehicleProtected,
|
||||
isMobileSelectedAndModalClosed:
|
||||
this.selectedAppointmentType === "Mobile" &&
|
||||
!this.mobileLocationModalOpened,
|
||||
};
|
||||
},
|
||||
},
|
||||
|
|
@ -506,6 +512,9 @@ export default {
|
|||
setRecycleFeePart(recycleFeePart) {
|
||||
this.recycleFeePart = recycleFeePart;
|
||||
},
|
||||
setMobileLocationModalOpened(isModalOpened) {
|
||||
this.mobileLocationModalOpened = isModalOpened;
|
||||
},
|
||||
//creating async function as the computed property can not directly handle asynchronous operations or promises.
|
||||
async setMobileLocationQuestions(newValue) {
|
||||
var newZipCode = newValue.addressQuestions.zipCode;
|
||||
|
|
@ -784,6 +793,10 @@ export default {
|
|||
this.selectedProvider = new Provider(
|
||||
this.shopProviderData.mobileProviderNumber
|
||||
);
|
||||
var mobileLocationQs = this.$refs.mobileLocationQuestions;
|
||||
if (!mobileLocationQs.isMobileAddressComplete()) {
|
||||
mobileLocationQs.openModal();
|
||||
}
|
||||
} else {
|
||||
this.selectedProvider = new Provider();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import { getFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
|
|||
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
||||
import router from "@/router/index.js";
|
||||
import { getQuerystringParameter } from "@/helpers/querystring-helper";
|
||||
import { Variables } from "../constants/analytics";
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
|
|
@ -120,6 +121,10 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
async pushVariableToDataLayer(data) {
|
||||
pushToDataLayerIfDefined(data);
|
||||
},
|
||||
|
||||
async pushPageViewToGA() {
|
||||
const currentPageName = getPageNameByQueryString();
|
||||
const pageViewEvent = {
|
||||
|
|
@ -306,6 +311,18 @@ export default {
|
|||
} else {
|
||||
payload.priceSubTotal = "";
|
||||
}
|
||||
|
||||
// Cash Quote or Cash Price Sub Total
|
||||
if (isPricingAvailable) {
|
||||
const subtotal = baseMixin.methods
|
||||
.getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, false)
|
||||
.toFixed(2);
|
||||
|
||||
payload.cashPriceSubTotal = parseFloat(subtotal);
|
||||
} else {
|
||||
payload.cashPriceSubTotal = "";
|
||||
}
|
||||
|
||||
//unverified (in scenarios we don’t display the price)
|
||||
if (
|
||||
order.payment.isInsurance &&
|
||||
|
|
@ -770,6 +787,9 @@ export default {
|
|||
ValueToLogTypes() {
|
||||
return ValueToLogTypes;
|
||||
},
|
||||
Variables() {
|
||||
return Variables;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -340,6 +340,10 @@ export const mutations = {
|
|||
updateIsMSRFeeApplicable(state, isMSRFeeApplicable) {
|
||||
state.order.isMSRFeeApplicable = isMSRFeeApplicable;
|
||||
},
|
||||
updateCashPriceSubTotal(state, cashPriceSubTotal) {
|
||||
state.order.cashPriceSubTotal =
|
||||
cashPriceSubTotal === "" ? null : cashPriceSubTotal.toString();
|
||||
},
|
||||
updateCCToken(state, ccToken) {
|
||||
state.order.payment.ccToken.subscriptionId = ccToken.subscriptionId;
|
||||
state.order.payment.ccToken.expMonth = ccToken.expMonth;
|
||||
|
|
@ -2339,6 +2343,7 @@ export const actions = {
|
|||
lockToken: order.lockToken,
|
||||
isRecalAckOptIn: order.isRecalAckOptIn,
|
||||
isMSRFeeApplicable: order.isMSRFeeApplicable,
|
||||
cashPriceSubTotal: order.cashPriceSubTotal,
|
||||
},
|
||||
},
|
||||
logApiCall: true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue