diff --git a/src/app/admin/tastings/AdminTastingsList.tsx b/src/app/admin/tastings/AdminTastingsList.tsx index fe4a71a..2a0a395 100644 --- a/src/app/admin/tastings/AdminTastingsList.tsx +++ b/src/app/admin/tastings/AdminTastingsList.tsx @@ -8,10 +8,9 @@ interface Tasting { bottle_id: string; user_id: string; rating: number; - nose: string | null; - palate: string | null; - finish: string | null; - notes: string | null; + nose_notes: string | null; + palate_notes: string | null; + finish_notes: string | null; created_at: string; user: { username: string; display_name: string | null }; bottle: { id: string; name: string; distillery: string | null; image_url: string | null } | null; @@ -45,10 +44,9 @@ export default function AdminTastingsList({ tastings }: AdminTastingsListProps) t.bottle?.name?.toLowerCase().includes(searchLower) || t.bottle?.distillery?.toLowerCase().includes(searchLower) || t.user.username.toLowerCase().includes(searchLower) || - t.notes?.toLowerCase().includes(searchLower) || - t.nose?.toLowerCase().includes(searchLower) || - t.palate?.toLowerCase().includes(searchLower) || - t.finish?.toLowerCase().includes(searchLower) + t.nose_notes?.toLowerCase().includes(searchLower) || + t.palate_notes?.toLowerCase().includes(searchLower) || + t.finish_notes?.toLowerCase().includes(searchLower) ); } @@ -127,7 +125,7 @@ export default function AdminTastingsList({ tastings }: AdminTastingsListProps) {/* Tastings List */}
{filteredTastings.map(tasting => { - const hasNotes = tasting.notes || tasting.nose || tasting.palate || tasting.finish; + const hasNotes = tasting.nose_notes || tasting.palate_notes || tasting.finish_notes; return (
- {tasting.nose && ( + {tasting.nose_notes && (

- Nose: {tasting.nose.slice(0, 80)}... + Nose: {tasting.nose_notes.slice(0, 80)}...

)} - {tasting.notes && ( -

- {tasting.notes.slice(0, 150)}... + {tasting.palate_notes && ( +

+ Palate: {tasting.palate_notes.slice(0, 80)}...

)}
diff --git a/src/app/admin/tastings/page.tsx b/src/app/admin/tastings/page.tsx index 199dd35..00b4f87 100644 --- a/src/app/admin/tastings/page.tsx +++ b/src/app/admin/tastings/page.tsx @@ -28,10 +28,9 @@ export default async function AdminTastingsPage() { bottle_id, user_id, rating, - nose, - palate, - finish, - notes, + nose_notes, + palate_notes, + finish_notes, created_at, bottles (id, name, distillery, image_url) `) @@ -60,7 +59,7 @@ export default async function AdminTastingsPage() { avgRating: tastings.length > 0 ? tastings.reduce((sum, t) => sum + (t.rating || 0), 0) / tastings.filter(t => t.rating > 0).length : 0, - withNotes: tastings.filter(t => t.notes || t.nose || t.palate || t.finish).length, + withNotes: tastings.filter(t => t.nose_notes || t.palate_notes || t.finish_notes).length, todayCount: tastings.filter(t => { const today = new Date(); const tastingDate = new Date(t.created_at);