recal modal link
This commit is contained in:
parent
d720533b84
commit
85e4d0252c
1 changed files with 39 additions and 19 deletions
|
|
@ -23,23 +23,31 @@
|
||||||
cmsWidgetName="whatHappensNextCopy"
|
cmsWidgetName="whatHappensNextCopy"
|
||||||
class="mt-4 mb-2 fw-bold"
|
class="mt-4 mb-2 fw-bold"
|
||||||
/>
|
/>
|
||||||
<div v-if="unverifiedADASNextSteps">
|
<div>
|
||||||
<div v-for="copy in splitADASCoverageStatementCopy" :key="copy">
|
<ol>
|
||||||
<span
|
<li v-for="listItem in this.arrayOfListItemsFromBodyText" :key="listItem">
|
||||||
v-if="!doesCopyContainTextLink(copy)"
|
<!-- no textLink -->
|
||||||
v-html="copy">
|
<span
|
||||||
</span>
|
v-if="!doesCopyContainTextLink(listItem)"
|
||||||
<span v-else>
|
v-html="listItem"></span>
|
||||||
<text-link
|
<!-- with textLink-->
|
||||||
linkType="text"
|
<template
|
||||||
:text="getRouterLinkDisplayTextFromCopy(copy)"
|
v-else
|
||||||
href="#!"
|
v-for="copy in splitCopyOnCMSPlaceHolder(listItem)"
|
||||||
data-bs-toggle="modal"
|
:key="copy">
|
||||||
data-bs-target="#RecalModal"
|
<span v-if="!doesCopyContainTextLink(copy)" v-html="copy"></span>
|
||||||
aria-label="Modal window"
|
<span v-else>
|
||||||
/>
|
<textLink
|
||||||
</span>
|
linkType="text"
|
||||||
/>
|
:text="getRouterLinkDisplayTextFromCopy(copy)"
|
||||||
|
href="#!"
|
||||||
|
data-bs-toggle="modal"
|
||||||
|
data-bs-target="#RecalModal"
|
||||||
|
aria-label="Modal window" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<textBlock
|
<textBlock
|
||||||
cmsWidgetName="UnverifiedNonADASNextStepsWidget"
|
cmsWidgetName="UnverifiedNonADASNextStepsWidget"
|
||||||
|
|
@ -51,6 +59,7 @@
|
||||||
typeStyle="body"
|
typeStyle="body"
|
||||||
v-if="unverifiedNonADASRepair"
|
v-if="unverifiedNonADASRepair"
|
||||||
/>
|
/>
|
||||||
|
<modal cmsWidgetName="RecalModal" />
|
||||||
<siteFooter
|
<siteFooter
|
||||||
cmsWidgetName="SiteFooterWidget"
|
cmsWidgetName="SiteFooterWidget"
|
||||||
:isForwardActionDisabled="!meta.valid"
|
:isForwardActionDisabled="!meta.valid"
|
||||||
|
|
@ -60,7 +69,6 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</Form>
|
</Form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -86,7 +94,6 @@ import {
|
||||||
} from '@/helpers/cms-content-helper';
|
} from '@/helpers/cms-content-helper';
|
||||||
import { settleAllPromises } from '@/helpers/layout-helper';
|
import { settleAllPromises } from '@/helpers/layout-helper';
|
||||||
import { useMainStore } from "@/store";
|
import { useMainStore } from "@/store";
|
||||||
import { regex } from "@/helpers/validation-rules";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'coverage-statement',
|
name: 'coverage-statement',
|
||||||
|
|
@ -128,6 +135,9 @@ export default {
|
||||||
splitADASCoverageStatementCopy() {
|
splitADASCoverageStatementCopy() {
|
||||||
// Splits content when brackets are found in text so that text can be looped through and text-link can be injected when needed
|
// Splits content when brackets are found in text so that text can be looped through and text-link can be injected when needed
|
||||||
return this.splitCopyOnCMSPlaceHolder(this.unverifiedADASNextStepsBodyText);
|
return this.splitCopyOnCMSPlaceHolder(this.unverifiedADASNextStepsBodyText);
|
||||||
|
},
|
||||||
|
arrayOfListItemsFromBodyText() {
|
||||||
|
return this.getArrayOfListItemsFromRawCmsCopy(this.unverifiedADASNextStepsBodyText);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
|
|
@ -178,6 +188,16 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
stripOlTagFromCopy(copy) {
|
||||||
|
const regex = /(?:<ol(?:.*?)>)|(?:<\/ol>)/g;
|
||||||
|
return copy.replace(regex, "");
|
||||||
|
},
|
||||||
|
getArrayOfListItemsFromRawCmsCopy(copy) {
|
||||||
|
const withoutOlTags = this.stripOlTagFromCopy(copy);
|
||||||
|
return withoutOlTags
|
||||||
|
.split(/(?:<li(?:.*?)>)|(?:<\/li>)/g)
|
||||||
|
.filter((lineItem) => lineItem);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
async forwardButtonAction() {},
|
async forwardButtonAction() {},
|
||||||
resetDependentState() {},
|
resetDependentState() {},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue