@burdenoff/microfe-movethewheels 2026.1031.3 → 2026.1031.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MoveTheWheelsRoot.js +136 -127
- package/dist/MoveTheWheelsRoutes.js +140 -135
- package/dist/components/DocumentsCard.js +11 -11
- package/dist/components/ProofOfDeliveryCard.js +13 -13
- package/dist/components/ShipmentRiskDialog.js +24 -24
- package/dist/components/ShippingQuoteResults.js +46 -46
- package/dist/components/TrackingAlertList.js +17 -17
- package/dist/generated/tracking-quality-operations.d.ts +56 -0
- package/dist/hooks/useOrderDispatch.js +17 -17
- package/dist/movethewheels/pages/SettingsPage.d.ts +1 -0
- package/dist/movethewheels/providers/ModuleSettingsProvider.d.ts +17 -0
- package/dist/movethewheels/utils/formatters.d.ts +23 -3
- package/dist/movethewheels/utils/moduleSettings.d.ts +52 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/bell.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/key-round.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plug.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/settings.js +13 -0
- package/dist/pages/AnalyticsPage.js +27 -27
- package/dist/pages/CreateOrderPage.js +340 -317
- package/dist/pages/CustomerDetailsPage.js +246 -246
- package/dist/pages/CustomersPage.js +19 -19
- package/dist/pages/DashboardPage.js +24 -24
- package/dist/pages/DeliveryCapturePage.js +74 -74
- package/dist/pages/DriverDetailsPage.js +337 -337
- package/dist/pages/DriversPage.js +26 -26
- package/dist/pages/FinancePage.js +26 -26
- package/dist/pages/InventoryPage.js +28 -28
- package/dist/pages/LiveTrackingPage.js +108 -108
- package/dist/pages/MarketplacePage.js +44 -44
- package/dist/pages/OrderDetailsPage.js +306 -306
- package/dist/pages/OrdersListPage.js +27 -27
- package/dist/pages/ProductDetailsPage.js +89 -89
- package/dist/pages/ProductsPage.js +73 -73
- package/dist/pages/RouteDetailsPage.js +282 -285
- package/dist/pages/RoutesPage.js +78 -78
- package/dist/pages/SettingsPage.js +459 -0
- package/dist/pages/TrackingPage.js +41 -41
- package/dist/pages/VehicleDetailsPage.js +207 -207
- package/dist/pages/VehiclesPage.js +17 -16
- package/dist/pages/WarehouseDetailsPage.js +132 -132
- package/dist/providers/ModuleSettingsProvider.js +74 -0
- package/dist/utils/formatters.js +53 -26
- package/dist/utils/moduleSettings.js +132 -0
- package/package.json +3 -2
- package/src/generated/tracking-quality-operations.ts +62 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +14 -3
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +9 -0
- package/src/movethewheels/pages/CreateOrderPage.tsx +38 -6
- package/src/movethewheels/pages/ProductsPage.tsx +2 -2
- package/src/movethewheels/pages/RouteDetailsPage.tsx +3 -6
- package/src/movethewheels/pages/RoutesPage.tsx +2 -2
- package/src/movethewheels/pages/SettingsPage.tsx +516 -0
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +4 -2
- package/src/movethewheels/pages/VehiclesPage.tsx +2 -1
- package/src/movethewheels/providers/ModuleSettingsProvider.tsx +133 -0
- package/src/movethewheels/utils/formatters.ts +69 -10
- package/src/movethewheels/utils/moduleSettings.ts +224 -0
|
@@ -6,39 +6,39 @@ import { RefreshCw as ee } from "../node_modules/lucide-react/dist/esm/icons/ref
|
|
|
6
6
|
import { Truck as i } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
|
|
7
7
|
import { joinPath as a } from "../utils/navigation.js";
|
|
8
8
|
import { useMoveTheWheels as o } from "../providers/MoveTheWheelsProvider.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import { formatDate as s } from "../utils/formatters.js";
|
|
10
|
+
import { useLiveTracking as c, useTrackingAlerts as l } from "../hooks/useTracking.js";
|
|
11
|
+
import { Badge as u, Button as d, Card as f, CardContent as p, CardHeader as m, CardTitle as h, ScrollArea as te, Tabs as g, TabsList as _, TabsTrigger as v } from "../components/ui.js";
|
|
12
|
+
import { EmptyState as y, PageLayout as ne } from "../components/PageLayout.js";
|
|
13
|
+
import { MetricCard as b, MetricGrid as x } from "../components/MetricCard.js";
|
|
13
14
|
import { LogisticsMap as S } from "../components/maps/LogisticsMap.js";
|
|
14
15
|
import "../components/maps/index.js";
|
|
15
16
|
import { StatusBadge as C } from "../components/StatusBadge.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { EmphasisPanel as N, NextSteps as ne, PagePurpose as re } from "@burdenoff/fe-libs/ui";
|
|
17
|
+
import { TrackingAlertList as w } from "../components/TrackingAlertList.js";
|
|
18
|
+
import { deliveryMarkerStatus as T, firstRealLatLng as E } from "../utils/mapMarkers.js";
|
|
19
|
+
import { useMemo as D, useState as O } from "react";
|
|
20
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
21
|
+
import { useI18n as j } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
22
|
+
import { EmphasisPanel as M, NextSteps as re, PagePurpose as N } from "@burdenoff/fe-libs/ui";
|
|
23
23
|
//#region src/movethewheels/pages/LiveTrackingPage.tsx
|
|
24
24
|
function P() {
|
|
25
|
-
let { basePath: P, navigate: F } = o(), { activeDeliveries: I, isLoading: L, refetch: R } =
|
|
25
|
+
let { basePath: P, navigate: F } = o(), { activeDeliveries: I, isLoading: L, refetch: R } = c(), { t: z } = j(), B = (e, t) => {
|
|
26
26
|
let n = z(e);
|
|
27
27
|
return n === e ? t : n;
|
|
28
|
-
}, { unacknowledgedAlerts: V, acknowledgeAlert: H, refetch: U } =
|
|
28
|
+
}, { unacknowledgedAlerts: V, acknowledgeAlert: H, refetch: U } = l(), [W, G] = O("map"), [K, q] = O(null), [J, Y] = O("all"), X = (e) => {
|
|
29
29
|
F && F(a(P, e));
|
|
30
|
-
}, Z = K ? I.find((e) => e.order?.id === K) : null, Q =
|
|
30
|
+
}, Z = K ? I.find((e) => e.order?.id === K) : null, Q = D(() => I.filter((e) => {
|
|
31
31
|
let t = e.order?.status;
|
|
32
32
|
return J === "all" ? !0 : J === "in_transit" ? t === "in_transit" : J === "out_for_delivery" ? t === "out_for_delivery" : t !== "in_transit" && t !== "out_for_delivery";
|
|
33
|
-
}), [I, J]), $ =
|
|
33
|
+
}), [I, J]), $ = D(() => Q.flatMap((e) => {
|
|
34
34
|
if (!e.order) return [];
|
|
35
|
-
let t =
|
|
35
|
+
let t = E(e.vehicle?.currentLocation, e.driver?.currentLocation, e.tracking?.currentLocation);
|
|
36
36
|
return t ? [{
|
|
37
37
|
id: e.order.id,
|
|
38
38
|
lat: t.lat,
|
|
39
39
|
lng: t.lng,
|
|
40
40
|
label: e.order.orderNumber,
|
|
41
|
-
status:
|
|
41
|
+
status: T(e.order.status),
|
|
42
42
|
sublabel: e.driver?.fullName || e.vehicle?.vehicleNumber || e.tracking?.currentLocation?.address || void 0
|
|
43
43
|
}] : [];
|
|
44
44
|
}), [Q]), ie = $.length, ae = [
|
|
@@ -63,52 +63,52 @@ function P() {
|
|
|
63
63
|
count: I.filter((e) => e.order?.status !== "in_transit" && e.order?.status !== "out_for_delivery").length
|
|
64
64
|
}
|
|
65
65
|
];
|
|
66
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ A(ne, {
|
|
67
67
|
title: "Live Tracking",
|
|
68
68
|
subtitle: `${I.length} active deliveries`,
|
|
69
|
-
icon: /* @__PURE__ */
|
|
70
|
-
headerActions: /* @__PURE__ */
|
|
69
|
+
icon: /* @__PURE__ */ k(t, { size: 24 }),
|
|
70
|
+
headerActions: /* @__PURE__ */ A("div", {
|
|
71
71
|
className: "flex gap-2",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
72
|
+
children: [/* @__PURE__ */ A(d, {
|
|
73
73
|
variant: "outline",
|
|
74
74
|
onClick: R,
|
|
75
75
|
disabled: L,
|
|
76
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ k(ee, {
|
|
77
77
|
size: 16,
|
|
78
78
|
className: L ? "animate-spin" : ""
|
|
79
79
|
}), "Refresh"]
|
|
80
|
-
}), /* @__PURE__ */
|
|
80
|
+
}), /* @__PURE__ */ k(g, {
|
|
81
81
|
value: W,
|
|
82
82
|
onValueChange: (e) => G(e),
|
|
83
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ A(_, { children: [/* @__PURE__ */ k(v, {
|
|
84
84
|
value: "map",
|
|
85
|
-
children: /* @__PURE__ */
|
|
86
|
-
}), /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ k(n, { size: 16 })
|
|
86
|
+
}), /* @__PURE__ */ k(v, {
|
|
87
87
|
value: "list",
|
|
88
|
-
children: /* @__PURE__ */
|
|
88
|
+
children: /* @__PURE__ */ k(e, { size: 16 })
|
|
89
89
|
})] })
|
|
90
90
|
})]
|
|
91
91
|
}),
|
|
92
92
|
children: [
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
icon: /* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ k(N, {
|
|
94
|
+
icon: /* @__PURE__ */ k(t, { size: 18 }),
|
|
95
95
|
children: "A real-time operations board for every delivery currently on the road. Watch where drivers are, which orders are out for delivery, and react to alerts — switch to the map for a bird's-eye view or the list to drill into a single shipment."
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ k(re, {
|
|
98
98
|
storageKey: "movethewheels-live-tracking",
|
|
99
99
|
steps: [
|
|
100
100
|
{
|
|
101
101
|
id: "select",
|
|
102
102
|
label: "Open a delivery",
|
|
103
103
|
description: "Switch to the list and pick a shipment to see full details.",
|
|
104
|
-
icon: /* @__PURE__ */
|
|
104
|
+
icon: /* @__PURE__ */ k(e, { size: 16 }),
|
|
105
105
|
onClick: () => G("list")
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
id: "alerts",
|
|
109
109
|
label: "Clear outstanding alerts",
|
|
110
110
|
description: "Review delays and exceptions that need attention.",
|
|
111
|
-
icon: /* @__PURE__ */
|
|
111
|
+
icon: /* @__PURE__ */ k(i, { size: 16 }),
|
|
112
112
|
done: V.length === 0,
|
|
113
113
|
onClick: () => G("list")
|
|
114
114
|
},
|
|
@@ -116,33 +116,33 @@ function P() {
|
|
|
116
116
|
id: "new-order",
|
|
117
117
|
label: "Create another order",
|
|
118
118
|
description: "Add a new delivery to the pipeline.",
|
|
119
|
-
icon: /* @__PURE__ */
|
|
119
|
+
icon: /* @__PURE__ */ k(r, { size: 16 }),
|
|
120
120
|
onClick: () => X("orders/new")
|
|
121
121
|
}
|
|
122
122
|
]
|
|
123
123
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ A(x, {
|
|
125
125
|
columns: 4,
|
|
126
126
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ k(b, {
|
|
128
128
|
size: "sm",
|
|
129
129
|
label: "Active Deliveries",
|
|
130
130
|
value: I.length,
|
|
131
|
-
icon: /* @__PURE__ */
|
|
131
|
+
icon: /* @__PURE__ */ k(i, { size: 18 })
|
|
132
132
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ k(b, {
|
|
134
134
|
size: "sm",
|
|
135
135
|
label: "In Transit",
|
|
136
136
|
value: I.filter((e) => e.order?.status === "in_transit").length,
|
|
137
|
-
icon: /* @__PURE__ */
|
|
137
|
+
icon: /* @__PURE__ */ k(r, { size: 18 })
|
|
138
138
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ k(b, {
|
|
140
140
|
size: "sm",
|
|
141
141
|
label: "Out for Delivery",
|
|
142
142
|
value: I.filter((e) => e.order?.status === "out_for_delivery").length,
|
|
143
|
-
icon: /* @__PURE__ */
|
|
143
|
+
icon: /* @__PURE__ */ k(t, { size: 18 })
|
|
144
144
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ k(b, {
|
|
146
146
|
size: "sm",
|
|
147
147
|
label: "Alerts",
|
|
148
148
|
value: V.length,
|
|
@@ -150,25 +150,25 @@ function P() {
|
|
|
150
150
|
})
|
|
151
151
|
]
|
|
152
152
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ A("div", {
|
|
154
154
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ k("div", {
|
|
156
156
|
className: "lg:col-span-2",
|
|
157
|
-
children: W === "map" ? /* @__PURE__ */
|
|
157
|
+
children: W === "map" ? /* @__PURE__ */ k(f, {
|
|
158
158
|
className: "overflow-hidden",
|
|
159
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ A(p, {
|
|
160
160
|
className: "p-0",
|
|
161
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ A("div", {
|
|
162
162
|
className: "flex flex-wrap items-center gap-2 border-b border-border-seam p-3",
|
|
163
|
-
children: [ae.map((e) => /* @__PURE__ */
|
|
163
|
+
children: [ae.map((e) => /* @__PURE__ */ A("button", {
|
|
164
164
|
type: "button",
|
|
165
165
|
onClick: () => Y(e.value),
|
|
166
166
|
className: `inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg ${J === e.value ? "border-transparent bg-action-primary-bg text-action-primary-text" : "border-border-seam text-text-secondary hover:bg-bg-sunken/60"}`,
|
|
167
|
-
children: [e.label, /* @__PURE__ */
|
|
167
|
+
children: [e.label, /* @__PURE__ */ k("span", {
|
|
168
168
|
className: "tabular-nums opacity-80",
|
|
169
169
|
children: e.count
|
|
170
170
|
})]
|
|
171
|
-
}, e.value)), /* @__PURE__ */
|
|
171
|
+
}, e.value)), /* @__PURE__ */ A("span", {
|
|
172
172
|
className: "ml-auto text-xs text-text-secondary",
|
|
173
173
|
children: [
|
|
174
174
|
ie,
|
|
@@ -177,19 +177,19 @@ function P() {
|
|
|
177
177
|
" located"
|
|
178
178
|
]
|
|
179
179
|
})]
|
|
180
|
-
}), /* @__PURE__ */
|
|
180
|
+
}), /* @__PURE__ */ k(S, {
|
|
181
181
|
markers: $,
|
|
182
182
|
height: 560,
|
|
183
183
|
emptyMessage: Q.length === 0 ? "No active deliveries to plot" : "Awaiting live GPS positions for these deliveries"
|
|
184
184
|
})]
|
|
185
185
|
})
|
|
186
|
-
}) : /* @__PURE__ */
|
|
186
|
+
}) : /* @__PURE__ */ A(f, { children: [/* @__PURE__ */ k(m, { children: /* @__PURE__ */ k(h, { children: "Active Deliveries" }) }), /* @__PURE__ */ k(p, {
|
|
187
187
|
className: "p-0",
|
|
188
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ k(te, {
|
|
189
189
|
className: "h-[550px]",
|
|
190
|
-
children: /* @__PURE__ */
|
|
190
|
+
children: /* @__PURE__ */ A("div", {
|
|
191
191
|
className: "divide-y",
|
|
192
|
-
children: [Q.map((e) => e.order ? /* @__PURE__ */
|
|
192
|
+
children: [Q.map((e) => e.order ? /* @__PURE__ */ k("div", {
|
|
193
193
|
role: "button",
|
|
194
194
|
tabIndex: 0,
|
|
195
195
|
"aria-label": `Select delivery ${e.order.orderNumber}`,
|
|
@@ -198,44 +198,44 @@ function P() {
|
|
|
198
198
|
onKeyDown: (t) => {
|
|
199
199
|
(t.key === "Enter" || t.key === " ") && e.order && (t.preventDefault(), q(e.order.id));
|
|
200
200
|
},
|
|
201
|
-
children: /* @__PURE__ */
|
|
201
|
+
children: /* @__PURE__ */ A("div", {
|
|
202
202
|
className: "flex items-start justify-between",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ A("div", { children: [
|
|
204
|
+
/* @__PURE__ */ A("div", {
|
|
205
205
|
className: "flex items-center gap-2 mb-1",
|
|
206
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ k("span", {
|
|
207
207
|
className: "font-medium",
|
|
208
208
|
children: e.order.orderNumber
|
|
209
|
-
}), /* @__PURE__ */
|
|
209
|
+
}), /* @__PURE__ */ k(C, {
|
|
210
210
|
status: e.order.status,
|
|
211
211
|
type: "order",
|
|
212
212
|
size: "sm"
|
|
213
213
|
})]
|
|
214
214
|
}),
|
|
215
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ k("p", {
|
|
216
216
|
className: "text-sm text-text-secondary",
|
|
217
217
|
children: e.order.customerInfo.name
|
|
218
218
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ A("p", {
|
|
220
220
|
className: "text-sm text-text-secondary",
|
|
221
221
|
children: [e.driver?.fullName || "Unassigned", e.vehicle && ` - ${e.vehicle.vehicleNumber}`]
|
|
222
222
|
})
|
|
223
|
-
] }), /* @__PURE__ */
|
|
223
|
+
] }), /* @__PURE__ */ A("div", {
|
|
224
224
|
className: "text-right",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
225
|
+
children: [/* @__PURE__ */ A("p", {
|
|
226
226
|
className: "text-sm font-medium",
|
|
227
227
|
children: [
|
|
228
228
|
"ETA:",
|
|
229
229
|
" ",
|
|
230
|
-
e.estimatedArrival ?
|
|
230
|
+
e.estimatedArrival ? s(e.estimatedArrival, "time") : "N/A"
|
|
231
231
|
]
|
|
232
|
-
}), /* @__PURE__ */
|
|
232
|
+
}), /* @__PURE__ */ k("p", {
|
|
233
233
|
className: "text-xs text-text-secondary",
|
|
234
234
|
children: e.tracking?.currentLocation?.address || "Location updating..."
|
|
235
235
|
})]
|
|
236
236
|
})]
|
|
237
237
|
})
|
|
238
|
-
}, e.order.id) : null), Q.length === 0 && /* @__PURE__ */
|
|
238
|
+
}, e.order.id) : null), Q.length === 0 && /* @__PURE__ */ k(y, {
|
|
239
239
|
illustration: "empty-sessions",
|
|
240
240
|
title: "No active deliveries",
|
|
241
241
|
description: "When orders are dispatched they'll appear here in real time."
|
|
@@ -243,72 +243,72 @@ function P() {
|
|
|
243
243
|
})
|
|
244
244
|
})
|
|
245
245
|
})] })
|
|
246
|
-
}), /* @__PURE__ */
|
|
246
|
+
}), /* @__PURE__ */ A("div", {
|
|
247
247
|
className: "space-y-6",
|
|
248
248
|
children: [
|
|
249
|
-
Z ? /* @__PURE__ */
|
|
249
|
+
Z ? /* @__PURE__ */ A(M, {
|
|
250
250
|
className: "space-y-4",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ A("div", {
|
|
252
252
|
className: "flex items-center justify-between",
|
|
253
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ k("h2", {
|
|
254
254
|
className: "text-base font-semibold text-text-primary",
|
|
255
255
|
children: "Delivery Details"
|
|
256
|
-
}), /* @__PURE__ */
|
|
256
|
+
}), /* @__PURE__ */ k(d, {
|
|
257
257
|
variant: "ghost",
|
|
258
258
|
size: "sm",
|
|
259
259
|
onClick: () => q(null),
|
|
260
260
|
children: "Clear"
|
|
261
261
|
})]
|
|
262
|
-
}), /* @__PURE__ */
|
|
262
|
+
}), /* @__PURE__ */ A("div", {
|
|
263
263
|
className: "space-y-4",
|
|
264
264
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
266
266
|
className: "text-sm text-text-secondary",
|
|
267
267
|
children: "Order"
|
|
268
|
-
}), /* @__PURE__ */
|
|
268
|
+
}), /* @__PURE__ */ k("p", {
|
|
269
269
|
className: "font-medium",
|
|
270
270
|
children: Z.order?.orderNumber ?? "-"
|
|
271
271
|
})] }),
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ A("div", { children: [
|
|
273
|
+
/* @__PURE__ */ k("p", {
|
|
274
274
|
className: "text-sm text-text-secondary",
|
|
275
275
|
children: "Customer"
|
|
276
276
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ k("p", {
|
|
278
278
|
className: "font-medium",
|
|
279
279
|
children: Z.order?.customerInfo.name ?? "-"
|
|
280
280
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ k("p", {
|
|
282
282
|
className: "text-sm text-text-secondary",
|
|
283
283
|
children: Z.order?.customerInfo.phone ?? "-"
|
|
284
284
|
})
|
|
285
285
|
] }),
|
|
286
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
287
287
|
className: "text-sm text-text-secondary",
|
|
288
288
|
children: "Driver"
|
|
289
|
-
}), /* @__PURE__ */
|
|
289
|
+
}), /* @__PURE__ */ k("p", {
|
|
290
290
|
className: "font-medium",
|
|
291
291
|
children: Z.driver?.fullName || "Unassigned"
|
|
292
292
|
})] }),
|
|
293
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
294
294
|
className: "text-sm text-text-secondary",
|
|
295
295
|
children: "Vehicle"
|
|
296
|
-
}), /* @__PURE__ */
|
|
296
|
+
}), /* @__PURE__ */ k("p", {
|
|
297
297
|
className: "font-medium",
|
|
298
298
|
children: Z.vehicle ? `${Z.vehicle.vehicleNumber} - ${Z.vehicle.make} ${Z.vehicle.model}` : "Not assigned"
|
|
299
299
|
})] }),
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ A("div", { children: [
|
|
301
|
+
/* @__PURE__ */ k("p", {
|
|
302
302
|
className: "text-sm text-text-secondary",
|
|
303
303
|
children: "Current Location"
|
|
304
304
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ k("p", {
|
|
306
306
|
className: "text-sm",
|
|
307
307
|
children: Z.tracking?.currentLocation?.address || "Updating..."
|
|
308
308
|
}),
|
|
309
309
|
(() => {
|
|
310
|
-
let e =
|
|
311
|
-
return e ? /* @__PURE__ */
|
|
310
|
+
let e = E(Z.vehicle?.currentLocation, Z.driver?.currentLocation, Z.tracking?.currentLocation);
|
|
311
|
+
return e ? /* @__PURE__ */ k(S, {
|
|
312
312
|
className: "mt-3 overflow-hidden rounded-lg border border-border-seam",
|
|
313
313
|
height: 160,
|
|
314
314
|
markers: [{
|
|
@@ -316,26 +316,26 @@ function P() {
|
|
|
316
316
|
lat: e.lat,
|
|
317
317
|
lng: e.lng,
|
|
318
318
|
label: Z.order?.orderNumber ?? "Delivery",
|
|
319
|
-
status:
|
|
319
|
+
status: T(Z.order?.status)
|
|
320
320
|
}]
|
|
321
321
|
}) : null;
|
|
322
322
|
})()
|
|
323
323
|
] }),
|
|
324
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
325
325
|
className: "text-sm text-text-secondary",
|
|
326
326
|
children: "Estimated Arrival"
|
|
327
|
-
}), /* @__PURE__ */
|
|
327
|
+
}), /* @__PURE__ */ k("p", {
|
|
328
328
|
className: "font-medium",
|
|
329
|
-
children: Z.estimatedArrival ?
|
|
329
|
+
children: Z.estimatedArrival ? s(Z.estimatedArrival, "full") : "Calculating..."
|
|
330
330
|
})] }),
|
|
331
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ A("div", {
|
|
332
332
|
className: "pt-2 space-y-2",
|
|
333
|
-
children: [/* @__PURE__ */
|
|
333
|
+
children: [/* @__PURE__ */ k(d, {
|
|
334
334
|
className: "w-full",
|
|
335
335
|
onClick: () => Z.order && X(`orders/${Z.order.id}`),
|
|
336
336
|
disabled: !Z.order,
|
|
337
337
|
children: "View Order"
|
|
338
|
-
}), /* @__PURE__ */
|
|
338
|
+
}), /* @__PURE__ */ k(d, {
|
|
339
339
|
variant: "outline",
|
|
340
340
|
className: "w-full",
|
|
341
341
|
onClick: () => Z.order && X(`tracking?order=${Z.order.id}`),
|
|
@@ -345,54 +345,54 @@ function P() {
|
|
|
345
345
|
})
|
|
346
346
|
]
|
|
347
347
|
})]
|
|
348
|
-
}) : /* @__PURE__ */
|
|
348
|
+
}) : /* @__PURE__ */ k(f, { children: /* @__PURE__ */ k(p, {
|
|
349
349
|
className: "p-6",
|
|
350
|
-
children: /* @__PURE__ */
|
|
350
|
+
children: /* @__PURE__ */ k(y, {
|
|
351
351
|
illustration: "empty-generic",
|
|
352
352
|
title: "No delivery selected",
|
|
353
353
|
description: "Pick a delivery from the list to see its driver, vehicle, ETA and live location."
|
|
354
354
|
})
|
|
355
355
|
}) }),
|
|
356
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ A(f, { children: [/* @__PURE__ */ k(m, { children: /* @__PURE__ */ A(h, {
|
|
357
357
|
className: "flex items-center gap-2",
|
|
358
|
-
children: [B("movethewheels.tracking.live.alerts", "Alerts"), V.length > 0 && /* @__PURE__ */
|
|
358
|
+
children: [B("movethewheels.tracking.live.alerts", "Alerts"), V.length > 0 && /* @__PURE__ */ k(u, {
|
|
359
359
|
variant: "destructive",
|
|
360
360
|
children: V.length
|
|
361
361
|
})]
|
|
362
|
-
}) }), /* @__PURE__ */
|
|
362
|
+
}) }), /* @__PURE__ */ k(p, { children: V.length > 0 ? /* @__PURE__ */ k(w, {
|
|
363
363
|
alerts: V,
|
|
364
364
|
limit: 5,
|
|
365
365
|
t: B,
|
|
366
366
|
onAcknowledge: H,
|
|
367
367
|
onOpenOrder: (e) => X(`orders/${e}`),
|
|
368
368
|
onChanged: U
|
|
369
|
-
}) : /* @__PURE__ */
|
|
369
|
+
}) : /* @__PURE__ */ k("div", {
|
|
370
370
|
className: "text-center text-text-secondary py-4",
|
|
371
|
-
children: /* @__PURE__ */
|
|
371
|
+
children: /* @__PURE__ */ k("p", {
|
|
372
372
|
className: "text-sm",
|
|
373
373
|
children: B("movethewheels.tracking.live.noAlerts", "No active alerts")
|
|
374
374
|
})
|
|
375
375
|
}) })] }),
|
|
376
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ A(f, { children: [/* @__PURE__ */ k(m, { children: /* @__PURE__ */ k(h, { children: "Quick Actions" }) }), /* @__PURE__ */ A(p, {
|
|
377
377
|
className: "space-y-2",
|
|
378
378
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ A(d, {
|
|
380
380
|
variant: "outline",
|
|
381
381
|
className: "w-full",
|
|
382
382
|
onClick: () => X("orders/new"),
|
|
383
|
-
children: [/* @__PURE__ */
|
|
383
|
+
children: [/* @__PURE__ */ k(r, { size: 16 }), "Create Order"]
|
|
384
384
|
}),
|
|
385
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ A(d, {
|
|
386
386
|
variant: "outline",
|
|
387
387
|
className: "w-full",
|
|
388
388
|
onClick: () => X("routes"),
|
|
389
|
-
children: [/* @__PURE__ */
|
|
389
|
+
children: [/* @__PURE__ */ k(t, { size: 16 }), "Manage Routes"]
|
|
390
390
|
}),
|
|
391
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ A(d, {
|
|
392
392
|
variant: "outline",
|
|
393
393
|
className: "w-full",
|
|
394
394
|
onClick: () => X("fleet"),
|
|
395
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ k(i, { size: 16 }), "Fleet Status"]
|
|
396
396
|
})
|
|
397
397
|
]
|
|
398
398
|
})] })
|