Finance scenario
Capital markets workflow showing desk-open orchestration — system status, charts, and the overnight correction queue
Your Role
You run the morning check before the market opens.
import { AdaptableButton, AdaptableOptions, CustomToolbarFormContext, } from '@adaptabletools/adaptable'; import {MorningQueueItem} from './rowData'; function applyMorningToolbarFilter(context: CustomToolbarFormContext) { const source = context.formData.source as string | undefined; const openOnly = Boolean(context.formData.openOnly); const expressions: string[] = []; if (source && source !== 'All') { expressions.push(`[source] = "${source}"`); } if (openOnly) { expressions.push('QUERY("Morning Queue")'); } context.adaptableApi.filterApi.gridFilterApi.setGridFilterExpression( expressions.length ? expressions.join(' AND ') : null ); } export const adaptableOptions: AdaptableOptions<MorningQueueItem> = { primaryKey: 'id', adaptableId: 'Showcase: Morning Corrections', userName: 'Desk Lead', chartingOptions: { chartContainers: [ { name: 'Top Container', chartsDisplay: 'multiple', element: '#demoOutputAbove', }, ], }, notificationsOptions: { showSystemStatusMessageNotifications: true, position: 'TopRight', }, dashboardOptions: { customToolbars: [ { name: 'MorningToolbar', title: 'Morning', toolbarForm: { fields: [ { name: 'source', label: 'Source', fieldType: 'select', defaultValue: 'All', options: [ {label: 'All sources', value: 'All'}, {label: 'Blotter', value: 'Blotter'}, {label: 'Risk', value: 'Risk'}, {label: 'Settlement', value: 'Settlement'}, ], onValueChange: (_value, ctx) => applyMorningToolbarFilter(ctx as CustomToolbarFormContext), }, { name: 'openOnly', label: 'Open items only', fieldType: 'checkbox', defaultValue: true, onValueChange: (_value, ctx) => applyMorningToolbarFilter(ctx as CustomToolbarFormContext), }, ], buttons: [ { label: 'Clear', buttonStyle: {tone: 'neutral', variant: 'text'}, onClick: ( _button: AdaptableButton<CustomToolbarFormContext>, context: CustomToolbarFormContext ) => { context.adaptableApi.filterApi.gridFilterApi.clearGridFilter(); context.adaptableApi.dashboardApi.resetCustomToolbarFormData( 'MorningToolbar' ); }, }, ], }, }, ], }, initialState: { Dashboard: { Tabs: [ { Name: 'Morning', Toolbars: [ 'MorningToolbar', 'Layout', 'GridFilter', 'SystemStatus', 'Alert', ], }, { Name: 'Charts', Toolbars: ['Charting', 'Layout'], }, ], ModuleButtons: [ 'Layout', 'Alert', 'SettingsPanel', ], }, StatusBar: { StatusBars: [ { Key: 'Center Panel', StatusBarPanels: ['SystemStatus', 'Layout'], }, ], }, Theme: {CurrentTheme: 'dark'}, NamedQuery: { NamedQueries: [ { Name: 'Morning Queue', BooleanExpression: '[status] = "Open" OR [status] = "In Progress"', }, { Name: 'High Priority', BooleanExpression: '[priority] = "High"', }, ], }, Layout: { CurrentLayout: 'Morning Dashboard', Layouts: [ { Name: 'Morning Dashboard', AutoSizeColumns: true, TableColumns: [ 'queueRef', 'source', 'symbol', 'summary', 'priority', 'status', 'assignee', 'detectedAt', ], OpenCharts: [ {ChartName: 'queue-by-source', ContainerName: 'Top Container'}, {ChartName: 'priority-mix', ContainerName: 'Top Container'}, ], }, { Name: 'Corrections Queue', AutoSizeColumns: true, TableColumns: [ 'queueRef', 'source', 'symbol', 'summary', 'priority', 'status', 'assignee', ], GridFilter: { Expression: 'QUERY("Morning Queue")', }, }, { Name: 'High Priority', AutoSizeColumns: true, TableColumns: [ 'queueRef', 'source', 'symbol', 'summary', 'status', 'assignee', 'detectedAt', ], GridFilter: { Expression: 'QUERY("High Priority")', }, }, ], }, FormatColumn: { FormatColumns: [ { Name: 'format-priority-high', Scope: {ColumnIds: ['priority']}, Rule: {BooleanExpression: '[priority] = "High"'}, Style: { BackColor: 'var(--ab-color-palette-1)', ForeColor: 'var(--ab-color-palette-2)', FontWeight: 'Bold', }, }, { Name: 'format-status-open', Scope: {ColumnIds: ['status']}, Rule: {BooleanExpression: '[status] = "Open"'}, Style: {ForeColor: 'var(--ab-color-palette-4)'}, }, { Name: 'format-status-progress', Scope: {ColumnIds: ['status']}, Rule: {BooleanExpression: '[status] = "In Progress"'}, Style: {ForeColor: 'var(--ab-color-palette-8)'}, }, { Name: 'format-detected', Scope: {ColumnIds: ['detectedAt']}, DisplayFormat: { Formatter: 'DateFormatter', Options: {Pattern: 'dd MMM yyyy'}, }, }, ], }, Alert: { AlertDefinitions: [ { Name: '09:00 Morning review', MessageType: 'Info', MessageHeader: 'Morning corrections', MessageText: 'Review overnight queue before market open', Schedule: { IsOneOff: false, CronExpression: '0 9 * * 1-5', }, AlertProperties: { DisplayNotification: true, DisplaySystemStatusMessage: true, }, }, ], }, Charting: { ChartDefinitions: [ { Name: 'queue-by-source', Model: { modelType: 'range', chartId: 'morning-queue-source', chartType: 'pie', chartThemeName: 'ag-vivid-dark', aggFunc: 'count', chartOptions: { pie: { title: {text: 'Items by source'}, }, }, cellRange: { rowStartIndex: 0, rowEndIndex: 35, columns: ['source', 'id'], }, suppressChartRanges: false, unlinkChart: false, }, }, { Name: 'priority-mix', Model: { modelType: 'range', chartId: 'morning-queue-priority', chartType: 'bar', chartThemeName: 'ag-vivid-dark', aggFunc: 'count', chartOptions: { bar: { title: {text: 'Items by priority'}, }, }, cellRange: { rowStartIndex: 0, rowEndIndex: 35, columns: ['priority', 'id'], }, suppressChartRanges: false, unlinkChart: false, }, }, ], }, }, };