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
37 changes: 3 additions & 34 deletions packages/compliance/src/dashboards/control_posture.dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,40 +86,9 @@ export const ControlPostureDashboard: Dashboard = {
layout: { x: 9, y: 0, w: 3, h: 2 },
options: { icon: 'ClipboardCheck', format: '0,0' },
},
{
id: 'failing_table',
dataset: 'compliance_control_metrics',
values: ['control_count'],
title: 'Failing Controls (Action Required)',
type: 'table',
filter: { last_status: { $in: ['failed', 'partial'] } },
layout: { x: 0, y: 2, w: 8, h: 5 },
options: {
columns: ['code', 'title', 'framework', 'criticality', 'last_assessed_at'],
pageSize: 10,
sort: [
{ field: 'criticality', order: 'asc' },
{ field: 'code', order: 'asc' },
],
},
},
{
id: 'expiring_evidence_table',
dataset: 'compliance_evidence_metrics',
values: ['evidence_count'],
title: 'Evidence Expiring Soon',
type: 'table',
filter: {
status: 'approved',
expires_on: { $gte: '{today}' },
},
layout: { x: 8, y: 2, w: 4, h: 5 },
options: {
columns: ['title', 'control', 'expires_on'],
pageSize: 10,
sort: [{ field: 'expires_on', order: 'asc' }],
},
},
// Record listings moved to object-bound ListViews (ADR-0017): `failing_table`
// is the Controls "Failing" tab; `expiring_evidence_table` is the Evidence
// "Expiring ≤ 30d" tab. KPI widgets above keep the counts here.
{
id: 'assessments_by_month',
dataset: 'compliance_assessment_metrics',
Expand Down
19 changes: 2 additions & 17 deletions packages/content/src/dashboards/editorial_calendar.dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,8 @@ export const EditorialCalendarDashboard: Dashboard = {
options: { icon: 'AlertTriangle', format: '0,0' },
},

{
id: 'calendar_main',
dataset: 'content_piece_metrics',
values: ['piece_count'],
title: 'Upcoming Calendar',
type: 'table',
filter: {
status: { $in: ['approved', 'scheduled', 'published'] },
publish_at: { $gte: '{last_month_start}' },
},
layout: { x: 0, y: 2, w: 8, h: 6 },
options: {
columns: ['title', 'status', 'format', 'target_channels', 'publish_at'],
pageSize: 25,
sort: [{ field: 'publish_at', order: 'asc' }],
},
},
// Record listing moved to an object-bound ListView (ADR-0017): the former
// `calendar_main` is the Pieces "Calendar" tab (editorial_calendar view).
{
id: 'publications_by_channel',
dataset: 'content_publication_metrics',
Expand Down
25 changes: 3 additions & 22 deletions packages/content/src/dashboards/roi_by_channel.dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,27 +110,8 @@ export const RoiByChannelDashboard: Dashboard = {
layout: { x: 6, y: 2, w: 6, h: 5 },
},

{
id: 'top_publications',
dataset: 'content_publication_metrics',
values: ['publication_count'],
title: 'Top 10 Publications by Signups',
type: 'table',

layout: { x: 0, y: 7, w: 12, h: 5 },
options: {
columns: [
'piece',
'channel',
'published_at',
'total_views',
'total_clicks',
'total_signups',
'total_revenue',
],
pageSize: 10,
sort: [{ field: 'total_signups', order: 'desc' }],
},
},
// Record listing moved to an object-bound ListView (ADR-0017): the former
// `top_publications` is the Publications "Top Performers" tab
// (top_publications view, sorted by signups).
],
};
35 changes: 3 additions & 32 deletions packages/content/src/dashboards/today_workbench.dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,37 +85,8 @@ export const TodayWorkbenchDashboard: Dashboard = {
options: { icon: 'Send', format: '0,0' },
},

{
id: 'my_pieces_table',
dataset: 'content_piece_metrics',
values: ['piece_count'],
title: 'Pieces I own (or unassigned), not done',
type: 'table',
filter: {
$or: [{ assignee: '{current_user_id}' }, { assignee: null }],
status: { $in: ['backlog', 'drafting', 'in_review', 'approved', 'scheduled'] },
},
layout: { x: 0, y: 2, w: 7, h: 5 },
options: {
columns: ['title', 'status', 'format', 'publish_at'],
pageSize: 10,
sort: [{ field: 'publish_at', order: 'asc' }],
},
},

