@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
@@ -0,0 +1,493 @@
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 "./box-D9Pal4HM.js";
4
+ import { t as x } from "./clock-DJZtdl8u.js";
5
+ import { t as S } from "./map-pin-BGiCvyCs.js";
6
+ import { t as C } from "./save-CojywNhG.js";
7
+ import { t as w } from "./square-pen-CopE9GmB.js";
8
+ import { t as T } from "./users-DZ-ilS6B.js";
9
+ import { t as E } from "./warehouse-6m5kXMLu.js";
10
+ import { a as D, t as O } from "./useInventory-DkyiVY_A.js";
11
+ import { t as k } from "./formatters-CF2S2l1m.js";
12
+ import { t as A } from "./FormError-BlOjnXOq.js";
13
+ import { useState as j } from "react";
14
+ import { useParams as M } from "react-router-dom";
15
+ import { jsx as N, jsxs as P } from "react/jsx-runtime";
16
+ import { EmphasisPanel as F, NextSteps as I, PagePurpose as L } from "@burdenoff/fe-libs/ui";
17
+ //#region src/movethewheels/pages/WarehouseDetailsPage.tsx
18
+ var R = [
19
+ {
20
+ value: "DISTRIBUTION",
21
+ label: "Distribution"
22
+ },
23
+ {
24
+ value: "FULFILLMENT",
25
+ label: "Fulfillment"
26
+ },
27
+ {
28
+ value: "COLD_STORAGE",
29
+ label: "Cold Storage"
30
+ },
31
+ {
32
+ value: "CROSS_DOCK",
33
+ label: "Cross-Dock"
34
+ },
35
+ {
36
+ value: "RETAIL",
37
+ label: "Retail"
38
+ }
39
+ ];
40
+ function z() {
41
+ let { basePath: i, navigate: m } = g(), { createWarehouse: h } = O(), [_, b] = j({
42
+ code: "",
43
+ name: "",
44
+ type: "DISTRIBUTION",
45
+ street: "",
46
+ city: "",
47
+ state: "",
48
+ postalCode: "",
49
+ country: "USA",
50
+ totalCapacity: ""
51
+ }), [x, w] = j(!1), [T, D] = j(null), k = () => m?.(s(i, "inventory/warehouses")), M = (e, t) => b((n) => ({
52
+ ...n,
53
+ [e]: t
54
+ })), I = async (e) => {
55
+ if (e.preventDefault(), !_.code.trim() || !_.name.trim()) {
56
+ D("Warehouse code and name are required.");
57
+ return;
58
+ }
59
+ if (!_.street.trim() || !_.city.trim()) {
60
+ D("A street and city are required for the warehouse address.");
61
+ return;
62
+ }
63
+ w(!0), D(null);
64
+ try {
65
+ let e = _.totalCapacity.trim() ? Number(_.totalCapacity) : void 0, t = await h({
66
+ code: _.code.trim(),
67
+ name: _.name.trim(),
68
+ type: _.type,
69
+ address: {
70
+ street: _.street.trim(),
71
+ city: _.city.trim(),
72
+ state: _.state.trim(),
73
+ postalCode: _.postalCode.trim(),
74
+ country: _.country.trim()
75
+ },
76
+ totalCapacity: e !== void 0 && !Number.isNaN(e) ? e : void 0
77
+ });
78
+ m?.(s(i, `inventory/warehouses/${t.id}`));
79
+ } catch (e) {
80
+ console.error("Failed to create warehouse:", e), D(e instanceof Error ? e.message : "Failed to create warehouse. Please try again."), w(!1);
81
+ }
82
+ };
83
+ return /* @__PURE__ */ P(f, {
84
+ title: "Add Warehouse",
85
+ subtitle: "Register a storage and fulfilment site",
86
+ icon: /* @__PURE__ */ N(E, { size: 24 }),
87
+ headerActions: /* @__PURE__ */ P("div", {
88
+ className: "flex gap-2",
89
+ children: [/* @__PURE__ */ P(v, {
90
+ variant: "outline",
91
+ onClick: k,
92
+ disabled: x,
93
+ children: [/* @__PURE__ */ N(y, { size: 16 }), " Cancel"]
94
+ }), /* @__PURE__ */ P(v, {
95
+ onClick: I,
96
+ disabled: x,
97
+ children: [
98
+ /* @__PURE__ */ N(C, { size: 16 }),
99
+ " ",
100
+ x ? "Saving..." : "Add Warehouse"
101
+ ]
102
+ })]
103
+ }),
104
+ children: [/* @__PURE__ */ N(L, {
105
+ icon: /* @__PURE__ */ N(E, { size: 18 }),
106
+ children: "Add a warehouse so you can store inventory and fulfil orders from it. A code, name, type and location get it on the network — set a total capacity to track utilization."
107
+ }), /* @__PURE__ */ P("form", {
108
+ onSubmit: I,
109
+ className: "max-w-2xl space-y-6",
110
+ children: [
111
+ /* @__PURE__ */ N(A, { message: T }),
112
+ /* @__PURE__ */ P(F, { children: [/* @__PURE__ */ N("h2", {
113
+ className: "text-base font-semibold text-text-primary mb-4",
114
+ children: "Warehouse Details"
115
+ }), /* @__PURE__ */ P("div", {
116
+ className: "space-y-4",
117
+ children: [/* @__PURE__ */ P("div", {
118
+ className: "grid grid-cols-1 md:grid-cols-3 gap-4",
119
+ children: [
120
+ /* @__PURE__ */ P("div", {
121
+ className: "space-y-2",
122
+ children: [/* @__PURE__ */ P(p, {
123
+ htmlFor: "code",
124
+ children: ["Code ", /* @__PURE__ */ N("span", {
125
+ className: "text-status-error-text",
126
+ children: "*"
127
+ })]
128
+ }), /* @__PURE__ */ N(e, {
129
+ id: "code",
130
+ value: _.code,
131
+ onChange: (e) => M("code", e.target.value),
132
+ placeholder: "WH-SF-01",
133
+ required: !0
134
+ })]
135
+ }),
136
+ /* @__PURE__ */ P("div", {
137
+ className: "space-y-2",
138
+ children: [/* @__PURE__ */ P(p, {
139
+ htmlFor: "name",
140
+ children: ["Name ", /* @__PURE__ */ N("span", {
141
+ className: "text-status-error-text",
142
+ children: "*"
143
+ })]
144
+ }), /* @__PURE__ */ N(e, {
145
+ id: "name",
146
+ value: _.name,
147
+ onChange: (e) => M("name", e.target.value),
148
+ placeholder: "San Francisco DC",
149
+ required: !0
150
+ })]
151
+ }),
152
+ /* @__PURE__ */ P("div", {
153
+ className: "space-y-2",
154
+ children: [/* @__PURE__ */ P(p, {
155
+ htmlFor: "type",
156
+ children: ["Type ", /* @__PURE__ */ N("span", {
157
+ className: "text-status-error-text",
158
+ children: "*"
159
+ })]
160
+ }), /* @__PURE__ */ P(a, {
161
+ value: _.type,
162
+ onValueChange: (e) => M("type", e),
163
+ children: [/* @__PURE__ */ N(r, {
164
+ id: "type",
165
+ children: /* @__PURE__ */ N(o, {})
166
+ }), /* @__PURE__ */ N(t, { children: R.map((e) => /* @__PURE__ */ N(n, {
167
+ value: e.value,
168
+ children: e.label
169
+ }, e.value)) })]
170
+ })]
171
+ })
172
+ ]
173
+ }), /* @__PURE__ */ P("div", {
174
+ className: "space-y-2",
175
+ children: [/* @__PURE__ */ N(p, {
176
+ htmlFor: "totalCapacity",
177
+ children: "Total Capacity (sq ft)"
178
+ }), /* @__PURE__ */ N(e, {
179
+ id: "totalCapacity",
180
+ type: "number",
181
+ min: "0",
182
+ value: _.totalCapacity,
183
+ onChange: (e) => M("totalCapacity", e.target.value),
184
+ placeholder: "50000"
185
+ })]
186
+ })]
187
+ })] }),
188
+ /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
189
+ className: "flex items-center gap-2",
190
+ children: [
191
+ /* @__PURE__ */ N(S, { size: 18 }),
192
+ " Address ",
193
+ /* @__PURE__ */ N("span", {
194
+ className: "text-status-error-text",
195
+ children: "*"
196
+ })
197
+ ]
198
+ }) }), /* @__PURE__ */ P(l, {
199
+ className: "space-y-4",
200
+ children: [
201
+ /* @__PURE__ */ P("div", {
202
+ className: "space-y-2",
203
+ children: [/* @__PURE__ */ N(p, {
204
+ htmlFor: "street",
205
+ children: "Street"
206
+ }), /* @__PURE__ */ N(e, {
207
+ id: "street",
208
+ value: _.street,
209
+ onChange: (e) => M("street", e.target.value),
210
+ placeholder: "500 Industrial Way"
211
+ })]
212
+ }),
213
+ /* @__PURE__ */ P("div", {
214
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4",
215
+ children: [/* @__PURE__ */ P("div", {
216
+ className: "space-y-2",
217
+ children: [/* @__PURE__ */ N(p, {
218
+ htmlFor: "city",
219
+ children: "City"
220
+ }), /* @__PURE__ */ N(e, {
221
+ id: "city",
222
+ value: _.city,
223
+ onChange: (e) => M("city", e.target.value),
224
+ placeholder: "San Francisco"
225
+ })]
226
+ }), /* @__PURE__ */ P("div", {
227
+ className: "space-y-2",
228
+ children: [/* @__PURE__ */ N(p, {
229
+ htmlFor: "state",
230
+ children: "State"
231
+ }), /* @__PURE__ */ N(e, {
232
+ id: "state",
233
+ value: _.state,
234
+ onChange: (e) => M("state", e.target.value),
235
+ placeholder: "CA"
236
+ })]
237
+ })]
238
+ }),
239
+ /* @__PURE__ */ P("div", {
240
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4",
241
+ children: [/* @__PURE__ */ P("div", {
242
+ className: "space-y-2",
243
+ children: [/* @__PURE__ */ N(p, {
244
+ htmlFor: "postalCode",
245
+ children: "ZIP / Postal Code"
246
+ }), /* @__PURE__ */ N(e, {
247
+ id: "postalCode",
248
+ value: _.postalCode,
249
+ onChange: (e) => M("postalCode", e.target.value),
250
+ placeholder: "94103"
251
+ })]
252
+ }), /* @__PURE__ */ P("div", {
253
+ className: "space-y-2",
254
+ children: [/* @__PURE__ */ N(p, {
255
+ htmlFor: "country",
256
+ children: "Country"
257
+ }), /* @__PURE__ */ N(e, {
258
+ id: "country",
259
+ value: _.country,
260
+ onChange: (e) => M("country", e.target.value),
261
+ placeholder: "USA"
262
+ })]
263
+ })]
264
+ })
265
+ ]
266
+ })] })
267
+ ]
268
+ })]
269
+ });
270
+ }
271
+ function B() {
272
+ let { warehouseId: e } = M(), { basePath: t, navigate: n } = g(), { warehouse: r, isLoading: a, error: o, refetch: p } = D(e), C = () => n?.(s(t, "inventory/warehouses")), O = (e) => n?.(s(t, e));
273
+ if (!e) return /* @__PURE__ */ N(z, {});
274
+ if (a) return /* @__PURE__ */ N(_, { message: "Loading warehouse details..." });
275
+ if (o || !r) return /* @__PURE__ */ N(h, {
276
+ title: "Warehouse not found",
277
+ onRetry: p
278
+ });
279
+ let A = r.capacity.usedSpace / r.capacity.totalSpace * 100;
280
+ return /* @__PURE__ */ P(f, {
281
+ title: r.name,
282
+ subtitle: `Code: ${r.code}`,
283
+ icon: /* @__PURE__ */ N(E, { size: 24 }),
284
+ headerActions: /* @__PURE__ */ P("div", {
285
+ className: "flex gap-2",
286
+ children: [/* @__PURE__ */ P(v, {
287
+ variant: "outline",
288
+ onClick: C,
289
+ children: [/* @__PURE__ */ N(y, { size: 16 }), " Back"]
290
+ }), /* @__PURE__ */ P(v, { children: [/* @__PURE__ */ N(w, { size: 16 }), " Edit"] })]
291
+ }),
292
+ headerContent: /* @__PURE__ */ P("div", {
293
+ className: "flex gap-2",
294
+ children: [/* @__PURE__ */ N(m, {
295
+ variant: r.isActive ? "default" : "secondary",
296
+ children: r.isActive ? "Active" : "Inactive"
297
+ }), /* @__PURE__ */ N(m, {
298
+ variant: "outline",
299
+ className: "capitalize",
300
+ children: r.type.replace("_", " ")
301
+ })]
302
+ }),
303
+ children: [
304
+ /* @__PURE__ */ N(L, {
305
+ icon: /* @__PURE__ */ N(E, { size: 18 }),
306
+ 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."
307
+ }),
308
+ /* @__PURE__ */ N(I, {
309
+ storageKey: "movethewheels-warehouse-details",
310
+ steps: [{
311
+ id: "inventory",
312
+ label: "Review stock here",
313
+ description: "See which products are stored at this site.",
314
+ icon: /* @__PURE__ */ N(b, { size: 16 }),
315
+ onClick: () => O("inventory/products")
316
+ }, {
317
+ id: "fulfil",
318
+ label: "Fulfil an order from this site",
319
+ description: "Pick a pending order to ship out of this warehouse.",
320
+ icon: /* @__PURE__ */ N(S, { size: 16 }),
321
+ onClick: () => O("orders")
322
+ }]
323
+ }),
324
+ /* @__PURE__ */ P("div", {
325
+ className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
326
+ children: [/* @__PURE__ */ P("div", {
327
+ className: "lg:col-span-2 space-y-6",
328
+ children: [
329
+ /* @__PURE__ */ P(F, { children: [/* @__PURE__ */ P("h2", {
330
+ className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
331
+ children: [/* @__PURE__ */ N(b, { size: 18 }), " Capacity"]
332
+ }), /* @__PURE__ */ P("div", {
333
+ className: "space-y-4",
334
+ children: [/* @__PURE__ */ P("div", { children: [
335
+ /* @__PURE__ */ P("div", {
336
+ className: "flex justify-between text-sm mb-2",
337
+ children: [/* @__PURE__ */ N("span", { children: "Space Utilization" }), /* @__PURE__ */ P("span", { children: [A.toFixed(0), "%"] })]
338
+ }),
339
+ /* @__PURE__ */ N(i, { value: A }),
340
+ /* @__PURE__ */ P("p", {
341
+ className: "text-sm text-text-secondary mt-1",
342
+ children: [
343
+ r.capacity.usedSpace.toLocaleString(),
344
+ " /",
345
+ " ",
346
+ r.capacity.totalSpace.toLocaleString(),
347
+ " sq ft"
348
+ ]
349
+ })
350
+ ] }), /* @__PURE__ */ N("div", {
351
+ className: "grid grid-cols-2 gap-4",
352
+ children: /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
353
+ className: "text-sm text-text-secondary",
354
+ children: "Pallets Used"
355
+ }), /* @__PURE__ */ P("p", {
356
+ className: "text-2xl font-bold",
357
+ children: [r.capacity.usedPallets, /* @__PURE__ */ P("span", {
358
+ className: "text-sm font-normal text-text-secondary",
359
+ children: [
360
+ " ",
361
+ "/ ",
362
+ r.capacity.totalPallets
363
+ ]
364
+ })]
365
+ })] })
366
+ })]
367
+ })] }),
368
+ /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, { children: [
369
+ "Zones (",
370
+ r.zones.length,
371
+ ")"
372
+ ] }) }), /* @__PURE__ */ N(l, { children: /* @__PURE__ */ N("div", {
373
+ className: "space-y-3",
374
+ children: r.zones.map((e) => /* @__PURE__ */ P("div", {
375
+ className: "flex items-center justify-between p-3 border rounded-lg",
376
+ children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
377
+ className: "font-medium",
378
+ children: e.name
379
+ }), /* @__PURE__ */ P("p", {
380
+ className: "text-sm text-text-secondary capitalize",
381
+ children: [
382
+ e.type,
383
+ " - ",
384
+ e.location
385
+ ]
386
+ })] }), /* @__PURE__ */ P("div", {
387
+ className: "text-right",
388
+ children: [/* @__PURE__ */ N(i, {
389
+ value: e.currentOccupancy / e.capacity * 100,
390
+ className: "w-24 h-2"
391
+ }), /* @__PURE__ */ P("p", {
392
+ className: "text-sm text-text-secondary",
393
+ children: [
394
+ e.currentOccupancy,
395
+ " / ",
396
+ e.capacity
397
+ ]
398
+ })]
399
+ })]
400
+ }, e.id))
401
+ }) })] }),
402
+ /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
403
+ className: "flex items-center gap-2",
404
+ children: [/* @__PURE__ */ N(x, { size: 18 }), " Operating Hours"]
405
+ }) }), /* @__PURE__ */ N(l, { children: /* @__PURE__ */ N("div", {
406
+ className: "grid grid-cols-2 md:grid-cols-4 gap-4",
407
+ children: Object.entries(r.operatingHours).map(([e, t]) => /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
408
+ className: "text-sm font-medium",
409
+ children: e
410
+ }), /* @__PURE__ */ N("p", {
411
+ className: "text-sm text-text-secondary",
412
+ children: t ? `${t.open} - ${t.close}` : "Closed"
413
+ })] }, e))
414
+ }) })] })
415
+ ]
416
+ }), /* @__PURE__ */ P("div", {
417
+ className: "space-y-6",
418
+ children: [
419
+ /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
420
+ className: "flex items-center gap-2",
421
+ children: [/* @__PURE__ */ N(S, { size: 18 }), " Location"]
422
+ }) }), /* @__PURE__ */ N(l, { children: /* @__PURE__ */ N("p", {
423
+ className: "text-sm",
424
+ children: k(r.address)
425
+ }) })] }),
426
+ /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ N(u, { children: "Metrics" }) }), /* @__PURE__ */ P(l, {
427
+ className: "space-y-3",
428
+ children: [
429
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
430
+ className: "text-sm text-text-secondary",
431
+ children: "Throughput"
432
+ }), /* @__PURE__ */ P("p", {
433
+ className: "text-2xl font-bold",
434
+ children: [r.metrics.throughput, /* @__PURE__ */ N("span", {
435
+ className: "text-sm font-normal",
436
+ children: " orders/day"
437
+ })]
438
+ })] }),
439
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
440
+ className: "text-sm text-text-secondary",
441
+ children: "Accuracy"
442
+ }), /* @__PURE__ */ P("p", {
443
+ className: "text-2xl font-bold",
444
+ children: [r.metrics.accuracy, "%"]
445
+ })] }),
446
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
447
+ className: "text-sm text-text-secondary",
448
+ children: "Productivity"
449
+ }), /* @__PURE__ */ P("p", {
450
+ className: "text-2xl font-bold",
451
+ children: [r.metrics.productivity, "%"]
452
+ })] }),
453
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
454
+ className: "text-sm text-text-secondary",
455
+ children: "Orders Fulfilled"
456
+ }), /* @__PURE__ */ N("p", {
457
+ className: "text-2xl font-bold",
458
+ children: r.metrics.ordersFulfilled.toLocaleString()
459
+ })] })
460
+ ]
461
+ })] }),
462
+ /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
463
+ className: "flex items-center gap-2",
464
+ children: [
465
+ /* @__PURE__ */ N(T, { size: 18 }),
466
+ " Staff (",
467
+ r.staff.length,
468
+ ")"
469
+ ]
470
+ }) }), /* @__PURE__ */ N(l, { children: r.staff.length > 0 ? /* @__PURE__ */ N("div", {
471
+ className: "space-y-2",
472
+ children: r.staff.map((e, t) => /* @__PURE__ */ P("div", {
473
+ className: "flex items-center justify-between p-2 border rounded",
474
+ children: [/* @__PURE__ */ N("span", {
475
+ className: "text-sm capitalize",
476
+ children: e.role
477
+ }), /* @__PURE__ */ N(m, {
478
+ variant: "outline",
479
+ children: e.shift
480
+ })]
481
+ }, t))
482
+ }) : /* @__PURE__ */ N("p", {
483
+ className: "text-text-secondary",
484
+ children: "No staff assigned"
485
+ }) })] })
486
+ ]
487
+ })]
488
+ })
489
+ ]
490
+ });
491
+ }
492
+ //#endregion
493
+ export { B as default };
@@ -1,35 +1,33 @@
1
- import { M as e, i as t, l as n } from "./PageLayout-D3N8MCTm.js";
2
- import { t as r } from "./DataTable-CD9ZhpLB.js";
3
- import { t as i } from "./plus-Dl1rLeJR.js";
4
- import { t as a } from "./refresh-cw-CWfERAit.js";
5
- import { t as o } from "./warehouse-D3WWDeTX.js";
6
- import { r as s } from "./graphqlClient-CdJyR_ed.js";
7
- import { o as c } from "./useInventory-Dwn18FPz.js";
8
- import { t as l } from "./navigation-BgnOfsVd.js";
1
+ import { M as e, ct as t, i as n, l as r, ot as i } from "./PageLayout-D4LDHJJq.js";
2
+ import { t as a } from "./DataTable-DmciIKKM.js";
3
+ import { t as o } from "./plus-Z76q-FZm.js";
4
+ import { t as s } from "./refresh-cw-DKt6f5T6.js";
5
+ import { t as c } from "./warehouse-6m5kXMLu.js";
6
+ import { o as l } from "./useInventory-DkyiVY_A.js";
9
7
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
10
8
  import { CTAOverflowMenu as f, EmphasisPanel as p, PagePurpose as m } from "@burdenoff/fe-libs/ui";
