Deduplicate admin review product images
This commit is contained in:
26
HANDOFF.md
26
HANDOFF.md
@ -26,7 +26,31 @@ Latest TypeScript verification after the validation/upload changes:
|
||||
npx tsc --noEmit
|
||||
```
|
||||
|
||||
## Latest Codex Changes After `2cfff02`
|
||||
## Latest Codex Changes After `4e28ccd`
|
||||
|
||||
### Admin review image dedupe
|
||||
|
||||
File:
|
||||
- `src/app/admin/review/[productId]/page.tsx`
|
||||
|
||||
Behavior:
|
||||
- Admin product review now deduplicates product images before rendering.
|
||||
- The dedupe applies to both:
|
||||
- update compare section (`Gambar Produk`)
|
||||
- normal admin review gallery (`Galeri`)
|
||||
- Root `imageId` / `image` and entries inside `productImages` are merged and sorted by `sequence`.
|
||||
- Duplicate images are removed by `imageId`, with URL as a fallback key.
|
||||
- This prevents the main image from appearing twice when backend sends it both as root `imageId` and inside `productImages`.
|
||||
|
||||
Verification:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
The local production server was restarted on `http://localhost:3000` for manual admin review testing.
|
||||
|
||||
## Previous Codex Changes After `2cfff02`
|
||||
|
||||
### Product edit image payload preservation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user