feat: enhance Kanban navigation and task editing

- Updated `KanbanPageClient` to retrieve `taskId` from URL search parameters for direct task editing.
- Modified links in `DailyCheckboxItem` and `PendingTasksSection` to navigate to the Kanban page with the corresponding `taskId`, improving user experience by allowing quick access to task details.
- Added logic in `KanbanBoardContainer` to automatically open the edit modal if a `taskId` is present, streamlining the editing process.
This commit is contained in:
Julien Froidefond
2025-09-25 22:39:21 +02:00
parent 6ca24b9509
commit 4e9d06896d
4 changed files with 25 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
'use client';
import { useState, useEffect, useCallback, useTransition } from 'react';
import Link from 'next/link';
import { Card, CardHeader, CardContent } from '@/components/ui/Card';
import { Button } from '@/components/ui/Button';
import { DailyCheckbox, DailyCheckboxType } from '@/lib/types';
@@ -225,9 +226,12 @@ export function PendingTasksSection({
`Il y a ${daysAgo} jours`}
</span>
{task.task && (
<span className="text-[var(--primary)]">
<Link
href={`/kanban?taskId=${task.task.id}`}
className="text-[var(--primary)] hover:text-[var(--primary)]/80 font-mono"
>
🔗 {task.task.title}
</span>
</Link>
)}
</div>
</div>