@burdenoff/microfe-movethewheels 2026.1031.2 → 2026.1031.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/dist/MoveTheWheelsRoot.js +121 -104
- package/dist/MoveTheWheelsRoutes.js +142 -133
- package/dist/components/DocumentsCard.js +11 -11
- package/dist/components/ProofOfDeliveryCard.js +13 -13
- package/dist/components/ShipmentRiskDialog.js +24 -24
- package/dist/components/ShippingQuoteResults.js +46 -46
- package/dist/components/TrackingAlertList.js +17 -17
- package/dist/generated/tracking-quality-operations.d.ts +140 -0
- package/dist/hooks/useEntityImport.js +68 -0
- package/dist/hooks/useOrderDispatch.js +17 -17
- package/dist/movethewheels/hooks/useEntityImport.d.ts +19 -0
- package/dist/movethewheels/pages/ImportExportPage.d.ts +9 -0
- package/dist/movethewheels/pages/SettingsPage.d.ts +1 -0
- package/dist/movethewheels/providers/ModuleSettingsProvider.d.ts +17 -0
- package/dist/movethewheels/utils/entityImport.d.ts +109 -0
- package/dist/movethewheels/utils/formatters.d.ts +23 -3
- package/dist/movethewheels/utils/moduleSettings.d.ts +52 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-down-up.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/bell.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-spreadsheet.js +30 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-up.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/key-round.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plug.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/settings.js +13 -0
- package/dist/pages/AnalyticsPage.js +27 -27
- package/dist/pages/CreateOrderPage.js +340 -317
- package/dist/pages/CustomerDetailsPage.js +246 -246
- package/dist/pages/CustomersPage.js +88 -79
- package/dist/pages/DashboardPage.js +24 -24
- package/dist/pages/DeliveryCapturePage.js +74 -74
- package/dist/pages/DriverDetailsPage.js +337 -337
- package/dist/pages/DriversPage.js +119 -110
- package/dist/pages/FinancePage.js +26 -26
- package/dist/pages/ImportExportPage.js +435 -0
- package/dist/pages/InventoryPage.js +28 -28
- package/dist/pages/LiveTrackingPage.js +108 -108
- package/dist/pages/MarketplacePage.js +44 -44
- package/dist/pages/OrderDetailsPage.js +306 -306
- package/dist/pages/OrdersListPage.js +27 -27
- package/dist/pages/ProductDetailsPage.js +89 -89
- package/dist/pages/ProductsPage.js +86 -77
- package/dist/pages/RouteDetailsPage.js +282 -285
- package/dist/pages/RoutesPage.js +78 -78
- package/dist/pages/SettingsPage.js +459 -0
- package/dist/pages/TrackingPage.js +41 -41
- package/dist/pages/VehicleDetailsPage.js +207 -207
- package/dist/pages/VehiclesPage.js +100 -90
- package/dist/pages/WarehouseDetailsPage.js +132 -132
- package/dist/pages/WarehousesPage.js +97 -88
- package/dist/providers/ModuleSettingsProvider.js +74 -0
- package/dist/utils/entityImport.js +73 -0
- package/dist/utils/formatters.js +53 -26
- package/dist/utils/moduleSettings.js +132 -0
- package/package.json +4 -2
- package/src/generated/tracking-quality-operations.ts +184 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +22 -3
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +13 -0
- package/src/movethewheels/hooks/useEntityImport.ts +108 -0
- package/src/movethewheels/pages/CreateOrderPage.tsx +38 -6
- package/src/movethewheels/pages/CustomersPage.tsx +6 -1
- package/src/movethewheels/pages/DriversPage.tsx +6 -0
- package/src/movethewheels/pages/ImportExportPage.tsx +483 -0
- package/src/movethewheels/pages/ProductsPage.tsx +16 -3
- package/src/movethewheels/pages/RouteDetailsPage.tsx +3 -6
- package/src/movethewheels/pages/RoutesPage.tsx +2 -2
- package/src/movethewheels/pages/SettingsPage.tsx +516 -0
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +4 -2
- package/src/movethewheels/pages/VehiclesPage.tsx +8 -1
- package/src/movethewheels/pages/WarehousesPage.tsx +6 -1
- package/src/movethewheels/providers/ModuleSettingsProvider.tsx +133 -0
- package/src/movethewheels/utils/entityImport.ts +239 -0
- package/src/movethewheels/utils/formatters.ts +69 -10
- package/src/movethewheels/utils/moduleSettings.ts +224 -0
|
@@ -5,148 +5,158 @@ import { Plus as r } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
|
|
|
5
5
|
import { RefreshCw as i } from "../node_modules/lucide-react/dist/esm/icons/refresh-cw.js";
|
|
6
6
|
import { Route as a } from "../node_modules/lucide-react/dist/esm/icons/route.js";
|
|
7
7
|
import { Truck as o } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
8
|
+
import { Upload as s } from "../node_modules/lucide-react/dist/esm/icons/upload.js";
|
|
9
|
+
import { Wrench as c } from "../node_modules/lucide-react/dist/esm/icons/wrench.js";
|
|
10
|
+
import { joinPath as l } from "../utils/navigation.js";
|
|
11
|
+
import { useMoveTheWheels as u } from "../providers/MoveTheWheelsProvider.js";
|
|
12
|
+
import { formatWeight as d } from "../utils/formatters.js";
|
|
13
|
+
import { useFleetStats as f, useVehicles as ee } from "../hooks/useFleet.js";
|
|
14
|
+
import { Button as te, Card as p, CardContent as m, Progress as h, Select as g, SelectContent as ne, SelectItem as re, SelectTrigger as ie, SelectValue as _ } from "../components/ui.js";
|
|
15
|
+
import { PageLayout as v } from "../components/PageLayout.js";
|
|
16
|
+
import { MetricCard as y, MetricGrid as b } from "../components/MetricCard.js";
|
|
17
|
+
import { VEHICLE_STATUS_LABELS as x } from "../constants/index.js";
|
|
18
|
+
import { StatusBadge as S, VehicleTypeBadge as C } from "../components/StatusBadge.js";
|
|
19
|
+
import { DataTable as w } from "../components/DataTable.js";
|
|
20
|
+
import { useDebouncedValue as T } from "../hooks/useDebouncedValue.js";
|
|
21
|
+
import { useEntityExport as E } from "../hooks/useEntityExport.js";
|
|
22
|
+
import { ExportStatusBanner as D } from "../components/ExportStatusBanner.js";
|
|
23
|
+
import { useState as O } from "react";
|
|
24
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
25
|
+
import { CTAOverflowMenu as j, PagePurpose as M } from "@burdenoff/fe-libs/ui";
|
|
24
26
|
//#region src/movethewheels/pages/VehiclesPage.tsx
|
|
25
|
-
var
|
|
27
|
+
var N = [{
|
|
26
28
|
value: "all",
|
|
27
29
|
label: "All statuses"
|
|
28
|
-
}, ...Object.entries(
|
|
30
|
+
}, ...Object.entries(x).map(([e, t]) => ({
|
|
29
31
|
value: e,
|
|
30
32
|
label: t
|
|
31
33
|
}))];
|
|
32
|
-
function
|
|
33
|
-
let { basePath:
|
|
34
|
-
limit:
|
|
35
|
-
offset:
|
|
36
|
-
search:
|
|
37
|
-
status:
|
|
38
|
-
}),
|
|
39
|
-
|
|
34
|
+
function P() {
|
|
35
|
+
let { basePath: x, navigate: P } = u(), { state: F, isExporting: ae, startExport: I, dismiss: L } = E("vehicles", "vehicle"), [R, z] = O(0), [B, V] = O(25), [H, U] = O(""), [W, G] = O("all"), K = T(H), { vehicles: q, totalVehicles: J, hasMore: oe, isLoading: Y, error: se, refetch: X } = ee({
|
|
36
|
+
limit: B,
|
|
37
|
+
offset: R * B,
|
|
38
|
+
search: K || void 0,
|
|
39
|
+
status: W === "all" ? void 0 : W
|
|
40
|
+
}), ce = W !== "all" || H.length > 0, { stats: Z } = f(), Q = Z.totalVehicles, $ = (e) => {
|
|
41
|
+
P && P(l(x, e));
|
|
40
42
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ A(v, {
|
|
42
44
|
title: "Vehicles",
|
|
43
45
|
subtitle: `${Q} vehicles in fleet`,
|
|
44
|
-
icon: /* @__PURE__ */
|
|
45
|
-
headerActions: /* @__PURE__ */
|
|
46
|
+
icon: /* @__PURE__ */ k(o, { size: 24 }),
|
|
47
|
+
headerActions: /* @__PURE__ */ k(j, {
|
|
46
48
|
primary: {
|
|
47
49
|
label: "Add Vehicle",
|
|
48
|
-
icon: /* @__PURE__ */
|
|
50
|
+
icon: /* @__PURE__ */ k(r, { size: 16 }),
|
|
49
51
|
onSelect: () => $("fleet/vehicles/new")
|
|
50
52
|
},
|
|
51
|
-
actions: [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
actions: [
|
|
54
|
+
{
|
|
55
|
+
label: "Refresh",
|
|
56
|
+
icon: /* @__PURE__ */ k(i, { size: 16 }),
|
|
57
|
+
onSelect: () => X()
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "Import",
|
|
61
|
+
icon: /* @__PURE__ */ k(s, { size: 16 }),
|
|
62
|
+
onSelect: () => $("import-export?entity=VEHICLE")
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: ae ? "Exporting…" : "Export",
|
|
66
|
+
icon: /* @__PURE__ */ k(t, { size: 16 }),
|
|
67
|
+
onSelect: I
|
|
68
|
+
}
|
|
69
|
+
]
|
|
60
70
|
}),
|
|
61
71
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
icon: /* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ k(M, {
|
|
73
|
+
icon: /* @__PURE__ */ k(o, { size: 18 }),
|
|
64
74
|
children: "Every truck, van and bike in your fleet. Monitor capacity, fuel level, mileage and maintenance status here so you always know which vehicles are road-ready before dispatching an order."
|
|
65
75
|
}),
|
|
66
|
-
/* @__PURE__ */ D
|
|
67
|
-
state:
|
|
68
|
-
onDismiss:
|
|
76
|
+
/* @__PURE__ */ k(D, {
|
|
77
|
+
state: F,
|
|
78
|
+
onDismiss: L
|
|
69
79
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
71
81
|
className: "mb-3 text-sm font-medium text-text-secondary",
|
|
72
82
|
children: "Fleet at a glance"
|
|
73
|
-
}), /* @__PURE__ */
|
|
83
|
+
}), /* @__PURE__ */ A(b, {
|
|
74
84
|
columns: 4,
|
|
75
85
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ k(y, {
|
|
77
87
|
label: "Total vehicles",
|
|
78
88
|
value: Q,
|
|
79
|
-
icon: /* @__PURE__ */
|
|
89
|
+
icon: /* @__PURE__ */ k(o, { size: 20 }),
|
|
80
90
|
accent: "brand"
|
|
81
91
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ k(y, {
|
|
83
93
|
label: "Available now",
|
|
84
94
|
value: Z.vehiclesByStatus.available,
|
|
85
|
-
icon: /* @__PURE__ */
|
|
95
|
+
icon: /* @__PURE__ */ k(e, { size: 20 }),
|
|
86
96
|
accent: "success",
|
|
87
97
|
subtitle: "Ready to dispatch"
|
|
88
98
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ k(y, {
|
|
90
100
|
label: "On assignment",
|
|
91
101
|
value: Z.vehiclesByStatus.assigned,
|
|
92
|
-
icon: /* @__PURE__ */
|
|
102
|
+
icon: /* @__PURE__ */ k(a, { size: 20 }),
|
|
93
103
|
accent: "blue"
|
|
94
104
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ k(y, {
|
|
96
106
|
label: "In maintenance",
|
|
97
107
|
value: Z.vehiclesByStatus.maintenance,
|
|
98
|
-
icon: /* @__PURE__ */
|
|
108
|
+
icon: /* @__PURE__ */ k(c, { size: 20 }),
|
|
99
109
|
accent: "warning"
|
|
100
110
|
})
|
|
101
111
|
]
|
|
102
112
|
})] }),
|
|
103
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ k(p, { children: /* @__PURE__ */ k(m, {
|
|
104
114
|
className: "p-4",
|
|
105
|
-
children: /* @__PURE__ */
|
|
115
|
+
children: /* @__PURE__ */ A("div", {
|
|
106
116
|
className: "flex flex-wrap items-center gap-4",
|
|
107
117
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ A("div", {
|
|
109
119
|
className: "flex items-center gap-2",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ k(n, {
|
|
111
121
|
size: 16,
|
|
112
122
|
className: "text-text-secondary"
|
|
113
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ k("span", {
|
|
114
124
|
className: "text-sm font-medium",
|
|
115
125
|
children: "Filters:"
|
|
116
126
|
})]
|
|
117
127
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
value:
|
|
128
|
+
/* @__PURE__ */ A(g, {
|
|
129
|
+
value: W,
|
|
120
130
|
onValueChange: (e) => {
|
|
121
|
-
|
|
131
|
+
G(e), z(0);
|
|
122
132
|
},
|
|
123
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ k(ie, {
|
|
124
134
|
className: "w-[180px]",
|
|
125
|
-
children: /* @__PURE__ */
|
|
126
|
-
}), /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ k(_, { placeholder: "Status" })
|
|
136
|
+
}), /* @__PURE__ */ k(ne, { children: N.map((e) => /* @__PURE__ */ k(re, {
|
|
127
137
|
value: e.value,
|
|
128
138
|
children: e.label
|
|
129
139
|
}, e.value)) })]
|
|
130
140
|
}),
|
|
131
|
-
|
|
141
|
+
ce && /* @__PURE__ */ k(te, {
|
|
132
142
|
variant: "ghost",
|
|
133
143
|
size: "sm",
|
|
134
144
|
onClick: () => {
|
|
135
|
-
|
|
145
|
+
G("all"), U(""), z(0);
|
|
136
146
|
},
|
|
137
147
|
children: "Clear filters"
|
|
138
148
|
})
|
|
139
149
|
]
|
|
140
150
|
})
|
|
141
151
|
}) }),
|
|
142
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ k(w, {
|
|
143
153
|
columns: [
|
|
144
154
|
{
|
|
145
155
|
id: "vehicleNumber",
|
|
146
156
|
header: "Vehicle #",
|
|
147
157
|
accessorKey: "vehicleNumber",
|
|
148
158
|
sortable: !0,
|
|
149
|
-
cell: (e) => /* @__PURE__ */
|
|
159
|
+
cell: (e) => /* @__PURE__ */ k("span", {
|
|
150
160
|
className: "font-medium",
|
|
151
161
|
children: e.vehicleNumber
|
|
152
162
|
})
|
|
@@ -155,19 +165,19 @@ function M() {
|
|
|
155
165
|
id: "type",
|
|
156
166
|
header: "Type",
|
|
157
167
|
accessorKey: "type",
|
|
158
|
-
cell: (e) => /* @__PURE__ */
|
|
168
|
+
cell: (e) => /* @__PURE__ */ k(C, { type: e.type })
|
|
159
169
|
},
|
|
160
170
|
{
|
|
161
171
|
id: "details",
|
|
162
172
|
header: "Vehicle",
|
|
163
|
-
cell: (e) => /* @__PURE__ */
|
|
173
|
+
cell: (e) => /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("p", {
|
|
164
174
|
className: "font-medium",
|
|
165
175
|
children: [
|
|
166
176
|
e.make,
|
|
167
177
|
" ",
|
|
168
178
|
e.model
|
|
169
179
|
]
|
|
170
|
-
}), /* @__PURE__ */
|
|
180
|
+
}), /* @__PURE__ */ k("p", {
|
|
171
181
|
className: "text-sm text-text-secondary",
|
|
172
182
|
children: e.year ?? "—"
|
|
173
183
|
})] })
|
|
@@ -177,7 +187,7 @@ function M() {
|
|
|
177
187
|
header: "Status",
|
|
178
188
|
accessorKey: "status",
|
|
179
189
|
sortable: !0,
|
|
180
|
-
cell: (e) => /* @__PURE__ */
|
|
190
|
+
cell: (e) => /* @__PURE__ */ k(S, {
|
|
181
191
|
status: e.status,
|
|
182
192
|
type: "vehicle"
|
|
183
193
|
})
|
|
@@ -185,9 +195,9 @@ function M() {
|
|
|
185
195
|
{
|
|
186
196
|
id: "capacity",
|
|
187
197
|
header: "Capacity",
|
|
188
|
-
cell: (e) => /* @__PURE__ */
|
|
198
|
+
cell: (e) => /* @__PURE__ */ A("div", {
|
|
189
199
|
className: "text-sm",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ k("p", { children: e.capacity.weight === void 0 ? "—" : d(e.capacity.weight) }), /* @__PURE__ */ k("p", {
|
|
191
201
|
className: "text-text-secondary",
|
|
192
202
|
children: e.capacity.volume === void 0 ? "—" : `${e.capacity.volume} m³`
|
|
193
203
|
})]
|
|
@@ -196,12 +206,12 @@ function M() {
|
|
|
196
206
|
{
|
|
197
207
|
id: "fuel",
|
|
198
208
|
header: "Fuel Level",
|
|
199
|
-
cell: (e) => e.fuelLevel === void 0 ? "-" : /* @__PURE__ */
|
|
209
|
+
cell: (e) => e.fuelLevel === void 0 ? "-" : /* @__PURE__ */ A("div", {
|
|
200
210
|
className: "flex items-center gap-2",
|
|
201
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ k(h, {
|
|
202
212
|
value: e.fuelLevel,
|
|
203
213
|
className: "w-16 h-2"
|
|
204
|
-
}), /* @__PURE__ */
|
|
214
|
+
}), /* @__PURE__ */ A("span", {
|
|
205
215
|
className: "text-sm",
|
|
206
216
|
children: [e.fuelLevel, "%"]
|
|
207
217
|
})]
|
|
@@ -215,9 +225,9 @@ function M() {
|
|
|
215
225
|
cell: (e) => e.mileage ? `${e.mileage.toLocaleString()} mi` : "-"
|
|
216
226
|
}
|
|
217
227
|
],
|
|
218
|
-
data:
|
|
219
|
-
isLoading:
|
|
220
|
-
error:
|
|
228
|
+
data: q,
|
|
229
|
+
isLoading: Y,
|
|
230
|
+
error: se,
|
|
221
231
|
onRetry: X,
|
|
222
232
|
searchable: !0,
|
|
223
233
|
searchPlaceholder: "Search vehicles...",
|
|
@@ -226,20 +236,20 @@ function M() {
|
|
|
226
236
|
"make",
|
|
227
237
|
"model"
|
|
228
238
|
],
|
|
229
|
-
searchQuery:
|
|
239
|
+
searchQuery: H,
|
|
230
240
|
onSearchQueryChange: (e) => {
|
|
231
|
-
|
|
241
|
+
U(e), z(0);
|
|
232
242
|
},
|
|
233
243
|
onRowClick: (e) => $(`fleet/vehicles/${e.id}`),
|
|
234
244
|
getRowId: (e) => e.id,
|
|
235
|
-
pageIndex:
|
|
236
|
-
pageSize:
|
|
237
|
-
onPageChange:
|
|
245
|
+
pageIndex: R,
|
|
246
|
+
pageSize: B,
|
|
247
|
+
onPageChange: z,
|
|
238
248
|
onPageSizeChange: (e) => {
|
|
239
|
-
|
|
249
|
+
V(e), z(0);
|
|
240
250
|
},
|
|
241
|
-
totalItems:
|
|
242
|
-
hasNextPage:
|
|
251
|
+
totalItems: J,
|
|
252
|
+
hasNextPage: oe,
|
|
243
253
|
emptyIllustration: "empty-data",
|
|
244
254
|
emptyTitle: "No vehicles yet",
|
|
245
255
|
emptyDescription: "Add vehicles to your fleet to start assigning them to deliveries."
|
|
@@ -248,4 +258,4 @@ function M() {
|
|
|
248
258
|
});
|
|
249
259
|
}
|
|
250
260
|
//#endregion
|
|
251
|
-
export {
|
|
261
|
+
export { P as default };
|