[PK-43] FE-3 Detail produktu (galéria, ks/kg, akcia, add-to-cart) #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/PK-43-product-detail"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
FE-3 detail produktu — route
/p/<slug>, galéria, cena (akcia/preškrtnutá), ks/kg stepper, add-to-cart cezPOST /api/cart/items, SEO meta + 404.Files
fe/src/app/p/[slug]/page.tsx— server component,revalidate=60,notFound()na 404.fe/src/app/p/[slug]/not-found.tsx— 404 stránka.fe/src/components/product/ProductGallery.tsx— hero + thumbnail switcher, placeholder.fe/src/components/product/ProductDetailAddToCart.tsx— qty stepper (ks/kg), orientačná cena pre kg, POST do košíka, toast event reuse,router.refresh()po úspechu aj postock_exceeded.fe/src/lib/api.ts— pridanýProductDetailtype +getProductDetail(slug).Smoke tests (lokálne, docker compose)
/p/klobasa-domaca(piece + promo) — strikethrough 5,49 €, effective 4,67 €, badge Akcia, POST 201 → toast success ✓/p/bravcova-krkovicka(kg) — decimal stepper 0,5, orientačná cena 4,50 €, POST 201 ✓/p/korenie-na-grilovaniepostock=0→ Vypredané badge + disabled button ✓/p/neexistuje→ 404 (FE aj BE) ✓qty=9999→ 400{error:"stock_exceeded", available:100}→ toast s množstvom + refresh ✓lint,tsc --noEmit,next buildčisté.Závislosti
/api/products/<slug>(PK-28) ✓/api/cart/items(PK-30) ✓masox:toast(PK-41) reuse ✓Mimo scope
/p/akciovy-produkta/p/vypredanev menovke chýbajú v seed; pokryl som ekvivalentné scenáre cezklobasa-domaca(promo) akorenie-na-grilovanie(manuálnestock=0).Issue: PK-43