@burdenoff/microfe-movethewheels 2026.1031.3 → 2026.1031.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/MoveTheWheelsRoot.js +136 -127
  2. package/dist/MoveTheWheelsRoutes.js +140 -135
  3. package/dist/components/DocumentsCard.js +11 -11
  4. package/dist/components/ProofOfDeliveryCard.js +13 -13
  5. package/dist/components/ShipmentRiskDialog.js +24 -24
  6. package/dist/components/ShippingQuoteResults.js +46 -46
  7. package/dist/components/TrackingAlertList.js +17 -17
  8. package/dist/generated/tracking-quality-operations.d.ts +56 -0
  9. package/dist/hooks/useOrderDispatch.js +17 -17
  10. package/dist/movethewheels/pages/SettingsPage.d.ts +1 -0
  11. package/dist/movethewheels/providers/ModuleSettingsProvider.d.ts +17 -0
  12. package/dist/movethewheels/utils/formatters.d.ts +23 -3
  13. package/dist/movethewheels/utils/moduleSettings.d.ts +52 -0
  14. package/dist/node_modules/lucide-react/dist/esm/icons/bell.js +11 -0
  15. package/dist/node_modules/lucide-react/dist/esm/icons/key-round.js +14 -0
  16. package/dist/node_modules/lucide-react/dist/esm/icons/plug.js +22 -0
  17. package/dist/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js +11 -0
  18. package/dist/node_modules/lucide-react/dist/esm/icons/settings.js +13 -0
  19. package/dist/pages/AnalyticsPage.js +27 -27
  20. package/dist/pages/CreateOrderPage.js +340 -317
  21. package/dist/pages/CustomerDetailsPage.js +246 -246
  22. package/dist/pages/CustomersPage.js +19 -19
  23. package/dist/pages/DashboardPage.js +24 -24
  24. package/dist/pages/DeliveryCapturePage.js +74 -74
  25. package/dist/pages/DriverDetailsPage.js +337 -337
  26. package/dist/pages/DriversPage.js +26 -26
  27. package/dist/pages/FinancePage.js +26 -26
  28. package/dist/pages/InventoryPage.js +28 -28
  29. package/dist/pages/LiveTrackingPage.js +108 -108
  30. package/dist/pages/MarketplacePage.js +44 -44
  31. package/dist/pages/OrderDetailsPage.js +306 -306
  32. package/dist/pages/OrdersListPage.js +27 -27
  33. package/dist/pages/ProductDetailsPage.js +89 -89
  34. package/dist/pages/ProductsPage.js +73 -73
  35. package/dist/pages/RouteDetailsPage.js +282 -285
  36. package/dist/pages/RoutesPage.js +78 -78
  37. package/dist/pages/SettingsPage.js +459 -0
  38. package/dist/pages/TrackingPage.js +41 -41
  39. package/dist/pages/VehicleDetailsPage.js +207 -207
  40. package/dist/pages/VehiclesPage.js +17 -16
  41. package/dist/pages/WarehouseDetailsPage.js +132 -132
  42. package/dist/providers/ModuleSettingsProvider.js +74 -0
  43. package/dist/utils/formatters.js +53 -26
  44. package/dist/utils/moduleSettings.js +132 -0
  45. package/package.json +3 -2
  46. package/src/generated/tracking-quality-operations.ts +62 -0
  47. package/src/movethewheels/MoveTheWheelsRoot.tsx +14 -3
  48. package/src/movethewheels/MoveTheWheelsRoutes.tsx +9 -0
  49. package/src/movethewheels/pages/CreateOrderPage.tsx +38 -6
  50. package/src/movethewheels/pages/ProductsPage.tsx +2 -2
  51. package/src/movethewheels/pages/RouteDetailsPage.tsx +3 -6
  52. package/src/movethewheels/pages/RoutesPage.tsx +2 -2
  53. package/src/movethewheels/pages/SettingsPage.tsx +516 -0
  54. package/src/movethewheels/pages/VehicleDetailsPage.tsx +4 -2
  55. package/src/movethewheels/pages/VehiclesPage.tsx +2 -1
  56. package/src/movethewheels/providers/ModuleSettingsProvider.tsx +133 -0
  57. package/src/movethewheels/utils/formatters.ts +69 -10
  58. package/src/movethewheels/utils/moduleSettings.ts +224 -0
@@ -8,17 +8,17 @@ import { Trash2 as o } from "../node_modules/lucide-react/dist/esm/icons/trash-2
8
8
  import { Warehouse as s } from "../node_modules/lucide-react/dist/esm/icons/warehouse.js";
9
9
  import { joinPath as c } from "../utils/navigation.js";
10
10
  import { useMoveTheWheels as l } from "../providers/MoveTheWheelsProvider.js";
