completed Implementation of User Event page

This commit is contained in:
PxlLoewe
2025-03-01 00:31:03 +01:00
parent 488c50e2e0
commit daf3238bee
6 changed files with 146 additions and 113 deletions

View File

@@ -22,9 +22,16 @@ export const KursItem = ({
<div className="card-body">
<h2 className="card-title">{event.name}</h2>
<div className="absolute top-0 right-0 m-4">
<span className="badge badge-info badge-outline">
Zusatzqualifikation
</span>
{event.type === "COURSE" && (
<span className="badge badge-info badge-outline">
Zusatzqualifikation
</span>
)}
{event.type === "OBLIGATED_COURSE" && (
<span className="badge badge-secondary badge-outline">
Verpflichtend
</span>
)}
</div>
<div className="grid grid-cols-6 gap-4">
<div className="col-span-4">
@@ -65,59 +72,7 @@ export const KursItem = ({
event={event}
title={event.name}
dates={event.appointments}
modalId={`${event.name}_modal.${event.id}`}
/>
</div>
</div>
</div>
</div>
);
};
export const ObligatedEvent = ({
event,
selectedAppointments,
user,
}: {
event: Event;
user: User;
selectedAppointments: EventAppointment[];
}) => {
{
/* STATISCH, DA FÜR ALLE NEUEN MITGLIEDER MANDATORY, WIRD AUSGEBLENDET WENN ABSOLVIERT */
}
return (
<div className="col-span-full">
<div className="card card-bordered border-secondary bg-base-200 shadow-xl mb-4">
<div className="card-body">
<h2 className="card-title">Einsteigerkurs für Piloten</h2>
<div className="absolute top-0 right-0 m-4">
<span className="badge badge-secondary badge-outline">
Verpflichtend
</span>
</div>
<div className="grid grid-cols-6 gap-4">
<div className="col-span-4">
<p className="text-left text-balance">
In diesem Kurs lernen Piloten die Grundlagen der Luftrettung,
Einsatzverfahren, den Umgang mit dem BOS-Funk und einige
medizinische Basics. Der Kurs bietet eine ideale Vorbereitung
für alle Standard Operations bei Virtual Air Rescue.
</p>
</div>
<div className="col-span-2">Badge</div>
</div>
<div className="card-actions flex justify-between items-center mt-5">
<p className="text-gray-600 text-left flex items-center gap-2">
<DrawingPinFilledIcon /> <b>Teilnahmevoraussetzungen:</b> Keine
</p>
<ModalBtn
selectedAppointments={selectedAppointments}
user={user}
event={event}
title={event.name}
dates={(event as any).appointments}
participant={(event as any).participants[0]}
participant={event.participants[0]}
modalId={`${event.name}_modal.${event.id}`}
/>
</div>