feat: refine session workflow with global state, quick tasting, and statistics
This commit is contained in:
@@ -43,6 +43,10 @@ export default async function BottlePage({
|
||||
.from('tastings')
|
||||
.select(`
|
||||
*,
|
||||
tasting_sessions (
|
||||
id,
|
||||
name
|
||||
),
|
||||
tasting_tags (
|
||||
buddies (
|
||||
id,
|
||||
@@ -65,17 +69,6 @@ export default async function BottlePage({
|
||||
Zurück zur Sammlung
|
||||
</Link>
|
||||
|
||||
{sessionId && (
|
||||
<div className="bg-amber-600/10 border border-amber-600/20 p-4 rounded-2xl flex items-center gap-4 text-amber-700 dark:text-amber-400 animate-in slide-in-from-top-4 duration-500">
|
||||
<div className="bg-amber-600 text-white p-2 rounded-xl">
|
||||
<PlusCircle size={20} />
|
||||
</div>
|
||||
<div>
|
||||
<p className="font-bold">Session Aktiv!</p>
|
||||
<p className="text-sm opacity-80">Jede Tasting Note, die du jetzt speicherst, wird automatisch deiner Session zugeordnet. 🥃</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Hero Section */}
|
||||
<section className="grid grid-cols-1 md:grid-cols-2 gap-8 items-start">
|
||||
@@ -165,7 +158,7 @@ export default async function BottlePage({
|
||||
{/* Form */}
|
||||
<div className="lg:col-span-1 border border-zinc-200 dark:border-zinc-800 rounded-3xl p-6 bg-white dark:bg-zinc-900/50 md:sticky md:top-24">
|
||||
<h3 className="text-lg font-bold mb-6 flex items-center gap-2 text-amber-600">
|
||||
<Droplets size={20} /> {sessionId ? 'Session-Notiz' : 'Neu Verkosten'}
|
||||
<Droplets size={20} /> Dram bewerten
|
||||
</h3>
|
||||
<TastingNoteForm bottleId={bottle.id} sessionId={sessionId} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user