service message table added

This commit is contained in:
lucuswolfius
2025-06-02 11:05:21 -07:00
parent 17ebd471e8
commit b98e69518f

View File

@@ -1,8 +1,14 @@
"use client";
import { MessageSquareWarning } from "lucide-react";
import { MessageForm } from "./_components/messageForm";
import { PaginatedTable } from "_components/PaginatedTable";
import { ColumnDef } from "@tanstack/react-table";
import { Notam } from "@repo/db";
export default function MessagePage() {
return (
<>
<div className="grid grid-cols-6 gap-4">
<div className="col-span-full">
<p className="text-2xl font-semibold text-left flex items-center gap-2">
@@ -15,5 +21,34 @@ export default function MessagePage() {
</div>
</div>
</div>
<PaginatedTable
prismaModel="notam"
columns={
[
{
accessorKey: "message",
header: "Nachricht",
},
{
accessorKey: "color",
header: "Status",
cell: ({ row }) => {
const color = row.getValue("color");
return color;
},
},
{
accessorKey: "createdAt",
header: "Erstellt am",
sortDescFirst: false,
cell: ({ cell }) => {
const date = new Date(cell.getValue() as string);
return date.toLocaleDateString();
},
},
] as ColumnDef<Notam>[]
}
/>
</>
);
}