Sign page: added user check for accepting notes of a delivery

This commit is contained in:
Dennis Nemec
2025-11-28 20:46:03 +01:00
parent 7ea9108f62
commit 0150614ef5
12 changed files with 289 additions and 315 deletions

View File

@ -53,9 +53,7 @@ class _DeliveryAppState extends State<DeliveryApp> {
(context) => TourBloc(
opBloc: context.read<OperationBloc>(),
tourRepository: TourRepository(
service: DeliveryInfoService(
config: currentAppState.config,
),
service: DeliveryInfoService(),
),
),
),
@ -64,7 +62,9 @@ class _DeliveryAppState extends State<DeliveryApp> {
(context) => NoteBloc(
opBloc: context.read<OperationBloc>(),
repository: NoteRepository(
service: NoteService(config: currentAppState.config),
service: NoteService(
backendUrl: currentAppState.config.backendUrl,
),
),
),
),
@ -73,12 +73,12 @@ class _DeliveryAppState extends State<DeliveryApp> {
(context) => DeliveryBloc(
opBloc: context.read<OperationBloc>(),
noteRepository: NoteRepository(
service: NoteService(config: currentAppState.config),
service: NoteService(
backendUrl: currentAppState.config.backendUrl,
),
),
repository: DeliveryRepository(
service: DeliveryInfoService(
config: currentAppState.config,
),
service: DeliveryInfoService(),
),
),
),

View File

@ -12,8 +12,6 @@ import 'package:hl_lieferservice/widget/home/bloc/navigation_bloc.dart';
import 'package:hl_lieferservice/widget/home/bloc/navigation_state.dart';
import 'package:hl_lieferservice/widget/navigation_bar/presentation/navigation_bar.dart';
import '../../../bloc/app_bloc.dart';
import '../../../bloc/app_states.dart';
import '../../../feature/cars/bloc/cars_bloc.dart';
import '../../../feature/cars/repository/cars_repository.dart';
import '../../../feature/cars/service/cars_service.dart';
@ -46,13 +44,10 @@ class _HomeState extends State<Home> {
}
if (index == 2) {
final currentAppState = context.read<AppBloc>().state as AppConfigLoaded;
return BlocProvider(
create:
(context) => CarsBloc(
repository: CarsRepository(
service: CarService(config: currentAppState.config),
),
repository: CarsRepository(service: CarService()),
opBloc: context.read<OperationBloc>(),
),
child: CarManagementPage(),