From eaa325668c1e840464b947f669df2c1f49b1db8f Mon Sep 17 00:00:00 2001 From: Theis Gaedigk Date: Sun, 22 Feb 2026 23:21:33 +0100 Subject: [PATCH] Implemented page header and added note column --- FrontendV2/src/pages/Landingpage.tsx | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/FrontendV2/src/pages/Landingpage.tsx b/FrontendV2/src/pages/Landingpage.tsx index a813a85..e68c393 100644 --- a/FrontendV2/src/pages/Landingpage.tsx +++ b/FrontendV2/src/pages/Landingpage.tsx @@ -9,12 +9,13 @@ import { Card, SimpleGrid, Button, + Container, } from "@chakra-ui/react"; import MyAlert from "@/components/myChakra/MyAlert"; import { useTranslation } from "react-i18next"; import { API_BASE } from "@/config/api.config"; import Cookies from "js-cookie"; -import { useNavigate } from "react-router-dom"; +import { Header } from "@/components/Header"; export const formatDateTime = (value: string | null | undefined) => { if (!value) return "N/A"; @@ -32,6 +33,7 @@ type Loan = { returned_date: string | null; take_date: string | null; loaned_items_name: string[] | string; + note: string | null; }; type Device = { @@ -46,7 +48,6 @@ type Device = { const Landingpage: React.FC = () => { const { t } = useTranslation(); - const navigate = useNavigate(); const [isLoading, setIsLoading] = useState(false); const [loans, setLoans] = useState([]); @@ -59,7 +60,7 @@ const Landingpage: React.FC = () => { const setError = ( status: "error" | "success", message: string, - description: string + description: string, ) => { setIsError(false); setErrorStatus(status); @@ -85,7 +86,7 @@ const Landingpage: React.FC = () => { setError( "error", t("error-by-loading"), - t("unexpected-date-format_loan") + t("unexpected-date-format_loan"), ); } @@ -102,7 +103,7 @@ const Landingpage: React.FC = () => { setError( "error", t("error-by-loading"), - t("unexpected-date-format_device") + t("unexpected-date-format_device"), ); } } catch (e) { @@ -115,14 +116,8 @@ const Landingpage: React.FC = () => { }, []); return ( - <> - - Matthias-Claudius-Schule Technik - - - + +
{t("all-loans")} @@ -168,6 +163,9 @@ const Landingpage: React.FC = () => { {t("return-date")} + + {t("note")} + @@ -184,6 +182,7 @@ const Landingpage: React.FC = () => { {formatDateTime(loan.take_date)} {formatDateTime(loan.returned_date)} + {loan.note} ))} @@ -260,7 +259,7 @@ const Landingpage: React.FC = () => { - + ); };