Include Experiment Setting for whether to display PIA message/questions

This commit is contained in:
Bill Richardson 2024-04-08 09:11:24 -04:00
parent 1ab14d7413
commit 0c75e9a311
4 changed files with 29 additions and 11 deletions

View file

@ -10,8 +10,8 @@ const applicationConfig = Object.freeze({
ANALYTICS_SESSION_TIMEOUT_MINUTES: 30, ANALYTICS_SESSION_TIMEOUT_MINUTES: 30,
SAVED_SESSION_TIMEOUT_DAYS: 45, SAVED_SESSION_TIMEOUT_DAYS: 45,
COOKIE_PATH: '/', COOKIE_PATH: '/',
APPLICATION_NAME: 'SelfService', APPLICATION_NAME: 'ISS',
SITE_ENTRY_TRIGGER_VALUE: 'SelfService', SITE_ENTRY_TRIGGER_VALUE: 'ISS',
APPLICATION_ABBREVIATION: 'iss', APPLICATION_ABBREVIATION: 'iss',
PAGE_QUERYSTRING: 'issPage', PAGE_QUERYSTRING: 'issPage',
CLIENTTAG_QUERYSTRING: 'ClientTag', CLIENTTAG_QUERYSTRING: 'ClientTag',

View file

@ -3,7 +3,8 @@ const experimentUniverses = Object.freeze({
}); });
const experimentSettings = Object.freeze({ const experimentSettings = Object.freeze({
GOOGLE_CUSTOM_DIMENSION_INDEX: 'Google Custom Dimension Index' GOOGLE_CUSTOM_DIMENSION_INDEX: 'Google Custom Dimension Index',
ISS_DISPLAY_PAY_IN_ADVANCE: 'ISSDisplayPIAInsurance_ISS'
}); });
const experimentTriggers = Object.freeze({ const experimentTriggers = Object.freeze({

View file

@ -11,7 +11,7 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const store = useMainStore(); const store = useMainStore();
const cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO; const cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO;
const payloadAndAnalyticsData = { ...payload, AppName: 'SelfService' }; const payloadAndAnalyticsData = { ...payload, AppName: 'ISS' };
const headers = { const headers = {
[headerKeys.EXPERIMENT]: JSON.stringify(store.experimentSettings) [headerKeys.EXPERIMENT]: JSON.stringify(store.experimentSettings)
}; };

View file

@ -34,10 +34,16 @@
alertClass="alert-danger" alertClass="alert-danger"
:isDismissible="false" /> :isDismissible="false" />
<paymentMethodQuestion <paymentMethodQuestion
v-model="paymentMethodInternalModel" v-if="!isPayInAdvanceDisabled"
cmsWidgetName="PaymentMethodWidget" v-model="paymentMethodInternalModel"
:validationRules="rules.optionRequired" /> cmsWidgetName="PaymentMethodWidget"
<div>Pia Disabled Placeholder</div> :validationRules="rules.optionRequired" />
<alert
v-if="isPayInAdvanceDisabled"
:isDismissible="false"
alertClass="alert-info"
cmsWidgetName="NoPayInAdvanceDisclaimerWidget"
:shouldScrollToOnMount="false" />
<siteFooter <siteFooter
ref="siteFooter" ref="siteFooter"
cmsWidgetName="SiteFooterWidget" cmsWidgetName="SiteFooterWidget"
@ -64,6 +70,7 @@ import alert from '@/ux-components/alert/alert.vue';
// Supporting Items // Supporting Items
import settleAllPromises from '@/helpers/layout-helper'; import settleAllPromises from '@/helpers/layout-helper';
import { useMainStore } from '@/store'; import { useMainStore } from '@/store';
import { experimentSettings } from '@/constants/experiments';
import { fetchCmsContentForPage } from '@/helpers/cms-content-helper'; import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
import { paymentMethods } from '@/constants/payment-method-constants'; import { paymentMethods } from '@/constants/payment-method-constants';
import queryStrings from '@/constants/query-strings'; import queryStrings from '@/constants/query-strings';
@ -163,13 +170,23 @@ export default {
return null; return null;
} }
}, },
paymentMethod() {
return this.paymentMethodInternalModel;
},
displayPayInAdvanceAlert() { displayPayInAdvanceAlert() {
return ( return (
this.$route.query[queryStrings.DISPLAY_PAY_IN_ADVANCE_ALERT] this.$route.query[queryStrings.DISPLAY_PAY_IN_ADVANCE_ALERT]
); );
},
isPayInAdvanceDisabled() {
const piaExperience = this.getSettingValue(experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE);
const isEnabled = piaExperience === 'true';
return !isEnabled || this.isUnverified;
},
isUnverified() {
return !useMainStore().isNoComp && !useMainStore().policy.isITAC
&& (useMainStore().order.currentDeductible == null || !useMainStore().isVerifiedCoverageStatus);
},
paymentMethod() {
return this.paymentMethodInternalModel;
} }
}, },
watch: { watch: {