@fleetbase/fleetops-engine 0.4.12 → 0.4.14
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/avatar-management.hbs +78 -0
- package/addon/components/admin/avatar-management.js +191 -0
- package/addon/components/avatar-picker.hbs +15 -0
- package/addon/components/avatar-picker.js +57 -0
- package/addon/components/driver-form-panel.hbs +12 -13
- package/addon/components/driver-panel/details.hbs +7 -7
- package/addon/components/edit-order-route-panel.hbs +9 -69
- package/addon/components/edit-order-route-panel.js +78 -27
- package/addon/components/fleet-listing-panel.hbs +1 -1
- package/addon/components/layout/fleet-ops-sidebar/driver-listing.hbs +1 -1
- package/addon/components/layout/fleet-ops-sidebar.hbs +2 -1
- package/addon/components/live-map.js +0 -1
- package/addon/components/order/schedule-card.hbs +29 -17
- package/addon/components/order/schedule-card.js +1 -1
- package/addon/components/place-form-panel.hbs +35 -51
- package/addon/components/place-panel/details.hbs +10 -14
- package/addon/components/place-panel.hbs +2 -12
- package/addon/components/vehicle-form-panel.hbs +11 -80
- package/addon/components/vehicle-form-panel.js +33 -0
- package/addon/controllers/management/places/index.js +29 -21
- package/addon/controllers/operations/orders/index/view.js +10 -10
- package/addon/controllers/operations/scheduler/index.js +7 -4
- package/addon/engine.js +7 -1
- package/addon/styles/fleetops-engine.css +94 -0
- package/addon/templates/management/places/index.hbs +1 -1
- package/addon/templates/operations/scheduler/index.hbs +5 -4
- package/addon/utils/create-full-calendar-event-from-order.js +23 -1
- package/app/components/admin/avatar-management.js +1 -0
- package/app/components/avatar-picker.js +1 -0
- package/composer.json +2 -2
- package/config/environment.js +2 -0
- package/extension.json +1 -1
- package/package.json +3 -3
- package/server/migrations/2023_09_14_074512_update_vehicles_table.php +2 -2
- package/server/migrations/2023_09_14_074619_create_vehicle_devices_table.php +2 -2
- package/server/migrations/2023_09_26_071205_add_online_column_to_vehicles_table.php +2 -2
- package/server/migrations/2023_09_26_083957_create_fleet_vehicles_table.php +2 -2
- package/server/migrations/2023_09_27_023757_add_column_to_fleets_table.php +2 -2
- package/server/migrations/2023_10_05_074811_update_vehicle.php +2 -2
- package/server/migrations/2023_10_25_093014_create_vehicle_device_events_table.php +2 -2
- package/server/migrations/2023_11_03_072503_refactor_issues_table_columns.php +2 -2
- package/server/migrations/2023_11_06_040645_refactor_fuel_reports_table.php +2 -2
- package/server/migrations/2023_11_09_041807_add_status_column_to_fuel_reports_table.php +2 -2
- package/server/migrations/2023_11_15_062814_add_comments_column_and_resolved_at_column_to_vehicle_device_events_table.php +2 -2
- package/server/migrations/2023_11_17_053001_add_category_uuid_to_entities_table.php +2 -2
- package/server/migrations/2023_11_28_074244_add_supplier_uuid_column_to_entities_table.php +2 -2
- package/server/migrations/{2023_12_14_100209_add_meta_column_on_driver_table.php → 2023_12_14_100209_add_meta_column_on_driver_table copy.php } +10 -4
- package/server/migrations/2024_02_18_100209_add_avatar_url_columns_table.php +54 -0
- package/server/src/Expansions/UserExpansion.php +1 -0
- package/server/src/Http/Controllers/Api/v1/DriverController.php +7 -1
- package/server/src/Http/Controllers/Api/v1/PlaceController.php +11 -2
- package/server/src/Http/Controllers/Internal/v1/DriverController.php +15 -8
- package/server/src/Http/Controllers/Internal/v1/OrderController.php +46 -0
- package/server/src/Http/Controllers/Internal/v1/PlaceController.php +12 -0
- package/server/src/Http/Resources/v1/Driver.php +6 -4
- package/server/src/Http/Resources/v1/Order.php +2 -1
- package/server/src/Http/Resources/v1/Payload.php +8 -4
- package/server/src/Http/Resources/v1/Place.php +2 -0
- package/server/src/Http/Resources/v1/Vehicle.php +1 -0
- package/server/src/Models/Driver.php +76 -0
- package/server/src/Models/Payload.php +49 -3
- package/server/src/Models/Place.php +71 -0
- package/server/src/Models/Vehicle.php +44 -20
- package/server/src/Notifications/OrderAssigned.php +2 -0
- package/server/src/routes.php +3 -0
- package/translations/en-us.yaml +16 -4
|
@@ -85,6 +85,33 @@ export default class VehicleFormPanelComponent extends Component {
|
|
|
85
85
|
contextComponentCallback(this, 'onLoad', ...arguments);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Updates the avatar URL based on the provided option.
|
|
90
|
+
*
|
|
91
|
+
* @action
|
|
92
|
+
* @param {Object} option - The option containing key and value properties.
|
|
93
|
+
* @param {string} option.key - The key indicating the type of avatar (e.g., 'custom_avatar').
|
|
94
|
+
* @param {string} option.value - The URL or value associated with the avatar.
|
|
95
|
+
* @memberof VehicleFormPanelComponent
|
|
96
|
+
*/
|
|
97
|
+
@action updateAvatarUrl(option) {
|
|
98
|
+
if (option.key === 'custom_avatar') {
|
|
99
|
+
this.vehicle.avatar_url = option.value;
|
|
100
|
+
} else {
|
|
101
|
+
this.vehicle.avatar_url = [option.value];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Updates the selected image URL.
|
|
107
|
+
*
|
|
108
|
+
* @action
|
|
109
|
+
* @param {string} url - The URL of the selected image.
|
|
110
|
+
*/
|
|
111
|
+
@action updateSelectedImage(url) {
|
|
112
|
+
this.vehicle.avatar_url = url;
|
|
113
|
+
}
|
|
114
|
+
|
|
88
115
|
/**
|
|
89
116
|
* Saves the vehicle changes.
|
|
90
117
|
*
|
|
@@ -167,6 +194,12 @@ export default class VehicleFormPanelComponent extends Component {
|
|
|
167
194
|
return contextComponentCallback(this, 'onPressCancel', this.vehicle);
|
|
168
195
|
}
|
|
169
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Handle autocomplete callback
|
|
199
|
+
*
|
|
200
|
+
* @param {AutocompleteEvent} { location }
|
|
201
|
+
* @memberof VehicleFormPanelComponent
|
|
202
|
+
*/
|
|
170
203
|
@action onAutocomplete({ location }) {
|
|
171
204
|
if (location) {
|
|
172
205
|
this.vehicle.setProperties({ location });
|
|
@@ -148,9 +148,11 @@ export default class ManagementPlacesIndexController extends BaseController {
|
|
|
148
148
|
{
|
|
149
149
|
label: this.intl.t('fleet-ops.common.name'),
|
|
150
150
|
valuePath: 'name',
|
|
151
|
-
width: '
|
|
151
|
+
width: '180px',
|
|
152
152
|
cellComponent: 'table/cell/anchor',
|
|
153
|
+
cellClassNames: 'uppercase',
|
|
153
154
|
action: this.viewPlace,
|
|
155
|
+
hidden: true,
|
|
154
156
|
resizable: true,
|
|
155
157
|
sortable: true,
|
|
156
158
|
filterable: true,
|
|
@@ -170,23 +172,23 @@ export default class ManagementPlacesIndexController extends BaseController {
|
|
|
170
172
|
filterComponent: 'filter/string',
|
|
171
173
|
},
|
|
172
174
|
{
|
|
173
|
-
label: this.intl.t('fleet-ops.common.
|
|
174
|
-
valuePath: '
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
width: '100px',
|
|
175
|
+
label: this.intl.t('fleet-ops.common.id'),
|
|
176
|
+
valuePath: 'public_id',
|
|
177
|
+
width: '120px',
|
|
178
|
+
cellComponent: 'click-to-copy',
|
|
178
179
|
resizable: true,
|
|
179
180
|
sortable: true,
|
|
180
181
|
filterable: true,
|
|
181
|
-
filterParam: 'state',
|
|
182
182
|
filterComponent: 'filter/string',
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
label: this.intl.t('fleet-ops.common.city'),
|
|
186
186
|
valuePath: 'city',
|
|
187
187
|
cellComponent: 'table/cell/anchor',
|
|
188
|
+
cellClassNames: 'uppercase',
|
|
188
189
|
action: this.viewPlace,
|
|
189
190
|
width: '100px',
|
|
191
|
+
hidden: true,
|
|
190
192
|
resizable: true,
|
|
191
193
|
sortable: true,
|
|
192
194
|
filterable: true,
|
|
@@ -194,23 +196,27 @@ export default class ManagementPlacesIndexController extends BaseController {
|
|
|
194
196
|
filterComponent: 'filter/string',
|
|
195
197
|
},
|
|
196
198
|
{
|
|
197
|
-
label: this.intl.t('fleet-ops.common.
|
|
198
|
-
valuePath: '
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
label: this.intl.t('fleet-ops.common.state'),
|
|
200
|
+
valuePath: 'state',
|
|
201
|
+
cellComponent: 'table/cell/anchor',
|
|
202
|
+
cellClassNames: 'uppercase',
|
|
203
|
+
action: this.viewPlace,
|
|
204
|
+
width: '100px',
|
|
205
|
+
hidden: true,
|
|
201
206
|
resizable: true,
|
|
202
207
|
sortable: true,
|
|
203
208
|
filterable: true,
|
|
209
|
+
filterParam: 'state',
|
|
204
210
|
filterComponent: 'filter/string',
|
|
205
211
|
},
|
|
206
212
|
{
|
|
207
|
-
label: this.intl.t('fleet-ops.common.
|
|
208
|
-
valuePath: '
|
|
209
|
-
cellComponent: 'table/cell/
|
|
210
|
-
|
|
213
|
+
label: this.intl.t('fleet-ops.common.postal-code'),
|
|
214
|
+
valuePath: 'postal_code',
|
|
215
|
+
cellComponent: 'table/cell/anchor',
|
|
216
|
+
action: this.viewPlace,
|
|
217
|
+
width: '100px',
|
|
211
218
|
resizable: true,
|
|
212
219
|
sortable: true,
|
|
213
|
-
hidden: true,
|
|
214
220
|
filterable: true,
|
|
215
221
|
filterComponent: 'filter/string',
|
|
216
222
|
},
|
|
@@ -230,8 +236,10 @@ export default class ManagementPlacesIndexController extends BaseController {
|
|
|
230
236
|
label: this.intl.t('fleet-ops.common.neighborhood'),
|
|
231
237
|
valuePath: 'neighborhood',
|
|
232
238
|
cellComponent: 'table/cell/anchor',
|
|
239
|
+
cellClassNames: 'uppercase',
|
|
233
240
|
action: this.viewPlace,
|
|
234
241
|
width: '100px',
|
|
242
|
+
hidden: true,
|
|
235
243
|
resizable: true,
|
|
236
244
|
sortable: true,
|
|
237
245
|
filterable: true,
|
|
@@ -239,11 +247,11 @@ export default class ManagementPlacesIndexController extends BaseController {
|
|
|
239
247
|
filterComponent: 'filter/string',
|
|
240
248
|
},
|
|
241
249
|
{
|
|
242
|
-
label: this.intl.t('fleet-ops.common.
|
|
243
|
-
valuePath: '
|
|
244
|
-
cellComponent: 'table/cell/
|
|
245
|
-
|
|
246
|
-
|
|
250
|
+
label: this.intl.t('fleet-ops.common.phone'),
|
|
251
|
+
valuePath: 'phone',
|
|
252
|
+
cellComponent: 'table/cell/base',
|
|
253
|
+
width: '120px',
|
|
254
|
+
hidden: true,
|
|
247
255
|
resizable: true,
|
|
248
256
|
sortable: true,
|
|
249
257
|
filterable: true,
|
|
@@ -154,16 +154,16 @@ export default class OperationsOrdersIndexViewController extends BaseController
|
|
|
154
154
|
];
|
|
155
155
|
|
|
156
156
|
@tracked routePanelButtons = [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
157
|
+
{
|
|
158
|
+
type: 'default',
|
|
159
|
+
text: 'Edit',
|
|
160
|
+
icon: 'pencil',
|
|
161
|
+
iconPrefix: 'fas',
|
|
162
|
+
onClick: () => {
|
|
163
|
+
const order = this.model;
|
|
164
|
+
this.editOrderRoute(order);
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
167
|
];
|
|
168
168
|
|
|
169
169
|
@not('isWaypointsCollapsed') waypointsIsNotCollapsed;
|
|
@@ -3,7 +3,7 @@ import { tracked } from '@glimmer/tracking';
|
|
|
3
3
|
import { inject as service } from '@ember/service';
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
5
|
import { format, isValid as isValidDate } from 'date-fns';
|
|
6
|
-
import createFullCalendarEventFromOrder from '../../../utils/create-full-calendar-event-from-order';
|
|
6
|
+
import createFullCalendarEventFromOrder, { createOrderEventTitle } from '../../../utils/create-full-calendar-event-from-order';
|
|
7
7
|
|
|
8
8
|
export default class OperationsSchedulerIndexController extends BaseController {
|
|
9
9
|
@service modalsManager;
|
|
@@ -17,6 +17,9 @@ export default class OperationsSchedulerIndexController extends BaseController {
|
|
|
17
17
|
|
|
18
18
|
@action setCalendarApi(calendar) {
|
|
19
19
|
this.calendar = calendar;
|
|
20
|
+
|
|
21
|
+
// setup some custom post initialization stuff here
|
|
22
|
+
// calendar.setOption('height', 800);
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
@action viewEvent(order) {
|
|
@@ -63,7 +66,7 @@ export default class OperationsSchedulerIndexController extends BaseController {
|
|
|
63
66
|
|
|
64
67
|
// update event props
|
|
65
68
|
if (event && typeof event.setProp === 'function') {
|
|
66
|
-
event.setProp('title', order
|
|
69
|
+
event.setProp('title', createOrderEventTitle(order));
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
// refresh route
|
|
@@ -99,7 +102,7 @@ export default class OperationsSchedulerIndexController extends BaseController {
|
|
|
99
102
|
|
|
100
103
|
// update event props
|
|
101
104
|
if (typeof event.setProp === 'function') {
|
|
102
|
-
event.setProp('title', order
|
|
105
|
+
event.setProp('title', createOrderEventTitle(order));
|
|
103
106
|
}
|
|
104
107
|
}
|
|
105
108
|
|
|
@@ -120,7 +123,7 @@ export default class OperationsSchedulerIndexController extends BaseController {
|
|
|
120
123
|
|
|
121
124
|
// update event props
|
|
122
125
|
if (typeof event.setProp === 'function') {
|
|
123
|
-
event.setProp('title', order
|
|
126
|
+
event.setProp('title', createOrderEventTitle(order));
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
129
|
}
|
package/addon/engine.js
CHANGED
|
@@ -6,6 +6,7 @@ import services from '@fleetbase/ember-core/exports/services';
|
|
|
6
6
|
import AdminVisibilityControlsComponent from './components/admin/visibility-controls';
|
|
7
7
|
import NavigatorAppConfigComponent from './components/admin/navigator-app';
|
|
8
8
|
import FleetOpsKeyMetricsWidget from './components/widget/fleet-ops-key-metrics';
|
|
9
|
+
import AdminAvatarManagementComponent from './components/admin/avatar-management';
|
|
9
10
|
|
|
10
11
|
const { modulePrefix } = config;
|
|
11
12
|
const externalRoutes = ['console', 'extensions'];
|
|
@@ -35,6 +36,11 @@ export default class FleetOpsEngine extends Engine {
|
|
|
35
36
|
icon: 'location-arrow',
|
|
36
37
|
component: NavigatorAppConfigComponent,
|
|
37
38
|
},
|
|
39
|
+
{
|
|
40
|
+
title: 'Avatar Managemenet',
|
|
41
|
+
icon: 'images',
|
|
42
|
+
component: AdminAvatarManagementComponent,
|
|
43
|
+
},
|
|
38
44
|
],
|
|
39
45
|
{
|
|
40
46
|
slug: 'fleet-ops',
|
|
@@ -59,7 +65,7 @@ export default class FleetOpsEngine extends Engine {
|
|
|
59
65
|
universe.registerDashboardWidgets([KeyMetricsWidgetDefinition]);
|
|
60
66
|
|
|
61
67
|
// create all registries necessary
|
|
62
|
-
universe.createRegistries(['engine:fleet-ops', 'component:vehicle-panel', 'component:driver-panel', 'contextmenu:vehicle', 'contextmenu:driver']);
|
|
68
|
+
universe.createRegistries(['engine:fleet-ops', 'component:vehicle-panel', 'component:driver-panel', 'contextmenu:vehicle', 'contextmenu:driver', 'view:order', 'view:create-order']);
|
|
63
69
|
};
|
|
64
70
|
}
|
|
65
71
|
|
|
@@ -71,3 +71,97 @@ body[data-theme='dark'] .next-table-wrapper.order-view-purchase-rate-table-wrapp
|
|
|
71
71
|
background-color: rgb(31, 41, 55);
|
|
72
72
|
color: rgb(249, 250, 251);
|
|
73
73
|
}
|
|
74
|
+
|
|
75
|
+
nav.next-sidebar {
|
|
76
|
+
height: 100%;
|
|
77
|
+
overflow-y: scroll;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** places management css mods */
|
|
81
|
+
|
|
82
|
+
.next-content-overlay.place-panel > .next-content-overlay-panel-container > .next-content-overlay-panel .next-content-overlay-panel-header,
|
|
83
|
+
.next-content-overlay.place-form-panel > .next-content-overlay-panel-container > .next-content-overlay-panel .next-content-overlay-panel-header {
|
|
84
|
+
display: grid;
|
|
85
|
+
grid-template-columns: 3fr 2fr;
|
|
86
|
+
height: auto;
|
|
87
|
+
align-items: start;
|
|
88
|
+
padding: 0.65rem 1rem;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.next-content-overlay.place-panel > .next-content-overlay-panel-container > .next-content-overlay-panel .next-content-overlay-panel-header > .next-view-header-left > div > div,
|
|
92
|
+
.next-content-overlay.place-form-panel > .next-content-overlay-panel-container > .next-content-overlay-panel .next-content-overlay-panel-header > .next-view-header-left > div > div {
|
|
93
|
+
flex-direction: column !important;
|
|
94
|
+
justify-content: start;
|
|
95
|
+
align-items: start;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.next-content-overlay.place-panel
|
|
99
|
+
> .next-content-overlay-panel-container
|
|
100
|
+
> .next-content-overlay-panel
|
|
101
|
+
.next-content-overlay-panel-header
|
|
102
|
+
> .next-view-header-left
|
|
103
|
+
.next-content-overlay-panel-title,
|
|
104
|
+
.next-content-overlay.place-form-panel
|
|
105
|
+
> .next-content-overlay-panel-container
|
|
106
|
+
> .next-content-overlay-panel
|
|
107
|
+
.next-content-overlay-panel-header
|
|
108
|
+
> .next-view-header-left
|
|
109
|
+
.next-content-overlay-panel-title {
|
|
110
|
+
white-space: initial;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.next-content-overlay.place-panel > .next-content-overlay-panel-container > .next-content-overlay-panel .next-content-overlay-panel-header > .next-view-header-left .status-badge,
|
|
114
|
+
.next-content-overlay.place-form-panel > .next-content-overlay-panel-container > .next-content-overlay-panel .next-content-overlay-panel-header > .next-view-header-left .status-badge {
|
|
115
|
+
margin-left: 0 !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** end places management mods */
|
|
119
|
+
|
|
120
|
+
body.fleetbase-console .next-content-overlay > .next-content-overlay-panel-container > .next-content-overlay-panel .next-content-overlay-panel-header > .next-view-header-right .btn-wrapper {
|
|
121
|
+
flex-shrink: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** calendar event css mods */
|
|
125
|
+
|
|
126
|
+
#fleet-ops-scheduler-calendar .fc-h-event .fc-event-main .fc-event-title {
|
|
127
|
+
display: block;
|
|
128
|
+
white-space: pre;
|
|
129
|
+
word-break: break-word;
|
|
130
|
+
padding: 0.05rem 0.2rem;
|
|
131
|
+
text-overflow: ellipsis;
|
|
132
|
+
font-size: 0.7rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
#fleet-ops-scheduler-sidebar .fleetbase-model-select > .ember-basic-dropdown > .ember-basic-dropdown-trigger {
|
|
136
|
+
box-shadow: none;
|
|
137
|
+
background-color: inherit;
|
|
138
|
+
padding: 0 0.25rem;
|
|
139
|
+
border: 1px rgb(161 161 161 / 7%) solid;
|
|
140
|
+
border-radius: 0;
|
|
141
|
+
line-height: 1rem;
|
|
142
|
+
width: 11rem;
|
|
143
|
+
background-image: none;
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-direction: row;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: space-between;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
#fleet-ops-scheduler-sidebar .fleetbase-model-select > .ember-basic-dropdown > .ember-basic-dropdown-trigger > .ember-power-select-selected-item,
|
|
151
|
+
#fleet-ops-scheduler-sidebar .fleetbase-model-select > .ember-basic-dropdown > .ember-basic-dropdown-trigger > .ember-power-select-selected-item span {
|
|
152
|
+
font-size: 0.65rem;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
#fleet-ops-scheduler-sidebar .fleetbase-model-select > .ember-basic-dropdown > .ember-basic-dropdown-trigger > .ember-power-select-clear-btn {
|
|
156
|
+
margin: 0.15rem 0.25rem;
|
|
157
|
+
padding: 0;
|
|
158
|
+
width: 1rem;
|
|
159
|
+
height: 1rem;
|
|
160
|
+
right: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
#fleet-ops-scheduler-sidebar .fleetbase-model-select > .ember-basic-dropdown + .ember-model-select__loading {
|
|
164
|
+
box-shadow: none;
|
|
165
|
+
background-color: inherit;
|
|
166
|
+
border: 0;
|
|
167
|
+
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<Button @icon="long-arrow-up" @iconClass="rotate-icon-45" @text={{t "fleet-ops.common.export"}} @onClick={{this.exportPlaces}} />
|
|
25
25
|
</Layout::Section::Header>
|
|
26
26
|
|
|
27
|
-
<Layout::Section::Body>
|
|
27
|
+
<Layout::Section::Body class="places-management-index">
|
|
28
28
|
<Table
|
|
29
29
|
@rows={{@model}}
|
|
30
30
|
@columns={{this.columns}}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<Layout::Section::Header @title={{t "fleet-ops.operations.scheduler.index.title"}} />
|
|
2
2
|
|
|
3
|
-
<Layout::Section::Body
|
|
4
|
-
<div
|
|
3
|
+
<Layout::Section::Body>
|
|
4
|
+
<div id="fleet-ops-scheduler-container">
|
|
5
5
|
<div class="grid grid-cols-1 lg:grid-cols-3">
|
|
6
|
-
<div class="scheduler-left-sidebar">
|
|
6
|
+
<div id="fleet-ops-scheduler-sidebar" class="scheduler-left-sidebar">
|
|
7
7
|
<ContentPanel
|
|
8
8
|
@title={{t "fleet-ops.operations.scheduler.index.unscheduled-orders"}}
|
|
9
9
|
@titleStatuRight={{this.unscheduledOrders.length}}
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</ContentPanel>
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
|
-
<div class="col-span-2
|
|
41
|
+
<div id="fleet-ops-scheduler-calendar" class="col-span-2 py-4 px-2">
|
|
42
42
|
<FullCalendar
|
|
43
43
|
@events={{this.events}}
|
|
44
44
|
@editable={{true}}
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
@onEventClick={{this.viewOrderAsEvent}}
|
|
49
49
|
@onInit={{this.setCalendarApi}}
|
|
50
50
|
/>
|
|
51
|
+
<Spacer @height="400px" />
|
|
51
52
|
</div>
|
|
52
53
|
</div>
|
|
53
54
|
</div>
|
|
@@ -1,8 +1,30 @@
|
|
|
1
|
+
import { get } from '@ember/object';
|
|
2
|
+
|
|
3
|
+
export function createOrderEventTitle(order) {
|
|
4
|
+
const scheduledAtTime = get(order, 'scheduledAtTime');
|
|
5
|
+
const driverAssignedName = get(order, 'driver_assigned.name');
|
|
6
|
+
const vehicleAssignedName = get(order, 'driver_assigned.vehicle_name');
|
|
7
|
+
const destination = get(order, 'pickupName');
|
|
8
|
+
|
|
9
|
+
let title = [];
|
|
10
|
+
if (driverAssignedName) {
|
|
11
|
+
title.push(`${driverAssignedName} @ ${scheduledAtTime}`);
|
|
12
|
+
title.push(vehicleAssignedName);
|
|
13
|
+
title.push(`to ${destination}`);
|
|
14
|
+
} else {
|
|
15
|
+
title.push(`${scheduledAtTime} to ${destination}`);
|
|
16
|
+
title.push(vehicleAssignedName);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return title.filter(Boolean).join('\n');
|
|
20
|
+
}
|
|
21
|
+
|
|
1
22
|
export default function createFullCalendarEventFromOrder(order) {
|
|
2
23
|
return {
|
|
3
24
|
id: order.id,
|
|
4
|
-
title:
|
|
25
|
+
title: createOrderEventTitle(order),
|
|
5
26
|
start: order.scheduled_at,
|
|
6
27
|
allDay: true,
|
|
28
|
+
display: 'block',
|
|
7
29
|
};
|
|
8
30
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@fleetbase/fleetops-engine/components/admin/avatar-management';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@fleetbase/fleetops-engine/components/avatar-picker';
|
package/composer.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fleetbase/fleetops-api",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.14",
|
|
4
4
|
"description": "Fleet & Transport Management Extension for Fleetbase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fleetbase-extension",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"require": {
|
|
24
24
|
"php": "^8.0",
|
|
25
|
-
"fleetbase/core-api": "^1.4.
|
|
25
|
+
"fleetbase/core-api": "^1.4.7",
|
|
26
26
|
"barryvdh/laravel-dompdf": "^2.0",
|
|
27
27
|
"brick/geo": "0.7.2",
|
|
28
28
|
"cknow/laravel-money": "^7.1",
|
package/config/environment.js
CHANGED
|
@@ -15,6 +15,8 @@ module.exports = function (environment) {
|
|
|
15
15
|
vendorImage: getenv('DEFAULT_VENDOR_IMAGE', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/no-avatar.png'),
|
|
16
16
|
vehicleImage: getenv('DEFAULT_VEHICLE_IMAGE', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/vehicle-placeholder.png'),
|
|
17
17
|
vehicleAvatar: getenv('DEFAUL_VEHICLE_AVATAR', 'https://flb-assets.s3-ap-southeast-1.amazonaws.com/static/vehicle-icons/mini_bus.svg'),
|
|
18
|
+
driverAvatar: getenv('DEFAUL_DRIVER_AVATAR', 'https://flb-assets.s3-ap-southeast-1.amazonaws.com/static/driver-icons/moto-driver.png'),
|
|
19
|
+
placeAvatar: getenv('DEFAUL_PLACE_AVATAR', 'https://flb-assets.s3-ap-southeast-1.amazonaws.com/static/place-icons/basic-building.png'),
|
|
18
20
|
},
|
|
19
21
|
};
|
|
20
22
|
|
package/extension.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetbase/fleetops-engine",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.14",
|
|
4
4
|
"description": "Fleet & Transport Management Extension for Fleetbase",
|
|
5
5
|
"fleetbase": {
|
|
6
6
|
"route": "fleet-ops"
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/core": "^7.23.2",
|
|
45
45
|
"@fleetbase/ember-core": "^0.2.4",
|
|
46
|
-
"@fleetbase/ember-ui": "^0.2.
|
|
47
|
-
"@fleetbase/fleetops-data": "^0.1.
|
|
46
|
+
"@fleetbase/ember-ui": "^0.2.11",
|
|
47
|
+
"@fleetbase/fleetops-data": "^0.1.9",
|
|
48
48
|
"@fleetbase/leaflet-routing-machine": "^3.2.16",
|
|
49
49
|
"@fortawesome/ember-fontawesome": "^0.4.1",
|
|
50
50
|
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
|
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
4
4
|
use Illuminate\Database\Schema\Blueprint;
|
|
5
5
|
use Illuminate\Support\Facades\Schema;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
return new class extends Migration
|
|
8
8
|
{
|
|
9
9
|
public function up()
|
|
10
10
|
{
|
|
@@ -98,4 +98,4 @@ class UpdateVehiclesTable extends Migration
|
|
|
98
98
|
$table->string('model_width_mm')->nullable();
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
}
|
|
101
|
+
};
|
|
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
4
4
|
use Illuminate\Database\Schema\Blueprint;
|
|
5
5
|
use Illuminate\Support\Facades\Schema;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
return new class extends Migration
|
|
8
8
|
{
|
|
9
9
|
public function up()
|
|
10
10
|
{
|
|
@@ -41,4 +41,4 @@ class CreateVehicleDevicesTable extends Migration
|
|
|
41
41
|
});
|
|
42
42
|
Schema::dropIfExists('vehicle_devices');
|
|
43
43
|
}
|
|
44
|
-
}
|
|
44
|
+
};
|
|
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
4
4
|
use Illuminate\Database\Schema\Blueprint;
|
|
5
5
|
use Illuminate\Support\Facades\Schema;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
return new class extends Migration
|
|
8
8
|
{
|
|
9
9
|
/**
|
|
10
10
|
* Run the migrations.
|
|
@@ -29,4 +29,4 @@ class AddOnlineColumnToVehiclesTable extends Migration
|
|
|
29
29
|
$table->dropColumn('online');
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
}
|
|
32
|
+
};
|
|
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
4
4
|
use Illuminate\Database\Schema\Blueprint;
|
|
5
5
|
use Illuminate\Support\Facades\Schema;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
return new class extends Migration
|
|
8
8
|
{
|
|
9
9
|
public function up()
|
|
10
10
|
{
|
|
@@ -42,4 +42,4 @@ class CreateFleetVehiclesTable extends Migration
|
|
|
42
42
|
|
|
43
43
|
Schema::dropIfExists('fleet_vehicles');
|
|
44
44
|
}
|
|
45
|
-
}
|
|
45
|
+
};
|
|
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
4
4
|
use Illuminate\Database\Schema\Blueprint;
|
|
5
5
|
use Illuminate\Support\Facades\Schema;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
return new class extends Migration
|
|
8
8
|
{
|
|
9
9
|
/**
|
|
10
10
|
* Run the migrations.
|
|
@@ -43,4 +43,4 @@ class AddColumnToFleetsTable extends Migration
|
|
|
43
43
|
$table->dropColumn('parent_fleet_uuid');
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
};
|
|
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
4
4
|
use Illuminate\Database\Schema\Blueprint;
|
|
5
5
|
use Illuminate\Support\Facades\Schema;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
return new class extends Migration
|
|
8
8
|
{
|
|
9
9
|
/**
|
|
10
10
|
* Run the migrations.
|
|
@@ -39,4 +39,4 @@ class UpdateVehicle extends Migration
|
|
|
39
39
|
$table->dropColumn('altitude');
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
}
|
|
42
|
+
};
|
|
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
4
4
|
use Illuminate\Database\Schema\Blueprint;
|
|
5
5
|
use Illuminate\Support\Facades\Schema;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
return new class extends Migration
|
|
8
8
|
{
|
|
9
9
|
/**
|
|
10
10
|
* Run the migrations.
|
|
@@ -53,4 +53,4 @@ class CreateVehicleDeviceEventsTable extends Migration
|
|
|
53
53
|
$table->dropIndex(['uuid']);
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
}
|
|
56
|
+
};
|
|
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
4
4
|
use Illuminate\Database\Schema\Blueprint;
|
|
5
5
|
use Illuminate\Support\Facades\Schema;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
return new class extends Migration
|
|
8
8
|
{
|
|
9
9
|
/**
|
|
10
10
|
* Run the migrations.
|
|
@@ -39,4 +39,4 @@ class RefactorIssuesTableColumns extends Migration
|
|
|
39
39
|
$table->dropColumn(['reported_by_uuid', 'meta', 'tags', 'category']);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
}
|
|
42
|
+
};
|
|
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
4
4
|
use Illuminate\Database\Schema\Blueprint;
|
|
5
5
|
use Illuminate\Support\Facades\Schema;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
return new class extends Migration
|
|
8
8
|
{
|
|
9
9
|
/**
|
|
10
10
|
* Run the migrations.
|
|
@@ -35,4 +35,4 @@ class RefactorFuelReportsTable extends Migration
|
|
|
35
35
|
$table->dropColumn(['reported_by_uuid', 'meta', 'report']);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
}
|
|
38
|
+
};
|
|
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
4
4
|
use Illuminate\Database\Schema\Blueprint;
|
|
5
5
|
use Illuminate\Support\Facades\Schema;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
return new class extends Migration
|
|
8
8
|
{
|
|
9
9
|
/**
|
|
10
10
|
* Run the migrations.
|
|
@@ -29,4 +29,4 @@ class AddStatusColumnToFuelReportsTable extends Migration
|
|
|
29
29
|
$table->dropColumn('status');
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
}
|
|
32
|
+
};
|
|
@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
4
4
|
use Illuminate\Database\Schema\Blueprint;
|
|
5
5
|
use Illuminate\Support\Facades\Schema;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
return new class extends Migration
|
|
8
8
|
{
|
|
9
9
|
/**
|
|
10
10
|
* Run the migrations.
|
|
@@ -30,4 +30,4 @@ class AddCommentsColumnAndResolvedAtColumnToVehicleDeviceEventsTable extends Mig
|
|
|
30
30
|
$table->dropColumn(['comment', 'resolved_at']);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
}
|
|
33
|
+
};
|