diff --git a/src/app/(main)/settings/personal/page.tsx b/src/app/(main)/settings/personal/page.tsx index eda4ff4..b1d994d 100644 --- a/src/app/(main)/settings/personal/page.tsx +++ b/src/app/(main)/settings/personal/page.tsx @@ -1,5 +1,5 @@ -import SettignsPersonalPageView from "@/src/modules/settings/ui/views/settings-personal-page-view"; +import SettingsPersonalPageView from "@/src/modules/settings/ui/views/settings-personal-page-view"; export default async function SettingsPersonalPage() { - return ; + return ; } diff --git a/src/modules/courses/ui/components/CourseListItem.tsx b/src/modules/courses/ui/components/CourseListItem.tsx index bdfb9d1..c2a9a10 100644 --- a/src/modules/courses/ui/components/CourseListItem.tsx +++ b/src/modules/courses/ui/components/CourseListItem.tsx @@ -10,6 +10,7 @@ import AbstractTooltip from "@/src/components/layout/AbstractTooltip"; import { Avatar, AvatarFallback, AvatarImage } from "@/src/components/ui/avatar"; import { Pen, Trash2, Link } from "lucide-react"; import { toast } from "sonner"; +import Image from "next/image"; /** * Props für die CourseListItem Komponente @@ -31,6 +32,7 @@ interface CourseListItemProps { status?: string; // Status des Kurses ("draft" oder "published") isPast?: boolean; // Ob der Kurs in der Vergangenheit liegt showDeleteIcon?: boolean; // Ob das Löschen-Icon angezeigt werden soll + coverImage?: string; // Optionales Cover-Bild } /** @@ -54,6 +56,7 @@ const CourseListItem: React.FC = ({ status, isPast, showDeleteIcon, + coverImage, }) => { // Prüfen, ob der Kurs voll belegt ist (für visuelle Hervorhebung) const isFull = currentParticipants >= maxParticipants; @@ -87,109 +90,117 @@ const CourseListItem: React.FC = ({ return (
-
- {trainers.map((trainerId, index) => { - const trainerInfo = trainersMap[trainerId]; - const displayName = trainerInfo?.label ?? "Ehemaliger Trainer"; - const avatarSrc = trainerInfo?.pbSrc; - return ( - -
- - {avatarSrc && } - {getInitials(displayName)} - -
-
- ); - })} - {/* Time */} -
-

- {timeFrom} - {timeTo} -

+ {coverImage && ( +
+ {courseName}
-
+ )} - {/* Course Name */} -

{courseName}

- -
- {/* Participant Number */} - - {currentParticipants}/{maxParticipants} Teilnehmer - - - {/* Price */} -

- {price.toLocaleString("de-DE", { - style: "currency", - currency: "EUR", +
+
+ {trainers.map((trainerId, index) => { + const trainerInfo = trainersMap[trainerId]; + const displayName = trainerInfo?.label ?? "Ehemaliger Trainer"; + const avatarSrc = trainerInfo?.pbSrc; + return ( + +
+ + {avatarSrc && } + {getInitials(displayName)} + +
+
+ ); })} -

-
+ {/* Time */} +
+

+ {timeFrom} - {timeTo} +

+
+
- {/* Participant Bar */} -
-
0 ? (currentParticipants / maxParticipants) * 100 : 0}%`, - }} - /> -
+ {/* Course Name */} +

{courseName}

-
- - {currentLevel.label} - - {/* Room */} -

{room}

-
- -
- -
- {/* Status */} - {status && ( - - {status === "draft" ? "Entwurf" : "Veröffentlicht"} +
+ {/* Participant Number */} + + {currentParticipants}/{maxParticipants} Teilnehmer - )} - {/* Actions */} -
- {courseId && status === "published" && ( -
+ + {/* Participant Bar */} +
+
0 ? (currentParticipants / maxParticipants) * 100 : 0}%`, + }} + /> +
+ +
+ + {currentLevel.label} + + {/* Room */} +

{room}

