feat: implement custom fields, gantt view, calendar view, and file encryption

- Custom Fields (FEAT-001):
  - CustomField and TaskCustomValue models with formula support
  - CRUD API for custom field management
  - Formula engine for calculated fields
  - Frontend: CustomFieldEditor, CustomFieldInput, ProjectSettings page
  - Task list API now includes custom_values
  - KanbanBoard displays custom field values

- Gantt View (FEAT-003):
  - TaskDependency model with FS/SS/FF/SF dependency types
  - Dependency CRUD API with cycle detection
  - start_date field added to tasks
  - GanttChart component with Frappe Gantt integration
  - Dependency type selector in UI

- Calendar View (FEAT-004):
  - CalendarView component with FullCalendar integration
  - Date range filtering API for tasks
  - Drag-and-drop date updates
  - View mode switching in Tasks page

- File Encryption (FEAT-010):
  - AES-256-GCM encryption service
  - EncryptionKey model with key rotation support
  - Admin API for key management
  - Encrypted upload/download for confidential projects

- Migrations: 011 (custom fields), 012 (encryption keys), 013 (task dependencies)
- Updated issues.md with completion status

🤖 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-05 23:39:12 +08:00
parent 69b81d9241
commit 2d80a8384e
65 changed files with 11045 additions and 82 deletions

View File

@@ -1,9 +1,9 @@
# PROJECT CONTROL - Issue Tracking
> 審核日期: 2026-01-04
> 更新日期: 2026-01-04
> 整體完成度: 約 98%
> 已修復問題: 23 (CRIT-001~003, HIGH-001~008, MED-001~012)
> 更新日期: 2026-01-05
> 整體完成度: 約 99%
> 已修復問題: 25 (CRIT-001~003, HIGH-001~008, MED-001~012, NEW-001~002)
---
@@ -500,16 +500,16 @@
| ID | 模組 | 功能 | 後端 | 前端 | 優先級 | 狀態 |
|----|------|------|:----:|:----:|--------|------|
| FEAT-001 | Task Management | 自定義欄位 (Custom Fields) | | | 高 | 待開發 |
| FEAT-001 | Task Management | 自定義欄位 (Custom Fields) | | | 高 | ✅ 已完成 (2026-01-05) |
| FEAT-002 | Task Management | 看板視角 (Kanban View) | 有 | 有 | 高 | ✅ 已完成 (KanbanBoard.tsx) |
| FEAT-003 | Task Management | 甘特圖視角 (Gantt View) | 有 | | 中 | 待開發 |
| FEAT-004 | Task Management | 行事曆視角 (Calendar View) | 有 | | 中 | 待開發 |
| FEAT-003 | Task Management | 甘特圖視角 (Gantt View) | 有 | | 中 | ✅ 已完成 (2026-01-05) |
| FEAT-004 | Task Management | 行事曆視角 (Calendar View) | 有 | | 中 | ✅ 已完成 (2026-01-05) |
| FEAT-005 | Task Management | 子任務建立 UI | 有 | 缺 | 中 | 待開發 |
| FEAT-006 | Task Management | 拖拉變更狀態 | 有 | 有 | 中 | ✅ 已完成 (KanbanBoard drag-drop) |
| FEAT-007 | Resource Management | 負載熱圖 UI | 有 | 有 | 高 | ✅ 已完成 (WorkloadPage.tsx) |
| FEAT-008 | Resource Management | 專案健康看板 | 有 | 有 | 中 | ✅ 已完成 (ProjectHealthPage.tsx) |
| FEAT-009 | Resource Management | 容量更新 API | 有 | N/A | 低 | ✅ 已完成 (PUT /api/users/{id}/capacity) |
| FEAT-010 | Document Management | AES-256 加密存儲 | | N/A | 高 | 待開發 |
| FEAT-010 | Document Management | AES-256 加密存儲 | | N/A | 高 | ✅ 已完成 (2026-01-05) |
| FEAT-011 | Document Management | 動態浮水印 | 有 | N/A | 中 | ✅ 已完成 (watermark_service.py) |
| FEAT-012 | Document Management | 版本還原 UI | 有 | 缺 | 低 | 待開發 |
| FEAT-013 | Automation | 排程觸發器執行 | 有 | N/A | 中 | ✅ 已完成 (trigger_scheduler.py) |
@@ -694,6 +694,11 @@
| 2026-01-04 | add-capacity-update-api | resource-management |
| 2026-01-04 | add-schedule-triggers | automation |
| 2026-01-04 | add-watermark-feature | document-management |
| 2026-01-05 | add-kanban-realtime-sync | collaboration |
| 2026-01-05 | add-file-encryption | document-management |
| 2026-01-05 | add-gantt-view | task-management |
| 2026-01-05 | add-calendar-view | task-management |
| 2026-01-05 | add-custom-fields | task-management |
---
@@ -724,9 +729,17 @@
- **問題描述**: WebSocket 目前僅用於通知推送,看板視角沒有即時同步功能。當其他用戶拖拉任務變更狀態時,當前用戶的看板不會即時更新。
- **影響**: 多人協作時可能產生狀態衝突
- **建議修復**: 擴展 WebSocket 支援任務變更事件廣播,前端訂閱並即時更新看板
- **狀態**: [ ] 待開發
- **狀態**: [x] 已修復 (2026-01-05)
- **修復內容**:
- Backend: 新增 `/ws/projects/{project_id}` WebSocket endpoint
- Backend: 實作 Redis Pub/Sub 任務事件廣播 (`project:{project_id}:tasks` 頻道)
- Backend: 支援 task_created, task_updated, task_status_changed, task_deleted, task_assigned 事件
- Frontend: 新增 ProjectSyncContext 管理 WebSocket 連線
- Frontend: Tasks.tsx 整合即時更新,支援 event_id 去重、多分頁支援
- Frontend: 新增 Live/Offline 連線狀態指示器
- OpenSpec: 更新 collaboration spec 新增 Project Real-time Sync requirement
---
*此文件由 Claude Code 自動生成於 2026-01-04*
*更新於 2026-01-04*
*更新於 2026-01-05*