@burdenoff/microfe-movethewheels 2026.703.1 → 2026.703.3

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 (72) hide show
  1. package/dist/{AIAssistantPage-C3ovZ0Fh.js → AIAssistantPage-C3cPsWt-.js} +1 -1
  2. package/dist/{AnalyticsPage-O8SpY-V4.js → AnalyticsPage-Dz6g2MvK.js} +6 -6
  3. package/dist/{CreateOrderPage-CB1_-_mN.js → CreateOrderPage-C5iwnjp4.js} +29 -58
  4. package/dist/CustomerDetailsPage-B6nwFyLO.js +406 -0
  5. package/dist/{CustomersPage-DRaLuHMC.js → CustomersPage-BKxMS1AV.js} +5 -5
  6. package/dist/{DashboardPage-DPjhNfKB.js → DashboardPage-BVjQi0EB.js} +11 -11
  7. package/dist/DriverDetailsPage-CN3WQ0B9.js +507 -0
  8. package/dist/{DriversPage-C2Bk0w4Q.js → DriversPage-CH9rjQC-.js} +6 -6
  9. package/dist/{FinancePage-lmp0Sdsw.js → FinancePage-DEDykSOP.js} +5 -5
  10. package/dist/{FleetPage-DZn5pIqd.js → FleetPage-DqkFi3s3.js} +5 -5
  11. package/dist/FormError-BlOjnXOq.js +15 -0
  12. package/dist/{ImportExportPage-BIUJZc7O.js → ImportExportPage-DKJRCezl.js} +1 -1
  13. package/dist/{InventoryPage-Cxh1zYJd.js → InventoryPage-e0ze63iX.js} +6 -6
  14. package/dist/{LiveTrackingPage-BY1yAkIt.js → LiveTrackingPage-DCX-K-LR.js} +5 -5
  15. package/dist/{MarketplacePage-RMuL17EA.js → MarketplacePage-CIQ97_zp.js} +1 -1
  16. package/dist/{OrderDetailsPage-C2Mf4KSy.js → OrderDetailsPage-DYiZ-9UK.js} +5 -5
  17. package/dist/{OrdersListPage-BrPBtnhp.js → OrdersListPage-Cn90P1Xx.js} +4 -4
  18. package/dist/ProductDetailsPage-C9uOiYLp.js +350 -0
  19. package/dist/{ProductsPage-I5DilIoY.js → ProductsPage-QJfHHpqB.js} +4 -4
  20. package/dist/{ReportsPage-BDXNmUng.js → ReportsPage-Zp53q3_8.js} +2 -2
  21. package/dist/RouteDetailsPage-DUStXSf9.js +531 -0
  22. package/dist/{RoutesPage-lqX9ylHP.js → RoutesPage-DMfoicM1.js} +3 -3
  23. package/dist/{SettingsPage-CQVIOaNs.js → SettingsPage-Bn-v0mbQ.js} +1 -1
  24. package/dist/{TrackingPage-BXrjz7V8.js → TrackingPage-W-jtdM3Y.js} +4 -4
  25. package/dist/VehicleDetailsPage-Bceo5oz3.js +410 -0
  26. package/dist/{VehiclesPage-6W39XT5W.js → VehiclesPage-ApKThYeG.js} +5 -5
  27. package/dist/WarehouseDetailsPage-L_6sWigM.js +493 -0
  28. package/dist/{WarehousesPage-CHvBqNaQ.js → WarehousesPage-DCbXXXWE.js} +3 -3
  29. package/dist/index.js +154 -138
  30. package/dist/trash-2-BKhar6Hs.js +32 -0
  31. package/dist/{useFleet-DiAC-IiH.js → useFleet-DKqXZ16m.js} +77 -56
  32. package/dist/{useInventory-DKoks37x.js → useInventory-DkyiVY_A.js} +73 -53
  33. package/dist/{useTracking-GJify4HN.js → useTracking-B-va1kO3.js} +2 -2
  34. package/package.json +1 -1
  35. package/src/movethewheels/MoveTheWheelsRoutes.tsx +4 -0
  36. package/src/movethewheels/components/FormError.tsx +25 -0
  37. package/src/movethewheels/hooks/useFleet.ts +107 -0
  38. package/src/movethewheels/hooks/useInventory.ts +107 -0
  39. package/src/movethewheels/pages/CustomerDetailsPage.tsx +153 -20
  40. package/src/movethewheels/pages/CustomersPage.tsx +1 -1
  41. package/src/movethewheels/pages/DriverDetailsPage.tsx +159 -2
  42. package/src/movethewheels/pages/DriversPage.tsx +6 -2
  43. package/src/movethewheels/pages/InventoryPage.tsx +1 -1
  44. package/src/movethewheels/pages/OrdersListPage.tsx +1 -1
  45. package/src/movethewheels/pages/ProductDetailsPage.tsx +146 -3
  46. package/src/movethewheels/pages/ProductsPage.tsx +6 -2
  47. package/src/movethewheels/pages/RouteDetailsPage.tsx +285 -25
  48. package/src/movethewheels/pages/VehicleDetailsPage.tsx +158 -2
  49. package/src/movethewheels/pages/VehiclesPage.tsx +6 -2
  50. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +224 -2
  51. package/src/movethewheels/pages/WarehousesPage.tsx +5 -1
  52. package/dist/CustomerDetailsPage-BaeKEI1D.js +0 -263
  53. package/dist/DriverDetailsPage-CSSQTOzn.js +0 -328
  54. package/dist/ProductDetailsPage-CezzzZcj.js +0 -193
  55. package/dist/RouteDetailsPage-BcomL20M.js +0 -263
  56. package/dist/VehicleDetailsPage-DZjLcJgr.js +0 -218
  57. package/dist/WarehouseDetailsPage-C10pgRGW.js +0 -236
  58. /package/dist/{MetricCard-7aYgzZHK.js → MetricCard-BY0QrMD4.js} +0 -0
  59. /package/dist/{StatusBadge-NpTeHVlw.js → StatusBadge-BZurYHMy.js} +0 -0
  60. /package/dist/{formatters-DhKZ-eA1.js → formatters-CF2S2l1m.js} +0 -0
  61. /package/dist/{trending-up-B7W-GL6P.js → trending-up-Dohgd4t_.js} +0 -0
  62. /package/dist/{triangle-alert-BonHFFNz.js → triangle-alert-i-XQL9Rd.js} +0 -0
  63. /package/dist/{truck-DrlfSpRC.js → truck-C0v_hbLR.js} +0 -0
  64. /package/dist/{useAnalytics-CgdzUfY_.js → useAnalytics-DS8n0xgg.js} +0 -0
  65. /package/dist/{useCustomers-QrlozybF.js → useCustomers-BmTNGxiI.js} +0 -0
  66. /package/dist/{useImportExport-BLMnAKCC.js → useImportExport-DHr-SWSw.js} +0 -0
  67. /package/dist/{useOrders-D3UZVy8Y.js → useOrders-Cfk1GLiq.js} +0 -0
  68. /package/dist/{useReports-Puq4DCH9.js → useReports-CTqZr-AB.js} +0 -0
  69. /package/dist/{useRoutes-Do57LvRb.js → useRoutes-BQWO607N.js} +0 -0
  70. /package/dist/{user-CjSoudeu.js → user-jyFU3lXk.js} +0 -0
  71. /package/dist/{users-BAM4gHTn.js → users-DZ-ilS6B.js} +0 -0
  72. /package/dist/{warehouse-C7MSr47B.js → warehouse-6m5kXMLu.js} +0 -0
