feat(F-076): completed feature
This commit is contained in:
32
work/artifacts/F-076/implementer.md
Normal file
32
work/artifacts/F-076/implementer.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# 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)
|
||||
```
|
||||
Reference in New Issue
Block a user