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:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user