@burdenoff/microfe-movethewheels 2026.924.2 → 2026.925.2

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/OrderItemRow.js +195 -109
  2. package/dist/components/StatusBadge.js +31 -31
  3. package/dist/constants/index.js +11 -3
  4. package/dist/generated/wspace-operations.d.ts +7 -0
  5. package/dist/hooks/useFleet.js +85 -76
  6. package/dist/hooks/useOrders.js +8 -4
  7. package/dist/hooks/useTracking.js +127 -66
  8. package/dist/movethewheels/components/OrderItemRow.d.ts +1 -2
  9. package/dist/movethewheels/components/StatusBadge.d.ts +3 -1
  10. package/dist/movethewheels/constants/index.d.ts +1 -0
  11. package/dist/movethewheels/hooks/useFleet.d.ts +41 -1
  12. package/dist/movethewheels/hooks/useOrders.d.ts +1 -0
  13. package/dist/movethewheels/hooks/useTracking.d.ts +2 -2
  14. package/dist/movethewheels/types/index.d.ts +17 -39
  15. package/dist/node_modules/lucide-react/dist/esm/icons/sticky-note.js +11 -0
  16. package/dist/node_modules/lucide-react/dist/esm/icons/user-x.js +30 -0
  17. package/dist/pages/CreateOrderPage.js +597 -420
  18. package/dist/pages/DriverDetailsPage.js +702 -421
  19. package/dist/pages/DriversPage.js +106 -117
  20. package/dist/pages/FleetPage.js +4 -10
  21. package/dist/pages/OrderDetailsPage.js +290 -262
  22. package/dist/pages/OrdersListPage.js +4 -0
  23. package/dist/pages/RouteDetailsPage.js +264 -252
  24. package/dist/pages/TrackingPage.js +205 -195
  25. package/dist/pages/VehicleDetailsPage.js +403 -243
  26. package/dist/utils/mapMarkers.js +2 -1
  27. package/package.json +1 -1
  28. package/src/generated/wspace-operations.ts +10 -3
  29. package/src/movethewheels/components/OrderItemRow.tsx +162 -99
  30. package/src/movethewheels/components/StatusBadge.tsx +11 -2
  31. package/src/movethewheels/constants/index.ts +13 -0
  32. package/src/movethewheels/hooks/useFleet.ts +163 -44
  33. package/src/movethewheels/hooks/useOrders.ts +17 -3
  34. package/src/movethewheels/hooks/useTracking.ts +208 -27
  35. package/src/movethewheels/pages/CreateOrderPage.tsx +372 -263
  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 +7 -10
  39. package/src/movethewheels/pages/OrderDetailsPage.tsx +67 -30
  40. package/src/movethewheels/pages/OrdersListPage.tsx +1 -0
  41. package/src/movethewheels/pages/RouteDetailsPage.tsx +15 -7
  42. package/src/movethewheels/pages/TrackingPage.tsx +44 -14
  43. package/src/movethewheels/pages/VehicleDetailsPage.tsx +137 -15
  44. package/src/movethewheels/types/index.ts +17 -38
  45. package/src/movethewheels/utils/mapMarkers.ts +1 -0
  46. package/src/operations/wspace/movethewheels/queries/dashboard.graphql +5 -0
  47. package/src/operations/wspace/movethewheels/queries/logistics.graphql +2 -2
@@ -18,195 +18,209 @@ import { firstRealLatLng as S } from "../utils/mapMarkers.js";
18
18
  import { ProofOfDeliveryCard as C } from "../components/ProofOfDeliveryCard.js";
19
19
  import { useMemo as w, useState as T } from "react";
20
20
  import { useSearchParams as E } from "react-router";
