@burdenoff/microfe-movethewheels 2026.624.1 → 2026.626.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 (119) hide show
  1. package/dist/{AIAssistantPage-BrHX2lQn.js → AIAssistantPage-AvsMbunM.js} +39 -33
  2. package/dist/{AnalyticsPage-DI6Wcaw5.js → AnalyticsPage-CCLfHgQZ.js} +44 -33
  3. package/dist/CreateOrderPage-CjlnEtk3.js +510 -0
  4. package/dist/CustomerDetailsPage-I6cdDHUi.js +265 -0
  5. package/dist/CustomersPage-CGGfD4ki.js +163 -0
  6. package/dist/{DashboardPage-3ZOnwg1a.js → DashboardPage-D2HRqwg9.js} +122 -111
  7. package/dist/DataTable-CD9ZhpLB.js +249 -0
  8. package/dist/DriverDetailsPage-rg_pGNuP.js +330 -0
  9. package/dist/DriversPage-DKiynISH.js +167 -0
  10. package/dist/FinancePage-Vg8WPs38.js +158 -0
  11. package/dist/{FleetPage-CPS7r4J3.js → FleetPage-DddXt8r8.js} +124 -85
  12. package/dist/ImportExportPage-BW6qO3kc.js +248 -0
  13. package/dist/InventoryPage-rMGuaJN-.js +222 -0
  14. package/dist/LiveTrackingPage-DQ1q4Id3.js +375 -0
  15. package/dist/MarketplacePage-DKrXAv62.js +219 -0
  16. package/dist/MetricCard-B7yMyvMX.js +146 -0
  17. package/dist/OrderDetailsPage-CFASgsYX.js +431 -0
  18. package/dist/OrdersListPage-BHeT8S5o.js +309 -0
  19. package/dist/{PageLayout-xDTiBTDS.js → PageLayout-D3N8MCTm.js} +213 -195
  20. package/dist/ProductDetailsPage-CFGcbaHo.js +195 -0
  21. package/dist/ProductsPage--xEpbQ8A.js +171 -0
  22. package/dist/{ReportsPage-B8OyWGzl.js → ReportsPage-Bb7_90rK.js} +57 -49
  23. package/dist/RouteDetailsPage-CVtDVb1N.js +282 -0
  24. package/dist/RoutesPage-s57PtgcQ.js +163 -0
  25. package/dist/SettingsPage-BYNCBOpN.js +298 -0
  26. package/dist/{StatusBadge-C--7NhoW.js → StatusBadge-CijYQXtb.js} +5 -2
  27. package/dist/{TrackingPage-BldUm_g7.js → TrackingPage-CcRc_dva.js} +88 -83
  28. package/dist/VehicleDetailsPage-3YDMPsPs.js +220 -0
  29. package/dist/VehiclesPage-UlxPWP9K.js +167 -0
  30. package/dist/WarehouseDetailsPage-Db7KeN-d.js +238 -0
  31. package/dist/WarehousesPage-CuTO-OPp.js +164 -0
  32. package/dist/{arrow-left-Bk5GsGNk.js → arrow-left-CBpZKkpq.js} +1 -1
  33. package/dist/{box-BAMv2-7M.js → box-CAaiElsb.js} +1 -1
  34. package/dist/{chart-column-CAfkf4o6.js → chart-column-D1Ym15-S.js} +1 -1
  35. package/dist/{chevron-right-Czrt_Qew.js → chevron-right-BIFGi0UA.js} +1 -1
  36. package/dist/{circle-alert-CEuV9Pij.js → circle-alert-DjmNo5_L.js} +1 -1
  37. package/dist/{circle-check-big-Cx8aO6B-.js → circle-check-big-CjuPVo3_.js} +1 -1
  38. package/dist/{clock-Be95bq7_.js → clock-BjkdnddD.js} +1 -1
  39. package/dist/{dollar-sign-kJqItPli.js → dollar-sign-IB4O0wuQ.js} +1 -1
  40. package/dist/{download-caab0D3V.js → download-Dpa9vqoG.js} +1 -1
  41. package/dist/{file-text-b1qhrJn1.js → file-text-C8Uioy11.js} +1 -1
  42. package/dist/{filter-BWmLTZB-.js → filter-Da5OZaHI.js} +1 -1
  43. package/dist/index.js +16 -16
  44. package/dist/{map-CS2aFgyO.js → map-_Per4sT9.js} +1 -1
  45. package/dist/{map-pin-96FeqL7H.js → map-pin-BSaf5IDL.js} +1 -1
  46. package/dist/{navigation-i6UXEjTC.js → navigation-DaTbrhw2.js} +1 -1
  47. package/dist/{package-KhSi3xaT.js → package-BE7U0wQE.js} +1 -1
  48. package/dist/{phone-B-h3tbsr.js → phone-DV4StZiA.js} +1 -1
  49. package/dist/{plus-D2BYAzMn.js → plus-Dl1rLeJR.js} +1 -1
  50. package/dist/{refresh-cw-D5Sy01s-.js → refresh-cw-CWfERAit.js} +1 -1
  51. package/dist/{route-CBDXuwH9.js → route-Dp9JiN_E.js} +1 -1
  52. package/dist/{save-CMc7h-Vi.js → save-XH8vydOn.js} +1 -1
  53. package/dist/{search-DVrUQbOg.js → search-OxoIiL_C.js} +1 -1
  54. package/dist/{settings-BwzIRYv3.js → settings-3Rw5NwFF.js} +1 -1
  55. package/dist/{square-pen-DmW36Bau.js → square-pen-hLIbFQFV.js} +1 -1
  56. package/dist/{star-Cv2MzxZL.js → star-YsVV3MNQ.js} +1 -1
  57. package/dist/{store-CLH957vl.js → store-RCBl7HB-.js} +1 -1
  58. package/dist/{trending-up-l8M0BO_w.js → trending-up-C-85AwGT.js} +1 -1
  59. package/dist/{triangle-alert-BI45s6bH.js → triangle-alert-BOhfGgmh.js} +1 -1
  60. package/dist/{truck-DX3lNQkz.js → truck-CtDjNFbi.js} +1 -1
  61. package/dist/{user-D8EY1uvt.js → user-Dz5TJZFs.js} +1 -1
  62. package/dist/{users-CfG0J8wP.js → users-g2N0eL-Z.js} +1 -1
  63. package/dist/{warehouse-Dt_bAr82.js → warehouse-D3WWDeTX.js} +1 -1
  64. package/dist/{wrench-C50eI_Iy.js → wrench-CmxY1n4I.js} +1 -1
  65. package/package.json +2 -2
  66. package/src/movethewheels/components/DataTable.tsx +41 -6
  67. package/src/movethewheels/components/MetricCard.tsx +51 -20
  68. package/src/movethewheels/components/PageLayout.tsx +60 -5
  69. package/src/movethewheels/components/StatusBadge.tsx +2 -1
  70. package/src/movethewheels/pages/AIAssistantPage.tsx +11 -3
  71. package/src/movethewheels/pages/AnalyticsPage.tsx +31 -25
  72. package/src/movethewheels/pages/CreateOrderPage.tsx +56 -17
  73. package/src/movethewheels/pages/CustomerDetailsPage.tsx +63 -38
  74. package/src/movethewheels/pages/CustomersPage.tsx +51 -12
  75. package/src/movethewheels/pages/DashboardPage.tsx +62 -48
  76. package/src/movethewheels/pages/DriverDetailsPage.tsx +57 -26
  77. package/src/movethewheels/pages/DriversPage.tsx +45 -12
  78. package/src/movethewheels/pages/FinancePage.tsx +45 -41
  79. package/src/movethewheels/pages/FleetPage.tsx +82 -34
  80. package/src/movethewheels/pages/ImportExportPage.tsx +46 -29
  81. package/src/movethewheels/pages/InventoryPage.tsx +37 -33
  82. package/src/movethewheels/pages/LiveTrackingPage.tsx +58 -20
  83. package/src/movethewheels/pages/MarketplacePage.tsx +37 -3
  84. package/src/movethewheels/pages/OrderDetailsPage.tsx +74 -46
  85. package/src/movethewheels/pages/OrdersListPage.tsx +81 -14
  86. package/src/movethewheels/pages/ProductDetailsPage.tsx +36 -11
  87. package/src/movethewheels/pages/ProductsPage.tsx +41 -12
  88. package/src/movethewheels/pages/ReportsPage.tsx +23 -19
  89. package/src/movethewheels/pages/RouteDetailsPage.tsx +71 -31
  90. package/src/movethewheels/pages/RoutesPage.tsx +48 -9
  91. package/src/movethewheels/pages/SettingsPage.tsx +68 -26
  92. package/src/movethewheels/pages/TrackingPage.tsx +52 -49
  93. package/src/movethewheels/pages/VehicleDetailsPage.tsx +49 -24
  94. package/src/movethewheels/pages/VehiclesPage.tsx +41 -15
  95. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +55 -30
  96. package/src/movethewheels/pages/WarehousesPage.tsx +46 -9
  97. package/dist/CreateOrderPage-DfkSi6JF.js +0 -471
  98. package/dist/CustomerDetailsPage-DzAIu_tH.js +0 -239
  99. package/dist/CustomersPage-d21ixOYa.js +0 -119
  100. package/dist/DataTable-CZGz3SJu.js +0 -239
  101. package/dist/DriverDetailsPage-YuZSlPSV.js +0 -297
  102. package/dist/DriversPage-BOhqEBTv.js +0 -127
  103. package/dist/FinancePage-CnjUNXOb.js +0 -154
  104. package/dist/ImportExportPage-zNjs7xsV.js +0 -232
  105. package/dist/InventoryPage-C9g5d3SW.js +0 -223
  106. package/dist/LiveTrackingPage-DoBvtdBG.js +0 -332
  107. package/dist/MarketplacePage-BEj5hcBF.js +0 -192
  108. package/dist/MetricCard-DeHVeVwl.js +0 -135
  109. package/dist/OrderDetailsPage-D-9lDZYU.js +0 -398
  110. package/dist/OrdersListPage-CJzHbgY3.js +0 -257
  111. package/dist/ProductDetailsPage-3rKtzXpy.js +0 -168
  112. package/dist/ProductsPage-B0P_wjBJ.js +0 -131
  113. package/dist/RouteDetailsPage-DGjKTUMj.js +0 -240
  114. package/dist/RoutesPage-CpopY8xN.js +0 -116
  115. package/dist/SettingsPage-BvXSa3gi.js +0 -247
  116. package/dist/VehicleDetailsPage-Dqv--MVW.js +0 -194
  117. package/dist/VehiclesPage-CCBHRDHu.js +0 -127
  118. package/dist/WarehouseDetailsPage-ZObC_c7W.js +0 -215
  119. package/dist/WarehousesPage-CpgZEVW9.js +0 -121
