@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
@@ -0,0 +1,184 @@
1
+ import { M as e, i as t, lt as n, st as r } from "./PageLayout-BniRJaQ6.js";
2
+ import { t as i } from "./DataTable-CqMUD4er.js";
3
+ import { t as a } from "./circle-check-Cs1OVjtV.js";
4
+ import { t as o } from "./download-DP04iWTd.js";
5
+ import { t as s } from "./plus-DlANgOFx.js";
6
+ import { t as c } from "./refresh-cw-rW59D4b7.js";
7
+ import { t as l } from "./route-CWjPrtAN.js";
8
+ import { t as u } from "./truck-9rLDncav.js";
9
+ import { t as d } from "./wrench-Dg-sgH2e.js";
10
+ import { i as f, o as p } from "./useFleet-g5Yri0G8.js";
11
+ import { r as m, t as h } from "./MetricCard-y3bWHKUQ.js";
12
+ import { a as g, r as _ } from "./StatusBadge-BNHXYvZx.js";
13
+ import { useState as v } from "react";
14
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
15
+ import { CTAOverflowMenu as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
16
+ //#region src/movethewheels/pages/VehiclesPage.tsx
17
+ function C() {
18
+ let { basePath: C, navigate: w } = r(), [T, E] = v(0), [D, O] = v(25), { vehicles: k, isLoading: A, refetch: j } = p({
19
+ limit: D,
20
+ offset: T * D
21
+ }), { stats: M } = f(), N = M.totalVehicles, P = (e) => {
22
+ w && w(n(C, e));
23
+ };
24
+ return /* @__PURE__ */ b(t, {
25
+ title: "Vehicles",
26
+ subtitle: `${N} vehicles in fleet`,
27
+ icon: /* @__PURE__ */ y(u, { size: 24 }),
28
+ headerActions: /* @__PURE__ */ y(x, {
29
+ primary: {
30
+ label: "Add Vehicle",
31
+ icon: /* @__PURE__ */ y(s, { size: 16 }),
32
+ onSelect: () => P("fleet/vehicles/new")
33
+ },
34
+ actions: [{
35
+ label: "Refresh",
36
+ icon: /* @__PURE__ */ y(c, { size: 16 }),
37
+ onSelect: () => j()
38
+ }, {
39
+ label: "Export",
40
+ icon: /* @__PURE__ */ y(o, { size: 16 }),
41
+ onSelect: () => P("import-export")
42
+ }]
43
+ }),
44
+ children: [
45
+ /* @__PURE__ */ y(S, {
46
+ icon: /* @__PURE__ */ y(u, { size: 18 }),
47
+ children: "Every truck, van and bike in your fleet. Monitor capacity, fuel level, mileage and maintenance status here so you always know which vehicles are road-ready before dispatching an order."
48
+ }),
49
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
50
+ className: "mb-3 text-sm font-medium text-text-secondary",
51
+ children: "Fleet at a glance"
52
+ }), /* @__PURE__ */ b(m, {
53
+ columns: 4,
54
+ children: [
55
+ /* @__PURE__ */ y(h, {
56
+ label: "Total vehicles",
57
+ value: N,
58
+ icon: /* @__PURE__ */ y(u, { size: 20 }),
59
+ accent: "brand"
60
+ }),
61
+ /* @__PURE__ */ y(h, {
62
+ label: "Available now",
63
+ value: M.vehiclesByStatus.available,
64
+ icon: /* @__PURE__ */ y(a, { size: 20 }),
65
+ accent: "success",
66
+ subtitle: "Ready to dispatch"
67
+ }),
68
+ /* @__PURE__ */ y(h, {
69
+ label: "On assignment",
70
+ value: M.vehiclesByStatus.assigned,
71
+ icon: /* @__PURE__ */ y(l, { size: 20 }),
72
+ accent: "blue"
73
+ }),
74
+ /* @__PURE__ */ y(h, {
75
+ label: "In maintenance",
76
+ value: M.vehiclesByStatus.maintenance,
77
+ icon: /* @__PURE__ */ y(d, { size: 20 }),
78
+ accent: "warning"
79
+ })
80
+ ]
81
+ })] }),
82
+ /* @__PURE__ */ y(i, {
83
+ columns: [
84
+ {
85
+ id: "vehicleNumber",
86
+ header: "Vehicle #",
87
+ accessorKey: "vehicleNumber",
88
+ sortable: !0,
89
+ cell: (e) => /* @__PURE__ */ y("span", {
90
+ className: "font-medium",
91
+ children: e.vehicleNumber
92
+ })
93
+ },
94
+ {
95
+ id: "type",
96
+ header: "Type",
97
+ accessorKey: "type",
98
+ cell: (e) => /* @__PURE__ */ y(g, { type: e.type })
99
+ },
100
+ {
101
+ id: "details",
102
+ header: "Vehicle",
103
+ cell: (e) => /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("p", {
104
+ className: "font-medium",
105
+ children: [
106
+ e.make,
107
+ " ",
108
+ e.model
109
+ ]
110
+ }), /* @__PURE__ */ y("p", {
111
+ className: "text-sm text-text-secondary",
112
+ children: e.year
113
+ })] })
114
+ },
115
+ {
116
+ id: "status",
117
+ header: "Status",
118
+ accessorKey: "status",
119
+ sortable: !0,
120
+ cell: (e) => /* @__PURE__ */ y(_, {
121
+ status: e.status,
122
+ type: "vehicle"
123
+ })
124
+ },
125
+ {
126
+ id: "capacity",
127
+ header: "Capacity",
128
+ cell: (e) => /* @__PURE__ */ b("div", {
129
+ className: "text-sm",
130
+ children: [/* @__PURE__ */ b("p", { children: [e.capacity.weight, " kg"] }), /* @__PURE__ */ b("p", {
131
+ className: "text-text-secondary",
132
+ children: [e.capacity.volume, " m³"]
133
+ })]
134
+ })
135
+ },
136
+ {
137
+ id: "fuel",
138
+ header: "Fuel Level",
139
+ cell: (t) => t.fuelLevel === void 0 ? "-" : /* @__PURE__ */ b("div", {
140
+ className: "flex items-center gap-2",
141
+ children: [/* @__PURE__ */ y(e, {
142
+ value: t.fuelLevel,
143
+ className: "w-16 h-2"
144
+ }), /* @__PURE__ */ b("span", {
145
+ className: "text-sm",
146
+ children: [t.fuelLevel, "%"]
147
+ })]
148
+ })
149
+ },
150
+ {
151
+ id: "mileage",
152
+ header: "Mileage",
153
+ accessorKey: "mileage",
154
+ sortable: !0,
155
+ cell: (e) => e.mileage ? `${e.mileage.toLocaleString()} mi` : "-"
156
+ }
157
+ ],
158
+ data: k,
159
+ isLoading: A,
160
+ searchable: !0,
161
+ searchPlaceholder: "Search vehicles...",
162
+ searchFields: [
163
+ "vehicleNumber",
164
+ "make",
165
+ "model"
166
+ ],
167
+ onRowClick: (e) => P(`fleet/vehicles/${e.id}`),
168
+ getRowId: (e) => e.id,
169
+ pageIndex: T,
170
+ pageSize: D,
171
+ onPageChange: E,
172
+ onPageSizeChange: (e) => {
173
+ O(e), E(0);
174
+ },
175
+ totalItems: N,
176
+ emptyIllustration: "empty-data",
177
+ emptyTitle: "No vehicles yet",
178
+ emptyDescription: "Add vehicles to your fleet to start assigning them to deliveries."
179
+ })
180
+ ]
181
+ });
182
+ }
183
+ //#endregion
184
+ export { C as default };
@@ -1,15 +1,15 @@
1
- import { A as e, F as t, I as n, L as r, M as i, P 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, l as m, n as h, ot as g, r as _, u as v } from "./PageLayout-D4LDHJJq.js";
2
- import { t as y } from "./arrow-left-n48Y-Wis.js";
3
- import { t as b } from "./box-Eu05PXDh.js";
4
- import { t as x } from "./clock-Bl3ptexL.js";
5
- import { t as S } from "./map-pin-Dznl5l40.js";
6
- import { t as C } from "./save-DJE8Fpdv.js";
7
- import { t as w } from "./square-pen-D-6JYrVQ.js";
8
- import { t as T } from "./users-CCrq-w0C.js";
9
- import { t as E } from "./warehouse-CaqfmMKh.js";
10
- import { o as D, t as O } from "./useInventory-CAAVMRp6.js";
11
- import { t as k } from "./FormError-cuLV2jVD.js";
12
- import { t as A } from "./formatters-BQr-aR5W.js";
1
+ import { A as e, F as t, I as n, L as r, M as i, P as a, R as o, d as s, f as c, g as l, h as u, i as d, j as f, l as p, lt as m, n as h, r as g, st as _, u as v } from "./PageLayout-BniRJaQ6.js";
2
+ import { t as y } from "./arrow-left-ClW4Isj7.js";
3
+ import { t as b } from "./box-BT3NsRQP.js";
4
+ import { t as x } from "./clock-dRGG4rkF.js";
5
+ import { t as S } from "./map-pin-CqN1bbT1.js";
6
+ import { t as C } from "./save-UDlog7hg.js";
7
+ import { t as w } from "./square-pen-BcfB3Grd.js";
8
+ import { t as T } from "./users-B8KhJBGg.js";
9
+ import { t as E } from "./warehouse-CcMMioeY.js";
10
+ import { o as D, t as O } from "./useInventory-BSOn-R1c.js";
11
+ import { t as k } from "./FormError-BKcb_wT-.js";
12
+ import { t as A } from "./formatters-FWJDwTFv.js";
13
13
  import { useState as j } from "react";
