tpa-conf WIP
This commit is contained in:
parent
e62f10d37c
commit
0fdc6c54e7
3 changed files with 67 additions and 8 deletions
|
|
@ -7,14 +7,25 @@
|
||||||
<div class="page-container-grouped-styles">
|
<div class="page-container-grouped-styles">
|
||||||
<div class="fade-on-route-transition position-relative">
|
<div class="fade-on-route-transition position-relative">
|
||||||
<siteHeader cmsWidgetName="SiteHeaderWidget" />
|
<siteHeader cmsWidgetName="SiteHeaderWidget" />
|
||||||
<div class="container-fluid pb-2 confirmation">
|
<div class="container-fluid px-5 pb-2 confirmation">
|
||||||
<vehicleBanner
|
<vehicleBanner
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
cmsWidgetName="VehicleBannerWidget"
|
cmsWidgetName="VehicleBannerWidget"
|
||||||
:displayGenericVehicleImage="false" />
|
:displayGenericVehicleImage="false" />
|
||||||
<siteSubHeader cmsWidgetName="SiteSubHeaderWidget" />
|
<siteSubHeader cmsWidgetName="SiteSubHeaderWidget" />
|
||||||
<textBlock
|
<textBlock
|
||||||
|
ref="tpaConfirmationBody"
|
||||||
:customText="tpaConfirmationBody" />
|
:customText="tpaConfirmationBody" />
|
||||||
|
<div>
|
||||||
|
<textBlock
|
||||||
|
id="tpaConfirmationOrderDetailsTitle"
|
||||||
|
ref="tpaConfirmationOrderDetailsTitle"
|
||||||
|
:customText="orderDetailsTitle"
|
||||||
|
:marginTopSizeOverride="4"
|
||||||
|
class="fw-bold text-color--black"
|
||||||
|
@click-event="navigateWithScenario()" />
|
||||||
|
<deductibleBox ref="deductibleBox" :value="deductibleBoxValue" />
|
||||||
|
</div>
|
||||||
<siteFooter
|
<siteFooter
|
||||||
ref="siteFooter"
|
ref="siteFooter"
|
||||||
cmsWidgetName="SiteFooterWidget"
|
cmsWidgetName="SiteFooterWidget"
|
||||||
|
|
@ -33,6 +44,8 @@ import vehicleBanner from '@/iss-components/vehicle-banner/vehicle-banner.vue';
|
||||||
import siteSubHeader from '@/iss-components/site-sub-header/site-sub-header.vue';
|
import siteSubHeader from '@/iss-components/site-sub-header/site-sub-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 { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
|
import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
|
||||||
import settleAllPromises from '@/helpers/layout-helper';
|
import settleAllPromises from '@/helpers/layout-helper';
|
||||||
|
|
@ -40,6 +53,9 @@ import { Form } from 'vee-validate';
|
||||||
import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
||||||
import { useMainStore } from '@/store';
|
import { useMainStore } from '@/store';
|
||||||
import widgetFields from '@/constants/cms-widget-fields';
|
import widgetFields from '@/constants/cms-widget-fields';
|
||||||
|
import { toTitleCase, toDisplayPhoneNumber, formatAmountInDollars } from '@/helpers/text-helper.js';
|
||||||
|
|
||||||
|
const VERIFYING_COVERAGE = 'Verifying coverage';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'tpa-confirmation',
|
name: 'tpa-confirmation',
|
||||||
|
|
@ -49,6 +65,7 @@ export default {
|
||||||
vehicleBanner,
|
vehicleBanner,
|
||||||
siteSubHeader,
|
siteSubHeader,
|
||||||
textBlock,
|
textBlock,
|
||||||
|
deductibleBox,
|
||||||
// eslint-disable-next-line vue/no-reserved-component-names
|
// eslint-disable-next-line vue/no-reserved-component-names
|
||||||
Form
|
Form
|
||||||
},
|
},
|
||||||
|
|
@ -73,15 +90,37 @@ export default {
|
||||||
return { mainStore };
|
return { mainStore };
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
const { companyName } = useMainStore().order.serviceLocation.provider;
|
||||||
return {
|
return {
|
||||||
widget: {
|
widget: {
|
||||||
tpaConfirmation: 'TPAConfirmationContent'
|
tpaConfirmation: 'TPAConfirmationContent',
|
||||||
|
orderDetails: 'OrderDetailsContent'
|
||||||
|
},
|
||||||
|
companyName,
|
||||||
|
customValueMap: {
|
||||||
|
glassShop: companyName
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
tpaConfirmationBody() {
|
tpaConfirmationBody() {
|
||||||
return this.getCmsContent(this.widget.tpaConfirmation, widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT);
|
return this.getCmsContent(this.widget.tpaConfirmation, widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT)
|
||||||
|
.replaceAll('{custom:phoneNumber}', this.preferredShopPhoneNumber);
|
||||||
|
},
|
||||||
|
preferredShopPhoneNumber() {
|
||||||
|
return this.toDisplayPhoneNumber(useMainStore().order.serviceLocation.provider.phoneNumber);
|
||||||
|
},
|
||||||
|
orderDetailsTitle() {
|
||||||
|
return this.getCmsContent(this.widget.orderDetails, widgetFields.TEXT_BLOCK_WIDGET.TEXT);
|
||||||
|
},
|
||||||
|
isVerified() {
|
||||||
|
return useMainStore().order.payment.insuranceCoverage.isVerified;
|
||||||
|
},
|
||||||
|
currentDeductible() {
|
||||||
|
return useMainStore().order.currentDeductible;
|
||||||
|
},
|
||||||
|
deductibleBoxValue() {
|
||||||
|
return this.isVerified ? this.formatAmountInDollars(this.currentDeductible) : VERIFYING_COVERAGE;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:
|
methods:
|
||||||
|
|
@ -89,19 +128,32 @@ export default {
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
return this.navigateForward();
|
return this.navigateForward();
|
||||||
},
|
},
|
||||||
|
|
||||||
navigateForward() {
|
navigateForward() {
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
this.navigationScenarios.CLICKED_FORWARD,
|
this.navigationScenarios.CLICKED_FORWARD,
|
||||||
this.$route
|
this.$route
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
|
getBodyTextFromCms(cmsWidgetName) {
|
||||||
|
return this.getCmsContent(cmsWidgetName, 'BodyText');
|
||||||
|
},
|
||||||
|
getCustomValueFromString(str) {
|
||||||
|
switch (str) {
|
||||||
|
case 'verifyingCoverage':
|
||||||
|
return !this.isVerified;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
navigate(scenario) {
|
||||||
|
this.$router.navigate(scenario, this.$route);
|
||||||
|
},
|
||||||
|
toDisplayPhoneNumber,
|
||||||
|
toTitleCase,
|
||||||
|
formatAmountInDollars
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.confirmation p{
|
|
||||||
margin-bottom:0.75rem;
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,9 @@ const navigationScenarios = Object.freeze({
|
||||||
EDIT_PREFERRED_SHOP: 'EDIT_PREFERRED_SHOP',
|
EDIT_PREFERRED_SHOP: 'EDIT_PREFERRED_SHOP',
|
||||||
EDIT_CONTACT_DETAILS: 'EDIT_CONTACT_DETAILS',
|
EDIT_CONTACT_DETAILS: 'EDIT_CONTACT_DETAILS',
|
||||||
|
|
||||||
|
// TPA Confirmation
|
||||||
|
REQUEST_CALLBACK: 'REQUEST_CALLBACK',
|
||||||
|
|
||||||
// Provider Preference
|
// Provider Preference
|
||||||
CLICKED_FORWARD_WITH_SAFELITE: 'CLICKED_FORWARD_WITH_SAFELITE',
|
CLICKED_FORWARD_WITH_SAFELITE: 'CLICKED_FORWARD_WITH_SAFELITE',
|
||||||
CLICKED_FORWARD_WITH_TPA_ENABLED: 'CLICKED_FORWARD_WITH_TPA_ENABLED',
|
CLICKED_FORWARD_WITH_TPA_ENABLED: 'CLICKED_FORWARD_WITH_TPA_ENABLED',
|
||||||
|
|
|
||||||
|
|
@ -659,6 +659,10 @@ const routingTable = () => [
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.CLICKED_FORWARD,
|
scenario: navigationScenarios.CLICKED_FORWARD,
|
||||||
destinationIssPageValue: issPageValues.WELCOME_PAGE
|
destinationIssPageValue: issPageValues.WELCOME_PAGE
|
||||||
|
},
|
||||||
|
{
|
||||||
|
scenario: navigationScenarios.REQUEST_CALLBACK,
|
||||||
|
destinationIssPageValue: issPageValues.BAILOUT_PAGE
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue