feat: add user preferences for filter and objective visibility in HomePageClient

- Implemented state management for filter and objective visibility using `useState`.
- Integrated `userPreferencesService` to load and save user preferences on component mount and toggle actions.
- Updated `KanbanBoardContainer` to conditionally render filters and objectives based on user preferences.
- Enhanced UI with buttons for toggling visibility, improving user experience and customization.
This commit is contained in:
Julien Froidefond
2025-09-15 21:31:34 +02:00
parent cb2e8e9c9f
commit 44df8c89b8
7 changed files with 235 additions and 131 deletions

View File

@@ -75,62 +75,23 @@ export function Header({ title, subtitle, stats, syncing = false }: HeaderProps)
</nav>
</div>
{/* Stats tech dashboard */}
{/* Stats essentielles */}
<div className="flex flex-wrap gap-3">
<StatCard
label="TOTAL"
value={String(stats.total).padStart(2, '0')}
color="blue"
/>
{stats.completed > 0 && (
<StatCard
label="DONE"
value={String(stats.completed).padStart(2, '0')}
color="green"
/>
)}
{stats.inProgress > 0 && (
<StatCard
label="ACTIVE"
value={String(stats.inProgress).padStart(2, '0')}
color="yellow"
/>
)}
{stats.backlog > 0 && (
<StatCard
label="BACKLOG"
value={String(stats.backlog).padStart(2, '0')}
color="gray"
/>
)}
{stats.todo > 0 && (
<StatCard
label="QUEUE"
value={String(stats.todo).padStart(2, '0')}
color="gray"
/>
)}
{stats.freeze > 0 && (
<StatCard
label="FREEZE"
value={String(stats.freeze).padStart(2, '0')}
color="blue"
/>
)}
{stats.cancelled > 0 && (
<StatCard
label="CANCEL"
value={String(stats.cancelled).padStart(2, '0')}
color="gray"
/>
)}
{stats.archived > 0 && (
<StatCard
label="ARCHIVE"
value={String(stats.archived).padStart(2, '0')}
color="gray"
/>
)}
<StatCard
label="DONE"
value={String(stats.completed).padStart(2, '0')}
color="green"
/>
<StatCard
label="ACTIVE"
value={String(stats.inProgress).padStart(2, '0')}
color="yellow"
/>
<StatCard
label="RATE"
value={`${stats.completionRate}%`}