fix: replace user.state string checks with user.proState int in drawer_menu
user.state (Spanish string) no longer exists — UserModel uses proState (int) from backend pro_state field: 0=inactive, 1=pending, 2=active, 3=denied. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
9be1c3b678
commit
b9a034f37f
@@ -304,7 +304,7 @@ class DrawerMenu extends StatelessWidget {
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
} else {
|
||||
if (user?.state == 'pendiente' || user?.state == null) {
|
||||
if (user?.proState == 0 || user?.proState == null) {
|
||||
Navigator.pop(context);
|
||||
if (kIsWeb) {
|
||||
Navigator.push(
|
||||
@@ -317,9 +317,9 @@ class DrawerMenu extends StatelessWidget {
|
||||
} else {
|
||||
Navigator.pushNamed(context, '/profesionalProfile');
|
||||
}
|
||||
} else if (user?.state == 'revision') {
|
||||
} else if (user?.proState == 1) {
|
||||
Navigator.pushNamed(context, '/profesionalRevision');
|
||||
} else if (user?.state == 'activo') {
|
||||
} else if (user?.proState == 2) {
|
||||
Navigator.pushNamed(context, '/solicitud');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user