@burdenoff/microfe-movethewheels 2026.726.1 → 2026.731.1

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 (41) hide show
  1. package/dist/MoveTheWheelsRoutes.js +11 -3
  2. package/dist/components/ProofOfDeliveryCard.js +155 -0
  3. package/dist/components/SignaturePad.js +82 -0
  4. package/dist/hooks/index.js +1 -0
  5. package/dist/hooks/useEpod.js +208 -0
  6. package/dist/hooks/useMultiModalShipments.js +124 -0
  7. package/dist/index.js +22 -21
  8. package/dist/movethewheels/components/ProofOfDeliveryCard.d.ts +5 -0
  9. package/dist/movethewheels/components/SignaturePad.d.ts +11 -0
  10. package/dist/movethewheels/hooks/index.d.ts +1 -0
  11. package/dist/movethewheels/hooks/useEpod.d.ts +59 -0
  12. package/dist/movethewheels/hooks/useMultiModalShipments.d.ts +76 -0
  13. package/dist/movethewheels/pages/DeliveryCapturePage.d.ts +1 -0
  14. package/dist/movethewheels/pages/MultiModalShipmentPage.d.ts +8 -0
  15. package/dist/movethewheels/types/index.d.ts +18 -0
  16. package/dist/node_modules/lucide-react/dist/esm/icons/calculator.js +56 -0
  17. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js +8 -0
  18. package/dist/node_modules/lucide-react/dist/esm/icons/pen-line.js +11 -0
  19. package/dist/node_modules/lucide-react/dist/esm/icons/plane.js +8 -0
  20. package/dist/node_modules/lucide-react/dist/esm/icons/ship.js +26 -0
  21. package/dist/node_modules/lucide-react/dist/esm/icons/train-front.js +30 -0
  22. package/dist/node_modules/lucide-react/dist/esm/icons/type.js +24 -0
  23. package/dist/pages/DashboardPage.js +156 -151
  24. package/dist/pages/DeliveryCapturePage.js +245 -0
  25. package/dist/pages/MultiModalShipmentPage.js +420 -0
  26. package/dist/pages/OrderDetailsPage.js +14 -12
  27. package/dist/pages/TrackingPage.js +156 -154
  28. package/dist/utils/formatters.js +13 -2
  29. package/package.json +1 -1
  30. package/src/movethewheels/MoveTheWheelsRoutes.tsx +8 -0
  31. package/src/movethewheels/components/ProofOfDeliveryCard.tsx +149 -0
  32. package/src/movethewheels/components/SignaturePad.tsx +157 -0
  33. package/src/movethewheels/hooks/index.ts +12 -0
  34. package/src/movethewheels/hooks/useEpod.ts +410 -0
  35. package/src/movethewheels/hooks/useMultiModalShipments.ts +323 -0
  36. package/src/movethewheels/pages/DashboardPage.tsx +6 -0
  37. package/src/movethewheels/pages/DeliveryCapturePage.tsx +297 -0
  38. package/src/movethewheels/pages/MultiModalShipmentPage.tsx +552 -0
  39. package/src/movethewheels/pages/OrderDetailsPage.tsx +4 -0
  40. package/src/movethewheels/pages/TrackingPage.tsx +4 -0
  41. package/src/movethewheels/types/index.ts +21 -0
@@ -25,10 +25,11 @@ import { FormError as xe } from "../components/FormError.js";
25
25
  import { Notice as Se, useNotice as T } from "../components/Notice.js";
26
26
  import { formatAddress as E, formatCurrency as D, formatDate as O } from "../utils/formatters.js";
27
27
  import { DocumentsCard as Ce } from "../components/DocumentsCard.js";
28
+ import { ProofOfDeliveryCard as we } from "../components/ProofOfDeliveryCard.js";
28
29
  import { useState as k } from "react";
29
- import { useParams as we } from "react-router-dom";
30
+ import { useParams as Te } from "react-router-dom";
30
31
  import { jsx as A, jsxs as j } from "react/jsx-runtime";
31
- import { EmphasisPanel as Te, NextSteps as Ee, PagePurpose as De } from "@burdenoff/fe-libs/ui";
32
+ import { EmphasisPanel as Ee, NextSteps as De, PagePurpose as Oe } from "@burdenoff/fe-libs/ui";
32
33
  //#region src/movethewheels/pages/OrderDetailsPage.tsx
33
34
  var M = [
34
35
  "pending",
@@ -49,19 +50,19 @@ var M = [
49
50
  cancelled: "Cancelled",
50
51
  failed: "Failed"
51
52
  };
52
- function Oe(e) {
53
+ function ke(e) {
53
54
  let t = M.indexOf(e);
54
55
  return t === -1 || t >= M.length - 1 ? null : M[t + 1];
55
56
  }
56
57
  function P() {
57
- let { orderId: M } = we(), { basePath: P, navigate: F } = le(), { order: I, isLoading: ke, error: Ae, refetch: L } = ue(M), { updateOrder: je, updateOrderStatus: Me } = de(), { vehicles: Ne, drivers: Pe } = fe(), { message: R, notify: z } = T(), [B, V] = k(""), [H, U] = k(""), [W, G] = k(!1), [K, q] = k(!1), [J, Y] = k(null), X = Ne.filter((e) => e.status === "available" || e.id === I?.vehicleId), Z = Pe.filter((e) => e.status === "available" || e.id === I?.driverId), Fe = async () => {
58
+ let { orderId: M } = Te(), { basePath: P, navigate: F } = le(), { order: I, isLoading: Ae, error: je, refetch: L } = ue(M), { updateOrder: Me, updateOrderStatus: Ne } = de(), { vehicles: Pe, drivers: Fe } = fe(), { message: R, notify: z } = T(), [B, V] = k(""), [H, U] = k(""), [W, G] = k(!1), [K, q] = k(!1), [J, Y] = k(null), X = Pe.filter((e) => e.status === "available" || e.id === I?.vehicleId), Z = Fe.filter((e) => e.status === "available" || e.id === I?.driverId), Ie = async () => {
58
59
  if (!M || !B && !H) {
59
60
  Y("Pick a vehicle and/or a driver to assign.");
60
61
  return;
61
62
  }
62
63
  G(!0), Y(null);
63
64
  try {
64
- await je(M, {
65
+ await Me(M, {
65
66
  vehicleId: B || void 0,
66
67
  driverId: H || void 0
67
68
  }), z("Assignment updated."), V(""), U(""), L();
@@ -74,7 +75,7 @@ function P() {
74
75
  if (M) {
75
76
  q(!0), Y(null);
76
77
  try {
77
- await Me(M, e), z(t), L();
78
+ await Ne(M, e), z(t), L();
78
79
  } catch (e) {
79
80
  Y(e instanceof Error ? e.message : "Failed to update status.");
80
81
  } finally {
@@ -84,7 +85,7 @@ function P() {
84
85
  }, $ = (e) => {
85
86
  F && F(s(P, e));
86
87
  };
87
- return ke ? /* @__PURE__ */ A(_e, { message: "Loading order details..." }) : Ae || !I ? /* @__PURE__ */ A(ge, {
88
+ return Ae ? /* @__PURE__ */ A(_e, { message: "Loading order details..." }) : je || !I ? /* @__PURE__ */ A(ge, {
88
89
  title: "Order not found",
89
90
  message: "The order you're looking for doesn't exist or has been removed.",
90
91
  onRetry: L
@@ -124,11 +125,11 @@ function P() {
124
125
  ]
125
126
  }),
126
127
  children: [
127
- /* @__PURE__ */ A(De, {
128
+ /* @__PURE__ */ A(Oe, {
128
129
  icon: /* @__PURE__ */ A(i, { size: 18 }),
129
130
  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."
130
131
  }),
131
- /* @__PURE__ */ A(Ee, {
132
+ /* @__PURE__ */ A(De, {
132
133
  storageKey: "movethewheels-order-details",
133
134
  steps: [
134
135
  {
@@ -358,7 +359,7 @@ function P() {
358
359
  }), /* @__PURE__ */ j("div", {
359
360
  className: "space-y-6",
360
361
  children: [
361
- /* @__PURE__ */ j(Te, { children: [/* @__PURE__ */ j("h2", {
362
+ /* @__PURE__ */ j(Ee, { children: [/* @__PURE__ */ j("h2", {
362
363
  className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
363
364
  children: [/* @__PURE__ */ A(ne, { size: 18 }), "Order Summary"]
364
365
  }), /* @__PURE__ */ j("div", {
@@ -492,7 +493,7 @@ function P() {
492
493
  }),
493
494
  /* @__PURE__ */ j(l, {
494
495
  className: "w-full",
495
- onClick: Fe,
496
+ onClick: Ie,
496
497
  disabled: W || !B && !H,
497
498
  children: [/* @__PURE__ */ A(se, { size: 16 }), W ? "Assigning…" : "Assign driver & vehicle"]
498
499
  })
@@ -514,7 +515,7 @@ function P() {
514
515
  ]
515
516
  }),
516
517
  (() => {
517
- let e = Oe(I.status);
518
+ let e = ke(I.status);
518
519
  return e ? /* @__PURE__ */ j(l, {
519
520
  variant: "outline",
520
521
  className: "w-full",
@@ -544,6 +545,7 @@ function P() {
544
545
  entityType: "order",
545
546
  entityId: I.id
546
547
  }),
548
+ /* @__PURE__ */ A(we, { deliveryJobId: I.id }),
547
549
  I.specialInstructions && /* @__PURE__ */ j(u, { children: [/* @__PURE__ */ A(f, { children: /* @__PURE__ */ j(p, {
548
550
  className: "flex items-center gap-2",
549
551
  children: [/* @__PURE__ */ A(re, { size: 18 }), "Special Instructions"]
@@ -15,38 +15,39 @@ import "../components/maps/index.js";
15
15
  import { StatusBadge as y } from "../components/StatusBadge.js";
16
16
  import { formatAddress as b, formatDate as x } from "../utils/formatters.js";
17
17
  import { firstRealLatLng as S } from "../utils/mapMarkers.js";
18
- import { useMemo as C, useState as w } from "react";
19
- import { useSearchParams as T } from "react-router-dom";
20
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
21
- import { EmphasisPanel as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
22
- import { useI18n as A } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
+ import { ProofOfDeliveryCard as C } from "../components/ProofOfDeliveryCard.js";
19
+ import { useMemo as w, useState as T } from "react";
20
+ import { useSearchParams as E } from "react-router-dom";
21
+ import { jsx as D, jsxs as O } from "react/jsx-runtime";
22
+ import { EmphasisPanel as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
23
+ import { useI18n as j } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
24
  //#region src/movethewheels/pages/TrackingPage.tsx
24
- function j() {
25
- let { t: j } = A(), M = (e, t) => {
26
- let n = j(e);
25
+ function M() {
26
+ let { t: M } = j(), N = (e, t) => {
27
+ let n = M(e);
27
28
  return n === e ? t : n;
28
- }, { basePath: N, navigate: P } = c(), [F] = T(), I = F.get("order") || "", [L, R] = w(I), [z, B] = w(I), { tracking: V, order: H, isLoading: U, error: W } = l(z || void 0), G = (e) => {
29
- e.preventDefault(), B(L);
30
- }, K = (e) => {
31
- P && P(s(N, e));
32
- }, q = C(() => {
33
- if (!H) return null;
34
- let e = S(H.pickupAddress), t = S(H.deliveryAddress), n = e ? {
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 ? {
35
36
  ...e,
36
- label: `Pickup · ${H.pickupAddress.city || "Origin"}`
37
+ label: `Pickup · ${U.pickupAddress.city || "Origin"}`
37
38
  } : null, r = t ? {
38
39
  ...t,
39
- label: `Delivery · ${H.deliveryAddress.city || "Destination"}`
40
- } : null, i = H.timeline.map((e) => {
40
+ label: `Delivery · ${U.deliveryAddress.city || "Destination"}`
41
+ } : null, i = U.timeline.map((e) => {
41
42
  let t = e.location ? S(e.location) : null;
42
43
  return t ? {
43
44
  lat: t.lat,
44
45
  lng: t.lng,
45
46
  timestamp: new Date(e.timestamp).toISOString()
46
47
  } : null;
47
- }).filter((e) => e !== null), a = V ? S(V.currentLocation) : null, o = a ? {
48
+ }).filter((e) => e !== null), a = H ? S(H.currentLocation) : null, o = a ? {
48
49
  ...a,
49
- label: V?.currentLocation.address || "Current position"
50
+ label: H?.currentLocation.address || "Current position"
50
51
  } : null;
51
52
  return {
52
53
  origin: n,
@@ -55,157 +56,157 @@ function j() {
55
56
  current: o,
56
57
  hasAny: !!(n || r || o || i.length > 0)
57
58
  };
58
- }, [H, V]);
59
- return /* @__PURE__ */ D(_, {
60
- title: M("movethewheels.tracking.title", "Track Shipment"),
61
- subtitle: M("movethewheels.tracking.subtitle", "Enter a tracking number or order ID to track your shipment"),
62
- icon: /* @__PURE__ */ E(r, { size: 24 }),
63
- headerActions: /* @__PURE__ */ D(u, {
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, {
64
65
  variant: "outline",
65
- onClick: () => K("tracking/live"),
66
- children: [/* @__PURE__ */ E(r, { size: 16 }), M("movethewheels.tracking.actions.liveMapView", "Live Map View")]
66
+ onClick: () => q("tracking/live"),
67
+ children: [/* @__PURE__ */ D(r, { size: 16 }), N("movethewheels.tracking.actions.liveMapView", "Live Map View")]
67
68
  }),
68
69
  children: [
69
- /* @__PURE__ */ E(k, {
70
- icon: /* @__PURE__ */ E(r, { size: 18 }),
71
- children: M("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.")
70
+ /* @__PURE__ */ D(A, {
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.")
72
73
  }),
73
- /* @__PURE__ */ E(d, { children: /* @__PURE__ */ E(f, {
74
+ /* @__PURE__ */ D(d, { children: /* @__PURE__ */ D(f, {
74
75
  className: "p-6",
75
- children: /* @__PURE__ */ D("form", {
76
- onSubmit: G,
76
+ children: /* @__PURE__ */ O("form", {
77
+ onSubmit: K,
77
78
  className: "flex gap-4",
78
- children: [/* @__PURE__ */ D("div", {
79
+ children: [/* @__PURE__ */ O("div", {
79
80
  className: "flex-1 relative",
80
- children: [/* @__PURE__ */ E(a, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-text-secondary" }), /* @__PURE__ */ E(h, {
81
- value: L,
82
- onChange: (e) => R(e.target.value),
83
- placeholder: M("movethewheels.tracking.search.placeholder", "Enter tracking number or order ID (e.g., order-1 or TRK123456789)"),
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)"),
84
85
  className: "pl-10 h-12 text-lg"
85
86
  })]
86
- }), /* @__PURE__ */ E(u, {
87
+ }), /* @__PURE__ */ D(u, {
87
88
  type: "submit",
88
89
  size: "lg",
89
- disabled: !L || U,
90
- children: U ? M("movethewheels.tracking.search.searching", "Searching...") : M("movethewheels.tracking.search.track", "Track")
90
+ disabled: !R || W,
91
+ children: W ? N("movethewheels.tracking.search.searching", "Searching...") : N("movethewheels.tracking.search.track", "Track")
91
92
  })]
92
93
  })
93
94
  }) }),
94
- W && /* @__PURE__ */ E(d, {
95
+ G && /* @__PURE__ */ D(d, {
95
96
  className: "border-status-error-border",
96
- children: /* @__PURE__ */ E(f, {
97
+ children: /* @__PURE__ */ D(f, {
97
98
  className: "p-6",
98
- children: /* @__PURE__ */ D("div", {
99
+ children: /* @__PURE__ */ O("div", {
99
100
  className: "flex items-center gap-4",
100
- children: [/* @__PURE__ */ E(e, { className: "w-8 h-8 text-status-error-text" }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
101
+ children: [/* @__PURE__ */ D(e, { className: "w-8 h-8 text-status-error-text" }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
101
102
  className: "font-medium text-status-error-text",
102
- children: M("movethewheels.tracking.error.title", "Unable to find shipment")
103
- }), /* @__PURE__ */ E("p", {
103
+ children: N("movethewheels.tracking.error.title", "Unable to find shipment")
104
+ }), /* @__PURE__ */ D("p", {
104
105
  className: "text-sm text-text-secondary",
105
- children: M("movethewheels.tracking.error.description", "Please check the tracking number and try again")
106
+ children: N("movethewheels.tracking.error.description", "Please check the tracking number and try again")
106
107
  })] })]
107
108
  })
108
109
  })
109
110
  }),
110
- !z && !W && /* @__PURE__ */ E(g, {
111
+ !B && !G && /* @__PURE__ */ D(g, {
111
112
  illustration: "onboarding",
112
- title: M("movethewheels.tracking.empty.title", "Enter a tracking number"),
113
- description: M("movethewheels.tracking.empty.description", "Use your tracking number or order ID to see the current status of your shipment")
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")
114
115
  }),
115
- H && V && /* @__PURE__ */ D("div", {
116
+ U && H && /* @__PURE__ */ O("div", {
116
117
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
117
- children: [/* @__PURE__ */ D("div", {
118
+ children: [/* @__PURE__ */ O("div", {
118
119
  className: "lg:col-span-2 space-y-6",
119
120
  children: [
120
- /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ D("div", {
121
+ /* @__PURE__ */ O(k, { children: [/* @__PURE__ */ O("div", {
121
122
  className: "flex items-center justify-between mb-4",
122
- children: [/* @__PURE__ */ D("h2", {
123
+ children: [/* @__PURE__ */ O("h2", {
123
124
  className: "flex items-center gap-2 text-base font-semibold text-text-primary",
124
125
  children: [
125
- /* @__PURE__ */ E(i, { size: 20 }),
126
- M("movethewheels.tracking.orderLabel", "Order"),
126
+ /* @__PURE__ */ D(i, { size: 20 }),
127
+ N("movethewheels.tracking.orderLabel", "Order"),
127
128
  " ",
128
- H.orderNumber
129
+ U.orderNumber
129
130
  ]
130
- }), /* @__PURE__ */ E(y, {
131
- status: H.status,
131
+ }), /* @__PURE__ */ D(y, {
132
+ status: U.status,
132
133
  type: "order"
133
134
  })]
134
- }), /* @__PURE__ */ D("div", {
135
+ }), /* @__PURE__ */ O("div", {
135
136
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
136
137
  children: [
137
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
138
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
138
139
  className: "text-sm text-text-secondary",
139
- children: M("movethewheels.tracking.details.trackingNumber", "Tracking Number")
140
- }), /* @__PURE__ */ E("p", {
140
+ children: N("movethewheels.tracking.details.trackingNumber", "Tracking Number")
141
+ }), /* @__PURE__ */ D("p", {
141
142
  className: "font-mono font-medium",
142
- children: H.trackingNumber
143
+ children: U.trackingNumber
143
144
  })] }),
144
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
145
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
145
146
  className: "text-sm text-text-secondary",
146
- children: M("movethewheels.tracking.details.estimatedDelivery", "Estimated Delivery")
147
- }), /* @__PURE__ */ E("p", {
147
+ children: N("movethewheels.tracking.details.estimatedDelivery", "Estimated Delivery")
148
+ }), /* @__PURE__ */ D("p", {
148
149
  className: "font-medium",
149
- children: V.estimatedArrival ? x(V.estimatedArrival, "full") : H.scheduledDelivery ? x(H.scheduledDelivery, "full") : M("movethewheels.tracking.details.tbd", "TBD")
150
+ children: H.estimatedArrival ? x(H.estimatedArrival, "full") : U.scheduledDelivery ? x(U.scheduledDelivery, "full") : N("movethewheels.tracking.details.tbd", "TBD")
150
151
  })] }),
151
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
152
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
152
153
  className: "text-sm text-text-secondary",
153
- children: M("movethewheels.tracking.details.items", "Items")
154
- }), /* @__PURE__ */ D("p", {
154
+ children: N("movethewheels.tracking.details.items", "Items")
155
+ }), /* @__PURE__ */ O("p", {
155
156
  className: "font-medium",
156
157
  children: [
157
- H.items.length,
158
+ U.items.length,
158
159
  " ",
159
- M("movethewheels.tracking.details.itemsSuffix", "items")
160
+ N("movethewheels.tracking.details.itemsSuffix", "items")
160
161
  ]
161
162
  })] }),
162
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
163
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
163
164
  className: "text-sm text-text-secondary",
164
- children: M("movethewheels.tracking.details.lastUpdated", "Last Updated")
165
- }), /* @__PURE__ */ E("p", {
165
+ children: N("movethewheels.tracking.details.lastUpdated", "Last Updated")
166
+ }), /* @__PURE__ */ D("p", {
166
167
  className: "font-medium",
167
- children: x(V.lastUpdated, "relative")
168
+ children: x(H.lastUpdated, "relative")
168
169
  })] })
169
170
  ]
170
171
  })] }),
171
- /* @__PURE__ */ D(d, { children: [/* @__PURE__ */ E(p, { children: /* @__PURE__ */ D(m, {
172
+ /* @__PURE__ */ O(d, { children: [/* @__PURE__ */ D(p, { children: /* @__PURE__ */ O(m, {
172
173
  className: "flex items-center gap-2",
173
- children: [/* @__PURE__ */ E(r, { size: 18 }), M("movethewheels.tracking.routeMap.title", "Route map")]
174
- }) }), /* @__PURE__ */ E(f, { children: /* @__PURE__ */ E(v, {
174
+ children: [/* @__PURE__ */ D(r, { size: 18 }), N("movethewheels.tracking.routeMap.title", "Route map")]
175
+ }) }), /* @__PURE__ */ D(f, { children: /* @__PURE__ */ D(v, {
175
176
  className: "overflow-hidden rounded-lg border border-border-seam",
176
177
  height: 320,
177
- origin: q?.origin ?? null,
178
- destination: q?.destination ?? null,
179
- trail: q?.trail ?? [],
180
- current: q?.current ?? null,
181
- emptyMessage: M("movethewheels.tracking.routeMap.empty", "No location coordinates recorded for this shipment yet")
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")
182
183
  }) })] }),
183
- /* @__PURE__ */ D(d, { children: [/* @__PURE__ */ E(p, { children: /* @__PURE__ */ D(m, {
184
+ /* @__PURE__ */ O(d, { children: [/* @__PURE__ */ D(p, { children: /* @__PURE__ */ O(m, {
184
185
  className: "flex items-center gap-2",
185
- children: [/* @__PURE__ */ E(n, { size: 18 }), M("movethewheels.tracking.progress.title", "Shipment Progress")]
186
- }) }), /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E("div", {
186
+ children: [/* @__PURE__ */ D(n, { size: 18 }), N("movethewheels.tracking.progress.title", "Shipment Progress")]
187
+ }) }), /* @__PURE__ */ O(f, { children: [/* @__PURE__ */ D("div", {
187
188
  className: "relative",
188
- children: /* @__PURE__ */ E("div", {
189
+ children: /* @__PURE__ */ D("div", {
189
190
  className: "flex justify-between mb-4",
190
191
  children: [
191
192
  {
192
193
  status: "confirmed",
193
- label: M("movethewheels.tracking.progress.confirmed", "Confirmed"),
194
+ label: N("movethewheels.tracking.progress.confirmed", "Confirmed"),
194
195
  icon: t
195
196
  },
196
197
  {
197
198
  status: "picked_up",
198
- label: M("movethewheels.tracking.progress.pickedUp", "Picked Up"),
199
+ label: N("movethewheels.tracking.progress.pickedUp", "Picked Up"),
199
200
  icon: i
200
201
  },
201
202
  {
202
203
  status: "in_transit",
203
- label: M("movethewheels.tracking.progress.inTransit", "In Transit"),
204
+ label: N("movethewheels.tracking.progress.inTransit", "In Transit"),
204
205
  icon: o
205
206
  },
206
207
  {
207
208
  status: "delivered",
208
- label: M("movethewheels.tracking.progress.delivered", "Delivered"),
209
+ label: N("movethewheels.tracking.progress.delivered", "Delivered"),
209
210
  icon: r
210
211
  }
211
212
  ].map((e, t) => {
@@ -217,19 +218,19 @@ function j() {
217
218
  "in_transit",
218
219
  "out_for_delivery",
219
220
  "delivered"
220
- ], r = n.indexOf(H.status), i = n.indexOf(e.status) <= r, a = e.status === H.status || H.status === "out_for_delivery" && e.status === "in_transit";
221
- return /* @__PURE__ */ D("div", {
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", {
222
223
  className: "flex flex-col items-center flex-1",
223
224
  children: [
224
- /* @__PURE__ */ E("div", {
225
+ /* @__PURE__ */ D("div", {
225
226
  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" : ""}`,
226
- children: /* @__PURE__ */ E(e.icon, { size: 20 })
227
+ children: /* @__PURE__ */ D(e.icon, { size: 20 })
227
228
  }),
228
- /* @__PURE__ */ E("p", {
229
+ /* @__PURE__ */ D("p", {
229
230
  className: `text-xs mt-2 text-center ${i ? "font-medium" : "text-text-secondary"}`,
230
231
  children: e.label
231
232
  }),
232
- t < 3 && /* @__PURE__ */ E("div", {
233
+ t < 3 && /* @__PURE__ */ D("div", {
233
234
  className: `absolute top-5 h-0.5 ${i ? "bg-action-primary-bg" : "bg-bg-sunken"}`,
234
235
  style: {
235
236
  left: `calc(${(t + .5) * 25}% + 20px)`,
@@ -240,34 +241,34 @@ function j() {
240
241
  }, e.status);
241
242
  })
242
243
  })
243
- }), /* @__PURE__ */ E("div", {
244
+ }), /* @__PURE__ */ D("div", {
244
245
  className: "mt-8 space-y-4",
245
- children: H.timeline.slice().reverse().map((e, t) => /* @__PURE__ */ D("div", {
246
+ children: U.timeline.slice().reverse().map((e, t) => /* @__PURE__ */ O("div", {
246
247
  className: "flex gap-4",
247
- children: [/* @__PURE__ */ D("div", {
248
+ children: [/* @__PURE__ */ O("div", {
248
249
  className: "relative",
249
- children: [/* @__PURE__ */ E("div", { className: `w-3 h-3 rounded-full ${t === 0 ? "bg-action-primary-bg" : "bg-bg-sunken"}` }), t < H.timeline.length - 1 && /* @__PURE__ */ E("div", { className: "absolute top-3 left-1.5 w-px h-8 -ml-px bg-border" })]
250
- }), /* @__PURE__ */ D("div", {
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", {
251
252
  className: "flex-1 pb-4",
252
253
  children: [
253
- /* @__PURE__ */ D("div", {
254
+ /* @__PURE__ */ O("div", {
254
255
  className: "flex items-center gap-2",
255
- children: [/* @__PURE__ */ E(y, {
256
+ children: [/* @__PURE__ */ D(y, {
256
257
  status: e.status,
257
258
  type: "order",
258
259
  size: "sm"
259
- }), /* @__PURE__ */ E("span", {
260
+ }), /* @__PURE__ */ D("span", {
260
261
  className: "text-sm text-text-secondary",
261
262
  children: x(e.timestamp, "full")
262
263
  })]
263
264
  }),
264
- e.notes && /* @__PURE__ */ E("p", {
265
+ e.notes && /* @__PURE__ */ D("p", {
265
266
  className: "text-sm mt-1",
266
267
  children: e.notes
267
268
  }),
268
- e.location && /* @__PURE__ */ D("p", {
269
+ e.location && /* @__PURE__ */ O("p", {
269
270
  className: "text-xs text-text-secondary mt-1",
270
- children: [/* @__PURE__ */ E(r, {
271
+ children: [/* @__PURE__ */ D(r, {
271
272
  size: 12,
272
273
  className: "inline mr-1"
273
274
  }), b(e.location)]
@@ -276,97 +277,98 @@ function j() {
276
277
  })]
277
278
  }, t))
278
279
  })] })] }),
279
- V.alerts && V.alerts.length > 0 && /* @__PURE__ */ D(d, { children: [/* @__PURE__ */ E(p, { children: /* @__PURE__ */ D(m, {
280
+ H.alerts && H.alerts.length > 0 && /* @__PURE__ */ O(d, { children: [/* @__PURE__ */ D(p, { children: /* @__PURE__ */ O(m, {
280
281
  className: "flex items-center gap-2",
281
- children: [/* @__PURE__ */ E(e, { size: 18 }), M("movethewheels.tracking.alerts.title", "Alerts")]
282
- }) }), /* @__PURE__ */ E(f, { children: /* @__PURE__ */ E("div", {
282
+ children: [/* @__PURE__ */ D(e, { size: 18 }), N("movethewheels.tracking.alerts.title", "Alerts")]
283
+ }) }), /* @__PURE__ */ D(f, { children: /* @__PURE__ */ D("div", {
283
284
  className: "space-y-3",
284
- children: V.alerts.map((t) => /* @__PURE__ */ D("div", {
285
+ children: H.alerts.map((t) => /* @__PURE__ */ O("div", {
285
286
  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")}`,
286
- children: [/* @__PURE__ */ E(e, {
287
+ children: [/* @__PURE__ */ D(e, {
287
288
  size: 16,
288
289
  className: t.severity === "critical" ? "text-status-error-text" : (t.severity, "text-status-warning-text")
289
- }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
290
+ }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
290
291
  className: "text-sm font-medium",
291
292
  children: t.message
292
- }), /* @__PURE__ */ D("p", {
293
+ }), /* @__PURE__ */ O("p", {
293
294
  className: "text-xs text-text-secondary",
294
- children: [x(t.timestamp, "relative"), t.resolvedAt && ` - ${M("movethewheels.tracking.alerts.resolved", "Resolved")}`]
295
+ children: [x(t.timestamp, "relative"), t.resolvedAt && ` - ${N("movethewheels.tracking.alerts.resolved", "Resolved")}`]
295
296
  })] })]
296
297
  }, t.id))
297
298
  }) })] })
298
299
  ]
299
- }), /* @__PURE__ */ D("div", {
300
+ }), /* @__PURE__ */ O("div", {
300
301
  className: "space-y-6",
301
302
  children: [
302
- /* @__PURE__ */ D(d, { children: [/* @__PURE__ */ E(p, { children: /* @__PURE__ */ D(m, {
303
+ /* @__PURE__ */ O(d, { children: [/* @__PURE__ */ D(p, { children: /* @__PURE__ */ O(m, {
303
304
  className: "flex items-center gap-2",
304
- children: [/* @__PURE__ */ E(r, { size: 18 }), M("movethewheels.tracking.location.title", "Current Location")]
305
- }) }), /* @__PURE__ */ D(f, { children: [
306
- q?.current ? /* @__PURE__ */ E(v, {
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, {
307
308
  className: "mb-4 overflow-hidden rounded-lg border border-border-seam",
308
309
  height: 180,
309
- current: q.current,
310
- destination: q.destination ?? null,
311
- trail: q.trail
312
- }) : /* @__PURE__ */ D("div", {
310
+ current: J.current,
311
+ destination: J.destination ?? null,
312
+ trail: J.trail
313
+ }) : /* @__PURE__ */ O("div", {
313
314
  className: "mb-4 rounded-lg bg-bg-sunken p-4 text-center text-text-secondary",
314
- children: [/* @__PURE__ */ E(r, {
315
+ children: [/* @__PURE__ */ D(r, {
315
316
  size: 28,
316
317
  className: "mx-auto mb-2 opacity-60"
317
- }), /* @__PURE__ */ E("p", {
318
+ }), /* @__PURE__ */ D("p", {
318
319
  className: "text-sm",
319
- children: M("movethewheels.tracking.location.noFix", "No live position fix yet")
320
+ children: N("movethewheels.tracking.location.noFix", "No live position fix yet")
320
321
  })]
321
322
  }),
322
- /* @__PURE__ */ E("p", {
323
+ /* @__PURE__ */ D("p", {
323
324
  className: "text-sm",
324
- children: V.currentLocation.address || M("movethewheels.tracking.location.updating", "Location updating...")
325
+ children: H.currentLocation.address || N("movethewheels.tracking.location.updating", "Location updating...")
325
326
  }),
326
- /* @__PURE__ */ D("p", {
327
+ /* @__PURE__ */ O("p", {
327
328
  className: "text-xs text-text-secondary mt-1",
328
329
  children: [
329
- M("movethewheels.tracking.location.updated", "Updated"),
330
+ N("movethewheels.tracking.location.updated", "Updated"),
330
331
  " ",
331
- x(V.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")
332
+ x(H.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")
332
333
  ]
333
334
  })
334
335
  ] })] }),
335
- /* @__PURE__ */ D(d, { children: [/* @__PURE__ */ E(p, { children: /* @__PURE__ */ E(m, { children: M("movethewheels.tracking.deliveryAddress.title", "Delivery Address") }) }), /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E("p", {
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", {
336
337
  className: "text-sm",
337
- children: H.customerInfo.name
338
- }), /* @__PURE__ */ E("p", {
338
+ children: U.customerInfo.name
339
+ }), /* @__PURE__ */ D("p", {
339
340
  className: "text-sm text-text-secondary mt-2",
340
- children: b(H.deliveryAddress)
341
+ children: b(U.deliveryAddress)
341
342
  })] })] }),
342
- /* @__PURE__ */ E(d, { children: /* @__PURE__ */ D(f, {
343
+ /* @__PURE__ */ D(C, { deliveryJobId: U.id }),
344
+ /* @__PURE__ */ D(d, { children: /* @__PURE__ */ O(f, {
343
345
  className: "p-4 space-y-2",
344
- children: [/* @__PURE__ */ E(u, {
346
+ children: [/* @__PURE__ */ D(u, {
345
347
  variant: "outline",
346
348
  className: "w-full",
347
- onClick: () => K(`orders/${H.id}`),
348
- children: M("movethewheels.tracking.actions.viewOrderDetails", "View Order Details")
349
- }), /* @__PURE__ */ E(u, {
349
+ onClick: () => q(`orders/${U.id}`),
350
+ children: N("movethewheels.tracking.actions.viewOrderDetails", "View Order Details")
351
+ }), /* @__PURE__ */ D(u, {
350
352
  variant: "outline",
351
353
  className: "w-full",
352
- children: M("movethewheels.tracking.actions.contactDriver", "Contact Driver")
354
+ children: N("movethewheels.tracking.actions.contactDriver", "Contact Driver")
353
355
  })]
354
356
  }) })
355
357
  ]
356
358
  })]
357
359
  }),
358
- z && !H && !U && !W && /* @__PURE__ */ E(g, {
360
+ B && !U && !W && !G && /* @__PURE__ */ D(g, {
359
361
  illustration: "empty-search",
360
- title: M("movethewheels.tracking.notFound.title", "Shipment not found"),
361
- description: `${M("movethewheels.tracking.notFound.descriptionPrefix", "No shipment found with tracking number")} "${z}"`,
362
- action: /* @__PURE__ */ E(u, {
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, {
363
365
  variant: "outline",
364
- onClick: () => R(""),
365
- children: M("movethewheels.tracking.notFound.tryAnother", "Try another number")
366
+ onClick: () => z(""),
367
+ children: N("movethewheels.tracking.notFound.tryAnother", "Try another number")
366
368
  })
367
369
  })
368
370
  ]
369
371
  });
370
372
  }
371
373
  //#endregion
372
- export { j as default };
374
+ export { M as default };