11
- import { useInventory as u, useWarehouse as d } from "../hooks/useInventory.js";
12
- import { Badge as f, Button as p, Card as m, CardContent as h, CardHeader as g, CardTitle as _, Input as v, Label as y, Progress as b, Select as x, SelectContent as S, SelectItem as C, SelectTrigger as w, SelectValue as T } from "../components/ui.js";
13
- import { ErrorState as E, LoadingState as D, PageLayout as O } from "../components/PageLayout.js";
14
- import { FormError as k } from "../components/FormError.js";
15
- import { formatAddress as A } from "../utils/formatters.js";
11
+ import { formatAddress as u } from "../utils/formatters.js";
12
+ import { useInventory as d, useWarehouse as f } from "../hooks/useInventory.js";
13
+ import { Badge as p, Button as m, Card as h, CardContent as g, CardHeader as _, CardTitle as v, Input as y, Label as b, Progress as x, Select as S, SelectContent as C, SelectItem as w, SelectTrigger as T, SelectValue as E } from "../components/ui.js";
14
+ import { ErrorState as D, LoadingState as O, PageLayout as k } from "../components/PageLayout.js";
15
+ import { FormError as A } from "../components/FormError.js";
16
16
  import { useEffect as j, useState as M } from "react";
17
17
  import { useLocation as N, useParams as P } from "react-router";
18
18
  import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
19
- import { EmphasisPanel as R, NextSteps as z, PagePurpose as B, ResponsiveDialog as V, ResponsiveDialogContent as H, ResponsiveDialogDescription as U, ResponsiveDialogFooter as ee, ResponsiveDialogHeader as te, ResponsiveDialogTitle as ne } from "@burdenoff/fe-libs/ui";
19
+ import { EmphasisPanel as R, NextSteps as z, PagePurpose as B, ResponsiveDialog as ee, ResponsiveDialogContent as te, ResponsiveDialogDescription as ne, ResponsiveDialogFooter as V, ResponsiveDialogHeader as re, ResponsiveDialogTitle as ie } from "@burdenoff/fe-libs/ui";
20
20
  //#region src/movethewheels/pages/WarehouseDetailsPage.tsx
