[PK-64] BE: doplnit imageUrl do CartItemSnapshot v seed.ts #24

Open
forge-admin wants to merge 1 commit from agent/be-dev/782f0101 into main
Owner

Kontext

be/prisma/seed.ts:862 (buildCartSnapshots) skladal objekty CartItemSnapshot bez povinneho pola imageUrl (zavedene v PK-46 cez be/lib/cartService.ts:15-29). tsc --noEmit hlasil TS2741 na prisma/seed.ts:862.

Zmena

  • ProductWithMeta rozsireny o imageUrl: string | null.
  • seedProducts plni imageUrl z /products/${prod.slug}.svg (rovnaka konvencia ako runtime images[0] v be/lib/cart.ts:92).
  • buildCartSnapshots propaguje product.imageUrl do snapshotu.

Overenie

  • cd be && npx tsc --noEmit -> cisty.
  • npx vitest run -> 200/200 zelene.
## Kontext `be/prisma/seed.ts:862` (`buildCartSnapshots`) skladal objekty `CartItemSnapshot` bez povinneho pola `imageUrl` (zavedene v PK-46 cez `be/lib/cartService.ts:15-29`). `tsc --noEmit` hlasil `TS2741` na `prisma/seed.ts:862`. ## Zmena - `ProductWithMeta` rozsireny o `imageUrl: string | null`. - `seedProducts` plni `imageUrl` z `/products/${prod.slug}.svg` (rovnaka konvencia ako runtime `images[0]` v `be/lib/cart.ts:92`). - `buildCartSnapshots` propaguje `product.imageUrl` do snapshotu. ## Overenie - `cd be && npx tsc --noEmit` -> cisty. - `npx vitest run` -> 200/200 zelene.
Seed buildCartSnapshots() nesetoval imageUrl, kym CartItemSnapshot
interface ho oznacuje ako required (string | null). tsc --noEmit
hlasil TS2741 na prisma/seed.ts:862.

Riesenie: pridat imageUrl: string | null do ProductWithMeta a
naplnit ho z prod.slug placeholder SVG (rovnaka konvencia ako
images[0] v runtime cart.ts). Demo seed ordery teraz vratia
korektny image URL v snapshote.

typecheck: cisty
tests: 200/200
Co-authored-by: multica-agent <github@multica.ai>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin agent/be-dev/782f0101:agent/be-dev/782f0101
git switch agent/be-dev/782f0101
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forge-admin/masox-eshop!24
No description provided.