added chron to hub server, removed starterEvent

This commit is contained in:
PxlLoewe
2025-02-28 07:21:07 +01:00
parent bbcde2eb4a
commit a477b65c2f
20 changed files with 584 additions and 281 deletions

View File

@@ -1,10 +1,19 @@
"use client";
import { DrawingPinFilledIcon, EnterIcon } from "@radix-ui/react-icons";
import { Event, User } from "@repo/db";
import { Event, Participant, EventAppointment, User } from "@repo/db";
import ModalBtn from "./modalBtn";
import MDEditor from "@uiw/react-md-editor";
export const KursItem = ({ user, event }: { user: User; event: Event }) => {
export const KursItem = ({
user,
event,
}: {
user: User;
event: Event & {
appointments: EventAppointment[];
participants: Participant[];
};
}) => {
return (
<div className="col-span-full">
<div className="card bg-base-200 shadow-xl mb-4">
@@ -56,8 +65,10 @@ export const KursItem = ({ user, event }: { user: User; event: Event }) => {
)}
</div>
<ModalBtn
user={user}
event={event}
title={event.name}
dates={["Dienstag, 25 Februar 2025", "Mittwoch, 26 Februar 2025"]}
dates={event.appointments}
modalId={`${event.name}_modal.${event.id}`}
/>
</div>
@@ -67,7 +78,13 @@ export const KursItem = ({ user, event }: { user: User; event: Event }) => {
);
};
export const PilotKurs = ({ user }: { user: User }) => {
export const ObligatedEvent = ({
event,
user,
}: {
event: Event;
user: User;
}) => {
{
/* STATISCH, DA FÜR ALLE NEUEN MITGLIEDER MANDATORY, WIRD AUSGEBLENDET WENN ABSOLVIERT */
}
@@ -96,9 +113,14 @@ export const PilotKurs = ({ user }: { user: User }) => {
<p className="text-gray-600 text-left flex items-center gap-2">
<DrawingPinFilledIcon /> <b>Teilnahmevoraussetzungen:</b> Keine
</p>
<button className="btn btn-outline btn-secondary btn-wide">
<EnterIcon /> Zum Moodle Kurs
</button>
<ModalBtn
user={user}
event={event}
title={event.name}
dates={(event as any).appointments}
participant={(event as any).participants[0]}
modalId={`${event.name}_modal.${event.id}`}
/>
</div>
</div>
</div>