@burdenoff/microfe-movethewheels 2026.626.2 → 2026.703.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.
Files changed (135) hide show
  1. package/dist/{AIAssistantPage-AvsMbunM.js → AIAssistantPage-C3cPsWt-.js} +100 -73
  2. package/dist/AnalyticsPage-Dz6g2MvK.js +215 -0
  3. package/dist/{CreateOrderPage-CjlnEtk3.js → CreateOrderPage-C5iwnjp4.js} +36 -67
  4. package/dist/CustomerDetailsPage-B6nwFyLO.js +406 -0
  5. package/dist/{CustomersPage-CGGfD4ki.js → CustomersPage-2Y05LVyh.js} +26 -28
  6. package/dist/{DashboardPage-D2HRqwg9.js → DashboardPage-BVjQi0EB.js} +85 -83
  7. package/dist/{DataTable-CD9ZhpLB.js → DataTable-DmciIKKM.js} +3 -3
  8. package/dist/DriverDetailsPage-CN3WQ0B9.js +507 -0
  9. package/dist/{DriversPage-DKiynISH.js → DriversPage-B0Zpx8OQ.js} +25 -27
  10. package/dist/{FinancePage-Vg8WPs38.js → FinancePage-DEDykSOP.js} +9 -9
  11. package/dist/FleetPage-DqkFi3s3.js +365 -0
  12. package/dist/FormError-BlOjnXOq.js +15 -0
  13. package/dist/ImportExportPage-DKJRCezl.js +290 -0
  14. package/dist/InventoryPage-DwfgCUQq.js +253 -0
  15. package/dist/{LiveTrackingPage-DQ1q4Id3.js → LiveTrackingPage-DCX-K-LR.js} +60 -56
  16. package/dist/MarketplacePage-CIQ97_zp.js +247 -0
  17. package/dist/{MetricCard-B7yMyvMX.js → MetricCard-BY0QrMD4.js} +1 -1
  18. package/dist/{OrderDetailsPage-CFASgsYX.js → OrderDetailsPage-DYiZ-9UK.js} +83 -85
  19. package/dist/{OrdersListPage-BHeT8S5o.js → OrdersListPage-BjDlCKJd.js} +31 -33
  20. package/dist/{PageLayout-D3N8MCTm.js → PageLayout-D4LDHJJq.js} +483 -422
  21. package/dist/ProductDetailsPage-C9uOiYLp.js +350 -0
  22. package/dist/{ProductsPage--xEpbQ8A.js → ProductsPage-C1G9h7Xd.js} +22 -24
  23. package/dist/ReportsPage-Zp53q3_8.js +284 -0
  24. package/dist/RouteDetailsPage-DUStXSf9.js +531 -0
  25. package/dist/RoutesPage-DMfoicM1.js +144 -0
  26. package/dist/SettingsPage-Bn-v0mbQ.js +421 -0
  27. package/dist/StatusBadge-BZurYHMy.js +152 -0
  28. package/dist/{TrackingPage-CcRc_dva.js → TrackingPage-W-jtdM3Y.js} +59 -61
  29. package/dist/VehicleDetailsPage-Bceo5oz3.js +410 -0
  30. package/dist/{VehiclesPage-UlxPWP9K.js → VehiclesPage-VBtOep91.js} +20 -22
  31. package/dist/WarehouseDetailsPage-L_6sWigM.js +493 -0
  32. package/dist/{WarehousesPage-CuTO-OPp.js → WarehousesPage-DCbXXXWE.js} +16 -18
  33. package/dist/{arrow-left-CBpZKkpq.js → arrow-left-n48Y-Wis.js} +1 -1
  34. package/dist/{box-CAaiElsb.js → box-D9Pal4HM.js} +1 -1
  35. package/dist/{chart-column-D1Ym15-S.js → chart-column-BFIJysDR.js} +1 -1
  36. package/dist/{chevron-right-BIFGi0UA.js → chevron-right-EMIIyyJ1.js} +1 -1
  37. package/dist/{circle-alert-DjmNo5_L.js → circle-alert-iY24lSlp.js} +1 -1
  38. package/dist/{circle-check-big-CjuPVo3_.js → circle-check-big-w0TrLKMF.js} +1 -1
  39. package/dist/{clock-BjkdnddD.js → clock-DJZtdl8u.js} +1 -1
  40. package/dist/{dollar-sign-IB4O0wuQ.js → dollar-sign-CgKQRz_e.js} +1 -1
  41. package/dist/{download-Dpa9vqoG.js → download-DRXxoiQR.js} +1 -1
  42. package/dist/{file-text-C8Uioy11.js → file-text-DWWY6_f5.js} +1 -1
  43. package/dist/{filter-Da5OZaHI.js → filter-DloLC2eE.js} +1 -1
  44. package/dist/index.js +186 -162
  45. package/dist/{map-_Per4sT9.js → map-CkJaULb2.js} +1 -1
  46. package/dist/{map-pin-BSaf5IDL.js → map-pin-BGiCvyCs.js} +1 -1
  47. package/dist/{navigation-DaTbrhw2.js → navigation-D36prnAn.js} +1 -1
  48. package/dist/{package-BE7U0wQE.js → package-BChUzpJS.js} +1 -1
  49. package/dist/{phone-DV4StZiA.js → phone-Ac9s3mo_.js} +1 -1
  50. package/dist/{plus-Dl1rLeJR.js → plus-Z76q-FZm.js} +1 -1
  51. package/dist/{refresh-cw-CWfERAit.js → refresh-cw-DKt6f5T6.js} +1 -1
  52. package/dist/{save-XH8vydOn.js → save-CojywNhG.js} +1 -1
  53. package/dist/{search-OxoIiL_C.js → search-CDGefqb3.js} +1 -1
  54. package/dist/{square-pen-hLIbFQFV.js → square-pen-CopE9GmB.js} +1 -1
  55. package/dist/{star-YsVV3MNQ.js → star-nHlLjDKR.js} +1 -1
  56. package/dist/{store-RCBl7HB-.js → store-BR9Voi5E.js} +1 -1
  57. package/dist/trash-2-BKhar6Hs.js +32 -0
  58. package/dist/{trending-up-C-85AwGT.js → trending-up-Dohgd4t_.js} +1 -1
  59. package/dist/{triangle-alert-BOhfGgmh.js → triangle-alert-i-XQL9Rd.js} +1 -1
  60. package/dist/{truck-CtDjNFbi.js → truck-C0v_hbLR.js} +1 -1
  61. package/dist/{useAnalytics-ph7eTIK6.js → useAnalytics-DS8n0xgg.js} +40 -40
  62. package/dist/useAssistant-D4v3oxD3.js +84 -0
  63. package/dist/{useCustomers-bS3a4ytk.js → useCustomers-BmTNGxiI.js} +24 -24
  64. package/dist/{useFleet-BdETplNE.js → useFleet-DKqXZ16m.js} +133 -109
  65. package/dist/useImportExport-DHr-SWSw.js +55 -0
  66. package/dist/{useInventory-Dwn18FPz.js → useInventory-DkyiVY_A.js} +95 -75
  67. package/dist/{useOrders-D_3_hGMp.js → useOrders-Cfk1GLiq.js} +42 -42
  68. package/dist/useReports-CTqZr-AB.js +78 -0
  69. package/dist/{useRoutes-v4aBaS-E.js → useRoutes-BQWO607N.js} +31 -31
  70. package/dist/useSettings-CkDH_-gM.js +81 -0
  71. package/dist/{useTracking-De2KIUNu.js → useTracking-B-va1kO3.js} +22 -22
  72. package/dist/{user-Dz5TJZFs.js → user-jyFU3lXk.js} +1 -1
  73. package/dist/{users-g2N0eL-Z.js → users-DZ-ilS6B.js} +1 -1
  74. package/dist/{warehouse-D3WWDeTX.js → warehouse-6m5kXMLu.js} +1 -1
  75. package/dist/{wrench-CmxY1n4I.js → wrench-CANXWxF-.js} +1 -1
  76. package/package.json +1 -1
  77. package/src/movethewheels/MoveTheWheelsRoutes.tsx +31 -3
  78. package/src/movethewheels/components/FormError.tsx +25 -0
  79. package/src/movethewheels/components/StatusBadge.tsx +18 -37
  80. package/src/movethewheels/constants/index.ts +67 -26
  81. package/src/movethewheels/hooks/index.ts +12 -0
  82. package/src/movethewheels/hooks/useAnalytics.ts +20 -6
  83. package/src/movethewheels/hooks/useAssistant.ts +74 -0
  84. package/src/movethewheels/hooks/useFleet.ts +170 -59
  85. package/src/movethewheels/hooks/useImportExport.ts +101 -0
  86. package/src/movethewheels/hooks/useInventory.ts +107 -0
  87. package/src/movethewheels/hooks/useReports.ts +158 -0
  88. package/src/movethewheels/hooks/useSettings.ts +120 -0
  89. package/src/movethewheels/pages/AIAssistantPage.tsx +53 -15
  90. package/src/movethewheels/pages/AnalyticsPage.tsx +67 -64
  91. package/src/movethewheels/pages/CustomerDetailsPage.tsx +154 -21
  92. package/src/movethewheels/pages/CustomersPage.tsx +1 -1
  93. package/src/movethewheels/pages/DashboardPage.tsx +42 -22
  94. package/src/movethewheels/pages/DriverDetailsPage.tsx +160 -3
  95. package/src/movethewheels/pages/DriversPage.tsx +6 -2
  96. package/src/movethewheels/pages/FleetPage.tsx +96 -38
  97. package/src/movethewheels/pages/ImportExportPage.tsx +174 -68
  98. package/src/movethewheels/pages/InventoryPage.tsx +66 -28
  99. package/src/movethewheels/pages/LiveTrackingPage.tsx +12 -3
  100. package/src/movethewheels/pages/MarketplacePage.tsx +87 -45
  101. package/src/movethewheels/pages/OrderDetailsPage.tsx +2 -2
  102. package/src/movethewheels/pages/ProductDetailsPage.tsx +146 -3
  103. package/src/movethewheels/pages/ProductsPage.tsx +5 -1
  104. package/src/movethewheels/pages/ReportsPage.tsx +194 -90
  105. package/src/movethewheels/pages/RouteDetailsPage.tsx +290 -36
  106. package/src/movethewheels/pages/RoutesPage.tsx +4 -9
  107. package/src/movethewheels/pages/SettingsPage.tsx +234 -56
  108. package/src/movethewheels/pages/TrackingPage.tsx +6 -6
  109. package/src/movethewheels/pages/VehicleDetailsPage.tsx +158 -2
  110. package/src/movethewheels/pages/VehiclesPage.tsx +5 -1
  111. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +224 -2
  112. package/src/movethewheels/pages/WarehousesPage.tsx +5 -1
  113. package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +7 -6
  114. package/src/movethewheels/store/movethewheelsStore.ts +1 -1
  115. package/dist/AnalyticsPage-CCLfHgQZ.js +0 -212
  116. package/dist/CustomerDetailsPage-I6cdDHUi.js +0 -265
  117. package/dist/DriverDetailsPage-rg_pGNuP.js +0 -330
  118. package/dist/FleetPage-DddXt8r8.js +0 -332
  119. package/dist/ImportExportPage-BW6qO3kc.js +0 -248
  120. package/dist/InventoryPage-rMGuaJN-.js +0 -222
  121. package/dist/MarketplacePage-DKrXAv62.js +0 -219
  122. package/dist/ProductDetailsPage-CFGcbaHo.js +0 -195
  123. package/dist/ReportsPage-Bb7_90rK.js +0 -235
  124. package/dist/RouteDetailsPage-CVtDVb1N.js +0 -282
  125. package/dist/RoutesPage-s57PtgcQ.js +0 -163
  126. package/dist/SettingsPage-BYNCBOpN.js +0 -298
  127. package/dist/StatusBadge-CijYQXtb.js +0 -209
  128. package/dist/VehicleDetailsPage-3YDMPsPs.js +0 -220
  129. package/dist/WarehouseDetailsPage-Db7KeN-d.js +0 -238
  130. package/dist/graphqlClient-CdJyR_ed.js +0 -55
  131. package/dist/navigation-BgnOfsVd.js +0 -6
  132. package/dist/route-Dp9JiN_E.js +0 -51
  133. package/dist/settings-3Rw5NwFF.js +0 -28
  134. package/src/movethewheels/constants/mockData.ts +0 -1342
  135. /package/dist/{formatters-_vJlC-47.js → formatters-CF2S2l1m.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/map.js
3
3
  var t = e("Map", [
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/map-pin.js
3
3
  var t = e("MapPin", [["path", {
4
4
  d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 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/navigation.js
3
3
  var t = e("Navigation", [["polygon", {
4
4
  points: "3 11 22 2 13 21 11 13 3 11",
@@ -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/package.js
3
3
  var t = e("Package", [
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/mail.js
3
3
  var t = e("Mail", [["rect", {
4
4
  width: "20",
@@ -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/plus.js
3
3
  var t = e("Plus", [["path", {
4
4
  d: "M5 12h14",
@@ -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/refresh-cw.js
3
3
  var t = e("RefreshCw", [
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/save.js
3
3
  var t = e("Save", [
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/search.js
3
3
  var t = e("Search", [["circle", {
4
4
  cx: "11",
@@ -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/square-pen.js
3
3
  var t = e("SquarePen", [["path", {
4
4
  d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",
@@ -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", {
@@ -0,0 +1,32 @@
1
+ import { lt as e } from "./PageLayout-D4LDHJJq.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/trash-2.js
3
+ var t = e("Trash2", [
4
+ ["path", {
5
+ d: "M3 6h18",
6
+ key: "d0wm0j"
7
+ }],
8
+ ["path", {
9
+ d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",
10
+ key: "4alrt4"
11
+ }],
12
+ ["path", {
13
+ d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",
14
+ key: "v07s0e"
15
+ }],
16
+ ["line", {
17
+ x1: "10",
18
+ x2: "10",
19
+ y1: "11",
20
+ y2: "17",
21
+ key: "1uufr5"
22
+ }],
23
+ ["line", {
24
+ x1: "14",
25
+ x2: "14",
26
+ y1: "11",
27
+ y2: "17",
28
+ key: "xtxkd"
29
+ }]
30
+ ]);
31
+ //#endregion
32
+ export { t };
@@ -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 {