@@ -1,193 +0,0 @@
1
- import { ct as e, d as t, f as n, g as r, h as i, i as a, l as o, lt as s, n as c, ot as l, r as u, u as d } from "./PageLayout-D4LDHJJq.js";
2
- import { t as f } from "./arrow-left-n48Y-Wis.js";
3
- import { t as p } from "./box-D9Pal4HM.js";
4
- import { t as m } from "./dollar-sign-CgKQRz_e.js";
5
- import { t as h } from "./package-BChUzpJS.js";
6
- import { t as g } from "./square-pen-CopE9GmB.js";
7
- import { r as _ } from "./useInventory-DKoks37x.js";
8
- import { n as v } from "./formatters-DhKZ-eA1.js";
9
- import { useParams as y } from "react-router-dom";
10
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
11
- import { EmphasisPanel as S, NextSteps as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
12
- //#region node_modules/lucide-react/dist/esm/icons/tag.js
13
- var T = s("Tag", [["path", {
14
- d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",
15
- key: "vktsd0"
16
- }], ["circle", {
17
- cx: "7.5",
18
- cy: "7.5",
19
- r: ".5",
20
- fill: "currentColor",
21
- key: "kqv944"
22
- }]]);
23
- //#endregion
24
- //#region src/movethewheels/pages/ProductDetailsPage.tsx
25
- function E() {
26
- let { productId: s } = y(), { basePath: E, navigate: D } = l(), { product: O, isLoading: k, error: A, refetch: j } = _(s), M = () => D?.(e(E, "inventory/products")), N = (t) => D?.(e(E, t));
27
- return k ? /* @__PURE__ */ b(u, { message: "Loading product details..." }) : A || !O ? /* @__PURE__ */ b(c, {
28
- title: "Product not found",
29
- onRetry: j
30
- }) : /* @__PURE__ */ x(a, {
31
- title: O.name,
32
- subtitle: `SKU: ${O.sku}`,
33
- icon: /* @__PURE__ */ b(h, { size: 24 }),
34
- headerActions: /* @__PURE__ */ x("div", {
35
- className: "flex gap-2",
36
- children: [/* @__PURE__ */ x(d, {
37
- variant: "outline",
38
- onClick: M,
39
- children: [/* @__PURE__ */ b(f, { size: 16 }), " Back"]
40
- }), /* @__PURE__ */ x(d, { children: [/* @__PURE__ */ b(g, { size: 16 }), " Edit"] })]
41
- }),
42
- headerContent: /* @__PURE__ */ x("div", {
43
- className: "flex gap-2",
44
- children: [
45
- /* @__PURE__ */ b(o, {
46
- variant: "outline",
47
- children: O.category
48
- }),
49
- O.brand && /* @__PURE__ */ b(o, {
50
- variant: "secondary",
51
- children: O.brand
52
- }),
53
- O.fragile && /* @__PURE__ */ b(o, {
54
- variant: "destructive",
55
- children: "Fragile"
56
- }),
57
- O.hazardous && /* @__PURE__ */ b(o, {
58
- variant: "destructive",
59
- children: "Hazardous"
60
- }),
61
- O.temperatureControlled && /* @__PURE__ */ b(o, {
62
- variant: "secondary",
63
- children: "Temp Controlled"
64
- })
65
- ]
66
- }),
67
- children: [
68
- /* @__PURE__ */ b(w, {
69
- icon: /* @__PURE__ */ b(h, { size: 18 }),
70
- children: "The catalog record for this item — its dimensions, weight, value and handling flags. These drive how it's packed, priced and routed, so keep them accurate before adding the product to an order or stocking it in a warehouse."
71
- }),
72
- /* @__PURE__ */ b(C, {
73
- storageKey: "movethewheels-product-details",
74
- steps: [{
75
- id: "order",
76
- label: "Add this product to an order",
77
- description: "Include it on a new delivery.",
78
- icon: /* @__PURE__ */ b(h, { size: 16 }),
79
- onClick: () => N("orders/new")
80
- }, {
81
- id: "edit",
82
- label: "Edit product details",
83
- description: "Update dimensions, value or handling flags.",
84
- icon: /* @__PURE__ */ b(T, { size: 16 }),
85
- onClick: () => {}
86
- }]
87
- }),
88
- /* @__PURE__ */ x("div", {
89
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
90
- children: [/* @__PURE__ */ x("div", {
91
- className: "lg:col-span-2 space-y-6",
92
- children: [
93
- /* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ b(r, { children: "Description" }) }), /* @__PURE__ */ b(n, { children: /* @__PURE__ */ b("p", { children: O.description }) })] }),
94
- /* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ x(r, {
95
- className: "flex items-center gap-2",
96
- children: [/* @__PURE__ */ b(p, { size: 18 }), " Dimensions & Weight"]
97
- }) }), /* @__PURE__ */ b(n, { children: /* @__PURE__ */ x("div", {
98
- className: "grid grid-cols-2 md:grid-cols-4 gap-4",
99
- children: [
100
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
101
- className: "text-sm text-text-secondary",
102
- children: "Length"
103
- }), /* @__PURE__ */ x("p", {
104
- className: "text-2xl font-bold",
105
- children: [O.dimensions.length, /* @__PURE__ */ x("span", {
106
- className: "text-sm font-normal",
107
- children: [" ", O.dimensions.unit]
108
- })]
109
- })] }),
110
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
111
- className: "text-sm text-text-secondary",
112
- children: "Width"
113
- }), /* @__PURE__ */ x("p", {
114
- className: "text-2xl font-bold",
115
- children: [O.dimensions.width, /* @__PURE__ */ x("span", {
116
- className: "text-sm font-normal",
117
- children: [" ", O.dimensions.unit]
118
- })]
119
- })] }),
120
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
121
- className: "text-sm text-text-secondary",
122
- children: "Height"
123
- }), /* @__PURE__ */ x("p", {
124
- className: "text-2xl font-bold",
125
- children: [O.dimensions.height, /* @__PURE__ */ x("span", {
126
- className: "text-sm font-normal",
127
- children: [" ", O.dimensions.unit]
128
- })]
129
- })] }),
130
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
131
- className: "text-sm text-text-secondary",
132
- children: "Weight"
133
- }), /* @__PURE__ */ x("p", {
134
- className: "text-2xl font-bold",
135
- children: [O.weight, /* @__PURE__ */ b("span", {
136
- className: "text-sm font-normal",
137
- children: " kg"
138
- })]
139
- })] })
140
- ]
141
- }) })] }),
142
- O.attributes.length > 0 && /* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ x(r, {
143
- className: "flex items-center gap-2",
144
- children: [/* @__PURE__ */ b(T, { size: 18 }), " Attributes"]
145
- }) }), /* @__PURE__ */ b(n, { children: /* @__PURE__ */ b("div", {
146
- className: "grid grid-cols-2 md:grid-cols-3 gap-4",
147
- children: O.attributes.map((e, t) => /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
148
- className: "text-sm text-text-secondary",
149
- children: e.name
150
- }), /* @__PURE__ */ b("p", {
151
- className: "font-medium",
152
- children: e.value
153
- })] }, t))
154
- }) })] })
155
- ]
156
- }), /* @__PURE__ */ x("div", {
157
- className: "space-y-6",
158
- children: [/* @__PURE__ */ x(S, { children: [
159
- /* @__PURE__ */ x("h2", {
160
- className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-3",
161
- children: [/* @__PURE__ */ b(m, { size: 18 }), " Pricing"]
162
- }),
163
- /* @__PURE__ */ b("p", {
164
- className: "text-3xl font-bold",
165
- children: v(O.value)
166
- }),
167
- /* @__PURE__ */ b("p", {
168
- className: "text-sm text-text-secondary",
169
- children: "Unit price"
170
- })
171
- ] }), /* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ b(r, { children: "Identifiers" }) }), /* @__PURE__ */ x(n, {
172
- className: "space-y-3",
173
- children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
174
- className: "text-sm text-text-secondary",
175
- children: "SKU"
176
- }), /* @__PURE__ */ b("p", {
177
- className: "font-mono",
178
- children: O.sku
179
- })] }), O.barcode && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
180
- className: "text-sm text-text-secondary",
181
- children: "Barcode"
182
- }), /* @__PURE__ */ b("p", {
183
- className: "font-mono",
184
- children: O.barcode
185
- })] })]
186
- })] })]
187
- })]
188
- })
189
- ]
190
- });
191
- }
192
- //#endregion
193
- export { E as default };
@@ -1,263 +0,0 @@
1
- import { ct as e, d as t, f as n, g as r, h as i, i as a, l as o, lt as s, n as c, ot as l, r as u, t as d, u as f } from "./PageLayout-D4LDHJJq.js";
2
- import { t as p } from "./arrow-left-n48Y-Wis.js";
3
- import { t as m } from "./circle-check-big-w0TrLKMF.js";
4
- import { t as h } from "./clock-DJZtdl8u.js";
5
- import { t as g } from "./map-pin-BGiCvyCs.js";
6
- import { t as _ } from "./navigation-D36prnAn.js";
7
- import { t as v } from "./square-pen-CopE9GmB.js";
8
- import { r as y, t as b } from "./useRoutes-Do57LvRb.js";
9
- import { o as x, r as S } from "./StatusBadge-NpTeHVlw.js";
10
- import { r as C, t as w } from "./formatters-DhKZ-eA1.js";
11
- import { useParams as T } from "react-router-dom";
12
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
13
- import { EmphasisPanel as O, NextSteps as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
14
- //#region node_modules/lucide-react/dist/esm/icons/zap.js
15
- var j = s("Zap", [["path", {
16
- d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
17
- key: "1xq2db"
18
- }]]);
19
- //#endregion
20
- //#region src/movethewheels/pages/RouteDetailsPage.tsx
21
- function M() {
22
- let { routeId: s } = T(), { basePath: M, navigate: N } = l(), { route: P, isLoading: F, error: I, refetch: L } = b(s), { optimizeRoute: R } = y(), z = () => N?.(e(M, "routes")), B = (t) => N?.(e(M, t));
23
- if (!s) return /* @__PURE__ */ D(a, {
24
- title: "Create Route",
25
- subtitle: "Plan a new delivery route",
26
- icon: /* @__PURE__ */ E(_, { size: 24 }),
27
- headerActions: /* @__PURE__ */ D(f, {
28
- variant: "outline",
29
- onClick: z,
30
- children: [/* @__PURE__ */ E(p, { size: 16 }), " Back"]
31
- }),
32
- children: [/* @__PURE__ */ E(A, {
33
- icon: /* @__PURE__ */ E(_, { size: 18 }),
34
- children: "Plan a new delivery route — pick the stops to visit, and the optimizer will sequence them into the shortest driving plan so one driver can cover them in a single run."
35
- }), /* @__PURE__ */ E(d, {
36
- illustration: "onboarding",
37
- title: "Build your route",
38
- description: "The route planner lets you add stops, set the running order, and optimize for distance and time."
39
- })]
40
- });
41
- if (F) return /* @__PURE__ */ E(u, { message: "Loading route details..." });
42
- if (I || !P) return /* @__PURE__ */ E(c, {
43
- title: "Route not found",
44
- onRetry: L
45
- });
46
- let V = async () => {
47
- try {
48
- await R(P.id), L();
49
- } catch (e) {
50
- console.error(e);
51
- }
52
- };
53
- return /* @__PURE__ */ D(a, {
54
- title: P.name,
55
- subtitle: `${P.stops.length} stops - ${P.distance.toFixed(1)} km`,
56
- icon: /* @__PURE__ */ E(_, { size: 24 }),
57
- headerActions: /* @__PURE__ */ D("div", {
58
- className: "flex gap-2",
59
- children: [
60
- /* @__PURE__ */ D(f, {
61
- variant: "outline",
62
- onClick: z,
63
- children: [/* @__PURE__ */ E(p, { size: 16 }), " Back"]
64
- }),
65
- !P.optimized && /* @__PURE__ */ D(f, {
66
- variant: "outline",
67
- onClick: V,
68
- children: [/* @__PURE__ */ E(j, { size: 16 }), " Optimize"]
69
- }),
70
- /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(v, { size: 16 }), " Edit"] })
71
- ]
72
- }),
73
- headerContent: /* @__PURE__ */ D("div", {
74
- className: "flex gap-2",
75
- children: [/* @__PURE__ */ E(S, {
76
- status: P.status,
77
- customColors: x[P.status]
78
- }), /* @__PURE__ */ E(o, {
79
- variant: P.optimized ? "default" : "secondary",
80
- children: P.optimized ? "Optimized" : "Not Optimized"
81
- })]
82
- }),
83
- children: [
84
- /* @__PURE__ */ E(A, {
85
- icon: /* @__PURE__ */ E(_, { size: 18 }),
86
- children: "A single optimized driving plan that chains together this route's stops. Review the sequence, distance and timing here, re-optimize if traffic or stops change, then hand the itinerary to a driver."
87
- }),
88
- /* @__PURE__ */ E(k, {
89
- storageKey: "movethewheels-route-details",
90
- steps: [
91
- ...P.optimized ? [] : [{
92
- id: "optimize",
93
- label: "Optimize this route",
94
- description: "Reorder stops to cut distance and driving time.",
95
- icon: /* @__PURE__ */ E(j, { size: 16 }),
96
- onClick: V
97
- }],
98
- {
99
- id: "edit",
100
- label: "Adjust stops",
101
- description: "Add, remove or reorder the delivery stops.",
102
- icon: /* @__PURE__ */ E(v, { size: 16 }),
103
- onClick: () => {}
104
- },
105
- {
106
- id: "orders",
107
- label: "Review the orders on this route",
108
- description: "Check the deliveries bundled into this run.",
109
- icon: /* @__PURE__ */ E(g, { size: 16 }),
110
- onClick: () => B("orders")
111
- }
112
- ]
113
- }),
114
- /* @__PURE__ */ D("div", {
115
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
116
- children: [/* @__PURE__ */ D("div", {
117
- className: "lg:col-span-2 space-y-6",
118
- children: [/* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ E(r, { children: "Route Map" }) }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E("div", {
119
- className: "aspect-video bg-bg-sunken rounded-lg flex items-center justify-center",
120
- children: /* @__PURE__ */ D("div", {
121
- className: "text-center text-text-secondary",
122
- children: [/* @__PURE__ */ E(g, {
123
- size: 48,
124
- className: "mx-auto mb-2 opacity-50"
125
- }), /* @__PURE__ */ E("p", { children: "Route map visualization" })]
126
- })
127
- }) })] }), /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ D(r, { children: [
128
- "Stops (",
129
- P.stops.length,
130
- ")"
131
- ] }) }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E("div", {
132
- className: "space-y-4",
133
- children: P.stops.map((e, t) => /* @__PURE__ */ D("div", {
134
- className: "flex gap-4",
135
- children: [/* @__PURE__ */ D("div", {
136
- className: "relative",
137
- children: [/* @__PURE__ */ E("div", {
138
- className: `w-8 h-8 rounded-full flex items-center justify-center ${e.status === "completed" ? "bg-status-success-text text-text-inverse" : "bg-bg-sunken"}`,
139
- children: e.status === "completed" ? /* @__PURE__ */ E(m, { size: 16 }) : e.sequence
140
- }), t < P.stops.length - 1 && /* @__PURE__ */ E("div", { className: "absolute top-8 left-4 w-px h-12 bg-border" })]
141
- }), /* @__PURE__ */ E("div", {
142
- className: "flex-1 pb-4",
143
- children: /* @__PURE__ */ D("div", {
144
- className: "flex items-center justify-between",
145
- children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("div", {
146
- className: "flex items-center gap-2",
147
- children: [/* @__PURE__ */ E(o, {
148
- variant: e.type === "pickup" ? "secondary" : "default",
149
- className: "capitalize",
150
- children: e.type
151
- }), /* @__PURE__ */ D("span", {
152
- className: "font-medium",
153
- children: ["Order #", e.orderId]
154
- })]
155
- }), /* @__PURE__ */ E("p", {
156
- className: "text-sm text-text-secondary mt-1",
157
- children: w(e.address)
158
- })] }), /* @__PURE__ */ D("div", {
159
- className: "text-right",
160
- children: [
161
- /* @__PURE__ */ D("p", {
162
- className: "text-sm",
163
- children: ["Scheduled: ", C(e.scheduledTime, "time")]
164
- }),
165
- e.actualTime && /* @__PURE__ */ D("p", {
166
- className: "text-sm text-status-success-text",
167
- children: ["Actual: ", C(e.actualTime, "time")]
168
- }),
169
- /* @__PURE__ */ D("p", {
170
- className: "text-xs text-text-secondary",
171
- children: [e.duration, " min stop"]
172
- })
173
- ]
174
- })]
175
- })
176
- })]
177
- }, e.id))
178
- }) })] })]
179
- }), /* @__PURE__ */ D("div", {
180
- className: "space-y-6",
181
- children: [
182
- /* @__PURE__ */ D(O, {
183
- className: "space-y-4",
184
- children: [
185
- /* @__PURE__ */ E("h2", {
186
- className: "text-base font-semibold text-text-primary",
187
- children: "Route Info"
188
- }),
189
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
190
- className: "text-sm text-text-secondary",
191
- children: "Total Distance"
192
- }), /* @__PURE__ */ D("p", {
193
- className: "text-2xl font-bold",
194
- children: [P.distance.toFixed(1), /* @__PURE__ */ E("span", {
195
- className: "text-sm font-normal",
196
- children: " km"
197
- })]
198
- })] }),
199
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
200
- className: "text-sm text-text-secondary",
201
- children: "Est. Duration"
202
- }), /* @__PURE__ */ D("p", {
203
- className: "text-2xl font-bold",
204
- children: [P.estimatedDuration, /* @__PURE__ */ E("span", {
205
- className: "text-sm font-normal",
206
- children: " min"
207
- })]
208
- })] }),
209
- P.actualDuration && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
210
- className: "text-sm text-text-secondary",
211
- children: "Actual Duration"
212
- }), /* @__PURE__ */ D("p", {
213
- className: "text-2xl font-bold",
214
- children: [P.actualDuration, /* @__PURE__ */ E("span", {
215
- className: "text-sm font-normal",
216
- children: " min"
217
- })]
218
- })] })
219
- ]
220
- }),
221
- /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ D(r, {
222
- className: "flex items-center gap-2",
223
- children: [/* @__PURE__ */ E(h, { size: 18 }), " Timeline"]
224
- }) }), /* @__PURE__ */ D(n, {
225
- className: "space-y-3",
226
- children: [
227
- P.startTime && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
228
- className: "text-sm text-text-secondary",
229
- children: "Started"
230
- }), /* @__PURE__ */ E("p", { children: C(P.startTime, "full") })] }),
231
- P.endTime && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
232
- className: "text-sm text-text-secondary",
233
- children: "Completed"
234
- }), /* @__PURE__ */ E("p", { children: C(P.endTime, "full") })] }),
235
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
236
- className: "text-sm text-text-secondary",
237
- children: "Created"
238
- }), /* @__PURE__ */ E("p", { children: C(P.createdAt, "full") })] })
239
- ]
240
- })] }),
241
- P.trafficConditions.length > 0 && /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ E(r, { children: "Traffic Conditions" }) }), /* @__PURE__ */ E(n, { children: P.trafficConditions.map((e, t) => /* @__PURE__ */ D("div", {
242
- className: `p-2 rounded mb-2 ${e.condition === "severe" ? "bg-status-error-bg-subtle" : (e.condition, "bg-status-warning-bg-subtle")}`,
243
- children: [/* @__PURE__ */ D("p", {
244
- className: "text-sm font-medium capitalize",
245
- children: [e.condition, " traffic"]
246
- }), /* @__PURE__ */ D("p", {
247
- className: "text-xs text-text-secondary",
248
- children: [
249
- e.location,
250
- " - +",
251
- e.delay,
252
- " min delay"
253
- ]
254
- })]
255
- }, t)) })] })
256
- ]
257
- })]
258
- })
259
- ]
260
- });
261
- }
262
- //#endregion
263
- export { M as default };
@@ -1,218 +0,0 @@
1
- import { M as e, ct as t, d as n, f as r, g as i, h as a, i as o, l as s, n as c, ot as l, r as u, u as d } from "./PageLayout-D4LDHJJq.js";
2
- import { t as f } from "./arrow-left-n48Y-Wis.js";
3
- import { t as p } from "./file-text-DWWY6_f5.js";
4
- import { n as m, t as h } from "./wrench-CANXWxF-.js";
5
- import { t as g } from "./map-pin-BGiCvyCs.js";
6
- import { t as _ } from "./square-pen-CopE9GmB.js";
7
- import { t as v } from "./truck-DrlfSpRC.js";
8
- import { a as y } from "./useFleet-DiAC-IiH.js";
9
- import { a as b, r as x } from "./StatusBadge-NpTeHVlw.js";
10
- import { r as S } from "./formatters-DhKZ-eA1.js";
11
- import { useParams as C } from "react-router-dom";
12
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
13
- import { EmphasisPanel as E, NextSteps as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
14
- //#region src/movethewheels/pages/VehicleDetailsPage.tsx
15
- function k() {
16
- let { vehicleId: k } = C(), { basePath: A, navigate: j } = l(), { vehicle: M, isLoading: N, error: P, refetch: F } = y(k), I = () => j?.(t(A, "fleet/vehicles")), L = (e) => j?.(t(A, e));
17
- return N ? /* @__PURE__ */ w(u, { message: "Loading vehicle details..." }) : P || !M ? /* @__PURE__ */ w(c, {
18
- title: "Vehicle not found",
19
- onRetry: F
20
- }) : /* @__PURE__ */ T(o, {
21
- title: M.vehicleNumber,
22
- subtitle: `${M.make} ${M.model} (${M.year})`,
23
- icon: /* @__PURE__ */ w(v, { size: 24 }),
24
- headerActions: /* @__PURE__ */ T("div", {
25
- className: "flex gap-2",
26
- children: [/* @__PURE__ */ T(d, {
27
- variant: "outline",
28
- onClick: I,
29
- children: [/* @__PURE__ */ w(f, { size: 16 }), " Back"]
30
- }), /* @__PURE__ */ T(d, { children: [/* @__PURE__ */ w(_, { size: 16 }), " Edit"] })]
31
- }),
32
- headerContent: /* @__PURE__ */ T("div", {
33
- className: "flex gap-2",
34
- children: [/* @__PURE__ */ w(x, {
35
- status: M.status,
36
- type: "vehicle"
37
- }), /* @__PURE__ */ w(b, { type: M.type })]
38
- }),
39
- children: [
40
- /* @__PURE__ */ w(O, {
41
- icon: /* @__PURE__ */ w(v, { size: 18 }),
42
- 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."
43
- }),
44
- /* @__PURE__ */ w(D, {
45
- storageKey: "movethewheels-vehicle-details",
46
- steps: [{
47
- id: "assign",
48
- label: "Assign to a delivery",
49
- description: "Put this vehicle on an order that fits its capacity.",
50
- icon: /* @__PURE__ */ w(g, { size: 16 }),
51
- onClick: () => L("orders")
52
- }, {
53
- id: "maintenance",
54
- label: "Schedule maintenance",
55
- description: "Keep it road-ready and compliant.",
56
- icon: /* @__PURE__ */ w(h, { size: 16 }),
57
- onClick: () => {}
58
- }]
59
- }),
60
- /* @__PURE__ */ T("div", {
61
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
62
- children: [/* @__PURE__ */ T("div", {
63
- className: "lg:col-span-2 space-y-6",
64
- children: [
65
- /* @__PURE__ */ T(E, { children: [/* @__PURE__ */ w("h2", {
66
- className: "text-base font-semibold text-text-primary mb-4",
67
- children: "Vehicle Information"
68
- }), /* @__PURE__ */ T("div", {
69
- className: "grid grid-cols-2 md:grid-cols-4 gap-6",
70
- children: [
71
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
72
- className: "text-sm text-text-secondary",
73
- children: "Type"
74
- }), /* @__PURE__ */ w("p", {
75
- className: "font-medium capitalize",
76
- children: M.type
77
- })] }),
78
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
79
- className: "text-sm text-text-secondary",
80
- children: "Make"
81
- }), /* @__PURE__ */ w("p", {
82
- className: "font-medium",
83
- children: M.make
84
- })] }),
85
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
86
- className: "text-sm text-text-secondary",
87
- children: "Model"
88
- }), /* @__PURE__ */ w("p", {
89
- className: "font-medium",
90
- children: M.model
91
- })] }),
92
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
93
- className: "text-sm text-text-secondary",
94
- children: "Year"
95
- }), /* @__PURE__ */ w("p", {
96
- className: "font-medium",
97
- children: M.year
98
- })] })
99
- ]
100
- })] }),
101
- /* @__PURE__ */ T(n, { children: [/* @__PURE__ */ w(a, { children: /* @__PURE__ */ w(i, { children: "Capacity" }) }), /* @__PURE__ */ w(r, { children: /* @__PURE__ */ T("div", {
102
- className: "grid grid-cols-3 gap-6",
103
- children: [
104
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
105
- className: "text-sm text-text-secondary",
106
- children: "Weight"
107
- }), /* @__PURE__ */ T("p", {
108
- className: "text-2xl font-bold",
109
- children: [M.capacity.weight, /* @__PURE__ */ w("span", {
110
- className: "text-sm font-normal",
111
- children: " kg"
112
- })]
113
- })] }),
114
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
115
- className: "text-sm text-text-secondary",
116
- children: "Volume"
117
- }), /* @__PURE__ */ T("p", {
118
- className: "text-2xl font-bold",
119
- children: [M.capacity.volume, /* @__PURE__ */ w("span", {
120
- className: "text-sm font-normal",
121
- children: " m³"
122
- })]
123
- })] }),
124
- M.capacity.pallets && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
125
- className: "text-sm text-text-secondary",
126
- children: "Pallets"
127
- }), /* @__PURE__ */ w("p", {
128
- className: "text-2xl font-bold",
129
- children: M.capacity.pallets
130
- })] })
131
- ]
132
- }) })] }),
133
- /* @__PURE__ */ T(n, { children: [/* @__PURE__ */ w(a, { children: /* @__PURE__ */ T(i, {
134
- className: "flex items-center gap-2",
135
- children: [/* @__PURE__ */ w(p, { size: 18 }), " Documents"]
136
- }) }), /* @__PURE__ */ w(r, { children: M.documents.length > 0 ? /* @__PURE__ */ w("div", {
137
- className: "space-y-3",
138
- children: M.documents.map((e) => /* @__PURE__ */ T("div", {
139
- className: "flex items-center justify-between p-3 border rounded-lg",
140
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
141
- className: "font-medium capitalize",
142
- children: e.type.replace("_", " ")
143
- }), /* @__PURE__ */ T("p", {
144
- className: "text-sm text-text-secondary",
145
- children: ["Expires: ", S(e.expiryDate)]
146
- })] }), /* @__PURE__ */ w(s, {
147
- variant: e.verified ? "default" : "secondary",
148
- children: e.verified ? "Verified" : "Pending"
149
- })]
150
- }, e.id))
151
- }) : /* @__PURE__ */ w("p", {
152
- className: "text-text-secondary text-center py-4",
153
- children: "No documents uploaded"
154
- }) })] })
155
- ]
156
- }), /* @__PURE__ */ T("div", {
157
- className: "space-y-6",
158
- children: [
159
- /* @__PURE__ */ T(n, { children: [/* @__PURE__ */ w(a, { children: /* @__PURE__ */ T(i, {
160
- className: "flex items-center gap-2",
161
- children: [/* @__PURE__ */ w(m, { size: 18 }), " Fuel & Mileage"]
162
- }) }), /* @__PURE__ */ T(r, {
163
- className: "space-y-4",
164
- children: [M.fuelLevel !== void 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
165
- className: "flex justify-between text-sm mb-2",
166
- children: [/* @__PURE__ */ w("span", { children: "Fuel Level" }), /* @__PURE__ */ T("span", { children: [M.fuelLevel, "%"] })]
167
- }), /* @__PURE__ */ w(e, { value: M.fuelLevel })] }), M.mileage !== void 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
168
- className: "text-sm text-text-secondary",
169
- children: "Total Mileage"
170
- }), /* @__PURE__ */ T("p", {
171
- className: "text-2xl font-bold",
172
- children: [
173
- M.mileage.toLocaleString(),
174
- " ",
175
- /* @__PURE__ */ w("span", {
176
- className: "text-sm font-normal",
177
- children: "miles"
178
- })
179
- ]
180
- })] })]
181
- })] }),
182
- /* @__PURE__ */ T(n, { children: [/* @__PURE__ */ w(a, { children: /* @__PURE__ */ T(i, {
183
- className: "flex items-center gap-2",
184
- children: [/* @__PURE__ */ w(h, { size: 18 }), " Maintenance"]
185
- }) }), /* @__PURE__ */ T(r, {
186
- className: "space-y-3",
187
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
188
- className: "text-sm text-text-secondary",
189
- children: "Last Maintenance"
190
- }), /* @__PURE__ */ w("p", {
191
- className: "font-medium",
192
- children: M.lastMaintenance ? S(M.lastMaintenance) : "N/A"
193
- })] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
194
- className: "text-sm text-text-secondary",
195
- children: "Next Scheduled"
196
- }), /* @__PURE__ */ w("p", {
197
- className: "font-medium",
198
- children: M.nextMaintenance ? S(M.nextMaintenance) : "N/A"
199
- })] })]
200
- })] }),
201
- M.currentLocation && /* @__PURE__ */ T(n, { children: [/* @__PURE__ */ w(a, { children: /* @__PURE__ */ T(i, {
202
- className: "flex items-center gap-2",
203
- children: [/* @__PURE__ */ w(g, { size: 18 }), " Current Location"]
204
- }) }), /* @__PURE__ */ T(r, { children: [/* @__PURE__ */ w("p", {
205
- className: "text-sm",
206
- children: M.currentLocation.address || "Location updating..."
207
- }), /* @__PURE__ */ T("p", {
208
- className: "text-xs text-text-secondary mt-1",
209
- children: ["Updated ", S(M.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")]
210
- })] })] })
211
- ]
212
- })]
213
- })
214
- ]
215
- });
216
- }
217
- //#endregion
218
- export { k as default };