CSR-762 Preselects windshield damage
This commit is contained in:
parent
a7a4791011
commit
ce46cf4ea6
6 changed files with 22 additions and 9 deletions
|
|
@ -82,7 +82,8 @@ export default {
|
|||
mounted() {
|
||||
console.log({
|
||||
isChecked: this.isChecked,
|
||||
modelValue: this.modelValue
|
||||
modelValue: this.modelValue,
|
||||
value: this.value
|
||||
})
|
||||
|
||||
this.handleChange(this.modelValue)
|
||||
|
|
@ -237,7 +238,7 @@ export default {
|
|||
computed: {
|
||||
isChecked() {
|
||||
if (this.isMultiSelect && this.modelValue instanceof Array) {
|
||||
this.modelValue.includes(this.value);
|
||||
return this.modelValue.includes(this.value);
|
||||
}
|
||||
return this.modelValue === this.value;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<div class="damage-location-question">
|
||||
DLQ selectedValue: {{selectedValue}}
|
||||
<buttonQuestion
|
||||
:questionText="questionText"
|
||||
isMultiSelect
|
||||
|
|
|
|||
|
|
@ -48,8 +48,10 @@ export default ({
|
|||
updateSelectedValues() {
|
||||
// UPDATE SELECTEDVALUES IF ONLY ONE ANSWER
|
||||
// ex: BackGlass stationary
|
||||
// console.log(this.answersToDisplay)
|
||||
if(Array.isArray(this.answersToDisplay) && this.answersToDisplay.length === 1) {
|
||||
this.selectedValue = [this.answersToDisplay[0].Name];
|
||||
console.log("HIIIIII2", this.selectedValue)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
alertClass="alert-warning"
|
||||
:isDismissible="false"
|
||||
/>
|
||||
selectedDamageLocations: {{selectedDamageLocations}}
|
||||
selectedDamageLocations: {{selectedDamageLocations}} <br/>
|
||||
|
||||
<damageLocationQuestion
|
||||
ref="damageLocation"
|
||||
cmsWidgetName="DamageLocationQuestion"
|
||||
|
|
@ -129,9 +130,9 @@ export default {
|
|||
// vm.$refs.sideDoorOptions.initializeComponent(
|
||||
// resultMap.damageOptions.driverSideOptions.availableReplacementOptions, resultMap.damageOptions.passengerSideOptions.availableReplacementOptions
|
||||
// );
|
||||
// vm.$refs.windshieldOptions.initializeComponent(
|
||||
// resultMap.damageOptions.windshieldOptions.availableReplacementOptions
|
||||
// );
|
||||
vm.$refs.windshieldOptions.initializeComponent(
|
||||
resultMap.damageOptions.windshieldOptions.availableReplacementOptions
|
||||
);
|
||||
// vm.$refs.backGlassOptions.initializeComponent(
|
||||
// resultMap.damageOptions.backGlassOptions.availableReplacementOptions
|
||||
// );
|
||||
|
|
@ -287,6 +288,7 @@ export default {
|
|||
selectedWindshieldChipCount: this.selectedWindshieldOptions.selectedWindshieldChipCount
|
||||
}, false);
|
||||
|
||||
console.log(this.selectedGlassToReplace())
|
||||
return this.navigateForward();
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@
|
|||
v-model="selectedWindshieldChipCountValues"
|
||||
validationRules="windshield-chip-count-required"
|
||||
/>
|
||||
<!--
|
||||
|
||||
WO selectedWindshieldReplaceOptionsValues: {{selectedWindshieldReplaceOptionsValues}}
|
||||
<replaceOptionsQuestion ref="replaceOptionsQuestion" cmsWidgetName="WindshieldReplaceOptionsQuestion"
|
||||
:isAvailable="isReplaceOptionSelected"
|
||||
isMultiSelect
|
||||
|
|
@ -31,7 +32,7 @@
|
|||
validationRules="windshield-replace-options-required|prevent-split-and-single-together"
|
||||
:suppressError="hasSplitSingleConflict"
|
||||
isRequired
|
||||
/> -->
|
||||
/>
|
||||
<alert
|
||||
v-if="hasSplitSingleConflict"
|
||||
class="mt-5"
|
||||
|
|
@ -112,6 +113,7 @@ export default ({
|
|||
return this.modelValue;
|
||||
},
|
||||
set: function(newValue) {
|
||||
// console.log("HIIII", newValue)
|
||||
this.$emit("update:modelValue", newValue);
|
||||
}
|
||||
},
|
||||
|
|
@ -136,6 +138,7 @@ export default ({
|
|||
return this.selectedValues.selectedWindshieldReplaceOptions;
|
||||
},
|
||||
set: function(newValue) {
|
||||
console.log("HIIII", newValue)
|
||||
this.selectedValues = this.getWindshieldOptions(this.selectedWindshieldDamageTypeValue, null, newValue);
|
||||
}
|
||||
},
|
||||
|
|
@ -181,7 +184,7 @@ export default ({
|
|||
components: {
|
||||
windshieldDamageTypeQuestion,
|
||||
windshieldChipCountQuestion,
|
||||
// replaceOptionsQuestion,
|
||||
replaceOptionsQuestion,
|
||||
alert,
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@ export default {
|
|||
selectedValue: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log("MOUNTED: ", this.modelValue)
|
||||
this.selectedValue = this.modelValue;
|
||||
},
|
||||
watch: {
|
||||
selectedValue(selectedValue) {
|
||||
console.log("selectedValue: ", selectedValue)
|
||||
|
|
|
|||
Loading…
Reference in a new issue