@burdenoff/microfe-movethewheels 2026.510.105

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 (208) hide show
  1. package/README.md +82 -0
  2. package/dist/AIAssistantPage-hD0VYJdH.js +210 -0
  3. package/dist/AnalyticsPage-DHTHCUtr.js +201 -0
  4. package/dist/CreateOrderPage-Cprg4Y9V.js +471 -0
  5. package/dist/CustomerDetailsPage-DNDEw7IW.js +239 -0
  6. package/dist/CustomersPage-CDjjeCEL.js +119 -0
  7. package/dist/DashboardPage-8iTPXRAG.js +374 -0
  8. package/dist/DataTable-CRIKfdIN.js +239 -0
  9. package/dist/DriverDetailsPage-CRyRCno7.js +297 -0
  10. package/dist/DriversPage-16O8fVmf.js +127 -0
  11. package/dist/FinancePage-BYUxK5dR.js +154 -0
  12. package/dist/FleetPage-CHYETCWT.js +293 -0
  13. package/dist/ImportExportPage-C3MKKxfc.js +232 -0
  14. package/dist/InventoryPage--822AxZM.js +223 -0
  15. package/dist/LiveTrackingPage-Dp3rTJDr.js +332 -0
  16. package/dist/MarketplacePage-DjEqudfM.js +192 -0
  17. package/dist/MetricCard-GTbxAk1a.js +135 -0
  18. package/dist/OrderDetailsPage-BIuYG0ub.js +398 -0
  19. package/dist/OrdersListPage-CW5V0Uvh.js +257 -0
  20. package/dist/PageLayout-B7b0vl0R.js +1894 -0
  21. package/dist/ProductDetailsPage-Q3X7AT-7.js +168 -0
  22. package/dist/ProductsPage-CUj9JpnW.js +131 -0
  23. package/dist/ReportsPage-DblO5CdJ.js +227 -0
  24. package/dist/RouteDetailsPage-CLctgk6A.js +240 -0
  25. package/dist/RoutesPage-8hrv6RWT.js +116 -0
  26. package/dist/SettingsPage-BJ5BQeqn.js +247 -0
  27. package/dist/StatusBadge-BrrwraIA.js +206 -0
  28. package/dist/TrackingPage-BGqHDh-w.js +322 -0
  29. package/dist/VehicleDetailsPage-XnDH4iQR.js +194 -0
  30. package/dist/VehiclesPage-Cs4XxHkA.js +127 -0
  31. package/dist/WarehouseDetailsPage-GemdMvr_.js +215 -0
  32. package/dist/WarehousesPage-QTiuDuXy.js +121 -0
  33. package/dist/arrow-left-6CiLhqVp.js +11 -0
  34. package/dist/box-BunB_4UH.js +18 -0
  35. package/dist/chart-column-DWwVEVQ-.js +22 -0
  36. package/dist/chevron-right-DhZVf20o.js +8 -0
  37. package/dist/circle-alert-D5f6RZxt.js +26 -0
  38. package/dist/circle-check-big-D-JMHcTe.js +11 -0
  39. package/dist/clock-CvwBKbQP.js +13 -0
  40. package/dist/dev/main.d.ts +1 -0
  41. package/dist/dollar-sign-CP9qeU5d.js +14 -0
  42. package/dist/download-CIuG04pJ.js +21 -0
  43. package/dist/file-text-Dd_thxkn.js +26 -0
  44. package/dist/filter-DyRMX9CU.js +8 -0
  45. package/dist/formatters-_vJlC-47.js +50 -0
  46. package/dist/generated/global-operations.d.ts +1 -0
  47. package/dist/generated/global-types.d.ts +20715 -0
  48. package/dist/generated/wspace-operations.d.ts +3704 -0
  49. package/dist/generated/wspace-types.d.ts +53362 -0
  50. package/dist/graphqlClient-CdJyR_ed.js +55 -0
  51. package/dist/index.d.ts +4 -0
  52. package/dist/index.js +772 -0
  53. package/dist/map-BqH1cBJi.js +18 -0
  54. package/dist/map-pin-CFBOmh-A.js +13 -0
  55. package/dist/movethewheels/MoveTheWheelsRoot.d.ts +25 -0
  56. package/dist/movethewheels/MoveTheWheelsRoutes.d.ts +7 -0
  57. package/dist/movethewheels/components/DataTable.d.ts +32 -0
  58. package/dist/movethewheels/components/MetricCard.d.ts +43 -0
  59. package/dist/movethewheels/components/PageLayout.d.ts +68 -0
  60. package/dist/movethewheels/components/StatusBadge.d.ts +49 -0
  61. package/dist/movethewheels/components/index.d.ts +10 -0
  62. package/dist/movethewheels/components/ui.d.ts +22 -0
  63. package/dist/movethewheels/constants/index.d.ts +24 -0
  64. package/dist/movethewheels/constants/mockData.d.ts +33 -0
  65. package/dist/movethewheels/hooks/index.d.ts +12 -0
  66. package/dist/movethewheels/hooks/useAnalytics.d.ts +118 -0
  67. package/dist/movethewheels/hooks/useCustomers.d.ts +37 -0
  68. package/dist/movethewheels/hooks/useFleet.d.ts +71 -0
  69. package/dist/movethewheels/hooks/useInventory.d.ts +60 -0
  70. package/dist/movethewheels/hooks/useOrders.d.ts +47 -0
  71. package/dist/movethewheels/hooks/useRoutes.d.ts +41 -0
  72. package/dist/movethewheels/hooks/useTracking.d.ts +69 -0
  73. package/dist/movethewheels/index.d.ts +30 -0
  74. package/dist/movethewheels/pages/AIAssistantPage.d.ts +4 -0
  75. package/dist/movethewheels/pages/AnalyticsPage.d.ts +4 -0
  76. package/dist/movethewheels/pages/CreateOrderPage.d.ts +6 -0
  77. package/dist/movethewheels/pages/CustomerDetailsPage.d.ts +4 -0
  78. package/dist/movethewheels/pages/CustomersPage.d.ts +4 -0
  79. package/dist/movethewheels/pages/DashboardPage.d.ts +6 -0
  80. package/dist/movethewheels/pages/DriverDetailsPage.d.ts +4 -0
  81. package/dist/movethewheels/pages/DriversPage.d.ts +4 -0
  82. package/dist/movethewheels/pages/FinancePage.d.ts +4 -0
  83. package/dist/movethewheels/pages/FleetPage.d.ts +6 -0
  84. package/dist/movethewheels/pages/ImportExportPage.d.ts +4 -0
  85. package/dist/movethewheels/pages/InventoryPage.d.ts +4 -0
  86. package/dist/movethewheels/pages/LiveTrackingPage.d.ts +6 -0
  87. package/dist/movethewheels/pages/MarketplacePage.d.ts +4 -0
  88. package/dist/movethewheels/pages/OrderDetailsPage.d.ts +6 -0
  89. package/dist/movethewheels/pages/OrdersListPage.d.ts +6 -0
  90. package/dist/movethewheels/pages/ProductDetailsPage.d.ts +4 -0
  91. package/dist/movethewheels/pages/ProductsPage.d.ts +4 -0
  92. package/dist/movethewheels/pages/ReportsPage.d.ts +4 -0
  93. package/dist/movethewheels/pages/RouteDetailsPage.d.ts +4 -0
  94. package/dist/movethewheels/pages/RoutesPage.d.ts +4 -0
  95. package/dist/movethewheels/pages/SettingsPage.d.ts +4 -0
  96. package/dist/movethewheels/pages/TrackingPage.d.ts +6 -0
  97. package/dist/movethewheels/pages/VehicleDetailsPage.d.ts +4 -0
  98. package/dist/movethewheels/pages/VehiclesPage.d.ts +4 -0
  99. package/dist/movethewheels/pages/WarehouseDetailsPage.d.ts +4 -0
  100. package/dist/movethewheels/pages/WarehousesPage.d.ts +4 -0
  101. package/dist/movethewheels/providers/MoveTheWheelsProvider.d.ts +16 -0
  102. package/dist/movethewheels/store/movethewheelsStore.d.ts +73 -0
  103. package/dist/movethewheels/types/index.d.ts +655 -0
  104. package/dist/movethewheels/utils/cn.d.ts +6 -0
  105. package/dist/movethewheels/utils/formatters.d.ts +60 -0
  106. package/dist/movethewheels/utils/graphqlClient.d.ts +11 -0
  107. package/dist/movethewheels/utils/index.d.ts +7 -0
  108. package/dist/movethewheels/utils/navigation.d.ts +23 -0
  109. package/dist/navigation-BgnOfsVd.js +6 -0
  110. package/dist/navigation-C2fY_aS9.js +8 -0
  111. package/dist/package-DVZbDRcV.js +22 -0
  112. package/dist/phone-KdwpVmC4.js +18 -0
  113. package/dist/plus-Bl7uX6Ji.js +11 -0
  114. package/dist/refresh-cw-BYjl3K-8.js +22 -0
  115. package/dist/route-Ce_poKFi.js +51 -0
  116. package/dist/save-C-qDVat-.js +18 -0
  117. package/dist/search-5pdn5eOO.js +13 -0
  118. package/dist/settings-C4kIDsYg.js +28 -0
  119. package/dist/square-pen-BwQ67vLE.js +11 -0
  120. package/dist/star-BlVsC3Ad.js +8 -0
  121. package/dist/store-DTmQT5M0.js +26 -0
  122. package/dist/trending-up-C1faflCI.js +11 -0
  123. package/dist/triangle-alert-CUoVAA4L.js +18 -0
  124. package/dist/truck-BmDAzu05.js +30 -0
  125. package/dist/useAnalytics-ph7eTIK6.js +297 -0
  126. package/dist/useCustomers-bS3a4ytk.js +186 -0
  127. package/dist/useFleet-BdETplNE.js +398 -0
  128. package/dist/useInventory-Dwn18FPz.js +323 -0
  129. package/dist/useOrders-D_3_hGMp.js +324 -0
  130. package/dist/useRoutes-v4aBaS-E.js +224 -0
  131. package/dist/useTracking-De2KIUNu.js +261 -0
  132. package/dist/user-BplzDrLP.js +13 -0
  133. package/dist/users-i-igmsP4.js +24 -0
  134. package/dist/warehouse-DewG0PXh.js +25 -0
  135. package/dist/wrench-CoSDEIC7.js +31 -0
  136. package/package.json +107 -0
  137. package/src/dev/main.tsx +110 -0
  138. package/src/dev/styles.css +139 -0
  139. package/src/generated/global-operations.ts +2 -0
  140. package/src/generated/global-types.ts +24048 -0
  141. package/src/generated/wspace-operations.ts +3734 -0
  142. package/src/generated/wspace-types.ts +60715 -0
  143. package/src/index.ts +4 -0
  144. package/src/movethewheels/MoveTheWheelsRoot.tsx +258 -0
  145. package/src/movethewheels/MoveTheWheelsRoutes.tsx +119 -0
  146. package/src/movethewheels/components/DataTable.tsx +367 -0
  147. package/src/movethewheels/components/MetricCard.tsx +180 -0
  148. package/src/movethewheels/components/PageLayout.tsx +234 -0
  149. package/src/movethewheels/components/StatusBadge.tsx +243 -0
  150. package/src/movethewheels/components/index.ts +26 -0
  151. package/src/movethewheels/components/ui.tsx +124 -0
  152. package/src/movethewheels/constants/index.ts +65 -0
  153. package/src/movethewheels/constants/mockData.ts +1342 -0
  154. package/src/movethewheels/hooks/index.ts +55 -0
  155. package/src/movethewheels/hooks/useAnalytics.ts +476 -0
  156. package/src/movethewheels/hooks/useCustomers.ts +359 -0
  157. package/src/movethewheels/hooks/useFleet.ts +778 -0
  158. package/src/movethewheels/hooks/useInventory.ts +632 -0
  159. package/src/movethewheels/hooks/useOrders.ts +703 -0
  160. package/src/movethewheels/hooks/useRoutes.ts +453 -0
  161. package/src/movethewheels/hooks/useTracking.ts +505 -0
  162. package/src/movethewheels/index.ts +68 -0
  163. package/src/movethewheels/pages/AIAssistantPage.tsx +160 -0
  164. package/src/movethewheels/pages/AnalyticsPage.tsx +190 -0
  165. package/src/movethewheels/pages/CreateOrderPage.tsx +454 -0
  166. package/src/movethewheels/pages/CustomerDetailsPage.tsx +207 -0
  167. package/src/movethewheels/pages/CustomersPage.tsx +115 -0
  168. package/src/movethewheels/pages/DashboardPage.tsx +414 -0
  169. package/src/movethewheels/pages/DriverDetailsPage.tsx +261 -0
  170. package/src/movethewheels/pages/DriversPage.tsx +118 -0
  171. package/src/movethewheels/pages/FinancePage.tsx +141 -0
  172. package/src/movethewheels/pages/FleetPage.tsx +289 -0
  173. package/src/movethewheels/pages/ImportExportPage.tsx +165 -0
  174. package/src/movethewheels/pages/InventoryPage.tsx +212 -0
  175. package/src/movethewheels/pages/LiveTrackingPage.tsx +325 -0
  176. package/src/movethewheels/pages/MarketplacePage.tsx +235 -0
  177. package/src/movethewheels/pages/OrderDetailsPage.tsx +387 -0
  178. package/src/movethewheels/pages/OrdersListPage.tsx +241 -0
  179. package/src/movethewheels/pages/ProductDetailsPage.tsx +155 -0
  180. package/src/movethewheels/pages/ProductsPage.tsx +124 -0
  181. package/src/movethewheels/pages/ReportsPage.tsx +164 -0
  182. package/src/movethewheels/pages/RouteDetailsPage.tsx +245 -0
  183. package/src/movethewheels/pages/RoutesPage.tsx +104 -0
  184. package/src/movethewheels/pages/SettingsPage.tsx +242 -0
  185. package/src/movethewheels/pages/TrackingPage.tsx +419 -0
  186. package/src/movethewheels/pages/VehicleDetailsPage.tsx +218 -0
  187. package/src/movethewheels/pages/VehiclesPage.tsx +124 -0
  188. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +216 -0
  189. package/src/movethewheels/pages/WarehousesPage.tsx +122 -0
  190. package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +66 -0
  191. package/src/movethewheels/store/movethewheelsStore.ts +136 -0
  192. package/src/movethewheels/types/index.ts +744 -0
  193. package/src/movethewheels/utils/cn.ts +9 -0
  194. package/src/movethewheels/utils/formatters.ts +215 -0
  195. package/src/movethewheels/utils/graphqlClient.ts +63 -0
  196. package/src/movethewheels/utils/index.ts +8 -0
  197. package/src/movethewheels/utils/navigation.ts +70 -0
  198. package/src/operations/global/.gitkeep +0 -0
  199. package/src/operations/wspace/movethewheels/fragments/core.graphql +191 -0
  200. package/src/operations/wspace/movethewheels/mutations/entities.graphql +87 -0
  201. package/src/operations/wspace/movethewheels/mutations/logistics.graphql +86 -0
  202. package/src/operations/wspace/movethewheels/mutations/marketplace-reports.graphql +81 -0
  203. package/src/operations/wspace/movethewheels/mutations/orders.graphql +21 -0
  204. package/src/operations/wspace/movethewheels/queries/dashboard.graphql +61 -0
  205. package/src/operations/wspace/movethewheels/queries/entities.graphql +83 -0
  206. package/src/operations/wspace/movethewheels/queries/logistics.graphql +84 -0
  207. package/src/operations/wspace/movethewheels/queries/marketplace-reports.graphql +40 -0
  208. package/src/operations/wspace/movethewheels/queries/orders.graphql +43 -0
