@burdenoff/microfe-movethewheels 2026.1117.1 → 2026.1123.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 (70) hide show
  1. package/dist/MoveTheWheelsRoot.js +149 -133
  2. package/dist/MoveTheWheelsRoutes.js +157 -139
  3. package/dist/components/EntityConversationsCard.js +145 -0
  4. package/dist/components/maps/MapCanvas.js +4 -3
  5. package/dist/events/rybbit.js +87 -0
  6. package/dist/generated/tracking-quality-operations.d.ts +342 -0
  7. package/dist/hooks/useEntityComments.js +111 -0
  8. package/dist/hooks/useFleet.js +394 -311
  9. package/dist/hooks/useInventory.js +378 -313
  10. package/dist/hooks/useMultiModalShipments.js +58 -53
  11. package/dist/hooks/useOrders.js +178 -158
  12. package/dist/hooks/useRoutes.js +146 -130
  13. package/dist/index.js +35 -34
  14. package/dist/movethewheels/components/EntityConversationsCard.d.ts +8 -0
  15. package/dist/movethewheels/events/rybbit.d.ts +27 -0
  16. package/dist/movethewheels/hooks/useEntityComments.d.ts +26 -0
  17. package/dist/movethewheels/hooks/useFleet.d.ts +73 -1
  18. package/dist/movethewheels/hooks/useInventory.d.ts +19 -0
  19. package/dist/movethewheels/index.d.ts +1 -0
  20. package/dist/movethewheels/pages/DocumentsLibraryPage.d.ts +1 -0
  21. package/dist/movethewheels/pages/NotificationsCenterPage.d.ts +1 -0
  22. package/dist/movethewheels/types/index.d.ts +95 -2
  23. package/dist/node_modules/lucide-react/dist/esm/icons/check-check.js +10 -0
  24. package/dist/node_modules/lucide-react/dist/esm/icons/layers.js +17 -0
  25. package/dist/node_modules/lucide-react/dist/esm/icons/message-square.js +7 -0
  26. package/dist/node_modules/lucide-react/dist/esm/icons/send.js +10 -0
  27. package/dist/pages/DocumentsLibraryPage.js +235 -0
  28. package/dist/pages/DriverDetailsPage.js +625 -351
  29. package/dist/pages/NotificationsCenterPage.js +310 -0
  30. package/dist/pages/OrderDetailsPage.js +48 -42
  31. package/dist/pages/RouteDetailsPage.js +257 -251
  32. package/dist/pages/TrackingPage.js +202 -196
  33. package/dist/pages/VehicleDetailsPage.js +616 -314
  34. package/dist/pages/WarehouseDetailsPage.js +539 -253
  35. package/dist/stories/ControlTowerWidgets.stories.d.ts +10 -0
  36. package/dist/stories/DataTable.stories.d.ts +15 -0
  37. package/dist/stories/FleetCards.stories.d.ts +9 -0
  38. package/dist/stories/OrderForms.stories.d.ts +8 -0
  39. package/dist/stories/RouteMap.stories.d.ts +7 -0
  40. package/dist/stories/ShipmentTimeline.stories.d.ts +6 -0
  41. package/package.json +1 -1
  42. package/src/generated/tracking-quality-operations.ts +407 -0
  43. package/src/movethewheels/MoveTheWheelsRoot.tsx +16 -0
  44. package/src/movethewheels/MoveTheWheelsRoutes.tsx +17 -2
  45. package/src/movethewheels/components/EntityConversationsCard.tsx +143 -0
  46. package/src/movethewheels/components/maps/MapCanvas.tsx +3 -3
  47. package/src/movethewheels/events/__tests__/rybbit.test.ts +98 -0
  48. package/src/movethewheels/events/rybbit.ts +191 -0
  49. package/src/movethewheels/hooks/useEntityComments.ts +258 -0
  50. package/src/movethewheels/hooks/useFleet.ts +300 -5
  51. package/src/movethewheels/hooks/useInventory.ts +231 -3
  52. package/src/movethewheels/hooks/useMultiModalShipments.ts +8 -1
  53. package/src/movethewheels/hooks/useOrders.ts +19 -3
  54. package/src/movethewheels/hooks/useRoutes.ts +14 -2
  55. package/src/movethewheels/index.ts +1 -0
  56. package/src/movethewheels/pages/DocumentsLibraryPage.tsx +229 -0
  57. package/src/movethewheels/pages/DriverDetailsPage.tsx +250 -1
  58. package/src/movethewheels/pages/NotificationsCenterPage.tsx +331 -0
  59. package/src/movethewheels/pages/OrderDetailsPage.tsx +8 -0
  60. package/src/movethewheels/pages/RouteDetailsPage.tsx +6 -0
  61. package/src/movethewheels/pages/TrackingPage.tsx +8 -0
  62. package/src/movethewheels/pages/VehicleDetailsPage.tsx +255 -1
  63. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +266 -2
  64. package/src/movethewheels/types/index.ts +103 -2
  65. package/src/stories/ControlTowerWidgets.stories.tsx +150 -0
  66. package/src/stories/DataTable.stories.tsx +94 -0
  67. package/src/stories/FleetCards.stories.tsx +77 -0
  68. package/src/stories/OrderForms.stories.tsx +84 -0
  69. package/src/stories/RouteMap.stories.tsx +43 -0
  70. package/src/stories/ShipmentTimeline.stories.tsx +128 -0
