removed static props for PageAlert
This commit is contained in:
@@ -15,8 +15,8 @@ interface AppointmentModalProps {
|
||||
ref: RefObject<HTMLDialogElement | null>;
|
||||
participantModal: RefObject<HTMLDialogElement | null>;
|
||||
appointmentsTableRef: React.RefObject<PaginatedTableRef | null>;
|
||||
appointmentForm: UseFormReturn<EventAppointmentOptionalDefaults, any, undefined>;
|
||||
participantForm: UseFormReturn<Participant, any, undefined>;
|
||||
appointmentForm: UseFormReturn<EventAppointmentOptionalDefaults>;
|
||||
participantForm: UseFormReturn<Participant>;
|
||||
}
|
||||
|
||||
export const AppointmentModal = ({
|
||||
|
||||
@@ -1,36 +1,34 @@
|
||||
import { DatabaseBackupIcon, PartyPopperIcon } from 'lucide-react';
|
||||
import { PaginatedTable } from '../../../_components/PaginatedTable';
|
||||
import Link from 'next/link';
|
||||
import { PartyPopperIcon } from "lucide-react";
|
||||
import { PaginatedTable } from "../../../_components/PaginatedTable";
|
||||
import Link from "next/link";
|
||||
|
||||
export default () => {
|
||||
return (
|
||||
<>
|
||||
<PaginatedTable
|
||||
showEditButton
|
||||
prismaModel="event"
|
||||
columns={[
|
||||
{
|
||||
header: 'Name',
|
||||
accessorKey: 'name',
|
||||
},
|
||||
{
|
||||
header: 'Versteckt',
|
||||
accessorKey: 'hidden',
|
||||
},
|
||||
]}
|
||||
leftOfSearch={
|
||||
<span className="flex items-center gap-2">
|
||||
<PartyPopperIcon className="w-5 h-5" /> Events
|
||||
</span>
|
||||
}
|
||||
rightOfSearch={
|
||||
<Link href={'/admin/event/new'}>
|
||||
<button className="btn btn-sm btn-outline btn-primary">
|
||||
Erstellen
|
||||
</button>
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<PaginatedTable
|
||||
showEditButton
|
||||
prismaModel="event"
|
||||
columns={[
|
||||
{
|
||||
header: "Name",
|
||||
accessorKey: "name",
|
||||
},
|
||||
{
|
||||
header: "Versteckt",
|
||||
accessorKey: "hidden",
|
||||
},
|
||||
]}
|
||||
leftOfSearch={
|
||||
<span className="flex items-center gap-2">
|
||||
<PartyPopperIcon className="w-5 h-5" /> Events
|
||||
</span>
|
||||
}
|
||||
rightOfSearch={
|
||||
<Link href={"/admin/event/new"}>
|
||||
<button className="btn btn-sm btn-outline btn-primary">Erstellen</button>
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
import type { Metadata } from "next";
|
||||
import {
|
||||
DiscordLogoIcon,
|
||||
InstagramLogoIcon,
|
||||
ReaderIcon,
|
||||
} from "@radix-ui/react-icons";
|
||||
import { DiscordLogoIcon, InstagramLogoIcon, ReaderIcon } from "@radix-ui/react-icons";
|
||||
import { HorizontalNav, VerticalNav } from "../_components/Nav";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
import { redirect } from "next/navigation";
|
||||
import { getServerSession } from "../api/auth/[...nextauth]/auth";
|
||||
import { headers } from "next/headers";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create Next App",
|
||||
@@ -65,9 +60,7 @@ export default async function RootLayout({
|
||||
</div>
|
||||
|
||||
{/* Center: Copyright */}
|
||||
<p className="text-sm">
|
||||
Copyright © {new Date().getFullYear()} - Virtual Air Rescue
|
||||
</p>
|
||||
<p className="text-sm">Copyright © {new Date().getFullYear()} - Virtual Air Rescue</p>
|
||||
|
||||
{/* Right: Social Icons */}
|
||||
<div className="flex gap-4">
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
import { PaginatedTable } from "../../../_components/PaginatedTable";
|
||||
|
||||
export default async () => {
|
||||
return (
|
||||
<>
|
||||
<PaginatedTable
|
||||
prismaModel="user"
|
||||
searchFields={["publicId", "firstname", "lastname", "email"]}
|
||||
columns={[
|
||||
{
|
||||
header: "Station",
|
||||
accessorKey: "station",
|
||||
},
|
||||
{
|
||||
header: "Alarmzeit",
|
||||
accessorKey: "alarm",
|
||||
},
|
||||
{
|
||||
header: "Status 3",
|
||||
accessorKey: "s3",
|
||||
},
|
||||
{
|
||||
header: "Status 4",
|
||||
accessorKey: "s4",
|
||||
},
|
||||
{
|
||||
header: "Status 7",
|
||||
accessorKey: "s7",
|
||||
},
|
||||
{
|
||||
header: "Status 8",
|
||||
accessorKey: "s8",
|
||||
},
|
||||
{
|
||||
header: "Status 1",
|
||||
accessorKey: "s1",
|
||||
},
|
||||
{
|
||||
header: "Flugzeit",
|
||||
accessorKey: "fz",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -1,7 +1,6 @@
|
||||
import { NotebookText } from "lucide-react";
|
||||
import LogbookTable from "./_components/LogbookTable";
|
||||
|
||||
export default () => {
|
||||
const page = () => {
|
||||
return (
|
||||
<div className="grid grid-cols-6 gap-4">
|
||||
<div className="col-span-full">
|
||||
@@ -10,8 +9,10 @@ export default () => {
|
||||
</p>
|
||||
</div>
|
||||
<div className="card bg-base-200 shadow-xl mb-4 col-span-6">
|
||||
<LogbookTable />
|
||||
<h2 className="text-2xl text-gray-600 ">W.I.P.</h2>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
||||
|
||||
@@ -5,16 +5,6 @@ import Events from "./_components/Events";
|
||||
import { Stats } from "./_components/Stats";
|
||||
import { Badges } from "./_components/Badges";
|
||||
|
||||
/*
|
||||
✔️ Einlog-Zeit
|
||||
✔️ Stats
|
||||
✔️ Pilot / Disponent TODO: Selection persistent machen
|
||||
Map - I dont know man, passt hier vielleicht nicht rein
|
||||
Logbuch / Einsatzhistorie
|
||||
Badges
|
||||
Aktive Events / Mandatory Events
|
||||
*/
|
||||
|
||||
export default async function Home({
|
||||
searchParams,
|
||||
}: {
|
||||
|
||||
Reference in New Issue
Block a user