@burdenoff/microfe-movethewheels 2026.703.3 → 2026.703.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 (125) hide show
  1. package/dist/{AIAssistantPage-C3cPsWt-.js → AIAssistantPage-3YOnHO9Y.js} +3 -3
  2. package/dist/{AnalyticsPage-Dz6g2MvK.js → AnalyticsPage-CMpI1070.js} +11 -11
  3. package/dist/CreateOrderPage-DRAgGo9i.js +490 -0
  4. package/dist/CustomerDetailsPage-BCeMmOFe.js +615 -0
  5. package/dist/{CustomersPage-BKxMS1AV.js → CustomersPage-CaNBMXmM.js} +64 -53
  6. package/dist/{DashboardPage-BVjQi0EB.js → DashboardPage-DIKlXde3.js} +16 -16
  7. package/dist/DataTable-XvUcTjwi.js +340 -0
  8. package/dist/DocumentsCard-U2lSe-cn.js +169 -0
  9. package/dist/{DriverDetailsPage-CN3WQ0B9.js → DriverDetailsPage-BQrYd_Lp.js} +178 -195
  10. package/dist/{DriversPage-CH9rjQC-.js → DriversPage-PYmdFiby.js} +65 -54
  11. package/dist/FinancePage-Cwh9Bw4M.js +136 -0
  12. package/dist/{FleetPage-DqkFi3s3.js → FleetPage-3ZHsB-TN.js} +23 -22
  13. package/dist/{FormError-BlOjnXOq.js → FormError-cuLV2jVD.js} +1 -1
  14. package/dist/{ImportExportPage-DKJRCezl.js → ImportExportPage-C6f7DqhM.js} +50 -70
  15. package/dist/{InventoryPage-e0ze63iX.js → InventoryPage-DpiqVu1v.js} +8 -8
  16. package/dist/{LiveTrackingPage-DCX-K-LR.js → LiveTrackingPage-FAzzlVnX.js} +9 -9
  17. package/dist/MarketplacePage-Bh_2ns4v.js +426 -0
  18. package/dist/Notice-CSoDYKw9.js +46 -0
  19. package/dist/OrderDetailsPage-zCj0lW0j.js +584 -0
  20. package/dist/{OrdersListPage-Cn90P1Xx.js → OrdersListPage-CAMsuUck.js} +166 -89
  21. package/dist/{ProductDetailsPage-C9uOiYLp.js → ProductDetailsPage-wsxAQkA0.js} +12 -12
  22. package/dist/{ProductsPage-QJfHHpqB.js → ProductsPage-DC5qDLfz.js} +60 -49
  23. package/dist/ReportsPage-BwUJ37eO.js +356 -0
  24. package/dist/RouteDetailsPage-DyMJE9AS.js +583 -0
  25. package/dist/{RoutesPage-DMfoicM1.js → RoutesPage-Dtc669yc.js} +57 -46
  26. package/dist/{SettingsPage-Bn-v0mbQ.js → SettingsPage-CpH9xhQg.js} +5 -27
  27. package/dist/{TrackingPage-W-jtdM3Y.js → TrackingPage-DaNEFG_h.js} +10 -10
  28. package/dist/{VehicleDetailsPage-Bceo5oz3.js → VehicleDetailsPage-DldYNsYV.js} +125 -142
  29. package/dist/{VehiclesPage-ApKThYeG.js → VehiclesPage-BFw13iMt.js} +61 -50
  30. package/dist/{WarehouseDetailsPage-L_6sWigM.js → WarehouseDetailsPage-CMG7or6G.js} +17 -17
  31. package/dist/{WarehousesPage-DCbXXXWE.js → WarehousesPage-Wkytnt86.js} +58 -47
  32. package/dist/arrow-right-Q3XQpTPR.js +11 -0
  33. package/dist/arrow-up-xNF1zJUG.js +17 -0
  34. package/dist/chevron-left-B2_r0Elx.js +8 -0
  35. package/dist/{wrench-CANXWxF-.js → fuel-B6_lnKDs.js} +2 -5
  36. package/dist/index.js +163 -174
  37. package/dist/upload-CHZofOqb.js +21 -0
  38. package/dist/{useAnalytics-DS8n0xgg.js → useAnalytics-D7HW2XRb.js} +52 -2
  39. package/dist/{useCustomers-BmTNGxiI.js → useCustomers-BPW4__PR.js} +29 -26
  40. package/dist/{useFleet-DKqXZ16m.js → useFleet-ChBkxAd6.js} +81 -69
  41. package/dist/{useInventory-DkyiVY_A.js → useInventory-CAAVMRp6.js} +83 -38
  42. package/dist/{useOrders-Cfk1GLiq.js → useOrders-B465S2nt.js} +58 -47
  43. package/dist/{useReports-CTqZr-AB.js → useReports-jQ3GpNOm.js} +40 -34
  44. package/dist/{useRoutes-BQWO607N.js → useRoutes-hS3d5-xr.js} +49 -41
  45. package/dist/{useTracking-B-va1kO3.js → useTracking-RjGz9PZG.js} +2 -2
  46. package/dist/user-check-BEKRCi7v.js +20 -0
  47. package/dist/wrench-q_rgJfaP.js +8 -0
  48. package/dist/x-tMeDMcCw.js +11 -0
  49. package/package.json +1 -1
  50. package/src/movethewheels/components/DataTable.tsx +252 -84
  51. package/src/movethewheels/components/DocumentsCard.tsx +102 -0
  52. package/src/movethewheels/components/Notice.tsx +61 -0
  53. package/src/movethewheels/components/index.ts +7 -0
  54. package/src/movethewheels/hooks/index.ts +9 -0
  55. package/src/movethewheels/hooks/useAnalytics.ts +95 -0
  56. package/src/movethewheels/hooks/useCustomers.ts +11 -4
  57. package/src/movethewheels/hooks/useEntityDocuments.ts +132 -0
  58. package/src/movethewheels/hooks/useFleet.ts +26 -7
  59. package/src/movethewheels/hooks/useInventory.ts +70 -7
  60. package/src/movethewheels/hooks/useOrders.ts +32 -2
  61. package/src/movethewheels/hooks/useReports.ts +14 -4
  62. package/src/movethewheels/hooks/useRoutes.ts +20 -3
  63. package/src/movethewheels/pages/AnalyticsPage.tsx +2 -2
  64. package/src/movethewheels/pages/CreateOrderPage.tsx +44 -16
  65. package/src/movethewheels/pages/CustomerDetailsPage.tsx +239 -33
  66. package/src/movethewheels/pages/CustomersPage.tsx +27 -11
  67. package/src/movethewheels/pages/DriverDetailsPage.tsx +16 -30
  68. package/src/movethewheels/pages/DriversPage.tsx +26 -9
  69. package/src/movethewheels/pages/FinancePage.tsx +67 -84
  70. package/src/movethewheels/pages/MarketplacePage.tsx +265 -50
  71. package/src/movethewheels/pages/OrderDetailsPage.tsx +214 -10
  72. package/src/movethewheels/pages/OrdersListPage.tsx +76 -13
  73. package/src/movethewheels/pages/ProductsPage.tsx +27 -7
  74. package/src/movethewheels/pages/ReportsPage.tsx +65 -4
  75. package/src/movethewheels/pages/RouteDetailsPage.tsx +74 -13
  76. package/src/movethewheels/pages/RoutesPage.tsx +22 -6
  77. package/src/movethewheels/pages/SettingsPage.tsx +3 -19
  78. package/src/movethewheels/pages/VehicleDetailsPage.tsx +3 -33
  79. package/src/movethewheels/pages/VehiclesPage.tsx +26 -5
  80. package/src/movethewheels/pages/WarehousesPage.tsx +22 -17
  81. package/src/movethewheels/types/index.ts +8 -0
  82. package/src/movethewheels/utils/download.ts +62 -0
  83. package/dist/CreateOrderPage-C5iwnjp4.js +0 -479
  84. package/dist/CustomerDetailsPage-B6nwFyLO.js +0 -406
  85. package/dist/DataTable-DmciIKKM.js +0 -249
  86. package/dist/FinancePage-DEDykSOP.js +0 -158
  87. package/dist/MarketplacePage-CIQ97_zp.js +0 -247
  88. package/dist/OrderDetailsPage-DYiZ-9UK.js +0 -429
  89. package/dist/ReportsPage-Zp53q3_8.js +0 -284
  90. package/dist/RouteDetailsPage-DUStXSf9.js +0 -531
  91. /package/dist/{MetricCard-BY0QrMD4.js → MetricCard-CVBVpu7o.js} +0 -0
  92. /package/dist/{StatusBadge-BZurYHMy.js → StatusBadge-C87mDpDP.js} +0 -0
  93. /package/dist/{box-D9Pal4HM.js → box-Eu05PXDh.js} +0 -0
  94. /package/dist/{chart-column-BFIJysDR.js → chart-column-ouzgxIv_.js} +0 -0
  95. /package/dist/{chevron-right-EMIIyyJ1.js → chevron-right-eV4LjaSi.js} +0 -0
  96. /package/dist/{circle-alert-iY24lSlp.js → circle-alert-Bzh2DBSF.js} +0 -0
  97. /package/dist/{circle-check-big-w0TrLKMF.js → circle-check-big-CGMSpQmD.js} +0 -0
  98. /package/dist/{clock-DJZtdl8u.js → clock-Bl3ptexL.js} +0 -0
  99. /package/dist/{dollar-sign-CgKQRz_e.js → dollar-sign-CAVU95SO.js} +0 -0
  100. /package/dist/{download-DRXxoiQR.js → download-C5NbvVDc.js} +0 -0
  101. /package/dist/{file-text-DWWY6_f5.js → file-text-D-1uvLZG.js} +0 -0
  102. /package/dist/{filter-DloLC2eE.js → filter-DUfUg6BO.js} +0 -0
  103. /package/dist/{formatters-CF2S2l1m.js → formatters-BQr-aR5W.js} +0 -0
  104. /package/dist/{map-CkJaULb2.js → map-C-M-FQLR.js} +0 -0
  105. /package/dist/{map-pin-BGiCvyCs.js → map-pin-Dznl5l40.js} +0 -0
  106. /package/dist/{navigation-D36prnAn.js → navigation-BJSJl-VG.js} +0 -0
  107. /package/dist/{package-BChUzpJS.js → package-CcRttV2N.js} +0 -0
  108. /package/dist/{phone-Ac9s3mo_.js → phone-DVSZHt_j.js} +0 -0
  109. /package/dist/{plus-Z76q-FZm.js → plus-C_XZDwBz.js} +0 -0
  110. /package/dist/{refresh-cw-DKt6f5T6.js → refresh-cw-CfgN67l3.js} +0 -0
  111. /package/dist/{save-CojywNhG.js → save-DJE8Fpdv.js} +0 -0
  112. /package/dist/{search-CDGefqb3.js → search-D_VyGcZT.js} +0 -0
  113. /package/dist/{square-pen-CopE9GmB.js → square-pen-D-6JYrVQ.js} +0 -0
  114. /package/dist/{star-nHlLjDKR.js → star-BpRlUZuU.js} +0 -0
  115. /package/dist/{store-BR9Voi5E.js → store-B-8HMuyZ.js} +0 -0
  116. /package/dist/{trash-2-BKhar6Hs.js → trash-2-8vmv-XV_.js} +0 -0
  117. /package/dist/{trending-up-Dohgd4t_.js → trending-up-Dz6PqPRj.js} +0 -0
  118. /package/dist/{triangle-alert-i-XQL9Rd.js → triangle-alert-D7Y3J_4z.js} +0 -0
  119. /package/dist/{truck-C0v_hbLR.js → truck-D-y2IDzv.js} +0 -0
  120. /package/dist/{useAssistant-D4v3oxD3.js → useAssistant-DVW4QgQb.js} +0 -0
  121. /package/dist/{useImportExport-DHr-SWSw.js → useImportExport-DrPDHEDK.js} +0 -0
  122. /package/dist/{useSettings-CkDH_-gM.js → useSettings-BB8X2RLh.js} +0 -0
  123. /package/dist/{user-jyFU3lXk.js → user-DzfTn4dE.js} +0 -0
  124. /package/dist/{users-DZ-ilS6B.js → users-CCrq-w0C.js} +0 -0
  125. /package/dist/{warehouse-6m5kXMLu.js → warehouse-CaqfmMKh.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
- import { n as u, r as d, t as f } from "./useAssistant-D4v3oxD3.js";
3
- import { t as p } from "./circle-alert-iY24lSlp.js";
4
- import { t as m } from "./trending-up-Dohgd4t_.js";
2
+ import { n as u, r as d, t as f } from "./useAssistant-DVW4QgQb.js";
3
+ import { t as p } from "./circle-alert-Bzh2DBSF.js";
4
+ import { t as m } from "./trending-up-Dz6PqPRj.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";
@@ -1,13 +1,13 @@
1
1
  import { M as e, d as t, f as n, g as r, h as i, i as a, u as o } from "./PageLayout-D4LDHJJq.js";
2
- import { t as s } from "./chart-column-BFIJysDR.js";
3
- import { t as c } from "./dollar-sign-CgKQRz_e.js";
4
- import { t as l } from "./package-BChUzpJS.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";
2
+ import { t as s } from "./chart-column-ouzgxIv_.js";
3
+ import { t as c } from "./dollar-sign-CAVU95SO.js";
4
+ import { t as l } from "./package-CcRttV2N.js";
5
+ import { t as u } from "./trending-up-Dz6PqPRj.js";
6
+ import { t as d } from "./truck-D-y2IDzv.js";
7
+ import { t as f } from "./users-CCrq-w0C.js";
8
+ import { a as p, i as m, t as h } from "./useAnalytics-D7HW2XRb.js";
9
+ import { n as g, r as _, t as v } from "./MetricCard-CVBVpu7o.js";
10
+ import { n as y } from "./formatters-BQr-aR5W.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
@@ -98,7 +98,7 @@ function w() {
98
98
  ]
99
99
  })
