Merge pull request #655 from Safelite/SSR-1201-style-updates-iss
SSR-1201 style updates.
This commit is contained in:
commit
a66a8e1f05
7 changed files with 108 additions and 212 deletions
|
|
@ -61,7 +61,9 @@
|
||||||
:setLastValuePushedToGa="setLastValuePushedToGa"
|
:setLastValuePushedToGa="setLastValuePushedToGa"
|
||||||
:suppressError="suppressError" />
|
:suppressError="suppressError" />
|
||||||
<!-- For nested questions -->
|
<!-- For nested questions -->
|
||||||
<transition name="fade" mode="out-in">
|
<transition
|
||||||
|
name="fade"
|
||||||
|
mode="out-in">
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
typeof selectedValues == 'string' &&
|
typeof selectedValues == 'string' &&
|
||||||
|
|
@ -74,7 +76,9 @@
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!suppressError" class="row form-test-error mt-1">
|
<div
|
||||||
|
v-if="!suppressError"
|
||||||
|
class="row form-test-error mt-1">
|
||||||
<error-message :name="formatString(groupName)"></error-message>
|
<error-message :name="formatString(groupName)"></error-message>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -96,16 +100,16 @@ export default {
|
||||||
listCard,
|
listCard,
|
||||||
ErrorMessage,
|
ErrorMessage,
|
||||||
radio,
|
radio,
|
||||||
providerPrefRadio,
|
providerPrefRadio
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
buttonTypeString: {
|
buttonTypeString: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'listButton',
|
default: 'listButton'
|
||||||
},
|
},
|
||||||
buttonTypeObject: {
|
buttonTypeObject: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null,
|
default: null
|
||||||
},
|
},
|
||||||
isMultiSelect: Boolean,
|
isMultiSelect: Boolean,
|
||||||
groupName: String,
|
groupName: String,
|
||||||
|
|
@ -113,16 +117,16 @@ export default {
|
||||||
answers: Array,
|
answers: Array,
|
||||||
textPosition: {
|
textPosition: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'text-center',
|
default: 'text-center'
|
||||||
},
|
},
|
||||||
selectingInitiatesLoad: Boolean,
|
selectingInitiatesLoad: Boolean,
|
||||||
loaderColor: {
|
loaderColor: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'blue',
|
default: 'blue'
|
||||||
},
|
},
|
||||||
loaderPosition: {
|
loaderPosition: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'right',
|
default: 'right'
|
||||||
},
|
},
|
||||||
isRequired: Boolean,
|
isRequired: Boolean,
|
||||||
isOverflowScrollable: Boolean,
|
isOverflowScrollable: Boolean,
|
||||||
|
|
@ -137,7 +141,7 @@ export default {
|
||||||
additionalButtonData: Object,
|
additionalButtonData: Object,
|
||||||
additionalButtonStyling: String,
|
additionalButtonStyling: String,
|
||||||
isSmallQuestionText: Boolean,
|
isSmallQuestionText: Boolean,
|
||||||
isSmallQuestionLabelText: Boolean,
|
isSmallQuestionLabelText: Boolean
|
||||||
},
|
},
|
||||||
emits: ['update:modelValue'],
|
emits: ['update:modelValue'],
|
||||||
setup(props) {
|
setup(props) {
|
||||||
|
|
@ -146,7 +150,7 @@ export default {
|
||||||
|
|
||||||
const fieldOptions = {
|
const fieldOptions = {
|
||||||
value: modelValue,
|
value: modelValue,
|
||||||
initialValue: null,
|
initialValue: null
|
||||||
};
|
};
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
|
@ -156,7 +160,7 @@ export default {
|
||||||
meta,
|
meta,
|
||||||
validate,
|
validate,
|
||||||
errors,
|
errors,
|
||||||
resetField,
|
resetField
|
||||||
} = useField(props.groupName, props.validationRules, fieldOptions);
|
} = useField(props.groupName, props.validationRules, fieldOptions);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
@ -166,12 +170,12 @@ export default {
|
||||||
validate,
|
validate,
|
||||||
meta,
|
meta,
|
||||||
errors,
|
errors,
|
||||||
resetField,
|
resetField
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
lastValuePushedToGa: null,
|
lastValuePushedToGa: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -180,8 +184,8 @@ export default {
|
||||||
const baseClasses = this.isOverflowScrollable
|
const baseClasses = this.isOverflowScrollable
|
||||||
? 'container-fluid overflow-scroll position-absolute px-5 pt-1 py-0'
|
? 'container-fluid overflow-scroll position-absolute px-5 pt-1 py-0'
|
||||||
: this.buttonTypeString === 'listCard'
|
: this.buttonTypeString === 'listCard'
|
||||||
? 'w-100'
|
? 'w-100'
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
const SmallQuestionTextClass = this.isSmallQuestionText
|
const SmallQuestionTextClass = this.isSmallQuestionText
|
||||||
? `${baseClasses}small-question-text`
|
? `${baseClasses}small-question-text`
|
||||||
|
|
@ -241,15 +245,15 @@ export default {
|
||||||
// Determine number of buttons and add class accordingly.
|
// Determine number of buttons and add class accordingly.
|
||||||
// This is to accommodate unique spacing per design specs.
|
// This is to accommodate unique spacing per design specs.
|
||||||
if (
|
if (
|
||||||
this.buttonTypeString === 'listCard' &&
|
this.buttonTypeString === 'listCard'
|
||||||
this.buttonsInfo.length > 2
|
&& this.buttonsInfo.length > 2
|
||||||
) {
|
) {
|
||||||
classes += ' two-list-card-width';
|
classes += ' two-list-card-width';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.buttonTypeString === 'listCard' &&
|
this.buttonTypeString === 'listCard'
|
||||||
this.buttonsInfo.length === 1
|
&& this.buttonsInfo.length === 1
|
||||||
) {
|
) {
|
||||||
classes += ' one-list-card-width';
|
classes += ' one-list-card-width';
|
||||||
}
|
}
|
||||||
|
|
@ -257,31 +261,29 @@ export default {
|
||||||
return classes;
|
return classes;
|
||||||
},
|
},
|
||||||
buttonsInfo() {
|
buttonsInfo() {
|
||||||
return (Array.isArray(this.answers) ? this.answers : [])?.map(
|
return (Array.isArray(this.answers) ? this.answers : [])?.map((answer) => ({
|
||||||
(answer) => ({
|
buttonLabel: answer.buttonLabel ?? answer.Text ?? answer,
|
||||||
buttonLabel: answer.buttonLabel ?? answer.Text ?? answer,
|
altText:
|
||||||
altText:
|
|
||||||
answer.altText ?? (answer.Name ? answer.Name : answer),
|
answer.altText ?? (answer.Name ? answer.Name : answer),
|
||||||
buttonLabelSubCopy:
|
buttonLabelSubCopy:
|
||||||
answer.buttonLabelSubCopy ?? answer.SubText,
|
answer.buttonLabelSubCopy ?? answer.SubText,
|
||||||
buttonBodyCopy:
|
buttonBodyCopy:
|
||||||
answer.buttonBodyCopy ?? answer.buttonBodyCopy,
|
answer.buttonBodyCopy ?? answer.buttonBodyCopy,
|
||||||
buttonAuxiliaryCopy:
|
buttonAuxiliaryCopy:
|
||||||
answer.buttonAuxiliaryCopy ??
|
answer.buttonAuxiliaryCopy
|
||||||
answer.buttonAuxiliaryCopy,
|
?? answer.buttonAuxiliaryCopy,
|
||||||
buttonFooterCopy:
|
buttonFooterCopy:
|
||||||
answer.buttonFooterCopy ?? answer.buttonFooterCopy,
|
answer.buttonFooterCopy ?? answer.buttonFooterCopy,
|
||||||
buttonImage: answer.buttonImage ?? answer.AnswerImageUrl,
|
buttonImage: answer.buttonImage ?? answer.AnswerImageUrl,
|
||||||
buttonImageId: answer.buttonImageId ?? answer.ImageId,
|
buttonImageId: answer.buttonImageId ?? answer.ImageId,
|
||||||
groupName: this.formatString(this.groupName),
|
groupName: this.formatString(this.groupName),
|
||||||
value:
|
value:
|
||||||
answer.value ??
|
answer.value
|
||||||
(this.useTextForValue && answer.Text
|
?? (this.useTextForValue && answer.Text
|
||||||
? answer.Text
|
? answer.Text
|
||||||
: answer.Name) ??
|
: answer.Name)
|
||||||
(typeof answer !== 'object' ? answer : null),
|
?? (typeof answer !== 'object' ? answer : null)
|
||||||
})
|
}));
|
||||||
);
|
|
||||||
},
|
},
|
||||||
selectedValues: {
|
selectedValues: {
|
||||||
get() {
|
get() {
|
||||||
|
|
@ -289,15 +291,15 @@ export default {
|
||||||
},
|
},
|
||||||
set(selectedAnswers) {
|
set(selectedAnswers) {
|
||||||
this.$emit('update:modelValue', selectedAnswers);
|
this.$emit('update:modelValue', selectedAnswers);
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
modelValue(newValue) {
|
modelValue(newValue) {
|
||||||
this.resetField({
|
this.resetField({
|
||||||
value: newValue,
|
value: newValue
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
if (this.buttonTypeObject) {
|
if (this.buttonTypeObject) {
|
||||||
|
|
@ -307,7 +309,7 @@ export default {
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
this.resetField({
|
this.resetField({
|
||||||
value: '',
|
value: ''
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -316,8 +318,8 @@ export default {
|
||||||
},
|
},
|
||||||
setLastValuePushedToGa(lastValuePushedToGa) {
|
setLastValuePushedToGa(lastValuePushedToGa) {
|
||||||
this.lastValuePushedToGa = lastValuePushedToGa;
|
this.lastValuePushedToGa = lastValuePushedToGa;
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -338,7 +340,7 @@ export default {
|
||||||
line-height: 1.625rem;
|
line-height: 1.625rem;
|
||||||
|
|
||||||
& > span {
|
& > span {
|
||||||
text-align: center;
|
text-align: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
@mousedown="closeModal"
|
@mousedown="closeModal"
|
||||||
@keypress.space="closeModal"></button>
|
@keypress.space="closeModal"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body ps-5 pe-5 pb-5 pt-0">
|
<div class="modal-body ps-5 pe-5 pb-5 pt-1">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer px-5 py-4">
|
<div class="modal-footer px-5 py-4">
|
||||||
|
|
@ -121,17 +121,13 @@ export default {
|
||||||
this.onModalClosedCallback?.();
|
this.onModalClosedCallback?.();
|
||||||
},
|
},
|
||||||
openModal() {
|
openModal() {
|
||||||
const modal = Modal.getOrCreateInstance(
|
const modal = Modal.getOrCreateInstance(document.getElementById(this.modalId));
|
||||||
document.getElementById(this.modalId)
|
|
||||||
);
|
|
||||||
modal?.show();
|
modal?.show();
|
||||||
this.isOpen = true;
|
this.isOpen = true;
|
||||||
this.$emit('isModalOpened', true);
|
this.$emit('isModalOpened', true);
|
||||||
},
|
},
|
||||||
closeModal() {
|
closeModal() {
|
||||||
const modal = Modal.getInstance(
|
const modal = Modal.getInstance(document.getElementById(this.modalId));
|
||||||
document.getElementById(this.modalId)
|
|
||||||
);
|
|
||||||
modal?.hide();
|
modal?.hide();
|
||||||
this.isOpen = false;
|
this.isOpen = false;
|
||||||
this.$emit('isModalOpened', false);
|
this.$emit('isModalOpened', false);
|
||||||
|
|
|
||||||
|
|
@ -159,105 +159,6 @@ export default {
|
||||||
margin: 0 175px;
|
margin: 0 175px;
|
||||||
transform: translateX(180px);
|
transform: translateX(180px);
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slide-in {
|
|
||||||
0% {
|
|
||||||
transform: translateX(180px);
|
|
||||||
}
|
|
||||||
11% {
|
|
||||||
transform: translateX(-80px);
|
|
||||||
}
|
|
||||||
22% {
|
|
||||||
transform: translateX(-80px);
|
|
||||||
}
|
|
||||||
33% {
|
|
||||||
transform: translateX(-600px);
|
|
||||||
}
|
|
||||||
44% {
|
|
||||||
transform: translateX(-600px);
|
|
||||||
}
|
|
||||||
55% {
|
|
||||||
transform: translateX(-1110px);
|
|
||||||
}
|
|
||||||
66% {
|
|
||||||
transform: translateX(-1110px);
|
|
||||||
}
|
|
||||||
77% {
|
|
||||||
transform: translateX(-1600px);
|
|
||||||
}
|
|
||||||
88% {
|
|
||||||
transform: translateX(-1600px);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: translateX(-2050px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot-1 {
|
|
||||||
animation: blinking-elipsis 0.75s linear infinite;
|
|
||||||
@keyframes blinking-elipsis {
|
|
||||||
0% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
65% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
66% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot-2 {
|
|
||||||
animation: blinking-elipsis-2 0.75s linear infinite;
|
|
||||||
@keyframes blinking-elipsis-2 {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
21% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
22% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
65% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
66% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot-3 {
|
|
||||||
animation: blinking-elipsis-3 0.75s linear infinite;
|
|
||||||
@keyframes blinking-elipsis-3 {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
43% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
44% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
65% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
66% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,12 @@
|
||||||
:contentProperty="subHeaderContentProperty"
|
:contentProperty="subHeaderContentProperty"
|
||||||
:stripRteStyle="stripRteStyle"
|
:stripRteStyle="stripRteStyle"
|
||||||
:subContentProperty="subContentProperty"
|
:subContentProperty="subContentProperty"
|
||||||
class="sub-header-content"
|
class="sub-header-content mt-2 mb-5"
|
||||||
justification="left" />
|
justification="left" />
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
ref="firstName"
|
ref="firstName"
|
||||||
v-model="bailoutPageModel.firstName"
|
v-model="bailoutPageModel.firstName"
|
||||||
|
class="mb-3"
|
||||||
inputId="firstNameField"
|
inputId="firstNameField"
|
||||||
cmsWidgetName="FirstNameQuestion"
|
cmsWidgetName="FirstNameQuestion"
|
||||||
isRequired
|
isRequired
|
||||||
|
|
@ -33,6 +34,7 @@
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
ref="lastName"
|
ref="lastName"
|
||||||
v-model="bailoutPageModel.lastName"
|
v-model="bailoutPageModel.lastName"
|
||||||
|
class="mb-3"
|
||||||
inputId="lastNameField"
|
inputId="lastNameField"
|
||||||
cmsWidgetName="LastNameQuestion"
|
cmsWidgetName="LastNameQuestion"
|
||||||
isRequired
|
isRequired
|
||||||
|
|
@ -41,6 +43,7 @@
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
ref="phoneNumber"
|
ref="phoneNumber"
|
||||||
v-model="bailoutPageModel.phoneNumber"
|
v-model="bailoutPageModel.phoneNumber"
|
||||||
|
class="mb-3"
|
||||||
inputId="phoneNumberField"
|
inputId="phoneNumberField"
|
||||||
cmsWidgetName="PhoneNumberQuestion"
|
cmsWidgetName="PhoneNumberQuestion"
|
||||||
isRequired
|
isRequired
|
||||||
|
|
@ -50,6 +53,7 @@
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
ref="emailAddress"
|
ref="emailAddress"
|
||||||
v-model="bailoutPageModel.email"
|
v-model="bailoutPageModel.email"
|
||||||
|
class="mb-3"
|
||||||
inputId="emailAddressField"
|
inputId="emailAddressField"
|
||||||
cmsWidgetName="EmailAddressQuestion"
|
cmsWidgetName="EmailAddressQuestion"
|
||||||
isRequired
|
isRequired
|
||||||
|
|
@ -96,7 +100,7 @@ export default {
|
||||||
siteFooter,
|
siteFooter,
|
||||||
textboxQuestion,
|
textboxQuestion,
|
||||||
// eslint-disable-next-line vue/no-reserved-component-names
|
// eslint-disable-next-line vue/no-reserved-component-names
|
||||||
Form,
|
Form
|
||||||
},
|
},
|
||||||
mixins: [BaseFormMixin],
|
mixins: [BaseFormMixin],
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
|
|
@ -106,8 +110,8 @@ export default {
|
||||||
const promiseResultMap = [
|
const promiseResultMap = [
|
||||||
{
|
{
|
||||||
resultKey: 'cmsContent',
|
resultKey: 'cmsContent',
|
||||||
promise: cmsContentPromise,
|
promise: cmsContentPromise
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
// use resultMap to populate layout content.
|
// use resultMap to populate layout content.
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
|
@ -127,14 +131,14 @@ export default {
|
||||||
widget: {
|
widget: {
|
||||||
defaultSiteHeader: 'SiteSubHeaderWidget',
|
defaultSiteHeader: 'SiteSubHeaderWidget',
|
||||||
noTpa: 'ContentGroupNoTPAWidget',
|
noTpa: 'ContentGroupNoTPAWidget',
|
||||||
notSeeingPreferredShop: 'ContentGroupNotSeeingPreferredShop',
|
notSeeingPreferredShop: 'ContentGroupNotSeeingPreferredShop'
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
firstName: globalRules.FIRST_NAME_REQUIRED,
|
firstName: globalRules.FIRST_NAME_REQUIRED,
|
||||||
lastName: globalRules.LAST_NAME_REQUIRED,
|
lastName: globalRules.LAST_NAME_REQUIRED,
|
||||||
phoneNumber: `${globalRules.PHONE_NUMBER_REQUIRED}|${globalRules.PHONE_NUMBER_FORMAT}`,
|
phoneNumber: `${globalRules.PHONE_NUMBER_REQUIRED}|${globalRules.PHONE_NUMBER_FORMAT}`,
|
||||||
email: `${globalRules.EMAIL_ADDRESS_REQUIRED}|${globalRules.EMAIL_ADDRESS_FORMAT}`,
|
email: `${globalRules.EMAIL_ADDRESS_REQUIRED}|${globalRules.EMAIL_ADDRESS_FORMAT}`
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -185,7 +189,7 @@ export default {
|
||||||
},
|
},
|
||||||
phoneMask() {
|
phoneMask() {
|
||||||
return MaskaFormattedMasks.PHONE_NUMBER;
|
return MaskaFormattedMasks.PHONE_NUMBER;
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
|
|
@ -210,10 +214,10 @@ export default {
|
||||||
firstName: useMainStore().order.customer.firstName,
|
firstName: useMainStore().order.customer.firstName,
|
||||||
lastName: useMainStore().order.customer.lastName,
|
lastName: useMainStore().order.customer.lastName,
|
||||||
phoneNumber: useMainStore().order.customer.phoneNumber,
|
phoneNumber: useMainStore().order.customer.phoneNumber,
|
||||||
email: useMainStore().order.customer.emailAddress,
|
email: useMainStore().order.customer.emailAddress
|
||||||
};
|
};
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ export default {
|
||||||
name: 'contact-confirmation',
|
name: 'contact-confirmation',
|
||||||
components: {
|
components: {
|
||||||
siteHeader,
|
siteHeader,
|
||||||
siteSubHeader,
|
siteSubHeader
|
||||||
},
|
},
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
// Call APIs
|
// Call APIs
|
||||||
|
|
@ -38,8 +38,8 @@ export default {
|
||||||
const promiseResultMap = [
|
const promiseResultMap = [
|
||||||
{
|
{
|
||||||
resultKey: 'cmsContent',
|
resultKey: 'cmsContent',
|
||||||
promise: cmsContentPromise,
|
promise: cmsContentPromise
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
// use resultMap to populate layout content.
|
// use resultMap to populate layout content.
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
|
@ -53,18 +53,20 @@ export default {
|
||||||
return { mainStore };
|
return { mainStore };
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const contactConfirmationData = useMainStore().pageData(
|
const contactConfirmationData = useMainStore().pageData(issPageValues.CONTACT_CONFIRMATION);
|
||||||
issPageValues.CONTACT_CONFIRMATION
|
|
||||||
);
|
|
||||||
return {
|
return {
|
||||||
contactConfirmationModel: contactConfirmationData,
|
contactConfirmationModel: contactConfirmationData
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {},
|
methods: {}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '@/styles/bailout-common.scss';
|
.sub-header-content {
|
||||||
|
h5 {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -192,16 +192,10 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const loadingText = [
|
|
||||||
'Connecting to your insurance company',
|
|
||||||
'Nearly there',
|
|
||||||
'Finishing up'
|
|
||||||
];
|
|
||||||
|
|
||||||
if (!hasBailedOut) {
|
if (!hasBailedOut) {
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next((vm) => {
|
next((vm) => {
|
||||||
showIssLoadingModal(true, true, loadingText);
|
showIssLoadingModal(true);
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.setSupportingItems(resultMap.supportingItems);
|
vm.setSupportingItems(resultMap.supportingItems);
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<Form ref="theForm" @submit="onSubmit" @invalidSubmit="onInvalidSubmit">
|
<Form
|
||||||
|
ref="theForm"
|
||||||
|
@submit="onSubmit"
|
||||||
|
@invalidSubmit="onInvalidSubmit">
|
||||||
<div class="container-fluid fade-on-route-transition">
|
<div class="container-fluid fade-on-route-transition">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6 px-0 px-md-2">
|
<div class="col-md-6 px-0 px-md-2">
|
||||||
|
|
@ -13,7 +16,7 @@
|
||||||
<siteSubHeader
|
<siteSubHeader
|
||||||
id="sub-header"
|
id="sub-header"
|
||||||
cmsWidgetName="SiteSubHeader"
|
cmsWidgetName="SiteSubHeader"
|
||||||
class="mb-5 mt-4" />
|
class="mb-0 mt-4" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
|
|
@ -36,7 +39,9 @@
|
||||||
@forwardClicked="forwardButtonAction" />
|
@forwardClicked="forwardButtonAction" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<recalModal ref="recalModal" cmsWidgetName="RecalModal" />
|
<recalModal
|
||||||
|
ref="recalModal"
|
||||||
|
cmsWidgetName="RecalModal" />
|
||||||
<steeringModal
|
<steeringModal
|
||||||
ref="StateSteeringModal"
|
ref="StateSteeringModal"
|
||||||
cmsWidgetName="StateSteeringModal" />
|
cmsWidgetName="StateSteeringModal" />
|
||||||
|
|
@ -57,7 +62,7 @@
|
||||||
// Import Supporting Files
|
// Import Supporting Files
|
||||||
import {
|
import {
|
||||||
fetchCmsContentForPage,
|
fetchCmsContentForPage,
|
||||||
setupModalLinks,
|
setupModalLinks
|
||||||
} from '@/helpers/cms-content-helper';
|
} from '@/helpers/cms-content-helper';
|
||||||
import settleAllPromises from '@/helpers/layout-helper';
|
import settleAllPromises from '@/helpers/layout-helper';
|
||||||
import errorMessages from '@/constants/error-messages';
|
import errorMessages from '@/constants/error-messages';
|
||||||
|
|
@ -93,7 +98,7 @@ export default {
|
||||||
recalModal,
|
recalModal,
|
||||||
steeringModal,
|
steeringModal,
|
||||||
shopPreferenceModal,
|
shopPreferenceModal,
|
||||||
tpaRecalModal,
|
tpaRecalModal
|
||||||
},
|
},
|
||||||
mixins: [baseFormMixin],
|
mixins: [baseFormMixin],
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
|
|
@ -102,8 +107,8 @@ export default {
|
||||||
const promiseResultMap = [
|
const promiseResultMap = [
|
||||||
{
|
{
|
||||||
resultKey: 'cmsContent',
|
resultKey: 'cmsContent',
|
||||||
promise: cmsContentPromise,
|
promise: cmsContentPromise
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
next((vm) => {
|
next((vm) => {
|
||||||
|
|
@ -121,8 +126,8 @@ export default {
|
||||||
showSteeringLink: false,
|
showSteeringLink: false,
|
||||||
tpaAcknowledgement: false,
|
tpaAcknowledgement: false,
|
||||||
rules: {
|
rules: {
|
||||||
optionRequired: globalRules.OPTION_REQUIRED,
|
optionRequired: globalRules.OPTION_REQUIRED
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -132,19 +137,19 @@ export default {
|
||||||
prefAnswers() {
|
prefAnswers() {
|
||||||
const cmsAnswersContent = [
|
const cmsAnswersContent = [
|
||||||
{
|
{
|
||||||
cmsWidgetName: options.SAFELITE,
|
cmsWidgetName: options.SAFELITE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
cmsWidgetName: options.TPA,
|
cmsWidgetName: options.TPA
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
// if cms content has not yet loaded, skip
|
// if cms content has not yet loaded, skip
|
||||||
if (
|
if (
|
||||||
!this.getCmsContent(
|
!this.getCmsContent(
|
||||||
cmsAnswersContent[0].cmsWidgetName,
|
cmsAnswersContent[0].cmsWidgetName,
|
||||||
'HeaderText'
|
'HeaderText'
|
||||||
) ||
|
)
|
||||||
this.getCmsContent(
|
|| this.getCmsContent(
|
||||||
cmsAnswersContent[0].cmsWidgetName,
|
cmsAnswersContent[0].cmsWidgetName,
|
||||||
'HeaderText'
|
'HeaderText'
|
||||||
) === ''
|
) === ''
|
||||||
|
|
@ -154,22 +159,18 @@ export default {
|
||||||
const modifiedAnswers = cmsAnswersContent.map((answer) => ({
|
const modifiedAnswers = cmsAnswersContent.map((answer) => ({
|
||||||
value: answer.cmsWidgetName,
|
value: answer.cmsWidgetName,
|
||||||
buttonLabel: this.getHeaderTextFromCms(answer.cmsWidgetName),
|
buttonLabel: this.getHeaderTextFromCms(answer.cmsWidgetName),
|
||||||
buttonLabelSubCopy: this.getSubheaderTextFromCms(
|
buttonLabelSubCopy: this.getSubheaderTextFromCms(answer.cmsWidgetName),
|
||||||
answer.cmsWidgetName
|
buttonBodyCopy: this.getBodyTextFromCms(answer.cmsWidgetName)
|
||||||
),
|
|
||||||
buttonBodyCopy: this.getBodyTextFromCms(answer.cmsWidgetName),
|
|
||||||
}));
|
}));
|
||||||
return modifiedAnswers;
|
return modifiedAnswers;
|
||||||
},
|
},
|
||||||
ackError() {
|
ackError() {
|
||||||
return errorMessages.ACKNOWLEDGEMENT_REQUIRED;
|
return errorMessages.ACKNOWLEDGEMENT_REQUIRED;
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
setupModalLinks(this);
|
setupModalLinks(this);
|
||||||
const pageData = this.mainStore.pageData(
|
const pageData = this.mainStore.pageData(issPageValues.PROVIDER_PREFERENCE);
|
||||||
issPageValues.PROVIDER_PREFERENCE
|
|
||||||
);
|
|
||||||
this.selectedProvider = pageData?.selectedProvider
|
this.selectedProvider = pageData?.selectedProvider
|
||||||
? pageData.selectedProvider
|
? pageData.selectedProvider
|
||||||
: null;
|
: null;
|
||||||
|
|
@ -200,11 +201,9 @@ export default {
|
||||||
navigateWithTPAAck() {
|
navigateWithTPAAck() {
|
||||||
this.mainStore.saveProviderPreferenceData({
|
this.mainStore.saveProviderPreferenceData({
|
||||||
selectedProvider: this.selectedProvider,
|
selectedProvider: this.selectedProvider,
|
||||||
tpaAcknowledgement: this.tpaAcknowledgement,
|
tpaAcknowledgement: this.tpaAcknowledgement
|
||||||
});
|
});
|
||||||
this.navigateForward(
|
this.navigateForward(this.navigationScenarios.CLICKED_FORWARD_WITH_TPA_ENABLED);
|
||||||
this.navigationScenarios.CLICKED_FORWARD_WITH_TPA_ENABLED
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
forwardButtonAction() {
|
forwardButtonAction() {
|
||||||
if (this.selectedProvider) {
|
if (this.selectedProvider) {
|
||||||
|
|
@ -228,9 +227,7 @@ export default {
|
||||||
this.navigationScenarios
|
this.navigationScenarios
|
||||||
.CLICKED_FORWARD_WITH_TPA_ENABLED;
|
.CLICKED_FORWARD_WITH_TPA_ENABLED;
|
||||||
} else {
|
} else {
|
||||||
this.mainStore.setBailout(
|
this.mainStore.setBailout(bailoutMessage.TPANotEnabled());
|
||||||
bailoutMessage.TPANotEnabled()
|
|
||||||
);
|
|
||||||
scenario =
|
scenario =
|
||||||
this.navigationScenarios
|
this.navigationScenarios
|
||||||
.CLICKED_FORWARD_WITH_TPA_DISABLED;
|
.CLICKED_FORWARD_WITH_TPA_DISABLED;
|
||||||
|
|
@ -241,14 +238,14 @@ export default {
|
||||||
this.navigateForward(scenario);
|
this.navigateForward(scenario);
|
||||||
this.mainStore.saveProviderPreferenceData({
|
this.mainStore.saveProviderPreferenceData({
|
||||||
selectedProvider: this.selectedProvider,
|
selectedProvider: this.selectedProvider,
|
||||||
tpaAcknowledgement: this.tpaAcknowledgement,
|
tpaAcknowledgement: this.tpaAcknowledgement
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openStateSteeringModal() {
|
openStateSteeringModal() {
|
||||||
this.$refs.StateSteeringModal.openModal();
|
this.$refs.StateSteeringModal.openModal();
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue