@burdenoff/microfe-movethewheels 2026.626.2 → 2026.703.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/{AIAssistantPage-AvsMbunM.js → AIAssistantPage-C3ovZ0Fh.js} +100 -73
  2. package/dist/AnalyticsPage-O8SpY-V4.js +215 -0
  3. package/dist/{CreateOrderPage-CjlnEtk3.js → CreateOrderPage-CB1_-_mN.js} +33 -35
  4. package/dist/{CustomerDetailsPage-I6cdDHUi.js → CustomerDetailsPage-BaeKEI1D.js} +42 -44
  5. package/dist/{CustomersPage-CGGfD4ki.js → CustomersPage-DRaLuHMC.js} +26 -28
  6. package/dist/{DashboardPage-D2HRqwg9.js → DashboardPage-DPjhNfKB.js} +85 -83
  7. package/dist/{DataTable-CD9ZhpLB.js → DataTable-DmciIKKM.js} +3 -3
  8. package/dist/{DriverDetailsPage-rg_pGNuP.js → DriverDetailsPage-CSSQTOzn.js} +52 -54
  9. package/dist/{DriversPage-DKiynISH.js → DriversPage-C2Bk0w4Q.js} +24 -26
  10. package/dist/{FinancePage-Vg8WPs38.js → FinancePage-lmp0Sdsw.js} +9 -9
  11. package/dist/FleetPage-DZn5pIqd.js +365 -0
  12. package/dist/ImportExportPage-BIUJZc7O.js +290 -0
  13. package/dist/InventoryPage-Cxh1zYJd.js +253 -0
  14. package/dist/{LiveTrackingPage-DQ1q4Id3.js → LiveTrackingPage-BY1yAkIt.js} +60 -56
  15. package/dist/MarketplacePage-RMuL17EA.js +247 -0
  16. package/dist/{MetricCard-B7yMyvMX.js → MetricCard-7aYgzZHK.js} +1 -1
  17. package/dist/{OrderDetailsPage-CFASgsYX.js → OrderDetailsPage-C2Mf4KSy.js} +83 -85
  18. package/dist/{OrdersListPage-BHeT8S5o.js → OrdersListPage-BrPBtnhp.js} +31 -33
  19. package/dist/{PageLayout-D3N8MCTm.js → PageLayout-D4LDHJJq.js} +483 -422
  20. package/dist/{ProductDetailsPage-CFGcbaHo.js → ProductDetailsPage-CezzzZcj.js} +27 -29
  21. package/dist/{ProductsPage--xEpbQ8A.js → ProductsPage-I5DilIoY.js} +21 -23
  22. package/dist/ReportsPage-BDXNmUng.js +284 -0
  23. package/dist/RouteDetailsPage-BcomL20M.js +263 -0
  24. package/dist/RoutesPage-lqX9ylHP.js +144 -0
  25. package/dist/SettingsPage-CQVIOaNs.js +421 -0
  26. package/dist/StatusBadge-NpTeHVlw.js +152 -0
  27. package/dist/{TrackingPage-CcRc_dva.js → TrackingPage-BXrjz7V8.js} +59 -61
  28. package/dist/{VehicleDetailsPage-3YDMPsPs.js → VehicleDetailsPage-DZjLcJgr.js} +40 -42
  29. package/dist/{VehiclesPage-UlxPWP9K.js → VehiclesPage-6W39XT5W.js} +19 -21
  30. package/dist/{WarehouseDetailsPage-Db7KeN-d.js → WarehouseDetailsPage-C10pgRGW.js} +38 -40
  31. package/dist/{WarehousesPage-CuTO-OPp.js → WarehousesPage-CHvBqNaQ.js} +15 -17
  32. package/dist/{arrow-left-CBpZKkpq.js → arrow-left-n48Y-Wis.js} +1 -1
  33. package/dist/{box-CAaiElsb.js → box-D9Pal4HM.js} +1 -1
  34. package/dist/{chart-column-D1Ym15-S.js → chart-column-BFIJysDR.js} +1 -1
  35. package/dist/{chevron-right-BIFGi0UA.js → chevron-right-EMIIyyJ1.js} +1 -1
  36. package/dist/{circle-alert-DjmNo5_L.js → circle-alert-iY24lSlp.js} +1 -1
  37. package/dist/{circle-check-big-CjuPVo3_.js → circle-check-big-w0TrLKMF.js} +1 -1
  38. package/dist/{clock-BjkdnddD.js → clock-DJZtdl8u.js} +1 -1
  39. package/dist/{dollar-sign-IB4O0wuQ.js → dollar-sign-CgKQRz_e.js} +1 -1
  40. package/dist/{download-Dpa9vqoG.js → download-DRXxoiQR.js} +1 -1
  41. package/dist/{file-text-C8Uioy11.js → file-text-DWWY6_f5.js} +1 -1
  42. package/dist/{filter-Da5OZaHI.js → filter-DloLC2eE.js} +1 -1
  43. package/dist/index.js +119 -111
  44. package/dist/{map-_Per4sT9.js → map-CkJaULb2.js} +1 -1
  45. package/dist/{map-pin-BSaf5IDL.js → map-pin-BGiCvyCs.js} +1 -1
  46. package/dist/{navigation-DaTbrhw2.js → navigation-D36prnAn.js} +1 -1
  47. package/dist/{package-BE7U0wQE.js → package-BChUzpJS.js} +1 -1
  48. package/dist/{phone-DV4StZiA.js → phone-Ac9s3mo_.js} +1 -1
  49. package/dist/{plus-Dl1rLeJR.js → plus-Z76q-FZm.js} +1 -1
  50. package/dist/{refresh-cw-CWfERAit.js → refresh-cw-DKt6f5T6.js} +1 -1
  51. package/dist/{save-XH8vydOn.js → save-CojywNhG.js} +1 -1
  52. package/dist/{search-OxoIiL_C.js → search-CDGefqb3.js} +1 -1
  53. package/dist/{square-pen-hLIbFQFV.js → square-pen-CopE9GmB.js} +1 -1
  54. package/dist/{star-YsVV3MNQ.js → star-nHlLjDKR.js} +1 -1
  55. package/dist/{store-RCBl7HB-.js → store-BR9Voi5E.js} +1 -1
  56. package/dist/{trending-up-C-85AwGT.js → trending-up-B7W-GL6P.js} +1 -1
  57. package/dist/{triangle-alert-BOhfGgmh.js → triangle-alert-BonHFFNz.js} +1 -1
  58. package/dist/{truck-CtDjNFbi.js → truck-DrlfSpRC.js} +1 -1
  59. package/dist/{useAnalytics-ph7eTIK6.js → useAnalytics-CgdzUfY_.js} +40 -40
  60. package/dist/useAssistant-D4v3oxD3.js +84 -0
  61. package/dist/{useCustomers-bS3a4ytk.js → useCustomers-QrlozybF.js} +24 -24
  62. package/dist/{useFleet-BdETplNE.js → useFleet-DiAC-IiH.js} +70 -67
  63. package/dist/useImportExport-BLMnAKCC.js +55 -0
  64. package/dist/{useInventory-Dwn18FPz.js → useInventory-DKoks37x.js} +33 -33
  65. package/dist/{useOrders-D_3_hGMp.js → useOrders-D3UZVy8Y.js} +42 -42
  66. package/dist/useReports-Puq4DCH9.js +78 -0
  67. package/dist/{useRoutes-v4aBaS-E.js → useRoutes-Do57LvRb.js} +31 -31
  68. package/dist/useSettings-CkDH_-gM.js +81 -0
  69. package/dist/{useTracking-De2KIUNu.js → useTracking-GJify4HN.js} +22 -22
  70. package/dist/{user-Dz5TJZFs.js → user-CjSoudeu.js} +1 -1
  71. package/dist/{users-g2N0eL-Z.js → users-BAM4gHTn.js} +1 -1
  72. package/dist/{warehouse-D3WWDeTX.js → warehouse-C7MSr47B.js} +1 -1
  73. package/dist/{wrench-CmxY1n4I.js → wrench-CANXWxF-.js} +1 -1
  74. package/package.json +1 -1
  75. package/src/movethewheels/MoveTheWheelsRoutes.tsx +27 -3
  76. package/src/movethewheels/components/StatusBadge.tsx +18 -37
  77. package/src/movethewheels/constants/index.ts +67 -26
  78. package/src/movethewheels/hooks/index.ts +12 -0
  79. package/src/movethewheels/hooks/useAnalytics.ts +20 -6
  80. package/src/movethewheels/hooks/useAssistant.ts +74 -0
  81. package/src/movethewheels/hooks/useFleet.ts +63 -59
  82. package/src/movethewheels/hooks/useImportExport.ts +101 -0
  83. package/src/movethewheels/hooks/useReports.ts +158 -0
  84. package/src/movethewheels/hooks/useSettings.ts +120 -0
  85. package/src/movethewheels/pages/AIAssistantPage.tsx +53 -15
  86. package/src/movethewheels/pages/AnalyticsPage.tsx +67 -64
  87. package/src/movethewheels/pages/CustomerDetailsPage.tsx +1 -1
  88. package/src/movethewheels/pages/CustomersPage.tsx +1 -1
  89. package/src/movethewheels/pages/DashboardPage.tsx +42 -22
  90. package/src/movethewheels/pages/DriverDetailsPage.tsx +1 -1
  91. package/src/movethewheels/pages/DriversPage.tsx +1 -1
  92. package/src/movethewheels/pages/FleetPage.tsx +96 -38
  93. package/src/movethewheels/pages/ImportExportPage.tsx +174 -68
  94. package/src/movethewheels/pages/InventoryPage.tsx +66 -28
  95. package/src/movethewheels/pages/LiveTrackingPage.tsx +12 -3
  96. package/src/movethewheels/pages/MarketplacePage.tsx +87 -45
  97. package/src/movethewheels/pages/OrderDetailsPage.tsx +2 -2
  98. package/src/movethewheels/pages/ReportsPage.tsx +194 -90
  99. package/src/movethewheels/pages/RouteDetailsPage.tsx +5 -11
  100. package/src/movethewheels/pages/RoutesPage.tsx +4 -9
  101. package/src/movethewheels/pages/SettingsPage.tsx +234 -56
  102. package/src/movethewheels/pages/TrackingPage.tsx +6 -6
  103. package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +7 -6
  104. package/src/movethewheels/store/movethewheelsStore.ts +1 -1
  105. package/dist/AnalyticsPage-CCLfHgQZ.js +0 -212
  106. package/dist/FleetPage-DddXt8r8.js +0 -332
  107. package/dist/ImportExportPage-BW6qO3kc.js +0 -248
  108. package/dist/InventoryPage-rMGuaJN-.js +0 -222
  109. package/dist/MarketplacePage-DKrXAv62.js +0 -219
  110. package/dist/ReportsPage-Bb7_90rK.js +0 -235
  111. package/dist/RouteDetailsPage-CVtDVb1N.js +0 -282
  112. package/dist/RoutesPage-s57PtgcQ.js +0 -163
  113. package/dist/SettingsPage-BYNCBOpN.js +0 -298
  114. package/dist/StatusBadge-CijYQXtb.js +0 -209
  115. package/dist/graphqlClient-CdJyR_ed.js +0 -55
  116. package/dist/navigation-BgnOfsVd.js +0 -6
  117. package/dist/route-Dp9JiN_E.js +0 -51
  118. package/dist/settings-3Rw5NwFF.js +0 -28
  119. package/src/movethewheels/constants/mockData.ts +0 -1342
  120. /package/dist/{formatters-_vJlC-47.js → formatters-DhKZ-eA1.js} +0 -0
