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) }}
|
||||
</div>
|
||||
<div
|
||||
v-if="!isReplaceZeroDeductible"
|
||||
class="fw-bold text-black mt-5"
|
||||
v-html="nextStepsHeader"></div>
|
||||
<div
|
||||
v-if="isReplaceZeroDeductible"
|
||||
class="mt-4"
|
||||
v-html="nextStepsSubheader"></div>
|
||||
<div
|
||||
v-if="isDeductibleVisible || isUnverifiedVisible"
|
||||
class="body-text"
|
||||
v-html="nextStepsBody"></div>
|
||||
<div
|
||||
v-if="isITACQuoteVisible || isNoCompQuoteVisible"
|
||||
class="body-text"
|
||||
v-html="nextStepsBodyITACNoComp"></div>
|
||||
<div
|
||||
v-if="isNoCompQuoteVisible"
|
||||
class="no-comp-price-text">
|
||||
|
|
@ -82,12 +72,11 @@
|
|||
{{ formatAmountInDollars(totalServicePrice) }}
|
||||
</div>
|
||||
<buttonMain
|
||||
v-if="isNoCompQuoteVisible || isITACQuoteVisible"
|
||||
ref="buttonMain"
|
||||
class="full-width-button mt-5"
|
||||
class="full-width-button mt-5 mb-5"
|
||||
variant="navigation"
|
||||
buttonText="Continue scheduling"
|
||||
@clickEvent="continueToSchedule" />
|
||||
:buttonText="buttonText"
|
||||
@clickEvent="navigateForward" />
|
||||
<textLink
|
||||
v-if="isNoCompQuoteVisible || isITACQuoteVisible"
|
||||
class="underlined-text cancel-link mt-5"
|
||||
|
|
@ -100,16 +89,8 @@
|
|||
class="mt-5 mb-5"
|
||||
:customText="disclaimerText"
|
||||
typeStyle="caption" />
|
||||
<siteFooter
|
||||
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">
|
||||
<div :class="getVariant + ' mb-5'">
|
||||
<textLink
|
||||
v-if="isITACQuoteVisible"
|
||||
linkType="navigation"
|
||||
text="Back"
|
||||
href="#"
|
||||
|
|
@ -132,7 +113,6 @@
|
|||
<script>
|
||||
// Import Component
|
||||
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 cancelClaimModal from '@/layouts/coverage-statement/cancel-claim-modal/cancel-claim-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 {
|
||||
name: 'coverage-statement',
|
||||
components: {
|
||||
siteFooter,
|
||||
siteHeader,
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
Form,
|
||||
|
|
@ -257,23 +236,6 @@ export default {
|
|||
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() {
|
||||
const itacCostSavings =
|
||||
this.deductibleValue - this.totalServicePrice;
|
||||
|
|
@ -309,28 +271,17 @@ export default {
|
|||
widgetFields.CONTENT_GROUP_WIDGET.HEADER_TEXT
|
||||
);
|
||||
},
|
||||
nextStepsSubheader() {
|
||||
return this.getTextFromCmsWithCustomIfStatements(
|
||||
this.widget.nextStep,
|
||||
widgetFields.CONTENT_GROUP_WIDGET.SUBHEADER_TEXT
|
||||
);
|
||||
},
|
||||
nextStepsBody() {
|
||||
const cmsText = this.getTextFromCmsWithCustomIfStatements(
|
||||
this.widget.nextStep,
|
||||
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT
|
||||
)?.replaceAll('{custom:damage}', this.damageText);
|
||||
|
||||
if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) {
|
||||
return createUnorderedListFromStringOfParagraphs(cmsText);
|
||||
}
|
||||
return createOrderedListFromStringOfParagraphs(cmsText);
|
||||
},
|
||||
nextStepsBodyITACNoComp() {
|
||||
const cmsText = this.getTextFromCmsWithCustomIfStatements(
|
||||
this.widget.nextStepITACNoComp,
|
||||
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT
|
||||
);
|
||||
|
||||
return createUnorderedListFromStringOfParagraphs(cmsText);
|
||||
},
|
||||
damageText() {
|
||||
const damageString = getDamageString();
|
||||
return damageString === 'match' ? '' : damageString;
|
||||
|
|
@ -360,18 +311,6 @@ export default {
|
|||
totalServicePrice() {
|
||||
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() {
|
||||
return this.isNoCompQuoteVisible;
|
||||
},
|
||||
|
|
@ -406,11 +345,17 @@ export default {
|
|||
isUnverifiedNonADAS() {
|
||||
return this.isUnverifiedVisible && !this.isADAS;
|
||||
},
|
||||
isReplaceZeroDeductible() {
|
||||
return !this.isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
|
||||
},
|
||||
isRepairZeroDeductible() {
|
||||
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: {
|
||||
|
|
@ -484,15 +429,10 @@ export default {
|
|||
if (this.isUnverifiedVisible || this.isDeductibleVisible) {
|
||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD);
|
||||
} else if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) {
|
||||
useMainStore().updateIsSafeliteProvider(this.selectedProvider === SAFELITE_PROVIDER);
|
||||
if (this.selectedProvider === SAFELITE_PROVIDER) {
|
||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE);
|
||||
} else {
|
||||
useMainStore().setBailout(bailoutMessage.RequestCallback());
|
||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP);
|
||||
}
|
||||
this.mainStore.updateIsSafeliteProvider(true);
|
||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE);
|
||||
} else {
|
||||
useMainStore().setBailout(bailoutMessage.coverageStatementInvalidState());
|
||||
this.mainStore.setBailout(bailoutMessage.coverageStatementInvalidState());
|
||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_INVALID_STATE);
|
||||
}
|
||||
},
|
||||
|
|
@ -512,44 +452,28 @@ export default {
|
|||
switch (str) {
|
||||
case 'coverageUnverified':
|
||||
return this.isUnverifiedVisible;
|
||||
case 'verifiedDeductible':
|
||||
return this.isDeductibleVisible;
|
||||
case 'verifiedITAC':
|
||||
return this.isITACQuoteVisible;
|
||||
case 'verifiedNoComp':
|
||||
return this.isNoCompQuoteVisible;
|
||||
case 'ADASReplace': //
|
||||
case 'ADASReplace':
|
||||
return !isRepair && this.isADAS && !this.isNoCompQuoteVisible && !this.isITACQuoteVisible;
|
||||
case 'nonADASReplace': //
|
||||
case 'nonADASReplace':
|
||||
return !isRepair && !this.isADAS && !this.isNoCompQuoteVisible && !this.isITACQuoteVisible;
|
||||
case 'nonADASRepair':
|
||||
return isRepair;
|
||||
case 'deductibleOverZero':
|
||||
return this.isDeductibleVisible && this.deductibleValue > 0;
|
||||
case 'isDeductibleZero':
|
||||
return this.isDeductibleVisible && this.deductibleValue <= 0;
|
||||
case 'verifiedRepairDeductible': //
|
||||
case 'verifiedRepairDeductible':
|
||||
return isRepair && this.isDeductibleVisible;
|
||||
case 'verifiedRepairZeroDeductible': //
|
||||
case 'verifiedRepairZeroDeductible':
|
||||
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
|
||||
case 'verifiedRepairZeroDeductibleReplaceDeductibleOverZero': //
|
||||
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0 && this.mainStore.order.currentReplaceDeductible > 0;
|
||||
case 'verifiedRepairDeductibleOverZero': //
|
||||
case 'verifiedRepairDeductibleOverZero':
|
||||
return isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
|
||||
case 'verifiedReplaceDeductible': //
|
||||
case 'verifiedReplaceDeductible':
|
||||
return !isRepair && this.isDeductibleVisible;
|
||||
case 'verifiedReplaceZeroDeductible': //
|
||||
case 'verifiedReplaceZeroDeductible':
|
||||
return !isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
|
||||
case 'verifiedReplaceDeductibleOverZero': //
|
||||
case 'verifiedReplaceDeductibleOverZero':
|
||||
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:
|
||||
return null;
|
||||
}
|
||||
|
|
@ -559,13 +483,9 @@ export default {
|
|||
},
|
||||
formatAmountInDollars,
|
||||
cancelClaim() {
|
||||
useMainStore().updateIsSafeliteProvider(false);
|
||||
useMainStore().setBailout(bailoutMessage.RequestCallback());
|
||||
this.mainStore.updateIsSafeliteProvider(false);
|
||||
this.mainStore.setBailout(bailoutMessage.RequestCallback());
|
||||
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