@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
@@ -0,0 +1,194 @@
1
+ import { M as e, d as t, f as n, g as r, h as i, i as a, l as o, n as s, r as c, u as l } from "./PageLayout-B7b0vl0R.js";
2
+ import { t as u } from "./arrow-left-6CiLhqVp.js";
3
+ import { t as d } from "./file-text-Dd_thxkn.js";
4
+ import { n as f, t as p } from "./wrench-CoSDEIC7.js";
5
+ import { t as m } from "./map-pin-CFBOmh-A.js";
6
+ import { t as h } from "./square-pen-BwQ67vLE.js";
7
+ import { t as g } from "./truck-BmDAzu05.js";
8
+ import { r as _ } from "./graphqlClient-CdJyR_ed.js";
9
+ import { a as v } from "./useFleet-BdETplNE.js";
10
+ import { a as y, r as b } from "./StatusBadge-BrrwraIA.js";
11
+ import { r as x } from "./formatters-_vJlC-47.js";
12
+ import { t as S } from "./navigation-BgnOfsVd.js";
13
+ import { useParams as C } from "react-router-dom";
14
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
15
+ //#region src/movethewheels/pages/VehicleDetailsPage.tsx
16
+ function E() {
17
+ let { vehicleId: E } = C(), { basePath: D, navigate: O } = _(), { vehicle: k, isLoading: A, error: j, refetch: M } = v(E);
18
+ return A ? /* @__PURE__ */ w(c, { message: "Loading vehicle details..." }) : j || !k ? /* @__PURE__ */ w(s, {
19
+ title: "Vehicle not found",
20
+ onRetry: M
21
+ }) : /* @__PURE__ */ w(a, {
22
+ title: k.vehicleNumber,
23
+ subtitle: `${k.make} ${k.model} (${k.year})`,
24
+ icon: /* @__PURE__ */ w(g, { size: 24 }),
25
+ headerActions: /* @__PURE__ */ T("div", {
26
+ className: "flex gap-2",
27
+ children: [/* @__PURE__ */ T(l, {
28
+ variant: "outline",
29
+ onClick: () => O?.(S(D, "fleet/vehicles")),
30
+ children: [/* @__PURE__ */ w(u, { size: 16 }), " Back"]
31
+ }), /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(h, { size: 16 }), " Edit"] })]
32
+ }),
33
+ headerContent: /* @__PURE__ */ T("div", {
34
+ className: "flex gap-2",
35
+ children: [/* @__PURE__ */ w(b, {
36
+ status: k.status,
37
+ type: "vehicle"
38
+ }), /* @__PURE__ */ w(y, { type: k.type })]
39
+ }),
40
+ children: /* @__PURE__ */ T("div", {
41
+ className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
42
+ children: [/* @__PURE__ */ T("div", {
43
+ className: "lg:col-span-2 space-y-6",
44
+ children: [
45
+ /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(r, { children: "Vehicle Information" }) }), /* @__PURE__ */ w(n, { children: /* @__PURE__ */ T("div", {
46
+ className: "grid grid-cols-2 md:grid-cols-4 gap-6",
47
+ children: [
48
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
49
+ className: "text-sm text-muted-foreground",
50
+ children: "Type"
51
+ }), /* @__PURE__ */ w("p", {
52
+ className: "font-medium capitalize",
53
+ children: k.type
54
+ })] }),
55
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
56
+ className: "text-sm text-muted-foreground",
57
+ children: "Make"
58
+ }), /* @__PURE__ */ w("p", {
59
+ className: "font-medium",
60
+ children: k.make
61
+ })] }),
62
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
63
+ className: "text-sm text-muted-foreground",
64
+ children: "Model"
65
+ }), /* @__PURE__ */ w("p", {
66
+ className: "font-medium",
67
+ children: k.model
68
+ })] }),
69
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
70
+ className: "text-sm text-muted-foreground",
71
+ children: "Year"
72
+ }), /* @__PURE__ */ w("p", {
73
+ className: "font-medium",
74
+ children: k.year
75
+ })] })
76
+ ]
77
+ }) })] }),
78
+ /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(r, { children: "Capacity" }) }), /* @__PURE__ */ w(n, { children: /* @__PURE__ */ T("div", {
79
+ className: "grid grid-cols-3 gap-6",
80
+ children: [
81
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
82
+ className: "text-sm text-muted-foreground",
83
+ children: "Weight"
84
+ }), /* @__PURE__ */ T("p", {
85
+ className: "text-2xl font-bold",
86
+ children: [k.capacity.weight, /* @__PURE__ */ w("span", {
87
+ className: "text-sm font-normal",
88
+ children: " kg"
89
+ })]
90
+ })] }),
91
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
92
+ className: "text-sm text-muted-foreground",
93
+ children: "Volume"
94
+ }), /* @__PURE__ */ T("p", {
95
+ className: "text-2xl font-bold",
96
+ children: [k.capacity.volume, /* @__PURE__ */ w("span", {
97
+ className: "text-sm font-normal",
98
+ children: " m³"
99
+ })]
100
+ })] }),
101
+ k.capacity.pallets && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
102
+ className: "text-sm text-muted-foreground",
103
+ children: "Pallets"
104
+ }), /* @__PURE__ */ w("p", {
105
+ className: "text-2xl font-bold",
106
+ children: k.capacity.pallets
107
+ })] })
108
+ ]
109
+ }) })] }),
110
+ /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
111
+ className: "flex items-center gap-2",
112
+ children: [/* @__PURE__ */ w(d, { size: 18 }), " Documents"]
113
+ }) }), /* @__PURE__ */ w(n, { children: k.documents.length > 0 ? /* @__PURE__ */ w("div", {
114
+ className: "space-y-3",
115
+ children: k.documents.map((e) => /* @__PURE__ */ T("div", {
116
+ className: "flex items-center justify-between p-3 border rounded-lg",
117
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
118
+ className: "font-medium capitalize",
119
+ children: e.type.replace("_", " ")
120
+ }), /* @__PURE__ */ T("p", {
121
+ className: "text-sm text-muted-foreground",
122
+ children: ["Expires: ", x(e.expiryDate)]
123
+ })] }), /* @__PURE__ */ w(o, {
124
+ variant: e.verified ? "default" : "secondary",
125
+ children: e.verified ? "Verified" : "Pending"
126
+ })]
127
+ }, e.id))
128
+ }) : /* @__PURE__ */ w("p", {
129
+ className: "text-muted-foreground text-center py-4",
130
+ children: "No documents uploaded"
131
+ }) })] })
132
+ ]
133
+ }), /* @__PURE__ */ T("div", {
134
+ className: "space-y-6",
135
+ children: [
136
+ /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
137
+ className: "flex items-center gap-2",
138
+ children: [/* @__PURE__ */ w(f, { size: 18 }), " Fuel & Mileage"]
139
+ }) }), /* @__PURE__ */ T(n, {
140
+ className: "space-y-4",
141
+ children: [k.fuelLevel !== void 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
142
+ className: "flex justify-between text-sm mb-2",
143
+ children: [/* @__PURE__ */ w("span", { children: "Fuel Level" }), /* @__PURE__ */ T("span", { children: [k.fuelLevel, "%"] })]
144
+ }), /* @__PURE__ */ w(e, { value: k.fuelLevel })] }), k.mileage !== void 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
145
+ className: "text-sm text-muted-foreground",
146
+ children: "Total Mileage"
147
+ }), /* @__PURE__ */ T("p", {
148
+ className: "text-2xl font-bold",
149
+ children: [
150
+ k.mileage.toLocaleString(),
151
+ " ",
152
+ /* @__PURE__ */ w("span", {
153
+ className: "text-sm font-normal",
154
+ children: "miles"
155
+ })
156
+ ]
157
+ })] })]
158
+ })] }),
159
+ /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
160
+ className: "flex items-center gap-2",
161
+ children: [/* @__PURE__ */ w(p, { size: 18 }), " Maintenance"]
162
+ }) }), /* @__PURE__ */ T(n, {
163
+ className: "space-y-3",
164
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
165
+ className: "text-sm text-muted-foreground",
166
+ children: "Last Maintenance"
167
+ }), /* @__PURE__ */ w("p", {
168
+ className: "font-medium",
169
+ children: k.lastMaintenance ? x(k.lastMaintenance) : "N/A"
170
+ })] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
171
+ className: "text-sm text-muted-foreground",
172
+ children: "Next Scheduled"
173
+ }), /* @__PURE__ */ w("p", {
174
+ className: "font-medium",
175
+ children: k.nextMaintenance ? x(k.nextMaintenance) : "N/A"
176
+ })] })]
177
+ })] }),
178
+ k.currentLocation && /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ T(r, {
179
+ className: "flex items-center gap-2",
180
+ children: [/* @__PURE__ */ w(m, { size: 18 }), " Current Location"]
181
+ }) }), /* @__PURE__ */ T(n, { children: [/* @__PURE__ */ w("p", {
182
+ className: "text-sm",
183
+ children: k.currentLocation.address || "Location updating..."
184
+ }), /* @__PURE__ */ T("p", {
185
+ className: "text-xs text-muted-foreground mt-1",
186
+ children: ["Updated ", x(k.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")]
187
+ })] })] })
188
+ ]
189
+ })]
190
+ })
191
+ });
192
+ }
193
+ //#endregion
194
+ export { E as default };
@@ -0,0 +1,127 @@
1
+ import { M as e, i as t, u as n } from "./PageLayout-B7b0vl0R.js";
2
+ import { t as r } from "./DataTable-CRIKfdIN.js";
3
+ import { t as i } from "./download-CIuG04pJ.js";
4
+ import { t as a } from "./plus-Bl7uX6Ji.js";
5
+ import { t as o } from "./refresh-cw-BYjl3K-8.js";
6
+ import { t as s } from "./truck-BmDAzu05.js";
7
+ import { r as c } from "./graphqlClient-CdJyR_ed.js";
8
+ import { o as l } from "./useFleet-BdETplNE.js";
9
+ import { a as u, r as d } from "./StatusBadge-BrrwraIA.js";
10
+ import { t as f } from "./navigation-BgnOfsVd.js";
11
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
12
+ //#region src/movethewheels/pages/VehiclesPage.tsx
13
+ function h() {
14
+ let { basePath: h, navigate: g } = c(), { vehicles: _, totalVehicles: v, isLoading: y, refetch: b } = l(), x = (e) => {
15
+ g && g(f(h, e));
16
+ };
17
+ return /* @__PURE__ */ p(t, {
18
+ title: "Vehicles",
19
+ subtitle: `${v} vehicles in fleet`,
20
+ icon: /* @__PURE__ */ p(s, { size: 24 }),
21
+ headerActions: /* @__PURE__ */ m("div", {
22
+ className: "flex gap-2",
23
+ children: [
24
+ /* @__PURE__ */ m(n, {
25
+ variant: "outline",
26
+ onClick: b,
27
+ children: [/* @__PURE__ */ p(o, { size: 16 }), "Refresh"]
28
+ }),
29
+ /* @__PURE__ */ m(n, {
30
+ variant: "outline",
31
+ children: [/* @__PURE__ */ p(i, { size: 16 }), "Export"]
32
+ }),
33
+ /* @__PURE__ */ m(n, { children: [/* @__PURE__ */ p(a, { size: 16 }), "Add Vehicle"] })
34
+ ]
35
+ }),
36
+ children: /* @__PURE__ */ p(r, {
37
+ columns: [
38
+ {
39
+ id: "vehicleNumber",
40
+ header: "Vehicle #",
41
+ accessorKey: "vehicleNumber",
42
+ sortable: !0,
43
+ cell: (e) => /* @__PURE__ */ p("span", {
44
+ className: "font-medium",
45
+ children: e.vehicleNumber
46
+ })
47
+ },
48
+ {
49
+ id: "type",
50
+ header: "Type",
51
+ accessorKey: "type",
52
+ cell: (e) => /* @__PURE__ */ p(u, { type: e.type })
53
+ },
54
+ {
55
+ id: "details",
56
+ header: "Vehicle",
57
+ cell: (e) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("p", {
58
+ className: "font-medium",
59
+ children: [
60
+ e.make,
61
+ " ",
62
+ e.model
63
+ ]
64
+ }), /* @__PURE__ */ p("p", {
65
+ className: "text-sm text-muted-foreground",
66
+ children: e.year
67
+ })] })
68
+ },
69
+ {
70
+ id: "status",
71
+ header: "Status",
72
+ accessorKey: "status",
73
+ sortable: !0,
74
+ cell: (e) => /* @__PURE__ */ p(d, {
75
+ status: e.status,
76
+ type: "vehicle"
77
+ })
78
+ },
79
+ {
80
+ id: "capacity",
81
+ header: "Capacity",
82
+ cell: (e) => /* @__PURE__ */ m("div", {
83
+ className: "text-sm",
84
+ children: [/* @__PURE__ */ m("p", { children: [e.capacity.weight, " kg"] }), /* @__PURE__ */ m("p", {
85
+ className: "text-muted-foreground",
86
+ children: [e.capacity.volume, " m³"]
87
+ })]
88
+ })
89
+ },
90
+ {
91
+ id: "fuel",
92
+ header: "Fuel Level",
93
+ cell: (t) => t.fuelLevel === void 0 ? "-" : /* @__PURE__ */ m("div", {
94
+ className: "flex items-center gap-2",
95
+ children: [/* @__PURE__ */ p(e, {
96
+ value: t.fuelLevel,
97
+ className: "w-16 h-2"
98
+ }), /* @__PURE__ */ m("span", {
99
+ className: "text-sm",
100
+ children: [t.fuelLevel, "%"]
101
+ })]
102
+ })
103
+ },
104
+ {
105
+ id: "mileage",
106
+ header: "Mileage",
107
+ accessorKey: "mileage",
108
+ sortable: !0,
109
+ cell: (e) => e.mileage ? `${e.mileage.toLocaleString()} mi` : "-"
110
+ }
111
+ ],
112
+ data: _,
113
+ isLoading: y,
114
+ searchable: !0,
115
+ searchPlaceholder: "Search vehicles...",
116
+ searchFields: [
117
+ "vehicleNumber",
118
+ "make",
119
+ "model"
120
+ ],
121
+ onRowClick: (e) => x(`fleet/vehicles/${e.id}`),
122
+ getRowId: (e) => e.id
123
+ })
124
+ });
125
+ }
126
+ //#endregion
127
+ export { h as default };
@@ -0,0 +1,215 @@
1
+ import { M as e, d as t, f as n, g as r, h as i, i as a, l as o, n as s, r as c, u as l } from "./PageLayout-B7b0vl0R.js";
2
+ import { t as u } from "./arrow-left-6CiLhqVp.js";
3
+ import { t as d } from "./box-BunB_4UH.js";
4
+ import { t as f } from "./clock-CvwBKbQP.js";
5
+ import { t as p } from "./map-pin-CFBOmh-A.js";
6
+ import { t as m } from "./square-pen-BwQ67vLE.js";
7
+ import { t as h } from "./users-i-igmsP4.js";
8
+ import { t as g } from "./warehouse-DewG0PXh.js";
9
+ import { r as _ } from "./graphqlClient-CdJyR_ed.js";
10
+ import { a as v } from "./useInventory-Dwn18FPz.js";
11
+ import { t as y } from "./formatters-_vJlC-47.js";
12
+ import { t as b } from "./navigation-BgnOfsVd.js";
13
+ import { useParams as x } from "react-router-dom";
14
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
15
+ //#region src/movethewheels/pages/WarehouseDetailsPage.tsx
16
+ function w() {
17
+ let { warehouseId: w } = x(), { basePath: T, navigate: E } = _(), { warehouse: D, isLoading: O, error: k, refetch: A } = v(w), j = () => E?.(b(T, "inventory/warehouses"));
18
+ if (O) return /* @__PURE__ */ S(c, { message: "Loading warehouse details..." });
19
+ if (k || !D) return /* @__PURE__ */ S(s, {
20
+ title: "Warehouse not found",
21
+ onRetry: A
22
+ });
23
+ let M = D.capacity.usedSpace / D.capacity.totalSpace * 100;
24
+ return /* @__PURE__ */ S(a, {
25
+ title: D.name,
26
+ subtitle: `Code: ${D.code}`,
27
+ icon: /* @__PURE__ */ S(g, { size: 24 }),
28
+ headerActions: /* @__PURE__ */ C("div", {
29
+ className: "flex gap-2",
30
+ children: [/* @__PURE__ */ C(l, {
31
+ variant: "outline",
32
+ onClick: j,
33
+ children: [/* @__PURE__ */ S(u, { size: 16 }), " Back"]
34
+ }), /* @__PURE__ */ C(l, { children: [/* @__PURE__ */ S(m, { size: 16 }), " Edit"] })]
35
+ }),
36
+ headerContent: /* @__PURE__ */ C("div", {
37
+ className: "flex gap-2",
38
+ children: [/* @__PURE__ */ S(o, {
39
+ variant: D.isActive ? "default" : "secondary",
40
+ children: D.isActive ? "Active" : "Inactive"
41
+ }), /* @__PURE__ */ S(o, {
42
+ variant: "outline",
43
+ className: "capitalize",
44
+ children: D.type.replace("_", " ")
45
+ })]
46
+ }),
47
+ children: /* @__PURE__ */ C("div", {
48
+ className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
49
+ children: [/* @__PURE__ */ C("div", {
50
+ className: "lg:col-span-2 space-y-6",
51
+ children: [
52
+ /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
53
+ className: "flex items-center gap-2",
54
+ children: [/* @__PURE__ */ S(d, { size: 18 }), " Capacity"]
55
+ }) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ C("div", {
56
+ className: "space-y-4",
57
+ children: [/* @__PURE__ */ C("div", { children: [
58
+ /* @__PURE__ */ C("div", {
59
+ className: "flex justify-between text-sm mb-2",
60
+ children: [/* @__PURE__ */ S("span", { children: "Space Utilization" }), /* @__PURE__ */ C("span", { children: [M.toFixed(0), "%"] })]
61
+ }),
62
+ /* @__PURE__ */ S(e, { value: M }),
63
+ /* @__PURE__ */ C("p", {
64
+ className: "text-sm text-muted-foreground mt-1",
65
+ children: [
66
+ D.capacity.usedSpace.toLocaleString(),
67
+ " /",
68
+ " ",
69
+ D.capacity.totalSpace.toLocaleString(),
70
+ " sq ft"
71
+ ]
72
+ })
73
+ ] }), /* @__PURE__ */ S("div", {
74
+ className: "grid grid-cols-2 gap-4",
75
+ children: /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
76
+ className: "text-sm text-muted-foreground",
77
+ children: "Pallets Used"
78
+ }), /* @__PURE__ */ C("p", {
79
+ className: "text-2xl font-bold",
80
+ children: [D.capacity.usedPallets, /* @__PURE__ */ C("span", {
81
+ className: "text-sm font-normal text-muted-foreground",
82
+ children: [
83
+ " ",
84
+ "/ ",
85
+ D.capacity.totalPallets
86
+ ]
87
+ })]
88
+ })] })
89
+ })]
90
+ }) })] }),
91
+ /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, { children: [
92
+ "Zones (",
93
+ D.zones.length,
94
+ ")"
95
+ ] }) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("div", {
96
+ className: "space-y-3",
97
+ children: D.zones.map((t) => /* @__PURE__ */ C("div", {
98
+ className: "flex items-center justify-between p-3 border rounded-lg",
99
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
100
+ className: "font-medium",
101
+ children: t.name
102
+ }), /* @__PURE__ */ C("p", {
103
+ className: "text-sm text-muted-foreground capitalize",
104
+ children: [
105
+ t.type,
106
+ " - ",
107
+ t.location
108
+ ]
109
+ })] }), /* @__PURE__ */ C("div", {
110
+ className: "text-right",
111
+ children: [/* @__PURE__ */ S(e, {
112
+ value: t.currentOccupancy / t.capacity * 100,
113
+ className: "w-24 h-2"
114
+ }), /* @__PURE__ */ C("p", {
115
+ className: "text-sm text-muted-foreground",
116
+ children: [
117
+ t.currentOccupancy,
118
+ " / ",
119
+ t.capacity
120
+ ]
121
+ })]
122
+ })]
123
+ }, t.id))
124
+ }) })] }),
125
+ /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
126
+ className: "flex items-center gap-2",
127
+ children: [/* @__PURE__ */ S(f, { size: 18 }), " Operating Hours"]
128
+ }) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("div", {
129
+ className: "grid grid-cols-2 md:grid-cols-4 gap-4",
130
+ children: Object.entries(D.operatingHours).map(([e, t]) => /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
131
+ className: "text-sm font-medium",
132
+ children: e
133
+ }), /* @__PURE__ */ S("p", {
134
+ className: "text-sm text-muted-foreground",
135
+ children: t ? `${t.open} - ${t.close}` : "Closed"
136
+ })] }, e))
137
+ }) })] })
138
+ ]
139
+ }), /* @__PURE__ */ C("div", {
140
+ className: "space-y-6",
141
+ children: [
142
+ /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
143
+ className: "flex items-center gap-2",
144
+ children: [/* @__PURE__ */ S(p, { size: 18 }), " Location"]
145
+ }) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("p", {
146
+ className: "text-sm",
147
+ children: y(D.address)
148
+ }) })] }),
149
+ /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ S(r, { children: "Metrics" }) }), /* @__PURE__ */ C(n, {
150
+ className: "space-y-3",
151
+ children: [
152
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
153
+ className: "text-sm text-muted-foreground",
154
+ children: "Throughput"
155
+ }), /* @__PURE__ */ C("p", {
156
+ className: "text-2xl font-bold",
157
+ children: [D.metrics.throughput, /* @__PURE__ */ S("span", {
158
+ className: "text-sm font-normal",
159
+ children: " orders/day"
160
+ })]
161
+ })] }),
162
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
163
+ className: "text-sm text-muted-foreground",
164
+ children: "Accuracy"
165
+ }), /* @__PURE__ */ C("p", {
166
+ className: "text-2xl font-bold",
167
+ children: [D.metrics.accuracy, "%"]
168
+ })] }),
169
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
170
+ className: "text-sm text-muted-foreground",
171
+ children: "Productivity"
172
+ }), /* @__PURE__ */ C("p", {
173
+ className: "text-2xl font-bold",
174
+ children: [D.metrics.productivity, "%"]
175
+ })] }),
176
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
177
+ className: "text-sm text-muted-foreground",
178
+ children: "Orders Fulfilled"
179
+ }), /* @__PURE__ */ S("p", {
180
+ className: "text-2xl font-bold",
181
+ children: D.metrics.ordersFulfilled.toLocaleString()
182
+ })] })
183
+ ]
184
+ })] }),
185
+ /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
186
+ className: "flex items-center gap-2",
187
+ children: [
188
+ /* @__PURE__ */ S(h, { size: 18 }),
189
+ " Staff (",
190
+ D.staff.length,
191
+ ")"
192
+ ]
193
+ }) }), /* @__PURE__ */ S(n, { children: D.staff.length > 0 ? /* @__PURE__ */ S("div", {
194
+ className: "space-y-2",
195
+ children: D.staff.map((e, t) => /* @__PURE__ */ C("div", {
196
+ className: "flex items-center justify-between p-2 border rounded",
197
+ children: [/* @__PURE__ */ S("span", {
198
+ className: "text-sm capitalize",
199
+ children: e.role
200
+ }), /* @__PURE__ */ S(o, {
201
+ variant: "outline",
202
+ children: e.shift
203
+ })]
204
+ }, t))
205
+ }) : /* @__PURE__ */ S("p", {
206
+ className: "text-muted-foreground",
207
+ children: "No staff assigned"
208
+ }) })] })
209
+ ]
210
+ })]
211
+ })
212
+ });
213
+ }
214
+ //#endregion
215
+ export { w as default };
@@ -0,0 +1,121 @@
1
+ import { M as e, i as t, l as n, u as r } from "./PageLayout-B7b0vl0R.js";
2
+ import { t as i } from "./DataTable-CRIKfdIN.js";
3
+ import { t as a } from "./plus-Bl7uX6Ji.js";
4
+ import { t as o } from "./refresh-cw-BYjl3K-8.js";
5
+ import { t as s } from "./warehouse-DewG0PXh.js";
6
+ import { r as c } from "./graphqlClient-CdJyR_ed.js";
7
+ import { o as l } from "./useInventory-Dwn18FPz.js";
8
+ import { t as u } from "./navigation-BgnOfsVd.js";
9
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
10
+ //#region src/movethewheels/pages/WarehousesPage.tsx
11
+ function p() {
12
+ let { basePath: p, navigate: m } = c(), { warehouses: h, totalWarehouses: g, isLoading: _, refetch: v } = l(), y = (e) => m?.(u(p, e));
13
+ return /* @__PURE__ */ d(t, {
14
+ title: "Warehouses",
15
+ subtitle: `${g} warehouses`,
16
+ icon: /* @__PURE__ */ d(s, { size: 24 }),
17
+ headerActions: /* @__PURE__ */ f("div", {
18
+ className: "flex gap-2",
19
+ children: [/* @__PURE__ */ f(r, {
20
+ variant: "outline",
21
+ onClick: v,
22
+ children: [/* @__PURE__ */ d(o, { size: 16 }), " Refresh"]
23
+ }), /* @__PURE__ */ f(r, { children: [/* @__PURE__ */ d(a, { size: 16 }), " Add Warehouse"] })]
24
+ }),
25
+ children: /* @__PURE__ */ d(i, {
26
+ columns: [
27
+ {
28
+ id: "name",
29
+ header: "Warehouse",
30
+ accessorKey: "name",
31
+ sortable: !0,
32
+ cell: (e) => /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
33
+ className: "font-medium",
34
+ children: e.name
35
+ }), /* @__PURE__ */ d("p", {
36
+ className: "text-sm text-muted-foreground",
37
+ children: e.code
38
+ })] })
39
+ },
40
+ {
41
+ id: "location",
42
+ header: "Location",
43
+ cell: (e) => /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", { children: [
44
+ e.address.city,
45
+ ", ",
46
+ e.address.state
47
+ ] }), /* @__PURE__ */ d("p", {
48
+ className: "text-sm text-muted-foreground",
49
+ children: e.address.country
50
+ })] })
51
+ },
52
+ {
53
+ id: "type",
54
+ header: "Type",
55
+ accessorKey: "type",
56
+ cell: (e) => /* @__PURE__ */ d(n, {
57
+ variant: "outline",
58
+ className: "capitalize",
59
+ children: e.type.replace("_", " ")
60
+ })
61
+ },
62
+ {
63
+ id: "utilization",
64
+ header: "Utilization",
65
+ cell: (t) => {
66
+ let n = t.capacity.usedSpace / t.capacity.totalSpace * 100;
67
+ return /* @__PURE__ */ f("div", {
68
+ className: "flex items-center gap-2",
69
+ children: [/* @__PURE__ */ d(e, {
70
+ value: n,
71
+ className: "w-16 h-2"
72
+ }), /* @__PURE__ */ f("span", {
73
+ className: "text-sm",
74
+ children: [n.toFixed(0), "%"]
75
+ })]
76
+ });
77
+ }
78
+ },
79
+ {
80
+ id: "capacity",
81
+ header: "Capacity",
82
+ cell: (e) => /* @__PURE__ */ f("div", {
83
+ className: "text-sm",
84
+ children: [/* @__PURE__ */ f("p", { children: [
85
+ e.capacity.usedSpace.toLocaleString(),
86
+ " / ",
87
+ e.capacity.totalSpace.toLocaleString(),
88
+ " ",
89
+ "sq ft"
90
+ ] }), /* @__PURE__ */ f("p", {
91
+ className: "text-muted-foreground",
92
+ children: [
93
+ e.capacity.usedPallets,
94
+ " / ",
95
+ e.capacity.totalPallets,
96
+ " pallets"
97
+ ]
98
+ })]
99
+ })
100
+ },
101
+ {
102
+ id: "status",
103
+ header: "Status",
104
+ cell: (e) => /* @__PURE__ */ d(n, {
105
+ variant: e.isActive ? "default" : "secondary",
106
+ children: e.isActive ? "Active" : "Inactive"
107
+ })
108
+ }
109
+ ],
110
+ data: h,
111
+ isLoading: _,
112
+ searchable: !0,
113
+ searchPlaceholder: "Search warehouses...",
114
+ searchFields: ["name", "code"],
115
+ onRowClick: (e) => y(`inventory/warehouses/${e.id}`),
116
+ getRowId: (e) => e.id
117
+ })
118
+ });
119
+ }
120
+ //#endregion
121
+ export { p as default };
@@ -0,0 +1,11 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/arrow-left.js
3
+ var t = e("ArrowLeft", [["path", {
4
+ d: "m12 19-7-7 7-7",
5
+ key: "1l729n"
6
+ }], ["path", {
7
+ d: "M19 12H5",
8
+ key: "x3x0zl"
9
+ }]]);
10
+ //#endregion
11
+ export { t };