14
14
  import { useParams as M } from "react-router-dom";
15
15
  import { jsx as N, jsxs as P } from "react/jsx-runtime";
@@ -38,7 +38,7 @@ var R = [
38
38
  }
39
39
  ];
40
40
  function z() {
41
- let { basePath: i, navigate: m } = g(), { createWarehouse: h } = O(), [_, b] = j({
41
+ let { basePath: i, navigate: p } = _(), { createWarehouse: h } = O(), [g, b] = j({
42
42
  code: "",
43
43
  name: "",
44
44
  type: "DISTRIBUTION",
@@ -48,39 +48,39 @@ function z() {
48
48
  postalCode: "",
49
49
  country: "USA",
50
50
  totalCapacity: ""
51
- }), [x, w] = j(!1), [T, D] = j(null), A = () => m?.(s(i, "inventory/warehouses")), M = (e, t) => b((n) => ({
51
+ }), [x, w] = j(!1), [T, D] = j(null), A = () => p?.(m(i, "inventory/warehouses")), M = (e, t) => b((n) => ({
52
52
  ...n,
53
53
  [e]: t
54
54
  })), I = async (e) => {
55
- if (e.preventDefault(), !_.code.trim() || !_.name.trim()) {
55
+ if (e.preventDefault(), !g.code.trim() || !g.name.trim()) {
56
56
  D("Warehouse code and name are required.");
57
57
  return;
58
58
  }
59
- if (!_.street.trim() || !_.city.trim()) {
59
+ if (!g.street.trim() || !g.city.trim()) {
60
60
  D("A street and city are required for the warehouse address.");
61
61
  return;
62
62
  }
63
63
  w(!0), D(null);
64
64
  try {
65
- let e = _.totalCapacity.trim() ? Number(_.totalCapacity) : void 0, t = await h({
66
- code: _.code.trim(),
67
- name: _.name.trim(),
68
- type: _.type,
65
+ let e = g.totalCapacity.trim() ? Number(g.totalCapacity) : void 0, t = await h({
66
+ code: g.code.trim(),
67
+ name: g.name.trim(),
68
+ type: g.type,
69
69
  address: {
70
- street: _.street.trim(),
71
- city: _.city.trim(),
72
- state: _.state.trim(),
73
- postalCode: _.postalCode.trim(),
74
- country: _.country.trim()
70
+ street: g.street.trim(),
71
+ city: g.city.trim(),
72
+ state: g.state.trim(),
73
+ postalCode: g.postalCode.trim(),
74
+ country: g.country.trim()
75
75
  },
76
76
  totalCapacity: e !== void 0 && !Number.isNaN(e) ? e : void 0
77
77
  });
78
- m?.(s(i, `inventory/warehouses/${t.id}`));
78
+ p?.(m(i, `inventory/warehouses/${t.id}`));
79
79
  } catch (e) {
80
80
  console.error("Failed to create warehouse:", e), D(e instanceof Error ? e.message : "Failed to create warehouse. Please try again."), w(!1);
81
81
  }
82
82
  };
83
- return /* @__PURE__ */ P(f, {
83
+ return /* @__PURE__ */ P(d, {
84
84
  title: "Add Warehouse",
85
85
  subtitle: "Register a storage and fulfilment site",
86
86
  icon: /* @__PURE__ */ N(E, { size: 24 }),
@@ -119,7 +119,7 @@ function z() {
119
119
  children: [
120
120
  /* @__PURE__ */ P("div", {
121
121
  className: "space-y-2",
122
- children: [/* @__PURE__ */ P(p, {
122
+ children: [/* @__PURE__ */ P(f, {
123
123
  htmlFor: "code",
124
124
  children: ["Code ", /* @__PURE__ */ N("span", {
125
125
  className: "text-status-error-text",
@@ -127,7 +127,7 @@ function z() {
127
127
  })]
128
128
  }), /* @__PURE__ */ N(e, {
129
129
  id: "code",
130
- value: _.code,
130
+ value: g.code,
131
131
  onChange: (e) => M("code", e.target.value),
132
132
  placeholder: "WH-SF-01",
133
133
  required: !0
@@ -135,7 +135,7 @@ function z() {
135
135
  }),
136
136
  /* @__PURE__ */ P("div", {
137
137
  className: "space-y-2",
138
- children: [/* @__PURE__ */ P(p, {
138
+ children: [/* @__PURE__ */ P(f, {
139
139
  htmlFor: "name",
140
140
  children: ["Name ", /* @__PURE__ */ N("span", {
141
141
  className: "text-status-error-text",
@@ -143,7 +143,7 @@ function z() {
143
143
  })]
144
144
  }), /* @__PURE__ */ N(e, {
145
145
  id: "name",
146
- value: _.name,
146
+ value: g.name,
147
147
  onChange: (e) => M("name", e.target.value),
148
148
  placeholder: "San Francisco DC",
149
149
  required: !0
@@ -151,14 +151,14 @@ function z() {
151
151
  }),
152
152
  /* @__PURE__ */ P("div", {
153
153
  className: "space-y-2",
154
- children: [/* @__PURE__ */ P(p, {
154
+ children: [/* @__PURE__ */ P(f, {
155
155
  htmlFor: "type",
156
156
  children: ["Type ", /* @__PURE__ */ N("span", {
157
157
  className: "text-status-error-text",
158
158
  children: "*"
159
159
  })]
160
160
  }), /* @__PURE__ */ P(a, {
161
- value: _.type,
161
+ value: g.type,
162
162
  onValueChange: (e) => M("type", e),
163
163
  children: [/* @__PURE__ */ N(r, {
164
164
  id: "type",
@@ -172,20 +172,20 @@ function z() {
172
172
  ]
173
173
  }), /* @__PURE__ */ P("div", {
174
174
  className: "space-y-2",
175
- children: [/* @__PURE__ */ N(p, {
175
+ children: [/* @__PURE__ */ N(f, {
176
176
  htmlFor: "totalCapacity",
177
177
  children: "Total Capacity (sq ft)"
178
178
  }), /* @__PURE__ */ N(e, {
179
179
  id: "totalCapacity",
180
180
  type: "number",
181
181
  min: "0",
182
- value: _.totalCapacity,
182
+ value: g.totalCapacity,
183
183
  onChange: (e) => M("totalCapacity", e.target.value),
184
184
  placeholder: "50000"
185
185
  })]
186
186
  })]
187
187
  })] }),
188
- /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
188
+ /* @__PURE__ */ P(s, { children: [/* @__PURE__ */ N(u, { children: /* @__PURE__ */ P(l, {
189
189
  className: "flex items-center gap-2",
190
190
  children: [
191
191
  /* @__PURE__ */ N(S, { size: 18 }),
@@ -195,17 +195,17 @@ function z() {
195
195
  children: "*"
196
196
  })
197
197
  ]
198
- }) }), /* @__PURE__ */ P(l, {
198
+ }) }), /* @__PURE__ */ P(c, {
199
199
  className: "space-y-4",
200
200
  children: [
201
201
  /* @__PURE__ */ P("div", {
202
202
  className: "space-y-2",
203
- children: [/* @__PURE__ */ N(p, {
203
+ children: [/* @__PURE__ */ N(f, {
204
204
  htmlFor: "street",
205
205
  children: "Street"
206
206
  }), /* @__PURE__ */ N(e, {
207
207
  id: "street",
208
- value: _.street,
208
+ value: g.street,
209
209
  onChange: (e) => M("street", e.target.value),
210
210
  placeholder: "500 Industrial Way"
211
211
  })]
@@ -214,23 +214,23 @@ function z() {
214
214
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
215
215
  children: [/* @__PURE__ */ P("div", {
216
216
  className: "space-y-2",
217
- children: [/* @__PURE__ */ N(p, {
217
+ children: [/* @__PURE__ */ N(f, {
218
218
  htmlFor: "city",
219
219
  children: "City"
220
220
  }), /* @__PURE__ */ N(e, {
221
221
  id: "city",
222
- value: _.city,
222
+ value: g.city,
223
223
  onChange: (e) => M("city", e.target.value),
224
224
  placeholder: "San Francisco"
225
225
  })]
226
226
  }), /* @__PURE__ */ P("div", {
227
227
  className: "space-y-2",
228
- children: [/* @__PURE__ */ N(p, {
228
+ children: [/* @__PURE__ */ N(f, {
229
229
  htmlFor: "state",
230
230
  children: "State"
231
231
  }), /* @__PURE__ */ N(e, {
232
232
  id: "state",
233
- value: _.state,
233
+ value: g.state,
234
234
  onChange: (e) => M("state", e.target.value),
235
235
  placeholder: "CA"
236
236
  })]
@@ -240,23 +240,23 @@ function z() {
240
240
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
241
241
  children: [/* @__PURE__ */ P("div", {
242
242
  className: "space-y-2",
243
- children: [/* @__PURE__ */ N(p, {
243
+ children: [/* @__PURE__ */ N(f, {
244
244
  htmlFor: "postalCode",
245
245
  children: "ZIP / Postal Code"
246
246
  }), /* @__PURE__ */ N(e, {
247
247
  id: "postalCode",
248
- value: _.postalCode,
248
+ value: g.postalCode,
249
249
  onChange: (e) => M("postalCode", e.target.value),
250
250
  placeholder: "94103"
251
251
  })]
252
252
  }), /* @__PURE__ */ P("div", {
253
253
  className: "space-y-2",
254
- children: [/* @__PURE__ */ N(p, {
254
+ children: [/* @__PURE__ */ N(f, {
255
255
  htmlFor: "country",
256
256
  children: "Country"
257
257
  }), /* @__PURE__ */ N(e, {
258
258
  id: "country",
259
- value: _.country,
259
+ value: g.country,
260
260
  onChange: (e) => M("country", e.target.value),
261
261
  placeholder: "USA"
262
262
  })]
@@ -269,15 +269,15 @@ function z() {
269
269
  });
270
270
  }
271
271
  function B() {
272
- let { warehouseId: e } = M(), { basePath: t, navigate: n } = g(), { warehouse: r, isLoading: a, error: o, refetch: p } = D(e), C = () => n?.(s(t, "inventory/warehouses")), O = (e) => n?.(s(t, e));
272
+ let { warehouseId: e } = M(), { basePath: t, navigate: n } = _(), { warehouse: r, isLoading: a, error: o, refetch: f } = D(e), C = () => n?.(m(t, "inventory/warehouses")), O = (e) => n?.(m(t, e));
273
273
  if (!e) return /* @__PURE__ */ N(z, {});
274
- if (a) return /* @__PURE__ */ N(_, { message: "Loading warehouse details..." });
274
+ if (a) return /* @__PURE__ */ N(g, { message: "Loading warehouse details..." });
275
275
  if (o || !r) return /* @__PURE__ */ N(h, {
276
276
  title: "Warehouse not found",
277
- onRetry: p
277
+ onRetry: f
278
278
  });
279
279
  let k = r.capacity.usedSpace / r.capacity.totalSpace * 100;
280
- return /* @__PURE__ */ P(f, {
280
+ return /* @__PURE__ */ P(d, {
281
281
  title: r.name,
282
282
  subtitle: `Code: ${r.code}`,
283
283
  icon: /* @__PURE__ */ N(E, { size: 24 }),
@@ -291,10 +291,10 @@ function B() {
291
291
  }),
292
292
  headerContent: /* @__PURE__ */ P("div", {
293
293
  className: "flex gap-2",
294
- children: [/* @__PURE__ */ N(m, {
294
+ children: [/* @__PURE__ */ N(p, {
295
295
  variant: r.isActive ? "default" : "secondary",
296
296
  children: r.isActive ? "Active" : "Inactive"
297
- }), /* @__PURE__ */ N(m, {
297
+ }), /* @__PURE__ */ N(p, {
298
298
  variant: "outline",
299
299
  className: "capitalize",
300
300
  children: r.type.replace("_", " ")
@@ -348,7 +348,7 @@ function B() {
348
348
  ]
349
349
  })
350
350
  ] }), /* @__PURE__ */ N("div", {
351
- className: "grid grid-cols-2 gap-4",
351
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
352
352
  children: /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
353
353
  className: "text-sm text-text-secondary",
354
354
  children: "Pallets Used"
@@ -365,11 +365,11 @@ function B() {
365
365
  })] })
366
366
  })]
367
367
  })] }),
368
- /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, { children: [
368
+ /* @__PURE__ */ P(s, { children: [/* @__PURE__ */ N(u, { children: /* @__PURE__ */ P(l, { children: [
369
369
  "Zones (",
370
370
  r.zones.length,
371
371
  ")"
372
- ] }) }), /* @__PURE__ */ N(l, { children: /* @__PURE__ */ N("div", {
372
+ ] }) }), /* @__PURE__ */ N(c, { children: /* @__PURE__ */ N("div", {
373
373
  className: "space-y-3",
374
374
  children: r.zones.map((e) => /* @__PURE__ */ P("div", {
375
375
  className: "flex items-center justify-between p-3 border rounded-lg",
@@ -399,10 +399,10 @@ function B() {
399
399
  })]
400
400
  }, e.id))
401
401
  }) })] }),
402
- /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
402
+ /* @__PURE__ */ P(s, { children: [/* @__PURE__ */ N(u, { children: /* @__PURE__ */ P(l, {
403
403
  className: "flex items-center gap-2",
404
404
  children: [/* @__PURE__ */ N(x, { size: 18 }), " Operating Hours"]
405
- }) }), /* @__PURE__ */ N(l, { children: /* @__PURE__ */ N("div", {
405
+ }) }), /* @__PURE__ */ N(c, { children: /* @__PURE__ */ N("div", {
406
406
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
407
407
  children: Object.entries(r.operatingHours).map(([e, t]) => /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
408
408
  className: "text-sm font-medium",
@@ -416,14 +416,14 @@ function B() {
416
416
  }), /* @__PURE__ */ P("div", {
417
417
  className: "space-y-6",
418
418
  children: [
419
- /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
419
+ /* @__PURE__ */ P(s, { children: [/* @__PURE__ */ N(u, { children: /* @__PURE__ */ P(l, {
420
420
  className: "flex items-center gap-2",
421
421
  children: [/* @__PURE__ */ N(S, { size: 18 }), " Location"]
422
- }) }), /* @__PURE__ */ N(l, { children: /* @__PURE__ */ N("p", {
422
+ }) }), /* @__PURE__ */ N(c, { children: /* @__PURE__ */ N("p", {
423
423
  className: "text-sm",
424
424
  children: A(r.address)
425
425
  }) })] }),
426
- /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ N(u, { children: "Metrics" }) }), /* @__PURE__ */ P(l, {
426
+ /* @__PURE__ */ P(s, { children: [/* @__PURE__ */ N(u, { children: /* @__PURE__ */ N(l, { children: "Metrics" }) }), /* @__PURE__ */ P(c, {
427
427
  className: "space-y-3",
428
428
  children: [
429
429
  /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
@@ -459,7 +459,7 @@ function B() {
459
459
  })] })
460
460
  ]
461
461
  })] }),
462
- /* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
462
+ /* @__PURE__ */ P(s, { children: [/* @__PURE__ */ N(u, { children: /* @__PURE__ */ P(l, {
463
463
  className: "flex items-center gap-2",
464
464
  children: [
465
465
  /* @__PURE__ */ N(T, { size: 18 }),
@@ -467,14 +467,14 @@ function B() {
467
467
  r.staff.length,
468
468
  ")"
469
469
  ]
470
- }) }), /* @__PURE__ */ N(l, { children: r.staff.length > 0 ? /* @__PURE__ */ N("div", {
470
+ }) }), /* @__PURE__ */ N(c, { children: r.staff.length > 0 ? /* @__PURE__ */ N("div", {
471
471
  className: "space-y-2",
472
472
  children: r.staff.map((e, t) => /* @__PURE__ */ P("div", {
473
473
  className: "flex items-center justify-between p-2 border rounded",
474
474
  children: [/* @__PURE__ */ N("span", {
475
475
  className: "text-sm capitalize",
476
476
  children: e.role
477
- }), /* @__PURE__ */ N(m, {
477
+ }), /* @__PURE__ */ N(p, {
478
478
  variant: "outline",
479
479
  children: e.shift
480
480
  })]