remove outdated code
This commit is contained in:
parent
49b930cecb
commit
38254d0b46
1 changed files with 29 additions and 109 deletions
|
|
@ -56,21 +56,11 @@
|
||||||
{{ formatAmountInDollars(deductibleValue) }}
|
{{ formatAmountInDollars(deductibleValue) }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="!isReplaceZeroDeductible"
|
|
||||||
class="fw-bold text-black mt-5"
|
class="fw-bold text-black mt-5"
|
||||||
v-html="nextStepsHeader"></div>
|
v-html="nextStepsHeader"></div>
|
||||||
<div
|
<div
|
||||||
v-if="isReplaceZeroDeductible"
|
|
||||||
class="mt-4"
|
|
||||||
v-html="nextStepsSubheader"></div>
|
|
||||||
<div
|
|
||||||
v-if="isDeductibleVisible || isUnverifiedVisible"
|
|
||||||
class="body-text"
|
class="body-text"
|
||||||
v-html="nextStepsBody"></div>
|
v-html="nextStepsBody"></div>
|
||||||
<div
|
|
||||||
v-if="isITACQuoteVisible || isNoCompQuoteVisible"
|
|
||||||
class="body-text"
|
|
||||||
v-html="nextStepsBodyITACNoComp"></div>
|
|
||||||
<div
|
<div
|
||||||
v-if="isNoCompQuoteVisible"
|
v-if="isNoCompQuoteVisible"
|
||||||
class="no-comp-price-text">
|
class="no-comp-price-text">
|
||||||
|
|
@ -82,12 +72,11 @@
|
||||||
{{ formatAmountInDollars(totalServicePrice) }}
|
{{ formatAmountInDollars(totalServicePrice) }}
|
||||||
</div>
|
</div>
|
||||||
<buttonMain
|
<buttonMain
|
||||||
v-if="isNoCompQuoteVisible || isITACQuoteVisible"
|
|
||||||
ref="buttonMain"
|
ref="buttonMain"
|
||||||
class="full-width-button mt-5"
|
class="full-width-button mt-5 mb-5"
|
||||||
variant="navigation"
|
variant="navigation"
|
||||||
buttonText="Continue scheduling"
|
:buttonText="buttonText"
|
||||||
@clickEvent="continueToSchedule" />
|
@clickEvent="navigateForward" />
|
||||||
<textLink
|
<textLink
|
||||||
v-if="isNoCompQuoteVisible || isITACQuoteVisible"
|
v-if="isNoCompQuoteVisible || isITACQuoteVisible"
|
||||||
class="underlined-text cancel-link mt-5"
|
class="underlined-text cancel-link mt-5"
|
||||||
|
|
@ -100,16 +89,8 @@
|
||||||
class="mt-5 mb-5"
|
class="mt-5 mb-5"
|
||||||
:customText="disclaimerText"
|
:customText="disclaimerText"
|
||||||
typeStyle="caption" />
|
typeStyle="caption" />
|
||||||
<siteFooter
|
<div :class="getVariant + ' mb-5'">
|
||||||
v-if="isUnverifiedVisible || isDeductibleVisible"
|
|
||||||
:ref="SITE_FOOTER_REF_NAME"
|
|
||||||
class="mt-5"
|
|
||||||
cmsWidgetName="SiteFooterWidget"
|
|
||||||
:isForwardActionDisabled="!meta.valid"
|
|
||||||
@backClicked="navigateBackByVehicleQuestions" />
|
|
||||||
<div class="mb-5 text-center">
|
|
||||||
<textLink
|
<textLink
|
||||||
v-if="isITACQuoteVisible"
|
|
||||||
linkType="navigation"
|
linkType="navigation"
|
||||||
text="Back"
|
text="Back"
|
||||||
href="#"
|
href="#"
|
||||||
|
|
@ -132,7 +113,6 @@
|
||||||
<script>
|
<script>
|
||||||
// Import Component
|
// Import Component
|
||||||
import { Form } from 'vee-validate';
|
import { Form } from 'vee-validate';
|
||||||
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 cancelClaimModal from '@/layouts/coverage-statement/cancel-claim-modal/cancel-claim-modal.vue';
|
import cancelClaimModal from '@/layouts/coverage-statement/cancel-claim-modal/cancel-claim-modal.vue';
|
||||||
import contentGroupModal from '@/iss-components/content-group-modal/content-group-modal.vue';
|
import contentGroupModal from '@/iss-components/content-group-modal/content-group-modal.vue';
|
||||||
|
|
@ -169,7 +149,6 @@ const SITE_FOOTER_REF_NAME = 'siteFooter';
|
||||||
export default {
|
export default {
|
||||||
name: 'coverage-statement',
|
name: 'coverage-statement',
|
||||||
components: {
|
components: {
|
||||||
siteFooter,
|
|
||||||
siteHeader,
|
siteHeader,
|
||||||
// eslint-disable-next-line vue/no-reserved-component-names
|
// eslint-disable-next-line vue/no-reserved-component-names
|
||||||
Form,
|
Form,
|
||||||
|
|
@ -257,23 +236,6 @@ export default {
|
||||||
widgetFields.SUB_HEADER_WIDGET.SUB_HEADER_TEXT
|
widgetFields.SUB_HEADER_WIDGET.SUB_HEADER_TEXT
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
verifiedItacAlertHeader() {
|
|
||||||
return this.getCmsContent(
|
|
||||||
this.widget.verifiedItacAlert,
|
|
||||||
widgetFields.ALERT_WIDGET.HEADLINE_TEXT
|
|
||||||
);
|
|
||||||
},
|
|
||||||
verifiedItacAlertBody() {
|
|
||||||
const itacCostSavings =
|
|
||||||
this.deductibleValue - this.totalServicePrice;
|
|
||||||
return this.getCmsContent(
|
|
||||||
this.widget.verifiedItacAlert,
|
|
||||||
widgetFields.ALERT_WIDGET.BODY_TEXT
|
|
||||||
)?.replaceAll(
|
|
||||||
'{custom:costSavings}',
|
|
||||||
formatAmountInDollars(itacCostSavings)
|
|
||||||
);
|
|
||||||
},
|
|
||||||
secondaryText() {
|
secondaryText() {
|
||||||
const itacCostSavings =
|
const itacCostSavings =
|
||||||
this.deductibleValue - this.totalServicePrice;
|
this.deductibleValue - this.totalServicePrice;
|
||||||
|
|
@ -309,28 +271,17 @@ export default {
|
||||||
widgetFields.CONTENT_GROUP_WIDGET.HEADER_TEXT
|
widgetFields.CONTENT_GROUP_WIDGET.HEADER_TEXT
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
nextStepsSubheader() {
|
|
||||||
return this.getTextFromCmsWithCustomIfStatements(
|
|
||||||
this.widget.nextStep,
|
|
||||||
widgetFields.CONTENT_GROUP_WIDGET.SUBHEADER_TEXT
|
|
||||||
);
|
|
||||||
},
|
|
||||||
nextStepsBody() {
|
nextStepsBody() {
|
||||||
const cmsText = this.getTextFromCmsWithCustomIfStatements(
|
const cmsText = this.getTextFromCmsWithCustomIfStatements(
|
||||||
this.widget.nextStep,
|
this.widget.nextStep,
|
||||||
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT
|
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT
|
||||||
)?.replaceAll('{custom:damage}', this.damageText);
|
)?.replaceAll('{custom:damage}', this.damageText);
|
||||||
|
|
||||||
|
if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) {
|
||||||
|
return createUnorderedListFromStringOfParagraphs(cmsText);
|
||||||
|
}
|
||||||
return createOrderedListFromStringOfParagraphs(cmsText);
|
return createOrderedListFromStringOfParagraphs(cmsText);
|
||||||
},
|
},
|
||||||
nextStepsBodyITACNoComp() {
|
|
||||||
const cmsText = this.getTextFromCmsWithCustomIfStatements(
|
|
||||||
this.widget.nextStepITACNoComp,
|
|
||||||
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT
|
|
||||||
);
|
|
||||||
|
|
||||||
return createUnorderedListFromStringOfParagraphs(cmsText);
|
|
||||||
},
|
|
||||||
damageText() {
|
damageText() {
|
||||||
const damageString = getDamageString();
|
const damageString = getDamageString();
|
||||||
return damageString === 'match' ? '' : damageString;
|
return damageString === 'match' ? '' : damageString;
|
||||||
|
|
@ -360,18 +311,6 @@ export default {
|
||||||
totalServicePrice() {
|
totalServicePrice() {
|
||||||
return getPriceOfLineItems(this.baseServiceLineItems);
|
return getPriceOfLineItems(this.baseServiceLineItems);
|
||||||
},
|
},
|
||||||
serviceProviderQuestionText() {
|
|
||||||
return this.getCmsContent(
|
|
||||||
this.widget.serviceProviderQuestion,
|
|
||||||
widgetFields.INPUT_QUESTION_WIDGET.QUESTION_TEXT
|
|
||||||
);
|
|
||||||
},
|
|
||||||
serviceProviderQuestionAnswers() {
|
|
||||||
return this.getCmsContent(
|
|
||||||
this.widget.serviceProviderQuestion,
|
|
||||||
widgetFields.INPUT_QUESTION_WIDGET.ANSWERS
|
|
||||||
);
|
|
||||||
},
|
|
||||||
isQuoteDisplayed() {
|
isQuoteDisplayed() {
|
||||||
return this.isNoCompQuoteVisible;
|
return this.isNoCompQuoteVisible;
|
||||||
},
|
},
|
||||||
|
|
@ -406,11 +345,17 @@ export default {
|
||||||
isUnverifiedNonADAS() {
|
isUnverifiedNonADAS() {
|
||||||
return this.isUnverifiedVisible && !this.isADAS;
|
return this.isUnverifiedVisible && !this.isADAS;
|
||||||
},
|
},
|
||||||
isReplaceZeroDeductible() {
|
|
||||||
return !this.isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
|
|
||||||
},
|
|
||||||
isRepairZeroDeductible() {
|
isRepairZeroDeductible() {
|
||||||
return this.isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
|
return this.isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
|
||||||
|
},
|
||||||
|
buttonText() {
|
||||||
|
return (this.isITACQuoteVisible || this.isNoCompQuoteVisible) ? 'Continue scheduling' : 'Continue';
|
||||||
|
},
|
||||||
|
getVariant() {
|
||||||
|
if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) {
|
||||||
|
return 'text-center';
|
||||||
|
}
|
||||||
|
return 'text-left';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -484,15 +429,10 @@ export default {
|
||||||
if (this.isUnverifiedVisible || this.isDeductibleVisible) {
|
if (this.isUnverifiedVisible || this.isDeductibleVisible) {
|
||||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD);
|
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD);
|
||||||
} else if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) {
|
} else if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) {
|
||||||
useMainStore().updateIsSafeliteProvider(this.selectedProvider === SAFELITE_PROVIDER);
|
this.mainStore.updateIsSafeliteProvider(true);
|
||||||
if (this.selectedProvider === SAFELITE_PROVIDER) {
|
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE);
|
||||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE);
|
|
||||||
} else {
|
|
||||||
useMainStore().setBailout(bailoutMessage.RequestCallback());
|
|
||||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
useMainStore().setBailout(bailoutMessage.coverageStatementInvalidState());
|
this.mainStore.setBailout(bailoutMessage.coverageStatementInvalidState());
|
||||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_INVALID_STATE);
|
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_INVALID_STATE);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -512,44 +452,28 @@ export default {
|
||||||
switch (str) {
|
switch (str) {
|
||||||
case 'coverageUnverified':
|
case 'coverageUnverified':
|
||||||
return this.isUnverifiedVisible;
|
return this.isUnverifiedVisible;
|
||||||
case 'verifiedDeductible':
|
|
||||||
return this.isDeductibleVisible;
|
|
||||||
case 'verifiedITAC':
|
case 'verifiedITAC':
|
||||||
return this.isITACQuoteVisible;
|
return this.isITACQuoteVisible;
|
||||||
case 'verifiedNoComp':
|
case 'verifiedNoComp':
|
||||||
return this.isNoCompQuoteVisible;
|
return this.isNoCompQuoteVisible;
|
||||||
case 'ADASReplace': //
|
case 'ADASReplace':
|
||||||
return !isRepair && this.isADAS && !this.isNoCompQuoteVisible && !this.isITACQuoteVisible;
|
return !isRepair && this.isADAS && !this.isNoCompQuoteVisible && !this.isITACQuoteVisible;
|
||||||
case 'nonADASReplace': //
|
case 'nonADASReplace':
|
||||||
return !isRepair && !this.isADAS && !this.isNoCompQuoteVisible && !this.isITACQuoteVisible;
|
return !isRepair && !this.isADAS && !this.isNoCompQuoteVisible && !this.isITACQuoteVisible;
|
||||||
case 'nonADASRepair':
|
case 'verifiedRepairDeductible':
|
||||||
return isRepair;
|
|
||||||
case 'deductibleOverZero':
|
|
||||||
return this.isDeductibleVisible && this.deductibleValue > 0;
|
|
||||||
case 'isDeductibleZero':
|
|
||||||
return this.isDeductibleVisible && this.deductibleValue <= 0;
|
|
||||||
case 'verifiedRepairDeductible': //
|
|
||||||
return isRepair && this.isDeductibleVisible;
|
return isRepair && this.isDeductibleVisible;
|
||||||
case 'verifiedRepairZeroDeductible': //
|
case 'verifiedRepairZeroDeductible':
|
||||||
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
|
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
|
||||||
case 'verifiedRepairZeroDeductibleReplaceDeductibleOverZero': //
|
case 'verifiedRepairZeroDeductibleReplaceDeductibleOverZero': //
|
||||||
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0 && this.mainStore.order.currentReplaceDeductible > 0;
|
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0 && this.mainStore.order.currentReplaceDeductible > 0;
|
||||||
case 'verifiedRepairDeductibleOverZero': //
|
case 'verifiedRepairDeductibleOverZero':
|
||||||
return isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
|
return isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
|
||||||
case 'verifiedReplaceDeductible': //
|
case 'verifiedReplaceDeductible':
|
||||||
return !isRepair && this.isDeductibleVisible;
|
return !isRepair && this.isDeductibleVisible;
|
||||||
case 'verifiedReplaceZeroDeductible': //
|
case 'verifiedReplaceZeroDeductible':
|
||||||
return !isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
|
return !isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
|
||||||
case 'verifiedReplaceDeductibleOverZero': //
|
case 'verifiedReplaceDeductibleOverZero':
|
||||||
return !isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
|
return !isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
|
||||||
case 'unverifiedADAS':
|
|
||||||
return this.isUnverifiedADAS;
|
|
||||||
case 'unverifiedNonADAS':
|
|
||||||
return this.isUnverifiedNonADAS;
|
|
||||||
case 'verifiedReplaceDeductibleOverZeroNonADAS':
|
|
||||||
return !isRepair && this.isDeductibleVisible && this.deductibleValue > 0 && !this.isADAS;
|
|
||||||
case 'verifiedReplaceDeductibleOverZeroADAS':
|
|
||||||
return !isRepair && this.isDeductibleVisible && this.deductibleValue > 0 && this.isADAS;
|
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -559,13 +483,9 @@ export default {
|
||||||
},
|
},
|
||||||
formatAmountInDollars,
|
formatAmountInDollars,
|
||||||
cancelClaim() {
|
cancelClaim() {
|
||||||
useMainStore().updateIsSafeliteProvider(false);
|
this.mainStore.updateIsSafeliteProvider(false);
|
||||||
useMainStore().setBailout(bailoutMessage.RequestCallback());
|
this.mainStore.setBailout(bailoutMessage.RequestCallback());
|
||||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP);
|
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP);
|
||||||
},
|
|
||||||
continueClaim() {
|
|
||||||
useMainStore().updateIsSafeliteProvider(true);
|
|
||||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue