Fixing filter functionality
This commit is contained in:
parent
dd6d7cda06
commit
b2b874e988
3 changed files with 6 additions and 3 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="damage-location-question">
|
<div class="damage-location-question">
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
v-if="answersToDisplay.length > 1"
|
|
||||||
:questionText="questionText"
|
:questionText="questionText"
|
||||||
isMultiSelect
|
isMultiSelect
|
||||||
:answers="answersToDisplay"
|
:answers="answersToDisplay"
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ export default ({
|
||||||
? this.answersFromCms.filter(ans =>
|
? this.answersFromCms.filter(ans =>
|
||||||
{
|
{
|
||||||
const name = ans.Name.split('-');
|
const name = ans.Name.split('-');
|
||||||
return this.filterByVehicleCategory ? name[0].toUpperCase() === store.getters.vehicle.category : name[0].toUpperCase() === store.getters.vehicle.category && this.replaceOptions.includes(name[1])
|
return this.filterByVehicleCategory ? name[0].toUpperCase() === store.getters.vehicle.category && this.replaceOptions.includes(name[1]) : this.replaceOptions.includes(ans.Name);
|
||||||
})
|
})
|
||||||
: [];
|
: [];
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
<vehicleBanner ref="vehicleBanner" :displayGenericVehicleImage=false />
|
<vehicleBanner ref="vehicleBanner" :displayGenericVehicleImage=false />
|
||||||
<funnelSubHeader ref="funnelSubHeader" />
|
<funnelSubHeader ref="funnelSubHeader" />
|
||||||
<damageLocationQuestion ref="damageLocation" v-model="selectedDamageLocations" groupName="DamageLocationQuestion" />
|
<damageLocationQuestion ref="damageLocation" v-model="selectedDamageLocations" groupName="DamageLocationQuestion" />
|
||||||
<replaceOptionsQuestion ref="driverSideOptions" isAvailable v-model="driverSideOptionsData" groupName="DriverSideReplaceOptionsQuestion" />
|
<replaceOptionsQuestion ref="driverSideOptions" isAvailable filterByVehicleCategory v-model="driverSideOptionsData" groupName="DriverSideReplaceOptionsQuestion" />
|
||||||
|
<replaceOptionsQuestion ref="windshieldOptions" isAvailable groupName="windshieldOptions" />
|
||||||
<funnelFooter ref="funnelFooter" @back-clicked="backButtonAction" />
|
<funnelFooter ref="funnelFooter" @back-clicked="backButtonAction" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -68,6 +69,9 @@ export default {
|
||||||
vm.$refs.damageLocation.initializeComponent(
|
vm.$refs.damageLocation.initializeComponent(
|
||||||
resultMap.cmsContent.DamageLocationQuestion, resultMap.damageOptions
|
resultMap.cmsContent.DamageLocationQuestion, resultMap.damageOptions
|
||||||
);
|
);
|
||||||
|
vm.$refs.windshieldOptions.initializeComponent(
|
||||||
|
resultMap.cmsContent.WindshieldReplaceOptionsQuestion, resultMap.damageOptions.windshieldOptions.availableReplacementOptions
|
||||||
|
);
|
||||||
vm.$refs.funnelFooter.initializeComponent(
|
vm.$refs.funnelFooter.initializeComponent(
|
||||||
resultMap.cmsContent.FunnelFooterWidget
|
resultMap.cmsContent.FunnelFooterWidget
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue