Files
mercadodevida/work/artifacts/F-076/implementer.md
2026-08-19 19:31:46 +02:00

33 lines
1.3 KiB
Markdown

# F-076 — Implementer evidence: Link to frontend + archive separate listing
## Problem
Admin product listing (`/products`) showed all products in one table with no way to filter by state, and no link to the frontend product page.
## Changes
`project/apps/admin/src/app/(dashboard)/products/page.tsx`:
- Added `statusFilter` state: `'all' | 'active' | 'archived'`
- Added filter buttons (Todos / Activos / Archivados) between search bar and table
- Added "Tienda" (Frontend) column header
- Added external link icon (↗) for active products: opens `http://192.168.18.93:3003/productos/[slug]` in new tab
- Archived products show empty cell in "Tienda" column
- Filter buttons use green bg for active filter, border style for inactive
- `filteredProducts` array: filters by `p.state` when `statusFilter !== 'all'`
- `paginationEnabled`: pagination disabled when status filter is active (client-side filter)
- Header count updates to reflect filtered product count
- Removed the old "→" arrow column (replaced by proper external link icon)
## Verification
- `npx tsc --noEmit` admin — exit 0 ✅
- `npx eslint` on changed file — exit 0 ✅
- `./scripts/verify.sh` — exit 0 ✅
## Files touched
```
project/apps/admin/src/app/(dashboard)/products/page.tsx (modified)
work/artifacts/F-076/implementer.md (this file)
```