Merge remote-tracking branch 'origin/release/2025.05.22' into feature/CASH-45
This commit is contained in:
commit
c9e2c20067
14 changed files with 221 additions and 208 deletions
|
|
@ -35,4 +35,9 @@ export const inputButtonProps = {
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
suppressError: Boolean,
|
suppressError: Boolean,
|
||||||
|
labelBold: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@ https://safelite.atlassian.net/wiki/spaces/DC/pages/76644418/Button+Question+Com
|
||||||
v-if="questionText && answers && answers.length > 0"
|
v-if="questionText && answers && answers.length > 0"
|
||||||
class="question-text d-flex"
|
class="question-text d-flex"
|
||||||
:class="{ 'small-question-text': isSmallQuestionText }">
|
:class="{ 'small-question-text': isSmallQuestionText }">
|
||||||
<span class="fw-bold w-100">{{ questionText }}</span>
|
<span class="fw-bold w-100" :class="[labelBold ? 'span-bold' : '']">
|
||||||
|
{{ questionText }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-100 d-flex justify-content-center">
|
<div class="w-100 d-flex justify-content-center">
|
||||||
|
|
@ -57,6 +59,7 @@ https://safelite.atlassian.net/wiki/spaces/DC/pages/76644418/Button+Question+Com
|
||||||
:setLastValuePushedToGa="setLastValuePushedToGa"
|
:setLastValuePushedToGa="setLastValuePushedToGa"
|
||||||
:isInsuranceSelected="isInsuranceSelected"
|
:isInsuranceSelected="isInsuranceSelected"
|
||||||
:suppressError="suppressError"
|
:suppressError="suppressError"
|
||||||
|
:labelBold="labelBold"
|
||||||
@buttonEvent="handleButtonEvent"
|
@buttonEvent="handleButtonEvent"
|
||||||
v-model="selectedValues" />
|
v-model="selectedValues" />
|
||||||
<!-- For nested questions -->
|
<!-- For nested questions -->
|
||||||
|
|
@ -141,6 +144,11 @@ export default {
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
isInsuranceSelected: Boolean,
|
isInsuranceSelected: Boolean,
|
||||||
|
labelBold: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const propsClone = Object.assign({}, props);
|
const propsClone = Object.assign({}, props);
|
||||||
|
|
@ -360,6 +368,9 @@ export default {
|
||||||
& > span {
|
& > span {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.span-bold {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.small-question-text {
|
.small-question-text {
|
||||||
&.question-text {
|
&.question-text {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
:for="dropdownId"
|
:for="dropdownId"
|
||||||
:aria-label="questionText"
|
:aria-label="questionText"
|
||||||
class="form-label"
|
class="form-label"
|
||||||
|
:class="[labelBold ? 'label-bold' : '']"
|
||||||
v-html="questionText"></label>
|
v-html="questionText"></label>
|
||||||
<select
|
<select
|
||||||
v-model="selectedOption"
|
v-model="selectedOption"
|
||||||
|
|
@ -61,6 +62,11 @@ export default {
|
||||||
required: false,
|
required: false,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
labelBold: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const uuid = uuidv4();
|
const uuid = uuidv4();
|
||||||
|
|
@ -133,6 +139,10 @@ export default {
|
||||||
color: $black;
|
color: $black;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
.label-bold {
|
||||||
|
color: $black;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
.form-label {
|
.form-label {
|
||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
:class="[
|
:class="[
|
||||||
questionAlignment === 'center' ? 'text-center w-100 mb-5' : '',
|
questionAlignment === 'center' ? 'text-center w-100 mb-5' : '',
|
||||||
hideInput ? 'hide-input' : '',
|
hideInput ? 'hide-input' : '',
|
||||||
|
labelBold ? 'label-bold' : '',
|
||||||
]"
|
]"
|
||||||
v-html="questionText"></label>
|
v-html="questionText"></label>
|
||||||
<div
|
<div
|
||||||
|
|
@ -132,6 +133,11 @@ export default {
|
||||||
isRequired: false,
|
isRequired: false,
|
||||||
},
|
},
|
||||||
autocomplete: String,
|
autocomplete: String,
|
||||||
|
labelBold: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const uuid = uuidv4();
|
const uuid = uuidv4();
|
||||||
|
|
@ -251,6 +257,9 @@ export default {
|
||||||
color: $black;
|
color: $black;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
.label-bold {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
.input-wrapper {
|
.input-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
&.has-search-icon {
|
&.has-search-icon {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@
|
||||||
hasIcon
|
hasIcon
|
||||||
validationRules="street-address-required"
|
validationRules="street-address-required"
|
||||||
autocomplete="street-address"
|
autocomplete="street-address"
|
||||||
@keydown.enter.prevent />
|
@keydown.enter.prevent
|
||||||
|
:labelBold="labelBold" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<transition name="fade" mode="out-in">
|
<transition name="fade" mode="out-in">
|
||||||
|
|
@ -27,7 +28,8 @@
|
||||||
customInputId="apartmentNumberOrBusinessName"
|
customInputId="apartmentNumberOrBusinessName"
|
||||||
cmsWidgetName="ApartmentNumberOrBusinessNameQuestionWidget"
|
cmsWidgetName="ApartmentNumberOrBusinessNameQuestionWidget"
|
||||||
v-model="addressModel.apartmentNumberOrBusinessName"
|
v-model="addressModel.apartmentNumberOrBusinessName"
|
||||||
ref="apartmentNumberOrBusinessName" />
|
ref="apartmentNumberOrBusinessName"
|
||||||
|
:labelBold="labelBold" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
@ -40,7 +42,8 @@
|
||||||
v-model="addressModel.city"
|
v-model="addressModel.city"
|
||||||
ref="city"
|
ref="city"
|
||||||
validationRules="city-required"
|
validationRules="city-required"
|
||||||
autocomplete="address-level2" />
|
autocomplete="address-level2"
|
||||||
|
:labelBold="labelBold" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
@ -54,7 +57,8 @@
|
||||||
ref="state"
|
ref="state"
|
||||||
:options="stateOptions"
|
:options="stateOptions"
|
||||||
validationRules="state-required"
|
validationRules="state-required"
|
||||||
autocomplete="address-level1" />
|
autocomplete="address-level1"
|
||||||
|
:labelBold="labelBold" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
|
|
@ -64,7 +68,8 @@
|
||||||
ref="zipCode"
|
ref="zipCode"
|
||||||
mask="#####"
|
mask="#####"
|
||||||
validationRules="zip-code-required|zip-code-format"
|
validationRules="zip-code-required|zip-code-format"
|
||||||
autocomplete="postal-code" />
|
autocomplete="postal-code"
|
||||||
|
:labelBold="labelBold" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
@ -124,6 +129,11 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
labelBold: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
v-model="selectedValue"
|
v-model="selectedValue"
|
||||||
:suppressError="suppressError"
|
:suppressError="suppressError"
|
||||||
:validationRules="validationRules"
|
:validationRules="validationRules"
|
||||||
isRequired />
|
isRequired
|
||||||
|
:labelBold="labelBold" />
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -34,6 +35,11 @@ export default {
|
||||||
isServiceableInshop: Boolean,
|
isServiceableInshop: Boolean,
|
||||||
isServiceableDropoff: Boolean,
|
isServiceableDropoff: Boolean,
|
||||||
mobileFeeApplies: Boolean,
|
mobileFeeApplies: Boolean,
|
||||||
|
labelBold: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
zipCode: String,
|
zipCode: String,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
|
|
@ -189,41 +189,7 @@ describe("mobile-location-modal-questions.vue", () => {
|
||||||
expect(wrapper.vm.internalModel.serviceZipCode).toEqual("55555");
|
expect(wrapper.vm.internalModel.serviceZipCode).toEqual("55555");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should open the modal when the 'Enter your service address' link is clicked", async () => {
|
it("Should emit setMobileLocation on setMobileLocation for a valid address and vehicle protection answer", async () => {
|
||||||
// Arrange
|
|
||||||
const mobileLocationQuestions = {
|
|
||||||
addressQuestions: {
|
|
||||||
streetAddress: "555 Some St",
|
|
||||||
apartmentNumberOrBusinessName: "Apt 1",
|
|
||||||
city: "Funkytown",
|
|
||||||
state: "OH",
|
|
||||||
zipCode: "55555",
|
|
||||||
},
|
|
||||||
isVehicleProtected: true,
|
|
||||||
serviceZipCode: "55555",
|
|
||||||
};
|
|
||||||
|
|
||||||
const { wrapper } = setupMocks({
|
|
||||||
mixins: [mockMixin],
|
|
||||||
props: {
|
|
||||||
modelValue: mobileLocationQuestions,
|
|
||||||
},
|
|
||||||
mountOptions: {
|
|
||||||
attachTo: document.body,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
wrapper.vm.$refs.MobileLocationModalWidget.openModal = jest.fn();
|
|
||||||
const mobileLocationLink = wrapper.findComponent({ ref: "mobileLocationLink" });
|
|
||||||
|
|
||||||
// // Act
|
|
||||||
await mobileLocationLink.trigger("click-event");
|
|
||||||
|
|
||||||
// // Assert
|
|
||||||
expect(wrapper.vm.$refs.MobileLocationModalWidget.openModal).toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("Should emit setMobileLocationAndProceed on setMobileLocation for a valid address and vehicle protection answer", async () => {
|
|
||||||
// Arrange
|
// Arrange
|
||||||
const mobileLocationQuestions = {
|
const mobileLocationQuestions = {
|
||||||
addressQuestions: {
|
addressQuestions: {
|
||||||
|
|
@ -258,7 +224,6 @@ describe("mobile-location-modal-questions.vue", () => {
|
||||||
},
|
},
|
||||||
attachTo: document.body,
|
attachTo: document.body,
|
||||||
});
|
});
|
||||||
wrapper.vm.$refs.MobileLocationModalWidget.closeModal = jest.fn();
|
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
wrapper.vm.internalModel = newMobileLocationQuestions;
|
wrapper.vm.internalModel = newMobileLocationQuestions;
|
||||||
|
|
@ -266,13 +231,13 @@ describe("mobile-location-modal-questions.vue", () => {
|
||||||
await wrapper.vm.setMobileLocation();
|
await wrapper.vm.setMobileLocation();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.emitted()["setMobileLocationAndProceed"]).toBeTruthy();
|
expect(wrapper.emitted()["setMobileLocation"]).toBeTruthy();
|
||||||
expect(wrapper.emitted()["setMobileLocationAndProceed"][0][0]).toStrictEqual(
|
expect(wrapper.emitted()["setMobileLocation"][0][0]).toStrictEqual(
|
||||||
newMobileLocationQuestions
|
newMobileLocationQuestions
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should not emit setMobileLocationAndProceed on setMobileLocation for an invalid address zip code", async () => {
|
it("Should not emit setMobileLocation on setMobileLocation for an invalid address zip code", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const mobileLocationQuestions = {
|
const mobileLocationQuestions = {
|
||||||
addressQuestions: {
|
addressQuestions: {
|
||||||
|
|
@ -307,15 +272,13 @@ describe("mobile-location-modal-questions.vue", () => {
|
||||||
},
|
},
|
||||||
attachTo: document.body,
|
attachTo: document.body,
|
||||||
});
|
});
|
||||||
wrapper.vm.$refs.MobileLocationModalWidget.closeModal = jest.fn();
|
|
||||||
wrapper.vm.resetModalButtonStyle = jest.fn();
|
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
wrapper.vm.internalModel = newMobileLocationQuestions;
|
wrapper.vm.internalModel = newMobileLocationQuestions;
|
||||||
await wrapper.vm.setMobileLocation();
|
await wrapper.vm.setMobileLocation();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.emitted("setMobileLocationAndProceed")).not.toBeTruthy();
|
expect(wrapper.emitted("setMobileLocation")).not.toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should display invalid zip alert for invalid address zip inputs", async () => {
|
it("Should display invalid zip alert for invalid address zip inputs", async () => {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
|
<transition name="fade" mode="out-in">
|
||||||
<div class="mobile-location-questions">
|
<div class="mobile-location-questions">
|
||||||
<div class="text-center" :id="componentId">
|
<div class="text-center" :id="componentId">
|
||||||
<label
|
<label
|
||||||
|
|
@ -13,7 +14,7 @@
|
||||||
linkType="text"
|
linkType="text"
|
||||||
:text="mobileLocationLinkText"
|
:text="mobileLocationLinkText"
|
||||||
href="#!"
|
href="#!"
|
||||||
@click-event="openModal" />
|
@click-event="toggleMobileLocation" />
|
||||||
</div>
|
</div>
|
||||||
<div v-show="errorMessage" class="row my-1 form-test-error">
|
<div v-show="errorMessage" class="row my-1 form-test-error">
|
||||||
<span
|
<span
|
||||||
|
|
@ -29,24 +30,19 @@
|
||||||
cmsWidgetName="MobileFeeDisclaimerWidget"
|
cmsWidgetName="MobileFeeDisclaimerWidget"
|
||||||
typeStyle="caption" />
|
typeStyle="caption" />
|
||||||
</div>
|
</div>
|
||||||
<modal
|
<div v-if="isMobileLocationOpened" class="address-questions-container">
|
||||||
:ref="modalName"
|
<div v-html="headerText" class="HeaderText" />
|
||||||
:headerText="modalHeaderText"
|
|
||||||
:footerButtonText="modalFooterText"
|
|
||||||
:onModalOpenedCallback="onModalOpened"
|
|
||||||
:onModalClosedCallback="onModalClosed"
|
|
||||||
@isModalOpened="setModalStatus"
|
|
||||||
@footer-button-event="setMobileLocation">
|
|
||||||
<template v-if="isModalOpened">
|
|
||||||
<addressQuestions
|
<addressQuestions
|
||||||
ref="addressQuestions"
|
ref="addressQuestions"
|
||||||
v-model="internalModel.addressQuestions"
|
v-model="internalModel.addressQuestions"
|
||||||
captureApartmentNumberOrBusinessName="true"
|
captureApartmentNumberOrBusinessName="true"
|
||||||
preserveCityAndStateOnReset="true" />
|
preserveCityAndStateOnReset="true"
|
||||||
|
labelBold="true" />
|
||||||
<vehicleProtectedQuestion
|
<vehicleProtectedQuestion
|
||||||
ref="vehicleProtectedQuestion"
|
ref="vehicleProtectedQuestion"
|
||||||
v-model="internalModel.isVehicleProtected"
|
v-model="internalModel.isVehicleProtected"
|
||||||
cmsWidgetName="VehicleProtectedQuestionWidget" />
|
cmsWidgetName="VehicleProtectedQuestionWidget"
|
||||||
|
labelBold="true" />
|
||||||
<textBlock cmsWidgetName="WorkspaceRequirementsWidget" typeStyle="caption" />
|
<textBlock cmsWidgetName="WorkspaceRequirementsWidget" typeStyle="caption" />
|
||||||
<alert
|
<alert
|
||||||
ref="alertInvalidZip"
|
ref="alertInvalidZip"
|
||||||
|
|
@ -62,16 +58,14 @@
|
||||||
cmsWidgetName="AlertMismatchStateAndZipWidget"
|
cmsWidgetName="AlertMismatchStateAndZipWidget"
|
||||||
alertClass="alert-danger"
|
alertClass="alert-danger"
|
||||||
v-bind:isDismissible="false" />
|
v-bind:isDismissible="false" />
|
||||||
</template>
|
|
||||||
</modal>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Components
|
// Components
|
||||||
import textLink from "@/ux-components/text-link/text-link";
|
import textLink from "@/ux-components/text-link/text-link";
|
||||||
import textBlock from "@/digital-components/text-block/text-block";
|
import textBlock from "@/digital-components/text-block/text-block";
|
||||||
import modal from "@/digital-components/modal/modal";
|
|
||||||
import alert from "@/ux-components/alert/alert";
|
import alert from "@/ux-components/alert/alert";
|
||||||
import addressQuestions from "@/fmg-components/address-questions/address-questions";
|
import addressQuestions from "@/fmg-components/address-questions/address-questions";
|
||||||
import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question";
|
import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question";
|
||||||
|
|
@ -96,14 +90,14 @@ export default {
|
||||||
"updated-mobile-fee-part",
|
"updated-mobile-fee-part",
|
||||||
"updated-contains-military-base",
|
"updated-contains-military-base",
|
||||||
"updated-bill-to-account-number",
|
"updated-bill-to-account-number",
|
||||||
"setMobileLocationAndProceed",
|
"setMobileLocation",
|
||||||
"updated-modal-opened",
|
"set-mobile-location-invalid",
|
||||||
],
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
internalModel: deepClone(this.modelValue),
|
internalModel: deepClone(this.modelValue),
|
||||||
displayInvalidZipAlert: false,
|
displayInvalidZipAlert: false,
|
||||||
isModalOpened: false,
|
isMobileLocationOpened: false,
|
||||||
displayMismatchStateAndZipAlert: false,
|
displayMismatchStateAndZipAlert: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -189,23 +183,29 @@ export default {
|
||||||
this.mobileFeePart.kitPrice
|
this.mobileFeePart.kitPrice
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
modalName() {
|
headerText() {
|
||||||
return "MobileLocationModalWidget";
|
|
||||||
},
|
|
||||||
modalHeaderText() {
|
|
||||||
return this.getCmsContent(this.modalWidgetName, "HeaderText");
|
return this.getCmsContent(this.modalWidgetName, "HeaderText");
|
||||||
},
|
},
|
||||||
modalFooterText() {
|
|
||||||
return this.getCmsContent(this.modalWidgetName, "FooterText");
|
|
||||||
},
|
|
||||||
modal() {
|
|
||||||
return this.$refs[this.modalName];
|
|
||||||
},
|
|
||||||
addressModel: {
|
addressModel: {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this.modelValue.addressQuestions;
|
return this.modelValue.addressQuestions;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
isMobileAddressAvailable: {
|
||||||
|
get: function () {
|
||||||
|
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
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
isMobileAddressComplete() {
|
isMobileAddressComplete() {
|
||||||
|
|
@ -221,25 +221,14 @@ export default {
|
||||||
this.internalModel.isVehicleProtected !== null
|
this.internalModel.isVehicleProtected !== null
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
openModal() {
|
getIsMobleLocationOpened() {
|
||||||
this.modal.openModal();
|
if (this.isServiceAddressFromStoreAvailable) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
onModalOpened() {
|
setMobileLocationInvalid(isFormInvalid) {
|
||||||
this.internalModel = deepClone(this.modelValue);
|
this.$emit("set-mobile-location-invalid", isFormInvalid);
|
||||||
},
|
|
||||||
setModalStatus(isOpened) {
|
|
||||||
this.isModalOpened = isOpened;
|
|
||||||
this.$emit("updated-modal-opened", isOpened);
|
|
||||||
},
|
|
||||||
closeModal() {
|
|
||||||
this.modal.closeModal();
|
|
||||||
},
|
|
||||||
onModalClosed() {
|
|
||||||
this.resetAlerts();
|
|
||||||
this.internalModel = deepClone(this.modelValue);
|
|
||||||
},
|
|
||||||
resetModalButtonStyle() {
|
|
||||||
this.modal.resetButtonStyle();
|
|
||||||
},
|
},
|
||||||
resetAlerts() {
|
resetAlerts() {
|
||||||
this.displayInvalidZipAlert = false;
|
this.displayInvalidZipAlert = false;
|
||||||
|
|
@ -248,6 +237,10 @@ export default {
|
||||||
async setMobileLocation() {
|
async setMobileLocation() {
|
||||||
this.resetAlerts();
|
this.resetAlerts();
|
||||||
// Validate the Zip Code
|
// Validate the Zip Code
|
||||||
|
if (this.internalModel.addressQuestions.zipCode === "") {
|
||||||
|
this.setMobileLocationInvalid(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
const zipCodeData = await this.getZipCodeData(
|
const zipCodeData = await this.getZipCodeData(
|
||||||
this.internalModel.addressQuestions.zipCode,
|
this.internalModel.addressQuestions.zipCode,
|
||||||
"service-location"
|
"service-location"
|
||||||
|
|
@ -255,11 +248,11 @@ export default {
|
||||||
|
|
||||||
if (!zipCodeData.isValid) {
|
if (!zipCodeData.isValid) {
|
||||||
this.displayInvalidZipAlert = true;
|
this.displayInvalidZipAlert = true;
|
||||||
this.resetModalButtonStyle();
|
this.setMobileLocationInvalid(true);
|
||||||
return;
|
return;
|
||||||
} else if (zipCodeData.state != this.internalModel.addressQuestions.state) {
|
} else if (zipCodeData.state != this.internalModel.addressQuestions.state) {
|
||||||
this.displayMismatchStateAndZipAlert = true;
|
this.displayMismatchStateAndZipAlert = true;
|
||||||
this.resetModalButtonStyle();
|
this.setMobileLocationInvalid(true);
|
||||||
return;
|
return;
|
||||||
} else if (
|
} else if (
|
||||||
this.internalModel.addressQuestions.zipCode !==
|
this.internalModel.addressQuestions.zipCode !==
|
||||||
|
|
@ -298,10 +291,21 @@ export default {
|
||||||
this.$emit("updated-bill-to-account-number", billToAccountNumber);
|
this.$emit("updated-bill-to-account-number", billToAccountNumber);
|
||||||
}
|
}
|
||||||
// update the page level model
|
// update the page level model
|
||||||
this.$emit("setMobileLocationAndProceed", this.internalModel);
|
this.$emit("setMobileLocation", this.internalModel);
|
||||||
|
this.setMobileLocationInvalid(false);
|
||||||
|
},
|
||||||
|
toggleMobileLocation() {
|
||||||
|
this.isMobileLocationOpened = !this.isMobileLocationOpened;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
internalModel: {
|
||||||
|
handler() {
|
||||||
|
this.setMobileLocation();
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
|
|
||||||
modelValue: {
|
modelValue: {
|
||||||
handler(newValue) {
|
handler(newValue) {
|
||||||
this.internalModel = deepClone(newValue);
|
this.internalModel = deepClone(newValue);
|
||||||
|
|
@ -310,15 +314,11 @@ export default {
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
unmounted() {
|
|
||||||
if (this.isModalOpened) this.closeModal();
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
textLink,
|
|
||||||
modal,
|
|
||||||
addressQuestions,
|
addressQuestions,
|
||||||
vehicleProtectedQuestion,
|
vehicleProtectedQuestion,
|
||||||
textBlock,
|
textBlock,
|
||||||
|
textLink,
|
||||||
alert,
|
alert,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
@ -329,7 +329,6 @@ export default {
|
||||||
.center-error-message {
|
.center-error-message {
|
||||||
justify-content: center !important;
|
justify-content: center !important;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.update-zip-text-link::before {
|
.update-zip-text-link::before {
|
||||||
content: "";
|
content: "";
|
||||||
|
|
@ -342,15 +341,22 @@ export default {
|
||||||
margin-right: 0.5em;
|
margin-right: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-questions {
|
|
||||||
margin-top: 0em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-mobile-location-text-link {
|
.update-mobile-location-text-link {
|
||||||
white-space: pre-line;
|
white-space: pre-line;
|
||||||
}
|
}
|
||||||
|
.address-questions-container {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
.text-black {
|
.text-black {
|
||||||
color: $black;
|
color: $black;
|
||||||
}
|
}
|
||||||
|
.HeaderText {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.625rem;
|
||||||
|
color: $black;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@
|
||||||
textPosition="text-center"
|
textPosition="text-center"
|
||||||
v-model="selectedValue"
|
v-model="selectedValue"
|
||||||
validationRules="option-required"
|
validationRules="option-required"
|
||||||
isRequired />
|
isRequired
|
||||||
|
:labelBold="labelBold" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -27,6 +28,11 @@ export default {
|
||||||
isVehicleProtected: Boolean,
|
isVehicleProtected: Boolean,
|
||||||
},
|
},
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
|
labelBold: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
buttonQuestion,
|
buttonQuestion,
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,6 @@ describe("service-location.vue", () => {
|
||||||
zipCode: "43054",
|
zipCode: "43054",
|
||||||
},
|
},
|
||||||
isVehicleProtected: true,
|
isVehicleProtected: true,
|
||||||
isMobileSelectedAndModalClosed: true,
|
|
||||||
};
|
};
|
||||||
wrapper.vm.mobileLocationQuestions = mobileLocationQuestions;
|
wrapper.vm.mobileLocationQuestions = mobileLocationQuestions;
|
||||||
|
|
||||||
|
|
@ -356,7 +355,6 @@ describe("service-location.vue", () => {
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
},
|
},
|
||||||
isVehicleProtected: null,
|
isVehicleProtected: null,
|
||||||
isMobileSelectedAndModalClosed: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
@ -459,7 +457,6 @@ describe("service-location.vue", () => {
|
||||||
zipCode: "",
|
zipCode: "",
|
||||||
},
|
},
|
||||||
isVehicleProtected: null,
|
isVehicleProtected: null,
|
||||||
isMobileSelectedAndModalClosed: false,
|
|
||||||
};
|
};
|
||||||
wrapper.vm.mobileLocationQuestions = mobileLocationQuestions;
|
wrapper.vm.mobileLocationQuestions = mobileLocationQuestions;
|
||||||
const newMobileLocationQuestions = {
|
const newMobileLocationQuestions = {
|
||||||
|
|
@ -471,15 +468,14 @@ describe("service-location.vue", () => {
|
||||||
zipCode: "43054",
|
zipCode: "43054",
|
||||||
},
|
},
|
||||||
isVehicleProtected: true,
|
isVehicleProtected: true,
|
||||||
isMobileSelectedAndModalClosed: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
wrapper.vm.closeModalAction = jest.fn();
|
//wrapper.vm.closeModalAction = jest.fn();
|
||||||
// Act
|
// Act
|
||||||
|
|
||||||
// Trigger the event
|
// Trigger the event
|
||||||
await mobileLocationQuestionsComponent.vm.$emit(
|
await mobileLocationQuestionsComponent.vm.$emit(
|
||||||
"setMobileLocationAndProceed",
|
"setMobileLocation",
|
||||||
newMobileLocationQuestions
|
newMobileLocationQuestions
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -556,7 +552,7 @@ describe("service-location.vue", () => {
|
||||||
|
|
||||||
// Trigger the event
|
// Trigger the event
|
||||||
await mobileLocationQuestionsComponent.vm.$emit(
|
await mobileLocationQuestionsComponent.vm.$emit(
|
||||||
"setMobileLocationAndProceed",
|
"setMobileLocation",
|
||||||
newMobileLocationQuestions
|
newMobileLocationQuestions
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -604,10 +600,7 @@ describe("service-location.vue", () => {
|
||||||
|
|
||||||
wrapper.vm.closeModalAction = jest.fn();
|
wrapper.vm.closeModalAction = jest.fn();
|
||||||
// Act
|
// Act
|
||||||
mobileLocationQuestionsComponent.vm.$emit(
|
mobileLocationQuestionsComponent.vm.$emit("setMobileLocation", mobileLocationQuestions);
|
||||||
"setMobileLocationAndProceed",
|
|
||||||
mobileLocationQuestions
|
|
||||||
);
|
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.vm.selectedAppointmentType).toStrictEqual("Mobile");
|
expect(wrapper.vm.selectedAppointmentType).toStrictEqual("Mobile");
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,8 @@
|
||||||
ref="appointmentTypeQuestion"
|
ref="appointmentTypeQuestion"
|
||||||
groupName="appointmentTypeQuestion"
|
groupName="appointmentTypeQuestion"
|
||||||
cmsWidgetName="AppointmentTypeQuestionWidget"
|
cmsWidgetName="AppointmentTypeQuestionWidget"
|
||||||
validationRules="option-required" />
|
validationRules="option-required"
|
||||||
|
labelBold="true" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
|
|
@ -99,12 +100,12 @@
|
||||||
@updated-serviceability="setServiceabilityDetails"
|
@updated-serviceability="setServiceabilityDetails"
|
||||||
@updated-contains-military-base="setContainsMilitaryBase"
|
@updated-contains-military-base="setContainsMilitaryBase"
|
||||||
@updated-mobile-ctu="setCtuForMobile"
|
@updated-mobile-ctu="setCtuForMobile"
|
||||||
@updated-modal-opened="setMobileLocationModalOpened"
|
|
||||||
validationRules="mobile-location-required"
|
validationRules="mobile-location-required"
|
||||||
ref="mobileLocationQuestions"
|
ref="mobileLocationQuestions"
|
||||||
linkWidgetName="MobileLocationLinkWidget"
|
linkWidgetName="MobileLocationLinkWidget"
|
||||||
modalWidgetName="MobileLocationModalWidget"
|
modalWidgetName="MobileLocationModalWidget"
|
||||||
@setMobileLocationAndProceed="setMobileLocationQuestions" />
|
@setMobileLocation="setMobileLocationQuestions"
|
||||||
|
@set-mobile-location-invalid="setMobileLocationInValid" />
|
||||||
|
|
||||||
<shopQuestion
|
<shopQuestion
|
||||||
ref="shopQuestion"
|
ref="shopQuestion"
|
||||||
|
|
@ -113,17 +114,14 @@
|
||||||
:selectedAppointmentType="selectedAppointmentType"
|
:selectedAppointmentType="selectedAppointmentType"
|
||||||
:shopProviderData="shopProviderData"
|
:shopProviderData="shopProviderData"
|
||||||
:isDisplayed="isShopQuestionDisplayed"
|
:isDisplayed="isShopQuestionDisplayed"
|
||||||
cmsWidgetName="ShopQuestionWidget"
|
cmsWidgetName="ShopQuestionWidget" />
|
||||||
:isInshopOnly="isInshopOnly" />
|
|
||||||
|
|
||||||
<contentGroupModal ref="RecalModal" cmsWidgetName="RecalModal" />
|
<contentGroupModal ref="RecalModal" cmsWidgetName="RecalModal" />
|
||||||
|
|
||||||
<navbar
|
<navbar
|
||||||
cmsWidgetName="FunnelFooterWidget"
|
cmsWidgetName="FunnelFooterWidget"
|
||||||
ref="navbar"
|
ref="navbar"
|
||||||
:isForwardActionDisabled="
|
:isForwardActionDisabled="!meta.valid || isForwardActionDisabled"
|
||||||
!meta.valid || displayNoShopsAlert || mobileLocationModalOpened
|
|
||||||
"
|
|
||||||
@back-clicked="backButtonAction"
|
@back-clicked="backButtonAction"
|
||||||
@ForwardClicked="forwardButtonAction" />
|
@ForwardClicked="forwardButtonAction" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -177,12 +175,12 @@ const MOBILE_FEE_PART_TYPE = "MOBILE FEE";
|
||||||
// DEFINE VALIDATION RULES
|
// DEFINE VALIDATION RULES
|
||||||
defineRule("mobile-location-required", (value) => {
|
defineRule("mobile-location-required", (value) => {
|
||||||
if (
|
if (
|
||||||
value.isMobileSelectedAndModalClosed &&
|
|
||||||
(!value.addressQuestions.streetAddress ||
|
(!value.addressQuestions.streetAddress ||
|
||||||
!value.addressQuestions.city ||
|
!value.addressQuestions.city ||
|
||||||
!value.addressQuestions.state ||
|
!value.addressQuestions.state ||
|
||||||
!value.addressQuestions.zipCode ||
|
!value.addressQuestions.zipCode ||
|
||||||
!value.isVehicleProtected)
|
!value.isVehicleProtected) &&
|
||||||
|
value.isMobileSelected
|
||||||
) {
|
) {
|
||||||
return errorMessages.MOBILE_LOCATION_REQUIRED;
|
return errorMessages.MOBILE_LOCATION_REQUIRED;
|
||||||
}
|
}
|
||||||
|
|
@ -216,7 +214,7 @@ export default {
|
||||||
billToAccountNumber: null,
|
billToAccountNumber: null,
|
||||||
shopProviderData: null,
|
shopProviderData: null,
|
||||||
navigatingForward: false,
|
navigatingForward: false,
|
||||||
mobileLocationModalOpened: false,
|
isMobileAddressValid: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
|
|
@ -307,9 +305,6 @@ export default {
|
||||||
zipCode: this.zipCode,
|
zipCode: this.zipCode,
|
||||||
},
|
},
|
||||||
isVehicleProtected: this.isVehicleProtected,
|
isVehicleProtected: this.isVehicleProtected,
|
||||||
isMobileSelectedAndModalClosed:
|
|
||||||
this.selectedAppointmentType === "Mobile" &&
|
|
||||||
!this.mobileLocationModalOpened,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -423,10 +418,8 @@ export default {
|
||||||
isNoComp() {
|
isNoComp() {
|
||||||
return store.getters.order.policy.isNoComp;
|
return store.getters.order.policy.isNoComp;
|
||||||
},
|
},
|
||||||
isInshopOnly() {
|
isForwardActionDisabled() {
|
||||||
return (
|
return this.displayNoShopsAlert || !this.isMobileAddressValid;
|
||||||
this.isServiceableInshop && !this.isServiceableMobile && !this.isServiceableDropoff
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -515,9 +508,6 @@ export default {
|
||||||
setRecycleFeePart(recycleFeePart) {
|
setRecycleFeePart(recycleFeePart) {
|
||||||
this.recycleFeePart = recycleFeePart;
|
this.recycleFeePart = recycleFeePart;
|
||||||
},
|
},
|
||||||
setMobileLocationModalOpened(isModalOpened) {
|
|
||||||
this.mobileLocationModalOpened = isModalOpened;
|
|
||||||
},
|
|
||||||
//creating async function as the computed property can not directly handle asynchronous operations or promises.
|
//creating async function as the computed property can not directly handle asynchronous operations or promises.
|
||||||
async setMobileLocationQuestions(newValue) {
|
async setMobileLocationQuestions(newValue) {
|
||||||
var newZipCode = newValue.addressQuestions.zipCode;
|
var newZipCode = newValue.addressQuestions.zipCode;
|
||||||
|
|
@ -533,10 +523,7 @@ export default {
|
||||||
}
|
}
|
||||||
if (this.isServiceableMobile) {
|
if (this.isServiceableMobile) {
|
||||||
this.setMobileLocation(newValue);
|
this.setMobileLocation(newValue);
|
||||||
//proceed to next page
|
|
||||||
this.forwardButtonAction();
|
|
||||||
} else {
|
} else {
|
||||||
this.closeModalAction("mobileLocationQuestions");
|
|
||||||
await getZipCodeData(newZipCode).then((zipCodeData) => {
|
await getZipCodeData(newZipCode).then((zipCodeData) => {
|
||||||
this.serviceZipCodeQuestion = {
|
this.serviceZipCodeQuestion = {
|
||||||
state: zipCodeData.state,
|
state: zipCodeData.state,
|
||||||
|
|
@ -704,7 +691,7 @@ export default {
|
||||||
},
|
},
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
this.navigatingForward = true;
|
this.navigatingForward = true;
|
||||||
|
var ctu = this.zipCodeCtu;
|
||||||
if (
|
if (
|
||||||
this.selectedAppointmentType == AppointmentTypeStrings.MOBILE &&
|
this.selectedAppointmentType == AppointmentTypeStrings.MOBILE &&
|
||||||
this.selectedProvider &&
|
this.selectedProvider &&
|
||||||
|
|
@ -715,18 +702,13 @@ export default {
|
||||||
this.selectedProvider.address.state = null;
|
this.selectedProvider.address.state = null;
|
||||||
this.selectedProvider.address.zipCode = null;
|
this.selectedProvider.address.zipCode = null;
|
||||||
this.selectedProvider.address.zipCodeCtu = null;
|
this.selectedProvider.address.zipCodeCtu = null;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
var ctu = this.zipCodeCtu;
|
|
||||||
if (this.selectedAppointmentType == AppointmentTypeStrings.IN_SHOP) {
|
|
||||||
// if we have a provider.zipCodeCtu that's different than the servicelocation.zipCodeCtu then they
|
// if we have a provider.zipCodeCtu that's different than the servicelocation.zipCodeCtu then they
|
||||||
// may have selected a shop in a different ctu. change the servicelocation zip/ctu if different
|
// may have selected a shop in a different ctu. change the servicelocation zip/ctu if different
|
||||||
if (this.zipCodeCtu != this.selectedProvider.address.zipCodeCtu) {
|
if (this.zipCodeCtu != this.selectedProvider.address.zipCodeCtu) {
|
||||||
ctu = this.selectedProvider.address.zipCodeCtu;
|
ctu = this.selectedProvider.address.zipCodeCtu;
|
||||||
}
|
}
|
||||||
|
this.resetMobileLocation();
|
||||||
this.city = null;
|
|
||||||
this.streetAddress = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.dispatchStoreAction(
|
await this.dispatchStoreAction(
|
||||||
|
|
@ -769,11 +751,15 @@ export default {
|
||||||
this.pageName
|
this.pageName
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
openModalAction(modalName) {
|
setMobileLocationInValid(isMobileLocationInValid) {
|
||||||
this.$refs[modalName].openModal();
|
this.isMobileAddressValid = !isMobileLocationInValid;
|
||||||
},
|
},
|
||||||
closeModalAction(modalName) {
|
displayMobileAddressQuestion(openMobileLocation) {
|
||||||
this.$refs[modalName].closeModal();
|
var mobileLocationQuestionsRef = this.$refs.mobileLocationQuestions;
|
||||||
|
var isMobileAddressComplete = mobileLocationQuestionsRef.isMobileAddressComplete;
|
||||||
|
if (isMobileAddressComplete) {
|
||||||
|
mobileLocationQuestionsRef.isMobileLocationOpened = openMobileLocation;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -786,8 +772,10 @@ export default {
|
||||||
this.selectedProvider = new Provider(
|
this.selectedProvider = new Provider(
|
||||||
this.shopProviderData.mobileProviderNumber
|
this.shopProviderData.mobileProviderNumber
|
||||||
);
|
);
|
||||||
|
this.displayMobileAddressQuestion(true);
|
||||||
} else {
|
} else {
|
||||||
this.selectedProvider = new Provider();
|
this.selectedProvider = new Provider();
|
||||||
|
this.displayMobileAddressQuestion(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -799,12 +787,10 @@ export default {
|
||||||
this.selectedProvider = new Provider(
|
this.selectedProvider = new Provider(
|
||||||
this.shopProviderData.mobileProviderNumber
|
this.shopProviderData.mobileProviderNumber
|
||||||
);
|
);
|
||||||
var mobileLocationQs = this.$refs.mobileLocationQuestions;
|
this.displayMobileAddressQuestion(true);
|
||||||
if (!mobileLocationQs.isMobileAddressComplete()) {
|
|
||||||
mobileLocationQs.openModal();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.selectedProvider = new Provider();
|
this.selectedProvider = new Provider();
|
||||||
|
this.displayMobileAddressQuestion(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,6 @@ export default {
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
validationRules: String,
|
validationRules: String,
|
||||||
isDisplayed: Boolean,
|
isDisplayed: Boolean,
|
||||||
isInshopOnly: Boolean,
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
questionText() {
|
questionText() {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<div
|
<div
|
||||||
:aria-label="buttonLabel"
|
:aria-label="buttonLabel"
|
||||||
class="button-content list-button-content d-flex flex-column justify-content-center py-3 px-4 p-md-4">
|
class="button-content list-button-content d-flex flex-column justify-content-center py-3 px-4 p-md-4">
|
||||||
<span class="m-0" :class="textPosition">
|
<span class="m-0" :class="[textPosition, labelBold ? 'span-bold' : '']">
|
||||||
{{ buttonLabel }}
|
{{ buttonLabel }}
|
||||||
</span>
|
</span>
|
||||||
<span v-if="buttonLabelSubCopy" class="m-0 small" :class="textPosition">
|
<span v-if="buttonLabelSubCopy" class="m-0 small" :class="textPosition">
|
||||||
|
|
@ -88,6 +88,9 @@ export default {
|
||||||
&:checked + .list-button-content span {
|
&:checked + .list-button-content span {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
&:checked + .list-button-content .span-bold {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
&:checked + .list-button-content span:nth-child(2) {
|
&:checked + .list-button-content span:nth-child(2) {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: $gray-600;
|
color: $gray-600;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,10 @@
|
||||||
:class="!isWide ? 'order-1' : 'ms-auto order-3'"
|
:class="!isWide ? 'order-1' : 'ms-auto order-3'"
|
||||||
:src="buttonImage"
|
:src="buttonImage"
|
||||||
:alt="altText" />
|
:alt="altText" />
|
||||||
<p v-if="!isWide" class="small order-3" :class="isMultiSelect ? 'm-0' : 'mt-2 mb-0'">
|
<p
|
||||||
|
v-if="!isWide"
|
||||||
|
class="small order-3"
|
||||||
|
:class="[isMultiSelect ? 'm-0' : 'mt-2 mb-0', labelBold ? 'p-bold' : '']">
|
||||||
{{ buttonLabel }}
|
{{ buttonLabel }}
|
||||||
</p>
|
</p>
|
||||||
<p v-if="buttonLabelSubCopy && !isWide" class="fs-7 m-0 order-4 sub-copy">
|
<p v-if="buttonLabelSubCopy && !isWide" class="fs-7 m-0 order-4 sub-copy">
|
||||||
|
|
@ -122,6 +125,9 @@ export default {
|
||||||
color: $black;
|
color: $black;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
.p-bold {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
.sub-copy {
|
.sub-copy {
|
||||||
color: $gray-600;
|
color: $gray-600;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue