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:
@@ -346,8 +346,9 @@ func (r *TaskRepository) Unarchive(id uint) error {
|
|||||||
|
|
||||||
// buildKanbanColumns builds the kanban column array from categorized task slices.
|
// buildKanbanColumns builds the kanban column array from categorized task slices.
|
||||||
// This is a helper function to reduce duplication between GetKanbanData and GetKanbanDataForMultipleResidences.
|
// This is a helper function to reduce duplication between GetKanbanData and GetKanbanDataForMultipleResidences.
|
||||||
|
// TEMPORARILY DISABLED: cancelled parameter removed - cancel column hidden from kanban
|
||||||
func buildKanbanColumns(
|
func buildKanbanColumns(
|
||||||
overdue, inProgress, dueSoon, upcoming, completed, cancelled []models.Task,
|
overdue, inProgress, dueSoon, upcoming, completed []models.Task,
|
||||||
) []models.KanbanColumn {
|
) []models.KanbanColumn {
|
||||||
return []models.KanbanColumn{
|
return []models.KanbanColumn{
|
||||||
{
|
{
|
||||||
@@ -395,15 +396,16 @@ func buildKanbanColumns(
|
|||||||
Tasks: completed,
|
Tasks: completed,
|
||||||
Count: len(completed),
|
Count: len(completed),
|
||||||
},
|
},
|
||||||
{
|
// TEMPORARILY DISABLED - Cancel column hidden from kanban
|
||||||
Name: string(categorization.ColumnCancelled),
|
// {
|
||||||
DisplayName: "Cancelled",
|
// Name: string(categorization.ColumnCancelled),
|
||||||
ButtonTypes: []string{"uncancel", "delete"},
|
// DisplayName: "Cancelled",
|
||||||
Icons: map[string]string{"ios": "xmark.circle", "android": "Cancel"},
|
// ButtonTypes: []string{"uncancel", "delete"},
|
||||||
Color: "#8E8E93",
|
// Icons: map[string]string{"ios": "xmark.circle", "android": "Cancel"},
|
||||||
Tasks: cancelled,
|
// Color: "#8E8E93",
|
||||||
Count: len(cancelled),
|
// 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)
|
return nil, fmt.Errorf("get completed tasks: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
cancelled, err := r.GetCancelledTasks(opts)
|
// TEMPORARILY DISABLED - Cancel column hidden from kanban
|
||||||
if err != nil {
|
// cancelled, err := r.GetCancelledTasks(opts)
|
||||||
return nil, fmt.Errorf("get cancelled tasks: %w", err)
|
// 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{
|
return &models.KanbanBoard{
|
||||||
Columns: columns,
|
Columns: columns,
|
||||||
@@ -506,12 +509,13 @@ func (r *TaskRepository) GetKanbanDataForMultipleResidences(residenceIDs []uint,
|
|||||||
return nil, fmt.Errorf("get completed tasks: %w", err)
|
return nil, fmt.Errorf("get completed tasks: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
cancelled, err := r.GetCancelledTasks(opts)
|
// TEMPORARILY DISABLED - Cancel column hidden from kanban
|
||||||
if err != nil {
|
// cancelled, err := r.GetCancelledTasks(opts)
|
||||||
return nil, fmt.Errorf("get cancelled tasks: %w", err)
|
// 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{
|
return &models.KanbanBoard{
|
||||||
Columns: columns,
|
Columns: columns,
|
||||||
|
|||||||
Reference in New Issue
Block a user