From a9288c29f7c94a538ef89385458e572ea433f75c Mon Sep 17 00:00:00 2001 From: Felix Zett Date: Fri, 19 Sep 2025 22:28:27 +0200 Subject: [PATCH] feat: add progress bar to TripChecklist for item completion tracking --- frontend/src/pages/TripChecklist.tsx | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/frontend/src/pages/TripChecklist.tsx b/frontend/src/pages/TripChecklist.tsx index 31a009b..564f390 100644 --- a/frontend/src/pages/TripChecklist.tsx +++ b/frontend/src/pages/TripChecklist.tsx @@ -231,6 +231,11 @@ export default function TripChecklist({ trips }: { trips: any[] }) { return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1); } + // Progress calculation + const totalItems = items.length; + const checkedItems = items.filter((item) => item.checked).length; + const progress = totalItems > 0 ? Math.round((checkedItems / totalItems) * 100) : 0; + return (
{/* Trip-Titel und Zeitraum */} @@ -315,6 +320,48 @@ export default function TripChecklist({ trips }: { trips: any[] }) { ))}
+ {/* Progressbar integriert am unteren Rand */} +
+
+ Fortschritt + {checkedItems} / {totalItems} erledigt +
+
+
+ {/* Optional: gray overlay for unfilled part */} +
+
+
{progress}%
+
{/* ...Rest der Checklist... */}