@fleetbase/fleetops-engine 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon/components/admin/visibility-controls.hbs +12 -0
- package/addon/components/admin/visibility-controls.js +82 -0
- package/addon/components/fleet-panel.js +13 -4
- package/addon/components/fleet-vehicle-listing.hbs +1 -1
- package/addon/components/layout/fleet-ops-sidebar.hbs +26 -0
- package/addon/components/layout/fleet-ops-sidebar.js +129 -0
- package/addon/engine.js +19 -0
- package/addon/helpers/is-section-visible.js +5 -0
- package/addon/routes/application.js +6 -2
- package/addon/routes/virtual.js +10 -0
- package/addon/routes.js +1 -0
- package/addon/templates/application.hbs +1 -19
- package/addon/templates/virtual.hbs +9 -0
- package/app/components/admin/visibility-controls.js +1 -0
- package/app/components/layout/fleet-ops-sidebar.js +1 -0
- package/app/helpers/is-section-visible.js +1 -0
- package/app/routes/virtual.js +1 -0
- package/app/templates/virtual.js +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<ContentPanel @title="Visibility Controls" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
|
2
|
+
<p class="mb-4 dark:text-white text-gray-800">Visibility controls allow you to disable sections of Fleet-Ops. Toggle the checkbox to enable or disable sections to hide in Fleet-ops.</p>
|
|
3
|
+
{{#each this.visibilitySettings as |visibilityControl|}}
|
|
4
|
+
<InputGroup @wrapperClass="mb-1i">
|
|
5
|
+
<Checkbox @value={{visibilityControl.visible}} @label={{concat visibilityControl.name " Visible"}} @onToggle={{fn (mut visibilityControl.visible)}} @helpText="Enable or disable visibility for this section in Fleet-Ops." />
|
|
6
|
+
</InputGroup>
|
|
7
|
+
{{/each}}
|
|
8
|
+
</ContentPanel>
|
|
9
|
+
|
|
10
|
+
<div class="mt-3 flex items-center justify-end">
|
|
11
|
+
<Button @type="primary" @size="lg" @icon="save" @text="Save Changes" @onClick={{this.saveVisibilitySettings}} @disabled={{this.isLoading}} @isLoading={{this.isLoading}} />
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { tracked } from '@glimmer/tracking';
|
|
3
|
+
import { inject as service } from '@ember/service';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { isArray } from '@ember/array';
|
|
6
|
+
|
|
7
|
+
export default class AdminVisibilityControlsComponent extends Component {
|
|
8
|
+
@service fetch;
|
|
9
|
+
@tracked visibilitySettings = [
|
|
10
|
+
{ name: 'Dashboard', route: 'operations.orders', visible: true },
|
|
11
|
+
{ name: 'Service Rates', route: 'operations.service-rates', visible: true },
|
|
12
|
+
{ name: 'Drivers', route: 'management.drivers', visible: true },
|
|
13
|
+
{ name: 'Vehicles', route: 'management.vehicles', visible: true },
|
|
14
|
+
{ name: 'Fleets', route: 'management.fleets', visible: true },
|
|
15
|
+
{ name: 'Vendors', route: 'management.vendors', visible: true },
|
|
16
|
+
{ name: 'Contacts', route: 'management.contacts', visible: true },
|
|
17
|
+
{ name: 'Places', route: 'management.places', visible: true },
|
|
18
|
+
{ name: 'Fuel Reports', route: 'management.fuel-reports', visible: true },
|
|
19
|
+
{ name: 'Issues', route: 'management.issues', visible: true },
|
|
20
|
+
];
|
|
21
|
+
@tracked isLoading = false;
|
|
22
|
+
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.loadVisibilitySettings();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@action mutateVisibility(route, visible) {
|
|
29
|
+
this.visibilitySettings = [...this.visibilitySettings].map((visibilityControl) => {
|
|
30
|
+
if (visibilityControl.route === route) {
|
|
31
|
+
return {
|
|
32
|
+
...visibilityControl,
|
|
33
|
+
visible,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return visibilityControl;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@action loadVisibilitySettings() {
|
|
42
|
+
this.isLoading = true;
|
|
43
|
+
|
|
44
|
+
this.fetch
|
|
45
|
+
.get('fleet-ops/settings/visibility')
|
|
46
|
+
.then(({ visibilitySettings }) => {
|
|
47
|
+
if (isArray(visibilitySettings)) {
|
|
48
|
+
for (let i = 0; i < visibilitySettings.length; i++) {
|
|
49
|
+
const visibilityControl = visibilitySettings.objectAt(i);
|
|
50
|
+
this.mutateVisibility(visibilityControl.route, visibilityControl.visible);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
.catch((error) => {
|
|
55
|
+
this.notifications.serverError(error);
|
|
56
|
+
})
|
|
57
|
+
.finally(() => {
|
|
58
|
+
this.isLoading = false;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@action saveVisibilitySettings() {
|
|
63
|
+
this.isLoading = true;
|
|
64
|
+
|
|
65
|
+
this.fetch
|
|
66
|
+
.post('fleet-ops/settings/visibility', { visibilitySettings: this.visibilitySettings })
|
|
67
|
+
.then(({ visibilitySettings }) => {
|
|
68
|
+
if (isArray(visibilitySettings)) {
|
|
69
|
+
for (let i = 0; i < visibilitySettings.length; i++) {
|
|
70
|
+
const visibilityControl = visibilitySettings.objectAt(i);
|
|
71
|
+
this.mutateVisibility(visibilityControl.route, visibilityControl.visible);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
.catch((error) => {
|
|
76
|
+
this.notifications.serverError(error);
|
|
77
|
+
})
|
|
78
|
+
.finally(() => {
|
|
79
|
+
this.isLoading = false;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -6,6 +6,7 @@ import { inject as service } from '@ember/service';
|
|
|
6
6
|
export default class FleetPanelComponent extends Component {
|
|
7
7
|
@service fetch;
|
|
8
8
|
@service modalsManager;
|
|
9
|
+
@service universe;
|
|
9
10
|
@service store;
|
|
10
11
|
@service fetch;
|
|
11
12
|
@tracked currentTab;
|
|
@@ -26,18 +27,26 @@ export default class FleetPanelComponent extends Component {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
@action addDriver(driver) {
|
|
29
|
-
this.fetch.post('fleets/assign-driver', { driver: driver.id, fleet: this.fleet.id })
|
|
30
|
+
this.fetch.post('fleets/assign-driver', { driver: driver.id, fleet: this.fleet.id }).then(() => {
|
|
31
|
+
this.universe.trigger('fleet.driver.assigned', this.fleet, driver);
|
|
32
|
+
});
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
@action removeDriver(driver) {
|
|
33
|
-
this.fetch.post('fleets/remove-driver', { driver: driver.id, fleet: this.fleet.id })
|
|
36
|
+
this.fetch.post('fleets/remove-driver', { driver: driver.id, fleet: this.fleet.id }).then(() => {
|
|
37
|
+
this.universe.trigger('fleet.driver.unassigned', this.fleet, driver);
|
|
38
|
+
});
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
@action addVehicle(vehicle) {
|
|
37
|
-
this.fetch.post('fleets/assign-vehicle', { vehicle: vehicle.id, fleet: this.fleet.id })
|
|
42
|
+
this.fetch.post('fleets/assign-vehicle', { vehicle: vehicle.id, fleet: this.fleet.id }).then(() => {
|
|
43
|
+
this.universe.trigger('fleet.vehicle.assigned', this.fleet, vehicle);
|
|
44
|
+
});
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
@action removeVehicle(vehicle) {
|
|
41
|
-
this.fetch.post('fleets/remove-vehicle', { vehicle: vehicle.id, fleet: this.fleet.id })
|
|
48
|
+
this.fetch.post('fleets/remove-vehicle', { vehicle: vehicle.id, fleet: this.fleet.id }).then(() => {
|
|
49
|
+
this.universe.trigger('fleet.vehicle.unassigned', this.fleet, vehicle);
|
|
50
|
+
});
|
|
42
51
|
}
|
|
43
52
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<div class="fleet-vehicle-listing" {{did-insert this.setupComponent}} ...attributes>
|
|
2
2
|
<div class="mb-2 flex items-center justify-between">
|
|
3
3
|
<div class="flex items-center">
|
|
4
4
|
<div class="fleet-vehicle-listing-search">
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<div class="mb-2">
|
|
2
|
+
<Button @text="Create new order" @type="primary" @size="xs" @icon="paper-plane" @iconPrefix="fas" @iconSize="sm" @wrapperClass="w-full" class="w-full" @onClick={{this.onClickCreateOrder}} />
|
|
3
|
+
</div>
|
|
4
|
+
{{#each this.universeMenuItems as |menuItem|}}
|
|
5
|
+
{{#if menuItem.renderComponentInPlace}}
|
|
6
|
+
{{component menuItem.component}}
|
|
7
|
+
{{else}}
|
|
8
|
+
<Layout::Sidebar::Item @onClick={{fn this.universe.transitionMenuItem (concat this.routePrefix "virtual") menuItem}} @item={{menuItem}} @icon={{menuItem.icon}}>{{menuItem.title}}</Layout::Sidebar::Item>
|
|
9
|
+
{{/if}}
|
|
10
|
+
{{/each}}
|
|
11
|
+
{{#each this.menuPanels as |menuPanel|}}
|
|
12
|
+
<Layout::Sidebar::Panel @open={{menuPanel.open}} @title={{menuPanel.title}}>
|
|
13
|
+
{{#each menuPanel.items as |item|}}
|
|
14
|
+
<Layout::Sidebar::Item @route={{concat this.routePrefix item.route}} @icon={{item.icon}}>{{item.title}}</Layout::Sidebar::Item>
|
|
15
|
+
{{/each}}
|
|
16
|
+
</Layout::Sidebar::Panel>
|
|
17
|
+
{{/each}}
|
|
18
|
+
{{#each this.universeMenuPanels as |menuPanel|}}
|
|
19
|
+
<Layout::Sidebar::Panel @open={{menuPanel.open}} @title={{menuPanel.title}}>
|
|
20
|
+
{{#each menuPanel.items as |menuItem|}}
|
|
21
|
+
<Layout::Sidebar::Item @onClick={{fn this.universe.transitionMenuItem (concat this.routePrefix "virtual") menuItem}} @item={{menuItem}} @icon={{menuItem.icon}}>{{menuItem.title}}</Layout::Sidebar::Item>
|
|
22
|
+
{{/each}}
|
|
23
|
+
</Layout::Sidebar::Panel>
|
|
24
|
+
{{/each}}
|
|
25
|
+
<Layout::Sidebar::Item @onClick={{this.onClickSettings}} @icon="cogs">Settings</Layout::Sidebar::Item>
|
|
26
|
+
{{yield}}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { tracked } from '@glimmer/tracking';
|
|
3
|
+
import { inject as service } from '@ember/service';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { isArray } from '@ember/array';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* LayoutFleetOpsSidebarComponent
|
|
9
|
+
*
|
|
10
|
+
* This component manages the sidebar layout for Fleet Ops, including visibility and actions.
|
|
11
|
+
*/
|
|
12
|
+
export default class LayoutFleetOpsSidebarComponent extends Component {
|
|
13
|
+
@service universe;
|
|
14
|
+
@tracked routePrefix = 'console.fleet-ops.';
|
|
15
|
+
@tracked menuPanels = [];
|
|
16
|
+
@tracked universeMenuItems = [];
|
|
17
|
+
@tracked universeMenuPanels = [];
|
|
18
|
+
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.createMenuItemsFromUniverseRegistry();
|
|
22
|
+
this.createMenuPanels();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
createMenuItemsFromUniverseRegistry() {
|
|
26
|
+
this.universeMenuItems = this.universe.getMenuItemsFromRegistry('engine:fleet-ops');
|
|
27
|
+
this.universeMenuPanels = this.universe.getMenuPanelsFromRegistry('engine:fleet-ops');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Initialize menu panels with visibility settings.
|
|
32
|
+
*/
|
|
33
|
+
createMenuPanels() {
|
|
34
|
+
const operationsItems = [
|
|
35
|
+
{ title: 'Dashboard', icon: 'home', route: 'operations.orders' },
|
|
36
|
+
{ title: 'Service Rates', icon: 'file-invoice-dollar', route: 'operations.service-rates' },
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
const resourcesItems = [
|
|
40
|
+
{ title: 'Drivers', icon: 'route', route: 'management.drivers' },
|
|
41
|
+
{ title: 'Vehicles', icon: 'truck', route: 'management.vehicles' },
|
|
42
|
+
{ title: 'Fleets', icon: 'user-group', route: 'management.fleets' },
|
|
43
|
+
{ title: 'Vendors', icon: 'warehouse', route: 'management.vendors' },
|
|
44
|
+
{ title: 'Contacts', icon: 'address-book', route: 'management.contacts' },
|
|
45
|
+
{ title: 'Places', icon: 'location-dot', route: 'management.places' },
|
|
46
|
+
{ title: 'Fuel Reports', icon: 'gas-pump', route: 'management.fuel-reports' },
|
|
47
|
+
{ title: 'Issues', icon: 'triangle-exclamation', route: 'management.issues' },
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
const createPanel = (title, routePrefix, items = []) => ({
|
|
51
|
+
title,
|
|
52
|
+
open: true,
|
|
53
|
+
visible: this.isPanelVisible(routePrefix),
|
|
54
|
+
items: items
|
|
55
|
+
.map((item) => ({
|
|
56
|
+
...item,
|
|
57
|
+
visible: this.isItemVisible(item.route),
|
|
58
|
+
}))
|
|
59
|
+
.filter((item) => item.visible),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
this.menuPanels = [createPanel('Operations', 'operations', operationsItems), createPanel('Resources', 'management', resourcesItems)].filter((panel) => {
|
|
63
|
+
const isVisible = panel.visible && panel.items.length > 0;
|
|
64
|
+
return isVisible;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Check if a panel should be visible based on visibility settings.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} routePrefix - The route prefix to check for visibility.
|
|
72
|
+
* @returns {boolean} - Whether the panel should be visible.
|
|
73
|
+
*/
|
|
74
|
+
isPanelVisible(routePrefix) {
|
|
75
|
+
return this.isVisible(routePrefix, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Check if a menu item should be visible based on visibility settings.
|
|
80
|
+
*
|
|
81
|
+
* @param {string} routePrefix - The route prefix to check for visibility.
|
|
82
|
+
* @returns {boolean} - Whether the menu item should be visible.
|
|
83
|
+
*/
|
|
84
|
+
isItemVisible(routePrefix) {
|
|
85
|
+
return this.isVisible(routePrefix, true);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Utility function to check visibility based on route prefix.
|
|
90
|
+
*
|
|
91
|
+
* @param {string} routePrefix - The route prefix to check for visibility.
|
|
92
|
+
* @param {boolean} exactMatch - Whether to match the route exactly or just the prefix.
|
|
93
|
+
* @returns {boolean} - Whether the item should be visible.
|
|
94
|
+
*/
|
|
95
|
+
isVisible(routePrefix, exactMatch) {
|
|
96
|
+
const { visibilitySettings } = this.args;
|
|
97
|
+
|
|
98
|
+
if (!isArray(visibilitySettings)) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return visibilitySettings.some((visibilityControl) => {
|
|
103
|
+
const match = exactMatch ? visibilityControl.route === routePrefix : visibilityControl.route.startsWith(routePrefix);
|
|
104
|
+
return match && visibilityControl.visible;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Action handler for creating an order.
|
|
110
|
+
*/
|
|
111
|
+
@action onClickCreateOrder() {
|
|
112
|
+
const { onClickCreateOrder } = this.args;
|
|
113
|
+
|
|
114
|
+
if (typeof onClickCreateOrder === 'function') {
|
|
115
|
+
onClickCreateOrder();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Action handler for opening settings.
|
|
121
|
+
*/
|
|
122
|
+
@action onClickSettings() {
|
|
123
|
+
const { onClickSettings } = this.args;
|
|
124
|
+
|
|
125
|
+
if (typeof onClickSettings === 'function') {
|
|
126
|
+
onClickSettings();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
package/addon/engine.js
CHANGED
|
@@ -3,6 +3,7 @@ import loadInitializers from 'ember-load-initializers';
|
|
|
3
3
|
import Resolver from 'ember-resolver';
|
|
4
4
|
import config from './config/environment';
|
|
5
5
|
import services from '@fleetbase/ember-core/exports/services';
|
|
6
|
+
import AdminVisibilityControlsComponent from './components/admin/visibility-controls';
|
|
6
7
|
|
|
7
8
|
const { modulePrefix } = config;
|
|
8
9
|
const externalRoutes = ['console', 'extensions'];
|
|
@@ -18,6 +19,24 @@ export default class FleetOpsEngine extends Engine {
|
|
|
18
19
|
// register menu item in header
|
|
19
20
|
universe.registerHeaderMenuItem('Fleet-Ops', 'console.fleet-ops', { icon: 'route', priority: 0 });
|
|
20
21
|
|
|
22
|
+
// register admin settings -- create a fleet-ops menu panel with it's own setting options
|
|
23
|
+
universe.registerAdminMenuPanel(
|
|
24
|
+
'Fleet-Ops Config',
|
|
25
|
+
[
|
|
26
|
+
{
|
|
27
|
+
title: 'Visibility Controls',
|
|
28
|
+
icon: 'eye',
|
|
29
|
+
component: AdminVisibilityControlsComponent,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
{
|
|
33
|
+
slug: 'fleet-ops',
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
// create primary registry for engine
|
|
38
|
+
universe.createRegistry('engine:fleet-ops');
|
|
39
|
+
|
|
21
40
|
// register the vehicle panel
|
|
22
41
|
universe.createRegistry('component:vehicle-panel');
|
|
23
42
|
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import Route from '@ember/routing/route';
|
|
2
2
|
import { inject as service } from '@ember/service';
|
|
3
|
-
import { action } from '@ember/object';
|
|
4
3
|
|
|
5
4
|
export default class ApplicationRoute extends Route {
|
|
6
5
|
@service loader;
|
|
6
|
+
@service fetch;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
loading(transition) {
|
|
9
9
|
const resourceName = this.getResouceName(transition);
|
|
10
10
|
this.loader.showOnInitialTransition(transition, 'section.next-view-section', resourceName ? `Loading ${resourceName}...` : `Loading...`);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
model() {
|
|
14
|
+
return this.fetch.get('fleet-ops/settings/visibility');
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
getResouceName(transition) {
|
|
14
18
|
const { to } = transition;
|
|
15
19
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Route from '@ember/routing/route';
|
|
2
|
+
import { inject as service } from '@ember/service';
|
|
3
|
+
|
|
4
|
+
export default class VirtualRoute extends Route {
|
|
5
|
+
@service universe;
|
|
6
|
+
|
|
7
|
+
model({ slug, view }) {
|
|
8
|
+
return this.universe.lookupMenuItemFromRegistry('engine:fleet-ops', slug, view);
|
|
9
|
+
}
|
|
10
|
+
}
|
package/addon/routes.js
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
<EmberWormhole @to="sidebar-menu-items">
|
|
2
|
-
<
|
|
3
|
-
<Button @text="Create new order" @type="primary" @size="xs" @icon="paper-plane" @iconPrefix="fas" @iconSize="sm" @wrapperClass="w-full" class="w-full" @onClick={{this.createOrder}} />
|
|
4
|
-
</div>
|
|
5
|
-
<Layout::Sidebar::Panel @open={{true}} @title="Operations">
|
|
6
|
-
<Layout::Sidebar::Item @route="console.fleet-ops.operations.orders" @icon="home">Dashboard</Layout::Sidebar::Item>
|
|
7
|
-
{{!-- <Layout::Sidebar::Item @route="console.fleet-ops.operations.scheduler" @icon="calendar-day">Scheduler</Layout::Sidebar::Item> --}}
|
|
8
|
-
<Layout::Sidebar::Item @route="console.fleet-ops.operations.service-rates" @icon="file-invoice-dollar">Service Rates</Layout::Sidebar::Item>
|
|
9
|
-
</Layout::Sidebar::Panel>
|
|
10
|
-
<Layout::Sidebar::Panel @open={{true}} @title="Resources">
|
|
11
|
-
<Layout::Sidebar::Item @route="console.fleet-ops.management.drivers" @icon="route">Drivers</Layout::Sidebar::Item>
|
|
12
|
-
<Layout::Sidebar::Item @route="console.fleet-ops.management.vehicles" @icon="truck">Vehicles</Layout::Sidebar::Item>
|
|
13
|
-
<Layout::Sidebar::Item @route="console.fleet-ops.management.fleets" @icon="user-group">Fleets</Layout::Sidebar::Item>
|
|
14
|
-
<Layout::Sidebar::Item @route="console.fleet-ops.management.vendors" @icon="warehouse">Vendors</Layout::Sidebar::Item>
|
|
15
|
-
<Layout::Sidebar::Item @route="console.fleet-ops.management.contacts" @icon="address-book">Contacts</Layout::Sidebar::Item>
|
|
16
|
-
<Layout::Sidebar::Item @route="console.fleet-ops.management.places" @icon="location-dot">Places</Layout::Sidebar::Item>
|
|
17
|
-
<Layout::Sidebar::Item @route="console.fleet-ops.management.fuel-reports" @icon="gas-pump">Fuel Reports</Layout::Sidebar::Item>
|
|
18
|
-
<Layout::Sidebar::Item @route="console.fleet-ops.management.issues" @icon="triangle-exclamation">Issues</Layout::Sidebar::Item>
|
|
19
|
-
</Layout::Sidebar::Panel>
|
|
20
|
-
<Layout::Sidebar::Item @onClick={{this.toggleSettings}} @icon="cogs">Settings</Layout::Sidebar::Item>
|
|
2
|
+
<Layout::FleetOpsSidebar @visibilitySettings={{@model.visibilitySettings}} @onClickCreateOrder={{this.createOrder}} @onClickSettings={{this.toggleSettings}} />
|
|
21
3
|
</EmberWormhole>
|
|
22
4
|
|
|
23
5
|
<Layout::Section::Container>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<Layout::Section::Header @title={{@model.title}} />
|
|
2
|
+
|
|
3
|
+
<Layout::Section::Body class="overflow-y-scroll h-full">
|
|
4
|
+
<div class="container mx-auto h-screen" {{increase-height-by 300}}>
|
|
5
|
+
<div class="max-w-3xl my-10 mx-auto space-y-">
|
|
6
|
+
{{component @model.component params=@model.componentParams}}
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
</Layout::Section::Body>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@fleetbase/fleetops-engine/components/admin/visibility-controls';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@fleetbase/fleetops-engine/components/layout/fleet-ops-sidebar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@fleetbase/fleetops-engine/helpers/is-section-visible';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@fleetbase/fleetops-engine/routes/virtual';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@fleetbase/fleetops-engine/templates/virtual';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetbase/fleetops-engine",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Fleetbase Fleet-Ops extension provides a fleet management and last mile delivery operations system module.",
|
|
5
5
|
"fleetbase": {
|
|
6
6
|
"route": "fleet-ops",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"publish:github": "npm config set '@fleetbase:registry' https://npm.pkg.github.com/ && npm publish"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@fleetbase/ember-core": "^0.1.
|
|
43
|
-
"@fleetbase/ember-ui": "^0.
|
|
44
|
-
"@fleetbase/fleetops-data": "^0.1.
|
|
42
|
+
"@fleetbase/ember-core": "^0.1.4",
|
|
43
|
+
"@fleetbase/ember-ui": "^0.2.0",
|
|
44
|
+
"@fleetbase/fleetops-data": "^0.1.1",
|
|
45
45
|
"@fleetbase/leaflet-routing-machine": "^3.2.16",
|
|
46
46
|
"@fortawesome/ember-fontawesome": "^0.4.1",
|
|
47
47
|
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|