@burdenoff/microfe-movethewheels 2026.625.1 → 2026.626.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AIAssistantPage-CNyoKtID.js → AIAssistantPage-AvsMbunM.js} +35 -29
- package/dist/{AnalyticsPage-Ck615ox7.js → AnalyticsPage-CCLfHgQZ.js} +36 -25
- package/dist/CreateOrderPage-CjlnEtk3.js +510 -0
- package/dist/CustomerDetailsPage-I6cdDHUi.js +265 -0
- package/dist/CustomersPage-CGGfD4ki.js +163 -0
- package/dist/{DashboardPage-DTmyuC11.js → DashboardPage-D2HRqwg9.js} +93 -89
- package/dist/DataTable-CD9ZhpLB.js +249 -0
- package/dist/DriverDetailsPage-rg_pGNuP.js +330 -0
- package/dist/DriversPage-DKiynISH.js +167 -0
- package/dist/FinancePage-Vg8WPs38.js +158 -0
- package/dist/{FleetPage-DCfOmBa2.js → FleetPage-DddXt8r8.js} +109 -71
- package/dist/ImportExportPage-BW6qO3kc.js +248 -0
- package/dist/{InventoryPage-BW0QXWuf.js → InventoryPage-rMGuaJN-.js} +74 -70
- package/dist/LiveTrackingPage-DQ1q4Id3.js +375 -0
- package/dist/MarketplacePage-DKrXAv62.js +219 -0
- package/dist/OrderDetailsPage-CFASgsYX.js +431 -0
- package/dist/OrdersListPage-BHeT8S5o.js +309 -0
- package/dist/ProductDetailsPage-CFGcbaHo.js +195 -0
- package/dist/ProductsPage--xEpbQ8A.js +171 -0
- package/dist/{ReportsPage-Df3hciPy.js → ReportsPage-Bb7_90rK.js} +53 -45
- package/dist/RouteDetailsPage-CVtDVb1N.js +282 -0
- package/dist/RoutesPage-s57PtgcQ.js +163 -0
- package/dist/SettingsPage-BYNCBOpN.js +298 -0
- package/dist/{TrackingPage-CU0Vk4mx.js → TrackingPage-CcRc_dva.js} +77 -72
- package/dist/VehicleDetailsPage-3YDMPsPs.js +220 -0
- package/dist/VehiclesPage-UlxPWP9K.js +167 -0
- package/dist/WarehouseDetailsPage-Db7KeN-d.js +238 -0
- package/dist/WarehousesPage-CuTO-OPp.js +164 -0
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/src/movethewheels/components/DataTable.tsx +37 -2
- package/src/movethewheels/components/MetricCard.tsx +3 -1
- package/src/movethewheels/pages/AIAssistantPage.tsx +11 -3
- package/src/movethewheels/pages/AnalyticsPage.tsx +31 -25
- package/src/movethewheels/pages/CreateOrderPage.tsx +56 -17
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +63 -38
- package/src/movethewheels/pages/CustomersPage.tsx +40 -2
- package/src/movethewheels/pages/DashboardPage.tsx +8 -1
- package/src/movethewheels/pages/DriverDetailsPage.tsx +57 -26
- package/src/movethewheels/pages/DriversPage.tsx +37 -1
- package/src/movethewheels/pages/FinancePage.tsx +45 -41
- package/src/movethewheels/pages/FleetPage.tsx +68 -25
- package/src/movethewheels/pages/ImportExportPage.tsx +46 -29
- package/src/movethewheels/pages/InventoryPage.tsx +20 -23
- package/src/movethewheels/pages/LiveTrackingPage.tsx +58 -20
- package/src/movethewheels/pages/MarketplacePage.tsx +37 -3
- package/src/movethewheels/pages/OrderDetailsPage.tsx +74 -46
- package/src/movethewheels/pages/OrdersListPage.tsx +62 -1
- package/src/movethewheels/pages/ProductDetailsPage.tsx +36 -11
- package/src/movethewheels/pages/ProductsPage.tsx +33 -1
- package/src/movethewheels/pages/ReportsPage.tsx +23 -19
- package/src/movethewheels/pages/RouteDetailsPage.tsx +71 -31
- package/src/movethewheels/pages/RoutesPage.tsx +41 -5
- package/src/movethewheels/pages/SettingsPage.tsx +68 -26
- package/src/movethewheels/pages/TrackingPage.tsx +50 -47
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +49 -24
- package/src/movethewheels/pages/VehiclesPage.tsx +33 -1
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +55 -30
- package/src/movethewheels/pages/WarehousesPage.tsx +42 -4
- package/dist/CreateOrderPage-C9Vb57Yn.js +0 -471
- package/dist/CustomerDetailsPage-BVkHRZvi.js +0 -239
- package/dist/CustomersPage-DhQg-6h_.js +0 -118
- package/dist/DataTable-CfWvFw5B.js +0 -239
- package/dist/DriverDetailsPage-DaaCQ-2O.js +0 -297
- package/dist/DriversPage-D0RMBB_t.js +0 -129
- package/dist/FinancePage-BUXqW1IM.js +0 -154
- package/dist/ImportExportPage-BM1BoRcE.js +0 -232
- package/dist/LiveTrackingPage-DqcGXdkw.js +0 -332
- package/dist/MarketplacePage-DFqsxNYU.js +0 -192
- package/dist/OrderDetailsPage-Dx1m3cVA.js +0 -398
- package/dist/OrdersListPage-DHYBGrWf.js +0 -256
- package/dist/ProductDetailsPage-DOXO90kb.js +0 -168
- package/dist/ProductsPage-RLMTwWN0.js +0 -133
- package/dist/RouteDetailsPage-xzFDeR-X.js +0 -240
- package/dist/RoutesPage-DDFy1QVi.js +0 -118
- package/dist/SettingsPage-JH_-UPbf.js +0 -247
- package/dist/VehicleDetailsPage-P4xDttKw.js +0 -194
- package/dist/VehiclesPage-tJZ64QKV.js +0 -129
- package/dist/WarehouseDetailsPage-Bt_w2Yf7.js +0 -215
- package/dist/WarehousesPage-HsPpEFeG.js +0 -126
|
@@ -3,8 +3,9 @@ import { t as p } from "./clock-BjkdnddD.js";
|
|
|
3
3
|
import { t as m } from "./download-Dpa9vqoG.js";
|
|
4
4
|
import { t as h } from "./filter-Da5OZaHI.js";
|
|
5
5
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
6
|
+
import { EmphasisPanel as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
|
|
6
7
|
//#region node_modules/lucide-react/dist/esm/icons/calendar.js
|
|
7
|
-
var
|
|
8
|
+
var b = u("Calendar", [
|
|
8
9
|
["path", {
|
|
9
10
|
d: "M8 2v4",
|
|
10
11
|
key: "1cmpym"
|
|
@@ -25,7 +26,7 @@ var v = u("Calendar", [
|
|
|
25
26
|
d: "M3 10h18",
|
|
26
27
|
key: "8toen8"
|
|
27
28
|
}]
|
|
28
|
-
]),
|
|
29
|
+
]), x = u("FileChartColumnIncreasing", [
|
|
29
30
|
["path", {
|
|
30
31
|
d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
|
|
31
32
|
key: "1rqfz7"
|
|
@@ -49,11 +50,11 @@ var v = u("Calendar", [
|
|
|
49
50
|
]);
|
|
50
51
|
//#endregion
|
|
51
52
|
//#region src/movethewheels/pages/ReportsPage.tsx
|
|
52
|
-
function
|
|
53
|
-
return /* @__PURE__ */
|
|
53
|
+
function S() {
|
|
54
|
+
return /* @__PURE__ */ _(l, {
|
|
54
55
|
title: "Reports",
|
|
55
56
|
subtitle: "Generate and schedule reports",
|
|
56
|
-
icon: /* @__PURE__ */ g(
|
|
57
|
+
icon: /* @__PURE__ */ g(x, { size: 24 }),
|
|
57
58
|
headerActions: /* @__PURE__ */ _("div", {
|
|
58
59
|
className: "flex gap-2",
|
|
59
60
|
children: [/* @__PURE__ */ _(r, {
|
|
@@ -79,9 +80,12 @@ function b() {
|
|
|
79
80
|
children: "Custom"
|
|
80
81
|
})
|
|
81
82
|
] })]
|
|
82
|
-
}), /* @__PURE__ */ _(f, { children: [/* @__PURE__ */ g(
|
|
83
|
+
}), /* @__PURE__ */ _(f, { children: [/* @__PURE__ */ g(x, { size: 16 }), " Create Report"] })]
|
|
83
84
|
}),
|
|
84
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ g(y, {
|
|
86
|
+
icon: /* @__PURE__ */ g(x, { size: 18 }),
|
|
87
|
+
children: "Turn your operational data into shareable summaries. Generate one-off reports on orders, finance, fleet, customers or inventory, or schedule them to land in inboxes automatically — so stakeholders always have the latest numbers without logging in."
|
|
88
|
+
}), /* @__PURE__ */ _("div", {
|
|
85
89
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
86
90
|
children: [/* @__PURE__ */ _("div", {
|
|
87
91
|
className: "lg:col-span-2 space-y-4",
|
|
@@ -133,7 +137,7 @@ function b() {
|
|
|
133
137
|
className: "flex items-center gap-3",
|
|
134
138
|
children: [/* @__PURE__ */ g("div", {
|
|
135
139
|
className: "w-10 h-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center",
|
|
136
|
-
children: /* @__PURE__ */ g(
|
|
140
|
+
children: /* @__PURE__ */ g(x, {
|
|
137
141
|
size: 20,
|
|
138
142
|
className: "text-primary"
|
|
139
143
|
})
|
|
@@ -165,47 +169,51 @@ function b() {
|
|
|
165
169
|
}) }, e.name))]
|
|
166
170
|
}), /* @__PURE__ */ _("div", {
|
|
167
171
|
className: "space-y-6",
|
|
168
|
-
children: [/* @__PURE__ */ _(
|
|
169
|
-
className: "flex items-center gap-2",
|
|
170
|
-
children: [/* @__PURE__ */ g(p, { size: 18 }), " Scheduled Reports"]
|
|
171
|
-
}) }), /* @__PURE__ */ _(o, {
|
|
172
|
+
children: [/* @__PURE__ */ _(v, {
|
|
172
173
|
className: "space-y-3",
|
|
173
|
-
children: [
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ _("h2", {
|
|
176
|
+
className: "flex items-center gap-2 text-base font-semibold text-text-primary",
|
|
177
|
+
children: [/* @__PURE__ */ g(p, { size: 18 }), " Scheduled Reports"]
|
|
178
|
+
}),
|
|
179
|
+
[{
|
|
180
|
+
name: "Daily Summary",
|
|
181
|
+
nextRun: "Tomorrow 6:00 AM",
|
|
182
|
+
recipients: 3
|
|
183
|
+
}, {
|
|
184
|
+
name: "Weekly Review",
|
|
185
|
+
nextRun: "Monday 9:00 AM",
|
|
186
|
+
recipients: 5
|
|
187
|
+
}].map((e) => /* @__PURE__ */ _("div", {
|
|
188
|
+
className: "p-3 border border-border-seam rounded-lg",
|
|
189
|
+
children: [
|
|
190
|
+
/* @__PURE__ */ g("p", {
|
|
191
|
+
className: "font-medium",
|
|
192
|
+
children: e.name
|
|
193
|
+
}),
|
|
194
|
+
/* @__PURE__ */ _("p", {
|
|
195
|
+
className: "text-sm text-text-secondary",
|
|
196
|
+
children: ["Next: ", e.nextRun]
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ _("p", {
|
|
199
|
+
className: "text-xs text-text-secondary",
|
|
200
|
+
children: [e.recipients, " recipients"]
|
|
201
|
+
})
|
|
202
|
+
]
|
|
203
|
+
}, e.name)),
|
|
204
|
+
/* @__PURE__ */ g(f, {
|
|
205
|
+
variant: "outline",
|
|
206
|
+
className: "w-full",
|
|
207
|
+
children: "Schedule New Report"
|
|
208
|
+
})
|
|
209
|
+
]
|
|
210
|
+
}), /* @__PURE__ */ _(a, { children: [/* @__PURE__ */ g(c, { children: /* @__PURE__ */ g(s, { children: "Quick Actions" }) }), /* @__PURE__ */ _(o, {
|
|
203
211
|
className: "space-y-2",
|
|
204
212
|
children: [
|
|
205
213
|
/* @__PURE__ */ _(f, {
|
|
206
214
|
variant: "outline",
|
|
207
215
|
className: "w-full justify-start",
|
|
208
|
-
children: [/* @__PURE__ */ g(
|
|
216
|
+
children: [/* @__PURE__ */ g(b, { size: 16 }), " Schedule Report"]
|
|
209
217
|
}),
|
|
210
218
|
/* @__PURE__ */ _(f, {
|
|
211
219
|
variant: "outline",
|
|
@@ -220,8 +228,8 @@ function b() {
|
|
|
220
228
|
]
|
|
221
229
|
})] })]
|
|
222
230
|
})]
|
|
223
|
-
})
|
|
231
|
+
})]
|
|
224
232
|
});
|
|
225
233
|
}
|
|
226
234
|
//#endregion
|
|
227
|
-
export {
|
|
235
|
+
export { S as default };
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { d as e, f as t, g as n, h as r, i, it as a, l as o, n as s, r as c, t as l, u } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
+
import { t as d } from "./arrow-left-CBpZKkpq.js";
|
|
3
|
+
import { t as f } from "./circle-check-big-CjuPVo3_.js";
|
|
4
|
+
import { t as p } from "./clock-BjkdnddD.js";
|
|
5
|
+
import { t as m } from "./map-pin-BSaf5IDL.js";
|
|
6
|
+
import { t as h } from "./navigation-DaTbrhw2.js";
|
|
7
|
+
import { t as g } from "./square-pen-hLIbFQFV.js";
|
|
8
|
+
import { r as _ } from "./graphqlClient-CdJyR_ed.js";
|
|
9
|
+
import { r as v, t as y } from "./useRoutes-v4aBaS-E.js";
|
|
10
|
+
import { r as b } from "./StatusBadge-CijYQXtb.js";
|
|
11
|
+
import { r as x, t as S } from "./formatters-_vJlC-47.js";
|
|
12
|
+
import { t as C } from "./navigation-BgnOfsVd.js";
|
|
13
|
+
import { useParams as w } from "react-router-dom";
|
|
14
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
15
|
+
import { EmphasisPanel as D, NextSteps as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
//#region node_modules/lucide-react/dist/esm/icons/zap.js
|
|
17
|
+
var A = a("Zap", [["path", {
|
|
18
|
+
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
19
|
+
key: "1xq2db"
|
|
20
|
+
}]]);
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/movethewheels/pages/RouteDetailsPage.tsx
|
|
23
|
+
function j() {
|
|
24
|
+
let { routeId: a } = w(), { basePath: j, navigate: M } = _(), { route: N, isLoading: P, error: F, refetch: I } = y(a), { optimizeRoute: L } = v(), R = () => M?.(C(j, "routes")), z = (e) => M?.(C(j, e));
|
|
25
|
+
if (!a) return /* @__PURE__ */ E(i, {
|
|
26
|
+
title: "Create Route",
|
|
27
|
+
subtitle: "Plan a new delivery route",
|
|
28
|
+
icon: /* @__PURE__ */ T(h, { size: 24 }),
|
|
29
|
+
headerActions: /* @__PURE__ */ E(u, {
|
|
30
|
+
variant: "outline",
|
|
31
|
+
onClick: R,
|
|
32
|
+
children: [/* @__PURE__ */ T(d, { size: 16 }), " Back"]
|
|
33
|
+
}),
|
|
34
|
+
children: [/* @__PURE__ */ T(k, {
|
|
35
|
+
icon: /* @__PURE__ */ T(h, { size: 18 }),
|
|
36
|
+
children: "Plan a new delivery route — pick the stops to visit, and the optimizer will sequence them into the shortest driving plan so one driver can cover them in a single run."
|
|
37
|
+
}), /* @__PURE__ */ T(l, {
|
|
38
|
+
illustration: "onboarding",
|
|
39
|
+
title: "Build your route",
|
|
40
|
+
description: "The route planner lets you add stops, set the running order, and optimize for distance and time."
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
if (P) return /* @__PURE__ */ T(c, { message: "Loading route details..." });
|
|
44
|
+
if (F || !N) return /* @__PURE__ */ T(s, {
|
|
45
|
+
title: "Route not found",
|
|
46
|
+
onRetry: I
|
|
47
|
+
});
|
|
48
|
+
let B = async () => {
|
|
49
|
+
try {
|
|
50
|
+
await L(N.id), I();
|
|
51
|
+
} catch (e) {
|
|
52
|
+
console.error(e);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
return /* @__PURE__ */ E(i, {
|
|
56
|
+
title: N.name,
|
|
57
|
+
subtitle: `${N.stops.length} stops - ${N.distance.toFixed(1)} km`,
|
|
58
|
+
icon: /* @__PURE__ */ T(h, { size: 24 }),
|
|
59
|
+
headerActions: /* @__PURE__ */ E("div", {
|
|
60
|
+
className: "flex gap-2",
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ E(u, {
|
|
63
|
+
variant: "outline",
|
|
64
|
+
onClick: R,
|
|
65
|
+
children: [/* @__PURE__ */ T(d, { size: 16 }), " Back"]
|
|
66
|
+
}),
|
|
67
|
+
!N.optimized && /* @__PURE__ */ E(u, {
|
|
68
|
+
variant: "outline",
|
|
69
|
+
onClick: B,
|
|
70
|
+
children: [/* @__PURE__ */ T(A, { size: 16 }), " Optimize"]
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ E(u, { children: [/* @__PURE__ */ T(g, { size: 16 }), " Edit"] })
|
|
73
|
+
]
|
|
74
|
+
}),
|
|
75
|
+
headerContent: /* @__PURE__ */ E("div", {
|
|
76
|
+
className: "flex gap-2",
|
|
77
|
+
children: [/* @__PURE__ */ T(b, {
|
|
78
|
+
status: N.status,
|
|
79
|
+
customColors: {
|
|
80
|
+
planned: {
|
|
81
|
+
bg: "bg-blue-100",
|
|
82
|
+
text: "text-blue-700"
|
|
83
|
+
},
|
|
84
|
+
in_progress: {
|
|
85
|
+
bg: "bg-yellow-100",
|
|
86
|
+
text: "text-yellow-700"
|
|
87
|
+
},
|
|
88
|
+
completed: {
|
|
89
|
+
bg: "bg-green-100",
|
|
90
|
+
text: "text-green-700"
|
|
91
|
+
},
|
|
92
|
+
cancelled: {
|
|
93
|
+
bg: "bg-red-100",
|
|
94
|
+
text: "text-red-700"
|
|
95
|
+
}
|
|
96
|
+
}[N.status]
|
|
97
|
+
}), /* @__PURE__ */ T(o, {
|
|
98
|
+
variant: N.optimized ? "default" : "secondary",
|
|
99
|
+
children: N.optimized ? "Optimized" : "Not Optimized"
|
|
100
|
+
})]
|
|
101
|
+
}),
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ T(k, {
|
|
104
|
+
icon: /* @__PURE__ */ T(h, { size: 18 }),
|
|
105
|
+
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."
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ T(O, {
|
|
108
|
+
storageKey: "movethewheels-route-details",
|
|
109
|
+
steps: [
|
|
110
|
+
...N.optimized ? [] : [{
|
|
111
|
+
id: "optimize",
|
|
112
|
+
label: "Optimize this route",
|
|
113
|
+
description: "Reorder stops to cut distance and driving time.",
|
|
114
|
+
icon: /* @__PURE__ */ T(A, { size: 16 }),
|
|
115
|
+
onClick: B
|
|
116
|
+
}],
|
|
117
|
+
{
|
|
118
|
+
id: "edit",
|
|
119
|
+
label: "Adjust stops",
|
|
120
|
+
description: "Add, remove or reorder the delivery stops.",
|
|
121
|
+
icon: /* @__PURE__ */ T(g, { size: 16 }),
|
|
122
|
+
onClick: () => {}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: "orders",
|
|
126
|
+
label: "Review the orders on this route",
|
|
127
|
+
description: "Check the deliveries bundled into this run.",
|
|
128
|
+
icon: /* @__PURE__ */ T(m, { size: 16 }),
|
|
129
|
+
onClick: () => z("orders")
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ E("div", {
|
|
134
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
135
|
+
children: [/* @__PURE__ */ E("div", {
|
|
136
|
+
className: "lg:col-span-2 space-y-6",
|
|
137
|
+
children: [/* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ T(n, { children: "Route Map" }) }), /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T("div", {
|
|
138
|
+
className: "aspect-video bg-bg-sunken rounded-lg flex items-center justify-center",
|
|
139
|
+
children: /* @__PURE__ */ E("div", {
|
|
140
|
+
className: "text-center text-text-secondary",
|
|
141
|
+
children: [/* @__PURE__ */ T(m, {
|
|
142
|
+
size: 48,
|
|
143
|
+
className: "mx-auto mb-2 opacity-50"
|
|
144
|
+
}), /* @__PURE__ */ T("p", { children: "Route map visualization" })]
|
|
145
|
+
})
|
|
146
|
+
}) })] }), /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ E(n, { children: [
|
|
147
|
+
"Stops (",
|
|
148
|
+
N.stops.length,
|
|
149
|
+
")"
|
|
150
|
+
] }) }), /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T("div", {
|
|
151
|
+
className: "space-y-4",
|
|
152
|
+
children: N.stops.map((e, t) => /* @__PURE__ */ E("div", {
|
|
153
|
+
className: "flex gap-4",
|
|
154
|
+
children: [/* @__PURE__ */ E("div", {
|
|
155
|
+
className: "relative",
|
|
156
|
+
children: [/* @__PURE__ */ T("div", {
|
|
157
|
+
className: `w-8 h-8 rounded-full flex items-center justify-center ${e.status === "completed" ? "bg-green-500 text-white" : "bg-bg-sunken"}`,
|
|
158
|
+
children: e.status === "completed" ? /* @__PURE__ */ T(f, { size: 16 }) : e.sequence
|
|
159
|
+
}), t < N.stops.length - 1 && /* @__PURE__ */ T("div", { className: "absolute top-8 left-4 w-px h-12 bg-border" })]
|
|
160
|
+
}), /* @__PURE__ */ T("div", {
|
|
161
|
+
className: "flex-1 pb-4",
|
|
162
|
+
children: /* @__PURE__ */ E("div", {
|
|
163
|
+
className: "flex items-center justify-between",
|
|
164
|
+
children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("div", {
|
|
165
|
+
className: "flex items-center gap-2",
|
|
166
|
+
children: [/* @__PURE__ */ T(o, {
|
|
167
|
+
variant: e.type === "pickup" ? "secondary" : "default",
|
|
168
|
+
className: "capitalize",
|
|
169
|
+
children: e.type
|
|
170
|
+
}), /* @__PURE__ */ E("span", {
|
|
171
|
+
className: "font-medium",
|
|
172
|
+
children: ["Order #", e.orderId]
|
|
173
|
+
})]
|
|
174
|
+
}), /* @__PURE__ */ T("p", {
|
|
175
|
+
className: "text-sm text-text-secondary mt-1",
|
|
176
|
+
children: S(e.address)
|
|
177
|
+
})] }), /* @__PURE__ */ E("div", {
|
|
178
|
+
className: "text-right",
|
|
179
|
+
children: [
|
|
180
|
+
/* @__PURE__ */ E("p", {
|
|
181
|
+
className: "text-sm",
|
|
182
|
+
children: ["Scheduled: ", x(e.scheduledTime, "time")]
|
|
183
|
+
}),
|
|
184
|
+
e.actualTime && /* @__PURE__ */ E("p", {
|
|
185
|
+
className: "text-sm text-green-600",
|
|
186
|
+
children: ["Actual: ", x(e.actualTime, "time")]
|
|
187
|
+
}),
|
|
188
|
+
/* @__PURE__ */ E("p", {
|
|
189
|
+
className: "text-xs text-text-secondary",
|
|
190
|
+
children: [e.duration, " min stop"]
|
|
191
|
+
})
|
|
192
|
+
]
|
|
193
|
+
})]
|
|
194
|
+
})
|
|
195
|
+
})]
|
|
196
|
+
}, e.id))
|
|
197
|
+
}) })] })]
|
|
198
|
+
}), /* @__PURE__ */ E("div", {
|
|
199
|
+
className: "space-y-6",
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ E(D, {
|
|
202
|
+
className: "space-y-4",
|
|
203
|
+
children: [
|
|
204
|
+
/* @__PURE__ */ T("h2", {
|
|
205
|
+
className: "text-base font-semibold text-text-primary",
|
|
206
|
+
children: "Route Info"
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
209
|
+
className: "text-sm text-text-secondary",
|
|
210
|
+
children: "Total Distance"
|
|
211
|
+
}), /* @__PURE__ */ E("p", {
|
|
212
|
+
className: "text-2xl font-bold",
|
|
213
|
+
children: [N.distance.toFixed(1), /* @__PURE__ */ T("span", {
|
|
214
|
+
className: "text-sm font-normal",
|
|
215
|
+
children: " km"
|
|
216
|
+
})]
|
|
217
|
+
})] }),
|
|
218
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
219
|
+
className: "text-sm text-text-secondary",
|
|
220
|
+
children: "Est. Duration"
|
|
221
|
+
}), /* @__PURE__ */ E("p", {
|
|
222
|
+
className: "text-2xl font-bold",
|
|
223
|
+
children: [N.estimatedDuration, /* @__PURE__ */ T("span", {
|
|
224
|
+
className: "text-sm font-normal",
|
|
225
|
+
children: " min"
|
|
226
|
+
})]
|
|
227
|
+
})] }),
|
|
228
|
+
N.actualDuration && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
229
|
+
className: "text-sm text-text-secondary",
|
|
230
|
+
children: "Actual Duration"
|
|
231
|
+
}), /* @__PURE__ */ E("p", {
|
|
232
|
+
className: "text-2xl font-bold",
|
|
233
|
+
children: [N.actualDuration, /* @__PURE__ */ T("span", {
|
|
234
|
+
className: "text-sm font-normal",
|
|
235
|
+
children: " min"
|
|
236
|
+
})]
|
|
237
|
+
})] })
|
|
238
|
+
]
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ E(n, {
|
|
241
|
+
className: "flex items-center gap-2",
|
|
242
|
+
children: [/* @__PURE__ */ T(p, { size: 18 }), " Timeline"]
|
|
243
|
+
}) }), /* @__PURE__ */ E(t, {
|
|
244
|
+
className: "space-y-3",
|
|
245
|
+
children: [
|
|
246
|
+
N.startTime && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
247
|
+
className: "text-sm text-text-secondary",
|
|
248
|
+
children: "Started"
|
|
249
|
+
}), /* @__PURE__ */ T("p", { children: x(N.startTime, "full") })] }),
|
|
250
|
+
N.endTime && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
251
|
+
className: "text-sm text-text-secondary",
|
|
252
|
+
children: "Completed"
|
|
253
|
+
}), /* @__PURE__ */ T("p", { children: x(N.endTime, "full") })] }),
|
|
254
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
255
|
+
className: "text-sm text-text-secondary",
|
|
256
|
+
children: "Created"
|
|
257
|
+
}), /* @__PURE__ */ T("p", { children: x(N.createdAt, "full") })] })
|
|
258
|
+
]
|
|
259
|
+
})] }),
|
|
260
|
+
N.trafficConditions.length > 0 && /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ T(n, { children: "Traffic Conditions" }) }), /* @__PURE__ */ T(t, { children: N.trafficConditions.map((e, t) => /* @__PURE__ */ E("div", {
|
|
261
|
+
className: `p-2 rounded mb-2 ${e.condition === "severe" ? "bg-red-50" : e.condition === "heavy" ? "bg-orange-50" : "bg-yellow-50"}`,
|
|
262
|
+
children: [/* @__PURE__ */ E("p", {
|
|
263
|
+
className: "text-sm font-medium capitalize",
|
|
264
|
+
children: [e.condition, " traffic"]
|
|
265
|
+
}), /* @__PURE__ */ E("p", {
|
|
266
|
+
className: "text-xs text-text-secondary",
|
|
267
|
+
children: [
|
|
268
|
+
e.location,
|
|
269
|
+
" - +",
|
|
270
|
+
e.delay,
|
|
271
|
+
" min delay"
|
|
272
|
+
]
|
|
273
|
+
})]
|
|
274
|
+
}, t)) })] })
|
|
275
|
+
]
|
|
276
|
+
})]
|
|
277
|
+
})
|
|
278
|
+
]
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
//#endregion
|
|
282
|
+
export { j as default };
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { i as e, l as t, u as n } from "./PageLayout-D3N8MCTm.js";
|
|
2
|
+
import { t as r } from "./DataTable-CD9ZhpLB.js";
|
|
3
|
+
import { t as i } from "./navigation-DaTbrhw2.js";
|
|
4
|
+
import { t as a } from "./plus-Dl1rLeJR.js";
|
|
5
|
+
import { t as o } from "./refresh-cw-CWfERAit.js";
|
|
6
|
+
import { r as s } from "./graphqlClient-CdJyR_ed.js";
|
|
7
|
+
import { r as c } from "./useRoutes-v4aBaS-E.js";
|
|
8
|
+
import { r as l } from "./StatusBadge-CijYQXtb.js";
|
|
9
|
+
import { r as u } from "./formatters-_vJlC-47.js";
|
|
10
|
+
import { t as d } from "./navigation-BgnOfsVd.js";
|
|
11
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
|
+
import { CTAOverflowMenu as m, EmphasisPanel as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
//#region src/movethewheels/pages/RoutesPage.tsx
|
|
14
|
+
function _() {
|
|
15
|
+
let { basePath: _, navigate: v } = s(), { routes: y, totalRoutes: b, isLoading: x, refetch: S } = c(), C = (e) => v?.(d(_, e));
|
|
16
|
+
return /* @__PURE__ */ p(e, {
|
|
17
|
+
title: "Routes",
|
|
18
|
+
subtitle: `${b} routes`,
|
|
19
|
+
icon: /* @__PURE__ */ f(i, { size: 24 }),
|
|
20
|
+
headerActions: /* @__PURE__ */ f(m, {
|
|
21
|
+
primary: {
|
|
22
|
+
label: "Create Route",
|
|
23
|
+
icon: /* @__PURE__ */ f(a, { size: 16 }),
|
|
24
|
+
onSelect: () => C("routes/new")
|
|
25
|
+
},
|
|
26
|
+
actions: [{
|
|
27
|
+
label: "Refresh",
|
|
28
|
+
icon: /* @__PURE__ */ f(o, { size: 16 }),
|
|
29
|
+
onSelect: () => S()
|
|
30
|
+
}]
|
|
31
|
+
}),
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ f(g, {
|
|
34
|
+
icon: /* @__PURE__ */ f(i, { size: 18 }),
|
|
35
|
+
children: "Routes group multiple delivery stops into an optimized driving plan. Build a route to batch nearby drop-offs, cut distance and fuel, and give drivers a single ordered itinerary — then open one to review stops, distance and optimization status."
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ p(h, { children: [/* @__PURE__ */ f("p", {
|
|
38
|
+
className: "text-sm font-medium text-text-secondary",
|
|
39
|
+
children: "Routes at a glance"
|
|
40
|
+
}), /* @__PURE__ */ p("div", {
|
|
41
|
+
className: "mt-3 grid grid-cols-3 gap-4",
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
44
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
45
|
+
children: b
|
|
46
|
+
}), /* @__PURE__ */ f("p", {
|
|
47
|
+
className: "text-xs text-text-secondary",
|
|
48
|
+
children: "Total routes"
|
|
49
|
+
})] }),
|
|
50
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
51
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
52
|
+
children: y.filter((e) => e.status === "in_progress").length
|
|
53
|
+
}), /* @__PURE__ */ f("p", {
|
|
54
|
+
className: "text-xs text-text-secondary",
|
|
55
|
+
children: "In progress"
|
|
56
|
+
})] }),
|
|
57
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
58
|
+
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
59
|
+
children: y.filter((e) => e.optimized).length
|
|
60
|
+
}), /* @__PURE__ */ f("p", {
|
|
61
|
+
className: "text-xs text-text-secondary",
|
|
62
|
+
children: "Optimized"
|
|
63
|
+
})] })
|
|
64
|
+
]
|
|
65
|
+
})] }),
|
|
66
|
+
/* @__PURE__ */ f(r, {
|
|
67
|
+
columns: [
|
|
68
|
+
{
|
|
69
|
+
id: "name",
|
|
70
|
+
header: "Route Name",
|
|
71
|
+
accessorKey: "name",
|
|
72
|
+
sortable: !0,
|
|
73
|
+
cell: (e) => /* @__PURE__ */ f("span", {
|
|
74
|
+
className: "font-medium",
|
|
75
|
+
children: e.name
|
|
76
|
+
})
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "status",
|
|
80
|
+
header: "Status",
|
|
81
|
+
accessorKey: "status",
|
|
82
|
+
sortable: !0,
|
|
83
|
+
cell: (e) => /* @__PURE__ */ f(l, {
|
|
84
|
+
status: e.status,
|
|
85
|
+
customColors: {
|
|
86
|
+
planned: {
|
|
87
|
+
bg: "bg-blue-100",
|
|
88
|
+
text: "text-blue-700"
|
|
89
|
+
},
|
|
90
|
+
in_progress: {
|
|
91
|
+
bg: "bg-yellow-100",
|
|
92
|
+
text: "text-yellow-700"
|
|
93
|
+
},
|
|
94
|
+
completed: {
|
|
95
|
+
bg: "bg-green-100",
|
|
96
|
+
text: "text-green-700"
|
|
97
|
+
},
|
|
98
|
+
cancelled: {
|
|
99
|
+
bg: "bg-red-100",
|
|
100
|
+
text: "text-red-700"
|
|
101
|
+
}
|
|
102
|
+
}[e.status]
|
|
103
|
+
})
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "stops",
|
|
107
|
+
header: "Stops",
|
|
108
|
+
cell: (e) => /* @__PURE__ */ p(t, {
|
|
109
|
+
variant: "secondary",
|
|
110
|
+
children: [e.stops.length, " stops"]
|
|
111
|
+
})
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "distance",
|
|
115
|
+
header: "Distance",
|
|
116
|
+
accessorKey: "distance",
|
|
117
|
+
sortable: !0,
|
|
118
|
+
cell: (e) => `${e.distance.toFixed(1)} km`
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "duration",
|
|
122
|
+
header: "Est. Duration",
|
|
123
|
+
cell: (e) => `${e.estimatedDuration} min`
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: "optimized",
|
|
127
|
+
header: "Optimized",
|
|
128
|
+
cell: (e) => /* @__PURE__ */ f(t, {
|
|
129
|
+
variant: e.optimized ? "default" : "outline",
|
|
130
|
+
children: e.optimized ? "Yes" : "No"
|
|
131
|
+
})
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: "created",
|
|
135
|
+
header: "Created",
|
|
136
|
+
accessorKey: "createdAt",
|
|
137
|
+
sortable: !0,
|
|
138
|
+
cell: (e) => u(e.createdAt, "short")
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
data: y,
|
|
142
|
+
isLoading: x,
|
|
143
|
+
searchable: !0,
|
|
144
|
+
searchPlaceholder: "Search routes...",
|
|
145
|
+
searchFields: ["name"],
|
|
146
|
+
onRowClick: (e) => C(`routes/${e.id}`),
|
|
147
|
+
getRowId: (e) => e.id,
|
|
148
|
+
emptyIllustration: "empty-data",
|
|
149
|
+
emptyTitle: "No routes yet",
|
|
150
|
+
emptyDescription: "Create a route to batch deliveries into an optimized driving plan.",
|
|
151
|
+
emptyAction: /* @__PURE__ */ p(n, {
|
|
152
|
+
onClick: () => C("routes/new"),
|
|
153
|
+
children: [/* @__PURE__ */ f(a, {
|
|
154
|
+
size: 16,
|
|
155
|
+
className: "mr-1.5"
|
|
156
|
+
}), "Create Route"]
|
|
157
|
+
})
|
|
158
|
+
})
|
|
159
|
+
]
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
//#endregion
|
|
163
|
+
export { _ as default };
|