@@ -1,235 +0,0 @@
1
- import { F as e, I as t, L as n, P as r, R as i, d as a, f as o, g as s, h as c, i as l, it as u, l as d, u as f } from "./PageLayout-D3N8MCTm.js";
2
- import { t as p } from "./clock-BjkdnddD.js";
3
- import { t as m } from "./download-Dpa9vqoG.js";
4
- import { t as h } from "./filter-Da5OZaHI.js";
5
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
6
- import { EmphasisPanel as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
7
- //#region node_modules/lucide-react/dist/esm/icons/calendar.js
8
- var b = u("Calendar", [
9
- ["path", {
10
- d: "M8 2v4",
11
- key: "1cmpym"
12
- }],
13
- ["path", {
14
- d: "M16 2v4",
15
- key: "4m81vk"
16
- }],
17
- ["rect", {
18
- width: "18",
19
- height: "18",
20
- x: "3",
21
- y: "4",
22
- rx: "2",
23
- key: "1hopcy"
24
- }],
25
- ["path", {
26
- d: "M3 10h18",
27
- key: "8toen8"
28
- }]
29
- ]), x = u("FileChartColumnIncreasing", [
30
- ["path", {
31
- d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
32
- key: "1rqfz7"
33
- }],
34
- ["path", {
35
- d: "M14 2v4a2 2 0 0 0 2 2h4",
36
- key: "tnqrlb"
37
- }],
38
- ["path", {
39
- d: "M8 18v-2",
40
- key: "qcmpov"
41
- }],
42
- ["path", {
43
- d: "M12 18v-4",
44
- key: "q1q25u"
45
- }],
46
- ["path", {
47
- d: "M16 18v-6",
48
- key: "15y0np"
49
- }]
50
- ]);
51
- //#endregion
52
- //#region src/movethewheels/pages/ReportsPage.tsx
53
- function S() {
54
- return /* @__PURE__ */ _(l, {
55
- title: "Reports",
56
- subtitle: "Generate and schedule reports",
57
- icon: /* @__PURE__ */ g(x, { size: 24 }),
58
- headerActions: /* @__PURE__ */ _("div", {
59
- className: "flex gap-2",
60
- children: [/* @__PURE__ */ _(r, {
61
- defaultValue: "30d",
62
- children: [/* @__PURE__ */ g(n, {
63
- className: "w-[150px]",
64
- children: /* @__PURE__ */ g(i, {})
65
- }), /* @__PURE__ */ _(e, { children: [
66
- /* @__PURE__ */ g(t, {
67
- value: "7d",
68
- children: "Last 7 days"
69
- }),
70
- /* @__PURE__ */ g(t, {
71
- value: "30d",
72
- children: "Last 30 days"
73
- }),
74
- /* @__PURE__ */ g(t, {
75
- value: "90d",
76
- children: "Last 90 days"
77
- }),
78
- /* @__PURE__ */ g(t, {
79
- value: "custom",
80
- children: "Custom"
81
- })
82
- ] })]
83
- }), /* @__PURE__ */ _(f, { children: [/* @__PURE__ */ g(x, { size: 16 }), " Create Report"] })]
84
- }),
85
- children: [/* @__PURE__ */ g(y, {
86
- icon: /* @__PURE__ */ g(x, { size: 18 }),
87
- children: "Turn your operational data into shareable summaries. Generate one-off reports on orders, finance, fleet, customers or inventory, or schedule them to land in inboxes automatically — so stakeholders always have the latest numbers without logging in."
88
- }), /* @__PURE__ */ _("div", {
89
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
90
- children: [/* @__PURE__ */ _("div", {
91
- className: "lg:col-span-2 space-y-4",
92
- children: [/* @__PURE__ */ g("h3", {
93
- className: "font-semibold",
94
- children: "Available Reports"
95
- }), [
96
- {
97
- name: "Daily Operations Summary",
98
- description: "Overview of daily deliveries and performance",
99
- frequency: "Daily",
100
- lastGenerated: "2024-01-15"
101
- },
102
- {
103
- name: "Weekly Performance Report",
104
- description: "KPIs and metrics for the week",
105
- frequency: "Weekly",
106
- lastGenerated: "2024-01-14"
107
- },
108
- {
109
- name: "Monthly Financial Report",
110
- description: "Revenue, expenses, and profit analysis",
111
- frequency: "Monthly",
112
- lastGenerated: "2024-01-01"
113
- },
114
- {
115
- name: "Fleet Utilization Report",
116
- description: "Vehicle and driver utilization metrics",
117
- frequency: "Weekly",
118
- lastGenerated: "2024-01-14"
119
- },
120
- {
121
- name: "Customer Analytics Report",
122
- description: "Customer satisfaction and retention",
123
- frequency: "Monthly",
124
- lastGenerated: "2024-01-01"
125
- },
126
- {
127
- name: "Inventory Status Report",
128
- description: "Stock levels and movement analysis",
129
- frequency: "Daily",
130
- lastGenerated: "2024-01-15"
131
- }
132
- ].map((e) => /* @__PURE__ */ g(a, { children: /* @__PURE__ */ g(o, {
133
- className: "p-4",
134
- children: /* @__PURE__ */ _("div", {
135
- className: "flex items-center justify-between",
136
- children: [/* @__PURE__ */ _("div", {
137
- className: "flex items-center gap-3",
138
- children: [/* @__PURE__ */ g("div", {
139
- className: "w-10 h-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center",
140
- children: /* @__PURE__ */ g(x, {
141
- size: 20,
142
- className: "text-primary"
143
- })
144
- }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
145
- className: "font-medium",
146
- children: e.name
147
- }), /* @__PURE__ */ g("p", {
148
- className: "text-sm text-text-secondary",
149
- children: e.description
150
- })] })]
151
- }), /* @__PURE__ */ _("div", {
152
- className: "flex items-center gap-3",
153
- children: [/* @__PURE__ */ _("div", {
154
- className: "text-right",
155
- children: [/* @__PURE__ */ g(d, {
156
- variant: "outline",
157
- children: e.frequency
158
- }), /* @__PURE__ */ _("p", {
159
- className: "text-xs text-text-secondary mt-1",
160
- children: ["Last: ", e.lastGenerated]
161
- })]
162
- }), /* @__PURE__ */ g(f, {
163
- variant: "outline",
164
- size: "sm",
165
- children: /* @__PURE__ */ g(m, { size: 14 })
166
- })]
167
- })]
168
- })
169
- }) }, e.name))]
170
- }), /* @__PURE__ */ _("div", {
171
- className: "space-y-6",
172
- children: [/* @__PURE__ */ _(v, {
173
- className: "space-y-3",
174
- children: [
175
- /* @__PURE__ */ _("h2", {
176
- className: "flex items-center gap-2 text-base font-semibold text-text-primary",
177
- children: [/* @__PURE__ */ g(p, { size: 18 }), " Scheduled Reports"]
178
- }),
179
- [{
180
- name: "Daily Summary",
181
- nextRun: "Tomorrow 6:00 AM",
182
- recipients: 3
183
- }, {
184
- name: "Weekly Review",
185
- nextRun: "Monday 9:00 AM",
186
- recipients: 5
187
- }].map((e) => /* @__PURE__ */ _("div", {
188
- className: "p-3 border border-border-seam rounded-lg",
189
- children: [
190
- /* @__PURE__ */ g("p", {
191
- className: "font-medium",
192
- children: e.name
193
- }),
194
- /* @__PURE__ */ _("p", {
195
- className: "text-sm text-text-secondary",
196
- children: ["Next: ", e.nextRun]
197
- }),
198
- /* @__PURE__ */ _("p", {
199
- className: "text-xs text-text-secondary",
200
- children: [e.recipients, " recipients"]
201
- })
202
- ]
203
- }, e.name)),
204
- /* @__PURE__ */ g(f, {
205
- variant: "outline",
206
- className: "w-full",
207
- children: "Schedule New Report"
208
- })
209
- ]
210
- }), /* @__PURE__ */ _(a, { children: [/* @__PURE__ */ g(c, { children: /* @__PURE__ */ g(s, { children: "Quick Actions" }) }), /* @__PURE__ */ _(o, {
211
- className: "space-y-2",
212
- children: [
213
- /* @__PURE__ */ _(f, {
214
- variant: "outline",
215
- className: "w-full justify-start",
216
- children: [/* @__PURE__ */ g(b, { size: 16 }), " Schedule Report"]
217
- }),
218
- /* @__PURE__ */ _(f, {
219
- variant: "outline",
220
- className: "w-full justify-start",
221
- children: [/* @__PURE__ */ g(h, { size: 16 }), " Custom Report"]
222
- }),
223
- /* @__PURE__ */ _(f, {
224
- variant: "outline",
225
- className: "w-full justify-start",
226
- children: [/* @__PURE__ */ g(m, { size: 16 }), " Export All"]
227
- })
228
- ]
229
- })] })]
230
- })]
231
- })]
232
- });
233
- }
234
- //#endregion
235
- export { S as default };
@@ -1,282 +0,0 @@
1
- import { d as e, f as t, g as n, h as r, i, it as a, l as o, n as s, r as c, t as l, u } from "./PageLayout-D3N8MCTm.js";
2
- import { t as d } from "./arrow-left-CBpZKkpq.js";
3
- import { t as f } from "./circle-check-big-CjuPVo3_.js";
4
- import { t as p } from "./clock-BjkdnddD.js";
5
- import { t as m } from "./map-pin-BSaf5IDL.js";
6
- import { t as h } from "./navigation-DaTbrhw2.js";
7
- import { t as g } from "./square-pen-hLIbFQFV.js";
8
- import { r as _ } from "./graphqlClient-CdJyR_ed.js";
9
- import { r as v, t as y } from "./useRoutes-v4aBaS-E.js";
10
- import { r as b } from "./StatusBadge-CijYQXtb.js";
11
- import { r as x, t as S } from "./formatters-_vJlC-47.js";
12
- import { t as C } from "./navigation-BgnOfsVd.js";
13
- import { useParams as w } from "react-router-dom";
14
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
15
- import { EmphasisPanel as D, NextSteps as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
16
- //#region node_modules/lucide-react/dist/esm/icons/zap.js
17
- var A = a("Zap", [["path", {
18
- d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
19
- key: "1xq2db"
20
- }]]);
21
- //#endregion
22
- //#region src/movethewheels/pages/RouteDetailsPage.tsx
23
- function j() {
24
- let { routeId: a } = w(), { basePath: j, navigate: M } = _(), { route: N, isLoading: P, error: F, refetch: I } = y(a), { optimizeRoute: L } = v(), R = () => M?.(C(j, "routes")), z = (e) => M?.(C(j, e));
25
- if (!a) return /* @__PURE__ */ E(i, {
26
- title: "Create Route",
27
- subtitle: "Plan a new delivery route",
28
- icon: /* @__PURE__ */ T(h, { size: 24 }),
29
- headerActions: /* @__PURE__ */ E(u, {
30
- variant: "outline",
31
- onClick: R,
32
- children: [/* @__PURE__ */ T(d, { size: 16 }), " Back"]
33
- }),
34
- children: [/* @__PURE__ */ T(k, {
35
- icon: /* @__PURE__ */ T(h, { size: 18 }),
36
- children: "Plan a new delivery route — pick the stops to visit, and the optimizer will sequence them into the shortest driving plan so one driver can cover them in a single run."
37
- }), /* @__PURE__ */ T(l, {
38
- illustration: "onboarding",
39
- title: "Build your route",
40
- description: "The route planner lets you add stops, set the running order, and optimize for distance and time."
41
- })]
42
- });
43
- if (P) return /* @__PURE__ */ T(c, { message: "Loading route details..." });
44
- if (F || !N) return /* @__PURE__ */ T(s, {
45
- title: "Route not found",
46
- onRetry: I
47
- });
48
- let B = async () => {
49
- try {
50
- await L(N.id), I();
51
- } catch (e) {
52
- console.error(e);
53
- }
54
- };
55
- return /* @__PURE__ */ E(i, {
56
- title: N.name,
57
- subtitle: `${N.stops.length} stops - ${N.distance.toFixed(1)} km`,
58
- icon: /* @__PURE__ */ T(h, { size: 24 }),
59
- headerActions: /* @__PURE__ */ E("div", {
60
- className: "flex gap-2",
61
- children: [
62
- /* @__PURE__ */ E(u, {
63
- variant: "outline",
64
- onClick: R,
65
- children: [/* @__PURE__ */ T(d, { size: 16 }), " Back"]
66
- }),
67
- !N.optimized && /* @__PURE__ */ E(u, {
68
- variant: "outline",
69
- onClick: B,
70
- children: [/* @__PURE__ */ T(A, { size: 16 }), " Optimize"]
71
- }),
72
- /* @__PURE__ */ E(u, { children: [/* @__PURE__ */ T(g, { size: 16 }), " Edit"] })
73
- ]
74
- }),
75
- headerContent: /* @__PURE__ */ E("div", {
76
- className: "flex gap-2",
77
- children: [/* @__PURE__ */ T(b, {
78
- status: N.status,
79
- customColors: {
80
- planned: {
81
- bg: "bg-blue-100",
82
- text: "text-blue-700"
83
- },
84
- in_progress: {
85
- bg: "bg-yellow-100",
86
- text: "text-yellow-700"
87
- },
88
- completed: {
89
- bg: "bg-green-100",
90
- text: "text-green-700"
91
- },
92
- cancelled: {
93
- bg: "bg-red-100",
94
- text: "text-red-700"
95
- }
96
- }[N.status]
97
- }), /* @__PURE__ */ T(o, {
98
- variant: N.optimized ? "default" : "secondary",
99
- children: N.optimized ? "Optimized" : "Not Optimized"
100
- })]
101
- }),
102
- children: [
103
- /* @__PURE__ */ T(k, {
104
- icon: /* @__PURE__ */ T(h, { size: 18 }),
105
- children: "A single optimized driving plan that chains together this route's stops. Review the sequence, distance and timing here, re-optimize if traffic or stops change, then hand the itinerary to a driver."
106
- }),
107
- /* @__PURE__ */ T(O, {
108
- storageKey: "movethewheels-route-details",
109
- steps: [
110
- ...N.optimized ? [] : [{
111
- id: "optimize",
112
- label: "Optimize this route",
113
- description: "Reorder stops to cut distance and driving time.",
114
- icon: /* @__PURE__ */ T(A, { size: 16 }),
115
- onClick: B
116
- }],
117
- {
118
- id: "edit",
119
- label: "Adjust stops",
120
- description: "Add, remove or reorder the delivery stops.",
121
- icon: /* @__PURE__ */ T(g, { size: 16 }),
122
- onClick: () => {}
123
- },
124
- {
125
- id: "orders",
126
- label: "Review the orders on this route",
127
- description: "Check the deliveries bundled into this run.",
128
- icon: /* @__PURE__ */ T(m, { size: 16 }),
129
- onClick: () => z("orders")
130
- }
131
- ]
132
- }),
133
- /* @__PURE__ */ E("div", {
134
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
135
- children: [/* @__PURE__ */ E("div", {
136
- className: "lg:col-span-2 space-y-6",
137
- children: [/* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ T(n, { children: "Route Map" }) }), /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T("div", {
138
- className: "aspect-video bg-bg-sunken rounded-lg flex items-center justify-center",
139
- children: /* @__PURE__ */ E("div", {
140
- className: "text-center text-text-secondary",
141
- children: [/* @__PURE__ */ T(m, {
142
- size: 48,
143
- className: "mx-auto mb-2 opacity-50"
144
- }), /* @__PURE__ */ T("p", { children: "Route map visualization" })]
145
- })
146
- }) })] }), /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ E(n, { children: [
147
- "Stops (",
148
- N.stops.length,
149
- ")"
150
- ] }) }), /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T("div", {
151
- className: "space-y-4",
152
- children: N.stops.map((e, t) => /* @__PURE__ */ E("div", {
153
- className: "flex gap-4",
154
- children: [/* @__PURE__ */ E("div", {
155
- className: "relative",
156
- children: [/* @__PURE__ */ T("div", {
157
- className: `w-8 h-8 rounded-full flex items-center justify-center ${e.status === "completed" ? "bg-green-500 text-white" : "bg-bg-sunken"}`,
158
- children: e.status === "completed" ? /* @__PURE__ */ T(f, { size: 16 }) : e.sequence
159
- }), t < N.stops.length - 1 && /* @__PURE__ */ T("div", { className: "absolute top-8 left-4 w-px h-12 bg-border" })]
160
- }), /* @__PURE__ */ T("div", {
161
- className: "flex-1 pb-4",
162
- children: /* @__PURE__ */ E("div", {
163
- className: "flex items-center justify-between",
164
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("div", {
165
- className: "flex items-center gap-2",
166
- children: [/* @__PURE__ */ T(o, {
167
- variant: e.type === "pickup" ? "secondary" : "default",
168
- className: "capitalize",
169
- children: e.type
170
- }), /* @__PURE__ */ E("span", {
171
- className: "font-medium",
172
- children: ["Order #", e.orderId]
173
- })]
174
- }), /* @__PURE__ */ T("p", {
175
- className: "text-sm text-text-secondary mt-1",
176
- children: S(e.address)
177
- })] }), /* @__PURE__ */ E("div", {
178
- className: "text-right",
179
- children: [
180
- /* @__PURE__ */ E("p", {
181
- className: "text-sm",
182
- children: ["Scheduled: ", x(e.scheduledTime, "time")]
183
- }),
184
- e.actualTime && /* @__PURE__ */ E("p", {
185
- className: "text-sm text-green-600",
186
- children: ["Actual: ", x(e.actualTime, "time")]
187
- }),
188
- /* @__PURE__ */ E("p", {
189
- className: "text-xs text-text-secondary",
190
- children: [e.duration, " min stop"]
191
- })
192
- ]
193
- })]
194
- })
195
- })]
196
- }, e.id))
197
- }) })] })]
198
- }), /* @__PURE__ */ E("div", {
199
- className: "space-y-6",
200
- children: [
201
- /* @__PURE__ */ E(D, {
202
- className: "space-y-4",
203
- children: [
204
- /* @__PURE__ */ T("h2", {
205
- className: "text-base font-semibold text-text-primary",
206
- children: "Route Info"
207
- }),
208
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
209
- className: "text-sm text-text-secondary",
210
- children: "Total Distance"
211
- }), /* @__PURE__ */ E("p", {
212
- className: "text-2xl font-bold",
213
- children: [N.distance.toFixed(1), /* @__PURE__ */ T("span", {
214
- className: "text-sm font-normal",
215
- children: " km"
216
- })]
217
- })] }),
218
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
219
- className: "text-sm text-text-secondary",
220
- children: "Est. Duration"
221
- }), /* @__PURE__ */ E("p", {
222
- className: "text-2xl font-bold",
223
- children: [N.estimatedDuration, /* @__PURE__ */ T("span", {
224
- className: "text-sm font-normal",
225
- children: " min"
226
- })]
227
- })] }),
228
- N.actualDuration && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
229
- className: "text-sm text-text-secondary",
230
- children: "Actual Duration"
231
- }), /* @__PURE__ */ E("p", {
232
- className: "text-2xl font-bold",
233
- children: [N.actualDuration, /* @__PURE__ */ T("span", {
234
- className: "text-sm font-normal",
235
- children: " min"
236
- })]
237
- })] })
238
- ]
239
- }),
240
- /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ E(n, {
241
- className: "flex items-center gap-2",
242
- children: [/* @__PURE__ */ T(p, { size: 18 }), " Timeline"]
243
- }) }), /* @__PURE__ */ E(t, {
244
- className: "space-y-3",
245
- children: [
246
- N.startTime && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
247
- className: "text-sm text-text-secondary",
248
- children: "Started"
249
- }), /* @__PURE__ */ T("p", { children: x(N.startTime, "full") })] }),
250
- N.endTime && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
251
- className: "text-sm text-text-secondary",
252
- children: "Completed"
253
- }), /* @__PURE__ */ T("p", { children: x(N.endTime, "full") })] }),
254
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
255
- className: "text-sm text-text-secondary",
256
- children: "Created"
257
- }), /* @__PURE__ */ T("p", { children: x(N.createdAt, "full") })] })
258
- ]
259
- })] }),
260
- N.trafficConditions.length > 0 && /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ T(n, { children: "Traffic Conditions" }) }), /* @__PURE__ */ T(t, { children: N.trafficConditions.map((e, t) => /* @__PURE__ */ E("div", {
261
- className: `p-2 rounded mb-2 ${e.condition === "severe" ? "bg-red-50" : e.condition === "heavy" ? "bg-orange-50" : "bg-yellow-50"}`,
262
- children: [/* @__PURE__ */ E("p", {
263
- className: "text-sm font-medium capitalize",
264
- children: [e.condition, " traffic"]
265
- }), /* @__PURE__ */ E("p", {
266
- className: "text-xs text-text-secondary",
267
- children: [
268
- e.location,
269
- " - +",
270
- e.delay,
271
- " min delay"
272
- ]
273
- })]
274
- }, t)) })] })
275
- ]
276
- })]
277
- })
278
- ]
279
- });
280
- }
281
- //#endregion
282
- export { j as default };
@@ -1,163 +0,0 @@
1
- import { i as e, l as t, u as n } from "./PageLayout-D3N8MCTm.js";
2
- import { t as r } from "./DataTable-CD9ZhpLB.js";
3
- import { t as i } from "./navigation-DaTbrhw2.js";
4
- import { t as a } from "./plus-Dl1rLeJR.js";
5
- import { t as o } from "./refresh-cw-CWfERAit.js";
6
- import { r as s } from "./graphqlClient-CdJyR_ed.js";
7
- import { r as c } from "./useRoutes-v4aBaS-E.js";
8
- import { r as l } from "./StatusBadge-CijYQXtb.js";
9
- import { r as u } from "./formatters-_vJlC-47.js";
10
- import { t as d } from "./navigation-BgnOfsVd.js";
11
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
12
- import { CTAOverflowMenu as m, EmphasisPanel as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
13
- //#region src/movethewheels/pages/RoutesPage.tsx
14
- function _() {
15
- let { basePath: _, navigate: v } = s(), { routes: y, totalRoutes: b, isLoading: x, refetch: S } = c(), C = (e) => v?.(d(_, e));
16
- return /* @__PURE__ */ p(e, {
17
- title: "Routes",
18
- subtitle: `${b} routes`,
19
- icon: /* @__PURE__ */ f(i, { size: 24 }),
20
- headerActions: /* @__PURE__ */ f(m, {
21
- primary: {
22
- label: "Create Route",
23
- icon: /* @__PURE__ */ f(a, { size: 16 }),
24
- onSelect: () => C("routes/new")
25
- },
26
- actions: [{
27
- label: "Refresh",
28
- icon: /* @__PURE__ */ f(o, { size: 16 }),
29
- onSelect: () => S()
30
- }]
31
- }),
32
- children: [
33
- /* @__PURE__ */ f(g, {
34
- icon: /* @__PURE__ */ f(i, { size: 18 }),
35
- children: "Routes group multiple delivery stops into an optimized driving plan. Build a route to batch nearby drop-offs, cut distance and fuel, and give drivers a single ordered itinerary — then open one to review stops, distance and optimization status."
36
- }),
37
- /* @__PURE__ */ p(h, { children: [/* @__PURE__ */ f("p", {
38
- className: "text-sm font-medium text-text-secondary",
39
- children: "Routes at a glance"
40
- }), /* @__PURE__ */ p("div", {
41
- className: "mt-3 grid grid-cols-3 gap-4",
42
- children: [
43
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
44
- className: "text-2xl font-bold text-text-primary tabular-nums",
45
- children: b
46
- }), /* @__PURE__ */ f("p", {
47
- className: "text-xs text-text-secondary",
48
- children: "Total routes"
49
- })] }),
50
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
51
- className: "text-2xl font-bold text-text-primary tabular-nums",
52
- children: y.filter((e) => e.status === "in_progress").length
53
- }), /* @__PURE__ */ f("p", {
54
- className: "text-xs text-text-secondary",
55
- children: "In progress"
56
- })] }),
57
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
58
- className: "text-2xl font-bold text-text-primary tabular-nums",
59
- children: y.filter((e) => e.optimized).length
60
- }), /* @__PURE__ */ f("p", {
61
- className: "text-xs text-text-secondary",
62
- children: "Optimized"
63
- })] })
64
- ]
65
- })] }),
66
- /* @__PURE__ */ f(r, {
67
- columns: [
68
- {
69
- id: "name",
70
- header: "Route Name",
71
- accessorKey: "name",
72
- sortable: !0,
73
- cell: (e) => /* @__PURE__ */ f("span", {
74
- className: "font-medium",
75
- children: e.name
76
- })
77
- },
78
- {
79
- id: "status",
80
- header: "Status",
81
- accessorKey: "status",
82
- sortable: !0,
83
- cell: (e) => /* @__PURE__ */ f(l, {
84
- status: e.status,
85
- customColors: {
86
- planned: {
87
- bg: "bg-blue-100",
88
- text: "text-blue-700"
89
- },
90
- in_progress: {
91
- bg: "bg-yellow-100",
92
- text: "text-yellow-700"
93
- },
94
- completed: {
95
- bg: "bg-green-100",
96
- text: "text-green-700"
97
- },
98
- cancelled: {
99
- bg: "bg-red-100",
100
- text: "text-red-700"
101
- }
102
- }[e.status]
103
- })
104
- },
105
- {
106
- id: "stops",
107
- header: "Stops",
108
- cell: (e) => /* @__PURE__ */ p(t, {
109
- variant: "secondary",
110
- children: [e.stops.length, " stops"]
111
- })
112
- },
113
- {
114
- id: "distance",
115
- header: "Distance",
116
- accessorKey: "distance",
117
- sortable: !0,
118
- cell: (e) => `${e.distance.toFixed(1)} km`
119
- },
120
- {
121
- id: "duration",
122
- header: "Est. Duration",
123
- cell: (e) => `${e.estimatedDuration} min`
124
- },
125
- {
126
- id: "optimized",
127
- header: "Optimized",
128
- cell: (e) => /* @__PURE__ */ f(t, {
129
- variant: e.optimized ? "default" : "outline",
130
- children: e.optimized ? "Yes" : "No"
131
- })
132
- },
133
- {
134
- id: "created",
135
- header: "Created",
136
- accessorKey: "createdAt",
137
- sortable: !0,
138
- cell: (e) => u(e.createdAt, "short")
139
- }
140
- ],
141
- data: y,
142
- isLoading: x,
143
- searchable: !0,
144
- searchPlaceholder: "Search routes...",
145
- searchFields: ["name"],
146
- onRowClick: (e) => C(`routes/${e.id}`),
147
- getRowId: (e) => e.id,
148
- emptyIllustration: "empty-data",
149
- emptyTitle: "No routes yet",
150
- emptyDescription: "Create a route to batch deliveries into an optimized driving plan.",
151
- emptyAction: /* @__PURE__ */ p(n, {
152
- onClick: () => C("routes/new"),
153
- children: [/* @__PURE__ */ f(a, {
154
- size: 16,
155
- className: "mr-1.5"
156
- }), "Create Route"]
157
- })
158
- })
159
- ]
160
- });
161
- }
162
- //#endregion
163
- export { _ as default };