@burdenoff/microfe-movethewheels 2026.925.1 → 2026.925.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 (47) hide show
  1. package/dist/components/StatusBadge.js +31 -31
  2. package/dist/constants/index.js +19 -5
  3. package/dist/hooks/useCustomers.js +0 -3
  4. package/dist/hooks/useFleet.js +197 -175
  5. package/dist/hooks/useInventory.js +144 -145
  6. package/dist/hooks/useRoutes.js +5 -14
  7. package/dist/movethewheels/components/StatusBadge.d.ts +3 -1
  8. package/dist/movethewheels/constants/index.d.ts +2 -0
  9. package/dist/movethewheels/hooks/useFleet.d.ts +53 -1
  10. package/dist/movethewheels/hooks/useInventory.d.ts +10 -0
  11. package/dist/movethewheels/types/index.d.ts +29 -108
  12. package/dist/node_modules/lucide-react/dist/esm/icons/sticky-note.js +11 -0
  13. package/dist/node_modules/lucide-react/dist/esm/icons/user-x.js +30 -0
  14. package/dist/pages/CustomerDetailsPage.js +666 -344
  15. package/dist/pages/CustomersPage.js +71 -80
  16. package/dist/pages/DriverDetailsPage.js +702 -421
  17. package/dist/pages/DriversPage.js +106 -117
  18. package/dist/pages/FleetPage.js +5 -13
  19. package/dist/pages/InventoryPage.js +4 -4
  20. package/dist/pages/OrderDetailsPage.js +279 -274
  21. package/dist/pages/RouteDetailsPage.js +300 -263
  22. package/dist/pages/RoutesPage.js +130 -67
  23. package/dist/pages/VehicleDetailsPage.js +562 -287
  24. package/dist/pages/VehiclesPage.js +119 -70
  25. package/dist/pages/WarehouseDetailsPage.js +410 -370
  26. package/dist/pages/WarehousesPage.js +131 -82
  27. package/package.json +1 -1
  28. package/src/movethewheels/components/StatusBadge.tsx +16 -2
  29. package/src/movethewheels/constants/index.ts +21 -0
  30. package/src/movethewheels/hooks/useCustomers.ts +0 -3
  31. package/src/movethewheels/hooks/useFleet.ts +236 -62
  32. package/src/movethewheels/hooks/useInventory.ts +76 -32
  33. package/src/movethewheels/hooks/useRoutes.ts +17 -12
  34. package/src/movethewheels/pages/CustomerDetailsPage.tsx +376 -109
  35. package/src/movethewheels/pages/CustomersPage.tsx +6 -15
  36. package/src/movethewheels/pages/DriverDetailsPage.tsx +516 -156
  37. package/src/movethewheels/pages/DriversPage.tsx +28 -11
  38. package/src/movethewheels/pages/FleetPage.tsx +9 -11
  39. package/src/movethewheels/pages/InventoryPage.tsx +14 -5
  40. package/src/movethewheels/pages/OrderDetailsPage.tsx +12 -7
  41. package/src/movethewheels/pages/RouteDetailsPage.tsx +89 -41
  42. package/src/movethewheels/pages/RoutesPage.tsx +66 -2
  43. package/src/movethewheels/pages/VehicleDetailsPage.tsx +282 -20
  44. package/src/movethewheels/pages/VehiclesPage.tsx +68 -3
  45. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +213 -135
  46. package/src/movethewheels/pages/WarehousesPage.tsx +77 -16
  47. package/src/movethewheels/types/index.ts +30 -108
@@ -10,30 +10,31 @@ import { MapPin as r } from "../node_modules/lucide-react/dist/esm/icons/map-pin
10
10
  import { Package as i } from "../node_modules/lucide-react/dist/esm/icons/package.js";
11
11
  import { Phone as ae } from "../node_modules/lucide-react/dist/esm/icons/phone.js";
12
12
  import { Printer as a } from "../node_modules/lucide-react/dist/esm/icons/printer.js";
13
+ import { Search as oe } from "../node_modules/lucide-react/dist/esm/icons/search.js";
13
14
  import { SquarePen as o } from "../node_modules/lucide-react/dist/esm/icons/square-pen.js";
14
- import { Truck as oe } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
15
- import { UserCheck as se } from "../node_modules/lucide-react/dist/esm/icons/user-check.js";
16
- import { User as ce } from "../node_modules/lucide-react/dist/esm/icons/user.js";
15
+ import { Truck as se } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
16
+ import { UserCheck as ce } from "../node_modules/lucide-react/dist/esm/icons/user-check.js";
17
+ import { User as le } from "../node_modules/lucide-react/dist/esm/icons/user.js";
17
18
  import { joinPath as s } from "../utils/navigation.js";
18
- import { useMoveTheWheels as le } from "../providers/MoveTheWheelsProvider.js";
19
- import { useOrder as ue, useOrders as de } from "../hooks/useOrders.js";
20
- import { useDriver as fe, useDrivers as pe, useVehicle as me, useVehicles as he } from "../hooks/useFleet.js";
21
- import { Badge as c, Button as l, Card as u, CardContent as d, CardHeader as f, CardTitle as p, Input as ge, Label as m, Separator as h, Table as _e, TableBody as ve, TableCell as g, TableHead as _, TableHeader as ye, TableRow as be } from "../components/ui.js";
19
+ import { useMoveTheWheels as ue } from "../providers/MoveTheWheelsProvider.js";
20
+ import { useOrder as de, useOrders as fe } from "../hooks/useOrders.js";
21
+ import { useDriver as pe, useDrivers as me, useVehicle as he, useVehicles as ge } from "../hooks/useFleet.js";
22
+ import { Badge as c, Button as l, Card as u, CardContent as d, CardHeader as f, CardTitle as p, Input as _e, Label as m, Separator as h, Table as ve, TableBody as ye, TableCell as g, TableHead as _, TableHeader as be, TableRow as v } from "../components/ui.js";
22
23
  import { ErrorState as xe, LoadingState as Se, PageLayout as Ce } from "../components/PageLayout.js";
23
- import { PaymentStatusBadge as we, PriorityBadge as Te, StatusBadge as v } from "../components/StatusBadge.js";
24
+ import { PaymentStatusBadge as we, PriorityBadge as Te, StatusBadge as y } from "../components/StatusBadge.js";
24
25
  import { FormError as Ee } from "../components/FormError.js";
25
26
  import { Notice as De, useNotice as Oe } from "../components/Notice.js";
26
- import { formatAddress as y, formatCurrency as b, formatDate as x } from "../utils/formatters.js";
27
+ import { formatAddress as b, formatCurrency as x, formatDate as S } from "../utils/formatters.js";
27
28
  import { DocumentsCard as ke } from "../components/DocumentsCard.js";
