import
This commit is contained in:
@@ -1,28 +1,33 @@
|
||||
import { DatabaseBackupIcon } from "lucide-react";
|
||||
import { PaginatedTable } from "../../../_components/PaginatedTable";
|
||||
import Link from "next/link";
|
||||
import { ColumnDef } from "@tanstack/react-table";
|
||||
import { Keyword } from "@repo/db";
|
||||
|
||||
export default () => {
|
||||
return (
|
||||
<>
|
||||
<PaginatedTable
|
||||
initialOrderBy={[{ id: "category", desc: true }]}
|
||||
showEditButton
|
||||
prismaModel="keyword"
|
||||
searchFields={["name", "abreviation", "description"]}
|
||||
columns={[
|
||||
{
|
||||
header: "Kateogrie",
|
||||
accessorKey: "category",
|
||||
},
|
||||
{
|
||||
header: "Name",
|
||||
accessorKey: "name",
|
||||
},
|
||||
{
|
||||
header: "Beschreibung",
|
||||
accessorKey: "description",
|
||||
},
|
||||
]}
|
||||
columns={
|
||||
[
|
||||
{
|
||||
header: "Kateogrie",
|
||||
accessorKey: "category",
|
||||
},
|
||||
{
|
||||
header: "Abkürzung",
|
||||
accessorKey: "abreviation",
|
||||
},
|
||||
{
|
||||
header: "Name",
|
||||
accessorKey: "name",
|
||||
},
|
||||
] as ColumnDef<Keyword>[]
|
||||
}
|
||||
leftOfSearch={
|
||||
<span className="flex items-center gap-2">
|
||||
<DatabaseBackupIcon className="w-5 h-5" /> Stichwörter
|
||||
@@ -31,9 +36,7 @@ export default () => {
|
||||
rightOfSearch={
|
||||
<p className="text-2xl font-semibold text-left flex items-center gap-2 justify-between">
|
||||
<Link href={"/admin/keyword/new"}>
|
||||
<button className="btn btn-sm btn-outline btn-primary">
|
||||
Erstellen
|
||||
</button>
|
||||
<button className="btn btn-sm btn-outline btn-primary">Erstellen</button>
|
||||
</Link>
|
||||
</p>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user