The Operator is the frontline role in Ordervista, responsible for the day-to-day running of the restaurant floor. Accounts withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ytabeloved/ordervista/llms.txt
Use this file to discover all available pages before exploring further.
id_rol: 2 can see all active and historical orders across the system, create in-person orders on behalf of walk-in customers, advance orders through their lifecycle by updating their status, monitor the kitchen commands view to coordinate preparation, and generate printed or on-screen receipts when an order is completed. Operators do not have access to catalog management, user administration, or analytics reports — those surfaces belong exclusively to the Administrator.
Accessible Frontend Routes
After logging in, an Operator is directed to the operational layout. The following frontend routes are available to this role.| Route | Page | Purpose |
|---|---|---|
/operator | Order Management | View and manage all active and historical orders. |
/operator/new-order | Create In-Person Order | Build and submit an in-person order for a walk-in customer. |
/kitchen | Kitchen Commands | Review kitchen commands associated with active orders. |
/receipts | Receipts | Generate and view operational receipts for completed orders. |
API Endpoints Accessible
All routes below require a valid JWT (Authorization: Bearer <token>) with id_rol: 2. Routes that also accept id_rol: 1 are shared with the Administrator role.
Orders (managed view) — authorizeRoles(1, 2)
| Method | Endpoint | Action |
|---|---|---|
GET | /api/orders/manage | List all orders in the managed view. |
GET | /api/orders/manage/:id | Get full detail of a specific order. |
PATCH | /api/orders/manage/:id/status | Update the status of a specific order. |
POST | /api/orders/in-person | Create a new in-person (walk-in) order. |
Commands — authorizeRoles(1, 2)
| Method | Endpoint | Action |
|---|---|---|
GET | /api/commands | List all kitchen commands. |
GET | /api/commands/:id | Get the detail of a single command. |
Workflow
Log in
Navigate to
/login and authenticate with an Operator account. The backend issues a JWT containing id_rol: 2 and the frontend stores it in localStorage, granting access to all operational routes.View active orders
Go to
/operator to see the full order list. The managed order view shows every order in the system along with its current status, creation time, total, and customer details — giving the operator a live picture of what needs attention.Create an in-person order (optional)
If a walk-in customer arrives and places an order at the counter, navigate to
/operator/new-order. Select products from the catalog, set quantities, choose the order type, and submit. The order is created via POST /api/orders/in-person and immediately appears in the order list.Update order status
From the order management view, advance each order through its lifecycle by updating its status via
PATCH /api/orders/manage/:id/status. Valid status transitions follow the five status IDs defined in the system.Review kitchen commands
Navigate to
/kitchen to consult the COMANDAS table. Each command corresponds to an order sent to the kitchen, showing the items to be prepared. This view helps operators and kitchen staff stay coordinated without paper tickets.Order Status Values
Every order in Ordervista carries anid_estado field that references the ESTADOS_PEDIDO table. The Operator advances orders through the following statuses by sending the corresponding ID to PATCH /api/orders/manage/:id/status.
| Status ID | Status Name | Description |
|---|---|---|
1 | Pendiente | Order has been registered and is awaiting preparation. |
2 | En preparación | Order is actively being prepared in the kitchen. |
3 | Listo | Order is prepared and ready for pickup, delivery, or service. |
4 | Entregado | Order has been finalised and delivered to the customer. |
The backend validates that the incoming
id_estado value is one of [1, 2, 3, 4, 5]. Any value outside that range is rejected with a 400 Bad Request response before the database is touched. Status IDs 1–4 map to the named statuses in the ESTADOS_PEDIDO table above.