feat: update EditCheckboxModal and DailyPageClient for task linkage

- Changed the label in EditCheckboxModal to clarify task linkage applies to all types, not just tasks.
- Updated DailyPageClient to allow taskId linkage for all checkbox types, enhancing flexibility in task management.
This commit is contained in:
Julien Froidefond
2025-09-16 09:33:06 +02:00
parent 65abbc1454
commit 883ba67599
2 changed files with 3 additions and 5 deletions

View File

@@ -151,8 +151,7 @@ export function EditCheckboxModal({
</div> </div>
</div> </div>
{/* Liaison tâche (seulement pour les tâches) */} {/* Liaison tâche (pour tous les types) */}
{type === 'task' && (
<div> <div>
<label className="block text-sm font-medium text-[var(--foreground)] mb-2"> <label className="block text-sm font-medium text-[var(--foreground)] mb-2">
Lier à une tâche (optionnel) Lier à une tâche (optionnel)
@@ -241,7 +240,6 @@ export function EditCheckboxModal({
</div> </div>
)} )}
</div> </div>
)}
{/* Actions */} {/* Actions */}
<div className="flex gap-2 justify-end pt-4"> <div className="flex gap-2 justify-end pt-4">

View File

@@ -89,7 +89,7 @@ export function DailyPageClient({
await updateCheckbox(checkboxId, { await updateCheckbox(checkboxId, {
text, text,
type, type,
taskId: type === 'task' ? taskId : undefined // Supprimer la liaison tâche si on passe en réunion taskId // Permet la liaison tâche pour tous les types
}); });
}; };