feat: implement soft delete, task editing fixes, and UI improvements

Backend:
- Add soft delete for spaces and projects (is_active flag)
- Add status_id and assignee_id to TaskUpdate schema
- Fix task PATCH endpoint to update status and assignee
- Add validation for assignee_id and status_id in task updates
- Fix health service to count tasks with "Blocked" status as blockers
- Filter out deleted spaces/projects from health dashboard
- Add workload cache invalidation on assignee changes

Frontend:
- Add delete confirmation dialogs for spaces and projects
- Fix UserSelect to display selected user name (valueName prop)
- Fix task detail modal to refresh data after save
- Enforce 2-level subtask depth limit in UI
- Fix timezone bug in date formatting (use local timezone)
- Convert NotificationBell from Tailwind to inline styles
- Add i18n translations for health, workload, settings pages
- Add parent_task_id to Task interface across components

OpenSpec:
- Archive add-delete-capability change

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
beabigegg
2026-01-10 01:32:13 +08:00
parent 2796cbb42d
commit 55f85d0d3c
44 changed files with 1854 additions and 297 deletions

View File

@@ -92,7 +92,15 @@
"title": "通知",
"markAllRead": "全部標為已讀",
"noNotifications": "沒有通知",
"viewAll": "查看全部"
"empty": "沒有通知",
"viewAll": "查看全部",
"refresh": "重新整理",
"time": {
"justNow": "剛剛",
"minutesAgo": "{{count}} 分鐘前",
"hoursAgo": "{{count}} 小時前",
"daysAgo": "{{count}} 天前"
}
},
"pagination": {
"page": "第 {{page}} 頁",

View File

@@ -11,11 +11,24 @@
"totalProjects": "專案總數",
"healthy": "健康",
"atRisk": "風險中",
"highRisk": "高風險",
"critical": "危急",
"avgHealth": "平均健康度",
"withBlockers": "有阻擋問題",
"delayed": "延遲"
},
"calculation": {
"title": "健康度計算方式",
"formula": "起始分數 100 分,依據以下因素扣分:",
"blockers": "阻擋問題:每項 -10 分(最多 -30 分)",
"overdue": "逾期任務:每項 -5 分(最多 -30 分)",
"completion": "完成度不足:若低於 50%,最多 -20 分",
"thresholds": "風險等級閾值:",
"lowRisk": "低風險(健康):≥ 80 分",
"mediumRisk": "中風險60-79 分",
"highRiskLevel": "高風險40-59 分",
"criticalRisk": "危急:< 40 分"
},
"sort": {
"label": "排序方式",
"riskHigh": "風險:高到低",
@@ -36,7 +49,29 @@
"delayed": "延遲",
"ahead": "超前",
"overBudget": "超支",
"underBudget": "低於預算"
"underBudget": "低於預算",
"atRisk": "有風險"
},
"resourceStatus": {
"adequate": "充足",
"constrained": "受限",
"overloaded": "超載"
},
"card": {
"health": "健康度",
"schedule": "進度",
"resources": "資源",
"owner": "負責人",
"taskProgress": "任務進度",
"blockers": "阻擋問題",
"overdue": "逾期",
"complete": "完成"
},
"riskLevel": {
"low": "低風險",
"medium": "中風險",
"high": "高風險",
"critical": "危急"
},
"indicators": {
"title": "健康指標",

View File

@@ -2,6 +2,21 @@
"title": "設定",
"projectSettings": "專案設定",
"backToTasks": "返回任務",
"mySettings": {
"title": "個人設定",
"profile": "個人資訊",
"email": "電子郵件",
"department": "部門",
"role": "角色",
"workloadSettings": "工作負載設定",
"capacityDescription": "設定您每週可用的工作時數,用於計算工作負載百分比。",
"weeklyCapacity": "每週容量",
"hoursPerWeek": "小時/週",
"capacityHelp": "建議值40 小時標準工時。最大值168 小時(一週總時數)。",
"capacitySaved": "容量設定已儲存",
"capacityError": "儲存容量設定失敗",
"capacityInvalid": "請輸入有效的時數0-168"
},
"tabs": {
"general": "一般",
"members": "成員",
@@ -37,16 +52,58 @@
"add": "新增欄位",
"edit": "編輯欄位",
"delete": "刪除欄位",
"create": "建立欄位",
"fieldName": "欄位名稱",
"fieldNamePlaceholder": "例如:故事點數、衝刺編號",
"fieldType": "欄位類型",
"required": "必填",
"requiredField": "必填欄位",
"requiredHelp": "建立或更新任務時必須填寫必填欄位。",
"cannotChangeType": "無法變更",
"description": "自訂欄位允許您為任務新增額外資料。每個專案最多可建立 20 個欄位。",
"loading": "載入自訂欄位中...",
"loadError": "載入自訂欄位失敗",
"retry": "重試",
"empty": "尚未定義任何自訂欄位。",
"emptyHint": "點擊「新增欄位」建立您的第一個自訂欄位。",
"deleteConfirmTitle": "刪除自訂欄位?",
"deleteConfirmMessage": "這將永久刪除此欄位及所有任務中儲存的值。此操作無法復原。",
"deleting": "刪除中...",
"deleted": "自訂欄位已刪除",
"deleteError": "刪除欄位失敗",
"saving": "儲存中...",
"saveChanges": "儲存變更",
"saveError": "儲存欄位失敗",
"options": "選項",
"optionPlaceholder": "選項 {{index}}",
"addOption": "新增選項",
"optionRequired": "下拉欄位至少需要一個選項",
"formula": "公式運算式",
"formulaPlaceholder": "例如:{time_spent} / {original_estimate} * 100",
"formulaRequired": "公式運算式為必填",
"formulaHelp": {
"intro": "使用大括號來參照其他欄位:",
"customField": "參照自訂數字欄位",
"estimate": "任務預估時間",
"timeSpent": "已記錄時間",
"operators": "支援的運算子:+, -, *, /"
},
"types": {
"text": "文字",
"textDesc": "單行文字輸入",
"number": "數字",
"numberDesc": "數值",
"date": "日期",
"select": "下拉選單",
"multiSelect": "多選",
"checkbox": "核取方塊"
"dateDesc": "日期選擇器",
"dropdown": "下拉選單",
"dropdownDesc": "從預設選項中選擇",
"person": "人員",
"personDesc": "使用者指派",
"formula": "公式",
"formulaDesc": "從其他欄位計算"
},
"validation": {
"nameRequired": "欄位名稱為必填"
}
},
"notifications": {

View File

@@ -30,13 +30,43 @@
"overloaded": "超載",
"underutilized": "低使用率"
},
"table": {
"member": "團隊成員",
"department": "部門",
"allocated": "已分配",
"capacity": "容量",
"load": "負載",
"status": "狀態"
},
"status": {
"balanced": "平衡",
"normal": "正常",
"warning": "警告",
"overloaded": "超載",
"unavailable": "無法使用",
"underutilized": "低使用率"
},
"empty": {
"title": "沒有工作負載資料",
"description": "目前沒有足夠的資料來顯示工作負載"
"description": "目前沒有足夠的資料來顯示工作負載",
"noTasks": "本週沒有任何人被指派任務",
"hint": "當團隊成員被指派任務且截止日期在本週時,他們將會顯示在這裡。"
},
"options": {
"showAllUsers": "顯示所有用戶",
"showAllUsersHint": "(包括沒有任務的用戶)"
},
"calculation": {
"title": "工作負載計算方式",
"formula": "工作負載 = 本週任務預估工時 ÷ 個人週容量 × 100%",
"requirements": "任務需符合以下條件才會計入:",
"req1": "任務已指派給該成員",
"req2": "任務截止日期在選擇的週內",
"req3": "任務設有預估工時original_estimate",
"req4": "任務尚未完成",
"thresholds": "負載等級閾值:",
"normal": "正常:< 80%",
"warning": "警告80% - 99%",
"overloaded": "超載:≥ 100%"
}
}