@burdenoff/microfe-movethewheels 2026.626.2 → 2026.703.2

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 (135) hide show
  1. package/dist/{AIAssistantPage-AvsMbunM.js → AIAssistantPage-C3cPsWt-.js} +100 -73
  2. package/dist/AnalyticsPage-Dz6g2MvK.js +215 -0
  3. package/dist/{CreateOrderPage-CjlnEtk3.js → CreateOrderPage-C5iwnjp4.js} +36 -67
  4. package/dist/CustomerDetailsPage-B6nwFyLO.js +406 -0
  5. package/dist/{CustomersPage-CGGfD4ki.js → CustomersPage-2Y05LVyh.js} +26 -28
  6. package/dist/{DashboardPage-D2HRqwg9.js → DashboardPage-BVjQi0EB.js} +85 -83
  7. package/dist/{DataTable-CD9ZhpLB.js → DataTable-DmciIKKM.js} +3 -3
  8. package/dist/DriverDetailsPage-CN3WQ0B9.js +507 -0
  9. package/dist/{DriversPage-DKiynISH.js → DriversPage-B0Zpx8OQ.js} +25 -27
  10. package/dist/{FinancePage-Vg8WPs38.js → FinancePage-DEDykSOP.js} +9 -9
  11. package/dist/FleetPage-DqkFi3s3.js +365 -0
  12. package/dist/FormError-BlOjnXOq.js +15 -0
  13. package/dist/ImportExportPage-DKJRCezl.js +290 -0
  14. package/dist/InventoryPage-DwfgCUQq.js +253 -0
  15. package/dist/{LiveTrackingPage-DQ1q4Id3.js → LiveTrackingPage-DCX-K-LR.js} +60 -56
  16. package/dist/MarketplacePage-CIQ97_zp.js +247 -0
  17. package/dist/{MetricCard-B7yMyvMX.js → MetricCard-BY0QrMD4.js} +1 -1
  18. package/dist/{OrderDetailsPage-CFASgsYX.js → OrderDetailsPage-DYiZ-9UK.js} +83 -85
  19. package/dist/{OrdersListPage-BHeT8S5o.js → OrdersListPage-BjDlCKJd.js} +31 -33
  20. package/dist/{PageLayout-D3N8MCTm.js → PageLayout-D4LDHJJq.js} +483 -422
  21. package/dist/ProductDetailsPage-C9uOiYLp.js +350 -0
  22. package/dist/{ProductsPage--xEpbQ8A.js → ProductsPage-C1G9h7Xd.js} +22 -24
  23. package/dist/ReportsPage-Zp53q3_8.js +284 -0
  24. package/dist/RouteDetailsPage-DUStXSf9.js +531 -0
  25. package/dist/RoutesPage-DMfoicM1.js +144 -0
  26. package/dist/SettingsPage-Bn-v0mbQ.js +421 -0
  27. package/dist/StatusBadge-BZurYHMy.js +152 -0
  28. package/dist/{TrackingPage-CcRc_dva.js → TrackingPage-W-jtdM3Y.js} +59 -61
  29. package/dist/VehicleDetailsPage-Bceo5oz3.js +410 -0
  30. package/dist/{VehiclesPage-UlxPWP9K.js → VehiclesPage-VBtOep91.js} +20 -22
  31. package/dist/WarehouseDetailsPage-L_6sWigM.js +493 -0
  32. package/dist/{WarehousesPage-CuTO-OPp.js → WarehousesPage-DCbXXXWE.js} +16 -18
  33. package/dist/{arrow-left-CBpZKkpq.js → arrow-left-n48Y-Wis.js} +1 -1
  34. package/dist/{box-CAaiElsb.js → box-D9Pal4HM.js} +1 -1
  35. package/dist/{chart-column-D1Ym15-S.js → chart-column-BFIJysDR.js} +1 -1
  36. package/dist/{chevron-right-BIFGi0UA.js → chevron-right-EMIIyyJ1.js} +1 -1
  37. package/dist/{circle-alert-DjmNo5_L.js → circle-alert-iY24lSlp.js} +1 -1
  38. package/dist/{circle-check-big-CjuPVo3_.js → circle-check-big-w0TrLKMF.js} +1 -1
  39. package/dist/{clock-BjkdnddD.js → clock-DJZtdl8u.js} +1 -1
  40. package/dist/{dollar-sign-IB4O0wuQ.js → dollar-sign-CgKQRz_e.js} +1 -1
  41. package/dist/{download-Dpa9vqoG.js → download-DRXxoiQR.js} +1 -1
  42. package/dist/{file-text-C8Uioy11.js → file-text-DWWY6_f5.js} +1 -1
  43. package/dist/{filter-Da5OZaHI.js → filter-DloLC2eE.js} +1 -1
  44. package/dist/index.js +186 -162
  45. package/dist/{map-_Per4sT9.js → map-CkJaULb2.js} +1 -1
  46. package/dist/{map-pin-BSaf5IDL.js → map-pin-BGiCvyCs.js} +1 -1
  47. package/dist/{navigation-DaTbrhw2.js → navigation-D36prnAn.js} +1 -1
  48. package/dist/{package-BE7U0wQE.js → package-BChUzpJS.js} +1 -1
  49. package/dist/{phone-DV4StZiA.js → phone-Ac9s3mo_.js} +1 -1
  50. package/dist/{plus-Dl1rLeJR.js → plus-Z76q-FZm.js} +1 -1
  51. package/dist/{refresh-cw-CWfERAit.js → refresh-cw-DKt6f5T6.js} +1 -1
  52. package/dist/{save-XH8vydOn.js → save-CojywNhG.js} +1 -1
  53. package/dist/{search-OxoIiL_C.js → search-CDGefqb3.js} +1 -1
  54. package/dist/{square-pen-hLIbFQFV.js → square-pen-CopE9GmB.js} +1 -1
  55. package/dist/{star-YsVV3MNQ.js → star-nHlLjDKR.js} +1 -1
  56. package/dist/{store-RCBl7HB-.js → store-BR9Voi5E.js} +1 -1
  57. package/dist/trash-2-BKhar6Hs.js +32 -0
  58. package/dist/{trending-up-C-85AwGT.js → trending-up-Dohgd4t_.js} +1 -1
  59. package/dist/{triangle-alert-BOhfGgmh.js → triangle-alert-i-XQL9Rd.js} +1 -1
  60. package/dist/{truck-CtDjNFbi.js → truck-C0v_hbLR.js} +1 -1
  61. package/dist/{useAnalytics-ph7eTIK6.js → useAnalytics-DS8n0xgg.js} +40 -40
  62. package/dist/useAssistant-D4v3oxD3.js +84 -0
  63. package/dist/{useCustomers-bS3a4ytk.js → useCustomers-BmTNGxiI.js} +24 -24
  64. package/dist/{useFleet-BdETplNE.js → useFleet-DKqXZ16m.js} +133 -109
  65. package/dist/useImportExport-DHr-SWSw.js +55 -0
  66. package/dist/{useInventory-Dwn18FPz.js → useInventory-DkyiVY_A.js} +95 -75
  67. package/dist/{useOrders-D_3_hGMp.js → useOrders-Cfk1GLiq.js} +42 -42
  68. package/dist/useReports-CTqZr-AB.js +78 -0
  69. package/dist/{useRoutes-v4aBaS-E.js → useRoutes-BQWO607N.js} +31 -31
  70. package/dist/useSettings-CkDH_-gM.js +81 -0
  71. package/dist/{useTracking-De2KIUNu.js → useTracking-B-va1kO3.js} +22 -22
  72. package/dist/{user-Dz5TJZFs.js → user-jyFU3lXk.js} +1 -1
  73. package/dist/{users-g2N0eL-Z.js → users-DZ-ilS6B.js} +1 -1
  74. package/dist/{warehouse-D3WWDeTX.js → warehouse-6m5kXMLu.js} +1 -1
  75. package/dist/{wrench-CmxY1n4I.js → wrench-CANXWxF-.js} +1 -1
  76. package/package.json +1 -1
  77. package/src/movethewheels/MoveTheWheelsRoutes.tsx +31 -3
  78. package/src/movethewheels/components/FormError.tsx +25 -0
  79. package/src/movethewheels/components/StatusBadge.tsx +18 -37
  80. package/src/movethewheels/constants/index.ts +67 -26
  81. package/src/movethewheels/hooks/index.ts +12 -0
  82. package/src/movethewheels/hooks/useAnalytics.ts +20 -6
  83. package/src/movethewheels/hooks/useAssistant.ts +74 -0
  84. package/src/movethewheels/hooks/useFleet.ts +170 -59
  85. package/src/movethewheels/hooks/useImportExport.ts +101 -0
  86. package/src/movethewheels/hooks/useInventory.ts +107 -0
  87. package/src/movethewheels/hooks/useReports.ts +158 -0
  88. package/src/movethewheels/hooks/useSettings.ts +120 -0
  89. package/src/movethewheels/pages/AIAssistantPage.tsx +53 -15
  90. package/src/movethewheels/pages/AnalyticsPage.tsx +67 -64
  91. package/src/movethewheels/pages/CustomerDetailsPage.tsx +154 -21
  92. package/src/movethewheels/pages/CustomersPage.tsx +1 -1
  93. package/src/movethewheels/pages/DashboardPage.tsx +42 -22
  94. package/src/movethewheels/pages/DriverDetailsPage.tsx +160 -3
  95. package/src/movethewheels/pages/DriversPage.tsx +6 -2
  96. package/src/movethewheels/pages/FleetPage.tsx +96 -38
  97. package/src/movethewheels/pages/ImportExportPage.tsx +174 -68
  98. package/src/movethewheels/pages/InventoryPage.tsx +66 -28
  99. package/src/movethewheels/pages/LiveTrackingPage.tsx +12 -3
  100. package/src/movethewheels/pages/MarketplacePage.tsx +87 -45
  101. package/src/movethewheels/pages/OrderDetailsPage.tsx +2 -2
  102. package/src/movethewheels/pages/ProductDetailsPage.tsx +146 -3
  103. package/src/movethewheels/pages/ProductsPage.tsx +5 -1
  104. package/src/movethewheels/pages/ReportsPage.tsx +194 -90
  105. package/src/movethewheels/pages/RouteDetailsPage.tsx +290 -36
  106. package/src/movethewheels/pages/RoutesPage.tsx +4 -9
  107. package/src/movethewheels/pages/SettingsPage.tsx +234 -56
  108. package/src/movethewheels/pages/TrackingPage.tsx +6 -6
  109. package/src/movethewheels/pages/VehicleDetailsPage.tsx +158 -2
  110. package/src/movethewheels/pages/VehiclesPage.tsx +5 -1
  111. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +224 -2
  112. package/src/movethewheels/pages/WarehousesPage.tsx +5 -1
  113. package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +7 -6
  114. package/src/movethewheels/store/movethewheelsStore.ts +1 -1
  115. package/dist/AnalyticsPage-CCLfHgQZ.js +0 -212
  116. package/dist/CustomerDetailsPage-I6cdDHUi.js +0 -265
  117. package/dist/DriverDetailsPage-rg_pGNuP.js +0 -330
  118. package/dist/FleetPage-DddXt8r8.js +0 -332
  119. package/dist/ImportExportPage-BW6qO3kc.js +0 -248
  120. package/dist/InventoryPage-rMGuaJN-.js +0 -222
  121. package/dist/MarketplacePage-DKrXAv62.js +0 -219
  122. package/dist/ProductDetailsPage-CFGcbaHo.js +0 -195
  123. package/dist/ReportsPage-Bb7_90rK.js +0 -235
  124. package/dist/RouteDetailsPage-CVtDVb1N.js +0 -282
  125. package/dist/RoutesPage-s57PtgcQ.js +0 -163
  126. package/dist/SettingsPage-BYNCBOpN.js +0 -298
  127. package/dist/StatusBadge-CijYQXtb.js +0 -209
  128. package/dist/VehicleDetailsPage-3YDMPsPs.js +0 -220
  129. package/dist/WarehouseDetailsPage-Db7KeN-d.js +0 -238
  130. package/dist/graphqlClient-CdJyR_ed.js +0 -55
  131. package/dist/navigation-BgnOfsVd.js +0 -6
  132. package/dist/route-Dp9JiN_E.js +0 -51
  133. package/dist/settings-3Rw5NwFF.js +0 -28
  134. package/src/movethewheels/constants/mockData.ts +0 -1342
  135. /package/dist/{formatters-_vJlC-47.js → formatters-CF2S2l1m.js} +0 -0
