feat: replace individual workshop buttons with a dropdown for creating new workshops in SessionsPage and update WorkshopTabs for improved tab management

This commit is contained in:
Julien Froidefond
2026-02-17 09:30:46 +01:00
parent e8282bb118
commit a8f53bfe2a
4 changed files with 215 additions and 105 deletions

View File

@@ -59,18 +59,22 @@ export function Header() {
👥 Équipes
</Link>
{/* Workshops Dropdown */}
{/* New Workshop Dropdown */}
<div className="relative">
<button
onClick={() => setWorkshopsOpen(!workshopsOpen)}
onBlur={() => setTimeout(() => setWorkshopsOpen(false), 150)}
className={`flex items-center gap-1 text-sm font-medium transition-colors ${
isActiveLink('/sessions/') || isActiveLink('/motivators')
isActiveLink('/sessions/') ||
isActiveLink('/motivators') ||
isActiveLink('/year-review') ||
isActiveLink('/weekly-checkin') ||
isActiveLink('/weather')
? 'text-primary'
: 'text-muted hover:text-foreground'
}`}
>
Ateliers
Nouvel atelier
<svg
className={`h-4 w-4 transition-transform ${workshopsOpen ? 'rotate-180' : ''}`}
fill="none"
@@ -110,6 +114,39 @@ export function Header() {
<div className="text-xs text-muted">Motivations intrinsèques</div>
</div>
</Link>
<Link
href="/year-review/new"
className="flex items-center gap-3 px-4 py-2.5 text-sm text-foreground hover:bg-card-hover"
onClick={() => setWorkshopsOpen(false)}
>
<span className="text-lg">📅</span>
<div>
<div className="font-medium">Year Review</div>
<div className="text-xs text-muted">Bilan de l&apos;année</div>
</div>
</Link>
<Link
href="/weekly-checkin/new"
className="flex items-center gap-3 px-4 py-2.5 text-sm text-foreground hover:bg-card-hover"
onClick={() => setWorkshopsOpen(false)}
>
<span className="text-lg">📝</span>
<div>
<div className="font-medium">Weekly Check-in</div>
<div className="text-xs text-muted">Suivi hebdomadaire</div>
</div>
</Link>
<Link
href="/weather/new"
className="flex items-center gap-3 px-4 py-2.5 text-sm text-foreground hover:bg-card-hover"
onClick={() => setWorkshopsOpen(false)}
>
<span className="text-lg">🌤</span>
<div>
<div className="font-medium">Météo d&apos;équipe</div>
<div className="text-xs text-muted">Humeur et énergie</div>
</div>
</Link>
</div>
)}
</div>