diff --git a/frontend/src/dashboard/dashboard-store.tsx b/frontend/src/dashboard/dashboard-store.tsx index fd18fa4..78cca96 100644 --- a/frontend/src/dashboard/dashboard-store.tsx +++ b/frontend/src/dashboard/dashboard-store.tsx @@ -1,9 +1,7 @@ import axios from 'axios'; import { Instance, types } from 'mobx-state-tree'; -type _WidgetParams = { - collapsed?: boolean; -} & Record; +type _WidgetParams = Record | null; export const WidgetParams = types.frozen<_WidgetParams>(); @@ -15,6 +13,7 @@ export const Widget = types.model({ type: types.string, id: types.string, title: types.string, + collapsed: types.maybe(types.boolean), widgetParams: types.maybe(WidgetParams), dataLoaderParams: types.maybe(DataLoaderParams), }); diff --git a/libs/event-emitter/src/models/dashboard.ts b/libs/event-emitter/src/models/dashboard.ts index 8f28995..88e1889 100644 --- a/libs/event-emitter/src/models/dashboard.ts +++ b/libs/event-emitter/src/models/dashboard.ts @@ -11,9 +11,7 @@ export type Dashboard = { /** * Параметры для отрисовки данных */ -export type WidgetParams = { - collapsed?: boolean; -} & Record; +export type WidgetParams = Record | null; /** * Параметры для загрузки данных @@ -24,6 +22,7 @@ export type Widget = { type: string; id: string; title: string; + collapsed?: boolean; widgetParams?: WidgetParams; dataLoaderParams?: DataLoaderParams; };