@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,384 +0,0 @@
1
- import { F as e, I as t, L as n, P as r, R as i, ct as a, d as ee, f as o, i as s, l as c, lt as l, ot as te, u } from "./PageLayout-D4LDHJJq.js";
2
- import { t as d } from "./DataTable-XvUcTjwi.js";
3
- import { t as f } from "./download-C5NbvVDc.js";
4
- import { t as p } from "./filter-DUfUg6BO.js";
5
- import { t as m } from "./package-CcRttV2N.js";
6
- import { t as h } from "./plus-C_XZDwBz.js";
7
- import { t as g } from "./refresh-cw-CfgN67l3.js";
8
- import { t as _ } from "./user-check-BEKRCi7v.js";
9
- import { n as v, r as y } from "./useOrders-B465S2nt.js";
10
- import { i as b, n as x, r as S } from "./StatusBadge-C87mDpDP.js";
11
- import { n as C, r as w } from "./formatters-BQr-aR5W.js";
12
- import { useState as T } from "react";
13
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
14
- import { CTAOverflowMenu as ne, EmphasisPanel as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
15
- import { useI18n as A } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
- //#region node_modules/lucide-react/dist/esm/icons/user-plus.js
17
- var j = l("UserPlus", [
18
- ["path", {
19
- d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
20
- key: "1yyitq"
21
- }],
22
- ["circle", {
23
- cx: "9",
24
- cy: "7",
25
- r: "4",
26
- key: "nufk8"
27
- }],
28
- ["line", {
29
- x1: "19",
30
- x2: "19",
31
- y1: "8",
32
- y2: "14",
33
- key: "1bvyxn"
34
- }],
35
- ["line", {
36
- x1: "22",
37
- x2: "16",
38
- y1: "11",
39
- y2: "11",
40
- key: "1shjgl"
41
- }]
42
- ]);
43
- //#endregion
44
- //#region src/movethewheels/pages/OrdersListPage.tsx
45
- function M() {
46
- let { t: l } = A(), M = (e, t) => {
47
- let n = l(e);
48
- return n === e ? t : n;
49
- }, { basePath: N, navigate: P } = te(), [F, I] = T("all"), [L, R] = T("all"), [z, B] = T(!1), [V, H] = T(0), [U, W] = T(25), G = F !== "all" || L !== "all" || z, { orders: K, hasMore: q, isLoading: J, refetch: Y } = y({
50
- filters: {
51
- status: F === "all" ? void 0 : F,
52
- orderType: L === "all" ? void 0 : L,
53
- unassigned: z || void 0
54
- },
55
- limit: U,
56
- offset: V * U
57
- }), { stats: X } = v(), Z = X.total, Q = (e) => {
58
- P && P(a(N, e));
59
- }, $ = () => H(0), re = [
60
- {
61
- id: "orderNumber",
62
- header: M("movethewheels.orders.table.orderNumber", "Order #"),
63
- accessorKey: "orderNumber",
64
- sortable: !0,
65
- className: "min-w-[100px] whitespace-nowrap",
66
- cell: (e) => /* @__PURE__ */ E("span", {
67
- className: "font-medium text-primary",
68
- children: e.orderNumber
69
- })
70
- },
71
- {
72
- id: "customer",
73
- header: M("movethewheels.orders.table.customer", "Customer"),
74
- className: "min-w-[180px] max-w-[220px]",
75
- cell: (e) => /* @__PURE__ */ D("div", {
76
- className: "min-w-0",
77
- children: [/* @__PURE__ */ E("p", {
78
- className: "font-medium truncate",
79
- children: e.customerInfo.name
80
- }), /* @__PURE__ */ E("p", {
81
- className: "text-sm text-text-secondary truncate",
82
- children: e.customerInfo.email
83
- })]
84
- })
85
- },
86
- {
87
- id: "status",
88
- header: M("movethewheels.orders.table.status", "Status"),
89
- accessorKey: "status",
90
- sortable: !0,
91
- className: "min-w-[130px] whitespace-nowrap",
92
- cell: (e) => /* @__PURE__ */ E(S, {
93
- status: e.status,
94
- type: "order"
95
- })
96
- },
97
- {
98
- id: "type",
99
- header: M("movethewheels.orders.table.type", "Type"),
100
- accessorKey: "orderType",
101
- className: "min-w-[70px] whitespace-nowrap",
102
- cell: (e) => /* @__PURE__ */ E(b, { type: e.orderType })
103
- },
104
- {
105
- id: "priority",
106
- header: M("movethewheels.orders.table.priority", "Priority"),
107
- accessorKey: "priority",
108
- sortable: !0,
109
- className: "min-w-[90px] whitespace-nowrap",
110
- cell: (e) => /* @__PURE__ */ E(x, { priority: e.priority })
111
- },
112
- {
113
- id: "items",
114
- header: M("movethewheels.orders.table.items", "Items"),
115
- className: "min-w-[80px] whitespace-nowrap",
116
- cell: (e) => /* @__PURE__ */ D(c, {
117
- variant: "secondary",
118
- children: [
119
- e.items.length,
120
- " ",
121
- M("movethewheels.orders.table.itemsSuffix", "items")
122
- ]
123
- })
124
- },
125
- {
126
- id: "total",
127
- header: M("movethewheels.orders.table.total", "Total"),
128
- accessorKey: "pricing",
129
- sortable: !0,
130
- className: "min-w-[100px] whitespace-nowrap text-right",
131
- cell: (e) => /* @__PURE__ */ E("span", {
132
- className: "font-medium",
133
- children: C(e.pricing.total)
134
- })
135
- },
136
- {
137
- id: "scheduledDelivery",
138
- header: M("movethewheels.orders.table.deliveryDate", "Delivery Date"),
139
- accessorKey: "scheduledDelivery",
140
- sortable: !0,
141
- className: "min-w-[110px] whitespace-nowrap",
142
- cell: (e) => e.scheduledDelivery ? w(e.scheduledDelivery) : "-"
143
- },
144
- {
145
- id: "createdAt",
146
- header: M("movethewheels.orders.table.created", "Created"),
147
- accessorKey: "createdAt",
148
- sortable: !0,
149
- className: "min-w-[100px] whitespace-nowrap",
150
- cell: (e) => w(e.createdAt, "relative")
151
- },
152
- {
153
- id: "driver",
154
- header: M("movethewheels.orders.table.driver", "Driver"),
155
- className: "min-w-[120px] whitespace-nowrap",
156
- cell: (e) => e.driverId ? /* @__PURE__ */ D("span", {
157
- className: "inline-flex items-center gap-1 text-sm text-status-success-text",
158
- children: [
159
- /* @__PURE__ */ E(_, { size: 14 }),
160
- " ",
161
- M("movethewheels.orders.table.assigned", "Assigned")
162
- ]
163
- }) : /* @__PURE__ */ D(u, {
164
- variant: "outline",
165
- size: "sm",
166
- onClick: (t) => {
167
- t.stopPropagation(), Q(`orders/${e.id}`);
168
- },
169
- children: [/* @__PURE__ */ E(j, {
170
- size: 14,
171
- className: "mr-1"
172
- }), M("movethewheels.orders.table.assign", "Assign")]
173
- })
174
- }
175
- ], ie = [
176
- {
177
- value: "all",
178
- label: M("movethewheels.orders.filters.allStatuses", "All Statuses")
179
- },
180
- {
181
- value: "pending",
182
- label: M("movethewheels.orders.status.pending", "Pending")
183
- },
184
- {
185
- value: "confirmed",
186
- label: M("movethewheels.orders.status.confirmed", "Confirmed")
187
- },
188
- {
189
- value: "assigned",
190
- label: M("movethewheels.orders.status.assigned", "Assigned")
191
- },
192
- {
193
- value: "picked_up",
194
- label: M("movethewheels.orders.status.pickedUp", "Picked Up")
195
- },
196
- {
197
- value: "in_transit",
198
- label: M("movethewheels.orders.status.inTransit", "In Transit")
199
- },
200
- {
201
- value: "out_for_delivery",
202
- label: M("movethewheels.orders.status.outForDelivery", "Out for Delivery")
203
- },
204
- {
205
- value: "delivered",
206
- label: M("movethewheels.orders.status.delivered", "Delivered")
207
- },
208
- {
209
- value: "cancelled",
210
- label: M("movethewheels.orders.status.cancelled", "Cancelled")
211
- },
212
- {
213
- value: "failed",
214
- label: M("movethewheels.orders.status.failed", "Failed")
215
- }
216
- ];
217
- return /* @__PURE__ */ D(s, {
218
- title: M("movethewheels.orders.title", "Orders"),
219
- subtitle: `${Z} ${M("movethewheels.orders.subtitle", "total orders")}`,
220
- icon: /* @__PURE__ */ E(m, { size: 24 }),
221
- headerActions: /* @__PURE__ */ E(ne, {
222
- primary: {
223
- label: M("movethewheels.orders.actions.newOrder", "New Order"),
224
- icon: /* @__PURE__ */ E(h, { size: 16 }),
225
- onSelect: () => Q("orders/new")
226
- },
227
- actions: [{
228
- label: M("movethewheels.orders.actions.refresh", "Refresh"),
229
- icon: /* @__PURE__ */ E(g, { size: 16 }),
230
- onSelect: () => Y()
231
- }, {
232
- label: M("movethewheels.orders.actions.export", "Export"),
233
- icon: /* @__PURE__ */ E(f, { size: 16 }),
234
- onSelect: () => Q("import-export")
235
- }]
236
- }),
237
- children: [
238
- /* @__PURE__ */ E(k, {
239
- icon: /* @__PURE__ */ E(m, { size: 18 }),
240
- children: M("movethewheels.orders.purpose", "Every delivery job lives here — B2B and B2C orders, their status, priority and value. Use this list to find an order, filter by status or type, and open one to assign a driver, track it, or update fulfilment.")
241
- }),
242
- /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("p", {
243
- className: "text-sm font-medium text-text-secondary",
244
- children: M("movethewheels.orders.glance.title", "Pipeline at a glance")
245
- }), /* @__PURE__ */ D("div", {
246
- className: "mt-3 grid grid-cols-2 sm:grid-cols-4 gap-4",
247
- children: [
248
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
249
- className: "text-2xl font-bold text-text-primary tabular-nums",
250
- children: Z
251
- }), /* @__PURE__ */ E("p", {
252
- className: "text-xs text-text-secondary",
253
- children: M("movethewheels.orders.glance.total", "Total orders")
254
- })] }),
255
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
256
- className: "text-2xl font-bold text-text-primary tabular-nums",
257
- children: X.byStatus.pending
258
- }), /* @__PURE__ */ E("p", {
259
- className: "text-xs text-text-secondary",
260
- children: M("movethewheels.orders.glance.pending", "Pending")
261
- })] }),
262
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
263
- className: "text-2xl font-bold text-text-primary tabular-nums",
264
- children: X.byStatus.in_transit + X.byStatus.out_for_delivery
265
- }), /* @__PURE__ */ E("p", {
266
- className: "text-xs text-text-secondary",
267
- children: M("movethewheels.orders.glance.inTransit", "In transit")
268
- })] }),
269
- /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
270
- className: "text-2xl font-bold text-text-primary tabular-nums",
271
- children: X.byStatus.delivered
272
- }), /* @__PURE__ */ E("p", {
273
- className: "text-xs text-text-secondary",
274
- children: M("movethewheels.orders.glance.delivered", "Delivered")
275
- })] })
276
- ]
277
- })] }),
278
- /* @__PURE__ */ E(ee, { children: /* @__PURE__ */ E(o, {
279
- className: "p-4",
280
- children: /* @__PURE__ */ D("div", {
281
- className: "flex flex-wrap items-center gap-4",
282
- children: [
283
- /* @__PURE__ */ D("div", {
284
- className: "flex items-center gap-2",
285
- children: [/* @__PURE__ */ E(p, {
286
- size: 16,
287
- className: "text-text-secondary"
288
- }), /* @__PURE__ */ E("span", {
289
- className: "text-sm font-medium",
290
- children: M("movethewheels.orders.filters.label", "Filters:")
291
- })]
292
- }),
293
- /* @__PURE__ */ D(r, {
294
- value: F,
295
- onValueChange: (e) => {
296
- I(e), $();
297
- },
298
- children: [/* @__PURE__ */ E(n, {
299
- className: "w-[180px]",
300
- children: /* @__PURE__ */ E(i, { placeholder: M("movethewheels.orders.filters.status", "Status") })
301
- }), /* @__PURE__ */ E(e, { children: ie.map((e) => /* @__PURE__ */ E(t, {
302
- value: e.value,
303
- children: e.label
304
- }, e.value)) })]
305
- }),
306
- /* @__PURE__ */ D(r, {
307
- value: L,
308
- onValueChange: (e) => {
309
- R(e), $();
310
- },
311
- children: [/* @__PURE__ */ E(n, {
312
- className: "w-[150px]",
313
- children: /* @__PURE__ */ E(i, { placeholder: M("movethewheels.orders.filters.type", "Type") })
314
- }), /* @__PURE__ */ D(e, { children: [
315
- /* @__PURE__ */ E(t, {
316
- value: "all",
317
- children: M("movethewheels.orders.filters.allTypes", "All Types")
318
- }),
319
- /* @__PURE__ */ E(t, {
320
- value: "b2b",
321
- children: "B2B"
322
- }),
323
- /* @__PURE__ */ E(t, {
324
- value: "b2c",
325
- children: "B2C"
326
- })
327
- ] })]
328
- }),
329
- /* @__PURE__ */ D(u, {
330
- variant: z ? "default" : "outline",
331
- size: "sm",
332
- onClick: () => {
333
- B((e) => !e), $();
334
- },
335
- children: [/* @__PURE__ */ E(j, {
336
- size: 14,
337
- className: "mr-1"
338
- }), M("movethewheels.orders.filters.unassigned", "Needs driver")]
339
- }),
340
- G && /* @__PURE__ */ E(u, {
341
- variant: "ghost",
342
- size: "sm",
343
- onClick: () => {
344
- I("all"), R("all"), B(!1), $();
345
- },
346
- children: M("movethewheels.orders.filters.clear", "Clear filters")
347
- })
348
- ]
349
- })
350
- }) }),
351
- /* @__PURE__ */ E(d, {
352
- columns: re,
353
- data: K,
354
- isLoading: J,
355
- searchable: !0,
356
- searchPlaceholder: M("movethewheels.orders.searchPlaceholder", "Search orders..."),
357
- searchFields: ["orderNumber", "customerInfo"],
358
- onRowClick: (e) => Q(`orders/${e.id}`),
359
- getRowId: (e) => e.id,
360
- pageIndex: V,
361
- pageSize: U,
362
- onPageChange: H,
363
- onPageSizeChange: (e) => {
364
- W(e), H(0);
365
- },
366
- totalItems: G ? void 0 : Z,
367
- hasNextPage: q,
368
- emptyMessage: M("movethewheels.orders.empty", "No orders found"),
369
- emptyIllustration: "empty-data",
370
- emptyTitle: M("movethewheels.orders.emptyTitle", "No orders yet"),
371
- emptyDescription: M("movethewheels.orders.emptyDescription", "Create your first order to start moving shipments through the pipeline."),
372
- emptyAction: /* @__PURE__ */ D(u, {
373
- onClick: () => Q("orders/new"),
374
- children: [/* @__PURE__ */ E(h, {
375
- size: 16,
376
- className: "mr-1.5"
377
- }), M("movethewheels.orders.actions.newOrder", "New Order")]
378
- })
379
- })
380
- ]
381
- });
382
- }
383
- //#endregion
384
- export { M as default };
@@ -1,180 +0,0 @@
1
- import { ct as e, i as t, l as n, ot as r } from "./PageLayout-D4LDHJJq.js";
2
- import { t as i } from "./DataTable-XvUcTjwi.js";
3
- import { t as a } from "./download-C5NbvVDc.js";
4
- import { t as o } from "./package-CcRttV2N.js";
5
- import { t as s } from "./plus-C_XZDwBz.js";
6
- import { t as c } from "./refresh-cw-CfgN67l3.js";
7
- import { a as l, i as u } from "./useInventory-CAAVMRp6.js";
8
- import { n as d } from "./formatters-BQr-aR5W.js";
9
- import { useState as f } from "react";
10
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
11
- import { CTAOverflowMenu as h, EmphasisPanel as g, PagePurpose as _ } from "@burdenoff/fe-libs/ui";
12
- //#region src/movethewheels/pages/ProductsPage.tsx
13
- function v() {
14
- let { basePath: v, navigate: y } = r(), [b, x] = f(0), [S, C] = f(25), { products: w, hasMore: T, isLoading: E, refetch: D } = l({
15
- limit: S,
16
- offset: b * S
17
- }), { stats: O } = u(), k = (t) => y?.(e(v, t));
18
- return /* @__PURE__ */ m(t, {
19
- title: "Products",
20
- subtitle: `${O.total} products`,
21
- icon: /* @__PURE__ */ p(o, { size: 24 }),
22
- headerActions: /* @__PURE__ */ p(h, {
23
- primary: {
24
- label: "Add Product",
25
- icon: /* @__PURE__ */ p(s, { size: 16 }),
26
- onSelect: () => k("inventory/products/new")
27
- },
28
- actions: [{
29
- label: "Refresh",
30
- icon: /* @__PURE__ */ p(c, { size: 16 }),
31
- onSelect: () => D()
32
- }, {
33
- label: "Export",
34
- icon: /* @__PURE__ */ p(a, { size: 16 }),
35
- onSelect: () => k("import-export")
36
- }]
37
- }),
38
- children: [
39
- /* @__PURE__ */ p(_, {
40
- icon: /* @__PURE__ */ p(o, { size: 18 }),
41
- children: "The catalog of items you ship. Each product's dimensions, weight, value and handling flags (fragile, hazardous, temperature-controlled) drive how it's packed, priced and routed — keep them accurate so shipments are quoted and handled correctly."
42
- }),
43
- /* @__PURE__ */ m(g, { children: [/* @__PURE__ */ p("p", {
44
- className: "text-sm font-medium text-text-secondary",
45
- children: "Catalog at a glance"
46
- }), /* @__PURE__ */ m("div", {
47
- className: "mt-3 grid grid-cols-3 gap-4",
48
- children: [
49
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
50
- className: "text-2xl font-bold text-text-primary tabular-nums",
51
- children: O.total
52
- }), /* @__PURE__ */ p("p", {
53
- className: "text-xs text-text-secondary",
54
- children: "Total products"
55
- })] }),
56
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
57
- className: "text-2xl font-bold text-text-primary tabular-nums",
58
- children: O.specialHandling
59
- }), /* @__PURE__ */ p("p", {
60
- className: "text-xs text-text-secondary",
61
- children: "Special handling"
62
- })] }),
63
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
64
- className: "text-2xl font-bold text-text-primary tabular-nums",
65
- children: O.temperatureControlled
66
- }), /* @__PURE__ */ p("p", {
67
- className: "text-xs text-text-secondary",
68
- children: "Temp-controlled"
69
- })] })
70
- ]
71
- })] }),
72
- /* @__PURE__ */ p(i, {
73
- columns: [
74
- {
75
- id: "sku",
76
- header: "SKU",
77
- accessorKey: "sku",
78
- sortable: !0,
79
- cell: (e) => /* @__PURE__ */ p("span", {
80
- className: "font-mono",
81
- children: e.sku
82
- })
83
- },
84
- {
85
- id: "name",
86
- header: "Product Name",
87
- accessorKey: "name",
88
- sortable: !0,
89
- cell: (e) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
90
- className: "font-medium",
91
- children: e.name
92
- }), /* @__PURE__ */ p("p", {
93
- className: "text-sm text-text-secondary line-clamp-1",
94
- children: e.description
95
- })] })
96
- },
97
- {
98
- id: "category",
99
- header: "Category",
100
- accessorKey: "category",
101
- sortable: !0,
102
- cell: (e) => /* @__PURE__ */ p(n, {
103
- variant: "outline",
104
- children: e.category
105
- })
106
- },
107
- {
108
- id: "dimensions",
109
- header: "Dimensions",
110
- cell: (e) => `${e.dimensions.length}x${e.dimensions.width}x${e.dimensions.height} ${e.dimensions.unit}`
111
- },
112
- {
113
- id: "weight",
114
- header: "Weight",
115
- accessorKey: "weight",
116
- sortable: !0,
117
- cell: (e) => `${e.weight} kg`
118
- },
119
- {
120
- id: "value",
121
- header: "Value",
122
- accessorKey: "value",
123
- sortable: !0,
124
- cell: (e) => /* @__PURE__ */ p("span", {
125
- className: "font-medium",
126
- children: d(e.value)
127
- })
128
- },
129
- {
130
- id: "flags",
131
- header: "Flags",
132
- cell: (e) => /* @__PURE__ */ m("div", {
133
- className: "flex gap-1",
134
- children: [
135
- e.fragile && /* @__PURE__ */ p(n, {
136
- variant: "destructive",
137
- className: "text-xs",
138
- children: "Fragile"
139
- }),
140
- e.hazardous && /* @__PURE__ */ p(n, {
141
- variant: "destructive",
142
- className: "text-xs",
143
- children: "Hazardous"
144
- }),
145
- e.temperatureControlled && /* @__PURE__ */ p(n, {
146
- variant: "secondary",
147
- className: "text-xs",
148
- children: "Temp Control"
149
- })
150
- ]
151
- })
152
- }
153
- ],
154
- data: w,
155
- isLoading: E,
156
- searchable: !0,
157
- searchPlaceholder: "Search products...",
158
- searchFields: [
159
- "name",
160
- "sku",
161
- "category"
162
- ],
163
- onRowClick: (e) => k(`inventory/products/${e.id}`),
164
- getRowId: (e) => e.id,
165
- pageIndex: b,
166
- pageSize: S,
167
- onPageChange: x,
168
- onPageSizeChange: (e) => {
169
- C(e), x(0);
170
- },
171
- hasNextPage: T,
172
- emptyIllustration: "empty-files",
173
- emptyTitle: "No products yet",
174
- emptyDescription: "Add products to your catalog so they can be added to orders and stocked in warehouses."
175
- })
176
- ]
177
- });
178
- }
179
- //#endregion
180
- export { v as default };