From 5548f5000f3cc265b619c150c065484092df1566 Mon Sep 17 00:00:00 2001 From: Adriano Belisario Date: Sun, 3 May 2026 21:13:45 +0000 Subject: [PATCH] feat(ui): show price in public view and admin item card; fix quantity badge in claims list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Public wishlist page now displays item price (formatted as BRL) below the item name when a price is set - Admin ItemCard shows price and quantity badge so items can be scanned at a glance without opening the edit form - Claims list no longer shows "· 1 un." for single-unit items (the unit count is only displayed when item.quantity > 1) Co-Authored-By: Claude Sonnet 4.6 --- app/[slug]/page.tsx | 9 ++++++++- components/admin/ItemCard.tsx | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/[slug]/page.tsx b/app/[slug]/page.tsx index 71a0f45..2b0f195 100644 --- a/app/[slug]/page.tsx +++ b/app/[slug]/page.tsx @@ -221,6 +221,11 @@ function PublicWishlistContent() {

{item.name}

+ {item.price != null && ( +

+ {new Intl.NumberFormat('pt-BR', { style: 'currency', currency: item.currency || 'BRL' }).format(item.price)} +

+ )} {showQuantitySummary && (

{item.claimedQuantity} de {item.quantity} reservados @@ -242,7 +247,9 @@ function PublicWishlistContent() {

  • {isMine ? 'Você' : 'Reservado'} - · {c.quantity} un. + {item.quantity > 1 && ( + · {c.quantity} un. + )} {c.note && isMine && ( "{c.note}" diff --git a/components/admin/ItemCard.tsx b/components/admin/ItemCard.tsx index 5475730..bd87b1c 100644 --- a/components/admin/ItemCard.tsx +++ b/components/admin/ItemCard.tsx @@ -64,6 +64,17 @@ export default function ItemCard({
    {item.name}
    + {item.price != null && ( +

    + {new Intl.NumberFormat('pt-BR', { style: 'currency', currency: item.currency || 'BRL' }).format(item.price)} + {item.quantity > 1 && ` · Qtd: ${item.quantity}`} +

    + )} + {item.price == null && item.quantity > 1 && ( +

    + Qtd: {item.quantity} +

    + )} {item.description && (

    {item.description}