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
This commit is contained in:
Achintha Isuru
2026-01-24 12:00:41 -05:00
parent 24da0a4d04
commit faa2b2b0a6
2 changed files with 3 additions and 8 deletions

View File

@@ -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());
}
}

View File

@@ -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';