@@ -1,220 +0,0 @@
1
- import { M as e, d as t, f as n, g as r, h as i, i as a, l as o, n as s, r as c, u as l } from "./PageLayout-D3N8MCTm.js";
2
- import { t as u } from "./arrow-left-CBpZKkpq.js";
3
- import { t as d } from "./file-text-C8Uioy11.js";
4
- import { n as f, t as p } from "./wrench-CmxY1n4I.js";
5
- import { t as m } from "./map-pin-BSaf5IDL.js";
6
- import { t as h } from "./square-pen-hLIbFQFV.js";
7
- import { t as g } from "./truck-CtDjNFbi.js";
8
- import { r as _ } from "./graphqlClient-CdJyR_ed.js";
9
- import { a as v } from "./useFleet-BdETplNE.js";
10
- import { a as y, r as b } from "./StatusBadge-CijYQXtb.js";
11
- import { r as x } from "./formatters-_vJlC-47.js";
12
- import { t as S } from "./navigation-BgnOfsVd.js";
13
- import { useParams as C } from "react-router-dom";
14
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
15
- import { EmphasisPanel as E, NextSteps as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
16
- //#region src/movethewheels/pages/VehicleDetailsPage.tsx
17
- function k() {
18
- let { vehicleId: k } = C(), { basePath: A, navigate: j } = _(), { vehicle: M, isLoading: N, error: P, refetch: F } = v(k), I = () => j?.(S(A, "fleet/vehicles")), L = (e) => j?.(S(A, e));
19
- return N ? /* @__PURE__ */ w(c, { message: "Loading vehicle details..." }) : P || !M ? /* @__PURE__ */ w(s, {
20
- title: "Vehicle not found",
21
- onRetry: F
22
- }) : /* @__PURE__ */ T(a, {
23
- title: M.vehicleNumber,
24
- subtitle: `${M.make} ${M.model} (${M.year})`,
25
- icon: /* @__PURE__ */ w(g, { size: 24 }),
26
- headerActions: /* @__PURE__ */ T("div", {
27
- className: "flex gap-2",
28
- children: [/* @__PURE__ */ T(l, {
29
- variant: "outline",
30
- onClick: I,
31
- children: [/* @__PURE__ */ w(u, { size: 16 }), " Back"]
32
- }), /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(h, { size: 16 }), " Edit"] })]
33
- }),
34
- headerContent: /* @__PURE__ */ T("div", {
35
- className: "flex gap-2",
36
- children: [/* @__PURE__ */ w(b, {
37
- status: M.status,
38
- type: "vehicle"
39
- }), /* @__PURE__ */ w(y, { type: M.type })]
40
- }),
41
- children: [
42
- /* @__PURE__ */ w(O, {
43
- icon: /* @__PURE__ */ w(g, { size: 18 }),
44
- 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."
45
- }),
46
- /* @__PURE__ */ w(D, {
47
- storageKey: "movethewheels-vehicle-details",
48
- steps: [{
49
- id: "assign",
50
- label: "Assign to a delivery",
51
- description: "Put this vehicle on an order that fits its capacity.",
52
- icon: /* @__PURE__ */ w(m, { size: 16 }),
53
- onClick: () => L("orders")
54
- }, {
55
- id: "maintenance",
56
- label: "Schedule maintenance",
57
- description: "Keep it road-ready and compliant.",
58
- icon: /* @__PURE__ */ w(p, { size: 16 }),
59
- onClick: () => {}
60
- }]
61
- }),
62
- /* @__PURE__ */ T("div", {
63
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
64
- children: [/* @__PURE__ */ T("div", {
65
- className: "lg:col-span-2 space-y-6",
66
- children: [
67
- /* @__PURE__ */ T(E, { children: [/* @__PURE__ */ w("h2", {
68
- className: "text-base font-semibold text-text-primary mb-4",
69
- children: "Vehicle Information"
70
- }), /* @__PURE__ */ T("div", {
71
- className: "grid grid-cols-2 md:grid-cols-4 gap-6",
72
- children: [
73
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
74
- className: "text-sm text-text-secondary",
75
- children: "Type"
76
- }), /* @__PURE__ */ w("p", {
77
- className: "font-medium capitalize",
78
- children: M.type
79
- })] }),
80
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
81
- className: "text-sm text-text-secondary",
82
- children: "Make"
83
- }), /* @__PURE__ */ w("p", {
84
- className: "font-medium",
85
- children: M.make
86
- })] }),
87
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
88
- className: "text-sm text-text-secondary",
89
- children: "Model"
90
- }), /* @__PURE__ */ w("p", {
91
- className: "font-medium",
92
- children: M.model
93
- })] }),
94
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
95
- className: "text-sm text-text-secondary",
96
- children: "Year"
97
- }), /* @__PURE__ */ w("p", {
98
- className: "font-medium",
99
- children: M.year
100
- })] })
101
- ]
102
- })] }),
103
- /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(r, { children: "Capacity" }) }), /* @__PURE__ */ w(n, { children: /* @__PURE__ */ T("div", {
104
- className: "grid grid-cols-3 gap-6",
105
- children: [
106
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
107
- className: "text-sm text-text-secondary",
108
- children: "Weight"
109
- }), /* @__PURE__ */ T("p", {
110
- className: "text-2xl font-bold",
111
- children: [M.capacity.weight, /* @__PURE__ */ w("span", {
112
- className: "text-sm font-normal",
113
- children: " kg"
114
- })]
115
- })] }),
116
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
117
- className: "text-sm text-text-secondary",
118
- children: "Volume"
119
- }), /* @__PURE__ */ T("p", {
120
- className: "text-2xl font-bold",
121
- children: [M.capacity.volume, /* @__PURE__ */ w("span", {
122
- className: "text-sm font-normal",
123
- children: " m³"
124
- })]
125
- })] }),
126
- M.capacity.pallets && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
127
- className: "text-sm text-text-secondary",
128
- children: "Pallets"
129
- }), /* @__PURE__ */ w("p", {
130
- className: "text-2xl font-bold",
131
- children: M.capacity.pallets
132
- })] })
133
- ]
134
- }) })] }),
135
- /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
136
- className: "flex items-center gap-2",
137
- children: [/* @__PURE__ */ w(d, { size: 18 }), " Documents"]
138
- }) }), /* @__PURE__ */ w(n, { children: M.documents.length > 0 ? /* @__PURE__ */ w("div", {
139
- className: "space-y-3",
140
- children: M.documents.map((e) => /* @__PURE__ */ T("div", {
141
- className: "flex items-center justify-between p-3 border rounded-lg",
142
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
143
- className: "font-medium capitalize",
144
- children: e.type.replace("_", " ")
145
- }), /* @__PURE__ */ T("p", {
146
- className: "text-sm text-text-secondary",
147
- children: ["Expires: ", x(e.expiryDate)]
148
- })] }), /* @__PURE__ */ w(o, {
149
- variant: e.verified ? "default" : "secondary",
150
- children: e.verified ? "Verified" : "Pending"
151
- })]
152
- }, e.id))
153
- }) : /* @__PURE__ */ w("p", {
154
- className: "text-text-secondary text-center py-4",
155
- children: "No documents uploaded"
156
- }) })] })
157
- ]
158
- }), /* @__PURE__ */ T("div", {
159
- className: "space-y-6",
160
- children: [
161
- /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
162
- className: "flex items-center gap-2",
163
- children: [/* @__PURE__ */ w(f, { size: 18 }), " Fuel & Mileage"]
164
- }) }), /* @__PURE__ */ T(n, {
165
- className: "space-y-4",
166
- children: [M.fuelLevel !== void 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
167
- className: "flex justify-between text-sm mb-2",
168
- children: [/* @__PURE__ */ w("span", { children: "Fuel Level" }), /* @__PURE__ */ T("span", { children: [M.fuelLevel, "%"] })]
169
- }), /* @__PURE__ */ w(e, { value: M.fuelLevel })] }), M.mileage !== void 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
170
- className: "text-sm text-text-secondary",
171
- children: "Total Mileage"
172
- }), /* @__PURE__ */ T("p", {
173
- className: "text-2xl font-bold",
174
- children: [
175
- M.mileage.toLocaleString(),
176
- " ",
177
- /* @__PURE__ */ w("span", {
178
- className: "text-sm font-normal",
179
- children: "miles"
180
- })
181
- ]
182
- })] })]
183
- })] }),
184
- /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
185
- className: "flex items-center gap-2",
186
- children: [/* @__PURE__ */ w(p, { size: 18 }), " Maintenance"]
187
- }) }), /* @__PURE__ */ T(n, {
188
- className: "space-y-3",
189
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
190
- className: "text-sm text-text-secondary",
191
- children: "Last Maintenance"
192
- }), /* @__PURE__ */ w("p", {
193
- className: "font-medium",
194
- children: M.lastMaintenance ? x(M.lastMaintenance) : "N/A"
195
- })] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
196
- className: "text-sm text-text-secondary",
197
- children: "Next Scheduled"
198
- }), /* @__PURE__ */ w("p", {
199
- className: "font-medium",
200
- children: M.nextMaintenance ? x(M.nextMaintenance) : "N/A"
201
- })] })]
202
- })] }),
203
- M.currentLocation && /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
204
- className: "flex items-center gap-2",
205
- children: [/* @__PURE__ */ w(m, { size: 18 }), " Current Location"]
206
- }) }), /* @__PURE__ */ T(n, { children: [/* @__PURE__ */ w("p", {
207
- className: "text-sm",
208
- children: M.currentLocation.address || "Location updating..."
209
- }), /* @__PURE__ */ T("p", {
210
- className: "text-xs text-text-secondary mt-1",
211
- children: ["Updated ", x(M.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")]
212
- })] })] })
213
- ]
214
- })]
215
- })
216
- ]
217
- });
218
- }
219
- //#endregion
220
- export { k as default };
@@ -1,238 +0,0 @@
1
- import { M as e, d as t, f as n, g as r, h as i, i as a, l as o, n as s, r as c, u as l } from "./PageLayout-D3N8MCTm.js";
2
- import { t as u } from "./arrow-left-CBpZKkpq.js";
3
- import { t as d } from "./box-CAaiElsb.js";
4
- import { t as f } from "./clock-BjkdnddD.js";
5
- import { t as p } from "./map-pin-BSaf5IDL.js";
6
- import { t as m } from "./square-pen-hLIbFQFV.js";
7
- import { t as h } from "./users-g2N0eL-Z.js";
8
- import { t as g } from "./warehouse-D3WWDeTX.js";
9
- import { r as _ } from "./graphqlClient-CdJyR_ed.js";
10
- import { a as v } from "./useInventory-Dwn18FPz.js";
11
- import { t as y } from "./formatters-_vJlC-47.js";
12
- import { t as b } from "./navigation-BgnOfsVd.js";
13
- import { useParams as x } from "react-router-dom";
14
- import { jsx as S, jsxs as C } from "react/jsx-runtime";
15
- import { EmphasisPanel as w, NextSteps as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
16
- //#region src/movethewheels/pages/WarehouseDetailsPage.tsx
17
- function D() {
18
- let { warehouseId: D } = x(), { basePath: O, navigate: k } = _(), { warehouse: A, isLoading: j, error: M, refetch: N } = v(D), P = () => k?.(b(O, "inventory/warehouses")), F = (e) => k?.(b(O, e));
19
- if (j) return /* @__PURE__ */ S(c, { message: "Loading warehouse details..." });
20
- if (M || !A) return /* @__PURE__ */ S(s, {
21
- title: "Warehouse not found",
22
- onRetry: N
23
- });
24
- let I = A.capacity.usedSpace / A.capacity.totalSpace * 100;
25
- return /* @__PURE__ */ C(a, {
26
- title: A.name,
27
- subtitle: `Code: ${A.code}`,
28
- icon: /* @__PURE__ */ S(g, { size: 24 }),
29
- headerActions: /* @__PURE__ */ C("div", {
30
- className: "flex gap-2",
31
- children: [/* @__PURE__ */ C(l, {
32
- variant: "outline",
33
- onClick: P,
34
- children: [/* @__PURE__ */ S(u, { size: 16 }), " Back"]
35
- }), /* @__PURE__ */ C(l, { children: [/* @__PURE__ */ S(m, { size: 16 }), " Edit"] })]
36
- }),
37
- headerContent: /* @__PURE__ */ C("div", {
38
- className: "flex gap-2",
39
- children: [/* @__PURE__ */ S(o, {
40
- variant: A.isActive ? "default" : "secondary",
41
- children: A.isActive ? "Active" : "Inactive"
42
- }), /* @__PURE__ */ S(o, {
43
- variant: "outline",
44
- className: "capitalize",
45
- children: A.type.replace("_", " ")
46
- })]
47
- }),
48
- children: [
49
- /* @__PURE__ */ S(E, {
50
- icon: /* @__PURE__ */ S(g, { size: 18 }),
51
- children: "A storage and fulfilment site at a glance — how full it is, its zones, operating hours, throughput and staff. Use it to decide whether this warehouse has the space and hours to fulfil an order, and where stock is running tight."
52
- }),
53
- /* @__PURE__ */ S(T, {
54
- storageKey: "movethewheels-warehouse-details",
55
- steps: [{
56
- id: "inventory",
57
- label: "Review stock here",
58
- description: "See which products are stored at this site.",
59
- icon: /* @__PURE__ */ S(d, { size: 16 }),
60
- onClick: () => F("inventory/products")
61
- }, {
62
- id: "fulfil",
63
- label: "Fulfil an order from this site",
64
- description: "Pick a pending order to ship out of this warehouse.",
65
- icon: /* @__PURE__ */ S(p, { size: 16 }),
66
- onClick: () => F("orders")
67
- }]
68
- }),
69
- /* @__PURE__ */ C("div", {
70
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
71
- children: [/* @__PURE__ */ C("div", {
72
- className: "lg:col-span-2 space-y-6",
73
- children: [
74
- /* @__PURE__ */ C(w, { children: [/* @__PURE__ */ C("h2", {
75
- className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
76
- children: [/* @__PURE__ */ S(d, { size: 18 }), " Capacity"]
77
- }), /* @__PURE__ */ C("div", {
78
- className: "space-y-4",
79
- children: [/* @__PURE__ */ C("div", { children: [
80
- /* @__PURE__ */ C("div", {
81
- className: "flex justify-between text-sm mb-2",
82
- children: [/* @__PURE__ */ S("span", { children: "Space Utilization" }), /* @__PURE__ */ C("span", { children: [I.toFixed(0), "%"] })]
83
- }),
84
- /* @__PURE__ */ S(e, { value: I }),
85
- /* @__PURE__ */ C("p", {
86
- className: "text-sm text-text-secondary mt-1",
87
- children: [
88
- A.capacity.usedSpace.toLocaleString(),
89
- " /",
90
- " ",
91
- A.capacity.totalSpace.toLocaleString(),
92
- " sq ft"
93
- ]
94
- })
95
- ] }), /* @__PURE__ */ S("div", {
96
- className: "grid grid-cols-2 gap-4",
97
- children: /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
98
- className: "text-sm text-text-secondary",
99
- children: "Pallets Used"
100
- }), /* @__PURE__ */ C("p", {
101
- className: "text-2xl font-bold",
102
- children: [A.capacity.usedPallets, /* @__PURE__ */ C("span", {
103
- className: "text-sm font-normal text-text-secondary",
104
- children: [
105
- " ",
106
- "/ ",
107
- A.capacity.totalPallets
108
- ]
109
- })]
110
- })] })
111
- })]
112
- })] }),
113
- /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, { children: [
114
- "Zones (",
115
- A.zones.length,
116
- ")"
117
- ] }) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("div", {
118
- className: "space-y-3",
119
- children: A.zones.map((t) => /* @__PURE__ */ C("div", {
120
- className: "flex items-center justify-between p-3 border rounded-lg",
121
- children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
122
- className: "font-medium",
123
- children: t.name
124
- }), /* @__PURE__ */ C("p", {
125
- className: "text-sm text-text-secondary capitalize",
126
- children: [
127
- t.type,
128
- " - ",
129
- t.location
130
- ]
131
- })] }), /* @__PURE__ */ C("div", {
132
- className: "text-right",
133
- children: [/* @__PURE__ */ S(e, {
134
- value: t.currentOccupancy / t.capacity * 100,
135
- className: "w-24 h-2"
136
- }), /* @__PURE__ */ C("p", {
137
- className: "text-sm text-text-secondary",
138
- children: [
139
- t.currentOccupancy,
140
- " / ",
141
- t.capacity
142
- ]
143
- })]
144
- })]
145
- }, t.id))
146
- }) })] }),
147
- /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
148
- className: "flex items-center gap-2",
149
- children: [/* @__PURE__ */ S(f, { size: 18 }), " Operating Hours"]
150
- }) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("div", {
151
- className: "grid grid-cols-2 md:grid-cols-4 gap-4",
152
- children: Object.entries(A.operatingHours).map(([e, t]) => /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
153
- className: "text-sm font-medium",
154
- children: e
155
- }), /* @__PURE__ */ S("p", {
156
- className: "text-sm text-text-secondary",
157
- children: t ? `${t.open} - ${t.close}` : "Closed"
158
- })] }, e))
159
- }) })] })
160
- ]
161
- }), /* @__PURE__ */ C("div", {
162
- className: "space-y-6",
163
- children: [
164
- /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
165
- className: "flex items-center gap-2",
166
- children: [/* @__PURE__ */ S(p, { size: 18 }), " Location"]
167
- }) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("p", {
168
- className: "text-sm",
169
- children: y(A.address)
170
- }) })] }),
171
- /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ S(r, { children: "Metrics" }) }), /* @__PURE__ */ C(n, {
172
- className: "space-y-3",
173
- children: [
174
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
175
- className: "text-sm text-text-secondary",
176
- children: "Throughput"
177
- }), /* @__PURE__ */ C("p", {
178
- className: "text-2xl font-bold",
179
- children: [A.metrics.throughput, /* @__PURE__ */ S("span", {
180
- className: "text-sm font-normal",
181
- children: " orders/day"
182
- })]
183
- })] }),
184
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
185
- className: "text-sm text-text-secondary",
186
- children: "Accuracy"
187
- }), /* @__PURE__ */ C("p", {
188
- className: "text-2xl font-bold",
189
- children: [A.metrics.accuracy, "%"]
190
- })] }),
191
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
192
- className: "text-sm text-text-secondary",
193
- children: "Productivity"
194
- }), /* @__PURE__ */ C("p", {
195
- className: "text-2xl font-bold",
196
- children: [A.metrics.productivity, "%"]
197
- })] }),
198
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
199
- className: "text-sm text-text-secondary",
200
- children: "Orders Fulfilled"
201
- }), /* @__PURE__ */ S("p", {
202
- className: "text-2xl font-bold",
203
- children: A.metrics.ordersFulfilled.toLocaleString()
204
- })] })
205
- ]
206
- })] }),
207
- /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
208
- className: "flex items-center gap-2",
209
- children: [
210
- /* @__PURE__ */ S(h, { size: 18 }),
211
- " Staff (",
212
- A.staff.length,
213
- ")"
214
- ]
215
- }) }), /* @__PURE__ */ S(n, { children: A.staff.length > 0 ? /* @__PURE__ */ S("div", {
216
- className: "space-y-2",
217
- children: A.staff.map((e, t) => /* @__PURE__ */ C("div", {
218
- className: "flex items-center justify-between p-2 border rounded",
219
- children: [/* @__PURE__ */ S("span", {
220
- className: "text-sm capitalize",
221
- children: e.role
222
- }), /* @__PURE__ */ S(o, {
223
- variant: "outline",
224
- children: e.shift
225
- })]
226
- }, t))
227
- }) : /* @__PURE__ */ S("p", {
228
- className: "text-text-secondary",
229
- children: "No staff assigned"
230
- }) })] })
231
- ]
232
- })]
233
- })
234
- ]
235
- });
236
- }
237
- //#endregion
238
- export { D as default };
@@ -1,55 +0,0 @@
1
- import { createContext as e, useContext as t, useMemo as n } from "react";
2
- import { MemoryRouter as r } from "react-router-dom";
3
- import { jsx as i } from "react/jsx-runtime";
4
- //#region src/movethewheels/providers/MoveTheWheelsProvider.tsx
5
- var a = e(null), o = ({ children: e, ...t }) => {
6
- let o = n(() => ({ ...t }), [t]);
7
- return t.basePath ? /* @__PURE__ */ i(a.Provider, {
8
- value: o,
9
- children: e
10
- }) : /* @__PURE__ */ i(a.Provider, {
11
- value: o,
12
- children: /* @__PURE__ */ i(r, { children: e })
13
- });
14
- };
15
- function s() {
16
- let e = t(a);
17
- if (!e) throw Error("useMoveTheWheels must be used within a MoveTheWheelsProvider");
18
- return e;
19
- }
20
- function c() {
21
- let { navigate: e, basePath: t } = s();
22
- return (n) => {
23
- n.startsWith("/") ? e(n) : e(`${t.endsWith("/") ? t.slice(0, -1) : t}/${n}`);
24
- };
25
- }
26
- //#endregion
27
- //#region src/movethewheels/utils/graphqlClient.ts
28
- function l(e) {
29
- return e ? e.endsWith("/graphql") ? e : `${e}/workspaces/graphql` : "/workspaces/graphql";
30
- }
31
- async function u(e, t, n) {
32
- let r = await fetch(l(e.apiGatewayUrl), {
33
- method: "POST",
34
- headers: {
35
- "content-type": "application/json",
36
- ...e.authToken ? { Authorization: `Bearer ${e.authToken}` } : {},
37
- ...e.workspaceToken ? { "X-Workspace-Authorization": `Bearer ${e.workspaceToken}` } : {},
38
- ...e.workspaceId ? { "x-workspace-id": e.workspaceId } : {},
39
- ...e.tenantId ? { "x-tenant-id": e.tenantId } : {},
40
- ...e.actorId ? { "x-actor-id": e.actorId } : {},
41
- ...e.actorId ? { "x-actor-type": "user" } : {}
42
- },
43
- body: JSON.stringify({
44
- query: t,
45
- variables: n
46
- })
47
- });
48
- if (!r.ok) throw Error(`GraphQL request failed with status ${r.status}`);
49
- let i = await r.json();
50
- if (i.errors?.length) throw Error(i.errors.map((e) => e.message ?? "Unknown GraphQL error").join("; "));
51
- if (!i.data) throw Error("GraphQL response did not include data");
52
- return i.data;
53
- }
54
- //#endregion
55
- export { c as i, o as n, s as r, u as t };
@@ -1,6 +0,0 @@
1
- //#region src/movethewheels/utils/navigation.ts
2
- function e(e, t) {
3
- return (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
4
- }
5
- //#endregion
6
- export { e as t };
@@ -1,51 +0,0 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
2
- //#region node_modules/lucide-react/dist/esm/icons/bot.js
3
- var t = e("Bot", [
4
- ["path", {
5
- d: "M12 8V4H8",
6
- key: "hb8ula"
7
- }],
8
- ["rect", {
9
- width: "16",
10
- height: "12",
11
- x: "4",
12
- y: "8",
13
- rx: "2",
14
- key: "enze0r"
15
- }],
16
- ["path", {
17
- d: "M2 14h2",
18
- key: "vft8re"
19
- }],
20
- ["path", {
21
- d: "M20 14h2",
22
- key: "4cs60a"
23
- }],
24
- ["path", {
25
- d: "M15 13v2",
26
- key: "1xurst"
27
- }],
28
- ["path", {
29
- d: "M9 13v2",
30
- key: "rq6x2g"
31
- }]
32
- ]), n = e("Route", [
33
- ["circle", {
34
- cx: "6",
35
- cy: "19",
36
- r: "3",
37
- key: "1kj8tv"
38
- }],
39
- ["path", {
40
- d: "M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",
41
- key: "1d8sl"
42
- }],
43
- ["circle", {
44
- cx: "18",
45
- cy: "5",
46
- r: "3",
47
- key: "gq8acd"
48
- }]
49
- ]);
50
- //#endregion
51
- export { t as n, n as t };
@@ -1,28 +0,0 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
2
- //#region node_modules/lucide-react/dist/esm/icons/globe.js
3
- var t = e("Globe", [
4
- ["circle", {
5
- cx: "12",
6
- cy: "12",
7
- r: "10",
8
- key: "1mglay"
9
- }],
10
- ["path", {
11
- d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",
12
- key: "13o1zl"
13
- }],
14
- ["path", {
15
- d: "M2 12h20",
16
- key: "9i4pu4"
17
- }]
18
- ]), n = e("Settings", [["path", {
19
- d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",
20
- key: "1qme2f"
21
- }], ["circle", {
22
- cx: "12",
23
- cy: "12",
24
- r: "3",
25
- key: "1v7zrd"
26
- }]]);
27
- //#endregion
28
- export { t as n, n as t };