@burdenoff/microfe-movethewheels 2026.1031.3 → 2026.1031.5

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