@burdenoff/microfe-movethewheels 2026.703.4 → 2026.703.5

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 (149) hide show
  1. package/dist/{AIAssistantPage-3YOnHO9Y.js → AIAssistantPage-D2gaEL1U.js} +16 -15
  2. package/dist/AnalyticsPage-DZMlEoBi.js +194 -0
  3. package/dist/{CreateOrderPage-DRAgGo9i.js → CreateOrderPage-CWHx8yys.js} +40 -40
  4. package/dist/{CustomerDetailsPage-BCeMmOFe.js → CustomerDetailsPage-nR4oZ_ju.js} +71 -71
  5. package/dist/CustomersPage-Bbvwvn8k.js +205 -0
  6. package/dist/DashboardPage-DrEhNf7N.js +542 -0
  7. package/dist/{DataTable-XvUcTjwi.js → DataTable-CqMUD4er.js} +31 -31
  8. package/dist/{DocumentsCard-U2lSe-cn.js → DocumentsCard-edDkgnJj.js} +25 -25
  9. package/dist/{DriverDetailsPage-BQrYd_Lp.js → DriverDetailsPage-whEMOWs9.js} +64 -64
  10. package/dist/DriversPage-CHF2ZEzd.js +221 -0
  11. package/dist/FinancePage-Dn9GrW-1.js +175 -0
  12. package/dist/{FleetPage-3ZHsB-TN.js → FleetPage-CrtGPy-p.js} +22 -22
  13. package/dist/{FormError-cuLV2jVD.js → FormError-BKcb_wT-.js} +1 -1
  14. package/dist/{ImportExportPage-C6f7DqhM.js → ImportExportPage-WYdwZomZ.js} +12 -12
  15. package/dist/InventoryPage-l5A1f753.js +259 -0
  16. package/dist/LiveTrackingPage-DhEaNKZ4.js +429 -0
  17. package/dist/{MarketplacePage-Bh_2ns4v.js → MarketplacePage-B9RYOb1Y.js} +116 -116
  18. package/dist/MetricCard-y3bWHKUQ.js +191 -0
  19. package/dist/{Notice-CSoDYKw9.js → Notice-DOO-tjpV.js} +2 -2
  20. package/dist/{OrderDetailsPage-zCj0lW0j.js → OrderDetailsPage-CwYHwk1K.js} +58 -58
  21. package/dist/OrdersListPage-DhZJoQeI.js +386 -0
  22. package/dist/{PageLayout-D4LDHJJq.js → PageLayout-BniRJaQ6.js} +1 -1
  23. package/dist/{ProductDetailsPage-wsxAQkA0.js → ProductDetailsPage-1Gm9JKy0.js} +55 -55
  24. package/dist/ProductsPage-C8sn-1tN.js +186 -0
  25. package/dist/ReportsPage-D1tb0dcz.js +377 -0
  26. package/dist/{RouteDetailsPage-DyMJE9AS.js → RouteDetailsPage-CkMyR9b_.js} +208 -181
  27. package/dist/{RoutesPage-Dtc669yc.js → RoutesPage-QkENzsE5.js} +12 -12
  28. package/dist/{SettingsPage-CpH9xhQg.js → SettingsPage-DV3_tU_X.js} +15 -15
  29. package/dist/Sparkline-K2RMJ58u.js +16729 -0
  30. package/dist/{StatusBadge-C87mDpDP.js → StatusBadge-BNHXYvZx.js} +7 -7
  31. package/dist/TrackingPage-BZrg4RCu.js +368 -0
  32. package/dist/{VehicleDetailsPage-DldYNsYV.js → VehicleDetailsPage-D-8XPZ2G.js} +53 -53
  33. package/dist/VehiclesPage-D5BELbtM.js +184 -0
  34. package/dist/{WarehouseDetailsPage-CMG7or6G.js → WarehouseDetailsPage-Cmg-8Frn.js} +64 -64
  35. package/dist/WarehousesPage-C1Y1M867.js +182 -0
  36. package/dist/{arrow-left-n48Y-Wis.js → arrow-left-ClW4Isj7.js} +1 -1
  37. package/dist/{arrow-right-Q3XQpTPR.js → arrow-right-CmKOmIkh.js} +1 -1
  38. package/dist/{arrow-up-xNF1zJUG.js → arrow-up-BJijRLAZ.js} +1 -1
  39. package/dist/{box-Eu05PXDh.js → box-BT3NsRQP.js} +1 -1
  40. package/dist/boxes-B_OGvQiW.js +54 -0
  41. package/dist/{chart-column-ouzgxIv_.js → chart-column-DQTTdUPk.js} +1 -1
  42. package/dist/charts-Tj_PPTfA.js +2018 -0
  43. package/dist/{chevron-left-B2_r0Elx.js → chevron-left-B1rZyWWb.js} +1 -1
  44. package/dist/{chevron-right-eV4LjaSi.js → chevron-right-BIcwUJZq.js} +1 -1
  45. package/dist/chunk-BdsCSvBP.js +20 -0
  46. package/dist/{circle-alert-Bzh2DBSF.js → circle-alert-CNkuDNc6.js} +1 -1
  47. package/dist/circle-check-Cs1OVjtV.js +13 -0
  48. package/dist/{circle-check-big-CGMSpQmD.js → circle-check-big-C-p4eNwn.js} +1 -1
  49. package/dist/{clock-Bl3ptexL.js → clock-dRGG4rkF.js} +1 -1
  50. package/dist/{dollar-sign-CAVU95SO.js → dollar-sign-B6RoYHHz.js} +1 -1
  51. package/dist/{download-C5NbvVDc.js → download-DP04iWTd.js} +1 -1
  52. package/dist/{file-text-D-1uvLZG.js → file-text-BuDx4hZp.js} +1 -1
  53. package/dist/{filter-DUfUg6BO.js → filter-BD483_8g.js} +1 -1
  54. package/dist/{fuel-B6_lnKDs.js → fuel-DLH1ag04.js} +1 -1
  55. package/dist/index.css +2 -0
  56. package/dist/index.js +214 -225
  57. package/dist/{map-C-M-FQLR.js → map-DNQn9fyY.js} +1 -1
  58. package/dist/{map-pin-Dznl5l40.js → map-pin-CqN1bbT1.js} +1 -1
  59. package/dist/mapMarkers-NCV9MRKR.js +28 -0
  60. package/dist/maps-yzLqiK_C.js +5070 -0
  61. package/dist/{navigation-BJSJl-VG.js → navigation-CgGUt2tR.js} +1 -1
  62. package/dist/{package-CcRttV2N.js → package-DmRF7iQD.js} +1 -1
  63. package/dist/{phone-DVSZHt_j.js → phone-Cl32EXKW.js} +1 -1
  64. package/dist/{plus-C_XZDwBz.js → plus-DlANgOFx.js} +1 -1
  65. package/dist/{refresh-cw-CfgN67l3.js → refresh-cw-rW59D4b7.js} +1 -1
  66. package/dist/route-CWjPrtAN.js +22 -0
  67. package/dist/{save-DJE8Fpdv.js → save-UDlog7hg.js} +1 -1
  68. package/dist/{search-D_VyGcZT.js → search-DNIG5Ck7.js} +1 -1
  69. package/dist/{square-pen-D-6JYrVQ.js → square-pen-BcfB3Grd.js} +1 -1
  70. package/dist/{star-BpRlUZuU.js → star-CVZHFwDx.js} +1 -1
  71. package/dist/{store-B-8HMuyZ.js → store-bwnmCK9f.js} +1 -1
  72. package/dist/{trash-2-8vmv-XV_.js → trash-2-B80G12d4.js} +1 -1
  73. package/dist/{trending-up-Dz6PqPRj.js → trending-up-CH4R4KOa.js} +1 -1
  74. package/dist/{triangle-alert-D7Y3J_4z.js → triangle-alert-CmS8AUU6.js} +1 -1
  75. package/dist/{truck-D-y2IDzv.js → truck-9rLDncav.js} +1 -1
  76. package/dist/{upload-CHZofOqb.js → upload-DanJY1Vo.js} +1 -1
  77. package/dist/{useAssistant-DVW4QgQb.js → useAssistant-CnEwkTLm.js} +11 -28
  78. package/dist/{useCustomers-BPW4__PR.js → useCustomers-ChJao1ET.js} +1 -1
  79. package/dist/{useFleet-ChBkxAd6.js → useFleet-g5Yri0G8.js} +1 -1
  80. package/dist/{useImportExport-DrPDHEDK.js → useImportExport-MYwIT3rE.js} +1 -1
  81. package/dist/{useInventory-CAAVMRp6.js → useInventory-BSOn-R1c.js} +1 -1
  82. package/dist/{useOrders-B465S2nt.js → useOrders-BSiqo61w.js} +1 -1
  83. package/dist/{useReports-jQ3GpNOm.js → useReports-fWESfsF9.js} +1 -1
  84. package/dist/{useRoutes-hS3d5-xr.js → useRoutes-zD8Yp323.js} +1 -1
  85. package/dist/{useSettings-BB8X2RLh.js → useSettings-B1lsWeZ1.js} +6 -6
  86. package/dist/{useTracking-RjGz9PZG.js → useTracking-BKG0I2ln.js} +3 -3
  87. package/dist/{user-DzfTn4dE.js → user-DU51el3m.js} +1 -1
  88. package/dist/{user-check-BEKRCi7v.js → user-check-IMhk-qkX.js} +1 -1
  89. package/dist/{users-CCrq-w0C.js → users-B8KhJBGg.js} +1 -1
  90. package/dist/{warehouse-CaqfmMKh.js → warehouse-CcMMioeY.js} +1 -1
  91. package/dist/{wrench-q_rgJfaP.js → wrench-Dg-sgH2e.js} +1 -1
  92. package/dist/{x-tMeDMcCw.js → x-C4ObLVEa.js} +1 -1
  93. package/package.json +5 -1
  94. package/src/movethewheels/components/GlassPanel.tsx +71 -0
  95. package/src/movethewheels/components/MetricCard.tsx +171 -73
  96. package/src/movethewheels/components/StatusBadge.tsx +7 -6
  97. package/src/movethewheels/components/charts/ChartShell.tsx +78 -0
  98. package/src/movethewheels/components/charts/Sparkline.tsx +85 -0
  99. package/src/movethewheels/components/charts/StatusDonut.tsx +115 -0
  100. package/src/movethewheels/components/charts/TrendChart.tsx +179 -0
  101. package/src/movethewheels/components/charts/VolumeBar.tsx +97 -0
  102. package/src/movethewheels/components/charts/chartTokens.ts +43 -0
  103. package/src/movethewheels/components/charts/index.ts +9 -0
  104. package/src/movethewheels/components/index.ts +44 -1
  105. package/src/movethewheels/components/maps/LogisticsMap.tsx +94 -0
  106. package/src/movethewheels/components/maps/MapCanvas.tsx +118 -0
  107. package/src/movethewheels/components/maps/RouteMap.tsx +71 -0
  108. package/src/movethewheels/components/maps/TrackingMap.tsx +102 -0
  109. package/src/movethewheels/components/maps/index.ts +16 -0
  110. package/src/movethewheels/components/maps/leaflet-setup.ts +124 -0
  111. package/src/movethewheels/components/maps/map-markers.css +121 -0
  112. package/src/movethewheels/hooks/useAnalytics.ts +14 -4
  113. package/src/movethewheels/pages/AnalyticsPage.tsx +93 -73
  114. package/src/movethewheels/pages/CreateOrderPage.tsx +4 -4
  115. package/src/movethewheels/pages/CustomersPage.tsx +29 -20
  116. package/src/movethewheels/pages/DashboardPage.tsx +238 -12
  117. package/src/movethewheels/pages/DriverDetailsPage.tsx +1 -1
  118. package/src/movethewheels/pages/DriversPage.tsx +35 -24
  119. package/src/movethewheels/pages/FinancePage.tsx +68 -30
  120. package/src/movethewheels/pages/InventoryPage.tsx +15 -3
  121. package/src/movethewheels/pages/LiveTrackingPage.tsx +124 -16
  122. package/src/movethewheels/pages/OrdersListPage.tsx +46 -38
  123. package/src/movethewheels/pages/ProductsPage.tsx +28 -24
  124. package/src/movethewheels/pages/ReportsPage.tsx +23 -0
  125. package/src/movethewheels/pages/RouteDetailsPage.tsx +46 -7
  126. package/src/movethewheels/pages/SettingsPage.tsx +2 -2
  127. package/src/movethewheels/pages/TrackingPage.tsx +76 -6
  128. package/src/movethewheels/pages/VehicleDetailsPage.tsx +1 -1
  129. package/src/movethewheels/pages/VehiclesPage.tsx +34 -24
  130. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +1 -1
  131. package/src/movethewheels/pages/WarehousesPage.tsx +28 -22
  132. package/src/movethewheels/types/index.ts +1 -1
  133. package/src/movethewheels/utils/mapMarkers.ts +58 -0
  134. package/dist/AnalyticsPage-CMpI1070.js +0 -215
  135. package/dist/CustomersPage-CaNBMXmM.js +0 -172
  136. package/dist/DashboardPage-DIKlXde3.js +0 -387
  137. package/dist/DriversPage-PYmdFiby.js +0 -176
  138. package/dist/FinancePage-Cwh9Bw4M.js +0 -136
  139. package/dist/InventoryPage-DpiqVu1v.js +0 -253
  140. package/dist/LiveTrackingPage-FAzzlVnX.js +0 -379
  141. package/dist/MetricCard-CVBVpu7o.js +0 -146
  142. package/dist/OrdersListPage-CAMsuUck.js +0 -384
  143. package/dist/ProductsPage-DC5qDLfz.js +0 -180
  144. package/dist/ReportsPage-BwUJ37eO.js +0 -356
  145. package/dist/TrackingPage-DaNEFG_h.js +0 -325
  146. package/dist/VehiclesPage-BFw13iMt.js +0 -176
  147. package/dist/WarehousesPage-Wkytnt86.js +0 -173
  148. package/dist/useAnalytics-D7HW2XRb.js +0 -347
  149. /package/dist/{formatters-BQr-aR5W.js → formatters-FWJDwTFv.js} +0 -0
