Fix étape status: derive from child tasks instead of stored field
The étape's own status field was not reflecting actual progress. Now the displayed status is computed from child tasks: all done = Terminé, some done = En cours, none done = À faire. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bf9cabe710
commit
3f97478977
1 changed files with 11 additions and 1 deletions
|
|
@ -513,7 +513,17 @@ function EtapesSection({
|
|||
const totalCount = childTasks.length;
|
||||
const progressPct = totalCount > 0 ? Math.round((doneCount / totalCount) * 100) : 0;
|
||||
const isExpanded = expandedEtapes.has(etape.id);
|
||||
const status = statusConfig[etape.status] ?? statusConfig.todo;
|
||||
|
||||
// Derive status from child tasks instead of etape.status
|
||||
const derivedStatus =
|
||||
totalCount === 0
|
||||
? "todo"
|
||||
: doneCount === totalCount
|
||||
? "done"
|
||||
: doneCount > 0
|
||||
? "in_progress"
|
||||
: "todo";
|
||||
const status = statusConfig[derivedStatus] ?? statusConfig.todo;
|
||||
|
||||
return (
|
||||
<div
|
||||
|
|
|
|||
Loading…
Reference in a new issue