@burdenoff/microfe-movethewheels 2026.626.2 → 2026.703.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/{AIAssistantPage-AvsMbunM.js → AIAssistantPage-C3ovZ0Fh.js} +100 -73
  2. package/dist/AnalyticsPage-O8SpY-V4.js +215 -0
  3. package/dist/{CreateOrderPage-CjlnEtk3.js → CreateOrderPage-CB1_-_mN.js} +33 -35
  4. package/dist/{CustomerDetailsPage-I6cdDHUi.js → CustomerDetailsPage-BaeKEI1D.js} +42 -44
  5. package/dist/{CustomersPage-CGGfD4ki.js → CustomersPage-DRaLuHMC.js} +26 -28
  6. package/dist/{DashboardPage-D2HRqwg9.js → DashboardPage-DPjhNfKB.js} +85 -83
  7. package/dist/{DataTable-CD9ZhpLB.js → DataTable-DmciIKKM.js} +3 -3
  8. package/dist/{DriverDetailsPage-rg_pGNuP.js → DriverDetailsPage-CSSQTOzn.js} +52 -54
  9. package/dist/{DriversPage-DKiynISH.js → DriversPage-C2Bk0w4Q.js} +24 -26
  10. package/dist/{FinancePage-Vg8WPs38.js → FinancePage-lmp0Sdsw.js} +9 -9
  11. package/dist/FleetPage-DZn5pIqd.js +365 -0
  12. package/dist/ImportExportPage-BIUJZc7O.js +290 -0
  13. package/dist/InventoryPage-Cxh1zYJd.js +253 -0
  14. package/dist/{LiveTrackingPage-DQ1q4Id3.js → LiveTrackingPage-BY1yAkIt.js} +60 -56
  15. package/dist/MarketplacePage-RMuL17EA.js +247 -0
  16. package/dist/{MetricCard-B7yMyvMX.js → MetricCard-7aYgzZHK.js} +1 -1
  17. package/dist/{OrderDetailsPage-CFASgsYX.js → OrderDetailsPage-C2Mf4KSy.js} +83 -85
  18. package/dist/{OrdersListPage-BHeT8S5o.js → OrdersListPage-BrPBtnhp.js} +31 -33
  19. package/dist/{PageLayout-D3N8MCTm.js → PageLayout-D4LDHJJq.js} +483 -422
  20. package/dist/{ProductDetailsPage-CFGcbaHo.js → ProductDetailsPage-CezzzZcj.js} +27 -29
  21. package/dist/{ProductsPage--xEpbQ8A.js → ProductsPage-I5DilIoY.js} +21 -23
  22. package/dist/ReportsPage-BDXNmUng.js +284 -0
  23. package/dist/RouteDetailsPage-BcomL20M.js +263 -0
  24. package/dist/RoutesPage-lqX9ylHP.js +144 -0
  25. package/dist/SettingsPage-CQVIOaNs.js +421 -0
  26. package/dist/StatusBadge-NpTeHVlw.js +152 -0
  27. package/dist/{TrackingPage-CcRc_dva.js → TrackingPage-BXrjz7V8.js} +59 -61
  28. package/dist/{VehicleDetailsPage-3YDMPsPs.js → VehicleDetailsPage-DZjLcJgr.js} +40 -42
  29. package/dist/{VehiclesPage-UlxPWP9K.js → VehiclesPage-6W39XT5W.js} +19 -21
  30. package/dist/{WarehouseDetailsPage-Db7KeN-d.js → WarehouseDetailsPage-C10pgRGW.js} +38 -40
  31. package/dist/{WarehousesPage-CuTO-OPp.js → WarehousesPage-CHvBqNaQ.js} +15 -17
  32. package/dist/{arrow-left-CBpZKkpq.js → arrow-left-n48Y-Wis.js} +1 -1
  33. package/dist/{box-CAaiElsb.js → box-D9Pal4HM.js} +1 -1
  34. package/dist/{chart-column-D1Ym15-S.js → chart-column-BFIJysDR.js} +1 -1
  35. package/dist/{chevron-right-BIFGi0UA.js → chevron-right-EMIIyyJ1.js} +1 -1
  36. package/dist/{circle-alert-DjmNo5_L.js → circle-alert-iY24lSlp.js} +1 -1
  37. package/dist/{circle-check-big-CjuPVo3_.js → circle-check-big-w0TrLKMF.js} +1 -1
  38. package/dist/{clock-BjkdnddD.js → clock-DJZtdl8u.js} +1 -1
  39. package/dist/{dollar-sign-IB4O0wuQ.js → dollar-sign-CgKQRz_e.js} +1 -1
  40. package/dist/{download-Dpa9vqoG.js → download-DRXxoiQR.js} +1 -1
  41. package/dist/{file-text-C8Uioy11.js → file-text-DWWY6_f5.js} +1 -1
  42. package/dist/{filter-Da5OZaHI.js → filter-DloLC2eE.js} +1 -1
  43. package/dist/index.js +119 -111
  44. package/dist/{map-_Per4sT9.js → map-CkJaULb2.js} +1 -1
  45. package/dist/{map-pin-BSaf5IDL.js → map-pin-BGiCvyCs.js} +1 -1
  46. package/dist/{navigation-DaTbrhw2.js → navigation-D36prnAn.js} +1 -1
  47. package/dist/{package-BE7U0wQE.js → package-BChUzpJS.js} +1 -1
  48. package/dist/{phone-DV4StZiA.js → phone-Ac9s3mo_.js} +1 -1
  49. package/dist/{plus-Dl1rLeJR.js → plus-Z76q-FZm.js} +1 -1
  50. package/dist/{refresh-cw-CWfERAit.js → refresh-cw-DKt6f5T6.js} +1 -1
  51. package/dist/{save-XH8vydOn.js → save-CojywNhG.js} +1 -1
  52. package/dist/{search-OxoIiL_C.js → search-CDGefqb3.js} +1 -1
  53. package/dist/{square-pen-hLIbFQFV.js → square-pen-CopE9GmB.js} +1 -1
  54. package/dist/{star-YsVV3MNQ.js → star-nHlLjDKR.js} +1 -1
  55. package/dist/{store-RCBl7HB-.js → store-BR9Voi5E.js} +1 -1
  56. package/dist/{trending-up-C-85AwGT.js → trending-up-B7W-GL6P.js} +1 -1
  57. package/dist/{triangle-alert-BOhfGgmh.js → triangle-alert-BonHFFNz.js} +1 -1
  58. package/dist/{truck-CtDjNFbi.js → truck-DrlfSpRC.js} +1 -1
  59. package/dist/{useAnalytics-ph7eTIK6.js → useAnalytics-CgdzUfY_.js} +40 -40
  60. package/dist/useAssistant-D4v3oxD3.js +84 -0
  61. package/dist/{useCustomers-bS3a4ytk.js → useCustomers-QrlozybF.js} +24 -24
  62. package/dist/{useFleet-BdETplNE.js → useFleet-DiAC-IiH.js} +70 -67
  63. package/dist/useImportExport-BLMnAKCC.js +55 -0
  64. package/dist/{useInventory-Dwn18FPz.js → useInventory-DKoks37x.js} +33 -33
  65. package/dist/{useOrders-D_3_hGMp.js → useOrders-D3UZVy8Y.js} +42 -42
  66. package/dist/useReports-Puq4DCH9.js +78 -0
  67. package/dist/{useRoutes-v4aBaS-E.js → useRoutes-Do57LvRb.js} +31 -31
  68. package/dist/useSettings-CkDH_-gM.js +81 -0
  69. package/dist/{useTracking-De2KIUNu.js → useTracking-GJify4HN.js} +22 -22
  70. package/dist/{user-Dz5TJZFs.js → user-CjSoudeu.js} +1 -1
  71. package/dist/{users-g2N0eL-Z.js → users-BAM4gHTn.js} +1 -1
  72. package/dist/{warehouse-D3WWDeTX.js → warehouse-C7MSr47B.js} +1 -1
  73. package/dist/{wrench-CmxY1n4I.js → wrench-CANXWxF-.js} +1 -1
  74. package/package.json +1 -1
  75. package/src/movethewheels/MoveTheWheelsRoutes.tsx +27 -3
  76. package/src/movethewheels/components/StatusBadge.tsx +18 -37
  77. package/src/movethewheels/constants/index.ts +67 -26
  78. package/src/movethewheels/hooks/index.ts +12 -0
  79. package/src/movethewheels/hooks/useAnalytics.ts +20 -6
  80. package/src/movethewheels/hooks/useAssistant.ts +74 -0
  81. package/src/movethewheels/hooks/useFleet.ts +63 -59
  82. package/src/movethewheels/hooks/useImportExport.ts +101 -0
  83. package/src/movethewheels/hooks/useReports.ts +158 -0
  84. package/src/movethewheels/hooks/useSettings.ts +120 -0
  85. package/src/movethewheels/pages/AIAssistantPage.tsx +53 -15
  86. package/src/movethewheels/pages/AnalyticsPage.tsx +67 -64
  87. package/src/movethewheels/pages/CustomerDetailsPage.tsx +1 -1
  88. package/src/movethewheels/pages/CustomersPage.tsx +1 -1
  89. package/src/movethewheels/pages/DashboardPage.tsx +42 -22
  90. package/src/movethewheels/pages/DriverDetailsPage.tsx +1 -1
  91. package/src/movethewheels/pages/DriversPage.tsx +1 -1
  92. package/src/movethewheels/pages/FleetPage.tsx +96 -38
  93. package/src/movethewheels/pages/ImportExportPage.tsx +174 -68
  94. package/src/movethewheels/pages/InventoryPage.tsx +66 -28
  95. package/src/movethewheels/pages/LiveTrackingPage.tsx +12 -3
  96. package/src/movethewheels/pages/MarketplacePage.tsx +87 -45
  97. package/src/movethewheels/pages/OrderDetailsPage.tsx +2 -2
  98. package/src/movethewheels/pages/ReportsPage.tsx +194 -90
  99. package/src/movethewheels/pages/RouteDetailsPage.tsx +5 -11
  100. package/src/movethewheels/pages/RoutesPage.tsx +4 -9
  101. package/src/movethewheels/pages/SettingsPage.tsx +234 -56
  102. package/src/movethewheels/pages/TrackingPage.tsx +6 -6
  103. package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +7 -6
  104. package/src/movethewheels/store/movethewheelsStore.ts +1 -1
  105. package/dist/AnalyticsPage-CCLfHgQZ.js +0 -212
  106. package/dist/FleetPage-DddXt8r8.js +0 -332
  107. package/dist/ImportExportPage-BW6qO3kc.js +0 -248
  108. package/dist/InventoryPage-rMGuaJN-.js +0 -222
  109. package/dist/MarketplacePage-DKrXAv62.js +0 -219
  110. package/dist/ReportsPage-Bb7_90rK.js +0 -235
  111. package/dist/RouteDetailsPage-CVtDVb1N.js +0 -282
  112. package/dist/RoutesPage-s57PtgcQ.js +0 -163
  113. package/dist/SettingsPage-BYNCBOpN.js +0 -298
  114. package/dist/StatusBadge-CijYQXtb.js +0 -209
  115. package/dist/graphqlClient-CdJyR_ed.js +0 -55
  116. package/dist/navigation-BgnOfsVd.js +0 -6
  117. package/dist/route-Dp9JiN_E.js +0 -51
  118. package/dist/settings-3Rw5NwFF.js +0 -28
  119. package/src/movethewheels/constants/mockData.ts +0 -1342
  120. /package/dist/{formatters-_vJlC-47.js → formatters-DhKZ-eA1.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { r as e, t } from "./graphqlClient-CdJyR_ed.js";
1
+ import { it as e, ot as t } from "./PageLayout-D4LDHJJq.js";
2
2
  import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
3
3
  //#region src/movethewheels/hooks/useOrders.ts
4
4
  var o = "\n query ListMovethewheelsOrders($filter: OrderFilterInput, $pagination: PaginationInput) {\n movethewheelsOrders(filter: $filter, pagination: $pagination) {\n id\n orderNumber\n customerId\n orderType\n status\n priority\n pickupAddress\n deliveryAddress\n items\n pricing\n trackingNumber\n specialInstructions\n scheduledDelivery\n vehicleId\n driverId\n createdAt\n updatedAt\n customer {\n name\n email\n phone\n company\n }\n statusHistory {\n status\n notes\n location\n createdAt\n createdBy\n }\n }\n }\n", s = "\n query GetMovethewheelsOrder($id: ID!) {\n movethewheelsOrder(id: $id) {\n id\n orderNumber\n customerId\n orderType\n status\n priority\n pickupAddress\n deliveryAddress\n items\n pricing\n trackingNumber\n specialInstructions\n scheduledDelivery\n vehicleId\n driverId\n createdAt\n updatedAt\n customer {\n name\n email\n phone\n company\n }\n statusHistory {\n status\n notes\n location\n createdAt\n createdBy\n }\n }\n }\n", c = "\n query GetOrderStatsBundle {\n orderStats {\n total\n pending\n inTransit\n delivered\n cancelled\n failed\n }\n financeMetrics {\n revenue {\n totalRevenue\n averageOrderValue\n }\n }\n }\n", l = "\n mutation CreateMovethewheelsOrder($input: CreateOrderInput!) {\n createMovethewheelsOrder(input: $input) {\n id\n orderNumber\n customerId\n orderType\n status\n priority\n pickupAddress\n deliveryAddress\n items\n pricing\n trackingNumber\n specialInstructions\n scheduledDelivery\n vehicleId\n driverId\n createdAt\n updatedAt\n customer {\n name\n email\n phone\n company\n }\n statusHistory {\n status\n notes\n location\n createdAt\n createdBy\n }\n }\n }\n", u = "\n mutation UpdateMovethewheelsOrder($id: ID!, $input: UpdateOrderInput!) {\n updateMovethewheelsOrder(id: $id, input: $input) {\n id\n orderNumber\n customerId\n orderType\n status\n priority\n pickupAddress\n deliveryAddress\n items\n pricing\n trackingNumber\n specialInstructions\n scheduledDelivery\n vehicleId\n driverId\n createdAt\n updatedAt\n customer {\n name\n email\n phone\n company\n }\n statusHistory {\n status\n notes\n location\n createdAt\n createdBy\n }\n }\n }\n", d = "\n mutation UpdateMovethewheelsOrderStatus($id: ID!, $input: UpdateOrderStatusInput!) {\n updateMovethewheelsOrderStatus(id: $id, input: $input) {\n id\n orderNumber\n customerId\n orderType\n status\n priority\n pickupAddress\n deliveryAddress\n items\n pricing\n trackingNumber\n specialInstructions\n scheduledDelivery\n vehicleId\n driverId\n createdAt\n updatedAt\n customer {\n name\n email\n phone\n company\n }\n statusHistory {\n status\n notes\n location\n createdAt\n createdBy\n }\n }\n }\n", f = "\n mutation DeleteMovethewheelsOrder($id: ID!) {\n deleteMovethewheelsOrder(id: $id)\n }\n";
@@ -108,7 +108,7 @@ function b(e) {
108
108
  };
109
109
  }
