Skip to content

Commit a7cc292

Browse files
hotlongCopilot
andcommitted
chore(crm): drop hardcoded $ from sales dashboard formats
Switches all `format: '$0,0'` and `prefix: '$'` declarations to plain `format: '0,0'`. Currency symbols should come from a configured `Field.currency({ currency: 'USD' })` on the object schema (or be omitted when the demo data is region-agnostic), not from hardcoded format strings in the dashboard layer. Pairs with objectui change that no longer silently defaults unconfigured currency fields to USD. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9344df2 commit a7cc292

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

examples/app-crm/src/dashboards/sales.dashboard.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ export const SalesDashboard: Dashboard = {
7373
layout: { x: 0, y: 0, w: 3, h: 2 },
7474
options: {
7575
icon: 'DollarSign',
76-
format: '$0,0',
77-
prefix: '$',
76+
format: '0,0',
7877
trend: { value: 8.4, direction: 'up', label: 'vs last quarter' },
7978
},
8079
},
@@ -94,8 +93,7 @@ export const SalesDashboard: Dashboard = {
9493
layout: { x: 3, y: 0, w: 3, h: 2 },
9594
options: {
9695
icon: 'Trophy',
97-
format: '$0,0',
98-
prefix: '$',
96+
format: '0,0',
9997
trend: { value: 14.7, direction: 'up', label: 'vs last quarter' },
10098
},
10199
},
@@ -134,8 +132,7 @@ export const SalesDashboard: Dashboard = {
134132
layout: { x: 9, y: 0, w: 3, h: 2 },
135133
options: {
136134
icon: 'bar-chart',
137-
format: '$0,0',
138-
prefix: '$',
135+
format: '0,0',
139136
trend: { value: 4.3, direction: 'up', label: 'vs last quarter' },
140137
},
141138
},
@@ -178,7 +175,7 @@ export const SalesDashboard: Dashboard = {
178175
showDataLabels: false,
179176
colors: ['#10B981'],
180177
xAxis: { field: 'close_date', title: 'Month', showGridLines: false, logarithmic: false },
181-
yAxis: [{ field: 'amount', title: 'Revenue', format: '$0,0', showGridLines: true, logarithmic: false }],
178+
yAxis: [{ field: 'amount', title: 'Revenue', format: '0,0', showGridLines: true, logarithmic: false }],
182179
annotations: [
183180
{ type: 'line', axis: 'y', value: 100000, label: 'Quota', style: 'dashed', color: '#F59E0B' },
184181
],
@@ -205,7 +202,7 @@ export const SalesDashboard: Dashboard = {
205202
showLegend: false,
206203
showDataLabels: true,
207204
colors: ['#4F46E5'],
208-
xAxis: { field: 'amount', title: 'Pipeline value', format: '$0,0', showGridLines: true, logarithmic: false },
205+
xAxis: { field: 'amount', title: 'Pipeline value', format: '0,0', showGridLines: true, logarithmic: false },
209206
yAxis: [{ field: 'owner', title: 'Owner', showGridLines: false, logarithmic: false }],
210207
},
211208
},
@@ -244,7 +241,7 @@ export const SalesDashboard: Dashboard = {
244241
columns: [
245242
{ header: 'Opportunity', accessorKey: 'name' },
246243
{ header: 'Account', accessorKey: 'account' },
247-
{ header: 'Amount', accessorKey: 'amount', format: '$0,0' },
244+
{ header: 'Amount', accessorKey: 'amount', format: '0,0' },
248245
{ header: 'Stage', accessorKey: 'stage' },
249246
{ header: 'Probability', accessorKey: 'probability', format: '0%' },
250247
{ header: 'Close Date', accessorKey: 'close_date', format: 'MMM D, YYYY' },
@@ -275,7 +272,7 @@ export const SalesDashboard: Dashboard = {
275272
aggregation: 'sum',
276273
showRowTotals: true,
277274
showColumnTotals: true,
278-
format: '$,.0f',
275+
format: '0,0',
279276
drillDown: { enabled: true },
280277
},
281278
},

0 commit comments

Comments
 (0)