@@ -10,51 +10,52 @@ import { StatusBadge as l } from "../components/StatusBadge.js";
10
10
  import { Button as u, Card as d, CardContent as f, CardHeader as p, CardTitle as m, Input as h } from "../components/ui.js";
11
11
  import "../components/maps/index.js";
12
12
  import { ProofOfDeliveryCard as g } from "../components/ProofOfDeliveryCard.js";
13
- import { firstRealLatLng as _ } from "../utils/mapMarkers.js";
13
+ import { EntityConversationsCard as _ } from "../components/EntityConversationsCard.js";
14
14
  import { TrackingMap as v } from "../components/maps/TrackingMap.js";
15
- import { useOrderTracking as y } from "../hooks/useTracking.js";
16
- import { formatAddress as b, formatDate as x } from "../utils/formatters.js";
17
- import { useMoveTheWheels as S } from "../providers/MoveTheWheelsProvider.js";
18
- import { joinPath as C } from "../utils/navigation.js";
19
- import { useMemo as w, useState as T } from "react";
20
- import { useSearchParams as E } from "react-router";
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";
15
+ import { firstRealLatLng as y } from "../utils/mapMarkers.js";
16
+ import { useOrderTracking as b } from "../hooks/useTracking.js";
17
+ import { formatAddress as x, formatDate as S } from "../utils/formatters.js";
18
+ import { useMoveTheWheels as C } from "../providers/MoveTheWheelsProvider.js";
19
+ import { joinPath as w } from "../utils/navigation.js";
20
+ import { useMemo as T, useState as E } from "react";
21
+ import { useSearchParams as D } from "react-router";
22
+ import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
23
+ import { useI18n as j } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
24
+ import { EmphasisPanel as M, PagePurpose as N } from "@burdenoff/fe-libs/ui";
24
25
  // src/movethewheels/pages/TrackingPage.tsx
