Füge Benutzerabfrage zum neuen Ereignisformular hinzu und aktualisiere das Ereignisformular-Layout
This commit is contained in:
@@ -16,6 +16,7 @@ export default async ({ params }: { params: Promise<{ id: string }> }) => {
|
||||
publicId: true,
|
||||
},
|
||||
});
|
||||
console.log(users);
|
||||
if (!event) return <div>Event not found</div>;
|
||||
return <Form event={event} users={users} />;
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from '@repo/db/zod';
|
||||
import { set, useForm } from 'react-hook-form';
|
||||
import { BADGES, Event, User } from '@repo/db';
|
||||
import { Bot, FileText, UserIcon } from 'lucide-react';
|
||||
import { Bot, Calendar, FileText, UserIcon } from 'lucide-react';
|
||||
import { Input } from '../../../../_components/ui/Input';
|
||||
import { useRef, useState } from 'react';
|
||||
import { deleteEvent, upsertEvent } from '../action';
|
||||
@@ -154,7 +154,7 @@ export const Form = ({
|
||||
<div className="card-body">
|
||||
<div className="flex justify-between">
|
||||
<h2 className="card-title">
|
||||
<UserIcon className="w-5 h-5" /> Termine
|
||||
<Calendar className="w-5 h-5" /> Termine
|
||||
</h2>
|
||||
<button
|
||||
className="btn btn-primary btn-outline"
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
import { prisma } from '@repo/db';
|
||||
import { Form } from '../_components/Form';
|
||||
|
||||
export default () => {
|
||||
return <Form />;
|
||||
export default async () => {
|
||||
const users = await prisma.user.findMany({
|
||||
select: {
|
||||
id: true,
|
||||
firstname: true,
|
||||
lastname: true,
|
||||
publicId: true,
|
||||
},
|
||||
});
|
||||
return <Form users={users} />;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@import 'tailwindcss';
|
||||
@plugin "daisyui";
|
||||
|
||||
/*
|
||||
The default border color has changed to `currentColor` in Tailwind CSS v4,
|
||||
|
||||
Reference in New Issue
Block a user