Closed Ealanisln closed 1 week ago
The admin menu is not being displayed for users with the "super_admin" type. This is due to an incorrect condition in the menu rendering logic and potentially inconsistent user type naming.
...(userType === "admin" && "super_admin" ? [adminMenuItem] : []),
Root causes:
The condition for rendering the admin menu is incorrectly using AND (&&) instead of OR (||). The condition doesn't account for the "super_admin" type explicitly. Possible inconsistency between the user type in the session data and the types checked in the code.
Solution: Update the menu rendering logic to correctly handle both "admin" and "super_admin" user types:
...(userType === "admin" || userType === "super_admin" ? [adminMenuItem] : []),
The user name into the Navbar sometimes is not showing the correct value from the Database, this due we have two kinds of names values depending if it's driver or client and vendor.