@burdenoff/microfe-movethewheels 2026.921.1 → 2026.923.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.
- package/dist/generated/wspace-types.d.ts +1676 -3
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useFleet.js +4 -2
- package/dist/hooks/useOrders.js +89 -84
- package/dist/hooks/useRoutes.js +1 -1
- package/dist/index.js +6 -6
- package/dist/movethewheels/hooks/useOrders.d.ts +15 -0
- package/dist/movethewheels/hooks/useRoutes.d.ts +16 -0
- package/dist/movethewheels/types/index.d.ts +5 -0
- package/dist/pages/CreateOrderPage.js +266 -210
- package/dist/pages/OrderDetailsPage.js +305 -237
- package/dist/pages/RouteDetailsPage.js +247 -238
- package/package.json +1 -1
- package/src/generated/wspace-types.ts +1948 -3
- package/src/movethewheels/hooks/useFleet.ts +9 -2
- package/src/movethewheels/hooks/useOrders.ts +35 -0
- package/src/movethewheels/hooks/useRoutes.ts +1 -1
- package/src/movethewheels/pages/CreateOrderPage.tsx +84 -1
- package/src/movethewheels/pages/OrderDetailsPage.tsx +79 -10
- package/src/movethewheels/pages/RouteDetailsPage.tsx +14 -4
- package/src/movethewheels/types/index.ts +5 -0
|
@@ -4,40 +4,40 @@ import { ArrowUp as n } from "../node_modules/lucide-react/dist/esm/icons/arrow-
|
|
|
4
4
|
import { CircleCheckBig as r } from "../node_modules/lucide-react/dist/esm/icons/circle-check-big.js";
|
|
5
5
|
import { Clock as i } from "../node_modules/lucide-react/dist/esm/icons/clock.js";
|
|
6
6
|
import { Fuel as a } from "../node_modules/lucide-react/dist/esm/icons/fuel.js";
|
|
7
|
-
import { MapPin as
|
|
8
|
-
import { Navigation as
|
|
9
|
-
import { Plus as
|
|
10
|
-
import { Save as
|
|
11
|
-
import { SquarePen as
|
|
12
|
-
import { Trash2 as
|
|
13
|
-
import { Zap as
|
|
14
|
-
import { joinPath as
|
|
15
|
-
import { useMoveTheWheels as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { Badge as
|
|
19
|
-
import { ErrorState as
|
|
20
|
-
import { RouteMap as
|
|
7
|
+
import { MapPin as o } from "../node_modules/lucide-react/dist/esm/icons/map-pin.js";
|
|
8
|
+
import { Navigation as s } from "../node_modules/lucide-react/dist/esm/icons/navigation.js";
|
|
9
|
+
import { Plus as c } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
|
|
10
|
+
import { Save as l } from "../node_modules/lucide-react/dist/esm/icons/save.js";
|
|
11
|
+
import { SquarePen as u } from "../node_modules/lucide-react/dist/esm/icons/square-pen.js";
|
|
12
|
+
import { Trash2 as d } from "../node_modules/lucide-react/dist/esm/icons/trash-2.js";
|
|
13
|
+
import { Zap as f } from "../node_modules/lucide-react/dist/esm/icons/zap.js";
|
|
14
|
+
import { joinPath as p } from "../utils/navigation.js";
|
|
15
|
+
import { useMoveTheWheels as ee } from "../providers/MoveTheWheelsProvider.js";
|
|
16
|
+
import { useRoute as m, useRoutes as te } from "../hooks/useRoutes.js";
|
|
17
|
+
import { useDriver as ne, useFleet as h, useVehicle as g } from "../hooks/useFleet.js";
|
|
18
|
+
import { Badge as _, Button as v, Card as y, CardContent as b, CardHeader as x, CardTitle as S, Input as C, Label as w, Select as T, SelectContent as E, SelectItem as D, SelectTrigger as O, SelectValue as k } from "../components/ui.js";
|
|
19
|
+
import { ErrorState as re, LoadingState as A, PageLayout as ie } from "../components/PageLayout.js";
|
|
20
|
+
import { RouteMap as j } from "../components/maps/RouteMap.js";
|
|
21
21
|
import "../components/maps/index.js";
|
|
22
|
-
import { ROUTE_STATUS_COLORS as
|
|
23
|
-
import { StatusBadge as
|
|
24
|
-
import { FormError as
|
|
25
|
-
import { Notice as
|
|
26
|
-
import { formatAddress as F, formatCurrency as
|
|
27
|
-
import { useDebouncedValue as
|
|
28
|
-
import { firstRealLatLng as
|
|
29
|
-
import { useAssignmentSuggestions as
|
|
30
|
-
import { AssignmentSuggestions as
|
|
31
|
-
import { useEffect as
|
|
32
|
-
import { useLocation as
|
|
33
|
-
import { jsx as
|
|
34
|
-
import { useI18n as
|
|
35
|
-
import { EmphasisPanel as
|
|
22
|
+
import { ROUTE_STATUS_COLORS as M } from "../constants/index.js";
|
|
23
|
+
import { StatusBadge as N } from "../components/StatusBadge.js";
|
|
24
|
+
import { FormError as ae } from "../components/FormError.js";
|
|
25
|
+
import { Notice as oe, useNotice as P } from "../components/Notice.js";
|
|
26
|
+
import { formatAddress as F, formatCurrency as se, formatDate as I } from "../utils/formatters.js";
|
|
27
|
+
import { useDebouncedValue as L } from "../hooks/useDebouncedValue.js";
|
|
28
|
+
import { firstRealLatLng as ce } from "../utils/mapMarkers.js";
|
|
29
|
+
import { useAssignmentSuggestions as le } from "../hooks/useFleetIntelligence.js";
|
|
30
|
+
import { AssignmentSuggestions as R } from "../components/AssignmentSuggestions.js";
|
|
31
|
+
import { useEffect as z, useState as B } from "react";
|
|
32
|
+
import { useLocation as V, useParams as H } from "react-router";
|
|
33
|
+
import { jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
34
|
+
import { useI18n as G } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
35
|
+
import { EmphasisPanel as K, NextSteps as ue, PagePurpose as de } from "@burdenoff/fe-libs/ui";
|
|
36
36
|
//#region src/movethewheels/pages/RouteDetailsPage.tsx
|
|
37
|
-
function
|
|
37
|
+
function q(e, t) {
|
|
38
38
|
return !t || e.some((e) => e.id === t.id) ? e : [t, ...e];
|
|
39
39
|
}
|
|
40
|
-
var
|
|
40
|
+
var J = [
|
|
41
41
|
{
|
|
42
42
|
value: "planned",
|
|
43
43
|
label: "Planned"
|
|
@@ -55,11 +55,8 @@ var Y = [
|
|
|
55
55
|
label: "Cancelled"
|
|
56
56
|
}
|
|
57
57
|
];
|
|
58
|
-
function
|
|
59
|
-
let { basePath: i, navigate: a } =
|
|
60
|
-
limit: 20,
|
|
61
|
-
filters: { search: R(v) || void 0 }
|
|
62
|
-
}), j = !!r, [M, N] = U({
|
|
58
|
+
function Y({ editId: r }) {
|
|
59
|
+
let { basePath: i, navigate: a } = ee(), { createRoute: o, updateRoute: u } = te(), { route: f } = m(r), [_, re] = B(""), A = L(_), j = !!r, [M, N] = B({
|
|
63
60
|
name: "",
|
|
64
61
|
status: "planned",
|
|
65
62
|
vehicleId: "",
|
|
@@ -68,14 +65,26 @@ function X({ editId: r }) {
|
|
|
68
65
|
address: "",
|
|
69
66
|
type: "delivery"
|
|
70
67
|
}]
|
|
71
|
-
}), {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
}), { vehicles: oe } = h({
|
|
69
|
+
limit: 20,
|
|
70
|
+
filters: {
|
|
71
|
+
search: A || void 0,
|
|
72
|
+
driverId: M.driverId || void 0
|
|
73
|
+
}
|
|
74
|
+
}), { drivers: P } = h({
|
|
75
|
+
limit: 20,
|
|
76
|
+
filters: {
|
|
77
|
+
search: A || void 0,
|
|
78
|
+
vehicleId: M.vehicleId || void 0
|
|
79
|
+
}
|
|
80
|
+
}), { vehicle: se } = g(M.vehicleId || void 0), { driver: I } = ne(M.driverId || void 0), ce = q(oe, se), le = q(P, I), [R, V] = B(!1), [H, G] = B(null);
|
|
81
|
+
z(() => {
|
|
82
|
+
!r || !f || N({
|
|
83
|
+
name: f.name || "",
|
|
84
|
+
status: f.status,
|
|
85
|
+
vehicleId: f.vehicleId || "",
|
|
86
|
+
driverId: f.driverId || "",
|
|
87
|
+
stops: f.stops.length > 0 ? f.stops.map((e) => ({
|
|
79
88
|
address: F(e.address) || e.address.street || "",
|
|
80
89
|
type: e.type
|
|
81
90
|
})) : [{
|
|
@@ -83,8 +92,8 @@ function X({ editId: r }) {
|
|
|
83
92
|
type: "delivery"
|
|
84
93
|
}]
|
|
85
94
|
});
|
|
86
|
-
}, [r,
|
|
87
|
-
let
|
|
95
|
+
}, [r, f]);
|
|
96
|
+
let ue = () => a?.(p(i, "routes")), Y = () => N((e) => ({
|
|
88
97
|
...e,
|
|
89
98
|
stops: [...e.stops, {
|
|
90
99
|
address: "",
|
|
@@ -136,74 +145,74 @@ function X({ editId: r }) {
|
|
|
136
145
|
status: "pending"
|
|
137
146
|
}));
|
|
138
147
|
if (j) {
|
|
139
|
-
let t = await
|
|
148
|
+
let t = await u(r, {
|
|
140
149
|
name: M.name.trim(),
|
|
141
150
|
status: M.status,
|
|
142
151
|
vehicleId: M.vehicleId || void 0,
|
|
143
152
|
driverId: M.driverId || void 0,
|
|
144
153
|
stops: e
|
|
145
154
|
});
|
|
146
|
-
a?.(
|
|
155
|
+
a?.(p(i, `routes/${t.id}`));
|
|
147
156
|
return;
|
|
148
157
|
}
|
|
149
|
-
let n = await
|
|
158
|
+
let n = await o({
|
|
150
159
|
name: M.name.trim(),
|
|
151
160
|
status: M.status,
|
|
152
161
|
vehicleId: M.vehicleId || void 0,
|
|
153
162
|
driverId: M.driverId || void 0,
|
|
154
163
|
stops: e
|
|
155
164
|
});
|
|
156
|
-
a?.(
|
|
165
|
+
a?.(p(i, `routes/${n.id}`));
|
|
157
166
|
} catch (e) {
|
|
158
167
|
console.error("Failed to create route:", e), G(e instanceof Error ? e.message : "Failed to create route. Please try again."), V(!1);
|
|
159
168
|
}
|
|
160
169
|
};
|
|
161
|
-
return /* @__PURE__ */
|
|
170
|
+
return /* @__PURE__ */ W(ie, {
|
|
162
171
|
title: j ? "Edit Route" : "Create Route",
|
|
163
172
|
subtitle: "Plan a new delivery route",
|
|
164
|
-
icon: /* @__PURE__ */
|
|
165
|
-
headerActions: /* @__PURE__ */
|
|
173
|
+
icon: /* @__PURE__ */ U(s, { size: 24 }),
|
|
174
|
+
headerActions: /* @__PURE__ */ W("div", {
|
|
166
175
|
className: "flex gap-2",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ W(v, {
|
|
168
177
|
variant: "outline",
|
|
169
|
-
onClick:
|
|
170
|
-
disabled:
|
|
171
|
-
children: [/* @__PURE__ */
|
|
172
|
-
}), /* @__PURE__ */
|
|
178
|
+
onClick: ue,
|
|
179
|
+
disabled: R,
|
|
180
|
+
children: [/* @__PURE__ */ U(t, { size: 16 }), " Cancel"]
|
|
181
|
+
}), /* @__PURE__ */ W(v, {
|
|
173
182
|
onClick: $,
|
|
174
|
-
disabled:
|
|
183
|
+
disabled: R,
|
|
175
184
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ U(l, { size: 16 }),
|
|
177
186
|
" ",
|
|
178
|
-
j ?
|
|
187
|
+
j ? R ? "Saving..." : "Save Changes" : R ? "Saving..." : "Create Route"
|
|
179
188
|
]
|
|
180
189
|
})]
|
|
181
190
|
}),
|
|
182
|
-
children: [/* @__PURE__ */
|
|
183
|
-
icon: /* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ U(de, {
|
|
192
|
+
icon: /* @__PURE__ */ U(s, { size: 18 }),
|
|
184
193
|
children: "Plan a new delivery route — name it, list the stops to visit, and optionally assign a vehicle and driver. Once created you can optimize it to sequence the stops into the shortest run."
|
|
185
|
-
}), /* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ W("form", {
|
|
186
195
|
onSubmit: $,
|
|
187
196
|
className: "max-w-3xl space-y-6",
|
|
188
197
|
children: [
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ U(ae, { message: H }),
|
|
199
|
+
/* @__PURE__ */ W(K, { children: [/* @__PURE__ */ U("h2", {
|
|
191
200
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
192
201
|
children: "Route Details"
|
|
193
|
-
}), /* @__PURE__ */
|
|
202
|
+
}), /* @__PURE__ */ W("div", {
|
|
194
203
|
className: "space-y-4",
|
|
195
204
|
children: [
|
|
196
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ W("div", {
|
|
197
206
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ W("div", {
|
|
199
208
|
className: "space-y-2",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ W(w, {
|
|
201
210
|
htmlFor: "name",
|
|
202
|
-
children: ["Route Name ", /* @__PURE__ */
|
|
211
|
+
children: ["Route Name ", /* @__PURE__ */ U("span", {
|
|
203
212
|
className: "text-status-error-text",
|
|
204
213
|
children: "*"
|
|
205
214
|
})]
|
|
206
|
-
}), /* @__PURE__ */
|
|
215
|
+
}), /* @__PURE__ */ U(C, {
|
|
207
216
|
id: "name",
|
|
208
217
|
value: M.name,
|
|
209
218
|
onChange: (e) => N((t) => ({
|
|
@@ -213,56 +222,56 @@ function X({ editId: r }) {
|
|
|
213
222
|
placeholder: "Downtown morning run",
|
|
214
223
|
required: !0
|
|
215
224
|
})]
|
|
216
|
-
}), /* @__PURE__ */
|
|
225
|
+
}), /* @__PURE__ */ W("div", {
|
|
217
226
|
className: "space-y-2",
|
|
218
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ U(w, {
|
|
219
228
|
htmlFor: "status",
|
|
220
229
|
children: "Status"
|
|
221
|
-
}), /* @__PURE__ */
|
|
230
|
+
}), /* @__PURE__ */ W(T, {
|
|
222
231
|
value: M.status,
|
|
223
232
|
onValueChange: (e) => N((t) => ({
|
|
224
233
|
...t,
|
|
225
234
|
status: e
|
|
226
235
|
})),
|
|
227
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ U(O, {
|
|
228
237
|
id: "status",
|
|
229
|
-
children: /* @__PURE__ */
|
|
230
|
-
}), /* @__PURE__ */
|
|
238
|
+
children: /* @__PURE__ */ U(k, {})
|
|
239
|
+
}), /* @__PURE__ */ U(E, { children: J.map((e) => /* @__PURE__ */ U(D, {
|
|
231
240
|
value: e.value,
|
|
232
241
|
children: e.label
|
|
233
242
|
}, e.value)) })]
|
|
234
243
|
})]
|
|
235
244
|
})]
|
|
236
245
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ W("div", {
|
|
238
247
|
className: "space-y-2",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ U(w, {
|
|
240
249
|
htmlFor: "fleet-search",
|
|
241
250
|
children: "Search fleet"
|
|
242
|
-
}), /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ U(C, {
|
|
243
252
|
id: "fleet-search",
|
|
244
|
-
value:
|
|
245
|
-
onChange: (e) =>
|
|
253
|
+
value: _,
|
|
254
|
+
onChange: (e) => re(e.target.value),
|
|
246
255
|
placeholder: "Vehicle number, driver name or ID"
|
|
247
256
|
})]
|
|
248
257
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ W("div", {
|
|
250
259
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ W("div", {
|
|
252
261
|
className: "space-y-2",
|
|
253
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ U(w, {
|
|
254
263
|
htmlFor: "vehicle",
|
|
255
264
|
children: "Vehicle (optional)"
|
|
256
|
-
}), /* @__PURE__ */
|
|
265
|
+
}), /* @__PURE__ */ W(T, {
|
|
257
266
|
value: M.vehicleId,
|
|
258
267
|
onValueChange: (e) => N((t) => ({
|
|
259
268
|
...t,
|
|
260
269
|
vehicleId: e
|
|
261
270
|
})),
|
|
262
|
-
children: [/* @__PURE__ */
|
|
271
|
+
children: [/* @__PURE__ */ U(O, {
|
|
263
272
|
id: "vehicle",
|
|
264
|
-
children: /* @__PURE__ */
|
|
265
|
-
}), /* @__PURE__ */
|
|
273
|
+
children: /* @__PURE__ */ U(k, { placeholder: "Assign later" })
|
|
274
|
+
}), /* @__PURE__ */ U(E, { children: ce.map((e) => /* @__PURE__ */ W(D, {
|
|
266
275
|
value: e.id,
|
|
267
276
|
children: [
|
|
268
277
|
e.vehicleNumber,
|
|
@@ -272,21 +281,21 @@ function X({ editId: r }) {
|
|
|
272
281
|
]
|
|
273
282
|
}, e.id)) })]
|
|
274
283
|
})]
|
|
275
|
-
}), /* @__PURE__ */
|
|
284
|
+
}), /* @__PURE__ */ W("div", {
|
|
276
285
|
className: "space-y-2",
|
|
277
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ U(w, {
|
|
278
287
|
htmlFor: "driver",
|
|
279
288
|
children: "Driver (optional)"
|
|
280
|
-
}), /* @__PURE__ */
|
|
289
|
+
}), /* @__PURE__ */ W(T, {
|
|
281
290
|
value: M.driverId,
|
|
282
291
|
onValueChange: (e) => N((t) => ({
|
|
283
292
|
...t,
|
|
284
293
|
driverId: e
|
|
285
294
|
})),
|
|
286
|
-
children: [/* @__PURE__ */
|
|
295
|
+
children: [/* @__PURE__ */ U(O, {
|
|
287
296
|
id: "driver",
|
|
288
|
-
children: /* @__PURE__ */
|
|
289
|
-
}), /* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ U(k, { placeholder: "Assign later" })
|
|
298
|
+
}), /* @__PURE__ */ U(E, { children: le.map((e) => /* @__PURE__ */ W(D, {
|
|
290
299
|
value: e.id,
|
|
291
300
|
children: [
|
|
292
301
|
e.fullName,
|
|
@@ -300,81 +309,81 @@ function X({ editId: r }) {
|
|
|
300
309
|
})
|
|
301
310
|
]
|
|
302
311
|
})] }),
|
|
303
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ W(y, { children: [/* @__PURE__ */ W(x, {
|
|
304
313
|
className: "flex flex-row items-center justify-between",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
314
|
+
children: [/* @__PURE__ */ W(S, { children: ["Stops ", /* @__PURE__ */ U("span", {
|
|
306
315
|
className: "text-status-error-text",
|
|
307
316
|
children: "*"
|
|
308
|
-
})] }), /* @__PURE__ */
|
|
317
|
+
})] }), /* @__PURE__ */ W(v, {
|
|
309
318
|
type: "button",
|
|
310
319
|
variant: "outline",
|
|
311
320
|
size: "sm",
|
|
312
|
-
onClick:
|
|
313
|
-
children: [/* @__PURE__ */
|
|
321
|
+
onClick: Y,
|
|
322
|
+
children: [/* @__PURE__ */ U(c, { size: 16 }), " Add Stop"]
|
|
314
323
|
})]
|
|
315
|
-
}), /* @__PURE__ */
|
|
324
|
+
}), /* @__PURE__ */ U(b, {
|
|
316
325
|
className: "space-y-4",
|
|
317
|
-
children: M.stops.map((t, r) => /* @__PURE__ */
|
|
326
|
+
children: M.stops.map((t, r) => /* @__PURE__ */ W("div", {
|
|
318
327
|
className: "grid grid-cols-1 md:grid-cols-12 gap-3 items-end",
|
|
319
328
|
children: [
|
|
320
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ W("div", {
|
|
321
330
|
className: "md:col-span-7 space-y-2",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ W(w, {
|
|
323
332
|
htmlFor: `stop-address-${r}`,
|
|
324
333
|
children: [
|
|
325
334
|
"Stop ",
|
|
326
335
|
r + 1,
|
|
327
336
|
" address"
|
|
328
337
|
]
|
|
329
|
-
}), /* @__PURE__ */
|
|
338
|
+
}), /* @__PURE__ */ U(C, {
|
|
330
339
|
id: `stop-address-${r}`,
|
|
331
340
|
value: t.address,
|
|
332
341
|
onChange: (e) => Z(r, "address", e.target.value),
|
|
333
342
|
placeholder: "123 Main St, San Francisco, CA"
|
|
334
343
|
})]
|
|
335
344
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ W("div", {
|
|
337
346
|
className: "md:col-span-4 space-y-2",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ U(w, {
|
|
339
348
|
htmlFor: `stop-type-${r}`,
|
|
340
349
|
children: "Type"
|
|
341
|
-
}), /* @__PURE__ */
|
|
350
|
+
}), /* @__PURE__ */ W(T, {
|
|
342
351
|
value: t.type,
|
|
343
352
|
onValueChange: (e) => Z(r, "type", e),
|
|
344
|
-
children: [/* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ U(O, {
|
|
345
354
|
id: `stop-type-${r}`,
|
|
346
|
-
children: /* @__PURE__ */
|
|
347
|
-
}), /* @__PURE__ */
|
|
355
|
+
children: /* @__PURE__ */ U(k, {})
|
|
356
|
+
}), /* @__PURE__ */ W(E, { children: [/* @__PURE__ */ U(D, {
|
|
348
357
|
value: "pickup",
|
|
349
358
|
children: "Pickup"
|
|
350
|
-
}), /* @__PURE__ */
|
|
359
|
+
}), /* @__PURE__ */ U(D, {
|
|
351
360
|
value: "delivery",
|
|
352
361
|
children: "Delivery"
|
|
353
362
|
})] })]
|
|
354
363
|
})]
|
|
355
364
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ W("div", {
|
|
357
366
|
className: "md:col-span-1 flex justify-end gap-1",
|
|
358
367
|
children: [
|
|
359
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ U(v, {
|
|
360
369
|
type: "button",
|
|
361
370
|
variant: "ghost",
|
|
362
371
|
size: "icon",
|
|
363
372
|
onClick: () => Q(r, -1),
|
|
364
373
|
disabled: r === 0,
|
|
365
374
|
"aria-label": `Move stop ${r + 1} up`,
|
|
366
|
-
children: /* @__PURE__ */
|
|
375
|
+
children: /* @__PURE__ */ U(n, { size: 16 })
|
|
367
376
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ U(v, {
|
|
369
378
|
type: "button",
|
|
370
379
|
variant: "ghost",
|
|
371
380
|
size: "icon",
|
|
372
381
|
onClick: () => Q(r, 1),
|
|
373
382
|
disabled: r === M.stops.length - 1,
|
|
374
383
|
"aria-label": `Move stop ${r + 1} down`,
|
|
375
|
-
children: /* @__PURE__ */
|
|
384
|
+
children: /* @__PURE__ */ U(e, { size: 16 })
|
|
376
385
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ U(v, {
|
|
378
387
|
type: "button",
|
|
379
388
|
variant: "ghost",
|
|
380
389
|
size: "icon",
|
|
@@ -382,7 +391,7 @@ function X({ editId: r }) {
|
|
|
382
391
|
onClick: () => X(r),
|
|
383
392
|
disabled: M.stops.length === 1,
|
|
384
393
|
"aria-label": `Remove stop ${r + 1}`,
|
|
385
|
-
children: /* @__PURE__ */
|
|
394
|
+
children: /* @__PURE__ */ U(d, { size: 16 })
|
|
386
395
|
})
|
|
387
396
|
]
|
|
388
397
|
})
|
|
@@ -393,33 +402,33 @@ function X({ editId: r }) {
|
|
|
393
402
|
})]
|
|
394
403
|
});
|
|
395
404
|
}
|
|
396
|
-
function
|
|
397
|
-
let { routeId: e } =
|
|
398
|
-
let n =
|
|
405
|
+
function X() {
|
|
406
|
+
let { routeId: e } = H(), n = V().pathname.endsWith("/edit"), { basePath: c, navigate: l } = ee(), { route: d, isLoading: ne, error: h, refetch: g } = m(e), { optimizeRoute: C, updateRoute: w } = te(), T = le(e), { t: E } = G(), D = (e, t) => {
|
|
407
|
+
let n = E(e);
|
|
399
408
|
return n === e ? t : n;
|
|
400
|
-
}, { message:
|
|
409
|
+
}, { message: O, notify: k } = P(), [L, z] = B(null), [q, J] = B(!1), X = () => l?.(p(c, "routes")), Z = (e) => l?.(p(c, e)), Q = async () => {
|
|
401
410
|
if (e) {
|
|
402
|
-
|
|
411
|
+
J(!0), z(null);
|
|
403
412
|
try {
|
|
404
|
-
await
|
|
413
|
+
await C(e), k("Route optimized — stops resequenced for the shortest run."), g();
|
|
405
414
|
} catch (e) {
|
|
406
|
-
|
|
415
|
+
z(e instanceof Error ? e.message : "Failed to optimize route.");
|
|
407
416
|
} finally {
|
|
408
|
-
|
|
417
|
+
J(!1);
|
|
409
418
|
}
|
|
410
419
|
}
|
|
411
|
-
},
|
|
412
|
-
e && (await
|
|
420
|
+
}, $ = async (t) => {
|
|
421
|
+
e && (await w(e, t), k(D("movethewheels.routes.suggest.done", "Assignment saved.")), g(), T.refetch());
|
|
413
422
|
};
|
|
414
|
-
if (!e) return /* @__PURE__ */
|
|
415
|
-
if (n) return /* @__PURE__ */
|
|
416
|
-
if (
|
|
417
|
-
if (h || !
|
|
423
|
+
if (!e) return /* @__PURE__ */ U(Y, {});
|
|
424
|
+
if (n) return /* @__PURE__ */ U(Y, { editId: e });
|
|
425
|
+
if (ne) return /* @__PURE__ */ U(A, { message: "Loading route details..." });
|
|
426
|
+
if (h || !d) return /* @__PURE__ */ U(re, {
|
|
418
427
|
title: "Route not found",
|
|
419
428
|
onRetry: g
|
|
420
429
|
});
|
|
421
|
-
let fe =
|
|
422
|
-
let t =
|
|
430
|
+
let fe = d.stops.map((e) => {
|
|
431
|
+
let t = ce(e.address);
|
|
423
432
|
return t ? {
|
|
424
433
|
lat: t.lat,
|
|
425
434
|
lng: t.lng,
|
|
@@ -427,152 +436,152 @@ function Z() {
|
|
|
427
436
|
label: F(e.address) || `Order #${e.orderId || e.sequence}`
|
|
428
437
|
} : null;
|
|
429
438
|
}).filter((e) => e !== null);
|
|
430
|
-
return /* @__PURE__ */
|
|
431
|
-
title:
|
|
432
|
-
subtitle: `${
|
|
433
|
-
icon: /* @__PURE__ */
|
|
434
|
-
headerActions: /* @__PURE__ */
|
|
439
|
+
return /* @__PURE__ */ W(ie, {
|
|
440
|
+
title: d.name,
|
|
441
|
+
subtitle: `${d.stops.length} stops - ${d.distance.toFixed(1)} km`,
|
|
442
|
+
icon: /* @__PURE__ */ U(s, { size: 24 }),
|
|
443
|
+
headerActions: /* @__PURE__ */ W("div", {
|
|
435
444
|
className: "flex gap-2",
|
|
436
445
|
children: [
|
|
437
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ W(v, {
|
|
438
447
|
variant: "outline",
|
|
439
|
-
onClick:
|
|
440
|
-
children: [/* @__PURE__ */
|
|
448
|
+
onClick: X,
|
|
449
|
+
children: [/* @__PURE__ */ U(t, { size: 16 }), " Back"]
|
|
441
450
|
}),
|
|
442
|
-
!
|
|
451
|
+
!d.optimized && /* @__PURE__ */ W(v, {
|
|
443
452
|
variant: "outline",
|
|
444
|
-
onClick:
|
|
445
|
-
disabled:
|
|
453
|
+
onClick: Q,
|
|
454
|
+
disabled: q,
|
|
446
455
|
children: [
|
|
447
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ U(f, { size: 16 }),
|
|
448
457
|
" ",
|
|
449
|
-
|
|
458
|
+
q ? "Optimizing…" : "Optimize"
|
|
450
459
|
]
|
|
451
460
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
453
|
-
onClick: () =>
|
|
454
|
-
children: [/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ W(v, {
|
|
462
|
+
onClick: () => l?.(p(c, `routes/${e}/edit`)),
|
|
463
|
+
children: [/* @__PURE__ */ U(u, { size: 16 }), " Edit"]
|
|
455
464
|
})
|
|
456
465
|
]
|
|
457
466
|
}),
|
|
458
|
-
headerContent: /* @__PURE__ */
|
|
467
|
+
headerContent: /* @__PURE__ */ W("div", {
|
|
459
468
|
className: "flex gap-2",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
461
|
-
status:
|
|
462
|
-
customColors:
|
|
463
|
-
}), /* @__PURE__ */
|
|
464
|
-
variant:
|
|
465
|
-
children:
|
|
469
|
+
children: [/* @__PURE__ */ U(N, {
|
|
470
|
+
status: d.status,
|
|
471
|
+
customColors: M[d.status]
|
|
472
|
+
}), /* @__PURE__ */ U(_, {
|
|
473
|
+
variant: d.optimized ? "default" : "secondary",
|
|
474
|
+
children: d.optimized ? "Optimized" : "Not Optimized"
|
|
466
475
|
})]
|
|
467
476
|
}),
|
|
468
477
|
children: [
|
|
469
|
-
/* @__PURE__ */
|
|
470
|
-
icon: /* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ U(de, {
|
|
479
|
+
icon: /* @__PURE__ */ U(s, { size: 18 }),
|
|
471
480
|
children: "A single optimized driving plan that chains together this route's stops. Review the sequence, distance and timing here, re-optimize if traffic or stops change, then hand the itinerary to a driver."
|
|
472
481
|
}),
|
|
473
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ U(ue, {
|
|
474
483
|
storageKey: "movethewheels-route-details",
|
|
475
484
|
steps: [
|
|
476
|
-
...
|
|
485
|
+
...d.optimized ? [] : [{
|
|
477
486
|
id: "optimize",
|
|
478
487
|
label: "Optimize this route",
|
|
479
488
|
description: "Reorder stops to cut distance and driving time.",
|
|
480
|
-
icon: /* @__PURE__ */
|
|
481
|
-
onClick:
|
|
489
|
+
icon: /* @__PURE__ */ U(f, { size: 16 }),
|
|
490
|
+
onClick: Q
|
|
482
491
|
}],
|
|
483
492
|
{
|
|
484
493
|
id: "edit",
|
|
485
494
|
label: "Adjust stops",
|
|
486
495
|
description: "Add, remove or reorder the delivery stops.",
|
|
487
|
-
icon: /* @__PURE__ */
|
|
496
|
+
icon: /* @__PURE__ */ U(u, { size: 16 }),
|
|
488
497
|
onClick: () => {}
|
|
489
498
|
},
|
|
490
499
|
{
|
|
491
500
|
id: "orders",
|
|
492
501
|
label: "Review the orders on this route",
|
|
493
502
|
description: "Check the deliveries bundled into this run.",
|
|
494
|
-
icon: /* @__PURE__ */
|
|
495
|
-
onClick: () =>
|
|
503
|
+
icon: /* @__PURE__ */ U(o, { size: 16 }),
|
|
504
|
+
onClick: () => Z("orders")
|
|
496
505
|
}
|
|
497
506
|
]
|
|
498
507
|
}),
|
|
499
|
-
|
|
508
|
+
L && /* @__PURE__ */ U("div", {
|
|
500
509
|
className: "mb-2",
|
|
501
|
-
children: /* @__PURE__ */
|
|
510
|
+
children: /* @__PURE__ */ U(ae, { message: L })
|
|
502
511
|
}),
|
|
503
|
-
|
|
512
|
+
O && /* @__PURE__ */ U("div", {
|
|
504
513
|
className: "mb-2",
|
|
505
|
-
children: /* @__PURE__ */
|
|
514
|
+
children: /* @__PURE__ */ U(oe, { message: O })
|
|
506
515
|
}),
|
|
507
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ W("div", {
|
|
508
517
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
509
|
-
children: [/* @__PURE__ */
|
|
518
|
+
children: [/* @__PURE__ */ W("div", {
|
|
510
519
|
className: "lg:col-span-2 space-y-6",
|
|
511
|
-
children: [/* @__PURE__ */
|
|
520
|
+
children: [/* @__PURE__ */ W(y, { children: [/* @__PURE__ */ U(x, { children: /* @__PURE__ */ U(S, { children: "Route Map" }) }), /* @__PURE__ */ U(b, { children: fe.length > 0 ? /* @__PURE__ */ U(j, {
|
|
512
521
|
className: "overflow-hidden rounded-lg border border-border-seam",
|
|
513
522
|
height: 360,
|
|
514
523
|
stops: fe
|
|
515
|
-
}) : /* @__PURE__ */
|
|
524
|
+
}) : /* @__PURE__ */ W("div", {
|
|
516
525
|
className: "rounded-lg border border-border-seam bg-bg-sunken/40 p-4",
|
|
517
|
-
children: [/* @__PURE__ */
|
|
526
|
+
children: [/* @__PURE__ */ U("p", {
|
|
518
527
|
className: "mb-3 text-sm text-text-secondary",
|
|
519
528
|
children: "These stops don't have map coordinates yet — showing the planned sequence instead."
|
|
520
|
-
}), /* @__PURE__ */
|
|
529
|
+
}), /* @__PURE__ */ U("ol", {
|
|
521
530
|
className: "space-y-2",
|
|
522
|
-
children:
|
|
531
|
+
children: d.stops.map((e) => /* @__PURE__ */ W("li", {
|
|
523
532
|
className: "flex items-start gap-3",
|
|
524
|
-
children: [/* @__PURE__ */
|
|
533
|
+
children: [/* @__PURE__ */ U("span", {
|
|
525
534
|
className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10 text-xs font-semibold text-primary",
|
|
526
535
|
children: e.sequence
|
|
527
|
-
}), /* @__PURE__ */
|
|
536
|
+
}), /* @__PURE__ */ U("span", {
|
|
528
537
|
className: "text-sm",
|
|
529
538
|
children: F(e.address) || `Order #${e.orderId || e.sequence}`
|
|
530
539
|
})]
|
|
531
540
|
}, e.id))
|
|
532
541
|
})]
|
|
533
|
-
}) })] }), /* @__PURE__ */
|
|
542
|
+
}) })] }), /* @__PURE__ */ W(y, { children: [/* @__PURE__ */ U(x, { children: /* @__PURE__ */ W(S, { children: [
|
|
534
543
|
"Stops (",
|
|
535
|
-
|
|
544
|
+
d.stops.length,
|
|
536
545
|
")"
|
|
537
|
-
] }) }), /* @__PURE__ */
|
|
546
|
+
] }) }), /* @__PURE__ */ U(b, { children: /* @__PURE__ */ U("div", {
|
|
538
547
|
className: "space-y-4",
|
|
539
|
-
children:
|
|
548
|
+
children: d.stops.map((e, t) => /* @__PURE__ */ W("div", {
|
|
540
549
|
className: "flex gap-4",
|
|
541
|
-
children: [/* @__PURE__ */
|
|
550
|
+
children: [/* @__PURE__ */ W("div", {
|
|
542
551
|
className: "relative",
|
|
543
|
-
children: [/* @__PURE__ */
|
|
552
|
+
children: [/* @__PURE__ */ U("div", {
|
|
544
553
|
className: `w-8 h-8 rounded-full flex items-center justify-center ${e.status === "completed" ? "bg-status-success-text text-text-inverse" : "bg-bg-sunken"}`,
|
|
545
|
-
children: e.status === "completed" ? /* @__PURE__ */
|
|
546
|
-
}), t <
|
|
547
|
-
}), /* @__PURE__ */
|
|
554
|
+
children: e.status === "completed" ? /* @__PURE__ */ U(r, { size: 16 }) : e.sequence
|
|
555
|
+
}), t < d.stops.length - 1 && /* @__PURE__ */ U("div", { className: "absolute top-8 left-4 w-px h-12 bg-border" })]
|
|
556
|
+
}), /* @__PURE__ */ U("div", {
|
|
548
557
|
className: "flex-1 pb-4",
|
|
549
|
-
children: /* @__PURE__ */
|
|
558
|
+
children: /* @__PURE__ */ W("div", {
|
|
550
559
|
className: "flex items-center justify-between",
|
|
551
|
-
children: [/* @__PURE__ */
|
|
560
|
+
children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ W("div", {
|
|
552
561
|
className: "flex items-center gap-2",
|
|
553
|
-
children: [/* @__PURE__ */
|
|
562
|
+
children: [/* @__PURE__ */ U(_, {
|
|
554
563
|
variant: e.type === "pickup" ? "secondary" : "default",
|
|
555
564
|
className: "capitalize",
|
|
556
565
|
children: e.type
|
|
557
|
-
}), /* @__PURE__ */
|
|
566
|
+
}), /* @__PURE__ */ W("span", {
|
|
558
567
|
className: "font-medium",
|
|
559
568
|
children: ["Order #", e.orderId]
|
|
560
569
|
})]
|
|
561
|
-
}), /* @__PURE__ */
|
|
570
|
+
}), /* @__PURE__ */ U("p", {
|
|
562
571
|
className: "text-sm text-text-secondary mt-1",
|
|
563
572
|
children: F(e.address)
|
|
564
|
-
})] }), /* @__PURE__ */
|
|
573
|
+
})] }), /* @__PURE__ */ W("div", {
|
|
565
574
|
className: "text-right",
|
|
566
575
|
children: [
|
|
567
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ W("p", {
|
|
568
577
|
className: "text-sm",
|
|
569
|
-
children: ["Scheduled: ",
|
|
578
|
+
children: ["Scheduled: ", I(e.scheduledTime, "time")]
|
|
570
579
|
}),
|
|
571
|
-
e.actualTime && /* @__PURE__ */
|
|
580
|
+
e.actualTime && /* @__PURE__ */ W("p", {
|
|
572
581
|
className: "text-sm text-status-success-text",
|
|
573
|
-
children: ["Actual: ",
|
|
582
|
+
children: ["Actual: ", I(e.actualTime, "time")]
|
|
574
583
|
}),
|
|
575
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ W("p", {
|
|
576
585
|
className: "text-xs text-text-secondary",
|
|
577
586
|
children: [e.duration, " min stop"]
|
|
578
587
|
})
|
|
@@ -582,91 +591,91 @@ function Z() {
|
|
|
582
591
|
})]
|
|
583
592
|
}, e.id))
|
|
584
593
|
}) })] })]
|
|
585
|
-
}), /* @__PURE__ */
|
|
594
|
+
}), /* @__PURE__ */ W("div", {
|
|
586
595
|
className: "space-y-6",
|
|
587
596
|
children: [
|
|
588
|
-
(
|
|
589
|
-
suggestions:
|
|
590
|
-
isLoading:
|
|
591
|
-
error:
|
|
592
|
-
onRetry:
|
|
593
|
-
assignedVehicleId:
|
|
594
|
-
assignedDriverId:
|
|
595
|
-
onAssign:
|
|
596
|
-
t:
|
|
597
|
+
(d.status === "planned" || d.status === "in_progress") && /* @__PURE__ */ U(R, {
|
|
598
|
+
suggestions: T.data,
|
|
599
|
+
isLoading: T.isLoading,
|
|
600
|
+
error: T.error,
|
|
601
|
+
onRetry: T.refetch,
|
|
602
|
+
assignedVehicleId: d.vehicleId || void 0,
|
|
603
|
+
assignedDriverId: d.driverId || void 0,
|
|
604
|
+
onAssign: $,
|
|
605
|
+
t: D
|
|
597
606
|
}),
|
|
598
|
-
/* @__PURE__ */
|
|
607
|
+
/* @__PURE__ */ W(K, {
|
|
599
608
|
className: "space-y-4",
|
|
600
609
|
children: [
|
|
601
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ U("h2", {
|
|
602
611
|
className: "text-base font-semibold text-text-primary",
|
|
603
612
|
children: "Route Info"
|
|
604
613
|
}),
|
|
605
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
606
615
|
className: "text-sm text-text-secondary",
|
|
607
616
|
children: "Total Distance"
|
|
608
|
-
}), /* @__PURE__ */
|
|
617
|
+
}), /* @__PURE__ */ W("p", {
|
|
609
618
|
className: "text-2xl font-bold",
|
|
610
|
-
children: [
|
|
619
|
+
children: [d.distance.toFixed(1), /* @__PURE__ */ U("span", {
|
|
611
620
|
className: "text-sm font-normal",
|
|
612
621
|
children: " km"
|
|
613
622
|
})]
|
|
614
623
|
})] }),
|
|
615
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
616
625
|
className: "text-sm text-text-secondary",
|
|
617
626
|
children: "Est. Duration"
|
|
618
|
-
}), /* @__PURE__ */
|
|
627
|
+
}), /* @__PURE__ */ W("p", {
|
|
619
628
|
className: "text-2xl font-bold",
|
|
620
|
-
children: [
|
|
629
|
+
children: [d.estimatedDuration, /* @__PURE__ */ U("span", {
|
|
621
630
|
className: "text-sm font-normal",
|
|
622
631
|
children: " min"
|
|
623
632
|
})]
|
|
624
633
|
})] }),
|
|
625
|
-
|
|
634
|
+
d.fuelCost !== void 0 && /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ W("p", {
|
|
626
635
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
627
|
-
children: [/* @__PURE__ */
|
|
628
|
-
}), /* @__PURE__ */
|
|
636
|
+
children: [/* @__PURE__ */ U(a, { size: 14 }), " Est. Fuel Cost"]
|
|
637
|
+
}), /* @__PURE__ */ U("p", {
|
|
629
638
|
className: "text-2xl font-bold",
|
|
630
|
-
children:
|
|
639
|
+
children: se(d.fuelCost)
|
|
631
640
|
})] }),
|
|
632
|
-
|
|
641
|
+
d.actualDuration && /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
633
642
|
className: "text-sm text-text-secondary",
|
|
634
643
|
children: "Actual Duration"
|
|
635
|
-
}), /* @__PURE__ */
|
|
644
|
+
}), /* @__PURE__ */ W("p", {
|
|
636
645
|
className: "text-2xl font-bold",
|
|
637
|
-
children: [
|
|
646
|
+
children: [d.actualDuration, /* @__PURE__ */ U("span", {
|
|
638
647
|
className: "text-sm font-normal",
|
|
639
648
|
children: " min"
|
|
640
649
|
})]
|
|
641
650
|
})] })
|
|
642
651
|
]
|
|
643
652
|
}),
|
|
644
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ W(y, { children: [/* @__PURE__ */ U(x, { children: /* @__PURE__ */ W(S, {
|
|
645
654
|
className: "flex items-center gap-2",
|
|
646
|
-
children: [/* @__PURE__ */
|
|
647
|
-
}) }), /* @__PURE__ */
|
|
655
|
+
children: [/* @__PURE__ */ U(i, { size: 18 }), " Timeline"]
|
|
656
|
+
}) }), /* @__PURE__ */ W(b, {
|
|
648
657
|
className: "space-y-3",
|
|
649
658
|
children: [
|
|
650
|
-
|
|
659
|
+
d.startTime && /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
651
660
|
className: "text-sm text-text-secondary",
|
|
652
661
|
children: "Started"
|
|
653
|
-
}), /* @__PURE__ */
|
|
654
|
-
|
|
662
|
+
}), /* @__PURE__ */ U("p", { children: I(d.startTime, "full") })] }),
|
|
663
|
+
d.endTime && /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
655
664
|
className: "text-sm text-text-secondary",
|
|
656
665
|
children: "Completed"
|
|
657
|
-
}), /* @__PURE__ */
|
|
658
|
-
/* @__PURE__ */
|
|
666
|
+
}), /* @__PURE__ */ U("p", { children: I(d.endTime, "full") })] }),
|
|
667
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
659
668
|
className: "text-sm text-text-secondary",
|
|
660
669
|
children: "Created"
|
|
661
|
-
}), /* @__PURE__ */
|
|
670
|
+
}), /* @__PURE__ */ U("p", { children: I(d.createdAt, "full") })] })
|
|
662
671
|
]
|
|
663
672
|
})] }),
|
|
664
|
-
|
|
673
|
+
d.trafficConditions.length > 0 && /* @__PURE__ */ W(y, { children: [/* @__PURE__ */ U(x, { children: /* @__PURE__ */ U(S, { children: "Traffic Conditions" }) }), /* @__PURE__ */ U(b, { children: d.trafficConditions.map((e, t) => /* @__PURE__ */ W("div", {
|
|
665
674
|
className: `p-2 rounded mb-2 ${e.condition === "severe" ? "bg-status-error-bg-subtle" : (e.condition, "bg-status-warning-bg-subtle")}`,
|
|
666
|
-
children: [/* @__PURE__ */
|
|
675
|
+
children: [/* @__PURE__ */ W("p", {
|
|
667
676
|
className: "text-sm font-medium capitalize",
|
|
668
677
|
children: [e.condition, " traffic"]
|
|
669
|
-
}), /* @__PURE__ */
|
|
678
|
+
}), /* @__PURE__ */ W("p", {
|
|
670
679
|
className: "text-xs text-text-secondary",
|
|
671
680
|
children: [
|
|
672
681
|
e.location,
|
|
@@ -683,4 +692,4 @@ function Z() {
|
|
|
683
692
|
});
|
|
684
693
|
}
|
|
685
694
|
//#endregion
|
|
686
|
-
export {
|
|
695
|
+
export { X as default };
|