@burdenoff/microfe-movethewheels 2026.1107.7 → 2026.1108.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.
@@ -12,24 +12,25 @@ import { Plus as re } from "../node_modules/lucide-react/dist/esm/icons/plus.js"
12
12
  import { SlidersHorizontal as ie } from "../node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js";
13
13
  import { TriangleAlert as s } from "../node_modules/lucide-react/dist/esm/icons/triangle-alert.js";
14
14
  import { Warehouse as ae } from "../node_modules/lucide-react/dist/esm/icons/warehouse.js";
15
- import { joinPath as c } from "../utils/navigation.js";
16
- import { useMoveTheWheels as l } from "../providers/MoveTheWheelsProvider.js";
17
- import { formatCurrency as oe, formatDate as se } from "../utils/formatters.js";
18
- import { useInventory as ce, useInventoryStats as le, useInventoryTransactions as ue } from "../hooks/useInventory.js";
19
- import { Badge as u, Button as d, Card as f, CardContent as p, CardHeader as de, CardTitle as m, Progress as fe } from "../components/ui.js";
20
- import { PageLayout as pe, PageSection as h } from "../components/PageLayout.js";
21
- import { MetricCard as g, MetricCardSkeleton as me, MetricGrid as _ } from "../components/MetricCard.js";
22
- import { StatusBadge as he } from "../components/StatusBadge.js";
23
- import { DataTable as ge } from "../components/DataTable.js";
24
- import { Notice as _e, useNotice as ve } from "../components/Notice.js";
25
- import { useDebouncedValue as ye } from "../hooks/useDebouncedValue.js";
26
- import { AdjustStockDialog as be, ReceiveStockDialog as xe, TransferStockDialog as Se } from "../components/StockActionDialogs.js";
27
- import { useMemo as Ce, useState as v } from "react";
28
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
29
- import { useI18n as we } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
30
- import { CTAOverflowMenu as x, EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
15
+ import { joinPath as oe } from "../utils/navigation.js";
16
+ import { useMoveTheWheels as se } from "../providers/MoveTheWheelsProvider.js";
17
+ import { formatCurrency as ce, formatDate as le } from "../utils/formatters.js";
18
+ import { useInventory as ue, useInventoryStats as c, useInventoryTransactions as de } from "../hooks/useInventory.js";
19
+ import { Badge as l, Button as u, Card as d, CardContent as f, CardHeader as fe, CardTitle as pe, Progress as me } from "../components/ui.js";
20
+ import { PageLayout as he, PageSection as p } from "../components/PageLayout.js";
21
+ import { MetricCard as m, MetricCardSkeleton as ge, MetricGrid as h } from "../components/MetricCard.js";
22
+ import { StatusBadge as _e } from "../components/StatusBadge.js";
23
+ import { DataTable as ve } from "../components/DataTable.js";
24
+ import { Notice as ye, useNotice as be } from "../components/Notice.js";
25
+ import { useDebouncedValue as xe } from "../hooks/useDebouncedValue.js";
26
+ import { InventoryCoverPanel as Se } from "../components/InventoryCoverPanel.js";
27
+ import { AdjustStockDialog as Ce, ReceiveStockDialog as we, TransferStockDialog as Te } from "../components/StockActionDialogs.js";
28
+ import { useMemo as g, useState as _ } from "react";
29
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
30
+ import { useI18n as Ee } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
31
+ import { CTAOverflowMenu as De, EmphasisPanel as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
31
32
  //#region src/movethewheels/pages/InventoryPage.tsx
32
- var w = {
33
+ var S = {
33
34
  out_of_stock: {
34
35
  bg: "bg-status-error-bg-subtle",
35
36
  text: "text-status-error-text"
@@ -42,32 +43,35 @@ var w = {
42
43
  bg: "bg-status-success-bg-subtle",
43
44
  text: "text-status-success-text"
44
45
  }
45
- }, T = {
46
+ }, C = {
46
47
  RECEIPT: "in",
47
48
  RETURN: "in",
48
49
  ISSUE: "out",
49
50
  TRANSFER: "neutral",
50
51
  ADJUSTMENT: "neutral"
51
- }, E = {
52
+ }, w = {
52
53
  RECEIPT: "Inbound",
53
54
  RETURN: "Return",
54
55
  ISSUE: "Outbound",
55
56
  TRANSFER: "Transfer",
56
57
  ADJUSTMENT: "Adjustment"
57
58
  };
58
- function D(e, t) {
59
+ function T(e, t) {
59
60
  let n = Math.abs(t).toLocaleString();
60
61
  return e === "in" ? `+${n}` : e === "out" ? `−${n}` : t > 0 ? `+${n}` : t < 0 ? `−${n}` : n;
61
62
  }
62
- function O() {
63
- let { t: O } = we(), k = (e, t) => {
64
- let n = O(e);
63
+ function E() {
64
+ let { t: E } = Ee(), D = (e, t) => {
65
+ let n = E(e);
65
66
  return n === e ? t : n;
66
- }, { basePath: Te, navigate: Ee } = l(), [A, De] = v(""), [j, M] = v(0), [N, Oe] = v(10), { inventory: P, lowStockItems: F, products: I, warehouses: ke, totalItems: Ae, hasMore: je, isLoading: L, error: R, refetch: z } = ce({
67
- search: ye(A),
68
- limit: N,
69
- offset: j * N
70
- }), { stats: B, refetch: Me } = le(), { transactions: V, isLoading: Ne, error: H, refetch: Pe } = ue({ limit: 8 }), { message: U, notify: Fe } = ve(6e3), [Ie, W] = v(!1), [G, K] = v(null), [q, J] = v(null), Y = (e) => ({
67
+ }, { basePath: Oe, navigate: ke } = se(), [O, Ae] = _(""), [k, A] = _(0), [j, je] = _(10), { inventory: M, lowStockItems: N, products: P, warehouses: F, totalItems: Me, hasMore: Ne, isLoading: I, error: L, refetch: R } = ue({
68
+ search: xe(O),
69
+ limit: j,
70
+ offset: k * j
71
+ }), Pe = g(() => F.map((e) => ({
72
+ id: e.id,
73
+ name: e.name
74
+ })), [F]), { stats: z, refetch: Fe } = c(), { transactions: B, isLoading: Ie, error: V, refetch: Le } = de({ limit: 8 }), { message: H, notify: U } = be(6e3), [Re, W] = _(!1), [G, K] = _(null), [q, J] = _(null), Y = (e) => ({
71
75
  id: e.id,
72
76
  productName: e.productName,
73
77
  sku: e.sku,
@@ -76,10 +80,10 @@ function O() {
76
80
  onHand: e.onHand,
77
81
  available: e.available
78
82
  }), X = (e) => {
79
- Fe(e), z(), Me(), Pe();
80
- }, Z = (e) => Ee?.(c(Te, e)), Q = (e, t) => {
83
+ U(e), R(), Fe(), Le();
84
+ }, Z = (e) => ke?.(oe(Oe, e)), Q = (e, t) => {
81
85
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
82
- }, $ = k("movethewheels.inventory.lowStock.unknownProduct", "Unknown Product"), Le = Ce(() => P.map((e) => ({
86
+ }, $ = D("movethewheels.inventory.lowStock.unknownProduct", "Unknown Product"), ze = g(() => M.map((e) => ({
83
87
  id: e.id,
84
88
  productId: e.productId,
85
89
  productName: e.productName ?? $,
@@ -91,253 +95,253 @@ function O() {
91
95
  available: e.availableQuantity,
92
96
  reorderLevel: e.reorderLevel,
93
97
  stockState: e.quantity === 0 ? "out_of_stock" : e.reorderLevel !== void 0 && e.availableQuantity <= e.reorderLevel ? "low" : "in_stock"
94
- })), [P, $]), Re = [
98
+ })), [M, $]), Be = [
95
99
  {
96
100
  id: "product",
97
- header: k("movethewheels.inventory.stock.product", "Product"),
101
+ header: D("movethewheels.inventory.stock.product", "Product"),
98
102
  accessorKey: "productName",
99
103
  sortable: !0,
100
- cell: (e) => /* @__PURE__ */ y("span", {
104
+ cell: (e) => /* @__PURE__ */ v("span", {
101
105
  className: "font-medium",
102
106
  children: e.productName
103
107
  })
104
108
  },
105
109
  {
106
110
  id: "sku",
107
- header: k("movethewheels.inventory.stock.sku", "SKU"),
111
+ header: D("movethewheels.inventory.stock.sku", "SKU"),
108
112
  accessorKey: "sku",
109
113
  sortable: !0,
110
- cell: (e) => /* @__PURE__ */ y("span", {
114
+ cell: (e) => /* @__PURE__ */ v("span", {
111
115
  className: "text-sm text-text-secondary",
112
116
  children: e.sku
113
117
  })
114
118
  },
115
119
  {
116
120
  id: "warehouse",
117
- header: k("movethewheels.inventory.stock.warehouse", "Warehouse"),
121
+ header: D("movethewheels.inventory.stock.warehouse", "Warehouse"),
118
122
  accessorKey: "warehouseName",
119
123
  sortable: !0
120
124
  },
121
125
  {
122
126
  id: "onHand",
123
- header: k("movethewheels.inventory.stock.onHand", "On hand"),
127
+ header: D("movethewheels.inventory.stock.onHand", "On hand"),
124
128
  accessorKey: "onHand",
125
129
  sortable: !0,
126
- cell: (e) => /* @__PURE__ */ y("span", {
130
+ cell: (e) => /* @__PURE__ */ v("span", {
127
131
  className: "font-medium",
128
132
  children: e.onHand.toLocaleString()
129
133
  })
130
134
  },
131
135
  {
132
136
  id: "allocated",
133
- header: k("movethewheels.inventory.stock.allocated", "Allocated"),
137
+ header: D("movethewheels.inventory.stock.allocated", "Allocated"),
134
138
  accessorKey: "allocated",
135
139
  sortable: !0,
136
140
  cell: (e) => e.allocated.toLocaleString()
137
141
  },
138
142
  {
139
143
  id: "available",
140
- header: k("movethewheels.inventory.stock.available", "Available"),
144
+ header: D("movethewheels.inventory.stock.available", "Available"),
141
145
  accessorKey: "available",
142
146
  sortable: !0,
143
- cell: (e) => /* @__PURE__ */ y("span", {
147
+ cell: (e) => /* @__PURE__ */ v("span", {
144
148
  className: "font-medium",
145
149
  children: e.available.toLocaleString()
146
150
  })
147
151
  },
148
152
  {
149
153
  id: "reorderPoint",
150
- header: k("movethewheels.inventory.stock.reorderPoint", "Reorder point"),
154
+ header: D("movethewheels.inventory.stock.reorderPoint", "Reorder point"),
151
155
  accessorKey: "reorderLevel",
152
156
  sortable: !0,
153
157
  cell: (e) => e.reorderLevel === void 0 ? "—" : e.reorderLevel.toLocaleString()
154
158
  },
155
159
  {
156
160
  id: "state",
157
- header: k("movethewheels.inventory.stock.status", "Status"),
158
- cell: (e) => /* @__PURE__ */ y(he, {
159
- status: e.stockState === "out_of_stock" ? k("movethewheels.inventory.stock.outOfStock", "Out of stock") : e.stockState === "low" ? k("movethewheels.inventory.stock.low", "Low") : k("movethewheels.inventory.stock.inStock", "In stock"),
160
- customColors: w[e.stockState],
161
+ header: D("movethewheels.inventory.stock.status", "Status"),
162
+ cell: (e) => /* @__PURE__ */ v(_e, {
163
+ status: e.stockState === "out_of_stock" ? D("movethewheels.inventory.stock.outOfStock", "Out of stock") : e.stockState === "low" ? D("movethewheels.inventory.stock.low", "Low") : D("movethewheels.inventory.stock.inStock", "In stock"),
164
+ customColors: S[e.stockState],
161
165
  size: "sm"
162
166
  })
163
167
  },
164
168
  {
165
169
  id: "actions",
166
- header: k("movethewheels.inventory.stock.actions", "Actions"),
167
- cell: (e) => /* @__PURE__ */ b("div", {
170
+ header: D("movethewheels.inventory.stock.actions", "Actions"),
171
+ cell: (e) => /* @__PURE__ */ y("div", {
168
172
  className: "flex flex-wrap gap-2",
169
173
  onClick: (e) => e.stopPropagation(),
170
174
  onKeyDown: (e) => e.stopPropagation(),
171
- children: [/* @__PURE__ */ b(d, {
175
+ children: [/* @__PURE__ */ y(u, {
172
176
  type: "button",
173
177
  variant: "outline",
174
178
  size: "sm",
175
179
  onClick: () => K(Y(e)),
176
180
  children: [
177
- /* @__PURE__ */ y(ie, { size: 14 }),
181
+ /* @__PURE__ */ v(ie, { size: 14 }),
178
182
  " ",
179
- k("movethewheels.inventory.stock.adjust", "Adjust")
183
+ D("movethewheels.inventory.stock.adjust", "Adjust")
180
184
  ]
181
- }), /* @__PURE__ */ b(d, {
185
+ }), /* @__PURE__ */ y(u, {
182
186
  type: "button",
183
187
  variant: "outline",
184
188
  size: "sm",
185
189
  onClick: () => J(Y(e)),
186
190
  disabled: e.available <= 0,
187
191
  children: [
188
- /* @__PURE__ */ y(t, { size: 14 }),
192
+ /* @__PURE__ */ v(t, { size: 14 }),
189
193
  " ",
190
- k("movethewheels.inventory.stock.transfer", "Transfer")
194
+ D("movethewheels.inventory.stock.transfer", "Transfer")
191
195
  ]
192
196
  })]
193
197
  })
194
198
  }
195
199
  ];
196
- return /* @__PURE__ */ b(pe, {
197
- title: k("movethewheels.inventory.title", "Inventory"),
198
- subtitle: k("movethewheels.inventory.subtitle", "Manage your products and warehouses"),
199
- icon: /* @__PURE__ */ y(o, { size: 24 }),
200
- headerActions: /* @__PURE__ */ y(x, {
200
+ return /* @__PURE__ */ y(he, {
201
+ title: D("movethewheels.inventory.title", "Inventory"),
202
+ subtitle: D("movethewheels.inventory.subtitle", "Manage your products and warehouses"),
203
+ icon: /* @__PURE__ */ v(o, { size: 24 }),
204
+ headerActions: /* @__PURE__ */ v(De, {
201
205
  primary: {
202
- label: k("movethewheels.inventory.actions.addProduct", "Add Product"),
203
- icon: /* @__PURE__ */ y(re, { size: 16 }),
206
+ label: D("movethewheels.inventory.actions.addProduct", "Add Product"),
207
+ icon: /* @__PURE__ */ v(re, { size: 16 }),
204
208
  onSelect: () => Z("inventory/products/new")
205
209
  },
206
210
  actions: [
207
211
  {
208
- label: k("movethewheels.inventory.actions.receiveStock", "Receive stock"),
209
- icon: /* @__PURE__ */ y(ne, { size: 16 }),
212
+ label: D("movethewheels.inventory.actions.receiveStock", "Receive stock"),
213
+ icon: /* @__PURE__ */ v(ne, { size: 16 }),
210
214
  onSelect: () => W(!0)
211
215
  },
212
216
  {
213
- label: k("movethewheels.inventory.actions.products", "Products"),
217
+ label: D("movethewheels.inventory.actions.products", "Products"),
214
218
  onSelect: () => Z("inventory/products")
215
219
  },
216
220
  {
217
- label: k("movethewheels.inventory.actions.warehouses", "Warehouses"),
221
+ label: D("movethewheels.inventory.actions.warehouses", "Warehouses"),
218
222
  onSelect: () => Z("inventory/warehouses")
219
223
  }
220
224
  ]
221
225
  }),
222
226
  children: [
223
- /* @__PURE__ */ y(C, {
224
- icon: /* @__PURE__ */ y(o, { size: 18 }),
225
- children: k("movethewheels.inventory.purpose", "A real-time view of what you have and where. Track on-hand, allocated and free-to-promise quantities across warehouses, follow every stock movement, catch low-stock items before they run out, and drill into products or warehouses to manage what you can promise on an order.")
227
+ /* @__PURE__ */ v(x, {
228
+ icon: /* @__PURE__ */ v(o, { size: 18 }),
229
+ children: D("movethewheels.inventory.purpose", "A real-time view of what you have and where. Track on-hand, allocated and free-to-promise quantities across warehouses, follow every stock movement, catch low-stock items before they run out, and drill into products or warehouses to manage what you can promise on an order.")
226
230
  }),
227
- U && /* @__PURE__ */ y("div", {
231
+ H && /* @__PURE__ */ v("div", {
228
232
  className: "mb-2",
229
- children: /* @__PURE__ */ y(_e, { message: U })
233
+ children: /* @__PURE__ */ v(ye, { message: H })
230
234
  }),
231
- R && !L ? /* @__PURE__ */ y(f, {
235
+ L && !I ? /* @__PURE__ */ v(d, {
232
236
  className: "border-status-error-border",
233
- children: /* @__PURE__ */ b(p, {
237
+ children: /* @__PURE__ */ y(f, {
234
238
  className: "p-6 text-center space-y-3",
235
239
  children: [
236
- /* @__PURE__ */ y("p", {
240
+ /* @__PURE__ */ v("p", {
237
241
  className: "text-status-error-text font-medium",
238
- children: k("movethewheels.inventory.error.title", "Couldn't load inventory")
242
+ children: D("movethewheels.inventory.error.title", "Couldn't load inventory")
239
243
  }),
240
- /* @__PURE__ */ y("p", {
244
+ /* @__PURE__ */ v("p", {
241
245
  className: "text-sm text-text-secondary",
242
- children: R.message
246
+ children: L.message
243
247
  }),
244
- /* @__PURE__ */ y(d, {
248
+ /* @__PURE__ */ v(u, {
245
249
  variant: "outline",
246
- onClick: z,
247
- children: k("movethewheels.inventory.error.retry", "Retry")
250
+ onClick: R,
251
+ children: D("movethewheels.inventory.error.retry", "Retry")
248
252
  })
249
253
  ]
250
254
  })
251
- }) : L ? /* @__PURE__ */ y(_, {
255
+ }) : I ? /* @__PURE__ */ v(h, {
252
256
  columns: 6,
253
- children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ y(me, {}, t))
254
- }) : /* @__PURE__ */ b(_, {
257
+ children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ v(ge, {}, t))
258
+ }) : /* @__PURE__ */ y(h, {
255
259
  columns: 6,
256
260
  children: [
257
- /* @__PURE__ */ y(g, {
258
- label: k("movethewheels.inventory.metrics.totalOnHand", "Total on-hand"),
259
- value: B.totalOnHand.toLocaleString(),
260
- icon: /* @__PURE__ */ y(r, { size: 20 }),
261
+ /* @__PURE__ */ v(m, {
262
+ label: D("movethewheels.inventory.metrics.totalOnHand", "Total on-hand"),
263
+ value: z.totalOnHand.toLocaleString(),
264
+ icon: /* @__PURE__ */ v(r, { size: 20 }),
261
265
  accent: "brand",
262
- subtitle: k("movethewheels.inventory.metrics.onHandHint", "Units in the network")
266
+ subtitle: D("movethewheels.inventory.metrics.onHandHint", "Units in the network")
263
267
  }),
264
- /* @__PURE__ */ y(g, {
265
- label: k("movethewheels.inventory.metrics.available", "Available"),
266
- value: B.totalAvailable.toLocaleString(),
267
- icon: /* @__PURE__ */ y(a, { size: 20 }),
268
+ /* @__PURE__ */ v(m, {
269
+ label: D("movethewheels.inventory.metrics.available", "Available"),
270
+ value: z.totalAvailable.toLocaleString(),
271
+ icon: /* @__PURE__ */ v(a, { size: 20 }),
268
272
  accent: "success",
269
- subtitle: k("movethewheels.inventory.metrics.availableHint", "Free to promise")
273
+ subtitle: D("movethewheels.inventory.metrics.availableHint", "Free to promise")
270
274
  }),
271
- /* @__PURE__ */ y(g, {
272
- label: k("movethewheels.inventory.metrics.allocated", "Allocated"),
273
- value: B.totalAllocated.toLocaleString(),
274
- icon: /* @__PURE__ */ y(te, { size: 20 }),
275
+ /* @__PURE__ */ v(m, {
276
+ label: D("movethewheels.inventory.metrics.allocated", "Allocated"),
277
+ value: z.totalAllocated.toLocaleString(),
278
+ icon: /* @__PURE__ */ v(te, { size: 20 }),
275
279
  accent: "blue",
276
- subtitle: k("movethewheels.inventory.metrics.allocatedHint", "Committed to orders")
280
+ subtitle: D("movethewheels.inventory.metrics.allocatedHint", "Committed to orders")
277
281
  }),
278
- /* @__PURE__ */ y(g, {
279
- label: k("movethewheels.inventory.metrics.lowStock", "Low-stock items"),
280
- value: B.lowStockCount.toLocaleString(),
281
- icon: /* @__PURE__ */ y(s, { size: 20 }),
282
+ /* @__PURE__ */ v(m, {
283
+ label: D("movethewheels.inventory.metrics.lowStock", "Low-stock items"),
284
+ value: z.lowStockCount.toLocaleString(),
285
+ icon: /* @__PURE__ */ v(s, { size: 20 }),
282
286
  accent: "warning",
283
- subtitle: k("movethewheels.inventory.metrics.lowStockHint", "At or under reorder point")
287
+ subtitle: D("movethewheels.inventory.metrics.lowStockHint", "At or under reorder point")
284
288
  }),
285
- /* @__PURE__ */ y(g, {
286
- label: k("movethewheels.inventory.metrics.totalProducts", "Catalog items"),
287
- value: B.totalProducts.toLocaleString(),
288
- icon: /* @__PURE__ */ y(o, { size: 20 }),
289
+ /* @__PURE__ */ v(m, {
290
+ label: D("movethewheels.inventory.metrics.totalProducts", "Catalog items"),
291
+ value: z.totalProducts.toLocaleString(),
292
+ icon: /* @__PURE__ */ v(o, { size: 20 }),
289
293
  accent: "neutral",
290
294
  onClick: () => Z("inventory/products")
291
295
  }),
292
- /* @__PURE__ */ y(g, {
293
- label: k("movethewheels.inventory.metrics.warehouses", "Warehouses"),
294
- value: B.totalWarehouses.toLocaleString(),
295
- icon: /* @__PURE__ */ y(ae, { size: 20 }),
296
+ /* @__PURE__ */ v(m, {
297
+ label: D("movethewheels.inventory.metrics.warehouses", "Warehouses"),
298
+ value: z.totalWarehouses.toLocaleString(),
299
+ icon: /* @__PURE__ */ v(ae, { size: 20 }),
296
300
  accent: "neutral",
297
301
  onClick: () => Z("inventory/warehouses")
298
302
  })
299
303
  ]
300
304
  }),
301
- F.length > 0 && /* @__PURE__ */ b(S, {
305
+ N.length > 0 && /* @__PURE__ */ y(b, {
302
306
  className: "space-y-4",
303
- children: [/* @__PURE__ */ b("h2", {
307
+ children: [/* @__PURE__ */ y("h2", {
304
308
  className: "flex items-center gap-2 text-base font-semibold text-status-warning-text",
305
309
  children: [
306
- /* @__PURE__ */ y(s, { size: 18 }),
307
- k("movethewheels.inventory.lowStock.title", "Low Stock Alert"),
310
+ /* @__PURE__ */ v(s, { size: 18 }),
311
+ D("movethewheels.inventory.lowStock.title", "Low Stock Alert"),
308
312
  " (",
309
- B.lowStockCount,
313
+ z.lowStockCount,
310
314
  " ",
311
- k("movethewheels.inventory.lowStock.items", "items"),
315
+ D("movethewheels.inventory.lowStock.items", "items"),
312
316
  ")"
313
317
  ]
314
- }), /* @__PURE__ */ y("div", { children: /* @__PURE__ */ y("div", {
318
+ }), /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v("div", {
315
319
  className: "space-y-3",
316
- children: F.map((e) => /* @__PURE__ */ b("div", {
320
+ children: N.map((e) => /* @__PURE__ */ y("div", {
317
321
  className: "flex items-center justify-between p-3 bg-status-warning-bg/10 rounded-lg",
318
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
322
+ children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
319
323
  className: "font-medium",
320
- children: e.productName ?? k("movethewheels.inventory.lowStock.unknownProduct", "Unknown Product")
321
- }), /* @__PURE__ */ b("p", {
324
+ children: e.productName ?? D("movethewheels.inventory.lowStock.unknownProduct", "Unknown Product")
325
+ }), /* @__PURE__ */ y("p", {
322
326
  className: "text-sm text-text-secondary",
323
327
  children: [
324
- k("movethewheels.inventory.lowStock.sku", "SKU:"),
328
+ D("movethewheels.inventory.lowStock.sku", "SKU:"),
325
329
  " ",
326
330
  e.productSku ?? "—"
327
331
  ]
328
- })] }), /* @__PURE__ */ b("div", {
332
+ })] }), /* @__PURE__ */ y("div", {
329
333
  className: "text-right",
330
- children: [/* @__PURE__ */ b("p", {
334
+ children: [/* @__PURE__ */ y("p", {
331
335
  className: "font-medium text-status-warning-text",
332
336
  children: [
333
337
  e.availableQuantity,
334
338
  " ",
335
- k("movethewheels.inventory.lowStock.left", "left")
339
+ D("movethewheels.inventory.lowStock.left", "left")
336
340
  ]
337
- }), /* @__PURE__ */ b("p", {
341
+ }), /* @__PURE__ */ y("p", {
338
342
  className: "text-sm text-text-secondary",
339
343
  children: [
340
- k("movethewheels.inventory.lowStock.reorderAt", "Reorder at:"),
344
+ D("movethewheels.inventory.lowStock.reorderAt", "Reorder at:"),
341
345
  " ",
342
346
  e.reorderLevel
343
347
  ]
@@ -346,94 +350,95 @@ function O() {
346
350
  }, e.id))
347
351
  }) })]
348
352
  }),
349
- /* @__PURE__ */ b("div", {
353
+ /* @__PURE__ */ v(Se, { warehouses: Pe }),
354
+ /* @__PURE__ */ y("div", {
350
355
  className: "grid grid-cols-1 xl:grid-cols-3 gap-6",
351
- children: [/* @__PURE__ */ y("div", {
356
+ children: [/* @__PURE__ */ v("div", {
352
357
  className: "xl:col-span-2",
353
- children: /* @__PURE__ */ y(h, {
354
- title: k("movethewheels.inventory.stock.title", "Stock position"),
355
- children: /* @__PURE__ */ y(ge, {
356
- columns: Re,
357
- data: Le,
358
- isLoading: L,
359
- error: R,
360
- onRetry: z,
358
+ children: /* @__PURE__ */ v(p, {
359
+ title: D("movethewheels.inventory.stock.title", "Stock position"),
360
+ children: /* @__PURE__ */ v(ve, {
361
+ columns: Be,
362
+ data: ze,
363
+ isLoading: I,
364
+ error: L,
365
+ onRetry: R,
361
366
  searchable: !0,
362
- searchPlaceholder: k("movethewheels.inventory.stock.search", "Search product, SKU or warehouse..."),
367
+ searchPlaceholder: D("movethewheels.inventory.stock.search", "Search product, SKU or warehouse..."),
363
368
  searchFields: [
364
369
  "productName",
365
370
  "sku",
366
371
  "warehouseName"
367
372
  ],
368
- searchQuery: A,
373
+ searchQuery: O,
369
374
  onSearchQueryChange: (e) => {
370
- De(e), M(0);
375
+ Ae(e), A(0);
371
376
  },
372
- pageIndex: j,
373
- pageSize: N,
374
- onPageChange: M,
377
+ pageIndex: k,
378
+ pageSize: j,
379
+ onPageChange: A,
375
380
  onPageSizeChange: (e) => {
376
- Oe(e), M(0);
381
+ je(e), A(0);
377
382
  },
378
- totalItems: Ae,
379
- hasNextPage: je,
383
+ totalItems: Me,
384
+ hasNextPage: Ne,
380
385
  onRowClick: (e) => Z(`inventory/products/${e.productId}`),
381
386
  getRowId: (e) => e.id,
382
387
  emptyIllustration: "empty-data",
383
- emptyTitle: k("movethewheels.inventory.stock.emptyTitle", "No stock recorded yet"),
384
- emptyDescription: k("movethewheels.inventory.stock.emptyDescription", "Stock lines appear here once a product is received into a warehouse.")
388
+ emptyTitle: D("movethewheels.inventory.stock.emptyTitle", "No stock recorded yet"),
389
+ emptyDescription: D("movethewheels.inventory.stock.emptyDescription", "Stock lines appear here once a product is received into a warehouse.")
385
390
  })
386
391
  })
387
- }), /* @__PURE__ */ b(f, {
392
+ }), /* @__PURE__ */ y(d, {
388
393
  className: "h-fit",
389
- children: [/* @__PURE__ */ y(de, { children: /* @__PURE__ */ b(m, {
394
+ children: [/* @__PURE__ */ v(fe, { children: /* @__PURE__ */ y(pe, {
390
395
  className: "flex items-center gap-2",
391
- children: [/* @__PURE__ */ y(ee, { size: 18 }), k("movethewheels.inventory.transactions.title", "Recent transactions")]
392
- }) }), /* @__PURE__ */ y(p, {
396
+ children: [/* @__PURE__ */ v(ee, { size: 18 }), D("movethewheels.inventory.transactions.title", "Recent transactions")]
397
+ }) }), /* @__PURE__ */ v(f, {
393
398
  className: "p-0",
394
- children: H ? /* @__PURE__ */ y("p", {
399
+ children: V ? /* @__PURE__ */ v("p", {
395
400
  className: "p-6 text-sm text-status-error-text",
396
- children: H.message
397
- }) : Ne ? /* @__PURE__ */ y("p", {
401
+ children: V.message
402
+ }) : Ie ? /* @__PURE__ */ v("p", {
398
403
  className: "p-6 text-sm text-text-secondary",
399
- children: k("movethewheels.inventory.transactions.loading", "Loading movements…")
400
- }) : V.length === 0 ? /* @__PURE__ */ y("p", {
404
+ children: D("movethewheels.inventory.transactions.loading", "Loading movements…")
405
+ }) : B.length === 0 ? /* @__PURE__ */ v("p", {
401
406
  className: "p-6 text-sm text-text-secondary",
402
- children: k("movethewheels.inventory.transactions.empty", "No stock movements recorded yet. Receipts, issues and adjustments show up here as they happen.")
403
- }) : /* @__PURE__ */ y("ul", {
407
+ children: D("movethewheels.inventory.transactions.empty", "No stock movements recorded yet. Receipts, issues and adjustments show up here as they happen.")
408
+ }) : /* @__PURE__ */ v("ul", {
404
409
  className: "divide-y",
405
- children: V.map((r) => {
406
- let i = T[r.type], a = I.find((e) => e.id === r.productId)?.name ?? r.transactionNumber;
407
- return /* @__PURE__ */ b("li", {
410
+ children: B.map((r) => {
411
+ let i = C[r.type], a = P.find((e) => e.id === r.productId)?.name ?? r.transactionNumber;
412
+ return /* @__PURE__ */ y("li", {
408
413
  className: "flex items-start justify-between gap-3 p-4",
409
- children: [/* @__PURE__ */ b("div", {
414
+ children: [/* @__PURE__ */ y("div", {
410
415
  className: "min-w-0",
411
416
  children: [
412
- /* @__PURE__ */ b("p", {
417
+ /* @__PURE__ */ y("p", {
413
418
  className: "flex items-center gap-1.5 font-medium",
414
- children: [i === "in" ? /* @__PURE__ */ y(e, {
419
+ children: [i === "in" ? /* @__PURE__ */ v(e, {
415
420
  size: 14,
416
421
  className: "text-status-success-text"
417
- }) : i === "out" ? /* @__PURE__ */ y(n, {
422
+ }) : i === "out" ? /* @__PURE__ */ v(n, {
418
423
  size: 14,
419
424
  className: "text-status-warning-text"
420
- }) : /* @__PURE__ */ y(t, {
425
+ }) : /* @__PURE__ */ v(t, {
421
426
  size: 14,
422
427
  className: "text-text-secondary"
423
- }), E[r.type]]
428
+ }), w[r.type]]
424
429
  }),
425
- /* @__PURE__ */ y("p", {
430
+ /* @__PURE__ */ v("p", {
426
431
  className: "truncate text-sm text-text-secondary",
427
432
  children: a
428
433
  }),
429
- /* @__PURE__ */ y("p", {
434
+ /* @__PURE__ */ v("p", {
430
435
  className: "text-xs text-text-secondary",
431
- children: se(r.createdAt, "short")
436
+ children: le(r.createdAt, "short")
432
437
  })
433
438
  ]
434
- }), /* @__PURE__ */ y("span", {
439
+ }), /* @__PURE__ */ v("span", {
435
440
  className: i === "in" ? "font-medium text-status-success-text" : i === "out" ? "font-medium text-status-warning-text" : "font-medium text-text-primary",
436
- children: D(i, r.quantity)
441
+ children: T(i, r.quantity)
437
442
  })]
438
443
  }, r.id);
439
444
  })
@@ -441,53 +446,53 @@ function O() {
441
446
  })]
442
447
  })]
443
448
  }),
444
- /* @__PURE__ */ b("div", {
449
+ /* @__PURE__ */ y("div", {
445
450
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
446
- children: [/* @__PURE__ */ y(h, {
447
- title: k("movethewheels.inventory.warehouses.title", "Warehouses"),
448
- actions: /* @__PURE__ */ b(d, {
451
+ children: [/* @__PURE__ */ v(p, {
452
+ title: D("movethewheels.inventory.warehouses.title", "Warehouses"),
453
+ actions: /* @__PURE__ */ y(u, {
449
454
  variant: "ghost",
450
455
  size: "sm",
451
456
  onClick: () => Z("inventory/warehouses"),
452
457
  children: [
453
- k("movethewheels.inventory.common.viewAll", "View all"),
458
+ D("movethewheels.inventory.common.viewAll", "View all"),
454
459
  " ",
455
- /* @__PURE__ */ y(i, { size: 16 })
460
+ /* @__PURE__ */ v(i, { size: 16 })
456
461
  ]
457
462
  }),
458
- children: /* @__PURE__ */ y(f, { children: /* @__PURE__ */ y(p, {
463
+ children: /* @__PURE__ */ v(d, { children: /* @__PURE__ */ v(f, {
459
464
  className: "p-0",
460
- children: /* @__PURE__ */ y("div", {
465
+ children: /* @__PURE__ */ v("div", {
461
466
  className: "divide-y",
462
- children: ke.map((e) => /* @__PURE__ */ y("div", {
467
+ children: F.map((e) => /* @__PURE__ */ v("div", {
463
468
  role: "button",
464
469
  tabIndex: 0,
465
470
  "aria-label": `View warehouse ${e.name}`,
466
471
  className: "p-4 hover:bg-bg-sunken/50 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg",
467
472
  onClick: () => Z(`inventory/warehouses/${e.id}`),
468
473
  onKeyDown: (t) => Q(t, () => Z(`inventory/warehouses/${e.id}`)),
469
- children: /* @__PURE__ */ b("div", {
474
+ children: /* @__PURE__ */ y("div", {
470
475
  className: "flex items-center justify-between",
471
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
476
+ children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
472
477
  className: "font-medium",
473
478
  children: e.name
474
- }), /* @__PURE__ */ y("p", {
479
+ }), /* @__PURE__ */ v("p", {
475
480
  className: "text-sm text-text-secondary",
476
481
  children: [e.address.city, e.address.state].filter(Boolean).join(", ") || "Not provided"
477
- })] }), /* @__PURE__ */ b("div", {
482
+ })] }), /* @__PURE__ */ y("div", {
478
483
  className: "text-right",
479
- children: [/* @__PURE__ */ y(u, {
484
+ children: [/* @__PURE__ */ v(l, {
480
485
  variant: e.status?.toUpperCase() === "ACTIVE" ? "default" : "secondary",
481
- children: e.status ? e.status.toUpperCase() === "ACTIVE" ? k("movethewheels.inventory.warehouses.active", "Active") : k("movethewheels.inventory.warehouses.inactive", "Inactive") : "Not provided"
482
- }), /* @__PURE__ */ b("div", {
486
+ children: e.status ? e.status.toUpperCase() === "ACTIVE" ? D("movethewheels.inventory.warehouses.active", "Active") : D("movethewheels.inventory.warehouses.inactive", "Inactive") : "Not provided"
487
+ }), /* @__PURE__ */ y("div", {
483
488
  className: "mt-2",
484
- children: [/* @__PURE__ */ y("p", {
489
+ children: [/* @__PURE__ */ v("p", {
485
490
  className: "text-xs text-text-secondary",
486
- children: k("movethewheels.inventory.warehouses.utilization", "Utilization")
487
- }), e.utilization === void 0 ? /* @__PURE__ */ y("p", {
491
+ children: D("movethewheels.inventory.warehouses.utilization", "Utilization")
492
+ }), e.utilization === void 0 ? /* @__PURE__ */ v("p", {
488
493
  className: "text-xs text-text-tertiary",
489
494
  children: "Not provided"
490
- }) : /* @__PURE__ */ y(fe, {
495
+ }) : /* @__PURE__ */ v(me, {
491
496
  value: e.utilization,
492
497
  className: "w-24 h-2"
493
498
  })]
@@ -497,43 +502,43 @@ function O() {
497
502
  }, e.id))
498
503
  })
499
504
  }) })
500
- }), /* @__PURE__ */ y(h, {
501
- title: k("movethewheels.inventory.products.title", "Recent Products"),
502
- actions: /* @__PURE__ */ b(d, {
505
+ }), /* @__PURE__ */ v(p, {
506
+ title: D("movethewheels.inventory.products.title", "Recent Products"),
507
+ actions: /* @__PURE__ */ y(u, {
503
508
  variant: "ghost",
504
509
  size: "sm",
505
510
  onClick: () => Z("inventory/products"),
506
511
  children: [
507
- k("movethewheels.inventory.common.viewAll", "View all"),
512
+ D("movethewheels.inventory.common.viewAll", "View all"),
508
513
  " ",
509
- /* @__PURE__ */ y(i, { size: 16 })
514
+ /* @__PURE__ */ v(i, { size: 16 })
510
515
  ]
511
516
  }),
512
- children: /* @__PURE__ */ y(f, { children: /* @__PURE__ */ y(p, {
517
+ children: /* @__PURE__ */ v(d, { children: /* @__PURE__ */ v(f, {
513
518
  className: "p-0",
514
- children: /* @__PURE__ */ y("div", {
519
+ children: /* @__PURE__ */ v("div", {
515
520
  className: "divide-y",
516
- children: I.slice(0, 5).map((e) => /* @__PURE__ */ y("div", {
521
+ children: P.slice(0, 5).map((e) => /* @__PURE__ */ v("div", {
517
522
  role: "button",
518
523
  tabIndex: 0,
519
524
  "aria-label": `View product ${e.name}`,
520
525
  className: "p-4 hover:bg-bg-sunken/50 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg",
521
526
  onClick: () => Z(`inventory/products/${e.id}`),
522
527
  onKeyDown: (t) => Q(t, () => Z(`inventory/products/${e.id}`)),
523
- children: /* @__PURE__ */ b("div", {
528
+ children: /* @__PURE__ */ y("div", {
524
529
  className: "flex items-center justify-between",
525
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
530
+ children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
526
531
  className: "font-medium",
527
532
  children: e.name
528
- }), /* @__PURE__ */ y("p", {
533
+ }), /* @__PURE__ */ v("p", {
529
534
  className: "text-sm text-text-secondary",
530
535
  children: e.sku
531
- })] }), /* @__PURE__ */ b("div", {
536
+ })] }), /* @__PURE__ */ y("div", {
532
537
  className: "text-right",
533
- children: [/* @__PURE__ */ y("p", {
538
+ children: [/* @__PURE__ */ v("p", {
534
539
  className: "font-medium",
535
- children: e.value === void 0 ? "Not provided" : oe(e.value)
536
- }), /* @__PURE__ */ y(u, {
540
+ children: e.value === void 0 ? "Not provided" : ce(e.value)
541
+ }), /* @__PURE__ */ v(l, {
537
542
  variant: "outline",
538
543
  children: e.category ?? "Not provided"
539
544
  })]
@@ -544,12 +549,12 @@ function O() {
544
549
  }) })
545
550
  })]
546
551
  }),
547
- /* @__PURE__ */ y(xe, {
548
- open: Ie,
552
+ /* @__PURE__ */ v(we, {
553
+ open: Re,
549
554
  onOpenChange: W,
550
555
  onDone: X
551
556
  }),
552
- /* @__PURE__ */ y(be, {
557
+ /* @__PURE__ */ v(Ce, {
553
558
  line: G,
554
559
  open: G !== null,
555
560
  onOpenChange: (e) => {
@@ -557,7 +562,7 @@ function O() {
557
562
  },
558
563
  onDone: X
559
564
  }),
560
- /* @__PURE__ */ y(Se, {
565
+ /* @__PURE__ */ v(Te, {
561
566
  line: q,
562
567
  open: q !== null,
563
568
  onOpenChange: (e) => {
@@ -569,4 +574,4 @@ function O() {
569
574
  });
570
575
  }
571
576
  //#endregion
572
- export { O as default };
577
+ export { E as default };