From 34a2c6b90da19aaedc3cc457b004c2331652534f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20X=2E=20F=C3=BCrst?= Date: Tue, 28 Apr 2026 07:55:46 +0200 Subject: [PATCH] Compact preview list below form on desktop; Beginn/Ende/Besucher in one row - Eingabe tab shows last 5 entries below form on lg+ screens (compact mode hides Objekte and Bemerkungen columns); Liste tab shows full 20 entries - Beginn, Ende, Besucher fields moved into a single flex row - LogbuchList accepts limit and compact props Co-Authored-By: Claude Sonnet 4.6 --- app/MainClient.tsx | 37 ++++++++++++++++++++++++++++++------- components/LogbuchForm.tsx | 38 +++++++++++++++++++------------------- components/LogbuchList.tsx | 20 ++++++++++++-------- 3 files changed, 61 insertions(+), 34 deletions(-) diff --git a/app/MainClient.tsx b/app/MainClient.tsx index 62e6600..c5eb63f 100644 --- a/app/MainClient.tsx +++ b/app/MainClient.tsx @@ -29,12 +29,12 @@ export default function MainClient({ kuerzel, beoId, beoName }: Props) { function handleSaved() { setRefreshKey((k) => k + 1); setEditEntry(null); - if (editEntry) setActiveTab('liste'); } function handleEdit(entry: LogbuchEintrag) { setEditEntry(entry); setActiveTab('eingabe'); + window.scrollTo({ top: 0, behavior: 'smooth' }); } async function handleLogout() { @@ -84,11 +84,11 @@ export default function MainClient({ kuerzel, beoId, beoName }: Props) { {/* Eingabe/Liste-Tabs */} -
+
{(['eingabe', 'liste'] as const).map((tab) => (
+ {/* Eingabe-Tab: Formular + kompakte Vorschau-Liste (nur Desktop) */} {activeTab === 'eingabe' && ( -
+ <> {editEntry && ( -
+
Eintrag bearbeiten (ID {editEntry.ID})
)} @@ -114,18 +115,40 @@ export default function MainClient({ kuerzel, beoId, beoName }: Props) { editEntry={editEntry} onSaved={handleSaved} /> -
+ + {/* Kompakte Liste — nur auf Desktop sichtbar */} +
+
+

Letzte Einträge

+ +
+ +
+ )} + {/* Liste-Tab: vollständige Liste */} {activeTab === 'liste' && ( )} -