@@ -0,0 +1,167 @@
1
+ import { M as e, i as t } from "./PageLayout-D3N8MCTm.js";
2
+ import { t as n } from "./DataTable-CD9ZhpLB.js";
3
+ import { t as r } from "./download-Dpa9vqoG.js";
4
+ import { t as i } from "./plus-Dl1rLeJR.js";
5
+ import { t as a } from "./refresh-cw-CWfERAit.js";
6
+ import { t as o } from "./truck-CtDjNFbi.js";
7
+ import { r as s } from "./graphqlClient-CdJyR_ed.js";
8
+ import { o as c } from "./useFleet-BdETplNE.js";
9
+ import { a as l, r as u } from "./StatusBadge-CijYQXtb.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/VehiclesPage.tsx
14
+ function _() {
15
+ let { basePath: _, navigate: v } = s(), { vehicles: y, totalVehicles: b, isLoading: x, refetch: S } = c(), C = (e) => {
16
+ v && v(d(_, e));
17
+ };
18
+ return /* @__PURE__ */ p(t, {
19
+ title: "Vehicles",
20
+ subtitle: `${b} vehicles in fleet`,
21
+ icon: /* @__PURE__ */ f(o, { size: 24 }),
22
+ headerActions: /* @__PURE__ */ f(m, {
23
+ primary: {
24
+ label: "Add Vehicle",
25
+ icon: /* @__PURE__ */ f(i, { size: 16 }),
26
+ onSelect: () => {}
27
+ },
28
+ actions: [{
29
+ label: "Refresh",
30
+ icon: /* @__PURE__ */ f(a, { size: 16 }),
31
+ onSelect: () => S()
32
+ }, {
33
+ label: "Export",
34
+ icon: /* @__PURE__ */ f(r, { size: 16 }),
35
+ onSelect: () => {}
36
+ }]
37
+ }),
38
+ children: [
39
+ /* @__PURE__ */ f(g, {
40
+ icon: /* @__PURE__ */ f(o, { size: 18 }),
41
+ 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."
42
+ }),
43
+ /* @__PURE__ */ p(h, { children: [/* @__PURE__ */ f("p", {
44
+ className: "text-sm font-medium text-text-secondary",
45
+ children: "Fleet at a glance"
46
+ }), /* @__PURE__ */ p("div", {
47
+ className: "mt-3 grid grid-cols-3 gap-4",
48
+ children: [
49
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
50
+ className: "text-2xl font-bold text-text-primary tabular-nums",
51
+ children: b
52
+ }), /* @__PURE__ */ f("p", {
53
+ className: "text-xs text-text-secondary",
54
+ children: "Total vehicles"
55
+ })] }),
56
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
57
+ className: "text-2xl font-bold text-text-primary tabular-nums",
58
+ children: y.filter((e) => e.status === "available").length
59
+ }), /* @__PURE__ */ f("p", {
60
+ className: "text-xs text-text-secondary",
61
+ children: "Available now"
62
+ })] }),
63
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
64
+ className: "text-2xl font-bold text-text-primary tabular-nums",
65
+ children: y.filter((e) => e.status === "maintenance").length
66
+ }), /* @__PURE__ */ f("p", {
67
+ className: "text-xs text-text-secondary",
68
+ children: "In maintenance"
69
+ })] })
70
+ ]
71
+ })] }),
72
+ /* @__PURE__ */ f(n, {
73
+ columns: [
74
+ {
75
+ id: "vehicleNumber",
76
+ header: "Vehicle #",
77
+ accessorKey: "vehicleNumber",
78
+ sortable: !0,
79
+ cell: (e) => /* @__PURE__ */ f("span", {
80
+ className: "font-medium",
81
+ children: e.vehicleNumber
82
+ })
83
+ },
84
+ {
85
+ id: "type",
86
+ header: "Type",
87
+ accessorKey: "type",
88
+ cell: (e) => /* @__PURE__ */ f(l, { type: e.type })
89
+ },
90
+ {
91
+ id: "details",
92
+ header: "Vehicle",
93
+ cell: (e) => /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("p", {
94
+ className: "font-medium",
95
+ children: [
96
+ e.make,
97
+ " ",
98
+ e.model
99
+ ]
100
+ }), /* @__PURE__ */ f("p", {
101
+ className: "text-sm text-text-secondary",
102
+ children: e.year
103
+ })] })
104
+ },
105
+ {
106
+ id: "status",
107
+ header: "Status",
108
+ accessorKey: "status",
109
+ sortable: !0,
110
+ cell: (e) => /* @__PURE__ */ f(u, {
111
+ status: e.status,
112
+ type: "vehicle"
113
+ })
114
+ },
115
+ {
116
+ id: "capacity",
117
+ header: "Capacity",
118
+ cell: (e) => /* @__PURE__ */ p("div", {
119
+ className: "text-sm",
120
+ children: [/* @__PURE__ */ p("p", { children: [e.capacity.weight, " kg"] }), /* @__PURE__ */ p("p", {
121
+ className: "text-text-secondary",
122
+ children: [e.capacity.volume, " m³"]
123
+ })]
124
+ })
125
+ },
126
+ {
127
+ id: "fuel",
128
+ header: "Fuel Level",
129
+ cell: (t) => t.fuelLevel === void 0 ? "-" : /* @__PURE__ */ p("div", {
130
+ className: "flex items-center gap-2",
131
+ children: [/* @__PURE__ */ f(e, {
132
+ value: t.fuelLevel,
133
+ className: "w-16 h-2"
134
+ }), /* @__PURE__ */ p("span", {
135
+ className: "text-sm",
136
+ children: [t.fuelLevel, "%"]
137
+ })]
138
+ })
139
+ },
140
+ {
141
+ id: "mileage",
142
+ header: "Mileage",
143
+ accessorKey: "mileage",
144
+ sortable: !0,
145
+ cell: (e) => e.mileage ? `${e.mileage.toLocaleString()} mi` : "-"
146
+ }
147
+ ],
148
+ data: y,
149
+ isLoading: x,
150
+ searchable: !0,
151
+ searchPlaceholder: "Search vehicles...",
152
+ searchFields: [
153
+ "vehicleNumber",
154
+ "make",
155
+ "model"
156
+ ],
157
+ onRowClick: (e) => C(`fleet/vehicles/${e.id}`),
158
+ getRowId: (e) => e.id,
159
+ emptyIllustration: "empty-data",
160
+ emptyTitle: "No vehicles yet",
161
+ emptyDescription: "Add vehicles to your fleet to start assigning them to deliveries."
162
+ })
163
+ ]
164
+ });
165
+ }
166
+ //#endregion
167
+ export { _ as default };
@@ -0,0 +1,238 @@
1
+ import { M as e, d as t, f as n, g as r, h as i, i as a, l as o, n as s, r as c, u as l } from "./PageLayout-D3N8MCTm.js";
2
+ import { t as u } from "./arrow-left-CBpZKkpq.js";
3
+ import { t as d } from "./box-CAaiElsb.js";
4
+ import { t as f } from "./clock-BjkdnddD.js";
5
+ import { t as p } from "./map-pin-BSaf5IDL.js";
6
+ import { t as m } from "./square-pen-hLIbFQFV.js";
7
+ import { t as h } from "./users-g2N0eL-Z.js";
8
+ import { t as g } from "./warehouse-D3WWDeTX.js";
9
+ import { r as _ } from "./graphqlClient-CdJyR_ed.js";
10
+ import { a as v } from "./useInventory-Dwn18FPz.js";
11
+ import { t as y } from "./formatters-_vJlC-47.js";
12
+ import { t as b } from "./navigation-BgnOfsVd.js";
13
+ import { useParams as x } from "react-router-dom";
14
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
15
+ import { EmphasisPanel as w, NextSteps as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
16
+ //#region src/movethewheels/pages/WarehouseDetailsPage.tsx
17
+ function D() {
18
+ let { warehouseId: D } = x(), { basePath: O, navigate: k } = _(), { warehouse: A, isLoading: j, error: M, refetch: N } = v(D), P = () => k?.(b(O, "inventory/warehouses")), F = (e) => k?.(b(O, e));
19
+ if (j) return /* @__PURE__ */ S(c, { message: "Loading warehouse details..." });
20
+ if (M || !A) return /* @__PURE__ */ S(s, {
21
+ title: "Warehouse not found",
22
+ onRetry: N
23
+ });
24
+ let I = A.capacity.usedSpace / A.capacity.totalSpace * 100;
25
+ return /* @__PURE__ */ C(a, {
26
+ title: A.name,
27
+ subtitle: `Code: ${A.code}`,
28
+ icon: /* @__PURE__ */ S(g, { size: 24 }),
29
+ headerActions: /* @__PURE__ */ C("div", {
30
+ className: "flex gap-2",
31
+ children: [/* @__PURE__ */ C(l, {
32
+ variant: "outline",
33
+ onClick: P,
34
+ children: [/* @__PURE__ */ S(u, { size: 16 }), " Back"]
35
+ }), /* @__PURE__ */ C(l, { children: [/* @__PURE__ */ S(m, { size: 16 }), " Edit"] })]
36
+ }),
37
+ headerContent: /* @__PURE__ */ C("div", {
38
+ className: "flex gap-2",
39
+ children: [/* @__PURE__ */ S(o, {
40
+ variant: A.isActive ? "default" : "secondary",
41
+ children: A.isActive ? "Active" : "Inactive"
42
+ }), /* @__PURE__ */ S(o, {
43
+ variant: "outline",
44
+ className: "capitalize",
45
+ children: A.type.replace("_", " ")
46
+ })]
47
+ }),
48
+ children: [
49
+ /* @__PURE__ */ S(E, {
50
+ icon: /* @__PURE__ */ S(g, { size: 18 }),
51
+ children: "A storage and fulfilment site at a glance — how full it is, its zones, operating hours, throughput and staff. Use it to decide whether this warehouse has the space and hours to fulfil an order, and where stock is running tight."
52
+ }),
53
+ /* @__PURE__ */ S(T, {
54
+ storageKey: "movethewheels-warehouse-details",
55
+ steps: [{
56
+ id: "inventory",
57
+ label: "Review stock here",
58
+ description: "See which products are stored at this site.",
59
+ icon: /* @__PURE__ */ S(d, { size: 16 }),
60
+ onClick: () => F("inventory/products")
61
+ }, {
62
+ id: "fulfil",
63
+ label: "Fulfil an order from this site",
64
+ description: "Pick a pending order to ship out of this warehouse.",
65
+ icon: /* @__PURE__ */ S(p, { size: 16 }),
66
+ onClick: () => F("orders")
67
+ }]
68
+ }),
69
+ /* @__PURE__ */ C("div", {
70
+ className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
71
+ children: [/* @__PURE__ */ C("div", {
72
+ className: "lg:col-span-2 space-y-6",
73
+ children: [
74
+ /* @__PURE__ */ C(w, { children: [/* @__PURE__ */ C("h2", {
75
+ className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
76
+ children: [/* @__PURE__ */ S(d, { size: 18 }), " Capacity"]
77
+ }), /* @__PURE__ */ C("div", {
78
+ className: "space-y-4",
79
+ children: [/* @__PURE__ */ C("div", { children: [
80
+ /* @__PURE__ */ C("div", {
81
+ className: "flex justify-between text-sm mb-2",
82
+ children: [/* @__PURE__ */ S("span", { children: "Space Utilization" }), /* @__PURE__ */ C("span", { children: [I.toFixed(0), "%"] })]
83
+ }),
84
+ /* @__PURE__ */ S(e, { value: I }),
85
+ /* @__PURE__ */ C("p", {
86
+ className: "text-sm text-text-secondary mt-1",
87
+ children: [
88
+ A.capacity.usedSpace.toLocaleString(),
89
+ " /",
90
+ " ",
91
+ A.capacity.totalSpace.toLocaleString(),
92
+ " sq ft"
93
+ ]
94
+ })
95
+ ] }), /* @__PURE__ */ S("div", {
96
+ className: "grid grid-cols-2 gap-4",
97
+ children: /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
98
+ className: "text-sm text-text-secondary",
99
+ children: "Pallets Used"
100
+ }), /* @__PURE__ */ C("p", {
101
+ className: "text-2xl font-bold",
102
+ children: [A.capacity.usedPallets, /* @__PURE__ */ C("span", {
103
+ className: "text-sm font-normal text-text-secondary",
104
+ children: [
105
+ " ",
106
+ "/ ",
107
+ A.capacity.totalPallets
108
+ ]
109
+ })]
110
+ })] })
111
+ })]
112
+ })] }),
113
+ /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, { children: [
114
+ "Zones (",
115
+ A.zones.length,
116
+ ")"
117
+ ] }) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("div", {
118
+ className: "space-y-3",
119
+ children: A.zones.map((t) => /* @__PURE__ */ C("div", {
120
+ className: "flex items-center justify-between p-3 border rounded-lg",
121
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
122
+ className: "font-medium",
123
+ children: t.name
124
+ }), /* @__PURE__ */ C("p", {
125
+ className: "text-sm text-text-secondary capitalize",
126
+ children: [
127
+ t.type,
128
+ " - ",
129
+ t.location
130
+ ]
131
+ })] }), /* @__PURE__ */ C("div", {
132
+ className: "text-right",
133
+ children: [/* @__PURE__ */ S(e, {
134
+ value: t.currentOccupancy / t.capacity * 100,
135
+ className: "w-24 h-2"
136
+ }), /* @__PURE__ */ C("p", {
137
+ className: "text-sm text-text-secondary",
138
+ children: [
139
+ t.currentOccupancy,
140
+ " / ",
141
+ t.capacity
142
+ ]
143
+ })]
144
+ })]
145
+ }, t.id))
146
+ }) })] }),
147
+ /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
148
+ className: "flex items-center gap-2",
149
+ children: [/* @__PURE__ */ S(f, { size: 18 }), " Operating Hours"]
150
+ }) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("div", {
151
+ className: "grid grid-cols-2 md:grid-cols-4 gap-4",
152
+ children: Object.entries(A.operatingHours).map(([e, t]) => /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
153
+ className: "text-sm font-medium",
154
+ children: e
155
+ }), /* @__PURE__ */ S("p", {
156
+ className: "text-sm text-text-secondary",
157
+ children: t ? `${t.open} - ${t.close}` : "Closed"
158
+ })] }, e))
159
+ }) })] })
160
+ ]
161
+ }), /* @__PURE__ */ C("div", {
162
+ className: "space-y-6",
163
+ children: [
164
+ /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
165
+ className: "flex items-center gap-2",
166
+ children: [/* @__PURE__ */ S(p, { size: 18 }), " Location"]
167
+ }) }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S("p", {
168
+ className: "text-sm",
169
+ children: y(A.address)
170
+ }) })] }),
171
+ /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ S(r, { children: "Metrics" }) }), /* @__PURE__ */ C(n, {
172
+ className: "space-y-3",
173
+ children: [
174
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
175
+ className: "text-sm text-text-secondary",
176
+ children: "Throughput"
177
+ }), /* @__PURE__ */ C("p", {
178
+ className: "text-2xl font-bold",
179
+ children: [A.metrics.throughput, /* @__PURE__ */ S("span", {
180
+ className: "text-sm font-normal",
181
+ children: " orders/day"
182
+ })]
183
+ })] }),
184
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
185
+ className: "text-sm text-text-secondary",
186
+ children: "Accuracy"
187
+ }), /* @__PURE__ */ C("p", {
188
+ className: "text-2xl font-bold",
189
+ children: [A.metrics.accuracy, "%"]
190
+ })] }),
191
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
192
+ className: "text-sm text-text-secondary",
193
+ children: "Productivity"
194
+ }), /* @__PURE__ */ C("p", {
195
+ className: "text-2xl font-bold",
196
+ children: [A.metrics.productivity, "%"]
197
+ })] }),
198
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
199
+ className: "text-sm text-text-secondary",
200
+ children: "Orders Fulfilled"
201
+ }), /* @__PURE__ */ S("p", {
202
+ className: "text-2xl font-bold",
203
+ children: A.metrics.ordersFulfilled.toLocaleString()
204
+ })] })
205
+ ]
206
+ })] }),
207
+ /* @__PURE__ */ C(t, { children: [/* @__PURE__ */ S(i, { children: /* @__PURE__ */ C(r, {
208
+ className: "flex items-center gap-2",
209
+ children: [
210
+ /* @__PURE__ */ S(h, { size: 18 }),
211
+ " Staff (",
212
+ A.staff.length,
213
+ ")"
214
+ ]
215
+ }) }), /* @__PURE__ */ S(n, { children: A.staff.length > 0 ? /* @__PURE__ */ S("div", {
216
+ className: "space-y-2",
217
+ children: A.staff.map((e, t) => /* @__PURE__ */ C("div", {
218
+ className: "flex items-center justify-between p-2 border rounded",
219
+ children: [/* @__PURE__ */ S("span", {
220
+ className: "text-sm capitalize",
221
+ children: e.role
222
+ }), /* @__PURE__ */ S(o, {
223
+ variant: "outline",
224
+ children: e.shift
225
+ })]
226
+ }, t))
227
+ }) : /* @__PURE__ */ S("p", {
228
+ className: "text-text-secondary",
229
+ children: "No staff assigned"
230
+ }) })] })
231
+ ]
232
+ })]
233
+ })
234
+ ]
235
+ });
236
+ }
237
+ //#endregion
238
+ export { D as default };
@@ -0,0 +1,164 @@
1
+ import { M as e, i as t, l as n } from "./PageLayout-D3N8MCTm.js";
2
+ import { t as r } from "./DataTable-CD9ZhpLB.js";
3
+ import { t as i } from "./plus-Dl1rLeJR.js";
4
+ import { t as a } from "./refresh-cw-CWfERAit.js";
5
+ import { t as o } from "./warehouse-D3WWDeTX.js";
6
+ import { r as s } from "./graphqlClient-CdJyR_ed.js";
7
+ import { o as c } from "./useInventory-Dwn18FPz.js";
8
+ import { t as l } from "./navigation-BgnOfsVd.js";
9
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
10
+ import { CTAOverflowMenu as f, EmphasisPanel as p, PagePurpose as m } from "@burdenoff/fe-libs/ui";
11
+ //#region src/movethewheels/pages/WarehousesPage.tsx
12
+ function h() {
13
+ let { basePath: h, navigate: g } = s(), { warehouses: _, totalWarehouses: v, isLoading: y, refetch: b } = c(), x = (e) => g?.(l(h, e));
14
+ return /* @__PURE__ */ d(t, {
15
+ title: "Warehouses",
16
+ subtitle: `${v} warehouses`,
17
+ icon: /* @__PURE__ */ u(o, { size: 24 }),
18
+ headerActions: /* @__PURE__ */ u(f, {
19
+ primary: {
20
+ label: "Add Warehouse",
21
+ icon: /* @__PURE__ */ u(i, { size: 16 }),
22
+ onSelect: () => {}
23
+ },
24
+ actions: [{
25
+ label: "Refresh",
26
+ icon: /* @__PURE__ */ u(a, { size: 16 }),
27
+ onSelect: () => b()
28
+ }]
29
+ }),
30
+ children: [
31
+ /* @__PURE__ */ u(m, {
32
+ icon: /* @__PURE__ */ u(o, { size: 18 }),
33
+ children: "Your storage and fulfilment sites. Watch space and pallet utilization across each warehouse to balance stock, spot capacity crunches, and decide where to fulfil an order from."
34
+ }),
35
+ /* @__PURE__ */ d(p, { children: [/* @__PURE__ */ u("p", {
36
+ className: "text-sm font-medium text-text-secondary",
37
+ children: "Network at a glance"
38
+ }), /* @__PURE__ */ d("div", {
39
+ className: "mt-3 grid grid-cols-3 gap-4",
40
+ children: [
41
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
42
+ className: "text-2xl font-bold text-text-primary tabular-nums",
43
+ children: v
44
+ }), /* @__PURE__ */ u("p", {
45
+ className: "text-xs text-text-secondary",
46
+ children: "Total sites"
47
+ })] }),
48
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
49
+ className: "text-2xl font-bold text-text-primary tabular-nums",
50
+ children: _.filter((e) => e.isActive).length
51
+ }), /* @__PURE__ */ u("p", {
52
+ className: "text-xs text-text-secondary",
53
+ children: "Active"
54
+ })] }),
55
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
56
+ className: "text-2xl font-bold text-text-primary tabular-nums",
57
+ children: _.length > 0 ? `${Math.round(_.reduce((e, t) => e + t.capacity.usedSpace / t.capacity.totalSpace, 0) / _.length * 100)}%` : "—"
58
+ }), /* @__PURE__ */ u("p", {
59
+ className: "text-xs text-text-secondary",
60
+ children: "Avg utilization"
61
+ })] })
62
+ ]
63
+ })] }),
64
+ /* @__PURE__ */ u(r, {
65
+ columns: [
66
+ {
67
+ id: "name",
68
+ header: "Warehouse",
69
+ accessorKey: "name",
70
+ sortable: !0,
71
+ cell: (e) => /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
72
+ className: "font-medium",
73
+ children: e.name
74
+ }), /* @__PURE__ */ u("p", {
75
+ className: "text-sm text-text-secondary",
76
+ children: e.code
77
+ })] })
78
+ },
79
+ {
80
+ id: "location",
81
+ header: "Location",
82
+ cell: (e) => /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("p", { children: [
83
+ e.address.city,
84
+ ", ",
85
+ e.address.state
86
+ ] }), /* @__PURE__ */ u("p", {
87
+ className: "text-sm text-text-secondary",
88
+ children: e.address.country
89
+ })] })
90
+ },
91
+ {
92
+ id: "type",
93
+ header: "Type",
94
+ accessorKey: "type",
95
+ cell: (e) => /* @__PURE__ */ u(n, {
96
+ variant: "outline",
97
+ className: "capitalize",
98
+ children: e.type.replace("_", " ")
99
+ })
100
+ },
101
+ {
102
+ id: "utilization",
103
+ header: "Utilization",
104
+ cell: (t) => {
105
+ let n = t.capacity.usedSpace / t.capacity.totalSpace * 100;
106
+ return /* @__PURE__ */ d("div", {
107
+ className: "flex items-center gap-2",
108
+ children: [/* @__PURE__ */ u(e, {
109
+ value: n,
110
+ className: "w-16 h-2"
111
+ }), /* @__PURE__ */ d("span", {
112
+ className: "text-sm",
113
+ children: [n.toFixed(0), "%"]
114
+ })]
115
+ });
116
+ }
117
+ },
118
+ {
119
+ id: "capacity",
120
+ header: "Capacity",
121
+ cell: (e) => /* @__PURE__ */ d("div", {
122
+ className: "text-sm",
123
+ children: [/* @__PURE__ */ d("p", { children: [
124
+ e.capacity.usedSpace.toLocaleString(),
125
+ " / ",
126
+ e.capacity.totalSpace.toLocaleString(),
127
+ " ",
128
+ "sq ft"
129
+ ] }), /* @__PURE__ */ d("p", {
130
+ className: "text-text-secondary",
131
+ children: [
132
+ e.capacity.usedPallets,
133
+ " / ",
134
+ e.capacity.totalPallets,
135
+ " pallets"
136
+ ]
137
+ })]
138
+ })
139
+ },
140
+ {
141
+ id: "status",
142
+ header: "Status",
143
+ cell: (e) => /* @__PURE__ */ u(n, {
144
+ variant: e.isActive ? "default" : "secondary",
145
+ children: e.isActive ? "Active" : "Inactive"
146
+ })
147
+ }
148
+ ],
149
+ data: _,
150
+ isLoading: y,
151
+ searchable: !0,
152
+ searchPlaceholder: "Search warehouses...",
153
+ searchFields: ["name", "code"],
154
+ onRowClick: (e) => x(`inventory/warehouses/${e.id}`),
155
+ getRowId: (e) => e.id,
156
+ emptyIllustration: "empty-data",
157
+ emptyTitle: "No warehouses yet",
158
+ emptyDescription: "Add a warehouse to store inventory and fulfil orders from it."
159
+ })
160
+ ]
161
+ });
162
+ }
163
+ //#endregion
164
+ export { h as default };
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-xDTiBTDS.js";
1
+ import { it as e } from "./PageLayout-D3N8MCTm.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/arrow-left.js
3
3
  var t = e("ArrowLeft", [["path", {
4
4
  d: "m12 19-7-7 7-7",
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-xDTiBTDS.js";
1
+ import { it as e } from "./PageLayout-D3N8MCTm.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/box.js
3
3
  var t = e("Box", [
4
4
  ["path", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-xDTiBTDS.js";
1
+ import { it as e } from "./PageLayout-D3N8MCTm.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/chart-column.js
3
3
  var t = e("ChartColumn", [
4
4
  ["path", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-xDTiBTDS.js";
1
+ import { it as e } from "./PageLayout-D3N8MCTm.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/chevron-right.js
3
3
  var t = e("ChevronRight", [["path", {
4
4
  d: "m9 18 6-6-6-6",
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-xDTiBTDS.js";
1
+ import { it as e } from "./PageLayout-D3N8MCTm.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/circle-alert.js
3
3
  var t = e("CircleAlert", [
4
4
  ["circle", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-xDTiBTDS.js";
1
+ import { it as e } from "./PageLayout-D3N8MCTm.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/circle-check-big.js
3
3
  var t = e("CircleCheckBig", [["path", {
4
4
  d: "M21.801 10A10 10 0 1 1 17 3.335",
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-xDTiBTDS.js";
1
+ import { it as e } from "./PageLayout-D3N8MCTm.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/clock.js
3
3
  var t = e("Clock", [["circle", {
4
4
  cx: "12",
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-xDTiBTDS.js";
1
+ import { it as e } from "./PageLayout-D3N8MCTm.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/dollar-sign.js
3
3
  var t = e("DollarSign", [["line", {
4
4
  x1: "12",
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-xDTiBTDS.js";
1
+ import { it as e } from "./PageLayout-D3N8MCTm.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/download.js
3
3
  var t = e("Download", [
4
4
  ["path", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-xDTiBTDS.js";
1
+ import { it as e } from "./PageLayout-D3N8MCTm.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/file-text.js
3
3
  var t = e("FileText", [
4
4
  ["path", {
@@ -1,4 +1,4 @@
1
- import { it as e } from "./PageLayout-xDTiBTDS.js";
1
+ import { it as e } from "./PageLayout-D3N8MCTm.js";
2
2
  //#region node_modules/lucide-react/dist/esm/icons/filter.js
3
3
  var t = e("Filter", [["polygon", {
4
4
  points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",