feat: code-first migration — replace raw IDs with codes and usernames

- TaskDetailPage: show task_code instead of raw #id in header
- TaskDetailPage: show author_username in comment metadata
- ProjectDetailPage: show member username instead of User #id
- ProposeDetailPage: show created_by_username instead of User #id
- TasksPage: fix status filter options to match actual statuses
  (pending/open/undergoing/completed/closed)
- TasksPage: fix status color map for correct status values
- Types: add username/full_name to ProjectMember, author_username
  to Comment, created_by_username to Propose
- Supports TODO §3.1 (code-first UI migration)
This commit is contained in:
zhi
2026-03-21 20:28:35 +00:00
parent dc97764e43
commit fb5658739b
5 changed files with 13 additions and 9 deletions

View File

@@ -92,7 +92,7 @@ export default function ProjectDetailPage() {
<div className="member-list">
{members.map((m) => (
<span key={m.id} className="badge" style={{ marginRight: 8 }}>
{`User #${m.user_id} (${m.role})`}
{`${m.username || m.full_name || `User #${m.user_id}`} (${m.role})`}
{canEditProject && (
<button
onClick={(e) => { e.stopPropagation(); removeMember(m.user_id, m.role) }}