fix: скрыл информацию о студенте если её нет
This commit is contained in:
@@ -12,6 +12,18 @@ import EmptyState from '@/components/ui/EmptyState.vue'
|
||||
const auth = useAuthStore()
|
||||
const userStore = useUserStore()
|
||||
const user = computed(() => auth.user!)
|
||||
|
||||
const userMetaLine = computed(() => {
|
||||
const parts: string[] = []
|
||||
if (user.value.institute) parts.push(user.value.institute)
|
||||
if (user.value.direction) parts.push(user.value.direction)
|
||||
return parts.join(' · ')
|
||||
})
|
||||
|
||||
const userYearLine = computed(() => {
|
||||
const year = user.value.year
|
||||
return year === null || year === undefined ? '' : `${year} курс`
|
||||
})
|
||||
const interestTags = ref([
|
||||
{ label: '#ML', active: true },
|
||||
{ label: '#ИИ', active: true },
|
||||
@@ -48,8 +60,8 @@ onMounted(() => {
|
||||
<div>
|
||||
<div class="name">{{ user.name }}</div>
|
||||
<div class="email">{{ user.email }}</div>
|
||||
<div class="meta">{{ user.institute }} · {{ user.direction }}</div>
|
||||
<div class="meta">{{ user.year }} курс</div>
|
||||
<div v-if="userMetaLine" class="meta">{{ userMetaLine }}</div>
|
||||
<div v-if="userYearLine" class="meta">{{ userYearLine }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level">
|
||||
|
||||
Reference in New Issue
Block a user