Also improves how buttons are shown with the missing files.
This commit is contained in:
@@ -3,6 +3,7 @@ import { computed } from 'vue'
|
||||
import { Head, useForm } from '@inertiajs/vue3'
|
||||
import AppLayout from '@/Layouts/AppLayout.vue'
|
||||
import AppButton from '@/Components/AppButton.vue'
|
||||
import RadioButtonGroup from '@/Components/RadioButtonGroup.vue'
|
||||
|
||||
defineOptions({ layout: AppLayout })
|
||||
|
||||
@@ -54,30 +55,14 @@ const allAnswered = computed(() => {
|
||||
<span class="text-gray-400 font-mono text-sm mt-1 shrink-0">{{ index + 1 }}.</span>
|
||||
<div class="flex-1">
|
||||
<p class="text-white mb-3">{{ question }}</p>
|
||||
<div class="flex gap-4">
|
||||
<label class="flex items-center gap-2 cursor-pointer">
|
||||
<input
|
||||
type="radio"
|
||||
:name="`question-${index + 1}`"
|
||||
value="yes"
|
||||
v-model="form.answers[index + 1]"
|
||||
class="w-4 h-4 text-primary bg-surface border-gray-600 focus:ring-primary focus:ring-offset-surface"
|
||||
data-cy="yes"
|
||||
/>
|
||||
<span class="text-white">Yes</span>
|
||||
</label>
|
||||
<label class="flex items-center gap-2 cursor-pointer">
|
||||
<input
|
||||
type="radio"
|
||||
:name="`question-${index + 1}`"
|
||||
value="no"
|
||||
v-model="form.answers[index + 1]"
|
||||
class="w-4 h-4 text-primary bg-surface border-gray-600 focus:ring-primary focus:ring-offset-surface"
|
||||
data-cy="no"
|
||||
/>
|
||||
<span class="text-white">No</span>
|
||||
</label>
|
||||
</div>
|
||||
<RadioButtonGroup
|
||||
v-model="form.answers[index + 1]"
|
||||
:name="`question-${index + 1}`"
|
||||
:options="[
|
||||
{ value: 'yes', label: 'Yes' },
|
||||
{ value: 'no', label: 'No' },
|
||||
]"
|
||||
/>
|
||||
<p v-if="form.errors[`answers.${index + 1}`]" class="text-red-500 text-sm mt-1">
|
||||
{{ form.errors[`answers.${index + 1}`] }}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user