Merge pull request #236 from Safelite/feature/CSR-269

Feature/csr 269
This commit is contained in:
CarlNation 2022-02-21 16:21:57 -05:00 committed by GitHub
commit d653ab7290
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,16 +27,6 @@ import windshieldChipCountQuestion from"@/layouts/vehicle-damage/windshield-opti
import replaceOptionsQuestion from"@/layouts/vehicle-damage/replace-options-question/replace-options-question";
export default ({
name: "windshieldOptions",
data(){
return {
chipCountQuestionText: String,
chipCountAnswersFromCms: Array,
selectedWindshieldDamageType: null,
selectedWindshieldChipCount: null,
selectedWindshieldReplaceOptions: [],
}
},
props: {
modelValue: Array,
@ -50,9 +40,6 @@ export default ({
initializeComponent(windshieldDamageTypeQuestionFromCms, windshieldChipCountQuestionFromCms,
windshieldReplaceOptionsQuestionFromCms, windshieldAvailableReplacementOptions){
this.chipCountQuestionText = windshieldChipCountQuestionFromCms.QuestionText;
this.chipCountAnswersFromCms = windshieldChipCountQuestionFromCms.Answers;
this.$refs.windshieldDamageTypeQuestion.initializeComponent(windshieldDamageTypeQuestionFromCms);
this.$refs.windshieldChipCountQuestion.initializeComponent(windshieldChipCountQuestionFromCms);
this.$refs.replaceOptionsQuestion.initializeComponent(windshieldReplaceOptionsQuestionFromCms, windshieldAvailableReplacementOptions);
@ -79,9 +66,7 @@ export default ({
return this.selectedValues.selectedWindshieldDamageType;
},
set: function(newValue) {
this.selectedValues.selectedWindshieldChipCount = null;
this.selectedValues.selectedWindshieldReplaceOptions = null;
this.selectedValues = this.getWindshieldOptions(newValue, this.selectedWindshieldChipCountValues, this.selectedWindshieldReplaceOptionsValues);
this.selectedValues = this.getWindshieldOptions(newValue, null, null);
}
},
selectedWindshieldChipCountValues: {
@ -89,8 +74,7 @@ export default ({
return this.selectedValues.selectedChipCount;
},
set: function(newValue) {
this.selectedValues.selectedWindshieldReplaceOptions = null;
this.selectedValues = this.getWindshieldOptions(this.selectedWindshieldDamageTypeValues, newValue, this.selectedWindshieldReplaceOptionsValues);
this.selectedValues = this.getWindshieldOptions(this.selectedWindshieldDamageTypeValues, newValue, null);
}
},
selectedWindshieldReplaceOptionsValues: {
@ -98,8 +82,7 @@ export default ({
return this.selectedValues.selectedWindshieldReplaceOptions;
},
set: function(newValue) {
this.selectedValues.selectedWindshieldChipCount = null;
this.selectedValues = this.getWindshieldOptions(this.selectedWindshieldDamageTypeValues, this.selectedWindshieldChipCountValues, newValue);
this.selectedValues = this.getWindshieldOptions(this.selectedWindshieldDamageTypeValues, null, newValue);
}
},
isWindshieldDamageLocation() {