typos und link zu adminuser in event tabelle

This commit is contained in:
PxlLoewe
2025-07-22 19:31:21 -07:00
parent 414e238216
commit f12db76f48
3 changed files with 106 additions and 68 deletions

View File

@@ -148,13 +148,13 @@ const ModalBtn = ({
<form method="dialog">
<button className="btn btn-sm btn-circle btn-ghost absolute right-3 top-3"></button>
</form>
<h3 className="font-bold text-lg text-left">{title}</h3>
<div className="flex flex-wrap gap-4 mt-4">
<div className="flex flex-col gap-2 flex-1 p-3 bg-base-300 min-w-[300px] shadow rounded-lg">
<h3 className="text-left text-lg font-bold">{title}</h3>
<div className="mt-4 flex flex-wrap gap-4">
<div className="bg-base-300 flex min-w-[300px] flex-1 flex-col gap-2 rounded-lg p-3 shadow">
<h2 className="flex gap-2 text-lg font-bold">
<Info /> Details
</h2>
<div className="text-left text-balance">
<div className="text-balance text-left">
<MDEditor.Markdown
source={event.description}
style={{
@@ -164,14 +164,14 @@ const ModalBtn = ({
</div>
</div>
{event.hasPresenceEvents && (
<div className="flex flex-col gap-2 flex-1 p-3 bg-base-300 min-w-[300px] shadow rounded-lg">
<div className="bg-base-300 flex min-w-[300px] flex-1 flex-col gap-2 rounded-lg p-3 shadow">
<h2 className="flex gap-2 text-lg font-bold">
<Calendar /> Termine
</h2>
<div className="flex flex-1 flex-col justify-center items-center">
<div className="flex flex-1 flex-col items-center justify-center">
{!!dates.length && !selectedDate && (
<>
<p className="text-center text-info">Melde dich zu einem Termin an</p>
<p className="text-info text-center">Melde dich zu einem Termin an</p>
<Select
form={selectAppointmentForm}
options={dates.map((date) => ({
@@ -190,7 +190,7 @@ const ModalBtn = ({
<span>Dein ausgewählter Termin (Deutsche Zeit)</span>
<div>
<button
className="input input-border min-w-[250px] pointer-events-none"
className="input input-border pointer-events-none min-w-[250px]"
style={{ anchorName: "--rdp" } as React.CSSProperties}
>
{new Date(selectedAppointment.appointmentDate).toLocaleString("de-DE", {
@@ -203,12 +203,12 @@ const ModalBtn = ({
</button>
</div>
{participant?.attended ? (
<p className="py-4 flex items-center gap-2 justify-center">
<p className="flex items-center justify-center gap-2 py-4">
<CheckCircledIcon className="text-success" />
Du hast an dem Presenztermin teilgenommen
</p>
) : (
<p className="py-4 flex items-center gap-2 justify-center">
<p className="flex items-center justify-center gap-2 py-4">
Bitte erscheine ~5 minuten vor dem Termin im Discord
</p>
)}
@@ -216,7 +216,7 @@ const ModalBtn = ({
)}
{!dates.length && (
<p className="text-center text-error">Aktuell sind keine Termine verfügbar</p>
<p className="text-error text-center">Aktuell sind keine Termine verfügbar</p>
)}
{!!selectedDate &&
@@ -225,7 +225,7 @@ const ModalBtn = ({
!!(ownPlaceInParticipantList > event.maxParticipants) && (
<p
role="alert"
className="py-4 my-5 flex items-center gap-2 justify-center border alert alert-error alert-outline"
className="alert alert-error alert-outline my-5 flex items-center justify-center gap-2 border py-4"
>
<TriangleAlert className="h-6 w-6 shrink-0 stroke-current" fill="none" />
Dieser Termin ist ausgebucht, wahrscheinlich wirst du nicht teilnehmen
@@ -237,11 +237,11 @@ const ModalBtn = ({
</div>
)}
{event.finisherMoodleCourseId && (
<div className="flex flex-col gap-2 flex-1 p-3 bg-base-300 min-w-[300px] shadow rounded-lg">
<div className="bg-base-300 flex min-w-[300px] flex-1 flex-col gap-2 rounded-lg p-3 shadow">
<h2 className="flex gap-2 text-lg font-bold">
<BookCheck /> Moodle-Kurs
</h2>
<div className="flex flex-col items-center justify-center h-full">
<div className="flex h-full flex-col items-center justify-center">
<MoodleCourseIndicator
participant={participant}
user={user}
@@ -254,9 +254,9 @@ const ModalBtn = ({
)}
</div>
<div className="flex justify-between items-end mt-5">
<div className="mt-5 flex items-end justify-between">
<div>
<p className="text-gray-600 text-left flex items-center gap-2">
<p className="flex items-center gap-2 text-left text-gray-600">
<DrawingPinFilledIcon /> <b>Teilnahmevoraussetzungen: </b>
{!event.requiredBadges.length && "Keine"}
</p>
@@ -347,23 +347,27 @@ const MoodleCourseIndicator = ({
const courseUrl = `${process.env.NEXT_PUBLIC_MOODLE_URL}/course/view.php?id=${moodleCourseId}`;
if (event.hasPresenceEvents && !participant?.attended)
return (
<p className="py-4 flex items-center gap-2 justify-center">
<p className="flex items-center justify-center gap-2 py-4">
<Clock10Icon className="text-error" />
Abschlusstest erst nach Teilnahme verfügbar
</p>
);
if (completed)
return (
<p className="py-4 flex items-center gap-2 justify-center">
<p className="flex items-center justify-center gap-2 py-4">
<CheckCircledIcon className="text-success" />
Moodle Kurs abgeschlossen
</p>
);
return (
<div className="flex flex-col items-center justify-center gap-2">
<p className="text-sm flex items-center gap-2">
<p className="flex items-center gap-2 text-sm">
<CirclePlay className="text-warning" /> Moodle-Kurs bereit
</p>
<p className="font-bold text-gray-400">
Wenn du nach dem Anmelden den moodle Kurs nicht siehst, warte ein paar Sekunden und lade die
Seite neu.
</p>
<button
className="btn btn-sm btn-outline btn-info ml-2"
onClick={async () => {
@@ -386,10 +390,6 @@ const MoodleCourseIndicator = ({
<ExternalLink size={16} />
Zum Moodle Kurs
</button>
<p className="text-xs text-gray-400">
Wenn du nach dem Anmelden den moodle Kurs nicht siehst, warte ein paar Sekunden und lade die
Seite neu.
</p>
</div>
);
};