From 9daff3ea5c8d3980c39c73ba118adba2b0b19d23 Mon Sep 17 00:00:00 2001 From: Theis Gaedigk Date: Sun, 26 Oct 2025 13:54:43 +0100 Subject: [PATCH] refactor: update heading sizes in ItemTable, LoanTable, and UserTable components --- admin/src/Layout/Layout.tsx | 17 ----------------- admin/src/components/ItemTable.tsx | 2 +- admin/src/components/LoanTable.tsx | 9 +++++++-- admin/src/components/UserTable.tsx | 2 +- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/admin/src/Layout/Layout.tsx b/admin/src/Layout/Layout.tsx index baca51f..1bb9fc0 100644 --- a/admin/src/Layout/Layout.tsx +++ b/admin/src/Layout/Layout.tsx @@ -3,7 +3,6 @@ import { useEffect } from "react"; import Dashboard from "./Dashboard"; import Login from "./Login"; import Cookies from "js-cookie"; -import Landingpage from "@/components/API/Landingpage"; const API_BASE = (import.meta as any).env?.VITE_BACKEND_URL || @@ -12,16 +11,8 @@ const API_BASE = const Layout: React.FC = () => { const [isLoggedIn, setIsLoggedIn] = useState(false); - const [showAPI, setShowAPI] = useState(false); useEffect(() => { - const path = window.location.pathname.replace(/\/+$/, ""); // remove trailing slash - if (path === "/api") { - setShowAPI(true); - console.log("signal"); - return; - } - if (Cookies.get("token")) { const verifyToken = async () => { const response = await fetch(`${API_BASE}/api/verifyToken`, { @@ -48,14 +39,6 @@ const Layout: React.FC = () => { setIsLoggedIn(false); }; - if (showAPI) { - return ( -
- -
- ); - } - return (
{isLoggedIn ? ( diff --git a/admin/src/components/ItemTable.tsx b/admin/src/components/ItemTable.tsx index 8c2b3b4..d62e0b8 100644 --- a/admin/src/components/ItemTable.tsx +++ b/admin/src/components/ItemTable.tsx @@ -149,7 +149,7 @@ const ItemTable: React.FC = () => { {/* End action toolbar */} - + Gegenstände {isError && ( diff --git a/admin/src/components/LoanTable.tsx b/admin/src/components/LoanTable.tsx index 8523ae4..3f98cf7 100644 --- a/admin/src/components/LoanTable.tsx +++ b/admin/src/components/LoanTable.tsx @@ -54,6 +54,7 @@ const LoanTable: React.FC = () => { returned_date: string; created_at: string; loaned_items_name: string[]; + deleted: boolean; }; useEffect(() => { @@ -108,9 +109,13 @@ const LoanTable: React.FC = () => { {/* End action toolbar */} - + Ausleihen + + Die Ausleihen die rot sind, wurden gelöscht und sind nur für den Admin + sichtbar. + {isError && ( { {items.map((item) => ( - + {item.id} {item.username} diff --git a/admin/src/components/UserTable.tsx b/admin/src/components/UserTable.tsx index 708f3ce..acfd333 100644 --- a/admin/src/components/UserTable.tsx +++ b/admin/src/components/UserTable.tsx @@ -144,7 +144,7 @@ const UserTable: React.FC = () => { {/* End action toolbar */} - + Benutzer {changePWform && (