Merge pull request #1653 from Safelite/feature/CSR-1610-bugfix-ajc

CSR-1610 fixes to questions pages
This commit is contained in:
AdamCaouetteSafelite 2023-12-20 15:18:16 -05:00 committed by GitHub
commit 788b227962
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 11 deletions

View file

@ -8,7 +8,7 @@
:questionText="q.questionText" :questionText="q.questionText"
:answers="q.answers" :answers="q.answers"
:groupName="`question-${index}-${q.questionSequence}`" :groupName="`question-${index}-${q.questionSequence}`"
:modelValue="q.answerSelected" v-model="q.answerSelected"
@update:modelValue="handleAnswer(q, $event)" @update:modelValue="handleAnswer(q, $event)"
isRequired isRequired
:validationRules="validationRules" /> :validationRules="validationRules" />

View file

@ -75,14 +75,9 @@ export default {
index: Number, index: Number,
}, },
computed: { computed: {
selectedAnswers: { selectedAnswers() {
get() {
return this.modelValue; return this.modelValue;
}, },
set(newValue) {
this.$emit("update:modelValue", newValue);
},
},
}, },
methods: { methods: {
showThisQuestionChain(glass, i) { showThisQuestionChain(glass, i) {

View file

@ -341,10 +341,10 @@ export default {
}; };
// this part has been fully answered, so advance to next part's question chain // this part has been fully answered, so advance to next part's question chain
for (let i = answer.index + 1; i < this.questionsData.length; i++) { for (let i = answer.index + 1; i < self.questionsData.length; i++) {
// if this part has not yet been fully answered, then make it the current part // if this part has not yet been fully answered, then make it the current part
if (!this.questionsData[i].answerData?.answerResult) { if (!self.questionsData[i].answerData?.answerResult) {
this.currentGlassIndex = i; self.currentGlassIndex = i;
break; break;
} }
} }