question page layout updates
This commit is contained in:
parent
ed8e20e6b8
commit
d82af3bdb1
2 changed files with 26 additions and 83 deletions
|
|
@ -19,60 +19,6 @@ jest.mock('@/helpers/cms-content-helper', () => ({
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function setupMocks() {
|
function setupMocks() {
|
||||||
// TODO: Use or delete these
|
|
||||||
const unused1 = () => ({
|
|
||||||
partsOrQuestions: [
|
|
||||||
{
|
|
||||||
parts: null,
|
|
||||||
partQuestions: [
|
|
||||||
{
|
|
||||||
questionSequence: 1,
|
|
||||||
questionText:
|
|
||||||
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
|
||||||
answers: [
|
|
||||||
{
|
|
||||||
answerResult: '',
|
|
||||||
answerText: 'Yes',
|
|
||||||
nextQuestionSequence: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
answerResult: '',
|
|
||||||
answerText: 'No',
|
|
||||||
nextQuestionSequence: 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
glassLocation: 'Windshield',
|
|
||||||
glassName: 'Single',
|
|
||||||
answerKey: 'Windshield-Single',
|
|
||||||
answerData: null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
const unused2 = () => ({
|
|
||||||
partsQuestionAnswers: [
|
|
||||||
{
|
|
||||||
glassLocation: 'Windshield',
|
|
||||||
glassName: 'Single',
|
|
||||||
result: 'FW04848',
|
|
||||||
answeredQuestions: [
|
|
||||||
{
|
|
||||||
questionText:
|
|
||||||
'Is your vehicle equipped with the Panoramic Sunroof which can be identified by having a glass panel over the rear seats?',
|
|
||||||
selectedAnswerText: 'Yes',
|
|
||||||
questionNum: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
questionText:
|
|
||||||
'Is your vehicle equipped with a heated windshield that melts snow and ice from underneath the windshield wiper blades?',
|
|
||||||
selectedAnswerText: 'Yes',
|
|
||||||
questionNum: 2
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
const mountOptions = getMountOptions({
|
const mountOptions = getMountOptions({
|
||||||
mixins: [baseMixin, vehicleQuestionsMixin]
|
mixins: [baseMixin, vehicleQuestionsMixin]
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container-fluid fade-on-route-transition">
|
<div class="fade-on-route-transition">
|
||||||
<div class="row justify-content-center">
|
<div class="justify-content-center">
|
||||||
<div class="col-md-6 px-0 px-md-2">
|
|
||||||
<loadingModal ref="loadingModal" :textSlides="loadingText" />
|
|
||||||
<siteHeader cmsWidgetName="SiteHeaderWidget" />
|
<siteHeader cmsWidgetName="SiteHeaderWidget" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="iss-heritage-container-width">
|
||||||
<div class="row justify-content-center">
|
<div class="questions-page-layout-container iss-heritage-content-container-width">
|
||||||
<div class="col-md-6 col-xl-4">
|
<siteSubHeader
|
||||||
<vehicleBanner
|
class="mt-4"
|
||||||
class="mt-2 mb-4"
|
cmsWidgetName="SiteSubHeaderWidget" />
|
||||||
cmsWidgetName="VehicleBannerWidget"
|
|
||||||
:displayGenericVehicleImage="false" />
|
|
||||||
<siteSubHeader cmsWidgetName="SiteSubHeaderWidget" />
|
|
||||||
<alert
|
<alert
|
||||||
ref="alertFewMoreQuestions"
|
ref="alertFewMoreQuestions"
|
||||||
cmsWidgetName="alertWidget"
|
cmsWidgetName="alertWidget"
|
||||||
|
|
@ -48,23 +43,19 @@
|
||||||
<script>
|
<script>
|
||||||
// Components
|
// Components
|
||||||
import siteHeader from '@/iss-components/site-header/site-header.vue';
|
import siteHeader from '@/iss-components/site-header/site-header.vue';
|
||||||
import vehicleBanner from '@/iss-components/vehicle-banner/vehicle-banner.vue';
|
|
||||||
import alert from '@/ux-components/alert/alert.vue';
|
import alert from '@/ux-components/alert/alert.vue';
|
||||||
import questionChain from '@/digital-components/question-chain/question-chain.vue';
|
import questionChain from '@/digital-components/question-chain/question-chain.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 loadingModal from '@/iss-components/loading-modal/loading-modal.vue';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'questions-page',
|
name: 'questions-page',
|
||||||
components: {
|
components: {
|
||||||
siteHeader,
|
siteHeader,
|
||||||
vehicleBanner,
|
|
||||||
alert,
|
alert,
|
||||||
questionChain,
|
questionChain,
|
||||||
siteSubHeader,
|
siteSubHeader,
|
||||||
siteFooter,
|
siteFooter
|
||||||
loadingModal,
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
isMetaValid: Boolean,
|
isMetaValid: Boolean,
|
||||||
|
|
@ -74,7 +65,7 @@ export default {
|
||||||
validationRules: String,
|
validationRules: String,
|
||||||
modelValue: Object,
|
modelValue: Object,
|
||||||
loadingText: Array,
|
loadingText: Array,
|
||||||
index: Number,
|
index: Number
|
||||||
},
|
},
|
||||||
emits: ['update:modelValue', 'forwardButtonAction', 'back-click'],
|
emits: ['update:modelValue', 'forwardButtonAction', 'back-click'],
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -84,16 +75,16 @@ export default {
|
||||||
},
|
},
|
||||||
set(newValue) {
|
set(newValue) {
|
||||||
this.$emit('update:modelValue', newValue);
|
this.$emit('update:modelValue', newValue);
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showThisQuestionChain(glass, i) {
|
showThisQuestionChain(glass, i) {
|
||||||
// return false if no questions or if suppressed
|
// return false if no questions or if suppressed
|
||||||
if (
|
if (
|
||||||
!glass.questions ||
|
!glass.questions
|
||||||
glass.questions?.length < 1 ||
|
|| glass.questions?.length < 1
|
||||||
glass.isSuppressedPart
|
|| glass.isSuppressedPart
|
||||||
) {
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -106,15 +97,21 @@ export default {
|
||||||
},
|
},
|
||||||
handleBackButtonAction() {
|
handleBackButtonAction() {
|
||||||
this.$emit('back-click');
|
this.$emit('back-click');
|
||||||
},
|
}
|
||||||
showLoadingModal() {
|
}
|
||||||
this.$refs.loadingModal.showModal();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.iss-heritage-container-width {
|
||||||
|
.questions-page-layout-container {
|
||||||
|
position: relative;
|
||||||
|
min-height: 1px;
|
||||||
|
padding-left: .9375rem;
|
||||||
|
padding-right: .9375rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.questions-page {
|
.questions-page {
|
||||||
.question-text {
|
.question-text {
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue