From 4f86a33e180e855d10e1467c5ba0e188dc684ec3 Mon Sep 17 00:00:00 2001 From: Eric Trousset Date: Mon, 29 Apr 2024 12:57:42 +0200 Subject: [PATCH] added missing Sample Widget files --- apps/web/src/appDefinition.ts | 23 +-- .../widgets/sample-widget/SampleWidget.vue | 131 ++++++++++++++++++ .../sample-widget/SampleWidgetForm.vue | 53 +++++++ .../sample-widget/SampleWidgetSettings.ts | 3 + 4 files changed, 190 insertions(+), 20 deletions(-) create mode 100644 apps/web/src/widgets/sample-widget/SampleWidget.vue create mode 100644 apps/web/src/widgets/sample-widget/SampleWidgetForm.vue create mode 100644 apps/web/src/widgets/sample-widget/SampleWidgetSettings.ts diff --git a/apps/web/src/appDefinition.ts b/apps/web/src/appDefinition.ts index 8eb413e..97de0ec 100644 --- a/apps/web/src/appDefinition.ts +++ b/apps/web/src/appDefinition.ts @@ -10,7 +10,6 @@ import { import BulkImport from '~/views/bulkImport/BulkImport.vue'; import SampleWidget from '~/widgets/sample-widget/SampleWidget.vue'; import SampleWidgetForm from '~/widgets/sample-widget/SampleWidgetForm.vue'; -// import CatalogList from '~/views/catalog/CatalogList.vue'; const admin = IoTPlatformChunks.find((chunk) => chunk.name === 'admin'); if (admin?.children !== undefined) { @@ -44,30 +43,14 @@ if (admin?.children !== undefined) { export const appDefinitions: AppChunk[] = [ ...IoTPlatformChunks, - // { - // name: 'catalog', - // label: 'locales.sidebar.catalog', - // icon: faBookmark, - // vuejsRoute: { - // path: '/catalog', - // component: KRouteWrapper, - // children: [ - // { - // path: '', - // name: 'catalog', - // component: CatalogList, - // }, - // ], - // }, - // }, ]; export const dashboardWidgets: DashboardWidget[] = [ { - name: 'pie', - label: 'locales.widget.pie.label', + name: 'sample-widget', + label: 'My Sample Widget', // TODO : i18n component: SampleWidget, formComponent:SampleWidgetForm, - icon: 'chart-pie', + icon: 'face-meh', }, ]; diff --git a/apps/web/src/widgets/sample-widget/SampleWidget.vue b/apps/web/src/widgets/sample-widget/SampleWidget.vue new file mode 100644 index 0000000..2c108ba --- /dev/null +++ b/apps/web/src/widgets/sample-widget/SampleWidget.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/apps/web/src/widgets/sample-widget/SampleWidgetForm.vue b/apps/web/src/widgets/sample-widget/SampleWidgetForm.vue new file mode 100644 index 0000000..12f37d6 --- /dev/null +++ b/apps/web/src/widgets/sample-widget/SampleWidgetForm.vue @@ -0,0 +1,53 @@ + + + diff --git a/apps/web/src/widgets/sample-widget/SampleWidgetSettings.ts b/apps/web/src/widgets/sample-widget/SampleWidgetSettings.ts new file mode 100644 index 0000000..4acd1e2 --- /dev/null +++ b/apps/web/src/widgets/sample-widget/SampleWidgetSettings.ts @@ -0,0 +1,3 @@ +export interface SampleWidgetSettingsType { + buckettingField: string; + } \ No newline at end of file