fix: UX/styling improvements based on PR feedback

This commit is contained in:
Livio Bieri 2024-03-06 20:20:06 +01:00
parent 2b92928060
commit 42211db6ed
2 changed files with 18 additions and 14 deletions

View File

@ -131,7 +131,9 @@ onUnmounted(() => {
:show-start-button="false"
:show-previous-button="showPreviousButton"
:base-url="props.learningUnit.evaluate_url"
:close-button-variant="learningUnitHasFeedbackPage ? 'close' : 'mark_as_done'"
:close-button-variant="
learningUnitHasFeedbackPage || isReadOnly ? 'close' : 'mark_as_done'
"
:end-badge-text="
learningUnitHasFeedbackPage ? $t('general.submission') : undefined
"

View File

@ -36,10 +36,10 @@ const selectDetails = () => {
<template>
<CockpitProfileContent>
<template #side>
<div v-for="(entry, index) in MENU_ENTRIES" :key="index" class="mb-4">
<div v-for="(entry, index) in MENU_ENTRIES" :key="index" class="mb-2">
<button
class="flex w-full items-center space-x-2 p-2 pr-4 hover:bg-gray-200 lg:pr-8"
:class="{ 'bg-gray-200': active.type === entry.type }"
class="flex w-full items-center space-x-2 p-2 pr-4 text-blue-900 hover:bg-gray-200 lg:pr-8"
:class="{ 'text-bold bg-gray-200': active.type === entry.type }"
@click="active = entry"
>
<span>{{ $t(entry.label) }}</span>
@ -47,16 +47,18 @@ const selectDetails = () => {
</div>
</template>
<template #main>
<SelfEvaluationAndFeedbackOverview
v-if="active.type === 'OVERVIEW'"
:profile-user-id="props.userId"
@show-all="selectDetails"
/>
<SelfEvaluationAndFeedbackList
v-else-if="active.type === 'DETAILS'"
class="w-full"
:profile-user-id="props.userId"
/>
<div class="container-large">
<SelfEvaluationAndFeedbackOverview
v-if="active.type === 'OVERVIEW'"
:profile-user-id="props.userId"
@show-all="selectDetails"
/>
<SelfEvaluationAndFeedbackList
v-else-if="active.type === 'DETAILS'"
class="w-full"
:profile-user-id="props.userId"
/>
</div>
</template>
</CockpitProfileContent>
</template>