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:
Trey t
2025-12-08 17:14:21 -06:00
parent 1eec68ecf9
commit 5be18fa110
5 changed files with 19 additions and 0 deletions
@@ -124,6 +124,14 @@ export function TaskDetailClient() {
<div className="text-sm font-medium text-muted-foreground">Due Date</div>
<div>{task.due_date ? new Date(task.due_date).toLocaleDateString() : '-'}</div>
</div>
<div>
<div className="text-sm font-medium text-muted-foreground">Next Due Date</div>
<div>{task.next_due_date ? new Date(task.next_due_date).toLocaleDateString() : '-'}</div>
</div>
<div>
<div className="text-sm font-medium text-muted-foreground">Frequency</div>
<div>{task.frequency_name || '-'}</div>
</div>
</div>
</CardContent>
</Card>
+5
View File
@@ -67,6 +67,11 @@ const columns: ColumnDef<Task>[] = [
header: 'Due Date',
cell: ({ row }) => row.original.due_date ? new Date(row.original.due_date).toLocaleDateString() : '-',
},
{
accessorKey: 'next_due_date',
header: 'Next Due',
cell: ({ row }) => row.original.next_due_date ? new Date(row.original.next_due_date).toLocaleDateString() : '-',
},
{
accessorKey: 'is_cancelled',
header: 'State',
+1
View File
@@ -191,6 +191,7 @@ export interface Task {
frequency_id?: number;
frequency_name?: string;
due_date?: string;
next_due_date?: string;
estimated_cost?: number;
actual_cost?: number;
contractor_id?: number;