diff --git a/src/components/ui/data-table.tsx b/src/components/ui/data-table.tsx index c373a51..be1205d 100644 --- a/src/components/ui/data-table.tsx +++ b/src/components/ui/data-table.tsx @@ -109,6 +109,7 @@ export function DataTable(props: DataTableProps columnId === "actions" || columnId === "update"; + const actionColumnClass = (columnId: string) => hiddenLocked(columnId) ? "w-20 min-w-20 max-w-20 px-1 text-center" : undefined; const hideableColumns = () => table.getAllColumns().filter((column) => column.getCanHide() && !hiddenLocked(column.id)); const columnLabel = (column: Column) => { const header = column.columnDef.header; @@ -193,7 +194,7 @@ export function DataTable(props: DataTableProps {(header) => ( - + {renderHeader(header)} )} @@ -218,7 +219,7 @@ export function DataTable(props: DataTableProps {(cell) => ( - + {flexRender(cell.column.columnDef.cell, cell.getContext())} )} diff --git a/src/pages/courses-page.tsx b/src/pages/courses-page.tsx index c0d611e..bae30f4 100644 --- a/src/pages/courses-page.tsx +++ b/src/pages/courses-page.tsx @@ -14,7 +14,6 @@ import { PageHeader } from "@/components/layout/page-header"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { DataTable, DataTableSkeleton } from "@/components/ui/data-table"; -import { EmptyState } from "@/components/ui/empty-state"; import { IconEye, IconPlus } from "@/components/ui/icons"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; @@ -232,53 +231,37 @@ function CoursesContent() { {formatApiError(list.error)} - 0} - fallback={ - setShowForm(true)}> - - {t("common.createItem", { item: pageLabel() })} - - ) : undefined - } - /> - } - > -
-
-
-

{t("courses.listTitle", { item: pageLabel() })}

-

- {t("common.countItem", { count: rows().length, item: pageLabel() })} -

-
+
+
+
+

{t("courses.listTitle", { item: pageLabel() })}

+

+ {t("common.countItem", { count: rows().length, item: pageLabel() })} +

- setTermFilter(event.currentTarget.value)} - > - - - {(term) => } - - } - />
- + setTermFilter(event.currentTarget.value)} + > + + + {(term) => } + + } + /> +
diff --git a/src/pages/exams-page.tsx b/src/pages/exams-page.tsx index aa01842..90c48c9 100644 --- a/src/pages/exams-page.tsx +++ b/src/pages/exams-page.tsx @@ -15,7 +15,6 @@ import { Alert } from "@/components/ui/alert"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { DataTable, DataTableSkeleton } from "@/components/ui/data-table"; -import { EmptyState } from "@/components/ui/empty-state"; import { IconEdit, IconEye, IconPlus } from "@/components/ui/icons"; import { Select } from "@/components/ui/select"; import { SidePanel } from "@/components/ui/side-panel"; @@ -244,53 +243,37 @@ function ExamsContent() { {formatApiError(list.error)} - 0} - fallback={ - setCreateOpen(true)}> - - {t("exams.create")} - - ) : undefined - } - /> - } - > - - setStatusFilter(event.currentTarget.value as ExamStatus | "all")}> + + + + + + + + + - - - - - - } - /> - + + + + } + />