100
100
  }), /* @__PURE__ */ b("div", {
101
- className: "mt-4 grid grid-cols-4 gap-2",
101
+ className: "mt-4 grid grid-cols-2 sm:grid-cols-4 gap-2",
102
102
  children: O.trends.slice(-4).map((e) => /* @__PURE__ */ x("div", {
103
103
  className: "text-center p-2 bg-bg-sunken/50 rounded",
104
104
  children: [/* @__PURE__ */ b("p", {
@@ -119,7 +119,7 @@ function w() {
119
119
  }), /* @__PURE__ */ b("p", { children: "Revenue trend chart" })]
120
120
  })
121
121
  }), /* @__PURE__ */ b("div", {
122
- className: "mt-4 grid grid-cols-5 gap-2",
122
+ className: "mt-4 grid grid-cols-2 sm:grid-cols-5 gap-2",
123
123
  children: w.trends.revenue.map((e) => /* @__PURE__ */ x("div", {
124
124
  className: "text-center p-2 bg-bg-sunken/50 rounded",
125
125
  children: [/* @__PURE__ */ b("p", {
@@ -0,0 +1,490 @@
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-Dznl5l40.js";
4
+ import { t as b } from "./package-CcRttV2N.js";
5
+ import { t as x } from "./plus-C_XZDwBz.js";
6
+ import { t as S } from "./save-DJE8Fpdv.js";
7
+ import { t as C } from "./trash-2-8vmv-XV_.js";
8
+ import { t as w } from "./users-CCrq-w0C.js";
9
+ import { r as T, t as ee } from "./useOrders-B465S2nt.js";
10
+ import { r as te } from "./useCustomers-BPW4__PR.js";
11
+ import { t as E } from "./FormError-cuLV2jVD.js";
12
+ import { useState as D } from "react";
13
+ import { useParams as O } from "react-router-dom";
14
+ import { jsx as k, jsxs as A } from "react/jsx-runtime";
15
+ import { EmphasisPanel as j, NextSteps as M, PagePurpose as N } from "@burdenoff/fe-libs/ui";
16
+ //#region src/movethewheels/pages/CreateOrderPage.tsx
17
+ function P() {
18
+ let { orderId: P } = O(), { basePath: F, navigate: I } = m(), { order: L } = ee(P), { createOrder: R } = T(), { customers: z } = te({ limit: 100 }), B = !!P && !!L, [V, H] = D({
19
+ customerId: L?.customerId || "",
20
+ orderType: L?.orderType || "b2c",
21
+ priority: L?.priority || "normal",
22
+ pickupAddress: {
23
+ street: L?.pickupAddress.street || "",
24
+ city: L?.pickupAddress.city || "",
25
+ state: L?.pickupAddress.state || "",
26
+ postalCode: L?.pickupAddress.postalCode || "",
27
+ country: L?.pickupAddress.country || "USA"
28
+ },
29
+ deliveryAddress: {
30
+ street: L?.deliveryAddress.street || "",
31
+ city: L?.deliveryAddress.city || "",
32
+ state: L?.deliveryAddress.state || "",
33
+ postalCode: L?.deliveryAddress.postalCode || "",
34
+ country: L?.deliveryAddress.country || "USA"
35
+ },
36
+ items: L?.items || [],
37
+ specialInstructions: L?.specialInstructions || ""
38
+ }), [U, W] = D(!1), [G, K] = D(null), q = () => {
39
+ I && I(s(F, "orders"));
40
+ }, J = () => {
41
+ let e = z.find((e) => e.id === V.customerId);
42
+ return !V.customerId || !e ? "Select a customer for this order." : V.pickupAddress.street.trim() ? V.deliveryAddress.street.trim() ? V.items.length === 0 ? "Add at least one item to the order." : null : "Enter a delivery street address." : "Enter a pickup street address.";
43
+ }, Y = async (e) => {
44
+ e.preventDefault(), K(null);
45
+ let t = J();
46
+ if (t) {
47
+ K(t);
48
+ return;
49
+ }
50
+ let n = z.find((e) => e.id === V.customerId);
51
+ if (!n) {
52
+ K("Select a customer for this order.");
53
+ return;
54
+ }
55
+ W(!0);
56
+ try {
57
+ await R({
58
+ customerId: V.customerId,
59
+ customerInfo: {
60
+ name: n.name,
61
+ email: n.email,
62
+ phone: n.phone,
63
+ company: n.company
64
+ },
65
+ orderType: V.orderType,
66
+ priority: V.priority,
67
+ pickupAddress: V.pickupAddress,
68
+ deliveryAddress: V.deliveryAddress,
69
+ items: V.items,
70
+ specialInstructions: V.specialInstructions
71
+ }), q();
72
+ } catch (e) {
73
+ K(e instanceof Error ? e.message : "Could not create the order. Please try again.");
74
+ } finally {
75
+ W(!1);
76
+ }
77
+ }, X = (e, t) => {
78
+ H((n) => ({
79
+ ...n,
80
+ [e]: t
81
+ }));
82
+ }, Z = (e, t, n) => {
83
+ H((r) => ({
84
+ ...r,
85
+ [e]: {
86
+ ...r[e],
87
+ [t]: n
88
+ }
89
+ }));
90
+ }, Q = () => {
91
+ H((e) => ({
92
+ ...e,
93
+ items: [...e.items, {
94
+ id: `item-${Date.now()}`,
95
+ productId: "",
96
+ name: "",
97
+ quantity: 1,
98
+ weight: 0,
99
+ dimensions: {
100
+ length: 0,
101
+ width: 0,
102
+ height: 0,
103
+ unit: "cm"
104
+ },
105
+ value: 0,
106
+ sku: ""
107
+ }]
108
+ }));
109
+ }, ne = (e) => {
110
+ H((t) => ({
111
+ ...t,
112
+ items: t.items.filter((t, n) => n !== e)
113
+ }));
114
+ }, $ = (e, t, n) => {
115
+ H((r) => ({
116
+ ...r,
117
+ items: r.items.map((r, i) => i === e ? {
118
+ ...r,
119
+ [t]: n
120
+ } : r)
121
+ }));
122
+ };
123
+ return /* @__PURE__ */ A(f, {
124
+ title: B ? "Edit Order" : "Create Order",
125
+ subtitle: B ? `Editing ${L?.orderNumber}` : "Create a new delivery order",
126
+ icon: /* @__PURE__ */ k(b, { size: 24 }),
127
+ headerActions: /* @__PURE__ */ A("div", {
128
+ className: "flex gap-2",
129
+ children: [/* @__PURE__ */ A(g, {
130
+ variant: "outline",
131
+ onClick: q,
132
+ children: [/* @__PURE__ */ k(v, { size: 16 }), "Cancel"]
133
+ }), /* @__PURE__ */ A(g, {
134
+ onClick: Y,
135
+ disabled: U,
136
+ children: [/* @__PURE__ */ k(S, { size: 16 }), U ? "Saving..." : B ? "Save Changes" : "Create Order"]
137
+ })]
138
+ }),
139
+ children: [
140
+ /* @__PURE__ */ k(N, {
141
+ icon: /* @__PURE__ */ k(b, { size: 18 }),
142
+ children: B ? "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."
143
+ }),
144
+ /* @__PURE__ */ k(M, {
145
+ storageKey: "movethewheels-create-order",
146
+ steps: [
147
+ {
148
+ id: "customer",
149
+ label: "Pick the customer first",
150
+ description: "Their saved contact details auto-fill the order.",
151
+ icon: /* @__PURE__ */ k(w, { size: 16 }),
152
+ done: !!V.customerId,
153
+ onClick: () => document.getElementById("customer")?.focus()
154
+ },
155
+ {
156
+ id: "addresses",
157
+ label: "Set pickup & delivery addresses",
158
+ description: "Where the shipment is collected and dropped off.",
159
+ icon: /* @__PURE__ */ k(y, { size: 16 }),
160
+ done: !!V.pickupAddress.street && !!V.deliveryAddress.street,
161
+ onClick: () => document.getElementById("pickupStreet")?.focus()
162
+ },
163
+ {
164
+ id: "items",
165
+ label: "Add the items to ship",
166
+ description: "List each product with its quantity and value.",
167
+ icon: /* @__PURE__ */ k(b, { size: 16 }),
168
+ done: V.items.length > 0,
169
+ onClick: Q
170
+ }
171
+ ]
172
+ }),
173
+ /* @__PURE__ */ A("form", {
174
+ onSubmit: Y,
175
+ className: "space-y-6",
176
+ children: [
177
+ /* @__PURE__ */ k(E, { message: G }),
178
+ /* @__PURE__ */ A(j, { children: [/* @__PURE__ */ k("h2", {
179
+ className: "text-base font-semibold text-text-primary mb-4",
180
+ children: "Order Details"
181
+ }), /* @__PURE__ */ k("div", {
182
+ className: "space-y-4",
183
+ children: /* @__PURE__ */ A("div", {
184
+ className: "grid grid-cols-1 md:grid-cols-3 gap-4",
185
+ children: [
186
+ /* @__PURE__ */ A("div", {
187
+ className: "space-y-2",
188
+ children: [/* @__PURE__ */ k(p, {
189
+ htmlFor: "customer",
190
+ children: "Customer"
191
+ }), /* @__PURE__ */ A(i, {
192
+ value: V.customerId,
193
+ onValueChange: (e) => X("customerId", e),
194
+ children: [/* @__PURE__ */ k(r, {
195
+ id: "customer",
196
+ children: /* @__PURE__ */ k(o, { placeholder: "Select customer" })
197
+ }), /* @__PURE__ */ k(t, { children: z.map((e) => /* @__PURE__ */ A(n, {
198
+ value: e.id,
199
+ children: [
200
+ e.name,
201
+ " (",
202
+ e.email,
203
+ ")"
204
+ ]
205
+ }, e.id)) })]
206
+ })]
207
+ }),
208
+ /* @__PURE__ */ A("div", {
209
+ className: "space-y-2",
210
+ children: [/* @__PURE__ */ k(p, {
211
+ htmlFor: "orderType",
212
+ children: "Order Type"
213
+ }), /* @__PURE__ */ A(i, {
214
+ value: V.orderType,
215
+ onValueChange: (e) => X("orderType", e),
216
+ children: [/* @__PURE__ */ k(r, {
217
+ id: "orderType",
218
+ children: /* @__PURE__ */ k(o, {})
219
+ }), /* @__PURE__ */ A(t, { children: [/* @__PURE__ */ k(n, {
220
+ value: "b2c",
221
+ children: "B2C (Individual)"
222
+ }), /* @__PURE__ */ k(n, {
223
+ value: "b2b",
224
+ children: "B2B (Business)"
225
+ })] })]
226
+ })]
227
+ }),
228
+ /* @__PURE__ */ A("div", {
229
+ className: "space-y-2",
230
+ children: [/* @__PURE__ */ k(p, {
231
+ htmlFor: "priority",
232
+ children: "Priority"
233
+ }), /* @__PURE__ */ A(i, {
234
+ value: V.priority,
235
+ onValueChange: (e) => X("priority", e),
236
+ children: [/* @__PURE__ */ k(r, {
237
+ id: "priority",
238
+ children: /* @__PURE__ */ k(o, {})
239
+ }), /* @__PURE__ */ A(t, { children: [
240
+ /* @__PURE__ */ k(n, {
241
+ value: "low",
242
+ children: "Low"
243
+ }),
244
+ /* @__PURE__ */ k(n, {
245
+ value: "normal",
246
+ children: "Normal"
247
+ }),
248
+ /* @__PURE__ */ k(n, {
249
+ value: "high",
250
+ children: "High"
251
+ }),
252
+ /* @__PURE__ */ k(n, {
253
+ value: "urgent",
254
+ children: "Urgent"
255
+ })
256
+ ] })]
257
+ })]
258
+ })
259
+ ]
260
+ })
261
+ })] }),
262
+ /* @__PURE__ */ A("div", {
263
+ className: "grid grid-cols-1 md:grid-cols-2 gap-6",
264
+ children: [/* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(u, { children: "Pickup Address" }) }), /* @__PURE__ */ A(l, {
265
+ className: "space-y-4",
266
+ children: [
267
+ /* @__PURE__ */ A("div", {
268
+ className: "space-y-2",
269
+ children: [/* @__PURE__ */ k(p, {
270
+ htmlFor: "pickupStreet",
271
+ children: "Street Address"
272
+ }), /* @__PURE__ */ k(e, {
273
+ id: "pickupStreet",
274
+ value: V.pickupAddress.street,
275
+ onChange: (e) => Z("pickupAddress", "street", e.target.value),
276
+ placeholder: "123 Main St"
277
+ })]
278
+ }),
279
+ /* @__PURE__ */ A("div", {
280
+ className: "grid grid-cols-2 gap-4",
281
+ children: [/* @__PURE__ */ A("div", {
282
+ className: "space-y-2",
283
+ children: [/* @__PURE__ */ k(p, {
284
+ htmlFor: "pickupCity",
285
+ children: "City"
286
+ }), /* @__PURE__ */ k(e, {
287
+ id: "pickupCity",
288
+ value: V.pickupAddress.city,
289
+ onChange: (e) => Z("pickupAddress", "city", e.target.value),
290
+ placeholder: "San Francisco"
291
+ })]
292
+ }), /* @__PURE__ */ A("div", {
293
+ className: "space-y-2",
294
+ children: [/* @__PURE__ */ k(p, {
295
+ htmlFor: "pickupState",
296
+ children: "State"
297
+ }), /* @__PURE__ */ k(e, {
298
+ id: "pickupState",
299
+ value: V.pickupAddress.state,
300
+ onChange: (e) => Z("pickupAddress", "state", e.target.value),
301
+ placeholder: "CA"
302
+ })]
303
+ })]
304
+ }),
305
+ /* @__PURE__ */ A("div", {
306
+ className: "grid grid-cols-2 gap-4",
307
+ children: [/* @__PURE__ */ A("div", {
308
+ className: "space-y-2",
309
+ children: [/* @__PURE__ */ k(p, {
310
+ htmlFor: "pickupPostal",
311
+ children: "Postal Code"
312
+ }), /* @__PURE__ */ k(e, {
313
+ id: "pickupPostal",
314
+ value: V.pickupAddress.postalCode,
315
+ onChange: (e) => Z("pickupAddress", "postalCode", e.target.value),
316
+ placeholder: "94103"
317
+ })]
318
+ }), /* @__PURE__ */ A("div", {
319
+ className: "space-y-2",
320
+ children: [/* @__PURE__ */ k(p, {
321
+ htmlFor: "pickupCountry",
322
+ children: "Country"
323
+ }), /* @__PURE__ */ k(e, {
324
+ id: "pickupCountry",
325
+ value: V.pickupAddress.country,
326
+ onChange: (e) => Z("pickupAddress", "country", e.target.value),
327
+ placeholder: "USA"
328
+ })]
329
+ })]
330
+ })
331
+ ]
332
+ })] }), /* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(u, { children: "Delivery Address" }) }), /* @__PURE__ */ A(l, {
333
+ className: "space-y-4",
334
+ children: [
335
+ /* @__PURE__ */ A("div", {
336
+ className: "space-y-2",
337
+ children: [/* @__PURE__ */ k(p, {
338
+ htmlFor: "deliveryStreet",
339
+ children: "Street Address"
340
+ }), /* @__PURE__ */ k(e, {
341
+ id: "deliveryStreet",
342
+ value: V.deliveryAddress.street,
343
+ onChange: (e) => Z("deliveryAddress", "street", e.target.value),
344
+ placeholder: "456 Oak Ave"
345
+ })]
346
+ }),
347
+ /* @__PURE__ */ A("div", {
348
+ className: "grid grid-cols-2 gap-4",
349
+ children: [/* @__PURE__ */ A("div", {
350
+ className: "space-y-2",
351
+ children: [/* @__PURE__ */ k(p, {
352
+ htmlFor: "deliveryCity",
353
+ children: "City"
354
+ }), /* @__PURE__ */ k(e, {
355
+ id: "deliveryCity",
356
+ value: V.deliveryAddress.city,
357
+ onChange: (e) => Z("deliveryAddress", "city", e.target.value),
358
+ placeholder: "Los Angeles"
359
+ })]
360
+ }), /* @__PURE__ */ A("div", {
361
+ className: "space-y-2",
362
+ children: [/* @__PURE__ */ k(p, {
363
+ htmlFor: "deliveryState",
364
+ children: "State"
365
+ }), /* @__PURE__ */ k(e, {
366
+ id: "deliveryState",
367
+ value: V.deliveryAddress.state,
368
+ onChange: (e) => Z("deliveryAddress", "state", e.target.value),
369
+ placeholder: "CA"
370
+ })]
371
+ })]
372
+ }),
373
+ /* @__PURE__ */ A("div", {
374
+ className: "grid grid-cols-2 gap-4",
375
+ children: [/* @__PURE__ */ A("div", {
376
+ className: "space-y-2",
377
+ children: [/* @__PURE__ */ k(p, {
378
+ htmlFor: "deliveryPostal",
379
+ children: "Postal Code"
380
+ }), /* @__PURE__ */ k(e, {
381
+ id: "deliveryPostal",
382
+ value: V.deliveryAddress.postalCode,
383
+ onChange: (e) => Z("deliveryAddress", "postalCode", e.target.value),
384
+ placeholder: "90210"
385
+ })]
386
+ }), /* @__PURE__ */ A("div", {
387
+ className: "space-y-2",
388
+ children: [/* @__PURE__ */ k(p, {
389
+ htmlFor: "deliveryCountry",
390
+ children: "Country"
391
+ }), /* @__PURE__ */ k(e, {
392
+ id: "deliveryCountry",
393
+ value: V.deliveryAddress.country,
394
+ onChange: (e) => Z("deliveryAddress", "country", e.target.value),
395
+ placeholder: "USA"
396
+ })]
397
+ })]
398
+ })
399
+ ]
400
+ })] })]
401
+ }),
402
+ /* @__PURE__ */ A(c, { children: [/* @__PURE__ */ A(d, {
403
+ className: "flex flex-row items-center justify-between",
404
+ children: [/* @__PURE__ */ k(u, { children: "Order Items" }), /* @__PURE__ */ A(g, {
405
+ type: "button",
406
+ variant: "outline",
407
+ size: "sm",
408
+ onClick: Q,
409
+ children: [/* @__PURE__ */ k(x, { size: 16 }), "Add Item"]
410
+ })]
411
+ }), /* @__PURE__ */ k(l, { children: V.items.length === 0 ? /* @__PURE__ */ k(h, {
412
+ illustration: "empty-files",
413
+ title: "No items added yet",
414
+ description: "Add the products this order will ship — each with a name, SKU, quantity and value.",
415
+ action: /* @__PURE__ */ A(g, {
416
+ type: "button",
417
+ variant: "outline",
418
+ onClick: Q,
419
+ children: [/* @__PURE__ */ k(x, {
420
+ size: 16,
421
+ className: "mr-1.5"
422
+ }), "Add your first item"]
423
+ })
424
+ }) : /* @__PURE__ */ k("div", {
425
+ className: "space-y-4",
426
+ children: V.items.map((t, n) => /* @__PURE__ */ A("div", { children: [n > 0 && /* @__PURE__ */ k(_, { className: "my-4" }), /* @__PURE__ */ A("div", {
427
+ className: "grid grid-cols-1 md:grid-cols-6 gap-4",
428
+ children: [
429
+ /* @__PURE__ */ A("div", {
430
+ className: "md:col-span-2 space-y-2",
431
+ children: [/* @__PURE__ */ k(p, { children: "Item Name" }), /* @__PURE__ */ k(e, {
432
+ value: t.name,
433
+ onChange: (e) => $(n, "name", e.target.value),
434
+ placeholder: "Product name"
435
+ })]
436
+ }),
437
+ /* @__PURE__ */ A("div", {
438
+ className: "space-y-2",
439
+ children: [/* @__PURE__ */ k(p, { children: "SKU" }), /* @__PURE__ */ k(e, {
440
+ value: t.sku,
441
+ onChange: (e) => $(n, "sku", e.target.value),
442
+ placeholder: "SKU-001"
443
+ })]
444
+ }),
445
+ /* @__PURE__ */ A("div", {
446
+ className: "space-y-2",
447
+ children: [/* @__PURE__ */ k(p, { children: "Quantity" }), /* @__PURE__ */ k(e, {
448
+ type: "number",
449
+ min: "1",
450
+ value: t.quantity,
451
+ onChange: (e) => $(n, "quantity", parseInt(e.target.value) || 1)
452
+ })]
453
+ }),
454
+ /* @__PURE__ */ A("div", {
455
+ className: "space-y-2",
456
+ children: [/* @__PURE__ */ k(p, { children: "Value ($)" }), /* @__PURE__ */ k(e, {
457
+ type: "number",
458
+ min: "0",
459
+ step: "0.01",
460
+ value: t.value,
461
+ onChange: (e) => $(n, "value", parseFloat(e.target.value) || 0)
462
+ })]
463
+ }),
464
+ /* @__PURE__ */ k("div", {
465
+ className: "flex items-end",
466
+ children: /* @__PURE__ */ k(g, {
467
+ type: "button",
468
+ variant: "ghost",
469
+ size: "icon",
470
+ className: "text-status-error-text",
471
+ onClick: () => ne(n),
472
+ children: /* @__PURE__ */ k(C, { size: 16 })
473
+ })
474
+ })
475
+ ]
476
+ })] }, t.id))
477
+ }) })] }),
478
+ /* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(u, { children: "Special Instructions" }) }), /* @__PURE__ */ k(l, { children: /* @__PURE__ */ k(a, {
479
+ value: V.specialInstructions,
480
+ onChange: (e) => X("specialInstructions", e.target.value),
481
+ placeholder: "Any special handling or delivery instructions...",
482
+ rows: 4
483
+ }) })] })
484
+ ]
485
+ })
486
+ ]
487
+ });
488
+ }
489
+ //#endregion
490
+ export { P as default };