fix(dev-task): 实际投入时间改为 开始→提测,而非 开始→测试完成

completedAt 在 DevTask 流转到"提测"时记录,代表开发交付时间。
实际工时 = startDate → completedAt(提测日),准确反映开发投入。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Script Generator
2026-06-12 14:29:32 +08:00
parent e4f3817719
commit 633f2619d3
2 changed files with 3 additions and 2 deletions

View File

@@ -171,7 +171,7 @@ export function DevTaskDetailDrawer({ taskId, allTaskIds, onClose }: Props) {
{task.completedAt && (
<div className="flex items-center gap-2">
<Calendar className="h-3 w-3 text-[var(--ink-muted)]" />
<span className="text-[var(--ink-muted)]"></span>
<span className="text-[var(--ink-muted)]"></span>
<span className="text-emerald-600 font-medium">{task.completedAt}</span>
</div>
)}

View File

@@ -79,7 +79,8 @@ export const useDevTaskStore = create<DevTaskState>((set, get) => ({
}
const today = new Date().toISOString().slice(0, 10);
const startDate = (to === 'in_progress' && !task.startDate) ? today : task.startDate;
const completedAt = to === 'done' ? today : task.completedAt;
// 开发完成时间 = 提测时间(不是测试完成时间)
const completedAt = (to === 'submitted' && !task.completedAt) ? today : task.completedAt;
get().updateTask(id, { status: to, startDate, completedAt });
return { ok: true };
},