Phasenbasierte Lieferübersicht + Beladen-Flow, plus Migrationsplan für Rust-Backend

UI-Restructuring:
- TabBar in scan_page durch dedizierte Phasen ersetzt: Sortieren / Beladen / Ausliefern
- PhaseBloc + PhaseService leiten Phase aus Tour-/Item-States ab
- DeliverySelectionPage (ab 2 Autos) und DeliverySortPage als eigene Flows
- LoadingOverviewPage / LoadingCustomerPage für die Beladephase
- PhaseStepper-Widget im Home für Phasen-Anzeige
- Lager-Differenzierung (Standardlager 0 vs. Außenlager) via WarehouseBadge

Process-Stubs:
- ProcessRepository für Hold/Cancel/Sort/Assign-Flows (stub, bereit für Backend-Anbindung)

Doku:
- docs/BACKEND_MIGRATION.md: Phasenplan für Umstellung auf das neue
  Rust-Backend (OpenAPI-Generator, Keycloak OIDC, Clean-Arch-Layering)
This commit is contained in:
Dennis Nemec
2026-05-14 22:27:56 +02:00
parent ac6b03227d
commit 456fb59668
29 changed files with 5425 additions and 1015 deletions

View File

@ -0,0 +1,115 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:hl_lieferservice/feature/car_selection/bloc/bloc.dart';
import 'package:hl_lieferservice/feature/car_selection/bloc/events.dart';
import 'package:hl_lieferservice/feature/car_selection/bloc/state.dart';
import 'package:hl_lieferservice/feature/cars/presentation/car_management_page.dart';
import 'package:hl_lieferservice/feature/settings/presentation/settings_page.dart';
/// Globales Side-Menu für Fahrzeuge & Einstellungen.
///
/// Da Sortieren und Beladen kein BottomNav mehr haben, sind diese
/// administrativen Funktionen nur noch über den Drawer erreichbar.
/// Während der Auslieferungs-Phase steht zusätzlich das alte BottomNav
/// weiterhin zur Verfügung.
class HomeAppDrawer extends StatelessWidget {
const HomeAppDrawer({super.key});
void _openPage(BuildContext context, Widget page) {
Navigator.of(context).pop();
Navigator.of(context).push(
MaterialPageRoute(builder: (_) => page),
);
}
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final carState = context.watch<CarSelectBloc>().state;
return Drawer(
child: SafeArea(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
DrawerHeader(
decoration: BoxDecoration(color: theme.primaryColor),
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
"Holzleitner",
style: TextStyle(
color: theme.colorScheme.onSecondary,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 4),
if (carState is CarSelectComplete)
Row(
children: [
Icon(
Icons.local_shipping,
color: theme.colorScheme.onSecondary,
size: 16,
),
const SizedBox(width: 6),
Text(
carState.selectedCar.plate,
style: TextStyle(
color: theme.colorScheme.onSecondary,
fontWeight: FontWeight.w600,
),
),
],
)
else
Text(
"Kein Fahrzeug ausgewählt",
style: TextStyle(
color: theme.colorScheme.onSecondary.withValues(
alpha: 0.8,
),
fontSize: 13,
),
),
],
),
),
if (carState is CarSelectComplete)
ListTile(
leading: const Icon(Icons.swap_horiz),
title: const Text("Fahrzeug wechseln"),
onTap: () {
Navigator.of(context).pop();
context.read<CarSelectBloc>().add(CarSelectChange());
},
),
ListTile(
leading: const Icon(Icons.local_shipping_outlined),
title: const Text("Fahrzeuge verwalten"),
onTap: () => _openPage(context, const CarManagementPage()),
),
ListTile(
leading: const Icon(Icons.settings_outlined),
title: const Text("Einstellungen"),
onTap: () => _openPage(context, const SettingsPage()),
),
const Spacer(),
const Divider(height: 1),
const Padding(
padding: EdgeInsets.all(12),
child: Text(
"Lieferservice-App",
style: TextStyle(fontSize: 11, color: Colors.grey),
),
),
],
),
),
);
}
}