+
+ +
+ +
+ {/* Status */} + {status && ( + - - - )} - {showDeleteIcon && onDelete && ( - - )} - {onEdit && ( - + {status === "draft" ? "Entwurf" : "Veröffentlicht"} + )} + {/* Actions */} +
+ {courseId && status === "published" && ( + + )} + {showDeleteIcon && onDelete && ( + + )} + {onEdit && ( + + )} +
diff --git a/src/modules/courses/ui/components/PublicCourseCard.tsx b/src/modules/courses/ui/components/PublicCourseCard.tsx index 4c9aa90..4c862b3 100644 --- a/src/modules/courses/ui/components/PublicCourseCard.tsx +++ b/src/modules/courses/ui/components/PublicCourseCard.tsx @@ -414,67 +414,77 @@ const PublicCourseCard = ({ course, business, defaultOpen = false }: PublicCours <>
setDialogOpen(true)} - className="bg-white border border-gray-200 rounded-xl p-5 shadow-sm hover:shadow-md transition flex flex-col gap-4" + className="border border-white/60 bg-white/55 backdrop-blur-xl rounded-xl shadow-sm hover:shadow-md hover:bg-white/70 transition flex flex-col cursor-pointer overflow-hidden" > -
-

{formattedDate}

-

- {course.timeFrom} – {course.timeTo} -

