@burdenoff/microfe-movethewheels 2026.1031.3 → 2026.1031.5

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 (63) hide show
  1. package/dist/MoveTheWheelsRoot.js +136 -127
  2. package/dist/MoveTheWheelsRoutes.js +143 -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 +18 -5
  48. package/src/movethewheels/MoveTheWheelsRoutes.tsx +19 -4
  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
  59. package/dist/movethewheels/pages/AIAssistantPage.d.ts +0 -22
  60. package/dist/node_modules/lucide-react/dist/esm/icons/message-circle.js +0 -8
  61. package/dist/node_modules/lucide-react/dist/esm/icons/wallet.js +0 -11
  62. package/dist/pages/AIAssistantPage.js +0 -81
  63. package/src/movethewheels/pages/AIAssistantPage.tsx +0 -123
@@ -13,20 +13,20 @@ import { Users as u } from "../node_modules/lucide-react/dist/esm/icons/users.js
13
13
  import { X as d } from "../node_modules/lucide-react/dist/esm/icons/x.js";
14
14
  import { buildOrderCustomerPath as f, getSafeCustomerReturnPath as p, joinPath as m } from "../utils/navigation.js";
15
15
  import { useMoveTheWheels as h } from "../providers/MoveTheWheelsProvider.js";
16
- import { useOrders as g } from "../hooks/useOrders.js";
17
- import { useCustomer as te, useCustomers as _ } from "../hooks/useCustomers.js";
18
- import { Button as v, Card as y, CardContent as b, CardHeader as x, CardTitle as S, Input as C, Label as w, Select as T, SelectContent as E, SelectItem as D, SelectTrigger as O, SelectValue as k } from "../components/ui.js";
19
- import { ErrorState as A, LoadingState as j, PageLayout as ne } from "../components/PageLayout.js";
20
- import { StatusBadge as M, TypeBadge as re } from "../components/StatusBadge.js";
21
- import { FormError as N } from "../components/FormError.js";
22
- import { Notice as ie, useNotice as ae } from "../components/Notice.js";
23
- import { formatAddress as oe, formatCurrency as se, formatDate as P } from "../utils/formatters.js";
24
- import { useEffect as ce, useState as F } from "react";
25
- import { useParams as le, useSearchParams as I } from "react-router";
26
- import { Fragment as ue, jsx as L, jsxs as R } from "react/jsx-runtime";
27
- import { EmphasisPanel as z, NextSteps as de, PagePurpose as B, ResponsiveDialog as fe, ResponsiveDialogContent as pe, ResponsiveDialogDescription as me, ResponsiveDialogFooter as he, ResponsiveDialogHeader as ge, ResponsiveDialogTitle as _e } from "@burdenoff/fe-libs/ui";
16
+ import { formatAddress as g, formatCurrency as _, formatDate as v } from "../utils/formatters.js";
17
+ import { useOrders as y } from "../hooks/useOrders.js";
18
+ import { useCustomer as b, useCustomers as x } from "../hooks/useCustomers.js";
19
+ import { Button as S, Card as C, CardContent as w, CardHeader as T, CardTitle as E, Input as D, Label as O, Select as k, SelectContent as A, SelectItem as j, SelectTrigger as te, SelectValue as ne } from "../components/ui.js";
20
+ import { ErrorState as re, LoadingState as ie, PageLayout as ae } from "../components/PageLayout.js";
21
+ import { StatusBadge as oe, TypeBadge as se } from "../components/StatusBadge.js";
22
+ import { FormError as M } from "../components/FormError.js";
23
+ import { Notice as ce, useNotice as le } from "../components/Notice.js";
24
+ import { useEffect as ue, useState as N } from "react";
25
+ import { useParams as de, useSearchParams as P } from "react-router";
26
+ import { Fragment as fe, jsx as F, jsxs as I } from "react/jsx-runtime";
27
+ import { EmphasisPanel as L, NextSteps as pe, PagePurpose as R, ResponsiveDialog as me, ResponsiveDialogContent as he, ResponsiveDialogDescription as ge, ResponsiveDialogFooter as _e, ResponsiveDialogHeader as ve, ResponsiveDialogTitle as ye } from "@burdenoff/fe-libs/ui";
28
28
  //#region src/movethewheels/pages/CustomerDetailsPage.tsx
