From a25413affa3efd7d9e97b5d19bd1feb71d7b2c0a Mon Sep 17 00:00:00 2001 From: Davenludd Date: Sun, 14 Apr 2024 15:52:13 +0200 Subject: [PATCH] Add total time in TimePerActivity component --- frontend/src/Components/TimePerActivity.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/Components/TimePerActivity.tsx b/frontend/src/Components/TimePerActivity.tsx index c5e4a9f..0963e88 100644 --- a/frontend/src/Components/TimePerActivity.tsx +++ b/frontend/src/Components/TimePerActivity.tsx @@ -14,6 +14,7 @@ export default function TimePerRole(): JSX.Element { const [own_work, setOwnWork] = useState(0); const [study, setStudy] = useState(0); const [testing, setTesting] = useState(0); + const total = development + meeting + admin + own_work + study + testing; const token = localStorage.getItem("accessToken") ?? ""; const { projectName } = useParams(); @@ -49,7 +50,7 @@ export default function TimePerRole(): JSX.Element { return ( <>

- Total Time Per Activity In: {projectName}{" "} + Total Time Per Activity For All Members In: {projectName}{" "}

@@ -129,6 +130,12 @@ export default function TimePerRole(): JSX.Element { /> + + In Total: + +

{total}

+ +