feat: обновил типы в компонентах
Frontend CI / build-and-check (push) Failing after 19s
🚀 Create and publish a Docker image / Detect changes in backend and frontend (push) Successful in 5s
🚀 Create and publish a Docker image / Build & publish backend image (push) Successful in 8s
🚀 Create and publish a Docker image / Build & publish frontend image (push) Successful in 16s
🚀 Create and publish a Docker image / Update stack on Portainer (push) Successful in 3s

This commit is contained in:
2026-05-28 19:54:38 +03:00
parent ef2fd39508
commit c93d205e34
6 changed files with 16 additions and 8 deletions
+3 -3
View File
@@ -1,15 +1,15 @@
<script setup lang="ts"> <script setup lang="ts">
type Column = { key: string; label: string; align?: 'left' | 'center' | 'right' } type Column = { key: string; label: string; align?: 'left' | 'center' | 'right' }
type DataTableSlotRow = Record<string, unknown> type DataTableSlotRow = Record<string, any>
defineProps<{ defineProps<{
columns: Column[] columns: Column[]
rows: DataTableSlotRow[] rows: DataTableSlotRow[]
}>() }>()
defineSlots<Record<string, (props: { row: DataTableSlotRow; value: unknown }) => unknown>>() defineSlots<Record<string, (props: { row: DataTableSlotRow; value: any }) => unknown>>()
function getCell(row: DataTableSlotRow, key: string): unknown { function getCell(row: DataTableSlotRow, key: string): any {
return row[key] return row[key]
} }
</script> </script>
@@ -17,9 +17,10 @@ import EmptyState from '@/components/ui/EmptyState.vue'
import CreateLectureModal from '@/components/admin/CreateLectureModal.vue' import CreateLectureModal from '@/components/admin/CreateLectureModal.vue'
type TabKey = 'lectures' | 'courses' | 'rooms' | 'tags' type TabKey = 'lectures' | 'courses' | 'rooms' | 'tags'
type DataTableColumn = { key: string; label: string; align?: 'left' | 'center' | 'right' }
type TabConfig = { type TabConfig = {
title: string title: string
columns: Array<{ key: string; label: string; align?: string }> columns: DataTableColumn[]
rows: Record<string, unknown>[] rows: Record<string, unknown>[]
} }
@@ -7,7 +7,9 @@ import EmptyState from '@/components/ui/EmptyState.vue'
import { reviewsApi } from '@/api' import { reviewsApi } from '@/api'
import type { ApiReviewLlmStatus, ApiReviewSentiment, ReviewDto } from '@/api/types' import type { ApiReviewLlmStatus, ApiReviewSentiment, ReviewDto } from '@/api/types'
const columns = [ type DataTableColumn = { key: string; label: string; align?: 'left' | 'center' | 'right' }
const columns: DataTableColumn[] = [
{ key: 'id', label: 'ID' }, { key: 'id', label: 'ID' },
{ key: 'lecture', label: 'Лекция' }, { key: 'lecture', label: 'Лекция' },
{ key: 'student', label: 'Студент' }, { key: 'student', label: 'Студент' },
+3 -1
View File
@@ -13,7 +13,9 @@ const users = ref<UserDto[]>([])
const loading = ref(false) const loading = ref(false)
const error = ref('') const error = ref('')
const columns = [ type DataTableColumn = { key: string; label: string; align?: 'left' | 'center' | 'right' }
const columns: DataTableColumn[] = [
{ key: 'name', label: 'Имя' }, { key: 'name', label: 'Имя' },
{ key: 'email', label: 'Email' }, { key: 'email', label: 'Email' },
{ key: 'role', label: 'Роль', align: 'center' }, { key: 'role', label: 'Роль', align: 'center' },
+3 -1
View File
@@ -11,6 +11,8 @@ import ModalDialog from '@/components/ui/ModalDialog.vue'
import EnrollmentLimitModal from '@/components/ui/EnrollmentLimitModal.vue' import EnrollmentLimitModal from '@/components/ui/EnrollmentLimitModal.vue'
const lecturesStore = useLecturesStore() const lecturesStore = useLecturesStore()
type DataTableColumn = { key: string; label: string; align?: 'left' | 'center' | 'right' }
const search = ref('') const search = ref('')
const viewMode = ref<'cards' | 'list' | 'calendar'>('cards') const viewMode = ref<'cards' | 'list' | 'calendar'>('cards')
const dateFilter = ref('Любая дата') const dateFilter = ref('Любая дата')
@@ -102,7 +104,7 @@ const appliedFilters = computed(() => {
return filters return filters
}) })
const tableColumns = [ const tableColumns: DataTableColumn[] = [
{ key: 'title', label: 'Лекция' }, { key: 'title', label: 'Лекция' },
{ key: 'teacher', label: 'Преподаватель' }, { key: 'teacher', label: 'Преподаватель' },
{ key: 'date', label: 'Дата' }, { key: 'date', label: 'Дата' },
@@ -8,8 +8,9 @@ import StatusBadge from '@/components/ui/StatusBadge.vue'
import EmptyState from '@/components/ui/EmptyState.vue' import EmptyState from '@/components/ui/EmptyState.vue'
const auth = useAuthStore() const auth = useAuthStore()
const lecturesStore = useLecturesStore() const lecturesStore = useLecturesStore()
type DataTableColumn = { key: string; label: string; align?: 'left' | 'center' | 'right' }
const columns = [ const columns: DataTableColumn[] = [
{ key: 'title', label: 'Лекция' }, { key: 'title', label: 'Лекция' },
{ key: 'date', label: 'Дата' }, { key: 'date', label: 'Дата' },
{ key: 'status', label: 'Статус', align: 'center' }, { key: 'status', label: 'Статус', align: 'center' },