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:
@ -4,47 +4,46 @@ import 'package:hl_lieferservice/widget/home/bloc/navigation_bloc.dart';
|
||||
import 'package:hl_lieferservice/widget/home/bloc/navigation_event.dart';
|
||||
import 'package:hl_lieferservice/widget/home/bloc/navigation_state.dart';
|
||||
|
||||
class AppNavigationBar extends StatefulWidget {
|
||||
/// BottomNavigationBar des Home-Scaffolds — nur in der Auslieferungs-Phase
|
||||
/// sichtbar (siehe `Home`). Die Tabs spiegeln die in dieser Phase relevanten
|
||||
/// Bereiche wider: Auslieferung, Fahrzeugverwaltung, Einstellungen.
|
||||
///
|
||||
/// Beladung als Tab wurde bewusst entfernt: ist die App in der Auslieferung,
|
||||
/// gehört die Beladung organisatorisch der Vergangenheit an. Wer dorthin
|
||||
/// zurück muss, nutzt den Phasen-Stepper.
|
||||
class AppNavigationBar extends StatelessWidget {
|
||||
const AppNavigationBar({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _AppNavigationBarState();
|
||||
}
|
||||
|
||||
class _AppNavigationBarState extends State<AppNavigationBar> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocBuilder<NavigationBloc, NavigationState>(
|
||||
builder: (context, state) {
|
||||
if (state is NavigationInfo) {
|
||||
return NavigationBar(
|
||||
selectedIndex: state.navigationIndex,
|
||||
destinations: const [
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.barcode_reader),
|
||||
label: "Beladung",
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.fire_truck),
|
||||
label: "Auslieferung",
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.local_shipping),
|
||||
label: "Fahrzeuge",
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.settings_outlined),
|
||||
selectedIcon: Icon(Icons.settings),
|
||||
label: "Einstellungen",
|
||||
),
|
||||
],
|
||||
onDestinationSelected: (int index) {
|
||||
context.read<NavigationBloc>().add(NavigateToIndex(index: index));
|
||||
},
|
||||
);
|
||||
}
|
||||
if (state is! NavigationInfo) return const SizedBox.shrink();
|
||||
|
||||
return Container();
|
||||
final navIndex = state.navigationIndex;
|
||||
final safeIndex = (navIndex >= 0 && navIndex <= 2) ? navIndex : 0;
|
||||
|
||||
return NavigationBar(
|
||||
selectedIndex: safeIndex,
|
||||
destinations: const [
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.fire_truck),
|
||||
label: "Auslieferung",
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.local_shipping),
|
||||
label: "Fahrzeuge",
|
||||
),
|
||||
NavigationDestination(
|
||||
icon: Icon(Icons.settings_outlined),
|
||||
selectedIcon: Icon(Icons.settings),
|
||||
label: "Einstellungen",
|
||||
),
|
||||
],
|
||||
onDestinationSelected: (int index) {
|
||||
context.read<NavigationBloc>().add(NavigateToIndex(index: index));
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user