@burdenoff/microfe-movethewheels 2026.930.2 → 2026.930.4

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