Sticky headers fix, added Heliports
This commit is contained in:
63
apps/hub/app/(app)/admin/heliport/page.tsx
Normal file
63
apps/hub/app/(app)/admin/heliport/page.tsx
Normal file
@@ -0,0 +1,63 @@
|
||||
"use client";
|
||||
import { DatabaseBackupIcon } from "lucide-react";
|
||||
import { PaginatedTable } from "../../../_components/PaginatedTable";
|
||||
import Link from "next/link";
|
||||
import { ColumnDef } from "@tanstack/react-table";
|
||||
import { Heliport } from "@repo/db";
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<>
|
||||
<PaginatedTable
|
||||
stickyHeaders
|
||||
prismaModel="heliport"
|
||||
searchFields={["siteName", "info", "hospital"]}
|
||||
columns={
|
||||
[
|
||||
{
|
||||
header: "Typ",
|
||||
accessorKey: "type",
|
||||
},
|
||||
{
|
||||
accessorKey: "designator",
|
||||
header: "Designator",
|
||||
},
|
||||
{
|
||||
header: "Name",
|
||||
accessorKey: "siteName",
|
||||
},
|
||||
{
|
||||
header: "Name (21 zeichen)",
|
||||
accessorKey: "siteNameSub21",
|
||||
},
|
||||
|
||||
{
|
||||
header: "Aktionen",
|
||||
cell: ({ row }) => (
|
||||
<div className="flex items-center gap-1">
|
||||
<Link href={`/admin/heliport/${row.original.id}`}>
|
||||
<button className="btn btn-sm">Edit</button>
|
||||
</Link>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
] as ColumnDef<Heliport>[]
|
||||
}
|
||||
leftOfSearch={
|
||||
<span className="flex items-center gap-2">
|
||||
<DatabaseBackupIcon className="w-5 h-5" /> Heliports
|
||||
</span>
|
||||
}
|
||||
rightOfSearch={
|
||||
<p className="text-2xl font-semibold text-left flex items-center gap-2 justify-between">
|
||||
<Link href={"/admin/heliport/new"}>
|
||||
<button className="btn btn-sm btn-outline btn-primary">Erstellen</button>
|
||||
</Link>
|
||||
</p>
|
||||
}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
Reference in New Issue
Block a user