Fixes to damage location component
This commit is contained in:
parent
17e05dcf66
commit
47a7fdd149
3 changed files with 9 additions and 14 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
v-if="answersToDisplay.length > 1"
|
v-if="answersToDisplay.length > 1"
|
||||||
:questionText="questionText"
|
:questionText="questionText"
|
||||||
:isMultiSelect="isMultiSelect"
|
isMultiSelect
|
||||||
:answers="answersToDisplay"
|
:answers="answersToDisplay"
|
||||||
:groupName="groupName"
|
:groupName="groupName"
|
||||||
buttonType="listCard"
|
buttonType="listCard"
|
||||||
|
|
@ -31,8 +31,7 @@ export default ({
|
||||||
modelValue: Array,
|
modelValue: Array,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initializeComponent(cmsContent, damageOptions, groupName){
|
initializeComponent(cmsContent, damageOptions){
|
||||||
this.groupName = groupName;
|
|
||||||
this.questionText = cmsContent.QuestionText;
|
this.questionText = cmsContent.QuestionText;
|
||||||
this.answersFromCms = cmsContent.Answers;
|
this.answersFromCms = cmsContent.Answers;
|
||||||
this.damageOptions = damageOptions;
|
this.damageOptions = damageOptions;
|
||||||
|
|
@ -51,7 +50,7 @@ export default ({
|
||||||
return {
|
return {
|
||||||
Windshield: true,
|
Windshield: true,
|
||||||
SideDoor: this.damageOptions.driverSideOptions.availableReplacementOptions || this.damageOptions.passengerSideOptions.availableReplacementOption ? true : false,
|
SideDoor: this.damageOptions.driverSideOptions.availableReplacementOptions || this.damageOptions.passengerSideOptions.availableReplacementOption ? true : false,
|
||||||
RearWindow: this.damageOptions.backGlassOptions.availableReplacementOption ? true : false,
|
RearWindow: this.damageOptions.backGlassOptions.availableReplacementOptions ? true : false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
answersToDisplay(){
|
answersToDisplay(){
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,7 @@ export default ({
|
||||||
modelValue: Array,
|
modelValue: Array,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initializeComponent(cmsContent, replaceOptions, groupName){
|
initializeComponent(cmsContent, replaceOptions){
|
||||||
this.groupName = groupName;
|
|
||||||
this.questionText = cmsContent.QuestionText;
|
this.questionText = cmsContent.QuestionText;
|
||||||
this.answersFromCms = cmsContent.Answers;
|
this.answersFromCms = cmsContent.Answers;
|
||||||
this.replaceOptions = replaceOptions;
|
this.replaceOptions = replaceOptions;
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
<funnelHeader ref="funnelHeader" />
|
<funnelHeader ref="funnelHeader" />
|
||||||
<vehicleBanner ref="vehicleBanner" :displayGenericVehicleImage=false />
|
<vehicleBanner ref="vehicleBanner" :displayGenericVehicleImage=false />
|
||||||
<funnelSubHeader ref="funnelSubHeader" :hasSubText=true />
|
<funnelSubHeader ref="funnelSubHeader" :hasSubText=true />
|
||||||
<damageLocationQuestion ref="damageLocation" v-model="damageLocationQuestionData" />
|
<damageLocationQuestion ref="damageLocation" v-model="selectedDamageLocations" groupName="DamageLocationQuestion" />
|
||||||
<replaceOptionsQuestion ref="driverSideOptions" isAvailable isMultiSelect v-model="driverSideOptionsData" />
|
<replaceOptionsQuestion ref="driverSideOptions" isAvailable v-model="driverSideOptionsData" groupName="DriverSideReplaceOptionsQuestion" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -60,19 +60,16 @@ export default {
|
||||||
resultMap.cmsContent.FunnelSubHeaderWidget
|
resultMap.cmsContent.FunnelSubHeaderWidget
|
||||||
);
|
);
|
||||||
vm.$refs.driverSideOptions.initializeComponent(
|
vm.$refs.driverSideOptions.initializeComponent(
|
||||||
resultMap.cmsContent.DriverSideReplaceOptionsQuestion, resultMap.damageOptions.driverSideOptions.availableReplacementOptions, 'DriverSideReplaceOptionsQuestion'
|
resultMap.cmsContent.DriverSideReplaceOptionsQuestion, resultMap.damageOptions.driverSideOptions.availableReplacementOptions
|
||||||
);
|
);
|
||||||
vm.$refs.damageLocation.initializeComponent(
|
vm.$refs.damageLocation.initializeComponent(
|
||||||
resultMap.cmsContent.DamageLocationQuestion, resultMap.damageOptions, 'DamageLocationQuestion'
|
resultMap.cmsContent.DamageLocationQuestion, resultMap.damageOptions
|
||||||
);
|
);
|
||||||
|
|
||||||
// for damageOptions and cms content data
|
|
||||||
//console.log(resultMap)
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
damageLocationQuestionData: [],
|
selectedDamageLocations: [],
|
||||||
driverSideOptionsData: [],
|
driverSideOptionsData: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue