From e849f894370e0f01f15c4562c0f96107b7306394 Mon Sep 17 00:00:00 2001 From: Rajpreet0 Date: Tue, 9 Jun 2026 19:24:59 +0200 Subject: [PATCH] fix branching --- src/app/(main)/layout.tsx | 8 ++- .../courses/ui/components/CourseListItem.tsx | 18 +++--- .../courses/ui/views/course-list-view.tsx | 25 ++++---- .../ui/components/DashboardNavbar.tsx | 5 +- .../dashboard/ui/views/dashboard-view.tsx | 60 ++++++++++--------- 5 files changed, 65 insertions(+), 51 deletions(-) diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/layout.tsx index 425545a..2d71300 100644 --- a/src/app/(main)/layout.tsx +++ b/src/app/(main)/layout.tsx @@ -9,8 +9,14 @@ interface Props { const Layout = ({ children }: Props) => { return ( + {/* Mesh-Gradient Background */} +
+
+
+
+
-
+
{children}
diff --git a/src/modules/courses/ui/components/CourseListItem.tsx b/src/modules/courses/ui/components/CourseListItem.tsx index c2a9a10..fd9ca2d 100644 --- a/src/modules/courses/ui/components/CourseListItem.tsx +++ b/src/modules/courses/ui/components/CourseListItem.tsx @@ -129,27 +129,29 @@ const CourseListItem: React.FC = ({
{/* Course Name */} -

{courseName}

+

{courseName}

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

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

+
{/* Participant Bar */} -
+
0 ? (currentParticipants / maxParticipants) * 100 : 0}%`, }} @@ -163,10 +165,10 @@ const CourseListItem: React.FC = ({ {currentLevel.label} {/* Room */} -

{room}

+

{room}

-
+
{/* Status */} diff --git a/src/modules/courses/ui/views/course-list-view.tsx b/src/modules/courses/ui/views/course-list-view.tsx index aae7c80..95225b7 100644 --- a/src/modules/courses/ui/views/course-list-view.tsx +++ b/src/modules/courses/ui/views/course-list-view.tsx @@ -564,19 +564,17 @@ const CourseListView = ({ canCreate, canEdit, canDelete }: CourseListViewProps) )} {filteredCourses.length === 0 ? ( -
-

- {courses.length === 0 - ? "Sie haben noch keine Kurse erstellt" - : "Keine Kurse gefunden mit den ausgewählten Filtern"} +

+

+ {courses.length === 0 ? "Noch keine Kurse" : "Keine Treffer"}

-

+

{courses.length === 0 - ? "Erstellen Sie Ihren ersten Kurs!" - : "Ändern Sie die Filter oder setzen Sie sie zurück"} + ? "Erstelle deinen ersten Kurs und starte durch." + : "Andere Filter ausprobieren oder zurücksetzen."}

{courses.length === 0 && canCreate && ( - )} @@ -589,9 +587,12 @@ const CourseListView = ({ canCreate, canEdit, canDelete }: CourseListViewProps) return (
-

- {formatDate(firstCourse.date)} -

+
+

+ {formatDate(firstCourse.date)} +

+
+
{coursesForDate.map((course) => ( { const pageTitle = getPageTitle(pathname); return ( -
-
+
+
-
); }; diff --git a/src/modules/dashboard/ui/views/dashboard-view.tsx b/src/modules/dashboard/ui/views/dashboard-view.tsx index 5b12d21..d55ac7e 100644 --- a/src/modules/dashboard/ui/views/dashboard-view.tsx +++ b/src/modules/dashboard/ui/views/dashboard-view.tsx @@ -12,38 +12,44 @@ const DashboardView = async () => { return (
-
-

Willkommen zurück!

-

Schön, dich wiederzusehen, {displayName}

- {isManager(userData) && ( - - Manager - - )} - {isEmployee(userData) && ( - - Mitarbeiter - - )} +
+
+

+ Dashboard +

+

Willkommen zurück!

+

{displayName}

+
+ {isManager(userData) && ( + + Manager + + )} + {isEmployee(userData) && ( + + Mitarbeiter + + )} +
-

Profil

-

Verwalte deine persönlichen Daten

+

Profil

+

Verwalte deine persönlichen Daten

{isManager(userData) ? (
-

Meine Businesses

-

+

Meine Businesses

+

{userData.businesses.length}{" "} {userData.businesses.length === 1 ? "Business" : "Businesses"}

) : isEmployee(userData) ? (
-

Meine Berechtigungen

+

Meine Berechtigungen

{(() => { const p = userData.permissions; const RESOURCE_LABELS: Record = { @@ -80,20 +86,20 @@ const DashboardView = async () => {
) : (
-

Trainings

-

Deine gebuchten Trainingseinheiten

+

Trainings

+

Deine gebuchten Trainingseinheiten

)}
-

Einstellungen

-

Passe deine Einstellungen an

+

Einstellungen

+

Passe deine Einstellungen an

{isUser(userData) && (
-

Benutzerdaten

+

Benutzerdaten

Name
@@ -133,7 +139,7 @@ const DashboardView = async () => { {isManager(userData) && (
-

Manager-Daten

+

Manager-Daten

Vorname
@@ -165,10 +171,10 @@ const DashboardView = async () => { {isManager(userData) && userData.businesses.length > 0 && (
-

Meine Businesses

+

Meine Businesses

{userData.businesses.map((business) => ( -
+

{business.name}

{business.address}

{business.email}

@@ -180,7 +186,7 @@ const DashboardView = async () => { {isEmployee(userData) && (
-

Mitarbeiter-Daten

+

Mitarbeiter-Daten

Vorname