Modular logistics and supply chain operating system (LSOS)
JavaScript driver-appfleet-managementfreight-managementinfrastructureinventory-managementlast-mile-deliverylogisticsondemandopen-sourceorder-managementroute-optimizationsupply-chain-managementtracking-and-monitoringtransport-management-systemtransportationwarehouse-management
disabled to resize without editing
Turtuvshinbac95cca0054
diff --git a/console/app/components/dashboard/create.hbs b/console/app/components/dashboard/create.hbsindex a6340040..0db85942 100644--- a/console/app/components/dashboard/create.hbs+++ b/console/app/components/dashboard/create.hbs@@ -1,5 +1,5 @@<div class="fleetbase-dashboard-grid" ...attributes>- <GridStack @options={{hash float=true animate=true acceptWidgets=true alwaysShowResizeHandle=@isEdit}} @onChange={{this.onChangeGrid}}>+ <GridStack @options={{this.gridOptions}} @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/create.js b/console/app/components/dashboard/create.jsindex b3990571..719d1e50 100644--- a/console/app/components/dashboard/create.js+++ b/console/app/components/dashboard/create.js@@ -1,4 +1,4 @@-import { action } from '@ember/object';+import { action, computed } from '@ember/object';import Component from '@glimmer/component';import { tracked } from '@glimmer/tracking';@@ -30,4 +30,17 @@ export default class DashboardCreateComponent extends Component {@action removeWidget(widget) {this.args.dashboard.removeWidget(widget.id);}++ @computed('args.isEdit')+ get gridOptions() {+ return {+ float: true,+ animate: true,+ acceptWidgets: true,+ alwaysShowResizeHandle: this.args.isEdit,+ disableDrag: !this.args.isEdit,+ disableResize: !this.args.isEdit,+ resizable: { handles: 'n,ne,e,se,s,sw,w,nw' },+ };+ }}