@burdenoff/microfe-movethewheels 2026.703.7 → 2026.704.1

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 (117) hide show
  1. package/dist/{AIAssistantPage-B7FGmmKT.js → AIAssistantPage-MWJLAMN_.js} +5 -5
  2. package/dist/{AnalyticsPage-DXduj5KB.js → AnalyticsPage-900jpV2T.js} +9 -9
  3. package/dist/{CreateOrderPage-DuJJQ16b.js → CreateOrderPage-CXbhJLLz.js} +164 -139
  4. package/dist/{CustomerDetailsPage-C98SKw7Z.js → CustomerDetailsPage-CHzg75Q5.js} +16 -16
  5. package/dist/{CustomersPage-s8hK55JL.js → CustomersPage-CwtVspuq.js} +11 -11
  6. package/dist/{DashboardPage-BsEgcKEN.js → DashboardPage-BoswH3ec.js} +17 -17
  7. package/dist/{DataTable-Da7yHjM1.js → DataTable-CmdZd6iV.js} +7 -7
  8. package/dist/{DocumentsCard-CziaTJhP.js → DocumentsCard-y2ybnAlu.js} +4 -4
  9. package/dist/DriverDetailsPage-CPO0G8Ki.js +518 -0
  10. package/dist/{DriversPage-Duy_ITG6.js → DriversPage-6Z61dpDI.js} +11 -11
  11. package/dist/{FinancePage-BZtPTpmT.js → FinancePage-DYadOUzC.js} +9 -9
  12. package/dist/{FleetPage-DJfzoHbs.js → FleetPage-qWRj7WFO.js} +10 -10
  13. package/dist/{FormError-CWjGwOW8.js → FormError-D4T5FWZA.js} +1 -1
  14. package/dist/{ImportExportPage-DJ77GK_7.js → ImportExportPage-BhWGfbH3.js} +6 -6
  15. package/dist/{InventoryPage-Dpnwk_N3.js → InventoryPage-DbR4Z--d.js} +10 -10
  16. package/dist/{LiveTrackingPage-CLlvsP1B.js → LiveTrackingPage-5U68u3oA.js} +10 -10
  17. package/dist/{MarketplacePage-d99r-v6p.js → MarketplacePage-DMH0HNDH.js} +9 -9
  18. package/dist/{MetricCard-DA5ZqAVl.js → MetricCard-CqU5WsyW.js} +2 -2
  19. package/dist/{Notice-kkjV2rLR.js → Notice-BrXJ85dA.js} +2 -2
  20. package/dist/{OrderDetailsPage-BePtkyN0.js → OrderDetailsPage-DRYifXm9.js} +28 -24
  21. package/dist/{OrdersListPage-Csy_KScx.js → OrdersListPage-DvICveRv.js} +14 -14
  22. package/dist/{PageLayout-h_q9l8af.js → PageLayout-j9Zw3wBN.js} +579 -561
  23. package/dist/ProductDetailsPage-CWgcRqGR.js +375 -0
  24. package/dist/{ProductsPage-B4jWJ5bv.js → ProductsPage-CokwDOR2.js} +9 -9
  25. package/dist/{ReportsPage-ALRYfXtz.js → ReportsPage-MU8F9DQC.js} +9 -9
  26. package/dist/RouteDetailsPage-BHQbFgI9.js +642 -0
  27. package/dist/{RoutesPage-CQHCDInT.js → RoutesPage-Dqd5Don6.js} +7 -7
  28. package/dist/{SettingsPage-BYBRrlGe.js → SettingsPage-_6SIlcBX.js} +4 -4
  29. package/dist/{Sparkline-Q-6bJ24J.js → Sparkline-DTGdlxUH.js} +1 -1
  30. package/dist/{StatusBadge-1W2p8fEi.js → StatusBadge-BfiF-nNI.js} +1 -1
  31. package/dist/{TrackingPage-CFndTIyk.js → TrackingPage-Cg0tYGJe.js} +11 -11
  32. package/dist/VehicleDetailsPage-BbZlCFPo.js +417 -0
  33. package/dist/{VehiclesPage-ClkfFZxL.js → VehiclesPage-BfBEyXGs.js} +12 -12
  34. package/dist/WarehouseDetailsPage-DxNhiaoI.js +515 -0
  35. package/dist/{WarehousesPage-kNba6cr3.js → WarehousesPage-M3NaBT0z.js} +8 -8
  36. package/dist/{arrow-left-XOzFvBFD.js → arrow-left-1dVWv2dg.js} +1 -1
  37. package/dist/{arrow-right-CRrwlvFe.js → arrow-right-PUCNATnk.js} +1 -1
  38. package/dist/{arrow-up-ClFaLPly.js → arrow-up-VQuGMABN.js} +1 -1
  39. package/dist/{box-BX4WyCLv.js → box-DW1KNP8j.js} +1 -1
  40. package/dist/{boxes-R3nq5f0_.js → boxes-D6I00XqA.js} +1 -1
  41. package/dist/{chart-column-BgF8J9bx.js → chart-column-BwQ5H9ol.js} +1 -1
  42. package/dist/{charts-BS_OnWc6.js → charts-Dv_zxP7L.js} +2 -2
  43. package/dist/{chevron-left-D3hcLQ1g.js → chevron-left-DzNxoaBG.js} +1 -1
  44. package/dist/{chevron-right-BpfSrzQF.js → chevron-right-CKm3ZC1T.js} +1 -1
  45. package/dist/{circle-alert-CLqT8iCQ.js → circle-alert-CtBm6oIb.js} +1 -1
  46. package/dist/{circle-check-CWLAr_8f.js → circle-check-B_Y7FDyR.js} +1 -1
  47. package/dist/{circle-check-big-Dsuz8dJ2.js → circle-check-big-H5pLiMBW.js} +1 -1
  48. package/dist/{clock-DrZOQD8h.js → clock-B4-qjGuB.js} +1 -1
  49. package/dist/{dollar-sign-CJfKfYul.js → dollar-sign-CYGHy2oS.js} +1 -1
  50. package/dist/{download-C-yNvUiL.js → download-BJonq2ty.js} +1 -1
  51. package/dist/{file-text-m2SyQgBo.js → file-text-C-cZx58r.js} +1 -1
  52. package/dist/{filter-uA6govE9.js → filter-B_S6WOqr.js} +1 -1
  53. package/dist/{fuel-BroSIBo1.js → fuel-Cjt6IxKr.js} +1 -1
  54. package/dist/index.js +53 -33
  55. package/dist/{map-BzwQ__kD.js → map-CO0aWUae.js} +1 -1
  56. package/dist/{map-pin-BGbmEGn3.js → map-pin-BISLzLwb.js} +1 -1
  57. package/dist/{maps-DpIuSSmg.js → maps-CtfuCAmh.js} +1 -1
  58. package/dist/{navigation-CjKGLL9T.js → navigation-BFki5UJz.js} +1 -1
  59. package/dist/{package-D36cKFvu.js → package-UyaWiALC.js} +1 -1
  60. package/dist/{phone-mMZFHd1Z.js → phone-Bav_V7rR.js} +1 -1
  61. package/dist/{plus-DY5R-c1j.js → plus-Bk_G-lFC.js} +1 -1
  62. package/dist/{refresh-cw-DyOLYuDU.js → refresh-cw-C4-jecjy.js} +1 -1
  63. package/dist/{route-CuaZ1wU3.js → route-WpCP6F1x.js} +1 -1
  64. package/dist/{save-h9dzHwJE.js → save-CcfoIn2J.js} +1 -1
  65. package/dist/{search-stTGSec-.js → search-C3YRxW9e.js} +1 -1
  66. package/dist/{square-pen-DT5srCPD.js → square-pen-Dr1X-P2s.js} +1 -1
  67. package/dist/{star-gp4yO3PF.js → star-1Ixfuzai.js} +1 -1
  68. package/dist/{store-DJZDAvCY.js → store-BwU935v5.js} +1 -1
  69. package/dist/{trash-2-DwcjTxYE.js → trash-2-CC4KugEJ.js} +1 -1
  70. package/dist/{trending-up-2q2sPVsb.js → trending-up-1brglj1E.js} +1 -1
  71. package/dist/{triangle-alert-CU60xaOi.js → triangle-alert-Dh56Yu3-.js} +1 -1
  72. package/dist/{truck-ByZxqZhI.js → truck-DxhtLfkG.js} +1 -1
  73. package/dist/{upload-CWor1uj3.js → upload-CLf0JLXW.js} +1 -1
  74. package/dist/{useAssistant-uoc8wjr0.js → useAssistant-B9qBtRKm.js} +1 -1
  75. package/dist/{useCustomers-BPPhQXSH.js → useCustomers-BQ4AIEAT.js} +1 -1
  76. package/dist/{useFleet-CT_iW2V9.js → useFleet-BfA_-VUW.js} +101 -72
  77. package/dist/{useImportExport-BG0Cg_D9.js → useImportExport-7-O8noRJ.js} +1 -1
  78. package/dist/{useInventory-BtBGnOC2.js → useInventory-BO7TSgq_.js} +99 -73
  79. package/dist/{useOrders-BC-1mCc0.js → useOrders-B5FV0kcz.js} +1 -1
  80. package/dist/{useReports-Cx8blThR.js → useReports-hUXb8ryJ.js} +1 -1
  81. package/dist/{useRoutes-8fw8oO6y.js → useRoutes-C_ZCYJ_h.js} +1 -1
  82. package/dist/{useSettings-Do5WSUaI.js → useSettings-BNNzQs_B.js} +2 -2
  83. package/dist/{useTracking-Dogilo5C.js → useTracking-7nd_XOSL.js} +3 -3
  84. package/dist/{user-Dr_JS2FF.js → user-B1IjWJtn.js} +1 -1
  85. package/dist/{user-check-CBSiMH6I.js → user-check-Cx6fHHll.js} +1 -1
  86. package/dist/{users-BRV9-2nV.js → users-BKmsb79k.js} +1 -1
  87. package/dist/{warehouse-CmIAl0_w.js → warehouse-DE1irFyJ.js} +1 -1
  88. package/dist/{wrench-6U-BTSbg.js → wrench-DTJGFs17.js} +1 -1
  89. package/dist/{x-DX8sZrkd.js → x-CvsUGJy1.js} +1 -1
  90. package/package.json +1 -1
  91. package/src/movethewheels/MoveTheWheelsRoutes.tsx +5 -0
  92. package/src/movethewheels/components/GlassPanel.tsx +1 -3
  93. package/src/movethewheels/components/MetricCard.tsx +16 -3
  94. package/src/movethewheels/components/charts/StatusDonut.tsx +2 -6
  95. package/src/movethewheels/components/charts/TrendChart.tsx +2 -6
  96. package/src/movethewheels/components/maps/LogisticsMap.tsx +1 -4
  97. package/src/movethewheels/components/maps/RouteMap.tsx +3 -5
  98. package/src/movethewheels/components/maps/TrackingMap.tsx +11 -2
  99. package/src/movethewheels/hooks/useFleet.ts +113 -0
  100. package/src/movethewheels/hooks/useInventory.ts +86 -0
  101. package/src/movethewheels/hooks/useSettings.ts +8 -1
  102. package/src/movethewheels/pages/CreateOrderPage.tsx +48 -6
  103. package/src/movethewheels/pages/CustomerDetailsPage.tsx +3 -2
  104. package/src/movethewheels/pages/DriverDetailsPage.tsx +58 -20
  105. package/src/movethewheels/pages/OrderDetailsPage.tsx +2 -1
  106. package/src/movethewheels/pages/ProductDetailsPage.tsx +51 -15
  107. package/src/movethewheels/pages/RouteDetailsPage.tsx +51 -7
  108. package/src/movethewheels/pages/VehicleDetailsPage.tsx +53 -17
  109. package/src/movethewheels/pages/VehiclesPage.tsx +9 -1
  110. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +49 -11
  111. package/src/movethewheels/types/index.ts +3 -0
  112. package/src/movethewheels/utils/graphqlClient.ts +51 -1
  113. package/dist/DriverDetailsPage-CBzAmM6s.js +0 -490
  114. package/dist/ProductDetailsPage-BMlRoR9E.js +0 -350
  115. package/dist/RouteDetailsPage-Btb1MSIS.js +0 -610
  116. package/dist/VehicleDetailsPage-DNLrMljV.js +0 -393
  117. package/dist/WarehouseDetailsPage-CAQFz7l_.js +0 -493
