Co-authored-by: MENDOZA BALLARDO GAEL RICARDO <gael-meb123@users.noreply.github.com>

Co-authored-by: Azareth-Tr <Azareth-Tr@users.noreply.githu

b.com>

correcion de errores en llenado de tablas, primeras vistas frontend
This commit is contained in:
shinra32
2026-05-22 20:17:04 -06:00
parent fc28333e3f
commit 21a73162df
14 changed files with 600 additions and 95 deletions

View File

@@ -39,20 +39,6 @@ class _LoginPageState extends ConsumerState<LoginPage> {
if (!mounted) {
return;
}
final authState = ref.read(authControllerProvider).asData?.value;
if (authState?.userRole == 'admin') {
context.go('/admin');
return;
}
if (authState?.userRole == 'driver') {
context.go('/driver');
return;
}
final routeId = authState?.routeId;
if (routeId != null && routeId.isNotEmpty) {
context.go('/home?routeId=$routeId');
return;
}
context.go('/home');
} catch (error) {
if (!mounted) {

View File

@@ -44,20 +44,6 @@ class _RegisterPageState extends ConsumerState<RegisterPage> {
if (!mounted) {
return;
}
final authState = ref.read(authControllerProvider).asData?.value;
if (authState?.userRole == 'admin') {
context.go('/admin');
return;
}
if (authState?.userRole == 'driver') {
context.go('/driver');
return;
}
final routeId = authState?.routeId;
if (routeId != null && routeId.isNotEmpty) {
context.go('/home?routeId=$routeId');
return;
}
context.go('/home');
} catch (error) {
if (!mounted) {