diff --git a/src/components/debrief/DebriefPage.vue b/src/components/debrief/DebriefPage.vue index b6a02a7..1314b08 100644 --- a/src/components/debrief/DebriefPage.vue +++ b/src/components/debrief/DebriefPage.vue @@ -59,6 +59,7 @@ const DEBRIEF_QUESTIONS = [ 'label': 'Do you have any comments or questions for us?', 'help': 'Do you have any comments or questions for us?', 'placeholder': '...', + 'validation': '', 'rows:': 3, }, ]; @@ -67,7 +68,7 @@ const ID_TO_QUESTION = Object.fromEntries(DEBRIEF_QUESTIONS.map((question) => [q console.log(ID_TO_QUESTION) const answers = reactive(Object.fromEntries(DEBRIEF_QUESTIONS.map((question) => [question.id, '']))) -const complete = computed(() => Object.keys(answers).every((key) => (answers[key] !== '' && answers[key] !== 0) || ('invisible' in ID_TO_QUESTION[key]) )); +const complete = computed(() => Object.keys(answers).every((key) => (answers[key] !== '' && answers[key] !== 0) || ('invisible' in ID_TO_QUESTION[key]) || ('validation' in ID_TO_QUESTION[key] && !ID_TO_QUESTION[key].validation) )); function finish(goto) { smilestore.recordDebriefResponses(answers); @@ -81,10 +82,10 @@ function finish(goto) {