@fleetbase/fleetops-engine 0.3.1 → 0.3.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/contact-form-panel.hbs +82 -0
- package/addon/components/contact-form-panel.js +195 -0
- package/addon/components/contact-panel/details.hbs +36 -0
- package/addon/components/contact-panel/details.js +3 -0
- package/addon/components/contact-panel.hbs +52 -0
- package/addon/components/contact-panel.js +161 -0
- package/addon/components/driver-form-panel.hbs +39 -55
- package/addon/components/driver-form-panel.js +41 -0
- package/addon/components/driver-panel/details.hbs +2 -2
- package/addon/components/driver-panel.hbs +12 -10
- package/addon/components/driver-panel.js +13 -0
- package/addon/components/fleet-form-panel.hbs +28 -28
- package/addon/components/fleet-form-panel.js +150 -1
- package/addon/components/fleet-listing-panel.hbs +8 -0
- package/addon/components/fleet-listing-panel.js +34 -0
- package/addon/components/fleet-panel/details.hbs +30 -0
- package/addon/components/fleet-panel/driver-listing.hbs +72 -0
- package/addon/components/fleet-panel/driver-listing.js +149 -0
- package/addon/components/fleet-panel/vehicle-listing.hbs +72 -0
- package/addon/components/fleet-panel/vehicle-listing.js +149 -0
- package/addon/components/fleet-panel.hbs +12 -58
- package/addon/components/fleet-panel.js +148 -26
- package/addon/components/fleet-vehicle-listing.hbs +0 -1
- package/addon/components/fuel-report-form-panel.hbs +41 -0
- package/addon/components/fuel-report-form-panel.js +122 -0
- package/addon/components/fuel-report-panel/details.hbs +38 -0
- package/addon/components/fuel-report-panel.hbs +30 -0
- package/addon/components/fuel-report-panel.js +161 -0
- package/addon/components/issue-form-panel.hbs +85 -0
- package/addon/components/issue-form-panel.js +211 -0
- package/addon/components/issue-panel/details.hbs +48 -0
- package/addon/components/issue-panel.hbs +30 -0
- package/addon/components/issue-panel.js +160 -0
- package/addon/components/layout/fleet-ops-sidebar.hbs +2 -2
- package/addon/components/live-map.js +2 -0
- package/addon/components/map-container/toolbar.hbs +9 -9
- package/addon/components/map-container/topbar.hbs +1 -1
- package/addon/components/modals/issue-details.hbs +38 -0
- package/addon/components/modals/issue-from.hbs +138 -0
- package/addon/components/place-form-panel.hbs +50 -0
- package/addon/components/place-form-panel.js +134 -0
- package/addon/components/place-panel/details.hbs +95 -0
- package/addon/components/place-panel.hbs +30 -0
- package/addon/components/place-panel.js +161 -0
- package/addon/components/vehicle-form-panel.hbs +35 -44
- package/addon/components/vehicle-form-panel.js +41 -0
- package/addon/components/vehicle-panel/details.hbs +8 -2
- package/addon/components/vehicle-panel.hbs +8 -6
- package/addon/components/vendor-form-panel/create-form.hbs +114 -0
- package/addon/components/vendor-form-panel/create-form.js +158 -0
- package/addon/components/vendor-form-panel/edit-form.hbs +98 -0
- package/addon/components/vendor-form-panel/edit-form.js +51 -0
- package/addon/components/vendor-form-panel.hbs +48 -0
- package/addon/components/vendor-form-panel.js +226 -0
- package/addon/components/vendor-panel/details.hbs +77 -0
- package/addon/components/vendor-panel/details.js +12 -0
- package/addon/components/vendor-panel.hbs +58 -0
- package/addon/components/vendor-panel.js +161 -0
- package/addon/controllers/management/contacts/index/details.js +55 -0
- package/addon/controllers/management/contacts/index/edit.js +111 -0
- package/addon/controllers/management/contacts/index/new.js +88 -0
- package/addon/controllers/management/contacts/index.js +23 -128
- package/addon/controllers/management/drivers/index/new.js +2 -2
- package/addon/controllers/management/drivers/index.js +18 -32
- package/addon/controllers/management/fleets/index/details.js +53 -0
- package/addon/controllers/management/fleets/index/edit.js +75 -41
- package/addon/controllers/management/fleets/index/new.js +42 -57
- package/addon/controllers/management/fleets/index.js +0 -1
- package/addon/controllers/management/fuel-reports/index/details.js +63 -0
- package/addon/controllers/management/fuel-reports/index/edit.js +111 -0
- package/addon/controllers/management/fuel-reports/index/new.js +95 -0
- package/addon/controllers/management/fuel-reports/index.js +57 -127
- package/addon/controllers/management/issues/index/details.js +54 -0
- package/addon/controllers/management/issues/index/edit.js +111 -0
- package/addon/controllers/management/issues/index/new.js +94 -0
- package/addon/controllers/management/issues/index.js +131 -26
- package/addon/controllers/management/places/index/details.js +55 -0
- package/addon/controllers/management/places/index/edit.js +111 -0
- package/addon/controllers/management/places/index/new.js +88 -0
- package/addon/controllers/management/places/index.js +21 -182
- package/addon/controllers/management/vehicles/index/new.js +2 -6
- package/addon/controllers/management/vendors/index/details.js +55 -0
- package/addon/controllers/management/vendors/index/edit.js +111 -0
- package/addon/controllers/management/vendors/index/new.js +88 -0
- package/addon/controllers/management/vendors/index.js +43 -247
- package/addon/routes/management/contacts/index/details.js +14 -0
- package/addon/routes/management/contacts/index/edit.js +10 -0
- package/addon/routes/management/contacts/index/new.js +3 -0
- package/addon/routes/management/contacts/index.js +1 -1
- package/addon/routes/management/fleets/index/details.js +1 -1
- package/addon/routes/management/fleets/index/edit.js +1 -1
- package/addon/routes/management/fleets/index.js +1 -1
- package/addon/routes/management/fuel-reports/index/details.js +14 -0
- package/addon/routes/management/fuel-reports/index/edit.js +10 -0
- package/addon/routes/management/fuel-reports/index/new.js +3 -0
- package/addon/routes/management/fuel-reports/index.js +3 -1
- package/addon/routes/management/issues/index/details.js +14 -0
- package/addon/routes/management/issues/index/edit.js +10 -0
- package/addon/routes/management/issues/index/new.js +3 -0
- package/addon/routes/management/issues/index.js +1 -1
- package/addon/routes/management/places/index/details.js +14 -0
- package/addon/routes/management/places/index/edit.js +10 -0
- package/addon/routes/management/places/index/new.js +3 -0
- package/addon/routes/management/places/index.js +6 -1
- package/addon/routes/management/vendors/index/details.js +15 -0
- package/addon/routes/management/vendors/index/edit.js +11 -0
- package/addon/routes/management/vendors/index/new.js +3 -0
- package/addon/routes/management/vendors/index.js +1 -0
- package/addon/routes.js +27 -7
- package/addon/services/context-panel.js +60 -0
- package/addon/templates/management/contacts/index/details.hbs +1 -0
- package/addon/templates/management/contacts/index/edit.hbs +1 -0
- package/addon/templates/management/contacts/index/new.hbs +1 -0
- package/addon/templates/management/contacts/index.hbs +22 -3
- package/addon/templates/management/drivers/index.hbs +29 -5
- package/addon/templates/management/fleets/index/details.hbs +1 -1
- package/addon/templates/management/fleets/index/edit.hbs +1 -1
- package/addon/templates/management/fleets/index/new.hbs +1 -1
- package/addon/templates/management/fuel-reports/index/details.hbs +1 -0
- package/addon/templates/management/fuel-reports/index/edit.hbs +1 -0
- package/addon/templates/management/fuel-reports/index/new.hbs +1 -0
- package/addon/templates/management/fuel-reports/index.hbs +25 -4
- package/addon/templates/management/issues/index/details.hbs +1 -0
- package/addon/templates/management/issues/index/edit.hbs +1 -0
- package/addon/templates/management/issues/index/new.hbs +1 -0
- package/addon/templates/management/issues/index.hbs +5 -3
- package/addon/templates/management/places/index/details.hbs +1 -0
- package/addon/templates/management/places/index/edit.hbs +1 -0
- package/addon/templates/management/places/index/new.hbs +1 -0
- package/addon/templates/management/vendors/index/details.hbs +1 -0
- package/addon/templates/management/vendors/index/edit.hbs +1 -0
- package/addon/templates/management/vendors/index/new.hbs +1 -0
- package/addon/templates/operations/orders/index.hbs +3 -3
- package/app/components/contact-form-panel.js +1 -0
- package/app/components/contact-panel/details.js +1 -0
- package/app/components/contact-panel.js +1 -0
- package/app/components/fleet-listing-panel.js +1 -0
- package/app/components/fleet-panel/details.js +1 -0
- package/app/components/fleet-panel/driver-listing.js +1 -0
- package/app/components/fleet-panel/vehicle-listing.js +1 -0
- package/app/components/fuel-report-form-panel.js +1 -0
- package/app/components/fuel-report-panel.js +1 -0
- package/app/components/issue-form-panel.js +1 -0
- package/app/components/issue-panel.js +1 -0
- package/app/components/place-form-panel.js +1 -0
- package/app/components/place-panel.js +1 -0
- package/app/components/vendor-form-panel/create-form.js +1 -0
- package/app/components/vendor-form-panel/edit-form.js +1 -0
- package/app/components/vendor-form-panel.js +1 -0
- package/app/components/vendor-panel/details.js +1 -0
- package/app/components/vendor-panel.js +1 -0
- package/app/controllers/management/contacts/index/details.js +1 -0
- package/app/controllers/management/contacts/index/edit.js +1 -0
- package/app/controllers/management/contacts/index/new.js +1 -0
- package/app/controllers/management/fuel-reports/index/details.js +1 -0
- package/app/controllers/management/fuel-reports/index/edit.js +1 -0
- package/app/controllers/management/fuel-reports/index/new.js +1 -0
- package/app/controllers/management/issues/index/details.js +1 -0
- package/app/controllers/management/issues/index/edit.js +1 -0
- package/app/controllers/management/issues/index/new.js +1 -0
- package/app/controllers/management/places/index/details.js +1 -0
- package/app/controllers/management/places/index/edit.js +1 -0
- package/app/controllers/management/places/index/new.js +1 -0
- package/app/controllers/management/vendors/index/edit.js +1 -0
- package/app/controllers/management/vendors/index/new.js +1 -0
- package/app/routes/addon/routes/management/places/index/new.js +1 -0
- package/app/routes/management/contacts/index/details.js +1 -0
- package/app/routes/management/contacts/index/edit.js +1 -0
- package/app/routes/management/contacts/index/new.js +1 -0
- package/app/routes/management/fuel-reports/index/details.js +1 -0
- package/app/routes/management/fuel-reports/index/edit.js +1 -0
- package/app/routes/management/fuel-reports/index/new.js +1 -0
- package/app/routes/management/issues/index/details.js +1 -0
- package/app/routes/management/issues/index/edit.js +1 -0
- package/app/routes/management/issues/index/new.js +1 -0
- package/app/routes/management/places/index/details.js +1 -0
- package/app/routes/management/places/index/edit.js +1 -0
- package/app/routes/management/places/index/new.js +1 -0
- package/app/routes/management/vendors/index/details.js +1 -0
- package/app/routes/management/vendors/index/edit.js +1 -0
- package/app/routes/management/vendors/index/new.js +1 -0
- package/app/templates/addon/routes/management/places/index/new.js +1 -0
- package/app/templates/management/contacts/index/details.js +1 -0
- package/app/templates/management/contacts/index/edit.js +1 -0
- package/app/templates/management/contacts/index/new.js +1 -0
- package/app/templates/management/fuel-reports/index/details.js +1 -0
- package/app/templates/management/fuel-reports/index/edit.js +1 -0
- package/app/templates/management/fuel-reports/index/new.js +1 -0
- package/app/templates/management/issues/index/details.js +1 -0
- package/app/templates/management/issues/index/edit.js +1 -0
- package/app/templates/management/issues/index/new.js +1 -0
- package/app/templates/management/places/index/details.js +1 -0
- package/app/templates/management/places/index/edit.js +1 -0
- package/app/templates/management/places/index/new.js +1 -0
- package/app/templates/management/vendors/index/details.js +1 -0
- package/app/templates/management/vendors/index/edit.js +1 -0
- package/app/templates/management/vendors/index/new.js +1 -0
- package/composer.json +1 -1
- package/config/environment.js +2 -1
- package/extension.json +1 -1
- package/package.json +4 -3
- package/server/migrations/2023_11_03_072503_refactor_issues_table_columns.php +42 -0
- package/server/migrations/2023_11_06_040645_refactor_fuel_reports_table.php +38 -0
- package/server/src/Casts/Point.php +15 -1
- package/server/src/Http/Controllers/Internal/v1/DriverController.php +33 -15
- package/server/src/Http/Filter/FleetFilter.php +7 -0
- package/server/src/Http/Filter/FuelReportFilter.php +58 -0
- package/server/src/Http/Filter/IssueFilter.php +69 -0
- package/server/src/Http/Filter/VehicleFilter.php +10 -0
- package/server/src/Http/Middleware/TransformLocationMiddleware.php +48 -0
- package/server/src/Http/Resources/v1/Driver.php +1 -0
- package/server/src/Http/Resources/v1/Fleet.php +20 -21
- package/server/src/Http/Resources/v1/FuelReport.php +37 -35
- package/server/src/Http/Resources/v1/Issue.php +77 -0
- package/server/src/Http/Resources/v1/ParentFleet.php +60 -0
- package/server/src/Http/Resources/v1/SubFleet.php +60 -0
- package/server/src/Http/Resources/v1/Vehicle.php +4 -2
- package/server/src/Integrations/Lalamove/Lalamove.php +6 -6
- package/server/src/Models/Contact.php +7 -0
- package/server/src/Models/Driver.php +1 -1
- package/server/src/Models/Fleet.php +35 -4
- package/server/src/Models/FuelReport.php +53 -3
- package/server/src/Models/Issue.php +106 -7
- package/server/src/Models/Vehicle.php +1 -1
- package/server/src/Models/VehicleDevice.php +3 -1
- package/server/src/Models/VehicleDeviceEvent.php +7 -3
- package/server/src/Notifications/OrderAssigned.php +0 -6
- package/server/src/Notifications/OrderCanceled.php +0 -6
- package/server/src/Notifications/OrderDispatchFailed.php +0 -6
- package/server/src/Notifications/OrderDispatched.php +0 -6
- package/server/src/Notifications/OrderPing.php +0 -6
- package/server/src/Notifications/OrderSplit.php +0 -6
- package/server/src/Providers/NotificationServiceProvider.php +1 -1
- package/server/src/routes.php +2 -2
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<Overlay @onLoad={{this.setOverlayContext}} @position="right" @noBackdrop={{true}} @fullHeight={{true}} @isResizeble={{or this.isResizable @isResizable}} @width={{or this.width @width "600px"}}>
|
|
2
|
+
<Overlay::Header @hideLeftSection={{true}} @actionsWrapperClass="flex-1 flex-col py-3" class="h-auto-i min-h-[127px]">
|
|
3
|
+
<div class="flex flex-row items-center justify-between w-full mb-4">
|
|
4
|
+
<div class="flex flex-1 space-x-2">
|
|
5
|
+
{{#if this.contact.id}}
|
|
6
|
+
<Button @type="default" @icon="id-card" @helpText="View contact details" @onClick={{this.onViewDetails}} />
|
|
7
|
+
{{/if}}
|
|
8
|
+
</div>
|
|
9
|
+
<div class="flex flex-1 justify-end">
|
|
10
|
+
<div class="mr-2">
|
|
11
|
+
<Button @icon={{if this.contact.id "save" "check"}} @type="primary" @text={{if this.contact.id "Save Contact" "Create Contact"}} @onClick={{this.save}} />
|
|
12
|
+
</div>
|
|
13
|
+
<Button @type="default" @icon="times" @helpText={{if this.contact.id "Cancel edit contact" "Cancel new contact"}} @onClick={{this.onPressCancel}} />
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="flex flex-row justify-between w-full">
|
|
17
|
+
<div class="flex flex-col flex-1 w-3/4">
|
|
18
|
+
<div class="flex flex-row">
|
|
19
|
+
<div class="w-14">
|
|
20
|
+
<div class="w-12 h-12 flex items-center justify-start relative hover:bg-gray-100 transition-all rounded-lg overflow-hidden">
|
|
21
|
+
<img src={{this.contact.photo_url}} alt={{this.contact.name}} height="48" width="48" class="h-12 w-12 rounded-lg shadow-sm" />
|
|
22
|
+
<Attach::Tooltip @class="clean" @animation="scale" @placement="top">
|
|
23
|
+
<InputInfo @text={{this.contact.public_id}} />
|
|
24
|
+
</Attach::Tooltip>
|
|
25
|
+
<div class="absolute inset-0 flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity bg-gray-600 bg-opacity-50 rounded-lg">
|
|
26
|
+
<UploadButton @name="photos" @accept="image/*" @onFileAdded={{this.onUploadNewPhoto}} @icon="upload" @hideButtonText={{true}} @labelClass="upload-avatar-label-overlay" class="w-12 btn-reset" />
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="flex flex-col">
|
|
31
|
+
<h1 class="text-gray-900 dark:text-white text-2xl">
|
|
32
|
+
{{#if this.contact.id}}
|
|
33
|
+
{{this.contact.name}}
|
|
34
|
+
{{else}}
|
|
35
|
+
{{#if this.contact.name}}
|
|
36
|
+
{{this.contact.name}}
|
|
37
|
+
{{else}}
|
|
38
|
+
<span>New Contact</span>
|
|
39
|
+
{{/if}}
|
|
40
|
+
{{/if}}
|
|
41
|
+
</h1>
|
|
42
|
+
<div class="-mt-1">
|
|
43
|
+
<div class="flex flex-row items-center">
|
|
44
|
+
<span class="text-sm dark:text-blue-400 text-blue-600">{{n-a this.contact.title (smart-humanize this.contact.type)}}</span>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="flex justify-end w-1/4">
|
|
51
|
+
<Badge @status={{this.contact.public_id}} @type="info" @hideStatusDot={{true}} />
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</Overlay::Header>
|
|
55
|
+
|
|
56
|
+
<Overlay::Body @wrapperClass="new-service-rate-overlay-body px-4 pt-4" @increaseInnerBodyHeightBy={{700}}>
|
|
57
|
+
<div class="grid grid-cols-1 text-xs dark:text-gray-100">
|
|
58
|
+
<InputGroup @name="Name">
|
|
59
|
+
<Input @value={{this.contact.name}} @type="text" class="w-full form-input" placeholder="Name" />
|
|
60
|
+
</InputGroup>
|
|
61
|
+
<InputGroup @name="Title">
|
|
62
|
+
<Input @value={{this.contact.title}} @type="text" class="w-full form-input" placeholder="Title" />
|
|
63
|
+
</InputGroup>
|
|
64
|
+
<InputGroup @name="Internal ID">
|
|
65
|
+
<Input @value={{this.contact.internal_id}} @type="text" class="w-full form-input" placeholder="Internal ID" />
|
|
66
|
+
</InputGroup>
|
|
67
|
+
<InputGroup @name="Email">
|
|
68
|
+
<Input @value={{this.contact.email}} @type="text" class="w-full form-input" placeholder="Email" />
|
|
69
|
+
</InputGroup>
|
|
70
|
+
<InputGroup @name="Phone">
|
|
71
|
+
<PhoneInput @value={{this.contact.phone}} @onInput={{fn (mut this.contact.phone)}} class="form-input w-full" />
|
|
72
|
+
</InputGroup>
|
|
73
|
+
<InputGroup @name="Type">
|
|
74
|
+
<div class="fleetbase-model-select fleetbase-power-select ember-model-select">
|
|
75
|
+
<PowerSelect @options={{this.contactTypeOptions}} @selected={{this.contact.type}} @onChange={{fn (mut this.contact.type)}} @placeholder="Select contact type" @triggerClass="form-select form-input" as |type|>
|
|
76
|
+
{{smart-humanize type}}
|
|
77
|
+
</PowerSelect>
|
|
78
|
+
</div>
|
|
79
|
+
</InputGroup>
|
|
80
|
+
</div>
|
|
81
|
+
</Overlay::Body>
|
|
82
|
+
</Overlay>
|
|
@@ -0,0 +1,195 @@
|
|
|
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 contextComponentCallback from '../utils/context-component-callback';
|
|
6
|
+
import applyContextComponentArguments from '../utils/apply-context-component-arguments';
|
|
7
|
+
|
|
8
|
+
export default class ContactFormPanelComponent extends Component {
|
|
9
|
+
/**
|
|
10
|
+
* @service store
|
|
11
|
+
*/
|
|
12
|
+
@service store;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @service fetch
|
|
16
|
+
*/
|
|
17
|
+
@service fetch;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @service currentUser
|
|
21
|
+
*/
|
|
22
|
+
@service currentUser;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @service notifications
|
|
26
|
+
*/
|
|
27
|
+
@service notifications;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @service hostRouter
|
|
31
|
+
*/
|
|
32
|
+
@service hostRouter;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @service loader
|
|
36
|
+
*/
|
|
37
|
+
@service loader;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @service contextPanel
|
|
41
|
+
*/
|
|
42
|
+
@service contextPanel;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Overlay context.
|
|
46
|
+
* @type {any}
|
|
47
|
+
*/
|
|
48
|
+
@tracked context;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Indicates whether the component is in a loading state.
|
|
52
|
+
* @type {boolean}
|
|
53
|
+
*/
|
|
54
|
+
@tracked isLoading = false;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* All possible contact types.
|
|
58
|
+
*
|
|
59
|
+
* @var {String}
|
|
60
|
+
*/
|
|
61
|
+
@tracked contactTypeOptions = ['contact', 'customer'];
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* All possible contact status options.
|
|
65
|
+
*
|
|
66
|
+
* @var {String}
|
|
67
|
+
*/
|
|
68
|
+
@tracked contactStatusOptions = ['pending', 'active', 'do-not-contact', 'prospective', 'archived'];
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Constructs the component and applies initial state.
|
|
72
|
+
*/
|
|
73
|
+
constructor() {
|
|
74
|
+
super(...arguments);
|
|
75
|
+
this.contact = this.args.contact;
|
|
76
|
+
applyContextComponentArguments(this);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Sets the overlay context.
|
|
81
|
+
*
|
|
82
|
+
* @action
|
|
83
|
+
* @param {OverlayContextObject} overlayContext
|
|
84
|
+
*/
|
|
85
|
+
@action setOverlayContext(overlayContext) {
|
|
86
|
+
this.context = overlayContext;
|
|
87
|
+
contextComponentCallback(this, 'onLoad', ...arguments);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Saves the contact changes.
|
|
92
|
+
*
|
|
93
|
+
* @action
|
|
94
|
+
* @returns {Promise<any>}
|
|
95
|
+
*/
|
|
96
|
+
@action save() {
|
|
97
|
+
const { contact } = this;
|
|
98
|
+
|
|
99
|
+
this.loader.showLoader('.next-content-overlay-panel-container', { loadingMessage: 'Saving contact...', preserveTargetPosition: true });
|
|
100
|
+
this.isLoading = true;
|
|
101
|
+
|
|
102
|
+
contextComponentCallback(this, 'onBeforeSave', contact);
|
|
103
|
+
|
|
104
|
+
try {
|
|
105
|
+
return contact
|
|
106
|
+
.save()
|
|
107
|
+
.then((contact) => {
|
|
108
|
+
this.notifications.success(`contact (${contact.name}) saved successfully.`);
|
|
109
|
+
contextComponentCallback(this, 'onAfterSave', contact);
|
|
110
|
+
})
|
|
111
|
+
.catch((error) => {
|
|
112
|
+
this.notifications.serverError(error);
|
|
113
|
+
})
|
|
114
|
+
.finally(() => {
|
|
115
|
+
this.loader.removeLoader('.next-content-overlay-panel-container ');
|
|
116
|
+
this.isLoading = false;
|
|
117
|
+
});
|
|
118
|
+
} catch (error) {
|
|
119
|
+
this.loader.removeLoader('.next-content-overlay-panel-container ');
|
|
120
|
+
this.isLoading = false;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Uploads a new photo for the driver.
|
|
126
|
+
*
|
|
127
|
+
* @param {File} file
|
|
128
|
+
* @memberof DriverFormPanelComponent
|
|
129
|
+
*/
|
|
130
|
+
@action onUploadNewPhoto(file) {
|
|
131
|
+
this.fetch.uploadFile.perform(
|
|
132
|
+
file,
|
|
133
|
+
{
|
|
134
|
+
path: `uploads/${this.currentUser.companyId}/drivers/${this.contact.id}`,
|
|
135
|
+
subject_uuid: this.contact.id,
|
|
136
|
+
subject_type: `contact`,
|
|
137
|
+
type: `contact_photo`,
|
|
138
|
+
},
|
|
139
|
+
(uploadedFile) => {
|
|
140
|
+
this.contact.setProperties({
|
|
141
|
+
photo_uuid: uploadedFile.id,
|
|
142
|
+
photo_url: uploadedFile.url,
|
|
143
|
+
photo: uploadedFile,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* View the details of the contact.
|
|
151
|
+
*
|
|
152
|
+
* @action
|
|
153
|
+
*/
|
|
154
|
+
@action onViewDetails() {
|
|
155
|
+
const isActionOverrided = contextComponentCallback(this, 'onViewDetails', this.contact);
|
|
156
|
+
|
|
157
|
+
if (!isActionOverrided) {
|
|
158
|
+
this.contextPanel.focus(this.contact, 'viewing');
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Handles cancel button press.
|
|
164
|
+
*
|
|
165
|
+
* @action
|
|
166
|
+
* @returns {any}
|
|
167
|
+
*/
|
|
168
|
+
@action onPressCancel() {
|
|
169
|
+
return contextComponentCallback(this, 'onPressCancel', this.contact);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Uploads a file to the server for the contact.
|
|
174
|
+
*
|
|
175
|
+
* @param {File} file
|
|
176
|
+
*/
|
|
177
|
+
uploadContactPhoto(file) {
|
|
178
|
+
this.fetch.uploadFile.perform(
|
|
179
|
+
file,
|
|
180
|
+
{
|
|
181
|
+
path: `uploads/${this.contact.company_uuid}/contacts/${this.contact.slug}`,
|
|
182
|
+
subject_uuid: this.contact.id,
|
|
183
|
+
subject_type: 'contact',
|
|
184
|
+
type: 'contact_photo',
|
|
185
|
+
},
|
|
186
|
+
(uploadedFile) => {
|
|
187
|
+
this.contact.setProperties({
|
|
188
|
+
photo_uuid: uploadedFile.id,
|
|
189
|
+
photo_url: uploadedFile.url,
|
|
190
|
+
photo: uploadedFile,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<div class="p-4">
|
|
2
|
+
<ContentPanel @title="Details" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-900">
|
|
3
|
+
<div class="grid grid-cols-1 gap-2 lg:grid-cols-2 lg:gap-4 text-xs dark:text-gray-100">
|
|
4
|
+
|
|
5
|
+
<div class="field-info-container">
|
|
6
|
+
<div class="field-name">Website URL</div>
|
|
7
|
+
<div class="field-value">{{n-a @contact.name}}</div>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="field-info-container">
|
|
11
|
+
<div class="field-name">Title</div>
|
|
12
|
+
<div class="field-value">{{n-a @contact.title}}</div>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="field-info-container">
|
|
16
|
+
<div class="field-name">Internal ID</div>
|
|
17
|
+
<div class="field-value">{{n-a @contact.internal_id}}</div>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="field-info-container">
|
|
21
|
+
<div class="field-name">Email</div>
|
|
22
|
+
<div class="field-value">{{n-a @contact.email}}</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="field-info-container">
|
|
26
|
+
<div class="field-name">Phone</div>
|
|
27
|
+
<div class="field-value">{{n-a @contact.phone}}</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="field-info-container">
|
|
31
|
+
<div class="field-name">Type</div>
|
|
32
|
+
<div class="field-value"><Badge @status={{@contact.type}} /></div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</ContentPanel>
|
|
36
|
+
</div>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<Overlay @onLoad={{this.setOverlayContext}} @position="right" @noBackdrop={{true}} @fullHeight={{true}} @isResizable={{or this.isResizable @isResizable}} @width={{or this.width @width "600px"}}>
|
|
2
|
+
<Overlay::Header @hideLeftSection={{true}} @actionsWrapperClass="flex-1 flex-col py-3" class="h-auto-i min-h-[127px]">
|
|
3
|
+
<div class="flex flex-row items-center justify-between w-full mb-4">
|
|
4
|
+
<div class="flex flex-1 space-x-2">
|
|
5
|
+
<Button @type="default" @icon="pen" @helpText="Edit contact" @onClick={{this.onEdit}} />
|
|
6
|
+
</div>
|
|
7
|
+
<div class="flex flex-1 justify-end">
|
|
8
|
+
<Button @type="default" @icon="times" @helpText={{if this.contact.id "Cancel edit contact" "Cancel new contact"}} @onClick={{this.onPressCancel}} />
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="flex flex-row justify-between w-full">
|
|
12
|
+
<div class="flex flex-col flex-1 w-3/4">
|
|
13
|
+
<div class="flex flex-row">
|
|
14
|
+
<div class="w-14 flex items-center justify-start">
|
|
15
|
+
<Image src={{this.contact.photo_url}} @fallbackSrc={{config "defaultValues.contactImage"}} alt={{this.contact.name}} height="48" width="48" class="h-12 w-12 rounded-lg shadow-sm" />
|
|
16
|
+
<Attach::Tooltip @class="clean" @animation="scale" @placement="top">
|
|
17
|
+
<InputInfo @text={{this.contact.public_id}} />
|
|
18
|
+
</Attach::Tooltip>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="flex flex-col">
|
|
21
|
+
<h1 class="text-gray-900 dark:text-white text-2xl">{{this.contact.name}}</h1>
|
|
22
|
+
<div class="-mt-1">
|
|
23
|
+
<div class="flex flex-row items-center">
|
|
24
|
+
<span class="text-sm dark:text-blue-400 text-blue-600">{{smart-humanize this.contact.type}}</span>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="flex justify-end w-1/4">
|
|
31
|
+
<Badge @status={{this.contact.public_id}} @type="info" @hideStatusDot={{true}} />
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</Overlay::Header>
|
|
35
|
+
<Overlay::Body class="no-padding" @increaseInnerBodyHeightBy={{1000}}>
|
|
36
|
+
<div class="section-header-actions w-full overflow-x-scroll lg:overflow-x-auto">
|
|
37
|
+
<div class="ui-tabs mt-4">
|
|
38
|
+
<nav>
|
|
39
|
+
{{#each this.tabs as |tab|}}
|
|
40
|
+
<a href="javascript:;" class="ui-tab {{if (eq this.tab.slug tab.slug) 'active'}}" {{on "click" (fn this.onTabChanged tab.slug)}}>
|
|
41
|
+
<FaIcon @icon={{tab.icon}} class="mr-1" />
|
|
42
|
+
<span>{{tab.title}}</span>
|
|
43
|
+
</a>
|
|
44
|
+
{{/each}}
|
|
45
|
+
</nav>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="tab-content tab-{{this.tab.slug}}">
|
|
49
|
+
{{component this.tab.component contact=this.contact tabOptions=this.tab options=this.tab.componentParams}}
|
|
50
|
+
</div>
|
|
51
|
+
</Overlay::Body>
|
|
52
|
+
</Overlay>
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { tracked } from '@glimmer/tracking';
|
|
3
|
+
import { action } from '@ember/object';
|
|
4
|
+
import { inject as service } from '@ember/service';
|
|
5
|
+
import { isArray } from '@ember/array';
|
|
6
|
+
import ContactPanelDetailComponent from './contact-panel/details';
|
|
7
|
+
import contextComponentCallback from '../utils/context-component-callback';
|
|
8
|
+
import applyContextComponentArguments from '../utils/apply-context-component-arguments';
|
|
9
|
+
|
|
10
|
+
export default class ContactPanelComponent extends Component {
|
|
11
|
+
/**
|
|
12
|
+
* Service for fetching data.
|
|
13
|
+
*
|
|
14
|
+
* @type {Service}
|
|
15
|
+
*/
|
|
16
|
+
@service fetch;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Service for managing modals.
|
|
20
|
+
*
|
|
21
|
+
* @type {Service}
|
|
22
|
+
*/
|
|
23
|
+
@service modalsManager;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Universe service for managing global data and settings.
|
|
27
|
+
*
|
|
28
|
+
* @type {Service}
|
|
29
|
+
*/
|
|
30
|
+
@service universe;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Ember data store service.
|
|
34
|
+
*
|
|
35
|
+
* @type {Service}
|
|
36
|
+
*/
|
|
37
|
+
@service store;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Service for managing routing within the host app.
|
|
41
|
+
*
|
|
42
|
+
* @type {Service}
|
|
43
|
+
*/
|
|
44
|
+
@service hostRouter;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Service for managing the context panel.
|
|
48
|
+
*
|
|
49
|
+
* @type {Service}
|
|
50
|
+
*/
|
|
51
|
+
@service contextPanel;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The current active tab.
|
|
55
|
+
*
|
|
56
|
+
* @type {Object}
|
|
57
|
+
* @tracked
|
|
58
|
+
*/
|
|
59
|
+
@tracked tab;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The contact being displayed or edited.
|
|
63
|
+
*
|
|
64
|
+
* @type {contactModel}
|
|
65
|
+
* @tracked
|
|
66
|
+
*/
|
|
67
|
+
@tracked contact;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Returns the array of tabs available for the panel.
|
|
71
|
+
*
|
|
72
|
+
* @type {Array}
|
|
73
|
+
*/
|
|
74
|
+
get tabs() {
|
|
75
|
+
const registeredTabs = this.universe.getMenuItemsFromRegistry('component:contact-panel');
|
|
76
|
+
// this.universe._createMenuItem('Tracking', null, { icon: 'satellite-dish', component: contactPanelTrackingComponent }),
|
|
77
|
+
const defaultTabs = [this.universe._createMenuItem('Details', null, { icon: 'circle-info', component: ContactPanelDetailComponent })];
|
|
78
|
+
|
|
79
|
+
if (isArray(registeredTabs)) {
|
|
80
|
+
return [...defaultTabs, ...registeredTabs];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return defaultTabs;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Initializes the contact panel component.
|
|
88
|
+
*/
|
|
89
|
+
constructor() {
|
|
90
|
+
super(...arguments);
|
|
91
|
+
this.contact = this.args.contact;
|
|
92
|
+
this.tab = this.getTabUsingSlug(this.args.tab);
|
|
93
|
+
applyContextComponentArguments(this);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Sets the overlay context.
|
|
98
|
+
*
|
|
99
|
+
* @action
|
|
100
|
+
* @param {OverlayContextObject} overlayContext
|
|
101
|
+
*/
|
|
102
|
+
@action setOverlayContext(overlayContext) {
|
|
103
|
+
this.context = overlayContext;
|
|
104
|
+
contextComponentCallback(this, 'onLoad', ...arguments);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Handles changing the active tab.
|
|
109
|
+
*
|
|
110
|
+
* @method
|
|
111
|
+
* @param {String} tab - The new tab to switch to.
|
|
112
|
+
* @action
|
|
113
|
+
*/
|
|
114
|
+
@action onTabChanged(tab) {
|
|
115
|
+
this.tab = this.getTabUsingSlug(tab);
|
|
116
|
+
contextComponentCallback(this, 'onTabChanged', tab);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Handles edit action for the contact.
|
|
121
|
+
*
|
|
122
|
+
* @method
|
|
123
|
+
* @action
|
|
124
|
+
*/
|
|
125
|
+
@action onEdit() {
|
|
126
|
+
const isActionOverrided = contextComponentCallback(this, 'onEdit', this.contact);
|
|
127
|
+
|
|
128
|
+
if (!isActionOverrided) {
|
|
129
|
+
this.contextPanel.focus(this.contact, 'editing', {
|
|
130
|
+
onAfterSave: () => {
|
|
131
|
+
this.contextPanel.clear();
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Handles the cancel action.
|
|
139
|
+
*
|
|
140
|
+
* @method
|
|
141
|
+
* @action
|
|
142
|
+
* @returns {Boolean} Indicates whether the cancel action was overridden.
|
|
143
|
+
*/
|
|
144
|
+
@action onPressCancel() {
|
|
145
|
+
return contextComponentCallback(this, 'onPressCancel', this.contact);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Finds and returns a tab based on its slug.
|
|
150
|
+
*
|
|
151
|
+
* @param {String} tabSlug - The slug of the tab.
|
|
152
|
+
* @returns {Object|null} The found tab or null.
|
|
153
|
+
*/
|
|
154
|
+
getTabUsingSlug(tabSlug) {
|
|
155
|
+
if (tabSlug) {
|
|
156
|
+
return this.tabs.find(({ slug }) => slug === tabSlug);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return this.tabs[0];
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -16,13 +16,18 @@
|
|
|
16
16
|
<div class="flex flex-row justify-between w-full">
|
|
17
17
|
<div class="flex flex-col flex-1 w-3/4">
|
|
18
18
|
<div class="flex flex-row">
|
|
19
|
-
<div class="w-14
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
|
|
19
|
+
<div class="w-14">
|
|
20
|
+
<div class="upload-avatar-overlay w-12 h-12 flex items-center justify-start rounded-lg">
|
|
21
|
+
<img src={{this.driver.photo_url}} alt={{this.driver.name}} height="48" width="48" class="h-12 w-12 rounded-lg shadow-sm" />
|
|
22
|
+
<Attach::Tooltip @class="clean" @animation="scale" @placement="top">
|
|
23
|
+
<InputInfo @text="Upload new photo" />
|
|
24
|
+
</Attach::Tooltip>
|
|
25
|
+
<div class="upload-avatar-button-wrapper rounded-lg">
|
|
26
|
+
<UploadButton @name="photos" @accept="image/*" @onFileAdded={{this.onUploadNewPhoto}} @icon="upload" @hideButtonText={{true}} @labelClass="upload-avatar-label-overlay" class="w-12 btn-reset" />
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
24
29
|
</div>
|
|
25
|
-
<div class="flex flex-col
|
|
30
|
+
<div class="flex flex-col">
|
|
26
31
|
<h1 class="text-gray-900 dark:text-white text-2xl">
|
|
27
32
|
{{#if this.driver.id}}
|
|
28
33
|
{{this.driver.name}}
|
|
@@ -56,75 +61,54 @@
|
|
|
56
61
|
|
|
57
62
|
<Overlay::Body @wrapperClass="new-service-rate-overlay-body px-4 space-y-4 pt-4" @increaseInnerBodyHeightBy={{1000}}>
|
|
58
63
|
<div class="flex-1">
|
|
59
|
-
<div class="grid grid-cols-1 gap-2 text-xs dark:text-gray-100
|
|
60
|
-
<
|
|
61
|
-
<label>
|
|
62
|
-
Name
|
|
63
|
-
</label>
|
|
64
|
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-2 text-xs dark:text-gray-100">
|
|
65
|
+
<InputGroup @name="Name" @wrapperClass="col-span-2">
|
|
64
66
|
<Input @value={{this.driver.name}} @type="text" class="w-full form-input" placeholder="Name" />
|
|
65
|
-
</
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<div class="grid grid-cols-2 gap-2 text-xs dark:text-gray-100">
|
|
69
|
-
<div class="input-group">
|
|
70
|
-
<label>
|
|
71
|
-
Internal ID
|
|
72
|
-
</label>
|
|
67
|
+
</InputGroup>
|
|
68
|
+
|
|
69
|
+
<InputGroup @name="Internal ID">
|
|
73
70
|
<Input @value={{this.driver.internal_id}} @type="text" class="w-full form-input" placeholder="Internal ID" />
|
|
74
|
-
</
|
|
71
|
+
</InputGroup>
|
|
75
72
|
|
|
76
|
-
<
|
|
77
|
-
<label>
|
|
78
|
-
Drivers License
|
|
79
|
-
</label>
|
|
73
|
+
<InputGroup @name="Drivers License">
|
|
80
74
|
<Input @value={{this.driver.drivers_license_number}} @type="text" class="w-full form-input" placeholder="Drivers License" />
|
|
81
|
-
</
|
|
75
|
+
</InputGroup>
|
|
82
76
|
|
|
83
|
-
<
|
|
84
|
-
<label>
|
|
85
|
-
Email
|
|
86
|
-
</label>
|
|
77
|
+
<InputGroup @name="Email">
|
|
87
78
|
<Input @value={{this.driver.email}} @type="text" class="w-full form-input" placeholder="Email" />
|
|
88
|
-
</
|
|
79
|
+
</InputGroup>
|
|
89
80
|
|
|
90
|
-
<
|
|
91
|
-
<label>
|
|
92
|
-
Phone
|
|
93
|
-
</label>
|
|
81
|
+
<InputGroup @name="Phone">
|
|
94
82
|
<PhoneInput @value={{this.driver.phone}} @onInput={{fn (mut this.driver.phone)}} class="form-input w-full" />
|
|
95
|
-
</
|
|
83
|
+
</InputGroup>
|
|
96
84
|
|
|
97
|
-
<
|
|
98
|
-
<label>
|
|
99
|
-
Vendor
|
|
100
|
-
</label>
|
|
85
|
+
<InputGroup @name="Vendor">
|
|
101
86
|
<ModelSelect @modelName="vendor" @selectedModel={{this.driver.vendor}} @placeholder="Select Vendor" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{fn (mut this.driver.vendor)}} as |model|>
|
|
102
87
|
{{model.name}}
|
|
103
88
|
</ModelSelect>
|
|
104
|
-
</
|
|
89
|
+
</InputGroup>
|
|
105
90
|
|
|
106
|
-
<
|
|
107
|
-
<label>
|
|
108
|
-
Vehicle
|
|
109
|
-
</label>
|
|
91
|
+
<InputGroup @name="Vehicle">
|
|
110
92
|
<ModelSelect @modelName="vehicle" @selectedModel={{this.driver.vehicle}} @placeholder="Select Vehicle" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{fn (mut this.driver.vehicle)}} as |model|>
|
|
111
93
|
{{model.display_name}}
|
|
112
94
|
</ModelSelect>
|
|
113
|
-
</
|
|
95
|
+
</InputGroup>
|
|
114
96
|
|
|
115
|
-
<
|
|
116
|
-
<label>
|
|
117
|
-
City
|
|
118
|
-
</label>
|
|
97
|
+
<InputGroup @name="City">
|
|
119
98
|
<Input @value={{this.driver.city}} @type="text" class="w-full form-input" placeholder="City" />
|
|
120
|
-
</
|
|
99
|
+
</InputGroup>
|
|
121
100
|
|
|
122
|
-
<
|
|
123
|
-
<label>
|
|
124
|
-
Country
|
|
125
|
-
</label>
|
|
101
|
+
<InputGroup @name="Country">
|
|
126
102
|
<CountrySelect class="w-full form-input form-select form-datalist" @value={{this.driver.country}} @onChange={{fn (mut this.driver.country)}} placeholder="Country" />
|
|
127
|
-
</
|
|
103
|
+
</InputGroup>
|
|
104
|
+
|
|
105
|
+
<InputGroup @name="Status">
|
|
106
|
+
<div class="fleetbase-model-select fleetbase-power-select ember-model-select">
|
|
107
|
+
<PowerSelect @options={{this.driverStatusOptions}} @selected={{this.driver.status}} @onChange={{fn (mut this.driver.status)}} @placeholder="Select driver status" @triggerClass="form-select form-input" as |status|>
|
|
108
|
+
{{smart-humanize status}}
|
|
109
|
+
</PowerSelect>
|
|
110
|
+
</div>
|
|
111
|
+
</InputGroup>
|
|
128
112
|
</div>
|
|
129
113
|
</div>
|
|
130
114
|
</Overlay::Body>
|