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 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-01-20 19:45:07 -06:00
parent c2e8800312
commit c0b402d7d3

View File

@@ -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,