21
- import { jsx as D, jsxs as O } from "react/jsx-runtime";
22
- import { useI18n as k } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
- import { EmphasisPanel as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
21
+ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
22
+ import { useI18n as A } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
+ import { EmphasisPanel as j, PagePurpose as M } from "@burdenoff/fe-libs/ui";
24
24
  //#region src/movethewheels/pages/TrackingPage.tsx
25
- function M() {
26
- let { t: M } = k(), N = (e, t) => {
27
- let n = M(e);
25
+ function N() {
26
+ let { t: N } = A(), P = (e, t) => {
27
+ let n = N(e);
28
28
  return n === e ? t : n;
29
- }, { basePath: P, navigate: F } = c(), [I] = E(), L = I.get("order") || "", [R, z] = T(L), [B, V] = T(L), { tracking: H, order: U, isLoading: W, error: G } = l(B || void 0), K = (e) => {
30
- e.preventDefault(), V(R);
31
- }, q = (e) => {
32
- F && F(s(P, e));
33
- }, J = w(() => {
34
- if (!U) return null;
35
- let e = S(U.pickupAddress), t = S(U.deliveryAddress), n = e ? {
29
+ }, { basePath: F, navigate: I } = c(), [L] = E(), R = L.get("order") || "", [z, B] = T(R), [V, H] = T(R), { tracking: U, order: W, isLoading: G, error: K } = l(V || void 0), q = (e) => {
30
+ e.preventDefault(), H(z);
31
+ }, J = (e) => {
32
+ I && I(s(F, e));
33
+ }, Y = w(() => {
34
+ if (!W) return null;
35
+ let e = S(W.pickupAddress), t = S(W.deliveryAddress), n = e ? {
36
36
  ...e,
37
- label: `Pickup · ${U.pickupAddress.city || "Origin"}`
37
+ label: `Pickup · ${W.pickupAddress.city || "Origin"}`
38
38
  } : null, r = t ? {
39
39
  ...t,
40
- label: `Delivery · ${U.deliveryAddress.city || "Destination"}`
41
- } : null, i = U.timeline.map((e) => {
40
+ label: `Delivery · ${W.deliveryAddress.city || "Destination"}`
41
+ } : null, i = (U?.locationHistory ?? []).map((e) => {
42
+ let t = S(e);
43
+ return t ? {
44
+ lat: t.lat,
45
+ lng: t.lng,
46
+ timestamp: e.timestamp?.toISOString() ?? (/* @__PURE__ */ new Date()).toISOString()
47
+ } : null;
48
+ }).filter((e) => e !== null), a = W.timeline.map((e) => {
42
49
  let t = e.location ? S(e.location) : null;
43
50
  return t ? {
44
51
  lat: t.lat,
45
52
  lng: t.lng,
46
53
  timestamp: new Date(e.timestamp).toISOString()
47
54
  } : null;
48
- }).filter((e) => e !== null), a = H ? S(H.currentLocation) : null, o = a ? {
49
- ...a,
50
- label: H?.currentLocation.address || "Current position"
55
+ }).filter((e) => e !== null), o = i.length > 0 ? i : a, s = U ? S(U.currentLocation) : null, c = s ? {
56
+ ...s,
57
+ label: U?.currentLocation.address || "Current position"
51
58
  } : null;
52
59
  return {
53
60
  origin: n,
54
61
  destination: r,
55
- trail: i,
56
- current: o,
57
- hasAny: !!(n || r || o || i.length > 0)
62
+ trail: o,
63
+ current: c,
64
+ hasAny: !!(n || r || c || o.length > 0)
58
65
  };
59
- }, [U, H]);
60
- return /* @__PURE__ */ O(_, {
61
- title: N("movethewheels.tracking.title", "Track Shipment"),
62
- subtitle: N("movethewheels.tracking.subtitle", "Enter a tracking number or order ID to track your shipment"),
63
- icon: /* @__PURE__ */ D(r, { size: 24 }),
64
- headerActions: /* @__PURE__ */ O(u, {
66
+ }, [W, U]);
67
+ return /* @__PURE__ */ k(_, {
68
+ title: P("movethewheels.tracking.title", "Track Shipment"),
69
+ subtitle: P("movethewheels.tracking.subtitle", "Enter a tracking number or order ID to track your shipment"),
70
+ icon: /* @__PURE__ */ O(r, { size: 24 }),
71
+ headerActions: /* @__PURE__ */ k(u, {
65
72
  variant: "outline",
66
- onClick: () => q("tracking/live"),
67
- children: [/* @__PURE__ */ D(r, { size: 16 }), N("movethewheels.tracking.actions.liveMapView", "Live Map View")]
73
+ onClick: () => J("tracking/live"),
74
+ children: [/* @__PURE__ */ O(r, { size: 16 }), P("movethewheels.tracking.actions.liveMapView", "Live Map View")]
68
75
  }),
69
76
  children: [
70
- /* @__PURE__ */ D(j, {
71
- icon: /* @__PURE__ */ D(r, { size: 18 }),
72
- children: N("movethewheels.tracking.purpose", "Look up any single shipment by its tracking number or order ID to see exactly where it is, its progress through pickup and delivery, the current location and any alerts — the same view you can share with a customer.")
77
+ /* @__PURE__ */ O(M, {
78
+ icon: /* @__PURE__ */ O(r, { size: 18 }),
79
+ children: P("movethewheels.tracking.purpose", "Look up any single shipment by its tracking number or order ID to see exactly where it is, its progress through pickup and delivery, the current location and any alerts — the same view you can share with a customer.")
73
80
  }),
74
- /* @__PURE__ */ D(d, { children: /* @__PURE__ */ D(f, {
81
+ /* @__PURE__ */ O(d, { children: /* @__PURE__ */ O(f, {
75
82
  className: "p-6",
76
- children: /* @__PURE__ */ O("form", {
77
- onSubmit: K,
83
+ children: /* @__PURE__ */ k("form", {
84
+ onSubmit: q,
78
85
  className: "flex gap-4",
79
- children: [/* @__PURE__ */ O("div", {
86
+ children: [/* @__PURE__ */ k("div", {
80
87
  className: "flex-1 relative",
81
- children: [/* @__PURE__ */ D(a, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-text-secondary" }), /* @__PURE__ */ D(h, {
82
- value: R,
83
- onChange: (e) => z(e.target.value),
84
- placeholder: N("movethewheels.tracking.search.placeholder", "Enter tracking number or order ID (e.g., order-1 or TRK123456789)"),
88
+ children: [/* @__PURE__ */ O(a, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-text-secondary" }), /* @__PURE__ */ O(h, {
89
+ value: z,
90
+ onChange: (e) => B(e.target.value),
91
+ placeholder: P("movethewheels.tracking.search.placeholder", "Enter tracking number or order ID (e.g., order-1 or TRK123456789)"),
85
92
  className: "pl-10 h-12 text-lg"
86
93
  })]
87
- }), /* @__PURE__ */ D(u, {
94
+ }), /* @__PURE__ */ O(u, {
88
95
  type: "submit",
89
96
  size: "lg",
90
- disabled: !R || W,
91
- children: W ? N("movethewheels.tracking.search.searching", "Searching...") : N("movethewheels.tracking.search.track", "Track")
97
+ disabled: !z || G,
98
+ children: G ? P("movethewheels.tracking.search.searching", "Searching...") : P("movethewheels.tracking.search.track", "Track")
92
99
  })]
93
100
  })
94
101
  }) }),
95
- G && /* @__PURE__ */ D(d, {
102
+ K && /* @__PURE__ */ O(d, {
96
103
  className: "border-status-error-border",
97
- children: /* @__PURE__ */ D(f, {
104
+ children: /* @__PURE__ */ O(f, {
98
105
  className: "p-6",
99
- children: /* @__PURE__ */ O("div", {
106
+ children: /* @__PURE__ */ k("div", {
100
107
  className: "flex items-center gap-4",
101
- children: [/* @__PURE__ */ D(e, { className: "w-8 h-8 text-status-error-text" }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
108
+ children: [/* @__PURE__ */ O(e, { className: "w-8 h-8 text-status-error-text" }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
102
109
  className: "font-medium text-status-error-text",
103
- children: N("movethewheels.tracking.error.title", "Unable to find shipment")
104
- }), /* @__PURE__ */ D("p", {
110
+ children: P("movethewheels.tracking.error.title", "Unable to find shipment")
111
+ }), /* @__PURE__ */ O("p", {
105
112
  className: "text-sm text-text-secondary",
106
- children: N("movethewheels.tracking.error.description", "Please check the tracking number and try again")
113
+ children: P("movethewheels.tracking.error.description", "Please check the tracking number and try again")
107
114
  })] })]
108
115
  })
109
116
  })
110
117
  }),
111
- !B && !G && /* @__PURE__ */ D(g, {
118
+ !V && !K && /* @__PURE__ */ O(g, {
112
119
  illustration: "onboarding",
113
- title: N("movethewheels.tracking.empty.title", "Enter a tracking number"),
114
- description: N("movethewheels.tracking.empty.description", "Use your tracking number or order ID to see the current status of your shipment")
120
+ title: P("movethewheels.tracking.empty.title", "Enter a tracking number"),
121
+ description: P("movethewheels.tracking.empty.description", "Use your tracking number or order ID to see the current status of your shipment")
115
122
  }),
116
- U && H && /* @__PURE__ */ O("div", {
123
+ W && /* @__PURE__ */ k("div", {
117
124
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
118
- children: [/* @__PURE__ */ O("div", {
125
+ children: [/* @__PURE__ */ k("div", {
119
126
  className: "lg:col-span-2 space-y-6",
120
127
  children: [
121
- /* @__PURE__ */ O(A, { children: [/* @__PURE__ */ O("div", {
122
- className: "flex items-center justify-between mb-4",
123
- children: [/* @__PURE__ */ O("h2", {
124
- className: "flex items-center gap-2 text-base font-semibold text-text-primary",
125
- children: [
126
- /* @__PURE__ */ D(i, { size: 20 }),
127
- N("movethewheels.tracking.orderLabel", "Order"),
128
- " ",
129
- U.orderNumber
130
- ]
131
- }), /* @__PURE__ */ D(y, {
132
- status: U.status,
133
- type: "order"
134
- })]
135
- }), /* @__PURE__ */ O("div", {
136
- className: "grid grid-cols-2 md:grid-cols-4 gap-4",
137
- children: [
138
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
139
- className: "text-sm text-text-secondary",
140
- children: N("movethewheels.tracking.details.trackingNumber", "Tracking Number")
141
- }), /* @__PURE__ */ D("p", {
142
- className: "font-mono font-medium",
143
- children: U.trackingNumber
144
- })] }),
145
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
146
- className: "text-sm text-text-secondary",
147
- children: N("movethewheels.tracking.details.estimatedDelivery", "Estimated Delivery")
148
- }), /* @__PURE__ */ D("p", {
149
- className: "font-medium",
150
- children: H.estimatedArrival ? x(H.estimatedArrival, "full") : U.scheduledDelivery ? x(U.scheduledDelivery, "full") : N("movethewheels.tracking.details.tbd", "TBD")
151
- })] }),
152
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
153
- className: "text-sm text-text-secondary",
154
- children: N("movethewheels.tracking.details.items", "Items")
155
- }), /* @__PURE__ */ O("p", {
156
- className: "font-medium",
128
+ /* @__PURE__ */ k(j, { children: [
129
+ /* @__PURE__ */ k("div", {
130
+ className: "flex items-center justify-between mb-4",
131
+ children: [/* @__PURE__ */ k("h2", {
132
+ className: "flex items-center gap-2 text-base font-semibold text-text-primary",
157
133
  children: [
158
- U.items.length,
134
+ /* @__PURE__ */ O(i, { size: 20 }),
135
+ P("movethewheels.tracking.orderLabel", "Order"),
159
136
  " ",
160
- N("movethewheels.tracking.details.itemsSuffix", "items")
137
+ W.orderNumber
161
138
  ]
162
- })] }),
163
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
164
- className: "text-sm text-text-secondary",
165
- children: N("movethewheels.tracking.details.lastUpdated", "Last Updated")
166
- }), /* @__PURE__ */ D("p", {
167
- className: "font-medium",
168
- children: x(H.lastUpdated, "relative")
169
- })] })
170
- ]
171
- })] }),
172
- /* @__PURE__ */ O(d, { children: [/* @__PURE__ */ D(p, { children: /* @__PURE__ */ O(m, {
139
+ }), /* @__PURE__ */ O(y, {
140
+ status: W.status,
141
+ type: "order"
142
+ })]
143
+ }),
144
+ /* @__PURE__ */ k("div", {
145
+ className: "grid grid-cols-2 md:grid-cols-4 gap-4",
146
+ children: [
147
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
148
+ className: "text-sm text-text-secondary",
149
+ children: P("movethewheels.tracking.details.trackingNumber", "Tracking Number")
150
+ }), /* @__PURE__ */ O("p", {
151
+ className: "font-mono font-medium",
152
+ children: W.trackingNumber || "—"
153
+ })] }),
154
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
155
+ className: "text-sm text-text-secondary",
156
+ children: P("movethewheels.tracking.details.estimatedDelivery", "Estimated Delivery")
157
+ }), /* @__PURE__ */ O("p", {
158
+ className: "font-medium",
159
+ children: U?.estimatedArrival ? x(U.estimatedArrival, "full") : W.scheduledDelivery ? x(W.scheduledDelivery, "full") : P("movethewheels.tracking.details.tbd", "TBD")
160
+ })] }),
161
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
162
+ className: "text-sm text-text-secondary",
163
+ children: P("movethewheels.tracking.details.items", "Items")
164
+ }), /* @__PURE__ */ k("p", {
165
+ className: "font-medium",
166
+ children: [
167
+ W.items.length,
168
+ " ",
169
+ P("movethewheels.tracking.details.itemsSuffix", "items")
170
+ ]
171
+ })] }),
172
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
173
+ className: "text-sm text-text-secondary",
174
+ children: P("movethewheels.tracking.details.lastUpdated", "Last Updated")
175
+ }), /* @__PURE__ */ O("p", {
176
+ className: "font-medium",
177
+ children: U ? x(U.lastUpdated, "relative") : P("movethewheels.tracking.details.noUpdates", "No tracking updates yet")
178
+ })] })
179
+ ]
180
+ }),
181
+ !U && /* @__PURE__ */ O("p", {
182
+ className: "mt-4 rounded-card border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
183
+ children: P("movethewheels.tracking.details.noUpdatesDescription", "The delivery was found, but no tracking updates have been recorded yet.")
184
+ })
185
+ ] }),
186
+ /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
173
187
  className: "flex items-center gap-2",
174
- children: [/* @__PURE__ */ D(r, { size: 18 }), N("movethewheels.tracking.routeMap.title", "Route map")]
175
- }) }), /* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(v, {
188
+ children: [/* @__PURE__ */ O(r, { size: 18 }), P("movethewheels.tracking.routeMap.title", "Route map")]
189
+ }) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ O(v, {
176
190
  className: "overflow-hidden rounded-lg border border-border-seam",
177
191
  height: 320,
178
- origin: J?.origin ?? null,
179
- destination: J?.destination ?? null,
180
- trail: J?.trail ?? [],
181
- current: J?.current ?? null,
182
- emptyMessage: N("movethewheels.tracking.routeMap.empty", "No location coordinates recorded for this shipment yet")
192
+ origin: Y?.origin ?? null,
193
+ destination: Y?.destination ?? null,
194
+ trail: Y?.trail ?? [],
195
+ current: Y?.current ?? null,
196
+ emptyMessage: P("movethewheels.tracking.routeMap.empty", "No location coordinates recorded for this shipment yet")
183
197
  }) })] }),