110
110
  function x(s = {}) {
111
- let { filters: c, limit: p = 20, offset: m = 0 } = s, { apiGatewayUrl: h, authToken: y, workspaceToken: x, workspaceId: S, tenantId: C, currentUser: w } = e(), [T, E] = a([]), [D, O] = a(!1), [k, A] = a(null), j = i(() => ({
111
+ let { filters: c, limit: p = 20, offset: m = 0 } = s, { apiGatewayUrl: h, authToken: y, workspaceToken: x, workspaceId: S, tenantId: C, currentUser: w } = t(), [T, E] = a([]), [D, O] = a(!1), [k, A] = a(null), j = i(() => ({
112
112
  apiGatewayUrl: h,
113
113
  authToken: y,
114
114
  workspaceToken: x,
@@ -125,7 +125,7 @@ function x(s = {}) {
125
125
  ]), M = n(async () => {
126
126
  O(!0), A(null);
127
127
  try {
128
- E((await t(j, o, {
128
+ E((await e(j, o, {
129
129
  filter: {
130
130
  status: c?.status ? g(c.status) : void 0,
131
131
  priority: c?.priority ? v(c.priority) : void 0,
@@ -154,27 +154,27 @@ function x(s = {}) {
154
154
  }, [M]);
155
155
  let N = n(() => {
156
156
  M();
157
- }, [M]), P = n(async (e) => {
158
- let n = b((await t(j, l, { input: {
159
- orderNumber: e.orderNumber ?? `ORD-${(/* @__PURE__ */ new Date()).getFullYear()}-${Date.now().toString().slice(-6)}`,
160
- orderType: _(e.orderType),
161
- status: g(e.status ?? "pending"),
162
- priority: v(e.priority),
163
- customerId: e.customerId,
164
- pickupAddress: e.pickupAddress ?? {},
165
- deliveryAddress: e.deliveryAddress ?? {},
166
- items: e.items ?? [],
167
- pricing: e.pricing ?? null,
168
- specialInstructions: e.specialInstructions,
169
- trackingNumber: e.trackingNumber,
170
- scheduledDelivery: e.scheduledDelivery?.toISOString(),
171
- vehicleId: e.vehicleId,
172
- driverId: e.driverId
157
+ }, [M]), P = n(async (t) => {
158
+ let n = b((await e(j, l, { input: {
159
+ orderNumber: t.orderNumber ?? `ORD-${(/* @__PURE__ */ new Date()).getFullYear()}-${Date.now().toString().slice(-6)}`,
160
+ orderType: _(t.orderType),
161
+ status: g(t.status ?? "pending"),
162
+ priority: v(t.priority),
163
+ customerId: t.customerId,
164
+ pickupAddress: t.pickupAddress ?? {},
165
+ deliveryAddress: t.deliveryAddress ?? {},
166
+ items: t.items ?? [],
167
+ pricing: t.pricing ?? null,
168
+ specialInstructions: t.specialInstructions,
169
+ trackingNumber: t.trackingNumber,
170
+ scheduledDelivery: t.scheduledDelivery?.toISOString(),
171
+ vehicleId: t.vehicleId,
172
+ driverId: t.driverId
173
173
  } })).createMovethewheelsOrder);
174
174
  return E((e) => [n, ...e]), n;
175
- }, [j]), F = n(async (e, n) => {
176
- let r = b((await t(j, u, {
177
- id: e,
175
+ }, [j]), F = n(async (t, n) => {
176
+ let r = b((await e(j, u, {
177
+ id: t,
178
178
  input: {
179
179
  orderType: n.orderType ? _(n.orderType) : void 0,
180
180
  status: n.status ? g(n.status) : void 0,
@@ -191,15 +191,15 @@ function x(s = {}) {
191
191
  driverId: n.driverId
192
192
  }
193
193
  })).updateMovethewheelsOrder);
194
- return E((t) => t.map((t) => t.id === e ? r : t)), r;
195
- }, [j]), I = n(async (e) => {
196
- await t(j, f, { id: e }), E((t) => t.filter((t) => t.id !== e));
197
- }, [j]), L = n(async (e, n) => {
198
- let r = b((await t(j, d, {
199
- id: e,
194
+ return E((e) => e.map((e) => e.id === t ? r : e)), r;
195
+ }, [j]), I = n(async (t) => {
196
+ await e(j, f, { id: t }), E((e) => e.filter((e) => e.id !== t));
197
+ }, [j]), L = n(async (t, n) => {
198
+ let r = b((await e(j, d, {
199
+ id: t,
200
200
  input: { status: g(n) }
201
201
  })).updateMovethewheelsOrderStatus);
202
- return E((t) => t.map((t) => t.id === e ? r : t)), r;
202
+ return E((e) => e.map((e) => e.id === t ? r : e)), r;
203
203
  }, [j]);
204
204
  return {
205
205
  orders: T,
@@ -214,7 +214,7 @@ function x(s = {}) {
214
214
  };
215
215
  }
216
216
  function S(o) {
217
- let { apiGatewayUrl: c, authToken: l, workspaceToken: u, workspaceId: d, tenantId: f, currentUser: p } = e(), [m, h] = a(null), [g, _] = a(!1), [v, y] = a(null), x = i(() => ({
217
+ let { apiGatewayUrl: c, authToken: l, workspaceToken: u, workspaceId: d, tenantId: f, currentUser: p } = t(), [m, h] = a(null), [g, _] = a(!1), [v, y] = a(null), x = i(() => ({
218
218
  apiGatewayUrl: c,
219
219
  authToken: l,
220
220
  workspaceToken: u,
@@ -235,8 +235,8 @@ function S(o) {
235
235
  }
236
236
  _(!0), y(null);
237
237
  try {
238
- let e = await t(x, s, { id: o });
239
- h(e.movethewheelsOrder ? b(e.movethewheelsOrder) : null);
238
+ let t = await e(x, s, { id: o });
239
+ h(t.movethewheelsOrder ? b(t.movethewheelsOrder) : null);
240
240
  } catch (e) {
241
241
  y(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load order"));
242
242
  } finally {
@@ -255,7 +255,7 @@ function S(o) {
255
255
  };
256
256
  }
257
257
  function C() {
258
- let { apiGatewayUrl: o, authToken: s, workspaceToken: l, workspaceId: u, tenantId: d, currentUser: f } = e(), [p, m] = a(!1), [h, g] = a(null), [_, v] = a({
258
+ let { apiGatewayUrl: o, authToken: s, workspaceToken: l, workspaceId: u, tenantId: d, currentUser: f } = t(), [p, m] = a(!1), [h, g] = a(null), [_, v] = a({
259
259
  total: 0,
260
260
  byStatus: {
261
261
  pending: 0,
@@ -288,23 +288,23 @@ function C() {
288
288
  ]), b = n(async () => {
289
289
  m(!0), g(null);
290
290
  try {
291
- let e = await t(y, c);
291
+ let t = await e(y, c);
292
292
  v({
293
- total: e.orderStats.total,
293
+ total: t.orderStats.total,
294
294
  byStatus: {
295
- pending: e.orderStats.pending,
295
+ pending: t.orderStats.pending,
296
296
  confirmed: 0,
297
297
  assigned: 0,
298
298
  picked_up: 0,
299
- in_transit: e.orderStats.inTransit,
299
+ in_transit: t.orderStats.inTransit,
300
300
  out_for_delivery: 0,
301
- delivered: e.orderStats.delivered,
302
- cancelled: e.orderStats.cancelled,
303
- failed: e.orderStats.failed
301
+ delivered: t.orderStats.delivered,
302
+ cancelled: t.orderStats.cancelled,
303
+ failed: t.orderStats.failed
304
304
  },
305
- totalRevenue: e.financeMetrics.revenue.totalRevenue,
305
+ totalRevenue: t.financeMetrics.revenue.totalRevenue,
306
306
  todayOrders: 0,
307
- avgOrderValue: e.financeMetrics.revenue.averageOrderValue
307
+ avgOrderValue: t.financeMetrics.revenue.averageOrderValue
308
308
  });
309
309
  } catch (e) {
310
310
  g(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load order stats"));
@@ -0,0 +1,78 @@
1
+ import { it as e, ot as t } from "./PageLayout-D4LDHJJq.js";
2
+ import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
3
+ //#region src/movethewheels/hooks/useReports.ts
4
+ var o = "\n id\n name\n description\n type\n status\n schedule\n lastGenerated\n createdAt\n updatedAt\n", s = `
5
+ query MovethewheelsReports($filter: MovethewheelsReportFilterInput, $pagination: PaginationInput) {
6
+ movethewheelsReports(filter: $filter, pagination: $pagination) {
7
+ ${o}
8
+ }
9
+ }
10
+ `, c = `
11
+ mutation CreateMovethewheelsReport($input: CreateMovethewheelsReportInput!) {
12
+ createMovethewheelsReport(input: $input) {
13
+ ${o}
14
+ }
15
+ }
16
+ `, l = `
17
+ mutation GenerateMovethewheelsReport($input: GenerateMovethewheelsReportInput!) {
18
+ generateMovethewheelsReport(input: $input) {
19
+ generatedAt
20
+ result
21
+ report {
22
+ ${o}
23
+ }
24
+ }
25
+ }
26
+ `;
27
+ function u() {
28
+ let { apiGatewayUrl: o, authToken: u, workspaceToken: d, workspaceId: f, tenantId: p, currentUser: m } = t(), [h, g] = a([]), [_, v] = a(!1), [y, b] = a(null), x = i(() => ({
29
+ apiGatewayUrl: o,
30
+ authToken: u,
31
+ workspaceToken: d,
32
+ workspaceId: f,
33
+ tenantId: p,
34
+ actorId: m?.id
35
+ }), [
36
+ o,
37
+ u,
38
+ d,
39
+ f,
40
+ p,
41
+ m?.id
42
+ ]), S = n(async () => {
43
+ v(!0), b(null);
44
+ try {
45
+ g((await e(x, s, { pagination: {
46
+ limit: 100,
47
+ offset: 0
48
+ } })).movethewheelsReports);
49
+ } catch (e) {
50
+ b(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load reports"));
51
+ } finally {
52
+ v(!1);
53
+ }
54
+ }, [x]);
55
+ return r(() => {
56
+ S();
57
+ }, [S]), {
58
+ reports: h,
59
+ isLoading: _,
60
+ error: y,
61
+ refetch: n(() => {
62
+ S();
63
+ }, [S]),
64
+ createReport: n(async (t) => {
65
+ let n = (await e(x, c, { input: t })).createMovethewheelsReport;
66
+ return g((e) => [n, ...e]), n;
67
+ }, [x]),
68
+ generateReport: n(async (t, n) => {
69
+ let r = (await e(x, l, { input: {
70
+ reportId: t,
71
+ parameters: n
72
+ } })).generateMovethewheelsReport;
73
+ return g((e) => e.map((e) => e.id === t ? r.report : e)), r;
74
+ }, [x])
75
+ };
76
+ }
77
+ //#endregion
78
+ export { u as t };
@@ -1,4 +1,4 @@
1
- import { r as e, t } from "./graphqlClient-CdJyR_ed.js";
1
+ import { it as e, ot as t } from "./PageLayout-D4LDHJJq.js";
2
2
  import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
3
3
  //#region src/movethewheels/hooks/useRoutes.ts
4
4
  var o = "\n query ListRoutes($filter: RouteFilterInput, $pagination: PaginationInput) {\n routes(filter: $filter, pagination: $pagination) {\n id\n name\n status\n shipmentId\n vehicleId\n driverId\n waypoints\n estimatedDistance\n estimatedDuration\n actualDistance\n actualDuration\n createdAt\n }\n }\n", s = "\n query GetRoute($id: ID!) {\n route(id: $id) {\n id\n name\n status\n shipmentId\n vehicleId\n driverId\n waypoints\n estimatedDistance\n estimatedDuration\n actualDistance\n actualDuration\n createdAt\n }\n }\n", c = "\n mutation CreateRoute($input: CreateRouteInput!) {\n createRoute(input: $input) {\n id\n name\n status\n shipmentId\n vehicleId\n driverId\n waypoints\n estimatedDistance\n estimatedDuration\n actualDistance\n actualDuration\n createdAt\n }\n }\n", l = "\n mutation UpdateRoute($id: ID!, $input: UpdateRouteInput!) {\n updateRoute(id: $id, input: $input) {\n id\n name\n status\n shipmentId\n vehicleId\n driverId\n waypoints\n estimatedDistance\n estimatedDuration\n actualDistance\n actualDuration\n createdAt\n }\n }\n", u = "\n mutation DeleteRoute($id: ID!) {\n deleteRoute(id: $id)\n }\n", d = "\n mutation OptimizeRoute($id: ID!) {\n optimizeRoute(id: $id) {\n id\n name\n status\n shipmentId\n vehicleId\n driverId\n waypoints\n estimatedDistance\n estimatedDuration\n actualDistance\n actualDuration\n createdAt\n }\n }\n";
@@ -62,16 +62,16 @@ function h(e) {
62
62
  };
63
63
  }
64
64
  function g() {
65
- let { apiGatewayUrl: t, authToken: n, workspaceToken: r, workspaceId: a, tenantId: o, currentUser: s } = e();
65
+ let { apiGatewayUrl: e, authToken: n, workspaceToken: r, workspaceId: a, tenantId: o, currentUser: s } = t();
66
66
  return i(() => ({
67
- apiGatewayUrl: t,
67
+ apiGatewayUrl: e,
68
68
  authToken: n,
69
69
  workspaceToken: r,
70
70
  workspaceId: a,
71
71
  tenantId: o,
72
72
  actorId: s?.id
73
73
  }), [
74
- t,
74
+ e,
75
75
  n,
76
76
  r,
77
77
  a,
@@ -79,11 +79,11 @@ function g() {
79
79
  s?.id
80
80
  ]);
81
81
  }
82
- function _(e = {}) {
83
- let { driverId: i, vehicleId: s, status: f } = e, m = g(), [_, v] = a([]), [y, b] = a(!1), [x, S] = a(null), C = n(async () => {
82
+ function _(t = {}) {
83
+ let { driverId: i, vehicleId: s, status: f } = t, m = g(), [_, v] = a([]), [y, b] = a(!1), [x, S] = a(null), C = n(async () => {
84
84
  b(!0), S(null);
85
85
  try {
86
- v((await t(m, o, {
86
+ v((await e(m, o, {
87
87
  filter: {
88
88
  driverId: i,
89
89
  vehicleId: s,
@@ -110,23 +110,23 @@ function _(e = {}) {
110
110
  }, [C]);
111
111
  let w = n(() => {
112
112
  C();
113
- }, [C]), T = n(async (e) => {
114
- let n = h((await t(m, c, { input: {
115
- name: e.name ?? `Route ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`,
116
- status: p(e.status),
113
+ }, [C]), T = n(async (t) => {
114
+ let n = h((await e(m, c, { input: {
115
+ name: t.name ?? `Route ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`,
116
+ status: p(t.status),
117
117
  shipmentId: void 0,
118
- vehicleId: e.vehicleId,
119
- driverId: e.driverId,
120
- waypoints: e.stops ?? [],
121
- estimatedDistance: e.distance ?? 0,
122
- estimatedDuration: e.estimatedDuration ?? 0,
123
- actualDistance: e.distance,
124
- actualDuration: e.actualDuration
118
+ vehicleId: t.vehicleId,
119
+ driverId: t.driverId,
120
+ waypoints: t.stops ?? [],
121
+ estimatedDistance: t.distance ?? 0,
122
+ estimatedDuration: t.estimatedDuration ?? 0,
123
+ actualDistance: t.distance,
124
+ actualDuration: t.actualDuration
125
125
  } })).createRoute);
126
126
  return v((e) => [n, ...e]), n;
127
- }, [m]), E = n(async (e, n) => {
128
- let r = h((await t(m, l, {
129
- id: e,
127
+ }, [m]), E = n(async (t, n) => {
128
+ let r = h((await e(m, l, {
129
+ id: t,
130
130
  input: {
131
131
  name: n.name,
132
132
  status: p(n.status),
@@ -140,15 +140,15 @@ function _(e = {}) {
140
140
  actualDuration: n.actualDuration
141
141
  }
142
142
  })).updateRoute);
143
- return v((t) => t.map((t) => t.id === e ? r : t)), r;
144
- }, [m]), D = n(async (e) => {
145
- await t(m, u, { id: e }), v((t) => t.filter((t) => t.id !== e));
146
- }, [m]), O = n(async (e) => {
143
+ return v((e) => e.map((e) => e.id === t ? r : e)), r;
144
+ }, [m]), D = n(async (t) => {
145
+ await e(m, u, { id: t }), v((e) => e.filter((e) => e.id !== t));
146
+ }, [m]), O = n(async (t) => {
147
147
  let n = {
148
- ...h((await t(m, d, { id: e })).optimizeRoute),
148
+ ...h((await e(m, d, { id: t })).optimizeRoute),
149
149
  optimized: !0
150
150
  };
151
- return v((t) => t.map((t) => t.id === e ? n : t)), n;
151
+ return v((e) => e.map((e) => e.id === t ? n : e)), n;
152
152
  }, [m]), k = n(async (e, t, n) => {
153
153
  let r = _.find((t) => t.id === e);
154
154
  if (!r) throw Error("Route not found");
@@ -175,22 +175,22 @@ function _(e = {}) {
175
175
  updateStopStatus: k
176
176
  };
177
177
  }
178
- function v(e) {
178
+ function v(t) {
179
179
  let i = g(), [o, c] = a(null), [l, u] = a(!1), [d, f] = a(null), p = n(async () => {
180
- if (!e) {
180
+ if (!t) {
181
181
  c(null);
182
182
  return;
183
183
  }
184
184
  u(!0), f(null);
185
185
  try {
186
- let n = await t(i, s, { id: e });
186
+ let n = await e(i, s, { id: t });
187
187
  c(n.route ? h(n.route) : null);
188
188
  } catch (e) {
189
189
  f(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load route"));
190
190
  } finally {
191
191
  u(!1);
192
192
  }
193
- }, [i, e]);
193
+ }, [i, t]);
194
194
  return r(() => {
195
195
  p();
196
196
  }, [p]), {
@@ -0,0 +1,81 @@
1
+ import { it as e, lt as t, ot as n } from "./PageLayout-D4LDHJJq.js";
2
+ import { useCallback as r, useEffect as i, useMemo as a, useState as o } from "react";
3
+ //#region node_modules/lucide-react/dist/esm/icons/globe.js
4
+ var s = t("Globe", [
5
+ ["circle", {
6
+ cx: "12",
7
+ cy: "12",
8
+ r: "10",
9
+ key: "1mglay"
10
+ }],
11
+ ["path", {
12
+ d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",
13
+ key: "13o1zl"
14
+ }],
15
+ ["path", {
16
+ d: "M2 12h20",
17
+ key: "9i4pu4"
18
+ }]
19
+ ]), c = t("Settings", [["path", {
20
+ d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",
21
+ key: "1qme2f"
22
+ }], ["circle", {
23
+ cx: "12",
24
+ cy: "12",
25
+ r: "3",
26
+ key: "1v7zrd"
27
+ }]]), l = "\n query MovethewheelsModuleSettings {\n moduleSettings {\n preferences\n updatedAt\n workspaceId\n }\n }\n", u = "\n mutation UpdateMovethewheelsModuleSettings($input: UpdateMovethewheelsModuleSettingsInput!) {\n updateModuleSettings(input: $input) {\n preferences\n updatedAt\n workspaceId\n }\n }\n";
28
+ function d() {
29
+ let { apiGatewayUrl: t, authToken: s, workspaceToken: c, workspaceId: d, tenantId: f, currentUser: p } = n(), [m, h] = o(null), [g, _] = o(!1), [v, y] = o(!1), [b, x] = o(null), S = a(() => ({
30
+ apiGatewayUrl: t,
31
+ authToken: s,
32
+ workspaceToken: c,
33
+ workspaceId: d,
34
+ tenantId: f,
35
+ actorId: p?.id
36
+ }), [
37
+ t,
38
+ s,
39
+ c,
40
+ d,
41
+ f,
42
+ p?.id
43
+ ]), C = r(async () => {
44
+ _(!0), x(null);
45
+ try {
46
+ h((await e(S, l)).moduleSettings);
47
+ } catch (e) {
48
+ x(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load settings"));
49
+ } finally {
50
+ _(!1);
51
+ }
52
+ }, [S]);
53
+ i(() => {
54
+ C();
55
+ }, [C]);
56
+ let w = r(() => {
57
+ C();
58
+ }, [C]), T = r(async (t) => {
59
+ y(!0), x(null);
60
+ try {
61
+ let n = await e(S, u, { input: { preferences: t } });
62
+ return h(n.updateModuleSettings), n.updateModuleSettings;
63
+ } catch (e) {
64
+ let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to save settings");
65
+ throw x(t), t;
66
+ } finally {
67
+ y(!1);
68
+ }
69
+ }, [S]);
70
+ return {
71
+ settings: m,
72
+ preferences: m?.preferences ?? {},
73
+ isLoading: g,
74
+ isSaving: v,
75
+ error: b,
76
+ refetch: w,
77
+ savePreferences: T
78
+ };
79
+ }
80
+ //#endregion
81
+ export { c as n, s as r, d as t };
@@ -1,6 +1,6 @@
1
- import { r as e, t } from "./graphqlClient-CdJyR_ed.js";
2
- import { r as n, t as r } from "./useOrders-D_3_hGMp.js";
3
- import { a as i, n as a, o, t as s } from "./useFleet-BdETplNE.js";
1
+ import { it as e, ot as t } from "./PageLayout-D4LDHJJq.js";
2
+ import { r as n, t as r } from "./useOrders-D3UZVy8Y.js";
3
+ import { a as i, n as a, o, t as s } from "./useFleet-DiAC-IiH.js";
4
4
  import { useCallback as c, useEffect as l, useMemo as u, useState as d } from "react";
5
5
  //#region src/movethewheels/hooks/useTracking.ts
6
6
  var f = "\n query ListShipments($filter: ShipmentFilterInput, $pagination: PaginationInput) {\n shipments(filter: $filter, pagination: $pagination) {\n id\n shipmentNumber\n orderId\n status\n estimatedDelivery\n }\n }\n", p = "\n query GetShipment($id: ID!) {\n shipment(id: $id) {\n id\n shipmentNumber\n orderId\n status\n estimatedDelivery\n trackingEvents {\n id\n shipmentId\n eventType\n location\n details\n timestamp\n }\n }\n }\n", m = "\n query GetOrderTracking($orderId: ID!) {\n orderTracking(orderId: $orderId) {\n id\n shipmentId\n eventType\n location\n details\n timestamp\n }\n }\n", h = "\n query GetActiveDeliveries {\n activeDeliveries {\n id\n shipmentNumber\n orderId\n status\n estimatedDelivery\n }\n }\n", g = "\n query GetTrackingAlerts {\n trackingAlerts {\n shipmentId\n shipmentNumber\n alertType\n message\n }\n }\n";
@@ -25,16 +25,16 @@ function _(e, t) {
25
25
  };
26
26
  }
27
27
  function v() {
28
- let { apiGatewayUrl: t, authToken: n, workspaceToken: r, workspaceId: i, tenantId: a, currentUser: o } = e();
28
+ let { apiGatewayUrl: e, authToken: n, workspaceToken: r, workspaceId: i, tenantId: a, currentUser: o } = t();
29
29
  return u(() => ({
30
- apiGatewayUrl: t,
30
+ apiGatewayUrl: e,
31
31
  authToken: n,
32
32
  workspaceToken: r,
33
33
  workspaceId: i,
34
34
  tenantId: a,
35
35
  actorId: o?.id
36
36
  }), [
37
- t,
37
+ e,
38
38
  n,
39
39
  r,
40
40
  i,
@@ -42,11 +42,11 @@ function v() {
42
42
  o?.id
43
43
  ]);
44
44
  }
45
- function y(e = {}) {
46
- let { entityId: n, entityType: r } = e, i = v(), [a, o] = d([]), [s, u] = d(!1), [p, m] = d(null), h = c(async () => {
45
+ function y(t = {}) {
46
+ let { entityId: n, entityType: r } = t, i = v(), [a, o] = d([]), [s, u] = d(!1), [p, m] = d(null), h = c(async () => {
47
47
  u(!0), m(null);
48
48
  try {
49
- o((await t(i, f, { pagination: {
49
+ o((await e(i, f, { pagination: {
50
50
  limit: 200,
51
51
  offset: 0
52
52
  } })).shipments.map((e) => ({
@@ -84,22 +84,22 @@ function y(e = {}) {
84
84
  refetch: () => void h()
85
85
  };
86
86
  }
87
- function b(e) {
88
- let n = v(), { order: i } = r(e), [a, o] = d(null), [s, u] = d(!1), [f, p] = d(null), h = c(async () => {
89
- if (!e) {
87
+ function b(t) {
88
+ let n = v(), { order: i } = r(t), [a, o] = d(null), [s, u] = d(!1), [f, p] = d(null), h = c(async () => {
89
+ if (!t) {
90
90
  o(null);
91
91
  return;
92
92
  }
93
93
  u(!0), p(null);
94
94
  try {
95
- let r = await t(n, m, { orderId: e }), i = r.orderTracking[r.orderTracking.length - 1];
96
- o(i ? _(i, e) : null);
95
+ let r = await e(n, m, { orderId: t }), i = r.orderTracking[r.orderTracking.length - 1];
96
+ o(i ? _(i, t) : null);
97
97
  } catch (e) {
98
98
  p(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load order tracking"));
99
99
  } finally {
100
100
  u(!1);
101
101
  }
102
- }, [n, e]);
102
+ }, [n, t]);
103
103
  return l(() => {
104
104
  h();
105
105
  }, [h]), {
@@ -149,12 +149,12 @@ function S(e) {
149
149
  };
150
150
  }
151
151
  function C() {
152
- let e = v(), { orders: r } = n(), { vehicles: i } = o(), { drivers: s } = a(), [u, f] = d([]), [m, g] = d(!1), [y, b] = d(null), x = c(async () => {
152
+ let t = v(), { orders: r } = n(), { vehicles: i } = o(), { drivers: s } = a(), [u, f] = d([]), [m, g] = d(!1), [y, b] = d(null), x = c(async () => {
153
153
  g(!0), b(null);
154
154
  try {
155
- let n = await t(e, h);
155
+ let n = await e(t, h);
156
156
  f((await Promise.all(n.activeDeliveries.map(async (n) => {
157
- let a = (await t(e, p, { id: n.id })).shipment?.trackingEvents ?? [], o = a[a.length - 1], c = r.find((e) => e.id === n.orderId);
157
+ let a = (await e(t, p, { id: n.id })).shipment?.trackingEvents ?? [], o = a[a.length - 1], c = r.find((e) => e.id === n.orderId);
158
158
  return c ? {
159
159
  order: c,
160
160
  driver: c.driverId ? s.find((e) => e.id === c.driverId || e.userId === c.driverId) ?? null : null,
@@ -170,7 +170,7 @@ function C() {
170
170
  }
171
171
  }, [
172
172
  s,
173
- e,
173
+ t,
174
174
  r,
175
175
  i
176
176
  ]);
@@ -184,10 +184,10 @@ function C() {
184
184
  };
185
185
  }
186
186
  function w() {
187
- let e = v(), [n, r] = d([]), [i, a] = d(!1), [o, s] = d(null), f = c(async () => {
187
+ let t = v(), [n, r] = d([]), [i, a] = d(!1), [o, s] = d(null), f = c(async () => {
188
188
  a(!0), s(null);
189
189
  try {
190
- r((await t(e, g)).trackingAlerts.map((e) => ({
190
+ r((await e(t, g)).trackingAlerts.map((e) => ({
191
191
  id: `${e.shipmentId}-${e.alertType}`,
192
192
  type: "delay",
193
193
  severity: "medium",
@@ -200,7 +200,7 @@ function w() {
200
200
  } finally {
201
201
  a(!1);
202
202
  }
203
- }, [e]);
203
+ }, [t]);
204
204
  return l(() => {
205
205
  f();
206
206
  }, [f]), {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/user.js
3
3
  var t = e("User", [["path", {
4
4
  d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/users.js
3
3
  var t = e("Users", [
4
4
  ["path", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/warehouse.js
3
3
  var t = e("Warehouse", [
4
4
  ["path", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-D3N8MCTm.js";
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/fuel.js
3
3
  var t = e("Fuel", [
4
4
  ["line", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-movethewheels",
3
- "version": "2026.626.2",
3
+ "version": "2026.703.1",
4
4
  "description": "Burdenoff MoveTheWheels Microfrontend - Logistics & Supply Chain Management Platform",
5
5
  "type": "module",
6
6
  "files": [
@@ -5,8 +5,32 @@
5
5
  * Uses lazy loading for code splitting.
6
6
  */
7
7
 
8
- import { Routes, Route, Navigate } from 'react-router-dom';
8
+ import { Routes, Route, useNavigate } from 'react-router-dom';
9
9
  import { lazy, Suspense } from 'react';
10
+ import { NotFoundPage } from '@burdenoff/fe-libs/shared/pages';
11
+ import { useMoveTheWheels } from './providers/MoveTheWheelsProvider';
12
+
13
+ /**
14
+ * Catch-all 404 rendered inside the content area (previously a redirect to ""
15
+ * that left the page blank). "Back to MoveTheWheels" returns to the overview
16
+ * via the host navigation when mounted, or the router root in standalone dev.
17
+ */
18
+ function MoveTheWheelsNotFound() {
19
+ const { navigate, basePath } = useMoveTheWheels();
20
+ const routerNavigate = useNavigate();
21
+ return (
22
+ <NotFoundPage
23
+ homeLabel="Back to MoveTheWheels"
24
+ onGoHome={() => {
25
+ if (navigate) {
26
+ navigate(basePath || '/');
27
+ } else {
28
+ routerNavigate('/');
29
+ }
30
+ }}
31
+ />
32
+ );
33
+ }
10
34
 
11
35
  // Loading fallback
12
36
  function PageLoader() {
@@ -111,8 +135,8 @@ export function MoveTheWheelsRoutes() {
111
135
  {/* Settings */}
112
136
  <Route path="settings" element={<SettingsPage />} />
113
137
 
114
- {/* Catch-all - redirect to dashboard */}
115
- <Route path="*" element={<Navigate to="" replace />} />
138
+ {/* Catch-all - friendly 404 */}
139
+ <Route path="*" element={<MoveTheWheelsNotFound />} />
116
140
  </Routes>
117
141
  </Suspense>
118
142
  );