CASH-2848: Coverage Statement repair/replace copy
This commit is contained in:
parent
c5cfa29148
commit
b0a16f18a0
2 changed files with 65 additions and 8 deletions
|
|
@ -8,13 +8,15 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-10 col-lg-8 col-xl-7">
|
<div class="col-12 col-md-10 col-lg-8 col-xl-7">
|
||||||
<div class="my-5" ref="unverified-block">
|
<div v-if="showUnverifiedContent" class="my-5" ref="unverified-block">
|
||||||
<funnelSubHeader cmsWidgetName="SubHeaderWidgetUnverified" alignLeft />
|
<funnelSubHeader cmsWidgetName="SubHeaderWidgetUnverified" alignLeft />
|
||||||
<customerInstructions
|
<customerInstructions
|
||||||
cmsWidgetName="InstructionsWidgetUnverified"
|
:cmsWidgetName="getUnverifiedInstructionsWidgetName"
|
||||||
|
:isRepair="isRepair"
|
||||||
|
:overrideRepairInstructionText="overrideRepairInstructionText"
|
||||||
v-on="{ textLinkClicked: openModalAction }" />
|
v-on="{ textLinkClicked: openModalAction }" />
|
||||||
</div>
|
</div>
|
||||||
<div class="my-5" ref="verified-block">
|
<div v-if="showVerifiedContent" class="my-5" ref="verified-block">
|
||||||
<funnelSubHeader cmsWidgetName="SubHeaderWidgetVerified" alignLeft />
|
<funnelSubHeader cmsWidgetName="SubHeaderWidgetVerified" alignLeft />
|
||||||
<priceDisplay
|
<priceDisplay
|
||||||
cmsWidgetName="PriceWidgetVerified"
|
cmsWidgetName="PriceWidgetVerified"
|
||||||
|
|
@ -27,7 +29,7 @@
|
||||||
cmsWidgetName="AfterpayBreakoutWidget"
|
cmsWidgetName="AfterpayBreakoutWidget"
|
||||||
:totalAmount="cashPrice" />
|
:totalAmount="cashPrice" />
|
||||||
</div>
|
</div>
|
||||||
<div class="my-5" ref="itac-block">
|
<div v-if="showItacContent" class="my-5" ref="itac-block">
|
||||||
<funnelSubHeader
|
<funnelSubHeader
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
cmsWidgetName="SubHeaderWidgetItac"
|
cmsWidgetName="SubHeaderWidgetItac"
|
||||||
|
|
@ -39,7 +41,7 @@
|
||||||
<priceDisplay cmsWidgetName="PriceWidgetItac" :price="cashPrice" />
|
<priceDisplay cmsWidgetName="PriceWidgetItac" :price="cashPrice" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="my-5" ref="nocomp-block">
|
<div v-if="showNoCompContent" class="my-5" ref="nocomp-block">
|
||||||
<funnelSubHeader
|
<funnelSubHeader
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
cmsWidgetName="SubHeaderWidgetNocomp"
|
cmsWidgetName="SubHeaderWidgetNocomp"
|
||||||
|
|
@ -92,7 +94,11 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isClaimAndCoverage: this.isClaimAndCoverageFromStore(),
|
isClaimAndCoverage: this.isClaimAndCoverageFromStore(),
|
||||||
|
isVerified: this.isVerifiedInsuranceFromStore(),
|
||||||
|
isItac: this.isItacFromStore(),
|
||||||
|
isNoComp: this.isNoCompFromStore(),
|
||||||
isRecalibrationOnOrder: this.isRecalibrationOnOrderFromStore(),
|
isRecalibrationOnOrder: this.isRecalibrationOnOrderFromStore(),
|
||||||
|
isRepair: this.isRepairFromStore(),
|
||||||
clientConfig: {},
|
clientConfig: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -143,9 +149,21 @@ export default {
|
||||||
isClaimAndCoverageFromStore() {
|
isClaimAndCoverageFromStore() {
|
||||||
return store.getters.order?.payment?.isClaimAndCoverage;
|
return store.getters.order?.payment?.isClaimAndCoverage;
|
||||||
},
|
},
|
||||||
|
isVerifiedInsuranceFromStore() {
|
||||||
|
return store.getters.order?.payment?.insuranceCoverage.isVerified;
|
||||||
|
},
|
||||||
|
isItacFromStore() {
|
||||||
|
return store.getters.order?.policy?.isItac;
|
||||||
|
},
|
||||||
|
isNoCompFromStore() {
|
||||||
|
return store.getters.order?.policy?.isNoComp;
|
||||||
|
},
|
||||||
isRecalibrationOnOrderFromStore() {
|
isRecalibrationOnOrderFromStore() {
|
||||||
return store.getters.isRecalibrationOnOrder;
|
return store.getters.isRecalibrationOnOrder;
|
||||||
},
|
},
|
||||||
|
isRepairFromStore() {
|
||||||
|
return store.getters.order?.damage?.isRepair;
|
||||||
|
},
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
if (!this.isClaimAndCoverage) {
|
if (!this.isClaimAndCoverage) {
|
||||||
this.$router.navigateWithoutSaving(
|
this.$router.navigateWithoutSaving(
|
||||||
|
|
@ -182,6 +200,33 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
showVerifiedContent() {
|
||||||
|
return this.isVerified && !this.isItac && !this.isNoComp;
|
||||||
|
},
|
||||||
|
showUnverifiedContent() {
|
||||||
|
return !this.isVerified;
|
||||||
|
},
|
||||||
|
showItacContent() {
|
||||||
|
return this.isItac;
|
||||||
|
},
|
||||||
|
showNoCompContent() {
|
||||||
|
return this.isNoComp;
|
||||||
|
},
|
||||||
|
getUnverifiedInstructionsWidgetName() {
|
||||||
|
if (!this.isVerified) {
|
||||||
|
if (this.isRepair) {
|
||||||
|
return "InstructionsWidgetUnverifiedRepair";
|
||||||
|
}
|
||||||
|
return "InstructionsWidgetUnverified";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
overrideRepairInstructionText() {
|
||||||
|
if (this.isRepair) {
|
||||||
|
return this.clientConfig?.RepairInstructionsOverrideWidget?.Text || "";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
},
|
||||||
clientLogoImageSrc() {
|
clientLogoImageSrc() {
|
||||||
return this.clientConfig?.ClientLogoWidget?.Image || "";
|
return this.clientConfig?.ClientLogoWidget?.Image || "";
|
||||||
},
|
},
|
||||||
|
|
@ -205,6 +250,9 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.funnel-sub-header {
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
.price-compare {
|
.price-compare {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
{{ headerText }}
|
{{ headerText }}
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div v-if="!this.isRepair">
|
||||||
<ol>
|
<ol>
|
||||||
<li v-for="block in instructionBlocks" :key="block">
|
<li v-for="block in InstructionBlocks" :key="block">
|
||||||
<span v-for="token in block" :key="token">
|
<span v-for="token in block" :key="token">
|
||||||
<span v-if="doesCopyContainTextLink(token)" class="link">
|
<span v-if="doesCopyContainTextLink(token)" class="link">
|
||||||
<textLink
|
<textLink
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else v-html="RepairInstructionText"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -45,6 +46,11 @@ export default {
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
|
isRepair: Boolean,
|
||||||
|
overrideRepairInstructionText: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doesCopyContainTextLink,
|
doesCopyContainTextLink,
|
||||||
|
|
@ -57,7 +63,7 @@ export default {
|
||||||
headerText() {
|
headerText() {
|
||||||
return this.getCmsContent(this.cmsWidgetName, "QuestionText");
|
return this.getCmsContent(this.cmsWidgetName, "QuestionText");
|
||||||
},
|
},
|
||||||
instructionBlocks() {
|
InstructionBlocks() {
|
||||||
const answers = this.getCmsContent(this.cmsWidgetName, "Answers");
|
const answers = this.getCmsContent(this.cmsWidgetName, "Answers");
|
||||||
|
|
||||||
if (!answers) {
|
if (!answers) {
|
||||||
|
|
@ -72,6 +78,9 @@ export default {
|
||||||
|
|
||||||
return instructionBlocksAsTokens;
|
return instructionBlocksAsTokens;
|
||||||
},
|
},
|
||||||
|
RepairInstructionText() {
|
||||||
|
return this.getCmsContent(this.cmsWidgetName, "Text");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
textLink,
|
textLink,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue