Add next_due_date to admin task views
Display next_due_date field in task list table and task detail page so admins can see the effective date used for overdue calculations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -131,6 +131,7 @@ type TaskResponse struct {
|
||||
FrequencyID *uint `json:"frequency_id,omitempty"`
|
||||
FrequencyName *string `json:"frequency_name,omitempty"`
|
||||
DueDate *string `json:"due_date,omitempty"`
|
||||
NextDueDate *string `json:"next_due_date,omitempty"`
|
||||
EstimatedCost *float64 `json:"estimated_cost,omitempty"`
|
||||
ActualCost *float64 `json:"actual_cost,omitempty"`
|
||||
ContractorID *uint `json:"contractor_id,omitempty"`
|
||||
|
||||
@@ -404,6 +404,10 @@ func (h *AdminTaskHandler) toTaskResponse(task *models.Task) dto.TaskResponse {
|
||||
dueDate := task.DueDate.Format("2006-01-02")
|
||||
response.DueDate = &dueDate
|
||||
}
|
||||
if task.NextDueDate != nil {
|
||||
nextDueDate := task.NextDueDate.Format("2006-01-02")
|
||||
response.NextDueDate = &nextDueDate
|
||||
}
|
||||
if task.EstimatedCost != nil {
|
||||
cost, _ := task.EstimatedCost.Float64()
|
||||
response.EstimatedCost = &cost
|
||||
|
||||
Reference in New Issue
Block a user