coverage-statement navigation scenarios and content
This commit is contained in:
parent
af577f2445
commit
e25a37ef41
3 changed files with 133 additions and 117 deletions
|
|
@ -7,26 +7,31 @@
|
||||||
<div class="container-fluid pb-2">
|
<div class="container-fluid pb-2">
|
||||||
<div class="row px-3">
|
<div class="row px-3">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="select-car-form rounded pb-1 mt-4">
|
<div class="pb-1 mt-4">
|
||||||
<h5
|
<h5
|
||||||
v-html="coverageStatementSubHeader"
|
v-html="coverageStatementSubHeader"
|
||||||
class="d-flex justify-content-center text-black">
|
class="text-center text-black">
|
||||||
</h5>
|
</h5>
|
||||||
<div>
|
<div
|
||||||
<p class="d-flex justify-content-center">
|
v-html="explanatoryText"
|
||||||
<span v-html="secondaryText"></span>
|
class="body-text text-center mt-4">
|
||||||
<span class="text"></span>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div
|
||||||
<p class="d-flex justify-content-center secondary-text" v-if="verifiedDeductible">
|
v-html="secondaryText"
|
||||||
{{ formattedDeductible }}
|
class="text-center mt-4 fw-bold text-black">
|
||||||
</p>
|
</div>
|
||||||
<div>
|
<div
|
||||||
<p class="d-flex justify-content-center secondary-text" v-if="verifiedITAC">
|
v-if="verifiedDeductible"
|
||||||
{{ formattedServicePrice }}
|
class="d-flex justify-content-center cost">
|
||||||
</p>
|
{{ formattedDeductible }}
|
||||||
<p v-if="verifiedITAC">Your deductible is: {{ formattedDeductible }}</p>
|
<div
|
||||||
|
v-if="displayQuote"
|
||||||
|
class="d-flex justify-content-center cost" >
|
||||||
|
{{ formattedServicePrice }}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="verifiedITAC">Your deductible is:
|
||||||
|
{{ formattedDeductible }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<alert
|
<alert
|
||||||
|
|
@ -37,36 +42,26 @@
|
||||||
alertClass="alert-success"
|
alertClass="alert-success"
|
||||||
v-bind:isDismissible="false">
|
v-bind:isDismissible="false">
|
||||||
</alert>
|
</alert>
|
||||||
<p
|
|
||||||
v-html="explanatoryText"
|
|
||||||
id="explanatory">
|
|
||||||
</p>
|
|
||||||
<div
|
<div
|
||||||
v-html="nextStepsHeader"
|
v-html="nextStepsHeader"
|
||||||
class="fw-bold text-black mb-2">
|
class="fw-bold text-black mb-2">
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-html="nextStepsBody"
|
v-html="nextStepsBody"
|
||||||
id="nextStepsBody">
|
class="body-text">
|
||||||
</div>
|
|
||||||
<!-- <textBlock
|
|
||||||
cmsWidgetName="verifyingCoverageStatement"
|
|
||||||
typeStyle="h5"
|
|
||||||
justifyText="center"
|
|
||||||
class="mt-4 mb-4"
|
|
||||||
id="coverage-statement-text-block" /> -->
|
|
||||||
<!-- <div>
|
|
||||||
<p v-html="continueWithSchedulingBodyText" class="mt-0 small" ></p>
|
|
||||||
</div> -->
|
|
||||||
<!-- <textBlock
|
|
||||||
cmsWidgetName="whatHappensNextCopy"
|
|
||||||
class="mt-4 mb-2 fw-bold"
|
|
||||||
id="coverage-statement-text-block" /> -->
|
|
||||||
<div>
|
|
||||||
<!-- <p class="small" v-html="bodyText" ref="coverageStatementBodyText"></p> -->
|
|
||||||
</div>
|
</div>
|
||||||
<steeringText cmsWidgetName="MASteeringText" ></steeringText>
|
<steeringText cmsWidgetName="MASteeringText" ></steeringText>
|
||||||
|
<buttonQuestion
|
||||||
|
v-if="displayQuote"
|
||||||
|
cmsWidgetName="ServiceProviderQuestion"
|
||||||
|
:questionText="questionText"
|
||||||
|
:answers="answersFromCms"
|
||||||
|
buttonTypeString="listButton"
|
||||||
|
isRequired
|
||||||
|
v-model="selectedProvider"
|
||||||
|
validationRules="selection-required"
|
||||||
|
id="coverage-button-question">
|
||||||
|
</buttonQuestion>
|
||||||
</div>
|
</div>
|
||||||
<siteFooter
|
<siteFooter
|
||||||
class="mt-5"
|
class="mt-5"
|
||||||
|
|
@ -89,7 +84,7 @@
|
||||||
|
|
||||||
// Import Component
|
// Import Component
|
||||||
import baseFormMixin from '@/mixins/base-form-mixin';
|
import baseFormMixin from '@/mixins/base-form-mixin';
|
||||||
import { Form } from 'vee-validate';
|
import { Form, defineRule } from 'vee-validate';
|
||||||
import siteFooter from '@/iss-components/site-footer/site-footer.vue';
|
import siteFooter from '@/iss-components/site-footer/site-footer.vue';
|
||||||
import siteHeader from '@/iss-components/site-header/site-header.vue';
|
import siteHeader from '@/iss-components/site-header/site-header.vue';
|
||||||
import siteSubHeader from '@/iss-components/site-sub-header/site-sub-header.vue';
|
import siteSubHeader from '@/iss-components/site-sub-header/site-sub-header.vue';
|
||||||
|
|
@ -97,7 +92,8 @@ import textBlock from "@/digital-components/text-block/text-block";
|
||||||
import recalModal from '@/layouts/coverage-statement/recal-modal/recal-modal.vue';
|
import recalModal from '@/layouts/coverage-statement/recal-modal/recal-modal.vue';
|
||||||
import steeringText from "@/iss-components/steering-text/steering-text.vue";
|
import steeringText from "@/iss-components/steering-text/steering-text.vue";
|
||||||
import alert from "@/ux-components/alert/alert";
|
import alert from "@/ux-components/alert/alert";
|
||||||
import contentGroupModal from '@/iss-components/content-group-modal/content-group-modal';
|
import contentGroupModal from '@/iss-components/content-group-modal/content-group-modal';
|
||||||
|
import buttonQuestion from "@/digital-components/button-question/button-question";
|
||||||
|
|
||||||
// Import Supporting Files
|
// Import Supporting Files
|
||||||
import { fetchCmsContentForPage, setupModalLinks } from '@/helpers/cms-content-helper';
|
import { fetchCmsContentForPage, setupModalLinks } from '@/helpers/cms-content-helper';
|
||||||
|
|
@ -106,6 +102,11 @@ import { getDamageString } from '@/helpers/damage-helper.js';
|
||||||
import { useMainStore } from "@/store";
|
import { useMainStore } from "@/store";
|
||||||
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
|
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
|
||||||
import { processIfStatements } from '@/helpers/cms-content-helper';
|
import { processIfStatements } from '@/helpers/cms-content-helper';
|
||||||
|
import { required } from "@/helpers/validation-rules";
|
||||||
|
import { errorMessages } from "@/constants/error-messages";
|
||||||
|
|
||||||
|
// DEFINE VALIDATION RULES
|
||||||
|
defineRule("selection-required", required(errorMessages.OPTION_REQUIRED));
|
||||||
|
|
||||||
const store = useMainStore();
|
const store = useMainStore();
|
||||||
|
|
||||||
|
|
@ -167,7 +168,8 @@ export default {
|
||||||
recalModal,
|
recalModal,
|
||||||
steeringText,
|
steeringText,
|
||||||
alert,
|
alert,
|
||||||
contentGroupModal
|
contentGroupModal,
|
||||||
|
buttonQuestion
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
setupModalLinks(this);
|
setupModalLinks(this);
|
||||||
|
|
@ -179,6 +181,7 @@ export default {
|
||||||
supportingItems: [],
|
supportingItems: [],
|
||||||
pricedGlassParts: [],
|
pricedGlassParts: [],
|
||||||
availableLineItems: [],
|
availableLineItems: [],
|
||||||
|
selectedProvider: "",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -202,44 +205,6 @@ export default {
|
||||||
let body = this.getBodyTextFromCms("NextStepsWidget").replaceAll("{custom:damage}", this.damageText);
|
let body = this.getBodyTextFromCms("NextStepsWidget").replaceAll("{custom:damage}", this.damageText);
|
||||||
return body;
|
return body;
|
||||||
},
|
},
|
||||||
// coverageStatementContent() {
|
|
||||||
// if (!this.cmsWidgetName) return [];
|
|
||||||
// const cmsContent = [];
|
|
||||||
// cmsContent.push(
|
|
||||||
// {
|
|
||||||
// Name: 'SubHeader',
|
|
||||||
// cmsWidgetName: 'SiteSubHeaderWidget'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// Name: 'ExplanatoryText',
|
|
||||||
// cmsWidgetName: 'ExplanatoryTextWidget'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// Name: 'NextSteps',
|
|
||||||
// cmsWidgetName: 'NextStepsWidget'
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// //if cms content has not yet loaded, skip
|
|
||||||
// if (this.getCmsContent(cmsAnswersContent[0].cmsWidgetName, 'HeaderText') == '') {
|
|
||||||
// return {};
|
|
||||||
// }
|
|
||||||
// bodyText() {
|
|
||||||
// if (useMainStore().damage.isRepair) {
|
|
||||||
// return this.unverifiedNonADASRepairBodyText;
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// let parts = useMainStore().lineItems.glassParts;
|
|
||||||
|
|
||||||
// // if ADAS, display ADASNextSteps
|
|
||||||
// if (parts != null && parts.filter(part => part.requiresRecalibration).length > 0) {
|
|
||||||
// return this.unverifiedADASNextStepsBodyText;
|
|
||||||
// }
|
|
||||||
// // if non-ADAS, display NonADASNextSteps
|
|
||||||
// else {
|
|
||||||
// return this.unverifiedNonADASNextStepsBodyText;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
continueWithSchedulingBodyText() {
|
continueWithSchedulingBodyText() {
|
||||||
return this.getCmsContent("continueWithSchedulingCopy", "BodyText");
|
return this.getCmsContent("continueWithSchedulingCopy", "BodyText");
|
||||||
},
|
},
|
||||||
|
|
@ -256,12 +221,6 @@ export default {
|
||||||
var damageString = getDamageString();
|
var damageString = getDamageString();
|
||||||
return damageString == "match" ? "" : damageString;
|
return damageString == "match" ? "" : damageString;
|
||||||
},
|
},
|
||||||
// selectedVehiclePolicyInfo() {
|
|
||||||
// const matchingVehicle = this.policyVehicles.filter(
|
|
||||||
// (vehicle) => vehicle.vin === store.order.vehicle.vin
|
|
||||||
// )
|
|
||||||
// return matchingVehicle;
|
|
||||||
// },
|
|
||||||
vehicleDeductible() {
|
vehicleDeductible() {
|
||||||
if (this.coverageVerified) {
|
if (this.coverageVerified) {
|
||||||
if (store.order.damage.isRepair) {
|
if (store.order.damage.isRepair) {
|
||||||
|
|
@ -273,19 +232,19 @@ export default {
|
||||||
return replaceDeductible;
|
return replaceDeductible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log(this.selectedVehicle[0].coverages[0].deductible);
|
|
||||||
//const deductible = this.selectedVehiclePolicyInfo[0].coverages[0].deductible;
|
|
||||||
//console.log(!this.selectedVehiclePolicyInfo[0].coverages[0]);
|
|
||||||
//return deductible;
|
|
||||||
},
|
},
|
||||||
formattedDeductible() {
|
formattedDeductible() {
|
||||||
return this.getDeductibleString(this.vehicleDeductible);
|
return this.getDeductibleString(this.vehicleDeductible);
|
||||||
},
|
},
|
||||||
isDeductibleZero() {
|
isDeductibleZero() {
|
||||||
return this.vehicleDeductible === 0;
|
if (this.coverageVerified && !this.verifiedNoComp) {
|
||||||
|
return this.vehicleDeductible === 0;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deductibleOverZero() {
|
deductibleOverZero() {
|
||||||
return this.vehicleDeductible > 0;
|
if (this.coverageVerified && !this.verifiedNoComp) {
|
||||||
|
return !this.isDeductibleZero;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
coverageVerified() {
|
coverageVerified() {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -301,14 +260,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
verifiedITAC() {
|
verifiedITAC() {
|
||||||
if (this.coverageVerified) {
|
if (this.coverageVerified && !this.verifiedNoComp) {
|
||||||
if (this.vehicleDeductible > this.totalServicePrice) {
|
if (this.vehicleDeductible > this.totalServicePrice) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
verifiedDeductible() {
|
verifiedDeductible() {
|
||||||
if (this.coverageVerified) {
|
if (this.coverageVerified && !this.verifiedNoComp) {
|
||||||
if (this.totalServicePrice > this.vehicleDeductible) {
|
if (this.totalServicePrice > this.vehicleDeductible) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -344,9 +303,19 @@ export default {
|
||||||
return this.getServicePriceString(this.totalServicePrice);
|
return this.getServicePriceString(this.totalServicePrice);
|
||||||
},
|
},
|
||||||
costSavings() {
|
costSavings() {
|
||||||
|
|
||||||
return this.getITACCostSavings(this.vehicleDeductible, this.totalServicePrice);
|
return this.getITACCostSavings(this.vehicleDeductible, this.totalServicePrice);
|
||||||
|
|
||||||
|
},
|
||||||
|
questionText() {
|
||||||
|
return this.getCmsContent("ServiceProviderQuestion", "QuestionText");
|
||||||
|
},
|
||||||
|
answersFromCms() {
|
||||||
|
return this.getCmsContent("ServiceProviderQuestion", "Answers");
|
||||||
|
},
|
||||||
|
displayQuote() {
|
||||||
|
if (this.verifiedITAC || this.verifiedNoComp) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -356,6 +325,35 @@ export default {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
async forwardButtonAction() {
|
||||||
|
return await this.navigateForward();
|
||||||
|
|
||||||
|
},
|
||||||
|
async navigateForward() {
|
||||||
|
if (this.coverageUnverified || this.verifiedDeductible) {
|
||||||
|
this.$router.navigate(
|
||||||
|
this.navigationScenarios.CLICKED_FORWARD,
|
||||||
|
this.$route
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else if (this.verifiedITAC || this.verifiedNoComp) {
|
||||||
|
if (this.selectedProvider === "Safelite") {
|
||||||
|
this.$router.navigate(
|
||||||
|
this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE,
|
||||||
|
this.$route
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else if (store.issConfig.enableTPAFlow){
|
||||||
|
this.$router.navigate(
|
||||||
|
this.navigationScenarios.CLICKED_FORWARD_WITH_THIRD_PARTY,
|
||||||
|
this.$route
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//display TPA bailout modal
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
openModalAction(modalName) {
|
openModalAction(modalName) {
|
||||||
this.$refs[modalName.args].openModal();
|
this.$refs[modalName.args].openModal();
|
||||||
},
|
},
|
||||||
|
|
@ -396,6 +394,10 @@ export default {
|
||||||
return this.nonADASReplace;
|
return this.nonADASReplace;
|
||||||
case 'nonADASRepair':
|
case 'nonADASRepair':
|
||||||
return this.nonADASRepair;
|
return this.nonADASRepair;
|
||||||
|
case 'deductibleOverZero':
|
||||||
|
return this.deductibleOverZero
|
||||||
|
case 'isDeductibleZero':
|
||||||
|
return this.isDeductibleZero
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -404,8 +406,6 @@ export default {
|
||||||
return lineItem.kitPrice + lineItem.laborAmount + lineItem.sellingPrice;
|
return lineItem.kitPrice + lineItem.laborAmount + lineItem.sellingPrice;
|
||||||
},
|
},
|
||||||
getDeductibleString(deductible) {
|
getDeductibleString(deductible) {
|
||||||
console.log(this.vehicleDeductible);
|
|
||||||
console.log(this.deductibleOverZero);
|
|
||||||
const formattedDeductibleFloat = parseFloat(deductible).toFixed(2);
|
const formattedDeductibleFloat = parseFloat(deductible).toFixed(2);
|
||||||
return '$' + formattedDeductibleFloat;
|
return '$' + formattedDeductibleFloat;
|
||||||
},
|
},
|
||||||
|
|
@ -418,38 +418,44 @@ export default {
|
||||||
return savings;
|
return savings;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
selectedProvider() {
|
||||||
|
if (this.selectedProvider === "Safelite") {
|
||||||
|
this.$refs.siteFooter.updateButtonText('Continue with Safelite');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.$refs.siteFooter.updateButtonText('Continue');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
ol {
|
.body-text {
|
||||||
margin-left: -1rem;
|
p {
|
||||||
margin-bottom:0;
|
font-size: 14px;
|
||||||
li {
|
line-height: 24px;
|
||||||
margin-bottom: .5rem;
|
margin-bottom: 8px;
|
||||||
line-height: 1.5rem;
|
|
||||||
a {
|
|
||||||
line-height: 1.5rem;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#coverage-statement-text-block {
|
|
||||||
color: $black;
|
|
||||||
}
|
|
||||||
p strong {
|
|
||||||
color: $black;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
p.small{
|
|
||||||
margin-bottom:0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.secondary-text {
|
.cost {
|
||||||
color: $green;
|
color: $green;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
line-height: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#coverage-button-question {
|
||||||
|
.question-text {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.question-text > span {
|
||||||
|
text-align: left;
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,8 @@ const navigationScenarios = {
|
||||||
|
|
||||||
// Coverage Statement
|
// Coverage Statement
|
||||||
CLICKED_BACK_WITH_REPAIR: "CLICKED_BACK_WITH_REPAIR",
|
CLICKED_BACK_WITH_REPAIR: "CLICKED_BACK_WITH_REPAIR",
|
||||||
|
CLICKED_FORWARD_WITH_SAFELITE: "CLICKED_FORWARD_WITH_SAFELITE",
|
||||||
|
CLICKED_FORWARD_WITH_THIRD_PARTY: "CLICKED_FORWARD_WITH_THIRD_PARTY",
|
||||||
|
|
||||||
//Provider Preference
|
//Provider Preference
|
||||||
CLICKED_FORWARD_WITH_SAFELITE: "CLICKED_FORWARD_WITH_SAFELITE",
|
CLICKED_FORWARD_WITH_SAFELITE: "CLICKED_FORWARD_WITH_SAFELITE",
|
||||||
|
|
|
||||||
|
|
@ -430,6 +430,14 @@ const routingTable = function(store) {
|
||||||
scenario: navigationScenarios.CLICKED_FORWARD,
|
scenario: navigationScenarios.CLICKED_FORWARD,
|
||||||
destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE
|
destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
scenario: navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE,
|
||||||
|
destinationIssPageValue: issPageValues.SERVICE_LOCATION
|
||||||
|
},
|
||||||
|
{
|
||||||
|
scenario: navigationScenarios.CLICKED_FORWARD_WITH_THIRD_PARTY,
|
||||||
|
destinationIssPageValue: issPageValues.TPA_SEARCH
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue