@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.
- package/dist/components/OrderItemRow.js +195 -109
- package/dist/components/StatusBadge.js +31 -31
- package/dist/constants/index.js +11 -3
- package/dist/generated/wspace-operations.d.ts +7 -0
- package/dist/hooks/useFleet.js +85 -76
- package/dist/hooks/useOrders.js +8 -4
- package/dist/hooks/useTracking.js +127 -66
- package/dist/movethewheels/components/OrderItemRow.d.ts +1 -2
- package/dist/movethewheels/components/StatusBadge.d.ts +3 -1
- package/dist/movethewheels/constants/index.d.ts +1 -0
- package/dist/movethewheels/hooks/useFleet.d.ts +41 -1
- package/dist/movethewheels/hooks/useOrders.d.ts +1 -0
- package/dist/movethewheels/hooks/useTracking.d.ts +2 -2
- package/dist/movethewheels/types/index.d.ts +17 -39
- package/dist/node_modules/lucide-react/dist/esm/icons/sticky-note.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/user-x.js +30 -0
- package/dist/pages/CreateOrderPage.js +597 -420
- package/dist/pages/DriverDetailsPage.js +702 -421
- package/dist/pages/DriversPage.js +106 -117
- package/dist/pages/FleetPage.js +4 -10
- package/dist/pages/OrderDetailsPage.js +290 -262
- package/dist/pages/OrdersListPage.js +4 -0
- package/dist/pages/RouteDetailsPage.js +264 -252
- package/dist/pages/TrackingPage.js +205 -195
- package/dist/pages/VehicleDetailsPage.js +403 -243
- package/dist/utils/mapMarkers.js +2 -1
- package/package.json +1 -1
- package/src/generated/wspace-operations.ts +10 -3
- package/src/movethewheels/components/OrderItemRow.tsx +162 -99
- package/src/movethewheels/components/StatusBadge.tsx +11 -2
- package/src/movethewheels/constants/index.ts +13 -0
- package/src/movethewheels/hooks/useFleet.ts +163 -44
- package/src/movethewheels/hooks/useOrders.ts +17 -3
- package/src/movethewheels/hooks/useTracking.ts +208 -27
- package/src/movethewheels/pages/CreateOrderPage.tsx +372 -263
- package/src/movethewheels/pages/DriverDetailsPage.tsx +516 -156
- package/src/movethewheels/pages/DriversPage.tsx +28 -11
- package/src/movethewheels/pages/FleetPage.tsx +7 -10
- package/src/movethewheels/pages/OrderDetailsPage.tsx +67 -30
- package/src/movethewheels/pages/OrdersListPage.tsx +1 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +15 -7
- package/src/movethewheels/pages/TrackingPage.tsx +44 -14
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +137 -15
- package/src/movethewheels/types/index.ts +17 -38
- package/src/movethewheels/utils/mapMarkers.ts +1 -0
- package/src/operations/wspace/movethewheels/queries/dashboard.graphql +5 -0
- 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 {
|
|
22
|
-
import { useI18n as
|
|
23
|
-
import { EmphasisPanel as
|
|
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
|
|
26
|
-
let { t:
|
|
27
|
-
let n =
|
|
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:
|
|
30
|
-
e.preventDefault(),
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
if (!
|
|
35
|
-
let e = S(
|
|
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 · ${
|
|
37
|
+
label: `Pickup · ${W.pickupAddress.city || "Origin"}`
|
|
38
38
|
} : null, r = t ? {
|
|
39
39
|
...t,
|
|
40
|
-
label: `Delivery · ${
|
|
41
|
-
} : null, i = U.
|
|
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 =
|
|
49
|
-
...
|
|
50
|
-
label:
|
|
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:
|
|
56
|
-
current:
|
|
57
|
-
hasAny: !!(n || r ||
|
|
62
|
+
trail: o,
|
|
63
|
+
current: c,
|
|
64
|
+
hasAny: !!(n || r || c || o.length > 0)
|
|
58
65
|
};
|
|
59
|
-
}, [
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
title:
|
|
62
|
-
subtitle:
|
|
63
|
-
icon: /* @__PURE__ */
|
|
64
|
-
headerActions: /* @__PURE__ */
|
|
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: () =>
|
|
67
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
71
|
-
icon: /* @__PURE__ */
|
|
72
|
-
children:
|
|
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__ */
|
|
81
|
+
/* @__PURE__ */ O(d, { children: /* @__PURE__ */ O(f, {
|
|
75
82
|
className: "p-6",
|
|
76
|
-
children: /* @__PURE__ */
|
|
77
|
-
onSubmit:
|
|
83
|
+
children: /* @__PURE__ */ k("form", {
|
|
84
|
+
onSubmit: q,
|
|
78
85
|
className: "flex gap-4",
|
|
79
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ k("div", {
|
|
80
87
|
className: "flex-1 relative",
|
|
81
|
-
children: [/* @__PURE__ */
|
|
82
|
-
value:
|
|
83
|
-
onChange: (e) =>
|
|
84
|
-
placeholder:
|
|
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__ */
|
|
94
|
+
}), /* @__PURE__ */ O(u, {
|
|
88
95
|
type: "submit",
|
|
89
96
|
size: "lg",
|
|
90
|
-
disabled: !
|
|
91
|
-
children:
|
|
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
|
-
|
|
102
|
+
K && /* @__PURE__ */ O(d, {
|
|
96
103
|
className: "border-status-error-border",
|
|
97
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ O(f, {
|
|
98
105
|
className: "p-6",
|
|
99
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: /* @__PURE__ */ k("div", {
|
|
100
107
|
className: "flex items-center gap-4",
|
|
101
|
-
children: [/* @__PURE__ */
|
|
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:
|
|
104
|
-
}), /* @__PURE__ */
|
|
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:
|
|
113
|
+
children: P("movethewheels.tracking.error.description", "Please check the tracking number and try again")
|
|
107
114
|
})] })]
|
|
108
115
|
})
|
|
109
116
|
})
|
|
110
117
|
}),
|
|
111
|
-
!
|
|
118
|
+
!V && !K && /* @__PURE__ */ O(g, {
|
|
112
119
|
illustration: "onboarding",
|
|
113
|
-
title:
|
|
114
|
-
description:
|
|
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
|
-
|
|
123
|
+
W && /* @__PURE__ */ k("div", {
|
|
117
124
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ k("div", {
|
|
119
126
|
className: "lg:col-span-2 space-y-6",
|
|
120
127
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
-
|
|
134
|
+
/* @__PURE__ */ O(i, { size: 20 }),
|
|
135
|
+
P("movethewheels.tracking.orderLabel", "Order"),
|
|
159
136
|
" ",
|
|
160
|
-
|
|
137
|
+
W.orderNumber
|
|
161
138
|
]
|
|
162
|
-
})
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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__ */
|
|
175
|
-
}) }), /* @__PURE__ */
|
|
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:
|
|
179
|
-
destination:
|
|
180
|
-
trail:
|
|
181
|
-
current:
|
|
182
|
-
emptyMessage:
|
|
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__ */
|
|
198
|
+
/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
|
|
185
199
|
className: "flex items-center gap-2",
|
|
186
|
-
children: [/* @__PURE__ */
|
|
187
|
-
}) }), /* @__PURE__ */
|
|
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__ */
|
|
203
|
+
children: /* @__PURE__ */ O("div", {
|
|
190
204
|
className: "flex justify-between mb-4",
|
|
191
205
|
children: [
|
|
192
206
|
{
|
|
193
207
|
status: "confirmed",
|
|
194
|
-
label:
|
|
208
|
+
label: P("movethewheels.tracking.progress.confirmed", "Confirmed"),
|
|
195
209
|
icon: t
|
|
196
210
|
},
|
|
197
211
|
{
|
|
198
212
|
status: "picked_up",
|
|
199
|
-
label:
|
|
213
|
+
label: P("movethewheels.tracking.progress.pickedUp", "Picked Up"),
|
|
200
214
|
icon: i
|
|
201
215
|
},
|
|
202
216
|
{
|
|
203
217
|
status: "in_transit",
|
|
204
|
-
label:
|
|
218
|
+
label: P("movethewheels.tracking.progress.inTransit", "In Transit"),
|
|
205
219
|
icon: o
|
|
206
220
|
},
|
|
207
221
|
{
|
|
208
222
|
status: "delivered",
|
|
209
|
-
label:
|
|
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(
|
|
222
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
241
|
+
children: /* @__PURE__ */ O(e.icon, { size: 20 })
|
|
228
242
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
258
|
+
}), /* @__PURE__ */ O("div", {
|
|
245
259
|
className: "mt-8 space-y-4",
|
|
246
|
-
children:
|
|
260
|
+
children: W.timeline.slice().reverse().map((e, t) => /* @__PURE__ */ k("div", {
|
|
247
261
|
className: "flex gap-4",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ k("div", {
|
|
249
263
|
className: "relative",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
251
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
268
|
+
/* @__PURE__ */ k("div", {
|
|
255
269
|
className: "flex items-center gap-2",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ O(y, {
|
|
257
271
|
status: e.status,
|
|
258
272
|
type: "order",
|
|
259
273
|
size: "sm"
|
|
260
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
279
|
+
e.notes && /* @__PURE__ */ O("p", {
|
|
266
280
|
className: "text-sm mt-1",
|
|
267
281
|
children: e.notes
|
|
268
282
|
}),
|
|
269
|
-
e.location && /* @__PURE__ */
|
|
283
|
+
e.location && /* @__PURE__ */ k("p", {
|
|
270
284
|
className: "text-xs text-text-secondary mt-1",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
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
|
-
|
|
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__ */
|
|
283
|
-
}) }), /* @__PURE__ */
|
|
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:
|
|
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__ */
|
|
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__ */
|
|
304
|
+
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
291
305
|
className: "text-sm font-medium",
|
|
292
306
|
children: t.message
|
|
293
|
-
}), /* @__PURE__ */
|
|
307
|
+
}), /* @__PURE__ */ k("p", {
|
|
294
308
|
className: "text-xs text-text-secondary",
|
|
295
|
-
children: [x(t.timestamp, "relative"), t.resolvedAt && ` - ${
|
|
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__ */
|
|
314
|
+
}), /* @__PURE__ */ k("div", {
|
|
301
315
|
className: "space-y-6",
|
|
302
316
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
|
|
304
318
|
className: "flex items-center gap-2",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
306
|
-
}) }), /* @__PURE__ */
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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:
|
|
326
|
-
})
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
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:
|
|
339
|
-
}), /* @__PURE__ */
|
|
348
|
+
children: W.customerInfo.name
|
|
349
|
+
}), /* @__PURE__ */ O("p", {
|
|
340
350
|
className: "text-sm text-text-secondary mt-2",
|
|
341
|
-
children: b(
|
|
351
|
+
children: b(W.deliveryAddress)
|
|
342
352
|
})] })] }),
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */
|
|
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__ */
|
|
356
|
+
children: [/* @__PURE__ */ O(u, {
|
|
347
357
|
variant: "outline",
|
|
348
358
|
className: "w-full",
|
|
349
|
-
onClick: () =>
|
|
350
|
-
children:
|
|
351
|
-
}), /* @__PURE__ */
|
|
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:
|
|
364
|
+
children: P("movethewheels.tracking.actions.contactDriver", "Contact Driver")
|
|
355
365
|
})]
|
|
356
366
|
}) })
|
|
357
367
|
]
|
|
358
368
|
})]
|
|
359
369
|
}),
|
|
360
|
-
|
|
370
|
+
V && !W && !G && !K && /* @__PURE__ */ O(g, {
|
|
361
371
|
illustration: "empty-search",
|
|
362
|
-
title:
|
|
363
|
-
description: `${
|
|
364
|
-
action: /* @__PURE__ */
|
|
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: () =>
|
|
367
|
-
children:
|
|
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 {
|
|
384
|
+
export { N as default };
|