Skip to content

Commit 1b27d70

Browse files
authored
Merge pull request #378 from objectstack-ai/copilot/fix-action-step-error-e0373eaa-e7ed-4794-b7f4-6432bdfb0a3c
2 parents 79bab86 + fc35b5f commit 1b27d70

4 files changed

Lines changed: 24 additions & 30 deletions

File tree

apps/console/src/components/ObjectView.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ObjectGrid } from '@object-ui/plugin-grid';
44
import { ObjectKanban } from '@object-ui/plugin-kanban';
55
import { ObjectCalendar } from '@object-ui/plugin-calendar';
66
import { ObjectGantt } from '@object-ui/plugin-gantt';
7-
import { Button, Tabs, TabsList, TabsTrigger } from '@object-ui/components';
7+
import { Button } from '@object-ui/components';
88
import { Plus, Calendar as CalendarIcon, Kanban as KanbanIcon, Table as TableIcon, AlignLeft } from 'lucide-react';
99

1010
export function ObjectView({ dataSource, objects, onEdit }: any) {
@@ -122,19 +122,19 @@ export function ObjectView({ dataSource, objects, onEdit }: any) {
122122
key={key}
123123
{...commonProps}
124124
schema={{
125-
type: 'gantt',
125+
type: 'object-grid',
126126
objectName: objectDef.name,
127-
filter: {
128-
gantt: {
129-
startDateField: activeView.startDateField || 'start_date',
130-
endDateField: activeView.endDateField || 'end_date',
131-
titleField: activeView.titleField || 'name',
132-
progressField: activeView.progressField || 'progress',
133-
dependenciesField: activeView.dependenciesField,
134-
colorField: activeView.colorField,
135-
}
127+
// Gantt config is read by ObjectGantt via getGanttConfig helper
128+
// TypeScript workaround: gantt property not in ObjectGridSchema but supported by implementation
129+
gantt: {
130+
startDateField: activeView.startDateField || 'start_date',
131+
endDateField: activeView.endDateField || 'end_date',
132+
titleField: activeView.titleField || 'name',
133+
progressField: activeView.progressField || 'progress',
134+
dependenciesField: activeView.dependenciesField,
135+
colorField: activeView.colorField,
136136
}
137-
}}
137+
} as any}
138138
{...interactionProps}
139139
/>
140140
);

examples/crm/objectstack.config.ts

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,47 +85,43 @@ export default defineStack({
8585
// --- KPI Row ---
8686
{
8787
type: 'metric',
88-
component: {
89-
type: 'metric',
88+
layout: { x: 0, y: 0, w: 1, h: 1 },
89+
options: {
9090
label: 'Total Revenue',
9191
value: '$1,245,000',
9292
trend: { value: 12.5, direction: 'up', label: 'vs last month' },
9393
icon: 'DollarSign'
94-
},
95-
layout: { x: 0, y: 0, w: 1, h: 1 }
94+
}
9695
},
9796
{
9897
type: 'metric',
99-
component: {
100-
type: 'metric',
98+
layout: { x: 1, y: 0, w: 1, h: 1 },
99+
options: {
101100
label: 'Active Deals',
102101
value: '45',
103102
trend: { value: 2.1, direction: 'down', label: 'vs last month' },
104103
icon: 'Briefcase'
105-
},
106-
layout: { x: 1, y: 0, w: 1, h: 1 }
104+
}
107105
},
108106
{
109107
type: 'metric',
110-
component: {
111-
type: 'metric',
108+
layout: { x: 2, y: 0, w: 1, h: 1 },
109+
options: {
112110
label: 'Win Rate',
113111
value: '68%',
114112
trend: { value: 4.3, direction: 'up', label: 'vs last month' },
115113
icon: 'Trophy'
116-
},
117-
layout: { x: 2, y: 0, w: 1, h: 1 }
114+
}
118115
},
119116
{
120117
type: 'metric',
121-
component: {
122-
type: 'metric',
118+
layout: { x: 3, y: 0, w: 1, h: 1 },
119+
options: {
123120
label: 'Avg Deal Size',
124121
value: '$24,000',
125122
trend: { value: 1.2, direction: 'up', label: 'vs last month' },
126123
icon: 'BarChart3'
127-
},
128-
layout: { x: 3, y: 0, w: 1, h: 1 }
124+
}
129125
},
130126

131127
// --- Row 2: Charts ---

packages/plugin-form/src/ObjectForm.msw.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { setupServer } from 'msw/node';
77
import { http, HttpResponse } from 'msw';
88
import { registerAllFields } from '@object-ui/fields';
99
import React from 'react';
10-
// @ts-expect-error - Import from examples
1110
import { ContactObject } from '../../../examples/crm/src/objects/contact.object';
1211

1312
// Register widget renderers

packages/plugin-grid/src/ObjectGrid.msw.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { setupServer } from 'msw/node';
77
import { http, HttpResponse } from 'msw';
88
import { registerAllFields } from '@object-ui/fields';
99
import React from 'react';
10-
// @ts-expect-error - Import from examples
1110
import { ContactObject } from '../../../examples/crm/src/objects/contact.object';
1211

1312
registerAllFields();

0 commit comments

Comments
 (0)