Merge branch 'develop' into feature/digital/SSR-540
# Conflicts: # src/layouts/coverage-statement/coverage-statement.vue
This commit is contained in:
commit
e7d15c2135
14 changed files with 277 additions and 318 deletions
|
|
@ -121,9 +121,7 @@ export default {
|
||||||
return this.isMultiSelect ? "checkbox" : "radio";
|
return this.isMultiSelect ? "checkbox" : "radio";
|
||||||
},
|
},
|
||||||
buttonId() {
|
buttonId() {
|
||||||
return `${this.groupName?.replace(" ", "-")}-${this.value
|
return `${this.groupName}-${this.value}`.replaceAll(" ", "-");
|
||||||
?.toString()
|
|
||||||
?.replace(" ", "-")}`;
|
|
||||||
},
|
},
|
||||||
isValueSelectedOnClick() {
|
isValueSelectedOnClick() {
|
||||||
return this.isMultiSelect || this.selectingInitiatesLoad;
|
return this.isMultiSelect || this.selectingInitiatesLoad;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<div
|
<div
|
||||||
:class="getComponentWrapperClasses"
|
:class="getComponentWrapperClasses"
|
||||||
v-for="answer in buttonsInfo"
|
v-for="answer in buttonsInfo"
|
||||||
:key="answer.value ? answer.value : answer">
|
:key="answer.value ?? answer">
|
||||||
<component
|
<component
|
||||||
:is="buttonTypeString"
|
:is="buttonTypeString"
|
||||||
:buttonLabel="answer.buttonLabel"
|
:buttonLabel="answer.buttonLabel"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
@keypress.space="closeModal"
|
@keypress.space="closeModal"
|
||||||
aria-label="Close"></button>
|
aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body ps-5 pe-5 pb-4 pt-0">
|
<div class="modal-body ps-5 pe-5 pb-5 pt-0">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer px-5 py-4">
|
<div class="modal-footer px-5 py-4">
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="textbox-question" :class="(errors && errors.length) || hasError ? 'has-error' : ''">
|
<div class="textbox-question" :class="(errors && errors.length) || hasError ? 'has-error' : ''">
|
||||||
<label
|
<label
|
||||||
|
v-if="displayQuestionText"
|
||||||
:for="inputId"
|
:for="inputId"
|
||||||
:aria-label="questionText"
|
:aria-label="questionText"
|
||||||
class="form-label"
|
class="form-label"
|
||||||
|
|
@ -66,6 +67,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
displayQuestionText: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
modelValue: String,
|
modelValue: String,
|
||||||
inputId: {
|
inputId: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
:validationRules="validationRules" />
|
:validationRules="validationRules" />
|
||||||
</div>
|
</div>
|
||||||
<siteFooter
|
<siteFooter
|
||||||
class="mt-3"
|
class="mt-5"
|
||||||
ref="siteFooter"
|
ref="siteFooter"
|
||||||
cmsWidgetName="SiteFooterWidget"
|
cmsWidgetName="SiteFooterWidget"
|
||||||
:isForwardActionDisabled="!isMetaValid"
|
:isForwardActionDisabled="!isMetaValid"
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<siteFooter
|
<siteFooter
|
||||||
|
class="mt-5"
|
||||||
cmsWidgetName="SiteFooterWidget"
|
cmsWidgetName="SiteFooterWidget"
|
||||||
:isForwardActionDisabled="!meta.valid"
|
:isForwardActionDisabled="!meta.valid"
|
||||||
@backClicked="navigateBack"
|
@backClicked="navigateBack"
|
||||||
|
|
@ -81,14 +82,6 @@ export default {
|
||||||
recalModal,
|
recalModal,
|
||||||
steeringText
|
steeringText
|
||||||
},
|
},
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
isITAC: false,
|
|
||||||
deductible: "",
|
|
||||||
policyVehicles: useMainStore().pageData(issPageValues.POLICY_VEHICLES),
|
|
||||||
isVerified: useMainStore().order.payment.insuranceCoverage.isVerified,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
setupModalLinks(this);
|
setupModalLinks(this);
|
||||||
this.getPriceInfo();
|
this.getPriceInfo();
|
||||||
|
|
@ -239,55 +232,17 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
processIfStatements,
|
|
||||||
getSubheaderTextFromCms(cmsWidgetName) {
|
|
||||||
const subHeader = this.getCmsContent(cmsWidgetName, 'SubHeaderText');
|
|
||||||
return this.processIfStatements(subHeader, "custom", this.getCustomValueFromString);
|
|
||||||
},
|
|
||||||
getBodyTextFromCms(cmsWidgetName) {
|
|
||||||
const bodyText = this.getCmsContent(cmsWidgetName, "BodyText");
|
|
||||||
return this.processIfStatements(bodyText, "custom", this.getCustomValueFromString);
|
|
||||||
},
|
|
||||||
getSecondaryTextFromCms(cmsWidgetName) {
|
|
||||||
const secondaryText = this.getCmsContent(cmsWidgetName, "SecondaryText");
|
|
||||||
return this.processIfStatements(secondaryText, "custom", this.getCustomValueFromString);
|
|
||||||
},
|
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
if (useMainStore().vehicle.vin) {
|
if (useMainStore().vehicle.vin) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
getCustomValueFromString(str) {
|
|
||||||
switch (str) {
|
|
||||||
case 'coverageUnverified':
|
|
||||||
return this.coverageUnverified;
|
|
||||||
case 'verifiedDeductible':
|
|
||||||
return this.verifiedDeductible;
|
|
||||||
case 'verifiedITAC':
|
|
||||||
return this.verifiedITAC;
|
|
||||||
case 'verifiedNoComp':
|
|
||||||
return this.verifiedNoComp;
|
|
||||||
case 'ADASReplace':
|
|
||||||
return this.ADASReplace;
|
|
||||||
case 'nonADASReplace':
|
|
||||||
return this.nonADASReplace;
|
|
||||||
case 'nonADASRepair':
|
|
||||||
return this.nonADASRepair;
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getPriceInfo() {
|
|
||||||
const servicePrice = store.getPriceOrderItems();
|
|
||||||
|
|
||||||
if (servicePrice > this.vehicleDeductible) {
|
|
||||||
return this.isITAC = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
return this.navigateForward();
|
return this.navigateForward();
|
||||||
},
|
},
|
||||||
|
|
||||||
navigateForward() {
|
navigateForward() {
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
this.navigationScenarios.CLICKED_FORWARD,
|
this.navigationScenarios.CLICKED_FORWARD,
|
||||||
|
|
|
||||||
|
|
@ -193,12 +193,12 @@ export default {
|
||||||
const vehicle = await this.lookupVehicleByVin(value);
|
const vehicle = await this.lookupVehicleByVin(value);
|
||||||
|
|
||||||
// handle error in case vehicle info doesn't come back for selected VIN
|
// handle error in case vehicle info doesn't come back for selected VIN
|
||||||
if (vehicle?.error ?? true) {
|
if (vehicle?.error === true) {
|
||||||
this.mainStore.resetVehicleState();
|
this.mainStore.resetVehicleState();
|
||||||
this.displayGeneric = true;
|
this.displayGeneric = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (vehicle) {
|
||||||
// save selected vehicle to the store
|
// save selected vehicle to the store
|
||||||
this.mainStore.updateVehicle(vehicle.data);
|
this.mainStore.updateVehicle(vehicle.data);
|
||||||
this.displayGeneric = true;
|
this.displayGeneric = true;
|
||||||
|
|
@ -207,13 +207,13 @@ export default {
|
||||||
const styleOptions = await this.mainStore.getVehicleStyles(
|
const styleOptions = await this.mainStore.getVehicleStyles(
|
||||||
vehicle.data.year,
|
vehicle.data.year,
|
||||||
vehicle.data.make,
|
vehicle.data.make,
|
||||||
vehicle.data.model
|
vehicle.data.model,
|
||||||
)
|
);
|
||||||
|
|
||||||
// if there is more than 1 style for the selected vehicle, display generic/blurred image
|
// if there is more than 1 style for the selected vehicle, display generic/blurred image
|
||||||
this.displayGeneric = styleOptions?.data?.length > 1;
|
this.displayGeneric = styleOptions?.data?.length > 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
siteHeader,
|
siteHeader,
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,8 @@
|
||||||
validationRules="selection-required"
|
validationRules="selection-required"
|
||||||
class="service-location-button-question mb-1"/>
|
class="service-location-button-question mb-1"/>
|
||||||
<div class="select-car">
|
<div class="select-car">
|
||||||
<div class="container-fluid pb-2 g-0">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col px-0">
|
|
||||||
<div class="select-car-form rounded">
|
|
||||||
<siteFooter
|
<siteFooter
|
||||||
class="mt-4"
|
class="mt-5"
|
||||||
cmsWidgetName="SiteFooterWidget"
|
cmsWidgetName="SiteFooterWidget"
|
||||||
:isForwardActionDisabled="!meta.valid"
|
:isForwardActionDisabled="!meta.valid"
|
||||||
@backClicked="backButtonAction"
|
@backClicked="backButtonAction"
|
||||||
|
|
@ -51,10 +47,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Form>
|
</Form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -81,7 +73,7 @@ import serviceZipModalQuestion from '@/layouts/service-location/service-zip-moda
|
||||||
defineRule("selection-required", required(errorMessages.OPTION_REQUIRED));
|
defineRule("selection-required", required(errorMessages.OPTION_REQUIRED));
|
||||||
export default {
|
export default {
|
||||||
name: "service-location",
|
name: "service-location",
|
||||||
mixins: [baseFormMixin, baseMixin],
|
mixins: [baseFormMixin],
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
// Call APIs
|
// Call APIs
|
||||||
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
|
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
</div>
|
</div>
|
||||||
<modal
|
<modal
|
||||||
:ref="modalName"
|
:ref="modalName"
|
||||||
|
:headerText="modalHeaderText"
|
||||||
:onModalOpenedCallback="onModalOpened"
|
:onModalOpenedCallback="onModalOpened"
|
||||||
:onModalClosedCallback="onModalClosed"
|
:onModalClosedCallback="onModalClosed"
|
||||||
:footerButtonText="modalFooterText"
|
:footerButtonText="modalFooterText"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
issContainingPage="service-packages"
|
issContainingPage="service-packages"
|
||||||
/>
|
/>
|
||||||
<div class="mx-5">
|
<div class="mx-5">
|
||||||
|
|
||||||
<servicePackageQuestion ref="servicePackage"
|
<servicePackageQuestion ref="servicePackage"
|
||||||
cmsWidgetName="ServicePackage"
|
cmsWidgetName="ServicePackage"
|
||||||
groupName="ServicePackageQuestion"
|
groupName="ServicePackageQuestion"
|
||||||
|
|
@ -18,9 +17,7 @@
|
||||||
validationRules="option-required"
|
validationRules="option-required"
|
||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<p class="caption disclaimer" v-html="PriceDisclaimerText"></p>
|
<p class="caption disclaimer" v-html="PriceDisclaimerText"></p>
|
||||||
|
|
||||||
<siteFooter cmsWidgetName="SiteFooterWidget"
|
<siteFooter cmsWidgetName="SiteFooterWidget"
|
||||||
:isForwardActionDisabled="!meta.valid"
|
:isForwardActionDisabled="!meta.valid"
|
||||||
@back-clicked="backButtonAction"
|
@back-clicked="backButtonAction"
|
||||||
|
|
@ -177,7 +174,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.disclaimer {
|
.disclaimer {
|
||||||
margin-top: 1.3rem;
|
margin: 1.3rem 0 1.5rem 0;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #4D5151;
|
color: #4D5151;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
<VehicleBanner class="mt-2 mb-4" cms-widget-name="VehicleBannerWidget" :display-generic-vehicle-image="false" />
|
<VehicleBanner class="mt-2 mb-4" cms-widget-name="VehicleBannerWidget" :display-generic-vehicle-image="false" />
|
||||||
<SiteSubHeader cms-widget-name="SiteSubHeaderWidget" class="mt-5 mb-2" />
|
<SiteSubHeader cms-widget-name="SiteSubHeaderWidget" class="mt-5 mb-2" />
|
||||||
<VinLookupMethods v-model="selectedVinLookupMethod" cms-widget-name="VINLookupMethod" group-name="VinLookupMethods" ref="VinLookupMethods" />
|
<VinLookupMethods v-model="selectedVinLookupMethod" cms-widget-name="VINLookupMethod" group-name="VinLookupMethods" ref="VinLookupMethods" />
|
||||||
<SiteFooter cms-widget-name="SiteFooterWidget" :is-forward-action-disabled="isForwardActionDisabled" @back-clicked="backButtonAction" @forward-clicked="forwardButtonAction" class="mt-3"/>
|
<SiteFooter cms-widget-name="SiteFooterWidget" :is-forward-action-disabled="isForwardActionDisabled" @back-clicked="backButtonAction" @forward-clicked="forwardButtonAction" class="mt-5"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
:isWide="true"
|
:isWide="true"
|
||||||
altText=""
|
altText=""
|
||||||
isRequired
|
isRequired
|
||||||
:groupName="`${glassLocation}-${glassName}`"
|
:groupName="replaceAllSpaceWithDash(`${glassLocation}-${glassName}`)"
|
||||||
:validationRules="tintValidationRules">
|
:validationRules="tintValidationRules">
|
||||||
<div class="row my-2" aria-live="polite">
|
<div class="row my-2" aria-live="polite">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
:loaderEnabled="false"
|
:loaderEnabled="false"
|
||||||
isRequired
|
isRequired
|
||||||
isSmallQuestionText
|
isSmallQuestionText
|
||||||
:groupName="`${glassLocation}-${glassName}-${selectedTint}`"
|
:groupName="replaceAllSpaceWithDash(`${glassLocation}-${glassName}-${selectedTint}`)"
|
||||||
:validationRules="partValidationRules" />
|
:validationRules="partValidationRules" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -210,6 +210,10 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
replaceAllSpaceWithDash(str) {
|
||||||
|
return String(str).replaceAll(" ", "-");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selectedTint() {
|
selectedTint() {
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@
|
||||||
:alreadyPopulatedPartsData="alreadyPopulatedPartsData" />
|
:alreadyPopulatedPartsData="alreadyPopulatedPartsData" />
|
||||||
</div>
|
</div>
|
||||||
<siteFooter
|
<siteFooter
|
||||||
|
class="mt-5"
|
||||||
cmsWidgetName="SiteFooterWidget"
|
cmsWidgetName="SiteFooterWidget"
|
||||||
ref="siteFooter"
|
ref="siteFooter"
|
||||||
:isForwardActionDisabled="isForwardActionDisabled"
|
:isForwardActionDisabled="isForwardActionDisabled"
|
||||||
|
|
|
||||||
|
|
@ -76,20 +76,26 @@ export default {
|
||||||
value: inputValue,
|
value: inputValue,
|
||||||
handleChange,
|
handleChange,
|
||||||
errors,
|
errors,
|
||||||
|
resetField
|
||||||
} = useField(props.groupName, props.validationRules,
|
} = useField(props.groupName, props.validationRules,
|
||||||
{
|
{
|
||||||
type: inputType,
|
type: inputType
|
||||||
checkedValue: props.value,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
handleChange,
|
handleChange,
|
||||||
errors,
|
errors,
|
||||||
|
resetField
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
unmounted(){
|
||||||
|
this.resetField();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
.form-check {
|
.form-check {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue