@burdenoff/microfe-movethewheels 2026.703.3 → 2026.703.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 (125) hide show
  1. package/dist/{AIAssistantPage-C3cPsWt-.js → AIAssistantPage-3YOnHO9Y.js} +3 -3
  2. package/dist/{AnalyticsPage-Dz6g2MvK.js → AnalyticsPage-CMpI1070.js} +11 -11
  3. package/dist/CreateOrderPage-DRAgGo9i.js +490 -0
  4. package/dist/CustomerDetailsPage-BCeMmOFe.js +615 -0
  5. package/dist/{CustomersPage-BKxMS1AV.js → CustomersPage-CaNBMXmM.js} +64 -53
  6. package/dist/{DashboardPage-BVjQi0EB.js → DashboardPage-DIKlXde3.js} +16 -16
  7. package/dist/DataTable-XvUcTjwi.js +340 -0
  8. package/dist/DocumentsCard-U2lSe-cn.js +169 -0
  9. package/dist/{DriverDetailsPage-CN3WQ0B9.js → DriverDetailsPage-BQrYd_Lp.js} +178 -195
  10. package/dist/{DriversPage-CH9rjQC-.js → DriversPage-PYmdFiby.js} +65 -54
  11. package/dist/FinancePage-Cwh9Bw4M.js +136 -0
  12. package/dist/{FleetPage-DqkFi3s3.js → FleetPage-3ZHsB-TN.js} +23 -22
  13. package/dist/{FormError-BlOjnXOq.js → FormError-cuLV2jVD.js} +1 -1
  14. package/dist/{ImportExportPage-DKJRCezl.js → ImportExportPage-C6f7DqhM.js} +50 -70
  15. package/dist/{InventoryPage-e0ze63iX.js → InventoryPage-DpiqVu1v.js} +8 -8
  16. package/dist/{LiveTrackingPage-DCX-K-LR.js → LiveTrackingPage-FAzzlVnX.js} +9 -9
  17. package/dist/MarketplacePage-Bh_2ns4v.js +426 -0
  18. package/dist/Notice-CSoDYKw9.js +46 -0
  19. package/dist/OrderDetailsPage-zCj0lW0j.js +584 -0
  20. package/dist/{OrdersListPage-Cn90P1Xx.js → OrdersListPage-CAMsuUck.js} +166 -89
  21. package/dist/{ProductDetailsPage-C9uOiYLp.js → ProductDetailsPage-wsxAQkA0.js} +12 -12
  22. package/dist/{ProductsPage-QJfHHpqB.js → ProductsPage-DC5qDLfz.js} +60 -49
  23. package/dist/ReportsPage-BwUJ37eO.js +356 -0
  24. package/dist/RouteDetailsPage-DyMJE9AS.js +583 -0
  25. package/dist/{RoutesPage-DMfoicM1.js → RoutesPage-Dtc669yc.js} +57 -46
  26. package/dist/{SettingsPage-Bn-v0mbQ.js → SettingsPage-CpH9xhQg.js} +5 -27
  27. package/dist/{TrackingPage-W-jtdM3Y.js → TrackingPage-DaNEFG_h.js} +10 -10
  28. package/dist/{VehicleDetailsPage-Bceo5oz3.js → VehicleDetailsPage-DldYNsYV.js} +125 -142
  29. package/dist/{VehiclesPage-ApKThYeG.js → VehiclesPage-BFw13iMt.js} +61 -50
  30. package/dist/{WarehouseDetailsPage-L_6sWigM.js → WarehouseDetailsPage-CMG7or6G.js} +17 -17
  31. package/dist/{WarehousesPage-DCbXXXWE.js → WarehousesPage-Wkytnt86.js} +58 -47
  32. package/dist/arrow-right-Q3XQpTPR.js +11 -0
  33. package/dist/arrow-up-xNF1zJUG.js +17 -0
  34. package/dist/chevron-left-B2_r0Elx.js +8 -0
  35. package/dist/{wrench-CANXWxF-.js → fuel-B6_lnKDs.js} +2 -5
  36. package/dist/index.js +163 -174
  37. package/dist/upload-CHZofOqb.js +21 -0
  38. package/dist/{useAnalytics-DS8n0xgg.js → useAnalytics-D7HW2XRb.js} +52 -2
  39. package/dist/{useCustomers-BmTNGxiI.js → useCustomers-BPW4__PR.js} +29 -26
  40. package/dist/{useFleet-DKqXZ16m.js → useFleet-ChBkxAd6.js} +81 -69
  41. package/dist/{useInventory-DkyiVY_A.js → useInventory-CAAVMRp6.js} +83 -38
  42. package/dist/{useOrders-Cfk1GLiq.js → useOrders-B465S2nt.js} +58 -47
  43. package/dist/{useReports-CTqZr-AB.js → useReports-jQ3GpNOm.js} +40 -34
  44. package/dist/{useRoutes-BQWO607N.js → useRoutes-hS3d5-xr.js} +49 -41
  45. package/dist/{useTracking-B-va1kO3.js → useTracking-RjGz9PZG.js} +2 -2
  46. package/dist/user-check-BEKRCi7v.js +20 -0
  47. package/dist/wrench-q_rgJfaP.js +8 -0
  48. package/dist/x-tMeDMcCw.js +11 -0
  49. package/package.json +1 -1
  50. package/src/movethewheels/components/DataTable.tsx +252 -84
  51. package/src/movethewheels/components/DocumentsCard.tsx +102 -0
  52. package/src/movethewheels/components/Notice.tsx +61 -0
  53. package/src/movethewheels/components/index.ts +7 -0
  54. package/src/movethewheels/hooks/index.ts +9 -0
  55. package/src/movethewheels/hooks/useAnalytics.ts +95 -0
  56. package/src/movethewheels/hooks/useCustomers.ts +11 -4
  57. package/src/movethewheels/hooks/useEntityDocuments.ts +132 -0
  58. package/src/movethewheels/hooks/useFleet.ts +26 -7
  59. package/src/movethewheels/hooks/useInventory.ts +70 -7
  60. package/src/movethewheels/hooks/useOrders.ts +32 -2
  61. package/src/movethewheels/hooks/useReports.ts +14 -4
  62. package/src/movethewheels/hooks/useRoutes.ts +20 -3
  63. package/src/movethewheels/pages/AnalyticsPage.tsx +2 -2
  64. package/src/movethewheels/pages/CreateOrderPage.tsx +44 -16
  65. package/src/movethewheels/pages/CustomerDetailsPage.tsx +239 -33
  66. package/src/movethewheels/pages/CustomersPage.tsx +27 -11
  67. package/src/movethewheels/pages/DriverDetailsPage.tsx +16 -30
  68. package/src/movethewheels/pages/DriversPage.tsx +26 -9
  69. package/src/movethewheels/pages/FinancePage.tsx +67 -84
  70. package/src/movethewheels/pages/MarketplacePage.tsx +265 -50
  71. package/src/movethewheels/pages/OrderDetailsPage.tsx +214 -10
  72. package/src/movethewheels/pages/OrdersListPage.tsx +76 -13
  73. package/src/movethewheels/pages/ProductsPage.tsx +27 -7
  74. package/src/movethewheels/pages/ReportsPage.tsx +65 -4
  75. package/src/movethewheels/pages/RouteDetailsPage.tsx +74 -13
  76. package/src/movethewheels/pages/RoutesPage.tsx +22 -6
  77. package/src/movethewheels/pages/SettingsPage.tsx +3 -19
  78. package/src/movethewheels/pages/VehicleDetailsPage.tsx +3 -33
  79. package/src/movethewheels/pages/VehiclesPage.tsx +26 -5
  80. package/src/movethewheels/pages/WarehousesPage.tsx +22 -17
  81. package/src/movethewheels/types/index.ts +8 -0
  82. package/src/movethewheels/utils/download.ts +62 -0
  83. package/dist/CreateOrderPage-C5iwnjp4.js +0 -479
  84. package/dist/CustomerDetailsPage-B6nwFyLO.js +0 -406
  85. package/dist/DataTable-DmciIKKM.js +0 -249
  86. package/dist/FinancePage-DEDykSOP.js +0 -158
  87. package/dist/MarketplacePage-CIQ97_zp.js +0 -247
  88. package/dist/OrderDetailsPage-DYiZ-9UK.js +0 -429
  89. package/dist/ReportsPage-Zp53q3_8.js +0 -284
  90. package/dist/RouteDetailsPage-DUStXSf9.js +0 -531
  91. /package/dist/{MetricCard-BY0QrMD4.js → MetricCard-CVBVpu7o.js} +0 -0
  92. /package/dist/{StatusBadge-BZurYHMy.js → StatusBadge-C87mDpDP.js} +0 -0
  93. /package/dist/{box-D9Pal4HM.js → box-Eu05PXDh.js} +0 -0
  94. /package/dist/{chart-column-BFIJysDR.js → chart-column-ouzgxIv_.js} +0 -0
  95. /package/dist/{chevron-right-EMIIyyJ1.js → chevron-right-eV4LjaSi.js} +0 -0
  96. /package/dist/{circle-alert-iY24lSlp.js → circle-alert-Bzh2DBSF.js} +0 -0
  97. /package/dist/{circle-check-big-w0TrLKMF.js → circle-check-big-CGMSpQmD.js} +0 -0
  98. /package/dist/{clock-DJZtdl8u.js → clock-Bl3ptexL.js} +0 -0
  99. /package/dist/{dollar-sign-CgKQRz_e.js → dollar-sign-CAVU95SO.js} +0 -0
  100. /package/dist/{download-DRXxoiQR.js → download-C5NbvVDc.js} +0 -0
  101. /package/dist/{file-text-DWWY6_f5.js → file-text-D-1uvLZG.js} +0 -0
  102. /package/dist/{filter-DloLC2eE.js → filter-DUfUg6BO.js} +0 -0
  103. /package/dist/{formatters-CF2S2l1m.js → formatters-BQr-aR5W.js} +0 -0
  104. /package/dist/{map-CkJaULb2.js → map-C-M-FQLR.js} +0 -0
  105. /package/dist/{map-pin-BGiCvyCs.js → map-pin-Dznl5l40.js} +0 -0
  106. /package/dist/{navigation-D36prnAn.js → navigation-BJSJl-VG.js} +0 -0
  107. /package/dist/{package-BChUzpJS.js → package-CcRttV2N.js} +0 -0
  108. /package/dist/{phone-Ac9s3mo_.js → phone-DVSZHt_j.js} +0 -0
  109. /package/dist/{plus-Z76q-FZm.js → plus-C_XZDwBz.js} +0 -0
  110. /package/dist/{refresh-cw-DKt6f5T6.js → refresh-cw-CfgN67l3.js} +0 -0
  111. /package/dist/{save-CojywNhG.js → save-DJE8Fpdv.js} +0 -0
  112. /package/dist/{search-CDGefqb3.js → search-D_VyGcZT.js} +0 -0
  113. /package/dist/{square-pen-CopE9GmB.js → square-pen-D-6JYrVQ.js} +0 -0
  114. /package/dist/{star-nHlLjDKR.js → star-BpRlUZuU.js} +0 -0
  115. /package/dist/{store-BR9Voi5E.js → store-B-8HMuyZ.js} +0 -0
  116. /package/dist/{trash-2-BKhar6Hs.js → trash-2-8vmv-XV_.js} +0 -0
  117. /package/dist/{trending-up-Dohgd4t_.js → trending-up-Dz6PqPRj.js} +0 -0
  118. /package/dist/{triangle-alert-i-XQL9Rd.js → triangle-alert-D7Y3J_4z.js} +0 -0
  119. /package/dist/{truck-C0v_hbLR.js → truck-D-y2IDzv.js} +0 -0
  120. /package/dist/{useAssistant-D4v3oxD3.js → useAssistant-DVW4QgQb.js} +0 -0
  121. /package/dist/{useImportExport-DHr-SWSw.js → useImportExport-DrPDHEDK.js} +0 -0
  122. /package/dist/{useSettings-CkDH_-gM.js → useSettings-BB8X2RLh.js} +0 -0
  123. /package/dist/{user-jyFU3lXk.js → user-DzfTn4dE.js} +0 -0
  124. /package/dist/{users-DZ-ilS6B.js → users-CCrq-w0C.js} +0 -0
  125. /package/dist/{warehouse-6m5kXMLu.js → warehouse-CaqfmMKh.js} +0 -0
@@ -1,21 +1,22 @@
1
- import { A as e, F as t, I as n, L as r, M as i, P as a, R as o, ct as s, d as c, f as l, g as u, h as d, i as f, j as p, l as m, n as h, ot as g, r as _, u as v } from "./PageLayout-D4LDHJJq.js";
2
- import { t as y } from "./arrow-left-n48Y-Wis.js";
3
- import { t as b } from "./file-text-DWWY6_f5.js";
4
- import { n as x, t as S } from "./wrench-CANXWxF-.js";
5
- import { t as C } from "./map-pin-BGiCvyCs.js";
6
- import { t as w } from "./save-CojywNhG.js";
7
- import { t as T } from "./square-pen-CopE9GmB.js";
8
- import { t as E } from "./truck-C0v_hbLR.js";
9
- import { a as D, r as O } from "./useFleet-DKqXZ16m.js";
10
- import { a as k, r as A } from "./StatusBadge-BZurYHMy.js";
11
- import { r as j } from "./formatters-CF2S2l1m.js";
12
- import { t as M } from "./FormError-BlOjnXOq.js";
13
- import { useState as N } from "react";
14
- import { useParams as P } from "react-router-dom";
15
- import { jsx as F, jsxs as I } from "react/jsx-runtime";
16
- import { EmphasisPanel as L, NextSteps as R, PagePurpose as z } from "@burdenoff/fe-libs/ui";
1
+ import { A as e, F as t, I as n, L as r, M as i, P as a, R as o, ct as s, d as c, f as l, g as u, h as d, i as f, j as p, n as m, ot as h, r as g, u as _ } from "./PageLayout-D4LDHJJq.js";
2
+ import { t as v } from "./arrow-left-n48Y-Wis.js";
3
+ import { t as y } from "./DocumentsCard-U2lSe-cn.js";
4
+ import { t as b } from "./fuel-B6_lnKDs.js";
5
+ import { t as x } from "./map-pin-Dznl5l40.js";
6
+ import { t as S } from "./save-DJE8Fpdv.js";
7
+ import { t as C } from "./square-pen-D-6JYrVQ.js";
8
+ import { t as w } from "./truck-D-y2IDzv.js";
9
+ import { t as T } from "./wrench-q_rgJfaP.js";
10
+ import { a as E, r as D } from "./useFleet-ChBkxAd6.js";
11
+ import { a as O, r as k } from "./StatusBadge-C87mDpDP.js";
12
+ import { t as A } from "./FormError-cuLV2jVD.js";
13
+ import { r as j } from "./formatters-BQr-aR5W.js";
14
+ import { useState as M } from "react";
15
+ import { useParams as N } from "react-router-dom";
16
+ import { jsx as P, jsxs as F } from "react/jsx-runtime";
17
+ import { EmphasisPanel as I, NextSteps as L, PagePurpose as R } from "@burdenoff/fe-libs/ui";
17
18
  //#region src/movethewheels/pages/VehicleDetailsPage.tsx
18
- var B = [
19
+ var z = [
19
20
  {
20
21
  value: "TRUCK",
21
22
  label: "Truck"
@@ -49,19 +50,19 @@ var B = [
49
50
  label: "Drone"
50
51
  }
51
52
  ];
52
- function V() {
53
- let { basePath: i, navigate: c } = g(), { createVehicle: l } = O(), [u, d] = N({
53
+ function B() {
54
+ let { basePath: i, navigate: c } = h(), { createVehicle: l } = D(), [u, d] = M({
54
55
  vehicleNumber: "",
55
56
  type: "VAN",
56
57
  make: "",
57
58
  model: "",
58
59
  licensePlate: ""
59
- }), [m, h] = N(!1), [_, b] = N(null), x = () => c?.(s(i, "fleet/vehicles")), S = async (e) => {
60
+ }), [m, g] = M(!1), [y, b] = M(null), x = () => c?.(s(i, "fleet/vehicles")), C = async (e) => {
60
61
  if (e.preventDefault(), !u.vehicleNumber.trim()) {
61
62
  b("Vehicle number is required.");
62
63
  return;
63
64
  }
64
- h(!0), b(null);
65
+ g(!0), b(null);
65
66
  try {
66
67
  let e = await l({
67
68
  vehicleNumber: u.vehicleNumber.trim(),
@@ -72,52 +73,52 @@ function V() {
72
73
  });
73
74
  c?.(s(i, `fleet/vehicles/${e.id}`));
74
75
  } catch (e) {
75
- console.error("Failed to create vehicle:", e), b(e instanceof Error ? e.message : "Failed to create vehicle. Please try again."), h(!1);
76
+ console.error("Failed to create vehicle:", e), b(e instanceof Error ? e.message : "Failed to create vehicle. Please try again."), g(!1);
76
77
  }
77
78
  };
78
- return /* @__PURE__ */ I(f, {
79
+ return /* @__PURE__ */ F(f, {
79
80
  title: "Add Vehicle",
80
81
  subtitle: "Register a new vehicle in your fleet",
81
- icon: /* @__PURE__ */ F(E, { size: 24 }),
82
- headerActions: /* @__PURE__ */ I("div", {
82
+ icon: /* @__PURE__ */ P(w, { size: 24 }),
83
+ headerActions: /* @__PURE__ */ F("div", {
83
84
  className: "flex gap-2",
84
- children: [/* @__PURE__ */ I(v, {
85
+ children: [/* @__PURE__ */ F(_, {
85
86
  variant: "outline",
86
87
  onClick: x,
87
88
  disabled: m,
88
- children: [/* @__PURE__ */ F(y, { size: 16 }), " Cancel"]
89
- }), /* @__PURE__ */ I(v, {
90
- onClick: S,
89
+ children: [/* @__PURE__ */ P(v, { size: 16 }), " Cancel"]
90
+ }), /* @__PURE__ */ F(_, {
91
+ onClick: C,
91
92
  disabled: m,
92
93
  children: [
93
- /* @__PURE__ */ F(w, { size: 16 }),
94
+ /* @__PURE__ */ P(S, { size: 16 }),
94
95
  " ",
95
96
  m ? "Saving..." : "Add Vehicle"
96
97
  ]
97
98
  })]
98
99
  }),
99
- children: [/* @__PURE__ */ F(z, {
100
- icon: /* @__PURE__ */ F(E, { size: 18 }),
100
+ children: [/* @__PURE__ */ P(R, {
101
+ icon: /* @__PURE__ */ P(w, { size: 18 }),
101
102
  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."
102
- }), /* @__PURE__ */ I("form", {
103
- onSubmit: S,
103
+ }), /* @__PURE__ */ F("form", {
104
+ onSubmit: C,
104
105
  className: "max-w-2xl space-y-6",
105
- children: [/* @__PURE__ */ F(M, { message: _ }), /* @__PURE__ */ I(L, { children: [/* @__PURE__ */ F("h2", {
106
+ children: [/* @__PURE__ */ P(A, { message: y }), /* @__PURE__ */ F(I, { children: [/* @__PURE__ */ P("h2", {
106
107
  className: "text-base font-semibold text-text-primary mb-4",
107
108
  children: "Vehicle Details"
108
- }), /* @__PURE__ */ I("div", {
109
+ }), /* @__PURE__ */ F("div", {
109
110
  className: "space-y-4",
110
- children: [/* @__PURE__ */ I("div", {
111
+ children: [/* @__PURE__ */ F("div", {
111
112
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
112
- children: [/* @__PURE__ */ I("div", {
113
+ children: [/* @__PURE__ */ F("div", {
113
114
  className: "space-y-2",
114
- children: [/* @__PURE__ */ I(p, {
115
+ children: [/* @__PURE__ */ F(p, {
115
116
  htmlFor: "vehicleNumber",
116
- children: ["Vehicle Number ", /* @__PURE__ */ F("span", {
117
+ children: ["Vehicle Number ", /* @__PURE__ */ P("span", {
117
118
  className: "text-status-error-text",
118
119
  children: "*"
119
120
  })]
120
- }), /* @__PURE__ */ F(e, {
121
+ }), /* @__PURE__ */ P(e, {
121
122
  id: "vehicleNumber",
122
123
  value: u.vehicleNumber,
123
124
  onChange: (e) => d((t) => ({
@@ -127,38 +128,38 @@ function V() {
127
128
  placeholder: "MTW-001",
128
129
  required: !0
129
130
  })]
130
- }), /* @__PURE__ */ I("div", {
131
+ }), /* @__PURE__ */ F("div", {
131
132
  className: "space-y-2",
132
- children: [/* @__PURE__ */ I(p, {
133
+ children: [/* @__PURE__ */ F(p, {
133
134
  htmlFor: "type",
134
- children: ["Type ", /* @__PURE__ */ F("span", {
135
+ children: ["Type ", /* @__PURE__ */ P("span", {
135
136
  className: "text-status-error-text",
136
137
  children: "*"
137
138
  })]
138
- }), /* @__PURE__ */ I(a, {
139
+ }), /* @__PURE__ */ F(a, {
139
140
  value: u.type,
140
141
  onValueChange: (e) => d((t) => ({
141
142
  ...t,
142
143
  type: e
143
144
  })),
144
- children: [/* @__PURE__ */ F(r, {
145
+ children: [/* @__PURE__ */ P(r, {
145
146
  id: "type",
146
- children: /* @__PURE__ */ F(o, {})
147
- }), /* @__PURE__ */ F(t, { children: B.map((e) => /* @__PURE__ */ F(n, {
147
+ children: /* @__PURE__ */ P(o, {})
148
+ }), /* @__PURE__ */ P(t, { children: z.map((e) => /* @__PURE__ */ P(n, {
148
149
  value: e.value,
149
150
  children: e.label
150
151
  }, e.value)) })]
151
152
  })]
152
153
  })]
153
- }), /* @__PURE__ */ I("div", {
154
+ }), /* @__PURE__ */ F("div", {
154
155
  className: "grid grid-cols-1 md:grid-cols-3 gap-4",
155
156
  children: [
156
- /* @__PURE__ */ I("div", {
157
+ /* @__PURE__ */ F("div", {
157
158
  className: "space-y-2",
158
- children: [/* @__PURE__ */ F(p, {
159
+ children: [/* @__PURE__ */ P(p, {
159
160
  htmlFor: "make",
160
161
  children: "Make"
161
- }), /* @__PURE__ */ F(e, {
162
+ }), /* @__PURE__ */ P(e, {
162
163
  id: "make",
163
164
  value: u.make,
164
165
  onChange: (e) => d((t) => ({
@@ -168,12 +169,12 @@ function V() {
168
169
  placeholder: "Ford"
169
170
  })]
170
171
  }),
171
- /* @__PURE__ */ I("div", {
172
+ /* @__PURE__ */ F("div", {
172
173
  className: "space-y-2",
173
- children: [/* @__PURE__ */ F(p, {
174
+ children: [/* @__PURE__ */ P(p, {
174
175
  htmlFor: "model",
175
176
  children: "Model"
176
- }), /* @__PURE__ */ F(e, {
177
+ }), /* @__PURE__ */ P(e, {
177
178
  id: "model",
178
179
  value: u.model,
179
180
  onChange: (e) => d((t) => ({
@@ -183,12 +184,12 @@ function V() {
183
184
  placeholder: "Transit"
184
185
  })]
185
186
  }),
186
- /* @__PURE__ */ I("div", {
187
+ /* @__PURE__ */ F("div", {
187
188
  className: "space-y-2",
188
- children: [/* @__PURE__ */ F(p, {
189
+ children: [/* @__PURE__ */ P(p, {
189
190
  htmlFor: "licensePlate",
190
191
  children: "License Plate"
191
- }), /* @__PURE__ */ F(e, {
192
+ }), /* @__PURE__ */ P(e, {
192
193
  id: "licensePlate",
193
194
  value: u.licensePlate,
194
195
  onChange: (e) => d((t) => ({
@@ -204,199 +205,181 @@ function V() {
204
205
  })]
205
206
  });
206
207
  }
207
- function H() {
208
- let { vehicleId: e } = P(), { basePath: t, navigate: n } = g(), { vehicle: r, isLoading: a, error: o, refetch: p } = D(e), w = () => n?.(s(t, "fleet/vehicles")), O = (e) => n?.(s(t, e));
209
- return e ? a ? /* @__PURE__ */ F(_, { message: "Loading vehicle details..." }) : o || !r ? /* @__PURE__ */ F(h, {
208
+ function V() {
209
+ let { vehicleId: e } = N(), { basePath: t, navigate: n } = h(), { vehicle: r, isLoading: a, error: o, refetch: p } = E(e), S = () => n?.(s(t, "fleet/vehicles")), D = (e) => n?.(s(t, e));
210
+ return e ? a ? /* @__PURE__ */ P(g, { message: "Loading vehicle details..." }) : o || !r ? /* @__PURE__ */ P(m, {
210
211
  title: "Vehicle not found",
211
212
  onRetry: p
212
- }) : /* @__PURE__ */ I(f, {
213
+ }) : /* @__PURE__ */ F(f, {
213
214
  title: r.vehicleNumber,
214
215
  subtitle: `${r.make} ${r.model} (${r.year})`,
215
- icon: /* @__PURE__ */ F(E, { size: 24 }),
216
- headerActions: /* @__PURE__ */ I("div", {
216
+ icon: /* @__PURE__ */ P(w, { size: 24 }),
217
+ headerActions: /* @__PURE__ */ F("div", {
217
218
  className: "flex gap-2",
218
- children: [/* @__PURE__ */ I(v, {
219
+ children: [/* @__PURE__ */ F(_, {
219
220
  variant: "outline",
220
- onClick: w,
221
- children: [/* @__PURE__ */ F(y, { size: 16 }), " Back"]
222
- }), /* @__PURE__ */ I(v, { children: [/* @__PURE__ */ F(T, { size: 16 }), " Edit"] })]
221
+ onClick: S,
222
+ children: [/* @__PURE__ */ P(v, { size: 16 }), " Back"]
223
+ }), /* @__PURE__ */ F(_, { children: [/* @__PURE__ */ P(C, { size: 16 }), " Edit"] })]
223
224
  }),
224
- headerContent: /* @__PURE__ */ I("div", {
225
+ headerContent: /* @__PURE__ */ F("div", {
225
226
  className: "flex gap-2",
226
- children: [/* @__PURE__ */ F(A, {
227
+ children: [/* @__PURE__ */ P(k, {
227
228
  status: r.status,
228
229
  type: "vehicle"
229
- }), /* @__PURE__ */ F(k, { type: r.type })]
230
+ }), /* @__PURE__ */ P(O, { type: r.type })]
230
231
  }),
231
232
  children: [
232
- /* @__PURE__ */ F(z, {
233
- icon: /* @__PURE__ */ F(E, { size: 18 }),
233
+ /* @__PURE__ */ P(R, {
234
+ icon: /* @__PURE__ */ P(w, { size: 18 }),
234
235
  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."
235
236
  }),
236
- /* @__PURE__ */ F(R, {
237
+ /* @__PURE__ */ P(L, {
237
238
  storageKey: "movethewheels-vehicle-details",
238
239
  steps: [{
239
240
  id: "assign",
240
241
  label: "Assign to a delivery",
241
242
  description: "Put this vehicle on an order that fits its capacity.",
242
- icon: /* @__PURE__ */ F(C, { size: 16 }),
243
- onClick: () => O("orders")
243
+ icon: /* @__PURE__ */ P(x, { size: 16 }),
244
+ onClick: () => D("orders")
244
245
  }, {
245
246
  id: "maintenance",
246
247
  label: "Schedule maintenance",
247
248
  description: "Keep it road-ready and compliant.",
248
- icon: /* @__PURE__ */ F(S, { size: 16 }),
249
+ icon: /* @__PURE__ */ P(T, { size: 16 }),
249
250
  onClick: () => {}
250
251
  }]
251
252
  }),
252
- /* @__PURE__ */ I("div", {
253
+ /* @__PURE__ */ F("div", {
253
254
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
254
- children: [/* @__PURE__ */ I("div", {
255
+ children: [/* @__PURE__ */ F("div", {
255
256
  className: "lg:col-span-2 space-y-6",
256
257
  children: [
257
- /* @__PURE__ */ I(L, { children: [/* @__PURE__ */ F("h2", {
258
+ /* @__PURE__ */ F(I, { children: [/* @__PURE__ */ P("h2", {
258
259
  className: "text-base font-semibold text-text-primary mb-4",
259
260
  children: "Vehicle Information"
260
- }), /* @__PURE__ */ I("div", {
261
+ }), /* @__PURE__ */ F("div", {
261
262
  className: "grid grid-cols-2 md:grid-cols-4 gap-6",
262
263
  children: [
263
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
264
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
264
265
  className: "text-sm text-text-secondary",
265
266
  children: "Type"
266
- }), /* @__PURE__ */ F("p", {
267
+ }), /* @__PURE__ */ P("p", {
267
268
  className: "font-medium capitalize",
268
269
  children: r.type
269
270
  })] }),
270
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
271
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
271
272
  className: "text-sm text-text-secondary",
272
273
  children: "Make"
273
- }), /* @__PURE__ */ F("p", {
274
+ }), /* @__PURE__ */ P("p", {
274
275
  className: "font-medium",
275
276
  children: r.make
276
277
  })] }),
277
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
278
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
278
279
  className: "text-sm text-text-secondary",
279
280
  children: "Model"
280
- }), /* @__PURE__ */ F("p", {
281
+ }), /* @__PURE__ */ P("p", {
281
282
  className: "font-medium",
282
283
  children: r.model
283
284
  })] }),
284
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
285
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
285
286
  className: "text-sm text-text-secondary",
286
287
  children: "Year"
287
- }), /* @__PURE__ */ F("p", {
288
+ }), /* @__PURE__ */ P("p", {
288
289
  className: "font-medium",
289
290
  children: r.year
290
291
  })] })
291
292
  ]
292
293
  })] }),
293
- /* @__PURE__ */ I(c, { children: [/* @__PURE__ */ F(d, { children: /* @__PURE__ */ F(u, { children: "Capacity" }) }), /* @__PURE__ */ F(l, { children: /* @__PURE__ */ I("div", {
294
+ /* @__PURE__ */ F(c, { children: [/* @__PURE__ */ P(d, { children: /* @__PURE__ */ P(u, { children: "Capacity" }) }), /* @__PURE__ */ P(l, { children: /* @__PURE__ */ F("div", {
294
295
  className: "grid grid-cols-3 gap-6",
295
296
  children: [
296
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
297
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
297
298
  className: "text-sm text-text-secondary",
298
299
  children: "Weight"
299
- }), /* @__PURE__ */ I("p", {
300
+ }), /* @__PURE__ */ F("p", {
300
301
  className: "text-2xl font-bold",
301
- children: [r.capacity.weight, /* @__PURE__ */ F("span", {
302
+ children: [r.capacity.weight, /* @__PURE__ */ P("span", {
302
303
  className: "text-sm font-normal",
303
304
  children: " kg"
304
305
  })]
305
306
  })] }),
306
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
307
+ /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
307
308
  className: "text-sm text-text-secondary",
308
309
  children: "Volume"
309
- }), /* @__PURE__ */ I("p", {
310
+ }), /* @__PURE__ */ F("p", {
310
311
  className: "text-2xl font-bold",
311
- children: [r.capacity.volume, /* @__PURE__ */ F("span", {
312
+ children: [r.capacity.volume, /* @__PURE__ */ P("span", {
312
313
  className: "text-sm font-normal",
313
314
  children: " m³"
314
315
  })]
315
316
  })] }),
316
- r.capacity.pallets && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
317
+ r.capacity.pallets && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
317
318
  className: "text-sm text-text-secondary",
318
319
  children: "Pallets"
319
- }), /* @__PURE__ */ F("p", {
320
+ }), /* @__PURE__ */ P("p", {
320
321
  className: "text-2xl font-bold",
321
322
  children: r.capacity.pallets
322
323
  })] })
323
324
  ]
324
325
  }) })] }),
325
- /* @__PURE__ */ I(c, { children: [/* @__PURE__ */ F(d, { children: /* @__PURE__ */ I(u, {
326
- className: "flex items-center gap-2",
327
- children: [/* @__PURE__ */ F(b, { size: 18 }), " Documents"]
328
- }) }), /* @__PURE__ */ F(l, { children: r.documents.length > 0 ? /* @__PURE__ */ F("div", {
329
- className: "space-y-3",
330
- children: r.documents.map((e) => /* @__PURE__ */ I("div", {
331
- className: "flex items-center justify-between p-3 border rounded-lg",
332
- children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
333
- className: "font-medium capitalize",
334
- children: e.type.replace("_", " ")
335
- }), /* @__PURE__ */ I("p", {
336
- className: "text-sm text-text-secondary",
337
- children: ["Expires: ", j(e.expiryDate)]
338
- })] }), /* @__PURE__ */ F(m, {
339
- variant: e.verified ? "default" : "secondary",
340
- children: e.verified ? "Verified" : "Pending"
341
- })]
342
- }, e.id))
343
- }) : /* @__PURE__ */ F("p", {
344
- className: "text-text-secondary text-center py-4",
345
- children: "No documents uploaded"
346
- }) })] })
326
+ /* @__PURE__ */ P(y, {
327
+ entityType: "vehicle",
328
+ entityId: r.id
329
+ })
347
330
  ]
348
- }), /* @__PURE__ */ I("div", {
331
+ }), /* @__PURE__ */ F("div", {
349
332
  className: "space-y-6",
350
333
  children: [
351
- /* @__PURE__ */ I(c, { children: [/* @__PURE__ */ F(d, { children: /* @__PURE__ */ I(u, {
334
+ /* @__PURE__ */ F(c, { children: [/* @__PURE__ */ P(d, { children: /* @__PURE__ */ F(u, {
352
335
  className: "flex items-center gap-2",
353
- children: [/* @__PURE__ */ F(x, { size: 18 }), " Fuel & Mileage"]
354
- }) }), /* @__PURE__ */ I(l, {
336
+ children: [/* @__PURE__ */ P(b, { size: 18 }), " Fuel & Mileage"]
337
+ }) }), /* @__PURE__ */ F(l, {
355
338
  className: "space-y-4",
356
- children: [r.fuelLevel !== void 0 && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ I("div", {
339
+ children: [r.fuelLevel !== void 0 && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ F("div", {
357
340
  className: "flex justify-between text-sm mb-2",
358
- children: [/* @__PURE__ */ F("span", { children: "Fuel Level" }), /* @__PURE__ */ I("span", { children: [r.fuelLevel, "%"] })]
359
- }), /* @__PURE__ */ F(i, { value: r.fuelLevel })] }), r.mileage !== void 0 && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
341
+ children: [/* @__PURE__ */ P("span", { children: "Fuel Level" }), /* @__PURE__ */ F("span", { children: [r.fuelLevel, "%"] })]
342
+ }), /* @__PURE__ */ P(i, { value: r.fuelLevel })] }), r.mileage !== void 0 && /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
360
343
  className: "text-sm text-text-secondary",
361
344
  children: "Total Mileage"
362
- }), /* @__PURE__ */ I("p", {
345
+ }), /* @__PURE__ */ F("p", {
363
346
  className: "text-2xl font-bold",
364
347
  children: [
365
348
  r.mileage.toLocaleString(),
366
349
  " ",
367
- /* @__PURE__ */ F("span", {
350
+ /* @__PURE__ */ P("span", {
368
351
  className: "text-sm font-normal",
369
352
  children: "miles"
370
353
  })
371
354
  ]
372
355
  })] })]
373
356
  })] }),
374
- /* @__PURE__ */ I(c, { children: [/* @__PURE__ */ F(d, { children: /* @__PURE__ */ I(u, {
357
+ /* @__PURE__ */ F(c, { children: [/* @__PURE__ */ P(d, { children: /* @__PURE__ */ F(u, {
375
358
  className: "flex items-center gap-2",
376
- children: [/* @__PURE__ */ F(S, { size: 18 }), " Maintenance"]
377
- }) }), /* @__PURE__ */ I(l, {
359
+ children: [/* @__PURE__ */ P(T, { size: 18 }), " Maintenance"]
360
+ }) }), /* @__PURE__ */ F(l, {
378
361
  className: "space-y-3",
379
- children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
362
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
380
363
  className: "text-sm text-text-secondary",
381
364
  children: "Last Maintenance"
382
- }), /* @__PURE__ */ F("p", {
365
+ }), /* @__PURE__ */ P("p", {
383
366
  className: "font-medium",
384
367
  children: r.lastMaintenance ? j(r.lastMaintenance) : "N/A"
385
- })] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
368
+ })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", {
386
369
  className: "text-sm text-text-secondary",
387
370
  children: "Next Scheduled"
388
- }), /* @__PURE__ */ F("p", {
371
+ }), /* @__PURE__ */ P("p", {
389
372
  className: "font-medium",
390
373
  children: r.nextMaintenance ? j(r.nextMaintenance) : "N/A"
391
374
  })] })]
392
375
  })] }),
393
- r.currentLocation && /* @__PURE__ */ I(c, { children: [/* @__PURE__ */ F(d, { children: /* @__PURE__ */ I(u, {
376
+ r.currentLocation && /* @__PURE__ */ F(c, { children: [/* @__PURE__ */ P(d, { children: /* @__PURE__ */ F(u, {
394
377
  className: "flex items-center gap-2",
395
- children: [/* @__PURE__ */ F(C, { size: 18 }), " Current Location"]
396
- }) }), /* @__PURE__ */ I(l, { children: [/* @__PURE__ */ F("p", {
378
+ children: [/* @__PURE__ */ P(x, { size: 18 }), " Current Location"]
379
+ }) }), /* @__PURE__ */ F(l, { children: [/* @__PURE__ */ P("p", {
397
380
  className: "text-sm",
398
381
  children: r.currentLocation.address || "Location updating..."
399
- }), /* @__PURE__ */ I("p", {
382
+ }), /* @__PURE__ */ F("p", {
400
383
  className: "text-xs text-text-secondary mt-1",
401
384
  children: ["Updated ", j(r.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")]
402
385
  })] })] })
@@ -404,7 +387,7 @@ function H() {
404
387
  })]
405
388
  })
406
389
  ]
407
- }) : /* @__PURE__ */ F(V, {});
390
+ }) : /* @__PURE__ */ P(B, {});
408
391
  }
409
392
  //#endregion
410
- export { H as default };
393
+ export { V as default };