@burdenoff/microfe-movethewheels 2026.1031.3 → 2026.1031.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MoveTheWheelsRoot.js +136 -127
- package/dist/MoveTheWheelsRoutes.js +140 -135
- package/dist/components/DocumentsCard.js +11 -11
- package/dist/components/ProofOfDeliveryCard.js +13 -13
- package/dist/components/ShipmentRiskDialog.js +24 -24
- package/dist/components/ShippingQuoteResults.js +46 -46
- package/dist/components/TrackingAlertList.js +17 -17
- package/dist/generated/tracking-quality-operations.d.ts +56 -0
- package/dist/hooks/useOrderDispatch.js +17 -17
- package/dist/movethewheels/pages/SettingsPage.d.ts +1 -0
- package/dist/movethewheels/providers/ModuleSettingsProvider.d.ts +17 -0
- package/dist/movethewheels/utils/formatters.d.ts +23 -3
- package/dist/movethewheels/utils/moduleSettings.d.ts +52 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/bell.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/key-round.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plug.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/settings.js +13 -0
- package/dist/pages/AnalyticsPage.js +27 -27
- package/dist/pages/CreateOrderPage.js +340 -317
- package/dist/pages/CustomerDetailsPage.js +246 -246
- package/dist/pages/CustomersPage.js +19 -19
- package/dist/pages/DashboardPage.js +24 -24
- package/dist/pages/DeliveryCapturePage.js +74 -74
- package/dist/pages/DriverDetailsPage.js +337 -337
- package/dist/pages/DriversPage.js +26 -26
- package/dist/pages/FinancePage.js +26 -26
- package/dist/pages/InventoryPage.js +28 -28
- package/dist/pages/LiveTrackingPage.js +108 -108
- package/dist/pages/MarketplacePage.js +44 -44
- package/dist/pages/OrderDetailsPage.js +306 -306
- package/dist/pages/OrdersListPage.js +27 -27
- package/dist/pages/ProductDetailsPage.js +89 -89
- package/dist/pages/ProductsPage.js +73 -73
- package/dist/pages/RouteDetailsPage.js +282 -285
- package/dist/pages/RoutesPage.js +78 -78
- package/dist/pages/SettingsPage.js +459 -0
- package/dist/pages/TrackingPage.js +41 -41
- package/dist/pages/VehicleDetailsPage.js +207 -207
- package/dist/pages/VehiclesPage.js +17 -16
- package/dist/pages/WarehouseDetailsPage.js +132 -132
- package/dist/providers/ModuleSettingsProvider.js +74 -0
- package/dist/utils/formatters.js +53 -26
- package/dist/utils/moduleSettings.js +132 -0
- package/package.json +3 -2
- package/src/generated/tracking-quality-operations.ts +62 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +14 -3
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +9 -0
- package/src/movethewheels/pages/CreateOrderPage.tsx +38 -6
- package/src/movethewheels/pages/ProductsPage.tsx +2 -2
- package/src/movethewheels/pages/RouteDetailsPage.tsx +3 -6
- package/src/movethewheels/pages/RoutesPage.tsx +2 -2
- package/src/movethewheels/pages/SettingsPage.tsx +516 -0
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +4 -2
- package/src/movethewheels/pages/VehiclesPage.tsx +2 -1
- package/src/movethewheels/providers/ModuleSettingsProvider.tsx +133 -0
- package/src/movethewheels/utils/formatters.ts +69 -10
- package/src/movethewheels/utils/moduleSettings.ts +224 -0
package/dist/pages/RoutesPage.js
CHANGED
|
@@ -4,19 +4,19 @@ import { Plus as n } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
|
|
|
4
4
|
import { RefreshCw as r } from "../node_modules/lucide-react/dist/esm/icons/refresh-cw.js";
|
|
5
5
|
import { joinPath as i } from "../utils/navigation.js";
|
|
6
6
|
import { useMoveTheWheels as a } from "../providers/MoveTheWheelsProvider.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { useDebouncedValue as
|
|
15
|
-
import { useState as
|
|
16
|
-
import { jsx as
|
|
17
|
-
import { CTAOverflowMenu as
|
|
7
|
+
import { formatDate as o, formatDistance as s } from "../utils/formatters.js";
|
|
8
|
+
import { useRouteStats as c, useRoutes as l } from "../hooks/useRoutes.js";
|
|
9
|
+
import { Badge as u, Button as d, Card as f, CardContent as p, Select as m, SelectContent as h, SelectItem as g, SelectTrigger as _, SelectValue as v } from "../components/ui.js";
|
|
10
|
+
import { PageLayout as y } from "../components/PageLayout.js";
|
|
11
|
+
import { ROUTE_STATUS_COLORS as b } from "../constants/index.js";
|
|
12
|
+
import { StatusBadge as x } from "../components/StatusBadge.js";
|
|
13
|
+
import { DataTable as S } from "../components/DataTable.js";
|
|
14
|
+
import { useDebouncedValue as C } from "../hooks/useDebouncedValue.js";
|
|
15
|
+
import { useState as w } from "react";
|
|
16
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
17
|
+
import { CTAOverflowMenu as D, EmphasisPanel as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
|
|
18
18
|
//#region src/movethewheels/pages/RoutesPage.tsx
|
|
19
|
-
var
|
|
19
|
+
var A = [
|
|
20
20
|
{
|
|
21
21
|
value: "all",
|
|
22
22
|
label: "All statuses"
|
|
@@ -38,110 +38,110 @@ var k = [
|
|
|
38
38
|
label: "Cancelled"
|
|
39
39
|
}
|
|
40
40
|
];
|
|
41
|
-
function
|
|
42
|
-
let { basePath:
|
|
43
|
-
limit:
|
|
44
|
-
offset:
|
|
45
|
-
search:
|
|
46
|
-
status:
|
|
47
|
-
}),
|
|
48
|
-
return /* @__PURE__ */
|
|
41
|
+
function j() {
|
|
42
|
+
let { basePath: j, navigate: M } = a(), [N, P] = w(0), [F, I] = w(25), [L, R] = w(""), [z, B] = w("all"), V = C(L), { routes: H, totalRoutes: U, hasMore: W, isLoading: G, error: K, refetch: q } = l({
|
|
43
|
+
limit: F,
|
|
44
|
+
offset: N * F,
|
|
45
|
+
search: V || void 0,
|
|
46
|
+
status: z === "all" ? void 0 : z
|
|
47
|
+
}), J = z !== "all" || L.length > 0, { stats: Y } = c(), X = (e) => M?.(i(j, e));
|
|
48
|
+
return /* @__PURE__ */ E(y, {
|
|
49
49
|
title: "Routes",
|
|
50
|
-
subtitle: `${
|
|
51
|
-
icon: /* @__PURE__ */
|
|
52
|
-
headerActions: /* @__PURE__ */
|
|
50
|
+
subtitle: `${Y.totalRoutes} routes`,
|
|
51
|
+
icon: /* @__PURE__ */ T(t, { size: 24 }),
|
|
52
|
+
headerActions: /* @__PURE__ */ T(D, {
|
|
53
53
|
primary: {
|
|
54
54
|
label: "Create Route",
|
|
55
|
-
icon: /* @__PURE__ */
|
|
56
|
-
onSelect: () =>
|
|
55
|
+
icon: /* @__PURE__ */ T(n, { size: 16 }),
|
|
56
|
+
onSelect: () => X("routes/new")
|
|
57
57
|
},
|
|
58
58
|
actions: [{
|
|
59
59
|
label: "Refresh",
|
|
60
|
-
icon: /* @__PURE__ */
|
|
61
|
-
onSelect: () =>
|
|
60
|
+
icon: /* @__PURE__ */ T(r, { size: 16 }),
|
|
61
|
+
onSelect: () => q()
|
|
62
62
|
}]
|
|
63
63
|
}),
|
|
64
64
|
children: [
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
icon: /* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ T(k, {
|
|
66
|
+
icon: /* @__PURE__ */ T(t, { size: 18 }),
|
|
67
67
|
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."
|
|
68
68
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ E(O, { children: [/* @__PURE__ */ T("p", {
|
|
70
70
|
className: "text-sm font-medium text-text-secondary",
|
|
71
71
|
children: "Routes at a glance"
|
|
72
|
-
}), /* @__PURE__ */
|
|
72
|
+
}), /* @__PURE__ */ E("div", {
|
|
73
73
|
className: "mt-3 grid grid-cols-3 gap-4",
|
|
74
74
|
children: [
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
76
76
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
77
|
-
children:
|
|
78
|
-
}), /* @__PURE__ */
|
|
77
|
+
children: Y.totalRoutes
|
|
78
|
+
}), /* @__PURE__ */ T("p", {
|
|
79
79
|
className: "text-xs text-text-secondary",
|
|
80
80
|
children: "Total routes"
|
|
81
81
|
})] }),
|
|
82
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
83
83
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
84
|
-
children:
|
|
85
|
-
}), /* @__PURE__ */
|
|
84
|
+
children: Y.inProgressRoutes
|
|
85
|
+
}), /* @__PURE__ */ T("p", {
|
|
86
86
|
className: "text-xs text-text-secondary",
|
|
87
87
|
children: "In progress"
|
|
88
88
|
})] }),
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
90
90
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
91
|
-
children:
|
|
92
|
-
}), /* @__PURE__ */
|
|
91
|
+
children: Y.optimizedRoutes
|
|
92
|
+
}), /* @__PURE__ */ T("p", {
|
|
93
93
|
className: "text-xs text-text-secondary",
|
|
94
94
|
children: "Optimized"
|
|
95
95
|
})] })
|
|
96
96
|
]
|
|
97
97
|
})] }),
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ T(f, { children: /* @__PURE__ */ T(p, {
|
|
99
99
|
className: "p-4",
|
|
100
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ E("div", {
|
|
101
101
|
className: "flex flex-wrap items-center gap-4",
|
|
102
102
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ E("div", {
|
|
104
104
|
className: "flex items-center gap-2",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ T(e, {
|
|
106
106
|
size: 16,
|
|
107
107
|
className: "text-text-secondary"
|
|
108
|
-
}), /* @__PURE__ */
|
|
108
|
+
}), /* @__PURE__ */ T("span", {
|
|
109
109
|
className: "text-sm font-medium",
|
|
110
110
|
children: "Filters:"
|
|
111
111
|
})]
|
|
112
112
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
value:
|
|
113
|
+
/* @__PURE__ */ E(m, {
|
|
114
|
+
value: z,
|
|
115
115
|
onValueChange: (e) => {
|
|
116
|
-
|
|
116
|
+
B(e), P(0);
|
|
117
117
|
},
|
|
118
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ T(_, {
|
|
119
119
|
className: "w-[180px]",
|
|
120
|
-
children: /* @__PURE__ */
|
|
121
|
-
}), /* @__PURE__ */
|
|
120
|
+
children: /* @__PURE__ */ T(v, { placeholder: "Status" })
|
|
121
|
+
}), /* @__PURE__ */ T(h, { children: A.map((e) => /* @__PURE__ */ T(g, {
|
|
122
122
|
value: e.value,
|
|
123
123
|
children: e.label
|
|
124
124
|
}, e.value)) })]
|
|
125
125
|
}),
|
|
126
|
-
|
|
126
|
+
J && /* @__PURE__ */ T(d, {
|
|
127
127
|
variant: "ghost",
|
|
128
128
|
size: "sm",
|
|
129
129
|
onClick: () => {
|
|
130
|
-
|
|
130
|
+
B("all"), R(""), P(0);
|
|
131
131
|
},
|
|
132
132
|
children: "Clear filters"
|
|
133
133
|
})
|
|
134
134
|
]
|
|
135
135
|
})
|
|
136
136
|
}) }),
|
|
137
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ T(S, {
|
|
138
138
|
columns: [
|
|
139
139
|
{
|
|
140
140
|
id: "name",
|
|
141
141
|
header: "Route Name",
|
|
142
142
|
accessorKey: "name",
|
|
143
143
|
sortable: !0,
|
|
144
|
-
cell: (e) => /* @__PURE__ */
|
|
144
|
+
cell: (e) => /* @__PURE__ */ T("span", {
|
|
145
145
|
className: "font-medium",
|
|
146
146
|
children: e.name
|
|
147
147
|
})
|
|
@@ -151,15 +151,15 @@ function A() {
|
|
|
151
151
|
header: "Status",
|
|
152
152
|
accessorKey: "status",
|
|
153
153
|
sortable: !0,
|
|
154
|
-
cell: (e) => /* @__PURE__ */
|
|
154
|
+
cell: (e) => /* @__PURE__ */ T(x, {
|
|
155
155
|
status: e.status,
|
|
156
|
-
customColors:
|
|
156
|
+
customColors: b[e.status]
|
|
157
157
|
})
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
id: "stops",
|
|
161
161
|
header: "Stops",
|
|
162
|
-
cell: (e) => /* @__PURE__ */
|
|
162
|
+
cell: (e) => /* @__PURE__ */ E(u, {
|
|
163
163
|
variant: "secondary",
|
|
164
164
|
children: [e.stops.length, " stops"]
|
|
165
165
|
})
|
|
@@ -169,7 +169,7 @@ function A() {
|
|
|
169
169
|
header: "Distance",
|
|
170
170
|
accessorKey: "distance",
|
|
171
171
|
sortable: !0,
|
|
172
|
-
cell: (e) =>
|
|
172
|
+
cell: (e) => s(e.distance)
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
175
|
id: "duration",
|
|
@@ -179,7 +179,7 @@ function A() {
|
|
|
179
179
|
{
|
|
180
180
|
id: "optimized",
|
|
181
181
|
header: "Optimized",
|
|
182
|
-
cell: (e) => /* @__PURE__ */
|
|
182
|
+
cell: (e) => /* @__PURE__ */ T(u, {
|
|
183
183
|
variant: e.optimized === void 0 ? "outline" : e.optimized ? "default" : "outline",
|
|
184
184
|
children: e.optimized === void 0 ? "Unknown" : e.optimized ? "Yes" : "No"
|
|
185
185
|
})
|
|
@@ -189,36 +189,36 @@ function A() {
|
|
|
189
189
|
header: "Created",
|
|
190
190
|
accessorKey: "createdAt",
|
|
191
191
|
sortable: !0,
|
|
192
|
-
cell: (e) =>
|
|
192
|
+
cell: (e) => o(e.createdAt, "short")
|
|
193
193
|
}
|
|
194
194
|
],
|
|
195
|
-
data:
|
|
196
|
-
isLoading:
|
|
197
|
-
error:
|
|
198
|
-
onRetry:
|
|
195
|
+
data: H,
|
|
196
|
+
isLoading: G,
|
|
197
|
+
error: K,
|
|
198
|
+
onRetry: q,
|
|
199
199
|
searchable: !0,
|
|
200
200
|
searchPlaceholder: "Search routes...",
|
|
201
201
|
searchFields: ["name"],
|
|
202
|
-
searchQuery:
|
|
202
|
+
searchQuery: L,
|
|
203
203
|
onSearchQueryChange: (e) => {
|
|
204
|
-
|
|
204
|
+
R(e), P(0);
|
|
205
205
|
},
|
|
206
|
-
onRowClick: (e) =>
|
|
206
|
+
onRowClick: (e) => X(`routes/${e.id}`),
|
|
207
207
|
getRowId: (e) => e.id,
|
|
208
|
-
pageIndex:
|
|
209
|
-
pageSize:
|
|
210
|
-
onPageChange:
|
|
208
|
+
pageIndex: N,
|
|
209
|
+
pageSize: F,
|
|
210
|
+
onPageChange: P,
|
|
211
211
|
onPageSizeChange: (e) => {
|
|
212
|
-
|
|
212
|
+
I(e), P(0);
|
|
213
213
|
},
|
|
214
|
-
totalItems:
|
|
215
|
-
hasNextPage:
|
|
214
|
+
totalItems: U,
|
|
215
|
+
hasNextPage: W,
|
|
216
216
|
emptyIllustration: "empty-data",
|
|
217
217
|
emptyTitle: "No routes yet",
|
|
218
218
|
emptyDescription: "Create a route to batch deliveries into an optimized driving plan.",
|
|
219
|
-
emptyAction: /* @__PURE__ */
|
|
220
|
-
onClick: () =>
|
|
221
|
-
children: [/* @__PURE__ */
|
|
219
|
+
emptyAction: /* @__PURE__ */ E(d, {
|
|
220
|
+
onClick: () => X("routes/new"),
|
|
221
|
+
children: [/* @__PURE__ */ T(n, {
|
|
222
222
|
size: 16,
|
|
223
223
|
className: "mr-1.5"
|
|
224
224
|
}), "Create Route"]
|
|
@@ -228,4 +228,4 @@ function A() {
|
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
230
|
//#endregion
|
|
231
|
-
export {
|
|
231
|
+
export { j as default };
|