-
Status changes
-
- {(statusActions[task.status] || []).map((s) => (
-
- ))}
+
Actions
+ {actionError &&
{actionError}
}
+
+ {/* pending: Open + Close */}
+ {task.status === 'pending' && (
+ <>
+
+
+ >
+ )}
+ {/* open: Start + Close */}
+ {task.status === 'open' && (
+ <>
+
+
+ >
+ )}
+ {/* undergoing: Finish + Close */}
+ {task.status === 'undergoing' && (
+ <>
+
+
+ >
+ )}
+ {/* completed / closed: Reopen */}
+ {(task.status === 'completed' || task.status === 'closed') && (
+
+ )}
+ {/* Finish modal — requires comment (P9.4) */}
+ {showFinishModal && (
+
+
+
Finish Task
+
Please leave a completion comment before finishing.
+
+
+ )}
+
+ {/* Close modal — optional reason */}
+ {showCloseModal && (
+
+
+
Close Task
+
This will cancel/abandon the task. Optionally provide a reason.
+
+
+ )}
+
Comments ({comments.length})
{comments.map((c) => (
diff --git a/src/types/index.ts b/src/types/index.ts
index fa48069..bdb3594 100644
--- a/src/types/index.ts
+++ b/src/types/index.ts
@@ -33,9 +33,9 @@ export interface Task {
id: number
title: string
description: string | null
- task_type: 'issue' | 'maintenance' | 'research' | 'review' | 'story' | 'test' | 'resolution' | 'task'
+ task_type: 'issue' | 'maintenance' | 'research' | 'review' | 'story' | 'test' | 'resolution' // P7.1: 'task' removed
task_subtype: string | null
- status: 'open' | 'pending' | 'progressing' | 'closed'
+ status: 'open' | 'pending' | 'undergoing' | 'completed' | 'closed'
priority: 'low' | 'medium' | 'high' | 'critical'
project_id: number
milestone_id: number | null
@@ -64,7 +64,8 @@ export interface Milestone {
id: number
title: string
description: string | null
- status: 'open' | 'pending' | 'deferred' | 'progressing' | 'closed'
+ status: 'open' | 'freeze' | 'undergoing' | 'completed' | 'closed'
+ started_at: string | null
project_id: number
created_by_id: number | null
due_date: string | null
@@ -119,6 +120,19 @@ export interface DashboardStats {
recent_tasks: Task[]
}
+export interface Propose {
+ id: number
+ propose_code: string | null
+ title: string
+ description: string | null
+ status: 'open' | 'accepted' | 'rejected'
+ project_id: number
+ created_by_id: number | null
+ feat_task_id: string | null
+ created_at: string
+ updated_at: string | null
+}
+
export interface LoginResponse {
access_token: string
token_type: string