@burdenoff/microfe-movethewheels 2026.703.1 → 2026.703.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/{AIAssistantPage-C3ovZ0Fh.js → AIAssistantPage-C3cPsWt-.js} +1 -1
  2. package/dist/{AnalyticsPage-O8SpY-V4.js → AnalyticsPage-Dz6g2MvK.js} +6 -6
  3. package/dist/{CreateOrderPage-CB1_-_mN.js → CreateOrderPage-C5iwnjp4.js} +29 -58
  4. package/dist/CustomerDetailsPage-B6nwFyLO.js +406 -0
  5. package/dist/{CustomersPage-DRaLuHMC.js → CustomersPage-BKxMS1AV.js} +5 -5
  6. package/dist/{DashboardPage-DPjhNfKB.js → DashboardPage-BVjQi0EB.js} +11 -11
  7. package/dist/DriverDetailsPage-CN3WQ0B9.js +507 -0
  8. package/dist/{DriversPage-C2Bk0w4Q.js → DriversPage-CH9rjQC-.js} +6 -6
  9. package/dist/{FinancePage-lmp0Sdsw.js → FinancePage-DEDykSOP.js} +5 -5
  10. package/dist/{FleetPage-DZn5pIqd.js → FleetPage-DqkFi3s3.js} +5 -5
  11. package/dist/FormError-BlOjnXOq.js +15 -0
  12. package/dist/{ImportExportPage-BIUJZc7O.js → ImportExportPage-DKJRCezl.js} +1 -1
  13. package/dist/{InventoryPage-Cxh1zYJd.js → InventoryPage-e0ze63iX.js} +6 -6
  14. package/dist/{LiveTrackingPage-BY1yAkIt.js → LiveTrackingPage-DCX-K-LR.js} +5 -5
  15. package/dist/{MarketplacePage-RMuL17EA.js → MarketplacePage-CIQ97_zp.js} +1 -1
  16. package/dist/{OrderDetailsPage-C2Mf4KSy.js → OrderDetailsPage-DYiZ-9UK.js} +5 -5
  17. package/dist/{OrdersListPage-BrPBtnhp.js → OrdersListPage-Cn90P1Xx.js} +4 -4
  18. package/dist/ProductDetailsPage-C9uOiYLp.js +350 -0
  19. package/dist/{ProductsPage-I5DilIoY.js → ProductsPage-QJfHHpqB.js} +4 -4
  20. package/dist/{ReportsPage-BDXNmUng.js → ReportsPage-Zp53q3_8.js} +2 -2
  21. package/dist/RouteDetailsPage-DUStXSf9.js +531 -0
  22. package/dist/{RoutesPage-lqX9ylHP.js → RoutesPage-DMfoicM1.js} +3 -3
  23. package/dist/{SettingsPage-CQVIOaNs.js → SettingsPage-Bn-v0mbQ.js} +1 -1
  24. package/dist/{TrackingPage-BXrjz7V8.js → TrackingPage-W-jtdM3Y.js} +4 -4
  25. package/dist/VehicleDetailsPage-Bceo5oz3.js +410 -0
  26. package/dist/{VehiclesPage-6W39XT5W.js → VehiclesPage-ApKThYeG.js} +5 -5
  27. package/dist/WarehouseDetailsPage-L_6sWigM.js +493 -0
  28. package/dist/{WarehousesPage-CHvBqNaQ.js → WarehousesPage-DCbXXXWE.js} +3 -3
  29. package/dist/index.js +154 -138
  30. package/dist/trash-2-BKhar6Hs.js +32 -0
  31. package/dist/{useFleet-DiAC-IiH.js → useFleet-DKqXZ16m.js} +77 -56
  32. package/dist/{useInventory-DKoks37x.js → useInventory-DkyiVY_A.js} +73 -53
  33. package/dist/{useTracking-GJify4HN.js → useTracking-B-va1kO3.js} +2 -2
  34. package/package.json +1 -1
  35. package/src/movethewheels/MoveTheWheelsRoutes.tsx +4 -0
  36. package/src/movethewheels/components/FormError.tsx +25 -0
  37. package/src/movethewheels/hooks/useFleet.ts +107 -0
  38. package/src/movethewheels/hooks/useInventory.ts +107 -0
  39. package/src/movethewheels/pages/CustomerDetailsPage.tsx +153 -20
  40. package/src/movethewheels/pages/CustomersPage.tsx +1 -1
  41. package/src/movethewheels/pages/DriverDetailsPage.tsx +159 -2
  42. package/src/movethewheels/pages/DriversPage.tsx +6 -2
  43. package/src/movethewheels/pages/InventoryPage.tsx +1 -1
  44. package/src/movethewheels/pages/OrdersListPage.tsx +1 -1
  45. package/src/movethewheels/pages/ProductDetailsPage.tsx +146 -3
  46. package/src/movethewheels/pages/ProductsPage.tsx +6 -2
  47. package/src/movethewheels/pages/RouteDetailsPage.tsx +285 -25
  48. package/src/movethewheels/pages/VehicleDetailsPage.tsx +158 -2
  49. package/src/movethewheels/pages/VehiclesPage.tsx +6 -2
  50. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +224 -2
  51. package/src/movethewheels/pages/WarehousesPage.tsx +5 -1
  52. package/dist/CustomerDetailsPage-BaeKEI1D.js +0 -263
  53. package/dist/DriverDetailsPage-CSSQTOzn.js +0 -328
  54. package/dist/ProductDetailsPage-CezzzZcj.js +0 -193
  55. package/dist/RouteDetailsPage-BcomL20M.js +0 -263
  56. package/dist/VehicleDetailsPage-DZjLcJgr.js +0 -218
  57. package/dist/WarehouseDetailsPage-C10pgRGW.js +0 -236
  58. /package/dist/{MetricCard-7aYgzZHK.js → MetricCard-BY0QrMD4.js} +0 -0
  59. /package/dist/{StatusBadge-NpTeHVlw.js → StatusBadge-BZurYHMy.js} +0 -0
  60. /package/dist/{formatters-DhKZ-eA1.js → formatters-CF2S2l1m.js} +0 -0
  61. /package/dist/{trending-up-B7W-GL6P.js → trending-up-Dohgd4t_.js} +0 -0
  62. /package/dist/{triangle-alert-BonHFFNz.js → triangle-alert-i-XQL9Rd.js} +0 -0
  63. /package/dist/{truck-DrlfSpRC.js → truck-C0v_hbLR.js} +0 -0
  64. /package/dist/{useAnalytics-CgdzUfY_.js → useAnalytics-DS8n0xgg.js} +0 -0
  65. /package/dist/{useCustomers-QrlozybF.js → useCustomers-BmTNGxiI.js} +0 -0
  66. /package/dist/{useImportExport-BLMnAKCC.js → useImportExport-DHr-SWSw.js} +0 -0
  67. /package/dist/{useOrders-D3UZVy8Y.js → useOrders-Cfk1GLiq.js} +0 -0
  68. /package/dist/{useReports-Puq4DCH9.js → useReports-CTqZr-AB.js} +0 -0
  69. /package/dist/{useRoutes-Do57LvRb.js → useRoutes-BQWO607N.js} +0 -0
  70. /package/dist/{user-CjSoudeu.js → user-jyFU3lXk.js} +0 -0
  71. /package/dist/{users-BAM4gHTn.js → users-DZ-ilS6B.js} +0 -0
  72. /package/dist/{warehouse-C7MSr47B.js → warehouse-6m5kXMLu.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { A as e, N as t, d as n, f as r, g as i, h as a, i as o, l as s, lt as c, u as l } from "./PageLayout-D4LDHJJq.js";
2
2
  import { n as u, r as d, t as f } from "./useAssistant-D4v3oxD3.js";
3
3
  import { t as p } from "./circle-alert-iY24lSlp.js";
4
- import { t as m } from "./trending-up-B7W-GL6P.js";
4
+ import { t as m } from "./trending-up-Dohgd4t_.js";
5
5
  import { useState as h } from "react";
6
6
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
7
7
  import { GlassCard as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
@@ -2,12 +2,12 @@ import { M as e, d as t, f as n, g as r, h as i, i as a, u as o } from "./PageLa
2
2
  import { t as s } from "./chart-column-BFIJysDR.js";
3
3
  import { t as c } from "./dollar-sign-CgKQRz_e.js";
4
4
  import { t as l } from "./package-BChUzpJS.js";
5
- import { t as u } from "./trending-up-B7W-GL6P.js";
6
- import { t as d } from "./truck-DrlfSpRC.js";
7
- import { t as f } from "./users-BAM4gHTn.js";
8
- import { i as p, r as m, t as h } from "./useAnalytics-CgdzUfY_.js";
9
- import { n as g, r as _, t as v } from "./MetricCard-7aYgzZHK.js";
10
- import { n as y } from "./formatters-DhKZ-eA1.js";
5
+ import { t as u } from "./trending-up-Dohgd4t_.js";
6
+ import { t as d } from "./truck-C0v_hbLR.js";
7
+ import { t as f } from "./users-DZ-ilS6B.js";
8
+ import { i as p, r as m, t as h } from "./useAnalytics-DS8n0xgg.js";
9
+ import { n as g, r as _, t as v } from "./MetricCard-BY0QrMD4.js";
10
+ import { n as y } from "./formatters-CF2S2l1m.js";
11
11
  import { jsx as b, jsxs as x } from "react/jsx-runtime";
12
12
  import { EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
13
13
  //#region src/movethewheels/pages/AnalyticsPage.tsx
@@ -1,49 +1,20 @@
1
- import { A as e, F as t, I as n, L as r, P as i, Q 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, lt as m, ot as h, t as g, u as _, z as v } from "./PageLayout-D4LDHJJq.js";
2
- import { t as y } from "./arrow-left-n48Y-Wis.js";
3
- import { t as b } from "./map-pin-BGiCvyCs.js";
4
- import { t as x } from "./package-BChUzpJS.js";
5
- import { t as S } from "./plus-Z76q-FZm.js";
6
- import { t as C } from "./save-CojywNhG.js";
7
- import { t as w } from "./users-BAM4gHTn.js";
8
- import { r as T, t as E } from "./useOrders-D3UZVy8Y.js";
9
- import { r as D } from "./useCustomers-QrlozybF.js";
1
+ import { A as e, F as t, I as n, L as r, P as i, Q 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, ot as m, t as h, u as g, z as _ } from "./PageLayout-D4LDHJJq.js";
2
+ import { t as v } from "./arrow-left-n48Y-Wis.js";
3
+ import { t as y } from "./map-pin-BGiCvyCs.js";
4
+ import { t as b } from "./package-BChUzpJS.js";
5
+ import { t as x } from "./plus-Z76q-FZm.js";
6
+ import { t as S } from "./save-CojywNhG.js";
7
+ import { t as C } from "./trash-2-BKhar6Hs.js";
8
+ import { t as w } from "./users-DZ-ilS6B.js";
9
+ import { r as T, t as E } from "./useOrders-Cfk1GLiq.js";
10
+ import { r as D } from "./useCustomers-BmTNGxiI.js";
10
11
  import { useState as O } from "react";
11
12
  import { useParams as k } from "react-router-dom";
12
13
  import { jsx as A, jsxs as j } from "react/jsx-runtime";
13
14
  import { EmphasisPanel as M, NextSteps as N, PagePurpose as P } from "@burdenoff/fe-libs/ui";
14
- //#region node_modules/lucide-react/dist/esm/icons/trash-2.js
15
- var F = m("Trash2", [
16
- ["path", {
17
- d: "M3 6h18",
18
- key: "d0wm0j"
19
- }],
20
- ["path", {
21
- d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",
22
- key: "4alrt4"
23
- }],
24
- ["path", {
25
- d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",
26
- key: "v07s0e"
27
- }],
28
- ["line", {
29
- x1: "10",
30
- x2: "10",
31
- y1: "11",
32
- y2: "17",
33
- key: "1uufr5"
34
- }],
35
- ["line", {
36
- x1: "14",
37
- x2: "14",
38
- y1: "11",
39
- y2: "17",
40
- key: "xtxkd"
41
- }]
42
- ]);
43
- //#endregion
44
15
  //#region src/movethewheels/pages/CreateOrderPage.tsx
45
- function I() {
46
- let { orderId: m } = k(), { basePath: I, navigate: L } = h(), { order: R } = E(m), { createOrder: z } = T(), { customers: B } = D({ limit: 100 }), V = !!m && !!R, [H, U] = O({
16
+ function F() {
17
+ let { orderId: F } = k(), { basePath: I, navigate: L } = m(), { order: R } = E(F), { createOrder: z } = T(), { customers: B } = D({ limit: 100 }), V = !!F && !!R, [H, U] = O({
47
18
  customerId: R?.customerId || "",
48
19
  orderType: R?.orderType || "b2c",
49
20
  priority: R?.priority || "normal",
@@ -142,22 +113,22 @@ function I() {
142
113
  return /* @__PURE__ */ j(f, {
143
114
  title: V ? "Edit Order" : "Create Order",
144
115
  subtitle: V ? `Editing ${R?.orderNumber}` : "Create a new delivery order",
145
- icon: /* @__PURE__ */ A(x, { size: 24 }),
116
+ icon: /* @__PURE__ */ A(b, { size: 24 }),
146
117
  headerActions: /* @__PURE__ */ j("div", {
147
118
  className: "flex gap-2",
148
- children: [/* @__PURE__ */ j(_, {
119
+ children: [/* @__PURE__ */ j(g, {
149
120
  variant: "outline",
150
121
  onClick: K,
151
- children: [/* @__PURE__ */ A(y, { size: 16 }), "Cancel"]
152
- }), /* @__PURE__ */ j(_, {
122
+ children: [/* @__PURE__ */ A(v, { size: 16 }), "Cancel"]
123
+ }), /* @__PURE__ */ j(g, {
153
124
  onClick: q,
154
125
  disabled: W,
155
- children: [/* @__PURE__ */ A(C, { size: 16 }), W ? "Saving..." : V ? "Save Changes" : "Create Order"]
126
+ children: [/* @__PURE__ */ A(S, { size: 16 }), W ? "Saving..." : V ? "Save Changes" : "Create Order"]
156
127
  })]
157
128
  }),
158
129
  children: [
159
130
  /* @__PURE__ */ A(P, {
160
- icon: /* @__PURE__ */ A(x, { size: 18 }),
131
+ icon: /* @__PURE__ */ A(b, { size: 18 }),
161
132
  children: V ? "Update this delivery before it goes out — change the customer, addresses, items or handling notes, then save." : "Book a new delivery in a few steps: choose who it’s for, set pickup and drop-off addresses, list what’s being shipped, and add any handling notes. Once created it joins the orders pipeline ready to assign and track."
162
133
  }),
163
134
  /* @__PURE__ */ A(N, {
@@ -175,7 +146,7 @@ function I() {
175
146
  id: "addresses",
176
147
  label: "Set pickup & delivery addresses",
177
148
  description: "Where the shipment is collected and dropped off.",
178
- icon: /* @__PURE__ */ A(b, { size: 16 }),
149
+ icon: /* @__PURE__ */ A(y, { size: 16 }),
179
150
  done: !!H.pickupAddress.street && !!H.deliveryAddress.street,
180
151
  onClick: () => document.getElementById("pickupStreet")?.focus()
181
152
  },
@@ -183,7 +154,7 @@ function I() {
183
154
  id: "items",
184
155
  label: "Add the items to ship",
185
156
  description: "List each product with its quantity and value.",
186
- icon: /* @__PURE__ */ A(x, { size: 16 }),
157
+ icon: /* @__PURE__ */ A(b, { size: 16 }),
187
158
  done: H.items.length > 0,
188
159
  onClick: X
189
160
  }
@@ -419,29 +390,29 @@ function I() {
419
390
  }),
420
391
  /* @__PURE__ */ j(c, { children: [/* @__PURE__ */ j(d, {
421
392
  className: "flex flex-row items-center justify-between",
422
- children: [/* @__PURE__ */ A(u, { children: "Order Items" }), /* @__PURE__ */ j(_, {
393
+ children: [/* @__PURE__ */ A(u, { children: "Order Items" }), /* @__PURE__ */ j(g, {
423
394
  type: "button",
424
395
  variant: "outline",
425
396
  size: "sm",
426
397
  onClick: X,
427
- children: [/* @__PURE__ */ A(S, { size: 16 }), "Add Item"]
398
+ children: [/* @__PURE__ */ A(x, { size: 16 }), "Add Item"]
428
399
  })]
429
- }), /* @__PURE__ */ A(l, { children: H.items.length === 0 ? /* @__PURE__ */ A(g, {
400
+ }), /* @__PURE__ */ A(l, { children: H.items.length === 0 ? /* @__PURE__ */ A(h, {
430
401
  illustration: "empty-files",
431
402
  title: "No items added yet",
432
403
  description: "Add the products this order will ship — each with a name, SKU, quantity and value.",
433
- action: /* @__PURE__ */ j(_, {
404
+ action: /* @__PURE__ */ j(g, {
434
405
  type: "button",
435
406
  variant: "outline",
436
407
  onClick: X,
437
- children: [/* @__PURE__ */ A(S, {
408
+ children: [/* @__PURE__ */ A(x, {
438
409
  size: 16,
439
410
  className: "mr-1.5"
440
411
  }), "Add your first item"]
441
412
  })
442
413
  }) : /* @__PURE__ */ A("div", {
443
414
  className: "space-y-4",
444
- children: H.items.map((t, n) => /* @__PURE__ */ j("div", { children: [n > 0 && /* @__PURE__ */ A(v, { className: "my-4" }), /* @__PURE__ */ j("div", {
415
+ children: H.items.map((t, n) => /* @__PURE__ */ j("div", { children: [n > 0 && /* @__PURE__ */ A(_, { className: "my-4" }), /* @__PURE__ */ j("div", {
445
416
  className: "grid grid-cols-1 md:grid-cols-6 gap-4",
446
417
  children: [
447
418
  /* @__PURE__ */ j("div", {
@@ -481,13 +452,13 @@ function I() {
481
452
  }),
482
453
  /* @__PURE__ */ A("div", {
483
454
  className: "flex items-end",
484
- children: /* @__PURE__ */ A(_, {
455
+ children: /* @__PURE__ */ A(g, {
485
456
  type: "button",
486
457
  variant: "ghost",
487
458
  size: "icon",
488
459
  className: "text-status-error-text",
489
460
  onClick: () => Z(n),
490
- children: /* @__PURE__ */ A(F, { size: 16 })
461
+ children: /* @__PURE__ */ A(C, { size: 16 })
491
462
  })
492
463
  })
493
464
  ]
@@ -505,4 +476,4 @@ function I() {
505
476
  });
506
477
  }
507
478
  //#endregion
508
- export { I as default };
479
+ export { F as default };
@@ -0,0 +1,406 @@
1
+ import { A as e, F as t, I as n, L as r, P as i, R as a, ct as o, d as s, f as c, g as l, h as u, i as d, j as f, l as p, lt as m, n as h, ot as g, r as _, u as v } from "./PageLayout-D4LDHJJq.js";
2
+ import { t as y } from "./arrow-left-n48Y-Wis.js";
3
+ import { t as b } from "./file-text-DWWY6_f5.js";
4
+ import { n as x, t as S } from "./phone-Ac9s3mo_.js";
5
+ import { t as C } from "./map-pin-BGiCvyCs.js";
6
+ import { t as w } from "./save-CojywNhG.js";
7
+ import { t as T } from "./square-pen-CopE9GmB.js";
8
+ import { t as E } from "./star-nHlLjDKR.js";
9
+ import { t as D } from "./users-DZ-ilS6B.js";
10
+ import { r as O, t as k } from "./useCustomers-BmTNGxiI.js";
11
+ import { i as A } from "./StatusBadge-BZurYHMy.js";
12
+ import { r as j, t as M } from "./formatters-CF2S2l1m.js";
13
+ import { t as N } from "./FormError-BlOjnXOq.js";
14
+ import { useState as P } from "react";
15
+ import { useParams as F } from "react-router-dom";
16
+ import { jsx as I, jsxs as L } from "react/jsx-runtime";
17
+ import { EmphasisPanel as R, NextSteps as z, PagePurpose as B } from "@burdenoff/fe-libs/ui";
18
+ //#region node_modules/lucide-react/dist/esm/icons/building.js
19
+ var V = m("Building", [
20
+ ["rect", {
21
+ width: "16",
22
+ height: "20",
23
+ x: "4",
24
+ y: "2",
25
+ rx: "2",
26
+ ry: "2",
27
+ key: "76otgf"
28
+ }],
29
+ ["path", {
30
+ d: "M9 22v-4h6v4",
31
+ key: "r93iot"
32
+ }],
33
+ ["path", {
34
+ d: "M8 6h.01",
35
+ key: "1dz90k"
36
+ }],
37
+ ["path", {
38
+ d: "M16 6h.01",
39
+ key: "1x0f13"
40
+ }],
41
+ ["path", {
42
+ d: "M12 6h.01",
43
+ key: "1vi96p"
44
+ }],
45
+ ["path", {
46
+ d: "M12 10h.01",
47
+ key: "1nrarc"
48
+ }],
49
+ ["path", {
50
+ d: "M12 14h.01",
51
+ key: "1etili"
52
+ }],
53
+ ["path", {
54
+ d: "M16 10h.01",
55
+ key: "1m94wz"
56
+ }],
57
+ ["path", {
58
+ d: "M16 14h.01",
59
+ key: "1gbofw"
60
+ }],
61
+ ["path", {
62
+ d: "M8 10h.01",
63
+ key: "19clt8"
64
+ }],
65
+ ["path", {
66
+ d: "M8 14h.01",
67
+ key: "6423bh"
68
+ }]
69
+ ]);
70
+ //#endregion
71
+ //#region src/movethewheels/pages/CustomerDetailsPage.tsx
72
+ function H() {
73
+ let { basePath: s, navigate: c } = g(), { createCustomer: l } = O(), [u, p] = P({
74
+ name: "",
75
+ type: "b2c",
76
+ email: "",
77
+ phone: "",
78
+ company: ""
79
+ }), [m, h] = P(!1), [_, b] = P(null), x = () => c?.(o(s, "customers")), S = async (e) => {
80
+ if (e.preventDefault(), !u.name.trim()) {
81
+ b("Customer name is required.");
82
+ return;
83
+ }
84
+ h(!0), b(null);
85
+ try {
86
+ let e = await l({
87
+ name: u.name.trim(),
88
+ type: u.type,
89
+ email: u.email.trim() || void 0,
90
+ phone: u.phone.trim() || void 0,
91
+ company: u.company.trim() || void 0
92
+ });
93
+ c?.(o(s, `customers/${e.id}`));
94
+ } catch (e) {
95
+ console.error("Failed to create customer:", e), b(e instanceof Error ? e.message : "Failed to create customer. Please try again."), h(!1);
96
+ }
97
+ };
98
+ return /* @__PURE__ */ L(d, {
99
+ title: "New Customer",
100
+ subtitle: "Add a new customer to your account",
101
+ icon: /* @__PURE__ */ I(D, { size: 24 }),
102
+ headerActions: /* @__PURE__ */ L("div", {
103
+ className: "flex gap-2",
104
+ children: [/* @__PURE__ */ L(v, {
105
+ variant: "outline",
106
+ onClick: x,
107
+ disabled: m,
108
+ children: [/* @__PURE__ */ I(y, { size: 16 }), " Cancel"]
109
+ }), /* @__PURE__ */ L(v, {
110
+ onClick: S,
111
+ disabled: m,
112
+ children: [
113
+ /* @__PURE__ */ I(w, { size: 16 }),
114
+ " ",
115
+ m ? "Saving..." : "Create Customer"
116
+ ]
117
+ })]
118
+ }),
119
+ children: [/* @__PURE__ */ I(B, {
120
+ icon: /* @__PURE__ */ I(D, { size: 18 }),
121
+ children: "Add a customer once and their contact details auto-fill every future order you book for them. Only a name is required — add email, phone and company to make deliveries easier to arrange."
122
+ }), /* @__PURE__ */ L("form", {
123
+ onSubmit: S,
124
+ className: "max-w-2xl space-y-6",
125
+ children: [/* @__PURE__ */ I(N, { message: _ }), /* @__PURE__ */ L(R, { children: [/* @__PURE__ */ I("h2", {
126
+ className: "text-base font-semibold text-text-primary mb-4",
127
+ children: "Customer Details"
128
+ }), /* @__PURE__ */ L("div", {
129
+ className: "space-y-4",
130
+ children: [
131
+ /* @__PURE__ */ L("div", {
132
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4",
133
+ children: [/* @__PURE__ */ L("div", {
134
+ className: "space-y-2",
135
+ children: [/* @__PURE__ */ L(f, {
136
+ htmlFor: "name",
137
+ children: ["Name ", /* @__PURE__ */ I("span", {
138
+ className: "text-status-error-text",
139
+ children: "*"
140
+ })]
141
+ }), /* @__PURE__ */ I(e, {
142
+ id: "name",
143
+ value: u.name,
144
+ onChange: (e) => p((t) => ({
145
+ ...t,
146
+ name: e.target.value
147
+ })),
148
+ placeholder: "Acme Corp or Jane Doe",
149
+ required: !0
150
+ })]
151
+ }), /* @__PURE__ */ L("div", {
152
+ className: "space-y-2",
153
+ children: [/* @__PURE__ */ I(f, {
154
+ htmlFor: "type",
155
+ children: "Customer Type"
156
+ }), /* @__PURE__ */ L(i, {
157
+ value: u.type,
158
+ onValueChange: (e) => p((t) => ({
159
+ ...t,
160
+ type: e
161
+ })),
162
+ children: [/* @__PURE__ */ I(r, {
163
+ id: "type",
164
+ children: /* @__PURE__ */ I(a, {})
165
+ }), /* @__PURE__ */ L(t, { children: [/* @__PURE__ */ I(n, {
166
+ value: "b2c",
167
+ children: "B2C (Individual)"
168
+ }), /* @__PURE__ */ I(n, {
169
+ value: "b2b",
170
+ children: "B2B (Business)"
171
+ })] })]
172
+ })]
173
+ })]
174
+ }),
175
+ /* @__PURE__ */ L("div", {
176
+ className: "grid grid-cols-1 md:grid-cols-2 gap-4",
177
+ children: [/* @__PURE__ */ L("div", {
178
+ className: "space-y-2",
179
+ children: [/* @__PURE__ */ I(f, {
180
+ htmlFor: "email",
181
+ children: "Email"
182
+ }), /* @__PURE__ */ I(e, {
183
+ id: "email",
184
+ type: "email",
185
+ value: u.email,
186
+ onChange: (e) => p((t) => ({
187
+ ...t,
188
+ email: e.target.value
189
+ })),
190
+ placeholder: "customer@example.com"
191
+ })]
192
+ }), /* @__PURE__ */ L("div", {
193
+ className: "space-y-2",
194
+ children: [/* @__PURE__ */ I(f, {
195
+ htmlFor: "phone",
196
+ children: "Phone"
197
+ }), /* @__PURE__ */ I(e, {
198
+ id: "phone",
199
+ value: u.phone,
200
+ onChange: (e) => p((t) => ({
201
+ ...t,
202
+ phone: e.target.value
203
+ })),
204
+ placeholder: "+1-555-0100"
205
+ })]
206
+ })]
207
+ }),
208
+ /* @__PURE__ */ L("div", {
209
+ className: "space-y-2",
210
+ children: [/* @__PURE__ */ I(f, {
211
+ htmlFor: "company",
212
+ children: "Company"
213
+ }), /* @__PURE__ */ I(e, {
214
+ id: "company",
215
+ value: u.company,
216
+ onChange: (e) => p((t) => ({
217
+ ...t,
218
+ company: e.target.value
219
+ })),
220
+ placeholder: "Company name (for B2B accounts)"
221
+ })]
222
+ })
223
+ ]
224
+ })] })]
225
+ })]
226
+ });
227
+ }
228
+ function U() {
229
+ let { customerId: e } = F(), { basePath: t, navigate: n } = g(), { customer: r, isLoading: i, error: a, refetch: f } = k(e), m = () => n?.(o(t, "customers")), w = (e) => n?.(o(t, e));
230
+ return e ? i ? /* @__PURE__ */ I(_, { message: "Loading customer details..." }) : a || !r ? /* @__PURE__ */ I(h, {
231
+ title: "Customer not found",
232
+ onRetry: f
233
+ }) : /* @__PURE__ */ L(d, {
234
+ title: r.name,
235
+ subtitle: r.company || r.email,
236
+ icon: /* @__PURE__ */ I(D, { size: 24 }),
237
+ headerActions: /* @__PURE__ */ L("div", {
238
+ className: "flex gap-2",
239
+ children: [/* @__PURE__ */ L(v, {
240
+ variant: "outline",
241
+ onClick: m,
242
+ children: [/* @__PURE__ */ I(y, { size: 16 }), " Back"]
243
+ }), /* @__PURE__ */ L(v, { children: [/* @__PURE__ */ I(T, { size: 16 }), " Edit"] })]
244
+ }),
245
+ headerContent: /* @__PURE__ */ L("div", {
246
+ className: "flex items-center gap-4",
247
+ children: [
248
+ /* @__PURE__ */ I(A, { type: r.type }),
249
+ /* @__PURE__ */ I(p, {
250
+ variant: r.isActive ? "default" : "secondary",
251
+ children: r.isActive ? "Active" : "Inactive"
252
+ }),
253
+ /* @__PURE__ */ L("div", {
254
+ className: "flex items-center gap-1",
255
+ children: [/* @__PURE__ */ I(E, {
256
+ size: 16,
257
+ className: "text-status-warning-text fill-current"
258
+ }), /* @__PURE__ */ I("span", {
259
+ className: "font-medium",
260
+ children: r.rating.toFixed(1)
261
+ })]
262
+ })
263
+ ]
264
+ }),
265
+ children: [
266
+ /* @__PURE__ */ I(B, {
267
+ icon: /* @__PURE__ */ I(D, { size: 18 }),
268
+ children: "Everything you know about this customer — how to reach them, where they are, and their account standing. Use it to confirm contact details before a delivery, check their rating, or book their next order."
269
+ }),
270
+ /* @__PURE__ */ I(z, {
271
+ storageKey: "movethewheels-customer-details",
272
+ steps: [{
273
+ id: "new-order",
274
+ label: "Book a delivery for this customer",
275
+ description: "Start a new order pre-filled for this account.",
276
+ icon: /* @__PURE__ */ I(b, { size: 16 }),
277
+ onClick: () => w("orders/new")
278
+ }, {
279
+ id: "edit",
280
+ label: "Update contact details",
281
+ description: "Keep email, phone and address current.",
282
+ icon: /* @__PURE__ */ I(T, { size: 16 }),
283
+ onClick: () => {}
284
+ }]
285
+ }),
286
+ /* @__PURE__ */ L("div", {
287
+ className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
288
+ children: [/* @__PURE__ */ L("div", {
289
+ className: "lg:col-span-2 space-y-6",
290
+ children: [
291
+ /* @__PURE__ */ L(R, { children: [/* @__PURE__ */ I("h2", {
292
+ className: "text-base font-semibold text-text-primary mb-4",
293
+ children: "Contact Information"
294
+ }), /* @__PURE__ */ L("div", {
295
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6",
296
+ children: [/* @__PURE__ */ L("div", {
297
+ className: "space-y-4",
298
+ children: [/* @__PURE__ */ L("div", {
299
+ className: "flex items-center gap-3",
300
+ children: [/* @__PURE__ */ I(x, {
301
+ size: 18,
302
+ className: "text-text-secondary"
303
+ }), /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
304
+ className: "text-sm text-text-secondary",
305
+ children: "Email"
306
+ }), /* @__PURE__ */ I("p", {
307
+ className: "font-medium",
308
+ children: r.email
309
+ })] })]
310
+ }), /* @__PURE__ */ L("div", {
311
+ className: "flex items-center gap-3",
312
+ children: [/* @__PURE__ */ I(S, {
313
+ size: 18,
314
+ className: "text-text-secondary"
315
+ }), /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
316
+ className: "text-sm text-text-secondary",
317
+ children: "Phone"
318
+ }), /* @__PURE__ */ I("p", {
319
+ className: "font-medium",
320
+ children: r.phone
321
+ })] })]
322
+ })]
323
+ }), /* @__PURE__ */ L("div", {
324
+ className: "space-y-4",
325
+ children: [r.company && /* @__PURE__ */ L("div", {
326
+ className: "flex items-center gap-3",
327
+ children: [/* @__PURE__ */ I(V, {
328
+ size: 18,
329
+ className: "text-text-secondary"
330
+ }), /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
331
+ className: "text-sm text-text-secondary",
332
+ children: "Company"
333
+ }), /* @__PURE__ */ I("p", {
334
+ className: "font-medium",
335
+ children: r.company
336
+ })] })]
337
+ }), r.website && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
338
+ className: "text-sm text-text-secondary",
339
+ children: "Website"
340
+ }), /* @__PURE__ */ I("a", {
341
+ href: r.website,
342
+ className: "text-primary hover:underline",
343
+ children: r.website
344
+ })] })]
345
+ })]
346
+ })] }),
347
+ /* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ L(l, {
348
+ className: "flex items-center gap-2",
349
+ children: [/* @__PURE__ */ I(C, { size: 18 }), " Address"]
350
+ }) }), /* @__PURE__ */ I(c, { children: /* @__PURE__ */ I("p", { children: M(r.address) }) })] }),
351
+ r.notes && /* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ L(l, {
352
+ className: "flex items-center gap-2",
353
+ children: [/* @__PURE__ */ I(b, { size: 18 }), " Notes"]
354
+ }) }), /* @__PURE__ */ I(c, { children: /* @__PURE__ */ I("p", { children: r.notes }) })] })
355
+ ]
356
+ }), /* @__PURE__ */ L("div", {
357
+ className: "space-y-6",
358
+ children: [/* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ I(l, { children: "Business Details" }) }), /* @__PURE__ */ L(c, {
359
+ className: "space-y-3",
360
+ children: [
361
+ r.businessLicense && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
362
+ className: "text-sm text-text-secondary",
363
+ children: "Business License"
364
+ }), /* @__PURE__ */ I("p", {
365
+ className: "font-mono",
366
+ children: r.businessLicense
367
+ })] }),
368
+ r.taxId && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
369
+ className: "text-sm text-text-secondary",
370
+ children: "Tax ID"
371
+ }), /* @__PURE__ */ I("p", {
372
+ className: "font-mono",
373
+ children: r.taxId
374
+ })] }),
375
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
376
+ className: "text-sm text-text-secondary",
377
+ children: "Preferred Contact"
378
+ }), /* @__PURE__ */ I("p", {
379
+ className: "capitalize",
380
+ children: r.preferredContactMethod
381
+ })] }),
382
+ /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
383
+ className: "text-sm text-text-secondary",
384
+ children: "Marketing Opt-in"
385
+ }), /* @__PURE__ */ I(p, {
386
+ variant: r.marketingOptIn ? "default" : "secondary",
387
+ children: r.marketingOptIn ? "Yes" : "No"
388
+ })] })
389
+ ]
390
+ })] }), /* @__PURE__ */ L(s, { children: [/* @__PURE__ */ I(u, { children: /* @__PURE__ */ I(l, { children: "Account Info" }) }), /* @__PURE__ */ L(c, {
391
+ className: "space-y-3",
392
+ children: [/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
393
+ className: "text-sm text-text-secondary",
394
+ children: "Created"
395
+ }), /* @__PURE__ */ I("p", { children: j(r.createdAt, "full") })] }), /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
396
+ className: "text-sm text-text-secondary",
397
+ children: "Last Updated"
398
+ }), /* @__PURE__ */ I("p", { children: j(r.updatedAt, "relative") })] })]
399
+ })] })]
400
+ })]
401
+ })
402
+ ]
403
+ }) : /* @__PURE__ */ I(H, {});
404
+ }
405
+ //#endregion
406
+ export { U as default };
@@ -4,10 +4,10 @@ import { t as c } from "./download-DRXxoiQR.js";
4
4
  import { t as l } from "./plus-Z76q-FZm.js";
