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:
@@ -24,6 +24,7 @@ interface Task {
|
||||
due_date: string | null
|
||||
time_estimate: number | null
|
||||
subtask_count: number
|
||||
parent_task_id: string | null
|
||||
custom_values?: CustomValueResponse[]
|
||||
}
|
||||
|
||||
@@ -159,16 +160,13 @@ export function TaskDetailModal({
|
||||
priority: editForm.priority,
|
||||
}
|
||||
|
||||
if (editForm.status_id) {
|
||||
payload.status_id = editForm.status_id
|
||||
}
|
||||
if (editForm.assignee_id) {
|
||||
payload.assignee_id = editForm.assignee_id
|
||||
} else {
|
||||
payload.assignee_id = null
|
||||
}
|
||||
// Always send status_id (null to clear, or the value)
|
||||
payload.status_id = editForm.status_id || null
|
||||
// Always send assignee_id (null to clear, or the value)
|
||||
payload.assignee_id = editForm.assignee_id || null
|
||||
if (editForm.due_date) {
|
||||
payload.due_date = editForm.due_date
|
||||
// Convert date string to datetime format for Pydantic 2
|
||||
payload.due_date = `${editForm.due_date}T00:00:00`
|
||||
} else {
|
||||
payload.due_date = null
|
||||
}
|
||||
@@ -322,13 +320,14 @@ export function TaskDetailModal({
|
||||
<TaskAttachments taskId={task.id} />
|
||||
</div>
|
||||
|
||||
{/* Subtasks Section */}
|
||||
{/* Subtasks Section - only allow adding subtasks if this is not already a subtask (depth limit = 2) */}
|
||||
<div style={styles.section}>
|
||||
<SubtaskList
|
||||
taskId={task.id}
|
||||
projectId={task.project_id}
|
||||
onSubtaskClick={onSubtaskClick}
|
||||
onSubtaskCreated={onUpdate}
|
||||
canAddSubtask={!task.parent_task_id}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -398,7 +397,8 @@ export function TaskDetailModal({
|
||||
<label style={styles.sidebarLabel}>{t('fields.assignee')}</label>
|
||||
{isEditing ? (
|
||||
<UserSelect
|
||||
value={editForm.assignee_id}
|
||||
value={editForm.assignee_id || null}
|
||||
valueName={task.assignee_name}
|
||||
onChange={handleAssigneeChange}
|
||||
placeholder={t('common:labels.selectAssignee')}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user