fixing bugs

This commit is contained in:
2026-02-16 15:09:41 +01:00
parent c39b8085af
commit fb1c28a0ba
14 changed files with 238 additions and 19 deletions

View File

@@ -118,8 +118,8 @@ const validate = () => {
return
}
// Rule 3: Text-only questions (no radio buttons, has details)
if (!hasRadioButtons && question.details && !answer.text_value?.trim()) {
// Rule 3: Text-only questions (no radio buttons, has required details)
if (!hasRadioButtons && question.details && question.details !== 'optional' && !answer.text_value?.trim()) {
errors[question.id] = 'Please enter a response'
return
}
@@ -161,7 +161,9 @@ const completeSession = async () => {
}
completing = true
clearTimeout(saveTimeout)
router.put(`/sessions/${props.session.id}`, {
answers: { ...answerData },
complete: true,
})
}