Fix task assignment visibility: show column always, wire detail panel

- TaskRow: Show 'unassigned' label (muted) instead of invisible dash
  so the assigned column is always visible in the task list.
- TaskDetailPanel: Replace old person_id dropdown with assignment chips
  showing avatar + name for each assignee. Unassigned shows muted text
  instead of a dash.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kyle 2026-03-17 04:23:20 +08:00
parent 990c660fbf
commit d6e4938aa4
2 changed files with 17 additions and 14 deletions

View File

@ -383,21 +383,24 @@ export default function TaskDetailPanel({
<User className="h-3 w-3" /> <User className="h-3 w-3" />
Assigned Assigned
</div> </div>
{isEditing ? ( {task.assignments && task.assignments.length > 0 ? (
<Select <div className="flex flex-wrap gap-1.5">
value={editState.person_id} {task.assignments.map((a) => (
onChange={(e) => setEditState((s) => ({ ...s, person_id: e.target.value }))} <span
className="h-8 text-xs" key={a.user_id}
> className="inline-flex items-center gap-1.5 bg-secondary rounded-full pl-1 pr-2.5 py-0.5"
<option value="">Unassigned</option> >
{people.map((p) => ( <span className="w-5 h-5 rounded-full bg-muted flex items-center justify-center shrink-0">
<option key={p.id} value={String(p.id)}> <span className="text-[9px] font-medium text-muted-foreground">
{p.name} {(a.user_name ?? '?').charAt(0).toUpperCase()}
</option> </span>
</span>
<span className="text-xs">{a.user_name ?? 'Unknown'}</span>
</span>
))} ))}
</Select> </div>
) : ( ) : (
<p className="text-sm">{assignedPerson ? assignedPerson.name : '—'}</p> <p className="text-sm text-muted-foreground/50">Unassigned</p>
)} )}
</div> </div>
</div> </div>

View File

@ -147,7 +147,7 @@ export default function TaskRow({
</span> </span>
</> </>
) : ( ) : (
<span className="text-[11px] text-transparent"></span> <span className="text-[11px] text-muted-foreground/30">unassigned</span>
)} )}
</span> </span>