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