Skip to content

Commit

Permalink
fix: issues with exam view questions not scrolling
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <[email protected]>
  • Loading branch information
galexrt committed Dec 28, 2024
1 parent 65c142c commit 052f706
Showing 1 changed file with 32 additions and 30 deletions.
62 changes: 32 additions & 30 deletions app/components/qualifications/exam/ExamViewQuestions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -244,35 +244,37 @@ const onSubmitThrottle = useThrottleFn(async (event: FormSubmitEvent<Schema>) =>
</template>
</UDashboardToolbar>

<UForm ref="form" :schema="schema" :state="state" @submit="onSubmitThrottle">
<UCard>
<UContainer>
<div class="flex flex-col gap-4">
<ExamViewQuestion
v-for="(question, idx) in exam.questions"
:key="question.id"
v-model="state.responses[idx]"
:disabled="disabled"
>
<template #question-after>
<slot name="question-after" :question="{ question }" />
</template>
</ExamViewQuestion>
</div>
</UContainer>
<UDashboardPanelContent class="p-0">
<UForm ref="form" :schema="schema" :state="state" @submit="onSubmitThrottle">
<UCard :ui="{ rounded: '' }">
<UContainer>
<div class="flex flex-col gap-4">
<ExamViewQuestion
v-for="(question, idx) in exam.questions"
:key="question.id"
v-model="state.responses[idx]"
:disabled="disabled"
>
<template #question-after>
<slot name="question-after" :question="{ question }" />
</template>
</ExamViewQuestion>
</div>
</UContainer>

<template v-if="!disabled" #footer>
<UButton
type="submit"
icon="i-mdi-save-content"
block
class="w-full"
:disabled="!canSubmit"
:loading="!canSubmit"
>
{{ $t('common.submit') }}
</UButton>
</template>
</UCard>
</UForm>
<template v-if="!disabled" #footer>
<UButton
type="submit"
icon="i-mdi-save-content"
block
class="w-full"
:disabled="!canSubmit"
:loading="!canSubmit"
>
{{ $t('common.submit') }}
</UButton>
</template>
</UCard>
</UForm>
</UDashboardPanelContent>
</template>

0 comments on commit 052f706

Please sign in to comment.