From be963b2281cfddad079582701766c114c8d06a60 Mon Sep 17 00:00:00 2001 From: Davenludd Date: Wed, 3 Apr 2024 18:05:19 +0200 Subject: [PATCH] Fix input fields to be read-only in OtherUsersTR and initialize state variables in TimePerRole --- frontend/src/Components/OtherUsersTR.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/Components/OtherUsersTR.tsx b/frontend/src/Components/OtherUsersTR.tsx index 2b00e16..ce7761c 100644 --- a/frontend/src/Components/OtherUsersTR.tsx +++ b/frontend/src/Components/OtherUsersTR.tsx @@ -29,6 +29,7 @@ export default function OtherUsersTR(): JSX.Element { projectName ?? "", fetchedWeek?.toString() ?? "0", token, + username ?? "", ); if (response.success) { @@ -86,6 +87,7 @@ export default function OtherUsersTR(): JSX.Element { min="0" className="border-2 border-black rounded-md text-center w-1/2" value={developmentTime === 0 ? "" : developmentTime} + readOnly /> @@ -97,6 +99,7 @@ export default function OtherUsersTR(): JSX.Element { min="0" className="border-2 border-black rounded-md text-center w-1/2" value={meetingTime === 0 ? "" : meetingTime} + readOnly /> @@ -108,6 +111,7 @@ export default function OtherUsersTR(): JSX.Element { min="0" className="border-2 border-black rounded-md text-center w-1/2" value={adminTime === 0 ? "" : adminTime} + readOnly /> @@ -119,6 +123,7 @@ export default function OtherUsersTR(): JSX.Element { min="0" className="border-2 border-black rounded-md text-center w-1/2" value={ownWorkTime === 0 ? "" : ownWorkTime} + readOnly /> @@ -130,6 +135,7 @@ export default function OtherUsersTR(): JSX.Element { min="0" className="border-2 border-black rounded-md text-center w-1/2" value={studyTime === 0 ? "" : studyTime} + readOnly /> @@ -141,6 +147,7 @@ export default function OtherUsersTR(): JSX.Element { min="0" className="border-2 border-black rounded-md text-center w-1/2" value={testingTime === 0 ? "" : testingTime} + readOnly />