25
- function N() {
26
- let { t: N } = A(), P = (e, t) => {
27
- let n = N(e);
26
+ function P() {
27
+ let { t: P } = j(), F = (e, t) => {
28
+ let n = P(e);
28
29
  return n === e ? t : n;
29
- }, { basePath: F, navigate: I } = S(), [L] = E(), R = L.get("order") || "", [z, B] = T(R), [V, H] = T(R), { tracking: U, order: W, isLoading: G, error: K } = y(V || void 0), q = (e) => {
30
- e.preventDefault(), H(z);
31
- }, J = (e) => {
32
- I && I(C(F, e));
33
- }, Y = w(() => {
34
- if (!W) return null;
35
- let e = _(W.pickupAddress), t = _(W.deliveryAddress), n = e ? {
30
+ }, { basePath: I, navigate: L } = C(), [R] = D(), z = R.get("order") || "", [B, V] = E(z), [H, U] = E(z), { tracking: W, order: G, isLoading: K, error: q } = b(H || void 0), J = (e) => {
31
+ e.preventDefault(), U(B);
32
+ }, Y = (e) => {
33
+ L && L(w(I, e));
34
+ }, X = T(() => {
35
+ if (!G) return null;
36
+ let e = y(G.pickupAddress), t = y(G.deliveryAddress), n = e ? {
36
37
  ...e,
37
- label: `Pickup · ${W.pickupAddress.city || "Origin"}`
38
+ label: `Pickup · ${G.pickupAddress.city || "Origin"}`
38
39
  } : null, r = t ? {
39
40
  ...t,
40
- label: `Delivery · ${W.deliveryAddress.city || "Destination"}`
41
- } : null, i = (U?.locationHistory ?? []).map((e) => {
42
- let t = _(e);
41
+ label: `Delivery · ${G.deliveryAddress.city || "Destination"}`
42
+ } : null, i = (W?.locationHistory ?? []).map((e) => {
43
+ let t = y(e);
43
44
  return t ? {
44
45
  lat: t.lat,
45
46
  lng: t.lng,
46
47
  timestamp: e.timestamp?.toISOString()
47
48
  } : null;
48
- }).filter((e) => e !== null), a = W.timeline.map((e) => {
49
- let t = e.location ? _(e.location) : null;
49
+ }).filter((e) => e !== null), a = G.timeline.map((e) => {
50
+ let t = e.location ? y(e.location) : null;
50
51
  return t ? {
51
52
  lat: t.lat,
52
53
  lng: t.lng,
53
54
  timestamp: new Date(e.timestamp).toISOString()
54
55
  } : null;
55
- }).filter((e) => e !== null), o = i.length > 0 ? i : a, s = U ? _(U.currentLocation) : null, c = s ? {
56
+ }).filter((e) => e !== null), o = i.length > 0 ? i : a, s = W ? y(W.currentLocation) : null, c = s ? {
56
57
  ...s,
57
- label: U?.currentLocation?.address || "Current position"
58
+ label: W?.currentLocation?.address || "Current position"
58
59
  } : null;
59
60
  return {
60
61
  origin: n,
@@ -63,117 +64,117 @@ function N() {
63
64
  current: c,
64
65
  hasAny: !!(n || r || c || o.length > 0)
65
66
  };
66
- }, [W, U]);
67
- return /* @__PURE__ */ k(c, {
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(e, { size: 24 }),
71
- headerActions: /* @__PURE__ */ k(u, {
67
+ }, [G, W]);
68
+ return /* @__PURE__ */ A(c, {
69
+ title: F("movethewheels.tracking.title", "Track Shipment"),
70
+ subtitle: F("movethewheels.tracking.subtitle", "Enter a tracking number or order ID to track your shipment"),
71
+ icon: /* @__PURE__ */ k(e, { size: 24 }),
72
+ headerActions: /* @__PURE__ */ A(u, {
72
73
  variant: "outline",
73
- onClick: () => J("tracking/live"),
74
- children: [/* @__PURE__ */ O(e, { size: 16 }), P("movethewheels.tracking.actions.liveMapView", "Live Map View")]
74
+ onClick: () => Y("tracking/live"),
75
+ children: [/* @__PURE__ */ k(e, { size: 16 }), F("movethewheels.tracking.actions.liveMapView", "Live Map View")]
75
76
  }),
76
77
  children: [
77
- /* @__PURE__ */ O(M, {
78
- icon: /* @__PURE__ */ O(e, { 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.")
78
+ /* @__PURE__ */ k(N, {
79
+ icon: /* @__PURE__ */ k(e, { size: 18 }),
80
+ children: F("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.")
80
81
  }),
81
- /* @__PURE__ */ O(d, { children: /* @__PURE__ */ O(f, {
82
+ /* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(f, {
82
83
  className: "p-6",
83
- children: /* @__PURE__ */ k("form", {
84
- onSubmit: q,
84
+ children: /* @__PURE__ */ A("form", {
85
+ onSubmit: J,
85
86
  className: "flex flex-col gap-4 sm:flex-row",
86
- children: [/* @__PURE__ */ k("div", {
87
+ children: [/* @__PURE__ */ A("div", {
87
88
  className: "flex-1 relative",
88
- children: [/* @__PURE__ */ O(t, { 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)"),
89
+ children: [/* @__PURE__ */ k(t, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-text-secondary" }), /* @__PURE__ */ k(h, {
90
+ value: B,
91
+ onChange: (e) => V(e.target.value),
92
+ placeholder: F("movethewheels.tracking.search.placeholder", "Enter tracking number or order ID (e.g., order-1 or TRK123456789)"),
92
93
  className: "pl-10 h-12 text-lg"
93
94
  })]
94
- }), /* @__PURE__ */ O(u, {
95
+ }), /* @__PURE__ */ k(u, {
95
96
  type: "submit",
96
97
  size: "lg",
97
98
  className: "w-full sm:w-auto",
98
- disabled: !z || G,
99
- children: G ? P("movethewheels.tracking.search.searching", "Searching...") : P("movethewheels.tracking.search.track", "Track")
99
+ disabled: !B || K,
100
+ children: K ? F("movethewheels.tracking.search.searching", "Searching...") : F("movethewheels.tracking.search.track", "Track")
100
101
  })]
101
102
  })
102
103
  }) }),
103
- K && /* @__PURE__ */ O(d, {
104
+ q && /* @__PURE__ */ k(d, {
104
105
  className: "border-status-error-border",
105
- children: /* @__PURE__ */ O(f, {
106
+ children: /* @__PURE__ */ k(f, {
106
107
  className: "p-6",
107
- children: /* @__PURE__ */ k("div", {
108
+ children: /* @__PURE__ */ A("div", {
108
109
  className: "flex items-center gap-4",
109
- children: [/* @__PURE__ */ O(o, { className: "w-8 h-8 text-status-error-text" }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
110
+ children: [/* @__PURE__ */ k(o, { className: "w-8 h-8 text-status-error-text" }), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
110
111
  className: "font-medium text-status-error-text",
111
- children: P("movethewheels.tracking.error.title", "Unable to find shipment")
112
- }), /* @__PURE__ */ O("p", {
112
+ children: F("movethewheels.tracking.error.title", "Unable to find shipment")
113
+ }), /* @__PURE__ */ k("p", {
113
114
  className: "text-sm text-text-secondary",
114
- children: P("movethewheels.tracking.error.description", "Please check the tracking number and try again")
115
+ children: F("movethewheels.tracking.error.description", "Please check the tracking number and try again")
115
116
  })] })]
116
117
  })
117
118
  })
118
119
  }),
119
- !V && !K && /* @__PURE__ */ O(s, {
120
+ !H && !q && /* @__PURE__ */ k(s, {
120
121
  illustration: "onboarding",
121
- title: P("movethewheels.tracking.empty.title", "Enter a tracking number"),
122
- description: P("movethewheels.tracking.empty.description", "Use your tracking number or order ID to see the current status of your shipment")
122
+ title: F("movethewheels.tracking.empty.title", "Enter a tracking number"),
123
+ description: F("movethewheels.tracking.empty.description", "Use your tracking number or order ID to see the current status of your shipment")
123
124
  }),
124
- W && !U && /* @__PURE__ */ O(d, {
125
+ G && !W && /* @__PURE__ */ k(d, {
125
126
  "data-testid": "tracking-empty-state",
126
- children: /* @__PURE__ */ O(f, {
127
+ children: /* @__PURE__ */ k(f, {
127
128
  className: "p-6 sm:p-8",
128
- children: /* @__PURE__ */ k("div", {
129
+ children: /* @__PURE__ */ A("div", {
129
130
  className: "flex flex-col gap-6 sm:flex-row sm:items-start",
130
- children: [/* @__PURE__ */ O("div", {
131
+ children: [/* @__PURE__ */ k("div", {
131
132
  className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-bg-sunken text-text-secondary",
132
- children: /* @__PURE__ */ O(i, { size: 24 })
133
- }), /* @__PURE__ */ k("div", {
133
+ children: /* @__PURE__ */ k(i, { size: 24 })
134
+ }), /* @__PURE__ */ A("div", {
134
135
  className: "min-w-0 flex-1",
135
136
  children: [
136
- /* @__PURE__ */ O("h2", {
137
+ /* @__PURE__ */ k("h2", {
137
138
  className: "text-lg font-semibold text-text-primary",
138
- children: P("movethewheels.tracking.emptyState.title", "No tracking updates yet")
139
+ children: F("movethewheels.tracking.emptyState.title", "No tracking updates yet")
139
140
  }),
140
- /* @__PURE__ */ O("p", {
141
+ /* @__PURE__ */ k("p", {
141
142
  className: "mt-1 text-sm text-text-secondary",
142
- children: P("movethewheels.tracking.emptyState.description", "This order was found, but tracking updates will appear after the first shipment event.")
143
+ children: F("movethewheels.tracking.emptyState.description", "This order was found, but tracking updates will appear after the first shipment event.")
143
144
  }),
144
- /* @__PURE__ */ k("div", {
145
+ /* @__PURE__ */ A("div", {
145
146
  className: "mt-6 grid grid-cols-2 gap-4 sm:grid-cols-4",
146
147
  children: [
147
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
148
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
148
149
  className: "text-sm text-text-secondary",
149
- children: P("movethewheels.tracking.emptyState.order", "Order")
150
- }), /* @__PURE__ */ O("p", {
150
+ children: F("movethewheels.tracking.emptyState.order", "Order")
151
+ }), /* @__PURE__ */ k("p", {
151
152
  className: "font-medium",
152
- children: W.orderNumber
153
+ children: G.orderNumber
153
154
  })] }),
154
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
155
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
155
156
  className: "text-sm text-text-secondary",
156
- children: P("movethewheels.tracking.emptyState.status", "Status")
157
- }), /* @__PURE__ */ O(l, {
158
- status: W.status,
157
+ children: F("movethewheels.tracking.emptyState.status", "Status")
158
+ }), /* @__PURE__ */ k(l, {
159
+ status: G.status,
159
160
  type: "order"
160
161
  })] }),
161
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
162
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
162
163
  className: "text-sm text-text-secondary",
163
- children: P("movethewheels.tracking.details.trackingNumber", "Tracking Number")
164
- }), /* @__PURE__ */ O("p", {
164
+ children: F("movethewheels.tracking.details.trackingNumber", "Tracking Number")
165
+ }), /* @__PURE__ */ k("p", {
165
166
  className: "font-mono font-medium",
166
- children: W.trackingNumber || "—"
167
+ children: G.trackingNumber || "—"
167
168
  })] }),
168
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
169
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
169
170
  className: "text-sm text-text-secondary",
170
- children: P("movethewheels.tracking.details.items", "Items")
171
- }), /* @__PURE__ */ k("p", {
171
+ children: F("movethewheels.tracking.details.items", "Items")
172
+ }), /* @__PURE__ */ A("p", {
172
173
  className: "font-medium",
173
174
  children: [
174
- W.items.length,
175
+ G.items.length,
175
176
  " ",
176
- P("movethewheels.tracking.details.itemsSuffix", "items")
177
+ F("movethewheels.tracking.details.itemsSuffix", "items")
177
178
  ]
178
179
  })] })
179
180
  ]
@@ -183,100 +184,100 @@ function N() {
183
184
  })
184
185
  })
185
186
  }),
186
- W && U && /* @__PURE__ */ k("div", {
187
+ G && W && /* @__PURE__ */ A("div", {
187
188
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
188
- children: [/* @__PURE__ */ k("div", {
189
+ children: [/* @__PURE__ */ A("div", {
189
190
  className: "lg:col-span-2 space-y-6",
190
191
  children: [
191
- /* @__PURE__ */ k(j, { children: [/* @__PURE__ */ k("div", {
192
+ /* @__PURE__ */ A(M, { children: [/* @__PURE__ */ A("div", {
192
193
  className: "flex items-center justify-between mb-4",
193
- children: [/* @__PURE__ */ k("h2", {
194
+ children: [/* @__PURE__ */ A("h2", {
194
195
  className: "flex items-center gap-2 text-base font-semibold text-text-primary",
195
196
  children: [
196
- /* @__PURE__ */ O(n, { size: 20 }),
197
- P("movethewheels.tracking.orderLabel", "Order"),
197
+ /* @__PURE__ */ k(n, { size: 20 }),
198
+ F("movethewheels.tracking.orderLabel", "Order"),
198
199
  " ",
199
- W.orderNumber
200
+ G.orderNumber
200
201
  ]
201
- }), /* @__PURE__ */ O(l, {
202
- status: W.status,
202
+ }), /* @__PURE__ */ k(l, {
203
+ status: G.status,
203
204
  type: "order"
204
205
  })]
205
- }), /* @__PURE__ */ k("div", {
206
+ }), /* @__PURE__ */ A("div", {
206
207
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
207
208
  children: [
208
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
209
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
209
210
  className: "text-sm text-text-secondary",
210
- children: P("movethewheels.tracking.details.trackingNumber", "Tracking Number")
211
- }), /* @__PURE__ */ O("p", {
211
+ children: F("movethewheels.tracking.details.trackingNumber", "Tracking Number")
212
+ }), /* @__PURE__ */ k("p", {
212
213
  className: "font-mono font-medium",
213
- children: W.trackingNumber || "—"
214
+ children: G.trackingNumber || "—"
214
215
  })] }),
215
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
216
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
216
217
  className: "text-sm text-text-secondary",
217
- children: P("movethewheels.tracking.details.estimatedDelivery", "Estimated Delivery")
218
- }), /* @__PURE__ */ O("p", {
218
+ children: F("movethewheels.tracking.details.estimatedDelivery", "Estimated Delivery")
219
+ }), /* @__PURE__ */ k("p", {
219
220
  className: "font-medium",
220
- children: U?.estimatedArrival ? x(U.estimatedArrival, "full") : W.scheduledDelivery ? x(W.scheduledDelivery, "full") : P("movethewheels.tracking.details.tbd", "TBD")
221
+ children: W?.estimatedArrival ? S(W.estimatedArrival, "full") : G.scheduledDelivery ? S(G.scheduledDelivery, "full") : F("movethewheels.tracking.details.tbd", "TBD")
221
222
  })] }),
222
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
223
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
223
224
  className: "text-sm text-text-secondary",
224
- children: P("movethewheels.tracking.details.items", "Items")
225
- }), /* @__PURE__ */ k("p", {
225
+ children: F("movethewheels.tracking.details.items", "Items")
226
+ }), /* @__PURE__ */ A("p", {
226
227
  className: "font-medium",
227
228
  children: [
228
- W.items.length,
229
+ G.items.length,
229
230
  " ",
230
- P("movethewheels.tracking.details.itemsSuffix", "items")
231
+ F("movethewheels.tracking.details.itemsSuffix", "items")
231
232
  ]
232
233
  })] }),
233
- /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
234
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
234
235
  className: "text-sm text-text-secondary",
235
- children: P("movethewheels.tracking.details.lastUpdated", "Last Updated")
236
- }), /* @__PURE__ */ O("p", {
236
+ children: F("movethewheels.tracking.details.lastUpdated", "Last Updated")
237
+ }), /* @__PURE__ */ k("p", {
237
238
  className: "font-medium",
238
- children: U?.lastUpdated ? x(U.lastUpdated, "relative") : P("movethewheels.tracking.details.noUpdates", "No tracking updates yet")
239
+ children: W?.lastUpdated ? S(W.lastUpdated, "relative") : F("movethewheels.tracking.details.noUpdates", "No tracking updates yet")
239
240
  })] })
240
241
  ]
241
242
  })] }),
242
- /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
243
+ /* @__PURE__ */ A(d, { children: [/* @__PURE__ */ k(p, { children: /* @__PURE__ */ A(m, {
243
244
  className: "flex items-center gap-2",
244
- children: [/* @__PURE__ */ O(e, { size: 18 }), P("movethewheels.tracking.routeMap.title", "Route map")]
245
- }) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ O(v, {
245
+ children: [/* @__PURE__ */ k(e, { size: 18 }), F("movethewheels.tracking.routeMap.title", "Route map")]
246
+ }) }), /* @__PURE__ */ k(f, { children: /* @__PURE__ */ k(v, {
246
247
  className: "overflow-hidden rounded-lg border border-border-seam",
247
248
  height: 320,
248
- origin: Y?.origin ?? null,
249
- destination: Y?.destination ?? null,
250
- trail: Y?.trail ?? [],
251
- current: Y?.current ?? null,
252
- emptyMessage: P("movethewheels.tracking.routeMap.empty", "No location coordinates recorded for this shipment yet")
249
+ origin: X?.origin ?? null,
250
+ destination: X?.destination ?? null,
251
+ trail: X?.trail ?? [],
252
+ current: X?.current ?? null,
253
+ emptyMessage: F("movethewheels.tracking.routeMap.empty", "No location coordinates recorded for this shipment yet")
253
254
  }) })] }),
254
- /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
255
+ /* @__PURE__ */ A(d, { children: [/* @__PURE__ */ k(p, { children: /* @__PURE__ */ A(m, {
255
256
  className: "flex items-center gap-2",
256
- children: [/* @__PURE__ */ O(i, { size: 18 }), P("movethewheels.tracking.progress.title", "Shipment Progress")]
257
- }) }), /* @__PURE__ */ k(f, { children: [/* @__PURE__ */ O("div", {
257
+ children: [/* @__PURE__ */ k(i, { size: 18 }), F("movethewheels.tracking.progress.title", "Shipment Progress")]
258
+ }) }), /* @__PURE__ */ A(f, { children: [/* @__PURE__ */ k("div", {
258
259
  className: "relative",
259
- children: /* @__PURE__ */ O("div", {
260
+ children: /* @__PURE__ */ k("div", {
260
261
  className: "flex justify-between mb-4",
261
262
  children: [
262
263
  {
263
264
  status: "confirmed",
264
- label: P("movethewheels.tracking.progress.confirmed", "Confirmed"),
265
+ label: F("movethewheels.tracking.progress.confirmed", "Confirmed"),
265
266
  icon: a
266
267
  },
267
268
  {
268
269
  status: "picked_up",
269
- label: P("movethewheels.tracking.progress.pickedUp", "Picked Up"),
270
+ label: F("movethewheels.tracking.progress.pickedUp", "Picked Up"),
270
271
  icon: n
271
272
  },
272
273
  {
273
274
  status: "in_transit",
274
- label: P("movethewheels.tracking.progress.inTransit", "In Transit"),
275
+ label: F("movethewheels.tracking.progress.inTransit", "In Transit"),
275
276
  icon: r
276
277
  },
277
278
  {
278
279
  status: "delivered",
279
- label: P("movethewheels.tracking.progress.delivered", "Delivered"),
280
+ label: F("movethewheels.tracking.progress.delivered", "Delivered"),
280
281
  icon: e
281
282
  }
282
283
  ].map((e, t) => {
@@ -288,19 +289,19 @@ function N() {
288
289
  "in_transit",
289
290
  "out_for_delivery",
290
291
  "delivered"
291
- ], 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";
292
- return /* @__PURE__ */ k("div", {
292
+ ], r = n.indexOf(G.status), i = n.indexOf(e.status) <= r, a = e.status === G.status || G.status === "out_for_delivery" && e.status === "in_transit";
293
+ return /* @__PURE__ */ A("div", {
293
294
  className: "flex flex-col items-center flex-1",
294
295
  children: [
295
- /* @__PURE__ */ O("div", {
296
+ /* @__PURE__ */ k("div", {
296
297
  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" : ""}`,
297
- children: /* @__PURE__ */ O(e.icon, { size: 20 })
298
+ children: /* @__PURE__ */ k(e.icon, { size: 20 })
298
299
  }),
299
- /* @__PURE__ */ O("p", {
300
+ /* @__PURE__ */ k("p", {
300
301
  className: `text-xs mt-2 text-center ${i ? "font-medium" : "text-text-secondary"}`,
301
302
  children: e.label
302
303
  }),
303
- t < 3 && /* @__PURE__ */ O("div", {
304
+ t < 3 && /* @__PURE__ */ k("div", {
304
305
  className: `absolute top-5 h-0.5 ${i ? "bg-action-primary-bg" : "bg-bg-sunken"}`,
305
306
  style: {
306
307
  left: `calc(${(t + .5) * 25}% + 20px)`,
@@ -311,135 +312,140 @@ function N() {
311
312
  }, e.status);
312
313
  })
313
314
  })
314
- }), /* @__PURE__ */ O("div", {
315
+ }), /* @__PURE__ */ k("div", {
315
316
  className: "mt-8 space-y-4",
316
- children: W.timeline.slice().reverse().map((t, n) => /* @__PURE__ */ k("div", {
317
+ children: G.timeline.slice().reverse().map((t, n) => /* @__PURE__ */ A("div", {
317
318
  className: "flex gap-4",
318
- children: [/* @__PURE__ */ k("div", {
319
+ children: [/* @__PURE__ */ A("div", {
319
320
  className: "relative",
320
- children: [/* @__PURE__ */ O("div", { className: `w-3 h-3 rounded-full ${n === 0 ? "bg-action-primary-bg" : "bg-bg-sunken"}` }), n < W.timeline.length - 1 && /* @__PURE__ */ O("div", { className: "absolute top-3 left-1.5 w-px h-8 -ml-px bg-border" })]
321
- }), /* @__PURE__ */ k("div", {
321
+ children: [/* @__PURE__ */ k("div", { className: `w-3 h-3 rounded-full ${n === 0 ? "bg-action-primary-bg" : "bg-bg-sunken"}` }), n < G.timeline.length - 1 && /* @__PURE__ */ k("div", { className: "absolute top-3 left-1.5 w-px h-8 -ml-px bg-border" })]
322
+ }), /* @__PURE__ */ A("div", {
322
323
  className: "flex-1 pb-4",
323
324
  children: [
324
- /* @__PURE__ */ k("div", {
325
+ /* @__PURE__ */ A("div", {
325
326
  className: "flex items-center gap-2",
326
- children: [/* @__PURE__ */ O(l, {
327
+ children: [/* @__PURE__ */ k(l, {
327
328
  status: t.status,
328
329
  type: "order",
329
330
  size: "sm"
330
- }), /* @__PURE__ */ O("span", {
331
+ }), /* @__PURE__ */ k("span", {
331
332
  className: "text-sm text-text-secondary",
332
- children: x(t.timestamp, "full")
333
+ children: S(t.timestamp, "full")
333
334
  })]
334
335
  }),
335
- t.notes && /* @__PURE__ */ O("p", {
336
+ t.notes && /* @__PURE__ */ k("p", {
336
337
  className: "text-sm mt-1",
337
338
  children: t.notes
338
339
  }),
339
- t.location && /* @__PURE__ */ k("p", {
340
+ t.location && /* @__PURE__ */ A("p", {
340
341
  className: "text-xs text-text-secondary mt-1",
341
- children: [/* @__PURE__ */ O(e, {
342
+ children: [/* @__PURE__ */ k(e, {
342
343
  size: 12,
343
344
  className: "inline mr-1"
344
- }), b(t.location)]
345
+ }), x(t.location)]
345
346
  })
346
347
  ]
347
348
  })]
348
349
  }, n))
349
350
  })] })] }),
350
- U?.alerts && U.alerts.length > 0 && /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
351
+ W?.alerts && W.alerts.length > 0 && /* @__PURE__ */ A(d, { children: [/* @__PURE__ */ k(p, { children: /* @__PURE__ */ A(m, {
351
352
  className: "flex items-center gap-2",
352
- children: [/* @__PURE__ */ O(o, { size: 18 }), P("movethewheels.tracking.alerts.title", "Alerts")]
353
- }) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ O("div", {
353
+ children: [/* @__PURE__ */ k(o, { size: 18 }), F("movethewheels.tracking.alerts.title", "Alerts")]
354
+ }) }), /* @__PURE__ */ k(f, { children: /* @__PURE__ */ k("div", {
354
355
  className: "space-y-3",
355
- children: U.alerts.map((e) => /* @__PURE__ */ k("div", {
356
+ children: W.alerts.map((e) => /* @__PURE__ */ A("div", {
356
357
  className: `flex items-start gap-3 p-3 rounded-lg ${e.severity === "critical" ? "bg-status-error-bg-subtle" : (e.severity, "bg-status-warning-bg-subtle")}`,
357
- children: [/* @__PURE__ */ O(o, {
358
+ children: [/* @__PURE__ */ k(o, {
358
359
  size: 16,
359
360
  className: e.severity === "critical" ? "text-status-error-text" : (e.severity, "text-status-warning-text")
360
- }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
361
+ }), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
361
362
  className: "text-sm font-medium",
362
363
  children: e.message
363
- }), /* @__PURE__ */ k("p", {
364
+ }), /* @__PURE__ */ A("p", {
364
365
  className: "text-xs text-text-secondary",
365
- children: [e.timestamp ? x(e.timestamp, "relative") : P("movethewheels.tracking.alerts.timeUnknown", "Time not recorded"), e.resolvedAt && ` - ${P("movethewheels.tracking.alerts.resolved", "Resolved")}`]
366
+ children: [e.timestamp ? S(e.timestamp, "relative") : F("movethewheels.tracking.alerts.timeUnknown", "Time not recorded"), e.resolvedAt && ` - ${F("movethewheels.tracking.alerts.resolved", "Resolved")}`]
366
367
  })] })]
367
368
  }, e.id))
368
369
  }) })] })
369
370
  ]
370
- }), /* @__PURE__ */ k("div", {
371
+ }), /* @__PURE__ */ A("div", {
371
372
  className: "space-y-6",
372
373
  children: [
373
- /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
374
+ /* @__PURE__ */ A(d, { children: [/* @__PURE__ */ k(p, { children: /* @__PURE__ */ A(m, {
374
375
  className: "flex items-center gap-2",
375
- children: [/* @__PURE__ */ O(e, { size: 18 }), P("movethewheels.tracking.location.title", "Current Location")]
376
- }) }), /* @__PURE__ */ k(f, { children: [Y?.current ? /* @__PURE__ */ O(v, {
376
+ children: [/* @__PURE__ */ k(e, { size: 18 }), F("movethewheels.tracking.location.title", "Current Location")]
377
+ }) }), /* @__PURE__ */ A(f, { children: [X?.current ? /* @__PURE__ */ k(v, {
377
378
  className: "mb-4 overflow-hidden rounded-lg border border-border-seam",
378
379
  height: 180,
379
- current: Y.current,
380
- destination: Y.destination ?? null,
381
- trail: Y.trail
382
- }) : /* @__PURE__ */ k("div", {
380
+ current: X.current,
381
+ destination: X.destination ?? null,
382
+ trail: X.trail
383
+ }) : /* @__PURE__ */ A("div", {
383
384
  className: "mb-4 rounded-lg bg-bg-sunken p-4 text-center text-text-secondary",
384
- children: [/* @__PURE__ */ O(e, {
385
+ children: [/* @__PURE__ */ k(e, {
385
386
  size: 28,
386
387
  className: "mx-auto mb-2 opacity-60"
387
- }), /* @__PURE__ */ O("p", {
388
+ }), /* @__PURE__ */ k("p", {
388
389
  className: "text-sm",
389
- children: P("movethewheels.tracking.location.noFix", "No live position fix yet")
390
+ children: F("movethewheels.tracking.location.noFix", "No live position fix yet")
390
391
  })]
391
- }), U?.currentLocation ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("p", {
392
+ }), W?.currentLocation ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("p", {
392
393
  className: "text-sm",
393
- children: U.currentLocation.address || P("movethewheels.tracking.location.updating", "Location updating...")
394
- }), U.currentLocation.timestamp ? /* @__PURE__ */ k("p", {
394
+ children: W.currentLocation.address || F("movethewheels.tracking.location.updating", "Location updating...")
395
+ }), W.currentLocation.timestamp ? /* @__PURE__ */ A("p", {
395
396
  className: "text-xs text-text-secondary mt-1",
396
397
  children: [
397
- P("movethewheels.tracking.location.updated", "Updated"),
398
+ F("movethewheels.tracking.location.updated", "Updated"),
398
399
  " ",
399
- x(U.currentLocation.timestamp, "relative")
400
+ S(W.currentLocation.timestamp, "relative")
400
401
  ]
401
- }) : /* @__PURE__ */ O("p", {
402
+ }) : /* @__PURE__ */ k("p", {
402
403
  className: "text-xs text-text-secondary mt-1",
403
- children: P("movethewheels.tracking.location.timeUnknown", "Update time not recorded")
404
- })] }) : U ? /* @__PURE__ */ O("p", {
404
+ children: F("movethewheels.tracking.location.timeUnknown", "Update time not recorded")
405
+ })] }) : W ? /* @__PURE__ */ k("p", {
405
406
  className: "text-sm text-text-secondary",
406
- children: P("movethewheels.tracking.location.unknown", "Location not recorded")
407
+ children: F("movethewheels.tracking.location.unknown", "Location not recorded")
407
408
  }) : null] })] }),
408
- /* @__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", {
409
+ /* @__PURE__ */ A(d, { children: [/* @__PURE__ */ k(p, { children: /* @__PURE__ */ k(m, { children: F("movethewheels.tracking.deliveryAddress.title", "Delivery Address") }) }), /* @__PURE__ */ A(f, { children: [/* @__PURE__ */ k("p", {
409
410
  className: "text-sm",
410
- children: W.customerInfo.name
411
- }), /* @__PURE__ */ O("p", {
411
+ children: G.customerInfo.name
412
+ }), /* @__PURE__ */ k("p", {
412
413
  className: "text-sm text-text-secondary mt-2",
413
- children: b(W.deliveryAddress)
414
+ children: x(G.deliveryAddress)
414
415
  })] })] }),
415
- /* @__PURE__ */ O(g, { deliveryJobId: W.id }),
416
- /* @__PURE__ */ O(d, { children: /* @__PURE__ */ k(f, {
416
+ /* @__PURE__ */ k(g, { deliveryJobId: G.id }),
417
+ /* @__PURE__ */ k(_, {
418
+ entityType: "mtw_shipment",
419
+ entityId: G.id,
420
+ title: "Shipment conversation"
421
+ }),
422
+ /* @__PURE__ */ k(d, { children: /* @__PURE__ */ A(f, {
417
423
  className: "p-4 space-y-2",
418
- children: [/* @__PURE__ */ O(u, {
424
+ children: [/* @__PURE__ */ k(u, {
419
425
  variant: "outline",
420
426
  className: "w-full",
421
- onClick: () => J(`orders/${W.id}`),
422
- children: P("movethewheels.tracking.actions.viewOrderDetails", "View Order Details")
423
- }), /* @__PURE__ */ O(u, {
427
+ onClick: () => Y(`orders/${G.id}`),
428
+ children: F("movethewheels.tracking.actions.viewOrderDetails", "View Order Details")
429
+ }), /* @__PURE__ */ k(u, {
424
430
  variant: "outline",
425
431
  className: "w-full",
426
- children: P("movethewheels.tracking.actions.contactDriver", "Contact Driver")
432
+ children: F("movethewheels.tracking.actions.contactDriver", "Contact Driver")
427
433
  })]
428
434
  }) })
429
435
  ]
430
436
  })]
431
437
  }),
432
- V && !W && !G && !K && /* @__PURE__ */ O(s, {
438
+ H && !G && !K && !q && /* @__PURE__ */ k(s, {
433
439
  illustration: "empty-search",
434
- title: P("movethewheels.tracking.notFound.title", "Shipment not found"),
435
- description: `${P("movethewheels.tracking.notFound.descriptionPrefix", "No shipment found with tracking number")} "${V}"`,
436
- action: /* @__PURE__ */ O(u, {
440
+ title: F("movethewheels.tracking.notFound.title", "Shipment not found"),
441
+ description: `${F("movethewheels.tracking.notFound.descriptionPrefix", "No shipment found with tracking number")} "${H}"`,
442
+ action: /* @__PURE__ */ k(u, {
437
443
  variant: "outline",
438
- onClick: () => B(""),
439
- children: P("movethewheels.tracking.notFound.tryAnother", "Try another number")
444
+ onClick: () => V(""),
445
+ children: F("movethewheels.tracking.notFound.tryAnother", "Try another number")
440
446
  })
441
447
  })
442
448
  ]
443
449
  });
444
450
  }
445
- export { N as default };
451
+ export { P as default };