Display: - Replace TeacherBar component with BaseAvatarList component - refs BT#21657

pull/5788/head
Angel Fernando Quiroz Campos 2 months ago
parent 0e44601671
commit d51b488329
No known key found for this signature in database
GPG Key ID: B284841AE3E562CD
  1. 42
      assets/vue/components/TeacherBar.vue
  2. 4
      assets/vue/components/course/CourseCard.vue
  3. 1
      assets/vue/views/course/CatalogueCourses.vue

@ -1,42 +0,0 @@
<template>
<div
class="teacher-bar"
:class="{ 'teacher-bar--simple': isSimpleLayout }"
>
<div
v-for="user in teachers"
:key="user.id"
class="teacher-bar__item"
>
<BaseUserAvatar
:image-url="`${user.illustrationUrl}?w=80&h=80&fit=crop`"
:alt="t('Teacher profile picture')"
class="mr-2"
/>
<div
v-if="isSimpleLayout"
class="teacher-bar__item-caption"
>
<span v-text="user.fullName" />
<span v-t="'Coach'" />
</div>
</div>
</div>
</template>
<script setup>
import BaseUserAvatar from "./basecomponents/BaseUserAvatar.vue"
import { useI18n } from "vue-i18n"
const { t } = useI18n()
// eslint-disable-next-line no-undef
const props = defineProps({
teachers: {
required: true,
type: Array,
},
})
const isSimpleLayout = props.teachers.length < 3
</script>

@ -51,14 +51,14 @@
</div>
</template>
<template #footer>
<TeacherBar :teachers="teachers" />
<BaseAvatarList :users="teachers" />
</template>
</Card>
</template>
<script setup>
import Card from "primevue/card"
import TeacherBar from "../TeacherBar"
import BaseAvatarList from "../basecomponents/BaseAvatarList.vue"
import { computed } from "vue"
import { isEmpty } from "lodash"
import { useFormatDate } from "../../composables/formatDate"

@ -173,7 +173,6 @@ import Button from "primevue/button"
import DataTable from "primevue/datatable"
import Column from "primevue/column"
import Rating from "primevue/rating"
import TeacherBar from "../../components/TeacherBar.vue"
import { usePlatformConfig } from "../../store/platformConfig"
const status = ref(null)

Loading…
Cancel
Save