The admin panel provides a comprehensive interface for managing products in the Tienda ETCA e-commerce platform. It is restricted to users with theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/betovildoza/tiendaetca/llms.txt
Use this file to discover all available pages before exploring further.
admin role and provides full CRUD (Create, Read, Update, Delete) operations.
Features
The admin panel includes the following capabilities:Product Management
Add, edit, and delete products from the catalog
Real-time Updates
Changes are immediately reflected via API integration
Product Listing
View all products with images, names, and prices
Modal Forms
User-friendly modal dialogs for adding and editing products
Admin Panel Interface
The admin panel is implemented in theAdmin component (/workspace/source/src/layout/Admin.jsx) and provides:
Navigation
- Logout button: Clears authentication and redirects to home
- Admin link: Quick navigation to admin panel
Product Display
Products are displayed in a grid layout with:- Product image
- Product name
- Product price
- Action buttons (Edit/Delete)
Action Buttons
Add Product Button
Add Product Button
Edit Button
Edit Button
Delete Button
Delete Button
Access Control
The admin panel is protected by:- Authentication check: User must be logged in
- Role verification: User must have
adminrole - Route protection: Implemented via
RutaProtegidacomponent
State Management
The admin panel uses theAdminContext to manage:
- Product list
- Loading states
- Modal visibility (add/edit)
- Selected product for editing
- CRUD operations
/workspace/source/src/context/AdminContext.jsx