Skip to content

Commit 95b0e9b

Browse files
xuyushun441-sysos-zhuangclaude
authored
fix(example-crm): author SalesByAccountReport via defineReport (lint #2035) (#2108)
The fixture added in #2107 used a bare `: UI.ReportInput` typed literal, which the `no-restricted-syntax` rule (#2035) disallows — metadata must go through its `defineX` factory so it validates at parse time. The sibling sales-by-stage report already uses `defineReport`; this aligns the new one. The CI lint only checks changed files, so #2107 landed with the violation — this fixes it on main. No behavior change: same exported `SalesByAccountReport`, same fields. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 94c7c6e commit 95b0e9b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/app-crm/src/reports/sales-by-account.report.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
22

3-
import type * as UI from '@objectstack/spec/ui';
3+
import { defineReport } from '@objectstack/spec/ui';
44

55
/**
66
* Example report — total opportunity amount grouped by ACCOUNT.
@@ -13,12 +13,12 @@ import type * as UI from '@objectstack/spec/ui';
1313
* `total_amount` measure (USD), this exercises both render paths — Intl
1414
* currency formatting AND raw-value lookup drill — end to end.
1515
*/
16-
export const SalesByAccountReport: UI.ReportInput = {
16+
export const SalesByAccountReport = defineReport({
1717
name: 'crm_sales_by_account',
1818
label: 'Sales by Account',
1919
description: 'Total opportunity amount grouped by account (lookup-dimension drill).',
2020
type: 'summary',
2121
dataset: 'opportunity_metrics',
2222
rows: ['account'],
2323
values: ['total_amount'],
24-
};
24+
});

0 commit comments

Comments
 (0)