29
- var V = {
29
+ var z = {
30
30
  name: "",
31
31
  type: "b2c",
32
32
  email: "",
@@ -41,13 +41,13 @@ var V = {
41
41
  taxId: "",
42
42
  rating: ""
43
43
  };
44
- function ve() {
45
- let { basePath: t, navigate: r } = h(), [i] = I(), a = p(i.get("returnTo")), { createCustomer: s } = _(), [c, l] = F(V), [d, g] = F(!1), [te, A] = F(null), j = () => r?.(m(t, "customers")), M = async (e) => {
44
+ function be() {
45
+ let { basePath: t, navigate: r } = h(), [i] = P(), a = p(i.get("returnTo")), { createCustomer: s } = x(), [c, l] = N(z), [d, g] = N(!1), [_, v] = N(null), y = () => r?.(m(t, "customers")), b = async (e) => {
46
46
  if (e.preventDefault(), !c.name.trim()) {
47
- A("Customer name is required.");
47
+ v("Customer name is required.");
48
48
  return;
49
49
  }
50
- g(!0), A(null);
50
+ g(!0), v(null);
51
51
  try {
52
52
  let e = await s({
53
53
  name: c.name.trim(),
@@ -68,55 +68,55 @@ function ve() {
68
68
  }), n = a ? f(a, e.id) : `customers/${e.id}`;
69
69
  r?.(m(t, n));
70
70
  } catch (e) {
71
- console.error("Failed to create customer:", e), A(e instanceof Error ? e.message : "Failed to create customer. Please try again."), g(!1);
71
+ console.error("Failed to create customer:", e), v(e instanceof Error ? e.message : "Failed to create customer. Please try again."), g(!1);
72
72
  }
73
73
  };
74
- return /* @__PURE__ */ R(ne, {
74
+ return /* @__PURE__ */ I(ae, {
75
75
  title: "New Customer",
76
76
  subtitle: "Add a new customer to your account",
77
- icon: /* @__PURE__ */ L(u, { size: 24 }),
78
- headerActions: /* @__PURE__ */ R("div", {
77
+ icon: /* @__PURE__ */ F(u, { size: 24 }),
78
+ headerActions: /* @__PURE__ */ I("div", {
79
79
  className: "flex gap-2",
80
- children: [/* @__PURE__ */ R(v, {
80
+ children: [/* @__PURE__ */ I(S, {
81
81
  variant: "outline",
82
- onClick: j,
82
+ onClick: y,
83
83
  disabled: d,
84
- children: [/* @__PURE__ */ L(e, { size: 16 }), " Cancel"]
85
- }), /* @__PURE__ */ R(v, {
86
- onClick: M,
84
+ children: [/* @__PURE__ */ F(e, { size: 16 }), " Cancel"]
85
+ }), /* @__PURE__ */ I(S, {
86
+ onClick: b,
87
87
  disabled: d,
88
88
  children: [
89
- /* @__PURE__ */ L(o, { size: 16 }),
89
+ /* @__PURE__ */ F(o, { size: 16 }),
90
90
  " ",
91
91
  d ? "Saving..." : "Create Customer"
92
92
  ]
93
93
  })]
94
94
  }),
95
- children: [/* @__PURE__ */ L(B, {
96
- icon: /* @__PURE__ */ L(u, { size: 18 }),
95
+ children: [/* @__PURE__ */ F(R, {
96
+ icon: /* @__PURE__ */ F(u, { size: 18 }),
97
97
  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."
98
- }), /* @__PURE__ */ R("form", {
99
- onSubmit: M,
98
+ }), /* @__PURE__ */ I("form", {
99
+ onSubmit: b,
100
100
  className: "max-w-2xl space-y-6",
101
101
  children: [
102
- /* @__PURE__ */ L(N, { message: te }),
103
- /* @__PURE__ */ R(z, { children: [/* @__PURE__ */ L("h2", {
102
+ /* @__PURE__ */ F(M, { message: _ }),
103
+ /* @__PURE__ */ I(L, { children: [/* @__PURE__ */ F("h2", {
104
104
  className: "text-base font-semibold text-text-primary mb-4",
105
105
  children: "Customer Details"
106
- }), /* @__PURE__ */ R("div", {
106
+ }), /* @__PURE__ */ I("div", {
107
107
  className: "space-y-4",
108
108
  children: [
109
- /* @__PURE__ */ R("div", {
109
+ /* @__PURE__ */ I("div", {
110
110
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
111
- children: [/* @__PURE__ */ R("div", {
111
+ children: [/* @__PURE__ */ I("div", {
112
112
  className: "space-y-2",
113
- children: [/* @__PURE__ */ R(w, {
113
+ children: [/* @__PURE__ */ I(O, {
114
114
  htmlFor: "name",
115
- children: ["Name ", /* @__PURE__ */ L("span", {
115
+ children: ["Name ", /* @__PURE__ */ F("span", {
116
116
  className: "text-status-error-text",
117
117
  children: "*"
118
118
  })]
119
- }), /* @__PURE__ */ L(C, {
119
+ }), /* @__PURE__ */ F(D, {
120
120
  id: "name",
121
121
  value: c.name,
122
122
  onChange: (e) => l((t) => ({
@@ -126,38 +126,38 @@ function ve() {
126
126
  placeholder: "Acme Corp or Jane Doe",
127
127
  required: !0
128
128
  })]
129
- }), /* @__PURE__ */ R("div", {
129
+ }), /* @__PURE__ */ I("div", {
130
130
  className: "space-y-2",
131
- children: [/* @__PURE__ */ L(w, {
131
+ children: [/* @__PURE__ */ F(O, {
132
132
  htmlFor: "type",
133
133
  children: "Customer Type"
134
- }), /* @__PURE__ */ R(T, {
134
+ }), /* @__PURE__ */ I(k, {
135
135
  value: c.type,
136
136
  onValueChange: (e) => l((t) => ({
137
137
  ...t,
138
138
  type: e
139
139
  })),
140
- children: [/* @__PURE__ */ L(O, {
140
+ children: [/* @__PURE__ */ F(te, {
141
141
  id: "type",
142
- children: /* @__PURE__ */ L(k, {})
143
- }), /* @__PURE__ */ R(E, { children: [/* @__PURE__ */ L(D, {
142
+ children: /* @__PURE__ */ F(ne, {})
143
+ }), /* @__PURE__ */ I(A, { children: [/* @__PURE__ */ F(j, {
144
144
  value: "b2c",
145
145
  children: "B2C (Individual)"
146
- }), /* @__PURE__ */ L(D, {
146
+ }), /* @__PURE__ */ F(j, {
147
147
  value: "b2b",
148
148
  children: "B2B (Business)"
149
149
  })] })]
150
150
  })]
151
151
  })]
152
152
  }),
153
- /* @__PURE__ */ R("div", {
153
+ /* @__PURE__ */ I("div", {
154
154
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
155
- children: [/* @__PURE__ */ R("div", {
155
+ children: [/* @__PURE__ */ I("div", {
156
156
  className: "space-y-2",
157
- children: [/* @__PURE__ */ L(w, {
157
+ children: [/* @__PURE__ */ F(O, {
158
158
  htmlFor: "email",
159
159
  children: "Email"
160
- }), /* @__PURE__ */ L(C, {
160
+ }), /* @__PURE__ */ F(D, {
161
161
  id: "email",
162
162
  type: "email",
163
163
  value: c.email,
@@ -167,12 +167,12 @@ function ve() {
167
167
  })),
168
168
  placeholder: "customer@example.com"
169
169
  })]
170
- }), /* @__PURE__ */ R("div", {
170
+ }), /* @__PURE__ */ I("div", {
171
171
  className: "space-y-2",
172
- children: [/* @__PURE__ */ L(w, {
172
+ children: [/* @__PURE__ */ F(O, {
173
173
  htmlFor: "phone",
174
174
  children: "Phone"
175
- }), /* @__PURE__ */ L(C, {
175
+ }), /* @__PURE__ */ F(D, {
176
176
  id: "phone",
177
177
  value: c.phone,
178
178
  onChange: (e) => l((t) => ({
@@ -183,12 +183,12 @@ function ve() {
183
183
  })]
184
184
  })]
185
185
  }),
186
- /* @__PURE__ */ R("div", {
186
+ /* @__PURE__ */ I("div", {
187
187
  className: "space-y-2",
188
- children: [/* @__PURE__ */ L(w, {
188
+ children: [/* @__PURE__ */ F(O, {
189
189
  htmlFor: "company",
190
190
  children: "Company"
191
- }), /* @__PURE__ */ L(C, {
191
+ }), /* @__PURE__ */ F(D, {
192
192
  id: "company",
193
193
  value: c.company,
194
194
  onChange: (e) => l((t) => ({
@@ -200,17 +200,17 @@ function ve() {
200
200
  })
201
201
  ]
202
202
  })] }),
203
- /* @__PURE__ */ R(y, { children: [/* @__PURE__ */ L(x, { children: /* @__PURE__ */ R(S, {
203
+ /* @__PURE__ */ I(C, { children: [/* @__PURE__ */ F(T, { children: /* @__PURE__ */ I(E, {
204
204
  className: "flex items-center gap-2",
205
- children: [/* @__PURE__ */ L(ee, { size: 18 }), " Address"]
206
- }) }), /* @__PURE__ */ R(b, {
205
+ children: [/* @__PURE__ */ F(ee, { size: 18 }), " Address"]
206
+ }) }), /* @__PURE__ */ I(w, {
207
207
  className: "space-y-4",
208
- children: [/* @__PURE__ */ R("div", {
208
+ children: [/* @__PURE__ */ I("div", {
209
209
  className: "space-y-2",
210
- children: [/* @__PURE__ */ L(w, {
210
+ children: [/* @__PURE__ */ F(O, {
211
211
  htmlFor: "street",
212
212
  children: "Street"
213
- }), /* @__PURE__ */ L(C, {
213
+ }), /* @__PURE__ */ F(D, {
214
214
  id: "street",
215
215
  value: c.street,
216
216
  onChange: (e) => l((t) => ({
@@ -219,15 +219,15 @@ function ve() {
219
219
  })),
220
220
  placeholder: "123 Main St"
221
221
  })]
222
- }), /* @__PURE__ */ R("div", {
222
+ }), /* @__PURE__ */ I("div", {
223
223
  className: "grid grid-cols-1 md:grid-cols-4 gap-4",
224
224
  children: [
225
- /* @__PURE__ */ R("div", {
225
+ /* @__PURE__ */ I("div", {
226
226
  className: "space-y-2",
227
- children: [/* @__PURE__ */ L(w, {
227
+ children: [/* @__PURE__ */ F(O, {
228
228
  htmlFor: "city",
229
229
  children: "City"
230
- }), /* @__PURE__ */ L(C, {
230
+ }), /* @__PURE__ */ F(D, {
231
231
  id: "city",
232
232
  value: c.city,
233
233
  onChange: (e) => l((t) => ({
@@ -236,12 +236,12 @@ function ve() {
236
236
  }))
237
237
  })]
238
238
  }),
239
- /* @__PURE__ */ R("div", {
239
+ /* @__PURE__ */ I("div", {
240
240
  className: "space-y-2",
241
- children: [/* @__PURE__ */ L(w, {
241
+ children: [/* @__PURE__ */ F(O, {
242
242
  htmlFor: "state",
243
243
  children: "State"
244
- }), /* @__PURE__ */ L(C, {
244
+ }), /* @__PURE__ */ F(D, {
245
245
  id: "state",
246
246
  value: c.state,
247
247
  onChange: (e) => l((t) => ({
@@ -250,12 +250,12 @@ function ve() {
250
250
  }))
251
251
  })]
252
252
  }),
253
- /* @__PURE__ */ R("div", {
253
+ /* @__PURE__ */ I("div", {
254
254
  className: "space-y-2",
255
- children: [/* @__PURE__ */ L(w, {
255
+ children: [/* @__PURE__ */ F(O, {
256
256
  htmlFor: "postalCode",
257
257
  children: "Postal Code"
258
- }), /* @__PURE__ */ L(C, {
258
+ }), /* @__PURE__ */ F(D, {
259
259
  id: "postalCode",
260
260
  value: c.postalCode,
261
261
  onChange: (e) => l((t) => ({
@@ -264,12 +264,12 @@ function ve() {
264
264
  }))
265
265
  })]
266
266
  }),
267
- /* @__PURE__ */ R("div", {
267
+ /* @__PURE__ */ I("div", {
268
268
  className: "space-y-2",
269
- children: [/* @__PURE__ */ L(w, {
269
+ children: [/* @__PURE__ */ F(O, {
270
270
  htmlFor: "country",
271
271
  children: "Country"
272
- }), /* @__PURE__ */ L(C, {
272
+ }), /* @__PURE__ */ F(D, {
273
273
  id: "country",
274
274
  value: c.country,
275
275
  onChange: (e) => l((t) => ({
@@ -281,18 +281,18 @@ function ve() {
281
281
  ]
282
282
  })]
283
283
  })] }),
284
- /* @__PURE__ */ R(y, { children: [/* @__PURE__ */ L(x, { children: /* @__PURE__ */ R(S, {
284
+ /* @__PURE__ */ I(C, { children: [/* @__PURE__ */ F(T, { children: /* @__PURE__ */ I(E, {
285
285
  className: "flex items-center gap-2",
286
- children: [/* @__PURE__ */ L(n, { size: 18 }), " Business Details"]
287
- }) }), /* @__PURE__ */ L(b, { children: /* @__PURE__ */ R("div", {
286
+ children: [/* @__PURE__ */ F(n, { size: 18 }), " Business Details"]
287
+ }) }), /* @__PURE__ */ F(w, { children: /* @__PURE__ */ I("div", {
288
288
  className: "grid grid-cols-1 md:grid-cols-3 gap-4",
289
289
  children: [
290
- /* @__PURE__ */ R("div", {
290
+ /* @__PURE__ */ I("div", {
291
291
  className: "space-y-2",
292
- children: [/* @__PURE__ */ L(w, {
292
+ children: [/* @__PURE__ */ F(O, {
293
293
  htmlFor: "businessLicense",
294
294
  children: "Business License"
295
- }), /* @__PURE__ */ L(C, {
295
+ }), /* @__PURE__ */ F(D, {
296
296
  id: "businessLicense",
297
297
  value: c.businessLicense,
298
298
  onChange: (e) => l((t) => ({
@@ -301,12 +301,12 @@ function ve() {
301
301
  }))
302
302
  })]
303
303
  }),
304
- /* @__PURE__ */ R("div", {
304
+ /* @__PURE__ */ I("div", {
305
305
  className: "space-y-2",
306
- children: [/* @__PURE__ */ L(w, {
306
+ children: [/* @__PURE__ */ F(O, {
307
307
  htmlFor: "taxId",
308
308
  children: "Tax ID"
309
- }), /* @__PURE__ */ L(C, {
309
+ }), /* @__PURE__ */ F(D, {
310
310
  id: "taxId",
311
311
  value: c.taxId,
312
312
  onChange: (e) => l((t) => ({
@@ -315,12 +315,12 @@ function ve() {
315
315
  }))
316
316
  })]
317
317
  }),
318
- /* @__PURE__ */ R("div", {
318
+ /* @__PURE__ */ I("div", {
319
319
  className: "space-y-2",
320
- children: [/* @__PURE__ */ L(w, {
320
+ children: [/* @__PURE__ */ F(O, {
321
321
  htmlFor: "rating",
322
322
  children: "Rating (0–5)"
323
- }), /* @__PURE__ */ L(C, {
323
+ }), /* @__PURE__ */ F(D, {
324
324
  id: "rating",
325
325
  type: "number",
326
326
  min: 0,
@@ -339,7 +339,7 @@ function ve() {
339
339
  })]
340
340
  });
341
341
  }
342
- function H(e) {
342
+ function B(e) {
343
343
  return {
344
344
  name: e.name,
345
345
  email: e.email,
@@ -356,35 +356,35 @@ function H(e) {
356
356
  rating: e.rating ? String(e.rating) : ""
357
357
  };
358
358
  }
359
- function U() {
360
- let { customerId: p } = le(), { basePath: I, navigate: U } = h(), { customer: W, isLoading: ye, error: be, refetch: xe } = te(p), { updateCustomer: Se, deleteCustomer: Ce } = _(), { orders: we, isLoading: Te } = g({ filters: { customerId: p } }), { message: Ee, notify: De } = ae(), [Oe, G] = F(!1), [K, ke] = F(!1), [Ae, q] = F(null), [J, Y] = F(V), [je, X] = F(!1), [Z, Me] = F(!1), [Ne, Pe] = F(null);
361
- ce(() => {
362
- W && Y(H(W));
363
- }, [W]);
364
- let Fe = () => U?.(m(I, "customers")), Q = (e) => U?.(m(I, e)), $ = () => {
359
+ function V() {
360
+ let { customerId: p } = de(), { basePath: P, navigate: V } = h(), { customer: H, isLoading: xe, error: Se, refetch: U } = b(p), { updateCustomer: Ce, deleteCustomer: we } = x(), { orders: W, isLoading: Te } = y({ filters: { customerId: p } }), { message: Ee, notify: De } = le(), [Oe, G] = N(!1), [K, ke] = N(!1), [Ae, q] = N(null), [J, Y] = N(z), [je, X] = N(!1), [Z, Me] = N(!1), [Ne, Pe] = N(null);
361
+ ue(() => {
362
+ H && Y(B(H));
363
+ }, [H]);
364
+ let Fe = () => V?.(m(P, "customers")), Q = (e) => V?.(m(P, e)), $ = () => {
365
365
  q(null), G(!0);
366
366
  };
367
- return p ? ye ? /* @__PURE__ */ L(j, { message: "Loading customer details..." }) : be || !W ? /* @__PURE__ */ L(A, {
367
+ return p ? xe ? /* @__PURE__ */ F(ie, { message: "Loading customer details..." }) : Se || !H ? /* @__PURE__ */ F(re, {
368
368
  title: "Customer not found",
369
- onRetry: xe
370
- }) : /* @__PURE__ */ R(ne, {
371
- title: W.name,
372
- subtitle: W.company || W.email,
373
- icon: /* @__PURE__ */ L(u, { size: 24 }),
374
- headerActions: /* @__PURE__ */ R("div", {
369
+ onRetry: U
370
+ }) : /* @__PURE__ */ I(ae, {
371
+ title: H.name,
372
+ subtitle: H.company || H.email,
373
+ icon: /* @__PURE__ */ F(u, { size: 24 }),
374
+ headerActions: /* @__PURE__ */ I("div", {
375
375
  className: "flex gap-2",
376
- children: [/* @__PURE__ */ R(v, {
376
+ children: [/* @__PURE__ */ I(S, {
377
377
  variant: "outline",
378
378
  onClick: Fe,
379
- children: [/* @__PURE__ */ L(e, { size: 16 }), " Back"]
380
- }), Oe ? /* @__PURE__ */ R(ue, { children: [/* @__PURE__ */ R(v, {
379
+ children: [/* @__PURE__ */ F(e, { size: 16 }), " Back"]
380
+ }), Oe ? /* @__PURE__ */ I(fe, { children: [/* @__PURE__ */ I(S, {
381
381
  variant: "outline",
382
382
  onClick: () => {
383
- q(null), G(!1), W && Y(H(W));
383
+ q(null), G(!1), H && Y(B(H));
384
384
  },
385
385
  disabled: K,
386
- children: [/* @__PURE__ */ L(d, { size: 16 }), " Cancel"]
387
- }), /* @__PURE__ */ R(v, {
386
+ children: [/* @__PURE__ */ F(d, { size: 16 }), " Cancel"]
387
+ }), /* @__PURE__ */ I(S, {
388
388
  onClick: async () => {
389
389
  if (p) {
390
390
  if (!J.name.trim()) {
@@ -393,7 +393,7 @@ function U() {
393
393
  }
394
394
  ke(!0), q(null);
395
395
  try {
396
- await Se(p, {
396
+ await Ce(p, {
397
397
  name: J.name.trim(),
398
398
  email: J.email.trim(),
399
399
  phone: J.phone.trim(),
@@ -409,7 +409,7 @@ function U() {
409
409
  businessLicense: J.businessLicense.trim() || void 0,
410
410
  taxId: J.taxId.trim() || void 0,
411
411
  rating: J.rating ? Number(J.rating) : void 0
412
- }), De("Customer updated."), G(!1), xe();
412
+ }), De("Customer updated."), G(!1), U();
413
413
  } catch (e) {
414
414
  q(e instanceof Error ? e.message : "Failed to update customer.");
415
415
  } finally {
@@ -419,77 +419,77 @@ function U() {
419
419
  },
420
420
  disabled: K,
421
421
  children: [
422
- /* @__PURE__ */ L(o, { size: 16 }),
422
+ /* @__PURE__ */ F(o, { size: 16 }),
423
423
  " ",
424
424
  K ? "Saving…" : "Save"
425
425
  ]
426
- })] }) : /* @__PURE__ */ R(v, {
426
+ })] }) : /* @__PURE__ */ I(S, {
427
427
  onClick: $,
428
- children: [/* @__PURE__ */ L(s, { size: 16 }), " Edit"]
428
+ children: [/* @__PURE__ */ F(s, { size: 16 }), " Edit"]
429
429
  })]
430
430
  }),
431
- headerContent: /* @__PURE__ */ R("div", {
431
+ headerContent: /* @__PURE__ */ I("div", {
432
432
  className: "flex items-center gap-4",
433
- children: [/* @__PURE__ */ L(re, { type: W.type }), W.rating !== void 0 && /* @__PURE__ */ R("div", {
433
+ children: [/* @__PURE__ */ F(se, { type: H.type }), H.rating !== void 0 && /* @__PURE__ */ I("div", {
434
434
  className: "flex items-center gap-1",
435
- children: [/* @__PURE__ */ L(c, {
435
+ children: [/* @__PURE__ */ F(c, {
436
436
  size: 16,
437
437
  className: "text-status-warning-text fill-current"
438
- }), /* @__PURE__ */ L("span", {
438
+ }), /* @__PURE__ */ F("span", {
439
439
  className: "font-medium",
440
- children: W.rating.toFixed(1)
440
+ children: H.rating.toFixed(1)
441
441
  })]
442
442
  })]
443
443
  }),
444
444
  children: [
445
- /* @__PURE__ */ L(B, {
446
- icon: /* @__PURE__ */ L(u, { size: 18 }),
445
+ /* @__PURE__ */ F(R, {
446
+ icon: /* @__PURE__ */ F(u, { size: 18 }),
447
447
  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."
448
448
  }),
449
- /* @__PURE__ */ L(de, {
449
+ /* @__PURE__ */ F(pe, {
450
450
  storageKey: "movethewheels-customer-details",
451
451
  steps: [{
452
452
  id: "new-order",
453
453
  label: "Book a delivery for this customer",
454
454
  description: "Start a new order pre-filled for this account.",
455
- icon: /* @__PURE__ */ L(n, { size: 16 }),
456
- onClick: () => Q(f("orders/new", W.id))
455
+ icon: /* @__PURE__ */ F(n, { size: 16 }),
456
+ onClick: () => Q(f("orders/new", H.id))
457
457
  }, {
458
458
  id: "edit",
459
459
  label: "Update contact details",
460
460
  description: "Keep email, phone and address current.",
461
- icon: /* @__PURE__ */ L(s, { size: 16 }),
461
+ icon: /* @__PURE__ */ F(s, { size: 16 }),
462
462
  onClick: $
463
463
  }]
464
464
  }),
465
- Ee && /* @__PURE__ */ L("div", {
465
+ Ee && /* @__PURE__ */ F("div", {
466
466
  className: "mb-2",
467
- children: /* @__PURE__ */ L(ie, { message: Ee })
467
+ children: /* @__PURE__ */ F(ce, { message: Ee })
468
468
  }),
469
- /* @__PURE__ */ R("div", {
469
+ /* @__PURE__ */ I("div", {
470
470
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
471
- children: [/* @__PURE__ */ R("div", {
471
+ children: [/* @__PURE__ */ I("div", {
472
472
  className: "lg:col-span-2 space-y-6",
473
473
  children: [
474
- /* @__PURE__ */ R(z, { children: [/* @__PURE__ */ L("h2", {
474
+ /* @__PURE__ */ I(L, { children: [/* @__PURE__ */ F("h2", {
475
475
  className: "text-base font-semibold text-text-primary mb-4",
476
476
  children: "Contact Information"
477
- }), Oe ? /* @__PURE__ */ R("div", {
477
+ }), Oe ? /* @__PURE__ */ I("div", {
478
478
  className: "space-y-4",
479
479
  children: [
480
- /* @__PURE__ */ L(N, { message: Ae }),
481
- /* @__PURE__ */ R("div", {
480
+ /* @__PURE__ */ F(M, { message: Ae }),
481
+ /* @__PURE__ */ I("div", {
482
482
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
483
483
  children: [
484
- /* @__PURE__ */ R("div", {
484
+ /* @__PURE__ */ I("div", {
485
485
  className: "space-y-2",
486
- children: [/* @__PURE__ */ R(w, {
486
+ children: [/* @__PURE__ */ I(O, {
487
487
  htmlFor: "edit-name",
488
- children: ["Name ", /* @__PURE__ */ L("span", {
488
+ children: ["Name ", /* @__PURE__ */ F("span", {
489
489
  className: "text-status-error-text",
490
490
  children: "*"
491
491
  })]
492
- }), /* @__PURE__ */ L(C, {
492
+ }), /* @__PURE__ */ F(D, {
493
493
  id: "edit-name",
494
494
  value: J.name,
495
495
  onChange: (e) => Y((t) => ({
@@ -498,12 +498,12 @@ function U() {
498
498
  }))
499
499
  })]
500
500
  }),
501
- /* @__PURE__ */ R("div", {
501
+ /* @__PURE__ */ I("div", {
502
502
  className: "space-y-2",
503
- children: [/* @__PURE__ */ L(w, {
503
+ children: [/* @__PURE__ */ F(O, {
504
504
  htmlFor: "edit-company",
505
505
  children: "Company"
506
- }), /* @__PURE__ */ L(C, {
506
+ }), /* @__PURE__ */ F(D, {
507
507
  id: "edit-company",
508
508
  value: J.company,
509
509
  onChange: (e) => Y((t) => ({
@@ -513,12 +513,12 @@ function U() {
513
513
  placeholder: "Company name (for B2B accounts)"
514
514
  })]
515
515
  }),
516
- /* @__PURE__ */ R("div", {
516
+ /* @__PURE__ */ I("div", {
517
517
  className: "space-y-2",
518
- children: [/* @__PURE__ */ L(w, {
518
+ children: [/* @__PURE__ */ F(O, {
519
519
  htmlFor: "edit-email",
520
520
  children: "Email"
521
- }), /* @__PURE__ */ L(C, {
521
+ }), /* @__PURE__ */ F(D, {
522
522
  id: "edit-email",
523
523
  type: "email",
524
524
  value: J.email,
@@ -528,12 +528,12 @@ function U() {
528
528
  }))
529
529
  })]
530
530
  }),
531
- /* @__PURE__ */ R("div", {
531
+ /* @__PURE__ */ I("div", {
532
532
  className: "space-y-2",
533
- children: [/* @__PURE__ */ L(w, {
533
+ children: [/* @__PURE__ */ F(O, {
534
534
  htmlFor: "edit-phone",
535
535
  children: "Phone"
536
- }), /* @__PURE__ */ L(C, {
536
+ }), /* @__PURE__ */ F(D, {
537
537
  id: "edit-phone",
538
538
  value: J.phone,
539
539
  onChange: (e) => Y((t) => ({
@@ -542,35 +542,35 @@ function U() {
542
542
  }))
543
543
  })]
544
544
  }),
545
- /* @__PURE__ */ R("div", {
545
+ /* @__PURE__ */ I("div", {
546
546
  className: "space-y-2",
547
- children: [/* @__PURE__ */ L(w, {
547
+ children: [/* @__PURE__ */ F(O, {
548
548
  htmlFor: "edit-type",
549
549
  children: "Customer Type"
550
- }), /* @__PURE__ */ R(T, {
550
+ }), /* @__PURE__ */ I(k, {
551
551
  value: J.type,
552
552
  onValueChange: (e) => Y((t) => ({
553
553
  ...t,
554
554
  type: e
555
555
  })),
556
- children: [/* @__PURE__ */ L(O, {
556
+ children: [/* @__PURE__ */ F(te, {
557
557
  id: "edit-type",
558
- children: /* @__PURE__ */ L(k, {})
559
- }), /* @__PURE__ */ R(E, { children: [/* @__PURE__ */ L(D, {
558
+ children: /* @__PURE__ */ F(ne, {})
559
+ }), /* @__PURE__ */ I(A, { children: [/* @__PURE__ */ F(j, {
560
560
  value: "b2c",
561
561
  children: "B2C (Individual)"
562
- }), /* @__PURE__ */ L(D, {
562
+ }), /* @__PURE__ */ F(j, {
563
563
  value: "b2b",
564
564
  children: "B2B (Business)"
565
565
  })] })]
566
566
  })]
567
567
  }),
568
- /* @__PURE__ */ R("div", {
568
+ /* @__PURE__ */ I("div", {
569
569
  className: "space-y-2",
570
- children: [/* @__PURE__ */ L(w, {
570
+ children: [/* @__PURE__ */ F(O, {
571
571
  htmlFor: "edit-rating",
572
572
  children: "Rating (0–5)"
573
- }), /* @__PURE__ */ L(C, {
573
+ }), /* @__PURE__ */ F(D, {
574
574
  id: "edit-rating",
575
575
  type: "number",
576
576
  min: 0,
@@ -585,15 +585,15 @@ function U() {
585
585
  })
586
586
  ]
587
587
  }),
588
- /* @__PURE__ */ R("div", {
588
+ /* @__PURE__ */ I("div", {
589
589
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
590
590
  children: [
591
- /* @__PURE__ */ R("div", {
591
+ /* @__PURE__ */ I("div", {
592
592
  className: "space-y-2",
593
- children: [/* @__PURE__ */ L(w, {
593
+ children: [/* @__PURE__ */ F(O, {
594
594
  htmlFor: "edit-street",
595
595
  children: "Street"
596
- }), /* @__PURE__ */ L(C, {
596
+ }), /* @__PURE__ */ F(D, {
597
597
  id: "edit-street",
598
598
  value: J.street,
599
599
  onChange: (e) => Y((t) => ({
@@ -602,12 +602,12 @@ function U() {
602
602
  }))
603
603
  })]
604
604
  }),
605
- /* @__PURE__ */ R("div", {
605
+ /* @__PURE__ */ I("div", {
606
606
  className: "space-y-2",
607
- children: [/* @__PURE__ */ L(w, {
607
+ children: [/* @__PURE__ */ F(O, {
608
608
  htmlFor: "edit-city",
609
609
  children: "City"
610
- }), /* @__PURE__ */ L(C, {
610
+ }), /* @__PURE__ */ F(D, {
611
611
  id: "edit-city",
612
612
  value: J.city,
613
613
  onChange: (e) => Y((t) => ({
@@ -616,12 +616,12 @@ function U() {
616
616
  }))
617
617
  })]
618
618
  }),
619
- /* @__PURE__ */ R("div", {
619
+ /* @__PURE__ */ I("div", {
620
620
  className: "space-y-2",
621
- children: [/* @__PURE__ */ L(w, {
621
+ children: [/* @__PURE__ */ F(O, {
622
622
  htmlFor: "edit-state",
623
623
  children: "State"
624
- }), /* @__PURE__ */ L(C, {
624
+ }), /* @__PURE__ */ F(D, {
625
625
  id: "edit-state",
626
626
  value: J.state,
627
627
  onChange: (e) => Y((t) => ({
@@ -630,12 +630,12 @@ function U() {
630
630
  }))
631
631
  })]
632
632
  }),
633
- /* @__PURE__ */ R("div", {
633
+ /* @__PURE__ */ I("div", {
634
634
  className: "space-y-2",
635
- children: [/* @__PURE__ */ L(w, {
635
+ children: [/* @__PURE__ */ F(O, {
636
636
  htmlFor: "edit-postalCode",
637
637
  children: "Postal Code"
638
- }), /* @__PURE__ */ L(C, {
638
+ }), /* @__PURE__ */ F(D, {
639
639
  id: "edit-postalCode",
640
640
  value: J.postalCode,
641
641
  onChange: (e) => Y((t) => ({
@@ -644,12 +644,12 @@ function U() {
644
644
  }))
645
645
  })]
646
646
  }),
647
- /* @__PURE__ */ R("div", {
647
+ /* @__PURE__ */ I("div", {
648
648
  className: "space-y-2",
649
- children: [/* @__PURE__ */ L(w, {
649
+ children: [/* @__PURE__ */ F(O, {
650
650
  htmlFor: "edit-country",
651
651
  children: "Country"
652
- }), /* @__PURE__ */ L(C, {
652
+ }), /* @__PURE__ */ F(D, {
653
653
  id: "edit-country",
654
654
  value: J.country,
655
655
  onChange: (e) => Y((t) => ({
@@ -658,12 +658,12 @@ function U() {
658
658
  }))
659
659
  })]
660
660
  }),
661
- /* @__PURE__ */ R("div", {
661
+ /* @__PURE__ */ I("div", {
662
662
  className: "space-y-2",
663
- children: [/* @__PURE__ */ L(w, {
663
+ children: [/* @__PURE__ */ F(O, {
664
664
  htmlFor: "edit-businessLicense",
665
665
  children: "Business License"
666
- }), /* @__PURE__ */ L(C, {
666
+ }), /* @__PURE__ */ F(D, {
667
667
  id: "edit-businessLicense",
668
668
  value: J.businessLicense,
669
669
  onChange: (e) => Y((t) => ({
@@ -672,12 +672,12 @@ function U() {
672
672
  }))
673
673
  })]
674
674
  }),
675
- /* @__PURE__ */ R("div", {
675
+ /* @__PURE__ */ I("div", {
676
676
  className: "space-y-2",
677
- children: [/* @__PURE__ */ L(w, {
677
+ children: [/* @__PURE__ */ F(O, {
678
678
  htmlFor: "edit-taxId",
679
679
  children: "Tax ID"
680
- }), /* @__PURE__ */ L(C, {
680
+ }), /* @__PURE__ */ F(D, {
681
681
  id: "edit-taxId",
682
682
  value: J.taxId,
683
683
  onChange: (e) => Y((t) => ({
@@ -689,189 +689,189 @@ function U() {
689
689
  ]
690
690
  })
691
691
  ]
692
- }) : /* @__PURE__ */ R("div", {
692
+ }) : /* @__PURE__ */ I("div", {
693
693
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
694
- children: [/* @__PURE__ */ R("div", {
694
+ children: [/* @__PURE__ */ I("div", {
695
695
  className: "space-y-4",
696
- children: [/* @__PURE__ */ R("div", {
696
+ children: [/* @__PURE__ */ I("div", {
697
697
  className: "flex items-center gap-3",
698
- children: [/* @__PURE__ */ L(r, {
698
+ children: [/* @__PURE__ */ F(r, {
699
699
  size: 18,
700
700
  className: "text-text-secondary"
701
- }), /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("p", {
701
+ }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
702
702
  className: "text-sm text-text-secondary",
703
703
  children: "Email"
704
- }), /* @__PURE__ */ L("p", {
704
+ }), /* @__PURE__ */ F("p", {
705
705
  className: "font-medium",
706
- children: W.email || "—"
706
+ children: H.email || "—"
707
707
  })] })]
708
- }), /* @__PURE__ */ R("div", {
708
+ }), /* @__PURE__ */ I("div", {
709
709
  className: "flex items-center gap-3",
710
- children: [/* @__PURE__ */ L(a, {
710
+ children: [/* @__PURE__ */ F(a, {
711
711
  size: 18,
712
712
  className: "text-text-secondary"
713
- }), /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("p", {
713
+ }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
714
714
  className: "text-sm text-text-secondary",
715
715
  children: "Phone"
716
- }), /* @__PURE__ */ L("p", {
716
+ }), /* @__PURE__ */ F("p", {
717
717
  className: "font-medium",
718
- children: W.phone || "—"
718
+ children: H.phone || "—"
719
719
  })] })]
720
720
  })]
721
- }), /* @__PURE__ */ L("div", {
721
+ }), /* @__PURE__ */ F("div", {
722
722
  className: "space-y-4",
723
- children: W.company && /* @__PURE__ */ R("div", {
723
+ children: H.company && /* @__PURE__ */ I("div", {
724
724
  className: "flex items-center gap-3",
725
- children: [/* @__PURE__ */ L(t, {
725
+ children: [/* @__PURE__ */ F(t, {
726
726
  size: 18,
727
727
  className: "text-text-secondary"
728
- }), /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("p", {
728
+ }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
729
729
  className: "text-sm text-text-secondary",
730
730
  children: "Company"
731
- }), /* @__PURE__ */ L("p", {
731
+ }), /* @__PURE__ */ F("p", {
732
732
  className: "font-medium",
733
- children: W.company
733
+ children: H.company
734
734
  })] })]
735
735
  })
736
736
  })]
737
737
  })] }),
738
- /* @__PURE__ */ R(y, { children: [/* @__PURE__ */ L(x, { children: /* @__PURE__ */ R(S, {
738
+ /* @__PURE__ */ I(C, { children: [/* @__PURE__ */ F(T, { children: /* @__PURE__ */ I(E, {
739
739
  className: "flex items-center gap-2",
740
- children: [/* @__PURE__ */ L(ee, { size: 18 }), " Address"]
741
- }) }), /* @__PURE__ */ L(b, { children: /* @__PURE__ */ L("p", { children: oe(W.address) || "—" }) })] }),
742
- /* @__PURE__ */ R(y, { children: [/* @__PURE__ */ R(x, {
740
+ children: [/* @__PURE__ */ F(ee, { size: 18 }), " Address"]
741
+ }) }), /* @__PURE__ */ F(w, { children: /* @__PURE__ */ F("p", { children: g(H.address) || "—" }) })] }),
742
+ /* @__PURE__ */ I(C, { children: [/* @__PURE__ */ I(T, {
743
743
  className: "flex flex-row items-center justify-between",
744
- children: [/* @__PURE__ */ R(S, {
744
+ children: [/* @__PURE__ */ I(E, {
745
745
  className: "flex items-center gap-2",
746
- children: [/* @__PURE__ */ L(i, { size: 18 }), " Orders"]
747
- }), /* @__PURE__ */ R(v, {
746
+ children: [/* @__PURE__ */ F(i, { size: 18 }), " Orders"]
747
+ }), /* @__PURE__ */ I(S, {
748
748
  variant: "outline",
749
749
  size: "sm",
750
- onClick: () => Q(f("orders/new", W.id)),
751
- children: [/* @__PURE__ */ L(n, { size: 14 }), " New order"]
750
+ onClick: () => Q(f("orders/new", H.id)),
751
+ children: [/* @__PURE__ */ F(n, { size: 14 }), " New order"]
752
752
  })]
753
- }), /* @__PURE__ */ L(b, { children: Te ? /* @__PURE__ */ L("p", {
753
+ }), /* @__PURE__ */ F(w, { children: Te ? /* @__PURE__ */ F("p", {
754
754
  className: "text-text-secondary text-center py-4",
755
755
  children: "Loading orders…"
756
- }) : we.length > 0 ? /* @__PURE__ */ L("div", {
756
+ }) : W.length > 0 ? /* @__PURE__ */ F("div", {
757
757
  className: "space-y-2",
758
- children: we.map((e) => /* @__PURE__ */ R("button", {
758
+ children: W.map((e) => /* @__PURE__ */ I("button", {
759
759
  type: "button",
760
760
  onClick: () => Q(`orders/${e.id}`),
761
761
  className: "w-full flex items-center justify-between gap-3 p-3 border rounded-lg text-left hover:bg-bg-sunken/50 transition-colors",
762
- children: [/* @__PURE__ */ R("div", {
762
+ children: [/* @__PURE__ */ I("div", {
763
763
  className: "min-w-0",
764
- children: [/* @__PURE__ */ L("p", {
764
+ children: [/* @__PURE__ */ F("p", {
765
765
  className: "font-medium truncate",
766
766
  children: e.orderNumber
767
- }), /* @__PURE__ */ R("p", {
767
+ }), /* @__PURE__ */ I("p", {
768
768
  className: "text-sm text-text-secondary",
769
769
  children: [
770
- P(e.createdAt, "relative"),
770
+ v(e.createdAt, "relative"),
771
771
  " ·",
772
772
  " ",
773
- se(e.pricing.total)
773
+ _(e.pricing.total)
774
774
  ]
775
775
  })]
776
- }), /* @__PURE__ */ L(M, {
776
+ }), /* @__PURE__ */ F(oe, {
777
777
  status: e.status,
778
778
  type: "order",
779
779
  size: "sm"
780
780
  })]
781
781
  }, e.id))
782
- }) : /* @__PURE__ */ R("div", {
782
+ }) : /* @__PURE__ */ I("div", {
783
783
  className: "text-center py-6",
784
784
  children: [
785
- /* @__PURE__ */ L(i, {
785
+ /* @__PURE__ */ F(i, {
786
786
  size: 32,
787
787
  className: "mx-auto mb-2 text-text-secondary opacity-50"
788
788
  }),
789
- /* @__PURE__ */ L("p", {
789
+ /* @__PURE__ */ F("p", {
790
790
  className: "text-text-secondary",
791
791
  children: "No orders yet for this customer"
792
792
  }),
793
- /* @__PURE__ */ L("button", {
793
+ /* @__PURE__ */ F("button", {
794
794
  type: "button",
795
- onClick: () => Q(f("orders/new", W.id)),
795
+ onClick: () => Q(f("orders/new", H.id)),
796
796
  className: "mt-1 text-sm text-primary hover:underline",
797
797
  children: "Book their first delivery"
798
798
  })
799
799
  ]
800
800
  }) })] })
801
801
  ]
802
- }), /* @__PURE__ */ R("div", {
802
+ }), /* @__PURE__ */ I("div", {
803
803
  className: "space-y-6",
804
804
  children: [
805
- (W.businessLicense || W.taxId) && /* @__PURE__ */ R(y, { children: [/* @__PURE__ */ L(x, { children: /* @__PURE__ */ L(S, { children: "Business Details" }) }), /* @__PURE__ */ R(b, {
805
+ (H.businessLicense || H.taxId) && /* @__PURE__ */ I(C, { children: [/* @__PURE__ */ F(T, { children: /* @__PURE__ */ F(E, { children: "Business Details" }) }), /* @__PURE__ */ I(w, {
806
806
  className: "space-y-3",
807
- children: [W.businessLicense && /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("p", {
807
+ children: [H.businessLicense && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
808
808
  className: "text-sm text-text-secondary",
809
809
  children: "Business License"
810
- }), /* @__PURE__ */ L("p", {
810
+ }), /* @__PURE__ */ F("p", {
811
811
  className: "font-mono",
812
- children: W.businessLicense
813
- })] }), W.taxId && /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("p", {
812
+ children: H.businessLicense
813
+ })] }), H.taxId && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
814
814
  className: "text-sm text-text-secondary",
815
815
  children: "Tax ID"
816
- }), /* @__PURE__ */ L("p", {
816
+ }), /* @__PURE__ */ F("p", {
817
817
  className: "font-mono",
818
- children: W.taxId
818
+ children: H.taxId
819
819
  })] })]
820
820
  })] }),
821
- /* @__PURE__ */ R(y, { children: [/* @__PURE__ */ L(x, { children: /* @__PURE__ */ L(S, { children: "Account Info" }) }), /* @__PURE__ */ R(b, {
821
+ /* @__PURE__ */ I(C, { children: [/* @__PURE__ */ F(T, { children: /* @__PURE__ */ F(E, { children: "Account Info" }) }), /* @__PURE__ */ I(w, {
822
822
  className: "space-y-3",
823
- children: [/* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("p", {
823
+ children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
824
824
  className: "text-sm text-text-secondary",
825
825
  children: "Created"
826
- }), /* @__PURE__ */ L("p", { children: P(W.createdAt, "full") })] }), /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("p", {
826
+ }), /* @__PURE__ */ F("p", { children: v(H.createdAt, "full") })] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
827
827
  className: "text-sm text-text-secondary",
828
828
  children: "Last Updated"
829
- }), /* @__PURE__ */ L("p", { children: P(W.updatedAt, "relative") })] })]
829
+ }), /* @__PURE__ */ F("p", { children: v(H.updatedAt, "relative") })] })]
830
830
  })] }),
831
- /* @__PURE__ */ R(y, {
831
+ /* @__PURE__ */ I(C, {
832
832
  className: "border-status-error-border",
833
- children: [/* @__PURE__ */ L(x, { children: /* @__PURE__ */ R(S, {
833
+ children: [/* @__PURE__ */ F(T, { children: /* @__PURE__ */ I(E, {
834
834
  className: "flex items-center gap-2 text-status-error-text",
835
- children: [/* @__PURE__ */ L(l, { size: 18 }), " Delete Customer"]
836
- }) }), /* @__PURE__ */ R(b, { children: [/* @__PURE__ */ L("p", {
835
+ children: [/* @__PURE__ */ F(l, { size: 18 }), " Delete Customer"]
836
+ }) }), /* @__PURE__ */ I(w, { children: [/* @__PURE__ */ F("p", {
837
837
  className: "mb-3 text-sm text-text-secondary",
838
838
  children: "Removes this customer from your account. Their past orders stay on record. This cannot be undone from here."
839
- }), /* @__PURE__ */ R(v, {
839
+ }), /* @__PURE__ */ I(S, {
840
840
  type: "button",
841
841
  variant: "outline",
842
842
  className: "border-status-error-border text-status-error-text hover:bg-status-error-bg-subtle",
843
843
  onClick: () => X(!0),
844
- children: [/* @__PURE__ */ L(l, { size: 16 }), " Delete this customer"]
844
+ children: [/* @__PURE__ */ F(l, { size: 16 }), " Delete this customer"]
845
845
  })] })]
846
846
  })
847
847
  ]
848
848
  })]
849
849
  }),
850
- /* @__PURE__ */ L(fe, {
850
+ /* @__PURE__ */ F(me, {
851
851
  open: je,
852
852
  onOpenChange: X,
853
- children: /* @__PURE__ */ R(pe, { children: [
854
- /* @__PURE__ */ R(ge, { children: [/* @__PURE__ */ L(_e, { children: "Delete this customer?" }), /* @__PURE__ */ R(me, { children: [
853
+ children: /* @__PURE__ */ I(he, { children: [
854
+ /* @__PURE__ */ I(ve, { children: [/* @__PURE__ */ F(ye, { children: "Delete this customer?" }), /* @__PURE__ */ I(ge, { children: [
855
855
  "This removes ",
856
- W.name,
856
+ H.name,
857
857
  " from your account. It cannot be undone from here."
858
858
  ] })] }),
859
- /* @__PURE__ */ L("div", {
859
+ /* @__PURE__ */ F("div", {
860
860
  className: "px-1",
861
- children: /* @__PURE__ */ L(N, { message: Ne })
861
+ children: /* @__PURE__ */ F(M, { message: Ne })
862
862
  }),
863
- /* @__PURE__ */ R(he, { children: [/* @__PURE__ */ L(v, {
863
+ /* @__PURE__ */ I(_e, { children: [/* @__PURE__ */ F(S, {
864
864
  variant: "outline",
865
865
  onClick: () => X(!1),
866
866
  disabled: Z,
867
867
  children: "Cancel"
868
- }), /* @__PURE__ */ L(v, {
868
+ }), /* @__PURE__ */ F(S, {
869
869
  className: "bg-status-error-text text-text-inverse hover:opacity-90",
870
870
  onClick: async () => {
871
871
  if (p) {
872
872
  Me(!0), Pe(null);
873
873
  try {
874
- await Ce(p), X(!1), Fe();
874
+ await we(p), X(!1), Fe();
875
875
  } catch (e) {
876
876
  Pe(e instanceof Error ? e.message : "Failed to delete customer."), Me(!1);
877
877
  }
@@ -883,7 +883,7 @@ function U() {
883
883
  ] })
884
884
  })
885
885
  ]
886
- }) : /* @__PURE__ */ L(ve, {});
886
+ }) : /* @__PURE__ */ F(be, {});
887
887
  }
888
888
  //#endregion
889
- export { U as default };
889
+ export { V as default };