11
9
  //#region src/movethewheels/pages/WarehousesPage.tsx
12
10
  function h() {
13
- let { basePath: h, navigate: g } = s(), { warehouses: _, totalWarehouses: v, isLoading: y, refetch: b } = c(), x = (e) => g?.(l(h, e));
14
- return /* @__PURE__ */ d(t, {
11
+ let { basePath: h, navigate: g } = i(), { warehouses: _, totalWarehouses: v, isLoading: y, refetch: b } = l(), x = (e) => g?.(t(h, e));
12
+ return /* @__PURE__ */ d(n, {
15
13
  title: "Warehouses",
16
14
  subtitle: `${v} warehouses`,
17
- icon: /* @__PURE__ */ u(o, { size: 24 }),
15
+ icon: /* @__PURE__ */ u(c, { size: 24 }),
18
16
  headerActions: /* @__PURE__ */ u(f, {
19
17
  primary: {
20
18
  label: "Add Warehouse",
21
- icon: /* @__PURE__ */ u(i, { size: 16 }),
22
- onSelect: () => {}
19
+ icon: /* @__PURE__ */ u(o, { size: 16 }),
20
+ onSelect: () => x("inventory/warehouses/new")
23
21
  },
24
22
  actions: [{
25
23
  label: "Refresh",
26
- icon: /* @__PURE__ */ u(a, { size: 16 }),
24
+ icon: /* @__PURE__ */ u(s, { size: 16 }),
27
25
  onSelect: () => b()
28
26
  }]
29
27
  }),
30
28
  children: [
31
29
  /* @__PURE__ */ u(m, {
32
- icon: /* @__PURE__ */ u(o, { size: 18 }),
30
+ icon: /* @__PURE__ */ u(c, { size: 18 }),
33
31
  children: "Your storage and fulfilment sites. Watch space and pallet utilization across each warehouse to balance stock, spot capacity crunches, and decide where to fulfil an order from."
34
32
  }),
35
33
  /* @__PURE__ */ d(p, { children: [/* @__PURE__ */ u("p", {
@@ -61,7 +59,7 @@ function h() {
61
59
  })] })
62
60
  ]
63
61
  })] }),
64
- /* @__PURE__ */ u(r, {
62
+ /* @__PURE__ */ u(a, {
65
63
  columns: [
66
64
  {
67
65
  id: "name",
@@ -92,7 +90,7 @@ function h() {
92
90
  id: "type",
93
91
  header: "Type",
94
92
  accessorKey: "type",
95
- cell: (e) => /* @__PURE__ */ u(n, {
93
+ cell: (e) => /* @__PURE__ */ u(r, {
96
94
  variant: "outline",
97
95
  className: "capitalize",
98
96
  children: e.type.replace("_", " ")
@@ -140,7 +138,7 @@ function h() {
140
138
  {
141
139
  id: "status",
142
140
  header: "Status",
143
- cell: (e) => /* @__PURE__ */ u(n, {
141
+ cell: (e) => /* @__PURE__ */ u(r, {
144
142
  variant: e.isActive ? "default" : "secondary",
145
143
  children: e.isActive ? "Active" : "Inactive"
146
144
  })
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/arrow-left.js
3
3
  var t = e("ArrowLeft", [["path", {
4
4
  d: "m12 19-7-7 7-7",
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/box.js
3
3
  var t = e("Box", [
4
4
  ["path", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/chart-column.js
3
3
  var t = e("ChartColumn", [
4
4
  ["path", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/chevron-right.js
3
3
  var t = e("ChevronRight", [["path", {
4
4
  d: "m9 18 6-6-6-6",
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/circle-alert.js
3
3
  var t = e("CircleAlert", [
4
4
  ["circle", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/circle-check-big.js
3
3
  var t = e("CircleCheckBig", [["path", {
4
4
  d: "M21.801 10A10 10 0 1 1 17 3.335",
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/clock.js
3
3
  var t = e("Clock", [["circle", {
4
4
  cx: "12",
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/dollar-sign.js
3
3
  var t = e("DollarSign", [["line", {
4
4
  x1: "12",
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/download.js
3
3
  var t = e("Download", [
4
4
  ["path", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/file-text.js
3
3
  var t = e("FileText", [
4
4
  ["path", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/filter.js
3
3
  var t = e("Filter", [["polygon", {
4
4
  points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",