28
29
  import { useDebouncedValue as Ae } from "../hooks/useDebouncedValue.js";
29
- import { EntityCombobox as S } from "../components/EntityCombobox.js";
30
+ import { EntityCombobox as C } from "../components/EntityCombobox.js";
30
31
  import { ProofOfDeliveryCard as je } from "../components/ProofOfDeliveryCard.js";
31
- import { useEffect as C, useState as w } from "react";
32
+ import { useEffect as w, useState as T } from "react";
32
33
  import { useParams as Me } from "react-router";
33
- import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
34
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
34
35
  import { EmphasisPanel as Ne, NextSteps as Pe, PagePurpose as Fe } from "@burdenoff/fe-libs/ui";
35
36
  //#region src/movethewheels/pages/OrderDetailsPage.tsx
36
- var O = [
37
+ var k = [
37
38
  "pending",
38
39
  "confirmed",
39
40
  "assigned",
@@ -41,7 +42,7 @@ var O = [
41
42
  "in_transit",
42
43
  "out_for_delivery",
43
44
  "delivered"
44
- ], k = {
45
+ ], A = {
45
46
  pending: "Pending",
46
47
  confirmed: "Confirmed",
47
48
  assigned: "Assigned",
@@ -52,389 +53,389 @@ var O = [
52
53
  returned: "Returned",
53
54
  cancelled: "Cancelled",
54
55
  failed: "Failed"
55
- }, A = new Set([
56
+ }, j = new Set([
56
57
  "delivered",
57
58
  "returned",
58
59
  "cancelled",
59
60
  "failed"
60
61
  ]);
61
62
  function Ie(e) {
62
- let t = O.indexOf(e);
63
- return t === -1 || t >= O.length - 1 ? null : O[t + 1];
63
+ let t = k.indexOf(e);
64
+ return t === -1 || t >= k.length - 1 ? null : k[t + 1];
64
65
  }
65
- function j() {
66
- let { orderId: O } = Me(), { basePath: j, navigate: M } = le(), { order: N, isLoading: Le, error: Re, refetch: P } = ue(O), { updateOrder: ze, updateOrderStatus: F } = de(), [I, Be] = w(""), [L, R] = w(""), [z, B] = w(""), [V, H] = w(!1), [U, W] = w(!1), [G, K] = w(null), Ve = Ae(I), { vehicles: q, isLoading: J } = he({
66
+ function M() {
67
+ let { orderId: k } = Me(), { basePath: M, navigate: N } = ue(), { order: P, isLoading: Le, error: Re, refetch: F } = de(k), { updateOrder: ze, updateOrderStatus: I } = fe(), [L, Be] = T(""), [R, z] = T(""), [B, V] = T(""), [H, U] = T(!1), [W, G] = T(!1), [K, q] = T(null), J = Ae(L), { vehicles: Y, isLoading: X } = ge({
67
68
  limit: 20,
68
- search: Ve || void 0,
69
- driverId: z || void 0
70
- }), { drivers: Y, isLoading: X } = pe({
69
+ search: J || void 0,
70
+ driverId: B || void 0
71
+ }), { drivers: Z, isLoading: Q } = me({
71
72
  limit: 20,
72
- search: Ve || void 0,
73
- vehicleId: L || void 0
74
- }), { vehicle: He, isLoading: Ue } = me(L || void 0), { driver: We, isLoading: Ge } = fe(z || void 0), { message: Ke, notify: Z } = Oe(), qe = q.filter((e) => e.status === "available" || e.id === N?.vehicleId), Je = Y.filter((e) => e.status === "available" || e.id === N?.driverId);
75
- C(() => {
76
- !X && z && !Y.some((e) => e.id === z) && B("");
73
+ search: J || void 0,
74
+ vehicleId: R || void 0
75
+ }), { vehicle: Ve, isLoading: He } = he(R || void 0), { driver: Ue, isLoading: We } = pe(B || void 0), { message: Ge, notify: Ke } = Oe(), qe = Y.filter((e) => e.status === "available" || e.id === P?.vehicleId), Je = Z.filter((e) => e.status === "available" || e.id === P?.driverId);
76
+ w(() => {
77
+ !Q && B && !Z.some((e) => e.id === B) && V("");
77
78
  }, [
78
- Y,
79
- X,
80
- z
81
- ]), C(() => {
82
- !J && L && !q.some((e) => e.id === L) && R("");
79
+ Z,
80
+ Q,
81
+ B
82
+ ]), w(() => {
83
+ !X && R && !Y.some((e) => e.id === R) && z("");
83
84
  }, [
84
- L,
85
- q,
86
- J
85
+ R,
86
+ Y,
87
+ X
87
88
  ]);
88
89
  let Ye = async () => {
89
- if (!O || !N) {
90
- K("This order is no longer available. Refresh and try again.");
90
+ if (!k || !P) {
91
+ q("This order is no longer available. Refresh and try again.");
91
92
  return;
92
93
  }
93
- let e = L || N.vehicleId, t = z || N.driverId;
94
+ let e = R || P.vehicleId, t = B || P.driverId;
94
95
  if (!e || !t) {
95
- K("Select both a compatible vehicle and driver before dispatching.");
96
+ q("Select both a compatible vehicle and driver before dispatching.");
96
97
  return;
97
98
  }
98
- let n = !!(N.vehicleId && N.driverId);
99
- H(!0), K(null);
99
+ let n = !!(P.vehicleId && P.driverId);
100
+ U(!0), q(null);
100
101
  try {
101
- await ze(O, {
102
+ await ze(k, {
102
103
  vehicleId: e,
103
104
  driverId: t
104
- }), !n && N.status === "confirmed" && await F(O, "assigned"), Z(!n && N.status === "confirmed" ? "Fleet assigned and order advanced to Assigned." : "Assignment updated."), R(""), B(""), P();
105
+ }), !n && P.status === "confirmed" && await I(k, "assigned"), Ke(!n && P.status === "confirmed" ? "Fleet assigned and order advanced to Assigned." : "Assignment updated."), z(""), V(""), F();
105
106
  } catch (e) {
106
- K(e instanceof Error ? e.message : "Failed to update assignment.");
107
+ q(e instanceof Error ? e.message : "Failed to update assignment.");
107
108
  } finally {
108
- H(!1);
109
+ U(!1);
109
110
  }
110
- }, Q = async (e, t) => {
111
- if (!(!O || !N)) {
112
- if (e === "assigned" && (!N.vehicleId || !N.driverId)) {
113
- K("Assign both a compatible vehicle and driver before advancing to Assigned.");
111
+ }, Xe = async (e, t) => {
112
+ if (!(!k || !P)) {
113
+ if (e === "assigned" && (!P.vehicleId || !P.driverId)) {
114
+ q("Assign both a compatible vehicle and driver before advancing to Assigned.");
114
115
  return;
115
116
  }
116
- if (!A.has(N.status)) {
117
- W(!0), K(null);
117
+ if (!j.has(P.status)) {
118
+ G(!0), q(null);
118
119
  try {
119
- await F(O, e), Z(t), P();
120
+ await I(k, e), Ke(t), F();
120
121
  } catch (e) {
121
- K(e instanceof Error ? e.message : "Failed to update status.");
122
+ q(e instanceof Error ? e.message : "Failed to update status.");
122
123
  } finally {
123
- W(!1);
124
+ G(!1);
124
125
  }
125
126
  }
126
127
  }
127
128
  }, $ = (e) => {
128
- M && M(s(j, e));
129
+ N && N(s(M, e));
129
130
  };
130
- return Le ? /* @__PURE__ */ E(Se, { message: "Loading order details..." }) : Re || !N ? /* @__PURE__ */ E(xe, {
131
+ return Le ? /* @__PURE__ */ D(Se, { message: "Loading order details..." }) : Re || !P ? /* @__PURE__ */ D(xe, {
131
132
  title: "Order not found",
132
133
  message: "The order you're looking for doesn't exist or has been removed.",
133
- onRetry: P
134
- }) : /* @__PURE__ */ D(Ce, {
135
- title: N.orderNumber,
136
- subtitle: `Created ${x(N.createdAt, "full")}`,
137
- icon: /* @__PURE__ */ E(i, { size: 24 }),
138
- headerActions: /* @__PURE__ */ D("div", {
134
+ onRetry: F
135
+ }) : /* @__PURE__ */ O(Ce, {
136
+ title: P.orderNumber,
137
+ subtitle: `Created ${S(P.createdAt, "full")}`,
138
+ icon: /* @__PURE__ */ D(i, { size: 24 }),
139
+ headerActions: /* @__PURE__ */ O("div", {
139
140
  className: "flex gap-2",
140
141
  children: [
141
- /* @__PURE__ */ D(l, {
142
+ /* @__PURE__ */ O(l, {
142
143
  variant: "outline",
143
144
  onClick: () => {
144
- M && M(s(j, "orders"));
145
+ N && N(s(M, "orders"));
145
146
  },
146
- children: [/* @__PURE__ */ E(e, { size: 16 }), "Back"]
147
+ children: [/* @__PURE__ */ D(e, { size: 16 }), "Back"]
147
148
  }),
148
- /* @__PURE__ */ D(l, {
149
+ /* @__PURE__ */ O(l, {
149
150
  variant: "outline",
150
151
  onClick: () => window.print(),
151
- children: [/* @__PURE__ */ E(a, { size: 16 }), "Print"]
152
+ children: [/* @__PURE__ */ D(a, { size: 16 }), "Print"]
152
153
  }),
153
- /* @__PURE__ */ D(l, {
154
- onClick: () => $(`orders/${O}/edit`),
155
- children: [/* @__PURE__ */ E(o, { size: 16 }), "Edit"]
154
+ /* @__PURE__ */ O(l, {
155
+ onClick: () => $(`orders/${k}/edit`),
156
+ children: [/* @__PURE__ */ D(o, { size: 16 }), "Edit"]
156
157
  })
157
158
  ]
158
159
  }),
159
- headerContent: /* @__PURE__ */ D("div", {
160
+ headerContent: /* @__PURE__ */ O("div", {
160
161
  className: "flex flex-wrap gap-2",
161
162
  children: [
162
- /* @__PURE__ */ E(v, {
163
- status: N.status,
163
+ /* @__PURE__ */ D(y, {
164
+ status: P.status,
164
165
  type: "order"
165
166
  }),
166
- /* @__PURE__ */ E(Te, { priority: N.priority }),
167
- /* @__PURE__ */ E(we, { status: N.pricing.paymentStatus })
167
+ /* @__PURE__ */ D(Te, { priority: P.priority }),
168
+ /* @__PURE__ */ D(we, { status: P.pricing.paymentStatus })
168
169
  ]
169
170
  }),
170
171
  children: [
171
- /* @__PURE__ */ E(Fe, {
172
- icon: /* @__PURE__ */ E(i, { size: 18 }),
172
+ /* @__PURE__ */ D(Fe, {
173
+ icon: /* @__PURE__ */ D(i, { size: 18 }),
173
174
  children: "Everything about this one delivery in a single place — who it's for, where it's going, what's inside, the running cost and the full status history. Use this page to review the order, hand it to a driver, print the docket, or jump into live tracking."
174
175
  }),
175
- /* @__PURE__ */ E(Pe, {
176
+ /* @__PURE__ */ D(Pe, {
176
177
  storageKey: "movethewheels-order-details",
177
178
  steps: [
178
179
  {
179
180
  id: "track",
180
181
  label: "Track this order live",
181
182
  description: "See where the shipment is right now on the map.",
182
- icon: /* @__PURE__ */ E(r, { size: 16 }),
183
- onClick: () => $(`tracking?order=${N.id}`)
183
+ icon: /* @__PURE__ */ D(r, { size: 16 }),
184
+ onClick: () => $(`tracking?order=${P.id}`)
184
185
  },
185
186
  {
186
187
  id: "edit",
187
188
  label: "Edit order details",
188
189
  description: "Update items, addresses or instructions before dispatch.",
189
- icon: /* @__PURE__ */ E(o, { size: 16 }),
190
- onClick: () => $(`orders/${O}/edit`)
190
+ icon: /* @__PURE__ */ D(o, { size: 16 }),
191
+ onClick: () => $(`orders/${k}/edit`)
191
192
  },
192
193
  {
193
194
  id: "print",
194
195
  label: "Print the delivery docket",
195
196
  description: "Generate a printable copy for the driver or warehouse.",
196
- icon: /* @__PURE__ */ E(a, { size: 16 }),
197
+ icon: /* @__PURE__ */ D(a, { size: 16 }),
197
198
  onClick: () => window.print()
198
199
  }
199
200
  ]
200
201
  }),
201
- /* @__PURE__ */ D("div", {
202
+ /* @__PURE__ */ O("div", {
202
203
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
203
- children: [/* @__PURE__ */ D("div", {
204
+ children: [/* @__PURE__ */ O("div", {
204
205
  className: "lg:col-span-2 space-y-6",
205
206
  children: [
206
- /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(f, { children: /* @__PURE__ */ D(p, {
207
+ /* @__PURE__ */ O(u, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ O(p, {
207
208
  className: "flex items-center gap-2",
208
- children: [/* @__PURE__ */ E(ce, { size: 18 }), "Customer Information"]
209
- }) }), /* @__PURE__ */ E(d, { children: /* @__PURE__ */ D("div", {
209
+ children: [/* @__PURE__ */ D(le, { size: 18 }), "Customer Information"]
210
+ }) }), /* @__PURE__ */ D(d, { children: /* @__PURE__ */ O("div", {
210
211
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
211
- children: [/* @__PURE__ */ D("div", { children: [
212
- /* @__PURE__ */ E("h4", {
212
+ children: [/* @__PURE__ */ O("div", { children: [
213
+ /* @__PURE__ */ D("h4", {
213
214
  className: "font-medium mb-2",
214
- children: N.customerInfo.name
215
+ children: P.customerInfo.name
215
216
  }),
216
- N.customerInfo.company && /* @__PURE__ */ E("p", {
217
+ P.customerInfo.company && /* @__PURE__ */ D("p", {
217
218
  className: "text-sm text-text-secondary mb-2",
218
- children: N.customerInfo.company
219
+ children: P.customerInfo.company
219
220
  }),
220
- /* @__PURE__ */ D("div", {
221
+ /* @__PURE__ */ O("div", {
221
222
  className: "space-y-1 text-sm",
222
- children: [/* @__PURE__ */ D("p", {
223
+ children: [/* @__PURE__ */ O("p", {
223
224
  className: "flex items-center gap-2",
224
- children: [/* @__PURE__ */ E(ie, {
225
+ children: [/* @__PURE__ */ D(ie, {
225
226
  size: 14,
226
227
  className: "text-text-secondary"
227
- }), N.customerInfo.email]
228
- }), /* @__PURE__ */ D("p", {
228
+ }), P.customerInfo.email]
229
+ }), /* @__PURE__ */ O("p", {
229
230
  className: "flex items-center gap-2",
230
- children: [/* @__PURE__ */ E(ae, {
231
+ children: [/* @__PURE__ */ D(ae, {
231
232
  size: 14,
232
233
  className: "text-text-secondary"
233
- }), N.customerInfo.phone]
234
+ }), P.customerInfo.phone]
234
235
  })]
235
236
  })
236
- ] }), /* @__PURE__ */ D("div", { children: [N.customerInfo.preferredDeliveryTime && /* @__PURE__ */ D("div", {
237
+ ] }), /* @__PURE__ */ O("div", { children: [P.customerInfo.preferredDeliveryTime && /* @__PURE__ */ O("div", {
237
238
  className: "mb-2",
238
- children: [/* @__PURE__ */ E("p", {
239
+ children: [/* @__PURE__ */ D("p", {
239
240
  className: "text-sm text-text-secondary",
240
241
  children: "Preferred Delivery Time"
241
- }), /* @__PURE__ */ E("p", {
242
+ }), /* @__PURE__ */ D("p", {
242
243
  className: "text-sm",
243
- children: N.customerInfo.preferredDeliveryTime
244
+ children: P.customerInfo.preferredDeliveryTime
244
245
  })]
245
- }), N.customerInfo.deliveryInstructions && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
246
+ }), P.customerInfo.deliveryInstructions && /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
246
247
  className: "text-sm text-text-secondary",
247
248
  children: "Delivery Instructions"
248
- }), /* @__PURE__ */ E("p", {
249
+ }), /* @__PURE__ */ D("p", {
249
250
  className: "text-sm",
250
- children: N.customerInfo.deliveryInstructions
251
+ children: P.customerInfo.deliveryInstructions
251
252
  })] })] })]
252
253
  }) })] }),
253
- /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(f, { children: /* @__PURE__ */ D(p, {
254
+ /* @__PURE__ */ O(u, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ O(p, {
254
255
  className: "flex items-center gap-2",
255
- children: [/* @__PURE__ */ E(r, { size: 18 }), "Addresses"]
256
- }) }), /* @__PURE__ */ E(d, { children: /* @__PURE__ */ D("div", {
256
+ children: [/* @__PURE__ */ D(r, { size: 18 }), "Addresses"]
257
+ }) }), /* @__PURE__ */ D(d, { children: /* @__PURE__ */ O("div", {
257
258
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
258
- children: [/* @__PURE__ */ D("div", { children: [
259
- /* @__PURE__ */ E("h4", {
259
+ children: [/* @__PURE__ */ O("div", { children: [
260
+ /* @__PURE__ */ D("h4", {
260
261
  className: "font-medium mb-2 flex items-center gap-2",
261
- children: /* @__PURE__ */ E(c, {
262
+ children: /* @__PURE__ */ D(c, {
262
263
  variant: "outline",
263
264
  children: "Pickup"
264
265
  })
265
266
  }),
266
- /* @__PURE__ */ E("p", {
267
+ /* @__PURE__ */ D("p", {
267
268
  className: "text-sm",
268
- children: y(N.pickupAddress)
269
+ children: b(P.pickupAddress)
269
270
  }),
270
- N.scheduledPickup && /* @__PURE__ */ D("p", {
271
+ P.scheduledPickup && /* @__PURE__ */ O("p", {
271
272
  className: "text-sm text-text-secondary mt-2",
272
- children: ["Scheduled: ", x(N.scheduledPickup, "full")]
273
+ children: ["Scheduled: ", S(P.scheduledPickup, "full")]
273
274
  }),
274
- N.actualPickup && /* @__PURE__ */ D("p", {
275
+ P.actualPickup && /* @__PURE__ */ O("p", {
275
276
  className: "text-sm text-status-success-text mt-1",
276
277
  children: [
277
- /* @__PURE__ */ E(n, {
278
+ /* @__PURE__ */ D(n, {
278
279
  size: 14,
279
280
  className: "inline mr-1"
280
281
  }),
281
282
  "Picked up: ",
282
- x(N.actualPickup, "full")
283
+ S(P.actualPickup, "full")
283
284
  ]
284
285
  })
285
- ] }), /* @__PURE__ */ D("div", { children: [
286
- /* @__PURE__ */ E("h4", {
286
+ ] }), /* @__PURE__ */ O("div", { children: [
287
+ /* @__PURE__ */ D("h4", {
287
288
  className: "font-medium mb-2 flex items-center gap-2",
288
- children: /* @__PURE__ */ E(c, {
289
+ children: /* @__PURE__ */ D(c, {
289
290
  variant: "outline",
290
291
  children: "Delivery"
291
292
  })
292
293
  }),
293
- /* @__PURE__ */ E("p", {
294
+ /* @__PURE__ */ D("p", {
294
295
  className: "text-sm",
295
- children: y(N.deliveryAddress)
296
+ children: b(P.deliveryAddress)
296
297
  }),
297
- N.scheduledDelivery && /* @__PURE__ */ D("p", {
298
+ P.scheduledDelivery && /* @__PURE__ */ O("p", {
298
299
  className: "text-sm text-text-secondary mt-2",
299
- children: ["Scheduled: ", x(N.scheduledDelivery, "full")]
300
+ children: ["Scheduled: ", S(P.scheduledDelivery, "full")]
300
301
  }),
301
- N.actualDelivery && /* @__PURE__ */ D("p", {
302
+ P.actualDelivery && /* @__PURE__ */ O("p", {
302
303
  className: "text-sm text-status-success-text mt-1",
303
304
  children: [
304
- /* @__PURE__ */ E(n, {
305
+ /* @__PURE__ */ D(n, {
305
306
  size: 14,
306
307
  className: "inline mr-1"
307
308
  }),
308
309
  "Delivered: ",
309
- x(N.actualDelivery, "full")
310
+ S(P.actualDelivery, "full")
310
311
  ]
311
312
  })
312
313
  ] })]
313
314
  }) })] }),
314
- /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(f, { children: /* @__PURE__ */ D(p, {
315
+ /* @__PURE__ */ O(u, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ O(p, {
315
316
  className: "flex items-center gap-2",
316
- children: [/* @__PURE__ */ E(oe, { size: 18 }), "Saved Route"]
317
- }) }), /* @__PURE__ */ E(d, { children: N.route ? /* @__PURE__ */ D("div", {
317
+ children: [/* @__PURE__ */ D(se, { size: 18 }), "Saved Route"]
318
+ }) }), /* @__PURE__ */ D(d, { children: P.route ? /* @__PURE__ */ O("div", {
318
319
  className: "space-y-3",
319
- children: [/* @__PURE__ */ D("div", {
320
+ children: [/* @__PURE__ */ O("div", {
320
321
  className: "flex items-center justify-between gap-3",
321
- children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
322
+ children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
322
323
  className: "font-medium",
323
- children: N.route.name
324
- }), /* @__PURE__ */ D("p", {
324
+ children: P.route.name
325
+ }), /* @__PURE__ */ O("p", {
325
326
  className: "text-sm text-text-secondary",
326
327
  children: [
327
- N.route.stops.length,
328
+ P.route.stops.length,
328
329
  " stops ·",
329
330
  " ",
330
- N.route.status.replace("_", " ").toLowerCase()
331
+ P.route.status.replace("_", " ").toLowerCase()
331
332
  ]
332
- })] }), /* @__PURE__ */ E(c, {
333
+ })] }), /* @__PURE__ */ D(c, {
333
334
  variant: "outline",
334
335
  children: "Reusable route"
335
336
  })]
336
- }), /* @__PURE__ */ E("div", {
337
+ }), /* @__PURE__ */ D("div", {
337
338
  className: "space-y-2",
338
- children: N.route.stops.map((e, t) => /* @__PURE__ */ D("div", {
339
+ children: P.route.stops.map((e, t) => /* @__PURE__ */ O("div", {
339
340
  className: "flex items-start gap-2 text-sm",
340
- children: [/* @__PURE__ */ D("span", {
341
+ children: [/* @__PURE__ */ O("span", {
341
342
  className: "text-text-secondary",
342
343
  children: [t + 1, "."]
343
- }), /* @__PURE__ */ D("span", { children: [
344
- /* @__PURE__ */ E("span", {
344
+ }), /* @__PURE__ */ O("span", { children: [
345
+ /* @__PURE__ */ D("span", {
345
346
  className: "font-medium capitalize",
346
347
  children: e.type
347
348
  }),
348
349
  " ·",
349
350
  " ",
350
- y(e.address)
351
+ b(e.address)
351
352
  ] })]
352
353
  }, e.id))
353
354
  })]
354
- }) : /* @__PURE__ */ E("p", {
355
+ }) : /* @__PURE__ */ D("p", {
355
356
  className: "text-sm text-text-secondary",
356
357
  children: "No saved route was selected for this order."
357
358
  }) })] }),
358
- /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(f, { children: /* @__PURE__ */ D(p, {
359
+ /* @__PURE__ */ O(u, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ O(p, {
359
360
  className: "flex items-center gap-2",
360
361
  children: [
361
- /* @__PURE__ */ E(i, { size: 18 }),
362
+ /* @__PURE__ */ D(i, { size: 18 }),
362
363
  "Order Items (",
363
- N.items.length,
364
+ P.items.length,
364
365
  ")"
365
366
  ]
366
- }) }), /* @__PURE__ */ E(d, {
367
+ }) }), /* @__PURE__ */ D(d, {
367
368
  className: "p-0",
368
- children: /* @__PURE__ */ D(_e, { children: [/* @__PURE__ */ E(ye, { children: /* @__PURE__ */ D(be, { children: [
369
- /* @__PURE__ */ E(_, { children: "Item" }),
370
- /* @__PURE__ */ E(_, { children: "SKU" }),
371
- /* @__PURE__ */ E(_, {
369
+ children: /* @__PURE__ */ O(ve, { children: [/* @__PURE__ */ D(be, { children: /* @__PURE__ */ O(v, { children: [
370
+ /* @__PURE__ */ D(_, { children: "Item" }),
371
+ /* @__PURE__ */ D(_, { children: "SKU" }),
372
+ /* @__PURE__ */ D(_, {
372
373
  className: "text-center",
373
374
  children: "Qty"
374
375
  }),
375
- /* @__PURE__ */ E(_, {
376
+ /* @__PURE__ */ D(_, {
376
377
  className: "text-right",
377
378
  children: "Unit Price"
378
379
  }),
379
- /* @__PURE__ */ E(_, {
380
+ /* @__PURE__ */ D(_, {
380
381
  className: "text-right",
381
382
  children: "Total"
382
383
  })
383
- ] }) }), /* @__PURE__ */ E(ve, { children: N.items.map((e) => /* @__PURE__ */ D(be, { children: [
384
- /* @__PURE__ */ E(g, { children: /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
384
+ ] }) }), /* @__PURE__ */ D(ye, { children: P.items.map((e) => /* @__PURE__ */ O(v, { children: [
385
+ /* @__PURE__ */ D(g, { children: /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
385
386
  className: "font-medium",
386
387
  children: e.name
387
- }), e.description && /* @__PURE__ */ E("p", {
388
+ }), e.description && /* @__PURE__ */ D("p", {
388
389
  className: "text-sm text-text-secondary",
389
390
  children: e.description
390
391
  })] }) }),
391
- /* @__PURE__ */ E(g, {
392
+ /* @__PURE__ */ D(g, {
392
393
  className: "font-mono text-sm",
393
394
  children: e.sku
394
395
  }),
395
- /* @__PURE__ */ E(g, {
396
+ /* @__PURE__ */ D(g, {
396
397
  className: "text-center",
397
398
  children: e.quantity
398
399
  }),
399
- /* @__PURE__ */ E(g, {
400
+ /* @__PURE__ */ D(g, {
400
401
  className: "text-right",
401
- children: b(e.value)
402
+ children: x(e.value)
402
403
  }),
403
- /* @__PURE__ */ E(g, {
404
+ /* @__PURE__ */ D(g, {
404
405
  className: "text-right font-medium",
405
- children: b(e.value * e.quantity)
406
+ children: x(e.value * e.quantity)
406
407
  })
407
408
  ] }, e.id)) })] })
408
409
  })] }),
409
- /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(f, { children: /* @__PURE__ */ D(p, {
410
+ /* @__PURE__ */ O(u, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ O(p, {
410
411
  className: "flex items-center gap-2",
411
- children: [/* @__PURE__ */ E(te, { size: 18 }), "Order Timeline"]
412
- }) }), /* @__PURE__ */ E(d, { children: /* @__PURE__ */ E("div", {
412
+ children: [/* @__PURE__ */ D(te, { size: 18 }), "Order Timeline"]
413
+ }) }), /* @__PURE__ */ D(d, { children: /* @__PURE__ */ D("div", {
413
414
  className: "relative",
414
- children: N.timeline.map((e, t) => /* @__PURE__ */ D("div", {
415
+ children: P.timeline.map((e, t) => /* @__PURE__ */ O("div", {
415
416
  className: "flex gap-4 pb-6 last:pb-0",
416
- children: [/* @__PURE__ */ D("div", {
417
+ children: [/* @__PURE__ */ O("div", {
417
418
  className: "relative",
418
- children: [/* @__PURE__ */ E("div", { className: "w-3 h-3 rounded-full bg-action-primary-bg mt-1.5" }), t < N.timeline.length - 1 && /* @__PURE__ */ E("div", { className: "absolute top-4 left-1.5 w-px h-full -ml-px bg-border" })]
419
- }), /* @__PURE__ */ D("div", {
419
+ children: [/* @__PURE__ */ D("div", { className: "w-3 h-3 rounded-full bg-action-primary-bg mt-1.5" }), t < P.timeline.length - 1 && /* @__PURE__ */ D("div", { className: "absolute top-4 left-1.5 w-px h-full -ml-px bg-border" })]
420
+ }), /* @__PURE__ */ O("div", {
420
421
  className: "flex-1",
421
422
  children: [
422
- /* @__PURE__ */ D("div", {
423
+ /* @__PURE__ */ O("div", {
423
424
  className: "flex items-center gap-2 mb-1",
424
- children: [/* @__PURE__ */ E(v, {
425
+ children: [/* @__PURE__ */ D(y, {
425
426
  status: e.status,
426
427
  type: "order",
427
428
  size: "sm"
428
- }), /* @__PURE__ */ E("span", {
429
+ }), /* @__PURE__ */ D("span", {
429
430
  className: "text-sm text-text-secondary",
430
- children: x(e.timestamp, "full")
431
+ children: S(e.timestamp, "full")
431
432
  })]
432
433
  }),
433
- e.notes && /* @__PURE__ */ E("p", {
434
+ e.notes && /* @__PURE__ */ D("p", {
434
435
  className: "text-sm",
435
436
  children: e.notes
436
437
  }),
437
- /* @__PURE__ */ D("p", {
438
+ /* @__PURE__ */ O("p", {
438
439
  className: "text-xs text-text-secondary",
439
440
  children: ["by ", e.performedBy]
440
441
  })
@@ -443,219 +444,223 @@ function j() {
443
444
  }, t))
444
445
  }) })] })
445
446
  ]
446
- }), /* @__PURE__ */ D("div", {
447
+ }), /* @__PURE__ */ O("div", {
447
448
  className: "space-y-6",
448
449
  children: [
449
- /* @__PURE__ */ D(Ne, { children: [/* @__PURE__ */ D("h2", {
450
+ /* @__PURE__ */ O(Ne, { children: [/* @__PURE__ */ O("h2", {
450
451
  className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
451
- children: [/* @__PURE__ */ E(ne, { size: 18 }), "Order Summary"]
452
- }), /* @__PURE__ */ D("div", {
452
+ children: [/* @__PURE__ */ D(ne, { size: 18 }), "Order Summary"]
453
+ }), /* @__PURE__ */ O("div", {
453
454
  className: "space-y-3",
454
455
  children: [
455
- /* @__PURE__ */ D("div", {
456
+ /* @__PURE__ */ O("div", {
456
457
  className: "flex justify-between text-sm",
457
- children: [/* @__PURE__ */ E("span", {
458
+ children: [/* @__PURE__ */ D("span", {
458
459
  className: "text-text-secondary",
459
460
  children: "Subtotal"
460
- }), /* @__PURE__ */ E("span", { children: b(N.pricing.subtotal) })]
461
+ }), /* @__PURE__ */ D("span", { children: x(P.pricing.subtotal) })]
461
462
  }),
462
- /* @__PURE__ */ D("div", {
463
+ /* @__PURE__ */ O("div", {
463
464
  className: "flex justify-between text-sm",
464
- children: [/* @__PURE__ */ E("span", {
465
+ children: [/* @__PURE__ */ D("span", {
465
466
  className: "text-text-secondary",
466
467
  children: "Delivery"
467
- }), /* @__PURE__ */ E("span", { children: b(N.pricing.fees.delivery) })]
468
+ }), /* @__PURE__ */ D("span", { children: x(P.pricing.fees.delivery) })]
468
469
  }),
469
- /* @__PURE__ */ D("div", {
470
+ /* @__PURE__ */ O("div", {
470
471
  className: "flex justify-between text-sm",
471
- children: [/* @__PURE__ */ E("span", {
472
+ children: [/* @__PURE__ */ D("span", {
472
473
  className: "text-text-secondary",
473
474
  children: "Handling"
474
- }), /* @__PURE__ */ E("span", { children: b(N.pricing.fees.handling) })]
475
+ }), /* @__PURE__ */ D("span", { children: x(P.pricing.fees.handling) })]
475
476
  }),
476
- N.pricing.fees.insurance && /* @__PURE__ */ D("div", {
477
+ P.pricing.fees.insurance && /* @__PURE__ */ O("div", {
477
478
  className: "flex justify-between text-sm",
478
- children: [/* @__PURE__ */ E("span", {
479
+ children: [/* @__PURE__ */ D("span", {
479
480
  className: "text-text-secondary",
480
481
  children: "Insurance"
481
- }), /* @__PURE__ */ E("span", { children: b(N.pricing.fees.insurance) })]
482
+ }), /* @__PURE__ */ D("span", { children: x(P.pricing.fees.insurance) })]
482
483
  }),
483
- /* @__PURE__ */ D("div", {
484
+ /* @__PURE__ */ O("div", {
484
485
  className: "flex justify-between text-sm",
485
- children: [/* @__PURE__ */ E("span", {
486
+ children: [/* @__PURE__ */ D("span", {
486
487
  className: "text-text-secondary",
487
488
  children: "Taxes"
488
- }), /* @__PURE__ */ E("span", { children: b(N.pricing.taxes) })]
489
+ }), /* @__PURE__ */ D("span", { children: x(P.pricing.taxes) })]
489
490
  }),
490
- /* @__PURE__ */ E(h, {}),
491
- /* @__PURE__ */ D("div", {
491
+ /* @__PURE__ */ D(h, {}),
492
+ /* @__PURE__ */ O("div", {
492
493
  className: "flex justify-between font-medium",
493
- children: [/* @__PURE__ */ E("span", { children: "Total" }), /* @__PURE__ */ E("span", {
494
+ children: [/* @__PURE__ */ D("span", { children: "Total" }), /* @__PURE__ */ D("span", {
494
495
  className: "text-lg",
495
- children: b(N.pricing.total)
496
+ children: x(P.pricing.total)
496
497
  })]
497
498
  }),
498
- /* @__PURE__ */ D("div", {
499
+ /* @__PURE__ */ O("div", {
499
500
  className: "pt-2",
500
- children: [/* @__PURE__ */ E("p", {
501
+ children: [/* @__PURE__ */ D("p", {
501
502
  className: "text-sm text-text-secondary",
502
503
  children: "Payment Method"
503
- }), /* @__PURE__ */ E("p", {
504
+ }), /* @__PURE__ */ D("p", {
504
505
  className: "text-sm capitalize",
505
- children: N.pricing.paymentMethod.replace("_", " ")
506
+ children: P.pricing.paymentMethod.replace("_", " ")
506
507
  })]
507
508
  })
508
509
  ]
509
510
  })] }),
510
- /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(f, { children: /* @__PURE__ */ D(p, {
511
+ /* @__PURE__ */ O(u, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ O(p, {
511
512
  className: "flex items-center gap-2",
512
- children: [/* @__PURE__ */ E(oe, { size: 18 }), "Assignment"]
513
- }) }), /* @__PURE__ */ E(d, { children: /* @__PURE__ */ D("div", {
513
+ children: [/* @__PURE__ */ D(se, { size: 18 }), "Assignment"]
514
+ }) }), /* @__PURE__ */ D(d, { children: /* @__PURE__ */ O("div", {
514
515
  className: "space-y-4",
515
516
  children: [
516
- G && /* @__PURE__ */ E(Ee, { message: G }),
517
- Ke && /* @__PURE__ */ E(De, { message: Ke }),
518
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
517
+ K && /* @__PURE__ */ D(Ee, { message: K }),
518
+ Ge && /* @__PURE__ */ D(De, { message: Ge }),
519
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
519
520
  className: "text-sm text-text-secondary",
520
521
  children: "Tracking Number"
521
- }), /* @__PURE__ */ E("p", {
522
+ }), /* @__PURE__ */ D("p", {
522
523
  className: "text-sm font-mono",
523
- children: N.trackingNumber || "—"
524
+ children: P.trackingNumber || "—"
524
525
  })] }),
525
- /* @__PURE__ */ E(h, {}),
526
- /* @__PURE__ */ D("div", {
526
+ /* @__PURE__ */ D(h, {}),
527
+ /* @__PURE__ */ O("div", {
527
528
  className: "space-y-3",
528
529
  children: [
529
- /* @__PURE__ */ D("div", {
530
+ /* @__PURE__ */ O("div", {
530
531
  className: "space-y-1.5",
531
- children: [/* @__PURE__ */ E(m, {
532
+ children: [/* @__PURE__ */ D(m, {
532
533
  htmlFor: "assign-fleet-search",
533
- children: "Search fleet"
534
- }), /* @__PURE__ */ E(ge, {
535
- id: "assign-fleet-search",
536
- value: I,
537
- onChange: (e) => Be(e.target.value),
538
- placeholder: "Vehicle number, driver name or ID"
534
+ children: "Search vehicles & drivers"
535
+ }), /* @__PURE__ */ O("div", {
536
+ className: "relative",
537
+ children: [/* @__PURE__ */ D(oe, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ D(_e, {
538
+ id: "assign-fleet-search",
539
+ value: L,
540
+ onChange: (e) => Be(e.target.value),
541
+ placeholder: "Vehicle number, driver name or employee ID",
542
+ className: "pl-9"
543
+ })]
539
544
  })]
540
545
  }),
541
- /* @__PURE__ */ D("div", {
546
+ /* @__PURE__ */ O("div", {
542
547
  className: "space-y-1.5",
543
- children: [/* @__PURE__ */ E(m, {
548
+ children: [/* @__PURE__ */ D(m, {
544
549
  htmlFor: "assign-vehicle",
545
550
  children: "Vehicle"
546
- }), /* @__PURE__ */ E(S, {
551
+ }), /* @__PURE__ */ D(C, {
547
552
  id: "assign-vehicle",
548
- value: L,
549
- onChange: R,
553
+ value: R,
554
+ onChange: z,
550
555
  options: qe,
551
- loading: J,
556
+ loading: X,
552
557
  getId: (e) => e.id,
553
558
  getLabel: (e) => `${e.vehicleNumber} (${e.type})`,
554
- renderOption: (e) => /* @__PURE__ */ D(T, { children: [
559
+ renderOption: (e) => /* @__PURE__ */ O(E, { children: [
555
560
  e.vehicleNumber,
556
561
  " (",
557
562
  e.type,
558
563
  ")"
559
564
  ] }),
560
- selectedOption: He,
561
- selectedLoading: Ue,
565
+ selectedOption: Ve,
566
+ selectedLoading: He,
562
567
  required: !0,
563
- placeholder: N.vehicleId ? `Current: ${N.vehicleId}` : "Select a vehicle",
568
+ placeholder: P.vehicleId ? `Current: ${P.vehicleId}` : "Select a vehicle",
564
569
  emptyText: "No available vehicles."
565
570
  })]
566
571
  }),
567
- /* @__PURE__ */ D("div", {
572
+ /* @__PURE__ */ O("div", {
568
573
  className: "space-y-1.5",
569
- children: [/* @__PURE__ */ E(m, {
574
+ children: [/* @__PURE__ */ D(m, {
570
575
  htmlFor: "assign-driver",
571
576
  children: "Driver"
572
- }), /* @__PURE__ */ E(S, {
577
+ }), /* @__PURE__ */ D(C, {
573
578
  id: "assign-driver",
574
- value: z,
575
- onChange: B,
579
+ value: B,
580
+ onChange: V,
576
581
  options: Je,
577
- loading: X,
582
+ loading: Q,
578
583
  getId: (e) => e.id,
579
584
  getLabel: (e) => `${e.fullName} (${e.employeeId})`,
580
- renderOption: (e) => /* @__PURE__ */ D(T, { children: [
585
+ renderOption: (e) => /* @__PURE__ */ O(E, { children: [
581
586
  e.fullName,
582
587
  " (",
583
588
  e.employeeId,
584
589
  ")"
585
590
  ] }),
586
- selectedOption: We,
587
- selectedLoading: Ge,
591
+ selectedOption: Ue,
592
+ selectedLoading: We,
588
593
  required: !0,
589
- placeholder: N.driverId ? `Current: ${N.driverId}` : "Select a driver",
594
+ placeholder: P.driverId ? `Current: ${P.driverId}` : "Select a driver",
590
595
  emptyText: "No available drivers."
591
596
  })]
592
597
  }),
593
- /* @__PURE__ */ D(l, {
598
+ /* @__PURE__ */ O(l, {
594
599
  className: "w-full",
595
600
  onClick: Ye,
596
- disabled: V || !L && !z,
597
- children: [/* @__PURE__ */ E(se, { size: 16 }), V ? "Assigning…" : "Assign driver & vehicle"]
601
+ disabled: H || !R && !B,
602
+ children: [/* @__PURE__ */ D(ce, { size: 16 }), H ? "Assigning…" : "Assign driver & vehicle"]
598
603
  })
599
604
  ]
600
605
  }),
601
- /* @__PURE__ */ E(h, {}),
602
- /* @__PURE__ */ D("div", {
606
+ /* @__PURE__ */ D(h, {}),
607
+ /* @__PURE__ */ O("div", {
603
608
  className: "space-y-2",
604
609
  children: [
605
- /* @__PURE__ */ D("p", {
610
+ /* @__PURE__ */ O("p", {
606
611
  className: "text-sm text-text-secondary",
607
612
  children: [
608
613
  "Current status:",
609
614
  " ",
610
- /* @__PURE__ */ E("span", {
615
+ /* @__PURE__ */ D("span", {
611
616
  className: "font-medium",
612
- children: k[N.status]
617
+ children: A[P.status]
613
618
  })
614
619
  ]
615
620
  }),
616
621
  (() => {
617
- let e = Ie(N.status);
622
+ let e = Ie(P.status);
618
623
  if (!e) return null;
619
- let n = e === "assigned" && (!N.vehicleId || !N.driverId);
620
- return /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ D(l, {
624
+ let n = e === "assigned" && (!P.vehicleId || !P.driverId);
625
+ return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ O(l, {
621
626
  variant: "outline",
622
627
  className: "w-full",
623
- onClick: () => Q(e, `Order advanced to ${k[e]}.`),
624
- disabled: U || n,
625
- children: [/* @__PURE__ */ E(t, { size: 16 }), U ? "Updating…" : `Advance to ${k[e]}`]
626
- }), n && /* @__PURE__ */ E("p", {
628
+ onClick: () => Xe(e, `Order advanced to ${A[e]}.`),
629
+ disabled: W || n,
630
+ children: [/* @__PURE__ */ D(t, { size: 16 }), W ? "Updating…" : `Advance to ${A[e]}`]
631
+ }), n && /* @__PURE__ */ D("p", {
627
632
  className: "text-xs text-text-secondary",
628
633
  children: "Assign both a compatible vehicle and driver before dispatching this order."
629
634
  })] });
630
635
  })(),
631
- N.status !== "cancelled" && !A.has(N.status) && /* @__PURE__ */ D(l, {
636
+ P.status !== "cancelled" && !j.has(P.status) && /* @__PURE__ */ O(l, {
632
637
  variant: "outline",
633
638
  className: "w-full text-status-error-text",
634
- onClick: () => Q("cancelled", "Order cancelled."),
635
- disabled: U,
636
- children: [/* @__PURE__ */ E(ee, { size: 16 }), "Cancel order"]
639
+ onClick: () => Xe("cancelled", "Order cancelled."),
640
+ disabled: W,
641
+ children: [/* @__PURE__ */ D(ee, { size: 16 }), "Cancel order"]
637
642
  })
638
643
  ]
639
644
  }),
640
- /* @__PURE__ */ D(l, {
645
+ /* @__PURE__ */ O(l, {
641
646
  variant: "outline",
642
647
  className: "w-full",
643
- onClick: () => $(`tracking?order=${N.id}`),
644
- children: [/* @__PURE__ */ E(r, { size: 16 }), "Track Order"]
648
+ onClick: () => $(`tracking?order=${P.id}`),
649
+ children: [/* @__PURE__ */ D(r, { size: 16 }), "Track Order"]
645
650
  })
646
651
  ]
647
652
  }) })] }),
648
- /* @__PURE__ */ E(ke, {
653
+ /* @__PURE__ */ D(ke, {
649
654
  entityType: "order",
650
- entityId: N.id
655
+ entityId: P.id
651
656
  }),
652
- /* @__PURE__ */ E(je, { deliveryJobId: N.id }),
653
- N.specialInstructions && /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(f, { children: /* @__PURE__ */ D(p, {
657
+ /* @__PURE__ */ D(je, { deliveryJobId: P.id }),
658
+ P.specialInstructions && /* @__PURE__ */ O(u, { children: [/* @__PURE__ */ D(f, { children: /* @__PURE__ */ O(p, {
654
659
  className: "flex items-center gap-2",
655
- children: [/* @__PURE__ */ E(re, { size: 18 }), "Special Instructions"]
656
- }) }), /* @__PURE__ */ E(d, { children: /* @__PURE__ */ E("p", {
660
+ children: [/* @__PURE__ */ D(re, { size: 18 }), "Special Instructions"]
661
+ }) }), /* @__PURE__ */ D(d, { children: /* @__PURE__ */ D("p", {
657
662
  className: "text-sm",
658
- children: N.specialInstructions
663
+ children: P.specialInstructions
659
664
  }) })] })
660
665
  ]
661
666
  })]
@@ -664,4 +669,4 @@ function j() {
664
669
  });
665
670
  }
666
671
  //#endregion
667
- export { j as default };
672
+ export { M as default };