184
- /* @__PURE__ */ O(d, { children: [/* @__PURE__ */ D(p, { children: /* @__PURE__ */ O(m, {
198
+ /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
185
199
  className: "flex items-center gap-2",
186
- children: [/* @__PURE__ */ D(n, { size: 18 }), N("movethewheels.tracking.progress.title", "Shipment Progress")]
187
- }) }), /* @__PURE__ */ O(f, { children: [/* @__PURE__ */ D("div", {
200
+ children: [/* @__PURE__ */ O(n, { size: 18 }), P("movethewheels.tracking.progress.title", "Shipment Progress")]
201
+ }) }), /* @__PURE__ */ k(f, { children: [/* @__PURE__ */ O("div", {
188
202
  className: "relative",
189
- children: /* @__PURE__ */ D("div", {
203
+ children: /* @__PURE__ */ O("div", {
190
204
  className: "flex justify-between mb-4",
191
205
  children: [
192
206
  {
193
207
  status: "confirmed",
194
- label: N("movethewheels.tracking.progress.confirmed", "Confirmed"),
208
+ label: P("movethewheels.tracking.progress.confirmed", "Confirmed"),
195
209
  icon: t
196
210
  },
197
211
  {
198
212
  status: "picked_up",
199
- label: N("movethewheels.tracking.progress.pickedUp", "Picked Up"),
213
+ label: P("movethewheels.tracking.progress.pickedUp", "Picked Up"),
200
214
  icon: i
201
215
  },
202
216
  {
203
217
  status: "in_transit",
204
- label: N("movethewheels.tracking.progress.inTransit", "In Transit"),
218
+ label: P("movethewheels.tracking.progress.inTransit", "In Transit"),
205
219
  icon: o
206
220
  },
207
221
  {
208
222
  status: "delivered",
209
- label: N("movethewheels.tracking.progress.delivered", "Delivered"),
223
+ label: P("movethewheels.tracking.progress.delivered", "Delivered"),
210
224
  icon: r
211
225
  }
212
226
  ].map((e, t) => {
@@ -218,19 +232,19 @@ function M() {
218
232
  "in_transit",
219
233
  "out_for_delivery",
220
234
  "delivered"
221
- ], r = n.indexOf(U.status), i = n.indexOf(e.status) <= r, a = e.status === U.status || U.status === "out_for_delivery" && e.status === "in_transit";
222
- return /* @__PURE__ */ O("div", {
235
+ ], r = n.indexOf(W.status), i = n.indexOf(e.status) <= r, a = e.status === W.status || W.status === "out_for_delivery" && e.status === "in_transit";
236
+ return /* @__PURE__ */ k("div", {
223
237
  className: "flex flex-col items-center flex-1",
224
238
  children: [
225
- /* @__PURE__ */ D("div", {
239
+ /* @__PURE__ */ O("div", {
226
240
  className: `w-10 h-10 rounded-full flex items-center justify-center ${i ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary"} ${a ? "ring-4 ring-primary/20" : ""}`,
227
- children: /* @__PURE__ */ D(e.icon, { size: 20 })
241
+ children: /* @__PURE__ */ O(e.icon, { size: 20 })
228
242
  }),
229
- /* @__PURE__ */ D("p", {
243
+ /* @__PURE__ */ O("p", {
230
244
  className: `text-xs mt-2 text-center ${i ? "font-medium" : "text-text-secondary"}`,
231
245
  children: e.label
232
246
  }),
233
- t < 3 && /* @__PURE__ */ D("div", {
247
+ t < 3 && /* @__PURE__ */ O("div", {
234
248
  className: `absolute top-5 h-0.5 ${i ? "bg-action-primary-bg" : "bg-bg-sunken"}`,
235
249
  style: {
236
250
  left: `calc(${(t + .5) * 25}% + 20px)`,
@@ -241,34 +255,34 @@ function M() {
241
255
  }, e.status);
242
256
  })
243
257
  })
244
- }), /* @__PURE__ */ D("div", {
258
+ }), /* @__PURE__ */ O("div", {
245
259
  className: "mt-8 space-y-4",
246
- children: U.timeline.slice().reverse().map((e, t) => /* @__PURE__ */ O("div", {
260
+ children: W.timeline.slice().reverse().map((e, t) => /* @__PURE__ */ k("div", {
247
261
  className: "flex gap-4",
248
- children: [/* @__PURE__ */ O("div", {
262
+ children: [/* @__PURE__ */ k("div", {
249
263
  className: "relative",
250
- children: [/* @__PURE__ */ D("div", { className: `w-3 h-3 rounded-full ${t === 0 ? "bg-action-primary-bg" : "bg-bg-sunken"}` }), t < U.timeline.length - 1 && /* @__PURE__ */ D("div", { className: "absolute top-3 left-1.5 w-px h-8 -ml-px bg-border" })]
251
- }), /* @__PURE__ */ O("div", {
264
+ children: [/* @__PURE__ */ O("div", { className: `w-3 h-3 rounded-full ${t === 0 ? "bg-action-primary-bg" : "bg-bg-sunken"}` }), t < W.timeline.length - 1 && /* @__PURE__ */ O("div", { className: "absolute top-3 left-1.5 w-px h-8 -ml-px bg-border" })]
265
+ }), /* @__PURE__ */ k("div", {
252
266
  className: "flex-1 pb-4",
253
267
  children: [
254
- /* @__PURE__ */ O("div", {
268
+ /* @__PURE__ */ k("div", {
255
269
  className: "flex items-center gap-2",
256
- children: [/* @__PURE__ */ D(y, {
270
+ children: [/* @__PURE__ */ O(y, {
257
271
  status: e.status,
258
272
  type: "order",
259
273
  size: "sm"
260
- }), /* @__PURE__ */ D("span", {
274
+ }), /* @__PURE__ */ O("span", {
261
275
  className: "text-sm text-text-secondary",
262
276
  children: x(e.timestamp, "full")
263
277
  })]
264
278
  }),
265
- e.notes && /* @__PURE__ */ D("p", {
279
+ e.notes && /* @__PURE__ */ O("p", {
266
280
  className: "text-sm mt-1",
267
281
  children: e.notes
268
282
  }),
269
- e.location && /* @__PURE__ */ O("p", {
283
+ e.location && /* @__PURE__ */ k("p", {
270
284
  className: "text-xs text-text-secondary mt-1",
271
- children: [/* @__PURE__ */ D(r, {
285
+ children: [/* @__PURE__ */ O(r, {
272
286
  size: 12,
273
287
  className: "inline mr-1"
274
288
  }), b(e.location)]
@@ -277,98 +291,94 @@ function M() {
277
291
  })]
278
292
  }, t))
279
293
  })] })] }),
280
- H.alerts && H.alerts.length > 0 && /* @__PURE__ */ O(d, { children: [/* @__PURE__ */ D(p, { children: /* @__PURE__ */ O(m, {
294
+ U?.alerts && U.alerts.length > 0 && /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
281
295
  className: "flex items-center gap-2",
282
- children: [/* @__PURE__ */ D(e, { size: 18 }), N("movethewheels.tracking.alerts.title", "Alerts")]
283
- }) }), /* @__PURE__ */ D(f, { children: /* @__PURE__ */ D("div", {
296
+ children: [/* @__PURE__ */ O(e, { size: 18 }), P("movethewheels.tracking.alerts.title", "Alerts")]
297
+ }) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ O("div", {
284
298
  className: "space-y-3",
285
- children: H.alerts.map((t) => /* @__PURE__ */ O("div", {
299
+ children: U.alerts.map((t) => /* @__PURE__ */ k("div", {
286
300
  className: `flex items-start gap-3 p-3 rounded-lg ${t.severity === "critical" ? "bg-status-error-bg-subtle" : (t.severity, "bg-status-warning-bg-subtle")}`,
287
- children: [/* @__PURE__ */ D(e, {
301
+ children: [/* @__PURE__ */ O(e, {
288
302
  size: 16,
289
303
  className: t.severity === "critical" ? "text-status-error-text" : (t.severity, "text-status-warning-text")
290
- }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
304
+ }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
291
305
  className: "text-sm font-medium",
292
306
  children: t.message
293
- }), /* @__PURE__ */ O("p", {
307
+ }), /* @__PURE__ */ k("p", {
294
308
  className: "text-xs text-text-secondary",
295
- children: [x(t.timestamp, "relative"), t.resolvedAt && ` - ${N("movethewheels.tracking.alerts.resolved", "Resolved")}`]
309
+ children: [x(t.timestamp, "relative"), t.resolvedAt && ` - ${P("movethewheels.tracking.alerts.resolved", "Resolved")}`]
296
310
  })] })]
297
311
  }, t.id))
298
312
  }) })] })
299
313
  ]
300
- }), /* @__PURE__ */ O("div", {
314
+ }), /* @__PURE__ */ k("div", {
301
315
  className: "space-y-6",
302
316
  children: [
303
- /* @__PURE__ */ O(d, { children: [/* @__PURE__ */ D(p, { children: /* @__PURE__ */ O(m, {
317
+ /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
304
318
  className: "flex items-center gap-2",
305
- children: [/* @__PURE__ */ D(r, { size: 18 }), N("movethewheels.tracking.location.title", "Current Location")]
306
- }) }), /* @__PURE__ */ O(f, { children: [
307
- J?.current ? /* @__PURE__ */ D(v, {
308
- className: "mb-4 overflow-hidden rounded-lg border border-border-seam",
309
- height: 180,
310
- current: J.current,
311
- destination: J.destination ?? null,
312
- trail: J.trail
313
- }) : /* @__PURE__ */ O("div", {
314
- className: "mb-4 rounded-lg bg-bg-sunken p-4 text-center text-text-secondary",
315
- children: [/* @__PURE__ */ D(r, {
316
- size: 28,
317
- className: "mx-auto mb-2 opacity-60"
318
- }), /* @__PURE__ */ D("p", {
319
- className: "text-sm",
320
- children: N("movethewheels.tracking.location.noFix", "No live position fix yet")
321
- })]
322
- }),
323
- /* @__PURE__ */ D("p", {
319
+ children: [/* @__PURE__ */ O(r, { size: 18 }), P("movethewheels.tracking.location.title", "Current Location")]
320
+ }) }), /* @__PURE__ */ k(f, { children: [Y?.current ? /* @__PURE__ */ O(v, {
321
+ className: "mb-4 overflow-hidden rounded-lg border border-border-seam",
322
+ height: 180,
323
+ current: Y.current,
324
+ destination: Y.destination ?? null,
325
+ trail: Y.trail
326
+ }) : /* @__PURE__ */ k("div", {
327
+ className: "mb-4 rounded-lg bg-bg-sunken p-4 text-center text-text-secondary",
328
+ children: [/* @__PURE__ */ O(r, {
329
+ size: 28,
330
+ className: "mx-auto mb-2 opacity-60"
331
+ }), /* @__PURE__ */ O("p", {
324
332
  className: "text-sm",
325
- children: H.currentLocation.address || N("movethewheels.tracking.location.updating", "Location updating...")
326
- }),
327
- /* @__PURE__ */ O("p", {
328
- className: "text-xs text-text-secondary mt-1",
329
- children: [
330
- N("movethewheels.tracking.location.updated", "Updated"),
331
- " ",
332
- x(H.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")
333
- ]
334
- })
335
- ] })] }),
336
- /* @__PURE__ */ O(d, { children: [/* @__PURE__ */ D(p, { children: /* @__PURE__ */ D(m, { children: N("movethewheels.tracking.deliveryAddress.title", "Delivery Address") }) }), /* @__PURE__ */ O(f, { children: [/* @__PURE__ */ D("p", {
333
+ children: P("movethewheels.tracking.location.noFix", "No live position fix yet")
334
+ })]
335
+ }), U && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("p", {
336
+ className: "text-sm",
337
+ children: U.currentLocation.address || P("movethewheels.tracking.location.updating", "Location updating...")
338
+ }), /* @__PURE__ */ k("p", {
339
+ className: "text-xs text-text-secondary mt-1",
340
+ children: [
341
+ P("movethewheels.tracking.location.updated", "Updated"),
342
+ " ",
343
+ x(U.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")
344
+ ]
345
+ })] })] })] }),
346
+ /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ O(m, { children: P("movethewheels.tracking.deliveryAddress.title", "Delivery Address") }) }), /* @__PURE__ */ k(f, { children: [/* @__PURE__ */ O("p", {
337
347
  className: "text-sm",
338
- children: U.customerInfo.name
339
- }), /* @__PURE__ */ D("p", {
348
+ children: W.customerInfo.name
349
+ }), /* @__PURE__ */ O("p", {
340
350
  className: "text-sm text-text-secondary mt-2",
341
- children: b(U.deliveryAddress)
351
+ children: b(W.deliveryAddress)
342
352
  })] })] }),
343
- /* @__PURE__ */ D(C, { deliveryJobId: U.id }),
344
- /* @__PURE__ */ D(d, { children: /* @__PURE__ */ O(f, {
353
+ /* @__PURE__ */ O(C, { deliveryJobId: W.id }),
354
+ /* @__PURE__ */ O(d, { children: /* @__PURE__ */ k(f, {
345
355
  className: "p-4 space-y-2",
346
- children: [/* @__PURE__ */ D(u, {
356
+ children: [/* @__PURE__ */ O(u, {
347
357
  variant: "outline",
348
358
  className: "w-full",
349
- onClick: () => q(`orders/${U.id}`),
350
- children: N("movethewheels.tracking.actions.viewOrderDetails", "View Order Details")
351
- }), /* @__PURE__ */ D(u, {
359
+ onClick: () => J(`orders/${W.id}`),
360
+ children: P("movethewheels.tracking.actions.viewOrderDetails", "View Order Details")
361
+ }), /* @__PURE__ */ O(u, {
352
362
  variant: "outline",
353
363
  className: "w-full",
354
- children: N("movethewheels.tracking.actions.contactDriver", "Contact Driver")
364
+ children: P("movethewheels.tracking.actions.contactDriver", "Contact Driver")
355
365
  })]
356
366
  }) })
357
367
  ]
358
368
  })]
359
369
  }),
360
- B && !U && !W && !G && /* @__PURE__ */ D(g, {
370
+ V && !W && !G && !K && /* @__PURE__ */ O(g, {
361
371
  illustration: "empty-search",
362
- title: N("movethewheels.tracking.notFound.title", "Shipment not found"),
363
- description: `${N("movethewheels.tracking.notFound.descriptionPrefix", "No shipment found with tracking number")} "${B}"`,
364
- action: /* @__PURE__ */ D(u, {
372
+ title: P("movethewheels.tracking.notFound.title", "Shipment not found"),
373
+ description: `${P("movethewheels.tracking.notFound.descriptionPrefix", "No shipment found with tracking number")} "${V}"`,
374
+ action: /* @__PURE__ */ O(u, {
365
375
  variant: "outline",
366
- onClick: () => z(""),
367
- children: N("movethewheels.tracking.notFound.tryAnother", "Try another number")
376
+ onClick: () => B(""),
377
+ children: P("movethewheels.tracking.notFound.tryAnother", "Try another number")
368
378
  })
369
379
  })
370
380
  ]
371
381
  });
372
382
  }
373
383
  //#endregion
374
- export { M as default };
384
+ export { N as default };