@@ -1,14 +1,14 @@
1
- import { A as e, d as t, f as n, g as r, h as i, i as a, lt as o, st as s, t as c, u as l } from "./PageLayout-h_q9l8af.js";
2
- import { t as u } from "./circle-alert-CLqT8iCQ.js";
3
- import { t as d } from "./circle-check-big-Dsuz8dJ2.js";
4
- import { t as f } from "./clock-DrZOQD8h.js";
5
- import { t as p } from "./map-pin-BGbmEGn3.js";
6
- import { t as m } from "./package-D36cKFvu.js";
7
- import { t as h } from "./search-stTGSec-.js";
8
- import { t as g } from "./truck-ByZxqZhI.js";
9
- import { i as _ } from "./useTracking-Dogilo5C.js";
10
- import { t as v } from "./maps-DpIuSSmg.js";
11
- import { r as y } from "./StatusBadge-1W2p8fEi.js";
1
+ import { A as e, d as t, f as n, g as r, h as i, i as a, lt as o, st as s, t as c, u as l } from "./PageLayout-j9Zw3wBN.js";
2
+ import { t as u } from "./circle-alert-CtBm6oIb.js";
3
+ import { t as d } from "./circle-check-big-H5pLiMBW.js";
4
+ import { t as f } from "./clock-B4-qjGuB.js";
5
+ import { t as p } from "./map-pin-BISLzLwb.js";
6
+ import { t as m } from "./package-UyaWiALC.js";
7
+ import { t as h } from "./search-C3YRxW9e.js";
8
+ import { t as g } from "./truck-DxhtLfkG.js";
9
+ import { i as _ } from "./useTracking-7nd_XOSL.js";
10
+ import { t as v } from "./maps-CtfuCAmh.js";
11
+ import { r as y } from "./StatusBadge-BfiF-nNI.js";
12
12
  import { r as b, t as x } from "./formatters-FWJDwTFv.js";
