@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.
Files changed (74) hide show
  1. package/dist/MoveTheWheelsRoot.js +121 -104
  2. package/dist/MoveTheWheelsRoutes.js +142 -133
  3. package/dist/components/DocumentsCard.js +11 -11
  4. package/dist/components/ProofOfDeliveryCard.js +13 -13
  5. package/dist/components/ShipmentRiskDialog.js +24 -24
  6. package/dist/components/ShippingQuoteResults.js +46 -46
  7. package/dist/components/TrackingAlertList.js +17 -17
  8. package/dist/generated/tracking-quality-operations.d.ts +140 -0
  9. package/dist/hooks/useEntityImport.js +68 -0
  10. package/dist/hooks/useOrderDispatch.js +17 -17
  11. package/dist/movethewheels/hooks/useEntityImport.d.ts +19 -0
  12. package/dist/movethewheels/pages/ImportExportPage.d.ts +9 -0
  13. package/dist/movethewheels/pages/SettingsPage.d.ts +1 -0
  14. package/dist/movethewheels/providers/ModuleSettingsProvider.d.ts +17 -0
  15. package/dist/movethewheels/utils/entityImport.d.ts +109 -0
  16. package/dist/movethewheels/utils/formatters.d.ts +23 -3
  17. package/dist/movethewheels/utils/moduleSettings.d.ts +52 -0
  18. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-down-up.js +22 -0
  19. package/dist/node_modules/lucide-react/dist/esm/icons/bell.js +11 -0
  20. package/dist/node_modules/lucide-react/dist/esm/icons/file-spreadsheet.js +30 -0
  21. package/dist/node_modules/lucide-react/dist/esm/icons/file-up.js +22 -0
  22. package/dist/node_modules/lucide-react/dist/esm/icons/key-round.js +14 -0
  23. package/dist/node_modules/lucide-react/dist/esm/icons/plug.js +22 -0
  24. package/dist/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js +11 -0
  25. package/dist/node_modules/lucide-react/dist/esm/icons/settings.js +13 -0
  26. package/dist/pages/AnalyticsPage.js +27 -27
  27. package/dist/pages/CreateOrderPage.js +340 -317
  28. package/dist/pages/CustomerDetailsPage.js +246 -246
  29. package/dist/pages/CustomersPage.js +88 -79
  30. package/dist/pages/DashboardPage.js +24 -24
  31. package/dist/pages/DeliveryCapturePage.js +74 -74
  32. package/dist/pages/DriverDetailsPage.js +337 -337
  33. package/dist/pages/DriversPage.js +119 -110
  34. package/dist/pages/FinancePage.js +26 -26
  35. package/dist/pages/ImportExportPage.js +435 -0
  36. package/dist/pages/InventoryPage.js +28 -28
  37. package/dist/pages/LiveTrackingPage.js +108 -108
  38. package/dist/pages/MarketplacePage.js +44 -44
  39. package/dist/pages/OrderDetailsPage.js +306 -306
  40. package/dist/pages/OrdersListPage.js +27 -27
  41. package/dist/pages/ProductDetailsPage.js +89 -89
  42. package/dist/pages/ProductsPage.js +86 -77
  43. package/dist/pages/RouteDetailsPage.js +282 -285
  44. package/dist/pages/RoutesPage.js +78 -78
  45. package/dist/pages/SettingsPage.js +459 -0
  46. package/dist/pages/TrackingPage.js +41 -41
  47. package/dist/pages/VehicleDetailsPage.js +207 -207
  48. package/dist/pages/VehiclesPage.js +100 -90
  49. package/dist/pages/WarehouseDetailsPage.js +132 -132
  50. package/dist/pages/WarehousesPage.js +97 -88
  51. package/dist/providers/ModuleSettingsProvider.js +74 -0
  52. package/dist/utils/entityImport.js +73 -0
  53. package/dist/utils/formatters.js +53 -26
  54. package/dist/utils/moduleSettings.js +132 -0
  55. package/package.json +4 -2
  56. package/src/generated/tracking-quality-operations.ts +184 -0
  57. package/src/movethewheels/MoveTheWheelsRoot.tsx +22 -3
  58. package/src/movethewheels/MoveTheWheelsRoutes.tsx +13 -0
  59. package/src/movethewheels/hooks/useEntityImport.ts +108 -0
  60. package/src/movethewheels/pages/CreateOrderPage.tsx +38 -6
  61. package/src/movethewheels/pages/CustomersPage.tsx +6 -1
  62. package/src/movethewheels/pages/DriversPage.tsx +6 -0
  63. package/src/movethewheels/pages/ImportExportPage.tsx +483 -0
  64. package/src/movethewheels/pages/ProductsPage.tsx +16 -3
  65. package/src/movethewheels/pages/RouteDetailsPage.tsx +3 -6
  66. package/src/movethewheels/pages/RoutesPage.tsx +2 -2
  67. package/src/movethewheels/pages/SettingsPage.tsx +516 -0
  68. package/src/movethewheels/pages/VehicleDetailsPage.tsx +4 -2
  69. package/src/movethewheels/pages/VehiclesPage.tsx +8 -1
  70. package/src/movethewheels/pages/WarehousesPage.tsx +6 -1
  71. package/src/movethewheels/providers/ModuleSettingsProvider.tsx +133 -0
  72. package/src/movethewheels/utils/entityImport.ts +239 -0
  73. package/src/movethewheels/utils/formatters.ts +69 -10
  74. 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 { Wrench as s } from "../node_modules/lucide-react/dist/esm/icons/wrench.js";
