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:
@@ -101,6 +101,10 @@ async def get_heatmap(
|
||||
None,
|
||||
description="Comma-separated list of user IDs to include"
|
||||
),
|
||||
hide_empty: bool = Query(
|
||||
True,
|
||||
description="Hide users with no tasks assigned for the week"
|
||||
),
|
||||
db: Session = Depends(get_db),
|
||||
current_user: User = Depends(get_current_user),
|
||||
):
|
||||
@@ -133,8 +137,10 @@ async def get_heatmap(
|
||||
|
||||
week_start, week_end = get_week_bounds(week_start)
|
||||
|
||||
# Try cache first
|
||||
cached = get_cached_heatmap(week_start, department_id, accessible_user_ids)
|
||||
# Try cache first (only use cache for default hide_empty=True)
|
||||
cached = None
|
||||
if hide_empty:
|
||||
cached = get_cached_heatmap(week_start, department_id, accessible_user_ids)
|
||||
if cached:
|
||||
return WorkloadHeatmapResponse(
|
||||
week_start=week_start,
|
||||
@@ -148,10 +154,12 @@ async def get_heatmap(
|
||||
week_start=week_start,
|
||||
department_id=department_id,
|
||||
user_ids=accessible_user_ids,
|
||||
hide_empty=hide_empty,
|
||||
)
|
||||
|
||||
# Cache the result
|
||||
set_cached_heatmap(week_start, summaries, department_id, accessible_user_ids)
|
||||
# Cache the result (only cache when hide_empty=True, the default)
|
||||
if hide_empty:
|
||||
set_cached_heatmap(week_start, summaries, department_id, accessible_user_ids)
|
||||
|
||||
return WorkloadHeatmapResponse(
|
||||
week_start=week_start,
|
||||
|
||||
Reference in New Issue
Block a user