@@ -1,12 +1,13 @@
1
- import { A as e, N as t, d as n, f as r, g as i, h as a, i as o, l as s, lt as c, u as l } from "./PageLayout-D4LDHJJq.js";
2
- import { n as u, r as d, t as f } from "./useAssistant-DVW4QgQb.js";
3
- import { t as p } from "./circle-alert-Bzh2DBSF.js";
4
- import { t as m } from "./trending-up-Dz6PqPRj.js";
1
+ import { A as e, N as t, d as n, f as r, g as i, h as a, i as o, l as s, u as c, ut as l } from "./PageLayout-BniRJaQ6.js";
2
+ import { n as u, t as d } from "./useAssistant-CnEwkTLm.js";
3
+ import { t as f } from "./circle-alert-CNkuDNc6.js";
4
+ import { t as p } from "./route-CWjPrtAN.js";
5
+ import { t as m } from "./trending-up-CH4R4KOa.js";
5
6
  import { useState as h } from "react";
6
7
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
7
8
  import { GlassCard as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
8
9
  //#region node_modules/lucide-react/dist/esm/icons/lightbulb.js
9
- var b = c("Lightbulb", [
10
+ var b = l("Lightbulb", [
10
11
  ["path", {
11
12
  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",
12
13
  key: "1gvzjb"
@@ -19,13 +20,13 @@ var b = c("Lightbulb", [
19
20
  d: "M10 22h4",
20
21
  key: "ceow96"
21
22
  }]
22
- ]), x = c("Send", [["path", {
23
+ ]), x = l("Send", [["path", {
23
24
  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",
24
25
  key: "1ffxy3"
25
26
  }], ["path", {
26
27
  d: "m21.854 2.147-10.94 10.939",
27
28
  key: "12cjpa"
28
- }]]), S = c("Sparkles", [
29
+ }]]), S = l("Sparkles", [
29
30
  ["path", {
30
31
  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",
31
32
  key: "4pj2yx"
@@ -50,12 +51,12 @@ var b = c("Lightbulb", [
50
51
  //#endregion
51
52
  //#region src/movethewheels/pages/AIAssistantPage.tsx
52
53
  function C() {
53
- let { ask: c, isLoading: C } = f(), [w, T] = h(""), [E, D] = h([{
54
+ let { ask: l, isLoading: C } = d(), [w, T] = h(""), [E, D] = h([{
54
55
  role: "assistant",
55
56
  content: "Hello! I'm your logistics assistant. Ask me about your orders, deliveries, fleet or inventory and I'll answer from your live operational data."
56
57
  }]), O = [
57
58
  {
58
- icon: u,
59
+ icon: p,
59
60
  text: "Optimize today's delivery routes",
60
61
  category: "Route Planning"
61
62
  },
@@ -65,7 +66,7 @@ function C() {
65
66
  category: "Analytics"
66
67
  },
67
68
  {
68
- icon: p,
69
+ icon: f,
69
70
  text: "Identify potential delivery delays",
70
71
  category: "Alerts"
71
72
  },
@@ -88,7 +89,7 @@ function C() {
88
89
  content: t
89
90
  }]);
90
91
  try {
91
- let e = await c(t);
92
+ let e = await l(t);
92
93
  D((t) => [...t, {
93
94
  role: "assistant",
94
95
  content: e.answer
@@ -107,9 +108,9 @@ function C() {
107
108
  return /* @__PURE__ */ _(o, {
108
109
  title: "AI Assistant",
109
110
  subtitle: "Intelligent logistics support",
110
- icon: /* @__PURE__ */ g(d, { size: 24 }),
111
+ icon: /* @__PURE__ */ g(u, { size: 24 }),
111
112
  children: [/* @__PURE__ */ g(y, {
112
- icon: /* @__PURE__ */ g(d, { size: 18 }),
113
+ icon: /* @__PURE__ */ g(u, { size: 18 }),
113
114
  children: "Ask plain-English questions about your operation and get answers backed by your own data. Use it to optimize routes, forecast demand, spot likely delays, and run what-if scenarios (e.g. “what if I add two vehicles?”) — like having a logistics analyst on call."
114
115
  }), /* @__PURE__ */ _("div", {
115
116
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
@@ -169,7 +170,7 @@ function C() {
169
170
  placeholder: "Ask me anything about your logistics operations...",
170
171
  disabled: C,
171
172
  onKeyPress: (e) => e.key === "Enter" && j()
172
- }), /* @__PURE__ */ g(l, {
173
+ }), /* @__PURE__ */ g(c, {
173
174
  onClick: j,
174
175
  disabled: C || !w.trim(),
175
176
  children: /* @__PURE__ */ g(x, { size: 16 })
@@ -183,7 +184,7 @@ function C() {
183
184
  children: [
184
185
  /* @__PURE__ */ _(n, { children: [/* @__PURE__ */ g(a, { children: /* @__PURE__ */ g(i, { children: "Quick Actions" }) }), /* @__PURE__ */ g(r, {
185
186
  className: "space-y-2",
186
- children: O.map((e, t) => /* @__PURE__ */ _(l, {
187
+ children: O.map((e, t) => /* @__PURE__ */ _(c, {
187
188
  variant: "outline",
188
189
  className: "w-full justify-start text-left h-auto py-3",
189
190
  disabled: C,
@@ -0,0 +1,194 @@
1
+ import { M as e, d as t, f as n, g as r, h as i, i as a, u as o } from "./PageLayout-BniRJaQ6.js";
2
+ import { t as s } from "./chart-column-DQTTdUPk.js";
3
+ import { t as c } from "./dollar-sign-B6RoYHHz.js";
4
+ import { t as l } from "./package-DmRF7iQD.js";
5
+ import { t as u } from "./star-CVZHFwDx.js";
6
+ import { t as d } from "./trending-up-CH4R4KOa.js";
7
+ import { t as f } from "./users-B8KhJBGg.js";
8
+ import { l as p, n as m, o as h, r as g, t as _, u as v } from "./charts-Tj_PPTfA.js";
9
+ import { n as y, r as b, t as x } from "./MetricCard-y3bWHKUQ.js";
10
+ import { n as S } from "./formatters-FWJDwTFv.js";
11
+ import { useMemo as C } from "react";
12
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
13
+ import { EmphasisPanel as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
14
+ //#region src/movethewheels/pages/AnalyticsPage.tsx
15
+ var O = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
16
+ function k() {
17
+ let { analytics: k, isLoading: A, error: j, refetch: M } = h(), { orderData: N } = v(), { fleetData: P } = p(), F = C(() => k.trends.dailyOrders.map((e) => e.orders), [k.trends.dailyOrders]), I = C(() => k.trends.revenue.map((e) => ({
18
+ month: e.month,
19
+ revenue: e.revenue
20
+ })), [k.trends.revenue]), L = C(() => N.byStatus.filter((e) => e.count > 0).map((e) => ({
21
+ name: O(e.status),
22
+ value: e.count
23
+ })), [N.byStatus]), R = L.reduce((e, t) => e + t.value, 0);
24
+ return /* @__PURE__ */ T(a, {
25
+ title: "Analytics",
26
+ subtitle: "Business performance and insights",
27
+ icon: /* @__PURE__ */ w(s, { size: 24 }),
28
+ children: [
29
+ /* @__PURE__ */ w(D, {
30
+ icon: /* @__PURE__ */ w(s, { size: 18 }),
31
+ children: "See how the operation is really performing. Track order volume, revenue, on-time rate and customer satisfaction over time so you can spot trends, find bottlenecks, and decide where to invest — whether that's more vehicles, better routes, or new customers."
32
+ }),
33
+ j && !A ? /* @__PURE__ */ w(t, {
34
+ className: "border-status-error-border",
35
+ children: /* @__PURE__ */ T(n, {
36
+ className: "p-6 text-center space-y-3",
37
+ children: [
38
+ /* @__PURE__ */ w("p", {
39
+ className: "text-status-error-text font-medium",
40
+ children: "Couldn't load analytics"
41
+ }),
42
+ /* @__PURE__ */ w("p", {
43
+ className: "text-sm text-text-secondary",
44
+ children: j.message
45
+ }),
46
+ /* @__PURE__ */ w(o, {
47
+ variant: "outline",
48
+ onClick: M,
49
+ children: "Retry"
50
+ })
51
+ ]
52
+ })
53
+ }) : A ? /* @__PURE__ */ w(b, {
54
+ columns: 4,
55
+ children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ w(y, {}, t))
56
+ }) : /* @__PURE__ */ T(b, {
57
+ columns: 4,
58
+ children: [
59
+ /* @__PURE__ */ w(x, {
60
+ label: "Order Volume",
61
+ value: k.overview.totalOrders.toLocaleString(),
62
+ icon: /* @__PURE__ */ w(l, { size: 20 }),
63
+ accent: "brand",
64
+ sparklineData: F.length >= 2 ? F : void 0
65
+ }),
66
+ /* @__PURE__ */ w(x, {
67
+ treatment: "glass",
68
+ glow: !0,
69
+ label: "Revenue",
70
+ value: S(k.overview.totalRevenue),
71
+ icon: /* @__PURE__ */ w(c, { size: 20 }),
72
+ accent: "success"
73
+ }),
74
+ /* @__PURE__ */ w(x, {
75
+ label: "On-Time Delivery",
76
+ value: `${k.overview.onTimeDeliveryRate.toFixed(1)}%`,
77
+ icon: /* @__PURE__ */ w(d, { size: 20 }),
78
+ accent: "blue",
79
+ delta: k.overview.onTimeDeliveryRate >= 90 ? {
80
+ value: "On target",
81
+ direction: "up"
82
+ } : {
83
+ value: "Below 90%",
84
+ direction: "down"
85
+ }
86
+ }),
87
+ /* @__PURE__ */ w(x, {
88
+ label: "Customer Satisfaction",
89
+ value: k.overview.customerSatisfaction.toFixed(1),
90
+ icon: /* @__PURE__ */ w(u, { size: 20 }),
91
+ accent: "warning",
92
+ subtitle: "out of 5"
93
+ })
94
+ ]
95
+ }),
96
+ /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(r, { children: "Order & delivery trend" }) }), /* @__PURE__ */ w(n, { children: /* @__PURE__ */ w(g, {
97
+ xKey: "date",
98
+ height: 300,
99
+ data: k.trends.dailyOrders,
100
+ series: [{
101
+ dataKey: "orders",
102
+ name: "Orders"
103
+ }, {
104
+ dataKey: "deliveries",
105
+ name: "Deliveries"
106
+ }],
107
+ emptyMessage: "No order trend recorded yet"
108
+ }) })] }),
109
+ /* @__PURE__ */ T("div", {
110
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
111
+ children: [/* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(r, { children: "Revenue by month" }) }), /* @__PURE__ */ w(n, { children: /* @__PURE__ */ w(m, {
112
+ xKey: "month",
113
+ height: 280,
114
+ showLegend: !1,
115
+ data: I,
116
+ series: [{
117
+ dataKey: "revenue",
118
+ name: "Revenue"
119
+ }],
120
+ valueFormatter: (e) => S(Number(e)),
121
+ emptyMessage: "No revenue recorded yet"
122
+ }) })] }), /* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(r, { children: "Orders by status" }) }), /* @__PURE__ */ w(n, { children: /* @__PURE__ */ w(_, {
123
+ data: L,
124
+ height: 240,
125
+ centerLabel: R.toLocaleString(),
126
+ centerSubLabel: "orders",
127
+ emptyMessage: "No orders to break down yet"
128
+ }) })] })]
129
+ }),
130
+ /* @__PURE__ */ T("div", {
131
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
132
+ children: [/* @__PURE__ */ T(t, { children: [/* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(r, { children: "Fleet Performance" }) }), /* @__PURE__ */ T(n, {
133
+ className: "space-y-4",
134
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
135
+ className: "flex justify-between text-sm mb-1",
136
+ children: [/* @__PURE__ */ w("span", { children: "Vehicle Utilization" }), /* @__PURE__ */ T("span", { children: [P.vehicleUtilization.toFixed(0), "%"] })]
137
+ }), /* @__PURE__ */ w(e, { value: P.vehicleUtilization })] }), P.vehiclesByType.length > 0 && /* @__PURE__ */ T("div", {
138
+ className: "pt-2",
139
+ children: [/* @__PURE__ */ w("p", {
140
+ className: "text-sm text-text-secondary mb-2",
141
+ children: "Vehicles by Type"
142
+ }), P.vehiclesByType.map(({ type: e, count: t }) => /* @__PURE__ */ T("div", {
143
+ className: "flex justify-between text-sm py-1",
144
+ children: [/* @__PURE__ */ w("span", {
145
+ className: "capitalize",
146
+ children: e
147
+ }), /* @__PURE__ */ w("span", {
148
+ className: "font-medium",
149
+ children: t
150
+ })]
151
+ }, e))]
152
+ })]
153
+ })] }), /* @__PURE__ */ T(E, {
154
+ className: "space-y-4",
155
+ children: [
156
+ /* @__PURE__ */ w("h2", {
157
+ className: "text-base font-semibold text-text-primary",
158
+ children: "Performance Metrics"
159
+ }),
160
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
161
+ className: "text-sm text-text-secondary",
162
+ children: "On-Time Delivery"
163
+ }), /* @__PURE__ */ T("p", {
164
+ className: "text-2xl font-bold",
165
+ children: [k.performance.onTimeDelivery.toFixed(1), "%"]
166
+ })] }),
167
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
168
+ className: "text-sm text-text-secondary",
169
+ children: "Customer Satisfaction"
170
+ }), /* @__PURE__ */ T("p", {
171
+ className: "text-2xl font-bold",
172
+ children: [k.overview.customerSatisfaction.toFixed(1), "/5"]
173
+ })] }),
174
+ /* @__PURE__ */ T("div", {
175
+ className: "flex items-center gap-2",
176
+ children: [/* @__PURE__ */ w(f, {
177
+ size: 16,
178
+ className: "text-text-secondary"
179
+ }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
180
+ className: "text-sm text-text-secondary",
181
+ children: "Driver Ratings"
182
+ }), /* @__PURE__ */ T("p", {
183
+ className: "text-2xl font-bold",
184
+ children: [k.performance.driverRatings.toFixed(1), "/5"]
185
+ })] })]
186
+ })
187
+ ]
188
+ })]
189
+ })
190
+ ]
191
+ });
192
+ }
193
+ //#endregion
194
+ export { k as default };
@@ -1,14 +1,14 @@
1
- import { A as e, F as t, I as n, L as r, P as i, Q as a, R as o, ct as s, d as c, f as l, g as u, h as d, i as f, j as p, ot as m, t as h, u as g, z as _ } from "./PageLayout-D4LDHJJq.js";
2
- import { t as v } from "./arrow-left-n48Y-Wis.js";
3
- import { t as y } from "./map-pin-Dznl5l40.js";
4
- import { t as b } from "./package-CcRttV2N.js";
5
- import { t as x } from "./plus-C_XZDwBz.js";
6
- import { t as S } from "./save-DJE8Fpdv.js";
7
- import { t as C } from "./trash-2-8vmv-XV_.js";
8
- import { t as w } from "./users-CCrq-w0C.js";
9
- import { r as T, t as ee } from "./useOrders-B465S2nt.js";
10
- import { r as te } from "./useCustomers-BPW4__PR.js";
11
- import { t as E } from "./FormError-cuLV2jVD.js";
1
+ import { A as e, F as t, I as n, L as r, P as i, Q as a, R as o, d as s, f as c, g as l, h as u, i as d, j as f, lt as p, st as m, t as h, u as g, z as _ } from "./PageLayout-BniRJaQ6.js";
2
+ import { t as v } from "./arrow-left-ClW4Isj7.js";
3
+ import { t as y } from "./map-pin-CqN1bbT1.js";
4
+ import { t as b } from "./package-DmRF7iQD.js";
5
+ import { t as x } from "./plus-DlANgOFx.js";
6
+ import { t as S } from "./save-UDlog7hg.js";
7
+ import { t as C } from "./trash-2-B80G12d4.js";
8
+ import { t as w } from "./users-B8KhJBGg.js";
9
+ import { r as T, t as ee } from "./useOrders-BSiqo61w.js";
10
+ import { r as te } from "./useCustomers-ChJao1ET.js";
11
+ import { t as E } from "./FormError-BKcb_wT-.js";
12
12
  import { useState as D } from "react";
13
13
  import { useParams as O } from "react-router-dom";
14
14
  import { jsx as k, jsxs as A } from "react/jsx-runtime";
@@ -36,7 +36,7 @@ function P() {
36
36
  items: L?.items || [],
37
37
  specialInstructions: L?.specialInstructions || ""
38
38
  }), [U, W] = D(!1), [G, K] = D(null), q = () => {
39
- I && I(s(F, "orders"));
39
+ I && I(p(F, "orders"));
40
40
  }, J = () => {
41
41
  let e = z.find((e) => e.id === V.customerId);
42
42
  return !V.customerId || !e ? "Select a customer for this order." : V.pickupAddress.street.trim() ? V.deliveryAddress.street.trim() ? V.items.length === 0 ? "Add at least one item to the order." : null : "Enter a delivery street address." : "Enter a pickup street address.";
@@ -120,7 +120,7 @@ function P() {
120
120
  } : r)
121
121
  }));
122
122
  };
123
- return /* @__PURE__ */ A(f, {
123
+ return /* @__PURE__ */ A(d, {
124
124
  title: B ? "Edit Order" : "Create Order",
125
125
  subtitle: B ? `Editing ${L?.orderNumber}` : "Create a new delivery order",
126
126
  icon: /* @__PURE__ */ k(b, { size: 24 }),
@@ -185,7 +185,7 @@ function P() {
185
185
  children: [
186
186
  /* @__PURE__ */ A("div", {
187
187
  className: "space-y-2",
188
- children: [/* @__PURE__ */ k(p, {
188
+ children: [/* @__PURE__ */ k(f, {
189
189
  htmlFor: "customer",
190
190
  children: "Customer"
191
191
  }), /* @__PURE__ */ A(i, {
@@ -207,7 +207,7 @@ function P() {
207
207
  }),
208
208
  /* @__PURE__ */ A("div", {
209
209
  className: "space-y-2",
210
- children: [/* @__PURE__ */ k(p, {
210
+ children: [/* @__PURE__ */ k(f, {
211
211
  htmlFor: "orderType",
212
212
  children: "Order Type"
213
213
  }), /* @__PURE__ */ A(i, {
@@ -227,7 +227,7 @@ function P() {
227
227
  }),
228
228
  /* @__PURE__ */ A("div", {
229
229
  className: "space-y-2",
230
- children: [/* @__PURE__ */ k(p, {
230
+ children: [/* @__PURE__ */ k(f, {
231
231
  htmlFor: "priority",
232
232
  children: "Priority"
233
233
  }), /* @__PURE__ */ A(i, {
@@ -261,12 +261,12 @@ function P() {
261
261
  })] }),
262
262
  /* @__PURE__ */ A("div", {
263
263
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
264
- children: [/* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(u, { children: "Pickup Address" }) }), /* @__PURE__ */ A(l, {
264
+ children: [/* @__PURE__ */ A(s, { children: [/* @__PURE__ */ k(u, { children: /* @__PURE__ */ k(l, { children: "Pickup Address" }) }), /* @__PURE__ */ A(c, {
265
265
  className: "space-y-4",
266
266
  children: [
267
267
  /* @__PURE__ */ A("div", {
268
268
  className: "space-y-2",
269
- children: [/* @__PURE__ */ k(p, {
269
+ children: [/* @__PURE__ */ k(f, {
270
270
  htmlFor: "pickupStreet",
271
271
  children: "Street Address"
272
272
  }), /* @__PURE__ */ k(e, {
@@ -277,10 +277,10 @@ function P() {
277
277
  })]
278
278
  }),
279
279
  /* @__PURE__ */ A("div", {
280
- className: "grid grid-cols-2 gap-4",
280
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
281
281
  children: [/* @__PURE__ */ A("div", {
282
282
  className: "space-y-2",
283
- children: [/* @__PURE__ */ k(p, {
283
+ children: [/* @__PURE__ */ k(f, {
284
284
  htmlFor: "pickupCity",
285
285
  children: "City"
286
286
  }), /* @__PURE__ */ k(e, {
@@ -291,7 +291,7 @@ function P() {
291
291
  })]
292
292
  }), /* @__PURE__ */ A("div", {
293
293
  className: "space-y-2",
294
- children: [/* @__PURE__ */ k(p, {
294
+ children: [/* @__PURE__ */ k(f, {
295
295
  htmlFor: "pickupState",
296
296
  children: "State"
297
297
  }), /* @__PURE__ */ k(e, {
@@ -303,10 +303,10 @@ function P() {
303
303
  })]
304
304
  }),
305
305
  /* @__PURE__ */ A("div", {
306
- className: "grid grid-cols-2 gap-4",
306
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
307
307
  children: [/* @__PURE__ */ A("div", {
308
308
  className: "space-y-2",
309
- children: [/* @__PURE__ */ k(p, {
309
+ children: [/* @__PURE__ */ k(f, {
310
310
  htmlFor: "pickupPostal",
311
311
  children: "Postal Code"
312
312
  }), /* @__PURE__ */ k(e, {
@@ -317,7 +317,7 @@ function P() {
317
317
  })]
318
318
  }), /* @__PURE__ */ A("div", {
319
319
  className: "space-y-2",
320
- children: [/* @__PURE__ */ k(p, {
320
+ children: [/* @__PURE__ */ k(f, {
321
321
  htmlFor: "pickupCountry",
322
322
  children: "Country"
323
323
  }), /* @__PURE__ */ k(e, {
@@ -329,12 +329,12 @@ function P() {
329
329
  })]
330
330
  })
331
331
  ]
332
- })] }), /* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(u, { children: "Delivery Address" }) }), /* @__PURE__ */ A(l, {
332
+ })] }), /* @__PURE__ */ A(s, { children: [/* @__PURE__ */ k(u, { children: /* @__PURE__ */ k(l, { children: "Delivery Address" }) }), /* @__PURE__ */ A(c, {
333
333
  className: "space-y-4",
334
334
  children: [
335
335
  /* @__PURE__ */ A("div", {
336
336
  className: "space-y-2",
337
- children: [/* @__PURE__ */ k(p, {
337
+ children: [/* @__PURE__ */ k(f, {
338
338
  htmlFor: "deliveryStreet",
339
339
  children: "Street Address"
340
340
  }), /* @__PURE__ */ k(e, {
@@ -345,10 +345,10 @@ function P() {
345
345
  })]
346
346
  }),
347
347
  /* @__PURE__ */ A("div", {
348
- className: "grid grid-cols-2 gap-4",
348
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
349
349
  children: [/* @__PURE__ */ A("div", {
350
350
  className: "space-y-2",
351
- children: [/* @__PURE__ */ k(p, {
351
+ children: [/* @__PURE__ */ k(f, {
352
352
  htmlFor: "deliveryCity",
353
353
  children: "City"
354
354
  }), /* @__PURE__ */ k(e, {
@@ -359,7 +359,7 @@ function P() {
359
359
  })]
360
360
  }), /* @__PURE__ */ A("div", {
361
361
  className: "space-y-2",
362
- children: [/* @__PURE__ */ k(p, {
362
+ children: [/* @__PURE__ */ k(f, {
363
363
  htmlFor: "deliveryState",
364
364
  children: "State"
365
365
  }), /* @__PURE__ */ k(e, {
@@ -371,10 +371,10 @@ function P() {
371
371
  })]
372
372
  }),
373
373
  /* @__PURE__ */ A("div", {
374
- className: "grid grid-cols-2 gap-4",
374
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
375
375
  children: [/* @__PURE__ */ A("div", {
376
376
  className: "space-y-2",
377
- children: [/* @__PURE__ */ k(p, {
377
+ children: [/* @__PURE__ */ k(f, {
378
378
  htmlFor: "deliveryPostal",
379
379
  children: "Postal Code"
380
380
  }), /* @__PURE__ */ k(e, {
@@ -385,7 +385,7 @@ function P() {
385
385
  })]
386
386
  }), /* @__PURE__ */ A("div", {
387
387
  className: "space-y-2",
388
- children: [/* @__PURE__ */ k(p, {
388
+ children: [/* @__PURE__ */ k(f, {
389
389
  htmlFor: "deliveryCountry",
390
390
  children: "Country"
391
391
  }), /* @__PURE__ */ k(e, {
@@ -399,16 +399,16 @@ function P() {
399
399
  ]
400
400
  })] })]
401
401
  }),
402
- /* @__PURE__ */ A(c, { children: [/* @__PURE__ */ A(d, {
402
+ /* @__PURE__ */ A(s, { children: [/* @__PURE__ */ A(u, {
403
403
  className: "flex flex-row items-center justify-between",
404
- children: [/* @__PURE__ */ k(u, { children: "Order Items" }), /* @__PURE__ */ A(g, {
404
+ children: [/* @__PURE__ */ k(l, { children: "Order Items" }), /* @__PURE__ */ A(g, {
405
405
  type: "button",
406
406
  variant: "outline",
407
407
  size: "sm",
408
408
  onClick: Q,
409
409
  children: [/* @__PURE__ */ k(x, { size: 16 }), "Add Item"]
410
410
  })]
411
- }), /* @__PURE__ */ k(l, { children: V.items.length === 0 ? /* @__PURE__ */ k(h, {
411
+ }), /* @__PURE__ */ k(c, { children: V.items.length === 0 ? /* @__PURE__ */ k(h, {
412
412
  illustration: "empty-files",
413
413
  title: "No items added yet",
414
414
  description: "Add the products this order will ship — each with a name, SKU, quantity and value.",
@@ -428,7 +428,7 @@ function P() {
428
428
  children: [
429
429
  /* @__PURE__ */ A("div", {
430
430
  className: "md:col-span-2 space-y-2",
431
- children: [/* @__PURE__ */ k(p, { children: "Item Name" }), /* @__PURE__ */ k(e, {
431
+ children: [/* @__PURE__ */ k(f, { children: "Item Name" }), /* @__PURE__ */ k(e, {
432
432
  value: t.name,
433
433
  onChange: (e) => $(n, "name", e.target.value),
434
434
  placeholder: "Product name"
@@ -436,7 +436,7 @@ function P() {
436
436
  }),
437
437
  /* @__PURE__ */ A("div", {
438
438
  className: "space-y-2",
439
- children: [/* @__PURE__ */ k(p, { children: "SKU" }), /* @__PURE__ */ k(e, {
439
+ children: [/* @__PURE__ */ k(f, { children: "SKU" }), /* @__PURE__ */ k(e, {
440
440
  value: t.sku,
441
441
  onChange: (e) => $(n, "sku", e.target.value),
442
442
  placeholder: "SKU-001"
@@ -444,7 +444,7 @@ function P() {
444
444
  }),
445
445
  /* @__PURE__ */ A("div", {
446
446
  className: "space-y-2",
447
- children: [/* @__PURE__ */ k(p, { children: "Quantity" }), /* @__PURE__ */ k(e, {
447
+ children: [/* @__PURE__ */ k(f, { children: "Quantity" }), /* @__PURE__ */ k(e, {
448
448
  type: "number",
449
449
  min: "1",
450
450
  value: t.quantity,
@@ -453,7 +453,7 @@ function P() {
453
453
  }),
454
454
  /* @__PURE__ */ A("div", {
455
455
  className: "space-y-2",
456
- children: [/* @__PURE__ */ k(p, { children: "Value ($)" }), /* @__PURE__ */ k(e, {
456
+ children: [/* @__PURE__ */ k(f, { children: "Value ($)" }), /* @__PURE__ */ k(e, {
457
457
  type: "number",
458
458
  min: "0",
459
459
  step: "0.01",
@@ -475,7 +475,7 @@ function P() {
475
475
  ]
476
476
  })] }, t.id))
477
477
  }) })] }),
478
- /* @__PURE__ */ A(c, { children: [/* @__PURE__ */ k(d, { children: /* @__PURE__ */ k(u, { children: "Special Instructions" }) }), /* @__PURE__ */ k(l, { children: /* @__PURE__ */ k(a, {
478
+ /* @__PURE__ */ A(s, { children: [/* @__PURE__ */ k(u, { children: /* @__PURE__ */ k(l, { children: "Special Instructions" }) }), /* @__PURE__ */ k(c, { children: /* @__PURE__ */ k(a, {
479
479
  value: V.specialInstructions,
480
480
  onChange: (e) => X("specialInstructions", e.target.value),
481
481
  placeholder: "Any special handling or delivery instructions...",