@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.
Files changed (58) hide show
  1. package/dist/MoveTheWheelsRoot.js +136 -127
  2. package/dist/MoveTheWheelsRoutes.js +140 -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 +14 -3
  48. package/src/movethewheels/MoveTheWheelsRoutes.tsx +9 -0
  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
@@ -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 { useRouteStats as o, useRoutes as s } from "../hooks/useRoutes.js";
8
- import { Badge as c, Button as l, Card as u, CardContent as d, Select as f, SelectContent as p, SelectItem as m, SelectTrigger as h, SelectValue as g } from "../components/ui.js";
9
- import { PageLayout as _ } from "../components/PageLayout.js";
10
- import { ROUTE_STATUS_COLORS as v } from "../constants/index.js";
11
- import { StatusBadge as y } from "../components/StatusBadge.js";
12
- import { DataTable as b } from "../components/DataTable.js";
13
- import { formatDate as x } from "../utils/formatters.js";
14
- import { useDebouncedValue as S } from "../hooks/useDebouncedValue.js";
15
- import { useState as C } from "react";
16
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
17
- import { CTAOverflowMenu as E, EmphasisPanel as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
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 k = [
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 A() {
42
- let { basePath: A, navigate: j } = a(), [M, N] = C(0), [P, F] = C(25), [I, L] = C(""), [R, z] = C("all"), B = S(I), { routes: V, totalRoutes: H, hasMore: U, isLoading: W, error: G, refetch: K } = s({
43
- limit: P,
44
- offset: M * P,
45
- search: B || void 0,
46
- status: R === "all" ? void 0 : R
47
- }), q = R !== "all" || I.length > 0, { stats: J } = o(), Y = (e) => j?.(i(A, e));
48
- return /* @__PURE__ */ T(_, {
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: `${J.totalRoutes} routes`,
51
- icon: /* @__PURE__ */ w(t, { size: 24 }),
52
- headerActions: /* @__PURE__ */ w(E, {
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__ */ w(n, { size: 16 }),
56
- onSelect: () => Y("routes/new")
55
+ icon: /* @__PURE__ */ T(n, { size: 16 }),
56
+ onSelect: () => X("routes/new")
57
57
  },
58
58
  actions: [{
59
59
  label: "Refresh",
60
- icon: /* @__PURE__ */ w(r, { size: 16 }),
61
- onSelect: () => K()
60
+ icon: /* @__PURE__ */ T(r, { size: 16 }),
61
+ onSelect: () => q()
62
62
  }]
63
63
  }),
64
64
  children: [
65
- /* @__PURE__ */ w(O, {
66
- icon: /* @__PURE__ */ w(t, { size: 18 }),
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__ */ T(D, { children: [/* @__PURE__ */ w("p", {
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__ */ T("div", {
72
+ }), /* @__PURE__ */ E("div", {
73
73
  className: "mt-3 grid grid-cols-3 gap-4",
74
74
  children: [
75
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
75
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
76
76
  className: "text-2xl font-bold text-text-primary tabular-nums",
77
- children: J.totalRoutes
78
- }), /* @__PURE__ */ w("p", {
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__ */ T("div", { children: [/* @__PURE__ */ w("p", {
82
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
83
83
  className: "text-2xl font-bold text-text-primary tabular-nums",
84
- children: J.inProgressRoutes
85
- }), /* @__PURE__ */ w("p", {
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__ */ T("div", { children: [/* @__PURE__ */ w("p", {
89
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
90
90
  className: "text-2xl font-bold text-text-primary tabular-nums",
91
- children: J.optimizedRoutes
92
- }), /* @__PURE__ */ w("p", {
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__ */ w(u, { children: /* @__PURE__ */ w(d, {
98
+ /* @__PURE__ */ T(f, { children: /* @__PURE__ */ T(p, {
99
99
  className: "p-4",
100
- children: /* @__PURE__ */ T("div", {
100
+ children: /* @__PURE__ */ E("div", {
101
101
  className: "flex flex-wrap items-center gap-4",
102
102
  children: [
103
- /* @__PURE__ */ T("div", {
103
+ /* @__PURE__ */ E("div", {
104
104
  className: "flex items-center gap-2",
105
- children: [/* @__PURE__ */ w(e, {
105
+ children: [/* @__PURE__ */ T(e, {
106
106
  size: 16,
107
107
  className: "text-text-secondary"
108
- }), /* @__PURE__ */ w("span", {
108
+ }), /* @__PURE__ */ T("span", {
109
109
  className: "text-sm font-medium",
110
110
  children: "Filters:"
111
111
  })]
112
112
  }),
113
- /* @__PURE__ */ T(f, {
114
- value: R,
113
+ /* @__PURE__ */ E(m, {
114
+ value: z,
115
115
  onValueChange: (e) => {
116
- z(e), N(0);
116
+ B(e), P(0);
117
117
  },
118
- children: [/* @__PURE__ */ w(h, {
118
+ children: [/* @__PURE__ */ T(_, {
119
119
  className: "w-[180px]",
120
- children: /* @__PURE__ */ w(g, { placeholder: "Status" })
121
- }), /* @__PURE__ */ w(p, { children: k.map((e) => /* @__PURE__ */ w(m, {
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
- q && /* @__PURE__ */ w(l, {
126
+ J && /* @__PURE__ */ T(d, {
127
127
  variant: "ghost",
128
128
  size: "sm",
129
129
  onClick: () => {
130
- z("all"), L(""), N(0);
130
+ B("all"), R(""), P(0);
131
131
  },
132
132
  children: "Clear filters"
133
133
  })
134
134
  ]
135
135
  })
136
136
  }) }),
137
- /* @__PURE__ */ w(b, {
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__ */ w("span", {
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__ */ w(y, {
154
+ cell: (e) => /* @__PURE__ */ T(x, {
155
155
  status: e.status,
156
- customColors: v[e.status]
156
+ customColors: b[e.status]
157
157
  })
158
158
  },
159
159
  {
160
160
  id: "stops",
161
161
  header: "Stops",
162
- cell: (e) => /* @__PURE__ */ T(c, {
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) => `${e.distance.toFixed(1)} km`
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__ */ w(c, {
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) => x(e.createdAt, "short")
192
+ cell: (e) => o(e.createdAt, "short")
193
193
  }
194
194
  ],
195
- data: V,
196
- isLoading: W,
197
- error: G,
198
- onRetry: K,
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: I,
202
+ searchQuery: L,
203
203
  onSearchQueryChange: (e) => {
204
- L(e), N(0);
204
+ R(e), P(0);
205
205
  },
206
- onRowClick: (e) => Y(`routes/${e.id}`),
206
+ onRowClick: (e) => X(`routes/${e.id}`),
207
207
  getRowId: (e) => e.id,
208
- pageIndex: M,
209
- pageSize: P,
210
- onPageChange: N,
208
+ pageIndex: N,
209
+ pageSize: F,
210
+ onPageChange: P,
211
211
  onPageSizeChange: (e) => {
212
- F(e), N(0);
212
+ I(e), P(0);
213
213
  },
214
- totalItems: H,
215
- hasNextPage: U,
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__ */ T(l, {
220
- onClick: () => Y("routes/new"),
221
- children: [/* @__PURE__ */ w(n, {
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 { A as default };
231
+ export { j as default };