From c0b402d7d3ff5f5676fb0b54a8dbe83bdd72c8db Mon Sep 17 00:00:00 2001 From: Trey t Date: Tue, 20 Jan 2026 19:45:07 -0600 Subject: [PATCH] Temporarily hide cancelled column from kanban board Comment out the cancelled column from API responses to reduce clutter. Code preserved for easy re-enablement by searching for "TEMPORARILY DISABLED". Co-Authored-By: Claude Opus 4.5 --- internal/repositories/task_repo.go | 44 ++++++++++++++++-------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/internal/repositories/task_repo.go b/internal/repositories/task_repo.go index a7c3967..769b72e 100644 --- a/internal/repositories/task_repo.go +++ b/internal/repositories/task_repo.go @@ -346,8 +346,9 @@ func (r *TaskRepository) Unarchive(id uint) error { // buildKanbanColumns builds the kanban column array from categorized task slices. // This is a helper function to reduce duplication between GetKanbanData and GetKanbanDataForMultipleResidences. +// TEMPORARILY DISABLED: cancelled parameter removed - cancel column hidden from kanban func buildKanbanColumns( - overdue, inProgress, dueSoon, upcoming, completed, cancelled []models.Task, + overdue, inProgress, dueSoon, upcoming, completed []models.Task, ) []models.KanbanColumn { return []models.KanbanColumn{ { @@ -395,15 +396,16 @@ func buildKanbanColumns( Tasks: completed, Count: len(completed), }, - { - Name: string(categorization.ColumnCancelled), - DisplayName: "Cancelled", - ButtonTypes: []string{"uncancel", "delete"}, - Icons: map[string]string{"ios": "xmark.circle", "android": "Cancel"}, - Color: "#8E8E93", - Tasks: cancelled, - Count: len(cancelled), - }, + // TEMPORARILY DISABLED - Cancel column hidden from kanban + // { + // Name: string(categorization.ColumnCancelled), + // DisplayName: "Cancelled", + // ButtonTypes: []string{"uncancel", "delete"}, + // Icons: map[string]string{"ios": "xmark.circle", "android": "Cancel"}, + // Color: "#8E8E93", + // Tasks: cancelled, + // Count: len(cancelled), + // }, } } @@ -449,12 +451,13 @@ func (r *TaskRepository) GetKanbanData(residenceID uint, daysThreshold int, now return nil, fmt.Errorf("get completed tasks: %w", err) } - cancelled, err := r.GetCancelledTasks(opts) - if err != nil { - return nil, fmt.Errorf("get cancelled tasks: %w", err) - } + // TEMPORARILY DISABLED - Cancel column hidden from kanban + // cancelled, err := r.GetCancelledTasks(opts) + // if err != nil { + // return nil, fmt.Errorf("get cancelled tasks: %w", err) + // } - columns := buildKanbanColumns(overdue, inProgress, dueSoon, upcoming, completed, cancelled) + columns := buildKanbanColumns(overdue, inProgress, dueSoon, upcoming, completed) return &models.KanbanBoard{ Columns: columns, @@ -506,12 +509,13 @@ func (r *TaskRepository) GetKanbanDataForMultipleResidences(residenceIDs []uint, return nil, fmt.Errorf("get completed tasks: %w", err) } - cancelled, err := r.GetCancelledTasks(opts) - if err != nil { - return nil, fmt.Errorf("get cancelled tasks: %w", err) - } + // TEMPORARILY DISABLED - Cancel column hidden from kanban + // cancelled, err := r.GetCancelledTasks(opts) + // if err != nil { + // return nil, fmt.Errorf("get cancelled tasks: %w", err) + // } - columns := buildKanbanColumns(overdue, inProgress, dueSoon, upcoming, completed, cancelled) + columns := buildKanbanColumns(overdue, inProgress, dueSoon, upcoming, completed) return &models.KanbanBoard{ Columns: columns,