@fleetbase/fleetops-engine 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon/components/admin/visibility-controls.js +1 -0
- package/addon/components/contact-form-panel.hbs +28 -6
- package/addon/components/driver-form-panel.hbs +10 -0
- package/addon/components/driver-form-panel.js +51 -0
- package/addon/components/driver-panel/details.hbs +1 -5
- package/addon/components/driver-panel.hbs +21 -3
- package/addon/components/fleet-form-panel.hbs +60 -6
- package/addon/components/fleet-panel/details.hbs +1 -1
- package/addon/components/fuel-report-form-panel.hbs +84 -8
- package/addon/components/fuel-report-form-panel.js +6 -0
- package/addon/components/fuel-report-panel/details.hbs +4 -0
- package/addon/components/issue-form-panel.hbs +99 -11
- package/addon/components/issue-form-panel.js +5 -13
- package/addon/components/layout/fleet-ops-sidebar.js +10 -1
- package/addon/components/live-map-drawer/driver-listing.hbs +6 -0
- package/addon/components/live-map-drawer/driver-listing.js +240 -0
- package/addon/components/live-map-drawer/place-listing.hbs +6 -0
- package/addon/components/live-map-drawer/place-listing.js +204 -0
- package/addon/components/live-map-drawer/vehicle-listing.hbs +6 -0
- package/addon/components/live-map-drawer/vehicle-listing.js +216 -0
- package/addon/components/live-map-drawer.hbs +17 -0
- package/addon/components/live-map-drawer.js +104 -0
- package/addon/components/live-map.hbs +5 -1
- package/addon/components/live-map.js +107 -15
- package/addon/components/map-container/toolbar.hbs +6 -0
- package/addon/components/modals/driver-assign-vehicle.hbs +2 -11
- package/addon/components/modals/driver-assign-vendor.hbs +1 -9
- package/addon/components/modals/fuel-report-details.hbs +4 -0
- package/addon/components/modals/order-event.hbs +1 -1
- package/addon/components/order/schedule-card.hbs +35 -7
- package/addon/components/order/schedule-card.js +163 -6
- package/addon/components/place-form-panel.hbs +14 -7
- package/addon/components/place-form-panel.js +71 -0
- package/addon/components/place-panel/details.hbs +11 -21
- package/addon/components/vehicle-form-panel.hbs +67 -7
- package/addon/components/vehicle-form-panel.js +37 -0
- package/addon/components/vehicle-panel/details.hbs +9 -5
- package/addon/components/vehicle-panel.hbs +18 -4
- package/addon/components/vendor-form-panel/create-form.hbs +72 -11
- package/addon/components/vendor-form-panel/edit-form.hbs +1 -1
- package/addon/components/vendor-form-panel.hbs +70 -30
- package/addon/components/vendor-form-panel.js +4 -40
- package/addon/components/vendor-panel/details.hbs +2 -2
- package/addon/components/vendor-panel.hbs +16 -2
- package/addon/controllers/management/contacts/index.js +42 -3
- package/addon/controllers/management/fleets/index.js +12 -23
- package/addon/controllers/management/fuel-reports/index/new.js +1 -1
- package/addon/controllers/management/fuel-reports/index.js +73 -20
- package/addon/controllers/management/issues/index/new.js +2 -2
- package/addon/controllers/management/issues/index.js +65 -45
- package/addon/controllers/management/places/index.js +59 -18
- package/addon/controllers/management/vehicles/index.js +67 -8
- package/addon/controllers/management/vendors/index.js +63 -8
- package/addon/controllers/operations/orders/index.js +70 -15
- package/addon/controllers/operations/scheduler/index.js +45 -30
- package/addon/routes/management/contacts/index.js +8 -0
- package/addon/routes/management/fleets/index.js +8 -2
- package/addon/routes/management/fuel-reports/index.js +6 -0
- package/addon/routes/management/issues/index.js +9 -1
- package/addon/routes/management/places/index.js +11 -1
- package/addon/routes/management/vehicles/index.js +3 -3
- package/addon/routes/management/vendors/index.js +8 -0
- package/addon/routes/operations/scheduler/index.js +26 -1
- package/addon/styles/fleetops-engine.css +28 -0
- package/addon/templates/operations/orders/index.hbs +2 -2
- package/addon/templates/operations/scheduler/index.hbs +33 -9
- package/addon/utils/create-full-calendar-event-from-order.js +8 -0
- package/addon/utils/get-issue-categories.js +30 -0
- package/addon/utils/get-issue-types.js +3 -0
- package/addon/utils/get-vendor-status-options.js +3 -0
- package/addon/utils/get-vendor-type-options.js +41 -0
- package/app/components/live-map-drawer/driver-listing.js +1 -0
- package/app/components/live-map-drawer/place-listing.js +1 -0
- package/app/components/live-map-drawer/vehicle-listing.js +1 -0
- package/app/components/live-map-drawer.js +1 -0
- package/app/utils/create-full-calendar-event-from-order.js +1 -0
- package/app/utils/get-issue-categories.js +1 -0
- package/app/utils/get-issue-types.js +1 -0
- package/app/utils/get-vendor-categories.js +1 -0
- package/app/utils/get-vendor-status-options.js +1 -0
- package/app/utils/get-vendor-type-options.js +1 -0
- package/app/utils/get-vendor-types.js +1 -0
- package/composer.json +1 -1
- package/extension.json +1 -1
- package/package.json +4 -4
- package/server/migrations/2023_11_09_041807_add_status_column_to_fuel_reports_table.php +32 -0
- package/server/migrations/2023_11_15_062814_add_comments_column_and_resolved_at_column_to_vehicle_device_events_table.php +33 -0
- package/server/src/Http/Controllers/Api/v1/DriverController.php +2 -2
- package/server/src/Http/Controllers/Api/v1/VehicleController.php +2 -2
- package/server/src/Http/Controllers/Internal/v1/DriverController.php +5 -13
- package/server/src/Http/Controllers/Internal/v1/OrderController.php +1 -3
- package/server/src/Http/Filter/ContactFilter.php +10 -0
- package/server/src/Http/Filter/FleetFilter.php +8 -6
- package/server/src/Http/Filter/FuelReportFilter.php +51 -0
- package/server/src/Http/Filter/IssueFilter.php +61 -5
- package/server/src/Http/Filter/PlaceFilter.php +48 -6
- package/server/src/Http/Filter/VehicleFilter.php +21 -6
- package/server/src/Http/Filter/VendorFilter.php +11 -8
- package/server/src/Http/Middleware/TransformLocationMiddleware.php +1 -1
- package/server/src/Http/Resources/Internal/v1/IntegratedVendorFacilitator.php +17 -18
- package/server/src/Http/Resources/v1/Contact.php +16 -19
- package/server/src/Http/Resources/v1/CurrentJob.php +13 -16
- package/server/src/Http/Resources/v1/Driver.php +59 -57
- package/server/src/Http/Resources/v1/Entity.php +30 -33
- package/server/src/Http/Resources/v1/FuelReport.php +16 -14
- package/server/src/Http/Resources/v1/Order.php +1 -1
- package/server/src/Http/Resources/v1/Payload.php +21 -24
- package/server/src/Http/Resources/v1/Place.php +27 -30
- package/server/src/Http/Resources/v1/Proof.php +13 -16
- package/server/src/Http/Resources/v1/PurchaseRate.php +14 -17
- package/server/src/Http/Resources/v1/ServiceArea.php +13 -16
- package/server/src/Http/Resources/v1/ServiceQuote.php +15 -18
- package/server/src/Http/Resources/v1/ServiceRate.php +33 -36
- package/server/src/Http/Resources/v1/ServiceRateFee.php +14 -17
- package/server/src/Http/Resources/v1/ServiceRateParcelFee.php +9 -12
- package/server/src/Http/Resources/v1/TrackingNumber.php +18 -21
- package/server/src/Http/Resources/v1/TrackingStatus.php +18 -21
- package/server/src/Http/Resources/v1/Vehicle.php +31 -34
- package/server/src/Http/Resources/v1/VehicleDevice.php +23 -25
- package/server/src/Http/Resources/v1/VehicleWithoutDriver.php +38 -32
- package/server/src/Http/Resources/v1/Vendor.php +31 -26
- package/server/src/Http/Resources/v1/Zone.php +14 -17
- package/server/src/Models/Driver.php +7 -1
- package/server/src/Models/FuelReport.php +2 -1
- package/server/src/Models/IntegratedVendor.php +6 -1
- package/server/src/Models/Order.php +24 -2
- package/server/src/Models/Place.php +2 -2
- package/server/src/Models/VehicleDevice.php +1 -1
- package/server/src/Models/VehicleDeviceEvent.php +2 -1
- package/server/src/Models/Vendor.php +1 -1
- package/server/src/Observers/DriverObserver.php +15 -0
- package/server/src/Observers/FleetObserver.php +19 -0
- package/server/src/Providers/FleetOpsServiceProvider.php +1 -0
- package/addon/components/full-calendar/draggable.js +0 -1
- package/addon/components/full-calendar.js +0 -1
- package/app/components/full-calendar/draggable.js +0 -1
- package/app/components/full-calendar.js +0 -1
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
<ContentPanel @title="Setup" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
|
3
3
|
<InputGroup @name="Select vendor type">
|
|
4
4
|
<div class="fleetbase-model-select fleetbase-power-select ember-model-select">
|
|
5
|
-
<PowerSelect
|
|
5
|
+
<PowerSelect
|
|
6
|
+
@options={{this.vendorTypes}}
|
|
7
|
+
@selected={{this.selectedVendorType}}
|
|
8
|
+
@onChange={{this.onSelectVendorType}}
|
|
9
|
+
@placeholder="Select vendor type"
|
|
10
|
+
@triggerClass="form-select form-input"
|
|
11
|
+
as |vendorType|
|
|
12
|
+
>
|
|
6
13
|
{{vendorType.label}}
|
|
7
14
|
</PowerSelect>
|
|
8
15
|
</div>
|
|
@@ -10,7 +17,14 @@
|
|
|
10
17
|
{{#if (eq this.selectedVendorType.value "integrated-vendor")}}
|
|
11
18
|
<InputGroup @name="Choose integrated vendor provider">
|
|
12
19
|
<div class="fleetbase-model-select fleetbase-power-select ember-model-select">
|
|
13
|
-
<PowerSelect
|
|
20
|
+
<PowerSelect
|
|
21
|
+
@options={{this.supportedIntegratedVendors}}
|
|
22
|
+
@selected={{this.selectedIntegratedVendor}}
|
|
23
|
+
@onChange={{this.onSelectIntegratedVendor}}
|
|
24
|
+
@placeholder="Select integrated vendor provider"
|
|
25
|
+
@triggerClass="form-select form-input"
|
|
26
|
+
as |integratedVendor|
|
|
27
|
+
>
|
|
14
28
|
<div class="flex flex-row items-center">
|
|
15
29
|
<Image src={{integratedVendor.logo}} alt={{integratedVendor.code}} class="w-4 h-4" width="16" height="16" />
|
|
16
30
|
<h3 class="text-sm ml-4 dark:text-white">{{integratedVendor.name}}</h3>
|
|
@@ -31,17 +45,33 @@
|
|
|
31
45
|
</ContentPanel>
|
|
32
46
|
<ContentPanel @title="Credentials" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
|
33
47
|
{{#each this.selectedIntegratedVendor.credential_params as |param|}}
|
|
34
|
-
<InputGroup
|
|
48
|
+
<InputGroup
|
|
49
|
+
@name={{smart-humanize param.key}}
|
|
50
|
+
@value={{mut (get this.integratedVendor.credentials param.key)}}
|
|
51
|
+
@helpText={{concat "Optionally supply your own " (smart-humanize param.key) " to configure this vendor."}}
|
|
52
|
+
/>
|
|
35
53
|
{{/each}}
|
|
36
54
|
</ContentPanel>
|
|
37
55
|
<ContentPanel @title="Options" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
|
38
56
|
{{#each this.selectedIntegratedVendor.option_params as |param|}}
|
|
39
57
|
{{#if param.options}}
|
|
40
58
|
<InputGroup @name={{smart-humanize param.key}}>
|
|
41
|
-
<Select
|
|
59
|
+
<Select
|
|
60
|
+
@value={{mut (get this.integratedVendor.options param.key)}}
|
|
61
|
+
@options={{param.options}}
|
|
62
|
+
@optionValue={{param.optionValue}}
|
|
63
|
+
@optionLabel={{param.optionLabel}}
|
|
64
|
+
@humanize={{true}}
|
|
65
|
+
@placeholder={{concat "Select " (smart-humanize param.key)}}
|
|
66
|
+
@onSelect={{fn (mut (get this.integratedVendor.options param.key))}}
|
|
67
|
+
/>
|
|
42
68
|
</InputGroup>
|
|
43
69
|
{{else}}
|
|
44
|
-
<InputGroup
|
|
70
|
+
<InputGroup
|
|
71
|
+
@name={{smart-humanize param.key}}
|
|
72
|
+
@value={{mut (get this.integratedVendor.options param.key)}}
|
|
73
|
+
@helpText={{concat "Optionally supply your own " (smart-humanize param.key) " to configure this vendor."}}
|
|
74
|
+
/>
|
|
45
75
|
{{/if}}
|
|
46
76
|
{{/each}}
|
|
47
77
|
<InputGroup>
|
|
@@ -59,8 +89,16 @@
|
|
|
59
89
|
{{#if this.showAdvancedOptions}}
|
|
60
90
|
<div class="mt-4">
|
|
61
91
|
<InputGroup @name="Custom Host" @value={{this.integratedVendor.host}} @helpText="Optionally provide a custom host that should be used for this integration." />
|
|
62
|
-
<InputGroup
|
|
63
|
-
|
|
92
|
+
<InputGroup
|
|
93
|
+
@name="Custom Namespace"
|
|
94
|
+
@value={{this.integratedVendor.namespace}}
|
|
95
|
+
@helpText="Optionally provide a custom namespace or api version that should be used for the integration."
|
|
96
|
+
/>
|
|
97
|
+
<InputGroup
|
|
98
|
+
@name="Webhook URL"
|
|
99
|
+
@value={{this.integratedVendor.webhook_url}}
|
|
100
|
+
@helpText="Integrated vendors will typically require this so that Fleetbase can receive activity updates on the order. Do not change unless you know what you are doing! Changing this may break your order updates!"
|
|
101
|
+
/>
|
|
64
102
|
</div>
|
|
65
103
|
{{/if}}
|
|
66
104
|
</ContentPanel>
|
|
@@ -74,17 +112,31 @@
|
|
|
74
112
|
<InputGroup @name="Name" @value={{this.vendor.name}} @helpText="The vendor's name, typically the name of a business." />
|
|
75
113
|
<InputGroup @name="Email" @type="email" @value={{this.vendor.email}} @helpText="The vendor's email, this can be used to trigger emails to the vendor." />
|
|
76
114
|
<InputGroup @name="Phone" @type="tel" @value={{this.vendor.phone}} @helpText="The vendor's phone #, this can be used to trigger SMS or messages to the vendor." />
|
|
77
|
-
<InputGroup @name="Website" @value={{this.vendor.
|
|
115
|
+
<InputGroup @name="Website" @value={{this.vendor.website_url}} @helpText="The vendor's website, optionally add the vendors website for reference." />
|
|
78
116
|
<InputGroup @name="Type">
|
|
79
117
|
<div class="fleetbase-model-select fleetbase-power-select ember-model-select">
|
|
80
|
-
<PowerSelect
|
|
118
|
+
<PowerSelect
|
|
119
|
+
@options={{@vendorTypes}}
|
|
120
|
+
@selected={{this.vendor.type}}
|
|
121
|
+
@onChange={{fn (mut this.vendor.type)}}
|
|
122
|
+
@placeholder="Select vendor type"
|
|
123
|
+
@triggerClass="form-select form-input"
|
|
124
|
+
as |type|
|
|
125
|
+
>
|
|
81
126
|
{{smart-humanize type}}
|
|
82
127
|
</PowerSelect>
|
|
83
128
|
</div>
|
|
84
129
|
</InputGroup>
|
|
85
130
|
<InputGroup @name="Status">
|
|
86
131
|
<div class="fleetbase-model-select fleetbase-power-select ember-model-select">
|
|
87
|
-
<PowerSelect
|
|
132
|
+
<PowerSelect
|
|
133
|
+
@options={{@vendorStatusOptions}}
|
|
134
|
+
@selected={{this.vendor.status}}
|
|
135
|
+
@onChange={{fn (mut this.vendor.status)}}
|
|
136
|
+
@placeholder="Select vendor status"
|
|
137
|
+
@triggerClass="form-select form-input"
|
|
138
|
+
as |status|
|
|
139
|
+
>
|
|
88
140
|
{{smart-humanize status}}
|
|
89
141
|
</PowerSelect>
|
|
90
142
|
</div>
|
|
@@ -98,7 +150,16 @@
|
|
|
98
150
|
<Button @type="default" @size="xs" @icon="edit" @text={{if this.vendor.has_place "Edit" "New Address"}} @onClick={{this.editAddress}} />
|
|
99
151
|
</div>
|
|
100
152
|
</div>
|
|
101
|
-
<ModelSelect
|
|
153
|
+
<ModelSelect
|
|
154
|
+
@modelName="place"
|
|
155
|
+
@selectedModel={{this.vendor.place}}
|
|
156
|
+
@placeholder="Select Address"
|
|
157
|
+
@triggerClass="form-select form-input"
|
|
158
|
+
@infiniteScroll={{false}}
|
|
159
|
+
@renderInPlace={{true}}
|
|
160
|
+
@onChange={{this.selectVendorAddress}}
|
|
161
|
+
as |model|
|
|
162
|
+
>
|
|
102
163
|
<div class="flex items-center flex-row justify-between">
|
|
103
164
|
<div class="truncate flex-1">{{n-a model.address}}</div>
|
|
104
165
|
<Badge @hideStatusDot={{true}} @status="info">{{model.public_id}}</Badge>
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
<InputGroup @name="Name" @value={{this.vendor.name}} @helpText="The vendor's name, typically the name of a business." />
|
|
61
61
|
<InputGroup @name="Email" @type="email" @value={{this.vendor.email}} @helpText="The vendor's email, this can be used to trigger emails to the vendor." />
|
|
62
62
|
<InputGroup @name="Phone" @type="tel" @value={{this.vendor.phone}} @helpText="The vendor's phone #, this can be used to trigger SMS or messages to the vendor." />
|
|
63
|
-
<InputGroup @name="Website" @value={{this.vendor.
|
|
63
|
+
<InputGroup @name="Website" @value={{this.vendor.website_url}} @helpText="The vendor's website, optionally add the vendors website for reference." />
|
|
64
64
|
<InputGroup @name="Type">
|
|
65
65
|
<div class="fleetbase-model-select fleetbase-power-select ember-model-select">
|
|
66
66
|
<PowerSelect @options={{@vendorTypes}} @selected={{this.vendor.type}} @onChange={{fn (mut this.vendor.type)}} @placeholder="Select vendor type" @triggerClass="form-select form-input" as |type|>
|
|
@@ -1,48 +1,88 @@
|
|
|
1
|
-
<Overlay
|
|
1
|
+
<Overlay
|
|
2
|
+
@onLoad={{this.setOverlayContext}}
|
|
3
|
+
@position="right"
|
|
4
|
+
@noBackdrop={{true}}
|
|
5
|
+
@fullHeight={{true}}
|
|
6
|
+
@isResizeble={{or this.isResizable @isResizable}}
|
|
7
|
+
@width={{or this.width @width "600px"}}
|
|
8
|
+
>
|
|
2
9
|
<Overlay::Header @hideLeftSection={{true}} @actionsWrapperClass="flex-1 flex-col py-3" class="h-auto-i">
|
|
10
|
+
<div class="flex flex-row items-center justify-between w-full mb-4">
|
|
11
|
+
<div class="flex flex-1 space-x-2">
|
|
12
|
+
{{#if this.vendor.id}}
|
|
13
|
+
<Button @type="default" @icon="warehouse" @helpText="View vendor details" @onClick={{this.onViewDetails}} />
|
|
14
|
+
{{/if}}
|
|
15
|
+
</div>
|
|
16
|
+
<div class="flex flex-1 justify-end">
|
|
17
|
+
<div class="mr-2">
|
|
18
|
+
<Button @icon={{if this.vendor.id "save" "check"}} @type="primary" @text={{if this.vendor.id "Save Vendor" "Create Vendor"}} @onClick={{this.save}} />
|
|
19
|
+
</div>
|
|
20
|
+
<Button @type="default" @icon="times" @helpText={{if this.vendor.id "Cancel edit vendor" "Cancel new vendor"}} @onClick={{this.onPressCancel}} />
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
3
23
|
<div class="flex flex-row justify-between w-full">
|
|
4
|
-
<div class="flex flex-
|
|
5
|
-
<div class="
|
|
6
|
-
<div class="
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
24
|
+
<div class="flex flex-col flex-1 w-3/4">
|
|
25
|
+
<div class="flex flex-row">
|
|
26
|
+
<div class="w-14">
|
|
27
|
+
<div class="upload-avatar-overlay w-12 h-12 flex items-center justify-start rounded-lg">
|
|
28
|
+
<img src={{this.vendor.logo_url}} alt={{this.vendor.name}} height="48" width="48" class="h-12 w-12 rounded-lg shadow-sm" />
|
|
29
|
+
<Attach::Tooltip @class="clean" @animation="scale" @placement="top">
|
|
30
|
+
<InputInfo @text="Upload new photo" />
|
|
31
|
+
</Attach::Tooltip>
|
|
32
|
+
<div class="upload-avatar-button-wrapper rounded-lg">
|
|
33
|
+
<UploadButton
|
|
34
|
+
@name="photos"
|
|
35
|
+
@accept="image/*"
|
|
36
|
+
@onFileAdded={{this.onUploadNewPhoto}}
|
|
37
|
+
@icon="upload"
|
|
38
|
+
@hideButtonText={{true}}
|
|
39
|
+
@labelClass="upload-avatar-label-overlay"
|
|
40
|
+
class="w-12 btn-reset"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
13
43
|
</div>
|
|
14
44
|
</div>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
{{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
45
|
+
<div class="flex flex-col">
|
|
46
|
+
<h1 class="text-gray-900 dark:text-white text-2xl">
|
|
47
|
+
{{#if this.vendor.id}}
|
|
48
|
+
{{this.vendor.name}}
|
|
49
|
+
{{else}}
|
|
50
|
+
{{#if this.vendor.name}}
|
|
51
|
+
{{this.vendor.name}}
|
|
52
|
+
{{else}}
|
|
53
|
+
<span>New Vendor</span>
|
|
54
|
+
{{/if}}
|
|
55
|
+
{{/if}}
|
|
56
|
+
</h1>
|
|
57
|
+
<div class="-mt-1">
|
|
58
|
+
<div class="flex flex-row items-center">
|
|
59
|
+
<span class="text-sm dark:text-blue-400 text-blue-600">{{n-a (smart-humanize this.vendor.type)}}</span>
|
|
60
|
+
</div>
|
|
27
61
|
</div>
|
|
28
62
|
</div>
|
|
29
63
|
</div>
|
|
30
64
|
</div>
|
|
31
|
-
<div>
|
|
32
|
-
<
|
|
33
|
-
{{#if this.vendor.id}}
|
|
34
|
-
<Button @type="default" @icon="id-card" @helpText="View fleet details" @onClick={{this.onViewDetails}} @wrapperClass="mr-2" />
|
|
35
|
-
{{/if}}
|
|
36
|
-
<Button @type="default" @icon="times" @helpText={{if this.vendor.id "Cancel edit vendor" "Cancel new vendor"}} @onClick={{this.onPressCancel}} />
|
|
65
|
+
<div class="flex justify-end w-1/4">
|
|
66
|
+
<Badge @status={{this.vendor.status}} @type="info" @hideStatusDot={{true}} />
|
|
37
67
|
</div>
|
|
38
68
|
</div>
|
|
39
69
|
</Overlay::Header>
|
|
40
70
|
|
|
41
71
|
<Overlay::Body @wrapperClass="new-service-rate-overlay-body px-4 space-y-4 pt-4" @increaseInnerBodyHeightBy={{1000}}>
|
|
42
72
|
{{#if this.isEditing}}
|
|
43
|
-
<VendorFormPanel::EditForm
|
|
73
|
+
<VendorFormPanel::EditForm
|
|
74
|
+
@vendor={{this.vendor}}
|
|
75
|
+
@vendorTypes={{this.vendorTypeOptions}}
|
|
76
|
+
@vendorStatusOptions={{this.vendorStatusOptions}}
|
|
77
|
+
@onVendorChanged={{this.onVendorChanged}}
|
|
78
|
+
/>
|
|
44
79
|
{{else}}
|
|
45
|
-
<VendorFormPanel::CreateForm
|
|
80
|
+
<VendorFormPanel::CreateForm
|
|
81
|
+
@vendor={{this.vendor}}
|
|
82
|
+
@vendorTypes={{this.vendorTypeOptions}}
|
|
83
|
+
@vendorStatusOptions={{this.vendorStatusOptions}}
|
|
84
|
+
@onVendorChanged={{this.onVendorChanged}}
|
|
85
|
+
/>
|
|
46
86
|
{{/if}}
|
|
47
87
|
</Overlay::Body>
|
|
48
88
|
</Overlay>
|
|
@@ -4,6 +4,8 @@ import { inject as service } from '@ember/service';
|
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
5
|
import contextComponentCallback from '../utils/context-component-callback';
|
|
6
6
|
import applyContextComponentArguments from '../utils/apply-context-component-arguments';
|
|
7
|
+
import getVendorTypeOptions from '../utils/get-vendor-type-options';
|
|
8
|
+
import getVendorStatusOptions from '../utils/get-vendor-status-options';
|
|
7
9
|
|
|
8
10
|
export default class VendorFormPanelComponent extends Component {
|
|
9
11
|
/**
|
|
@@ -64,52 +66,14 @@ export default class VendorFormPanelComponent extends Component {
|
|
|
64
66
|
*
|
|
65
67
|
* @memberof VendorFormPanelComponent
|
|
66
68
|
*/
|
|
67
|
-
@tracked vendorTypeOptions =
|
|
68
|
-
'carrier-trucking-company',
|
|
69
|
-
'carrier-shipping-line',
|
|
70
|
-
'carrier-air-cargo',
|
|
71
|
-
'carrier-rail',
|
|
72
|
-
'freight-forwarder',
|
|
73
|
-
'warehouse-provider',
|
|
74
|
-
'broker',
|
|
75
|
-
'maintenance-repair-facility',
|
|
76
|
-
'fuel-station',
|
|
77
|
-
'tire-service-provider',
|
|
78
|
-
'equipment-rental',
|
|
79
|
-
'customs-broker',
|
|
80
|
-
'third-party-logistics-provider',
|
|
81
|
-
'technology-provider',
|
|
82
|
-
'consultant',
|
|
83
|
-
'insurance-provider',
|
|
84
|
-
'last-mile-delivery-service',
|
|
85
|
-
'packing-crating-service',
|
|
86
|
-
'intermodal-operator',
|
|
87
|
-
'drayage-service-provider',
|
|
88
|
-
'cold-chain-provider',
|
|
89
|
-
'hazardous-material-specialist',
|
|
90
|
-
'parcel-courier',
|
|
91
|
-
'bulk-material-handler',
|
|
92
|
-
'towing-service',
|
|
93
|
-
'cargo-inspector',
|
|
94
|
-
'pallet-provider',
|
|
95
|
-
'label-packaging-material-supplier',
|
|
96
|
-
'driver-leasing-service',
|
|
97
|
-
'vehicle-manufacturer',
|
|
98
|
-
'vehicle-dealership',
|
|
99
|
-
'parts-supplier',
|
|
100
|
-
'logistics-association',
|
|
101
|
-
'regulatory-body',
|
|
102
|
-
'training-certification-provider',
|
|
103
|
-
'general-vendor',
|
|
104
|
-
'ecommerce',
|
|
105
|
-
];
|
|
69
|
+
@tracked vendorTypeOptions = getVendorTypeOptions();
|
|
106
70
|
|
|
107
71
|
/**
|
|
108
72
|
* Applicable status options for vendor.
|
|
109
73
|
*
|
|
110
74
|
* @memberof VendorFormPanelComponent
|
|
111
75
|
*/
|
|
112
|
-
@tracked vendorStatusOptions =
|
|
76
|
+
@tracked vendorStatusOptions = getVendorStatusOptions();
|
|
113
77
|
|
|
114
78
|
/**
|
|
115
79
|
* Constructs the component and applies initial state.
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
{{/if}}
|
|
33
33
|
</div>
|
|
34
34
|
{{else}}
|
|
35
|
-
<div class="grid grid-cols-
|
|
35
|
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-2 text-xs dark:text-gray-100">
|
|
36
36
|
<div class="field-info-container">
|
|
37
37
|
<div class="field-name">Name</div>
|
|
38
38
|
<div class="field-value">{{n-a this.vendor.name}}</div>
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|
|
69
69
|
|
|
70
|
-
<div class="field-info-container">
|
|
70
|
+
<div class="field-info-container col-span-2">
|
|
71
71
|
<div class="field-name">Address</div>
|
|
72
72
|
<div class="field-value">{{n-a this.vendor.address}}</div>
|
|
73
73
|
</div>
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
<Overlay
|
|
1
|
+
<Overlay
|
|
2
|
+
@onLoad={{this.setOverlayContext}}
|
|
3
|
+
@position="right"
|
|
4
|
+
@noBackdrop={{true}}
|
|
5
|
+
@fullHeight={{true}}
|
|
6
|
+
@isResizable={{or this.isResizable @isResizable}}
|
|
7
|
+
@width={{or this.width @width "600px"}}
|
|
8
|
+
>
|
|
2
9
|
<Overlay::Header @hideLeftSection={{true}} @actionsWrapperClass="flex-1 flex-col py-3" class="h-auto-i">
|
|
3
10
|
<div class="flex flex-row items-center justify-between w-full mb-4">
|
|
4
11
|
<div class="flex flex-1 space-x-2">
|
|
@@ -12,7 +19,14 @@
|
|
|
12
19
|
<div class="flex flex-1 flex-row">
|
|
13
20
|
<div class="w-14">
|
|
14
21
|
<div class="w-12 h-12 flex items-center justify-start rounded-lg">
|
|
15
|
-
<Image
|
|
22
|
+
<Image
|
|
23
|
+
src={{this.vendor.logo_url}}
|
|
24
|
+
@fallbackSrc={{config "defaultValues.vendorImage"}}
|
|
25
|
+
alt={{this.vendor.name}}
|
|
26
|
+
height="48"
|
|
27
|
+
width="48"
|
|
28
|
+
class="h-12 w-12 rounded-lg shadow-sm"
|
|
29
|
+
/>
|
|
16
30
|
<Attach::Tooltip @class="clean" @animation="scale" @placement="top">
|
|
17
31
|
<InputInfo @text={{this.vendor.name}} />
|
|
18
32
|
</Attach::Tooltip>
|
|
@@ -61,7 +61,7 @@ export default class ManagementContactsIndexController extends Controller {
|
|
|
61
61
|
*
|
|
62
62
|
* @var {Array}
|
|
63
63
|
*/
|
|
64
|
-
queryParams = ['page', 'limit', 'sort', 'query', 'public_id', 'internal_id', 'created_by', 'updated_by', 'status'];
|
|
64
|
+
queryParams = ['page', 'limit', 'sort', 'query', 'public_id', 'internal_id', 'created_by', 'updated_by', 'status', 'title', 'email', 'phone', 'type'];
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* The current page of data being viewed
|
|
@@ -98,6 +98,34 @@ export default class ManagementContactsIndexController extends Controller {
|
|
|
98
98
|
*/
|
|
99
99
|
@tracked internal_id;
|
|
100
100
|
|
|
101
|
+
/**
|
|
102
|
+
* The filterable param `title`
|
|
103
|
+
*
|
|
104
|
+
* @var {String}
|
|
105
|
+
*/
|
|
106
|
+
@tracked title;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The filterable param `email`
|
|
110
|
+
*
|
|
111
|
+
* @var {String}
|
|
112
|
+
*/
|
|
113
|
+
@tracked email;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The filterable param `phone`
|
|
117
|
+
*
|
|
118
|
+
* @var {String}
|
|
119
|
+
*/
|
|
120
|
+
@tracked phone;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The filterable param `email`
|
|
124
|
+
*
|
|
125
|
+
* @var {Array|String}
|
|
126
|
+
*/
|
|
127
|
+
@tracked type;
|
|
128
|
+
|
|
101
129
|
/**
|
|
102
130
|
* The filterable param `status`
|
|
103
131
|
*
|
|
@@ -149,6 +177,16 @@ export default class ManagementContactsIndexController extends Controller {
|
|
|
149
177
|
filterable: true,
|
|
150
178
|
filterComponent: 'filter/string',
|
|
151
179
|
},
|
|
180
|
+
{
|
|
181
|
+
label: 'Title',
|
|
182
|
+
valuePath: 'title',
|
|
183
|
+
cellComponent: 'click-to-copy',
|
|
184
|
+
width: '160px',
|
|
185
|
+
resizable: true,
|
|
186
|
+
sortable: true,
|
|
187
|
+
filterable: true,
|
|
188
|
+
filterComponent: 'filter/string',
|
|
189
|
+
},
|
|
152
190
|
{
|
|
153
191
|
label: 'Email',
|
|
154
192
|
valuePath: 'email',
|
|
@@ -173,11 +211,12 @@ export default class ManagementContactsIndexController extends Controller {
|
|
|
173
211
|
label: 'Type',
|
|
174
212
|
valuePath: 'type',
|
|
175
213
|
cellComponent: 'table/cell/status',
|
|
176
|
-
width: '
|
|
214
|
+
width: '100px',
|
|
177
215
|
resizable: true,
|
|
178
216
|
sortable: true,
|
|
179
217
|
filterable: true,
|
|
180
|
-
filterComponent: 'filter/
|
|
218
|
+
filterComponent: 'filter/multi-option',
|
|
219
|
+
filterOptions: ['contact', 'customer'],
|
|
181
220
|
},
|
|
182
221
|
{
|
|
183
222
|
label: 'Created At',
|
|
@@ -75,7 +75,7 @@ export default class ManagementFleetsIndexController extends Controller {
|
|
|
75
75
|
*
|
|
76
76
|
* @var {Array}
|
|
77
77
|
*/
|
|
78
|
-
queryParams = ['page', 'limit', 'sort', 'query', 'public_id', '
|
|
78
|
+
queryParams = ['page', 'limit', 'sort', 'query', 'public_id', 'zone', 'service_area', 'parent_fleet', 'vendor', 'created_by', 'updated_by', 'status', 'task', 'name'];
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* The current page of data being viewed
|
|
@@ -105,13 +105,6 @@ export default class ManagementFleetsIndexController extends Controller {
|
|
|
105
105
|
*/
|
|
106
106
|
@tracked public_id;
|
|
107
107
|
|
|
108
|
-
/**
|
|
109
|
-
* The filterable param `internal_id`
|
|
110
|
-
*
|
|
111
|
-
* @var {String}
|
|
112
|
-
*/
|
|
113
|
-
@tracked internal_id;
|
|
114
|
-
|
|
115
108
|
/**
|
|
116
109
|
* The filterable param `service_area`
|
|
117
110
|
*
|
|
@@ -145,6 +138,13 @@ export default class ManagementFleetsIndexController extends Controller {
|
|
|
145
138
|
*/
|
|
146
139
|
@tracked task;
|
|
147
140
|
|
|
141
|
+
/**
|
|
142
|
+
* The filterable param `task`
|
|
143
|
+
*
|
|
144
|
+
* @var {String}
|
|
145
|
+
*/
|
|
146
|
+
@tracked name;
|
|
147
|
+
|
|
148
148
|
/**
|
|
149
149
|
* The filterable param `status`
|
|
150
150
|
*
|
|
@@ -181,6 +181,7 @@ export default class ManagementFleetsIndexController extends Controller {
|
|
|
181
181
|
resizable: true,
|
|
182
182
|
sortable: true,
|
|
183
183
|
filterable: true,
|
|
184
|
+
filterParam: 'name',
|
|
184
185
|
filterComponent: 'filter/string',
|
|
185
186
|
},
|
|
186
187
|
{
|
|
@@ -206,7 +207,7 @@ export default class ManagementFleetsIndexController extends Controller {
|
|
|
206
207
|
filterable: true,
|
|
207
208
|
filterComponent: 'filter/model',
|
|
208
209
|
filterComponentPlaceholder: 'Select fleet',
|
|
209
|
-
filterParam: '
|
|
210
|
+
filterParam: 'parent_fleet_uuid',
|
|
210
211
|
model: 'fleet',
|
|
211
212
|
},
|
|
212
213
|
{
|
|
@@ -246,18 +247,6 @@ export default class ManagementFleetsIndexController extends Controller {
|
|
|
246
247
|
filterable: true,
|
|
247
248
|
filterComponent: 'filter/string',
|
|
248
249
|
},
|
|
249
|
-
{
|
|
250
|
-
label: 'Internal ID',
|
|
251
|
-
valuePath: 'internal_id',
|
|
252
|
-
cellComponent: 'table/cell/anchor',
|
|
253
|
-
action: this.viewFleet,
|
|
254
|
-
width: '120px',
|
|
255
|
-
resizable: true,
|
|
256
|
-
sortable: true,
|
|
257
|
-
filterable: true,
|
|
258
|
-
hidden: true,
|
|
259
|
-
filterComponent: 'filter/string',
|
|
260
|
-
},
|
|
261
250
|
{
|
|
262
251
|
label: 'Manpower',
|
|
263
252
|
valuePath: 'drivers_count',
|
|
@@ -297,7 +286,7 @@ export default class ManagementFleetsIndexController extends Controller {
|
|
|
297
286
|
},
|
|
298
287
|
{
|
|
299
288
|
label: 'Created At',
|
|
300
|
-
valuePath: '
|
|
289
|
+
valuePath: 'createdAt',
|
|
301
290
|
sortParam: 'created_at',
|
|
302
291
|
width: '120px',
|
|
303
292
|
resizable: true,
|
|
@@ -307,7 +296,7 @@ export default class ManagementFleetsIndexController extends Controller {
|
|
|
307
296
|
},
|
|
308
297
|
{
|
|
309
298
|
label: 'Updated At',
|
|
310
|
-
valuePath: '
|
|
299
|
+
valuePath: 'updatedAt',
|
|
311
300
|
sortParam: 'updated_at',
|
|
312
301
|
width: '120px',
|
|
313
302
|
resizable: true,
|
|
@@ -79,7 +79,7 @@ export default class ManagementFuelReportsIndexNewController extends Controller
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
this.hostRouter.refresh();
|
|
82
|
-
return this.hostRouter.transitionTo('console.fleet-ops.management.fuel-reports.index.details', fuelReport).then(() => {
|
|
82
|
+
return this.hostRouter.transitionTo('console.fleet-ops.management.fuel-reports.index.details', fuelReport.public_id).then(() => {
|
|
83
83
|
this.resetForm();
|
|
84
84
|
});
|
|
85
85
|
}
|