INSR-7770: tpa-confirmation parity updates
This commit is contained in:
parent
8622d5d553
commit
9d0a15f861
7 changed files with 73 additions and 71 deletions
|
|
@ -4,7 +4,8 @@ const dynamicStrings = Object.freeze({
|
||||||
ROUTER_LINK: 'routerLink:',
|
ROUTER_LINK: 'routerLink:',
|
||||||
MODAL_LINK: 'modalLink',
|
MODAL_LINK: 'modalLink',
|
||||||
TEXT_LINK: 'textLink',
|
TEXT_LINK: 'textLink',
|
||||||
EXTERNAL_LINK: 'externalLink'
|
EXTERNAL_LINK: 'externalLink',
|
||||||
|
PHONE_LINK: 'phoneLink'
|
||||||
});
|
});
|
||||||
|
|
||||||
export default dynamicStrings;
|
export default dynamicStrings;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ import {
|
||||||
splitCopyOnCMSPlaceHolder,
|
splitCopyOnCMSPlaceHolder,
|
||||||
getRouterLinkRouteFromCopy,
|
getRouterLinkRouteFromCopy,
|
||||||
getRouterLinkDisplayTextFromCopy,
|
getRouterLinkDisplayTextFromCopy,
|
||||||
getExternalLink
|
getExternalLink,
|
||||||
} from '@/helpers/cms-content-helper';
|
} from '@/helpers/cms-content-helper';
|
||||||
import applicationConfig from '@/constants/application-config';
|
import applicationConfig from '@/constants/application-config';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -623,6 +623,15 @@ export function getRouterLinkHtmlStringFromCopy(copy) {
|
||||||
return `<a href='/?issPage=${getRouterLinkRouteFromCopy(copy)}' class='router-link'>${getRouterLinkDisplayTextFromCopy(copy)}</a>`;
|
return `<a href='/?issPage=${getRouterLinkRouteFromCopy(copy)}' class='router-link'>${getRouterLinkDisplayTextFromCopy(copy)}</a>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a phone link as an 'a' tag element
|
||||||
|
* @param copy
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
|
export function getPhoneLinkHtmlStringFromPhoneNumber(phoneNumber) {
|
||||||
|
return `<a href='tel:${phoneNumber}' class='phone-link'>${phoneNumber}.</a>`;
|
||||||
|
}
|
||||||
|
|
||||||
// Copy returned from the CMS that has newlines will return blocks wrapped in
|
// Copy returned from the CMS that has newlines will return blocks wrapped in
|
||||||
// <p ... >...</p>
|
// <p ... >...</p>
|
||||||
// This function returns an array of each paragraph, works with or without html
|
// This function returns an array of each paragraph, works with or without html
|
||||||
|
|
|
||||||
|
|
@ -40,12 +40,12 @@ export async function submitWorkOrder({ submitType }) {
|
||||||
shouldAwaitSaveSessionQueue: true,
|
shouldAwaitSaveSessionQueue: true,
|
||||||
submitAfterSave: true
|
submitAfterSave: true
|
||||||
});
|
});
|
||||||
store.createSubmittedOrder(submitType);
|
await store.createSubmittedOrder(submitType);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function submitBailout() {
|
export async function submitBailout() {
|
||||||
const store = useMainStore();
|
const store = useMainStore();
|
||||||
store.resetSubmittedOrder();
|
store.resetSubmittedOrder();
|
||||||
await store.saveSession({});
|
await store.saveSession({});
|
||||||
store.createSubmittedOrder(submitType.BAILOUT);
|
await store.createSubmittedOrder(submitType.BAILOUT);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,40 +12,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="iss-heritage-container-width">
|
<div class="iss-heritage-container-width">
|
||||||
<div class="tpa-confirmation-container iss-heritage-content-container-width">
|
<div class="tpa-confirmation-container iss-heritage-content-container-width">
|
||||||
<div class="d-flex justify-content-center align-items-center text-color--black pb-2 fs-5">
|
<div class="header">
|
||||||
<img :src="tpaConfirmationImage" />
|
<img :src="tpaConfirmationImage" />
|
||||||
<span
|
<span v-html="tpaConfirmationHeaderText"></span>
|
||||||
class="ms-2"
|
|
||||||
v-html="tpaConfirmationHeaderText"></span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center text-color--black mb-3 fw-bold">
|
<div class="subheader">
|
||||||
<span v-html="tpaConfirmationSubheaderText"></span>
|
<span v-html="tpaConfirmationSubheaderText"></span>
|
||||||
</div>
|
</div>
|
||||||
<textBlock
|
<textBlock
|
||||||
ref="tpaConfirmationBodyOne"
|
ref="tpaConfirmationBodyOne"
|
||||||
class="tpa-body-one mt-0"
|
class="tpa-body-one"
|
||||||
:customText="tpaConfirmationBodyOne" />
|
:customText="tpaConfirmationBodyOne" />
|
||||||
<textBlock
|
<textBlock
|
||||||
ref="tpaConfirmationBodyTwo"
|
ref="tpaConfirmationBodyTwo"
|
||||||
:customText="tpaConfirmationBodyTwo"
|
class="tpa-body-one"
|
||||||
class="small mt-0" />
|
:customText="tpaConfirmationBodyTwo" />
|
||||||
<div ref="confirmationOrderDetailsSection">
|
|
||||||
<textBlock
|
|
||||||
ref="tpaConfirmationOrderDetailsTitle"
|
|
||||||
:customText="orderDetailsTitle"
|
|
||||||
class="text-color--black fw-bold lh-base mt-5 mb-4"
|
|
||||||
:marginTopSizeOverride="4" />
|
|
||||||
<textBlock
|
|
||||||
id="tpaConfirmationOrderDetailsBody"
|
|
||||||
ref="tpaConfirmationOrderDetailsBody"
|
|
||||||
:customText="orderDetailsBody"
|
|
||||||
:marginTopSizeOverride="4"
|
|
||||||
class="mb-4 small" />
|
|
||||||
<deductibleBox
|
|
||||||
ref="deductibleBox"
|
|
||||||
class="px-3"
|
|
||||||
:value="deductibleBoxValue" />
|
|
||||||
</div>
|
|
||||||
<siteFooter
|
<siteFooter
|
||||||
v-if="carrierUrl"
|
v-if="carrierUrl"
|
||||||
ref="siteFooter"
|
ref="siteFooter"
|
||||||
|
|
@ -64,11 +45,11 @@
|
||||||
import siteHeader from '@/iss-components/site-header/site-header.vue';
|
import siteHeader from '@/iss-components/site-header/site-header.vue';
|
||||||
import siteFooter from '@/iss-components/site-footer/site-footer.vue';
|
import siteFooter from '@/iss-components/site-footer/site-footer.vue';
|
||||||
import textBlock from '@/digital-components/text-block/text-block.vue';
|
import textBlock from '@/digital-components/text-block/text-block.vue';
|
||||||
import deductibleBox from '@/layouts/tpa-submit/deductible-box/deductible-box.vue';
|
|
||||||
|
|
||||||
// Supporting files
|
// Supporting files
|
||||||
import {
|
import {
|
||||||
fetchCmsContentForPage,
|
fetchCmsContentForPage,
|
||||||
|
getPhoneLinkHtmlStringFromPhoneNumber,
|
||||||
processIfStatements
|
processIfStatements
|
||||||
} from '@/helpers/cms-content-helper';
|
} from '@/helpers/cms-content-helper';
|
||||||
import settleAllPromises from '@/helpers/layout-helper';
|
import settleAllPromises from '@/helpers/layout-helper';
|
||||||
|
|
@ -77,8 +58,7 @@ import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
||||||
import { useMainStore } from '@/store';
|
import { useMainStore } from '@/store';
|
||||||
import {
|
import {
|
||||||
toTitleCase,
|
toTitleCase,
|
||||||
toDisplayPhoneNumber,
|
toDisplayPhoneNumber
|
||||||
formatAmountInDollars
|
|
||||||
} from '@/helpers/text-helper.js';
|
} from '@/helpers/text-helper.js';
|
||||||
|
|
||||||
const VERIFYING_COVERAGE = 'Verifying coverage';
|
const VERIFYING_COVERAGE = 'Verifying coverage';
|
||||||
|
|
@ -89,7 +69,6 @@ export default {
|
||||||
siteHeader,
|
siteHeader,
|
||||||
siteFooter,
|
siteFooter,
|
||||||
textBlock,
|
textBlock,
|
||||||
deductibleBox,
|
|
||||||
// eslint-disable-next-line vue/no-reserved-component-names
|
// eslint-disable-next-line vue/no-reserved-component-names
|
||||||
Form
|
Form
|
||||||
},
|
},
|
||||||
|
|
@ -132,12 +111,17 @@ export default {
|
||||||
return this.getCmsContent('TPAConfirmationContent', 'BodyText')
|
return this.getCmsContent('TPAConfirmationContent', 'BodyText')
|
||||||
?.replaceAll(
|
?.replaceAll(
|
||||||
'{custom:phoneNumber}',
|
'{custom:phoneNumber}',
|
||||||
this.preferredShopPhoneNumber
|
getPhoneLinkHtmlStringFromPhoneNumber(this.preferredShopPhoneNumber)
|
||||||
)
|
)
|
||||||
?.replaceAll('{custom:glassShop}', this.preferredShopName);
|
?.replaceAll('{custom:glassShop}', this.preferredShopName);
|
||||||
},
|
},
|
||||||
tpaConfirmationBodyTwo() {
|
tpaConfirmationBodyTwo() {
|
||||||
return this.getCmsContent('TPAConfirmationContent', 'BodyText2');
|
return this.getCmsContent('TPAConfirmationContent', 'BodyText2')
|
||||||
|
?.replaceAll(
|
||||||
|
'{custom:carrierPhone}',
|
||||||
|
getPhoneLinkHtmlStringFromPhoneNumber(this.carrierPhoneNumber)
|
||||||
|
)
|
||||||
|
?.replaceAll('{custom:carrierName}', this.carrierName);
|
||||||
},
|
},
|
||||||
orderDetailsTitle() {
|
orderDetailsTitle() {
|
||||||
return this.getCmsContent('OrderDetailsContent', 'HeaderText');
|
return this.getCmsContent('OrderDetailsContent', 'HeaderText');
|
||||||
|
|
@ -171,7 +155,7 @@ export default {
|
||||||
return this.submittedOrder.isVerified;
|
return this.submittedOrder.isVerified;
|
||||||
},
|
},
|
||||||
carrierName() {
|
carrierName() {
|
||||||
return this.mainStore.issConfig.clientName;
|
return this.mainStore.issConfig.clientFullName;
|
||||||
},
|
},
|
||||||
carrierUrl() {
|
carrierUrl() {
|
||||||
return this.mainStore.issConfig.successReturnURL;
|
return this.mainStore.issConfig.successReturnURL;
|
||||||
|
|
@ -189,48 +173,43 @@ export default {
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
this.$router.navigateToExternalUrl(this.carrierUrl);
|
this.$router.navigateToExternalUrl(this.carrierUrl);
|
||||||
},
|
},
|
||||||
getCustomValueFromString(str) {
|
|
||||||
switch (str) {
|
|
||||||
case 'deductibleAboveZero':
|
|
||||||
return this.isVerified && this.currentDeductible !== 0;
|
|
||||||
case 'zeroDeductible':
|
|
||||||
return this.isVerified && this.currentDeductible === 0;
|
|
||||||
case 'verifyingCoverage':
|
|
||||||
return !this.isVerified;
|
|
||||||
case 'coverageVerified':
|
|
||||||
return this.isVerified;
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toDisplayPhoneNumber,
|
toDisplayPhoneNumber,
|
||||||
formatAmountInDollars,
|
|
||||||
processIfStatements
|
processIfStatements
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.iss-heritage-container-width {
|
.tpa-confirmation-container {
|
||||||
.tpa-confirmation-container {
|
position: relative;
|
||||||
position: relative;
|
min-height: 1px;
|
||||||
min-height: 1px;
|
padding-left: .9375rem;
|
||||||
padding-left: .9375rem;
|
padding-right: .9375rem;
|
||||||
padding-right: .9375rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-color--black {
|
.header {
|
||||||
color: $black;
|
margin-top: 1.25rem;
|
||||||
}
|
margin-bottom: .625rem;
|
||||||
|
font-size: 1.25rem;
|
||||||
.tpa-body-one {
|
color: $black;
|
||||||
:deep(p) {
|
img {
|
||||||
line-height: map-get($spacers, 5);
|
height: 2.25rem;
|
||||||
font-size: $h6-font-size;
|
width: 2.25rem;
|
||||||
|
margin-right: .5rem;
|
||||||
strong {
|
|
||||||
color: $black;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.subheader {
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
color: $black;
|
||||||
|
font-weight: $font-weight-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(p) {
|
||||||
|
margin-bottom: .625rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(strong) {
|
||||||
|
color: $black;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -2881,10 +2881,11 @@ export const useMainStore = defineStore({
|
||||||
return JSON.parse(window.sessionStorage.getItem(webStorageConstants.SUBMITTED_ORDER));
|
return JSON.parse(window.sessionStorage.getItem(webStorageConstants.SUBMITTED_ORDER));
|
||||||
},
|
},
|
||||||
|
|
||||||
createSubmittedOrder(submitType) {
|
async createSubmittedOrder(submitType) {
|
||||||
if (this.hasSubmittedOrder()) {
|
if (this.hasSubmittedOrder()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
await this.getCarrierAccountInfo();
|
||||||
const submittedOrder = this.order;
|
const submittedOrder = this.order;
|
||||||
const { experiments } = this.applicationUser;
|
const { experiments } = this.applicationUser;
|
||||||
const { issConfig } = this;
|
const { issConfig } = this;
|
||||||
|
|
|
||||||
|
|
@ -206,6 +206,18 @@ a.router-link {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-weight: $font-weight-bold;
|
font-weight: $font-weight-bold;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
color: #125b7e;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a.phone-link {
|
||||||
|
color: $heritage-blue-primary;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: $font-weight-normal;
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
color: #125b7e;
|
color: #125b7e;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue