Expiry alerts
Products flagged as expired or approaching their pull date, filtered by product-type business rules.
Navigation hub
One-click access to Inventario, Recepción Proveedores, Recepción CEDIS, and Control RPC.
Personalized greeting
Displays the logged-in user name and store (tienda) pulled from local session data.
Alert detail list
A scrollable list of every active alert with severity indicators and a direct link to the product detail view.
Summary metric cards
Three cards appear at the top of the Dashboard.| Card | Color | What it counts |
|---|---|---|
| Caducados | Red (error) | Products whose expiry date has already passed (diasRestantes < 0), after applying product-type filters |
| Próximos a caducar | Orange (warning) | Products with 10 days or fewer remaining that are not yet flagged for pull |
| Total alertas críticas | Blue (info) | Total count of all alerts that pass the business-rule filter |
Alert filtering rules
Not every product triggers an alert on the same schedule. The Dashboard applies the following rules based on keywords found in the product description:- Meat & charcuterie
- Pharmacy
- Fruit, vegetables & dairy
- All other products
Products whose description contains pollo, carne, or salchicha appear as a critical alert when they have 3 days or fewer remaining.
Products whose alert text contains a checkmark (✅) are in good standing and are never shown in the alert list, regardless of how many days remain.
Alert severity levels
Each alert in the detail list uses a color-coded severity to help you prioritize action.| Severity | Color | Meaning |
|---|---|---|
| error | Red | Product has already expired. Remove from shelf immediately. |
| warning | Orange | Product is within its pull window or a non-pharmacy product has 4–10 days remaining. Rotate stock and move to front of shelf. |
| info | Blue | Product is approaching expiry (under 10 days) but has not yet reached its pull threshold. Monitor closely. |
”Surte inmediatamente” indicator
Non-pharmacy products with between 4 and 10 days remaining receive an additional Surte inmediatamente label on their alert. This means the product should be stocked to the floor immediately to reduce waste and maximize sell-through before the pull date.Navigating from the Dashboard
Four buttons at the bottom of the summary cards take you directly to each operational module.| Button | Destination | Purpose |
|---|---|---|
| Inventario | /inventario | Search stock by barcode and view lot-level expiry detail |
| Recepción Proveedores | /recepcion | Register incoming orders from suppliers by PO number |
| Recepción CEDIS | /recepcion-cedis | Audit truck deliveries from the distribution center |
| Control RPC | /rpc | Track returnable packaging containers (RPC) |
Viewing alert detail
Each alert in the detail list includes a Ver detalle button. Clicking it navigates to/inventario/{codigoBarras}, where you can see every lot for that product sorted by expiry date, along with lot-level alerts and stock counts.
Duplicate handling
The Dashboard deduplicates alerts before displaying them. Two records are considered the same entry if they share the samecodigoBarras, fechaCaducidad, and cantidad. Only the first occurrence is shown, preventing inflated alert counts caused by duplicate database records.