-
- - {course.trainerProfiles && course.trainerProfiles.length > 0 && ( -
- {course.trainerProfiles.map((trainer) => { - const fullName = - [trainer.firstName, trainer.lastName].filter(Boolean).join(" ") || "Trainer"; - return ( - - -
- -
-
- {fullName} -
- ); - })} + {course.coverImage && ( +
+ {course.name}
)} -

{course.name}

+
+
+

{formattedDate}

+

+ {course.timeFrom} – {course.timeTo} +

+
-
- - {currentLevel.label} - - {formattedPrice} + {course.trainerProfiles && course.trainerProfiles.length > 0 && ( +
+ {course.trainerProfiles.map((trainer) => { + const fullName = + [trainer.firstName, trainer.lastName].filter(Boolean).join(" ") || "Trainer"; + return ( + + +
+ +
+
+ {fullName} +
+ ); + })} +
+ )} + +

{course.name}

+ +
+ + {currentLevel.label} + + {formattedPrice} +
+ +
+ + {course.currentParticipants}/{course.maxParticipants} Teilnehmer + +
+ +
+
+
+ + {isFull ? ( + + ) : ( + + )}
- -
- - {course.currentParticipants}/{course.maxParticipants} Teilnehmer - -
- -
-
-
- - {isFull ? ( - - ) : ( - - )}
{/* Header */} -
+

{business.name}

{business.title &&

{business.title}

} @@ -169,7 +169,7 @@ const BusinessPublicView = ({ {/* Left: sticky calendar */}

{formattedSelectedDate}

-
+
{sport === "Alle" ? "Alle" : capitalize(sport)} diff --git a/src/modules/courses/ui/views/course-list-view.tsx b/src/modules/courses/ui/views/course-list-view.tsx index 0eb4def..aae7c80 100644 --- a/src/modules/courses/ui/views/course-list-view.tsx +++ b/src/modules/courses/ui/views/course-list-view.tsx @@ -32,6 +32,7 @@ type Course = { createdBy: string; createdAt: Date; updatedAt: Date; + coverImage: string | null; _count?: { bookings: number; }; @@ -563,7 +564,7 @@ const CourseListView = ({ canCreate, canEdit, canDelete }: CourseListViewProps) )} {filteredCourses.length === 0 ? ( -
+

{courses.length === 0 ? "Sie haben noch keine Kurse erstellt" @@ -609,6 +610,7 @@ const CourseListView = ({ canCreate, canEdit, canDelete }: CourseListViewProps) status={course.status} isPast={isPastCourse(course.date)} showDeleteIcon={deleteMode && canDelete} + coverImage={course.coverImage ?? undefined} onDelete={ canDelete ? () => handleDeleteClick(course.id, course.name) : undefined } diff --git a/src/modules/dashboard/ui/views/dashboard-view.tsx b/src/modules/dashboard/ui/views/dashboard-view.tsx index a2afd20..5b12d21 100644 --- a/src/modules/dashboard/ui/views/dashboard-view.tsx +++ b/src/modules/dashboard/ui/views/dashboard-view.tsx @@ -12,7 +12,7 @@ const DashboardView = async () => { return (

-
+

Willkommen zurück!

Schön, dich wiederzusehen, {displayName}

{isManager(userData) && ( @@ -28,13 +28,13 @@ const DashboardView = async () => {
-
+

Profil

Verwalte deine persönlichen Daten

{isManager(userData) ? ( -
+

Meine Businesses

{userData.businesses.length}{" "} @@ -42,7 +42,7 @@ const DashboardView = async () => {

) : isEmployee(userData) ? ( -
+

Meine Berechtigungen

{(() => { const p = userData.permissions; @@ -79,20 +79,20 @@ const DashboardView = async () => { })()}
) : ( -
+

Trainings

Deine gebuchten Trainingseinheiten

)} -
+

Einstellungen

Passe deine Einstellungen an

{isUser(userData) && ( -
+

Benutzerdaten

@@ -132,7 +132,7 @@ const DashboardView = async () => { )} {isManager(userData) && ( -
+

Manager-Daten

@@ -164,7 +164,7 @@ const DashboardView = async () => { )} {isManager(userData) && userData.businesses.length > 0 && ( -
+

Meine Businesses

{userData.businesses.map((business) => ( @@ -179,7 +179,7 @@ const DashboardView = async () => { )} {isEmployee(userData) && ( -
+

Mitarbeiter-Daten

diff --git a/src/modules/employee/ui/components/EmployeeListItem.tsx b/src/modules/employee/ui/components/EmployeeListItem.tsx index 5d7b155..4c989bf 100644 --- a/src/modules/employee/ui/components/EmployeeListItem.tsx +++ b/src/modules/employee/ui/components/EmployeeListItem.tsx @@ -46,7 +46,7 @@ const EmployeeListItem: React.FC = ({ showDeleteIcon, }) => { return ( -
+
{/* Status Badge */}
@@ -159,15 +159,15 @@ const EmployeeListItem: React.FC = ({ })()} {/* Action Buttons */} -
+
{showDeleteIcon && onDelete && ( - )} {onEdit && ( - )} diff --git a/src/modules/employee/ui/views/employee-list-view.tsx b/src/modules/employee/ui/views/employee-list-view.tsx index e63b634..6df9816 100644 --- a/src/modules/employee/ui/views/employee-list-view.tsx +++ b/src/modules/employee/ui/views/employee-list-view.tsx @@ -94,7 +94,7 @@ const EmployeeListView = ({ canCreate, canEdit, canDelete }: EmployeeListViewPro
{employees.length === 0 ? ( -
+

Keine Mitarbeiter vorhanden

{canCreate && ( <> diff --git a/src/modules/rooms/ui/components/RoomsListItem.tsx b/src/modules/rooms/ui/components/RoomsListItem.tsx index c0eec89..9146d06 100644 --- a/src/modules/rooms/ui/components/RoomsListItem.tsx +++ b/src/modules/rooms/ui/components/RoomsListItem.tsx @@ -17,7 +17,7 @@ const RoomsListItem: React.FC = ({ showDeleteIcon, }) => { return ( -
+

{roomName}

@@ -27,7 +27,7 @@ const RoomsListItem: React.FC = ({ @@ -36,7 +36,7 @@ const RoomsListItem: React.FC = ({ diff --git a/src/modules/settings/ui/views/settings-payments-view.tsx b/src/modules/settings/ui/views/settings-payments-view.tsx index d9222f1..d2a4449 100644 --- a/src/modules/settings/ui/views/settings-payments-view.tsx +++ b/src/modules/settings/ui/views/settings-payments-view.tsx @@ -126,7 +126,7 @@ const SettingsPaymentsView = () => {
{businesses.length === 0 ? ( -
+

Du hast noch keine Businesses angelegt.

) : ( @@ -139,7 +139,7 @@ const SettingsPaymentsView = () => { return (
@@ -190,7 +190,7 @@ const SettingsPaymentsView = () => {
)} -
+

So funktioniert es:

  • Klicke auf "Stripe-Konto verbinden" - du wirst zu Stripe weitergeleitet
  • diff --git a/src/modules/settings/ui/views/settings-personal-page-view.tsx b/src/modules/settings/ui/views/settings-personal-page-view.tsx index 528b3ad..40dee09 100644 --- a/src/modules/settings/ui/views/settings-personal-page-view.tsx +++ b/src/modules/settings/ui/views/settings-personal-page-view.tsx @@ -1,5 +1,5 @@ -const SettignsPersonalPageView = () => { +const SettingsPersonalPageView = () => { return
    ; }; -export default SettignsPersonalPageView; +export default SettingsPersonalPageView;