Accessing the Admin Panel
The admin panel is accessible to users with admin permissions. Access is controlled by therol field in the user profile:
- Only users with the appropriate admin role can access the admin panel
- Admin access is verified through the
AuthSessionservice - Upon logout, users are redirected back to the main application
Admin Dashboard Layout
The admin panel uses a tab-based navigation system with four main sections:Users Management (Gestion de usuarios)
View and manage all registered users in the system. This is the first tab and displays user information including ID, name, and email.
Product Inventory (Inventario del gremio)
Manage your product catalog, including adding new items, editing existing products, and tracking stock levels.
Order Management (Control de pedidos)
View and process all customer orders, update order statuses, and track order history.
Navigation Between Sections
The admin panel features a bottom navigation bar with clear icons and labels for each section:Admin Permissions
Access to the admin panel is role-based:- The
rolfield in the user model determines admin access - Users without admin permissions cannot access the admin panel
- The admin panel checks permissions on initialization
Admin Panel Features
Header
The admin panel header displays:- “LarpLand Admin” title
- Current section name (dynamically updated based on selected tab)
- Logout button for ending the admin session
Main Content Area
The main content uses anIndexedStack to efficiently switch between sections:
Session Management
Admins can log out at any time using the logout button:The admin panel is designed for desktop and tablet use with a responsive layout that adapts to different screen sizes.