13
13
  import { n as S } from "./mapMarkers-NCV9MRKR.js";
14
14
  import { useMemo as C, useState as w } from "react";
@@ -0,0 +1,417 @@
1
+ import { A as e, F as t, I as n, L as r, M as i, P as a, R as o, d as s, f as c, g as l, h as u, i as d, j as f, lt as p, n as m, r as h, st as g, u as _ } from "./PageLayout-j9Zw3wBN.js";
2
+ import { t as v } from "./arrow-left-1dVWv2dg.js";
3
+ import { t as y } from "./DocumentsCard-y2ybnAlu.js";
4
+ import { t as b } from "./fuel-Cjt6IxKr.js";
5
+ import { t as x } from "./map-pin-BISLzLwb.js";
6
+ import { t as S } from "./save-CcfoIn2J.js";
7
+ import { t as C } from "./square-pen-Dr1X-P2s.js";
8
+ import { t as w } from "./truck-DxhtLfkG.js";
9
+ import { t as T } from "./wrench-DTJGFs17.js";
10
+ import { a as E, r as D } from "./useFleet-BfA_-VUW.js";
11
+ import { a as O, r as k } from "./StatusBadge-BfiF-nNI.js";
12
+ import { t as A } from "./FormError-D4T5FWZA.js";
13
+ import { r as j } from "./formatters-FWJDwTFv.js";
14
+ import { useEffect as M, useState as N } from "react";
15
+ import { useLocation as P, useParams as F } from "react-router-dom";
16
+ import { jsx as I, jsxs as L } from "react/jsx-runtime";
17
+ import { EmphasisPanel as R, NextSteps as z, PagePurpose as B } from "@burdenoff/fe-libs/ui";
18
+ //#region src/movethewheels/pages/VehicleDetailsPage.tsx
19
+ var V = [
20
+ {
21
+ value: "TRUCK",
22
+ label: "Truck"
23
+ },
24
+ {
25
+ value: "VAN",
26
+ label: "Van"
27
+ },
28
+ {
29
+ value: "MOTORCYCLE",
30
+ label: "Motorcycle"
31
+ },
32
+ {
33
+ value: "BICYCLE",
34
+ label: "Bicycle"
35
+ },
36
+ {
37
+ value: "FLATBED",
38
+ label: "Flatbed"
39
+ },
40
+ {
41
+ value: "REFRIGERATED",
42
+ label: "Refrigerated"
43
+ },
44
+ {
45
+ value: "SEMI_TRAILER",
46
+ label: "Semi-Trailer"
47
+ },
48
+ {
49
+ value: "DRONE",
50
+ label: "Drone"
51
+ }
52
+ ];
53
+ function H({ editId: i }) {
54
+ let { basePath: s, navigate: c } = g(), { createVehicle: l, updateVehicle: u } = D(), { vehicle: m } = E(i), h = !!i, [y, b] = N({
55
+ vehicleNumber: "",
56
+ type: "VAN",
57
+ make: "",
58
+ model: "",
59
+ licensePlate: ""
60
+ }), [x, C] = N(!1), [T, O] = N(null);
61
+ M(() => {
62
+ i && m && b({
63
+ vehicleNumber: m.vehicleNumber ?? "",
64
+ type: m.type ? m.type.toUpperCase() : "VAN",
65
+ make: m.make ?? "",
66
+ model: m.model ?? "",
67
+ licensePlate: m.licensePlate ?? ""
68
+ });
69
+ }, [i, m]);
70
+ let k = () => c?.(p(s, "fleet/vehicles")), j = async (e) => {
71
+ if (e.preventDefault(), !y.vehicleNumber.trim()) {
72
+ O("Vehicle number is required.");
73
+ return;
74
+ }
75
+ C(!0), O(null);
76
+ try {
77
+ if (i) {
78
+ let e = await u(i, {
79
+ vehicleNumber: y.vehicleNumber.trim(),
80
+ type: y.type,
81
+ make: y.make.trim() || void 0,
82
+ model: y.model.trim() || void 0,
83
+ licensePlate: y.licensePlate.trim() || void 0
84
+ });
85
+ c?.(p(s, `fleet/vehicles/${e.id}`));
86
+ } else {
87
+ let e = await l({
88
+ vehicleNumber: y.vehicleNumber.trim(),
89
+ type: y.type,
90
+ make: y.make.trim() || void 0,
91
+ model: y.model.trim() || void 0,
92
+ licensePlate: y.licensePlate.trim() || void 0
93
+ });
94
+ c?.(p(s, `fleet/vehicles/${e.id}`));
95
+ }
96
+ } catch (e) {
97
+ console.error("Failed to create vehicle:", e), O(e instanceof Error ? e.message : "Failed to create vehicle. Please try again."), C(!1);
98
+ }
99
+ };
100
+ return /* @__PURE__ */ L(d, {
101
+ title: h ? "Edit Vehicle" : "Add Vehicle",
102
+ subtitle: "Register a new vehicle in your fleet",
103
+ icon: /* @__PURE__ */ I(w, { size: 24 }),
104
+ headerActions: /* @__PURE__ */ L("div", {
105
+ className: "flex gap-2",
106
+ children: [/* @__PURE__ */ L(_, {
107
+ variant: "outline",
108
+ onClick: k,
109
+ disabled: x,
110
+ children: [/* @__PURE__ */ I(v, { size: 16 }), " Cancel"]
111
+ }), /* @__PURE__ */ L(_, {
112
+ onClick: j,
113
+ disabled: x,
114
+ children: [
115
+ /* @__PURE__ */ I(S, { size: 16 }),
116
+ " ",
117
+ h ? x ? "Saving..." : "Save Changes" : x ? "Saving..." : "Add Vehicle"
118
+ ]
119
+ })]
120
+ }),
121
+ children: [/* @__PURE__ */ I(B, {
122
+ icon: /* @__PURE__ */ I(w, { size: 18 }),
123
+ children: "Add a vehicle so it can be assigned to deliveries and routes. Give it a fleet number and type to start — make, model and plate help identify it on the road."
124
+ }), /* @__PURE__ */ L("form", {
125
+ onSubmit: j,
126
+ className: "max-w-2xl space-y-6",
127
+ children: [/* @__PURE__ */ I(A, { message: T }), /* @__PURE__ */ L(R, { children: [/* @__PURE__ */ I("h2", {
128
+ className: "text-base font-semibold text-text-primary mb-4",
129
+ children: "Vehicle Details"
130
+ }), /* @__PURE__ */ L("div", {
131
+ className: "space-y-4",
132
+ children: [/* @__PURE__ */ L("div", {
133
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4",
134
+ children: [/* @__PURE__ */ L("div", {
135
+ className: "space-y-2",
136
+ children: [/* @__PURE__ */ L(f, {
137
+ htmlFor: "vehicleNumber",
138
+ children: ["Vehicle Number ", /* @__PURE__ */ I("span", {
139
+ className: "text-status-error-text",
140
+ children: "*"
141
+ })]
142
+ }), /* @__PURE__ */ I(e, {
143
+ id: "vehicleNumber",
144
+ value: y.vehicleNumber,
145
+ onChange: (e) => b((t) => ({
146
+ ...t,
147
+ vehicleNumber: e.target.value
148
+ })),
149
+ placeholder: "MTW-001",
150
+ required: !0
151
+ })]
152
+ }), /* @__PURE__ */ L("div", {
153
+ className: "space-y-2",
154
+ children: [/* @__PURE__ */ L(f, {
155
+ htmlFor: "type",
156
+ children: ["Type ", /* @__PURE__ */ I("span", {
157
+ className: "text-status-error-text",
158
+ children: "*"
159
+ })]
160
+ }), /* @__PURE__ */ L(a, {
161
+ value: y.type,
162
+ onValueChange: (e) => b((t) => ({
163
+ ...t,
164
+ type: e
165
+ })),
166
+ children: [/* @__PURE__ */ I(r, {
167
+ id: "type",
168
+ children: /* @__PURE__ */ I(o, {})
169
+ }), /* @__PURE__ */ I(t, { children: V.map((e) => /* @__PURE__ */ I(n, {
170
+ value: e.value,
171
+ children: e.label
172
+ }, e.value)) })]
173
+ })]
174
+ })]
175
+ }), /* @__PURE__ */ L("div", {
176
+ className: "grid grid-cols-1 md:grid-cols-3 gap-4",
177
+ children: [
178
+ /* @__PURE__ */ L("div", {
179
+ className: "space-y-2",
180
+ children: [/* @__PURE__ */ I(f, {
181
+ htmlFor: "make",
182
+ children: "Make"
183
+ }), /* @__PURE__ */ I(e, {
184
+ id: "make",
185
+ value: y.make,
186
+ onChange: (e) => b((t) => ({
187
+ ...t,
188
+ make: e.target.value
189
+ })),
190
+ placeholder: "Ford"
191
+ })]
192
+ }),
193
+ /* @__PURE__ */ L("div", {
194
+ className: "space-y-2",
195
+ children: [/* @__PURE__ */ I(f, {
196
+ htmlFor: "model",
197
+ children: "Model"
198
+ }), /* @__PURE__ */ I(e, {
199
+ id: "model",
200
+ value: y.model,
201
+ onChange: (e) => b((t) => ({
202
+ ...t,
203
+ model: e.target.value
204
+ })),
205
+ placeholder: "Transit"
206
+ })]
207
+ }),
208
+ /* @__PURE__ */ L("div", {
209
+ className: "space-y-2",
210
+ children: [/* @__PURE__ */ I(f, {
211
+ htmlFor: "licensePlate",
212
+ children: "License Plate"
213
+ }), /* @__PURE__ */ I(e, {
214
+ id: "licensePlate",
215
+ value: y.licensePlate,
216
+ onChange: (e) => b((t) => ({
217
+ ...t,
218
+ licensePlate: e.target.value
219
+ })),
220
+ placeholder: "ABC-1234"
221
+ })]
222
+ })
223
+ ]
224
+ })]
225
+ })] })]
226
+ })]
227
+ });
228
+ }
229
+ function U() {
230
+ let { vehicleId: e } = F(), { basePath: t, navigate: n } = g(), { vehicle: r, isLoading: a, error: o, refetch: f } = E(e), S = P().pathname.endsWith("/edit"), D = () => n?.(p(t, "fleet/vehicles")), A = (e) => n?.(p(t, e));
231
+ return e ? S ? /* @__PURE__ */ I(H, { editId: e }) : a ? /* @__PURE__ */ I(h, { message: "Loading vehicle details..." }) : o || !r ? /* @__PURE__ */ I(m, {
232
+ title: "Vehicle not found",
233
+ onRetry: f
234
+ }) : /* @__PURE__ */ L(d, {
235
+ title: r.vehicleNumber,
236
+ subtitle: `${r.make} ${r.model} (${r.year})`,
237
+ icon: /* @__PURE__ */ I(w, { size: 24 }),
238
+ headerActions: /* @__PURE__ */ L("div", {
239
+ className: "flex gap-2",
240
+ children: [/* @__PURE__ */ L(_, {
241
+ variant: "outline",
242
+ onClick: D,
243
+ children: [/* @__PURE__ */ I(v, { size: 16 }), " Back"]
244
+ }), /* @__PURE__ */ L(_, {
245
+ onClick: () => n?.(p(t, "fleet/vehicles/" + e + "/edit")),
246
+ children: [/* @__PURE__ */ I(C, { size: 16 }), " Edit"]
247
+ })]
248
+ }),
249
+ headerContent: /* @__PURE__ */ L("div", {
250
+ className: "flex gap-2",
251
+ children: [/* @__PURE__ */ I(k, {
252
+ status: r.status,
253
+ type: "vehicle"
254
+ }), /* @__PURE__ */ I(O, { type: r.type })]
255
+ }),
256
+ children: [
257
+ /* @__PURE__ */ I(B, {
258
+ icon: /* @__PURE__ */ I(w, { size: 18 }),
259
+ children: "The full record for this vehicle — specs, capacity, fuel and mileage, maintenance schedule and current location. Use it to confirm a vehicle is fuelled, serviced and the right size before dispatching it on a delivery."
260
+ }),
261
+ /* @__PURE__ */ I(z, {
262
+ storageKey: "movethewheels-vehicle-details",
263
+ steps: [{
264
+ id: "assign",
265
+ label: "Assign to a delivery",
266
+ description: "Put this vehicle on an order that fits its capacity.",
267
+ icon: /* @__PURE__ */ I(x, { size: 16 }),
268
+ onClick: () => A("orders")
269
+ }, {
270
+ id: "maintenance",
271
+ label: "Schedule maintenance",
272
+ description: "Keep it road-ready and compliant.",
273
+ icon: /* @__PURE__ */ I(T, { size: 16 }),
274
+ onClick: () => {}
275
+ }]
276
+ }),
277
+ /* @__PURE__ */ L("div", {
278
+ className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
279
+ children: [/* @__PURE__ */ L("div", {
280
+ className: "lg:col-span-2 space-y-6",
281
+ children: [
282
+ /* @__PURE__ */ L(R, { children: [/* @__PURE__ */ I("h2", {
283
+ className: "text-base font-semibold text-text-primary mb-4",
284
+ children: "Vehicle Information"
285
+ }), /* @__PURE__ */ L("div", {
286
+ className: "grid grid-cols-2 md:grid-cols-4 gap-6",
287
+ children: [
288
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
289
+ className: "text-sm text-text-secondary",
290
+ children: "Type"
291
+ }), /* @__PURE__ */ I("p", {
292
+ className: "font-medium capitalize",
293
+ children: r.type
294
+ })] }),
295
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
296
+ className: "text-sm text-text-secondary",
297
+ children: "Make"
298
+ }), /* @__PURE__ */ I("p", {
299
+ className: "font-medium",
300
+ children: r.make
301
+ })] }),
302
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
303
+ className: "text-sm text-text-secondary",
304
+ children: "Model"
305
+ }), /* @__PURE__ */ I("p", {
306
+ className: "font-medium",
307
+ children: r.model
308
+ })] }),
309
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
310
+ className: "text-sm text-text-secondary",
311
+ children: "Year"
312
+ }), /* @__PURE__ */ I("p", {
313
+ className: "font-medium",
314
+ children: r.year
315
+ })] })
316
+ ]
317
+ })] }),
318
+ /* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ I(l, { children: "Capacity" }) }), /* @__PURE__ */ I(c, { children: /* @__PURE__ */ L("div", {
319
+ className: "grid grid-cols-1 sm:grid-cols-3 gap-6",
320
+ children: [
321
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
322
+ className: "text-sm text-text-secondary",
323
+ children: "Weight"
324
+ }), /* @__PURE__ */ L("p", {
325
+ className: "text-2xl font-bold",
326
+ children: [r.capacity.weight, /* @__PURE__ */ I("span", {
327
+ className: "text-sm font-normal",
328
+ children: " kg"
329
+ })]
330
+ })] }),
331
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
332
+ className: "text-sm text-text-secondary",
333
+ children: "Volume"
334
+ }), /* @__PURE__ */ L("p", {
335
+ className: "text-2xl font-bold",
336
+ children: [r.capacity.volume, /* @__PURE__ */ I("span", {
337
+ className: "text-sm font-normal",
338
+ children: " m³"
339
+ })]
340
+ })] }),
341
+ r.capacity.pallets && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
342
+ className: "text-sm text-text-secondary",
343
+ children: "Pallets"
344
+ }), /* @__PURE__ */ I("p", {
345
+ className: "text-2xl font-bold",
346
+ children: r.capacity.pallets
347
+ })] })
348
+ ]
349
+ }) })] }),
350
+ /* @__PURE__ */ I(y, {
351
+ entityType: "vehicle",
352
+ entityId: r.id
353
+ })
354
+ ]
355
+ }), /* @__PURE__ */ L("div", {
356
+ className: "space-y-6",
357
+ children: [
358
+ /* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ L(l, {
359
+ className: "flex items-center gap-2",
360
+ children: [/* @__PURE__ */ I(b, { size: 18 }), " Fuel & Mileage"]
361
+ }) }), /* @__PURE__ */ L(c, {
362
+ className: "space-y-4",
363
+ children: [r.fuelLevel !== void 0 && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ L("div", {
364
+ className: "flex justify-between text-sm mb-2",
365
+ children: [/* @__PURE__ */ I("span", { children: "Fuel Level" }), /* @__PURE__ */ L("span", { children: [r.fuelLevel, "%"] })]
366
+ }), /* @__PURE__ */ I(i, { value: r.fuelLevel })] }), r.mileage !== void 0 && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
367
+ className: "text-sm text-text-secondary",
368
+ children: "Total Mileage"
369
+ }), /* @__PURE__ */ L("p", {
370
+ className: "text-2xl font-bold",
371
+ children: [
372
+ r.mileage.toLocaleString(),
373
+ " ",
374
+ /* @__PURE__ */ I("span", {
375
+ className: "text-sm font-normal",
376
+ children: "miles"
377
+ })
378
+ ]
379
+ })] })]
380
+ })] }),
381
+ /* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ L(l, {
382
+ className: "flex items-center gap-2",
383
+ children: [/* @__PURE__ */ I(T, { size: 18 }), " Maintenance"]
384
+ }) }), /* @__PURE__ */ L(c, {
385
+ className: "space-y-3",
386
+ children: [/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
387
+ className: "text-sm text-text-secondary",
388
+ children: "Last Maintenance"
389
+ }), /* @__PURE__ */ I("p", {
390
+ className: "font-medium",
391
+ children: r.lastMaintenance ? j(r.lastMaintenance) : "N/A"
392
+ })] }), /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
393
+ className: "text-sm text-text-secondary",
394
+ children: "Next Scheduled"
395
+ }), /* @__PURE__ */ I("p", {
396
+ className: "font-medium",
397
+ children: r.nextMaintenance ? j(r.nextMaintenance) : "N/A"
398
+ })] })]
399
+ })] }),
400
+ r.currentLocation && /* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ L(l, {
401
+ className: "flex items-center gap-2",
402
+ children: [/* @__PURE__ */ I(x, { size: 18 }), " Current Location"]
403
+ }) }), /* @__PURE__ */ L(c, { children: [/* @__PURE__ */ I("p", {
404
+ className: "text-sm",
405
+ children: r.currentLocation.address || "Location updating..."
406
+ }), /* @__PURE__ */ L("p", {
407
+ className: "text-xs text-text-secondary mt-1",
408
+ children: ["Updated ", j(r.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")]
409
+ })] })] })
410
+ ]
411
+ })]
412
+ })
413
+ ]
414
+ }) : /* @__PURE__ */ I(H, {});
415
+ }
416
+ //#endregion
417
+ export { U as default };
@@ -1,15 +1,15 @@
1
- import { M as e, i as t, lt as n, st as r } from "./PageLayout-h_q9l8af.js";
2
- import { t as i } from "./DataTable-Da7yHjM1.js";
3
- import { t as a } from "./circle-check-CWLAr_8f.js";
4
- import { t as o } from "./download-C-yNvUiL.js";
5
- import { t as s } from "./plus-DY5R-c1j.js";
6
- import { t as c } from "./refresh-cw-DyOLYuDU.js";
7
- import { t as l } from "./route-CuaZ1wU3.js";
8
- import { t as u } from "./truck-ByZxqZhI.js";
9
- import { t as d } from "./wrench-6U-BTSbg.js";
10
- import { i as f, o as p } from "./useFleet-CT_iW2V9.js";
11
- import { r as m, t as h } from "./MetricCard-DA5ZqAVl.js";
12
- import { a as g, r as _ } from "./StatusBadge-1W2p8fEi.js";
1
+ import { M as e, i as t, lt as n, st as r } from "./PageLayout-j9Zw3wBN.js";
2
+ import { t as i } from "./DataTable-CmdZd6iV.js";
3
+ import { t as a } from "./circle-check-B_Y7FDyR.js";
4
+ import { t as o } from "./download-BJonq2ty.js";
5
+ import { t as s } from "./plus-Bk_G-lFC.js";
6
+ import { t as c } from "./refresh-cw-C4-jecjy.js";
7
+ import { t as l } from "./route-WpCP6F1x.js";
8
+ import { t as u } from "./truck-DxhtLfkG.js";
9
+ import { t as d } from "./wrench-DTJGFs17.js";
10
+ import { i as f, o as p } from "./useFleet-BfA_-VUW.js";
11
+ import { r as m, t as h } from "./MetricCard-CqU5WsyW.js";
12
+ import { a as g, r as _ } from "./StatusBadge-BfiF-nNI.js";
13
13
  import { useState as v } from "react";
14
14
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
15
15
  import { CTAOverflowMenu as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";