diff --git a/app/MainClient.tsx b/app/MainClient.tsx index e16a42a..53f16da 100644 --- a/app/MainClient.tsx +++ b/app/MainClient.tsx @@ -6,6 +6,7 @@ import type { Kuppel, LogbuchEintrag } from '@/types/logbuch'; import LogbuchForm from '@/components/LogbuchForm'; import LogbuchList from '@/components/LogbuchList'; import Statistik from '@/components/Statistik'; +import Fahrkosten from '@/components/Fahrkosten'; import packageJson from '@/package.json'; interface Props { @@ -17,7 +18,7 @@ interface Props { export default function MainClient({ kuerzel, beoId, beoName, role }: Props) { const [activeKuppel, setActiveKuppel] = useState('West'); - const [activeTab, setActiveTab] = useState<'eingabe' | 'liste' | 'statistik'>('eingabe'); + const [activeTab, setActiveTab] = useState<'eingabe' | 'liste' | 'statistik' | 'fahrkosten'>('eingabe'); const [refreshKey, setRefreshKey] = useState(0); const [editEntry, setEditEntry] = useState(null); @@ -92,7 +93,9 @@ export default function MainClient({ kuerzel, beoId, beoName, role }: Props) { {/* Eingabe/Liste/Statistik-Tabs */}
- {(['eingabe', 'liste', 'statistik'] as const).map((tab) => ( + {(['eingabe', 'liste', 'statistik', 'fahrkosten'] as const) + .filter((tab) => tab !== 'fahrkosten' || role?.includes('admin') || role?.includes('master')) + .map((tab) => ( ))}
@@ -183,6 +186,22 @@ export default function MainClient({ kuerzel, beoId, beoName, role }: Props) { )} + {/* Fahrkosten-Tab */} + {activeTab === 'fahrkosten' && (role?.includes('admin') || role?.includes('master')) && ( +
+
+ Fahrkostenabrechnung + +
+ +
+ )} +