From 05b6364ae54cf4d8f05ee0ef7cf31725eab70873 Mon Sep 17 00:00:00 2001 From: Pavel Gnedov Date: Fri, 6 Oct 2023 08:26:55 +0700 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D1=8C=20?= =?UTF-8?q?=D0=B2=D0=B8=D0=B4=D0=B6=D0=B5=D1=82=D0=B0=20=D0=B4=D0=B0=D1=88?= =?UTF-8?q?=D0=B1=D0=BE=D1=80=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/dashboard/dashboard-store.tsx | 5 ++--- libs/event-emitter/src/models/dashboard.ts | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) 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; };