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