diff --git a/apps/admin/app/dashboard/catalog/page.tsx b/apps/admin/app/dashboard/catalog/page.tsx index a4d3f89d1f..5b79478e4b 100644 --- a/apps/admin/app/dashboard/catalog/page.tsx +++ b/apps/admin/app/dashboard/catalog/page.tsx @@ -21,6 +21,7 @@ import { type AdminCatalogItem, deleteCatalogItem, getCatalogItems } from 'admin import { formatDate } from 'admin-app/lib/date'; import { queryKeys } from 'admin-app/lib/queryKeys'; import { ChevronLeft, ChevronRight, ExternalLink, Star } from 'lucide-react'; +import Image from 'next/image'; const PAGE_SIZE = 50; @@ -62,30 +63,47 @@ function CatalogRow({ item }: { item: AdminCatalogItem }) { }, }); + const thumbUrl = item.images?.[0] ?? null; + return ( -
-
-

{item.name}

- {item.productUrl && ( - - - +
+ {thumbUrl ? ( + + ) : ( +
+ )} +
+
+

{item.name}

+ {item.productUrl && ( + + + + )} +
+
+ {item.brand && {item.brand}} + {item.model && {item.model}} +
+ {item.description && ( +

+ {item.description} +

)}
-
- {item.brand && {item.brand}} - {item.model && {item.model}} -
- {item.description && ( -

{item.description}

- )}
diff --git a/apps/admin/app/dashboard/packs/page.tsx b/apps/admin/app/dashboard/packs/page.tsx index f97d5e1aa9..13a2018cd0 100644 --- a/apps/admin/app/dashboard/packs/page.tsx +++ b/apps/admin/app/dashboard/packs/page.tsx @@ -20,6 +20,7 @@ import { type AdminPack, deletePack, getPacks } from 'admin-app/lib/api'; import { formatDate } from 'admin-app/lib/date'; import { queryKeys } from 'admin-app/lib/queryKeys'; import { ChevronLeft, ChevronRight } from 'lucide-react'; +import Image from 'next/image'; const PAGE_SIZE = 50; @@ -57,30 +58,46 @@ function PackRow({ pack }: { pack: AdminPack }) { return ( -
-
-

{pack.name}

- {pack.isAIGenerated && ( - - AI - - )} -
- {pack.description && ( -

{pack.description}

+
+ {pack.image ? ( + + ) : ( +
)} - {pack.tags && pack.tags.length > 0 && ( -
- {pack.tags.slice(0, 3).map((tag) => ( - - {tag} - - ))} - {pack.tags.length > 3 && ( - +{pack.tags.length - 3} +
+
+

{pack.name}

+ {pack.isAIGenerated && ( + + AI + )}
- )} + {pack.description && ( +

{pack.description}

+ )} + {pack.tags && pack.tags.length > 0 && ( +
+ {pack.tags.slice(0, 3).map((tag) => ( + + {tag} + + ))} + {pack.tags.length > 3 && ( + +{pack.tags.length - 3} + )} +
+ )} +
@@ -99,9 +116,16 @@ function PackRow({ pack }: { pack: AdminPack }) { - - {pack.createdAt ? formatDate(new Date(pack.createdAt)) : '—'} - +
+ + {pack.createdAt ? formatDate(new Date(pack.createdAt)) : '—'} + + {pack.updatedAt && pack.updatedAt !== pack.createdAt && ( +

+ upd {formatDate(new Date(pack.updatedAt))} +

+ )} +
diff --git a/apps/admin/app/dashboard/users/page.tsx b/apps/admin/app/dashboard/users/page.tsx index 3d36c1b178..cf43ea0c43 100644 --- a/apps/admin/app/dashboard/users/page.tsx +++ b/apps/admin/app/dashboard/users/page.tsx @@ -98,9 +98,16 @@ function UserRow({ user }: { user: AdminUser }) { - - {user.createdAt ? formatDate(new Date(user.createdAt)) : '—'} - +
+ + {user.createdAt ? formatDate(new Date(user.createdAt)) : '—'} + + {user.updatedAt && user.updatedAt !== user.createdAt && ( +

+ act {formatDate(new Date(user.updatedAt))} +

+ )} +
diff --git a/apps/admin/components/analytics/catalog-analytics.tsx b/apps/admin/components/analytics/catalog-analytics.tsx index d33ad46668..4cae20ecb6 100644 --- a/apps/admin/components/analytics/catalog-analytics.tsx +++ b/apps/admin/components/analytics/catalog-analytics.tsx @@ -206,8 +206,13 @@ export function CatalogAnalytics() { { label: 'Total Items', value: overview.totalItems.toLocaleString() }, { label: 'Brands', value: overview.totalBrands.toLocaleString() }, { - label: 'Avg Price', - value: overview.avgPrice != null ? `$${overview.avgPrice.toFixed(2)}` : '—', + label: 'Price Range', + value: + overview.minPrice != null && overview.maxPrice != null + ? `$${overview.minPrice.toFixed(2)}–$${overview.maxPrice.toFixed(2)}` + : overview.avgPrice != null + ? `avg $${overview.avgPrice.toFixed(2)}` + : '—', }, { label: 'Added Last 30d', value: overview.addedLast30Days.toLocaleString() }, ].map((s) => ( @@ -450,7 +455,7 @@ export function CatalogAnalytics() { - + @@ -465,7 +470,22 @@ export function CatalogAnalytics() { {etl.jobs.map((job) => ( - +
SourceSource / File Status Processed Valid
{job.source} +
{job.source}
+ {job.filename && ( +
+ {job.filename} +
+ )} + {job.scraperRevision && ( +
+ rev {job.scraperRevision.slice(0, 7)} +
+ )} +
{job.status}