{
id: 'signals_to_triage',
dataset: 'content_signal_metrics',
values: ['signal_count'],
title: 'Signals to Triage',
type: 'table',
filter: { status: 'captured' },
layout: { x: 7, y: 2, w: 5, h: 5 },
options: {
columns: ['headline', 'source_kind', 'impact', 'captured_at'],
pageSize: 10,
sort: [{ field: 'impact', order: 'desc' }],
},
},
// Record listings moved to object-bound ListViews (ADR-0017): `my_pieces_table`
// is covered by the Pieces "My Drafts" tab; `signals_to_triage` is the Signals
// "My Triage" tab (my_triage_queue, status=captured).
],
};
20 changes: 20 additions & 0 deletions packages/content/src/views/content_publication.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,32 @@ export const PublicationViews = defineView({
exportOptions: ['csv', 'xlsx'],
tabs: [
{ name: 'all', label: 'All', view: 'all_publications', isDefault: true, pinned: true },
{ name: 'top', label: 'Top Performers', icon: 'trophy', view: 'top_publications' },
{ name: 'week', label: 'This Week', icon: 'calendar', view: 'this_week_publications' },
{ name: 'by_channel', label: 'By Channel', icon: 'layers', view: 'by_channel_publications' },
],
},

listViews: {
// Top publications by signups — surfaces the former `top_publications`
// dashboard table as an object-bound ListView (ADR-0017).
top_publications: {
name: 'top_publications',
type: 'grid',
label: 'Top Performers',
data: { provider: 'object', object: 'content_publication' },
columns: [
'piece',
'channel',
'published_at',
'total_views',
'total_clicks',
'total_signups',
'total_revenue',
],
sort: [{ field: 'total_signups', order: 'desc' }],
},

this_week_publications: {
name: 'this_week_publications',
type: 'grid',
Expand Down
38 changes: 3 additions & 35 deletions packages/contracts/src/dashboards/renewals_at_risk.dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,41 +88,9 @@ export const RenewalsAtRiskDashboard: Dashboard = {
layout: { x: 9, y: 0, w: 3, h: 2 },
options: { icon: 'TrendingUp', format: '$0,0' },
},
{
id: 'expiring_table',
dataset: 'contracts_contract_metrics',
values: ['contract_count'],
title: 'Expiring Contracts (Next 60d)',
type: 'table',
// Only `{today}` is resolved client-side by the data endpoint; tokens
// like `{60_days_from_now}` only work inside the analytics service.
// We sort ascending by end_date and rely on pageSize to cap the list
// to the nearest renewals.
filter: {
status: 'active',
end_date: { $gte: '{today}' },
},
layout: { x: 0, y: 2, w: 8, h: 5 },
options: {
columns: ['title', 'contract_type', 'end_date', 'auto_renew', 'total_value'],
pageSize: 10,
sort: [{ field: 'end_date', order: 'asc' }],
},
},
{
id: 'pending_obligations',
dataset: 'contracts_obligation_metrics',
values: ['obligation_count'],
title: 'Open Obligations',
type: 'table',
filter: { status: 'open' },
layout: { x: 8, y: 2, w: 4, h: 5 },
options: {
columns: ['summary', 'due_date', 'amount'],
pageSize: 10,
sort: [{ field: 'due_date', order: 'asc' }],
},
},
// Record listings moved to object-bound ListViews (ADR-0017): the former
// `expiring_table` is the Contracts "Expiring ≤ 60d" tab; `pending_obligations`
// is the Obligations "Open" tab. KPI widgets above keep the counts here.
{
id: 'signed_by_month',
dataset: 'contracts_contract_metrics',
Expand Down
13 changes: 13 additions & 0 deletions packages/contracts/src/views/contracts_obligation.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,25 @@ export const ObligationViews = defineView({
exportOptions: ['csv', 'xlsx'],
tabs: [
{ name: 'all', label: 'All', view: 'all_obligations', isDefault: true, pinned: true },
{ name: 'open', label: 'Open', icon: 'circle-dot', view: 'open_obligations' },
{ name: 'mine_open', label: 'My Open', icon: 'user', view: 'my_open_obligations' },
{ name: 'overdue', label: 'Overdue', icon: 'clock', view: 'overdue_obligations' },
],
},

listViews: {
// Pending (open) obligations — surfaces the former `pending_obligations`
// dashboard table as an object-bound ListView (ADR-0017).
open_obligations: {
name: 'open_obligations',
type: 'grid',
label: 'Open Obligations',
data: { provider: 'object', object: 'contracts_obligation' },
columns: ['summary', 'due_date', 'amount'],
filter: [{ field: 'status', operator: 'equals', value: 'open' }],
sort: [{ field: 'due_date', order: 'asc' }],
},

my_open_obligations: {
name: 'my_open_obligations',
type: 'grid',
Expand Down
32 changes: 4 additions & 28 deletions packages/expense/src/dashboards/expenses_overview.dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,34 +73,10 @@ export const ExpensesOverviewDashboard: Dashboard = {
layout: { x: 9, y: 0, w: 3, h: 2 },
options: { icon: 'CheckCircle', format: '$0,0' },
},
{
id: 'pending_reports_table',
dataset: 'expense_report_metrics',
values: ['report_count'],
title: 'Reports Awaiting Approval',
type: 'table',
filter: { status: 'submitted' },
layout: { x: 0, y: 2, w: 8, h: 5 },
options: {
columns: ['title', 'requester', 'total_amount', 'cost_center', 'submitted_at'],
pageSize: 10,
sort: [{ field: 'total_amount', order: 'desc' }],
},
},
{
id: 'to_reimburse_table',
dataset: 'expense_report_metrics',
values: ['report_count'],
title: 'Approved — To Reimburse',
type: 'table',
filter: { status: 'approved' },
layout: { x: 8, y: 2, w: 4, h: 5 },
options: {
columns: ['title', 'requester', 'total_amount'],
pageSize: 10,
sort: [{ field: 'approved_at', order: 'asc' }],
},
},
// Record listings moved to object-bound ListViews (ADR-0017): the former
// `pending_reports_table` / `to_reimburse_table` now live on the Reports
// object as the "Awaiting Approval" / "To Reimburse" tabs. The metric
// widgets above keep the at-a-glance counts on this dashboard.
{
id: 'spend_by_category',
dataset: 'expense_line_metrics',
Expand Down
37 changes: 3 additions & 34 deletions packages/helpdesk/src/dashboards/agent_workbench.dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,39 +82,8 @@ export const AgentWorkbenchDashboard: Dashboard = {
options: { icon: 'Sparkles', format: '0,0' },
},

{
id: 'my_queue_table',
dataset: 'ticket_metrics',
values: ['ticket_count'],
title: 'My Queue (Priority Sorted)',
type: 'table',
filter: {
assignee: '{currentUser}',
status: { $nin: ['closed', 'resolved'] },
},
layout: { x: 0, y: 2, w: 8, h: 5 },
options: {
columns: ['ticket_number', 'name', 'priority', 'ai_sentiment', 'first_response_due_at'],
pageSize: 10,
sort: [{ field: 'priority', order: 'desc' }],
},
},
{
id: 'breaching_table',
dataset: 'ticket_metrics',
values: ['ticket_count'],
title: 'SLA Breaches',
type: 'table',
filter: {
status: { $nin: ['closed', 'resolved'] },
resolution_due_at: { $lt: '{today}' },
},
layout: { x: 8, y: 2, w: 4, h: 5 },
options: {
columns: ['ticket_number', 'priority', 'resolution_due_at'],
pageSize: 10,
sort: [{ field: 'resolution_due_at', order: 'asc' }],
},
},
// Record listings moved to object-bound ListViews (ADR-0017): `my_queue_table`
// is the Tickets "My Queue" tab (my_queue view); `breaching_table` is the
// Tickets "Breaching SLA" tab. KPI widgets above keep the counts here.
],
};
24 changes: 2 additions & 22 deletions packages/helpdesk/src/dashboards/manager_overview.dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,28 +115,8 @@ export const ManagerOverviewDashboard: Dashboard = {
layout: { x: 6, y: 6, w: 6, h: 4 },
},

{
id: 'recent_escalated',
dataset: 'ticket_metrics',
values: ['ticket_count'],
title: 'Recently Escalated',
type: 'table',
filter: { status: 'escalated' },
layout: { x: 0, y: 10, w: 12, h: 5 },
options: {
columns: [
'ticket_number',
'name',
'customer',
'team',
'assignee',
'ai_sentiment',
'priority',
],
pageSize: 10,
sort: [{ field: 'priority', order: 'desc' }],
},
},
// Record listing moved to an object-bound ListView (ADR-0017): the former
// `recent_escalated` is the Tickets "Escalated" tab (escalated_tickets view).
{
id: 'resolutions_by_day',
dataset: 'ticket_metrics',
Expand Down
22 changes: 22 additions & 0 deletions packages/helpdesk/src/views/helpdesk_ticket.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export const TicketViews = defineView({
icon: 'alert-triangle',
view: 'breaching_tickets',
},
{ name: 'escalated', label: 'Escalated', icon: 'trending-up', view: 'escalated_tickets' },
{ name: 'angry', label: 'Angry', icon: 'flame', view: 'angry_tickets' },
{ name: 'my_queue', label: 'My Queue', icon: 'user', view: 'my_queue' },
],
},

Expand Down Expand Up @@ -78,6 +80,26 @@ export const TicketViews = defineView({
sort: [{ field: 'priority', order: 'desc' }],
},

// Escalated tickets — surfaces the former `recent_escalated` dashboard
// table as an object-bound ListView (ADR-0017).
escalated_tickets: {
name: 'escalated_tickets',
type: 'grid',
label: 'Escalated',
data: { provider: 'object', object: 'helpdesk_ticket' },
columns: [
'ticket_number',
'name',
'customer',
'team',
'assignee',
'ai_sentiment',
'priority',
],
filter: [{ field: 'status', operator: 'equals', value: 'escalated' }],
sort: [{ field: 'priority', order: 'desc' }],
},

breaching_tickets: {
name: 'breaching_tickets',
type: 'grid',
Expand Down
Loading
Loading