Skip to content

Modular logistics and supply chain operating system (LSOS)

Update dashboard create and widget-panel templates

Turtuvshin4424ed1754d1
diff --git a/console/app/components/dashboard/create.hbs b/console/app/components/dashboard/create.hbs
index 21e380e2..3505f002 100644
--- a/console/app/components/dashboard/create.hbs
+++ b/console/app/components/dashboard/create.hbs
@@ -1,9 +1,5 @@
<div class="fleetbase-dashboard-grid" ...attributes>
- <GridStack
- @options={{hash float=true animate=true acceptWidgets=true alwaysShowResizeHandle=@isEdit}}
- @onChange={{this.onChangeGrid}}
- @dragInOptions={{hash selector="test" options=(hash appendTo="body" helper="clone")}}
- >
+ <GridStack @options={{hash float=true animate=true acceptWidgets=true alwaysShowResizeHandle=@isEdit}} @onChange={{this.onChangeGrid}}>
{{#each this.args.dashboard.widgets as |widget index|}}
<GridStackItem @options={{widget.grid_options}} class="relative">
{{component widget.component options=widget.options}}
diff --git a/console/app/components/dashboard/widget-panel.hbs b/console/app/components/dashboard/widget-panel.hbs
index 42c9fcd5..9adfb8b4 100644
--- a/console/app/components/dashboard/widget-panel.hbs
+++ b/console/app/components/dashboard/widget-panel.hbs
@@ -1,4 +1,4 @@
-<Overlay @isOpen={{@isOpen}} @onLoad={{this.setOverlayContext}} @position="right" @noBackdrop={{true}} @fullHeight={{true}} @width={{or this.width @width "600px"}}>
+<Overlay @isOpen={{@isOpen}} @onLoad={{this.setOverlayContext}} @position="right" @noBackdrop={{true}} @fullHeight={{true}} @width={{or this.width @width "400px"}}>
<Overlay::Header @title={{"Add widgets"}} @hideStatusDot={{true}} @titleWrapperClass="leading-5">
<div class="flex flex-1 justify-end">
<Button @icon={{"save"}} @type="primary" @text={{"Save Dashboard"}} @onClick={{this.save}} @wrapperClass="mr-2" />
@@ -7,20 +7,18 @@
</Overlay::Header>
<Overlay::Body @wrapperClass="new-service-rate-overlay-body px-4 space-y-4 pt-4" @increaseInnerBodyHeightBy={{1000}}>
- <div class="grid grid-cols-3 gap-1 text-xs dark:text-gray-100">
+ <div class="grid grid-cols-2 gap-1 text-xs dark:text-gray-100">
{{#each this.availableWidgets as |widget|}}
- <GridStackItem @options={{widget.grid_options}}>
- <div
- class="flex flex-col items-center justify-center rounded-lg border border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800 shadow-sm mr-1"
- {{on "click" (fn this.addWidgetToDashboard widget)}}
- >
- {{log this.args}}
- <p class="text-lg font-bold dark:text-gray-100 text-black p-4">
- {{widget.name}}
- widget
- </p>
- </div>
- </GridStackItem>
+ <div
+ class="flex flex-col items-center justify-center rounded-lg border border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800 shadow-sm m-1"
+ {{on "click" (fn this.addWidgetToDashboard widget)}}
+ >
+ {{log this.args}}
+ <p class="text-sm font-bold dark:text-gray-100 text-black p-4">
+ {{widget.name}}
+ widget
+ </p>
+ </div>
{{/each}}
</div>