5
5
  import { t as u } from "./refresh-cw-DKt6f5T6.js";
6
6
  import { t as d } from "./star-nHlLjDKR.js";
7
- import { t as f } from "./users-BAM4gHTn.js";
8
- import { r as p } from "./useCustomers-QrlozybF.js";
9
- import { i as m } from "./StatusBadge-NpTeHVlw.js";
10
- import { r as h } from "./formatters-DhKZ-eA1.js";
7
+ import { t as f } from "./users-DZ-ilS6B.js";
8
+ import { r as p } from "./useCustomers-BmTNGxiI.js";
9
+ import { i as m } from "./StatusBadge-BZurYHMy.js";
10
+ import { r as h } from "./formatters-CF2S2l1m.js";
11
11
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
12
12
  import { CTAOverflowMenu as v, EmphasisPanel as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
13
13
  //#region src/movethewheels/pages/CustomersPage.tsx
@@ -30,7 +30,7 @@ function x() {
30
30
  }, {
31
31
  label: "Export",
32
32
  icon: /* @__PURE__ */ g(c, { size: 16 }),
33
- onSelect: () => {}
33
+ onSelect: () => D("import-export")
34
34
  }]
35
35
  }),
36
36
  children: [
@@ -4,17 +4,17 @@ import { t as f } from "./clock-DJZtdl8u.js";
4
4
  import { t as p } from "./dollar-sign-CgKQRz_e.js";
5
5
  import { t as m } from "./map-pin-BGiCvyCs.js";
6
6
  import { t as h } from "./package-BChUzpJS.js";
7
- import { t as g } from "./trending-up-B7W-GL6P.js";
8
- import { t as _ } from "./triangle-alert-BonHFFNz.js";
9
- import { t as v } from "./truck-DrlfSpRC.js";
10
- import { t as y } from "./users-BAM4gHTn.js";
11
- import { n as b, r as x } from "./useOrders-D3UZVy8Y.js";
12
- import { i as S } from "./useFleet-DiAC-IiH.js";
13
- import { n as C } from "./useAnalytics-CgdzUfY_.js";
14
- import { r as w } from "./useTracking-GJify4HN.js";
15
- import { r as T, t as E } from "./MetricCard-7aYgzZHK.js";
16
- import { r as D } from "./StatusBadge-NpTeHVlw.js";
17
- import { n as O, r as k } from "./formatters-DhKZ-eA1.js";
7
+ import { t as g } from "./trending-up-Dohgd4t_.js";
8
+ import { t as _ } from "./triangle-alert-i-XQL9Rd.js";
9
+ import { t as v } from "./truck-C0v_hbLR.js";
10
+ import { t as y } from "./users-DZ-ilS6B.js";
11
+ import { n as b, r as x } from "./useOrders-Cfk1GLiq.js";
12
+ import { i as S } from "./useFleet-DKqXZ16m.js";
13
+ import { n as C } from "./useAnalytics-DS8n0xgg.js";
14
+ import { r as w } from "./useTracking-B-va1kO3.js";
15
+ import { r as T, t as E } from "./MetricCard-BY0QrMD4.js";
16
+ import { r as D } from "./StatusBadge-BZurYHMy.js";
17
+ import { n as O, r as k } from "./formatters-CF2S2l1m.js";
18
18
  import { jsx as A, jsxs as j } from "react/jsx-runtime";
19
19
  import { CTAOverflowMenu as M, EmphasisPanel as N, PagePurpose as P } from "@burdenoff/fe-libs/ui";
20
20
  import { useI18n as F } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";