9
- import { joinPath as c } from "../utils/navigation.js";
10
- import { useMoveTheWheels as l } from "../providers/MoveTheWheelsProvider.js";
11
- import { useFleetStats as u, useVehicles as d } from "../hooks/useFleet.js";
12
- import { Button as f, Card as ee, CardContent as p, Progress as m, Select as h, SelectContent as g, SelectItem as te, SelectTrigger as ne, SelectValue as re } from "../components/ui.js";
13
- import { PageLayout as ie } from "../components/PageLayout.js";
14
- import { MetricCard as _, MetricGrid as v } from "../components/MetricCard.js";
15
- import { VEHICLE_STATUS_LABELS as y } from "../constants/index.js";
16
- import { StatusBadge as b, VehicleTypeBadge as x } from "../components/StatusBadge.js";
17
- import { DataTable as S } from "../components/DataTable.js";
18
- import { useDebouncedValue as C } from "../hooks/useDebouncedValue.js";
19
- import { useEntityExport as w } from "../hooks/useEntityExport.js";
20
- import { ExportStatusBanner as T } from "../components/ExportStatusBanner.js";
21
- import { useState as E } from "react";
22
- import { jsx as D, jsxs as O } from "react/jsx-runtime";
23
- import { CTAOverflowMenu as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
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 j = [{
27
+ var N = [{
26
28
  value: "all",
27
29
  label: "All statuses"
28
- }, ...Object.entries(y).map(([e, t]) => ({
30
+ }, ...Object.entries(x).map(([e, t]) => ({
29
31
  value: e,
30
32
  label: t
31
33
  }))];
32
- function M() {
33
- let { basePath: y, navigate: M } = l(), { state: N, isExporting: P, startExport: F, dismiss: ae } = w("vehicles", "vehicle"), [I, L] = E(0), [R, z] = E(25), [B, V] = E(""), [H, U] = E("all"), W = C(B), { vehicles: G, totalVehicles: K, hasMore: q, isLoading: J, error: Y, refetch: X } = d({
34
- limit: R,
35
- offset: I * R,
36
- search: W || void 0,
37
- status: H === "all" ? void 0 : H
38
- }), oe = H !== "all" || B.length > 0, { stats: Z } = u(), Q = Z.totalVehicles, $ = (e) => {
39
- M && M(c(y, e));
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__ */ O(ie, {
43
+ return /* @__PURE__ */ A(v, {
42
44
  title: "Vehicles",
43
45
  subtitle: `${Q} vehicles in fleet`,
44
- icon: /* @__PURE__ */ D(o, { size: 24 }),
45
- headerActions: /* @__PURE__ */ D(k, {
46
+ icon: /* @__PURE__ */ k(o, { size: 24 }),
47
+ headerActions: /* @__PURE__ */ k(j, {
46
48
  primary: {
47
49
  label: "Add Vehicle",
48
- icon: /* @__PURE__ */ D(r, { size: 16 }),
50
+ icon: /* @__PURE__ */ k(r, { size: 16 }),
49
51
  onSelect: () => $("fleet/vehicles/new")
50
52
  },
51
- actions: [{
52
- label: "Refresh",
53
- icon: /* @__PURE__ */ D(i, { size: 16 }),
54
- onSelect: () => X()
55
- }, {
56
- label: P ? "Exporting…" : "Export",
57
- icon: /* @__PURE__ */ D(t, { size: 16 }),
58
- onSelect: F
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__ */ D(A, {
63
- icon: /* @__PURE__ */ D(o, { size: 18 }),
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(T, {
67
- state: N,
68
- onDismiss: ae
76
+ /* @__PURE__ */ k(D, {
77
+ state: F,
78
+ onDismiss: L
69
79
  }),
70
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
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__ */ O(v, {
83
+ }), /* @__PURE__ */ A(b, {
74
84
  columns: 4,
75
85
  children: [
76
- /* @__PURE__ */ D(_, {
86
+ /* @__PURE__ */ k(y, {
77
87
  label: "Total vehicles",
78
88
  value: Q,
79
- icon: /* @__PURE__ */ D(o, { size: 20 }),
89
+ icon: /* @__PURE__ */ k(o, { size: 20 }),
80
90
  accent: "brand"
81
91
  }),
82
- /* @__PURE__ */ D(_, {
92
+ /* @__PURE__ */ k(y, {
83
93
  label: "Available now",
84
94
  value: Z.vehiclesByStatus.available,
85
- icon: /* @__PURE__ */ D(e, { size: 20 }),
95
+ icon: /* @__PURE__ */ k(e, { size: 20 }),
86
96
  accent: "success",
87
97
  subtitle: "Ready to dispatch"
88
98
  }),
89
- /* @__PURE__ */ D(_, {
99
+ /* @__PURE__ */ k(y, {
90
100
  label: "On assignment",
91
101
  value: Z.vehiclesByStatus.assigned,
92
- icon: /* @__PURE__ */ D(a, { size: 20 }),
102
+ icon: /* @__PURE__ */ k(a, { size: 20 }),
93
103
  accent: "blue"
94
104
  }),
95
- /* @__PURE__ */ D(_, {
105
+ /* @__PURE__ */ k(y, {
96
106
  label: "In maintenance",
97
107
  value: Z.vehiclesByStatus.maintenance,
98
- icon: /* @__PURE__ */ D(s, { size: 20 }),
108
+ icon: /* @__PURE__ */ k(c, { size: 20 }),
99
109
  accent: "warning"
100
110
  })
101
111
  ]
102
112
  })] }),
103
- /* @__PURE__ */ D(ee, { children: /* @__PURE__ */ D(p, {
113
+ /* @__PURE__ */ k(p, { children: /* @__PURE__ */ k(m, {
104
114
  className: "p-4",
105
- children: /* @__PURE__ */ O("div", {
115
+ children: /* @__PURE__ */ A("div", {
106
116
  className: "flex flex-wrap items-center gap-4",
107
117
  children: [
108
- /* @__PURE__ */ O("div", {
118
+ /* @__PURE__ */ A("div", {
109
119
  className: "flex items-center gap-2",
110
- children: [/* @__PURE__ */ D(n, {
120
+ children: [/* @__PURE__ */ k(n, {
111
121
  size: 16,
112
122
  className: "text-text-secondary"
113
- }), /* @__PURE__ */ D("span", {
123
+ }), /* @__PURE__ */ k("span", {
114
124
  className: "text-sm font-medium",
115
125
  children: "Filters:"
116
126
  })]
117
127
  }),
118
- /* @__PURE__ */ O(h, {
119
- value: H,
128
+ /* @__PURE__ */ A(g, {
129
+ value: W,
120
130
  onValueChange: (e) => {
121
- U(e), L(0);
131
+ G(e), z(0);
122
132
  },
123
- children: [/* @__PURE__ */ D(ne, {
133
+ children: [/* @__PURE__ */ k(ie, {
124
134
  className: "w-[180px]",
125
- children: /* @__PURE__ */ D(re, { placeholder: "Status" })
126
- }), /* @__PURE__ */ D(g, { children: j.map((e) => /* @__PURE__ */ D(te, {
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
- oe && /* @__PURE__ */ D(f, {
141
+ ce && /* @__PURE__ */ k(te, {
132
142
  variant: "ghost",
133
143
  size: "sm",
134
144
  onClick: () => {
135
- U("all"), V(""), L(0);
145
+ G("all"), U(""), z(0);
136
146
  },
137
147
  children: "Clear filters"
138
148
  })
139
149
  ]
140
150
  })
141
151
  }) }),
142
- /* @__PURE__ */ D(S, {
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__ */ D("span", {
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__ */ D(x, { type: e.type })
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__ */ O("div", { children: [/* @__PURE__ */ O("p", {
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__ */ D("p", {
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__ */ D(b, {
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__ */ O("div", {
198
+ cell: (e) => /* @__PURE__ */ A("div", {
189
199
  className: "text-sm",
190
- children: [/* @__PURE__ */ D("p", { children: e.capacity.weight === void 0 ? "—" : `${e.capacity.weight} kg` }), /* @__PURE__ */ D("p", {
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__ */ O("div", {
209
+ cell: (e) => e.fuelLevel === void 0 ? "-" : /* @__PURE__ */ A("div", {
200
210
  className: "flex items-center gap-2",
201
- children: [/* @__PURE__ */ D(m, {
211
+ children: [/* @__PURE__ */ k(h, {
202
212
  value: e.fuelLevel,
203
213
  className: "w-16 h-2"
204
- }), /* @__PURE__ */ O("span", {
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: G,
219
- isLoading: J,
220
- error: Y,
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: B,
239
+ searchQuery: H,
230
240
  onSearchQueryChange: (e) => {
231
- V(e), L(0);
241
+ U(e), z(0);
232
242
  },
233
243
  onRowClick: (e) => $(`fleet/vehicles/${e.id}`),
234
244
  getRowId: (e) => e.id,
235
- pageIndex: I,
236
- pageSize: R,
237
- onPageChange: L,
245
+ pageIndex: R,
246
+ pageSize: B,
247
+ onPageChange: z,
238
248
  onPageSizeChange: (e) => {
239
- z(e), L(0);
249
+ V(e), z(0);
240
250
  },
241
- totalItems: K,
242
- hasNextPage: q,
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 { M as default };
261
+ export { P as default };