Update gifts table in dashboard
This commit is contained in:
@@ -424,25 +424,61 @@ export default function GiftRegistryPage() {
|
|||||||
colSpan={7}
|
colSpan={7}
|
||||||
className="py-1 px-4 border-t-0 bg-gray-50 dark:bg-gray-800/50 text-sm text-gray-500 dark:text-gray-400"
|
className="py-1 px-4 border-t-0 bg-gray-50 dark:bg-gray-800/50 text-sm text-gray-500 dark:text-gray-400"
|
||||||
>
|
>
|
||||||
{item.status === GiftStatus.AVAILABLE && (
|
<div className="flex flex-col gap-1">
|
||||||
<>
|
{/* Description - show if available */}
|
||||||
Store: {item.store_name || "N/A"} •{" "}
|
{item.description && <p>{item.description}</p>}
|
||||||
{item.purchase_url
|
|
||||||
? `URL: ${item.purchase_url}`
|
{/* Status-specific information */}
|
||||||
: `Brand: ${item.brand || "N/A"}`}
|
<div className="flex items-center gap-2">
|
||||||
</>
|
{item.status === GiftStatus.AVAILABLE && (
|
||||||
)}
|
<>
|
||||||
{item.status === GiftStatus.RESERVED && (
|
{item.store_name && (
|
||||||
<>Reserved by: John Smith on April 12, 2025</>
|
<span>Store: {item.store_name}</span>
|
||||||
)}
|
)}
|
||||||
{item.status === GiftStatus.PURCHASED && (
|
|
||||||
<>Purchased by: Maria Lopez on April 10, 2025</>
|
{item.purchase_url && (
|
||||||
)}
|
<>
|
||||||
{item.status === GiftStatus.RECEIVED && (
|
{item.store_name && <span>•</span>}
|
||||||
<>
|
<a
|
||||||
Received: Complete! • Brand: {item.brand || "N/A"}
|
href={item.purchase_url}
|
||||||
</>
|
target="_blank"
|
||||||
)}
|
rel="noopener noreferrer"
|
||||||
|
className="text-blue-600 hover:underline"
|
||||||
|
>
|
||||||
|
Shop Link
|
||||||
|
</a>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{!item.store_name &&
|
||||||
|
!item.purchase_url &&
|
||||||
|
item.brand && (
|
||||||
|
<span>Brand: {item.brand}</span>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{!item.store_name &&
|
||||||
|
!item.purchase_url &&
|
||||||
|
!item.brand && (
|
||||||
|
<span className={"italic"}>
|
||||||
|
No purchase information available
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{item.status === GiftStatus.RESERVED && (
|
||||||
|
<span>Reserved</span>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{item.status === GiftStatus.PURCHASED && (
|
||||||
|
<span>Purchased</span>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{item.status === GiftStatus.RECEIVED && (
|
||||||
|
<span>Received</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|||||||
Reference in New Issue
Block a user