package/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # @burdenoff/microfe-movethewheels
2
+
3
+ MoveTheWheels Logistics Microfrontend - A comprehensive supply chain management platform.
4
+
5
+ ## Overview
6
+
7
+ This microfrontend provides a complete logistics and supply chain management interface including:
8
+
9
+ - **Dashboard** - Role-specific metrics and quick actions
10
+ - **Orders** - Order management with tracking and status updates
11
+ - **Tracking** - Real-time shipment tracking
12
+ - **Fleet** - Vehicle and driver management
13
+ - **Inventory** - Stock management and warehouse operations
14
+ - **Customers** - B2B and B2C customer management
15
+ - **Routes** - Route planning and optimization
16
+ - **Analytics** - Business intelligence and reporting
17
+ - **Marketplace** - Service provider integrations
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ bun install
23
+ ```
24
+
25
+ ## Development
26
+
27
+ ```bash
28
+ # Start standalone dev server
29
+ bun run dev
30
+
31
+ # Type checking
32
+ bun run type:check
33
+
34
+ # Linting
35
+ bun run lint
36
+
37
+ # Formatting
38
+ bun run format
39
+
40
+ # Run all checks
41
+ bun run sanity
42
+ ```
43
+
44
+ ## Usage
45
+
46
+ ```tsx
47
+ import { MoveTheWheelsRoot } from '@burdenoff/microfe-movethewheels';
48
+
49
+ function App() {
50
+ return (
51
+ <MoveTheWheelsRoot
52
+ basePath="/movethewheels"
53
+ navigate={(path) => router.push(path)}
54
+ currentUser={currentUser}
55
+ workspaceId="ws-123"
56
+ apiGatewayUrl="https://api.example.com"
57
+ authToken="token"
58
+ />
59
+ );
60
+ }
61
+ ```
62
+
63
+ ## Exports
64
+
65
+ - `MoveTheWheelsRoot` - Main root component
66
+ - `MoveTheWheelsRootProps` - TypeScript props interface
67
+ - `useMoveTheWheels` - Context hook
68
+ - `useMoveTheWheelsStore` - Zustand store hook
69
+
70
+ ## Technology Stack
71
+
72
+ - React 19
73
+ - TypeScript 5.9
74
+ - TailwindCSS v4
75
+ - Zustand 5
76
+ - React Router v7
77
+ - Recharts
78
+ - Lucide Icons
79
+
80
+ ## License
81
+
82
+ Proprietary - Copyright Burdenoff Consultancy Services Pvt. Ltd.
@@ -0,0 +1,210 @@
1
+ import { A as e, N as t, d as n, f as r, g as i, h as a, i as o, it as s, l as c, u as l } from "./PageLayout-B7b0vl0R.js";
2
+ import { n as u, t as d } from "./route-Ce_poKFi.js";
3
+ import { t as f } from "./circle-alert-D5f6RZxt.js";
4
+ import { t as p } from "./trending-up-C1faflCI.js";
5
+ import { useState as m } from "react";
6
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
7
+ //#region node_modules/lucide-react/dist/esm/icons/lightbulb.js
8
+ var _ = s("Lightbulb", [
9
+ ["path", {
10
+ d: "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",
11
+ key: "1gvzjb"
12
+ }],
13
+ ["path", {
14
+ d: "M9 18h6",
15
+ key: "x1upvd"
16
+ }],
17
+ ["path", {
18
+ d: "M10 22h4",
19
+ key: "ceow96"
20
+ }]
21
+ ]), v = s("Send", [["path", {
22
+ d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
23
+ key: "1ffxy3"
24
+ }], ["path", {
25
+ d: "m21.854 2.147-10.94 10.939",
26
+ key: "12cjpa"
27
+ }]]), y = s("Sparkles", [
28
+ ["path", {
29
+ d: "M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",
30
+ key: "4pj2yx"
31
+ }],
32
+ ["path", {
33
+ d: "M20 3v4",
34
+ key: "1olli1"
35
+ }],
36
+ ["path", {
37
+ d: "M22 5h-4",
38
+ key: "1gvqau"
39
+ }],
40
+ ["path", {
41
+ d: "M4 17v2",
42
+ key: "vumght"
43
+ }],
44
+ ["path", {
45
+ d: "M5 18H3",
46
+ key: "zchphs"
47
+ }]
48
+ ]);
49
+ //#endregion
50
+ //#region src/movethewheels/pages/AIAssistantPage.tsx
51
+ function b() {
52
+ let [s, b] = m(""), [x, S] = m([{
53
+ role: "assistant",
54
+ content: "Hello! I'm your logistics AI assistant. I can help you with route optimization, demand forecasting, fleet management insights, and more. How can I help you today?"
55
+ }]), C = [
56
+ {
57
+ icon: d,
58
+ text: "Optimize today's delivery routes",
59
+ category: "Route Planning"
60
+ },
61
+ {
62
+ icon: p,
63
+ text: "Show demand forecast for next week",
64
+ category: "Analytics"
65
+ },
66
+ {
67
+ icon: f,
68
+ text: "Identify potential delivery delays",
69
+ category: "Alerts"
70
+ },
71
+ {
72
+ icon: _,
73
+ text: "Suggest fleet efficiency improvements",
74
+ category: "Insights"
75
+ }
76
+ ], w = [
77
+ "Route Optimization - Find the most efficient delivery routes",
78
+ "Demand Forecasting - Predict order volumes and trends",
79
+ "Fleet Analysis - Insights on vehicle and driver performance",
80
+ "Cost Optimization - Identify ways to reduce operational costs",
81
+ "Natural Language Queries - Ask questions in plain English"
82
+ ], T = () => {
83
+ s.trim() && (S([
84
+ ...x,
85
+ {
86
+ role: "user",
87
+ content: s
88
+ },
89
+ {
90
+ role: "assistant",
91
+ content: `I understand you're asking about "${s}". Let me analyze that for you...\n\nBased on your current data, here are my findings:\n\n1. Your fleet utilization is currently at 78%, which is within the optimal range.\n2. There are 5 pending orders that could benefit from route consolidation.\n3. Estimated fuel savings from optimization: $120/day.\n\nWould you like me to generate a detailed report or take any action?`
92
+ }
93
+ ]), b(""));
94
+ };
95
+ return /* @__PURE__ */ h(o, {
96
+ title: "AI Assistant",
97
+ subtitle: "Intelligent logistics support",
98
+ icon: /* @__PURE__ */ h(u, { size: 24 }),
99
+ children: /* @__PURE__ */ g("div", {
100
+ className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
101
+ children: [/* @__PURE__ */ h("div", {
102
+ className: "lg:col-span-2 space-y-4",
103
+ children: /* @__PURE__ */ g(n, {
104
+ className: "h-[600px] flex flex-col",
105
+ children: [
106
+ /* @__PURE__ */ h(a, {
107
+ className: "border-b",
108
+ children: /* @__PURE__ */ g(i, {
109
+ className: "flex items-center gap-2",
110
+ children: [/* @__PURE__ */ h(y, {
111
+ size: 18,
112
+ className: "text-primary"
113
+ }), " Chat with AI"]
114
+ })
115
+ }),
116
+ /* @__PURE__ */ h(t, {
117
+ className: "flex-1 p-4",
118
+ children: /* @__PURE__ */ h("div", {
119
+ className: "space-y-4",
120
+ children: x.map((e, t) => /* @__PURE__ */ h("div", {
121
+ className: `flex ${e.role === "user" ? "justify-end" : "justify-start"}`,
122
+ children: /* @__PURE__ */ h("div", {
123
+ className: `max-w-[80%] p-3 rounded-lg ${e.role === "user" ? "bg-primary text-primary-foreground" : "bg-muted"}`,
124
+ children: /* @__PURE__ */ h("p", {
125
+ className: "whitespace-pre-line text-sm",
126
+ children: e.content
127
+ })
128
+ })
129
+ }, t))
130
+ })
131
+ }),
132
+ /* @__PURE__ */ h("div", {
133
+ className: "p-4 border-t",
134
+ children: /* @__PURE__ */ g("div", {
135
+ className: "flex gap-2",
136
+ children: [/* @__PURE__ */ h(e, {
137
+ value: s,
138
+ onChange: (e) => b(e.target.value),
139
+ placeholder: "Ask me anything about your logistics operations...",
140
+ onKeyPress: (e) => e.key === "Enter" && T()
141
+ }), /* @__PURE__ */ h(l, {
142
+ onClick: T,
143
+ children: /* @__PURE__ */ h(v, { size: 16 })
144
+ })]
145
+ })
146
+ })
147
+ ]
148
+ })
149
+ }), /* @__PURE__ */ g("div", {
150
+ className: "space-y-6",
151
+ children: [
152
+ /* @__PURE__ */ g(n, { children: [/* @__PURE__ */ h(a, { children: /* @__PURE__ */ h(i, { children: "Quick Actions" }) }), /* @__PURE__ */ h(r, {
153
+ className: "space-y-2",
154
+ children: C.map((e, t) => /* @__PURE__ */ g(l, {
155
+ variant: "outline",
156
+ className: "w-full justify-start text-left h-auto py-3",
157
+ onClick: () => b(e.text),
158
+ children: [
159
+ /* @__PURE__ */ h(e.icon, {
160
+ size: 16,
161
+ className: "mr-2 flex-shrink-0"
162
+ }),
163
+ /* @__PURE__ */ h("span", {
164
+ className: "flex-1",
165
+ children: e.text
166
+ }),
167
+ /* @__PURE__ */ h(c, {
168
+ variant: "secondary",
169
+ className: "text-xs",
170
+ children: e.category
171
+ })
172
+ ]
173
+ }, t))
174
+ })] }),
175
+ /* @__PURE__ */ g(n, { children: [/* @__PURE__ */ h(a, { children: /* @__PURE__ */ h(i, { children: "Capabilities" }) }), /* @__PURE__ */ h(r, { children: /* @__PURE__ */ h("ul", {
176
+ className: "space-y-2 text-sm",
177
+ children: w.map((e, t) => /* @__PURE__ */ g("li", {
178
+ className: "flex items-start gap-2",
179
+ children: [/* @__PURE__ */ h(y, {
180
+ size: 14,
181
+ className: "text-primary mt-0.5 flex-shrink-0"
182
+ }), /* @__PURE__ */ h("span", { children: e })]
183
+ }, t))
184
+ }) })] }),
185
+ /* @__PURE__ */ h(n, {
186
+ className: "bg-primary/5 border-primary/20",
187
+ children: /* @__PURE__ */ h(r, {
188
+ className: "p-4",
189
+ children: /* @__PURE__ */ g("div", {
190
+ className: "flex items-start gap-3",
191
+ children: [/* @__PURE__ */ h(_, {
192
+ size: 20,
193
+ className: "text-primary flex-shrink-0"
194
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
195
+ className: "font-medium text-sm",
196
+ children: "Pro Tip"
197
+ }), /* @__PURE__ */ h("p", {
198
+ className: "text-xs text-muted-foreground",
199
+ children: "You can ask complex questions like \"What would happen if I added 2 more vehicles to my fleet?\" for scenario analysis."
200
+ })] })]
201
+ })
202
+ })
203
+ })
204
+ ]
205
+ })]
206
+ })
207
+ });
208
+ }
209
+ //#endregion
210
+ export { b as default };
@@ -0,0 +1,201 @@
1
+ import { M as e, d as t, f as n, g as r, h as i, i as a } from "./PageLayout-B7b0vl0R.js";
2
+ import { t as o } from "./chart-column-DWwVEVQ-.js";
3
+ import { t as s } from "./dollar-sign-CP9qeU5d.js";
4
+ import { t as c } from "./package-DVZbDRcV.js";
5
+ import { t as l } from "./trending-up-C1faflCI.js";
6
+ import { t as u } from "./truck-BmDAzu05.js";
7
+ import { t as d } from "./users-i-igmsP4.js";
8
+ import { i as f, r as p, t as m } from "./useAnalytics-ph7eTIK6.js";
9
+ import { r as h, t as g } from "./MetricCard-GTbxAk1a.js";
10
+ import { n as _ } from "./formatters-_vJlC-47.js";
11
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
12
+ //#region src/movethewheels/pages/AnalyticsPage.tsx
13
+ function b() {
14
+ let { analytics: b } = m(), { orderData: x } = f(), { fleetData: S } = p();
15
+ return /* @__PURE__ */ y(a, {
16
+ title: "Analytics",
17
+ subtitle: "Business performance and insights",
18
+ icon: /* @__PURE__ */ v(o, { size: 24 }),
19
+ children: [
20
+ /* @__PURE__ */ y(h, {
21
+ columns: 5,
22
+ children: [
23
+ /* @__PURE__ */ v(g, {
24
+ label: "Total Orders",
25
+ value: b.overview.totalOrders.toLocaleString(),
26
+ icon: /* @__PURE__ */ v(c, { size: 20 }),
27
+ change: "+8.2%",
28
+ changeType: "positive",
29
+ trend: "up"
30
+ }),
31
+ /* @__PURE__ */ v(g, {
32
+ label: "Revenue",
33
+ value: _(b.overview.totalRevenue),
34
+ icon: /* @__PURE__ */ v(s, { size: 20 }),
35
+ change: "+12.5%",
36
+ changeType: "positive",
37
+ trend: "up"
38
+ }),
39
+ /* @__PURE__ */ v(g, {
40
+ label: "Active Vehicles",
41
+ value: b.overview.activeVehicles,
42
+ icon: /* @__PURE__ */ v(u, { size: 20 })
43
+ }),
44
+ /* @__PURE__ */ v(g, {
45
+ label: "On-Time Rate",
46
+ value: `${b.overview.onTimeDeliveryRate}%`,
47
+ icon: /* @__PURE__ */ v(l, { size: 20 }),
48
+ changeType: b.overview.onTimeDeliveryRate >= 90 ? "positive" : "negative"
49
+ }),
50
+ /* @__PURE__ */ v(g, {
51
+ label: "Satisfaction",
52
+ value: b.overview.customerSatisfaction.toFixed(1),
53
+ icon: /* @__PURE__ */ v(d, { size: 20 }),
54
+ subtitle: "out of 5"
55
+ })
56
+ ]
57
+ }),
58
+ /* @__PURE__ */ y("div", {
59
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
60
+ children: [/* @__PURE__ */ y(t, { children: [/* @__PURE__ */ v(i, { children: /* @__PURE__ */ v(r, { children: "Order Trends" }) }), /* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v("div", {
61
+ className: "h-64 flex items-center justify-center bg-muted/50 rounded-lg",
62
+ children: /* @__PURE__ */ y("div", {
63
+ className: "text-center text-muted-foreground",
64
+ children: [
65
+ /* @__PURE__ */ v(o, {
66
+ size: 48,
67
+ className: "mx-auto mb-2 opacity-50"
68
+ }),
69
+ /* @__PURE__ */ v("p", { children: "Order trend chart" }),
70
+ /* @__PURE__ */ v("p", {
71
+ className: "text-xs",
72
+ children: "(Chart library integration needed)"
73
+ })
74
+ ]
75
+ })
76
+ }), /* @__PURE__ */ v("div", {
77
+ className: "mt-4 grid grid-cols-4 gap-2",
78
+ children: x.trends.slice(-4).map((e) => /* @__PURE__ */ y("div", {
79
+ className: "text-center p-2 bg-muted/50 rounded",
80
+ children: [/* @__PURE__ */ v("p", {
81
+ className: "text-xs text-muted-foreground",
82
+ children: e.date.split("-").slice(1).join("/")
83
+ }), /* @__PURE__ */ v("p", {
84
+ className: "font-medium",
85
+ children: e.orders
86
+ })]
87
+ }, e.date))
88
+ })] })] }), /* @__PURE__ */ y(t, { children: [/* @__PURE__ */ v(i, { children: /* @__PURE__ */ v(r, { children: "Revenue Trends" }) }), /* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v("div", {
89
+ className: "h-64 flex items-center justify-center bg-muted/50 rounded-lg",
90
+ children: /* @__PURE__ */ y("div", {
91
+ className: "text-center text-muted-foreground",
92
+ children: [/* @__PURE__ */ v(l, {
93
+ size: 48,
94
+ className: "mx-auto mb-2 opacity-50"
95
+ }), /* @__PURE__ */ v("p", { children: "Revenue trend chart" })]
96
+ })
97
+ }), /* @__PURE__ */ v("div", {
98
+ className: "mt-4 grid grid-cols-5 gap-2",
99
+ children: b.trends.revenue.map((e) => /* @__PURE__ */ y("div", {
100
+ className: "text-center p-2 bg-muted/50 rounded",
101
+ children: [/* @__PURE__ */ v("p", {
102
+ className: "text-xs text-muted-foreground",
103
+ children: e.month
104
+ }), /* @__PURE__ */ y("p", {
105
+ className: "font-medium text-sm",
106
+ children: [_(e.revenue / 1e3), "k"]
107
+ })]
108
+ }, e.month))
109
+ })] })] })]
110
+ }),
111
+ /* @__PURE__ */ y("div", {
112
+ className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
113
+ children: [
114
+ /* @__PURE__ */ y(t, { children: [/* @__PURE__ */ v(i, { children: /* @__PURE__ */ v(r, { children: "Orders by Status" }) }), /* @__PURE__ */ v(n, {
115
+ className: "space-y-3",
116
+ children: x.byStatus.filter((e) => e.count > 0).map(({ status: t, count: n }) => /* @__PURE__ */ y("div", {
117
+ className: "flex items-center justify-between",
118
+ children: [/* @__PURE__ */ v("span", {
119
+ className: "text-sm capitalize",
120
+ children: t.replace("_", " ")
121
+ }), /* @__PURE__ */ y("div", {
122
+ className: "flex items-center gap-2",
123
+ children: [/* @__PURE__ */ v(e, {
124
+ value: n / b.overview.totalOrders * 100,
125
+ className: "w-20 h-2"
126
+ }), /* @__PURE__ */ v("span", {
127
+ className: "font-medium w-8 text-right",
128
+ children: n
129
+ })]
130
+ })]
131
+ }, t))
132
+ })] }),
133
+ /* @__PURE__ */ y(t, { children: [/* @__PURE__ */ v(i, { children: /* @__PURE__ */ v(r, { children: "Fleet Performance" }) }), /* @__PURE__ */ y(n, {
134
+ className: "space-y-4",
135
+ children: [
136
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
137
+ className: "flex justify-between text-sm mb-1",
138
+ children: [/* @__PURE__ */ v("span", { children: "Vehicle Utilization" }), /* @__PURE__ */ y("span", { children: [S.vehicleUtilization.toFixed(0), "%"] })]
139
+ }), /* @__PURE__ */ v(e, { value: S.vehicleUtilization })] }),
140
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
141
+ className: "flex justify-between text-sm mb-1",
142
+ children: [/* @__PURE__ */ v("span", { children: "Avg Fuel Level" }), /* @__PURE__ */ y("span", { children: [S.avgFuelLevel.toFixed(0), "%"] })]
143
+ }), /* @__PURE__ */ v(e, { value: S.avgFuelLevel })] }),
144
+ /* @__PURE__ */ y("div", {
145
+ className: "pt-2",
146
+ children: [/* @__PURE__ */ v("p", {
147
+ className: "text-sm text-muted-foreground mb-2",
148
+ children: "Vehicles by Type"
149
+ }), S.vehiclesByType.map(({ type: e, count: t }) => /* @__PURE__ */ y("div", {
150
+ className: "flex justify-between text-sm py-1",
151
+ children: [/* @__PURE__ */ v("span", {
152
+ className: "capitalize",
153
+ children: e
154
+ }), /* @__PURE__ */ v("span", {
155
+ className: "font-medium",
156
+ children: t
157
+ })]
158
+ }, e))]
159
+ })
160
+ ]
161
+ })] }),
162
+ /* @__PURE__ */ y(t, { children: [/* @__PURE__ */ v(i, { children: /* @__PURE__ */ v(r, { children: "Performance Metrics" }) }), /* @__PURE__ */ y(n, {
163
+ className: "space-y-4",
164
+ children: [
165
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
166
+ className: "text-sm text-muted-foreground",
167
+ children: "On-Time Pickup"
168
+ }), /* @__PURE__ */ y("p", {
169
+ className: "text-2xl font-bold",
170
+ children: [b.performance.onTimePickup, "%"]
171
+ })] }),
172
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
173
+ className: "text-sm text-muted-foreground",
174
+ children: "On-Time Delivery"
175
+ }), /* @__PURE__ */ y("p", {
176
+ className: "text-2xl font-bold",
177
+ children: [b.performance.onTimeDelivery, "%"]
178
+ })] }),
179
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
180
+ className: "text-sm text-muted-foreground",
181
+ children: "Damaged Items"
182
+ }), /* @__PURE__ */ y("p", {
183
+ className: "text-2xl font-bold text-green-600",
184
+ children: [b.performance.damagedItems, "%"]
185
+ })] }),
186
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
187
+ className: "text-sm text-muted-foreground",
188
+ children: "Driver Ratings"
189
+ }), /* @__PURE__ */ y("p", {
190
+ className: "text-2xl font-bold",
191
+ children: [b.performance.driverRatings, "/5"]
192
+ })] })
193
+ ]
194
+ })] })
195
+ ]
196
+ })
197
+ ]
198
+ });
199
+ }
200
+ //#endregion
201
+ export { b as default };