feat(F-176): completed feature
This commit is contained in:
3
work/artifacts/F-176/architect.md
Normal file
3
work/artifacts/F-176/architect.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# F-176 — Design
|
||||
|
||||
Use `p.name`, `p.state='active'`, `v.sku/ean`, `inventory_stock.available`, `pricing_variant_prices.net_unit_amount_cents`, and categories linked by `product_id`. Search EAN with `ILIKE` so scanner input and partial manual barcode searches both work. Keep all input parameterized.
|
||||
3
work/artifacts/F-176/documenter.md
Normal file
3
work/artifacts/F-176/documenter.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# POS product search
|
||||
|
||||
The POS search field accepts product names, SKU, full EAN and partial EAN text. Lookup failures now display an explicit API error instead of the misleading “Sin resultados”.
|
||||
19
work/artifacts/F-176/implementer.md
Normal file
19
work/artifacts/F-176/implementer.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# F-176 — Implementer
|
||||
|
||||
## Cause
|
||||
POS lookup SQL was written for an obsolete schema and referenced nonexistent columns: `v.name`, `v.active`, `p.active`, `inventory_stock.quantity`, `pricing_variant_prices.price_cents`, plus category links by variant. PostgreSQL returned 500; the UI swallowed it and rendered “Sin resultados”.
|
||||
|
||||
## Changes
|
||||
- Search uses product name/state and current variant SKU/EAN.
|
||||
- Inventory uses summed `available`, scoped to the active store.
|
||||
- Price uses offer or current net amount.
|
||||
- Category lookup uses `catalog_product_categories.product_id`.
|
||||
- Manual partial EAN search uses parameterized `ILIKE`; exact EAN/SKU endpoints were repaired too.
|
||||
- UI now exposes API search errors rather than reporting false empty results.
|
||||
|
||||
## Evidence
|
||||
- Project TypeScript PASS.
|
||||
- POS Next build PASS.
|
||||
- `git diff --check` PASS.
|
||||
- Authenticated runtime search `q=590123412345`: HTTP 200, 12 existing products.
|
||||
- Exact EAN `59012341234501`: HTTP 200, Almendras Crudas Ecologicas, stock 25, price 895.
|
||||
1
work/artifacts/F-176/leader-close.json
Normal file
1
work/artifacts/F-176/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-176","agent":"leader","stage":"close","verdict":"APPROVED","checks":[{"item":"reviewer/security/qa approved","ok":true},{"item":"runtime partial and exact barcode acceptance","ok":true},{"item":"verify.sh green","ok":true}],"issues":[]}
|
||||
1
work/artifacts/F-176/qa.json
Normal file
1
work/artifacts/F-176/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-176","agent":"qa","stage":"qa_gate","verdict":"APPROVED","checks":[{"item":"partial barcode 590123412345 returns HTTP 200 and 12 products","ok":true},{"item":"exact EAN 59012341234501 returns correct product","ok":true},{"item":"stock and price returned","ok":true},{"item":"POS build and TypeScript","ok":true},{"item":"verify.sh","ok":true}],"issues":[]}
|
||||
1
work/artifacts/F-176/reviewer.json
Normal file
1
work/artifacts/F-176/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-176","agent":"reviewer","stage":"review_gate","verdict":"APPROVED","checks":[{"item":"all lookup fields match current database schema","ok":true},{"item":"search UI no longer hides server errors","ok":true},{"item":"TypeScript and POS build","ok":true},{"item":"authenticated runtime search","ok":true}],"issues":[]}
|
||||
1
work/artifacts/F-176/security.json
Normal file
1
work/artifacts/F-176/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"feature_id":"F-176","agent":"security","stage":"security_gate","verdict":"APPROVED","checks":[{"item":"role authorization retained","ok":true},{"item":"query and limits remain parameterized","ok":true},{"item":"store scope supplied by active cash session","ok":true}],"issues":[]}
|
||||
Reference in New Issue
Block a user