From faa2b2b0a678d2de844e73a2368acc9917cf1acd Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Sat, 24 Jan 2026 12:00:41 -0500 Subject: [PATCH] fix(staff): align worker home route paths - Updated staff_main modulePath to /worker-home - Updated main.dart to mount staff_main at /worker-home - Fixes RouteNotFoundException when navigating from auth --- apps/mobile/apps/staff/lib/main.dart | 9 ++------- .../src/presentation/constants/staff_main_routes.dart | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/mobile/apps/staff/lib/main.dart b/apps/mobile/apps/staff/lib/main.dart index e7c11471..91e62099 100644 --- a/apps/mobile/apps/staff/lib/main.dart +++ b/apps/mobile/apps/staff/lib/main.dart @@ -6,6 +6,7 @@ import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_modular/flutter_modular.dart'; import 'package:staff_authentication/staff_authentication.dart' as staff_authentication; +import 'package:staff_main/staff_main.dart' as staff_main; import 'package:firebase_core/firebase_core.dart'; void main() async { @@ -24,13 +25,7 @@ class AppModule extends Module { // Set the initial route to the authentication module r.module("/", module: staff_authentication.StaffAuthenticationModule()); - // Placeholder for home route (referenced in auth feature) - r.child( - "/worker-home", - child: (_) => const Scaffold( - body: Center(child: Text("Worker Home - To Be Implemented")), - ), - ); + r.module('/worker-home', module: staff_main.StaffMainModule()); } } diff --git a/apps/mobile/packages/features/staff/staff_main/lib/src/presentation/constants/staff_main_routes.dart b/apps/mobile/packages/features/staff/staff_main/lib/src/presentation/constants/staff_main_routes.dart index f56d23bd..cc4c4df9 100644 --- a/apps/mobile/packages/features/staff/staff_main/lib/src/presentation/constants/staff_main_routes.dart +++ b/apps/mobile/packages/features/staff/staff_main/lib/src/presentation/constants/staff_main_routes.dart @@ -1,5 +1,5 @@ abstract class StaffMainRoutes { - static const String modulePath = '/staff-main'; + static const String modulePath = '/worker-home'; static const String shifts = '/shifts'; static const String payments = '/payments';