From 9bbd3df53c26df8ddd92c16400cb7a1c251dfb70 Mon Sep 17 00:00:00 2001 From: indigo Date: Wed, 22 Jul 2026 04:03:42 +0800 Subject: [PATCH] Add assignee popover to Gantt chart status cells The Gantt used a status-only EditableTaskStatus, unlike the shot/asset data tables which pair status with an avatar-popover assignee picker. Bring the Gantt's task-level EditableTaskStatus to parity (opt-in via a showAssignee prop so the flat Tasks table's separate assignee column is unaffected), and widen the frozen status column to fit both controls. --- .../src/components/schedule/ScheduleGantt.vue | 10 +- .../components/task/EditableTaskStatus.vue | 215 +++++++++++++++++- 2 files changed, 212 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/schedule/ScheduleGantt.vue b/frontend/src/components/schedule/ScheduleGantt.vue index bc9a5f7..777f30f 100644 --- a/frontend/src/components/schedule/ScheduleGantt.vue +++ b/frontend/src/components/schedule/ScheduleGantt.vue @@ -139,7 +139,10 @@ :task-id="task.id" :status="task.status" :project-id="projectId" + show-assignee + :assigned-user-id="task.assigned_user_id" @status-updated="handleStatusUpdated" + @assignment-updated="handleAssignmentUpdated" /> @@ -306,7 +309,7 @@ const episodeFilter = ref(null) const collapsedGroups = ref>(new Set()) const LABEL_COLUMN_WIDTH = 224 // matches w-56 -const STATUS_COLUMN_WIDTH = 176 // matches w-44 +const STATUS_COLUMN_WIDTH = 200 // status select (130px) + assignee avatar button, with padding const FROZEN_WIDTH = LABEL_COLUMN_WIDTH + STATUS_COLUMN_WIDTH const HEADER_HEIGHT = 44 const GROUP_ROW_HEIGHT = 32 @@ -646,6 +649,11 @@ function handleStatusUpdated(taskId: number, newStatus: string) { if (task) task.status = newStatus } +function handleAssignmentUpdated(taskId: number, userId: number | null) { + const task = tasks.value.find(t => t.id === taskId) + if (task) task.assigned_user_id = userId ?? undefined +} + // --- Drag to reschedule --- interface DragState { diff --git a/frontend/src/components/task/EditableTaskStatus.vue b/frontend/src/components/task/EditableTaskStatus.vue index 8cbe834..314a61a 100644 --- a/frontend/src/components/task/EditableTaskStatus.vue +++ b/frontend/src/components/task/EditableTaskStatus.vue @@ -1,12 +1,12 @@