diff --git a/apps/console/src/components/ObjectView.tsx b/apps/console/src/components/ObjectView.tsx index 557366418..820d2346b 100644 --- a/apps/console/src/components/ObjectView.tsx +++ b/apps/console/src/components/ObjectView.tsx @@ -4,7 +4,7 @@ import { ObjectGrid } from '@object-ui/plugin-grid'; import { ObjectKanban } from '@object-ui/plugin-kanban'; import { ObjectCalendar } from '@object-ui/plugin-calendar'; import { ObjectGantt } from '@object-ui/plugin-gantt'; -import { Button, Tabs, TabsList, TabsTrigger } from '@object-ui/components'; +import { Button } from '@object-ui/components'; import { Plus, Calendar as CalendarIcon, Kanban as KanbanIcon, Table as TableIcon, AlignLeft } from 'lucide-react'; export function ObjectView({ dataSource, objects, onEdit }: any) { @@ -122,19 +122,19 @@ export function ObjectView({ dataSource, objects, onEdit }: any) { key={key} {...commonProps} schema={{ - type: 'gantt', + type: 'object-grid', objectName: objectDef.name, - filter: { - gantt: { - startDateField: activeView.startDateField || 'start_date', - endDateField: activeView.endDateField || 'end_date', - titleField: activeView.titleField || 'name', - progressField: activeView.progressField || 'progress', - dependenciesField: activeView.dependenciesField, - colorField: activeView.colorField, - } + // Gantt config is read by ObjectGantt via getGanttConfig helper + // TypeScript workaround: gantt property not in ObjectGridSchema but supported by implementation + gantt: { + startDateField: activeView.startDateField || 'start_date', + endDateField: activeView.endDateField || 'end_date', + titleField: activeView.titleField || 'name', + progressField: activeView.progressField || 'progress', + dependenciesField: activeView.dependenciesField, + colorField: activeView.colorField, } - }} + } as any} {...interactionProps} /> ); diff --git a/examples/crm/objectstack.config.ts b/examples/crm/objectstack.config.ts index 2534265e8..954fa269e 100644 --- a/examples/crm/objectstack.config.ts +++ b/examples/crm/objectstack.config.ts @@ -85,47 +85,43 @@ export default defineStack({ // --- KPI Row --- { type: 'metric', - component: { - type: 'metric', + layout: { x: 0, y: 0, w: 1, h: 1 }, + options: { label: 'Total Revenue', value: '$1,245,000', trend: { value: 12.5, direction: 'up', label: 'vs last month' }, icon: 'DollarSign' - }, - layout: { x: 0, y: 0, w: 1, h: 1 } + } }, { type: 'metric', - component: { - type: 'metric', + layout: { x: 1, y: 0, w: 1, h: 1 }, + options: { label: 'Active Deals', value: '45', trend: { value: 2.1, direction: 'down', label: 'vs last month' }, icon: 'Briefcase' - }, - layout: { x: 1, y: 0, w: 1, h: 1 } + } }, { type: 'metric', - component: { - type: 'metric', + layout: { x: 2, y: 0, w: 1, h: 1 }, + options: { label: 'Win Rate', value: '68%', trend: { value: 4.3, direction: 'up', label: 'vs last month' }, icon: 'Trophy' - }, - layout: { x: 2, y: 0, w: 1, h: 1 } + } }, { type: 'metric', - component: { - type: 'metric', + layout: { x: 3, y: 0, w: 1, h: 1 }, + options: { label: 'Avg Deal Size', value: '$24,000', trend: { value: 1.2, direction: 'up', label: 'vs last month' }, icon: 'BarChart3' - }, - layout: { x: 3, y: 0, w: 1, h: 1 } + } }, // --- Row 2: Charts --- diff --git a/packages/plugin-form/src/ObjectForm.msw.test.tsx b/packages/plugin-form/src/ObjectForm.msw.test.tsx index ceb92de1c..39ce14fb0 100644 --- a/packages/plugin-form/src/ObjectForm.msw.test.tsx +++ b/packages/plugin-form/src/ObjectForm.msw.test.tsx @@ -7,7 +7,6 @@ import { setupServer } from 'msw/node'; import { http, HttpResponse } from 'msw'; import { registerAllFields } from '@object-ui/fields'; import React from 'react'; -// @ts-expect-error - Import from examples import { ContactObject } from '../../../examples/crm/src/objects/contact.object'; // Register widget renderers diff --git a/packages/plugin-grid/src/ObjectGrid.msw.test.tsx b/packages/plugin-grid/src/ObjectGrid.msw.test.tsx index d4256d4da..de8e42dd2 100644 --- a/packages/plugin-grid/src/ObjectGrid.msw.test.tsx +++ b/packages/plugin-grid/src/ObjectGrid.msw.test.tsx @@ -7,7 +7,6 @@ import { setupServer } from 'msw/node'; import { http, HttpResponse } from 'msw'; import { registerAllFields } from '@object-ui/fields'; import React from 'react'; -// @ts-expect-error - Import from examples import { ContactObject } from '../../../examples/crm/src/objects/contact.object'; registerAllFields();