@fleetbase/fleetops-engine 0.4.0 → 0.4.2
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/navigator-app.hbs +3 -3
- package/addon/components/admin/visibility-controls.hbs +4 -4
- package/addon/components/cell/driver-name.hbs +1 -1
- package/addon/components/contact-form-panel.hbs +15 -15
- package/addon/components/contact-form-panel.js +8 -4
- package/addon/components/contact-panel/details.hbs +7 -7
- package/addon/components/contact-panel.hbs +2 -2
- package/addon/components/display-place.hbs +2 -2
- package/addon/components/driver-card.hbs +1 -1
- package/addon/components/driver-form-panel.hbs +36 -29
- package/addon/components/driver-form-panel.js +6 -2
- package/addon/components/driver-panel/details.hbs +10 -10
- package/addon/components/driver-panel.hbs +5 -5
- package/addon/components/fleet-driver-listing.hbs +5 -5
- package/addon/components/fleet-form-panel.hbs +16 -16
- package/addon/components/fleet-form-panel.js +5 -1
- package/addon/components/fleet-panel/details.hbs +7 -7
- package/addon/components/fleet-panel/driver-listing.hbs +5 -5
- package/addon/components/fleet-panel/driver-listing.js +6 -0
- package/addon/components/fleet-panel/vehicle-listing.hbs +5 -5
- package/addon/components/fleet-panel/vehicle-listing.js +6 -0
- package/addon/components/fleet-vehicle-listing.hbs +5 -5
- package/addon/components/fuel-report-form-panel.hbs +16 -16
- package/addon/components/fuel-report-form-panel.js +5 -1
- package/addon/components/fuel-report-panel/details.hbs +11 -11
- package/addon/components/fuel-report-panel.hbs +3 -3
- package/addon/components/global-search.hbs +1 -1
- package/addon/components/horizontal-route.hbs +1 -1
- package/addon/components/integrated-order-details.hbs +13 -13
- package/addon/components/issue-form-panel.hbs +25 -25
- package/addon/components/issue-form-panel.js +6 -1
- package/addon/components/issue-panel/details.hbs +11 -11
- package/addon/components/issue-panel.hbs +3 -3
- package/addon/components/layout/fleet-ops-sidebar.hbs +2 -2
- package/addon/components/layout/fleet-ops-sidebar.js +28 -12
- package/addon/components/live-map-drawer/driver-listing.hbs +1 -1
- package/addon/components/live-map-drawer/driver-listing.js +16 -10
- package/addon/components/live-map-drawer/place-listing.hbs +1 -1
- package/addon/components/live-map-drawer/place-listing.js +12 -7
- package/addon/components/live-map-drawer/vehicle-listing.hbs +1 -1
- package/addon/components/live-map-drawer/vehicle-listing.js +15 -9
- package/addon/components/live-map.hbs +10 -92
- package/addon/components/live-map.js +29 -24
- package/addon/components/map-container/toolbar/visibility-control-panel.hbs +9 -9
- package/addon/components/map-container/toolbar/zones-panel.hbs +10 -10
- package/addon/components/map-container/toolbar.hbs +6 -6
- package/addon/components/modals/assign-driver.hbs +2 -2
- package/addon/components/modals/clone-config-form.hbs +2 -2
- package/addon/components/modals/contact-details.hbs +6 -6
- package/addon/components/modals/contact-form.hbs +11 -11
- package/addon/components/modals/driver-assign-order.hbs +2 -2
- package/addon/components/modals/driver-assign-vehicle.hbs +2 -2
- package/addon/components/modals/driver-assign-vendor.hbs +2 -2
- package/addon/components/modals/driver-details.hbs +14 -14
- package/addon/components/modals/driver-form.hbs +18 -18
- package/addon/components/modals/edit-meta-form.hbs +2 -2
- package/addon/components/modals/entity-form.hbs +16 -16
- package/addon/components/modals/entity-meta-field-prompt.hbs +1 -1
- package/addon/components/modals/fleet-details.hbs +6 -6
- package/addon/components/modals/fleet-form.hbs +8 -8
- package/addon/components/modals/fuel-report-details.hbs +9 -9
- package/addon/components/modals/fuel-report-form.hbs +8 -8
- package/addon/components/modals/group-details.hbs +4 -4
- package/addon/components/modals/group-form.hbs +6 -6
- package/addon/components/modals/install-prompt.hbs +2 -3
- package/addon/components/modals/issue-details.hbs +8 -8
- package/addon/components/modals/issue-from.hbs +21 -21
- package/addon/components/modals/map-field-form.hbs +2 -2
- package/addon/components/modals/map-field-group-form.hbs +1 -1
- package/addon/components/modals/map-layer-form.hbs +10 -10
- package/addon/components/modals/meta-field-form.hbs +2 -2
- package/addon/components/modals/meta-field-group-form.hbs +1 -1
- package/addon/components/modals/new-order-config.hbs +4 -4
- package/addon/components/modals/order-assign-driver.hbs +2 -2
- package/addon/components/modals/order-config-new-status.hbs +1 -1
- package/addon/components/modals/order-event.hbs +2 -2
- package/addon/components/modals/order-form.hbs +8 -8
- package/addon/components/modals/order-import.hbs +8 -8
- package/addon/components/modals/order-label.hbs +1 -1
- package/addon/components/modals/order-new-activity.hbs +10 -10
- package/addon/components/modals/order-route-form.hbs +17 -17
- package/addon/components/modals/place-assign-vendor.hbs +2 -2
- package/addon/components/modals/place-details.hbs +13 -13
- package/addon/components/modals/place-form.hbs +15 -15
- package/addon/components/modals/policy-form.hbs +5 -5
- package/addon/components/modals/role-form.hbs +3 -3
- package/addon/components/modals/select-payment-method.hbs +1 -1
- package/addon/components/modals/service-area-form.hbs +8 -8
- package/addon/components/modals/set-password.hbs +3 -3
- package/addon/components/modals/uninstall-prompt.hbs +2 -3
- package/addon/components/modals/user-form.hbs +9 -9
- package/addon/components/modals/vehicle-details.hbs +41 -41
- package/addon/components/modals/vehicle-form.hbs +73 -73
- package/addon/components/modals/vendor-details.hbs +10 -10
- package/addon/components/modals/vendor-form.hbs +36 -36
- package/addon/components/modals/view-service-area.hbs +1 -1
- package/addon/components/modals/zone-form.hbs +6 -6
- package/addon/components/order/header.hbs +11 -11
- package/addon/components/order/place-card.hbs +2 -2
- package/addon/components/order/schedule-card.hbs +6 -6
- package/addon/components/order/schedule-card.js +11 -7
- package/addon/components/order-config/activity-flow-editor.hbs +14 -14
- package/addon/components/order-config/activity-flow-editor.js +11 -11
- package/addon/components/order-config/details-editor.hbs +9 -9
- package/addon/components/order-config/entities-editor.hbs +13 -13
- package/addon/components/order-config/entities-editor.js +2 -2
- package/addon/components/order-config/fields-editor.hbs +14 -14
- package/addon/components/order-config/fields-editor.js +13 -12
- package/addon/components/order-config.hbs +9 -9
- package/addon/components/order-config.js +12 -11
- package/addon/components/order-list-overlay.hbs +14 -14
- package/addon/components/place-form-panel.hbs +18 -18
- package/addon/components/place-form-panel.js +6 -1
- package/addon/components/place-panel/details.hbs +10 -10
- package/addon/components/place-panel.hbs +2 -2
- package/addon/components/route-list.hbs +2 -2
- package/addon/components/settings-window.hbs +5 -5
- package/addon/components/settings-window.js +2 -1
- package/addon/components/vehicle-form-panel.hbs +27 -27
- package/addon/components/vehicle-form-panel.js +8 -3
- package/addon/components/vehicle-panel/details.hbs +7 -7
- package/addon/components/vehicle-panel.hbs +4 -4
- package/addon/components/vendor-form-panel/create-form.hbs +34 -33
- package/addon/components/vendor-form-panel/create-form.js +6 -2
- package/addon/components/vendor-form-panel/edit-form.hbs +27 -27
- package/addon/components/vendor-form-panel/edit-form.js +1 -0
- package/addon/components/vendor-form-panel.hbs +6 -6
- package/addon/components/vendor-form-panel.js +7 -2
- package/addon/components/vendor-panel/details.hbs +10 -10
- package/addon/components/vendor-panel.hbs +3 -3
- package/addon/components/widget/fleet-ops-quickstart.hbs +2 -2
- package/addon/components/widget/fleet-ops-quickstart.js +1 -0
- package/addon/components/widget/key-metrics.hbs +12 -12
- package/addon/components/widget/live-order-map.hbs +4 -4
- package/addon/components/widget/recent-orders.hbs +4 -4
- package/addon/components/widget/transactions.hbs +4 -4
- package/addon/controllers/management/contacts/index/edit.js +10 -3
- package/addon/controllers/management/contacts/index/new.js +7 -0
- package/addon/controllers/management/contacts/index.js +23 -16
- package/addon/controllers/management/drivers/index/edit.js +10 -3
- package/addon/controllers/management/drivers/index/new.js +7 -0
- package/addon/controllers/management/drivers/index.js +33 -19
- package/addon/controllers/management/fleets/index/edit.js +10 -3
- package/addon/controllers/management/fleets/index/new.js +7 -0
- package/addon/controllers/management/fleets/index.js +24 -17
- package/addon/controllers/management/fuel-reports/index/edit.js +10 -3
- package/addon/controllers/management/fuel-reports/index/new.js +7 -0
- package/addon/controllers/management/fuel-reports/index.js +20 -13
- package/addon/controllers/management/issues/index/edit.js +10 -3
- package/addon/controllers/management/issues/index/new.js +8 -0
- package/addon/controllers/management/issues/index.js +22 -15
- package/addon/controllers/management/places/index/edit.js +10 -3
- package/addon/controllers/management/places/index/new.js +7 -0
- package/addon/controllers/management/places/index.js +27 -20
- package/addon/controllers/management/vehicles/index/edit.js +10 -3
- package/addon/controllers/management/vehicles/index/new.js +7 -0
- package/addon/controllers/management/vehicles/index.js +22 -15
- package/addon/controllers/management/vendors/index/edit.js +10 -3
- package/addon/controllers/management/vendors/index/new.js +7 -0
- package/addon/controllers/management/vendors/index.js +23 -16
- package/addon/controllers/operations/orders/index/new.js +127 -30
- package/addon/controllers/operations/orders/index/view.js +57 -20
- package/addon/controllers/operations/orders/index.js +34 -27
- package/addon/controllers/operations/scheduler/index.js +3 -2
- package/addon/controllers/operations/service-rates/index/edit.js +1 -12
- package/addon/controllers/operations/service-rates/index/new.js +9 -1
- package/addon/controllers/operations/service-rates/index.js +16 -9
- package/addon/routes/application.js +5 -2
- package/addon/routes/management/places/index.js +1 -1
- package/addon/routes/operations/orders/index/view.js +2 -14
- package/addon/services/driver-actions.js +9 -8
- package/addon/services/vehicle-actions.js +2 -1
- package/addon/styles/fleetops-engine.css +6 -0
- package/addon/templates/management/contacts/index.hbs +6 -6
- package/addon/templates/management/drivers/index.hbs +6 -6
- package/addon/templates/management/fleets/index.hbs +6 -6
- package/addon/templates/management/fuel-reports/index.hbs +7 -7
- package/addon/templates/management/index.hbs +17 -17
- package/addon/templates/management/issues/index.hbs +6 -6
- package/addon/templates/management/places/index.hbs +6 -6
- package/addon/templates/management/vehicles/index.hbs +6 -6
- package/addon/templates/management/vendors/index.hbs +6 -6
- package/addon/templates/operations/orders/index/config/types.hbs +3 -3
- package/addon/templates/operations/orders/index/config.hbs +3 -4
- package/addon/templates/operations/orders/index/new.hbs +73 -73
- package/addon/templates/operations/orders/index/view.hbs +147 -53
- package/addon/templates/operations/orders/index.hbs +13 -13
- package/addon/templates/operations/scheduler/index.hbs +3 -3
- package/addon/templates/operations/service-rates/index/new.hbs +79 -81
- package/addon/templates/operations/service-rates/index.hbs +6 -6
- package/composer.json +2 -2
- package/extension.json +1 -1
- package/package.json +4 -2
- package/server/resources/views/labels/default.php +40 -18
- package/server/resources/views/labels/waypoint-label.php +126 -0
- package/server/src/Http/Controllers/Api/v1/DriverController.php +4 -1
- package/server/src/Http/Controllers/Api/v1/OrderController.php +1 -1
- package/server/src/Http/Resources/v1/Entity.php +2 -2
- package/server/src/Http/Resources/v1/Payload.php +11 -30
- package/server/src/Http/Resources/v1/Place.php +3 -3
- package/server/src/Http/Resources/v1/Waypoint.php +101 -0
- package/server/src/Models/Entity.php +1 -1
- package/server/src/Models/Payload.php +39 -0
- package/server/src/Models/Place.php +5 -2
- package/server/src/Models/Proof.php +1 -1
- package/server/src/Models/Waypoint.php +15 -3
- package/translations/en-us.yaml +1343 -3
|
@@ -22,7 +22,7 @@ export default class OrderConfigActivityFlowEditorComponent extends Component {
|
|
|
22
22
|
@service modalsManager;
|
|
23
23
|
@service notifications;
|
|
24
24
|
@service fetch;
|
|
25
|
-
|
|
25
|
+
@service intl;
|
|
26
26
|
@tracked drake;
|
|
27
27
|
@tracked orderConfig = {};
|
|
28
28
|
@tracked flow = {};
|
|
@@ -149,13 +149,13 @@ export default class OrderConfigActivityFlowEditorComponent extends Component {
|
|
|
149
149
|
const { flow } = this;
|
|
150
150
|
|
|
151
151
|
this.modalsManager.show('modals/order-config-new-status', {
|
|
152
|
-
title: '
|
|
152
|
+
title: this.intl.t('fleet-ops.component.order-config.activity-flow-editor.add-status'),
|
|
153
153
|
statusName: null,
|
|
154
154
|
confirm: async (modal) => {
|
|
155
155
|
const statusName = modal.getOption('statusName');
|
|
156
156
|
|
|
157
157
|
if (!statusName) {
|
|
158
|
-
return this.notifications.warning('
|
|
158
|
+
return this.notifications.warning(this.intl.t('fleet-ops.component.order-config.activity-flow-editor.no-status'));
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
const format = (status) => underscore(status.toLowerCase());
|
|
@@ -165,9 +165,9 @@ export default class OrderConfigActivityFlowEditorComponent extends Component {
|
|
|
165
165
|
await modal.done();
|
|
166
166
|
// prompt to confirm overwrite
|
|
167
167
|
return this.modalsManager.confirm({
|
|
168
|
-
title: '
|
|
169
|
-
body:
|
|
170
|
-
acceptButtonText: '
|
|
168
|
+
title: this.intl.t('fleet-ops.component.order-config.activity-flow-editor.overwrite'),
|
|
169
|
+
body: this.intl.t('fleet-ops.component.order-config.activity-flow-editor.overwrite-text', { statusName: statusName }),
|
|
170
|
+
acceptButtonText: this.intl.t('fleet-ops.component.order-config.activity-flow-editor.overwrite-button'),
|
|
171
171
|
confirm: (modal) => {
|
|
172
172
|
this.insertNewStatus(status);
|
|
173
173
|
modal.done();
|
|
@@ -204,9 +204,9 @@ export default class OrderConfigActivityFlowEditorComponent extends Component {
|
|
|
204
204
|
@action removeStatus(status) {
|
|
205
205
|
const { flow } = this;
|
|
206
206
|
this.modalsManager.confirm({
|
|
207
|
-
title: '
|
|
208
|
-
body:
|
|
209
|
-
acceptButtonText: '
|
|
207
|
+
title: this.intl.t('fleet-ops.component.order-config.activity-flow-editor.remove'),
|
|
208
|
+
body: this.intl.t('fleet-ops.component.order-config.activity-flow-editor.remove-text'),
|
|
209
|
+
acceptButtonText: this.intl.t('fleet-ops.component.order-config.activity-flow-editor.delete-button'),
|
|
210
210
|
confirm: (modal) => {
|
|
211
211
|
delete flow[status];
|
|
212
212
|
set(this, 'flow', flow);
|
|
@@ -231,7 +231,7 @@ export default class OrderConfigActivityFlowEditorComponent extends Component {
|
|
|
231
231
|
|
|
232
232
|
// if status is created or dispatched prevent from dragging
|
|
233
233
|
if (['created', 'dispatched', 'completed'].includes(format(status))) {
|
|
234
|
-
this.notifications.warning(
|
|
234
|
+
this.notifications.warning(this.intl.t('fleet-ops.component.order-config.activity-flow-editor.unable-warning', { status: format(status) }));
|
|
235
235
|
this.drake.cancel(true);
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
@@ -241,7 +241,7 @@ export default class OrderConfigActivityFlowEditorComponent extends Component {
|
|
|
241
241
|
|
|
242
242
|
// if is not created but attempt to move to sequence 0
|
|
243
243
|
if (format(status) !== 'created' && sequence === 0) {
|
|
244
|
-
this.notifications.warning(
|
|
244
|
+
this.notifications.warning(this.intl.t('fleet-ops.component.order-config.activity-flow-editor.order-warning'));
|
|
245
245
|
this.drake.cancel(true);
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
<div class="content-panel-body">
|
|
14
14
|
|
|
15
|
-
<InputGroup @name="
|
|
16
|
-
<InputGroup @name="
|
|
17
|
-
<InputGroup @name="
|
|
18
|
-
<InputGroup @name="
|
|
19
|
-
<InputGroup @name=
|
|
20
|
-
<InputGroup @name=
|
|
15
|
+
<InputGroup @name={{t "fleet-ops.common.name"}} @value={{@orderConfig.name}} />
|
|
16
|
+
<InputGroup @name={{t "fleet-ops.common.description"}} @value={{@orderConfig.description}} />
|
|
17
|
+
<InputGroup @name={{t "fleet-ops.common.key"}} @value={{@orderConfig.key}} @disabled={{true}} readonly={{true}} @helpText={{t "fleet-ops.component.order-config.details-editor.key-text"}} />
|
|
18
|
+
<InputGroup @name={{t "fleet-ops.common.namespace"}} @value={{@orderConfig.namespace}} @disabled={{true}} readonly={{true}} @helpText={{t "fleet-ops.component.order-config.details-editor.namespace-text"}} />
|
|
19
|
+
<InputGroup @name={{t "fleet-ops.component.order-config.details-editor.id"}} @value={{@orderConfig.extension_id}} @disabled={{true}} readonly={{true}} @helpText={{t "fleet-ops.component.order-config.details-editor.id-text"}} />
|
|
20
|
+
<InputGroup @name={{t "fleet-ops.component.order-config.details-editor.version"}} @value={{@orderConfig.version}} @disabled={{true}} readonly={{true}} @helpText={{t "fleet-ops.component.order-config.details-editor.version-text"}} />
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
<div class="flex items-center justify-end">
|
|
24
|
-
<Button @type="default" @icon="clone" @text=
|
|
24
|
+
<Button @type="default" @icon="clone" @text={{t "fleet-ops.component.order-config.details-editor.clone"}} @size="sm" @wrapperClass="mr-2" @onClick={{fn this.sendAction "clone" @orderConfig}} />
|
|
25
25
|
{{#if @orderConfig.installed}}
|
|
26
|
-
<Button @type="danger" @icon="trash" @text=
|
|
26
|
+
<Button @type="danger" @icon="trash" @text={{t "fleet-ops.component.order-config.details-editor.uninstall"}} @size="sm" @onClick={{fn this.sendAction "uninstall" @orderConfig}} />
|
|
27
27
|
{{else}}
|
|
28
|
-
<Button @type="danger" @icon="trash" @text=
|
|
28
|
+
<Button @type="danger" @icon="trash" @text={{t "fleet-ops.component.order-config.details-editor.delete"}} @size="sm" @onClick={{fn this.sendAction "delete" @orderConfig}} />
|
|
29
29
|
{{/if}}
|
|
30
30
|
</div>
|
|
31
31
|
{{yield}}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="content-panel mb-20">
|
|
3
3
|
<div class="content-panel-header items-center">
|
|
4
4
|
<h3 class="text-lg font-semibold dark:text-gray-100">
|
|
5
|
-
|
|
5
|
+
{{t "fleet-ops.component.order-config.entities-editor.title"}}
|
|
6
6
|
</h3>
|
|
7
7
|
|
|
8
8
|
<Button @text="New Entity Type" @icon="plus" @iconPrefix="fas" @onClick={{this.newEntity}} />
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<div class="content-panel-body">
|
|
11
11
|
<div class="mb-6">
|
|
12
12
|
<p>
|
|
13
|
-
|
|
13
|
+
{{t "fleet-ops.component.order-config.entities-editor.message"}}
|
|
14
14
|
</p>
|
|
15
15
|
</div>
|
|
16
16
|
|
|
@@ -22,38 +22,38 @@
|
|
|
22
22
|
<div class="flex items-center justify-between">
|
|
23
23
|
<div>
|
|
24
24
|
<FaIcon @icon="box-alt" class="mr-2 dark:text-sky-300" />
|
|
25
|
-
<span class="dark:text-gray-100 text-sm mr-1">
|
|
25
|
+
<span class="dark:text-gray-100 text-sm mr-1">{{t "fleet-ops.component.order-config.entities-editor.type"}}</span>
|
|
26
26
|
<span class="dark:text-gray-100 text-sm">({{entity.name}})</span>
|
|
27
27
|
</div>
|
|
28
28
|
<div class="flex items-center">
|
|
29
29
|
<a href="javascript:;" class="mr-2 btn btn-danger btn-sm" {{on "click" (fn this.removeEntity index)}}>
|
|
30
30
|
<FaIcon @icon="trash" />
|
|
31
31
|
</a>
|
|
32
|
-
<Button @text="
|
|
32
|
+
<Button @text={{t "fleet-ops.component.order-config.entities-editor.add-meta"}} @icon="plus" @iconPrefix="fas" @onClick={{fn this.addMetaField index}} />
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
36
|
<div class="p-3">
|
|
37
37
|
<div class="grid grid-cols-3 gap-2">
|
|
38
|
-
<InputGroup @name="
|
|
39
|
-
<InputGroup @name="
|
|
38
|
+
<InputGroup @name={{t "fleet-ops.common.name"}} @value={{entity.name}} />
|
|
39
|
+
<InputGroup @name={{t "fleet-ops.common.type"}} @value={{entity.type}}>
|
|
40
40
|
<KeyInput @value={{entity.type}} @onChange={{fn (mut entity.type)}} />
|
|
41
41
|
</InputGroup>
|
|
42
|
-
<InputGroup @name="
|
|
42
|
+
<InputGroup @name={{t "fleet-ops.common.description"}} @value={{entity.description}} class="col-span-2" />
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
<div class="grid grid-cols-5 gap-2">
|
|
46
|
-
<InputGroup @name="
|
|
47
|
-
<InputGroup @name="
|
|
46
|
+
<InputGroup @name={{t "fleet-ops.common.weight"}} @value={{entity.weight}} class="col-span-3" />
|
|
47
|
+
<InputGroup @name={{t "fleet-ops.common.unit"}}>
|
|
48
48
|
<Select @value={{entity.weight_unit}} @options={{this.weightUnits}} @optionLabel="name" @optionValue="value" class="w-full" />
|
|
49
49
|
</InputGroup>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
<div class="grid grid-cols-5 gap-2">
|
|
53
|
-
<InputGroup @name="
|
|
54
|
-
<InputGroup @name="
|
|
55
|
-
<InputGroup @name="
|
|
56
|
-
<InputGroup @name="
|
|
53
|
+
<InputGroup @name={{t "fleet-ops.common.length"}} @value={{entity.length}} />
|
|
54
|
+
<InputGroup @name={{t "fleet-ops.common.width"}} @value={{entity.width}} />
|
|
55
|
+
<InputGroup @name={{t "fleet-ops.common.height"}} @value={{entity.width}} />
|
|
56
|
+
<InputGroup @name={{t "fleet-ops.common.unit"}}>
|
|
57
57
|
<Select @value={{entity.dimentions_unit}} @options={{this.lengthUnits}} @optionLabel="name" @optionValue="value" class="w-full" />
|
|
58
58
|
</InputGroup>
|
|
59
59
|
</div>
|
|
@@ -11,7 +11,7 @@ import getLengthUnits from '@fleetbase/ember-core/utils/get-length-units';
|
|
|
11
11
|
export default class OrderConfigEntitiesEditorComponent extends Component {
|
|
12
12
|
@service modalsManager;
|
|
13
13
|
@service notifications;
|
|
14
|
-
|
|
14
|
+
@service intl;
|
|
15
15
|
@tracked weightUnits = getWeightUnits();
|
|
16
16
|
@tracked lengthUnits = getLengthUnits();
|
|
17
17
|
@tracked _orderConfig = null;
|
|
@@ -75,7 +75,7 @@ export default class OrderConfigEntitiesEditorComponent extends Component {
|
|
|
75
75
|
const keyName = modal.getOption('keyName');
|
|
76
76
|
|
|
77
77
|
if (!keyName) {
|
|
78
|
-
return this.notifications.warning('
|
|
78
|
+
return this.notifications.warning(this.intl.t('fleet-ops.component.order-config.entities-editor.warning-message'));
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
modal.startLoading();
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
<div class="content-panel">
|
|
3
3
|
<div class="content-panel-header items-center">
|
|
4
4
|
<h3 class="text-lg font-semibold dark:text-gray-100">
|
|
5
|
-
|
|
5
|
+
{{t "fleet-ops.component.order-config.fields-editor.field-title"}}
|
|
6
6
|
</h3>
|
|
7
7
|
<div>
|
|
8
|
-
<Button @icon="plus" @iconPrefix="fas" @text=
|
|
9
|
-
<Button @icon="plus" @iconPrefix="fas" @text=
|
|
8
|
+
<Button @icon="plus" @iconPrefix="fas" @text={{t "fleet-ops.component.order-config.fields-editor.new-field"}} @size="sm" @onClick={{this.addField}} />
|
|
9
|
+
<Button @icon="plus" @iconPrefix="fas" @text={{t "fleet-ops.component.order-config.fields-editor.new-custom-field"}} @size="sm" @onClick={{this.addMetaFieldGroup}} />
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="content-panel-body">
|
|
13
13
|
<div class="mb-6">
|
|
14
|
-
<p>
|
|
14
|
+
<p>{{t "fleet-ops.component.order-config.fields-editor.field-text"}}</p>
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
17
|
<Dragula @onDrop={{this.moveMetaField}} as |Container|>
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
<div class="content-panel">
|
|
20
20
|
<div class="content-panel-header items-center">
|
|
21
21
|
<div class="font-semibold dark:text-gray-100">
|
|
22
|
-
<span class="mr-1">
|
|
22
|
+
<span class="mr-1">{{t "fleet-ops.component.order-config.fields-editor.custom-field-group"}}:</span>
|
|
23
23
|
{{#if group.value}}
|
|
24
24
|
<span>{{smart-humanize group.value}}</span>
|
|
25
25
|
{{else}}
|
|
26
|
-
<span>
|
|
26
|
+
<span>{{t "fleet-ops.component.order-config.fields-editor.default-field"}}</span>
|
|
27
27
|
{{/if}}
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
30
|
<div>
|
|
31
|
-
<Button @icon="plus" @iconPrefix="fas" @text=
|
|
31
|
+
<Button @icon="plus" @iconPrefix="fas" @text={{t "fleet-ops.component.order-config.fields-editor.new-field"}} @size="sm" @onClick={{fn this.addField group.value}} />
|
|
32
32
|
{{#if group.value}}
|
|
33
33
|
<Button @type="danger" @icon="times" @iconPrefix="fas" @size="sm" @onClick={{fn this.removeGroup group.value}} />
|
|
34
34
|
{{/if}}
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<div class="content-panel cursor-move">
|
|
42
42
|
<div class="content-panel-header items-center">
|
|
43
43
|
<div class="font-semibold dark:text-gray-100">
|
|
44
|
-
<span class="mr-1">
|
|
44
|
+
<span class="mr-1">{{t "fleet-ops.component.order-config.fields-editor.custom-field"}}:</span>
|
|
45
45
|
<span>{{metaField.label}}</span>
|
|
46
46
|
</div>
|
|
47
47
|
<a href="javascript:;" {{on "click" (fn this.removeField metaField)}} class="btn btn-danger btn-sm">
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
<InputGroup @name="Label" @value={{metaField.label}} {{on "keyup" (fn this.setFieldLabel metaField)}} />
|
|
54
54
|
<div class="input-group {{if (eq metaField.type "select") 'col-span-2'}}">
|
|
55
55
|
<div class="flex items-center justify-between">
|
|
56
|
-
<label class="font-medium flex-1">
|
|
56
|
+
<label class="font-medium flex-1">{{t "fleet-ops.component.order-config.fields-editor.type"}}</label>
|
|
57
57
|
</div>
|
|
58
58
|
<div class="flex items-center justify-between">
|
|
59
|
-
<Select class="w-full" @value={{metaField.type}} @options={{this.metaFieldTypes}} @optionLabel="label" @optionValue="key" @placeholder="
|
|
59
|
+
<Select class="w-full" @value={{metaField.type}} @options={{this.metaFieldTypes}} @optionLabel="label" @optionValue="key" @placeholder={{t "fleet-ops.component.order-config.fields-editor.select-type"}} @onSelect={{fn (mut metaField.type)}} />
|
|
60
60
|
{{#if (eq metaField.type "select")}}
|
|
61
61
|
<div class="pl-2">
|
|
62
62
|
<BasicDropdown @renderInPlace={{false}} as |dd|>
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
<div class="w-80 mt-2 rounded shadow-md be-white dark:bg-gray-800">
|
|
68
68
|
<div class="border border-gray-300 shdaow-sm rounded dark:border-gray-900">
|
|
69
69
|
<div class="flex items-start justify-between mb-1 p-3">
|
|
70
|
-
<Button @type="primary" @size="xs" @text=
|
|
70
|
+
<Button @type="primary" @size="xs" @text={{t "fleet-ops.component.order-config.fields-editor.add-option"}} @onClick={{fn this.addMetaFieldOption metaField}} />
|
|
71
71
|
<div class="flex flex-col space-y-3">
|
|
72
72
|
<Toggle @label="Key-Value" @isToggled={{metaField.useKvOptions}} @onToggle={{fn this.toggleMetaFieldKv metaField}} />
|
|
73
73
|
{{#unless metaField.useKvOptions}}
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
<div class="flex items-start flex-1">
|
|
85
85
|
<div class="space-y-3 flex flex-col pr-2 flex-1">
|
|
86
86
|
{{#if metaField.useKvOptions}}
|
|
87
|
-
<Input @type="text" @value={{option.key}} class="form-input form-input-sm" placeholder="
|
|
87
|
+
<Input @type="text" @value={{option.key}} class="form-input form-input-sm" placeholder={{t "fleet-ops.common.key"}} />
|
|
88
88
|
{{/if}}
|
|
89
|
-
<Input @type="text" @value={{option.value}} class="form-input form-input-sm" placeholder="
|
|
89
|
+
<Input @type="text" @value={{option.value}} class="form-input form-input-sm" placeholder={{t "fleet-ops.common.value"}} />
|
|
90
90
|
</div>
|
|
91
91
|
<Button @size="xs" @type="danger" @icon="trash" @onClick={{fn this.removeMetaFieldOption metaField option}} />
|
|
92
92
|
</div>
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
{{/if}}
|
|
104
104
|
</div>
|
|
105
105
|
</div>
|
|
106
|
-
<InputGroup @name="
|
|
106
|
+
<InputGroup @name={{t "fleet-ops.common.description"}} @value={{metaField.description}} />
|
|
107
107
|
<div class="input-group">
|
|
108
108
|
<Checkbox @label="Required" @onToggle={{fn (mut metaField.required)}} @value={{metaField.required}} />
|
|
109
109
|
</div>
|
|
@@ -17,6 +17,7 @@ export default class OrderConfigFieldsEditorComponent extends Component {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
@service intl;
|
|
20
21
|
@service modalsManager;
|
|
21
22
|
@service notifications;
|
|
22
23
|
|
|
@@ -25,34 +26,34 @@ export default class OrderConfigFieldsEditorComponent extends Component {
|
|
|
25
26
|
@tracked fields = [];
|
|
26
27
|
@tracked metaFieldTypes = [
|
|
27
28
|
{
|
|
28
|
-
label: '
|
|
29
|
+
label: this.intl.t('fleet-ops.component.order-config.fields-editor.text-field'),
|
|
29
30
|
key: 'text',
|
|
30
31
|
},
|
|
31
32
|
{
|
|
32
|
-
label: '
|
|
33
|
-
description: '
|
|
33
|
+
label: this.intl.t('fleet-ops.component.order-config.fields-editor.boolean'),
|
|
34
|
+
description: this.intl.t('fleet-ops.component.order-config.fields-editor.boolean-text'),
|
|
34
35
|
key: 'boolean',
|
|
35
36
|
},
|
|
36
37
|
{
|
|
37
|
-
label: '
|
|
38
|
-
description: '
|
|
38
|
+
label: this.intl.t('fleet-ops.component.order-config.fields-editor.dropdown'),
|
|
39
|
+
description: this.intl.t('fleet-ops.component.order-config.fields-editor.dropdown-text'),
|
|
39
40
|
key: 'select',
|
|
40
41
|
hasOptions: true,
|
|
41
42
|
},
|
|
42
43
|
{
|
|
43
|
-
label: '
|
|
44
|
-
description: '
|
|
44
|
+
label: this.intl.t('fleet-ops.component.order-config.fields-editor.datetime'),
|
|
45
|
+
description: this.intl.t('fleet-ops.component.order-config.fields-editor.datetime'),
|
|
45
46
|
key: 'datetime',
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
|
-
label: '
|
|
49
|
-
description: '
|
|
49
|
+
label: this.intl.t('fleet-ops.component.order-config.fields-editor.port'),
|
|
50
|
+
description: this.intl.t('fleet-ops.component.order-config.fields-editor.port-text'),
|
|
50
51
|
serialize: 'model:port',
|
|
51
52
|
key: 'port',
|
|
52
53
|
},
|
|
53
54
|
{
|
|
54
|
-
label: '
|
|
55
|
-
description: '
|
|
55
|
+
label: this.intl.t('fleet-ops.component.order-config.fields-editor.vessel'),
|
|
56
|
+
description: this.intl.t('fleet-ops.component.order-config.fields-editor.vessel-text'),
|
|
56
57
|
serialize: 'model:vessel',
|
|
57
58
|
key: 'vessel',
|
|
58
59
|
},
|
|
@@ -99,7 +100,7 @@ export default class OrderConfigFieldsEditorComponent extends Component {
|
|
|
99
100
|
const groupName = modal.getOption('groupName');
|
|
100
101
|
|
|
101
102
|
if (typeof groupName !== 'string') {
|
|
102
|
-
return this.notifications.warning('
|
|
103
|
+
return this.notifications.warning(this.intl.t('fleet-ops.component.order-config.fields-editor.warning-message'));
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
const group = underscore(groupName.toLowerCase());
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
<div class="space-y-1">
|
|
3
3
|
<div class="px-5 mt-6 flex">
|
|
4
4
|
<div class="flex-1">
|
|
5
|
-
<InfoBlock class="px-3 py-2">
|
|
5
|
+
<InfoBlock class="px-3 py-2">{{t "fleet-ops.component.order-config.select-message"}}</InfoBlock>
|
|
6
6
|
</div>
|
|
7
7
|
<div>
|
|
8
|
-
<Button class="ml-6" @icon="plus" @iconPrefix="fas" @text=
|
|
8
|
+
<Button class="ml-6" @icon="plus" @iconPrefix="fas" @text={{t "fleet-ops.component.order-config.new-config"}} @size="md" @onClick={{this.createNewOrderConfig}} />
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
11
11
|
<div class="flex items-center justify-between p-4">
|
|
12
12
|
{{#if this.isLoading}}
|
|
13
13
|
<div class="flex text-center items-center justify-center p-4">
|
|
14
14
|
<Spinner class="mr-2 dark:text-gray-100" />
|
|
15
|
-
<span class="dark:text-gray-100">
|
|
15
|
+
<span class="dark:text-gray-100">{{t "fleet-ops.component.order-config.loading-configuration"}}</span>
|
|
16
16
|
</div>
|
|
17
17
|
{{else}}
|
|
18
|
-
<Select class="w-full flex-1" @value={{this.selected}} @options={{this.configurations}} @optionLabel="name" @optionValue="namespace" @placeholder="
|
|
18
|
+
<Select class="w-full flex-1" @value={{this.selected}} @options={{this.configurations}} @optionLabel="name" @optionValue="namespace" @placeholder={{t "fleet-ops.component.order-config.select-order"}} @onSelect={{this.selectConfig}} />
|
|
19
19
|
{{#if this.selected}}
|
|
20
20
|
<div class="pl-6">
|
|
21
|
-
<Button @type="primary" @icon="save" @text=
|
|
21
|
+
<Button @type="primary" @icon="save" @text={{t "fleet-ops.component.order-config.save-changes"}} @size="md" @isLoading={{this.isSaving}} @onClick={{this.saveConfig}} />
|
|
22
22
|
</div>
|
|
23
23
|
{{/if}}
|
|
24
24
|
{{/if}}
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
<nav>
|
|
31
31
|
<a href="javascript:;" class="ui-tab {{if (eq this.activeTab 'details') 'active'}}" {{on "click" (fn
|
|
32
32
|
(mut this.activeTab) "details" )}}>
|
|
33
|
-
|
|
33
|
+
{{t "fleet-ops.component.order-config.details"}}
|
|
34
34
|
</a>
|
|
35
35
|
<a href="javascript:;" class="ui-tab {{if (eq this.activeTab 'meta') 'active'}}" {{on "click" (fn
|
|
36
36
|
(mut this.activeTab) "meta" )}}>
|
|
37
|
-
|
|
37
|
+
{{t "fleet-ops.component.order-config.fields"}}
|
|
38
38
|
</a>
|
|
39
39
|
<a href="javascript:;" class="ui-tab {{if (eq this.activeTab 'activity') 'active'}}" {{on "click"
|
|
40
40
|
(fn (mut this.activeTab) "activity" )}}>
|
|
41
|
-
|
|
41
|
+
{{t "fleet-ops.component.order-config.flow"}}
|
|
42
42
|
</a>
|
|
43
43
|
<a href="javascript:;" class="ui-tab {{if (eq this.activeTab 'entities') 'active'}}" {{on "click"
|
|
44
44
|
(fn (mut this.activeTab) "entities" )}}>
|
|
45
|
-
|
|
45
|
+
{{t "fleet-ops.component.order-config.entities"}}
|
|
46
46
|
</a>
|
|
47
47
|
</nav>
|
|
48
48
|
</div>
|
|
@@ -9,6 +9,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
9
9
|
@service modalsManager;
|
|
10
10
|
@service fetch;
|
|
11
11
|
@service socket;
|
|
12
|
+
@service intl;
|
|
12
13
|
@service store;
|
|
13
14
|
@service notifications;
|
|
14
15
|
@service crud;
|
|
@@ -95,7 +96,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
95
96
|
const tags = [];
|
|
96
97
|
|
|
97
98
|
this.modalsManager.show('modals/new-order-config', {
|
|
98
|
-
title: '
|
|
99
|
+
title: this.intl.t('fleet-ops.component.order-config.create-new-title'),
|
|
99
100
|
acceptButtonIcon: 'check',
|
|
100
101
|
acceptButtonIconPrefix: 'fas',
|
|
101
102
|
declineButtonIcon: 'times',
|
|
@@ -116,7 +117,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
116
117
|
|
|
117
118
|
if (!name) {
|
|
118
119
|
modal.stopLoading();
|
|
119
|
-
return this.notifications.warning('
|
|
120
|
+
return this.notifications.warning(this.intl.t('fleet-ops.component.order-config.warning-message'));
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
return this.fetch
|
|
@@ -125,7 +126,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
125
126
|
const newConfigExtension = this.fetch.jsonToModel(newConfig, 'extension');
|
|
126
127
|
|
|
127
128
|
this.configurations.pushObject(newConfigExtension);
|
|
128
|
-
this.notifications.success('
|
|
129
|
+
this.notifications.success(this.intl.t('fleet-ops.component.order-config.success-message'));
|
|
129
130
|
this.selectConfig(newConfigExtension.namespace);
|
|
130
131
|
})
|
|
131
132
|
.catch((error) => {
|
|
@@ -139,7 +140,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
139
140
|
const { orderConfig } = this;
|
|
140
141
|
|
|
141
142
|
if (!orderConfig) {
|
|
142
|
-
this.notifications.warning('
|
|
143
|
+
this.notifications.warning(this.intl.t('fleet-ops.component.order-config.no-order-warning'));
|
|
143
144
|
|
|
144
145
|
return;
|
|
145
146
|
}
|
|
@@ -150,7 +151,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
150
151
|
data: orderConfig,
|
|
151
152
|
})
|
|
152
153
|
.then(() => {
|
|
153
|
-
this.notifications.success(
|
|
154
|
+
this.notifications.success(this.intl.t('fleet-ops.component.order-config.saved-success', { orderName: orderConfig.name }));
|
|
154
155
|
this.isSaving = false;
|
|
155
156
|
})
|
|
156
157
|
.catch((error) => {
|
|
@@ -164,7 +165,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
164
165
|
const description = extension.description;
|
|
165
166
|
|
|
166
167
|
this.modalsManager.show('modals/clone-config-form', {
|
|
167
|
-
title: '
|
|
168
|
+
title: this.intl.t('fleet-ops.component.order-config.enter-name-title'),
|
|
168
169
|
acceptButtonIcon: 'check',
|
|
169
170
|
acceptButtonIconPrefix: 'fas',
|
|
170
171
|
declineButtonIcon: 'times',
|
|
@@ -177,7 +178,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
177
178
|
const { name, description } = modal.getOptions();
|
|
178
179
|
|
|
179
180
|
if (!name) {
|
|
180
|
-
return this.notifications.warning('
|
|
181
|
+
return this.notifications.warning(this.intl.t('fleet-ops.component.order-config.no-config-warning'));
|
|
181
182
|
}
|
|
182
183
|
|
|
183
184
|
return this.fetch
|
|
@@ -190,7 +191,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
190
191
|
.then((newConfig) => {
|
|
191
192
|
const clone = this.fetch.jsonToModel(newConfig, 'extension');
|
|
192
193
|
this.configurations.pushObject(clone);
|
|
193
|
-
this.notifications.success('
|
|
194
|
+
this.notifications.success(this.intl.t('fleet-ops.component.order-config.cloned-success'));
|
|
194
195
|
this.selectConfig(clone.namespace);
|
|
195
196
|
})
|
|
196
197
|
.catch((error) => {
|
|
@@ -204,7 +205,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
204
205
|
const uninstall = isModel(extension) ? extension : this.fetch.jsonToModel(extension, 'extension');
|
|
205
206
|
|
|
206
207
|
return this.crud.delete(uninstall, {
|
|
207
|
-
body: '
|
|
208
|
+
body: this.intl.t('fleet-ops.component.order-config.body'),
|
|
208
209
|
acceptButtonIcon: 'trash',
|
|
209
210
|
declineButtonIcon: 'times',
|
|
210
211
|
declineButtonIconPrefix: 'fas',
|
|
@@ -221,7 +222,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
221
222
|
this.listenForUninstallProgress(extension);
|
|
222
223
|
|
|
223
224
|
this.modalsManager.show('modals/uninstall-prompt', {
|
|
224
|
-
title: '
|
|
225
|
+
title: this.intl.t('fleet-ops.component.order-config.uninstall-title'),
|
|
225
226
|
acceptButtonText: 'Uninstall',
|
|
226
227
|
acceptButtonScheme: 'danger',
|
|
227
228
|
extension,
|
|
@@ -236,7 +237,7 @@ export default class OrderConfigComponent extends Component {
|
|
|
236
237
|
.uninstall()
|
|
237
238
|
.then(() => {
|
|
238
239
|
this.closeUninstallChannel();
|
|
239
|
-
this.notifications.success(
|
|
240
|
+
this.notifications.success(this.intl.t('fleet-ops.component.order-config.uninstall-success', { extensionName: extensionName }));
|
|
240
241
|
this.configurations.removeObject(extension);
|
|
241
242
|
this.selected = undefined;
|
|
242
243
|
done();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<div class="absolute h-full left-0 top-0 bottom-0 pl-4 flex items-center justify-center">
|
|
5
5
|
<FaIcon @icon="search" />
|
|
6
6
|
</div>
|
|
7
|
-
<Input @value={{this.query}} @type="text" placeholder=
|
|
7
|
+
<Input @value={{this.query}} @type="text" placeholder={{t "fleet-ops.component.order-list-overlay.search"}} class="w-full p-0 m-0 h-full bg-transparent order-list-overlay-search" />
|
|
8
8
|
</div>
|
|
9
9
|
{{#if this.selectedOrders.length}}
|
|
10
10
|
<BasicDropdown class="mr-2" @renderInPlace={{true}} as |dd|>
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
<div class="next-dd-menu">
|
|
18
18
|
<div class="px-1">
|
|
19
19
|
<div class="text-sm flex flex-row items-center px-3 py-0.5 rounded-md my-1">
|
|
20
|
-
|
|
20
|
+
{{t "fleet-ops.component.order-list-overlay.selected"}} {{pluralize this.selectedOrders.length "Order"}}
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
<div class="next-dd-menu-seperator"></div>
|
|
24
24
|
<div class="px-1">
|
|
25
|
-
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.onDropdownAction dd "onPressAssignOrders")}}>
|
|
26
|
-
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.onDropdownAction dd "onPressCancelOrders" this.selectedOrders)}}>
|
|
27
|
-
<a href="javascript:;" class="next-dd-item text-danger" {{on "click" (fn this.onDropdownAction dd "onPressDeleteOrders" this.selectedOrders)}}>
|
|
25
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.onDropdownAction dd "onPressAssignOrders")}}>{{t "fleet-ops.component.order-list-overlay.assign"}}</a>
|
|
26
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.onDropdownAction dd "onPressCancelOrders" this.selectedOrders)}}>{{t "fleet-ops.component.order-list-overlay.cancel"}}</a>
|
|
27
|
+
<a href="javascript:;" class="next-dd-item text-danger" {{on "click" (fn this.onDropdownAction dd "onPressDeleteOrders" this.selectedOrders)}}>{{t "fleet-ops.component.order-list-overlay.delete"}}</a>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
30
30
|
</dd.Content>
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
<div class="next-dd-menu">
|
|
41
41
|
<div class="px-1">
|
|
42
42
|
<div class="text-sm flex flex-row items-center px-3 py-0.5 rounded-md my-1">
|
|
43
|
-
|
|
43
|
+
{{t "fleet-ops.component.order-list-overlay.actions"}}
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
46
|
<div class="next-dd-menu-seperator"></div>
|
|
47
47
|
<div class="px-1">
|
|
48
|
-
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.onDropdownAction dd "onPressCreateOrder")}}>
|
|
49
|
-
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.onDropdownAction dd "onPressCreateFleet")}}>
|
|
48
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.onDropdownAction dd "onPressCreateOrder")}}>{{t "fleet-ops.component.order-list-overlay.create-order"}}</a>
|
|
49
|
+
<a href="javascript:;" class="next-dd-item" {{on "click" (fn this.onDropdownAction dd "onPressCreateFleet")}}>{{t "fleet-ops.component.order-list-overlay.create-fleet"}}</a>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
52
|
</dd.Content>
|
|
@@ -57,34 +57,34 @@
|
|
|
57
57
|
{{#if this.isLoading}}
|
|
58
58
|
<div class="flex items-center p-4">
|
|
59
59
|
<Spinner class="mr-2" />
|
|
60
|
-
<span>
|
|
60
|
+
<span>{{t "fleet-ops.common.loading"}}</span>
|
|
61
61
|
</div>
|
|
62
62
|
{{/if}}
|
|
63
63
|
|
|
64
64
|
<div class="space-y-4 orders-panel-fleets">
|
|
65
65
|
<div class="next-content-panel-wrapper mb-2">
|
|
66
|
-
<ContentPanel @title=
|
|
66
|
+
<ContentPanel @title={{t "fleet-ops.component.order-list-overlay.active-order"}} @subtitle={{pluralize this.activeOrders.length "Order"}} @open={{this.activeOrders.length}} @pad={{true}} @panelSubtitleInlineClass="text-xs" @panelBodyClass="order-listings bg-white dark:bg-gray-800">
|
|
67
67
|
{{#each this.activeOrders as |order index|}}
|
|
68
68
|
<OrderListOverlay::Order @order={{order}} @index={{add index 1}} @isSelected={{includes order this.selectedOrders}} @onClick={{this.selectOrder}} @onDoubleClick={{fn this.onAction "onPressViewOrder"}} as |isSelected|>
|
|
69
69
|
{{#if isSelected}}
|
|
70
70
|
<div class="order-listings-row selected px-4 py-2">
|
|
71
71
|
<div class="flex flex-row items-center space-x-2">
|
|
72
72
|
{{!-- <Button @type="default" @icon="map" @text="Map" @size="xs" class="btn-transparent-border" /> --}}
|
|
73
|
-
<Button @type="default" @icon="file-invoice" @text="
|
|
73
|
+
<Button @type="default" @icon="file-invoice" @text={{t "fleet-ops.common.details"}} @size="xs" class="btn-transparent-border" @onClick={{fn this.onAction "onPressViewOrder" order}} />
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
76
76
|
{{/if}}
|
|
77
77
|
</OrderListOverlay::Order>
|
|
78
78
|
{{/each}}
|
|
79
79
|
</ContentPanel>
|
|
80
|
-
<ContentPanel @title=
|
|
80
|
+
<ContentPanel @title={{t "fleet-ops.component.order-list-overlay.unassigned-order"}} @subtitle={{pluralize this.unassignedOrders.length "Order"}} @open={{this.unassignedOrders.length}} @pad={{true}} @panelSubtitleInlineClass="text-xs" @panelBodyClass="order-listings bg-white dark:bg-gray-800">
|
|
81
81
|
{{#each this.unassignedOrders as |order index|}}
|
|
82
82
|
<OrderListOverlay::Order @order={{order}} @index={{add index 1}} @isSelected={{includes order this.selectedOrders}} @onClick={{this.selectOrder}} @onDoubleClick={{fn this.onAction "onPressViewOrder"}} as |isSelected|>
|
|
83
83
|
{{#if isSelected}}
|
|
84
84
|
<div class="order-listings-row selected px-4 py-2">
|
|
85
85
|
<div class="flex flex-row items-center space-x-2">
|
|
86
86
|
{{!-- <Button @type="default" @icon="map" @text="Map" @size="xs" class="btn-transparent-border" /> --}}
|
|
87
|
-
<Button @type="default" @icon="file-invoice" @text="
|
|
87
|
+
<Button @type="default" @icon="file-invoice" @text={{t "fleet-ops.common.details"}} @size="xs" class="btn-transparent-border" @onClick={{fn this.onAction "onPressViewOrder" order}} />
|
|
88
88
|
</div>
|
|
89
89
|
</div>
|
|
90
90
|
{{/if}}
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
<div class="order-listings-row selected px-4 py-2">
|
|
106
106
|
<div class="flex flex-row items-center space-x-2">
|
|
107
107
|
{{!-- <Button @type="default" @icon="map" @text="Map" @size="xs" class="btn-transparent-border" /> --}}
|
|
108
|
-
<Button @type="default" @icon="file-invoice" @text="
|
|
108
|
+
<Button @type="default" @icon="file-invoice" @text={{t "fleet-ops.common.details"}} @size="xs" class="btn-transparent-border" @onClick={{fn this.onAction "onPressViewOrder" order}} />
|
|
109
109
|
</div>
|
|
110
110
|
</div>
|
|
111
111
|
{{/if}}
|