Files
patrickandClaude Sonnet 5 200709d416 feat: Übersicht-Tab (Zeitkonto, Urlaubskonto, Zeiten-Historie)
Bottom-Navigation (MainShell) mit zwei Tabs: Stempeln (bisheriger
HomeScreen) + neue Übersicht (read-only): Zeitkonto (gearbeitet/Soll/Saldo
via GET /time/balance/me), Urlaubskonto (Anspruch/genommen/verfügbar via
GET /absences/balance) und die letzten Zeiteinträge (GET /time/entries).
Kein Beantragen von Urlaub, keine Korrektur – nur Anzeige. intl-Locale-Init
bewusst vermieden (Crash-Risiko wie beim letzten Mal), Datum manuell
formatiert. v0.1.8+9.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dzdm3EWeNdYFUuXFRJryA1
2026-09-10 00:21:52 +02:00

34 lines
986 B
Dart

import 'package:flutter/material.dart';
import 'home_screen.dart';
import 'overview_screen.dart';
/// Bottom-Navigation: Stempeln (Startbildschirm) + Übersicht
/// (Zeitkonto/Urlaubskonto/Historie, read-only).
class MainShell extends StatefulWidget {
const MainShell({super.key});
@override
State<MainShell> createState() => _MainShellState();
}
class _MainShellState extends State<MainShell> {
int _index = 0;
static const _screens = [HomeScreen(), OverviewScreen()];
@override
Widget build(BuildContext context) {
return Scaffold(
body: IndexedStack(index: _index, children: _screens),
bottomNavigationBar: NavigationBar(
selectedIndex: _index,
onDestinationSelected: (i) => setState(() => _index = i),
destinations: const [
NavigationDestination(icon: Icon(Icons.punch_clock), label: 'Stempeln'),
NavigationDestination(icon: Icon(Icons.bar_chart), label: 'Übersicht'),
],
),
);
}
}