Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/app-todo/src/apps/todo.app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const TodoApp = App.create({
children: [
{ id: 'nav_all_tasks', type: 'object', objectName: 'todo_task', label: 'All Tasks', icon: 'list' },
{ id: 'nav_my_tasks', type: 'object', objectName: 'todo_task', label: 'My Tasks', icon: 'user-check' },
{ id: 'nav_overdue', type: 'object', objectName: 'todo_task', label: 'Overdue', icon: 'alert-circle' },
{ id: 'nav_today', type: 'object', objectName: 'todo_task', label: 'Due Today', icon: 'calendar' },
{ id: 'nav_overdue', type: 'object', objectName: 'todo_task', viewName: 'overdue', label: 'Overdue', icon: 'alert-circle' },
{ id: 'nav_today', type: 'object', objectName: 'todo_task', viewName: 'due_today', label: 'Due Today', icon: 'calendar' },
{ id: 'nav_upcoming', type: 'object', objectName: 'todo_task', label: 'Upcoming', icon: 'calendar-plus' },
]
},
Expand Down
25 changes: 6 additions & 19 deletions examples/app-todo/src/dashboards/task.dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,24 +115,11 @@ export const TaskDashboard: Dashboard = {
options: { showLegend: true }
},

// Row 4: Tables
{
id: 'overdue_tasks_table',
title: 'Overdue Tasks',
type: 'table',
filter: { is_overdue: true, is_completed: false },
dataset: 'task_metrics',
values: ['task_count'],
layout: { x: 0, y: 10, w: 6, h: 4 },
},
{
id: 'due_today',
title: 'Due Today',
type: 'table',
filter: { due_date: '{today}', is_completed: false },
dataset: 'task_metrics',
values: ['task_count'],
layout: { x: 6, y: 10, w: 6, h: 4 },
},
// The former Row 4 count-only `table` widgets (`overdue_tasks_table`,
// `due_today`) rendered a single summary row, not the record listing
// they intended (#1719). Those listings live as ListViews on
// `todo_task` (`overdue`, `due_today` — ADR-0017), reachable from the
// app navigation; the `overdue_tasks` / `completed_today` metric
// widgets above keep the counts.
],
};
25 changes: 25 additions & 0 deletions examples/app-todo/src/views/task.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ const data = { provider: 'object' as const, object: 'todo_task' };
* (no grouping / aggregation), which is a ListView concern, not analytics. It
* is converted here to an `overdue` grid view filtered to incomplete, overdue
* tasks — replacing the report entirely.
*
* Issue #1719: the dashboard's `overdue_tasks_table` / `due_today` widgets
* were count-only `table` widgets on the `task_metrics` dataset — a single
* summary row, not the record listing they intended. They are re-modelled
* here as the `overdue` / `due_today` views, surfaced via app navigation;
* the dashboard keeps the counts on its `metric` widgets.
*/
export const TaskViews = defineView({
list: {
Expand Down Expand Up @@ -46,5 +52,24 @@ export const TaskViews = defineView({
],
sort: [{ field: 'due_date', order: 'asc' }],
},

// Replaces the dashboard's count-only `due_today` table widget (#1719).
due_today: {
label: 'Due Today',
type: 'grid',
data,
columns: [
{ field: 'subject' },
{ field: 'priority' },
{ field: 'status' },
{ field: 'owner' },
{ field: 'category' },
],
filter: [
{ field: 'due_date', operator: 'equals', value: '{today}' },
{ field: 'is_completed', operator: 'equals', value: false },
],
sort: [{ field: 'priority', order: 'desc' }],
},
},
});
Loading