Replace status_id with in_progress boolean field

- Remove task_statuses lookup table and StatusID foreign key
- Add InProgress boolean field to Task model
- Add database migration (005_replace_status_with_in_progress)
- Update all handlers, services, and repositories
- Update admin frontend to display in_progress as checkbox/boolean
- Remove Task Statuses tab from admin lookups page
- Update tests to use InProgress instead of StatusID
- Task categorization now uses InProgress for kanban column assignment

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-08 20:48:16 -06:00
parent cb250f108b
commit c5b0225422
43 changed files with 353 additions and 753 deletions

View File

@@ -35,20 +35,6 @@ func (TaskPriority) TableName() string {
return "task_taskpriority"
}
// TaskStatus represents the task_taskstatus table
type TaskStatus struct {
BaseModel
Name string `gorm:"column:name;size:20;not null" json:"name"`
Description string `gorm:"column:description;type:text" json:"description"`
Color string `gorm:"column:color;size:7" json:"color"`
DisplayOrder int `gorm:"column:display_order;default:0" json:"display_order"`
}
// TableName returns the table name for GORM
func (TaskStatus) TableName() string {
return "task_taskstatus"
}
// TaskFrequency represents the task_taskfrequency table
type TaskFrequency struct {
BaseModel
@@ -79,11 +65,12 @@ type Task struct {
Category *TaskCategory `gorm:"foreignKey:CategoryID" json:"category,omitempty"`
PriorityID *uint `gorm:"column:priority_id;index" json:"priority_id"`
Priority *TaskPriority `gorm:"foreignKey:PriorityID" json:"priority,omitempty"`
StatusID *uint `gorm:"column:status_id;index" json:"status_id"`
Status *TaskStatus `gorm:"foreignKey:StatusID" json:"status,omitempty"`
FrequencyID *uint `gorm:"column:frequency_id;index" json:"frequency_id"`
Frequency *TaskFrequency `gorm:"foreignKey:FrequencyID" json:"frequency,omitempty"`
// In Progress flag - replaces status lookup
InProgress bool `gorm:"column:in_progress;default:false;index" json:"in_progress"`
DueDate *time.Time `gorm:"column:due_date;type:date;index" json:"due_date"`
NextDueDate *time.Time `gorm:"column:next_due_date;type:date;index" json:"next_due_date"` // For recurring tasks, updated after each completion
EstimatedCost *decimal.Decimal `gorm:"column:estimated_cost;type:decimal(10,2)" json:"estimated_cost"`