@burdenoff/microfe-movethewheels 2026.1031.3 → 2026.1031.4

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