21
- var re = [
21
+ var ae = [
22
22
  {
23
23
  value: "DISTRIBUTION",
24
24
  label: "Distribution"
@@ -39,15 +39,15 @@ var re = [
39
39
  value: "RETAIL",
40
40
  label: "Retail"
41
41
  }
42
- ], ie = [{
42
+ ], oe = [{
43
43
  value: "ACTIVE",
44
44
  label: "Active"
45
45
  }, {
46
46
  value: "INACTIVE",
47
47
  label: "Inactive"
48
48
  }];
49
- function W({ editId: t, onSaved: n }) {
50
- let { basePath: a, navigate: f } = l(), { createWarehouse: b, updateWarehouse: E, deleteWarehouse: D } = u(), { warehouse: A } = d(t), N = !!t, [P, F] = M({
49
+ function H({ editId: t, onSaved: n }) {
50
+ let { basePath: a, navigate: u } = l(), { createWarehouse: p, updateWarehouse: x, deleteWarehouse: D } = d(), { warehouse: O } = f(t), N = !!t, [P, F] = M({
51
51
  code: "",
52
52
  name: "",
53
53
  type: "DISTRIBUTION",
@@ -61,37 +61,37 @@ function W({ editId: t, onSaved: n }) {
61
61
  usedCapacity: "",
62
62
  contactEmail: "",
63
63
  contactPhone: ""
64
- }), [z, W] = M(!1), [G, K] = M(null), [ae, q] = M(!1), [J, Y] = M(!1), [oe, X] = M(null);
64
+ }), [z, H] = M(!1), [U, W] = M(null), [G, K] = M(!1), [q, J] = M(!1), [Y, X] = M(null);
65
65
  j(() => {
66
- !t || !A || F({
67
- code: A.code || "",
68
- name: A.name || "",
69
- type: A.type ? A.type.toUpperCase() : "DISTRIBUTION",
70
- status: A.status ?? "",
71
- street: A.address.street ?? "",
72
- city: A.address.city ?? "",
73
- state: A.address.state ?? "",
74
- postalCode: A.address.postalCode ?? "",
75
- country: A.address.country ?? "",
76
- totalCapacity: A.capacity.totalSpace === void 0 ? "" : String(A.capacity.totalSpace),
77
- usedCapacity: A.capacity.usedSpace === void 0 ? "" : String(A.capacity.usedSpace),
78
- contactEmail: A.contactInfo?.email || "",
79
- contactPhone: A.contactInfo?.phone || ""
66
+ !t || !O || F({
67
+ code: O.code || "",
68
+ name: O.name || "",
69
+ type: O.type ? O.type.toUpperCase() : "DISTRIBUTION",
70
+ status: O.status ?? "",
71
+ street: O.address.street ?? "",
72
+ city: O.address.city ?? "",
73
+ state: O.address.state ?? "",
74
+ postalCode: O.address.postalCode ?? "",
75
+ country: O.address.country ?? "",
76
+ totalCapacity: O.capacity.totalSpace === void 0 ? "" : String(O.capacity.totalSpace),
77
+ usedCapacity: O.capacity.usedSpace === void 0 ? "" : String(O.capacity.usedSpace),
78
+ contactEmail: O.contactInfo?.email || "",
79
+ contactPhone: O.contactInfo?.phone || ""
80
80
  });
81
- }, [t, A]);
82
- let Z = () => f?.(c(a, "inventory/warehouses")), Q = (e, t) => F((n) => ({
81
+ }, [t, O]);
82
+ let Z = () => u?.(c(a, "inventory/warehouses")), Q = (e, t) => F((n) => ({
83
83
  ...n,
84
84
  [e]: t
85
85
  })), $ = async (e) => {
86
86
  if (e.preventDefault(), !P.code.trim() || !P.name.trim()) {
87
- K("Warehouse code and name are required.");
87
+ W("Warehouse code and name are required.");
88
88
  return;
89
89
  }
90
90
  if (!P.street.trim() || !P.city.trim()) {
91
- K("A street and city are required for the warehouse address.");
91
+ W("A street and city are required for the warehouse address.");
92
92
  return;
93
93
  }
94
- W(!0), K(null);
94
+ H(!0), W(null);
95
95
  try {
96
96
  let e = P.totalCapacity.trim() ? Number(P.totalCapacity) : void 0, r = P.usedCapacity.trim() ? Number(P.usedCapacity) : void 0, i = Object.fromEntries(Object.entries({
97
97
  street: P.street.trim(),
@@ -112,27 +112,27 @@ function W({ editId: t, onSaved: n }) {
112
112
  totalCapacity: e !== void 0 && !Number.isNaN(e) ? e : void 0,
113
113
  usedCapacity: r !== void 0 && !Number.isNaN(r) ? r : void 0
114
114
  };
115
- if (t) await E(t, o), await n?.(), f?.(c(a, `inventory/warehouses/${t}`));
115
+ if (t) await x(t, o), await n?.(), u?.(c(a, `inventory/warehouses/${t}`));
116
116
  else {
117
- let e = await b(o);
118
- f?.(c(a, `inventory/warehouses/${e.id}`));
117
+ let e = await p(o);
118
+ u?.(c(a, `inventory/warehouses/${e.id}`));
119
119
  }
120
120
  } catch (e) {
121
- console.error("Failed to create warehouse:", e), K(e instanceof Error ? e.message : "Failed to create warehouse. Please try again."), W(!1);
121
+ console.error("Failed to create warehouse:", e), W(e instanceof Error ? e.message : "Failed to create warehouse. Please try again."), H(!1);
122
122
  }
123
123
  };
124
- return /* @__PURE__ */ L(O, {
124
+ return /* @__PURE__ */ L(k, {
125
125
  title: N ? "Edit Warehouse" : "Add Warehouse",
126
126
  subtitle: "Register a storage and fulfilment site",
127
127
  icon: /* @__PURE__ */ I(s, { size: 24 }),
128
128
  headerActions: /* @__PURE__ */ L("div", {
129
129
  className: "flex gap-2",
130
- children: [/* @__PURE__ */ L(p, {
130
+ children: [/* @__PURE__ */ L(m, {
131
131
  variant: "outline",
132
132
  onClick: Z,
133
133
  disabled: z,
134
134
  children: [/* @__PURE__ */ I(e, { size: 16 }), " Cancel"]
135
- }), /* @__PURE__ */ L(p, {
135
+ }), /* @__PURE__ */ L(m, {
136
136
  onClick: $,
137
137
  disabled: z,
138
138
  children: [
@@ -151,7 +151,7 @@ function W({ editId: t, onSaved: n }) {
151
151
  onSubmit: $,
152
152
  className: "max-w-2xl space-y-6",
153
153
  children: [
154
- /* @__PURE__ */ I(k, { message: G }),
154
+ /* @__PURE__ */ I(A, { message: U }),
155
155
  /* @__PURE__ */ L(R, { children: [/* @__PURE__ */ I("h2", {
156
156
  className: "text-base font-semibold text-text-primary mb-4",
157
157
  children: "Warehouse Details"
@@ -163,13 +163,13 @@ function W({ editId: t, onSaved: n }) {
163
163
  children: [
164
164
  /* @__PURE__ */ L("div", {
165
165
  className: "space-y-2",
166
- children: [/* @__PURE__ */ L(y, {
166
+ children: [/* @__PURE__ */ L(b, {
167
167
  htmlFor: "code",
168
168
  children: ["Code ", /* @__PURE__ */ I("span", {
169
169
  className: "text-status-error-text",
170
170
  children: "*"
171
171
  })]
172
- }), /* @__PURE__ */ I(v, {
172
+ }), /* @__PURE__ */ I(y, {
173
173
  id: "code",
174
174
  value: P.code,
175
175
  onChange: (e) => Q("code", e.target.value),
@@ -179,13 +179,13 @@ function W({ editId: t, onSaved: n }) {
179
179
  }),
180
180
  /* @__PURE__ */ L("div", {
181
181
  className: "space-y-2",
182
- children: [/* @__PURE__ */ L(y, {
182
+ children: [/* @__PURE__ */ L(b, {
183
183
  htmlFor: "name",
184
184
  children: ["Name ", /* @__PURE__ */ I("span", {
185
185
  className: "text-status-error-text",
186
186
  children: "*"
187
187
  })]
188
- }), /* @__PURE__ */ I(v, {
188
+ }), /* @__PURE__ */ I(y, {
189
189
  id: "name",
190
190
  value: P.name,
191
191
  onChange: (e) => Q("name", e.target.value),
@@ -195,19 +195,19 @@ function W({ editId: t, onSaved: n }) {
195
195
  }),
196
196
  /* @__PURE__ */ L("div", {
197
197
  className: "space-y-2",
198
- children: [/* @__PURE__ */ L(y, {
198
+ children: [/* @__PURE__ */ L(b, {
199
199
  htmlFor: "type",
200
200
  children: ["Type ", /* @__PURE__ */ I("span", {
201
201
  className: "text-status-error-text",
202
202
  children: "*"
203
203
  })]
204
- }), /* @__PURE__ */ L(x, {
204
+ }), /* @__PURE__ */ L(S, {
205
205
  value: P.type,
206
206
  onValueChange: (e) => Q("type", e),
207
- children: [/* @__PURE__ */ I(w, {
207
+ children: [/* @__PURE__ */ I(T, {
208
208
  id: "type",
209
- children: /* @__PURE__ */ I(T, {})
210
- }), /* @__PURE__ */ I(S, { children: re.map((e) => /* @__PURE__ */ I(C, {
209
+ children: /* @__PURE__ */ I(E, {})
210
+ }), /* @__PURE__ */ I(C, { children: ae.map((e) => /* @__PURE__ */ I(w, {
211
211
  value: e.value,
212
212
  children: e.label
213
213
  }, e.value)) })]
@@ -220,16 +220,16 @@ function W({ editId: t, onSaved: n }) {
220
220
  children: [
221
221
  /* @__PURE__ */ L("div", {
222
222
  className: "space-y-2",
223
- children: [/* @__PURE__ */ I(y, {
223
+ children: [/* @__PURE__ */ I(b, {
224
224
  htmlFor: "status",
225
225
  children: "Status"
226
- }), /* @__PURE__ */ L(x, {
226
+ }), /* @__PURE__ */ L(S, {
227
227
  value: P.status,
228
228
  onValueChange: (e) => Q("status", e),
229
- children: [/* @__PURE__ */ I(w, {
229
+ children: [/* @__PURE__ */ I(T, {
230
230
  id: "status",
231
- children: /* @__PURE__ */ I(T, {})
232
- }), /* @__PURE__ */ I(S, { children: ie.map((e) => /* @__PURE__ */ I(C, {
231
+ children: /* @__PURE__ */ I(E, {})
232
+ }), /* @__PURE__ */ I(C, { children: oe.map((e) => /* @__PURE__ */ I(w, {
233
233
  value: e.value,
234
234
  children: e.label
235
235
  }, e.value)) })]
@@ -237,10 +237,10 @@ function W({ editId: t, onSaved: n }) {
237
237
  }),
238
238
  /* @__PURE__ */ L("div", {
239
239
  className: "space-y-2",
240
- children: [/* @__PURE__ */ I(y, {
240
+ children: [/* @__PURE__ */ I(b, {
241
241
  htmlFor: "totalCapacity",
242
242
  children: "Total Capacity (sq ft)"
243
- }), /* @__PURE__ */ I(v, {
243
+ }), /* @__PURE__ */ I(y, {
244
244
  id: "totalCapacity",
245
245
  type: "number",
246
246
  min: "0",
@@ -251,10 +251,10 @@ function W({ editId: t, onSaved: n }) {
251
251
  }),
252
252
  /* @__PURE__ */ L("div", {
253
253
  className: "space-y-2",
254
- children: [/* @__PURE__ */ I(y, {
254
+ children: [/* @__PURE__ */ I(b, {
255
255
  htmlFor: "usedCapacity",
256
256
  children: "Used Capacity (sq ft)"
257
- }), /* @__PURE__ */ I(v, {
257
+ }), /* @__PURE__ */ I(y, {
258
258
  id: "usedCapacity",
259
259
  type: "number",
260
260
  min: "0",
@@ -269,10 +269,10 @@ function W({ editId: t, onSaved: n }) {
269
269
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
270
270
  children: [/* @__PURE__ */ L("div", {
271
271
  className: "space-y-2",
272
- children: [/* @__PURE__ */ I(y, {
272
+ children: [/* @__PURE__ */ I(b, {
273
273
  htmlFor: "contactEmail",
274
274
  children: "Contact Email"
275
- }), /* @__PURE__ */ I(v, {
275
+ }), /* @__PURE__ */ I(y, {
276
276
  id: "contactEmail",
277
277
  type: "email",
278
278
  value: P.contactEmail,
@@ -281,10 +281,10 @@ function W({ editId: t, onSaved: n }) {
281
281
  })]
282
282
  }), /* @__PURE__ */ L("div", {
283
283
  className: "space-y-2",
284
- children: [/* @__PURE__ */ I(y, {
284
+ children: [/* @__PURE__ */ I(b, {
285
285
  htmlFor: "contactPhone",
286
286
  children: "Contact Phone"
287
- }), /* @__PURE__ */ I(v, {
287
+ }), /* @__PURE__ */ I(y, {
288
288
  id: "contactPhone",
289
289
  value: P.contactPhone,
290
290
  onChange: (e) => Q("contactPhone", e.target.value),
@@ -294,7 +294,7 @@ function W({ editId: t, onSaved: n }) {
294
294
  })
295
295
  ]
296
296
  })] }),
297
- /* @__PURE__ */ L(m, { children: [/* @__PURE__ */ I(g, { children: /* @__PURE__ */ L(_, {
297
+ /* @__PURE__ */ L(h, { children: [/* @__PURE__ */ I(_, { children: /* @__PURE__ */ L(v, {
298
298
  className: "flex items-center gap-2",
299
299
  children: [
300
300
  /* @__PURE__ */ I(r, { size: 18 }),
@@ -304,15 +304,15 @@ function W({ editId: t, onSaved: n }) {
304
304
  children: "*"
305
305
  })
306
306
  ]
307
- }) }), /* @__PURE__ */ L(h, {
307
+ }) }), /* @__PURE__ */ L(g, {
308
308
  className: "space-y-4",
309
309
  children: [
310
310
  /* @__PURE__ */ L("div", {
311
311
  className: "space-y-2",
312
- children: [/* @__PURE__ */ I(y, {
312
+ children: [/* @__PURE__ */ I(b, {
313
313
  htmlFor: "street",
314
314
  children: "Street"
315
- }), /* @__PURE__ */ I(v, {
315
+ }), /* @__PURE__ */ I(y, {
316
316
  id: "street",
317
317
  value: P.street,
318
318
  onChange: (e) => Q("street", e.target.value),
@@ -323,10 +323,10 @@ function W({ editId: t, onSaved: n }) {
323
323
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
324
324
  children: [/* @__PURE__ */ L("div", {
325
325
  className: "space-y-2",
326
- children: [/* @__PURE__ */ I(y, {
326
+ children: [/* @__PURE__ */ I(b, {
327
327
  htmlFor: "city",
328
328
  children: "City"
329
- }), /* @__PURE__ */ I(v, {
329
+ }), /* @__PURE__ */ I(y, {
330
330
  id: "city",
331
331
  value: P.city,
332
332
  onChange: (e) => Q("city", e.target.value),
@@ -334,10 +334,10 @@ function W({ editId: t, onSaved: n }) {
334
334
  })]
335
335
  }), /* @__PURE__ */ L("div", {
336
336
  className: "space-y-2",
337
- children: [/* @__PURE__ */ I(y, {
337
+ children: [/* @__PURE__ */ I(b, {
338
338
  htmlFor: "state",
339
339
  children: "State"
340
- }), /* @__PURE__ */ I(v, {
340
+ }), /* @__PURE__ */ I(y, {
341
341
  id: "state",
342
342
  value: P.state,
343
343
  onChange: (e) => Q("state", e.target.value),
@@ -349,10 +349,10 @@ function W({ editId: t, onSaved: n }) {
349
349
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
350
350
  children: [/* @__PURE__ */ L("div", {
351
351
  className: "space-y-2",
352
- children: [/* @__PURE__ */ I(y, {
352
+ children: [/* @__PURE__ */ I(b, {
353
353
  htmlFor: "postalCode",
354
354
  children: "ZIP / Postal Code"
355
- }), /* @__PURE__ */ I(v, {
355
+ }), /* @__PURE__ */ I(y, {
356
356
  id: "postalCode",
357
357
  value: P.postalCode,
358
358
  onChange: (e) => Q("postalCode", e.target.value),
@@ -360,10 +360,10 @@ function W({ editId: t, onSaved: n }) {
360
360
  })]
361
361
  }), /* @__PURE__ */ L("div", {
362
362
  className: "space-y-2",
363
- children: [/* @__PURE__ */ I(y, {
363
+ children: [/* @__PURE__ */ I(b, {
364
364
  htmlFor: "country",
365
365
  children: "Country"
366
- }), /* @__PURE__ */ I(v, {
366
+ }), /* @__PURE__ */ I(y, {
367
367
  id: "country",
368
368
  value: P.country,
369
369
  onChange: (e) => Q("country", e.target.value),
@@ -373,99 +373,99 @@ function W({ editId: t, onSaved: n }) {
373
373
  })
374
374
  ]
375
375
  })] }),
376
- N && /* @__PURE__ */ L(m, {
376
+ N && /* @__PURE__ */ L(h, {
377
377
  className: "border-status-error-border",
378
- children: [/* @__PURE__ */ I(g, { children: /* @__PURE__ */ L(_, {
378
+ children: [/* @__PURE__ */ I(_, { children: /* @__PURE__ */ L(v, {
379
379
  className: "flex items-center gap-2 text-status-error-text",
380
380
  children: [/* @__PURE__ */ I(o, { size: 18 }), " Delete Warehouse"]
381
- }) }), /* @__PURE__ */ L(h, { children: [/* @__PURE__ */ I("p", {
381
+ }) }), /* @__PURE__ */ L(g, { children: [/* @__PURE__ */ I("p", {
382
382
  className: "mb-3 text-sm text-text-secondary",
383
383
  children: "Removes this warehouse from your network. This cannot be undone from here."
384
- }), /* @__PURE__ */ L(p, {
384
+ }), /* @__PURE__ */ L(m, {
385
385
  type: "button",
386
386
  variant: "outline",
387
387
  className: "border-status-error-border text-status-error-text hover:bg-status-error-bg-subtle",
388
- onClick: () => q(!0),
388
+ onClick: () => K(!0),
389
389
  children: [/* @__PURE__ */ I(o, { size: 16 }), " Delete this warehouse"]
390
390
  })] })]
391
391
  })
392
392
  ]
393
393
  }),
394
- /* @__PURE__ */ I(V, {
395
- open: ae,
396
- onOpenChange: q,
397
- children: /* @__PURE__ */ L(H, { children: [
398
- /* @__PURE__ */ L(te, { children: [/* @__PURE__ */ I(ne, { children: "Delete this warehouse?" }), /* @__PURE__ */ L(U, { children: [
394
+ /* @__PURE__ */ I(ee, {
395
+ open: G,
396
+ onOpenChange: K,
397
+ children: /* @__PURE__ */ L(te, { children: [
398
+ /* @__PURE__ */ L(re, { children: [/* @__PURE__ */ I(ie, { children: "Delete this warehouse?" }), /* @__PURE__ */ L(ne, { children: [
399
399
  "This removes ",
400
400
  P.name || "this warehouse",
401
401
  " and cannot be undone from here."
402
402
  ] })] }),
403
403
  /* @__PURE__ */ I("div", {
404
404
  className: "px-1",
405
- children: /* @__PURE__ */ I(k, { message: oe })
405
+ children: /* @__PURE__ */ I(A, { message: Y })
406
406
  }),
407
- /* @__PURE__ */ L(ee, { children: [/* @__PURE__ */ I(p, {
407
+ /* @__PURE__ */ L(V, { children: [/* @__PURE__ */ I(m, {
408
408
  variant: "outline",
409
- onClick: () => q(!1),
410
- disabled: J,
409
+ onClick: () => K(!1),
410
+ disabled: q,
411
411
  children: "Cancel"
412
- }), /* @__PURE__ */ I(p, {
412
+ }), /* @__PURE__ */ I(m, {
413
413
  className: "bg-status-error-text text-text-inverse hover:opacity-90",
414
414
  onClick: async () => {
415
415
  if (t) {
416
- Y(!0), X(null);
416
+ J(!0), X(null);
417
417
  try {
418
- await D(t), q(!1), Z();
418
+ await D(t), K(!1), Z();
419
419
  } catch (e) {
420
- X(e instanceof Error ? e.message : "Failed to delete warehouse."), Y(!1);
420
+ X(e instanceof Error ? e.message : "Failed to delete warehouse."), J(!1);
421
421
  }
422
422
  }
423
423
  },
424
- disabled: J,
425
- children: J ? "Deleting..." : "Delete warehouse"
424
+ disabled: q,
425
+ children: q ? "Deleting..." : "Delete warehouse"
426
426
  })] })
427
427
  ] })
428
428
  })
429
429
  ]
430
430
  });
431
431
  }
432
- function G() {
433
- let { warehouseId: i } = P(), { basePath: o, navigate: u } = l(), v = N().pathname.endsWith("/edit"), { warehouse: y, isLoading: x, error: S, refetch: C, reload: w } = d(i), T = () => u?.(c(o, "inventory/warehouses")), k = (e) => u?.(c(o, e));
434
- if (!i) return /* @__PURE__ */ I(W, {});
435
- if (v) return /* @__PURE__ */ I(W, {
432
+ function U() {
433
+ let { warehouseId: i } = P(), { basePath: o, navigate: d } = l(), y = N().pathname.endsWith("/edit"), { warehouse: b, isLoading: S, error: C, refetch: w, reload: T } = f(i), E = () => d?.(c(o, "inventory/warehouses")), A = (e) => d?.(c(o, e));
434
+ if (!i) return /* @__PURE__ */ I(H, {});
435
+ if (y) return /* @__PURE__ */ I(H, {
436
436
  editId: i,
437
- onSaved: w
437
+ onSaved: T
438
438
  });
439
- if (x) return /* @__PURE__ */ I(D, { message: "Loading warehouse details..." });
440
- if (S || !y) return /* @__PURE__ */ I(E, {
439
+ if (S) return /* @__PURE__ */ I(O, { message: "Loading warehouse details..." });
440
+ if (C || !b) return /* @__PURE__ */ I(D, {
441
441
  title: "Warehouse not found",
442
- onRetry: C
442
+ onRetry: w
443
443
  });
444
- let j = y.status?.toUpperCase() === "ACTIVE";
445
- return /* @__PURE__ */ L(O, {
446
- title: y.name,
447
- subtitle: `Code: ${y.code}`,
444
+ let j = b.status?.toUpperCase() === "ACTIVE";
445
+ return /* @__PURE__ */ L(k, {
446
+ title: b.name,
447
+ subtitle: `Code: ${b.code}`,
448
448
  icon: /* @__PURE__ */ I(s, { size: 24 }),
449
449
  headerActions: /* @__PURE__ */ L("div", {
450
450
  className: "flex gap-2",
451
- children: [/* @__PURE__ */ L(p, {
451
+ children: [/* @__PURE__ */ L(m, {
452
452
  variant: "outline",
453
- onClick: T,
453
+ onClick: E,
454
454
  children: [/* @__PURE__ */ I(e, { size: 16 }), " Back"]
455
- }), /* @__PURE__ */ L(p, {
456
- onClick: () => u?.(c(o, `inventory/warehouses/${i}/edit`)),
455
+ }), /* @__PURE__ */ L(m, {
456
+ onClick: () => d?.(c(o, `inventory/warehouses/${i}/edit`)),
457
457
  children: [/* @__PURE__ */ I(a, { size: 16 }), " Edit"]
458
458
  })]
459
459
  }),
460
460
  headerContent: /* @__PURE__ */ L("div", {
461
461
  className: "flex gap-2",
462
- children: [/* @__PURE__ */ I(f, {
463
- variant: y.status ? j ? "default" : "secondary" : "outline",
464
- children: y.status ? j ? "Active" : "Inactive" : "Not provided"
465
- }), /* @__PURE__ */ I(f, {
462
+ children: [/* @__PURE__ */ I(p, {
463
+ variant: b.status ? j ? "default" : "secondary" : "outline",
464
+ children: b.status ? j ? "Active" : "Inactive" : "Not provided"
465
+ }), /* @__PURE__ */ I(p, {
466
466
  variant: "outline",
467
467
  className: "capitalize",
468
- children: y.type.replace("_", " ")
468
+ children: b.type.replace("_", " ")
469
469
  })]
470
470
  }),
471
471
  children: [
@@ -480,13 +480,13 @@ function G() {
480
480
  label: "Review stock here",
481
481
  description: "See which products are stored at this site.",
482
482
  icon: /* @__PURE__ */ I(t, { size: 16 }),
483
- onClick: () => k("inventory/products")
483
+ onClick: () => A("inventory/products")
484
484
  }, {
485
485
  id: "fulfil",
486
486
  label: "Fulfil an order from this site",
487
487
  description: "Pick a pending order to ship out of this warehouse.",
488
488
  icon: /* @__PURE__ */ I(r, { size: 16 }),
489
- onClick: () => k("orders")
489
+ onClick: () => A("orders")
490
490
  }]
491
491
  }),
492
492
  /* @__PURE__ */ L("div", {
@@ -496,31 +496,31 @@ function G() {
496
496
  children: [/* @__PURE__ */ L(R, { children: [/* @__PURE__ */ L("h2", {
497
497
  className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
498
498
  children: [/* @__PURE__ */ I(t, { size: 18 }), " Capacity"]
499
- }), /* @__PURE__ */ I("div", { children: y.utilization !== void 0 && y.capacity.usedSpace !== void 0 && y.capacity.totalSpace !== void 0 ? /* @__PURE__ */ L(F, { children: [
499
+ }), /* @__PURE__ */ I("div", { children: b.utilization !== void 0 && b.capacity.usedSpace !== void 0 && b.capacity.totalSpace !== void 0 ? /* @__PURE__ */ L(F, { children: [
500
500
  /* @__PURE__ */ L("div", {
501
501
  className: "flex justify-between text-sm mb-2",
502
- children: [/* @__PURE__ */ I("span", { children: "Space Utilization" }), /* @__PURE__ */ L("span", { children: [y.utilization.toFixed(0), "%"] })]
502
+ children: [/* @__PURE__ */ I("span", { children: "Space Utilization" }), /* @__PURE__ */ L("span", { children: [b.utilization.toFixed(0), "%"] })]
503
503
  }),
504
- /* @__PURE__ */ I(b, { value: y.utilization }),
504
+ /* @__PURE__ */ I(x, { value: b.utilization }),
505
505
  /* @__PURE__ */ L("p", {
506
506
  className: "text-sm text-text-secondary mt-1",
507
507
  children: [
508
- y.capacity.usedSpace.toLocaleString(),
508
+ b.capacity.usedSpace.toLocaleString(),
509
509
  " /",
510
510
  " ",
511
- y.capacity.totalSpace.toLocaleString(),
511
+ b.capacity.totalSpace.toLocaleString(),
512
512
  " sq ft"
513
513
  ]
514
514
  })
515
515
  ] }) : /* @__PURE__ */ I("p", {
516
516
  className: "text-sm text-text-secondary",
517
517
  children: "Not provided"
518
- }) })] }), /* @__PURE__ */ L(m, { children: [/* @__PURE__ */ I(g, { children: /* @__PURE__ */ L(_, {
518
+ }) })] }), /* @__PURE__ */ L(h, { children: [/* @__PURE__ */ I(_, { children: /* @__PURE__ */ L(v, {
519
519
  className: "flex items-center gap-2",
520
520
  children: [/* @__PURE__ */ I(n, { size: 18 }), " Operating Hours"]
521
- }) }), /* @__PURE__ */ I(h, { children: Object.keys(y.operatingHours).length > 0 ? /* @__PURE__ */ I("div", {
521
+ }) }), /* @__PURE__ */ I(g, { children: Object.keys(b.operatingHours).length > 0 ? /* @__PURE__ */ I("div", {
522
522
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
523
- children: Object.entries(y.operatingHours).map(([e, t]) => /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
523
+ children: Object.entries(b.operatingHours).map(([e, t]) => /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
524
524
  className: "text-sm font-medium",
525
525
  children: e
526
526
  }), /* @__PURE__ */ I("p", {
@@ -533,26 +533,26 @@ function G() {
533
533
  }) })] })]
534
534
  }), /* @__PURE__ */ L("div", {
535
535
  className: "space-y-6",
536
- children: [/* @__PURE__ */ L(m, { children: [/* @__PURE__ */ I(g, { children: /* @__PURE__ */ L(_, {
536
+ children: [/* @__PURE__ */ L(h, { children: [/* @__PURE__ */ I(_, { children: /* @__PURE__ */ L(v, {
537
537
  className: "flex items-center gap-2",
538
538
  children: [/* @__PURE__ */ I(r, { size: 18 }), " Location"]
539
- }) }), /* @__PURE__ */ I(h, { children: /* @__PURE__ */ I("p", {
539
+ }) }), /* @__PURE__ */ I(g, { children: /* @__PURE__ */ I("p", {
540
540
  className: "text-sm",
541
- children: A(y.address) || "—"
542
- }) })] }), (y.contactInfo?.email || y.contactInfo?.phone) && /* @__PURE__ */ L(m, { children: [/* @__PURE__ */ I(g, { children: /* @__PURE__ */ I(_, { children: "Contact" }) }), /* @__PURE__ */ L(h, {
541
+ children: u(b.address) || "—"
542
+ }) })] }), (b.contactInfo?.email || b.contactInfo?.phone) && /* @__PURE__ */ L(h, { children: [/* @__PURE__ */ I(_, { children: /* @__PURE__ */ I(v, { children: "Contact" }) }), /* @__PURE__ */ L(g, {
543
543
  className: "space-y-3",
544
- children: [y.contactInfo?.email && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
544
+ children: [b.contactInfo?.email && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
545
545
  className: "text-sm text-text-secondary",
546
546
  children: "Email"
547
547
  }), /* @__PURE__ */ I("p", {
548
548
  className: "font-medium",
549
- children: y.contactInfo.email
550
- })] }), y.contactInfo?.phone && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
549
+ children: b.contactInfo.email
550
+ })] }), b.contactInfo?.phone && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
551
551
  className: "text-sm text-text-secondary",
552
552
  children: "Phone"
553
553
  }), /* @__PURE__ */ I("p", {
554
554
  className: "font-medium",
555
- children: y.contactInfo.phone
555
+ children: b.contactInfo.phone
556
556
  })] })]
557
557
  })] })]
558
558
  })]
@@ -561,4 +561,4 @@ function G() {
561
561
  });
562
562
  }
563
563
  //#endregion
564
- export { G as default };
564
+ export { U as default };