diff --git a/src/app/(main)/settings/personal/page.tsx b/src/app/(main)/settings/personal/page.tsx index b1d994d..eda4ff4 100644 --- a/src/app/(main)/settings/personal/page.tsx +++ b/src/app/(main)/settings/personal/page.tsx @@ -1,5 +1,5 @@ -import SettingsPersonalPageView from "@/src/modules/settings/ui/views/settings-personal-page-view"; +import SettignsPersonalPageView 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 c2a9a10..bdfb9d1 100644 --- a/src/modules/courses/ui/components/CourseListItem.tsx +++ b/src/modules/courses/ui/components/CourseListItem.tsx @@ -10,7 +10,6 @@ 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 @@ -32,7 +31,6 @@ 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 } /** @@ -56,7 +54,6 @@ const CourseListItem: React.FC = ({ status, isPast, showDeleteIcon, - coverImage, }) => { // Prüfen, ob der Kurs voll belegt ist (für visuelle Hervorhebung) const isFull = currentParticipants >= maxParticipants; @@ -90,117 +87,109 @@ const CourseListItem: React.FC = ({ return (
- {coverImage && ( -
- {courseName} -
- )} - -
-
- {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} -

-
-
- - {/* Course Name */} -

{courseName}

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

- {price.toLocaleString("de-DE", { - style: "currency", - currency: "EUR", - })} -

-
- - {/* Participant Bar */} -
-
0 ? (currentParticipants / maxParticipants) * 100 : 0}%`, - }} - /> -
- -
- - {currentLevel.label} - - {/* Room */} -

{room}

-
- -
- -
- {/* Status */} - {status && ( - - {status === "draft" ? "Entwurf" : "Veröffentlicht"} - - )} - {/* Actions */} -
- {courseId && status === "published" && ( - - )} - {showDeleteIcon && onDelete && ( - - )} - {onEdit && ( - - )} -
+ + {avatarSrc && } + {getInitials(displayName)} + +
+ + ); + })} + {/* Time */} +
+

+ {timeFrom} - {timeTo} +

+
+
+ + {/* Course Name */} +

{courseName}

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

+ {price.toLocaleString("de-DE", { + style: "currency", + currency: "EUR", + })} +

+
+ + {/* Participant Bar */} +
+
0 ? (currentParticipants / maxParticipants) * 100 : 0}%`, + }} + /> +
+ +
+ + {currentLevel.label} + + {/* Room */} +

{room}

+
+ +
+ +
+ {/* Status */} + {status && ( + + {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 4c862b3..4c9aa90 100644 --- a/src/modules/courses/ui/components/PublicCourseCard.tsx +++ b/src/modules/courses/ui/components/PublicCourseCard.tsx @@ -414,77 +414,67 @@ const PublicCourseCard = ({ course, business, defaultOpen = false }: PublicCours <>
setDialogOpen(true)} - 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" + className="bg-white border border-gray-200 rounded-xl p-5 shadow-sm hover:shadow-md transition flex flex-col gap-4" > - {course.coverImage && ( -
- {course.name} +
+

{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} +
+ ); + })}
)} -
-
-

{formattedDate}

-

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

-
+

{course.name}

- {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 ? ( - - ) : ( - - )} +
+ + {currentLevel.label} + + {formattedPrice}
+ +
+ + {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 aae7c80..0eb4def 100644 --- a/src/modules/courses/ui/views/course-list-view.tsx +++ b/src/modules/courses/ui/views/course-list-view.tsx @@ -32,7 +32,6 @@ type Course = { createdBy: string; createdAt: Date; updatedAt: Date; - coverImage: string | null; _count?: { bookings: number; }; @@ -564,7 +563,7 @@ const CourseListView = ({ canCreate, canEdit, canDelete }: CourseListViewProps) )} {filteredCourses.length === 0 ? ( -
+

{courses.length === 0 ? "Sie haben noch keine Kurse erstellt" @@ -610,7 +609,6 @@ 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 5b12d21..a2afd20 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 4c989bf..5d7b155 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 6df9816..e63b634 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 9146d06..c0eec89 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 d2a4449..d9222f1 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 40dee09..528b3ad 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 SettingsPersonalPageView = () => { +const SettignsPersonalPageView = () => { return
    ; }; -export default SettingsPersonalPageView; +export default SettignsPersonalPageView;