@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 { 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/star.js
3
3
  var t = e("Star", [["path", {
4
4
  d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
@@ -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/store.js
3
3
  var t = e("Store", [
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/trending-up.js
3
3
  var t = e("TrendingUp", [["polyline", {
4
4
  points: "22 7 13.5 15.5 8.5 10.5 2 17",
@@ -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/triangle-alert.js
3
3
  var t = e("TriangleAlert", [
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/truck.js
3
3
  var t = e("Truck", [
4
4
  ["path", {
@@ -1,7 +1,7 @@
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/useAnalytics.ts
4
- var o = "\n query GetMovethewheelsAnalytics {\n analytics {\n orderTrend {\n label\n value\n }\n deliveryTrend {\n label\n value\n }\n revenueTrend {\n label\n value\n }\n }\n dashboardMetrics {\n totalOrders\n activeDeliveries\n availableDrivers\n activeVehicles\n lowStockItems\n totalRevenue\n }\n fleetStats {\n totalVehicles\n activeVehicles\n maintenanceVehicles\n }\n }\n", s = "\n query GetDashboardMetrics {\n dashboardMetrics {\n totalOrders\n activeDeliveries\n availableDrivers\n activeVehicles\n lowStockItems\n totalRevenue\n }\n orderStats {\n total\n pending\n inTransit\n delivered\n cancelled\n failed\n }\n fleetStats {\n totalVehicles\n activeVehicles\n maintenanceVehicles\n totalDrivers\n availableDrivers\n onDeliveryDrivers\n }\n financeMetrics {\n revenue {\n totalRevenue\n averageOrderValue\n }\n }\n }\n", c = "\n query GetOrderAnalytics {\n orderStats {\n pending\n inTransit\n delivered\n cancelled\n failed\n }\n analytics {\n orderTrend {\n label\n value\n }\n }\n }\n";
4
+ var o = "\n query GetMovethewheelsAnalytics {\n analytics {\n orderTrend {\n label\n value\n }\n deliveryTrend {\n label\n value\n }\n revenueTrend {\n label\n value\n }\n }\n dashboardMetrics {\n totalOrders\n activeDeliveries\n availableDrivers\n activeVehicles\n lowStockItems\n totalRevenue\n onTimeDeliveryRate\n customerSatisfaction\n }\n fleetStats {\n totalVehicles\n activeVehicles\n maintenanceVehicles\n avgDriverRating\n }\n }\n", s = "\n query GetDashboardMetrics {\n dashboardMetrics {\n totalOrders\n activeDeliveries\n availableDrivers\n activeVehicles\n lowStockItems\n totalRevenue\n onTimeDeliveryRate\n customerSatisfaction\n }\n orderStats {\n total\n pending\n inTransit\n delivered\n cancelled\n failed\n }\n fleetStats {\n totalVehicles\n activeVehicles\n maintenanceVehicles\n totalDrivers\n availableDrivers\n onDeliveryDrivers\n avgDriverRating\n }\n financeMetrics {\n revenue {\n totalRevenue\n averageOrderValue\n }\n }\n }\n", c = "\n query GetOrderAnalytics {\n orderStats {\n pending\n inTransit\n delivered\n cancelled\n failed\n }\n analytics {\n orderTrend {\n label\n value\n }\n }\n }\n";
5
5
  function l() {
6
6
  return {
7
7
  overview: {
@@ -33,7 +33,7 @@ function l() {
33
33
  };
34
34
  }
35
35
  function u(s = {}) {
36
- let { apiGatewayUrl: c, authToken: u, workspaceToken: d, workspaceId: f, tenantId: p, currentUser: m } = e(), [h, g] = a(l()), [_, v] = a(!1), [y, b] = a(null), x = i(() => ({
36
+ let { apiGatewayUrl: c, authToken: u, workspaceToken: d, workspaceId: f, tenantId: p, currentUser: m } = t(), [h, g] = a(l()), [_, v] = a(!1), [y, b] = a(null), x = i(() => ({
37
37
  apiGatewayUrl: c,
38
38
  authToken: u,
39
39
  workspaceToken: d,
@@ -50,39 +50,39 @@ function u(s = {}) {
50
50
  ]), S = n(async () => {
51
51
  v(!0), b(null);
52
52
  try {
53
- let e = await t(x, o);
53
+ let t = await e(x, o);
54
54
  g({
55
55
  overview: {
56
- totalOrders: e.dashboardMetrics.totalOrders,
57
- totalRevenue: e.dashboardMetrics.totalRevenue,
58
- activeVehicles: e.dashboardMetrics.activeVehicles,
59
- onTimeDeliveryRate: 0,
60
- customerSatisfaction: 0
56
+ totalOrders: t.dashboardMetrics.totalOrders,
57
+ totalRevenue: t.dashboardMetrics.totalRevenue,
58
+ activeVehicles: t.dashboardMetrics.activeVehicles,
59
+ onTimeDeliveryRate: t.dashboardMetrics.onTimeDeliveryRate,
60
+ customerSatisfaction: t.dashboardMetrics.customerSatisfaction
61
61
  },
62
62
  trends: {
63
- dailyOrders: e.analytics.orderTrend.map((e) => ({
63
+ dailyOrders: t.analytics.orderTrend.map((e) => ({
64
64
  date: e.label,
65
65
  orders: Math.round(e.value)
66
66
  })),
67
- revenue: e.analytics.revenueTrend.map((e) => ({
67
+ revenue: t.analytics.revenueTrend.map((e) => ({
68
68
  month: e.label,
69
69
  revenue: e.value
70
70
  }))
71
71
  },
72
72
  fleet: {
73
- utilization: e.fleetStats.totalVehicles > 0 ? e.fleetStats.activeVehicles / e.fleetStats.totalVehicles * 100 : 0,
74
- totalVehicles: e.fleetStats.totalVehicles,
75
- activeVehicles: e.fleetStats.activeVehicles,
76
- maintenanceVehicles: e.fleetStats.maintenanceVehicles,
77
- outOfServiceVehicles: Math.max(e.fleetStats.totalVehicles - e.fleetStats.activeVehicles - e.fleetStats.maintenanceVehicles, 0),
73
+ utilization: t.fleetStats.totalVehicles > 0 ? t.fleetStats.activeVehicles / t.fleetStats.totalVehicles * 100 : 0,
74
+ totalVehicles: t.fleetStats.totalVehicles,
75
+ activeVehicles: t.fleetStats.activeVehicles,
76
+ maintenanceVehicles: t.fleetStats.maintenanceVehicles,
77
+ outOfServiceVehicles: Math.max(t.fleetStats.totalVehicles - t.fleetStats.activeVehicles - t.fleetStats.maintenanceVehicles, 0),
78
78
  fuelEfficiency: 0
79
79
  },
80
80
  performance: {
81
81
  onTimePickup: 0,
82
- onTimeDelivery: 0,
82
+ onTimeDelivery: t.dashboardMetrics.onTimeDeliveryRate,
83
83
  damagedItems: 0,
84
84
  customerComplaints: 0,
85
- driverRatings: 0
85
+ driverRatings: t.fleetStats.avgDriverRating
86
86
  }
87
87
  });
88
88
  } catch (e) {
@@ -103,7 +103,7 @@ function u(s = {}) {
103
103
  };
104
104
  }
105
105
  function d() {
106
- let { apiGatewayUrl: n, authToken: o, workspaceToken: c, workspaceId: l, tenantId: u, currentUser: d } = e(), [f, p] = a({
106
+ let { apiGatewayUrl: n, authToken: o, workspaceToken: c, workspaceId: l, tenantId: u, currentUser: d } = t(), [f, p] = a({
107
107
  orders: {
108
108
  total: 0,
109
109
  pending: 0,
@@ -145,29 +145,29 @@ function d() {
145
145
  (async () => {
146
146
  h(!0), _(null);
147
147
  try {
148
- let e = await t(v, s);
148
+ let t = await e(v, s);
149
149
  p({
150
150
  orders: {
151
- total: e.orderStats.total,
152
- pending: e.orderStats.pending,
153
- inTransit: e.orderStats.inTransit,
154
- delivered: e.orderStats.delivered,
151
+ total: t.orderStats.total,
152
+ pending: t.orderStats.pending,
153
+ inTransit: t.orderStats.inTransit,
154
+ delivered: t.orderStats.delivered,
155
155
  today: 0
156
156
  },
157
157
  fleet: {
158
- totalVehicles: e.fleetStats.totalVehicles,
159
- activeVehicles: e.fleetStats.activeVehicles,
160
- totalDrivers: e.fleetStats.totalDrivers,
161
- availableDrivers: e.fleetStats.availableDrivers
158
+ totalVehicles: t.fleetStats.totalVehicles,
159
+ activeVehicles: t.fleetStats.activeVehicles,
160
+ totalDrivers: t.fleetStats.totalDrivers,
161
+ availableDrivers: t.fleetStats.availableDrivers
162
162
  },
163
163
  revenue: {
164
- total: e.financeMetrics.revenue.totalRevenue,
165
- avgOrderValue: e.financeMetrics.revenue.averageOrderValue,
164
+ total: t.financeMetrics.revenue.totalRevenue,
165
+ avgOrderValue: t.financeMetrics.revenue.averageOrderValue,
166
166
  currency: "USD"
167
167
  },
168
168
  performance: {
169
- onTimeDeliveryRate: 0,
170
- avgDriverRating: 0
169
+ onTimeDeliveryRate: t.dashboardMetrics.onTimeDeliveryRate,
170
+ avgDriverRating: t.fleetStats.avgDriverRating
171
171
  }
172
172
  });
173
173
  } catch (e) {
@@ -201,7 +201,7 @@ function f(e = "monthly") {
201
201
  };
202
202
  }
203
203
  function p() {
204
- let { apiGatewayUrl: n, authToken: o, workspaceToken: s, workspaceId: l, tenantId: u, currentUser: d } = e(), [f, p] = a({
204
+ let { apiGatewayUrl: n, authToken: o, workspaceToken: s, workspaceId: l, tenantId: u, currentUser: d } = t(), [f, p] = a({
205
205
  byStatus: [],
206
206
  byType: [],
207
207
  byPriority: [],
@@ -225,33 +225,33 @@ function p() {
225
225
  (async () => {
226
226
  h(!0), _(null);
227
227
  try {
228
- let e = await t(v, c);
228
+ let t = await e(v, c);
229
229
  p({
230
230
  byStatus: [
231
231
  {
232
232
  status: "pending",
233
- count: e.orderStats.pending
233
+ count: t.orderStats.pending
234
234
  },
235
235
  {
236
236
  status: "in_transit",
237
- count: e.orderStats.inTransit
237
+ count: t.orderStats.inTransit
238
238
  },
239
239
  {
240
240
  status: "delivered",
241
- count: e.orderStats.delivered
241
+ count: t.orderStats.delivered
242
242
  },
243
243
  {
244
244
  status: "cancelled",
245
- count: e.orderStats.cancelled
245
+ count: t.orderStats.cancelled
246
246
  },
247
247
  {
248
248
  status: "failed",
249
- count: e.orderStats.failed
249
+ count: t.orderStats.failed
250
250
  }
251
251
  ],
252
252
  byType: [],
253
253
  byPriority: [],
254
- trends: e.analytics.orderTrend.map((e) => ({
254
+ trends: t.analytics.orderTrend.map((e) => ({
255
255
  date: e.label,
256
256
  orders: Math.round(e.value)
257
257
  }))
@@ -0,0 +1,84 @@
1
+ import { it as e, lt as t, ot as n } from "./PageLayout-D4LDHJJq.js";
2
+ import { useCallback as r, useMemo as i, useState as a } from "react";
3
+ //#region node_modules/lucide-react/dist/esm/icons/bot.js
4
+ var o = t("Bot", [
5
+ ["path", {
6
+ d: "M12 8V4H8",
7
+ key: "hb8ula"
8
+ }],
9
+ ["rect", {
10
+ width: "16",
11
+ height: "12",
12
+ x: "4",
13
+ y: "8",
14
+ rx: "2",
15
+ key: "enze0r"
16
+ }],
17
+ ["path", {
18
+ d: "M2 14h2",
19
+ key: "vft8re"
20
+ }],
21
+ ["path", {
22
+ d: "M20 14h2",
23
+ key: "4cs60a"
24
+ }],
25
+ ["path", {
26
+ d: "M15 13v2",
27
+ key: "1xurst"
28
+ }],
29
+ ["path", {
30
+ d: "M9 13v2",
31
+ key: "rq6x2g"
32
+ }]
33
+ ]), s = t("Route", [
34
+ ["circle", {
35
+ cx: "6",
36
+ cy: "19",
37
+ r: "3",
38
+ key: "1kj8tv"
39
+ }],
40
+ ["path", {
41
+ d: "M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",
42
+ key: "1d8sl"
43
+ }],
44
+ ["circle", {
45
+ cx: "18",
46
+ cy: "5",
47
+ r: "3",
48
+ key: "gq8acd"
49
+ }]
50
+ ]), c = "\n query MovethewheelsAssistantInsights($question: String!) {\n assistantInsights(question: $question) {\n answer\n generatedAt\n question\n }\n }\n";
51
+ function l() {
52
+ let { apiGatewayUrl: t, authToken: o, workspaceToken: s, workspaceId: l, tenantId: u, currentUser: d } = n(), [f, p] = a(!1), [m, h] = a(null), g = i(() => ({
53
+ apiGatewayUrl: t,
54
+ authToken: o,
55
+ workspaceToken: s,
56
+ workspaceId: l,
57
+ tenantId: u,
58
+ actorId: d?.id
59
+ }), [
60
+ t,
61
+ o,
62
+ s,
63
+ l,
64
+ u,
65
+ d?.id
66
+ ]);
67
+ return {
68
+ ask: r(async (t) => {
69
+ p(!0), h(null);
70
+ try {
71
+ return (await e(g, c, { question: t })).assistantInsights;
72
+ } catch (e) {
73
+ let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to get assistant response");
74
+ throw h(t), t;
75
+ } finally {
76
+ p(!1);
77
+ }
78
+ }, [g]),
79
+ isLoading: f,
80
+ error: m
81
+ };
82
+ }
83
+ //#endregion
84
+ export { s as n, o as r, l 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/useCustomers.ts
4
4
  var o = "\n query ListCustomers($filter: CustomerFilterInput, $pagination: PaginationInput) {\n customers(filter: $filter, pagination: $pagination) {\n id\n name\n email\n phone\n type\n company\n address\n businessLicense\n taxId\n rating\n createdAt\n updatedAt\n deletedAt\n }\n }\n", s = "\n query GetCustomer($id: ID!) {\n customer(id: $id) {\n id\n name\n email\n phone\n type\n company\n address\n businessLicense\n taxId\n rating\n createdAt\n updatedAt\n deletedAt\n }\n }\n", c = "\n mutation CreateCustomer($input: CreateCustomerInput!) {\n createCustomer(input: $input) {\n id\n name\n email\n phone\n type\n company\n address\n businessLicense\n taxId\n rating\n createdAt\n updatedAt\n deletedAt\n }\n }\n", l = "\n mutation UpdateCustomer($id: ID!, $input: UpdateCustomerInput!) {\n updateCustomer(id: $id, input: $input) {\n id\n name\n email\n phone\n type\n company\n address\n businessLicense\n taxId\n rating\n createdAt\n updatedAt\n deletedAt\n }\n }\n", u = "\n mutation DeleteCustomer($id: ID!) {\n deleteCustomer(id: $id)\n }\n";
@@ -33,7 +33,7 @@ function f(s = {}) {
33
33
  f?.isActive,
34
34
  f?.search,
35
35
  f?.type
36
- ]), { apiGatewayUrl: g, authToken: _, workspaceToken: v, workspaceId: y, tenantId: b, currentUser: x } = e(), [S, C] = a([]), [w, T] = a(!1), [E, D] = a(null), O = i(() => ({
36
+ ]), { apiGatewayUrl: g, authToken: _, workspaceToken: v, workspaceId: y, tenantId: b, currentUser: x } = t(), [S, C] = a([]), [w, T] = a(!1), [E, D] = a(null), O = i(() => ({
37
37
  apiGatewayUrl: g,
38
38
  authToken: _,
39
39
  workspaceToken: v,
@@ -50,7 +50,7 @@ function f(s = {}) {
50
50
  ]), k = n(async () => {
51
51
  T(!0), D(null);
52
52
  try {
53
- let e = (await t(O, o, {
53
+ let t = (await e(O, o, {
54
54
  filter: {
55
55
  type: h?.type,
56
56
  search: h?.search
@@ -60,7 +60,7 @@ function f(s = {}) {
60
60
  offset: m
61
61
  }
62
62
  })).customers.map(d);
63
- h?.isActive !== void 0 && (e = e.filter((e) => e.isActive === h.isActive)), C(e);
63
+ h?.isActive !== void 0 && (t = t.filter((e) => e.isActive === h.isActive)), C(t);
64
64
  } catch (e) {
65
65
  D(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load customers"));
66
66
  } finally {
@@ -77,22 +77,22 @@ function f(s = {}) {
77
77
  }, [k]);
78
78
  let A = n(() => {
79
79
  k();
80
- }, [k]), j = n(async (e) => {
81
- let n = d((await t(O, c, { input: {
82
- name: e.name,
83
- email: e.email,
84
- phone: e.phone,
85
- type: e.type ?? "b2c",
86
- company: e.company,
87
- address: e.address,
88
- businessLicense: e.businessLicense,
89
- taxId: e.taxId,
90
- rating: e.rating
80
+ }, [k]), j = n(async (t) => {
81
+ let n = d((await e(O, c, { input: {
82
+ name: t.name,
83
+ email: t.email,
84
+ phone: t.phone,
85
+ type: t.type ?? "b2c",
86
+ company: t.company,
87
+ address: t.address,
88
+ businessLicense: t.businessLicense,
89
+ taxId: t.taxId,
90
+ rating: t.rating
91
91
  } })).createCustomer);
92
92
  return C((e) => [n, ...e]), n;
93
- }, [O]), M = n(async (e, n) => {
94
- let r = d((await t(O, l, {
95
- id: e,
93
+ }, [O]), M = n(async (t, n) => {
94
+ let r = d((await e(O, l, {
95
+ id: t,
96
96
  input: {
97
97
  name: n.name,
98
98
  email: n.email,
@@ -105,9 +105,9 @@ function f(s = {}) {
105
105
  rating: n.rating
106
106
  }
107
107
  })).updateCustomer);
108
- return C((t) => t.map((t) => t.id === e ? r : t)), r;
109
- }, [O]), N = n(async (e) => {
110
- await t(O, u, { id: e }), C((t) => t.filter((t) => t.id !== e));
108
+ return C((e) => e.map((e) => e.id === t ? r : e)), r;
109
+ }, [O]), N = n(async (t) => {
110
+ await e(O, u, { id: t }), C((e) => e.filter((e) => e.id !== t));
111
111
  }, [O]);
112
112
  return {
113
113
  customers: S,
@@ -121,7 +121,7 @@ function f(s = {}) {
121
121
  };
122
122
  }
123
123
  function p(o) {
124
- let { apiGatewayUrl: c, authToken: l, workspaceToken: u, workspaceId: f, tenantId: p, currentUser: m } = e(), [h, g] = a(null), [_, v] = a(!1), [y, b] = a(null), x = i(() => ({
124
+ let { apiGatewayUrl: c, authToken: l, workspaceToken: u, workspaceId: f, tenantId: p, currentUser: m } = t(), [h, g] = a(null), [_, v] = a(!1), [y, b] = a(null), x = i(() => ({
125
125
  apiGatewayUrl: c,
126
126
  authToken: l,
127
127
  workspaceToken: u,
@@ -142,8 +142,8 @@ function p(o) {
142
142
  }
143
143
  v(!0), b(null);
144
144
  try {
145
- let e = await t(x, s, { id: o });
146
- g(e.customer ? d(e.customer) : null);
145
+ let t = await e(x, s, { id: o });
146
+ g(t.customer ? d(t.customer) : null);
147
147
  } catch (e) {
148
148
  b(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load customer"));
149
149
  } finally {