@argusoft/medplat-product-management 1.0.2 → 1.0.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.
- package/dist/{BrandsPage-CSA3meke.js → BrandsPage-BE3kn-8b.js} +77 -75
- package/dist/BrandsPage-BE3kn-8b.js.map +1 -0
- package/dist/{CategoriesPage-BrspzkJL.js → CategoriesPage-COqi3pMi.js} +71 -70
- package/dist/{CategoriesPage-BrspzkJL.js.map → CategoriesPage-COqi3pMi.js.map} +1 -1
- package/dist/{DashboardPage-CqaquOs2.js → DashboardPage-C_H1Jrey.js} +90 -89
- package/dist/DashboardPage-C_H1Jrey.js.map +1 -0
- package/dist/{FacilityPicker-Dv_H95WW.js → FacilityPicker-Diq2hnYg.js} +2 -2
- package/dist/{FacilityPicker-Dv_H95WW.js.map → FacilityPicker-Diq2hnYg.js.map} +1 -1
- package/dist/{InventoryPage-CPbzfDMR.js → InventoryPage-Bjpw6vTz.js} +106 -115
- package/dist/InventoryPage-Bjpw6vTz.js.map +1 -0
- package/dist/{MemberProfileCard-0vjO3Gzd.js → MemberProfileCard-BLUVRILO.js} +10 -9
- package/dist/MemberProfileCard-BLUVRILO.js.map +1 -0
- package/dist/{PaymentCreatePage-BYmDZAIB.js → PaymentCreatePage-B5VOgTx9.js} +173 -177
- package/dist/PaymentCreatePage-B5VOgTx9.js.map +1 -0
- package/dist/{PaymentsPage-BXPvKon-.js → PaymentsPage-DY6BclkN.js} +24 -23
- package/dist/{PaymentsPage-BXPvKon-.js.map → PaymentsPage-DY6BclkN.js.map} +1 -1
- package/dist/PickupCreatePage-CCSiyFQF.js +706 -0
- package/dist/PickupCreatePage-CCSiyFQF.js.map +1 -0
- package/dist/{PickupsPage-D66_Wta4.js → PickupsPage-DGi6T5Of.js} +83 -90
- package/dist/PickupsPage-DGi6T5Of.js.map +1 -0
- package/dist/PmGuard-C90yhpsN.js +592 -0
- package/dist/PmGuard-C90yhpsN.js.map +1 -0
- package/dist/{PmTable-B9970kPY.js → PmTable-BkK65bJQ.js} +98 -98
- package/dist/PmTable-BkK65bJQ.js.map +1 -0
- package/dist/{ProductEditPage-B8qFTCW9.js → ProductEditPage-CQj9egzW.js} +138 -137
- package/dist/ProductEditPage-CQj9egzW.js.map +1 -0
- package/dist/{ProductsPage-C7_r9cKn.js → ProductsPage-i8QVw_Jm.js} +65 -64
- package/dist/{ProductsPage-C7_r9cKn.js.map → ProductsPage-i8QVw_Jm.js.map} +1 -1
- package/dist/PurchaseCreatePage-Bp6bl9n8.js +591 -0
- package/dist/PurchaseCreatePage-Bp6bl9n8.js.map +1 -0
- package/dist/{PurchaseRequestDetailPage-C7aAwEqw.js → PurchaseRequestDetailPage-CNAqIFef.js} +216 -215
- package/dist/PurchaseRequestDetailPage-CNAqIFef.js.map +1 -0
- package/dist/{PurchaseRequestsPage-BwCkbpaX.js → PurchaseRequestsPage-BJqDlNrc.js} +57 -56
- package/dist/{PurchaseRequestsPage-BwCkbpaX.js.map → PurchaseRequestsPage-BJqDlNrc.js.map} +1 -1
- package/dist/{PurchasesPage-CvaZouVy.js → PurchasesPage-BQEToymQ.js} +76 -75
- package/dist/{PurchasesPage-CvaZouVy.js.map → PurchasesPage-BQEToymQ.js.map} +1 -1
- package/dist/{SaleCreatePage-DP1Qmltu.js → SaleCreatePage-DbfBK4PH.js} +149 -173
- package/dist/SaleCreatePage-DbfBK4PH.js.map +1 -0
- package/dist/{SalesPage-CO3cdYX5.js → SalesPage-CTBJMxZe.js} +50 -49
- package/dist/SalesPage-CTBJMxZe.js.map +1 -0
- package/dist/SettingsPage-CiwVmzM3.js +663 -0
- package/dist/SettingsPage-CiwVmzM3.js.map +1 -0
- package/dist/{StorageUnitsPage-B9Hr_RkW.js → StorageUnitsPage-BV7nK_iE.js} +57 -56
- package/dist/{StorageUnitsPage-B9Hr_RkW.js.map → StorageUnitsPage-BV7nK_iE.js.map} +1 -1
- package/dist/{TransactionsPage-HKIGwEZN.js → TransactionsPage-Cocn4901.js} +55 -54
- package/dist/TransactionsPage-Cocn4901.js.map +1 -0
- package/dist/TransferCreatePage-DbjcjuOg.js +316 -0
- package/dist/TransferCreatePage-DbjcjuOg.js.map +1 -0
- package/dist/TransfersPage-BFVF7Xvc.js +471 -0
- package/dist/TransfersPage-BFVF7Xvc.js.map +1 -0
- package/dist/VialsPage-BNzYTLVd.js +321 -0
- package/dist/VialsPage-BNzYTLVd.js.map +1 -0
- package/dist/index.js +652 -34
- package/dist/index.js.map +1 -1
- package/dist/settingsStore-KW217unV.js +417 -0
- package/dist/settingsStore-KW217unV.js.map +1 -0
- package/package.json +1 -1
- package/dist/BrandsPage-CSA3meke.js.map +0 -1
- package/dist/DashboardPage-CqaquOs2.js.map +0 -1
- package/dist/InventoryPage-CPbzfDMR.js.map +0 -1
- package/dist/MemberProfileCard-0vjO3Gzd.js.map +0 -1
- package/dist/PaymentCreatePage-BYmDZAIB.js.map +0 -1
- package/dist/PickupCreatePage-CMGwoAXj.js +0 -426
- package/dist/PickupCreatePage-CMGwoAXj.js.map +0 -1
- package/dist/PickupsPage-D66_Wta4.js.map +0 -1
- package/dist/PmTable-B9970kPY.js.map +0 -1
- package/dist/ProductEditPage-B8qFTCW9.js.map +0 -1
- package/dist/PurchaseCreatePage-CDfNDcKG.js +0 -627
- package/dist/PurchaseCreatePage-CDfNDcKG.js.map +0 -1
- package/dist/PurchaseRequestDetailPage-C7aAwEqw.js.map +0 -1
- package/dist/SaleCreatePage-DP1Qmltu.js.map +0 -1
- package/dist/SalesPage-CO3cdYX5.js.map +0 -1
- package/dist/SettingsPage-DvVRwSFw.js +0 -711
- package/dist/SettingsPage-DvVRwSFw.js.map +0 -1
- package/dist/TransactionsPage-HKIGwEZN.js.map +0 -1
- package/dist/TransferCreatePage-DMuZqQ3c.js +0 -363
- package/dist/TransferCreatePage-DMuZqQ3c.js.map +0 -1
- package/dist/TransfersPage-COIyouL4.js +0 -480
- package/dist/TransfersPage-COIyouL4.js.map +0 -1
- package/dist/VialsPage-BNPUwGCU.js +0 -922
- package/dist/VialsPage-BNPUwGCU.js.map +0 -1
- package/dist/currency-ClRLIEg2.js +0 -1372
- package/dist/currency-ClRLIEg2.js.map +0 -1
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { E as e, U as t, X as n } from "./settingsStore-KW217unV.js";
|
|
2
|
+
import { a as r, c as ee, o as te, s as ne, t as re } from "./PmTable-BkK65bJQ.js";
|
|
3
|
+
import { a as i, p as a, t as o } from "./constants-5ZCZo-Zm.js";
|
|
4
|
+
import { a as ie, i as s, t as c } from "./format-UOyOu75i.js";
|
|
5
|
+
import { m as l } from "./validation-Ba7puFIO.js";
|
|
6
|
+
import { a as u, i as ae, n as oe, r as se, t as ce } from "./PmGuard-C90yhpsN.js";
|
|
7
|
+
import { useMemo as le, useState as d } from "react";
|
|
7
8
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import D from "@mui/
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
9
|
+
import { Alert as ue, Box as m, Button as h, Chip as g, Dialog as de, DialogActions as _, DialogContent as fe, DialogTitle as pe, FormControl as me, InputAdornment as he, InputLabel as v, LinearProgress as ge, MenuItem as y, Select as _e, Skeleton as ve, Stack as b, TableBody as ye, TableCell as x, TableHead as be, TableRow as S, TextField as C, Tooltip as w, Typography as T } from "@mui/material";
|
|
10
|
+
import { showToast as E } from "@/common/toaster/toaster";
|
|
11
|
+
import { alpha as D, useTheme as O } from "@mui/material/styles";
|
|
12
|
+
import { v4 as k } from "uuid";
|
|
13
|
+
import A from "@mui/icons-material/RefreshRounded";
|
|
13
14
|
import j from "@mui/icons-material/WidgetsRounded";
|
|
14
15
|
import M from "@mui/icons-material/LockRounded";
|
|
15
16
|
import N from "@mui/icons-material/LockOpenRounded";
|
|
16
17
|
import xe from "@mui/icons-material/SearchRounded";
|
|
17
18
|
//#region src/views/InventoryPage.jsx
|
|
18
19
|
function P(e) {
|
|
19
|
-
return e ? e.status === "EXPIRED" ? !0 :
|
|
20
|
+
return e ? e.status === "EXPIRED" ? !0 : s(e.expiryDate) : !1;
|
|
20
21
|
}
|
|
21
22
|
function F() {
|
|
22
|
-
let
|
|
23
|
+
let s = ae().has("update.manage.productManagement.inventory"), [F, Se] = d([]), [I, L] = d(!1), [R, z] = d(""), [B, V] = d({
|
|
23
24
|
open: !1,
|
|
24
25
|
batch: null,
|
|
25
26
|
reason: "OTHER",
|
|
26
27
|
notes: ""
|
|
27
|
-
}), Ce =
|
|
28
|
+
}), Ce = O(), [H, U] = d(""), [W, G] = d("ALL"), [K, q] = d(!1), [J, Y] = d(!1);
|
|
28
29
|
async function X() {
|
|
29
30
|
L(!0), z("");
|
|
30
31
|
try {
|
|
31
32
|
Se(await e());
|
|
32
33
|
} catch (e) {
|
|
33
34
|
let t = e?.response?.data?.message ?? e?.message ?? "Failed to load inventory";
|
|
34
|
-
z(t),
|
|
35
|
+
z(t), E({
|
|
35
36
|
message: t,
|
|
36
37
|
type: "error"
|
|
37
38
|
});
|
|
@@ -39,10 +40,10 @@ function F() {
|
|
|
39
40
|
L(!1);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
+
se("view.manage.productManagement.inventory", () => {
|
|
43
44
|
X();
|
|
44
45
|
}, []);
|
|
45
|
-
let Z =
|
|
46
|
+
let Z = le(() => {
|
|
46
47
|
let e = H.trim().toLowerCase();
|
|
47
48
|
return F.filter((t) => !(e && !`${t.productName ?? ""} ${t.lotNumber ?? ""}`.toLowerCase().includes(e) || W !== "ALL" && t.status !== W || K && P(t) || J && !(Number(t.qtyRemaining ?? 0) > 0)));
|
|
48
49
|
}, [
|
|
@@ -58,11 +59,11 @@ function F() {
|
|
|
58
59
|
async function we() {
|
|
59
60
|
try {
|
|
60
61
|
await t({
|
|
61
|
-
id:
|
|
62
|
+
id: k(),
|
|
62
63
|
batchId: B.batch.id,
|
|
63
64
|
reason: B.reason,
|
|
64
65
|
notes: B.notes || null
|
|
65
|
-
}),
|
|
66
|
+
}), E({
|
|
66
67
|
message: "Batch quarantined.",
|
|
67
68
|
type: "success"
|
|
68
69
|
}), V({
|
|
@@ -72,7 +73,7 @@ function F() {
|
|
|
72
73
|
notes: ""
|
|
73
74
|
}), await X();
|
|
74
75
|
} catch (e) {
|
|
75
|
-
|
|
76
|
+
E({
|
|
76
77
|
message: e?.response?.data?.message ?? e?.message ?? "Failed to quarantine",
|
|
77
78
|
type: "error"
|
|
78
79
|
});
|
|
@@ -80,45 +81,45 @@ function F() {
|
|
|
80
81
|
}
|
|
81
82
|
async function Te(e) {
|
|
82
83
|
try {
|
|
83
|
-
await
|
|
84
|
-
id:
|
|
84
|
+
await n({
|
|
85
|
+
id: k(),
|
|
85
86
|
batchId: e.id
|
|
86
|
-
}),
|
|
87
|
+
}), E({
|
|
87
88
|
message: "Quarantine lifted.",
|
|
88
89
|
type: "success"
|
|
89
90
|
}), await X();
|
|
90
91
|
} catch (e) {
|
|
91
|
-
|
|
92
|
+
E({
|
|
92
93
|
message: e?.response?.data?.message ?? e?.message ?? "Failed to unquarantine",
|
|
93
94
|
type: "error"
|
|
94
95
|
});
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
|
-
return /* @__PURE__ */ p(
|
|
98
|
+
return /* @__PURE__ */ p(m, { children: [/* @__PURE__ */ f(oe, {}), /* @__PURE__ */ p(ce, {
|
|
98
99
|
perm: "view.manage.productManagement.inventory",
|
|
99
|
-
children: [/* @__PURE__ */ p(
|
|
100
|
+
children: [/* @__PURE__ */ p(u, {
|
|
100
101
|
title: "Inventory",
|
|
101
102
|
subtitle: "Your stock batches. Click to see history or quarantine items if there's a problem.",
|
|
102
103
|
chips: ["Stock"],
|
|
103
|
-
actions: /* @__PURE__ */ f(
|
|
104
|
+
actions: /* @__PURE__ */ f(b, {
|
|
104
105
|
direction: "row",
|
|
105
106
|
spacing: 1,
|
|
106
|
-
children: /* @__PURE__ */ f(
|
|
107
|
+
children: /* @__PURE__ */ f(h, {
|
|
107
108
|
variant: "outlined",
|
|
108
|
-
startIcon: /* @__PURE__ */ f(
|
|
109
|
+
startIcon: /* @__PURE__ */ f(A, {}),
|
|
109
110
|
onClick: () => void X(),
|
|
110
111
|
children: "Refresh"
|
|
111
112
|
})
|
|
112
113
|
}),
|
|
113
|
-
children: [R ? /* @__PURE__ */ f(
|
|
114
|
+
children: [R ? /* @__PURE__ */ f(ue, {
|
|
114
115
|
severity: "error",
|
|
115
116
|
sx: { mb: 2 },
|
|
116
117
|
children: R
|
|
117
|
-
}) : null, /* @__PURE__ */ p(
|
|
118
|
+
}) : null, /* @__PURE__ */ p(ee, {
|
|
118
119
|
eyebrow: "Stock on hand",
|
|
119
120
|
title: "Inventory batches",
|
|
120
121
|
subtitle: I ? "Loading…" : Q ? `${Z.length} of ${F.length} ${F.length === 1 ? "batch" : "batches"} match` : `${F.length} ${F.length === 1 ? "batch" : "batches"} visible`,
|
|
121
|
-
children: [/* @__PURE__ */ p(
|
|
122
|
+
children: [/* @__PURE__ */ p(b, {
|
|
122
123
|
direction: {
|
|
123
124
|
xs: "column",
|
|
124
125
|
md: "row"
|
|
@@ -127,7 +128,7 @@ function F() {
|
|
|
127
128
|
sx: { mb: 2 },
|
|
128
129
|
alignItems: { md: "center" },
|
|
129
130
|
children: [
|
|
130
|
-
/* @__PURE__ */ f(
|
|
131
|
+
/* @__PURE__ */ f(C, {
|
|
131
132
|
size: "small",
|
|
132
133
|
fullWidth: !0,
|
|
133
134
|
placeholder: "Search product or lot…",
|
|
@@ -139,25 +140,25 @@ function F() {
|
|
|
139
140
|
}) },
|
|
140
141
|
sx: { maxWidth: { md: 360 } }
|
|
141
142
|
}),
|
|
142
|
-
/* @__PURE__ */ p(
|
|
143
|
+
/* @__PURE__ */ p(me, {
|
|
143
144
|
size: "small",
|
|
144
145
|
sx: { minWidth: 160 },
|
|
145
|
-
children: [/* @__PURE__ */ f(
|
|
146
|
+
children: [/* @__PURE__ */ f(v, { children: "Status" }), /* @__PURE__ */ p(_e, {
|
|
146
147
|
label: "Status",
|
|
147
148
|
value: W,
|
|
148
149
|
onChange: (e) => {
|
|
149
150
|
let t = e.target.value;
|
|
150
151
|
G(t), t === "EXPIRED" && q(!1), t === "EXHAUSTED" && Y(!1);
|
|
151
152
|
},
|
|
152
|
-
children: [/* @__PURE__ */ f(
|
|
153
|
+
children: [/* @__PURE__ */ f(y, {
|
|
153
154
|
value: "ALL",
|
|
154
155
|
children: "All statuses"
|
|
155
|
-
}),
|
|
156
|
+
}), o.map((e) => {
|
|
156
157
|
let t = e.value === "EXPIRED" && K || e.value === "EXHAUSTED" && J;
|
|
157
|
-
return /* @__PURE__ */ p(
|
|
158
|
+
return /* @__PURE__ */ p(y, {
|
|
158
159
|
value: e.value,
|
|
159
160
|
disabled: t,
|
|
160
|
-
children: [e.label, t ? /* @__PURE__ */ f(
|
|
161
|
+
children: [e.label, t ? /* @__PURE__ */ f(T, {
|
|
161
162
|
component: "span",
|
|
162
163
|
variant: "caption",
|
|
163
164
|
color: "text.disabled",
|
|
@@ -168,12 +169,12 @@ function F() {
|
|
|
168
169
|
})]
|
|
169
170
|
})]
|
|
170
171
|
}),
|
|
171
|
-
/* @__PURE__ */ p(
|
|
172
|
+
/* @__PURE__ */ p(b, {
|
|
172
173
|
direction: "row",
|
|
173
174
|
spacing: 1,
|
|
174
175
|
useFlexGap: !0,
|
|
175
176
|
flexWrap: "wrap",
|
|
176
|
-
children: [/* @__PURE__ */ f(
|
|
177
|
+
children: [/* @__PURE__ */ f(g, {
|
|
177
178
|
label: "Not yet expired",
|
|
178
179
|
size: "small",
|
|
179
180
|
disabled: W === "EXPIRED",
|
|
@@ -189,7 +190,7 @@ function F() {
|
|
|
189
190
|
fontWeight: 700,
|
|
190
191
|
borderRadius: 1.5
|
|
191
192
|
}
|
|
192
|
-
}), /* @__PURE__ */ f(
|
|
193
|
+
}), /* @__PURE__ */ f(g, {
|
|
193
194
|
label: "Stock still left",
|
|
194
195
|
size: "small",
|
|
195
196
|
disabled: W === "EXHAUSTED",
|
|
@@ -207,37 +208,37 @@ function F() {
|
|
|
207
208
|
}
|
|
208
209
|
})]
|
|
209
210
|
}),
|
|
210
|
-
/* @__PURE__ */ f(
|
|
211
|
-
/* @__PURE__ */ f(
|
|
211
|
+
/* @__PURE__ */ f(m, { sx: { flexGrow: 1 } }),
|
|
212
|
+
/* @__PURE__ */ f(h, {
|
|
212
213
|
variant: "text",
|
|
213
214
|
onClick: $,
|
|
214
215
|
disabled: !Q,
|
|
215
216
|
children: "Clear"
|
|
216
217
|
})
|
|
217
218
|
]
|
|
218
|
-
}), /* @__PURE__ */ p(
|
|
219
|
+
}), /* @__PURE__ */ p(ne, {
|
|
219
220
|
dense: !0,
|
|
220
|
-
children: [/* @__PURE__ */ f(
|
|
221
|
-
/* @__PURE__ */ f(
|
|
222
|
-
/* @__PURE__ */ f(
|
|
223
|
-
/* @__PURE__ */ f(
|
|
224
|
-
/* @__PURE__ */ f(
|
|
225
|
-
/* @__PURE__ */ f(
|
|
221
|
+
children: [/* @__PURE__ */ f(be, { children: /* @__PURE__ */ p(S, { children: [
|
|
222
|
+
/* @__PURE__ */ f(x, { children: "Product" }),
|
|
223
|
+
/* @__PURE__ */ f(x, { children: "Lot" }),
|
|
224
|
+
/* @__PURE__ */ f(x, { children: "Owner" }),
|
|
225
|
+
/* @__PURE__ */ f(x, { children: "Expiry" }),
|
|
226
|
+
/* @__PURE__ */ f(x, {
|
|
226
227
|
align: "right",
|
|
227
228
|
children: "Stock"
|
|
228
229
|
}),
|
|
229
|
-
/* @__PURE__ */ f(
|
|
230
|
-
/* @__PURE__ */ f(
|
|
231
|
-
/* @__PURE__ */ f(
|
|
230
|
+
/* @__PURE__ */ f(x, { children: "Storage" }),
|
|
231
|
+
/* @__PURE__ */ f(x, { children: "Status" }),
|
|
232
|
+
/* @__PURE__ */ f(x, {
|
|
232
233
|
align: "right",
|
|
233
234
|
children: "Action"
|
|
234
235
|
})
|
|
235
|
-
] }) }), /* @__PURE__ */ f(
|
|
236
|
+
] }) }), /* @__PURE__ */ f(ye, { children: I ? Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ f(S, { children: Array.from({ length: 8 }).map((e, t) => /* @__PURE__ */ f(x, { children: /* @__PURE__ */ f(ve, { height: 22 }) }, t)) }, t)) : Z.length === 0 ? /* @__PURE__ */ f(re, {
|
|
236
237
|
colSpan: 8,
|
|
237
238
|
icon: j,
|
|
238
239
|
title: Q ? "No batches match your filters" : "No batches in stock",
|
|
239
240
|
hint: Q ? "Adjust your search or filters." : "Record a purchase to add stock.",
|
|
240
|
-
action: Q ? /* @__PURE__ */ f(
|
|
241
|
+
action: Q ? /* @__PURE__ */ f(h, {
|
|
241
242
|
variant: "text",
|
|
242
243
|
size: "small",
|
|
243
244
|
onClick: $,
|
|
@@ -245,80 +246,80 @@ function F() {
|
|
|
245
246
|
}) : null
|
|
246
247
|
}) : Z.map((e) => {
|
|
247
248
|
let t = P(e), n = e.qtyPurchased > 0 ? e.qtyRemaining / e.qtyPurchased : 0;
|
|
248
|
-
return /* @__PURE__ */ p(
|
|
249
|
+
return /* @__PURE__ */ p(S, {
|
|
249
250
|
hover: !0,
|
|
250
251
|
children: [
|
|
251
|
-
/* @__PURE__ */ f(
|
|
252
|
+
/* @__PURE__ */ f(x, { children: /* @__PURE__ */ p(b, {
|
|
252
253
|
direction: "row",
|
|
253
254
|
alignItems: "baseline",
|
|
254
255
|
spacing: 1,
|
|
255
256
|
sx: { minWidth: 0 },
|
|
256
|
-
children: [/* @__PURE__ */ f(
|
|
257
|
+
children: [/* @__PURE__ */ f(T, {
|
|
257
258
|
variant: "body2",
|
|
258
259
|
sx: {
|
|
259
260
|
fontWeight: 700,
|
|
260
261
|
lineHeight: 1.2
|
|
261
262
|
},
|
|
262
263
|
children: e.productName
|
|
263
|
-
}), /* @__PURE__ */ f(
|
|
264
|
+
}), /* @__PURE__ */ f(r, { id: e.serialId })]
|
|
264
265
|
}) }),
|
|
265
|
-
/* @__PURE__ */ f(
|
|
266
|
+
/* @__PURE__ */ f(x, { children: e.lotNumber ? /* @__PURE__ */ f(m, {
|
|
266
267
|
component: "span",
|
|
267
268
|
sx: {
|
|
268
269
|
display: "inline-flex",
|
|
269
270
|
px: .7,
|
|
270
271
|
py: .1,
|
|
271
272
|
borderRadius: 1,
|
|
272
|
-
bgcolor:
|
|
273
|
+
bgcolor: D(Ce.palette.primary.main, .06),
|
|
273
274
|
color: "primary.dark",
|
|
274
275
|
fontFamily: "monospace",
|
|
275
276
|
fontSize: "0.72rem",
|
|
276
277
|
fontWeight: 700
|
|
277
278
|
},
|
|
278
279
|
children: e.lotNumber
|
|
279
|
-
}) : /* @__PURE__ */ f(
|
|
280
|
+
}) : /* @__PURE__ */ f(T, {
|
|
280
281
|
variant: "caption",
|
|
281
282
|
color: "text.disabled",
|
|
282
283
|
children: "—"
|
|
283
284
|
}) }),
|
|
284
|
-
/* @__PURE__ */ p(
|
|
285
|
+
/* @__PURE__ */ p(x, { children: [/* @__PURE__ */ f(T, {
|
|
285
286
|
variant: "body2",
|
|
286
287
|
sx: { fontWeight: 700 },
|
|
287
288
|
children: e.ownerName || (e.ownerType === "USER" ? "Personal" : "Facility")
|
|
288
|
-
}), /* @__PURE__ */ f(
|
|
289
|
+
}), /* @__PURE__ */ f(T, {
|
|
289
290
|
variant: "caption",
|
|
290
291
|
color: "text.secondary",
|
|
291
292
|
children: e.ownerType
|
|
292
293
|
})] }),
|
|
293
|
-
/* @__PURE__ */ f(
|
|
294
|
+
/* @__PURE__ */ f(x, { children: e.expiryDate ? /* @__PURE__ */ f(w, {
|
|
294
295
|
title: t ? "Past printed expiry" : "",
|
|
295
|
-
children: /* @__PURE__ */ f(
|
|
296
|
+
children: /* @__PURE__ */ f(T, {
|
|
296
297
|
variant: "body2",
|
|
297
298
|
sx: {
|
|
298
299
|
fontWeight: 700,
|
|
299
300
|
fontVariantNumeric: "tabular-nums",
|
|
300
301
|
color: t ? "error.dark" : "text.primary"
|
|
301
302
|
},
|
|
302
|
-
children:
|
|
303
|
+
children: c(e.expiryDate)
|
|
303
304
|
})
|
|
304
|
-
}) : /* @__PURE__ */ f(
|
|
305
|
+
}) : /* @__PURE__ */ f(T, {
|
|
305
306
|
variant: "caption",
|
|
306
307
|
color: "text.disabled",
|
|
307
308
|
children: "—"
|
|
308
309
|
}) }),
|
|
309
|
-
/* @__PURE__ */ f(
|
|
310
|
+
/* @__PURE__ */ f(x, {
|
|
310
311
|
align: "right",
|
|
311
312
|
sx: { minWidth: 150 },
|
|
312
|
-
children: /* @__PURE__ */ p(
|
|
313
|
+
children: /* @__PURE__ */ p(b, {
|
|
313
314
|
alignItems: "flex-end",
|
|
314
315
|
spacing: .5,
|
|
315
|
-
children: [/* @__PURE__ */ p(
|
|
316
|
+
children: [/* @__PURE__ */ p(T, {
|
|
316
317
|
variant: "body2",
|
|
317
318
|
sx: {
|
|
318
319
|
fontWeight: 800,
|
|
319
320
|
fontVariantNumeric: "tabular-nums"
|
|
320
321
|
},
|
|
321
|
-
children: [e.qtyRemaining, /* @__PURE__ */ p(
|
|
322
|
+
children: [e.qtyRemaining, /* @__PURE__ */ p(T, {
|
|
322
323
|
component: "span",
|
|
323
324
|
variant: "caption",
|
|
324
325
|
color: "text.secondary",
|
|
@@ -328,7 +329,7 @@ function F() {
|
|
|
328
329
|
},
|
|
329
330
|
children: ["/ ", e.qtyPurchased]
|
|
330
331
|
})]
|
|
331
|
-
}), /* @__PURE__ */ f(
|
|
332
|
+
}), /* @__PURE__ */ f(m, {
|
|
332
333
|
sx: { width: 80 },
|
|
333
334
|
children: /* @__PURE__ */ f(ge, {
|
|
334
335
|
variant: "determinate",
|
|
@@ -342,42 +343,42 @@ function F() {
|
|
|
342
343
|
})]
|
|
343
344
|
})
|
|
344
345
|
}),
|
|
345
|
-
/* @__PURE__ */ f(
|
|
346
|
+
/* @__PURE__ */ f(x, { children: e.storageUnitName ? /* @__PURE__ */ f(T, {
|
|
346
347
|
variant: "caption",
|
|
347
348
|
sx: { fontWeight: 700 },
|
|
348
349
|
children: e.storageUnitName
|
|
349
|
-
}) : /* @__PURE__ */ f(
|
|
350
|
+
}) : /* @__PURE__ */ f(T, {
|
|
350
351
|
variant: "caption",
|
|
351
352
|
color: "text.disabled",
|
|
352
353
|
children: "—"
|
|
353
354
|
}) }),
|
|
354
|
-
/* @__PURE__ */ f(
|
|
355
|
+
/* @__PURE__ */ f(x, { children: /* @__PURE__ */ p(b, {
|
|
355
356
|
direction: "row",
|
|
356
357
|
spacing: .5,
|
|
357
358
|
flexWrap: "wrap",
|
|
358
359
|
useFlexGap: !0,
|
|
359
360
|
children: [
|
|
360
|
-
/* @__PURE__ */ f(
|
|
361
|
+
/* @__PURE__ */ f(g, {
|
|
361
362
|
size: "small",
|
|
362
|
-
color:
|
|
363
|
-
label:
|
|
363
|
+
color: ie(e.status),
|
|
364
|
+
label: a(o, e.status),
|
|
364
365
|
sx: {
|
|
365
366
|
fontWeight: 700,
|
|
366
367
|
borderRadius: 1.5,
|
|
367
368
|
height: 22
|
|
368
369
|
}
|
|
369
370
|
}),
|
|
370
|
-
e.isQuarantined ? /* @__PURE__ */ f(
|
|
371
|
+
e.isQuarantined ? /* @__PURE__ */ f(g, {
|
|
371
372
|
size: "small",
|
|
372
373
|
color: "error",
|
|
373
|
-
label:
|
|
374
|
+
label: a(i, e.quarantineReason) || "Quarantined",
|
|
374
375
|
sx: {
|
|
375
376
|
fontWeight: 700,
|
|
376
377
|
borderRadius: 1.5,
|
|
377
378
|
height: 22
|
|
378
379
|
}
|
|
379
380
|
}) : null,
|
|
380
|
-
t && e.status !== "EXPIRED" ? /* @__PURE__ */ f(
|
|
381
|
+
t && e.status !== "EXPIRED" ? /* @__PURE__ */ f(g, {
|
|
381
382
|
size: "small",
|
|
382
383
|
color: "warning",
|
|
383
384
|
label: "Expired",
|
|
@@ -387,7 +388,7 @@ function F() {
|
|
|
387
388
|
height: 22
|
|
388
389
|
}
|
|
389
390
|
}) : null,
|
|
390
|
-
e.sourceType ? /* @__PURE__ */ f(
|
|
391
|
+
e.sourceType ? /* @__PURE__ */ f(g, {
|
|
391
392
|
size: "small",
|
|
392
393
|
variant: "outlined",
|
|
393
394
|
color: e.sourceType === "PICKUP" ? "info" : e.sourceType === "TRANSFER_IN" ? "primary" : "default",
|
|
@@ -400,16 +401,16 @@ function F() {
|
|
|
400
401
|
}) : null
|
|
401
402
|
]
|
|
402
403
|
}) }),
|
|
403
|
-
/* @__PURE__ */ f(
|
|
404
|
+
/* @__PURE__ */ f(x, {
|
|
404
405
|
align: "right",
|
|
405
|
-
children:
|
|
406
|
+
children: s ? e.isQuarantined ? /* @__PURE__ */ f(h, {
|
|
406
407
|
size: "small",
|
|
407
408
|
variant: "outlined",
|
|
408
409
|
color: "success",
|
|
409
410
|
startIcon: /* @__PURE__ */ f(N, {}),
|
|
410
411
|
onClick: () => void Te(e),
|
|
411
412
|
children: "Unquarantine"
|
|
412
|
-
}) : t || e.status === "EXHAUSTED" || e.status === "IN_USE" ? null : /* @__PURE__ */ f(
|
|
413
|
+
}) : t || e.status === "EXHAUSTED" || e.status === "IN_USE" ? null : /* @__PURE__ */ f(h, {
|
|
413
414
|
size: "small",
|
|
414
415
|
variant: "outlined",
|
|
415
416
|
color: "error",
|
|
@@ -428,7 +429,7 @@ function F() {
|
|
|
428
429
|
}) })]
|
|
429
430
|
})]
|
|
430
431
|
})]
|
|
431
|
-
}), /* @__PURE__ */ p(
|
|
432
|
+
}), /* @__PURE__ */ p(de, {
|
|
432
433
|
open: B.open,
|
|
433
434
|
onClose: () => V({
|
|
434
435
|
...B,
|
|
@@ -440,11 +441,11 @@ function F() {
|
|
|
440
441
|
/* @__PURE__ */ f(pe, { children: "Quarantine Batch" }),
|
|
441
442
|
/* @__PURE__ */ f(fe, {
|
|
442
443
|
dividers: !0,
|
|
443
|
-
children: /* @__PURE__ */ p(
|
|
444
|
+
children: /* @__PURE__ */ p(b, {
|
|
444
445
|
spacing: 2,
|
|
445
446
|
sx: { pt: 1 },
|
|
446
447
|
children: [
|
|
447
|
-
/* @__PURE__ */ p(
|
|
448
|
+
/* @__PURE__ */ p(T, {
|
|
448
449
|
variant: "body2",
|
|
449
450
|
children: [
|
|
450
451
|
"Product: ",
|
|
@@ -457,29 +458,19 @@ function F() {
|
|
|
457
458
|
/* @__PURE__ */ f("strong", { children: B.batch?.qtyRemaining })
|
|
458
459
|
]
|
|
459
460
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ f(te, {
|
|
462
|
+
label: "Reason",
|
|
461
463
|
required: !0,
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
onChange: (e) => V({
|
|
471
|
-
...B,
|
|
472
|
-
reason: e.target.value
|
|
473
|
-
}),
|
|
474
|
-
children: s.map((e) => /* @__PURE__ */ f(b, {
|
|
475
|
-
value: e.value,
|
|
476
|
-
children: e.label
|
|
477
|
-
}, e.value))
|
|
478
|
-
}),
|
|
479
|
-
a(B.reason, "Reason") ? /* @__PURE__ */ f(me, { children: a(B.reason, "Reason") }) : null
|
|
480
|
-
]
|
|
464
|
+
value: B.reason,
|
|
465
|
+
onChange: (e) => V({
|
|
466
|
+
...B,
|
|
467
|
+
reason: e
|
|
468
|
+
}),
|
|
469
|
+
options: i,
|
|
470
|
+
error: !!l(B.reason, "Reason"),
|
|
471
|
+
helperText: l(B.reason, "Reason") || ""
|
|
481
472
|
}),
|
|
482
|
-
/* @__PURE__ */ f(
|
|
473
|
+
/* @__PURE__ */ f(C, {
|
|
483
474
|
label: "Notes",
|
|
484
475
|
size: "small",
|
|
485
476
|
multiline: !0,
|
|
@@ -494,16 +485,16 @@ function F() {
|
|
|
494
485
|
]
|
|
495
486
|
})
|
|
496
487
|
}),
|
|
497
|
-
/* @__PURE__ */ p(
|
|
488
|
+
/* @__PURE__ */ p(_, { children: [/* @__PURE__ */ f(h, {
|
|
498
489
|
onClick: () => V({
|
|
499
490
|
...B,
|
|
500
491
|
open: !1
|
|
501
492
|
}),
|
|
502
493
|
children: "Cancel"
|
|
503
|
-
}), /* @__PURE__ */ f(
|
|
494
|
+
}), /* @__PURE__ */ f(h, {
|
|
504
495
|
variant: "contained",
|
|
505
496
|
color: "error",
|
|
506
|
-
disabled: !!
|
|
497
|
+
disabled: !!l(B.reason, "Reason"),
|
|
507
498
|
onClick: () => void we(),
|
|
508
499
|
children: "Quarantine"
|
|
509
500
|
})] })
|
|
@@ -514,4 +505,4 @@ function F() {
|
|
|
514
505
|
//#endregion
|
|
515
506
|
export { F as default };
|
|
516
507
|
|
|
517
|
-
//# sourceMappingURL=InventoryPage-
|
|
508
|
+
//# sourceMappingURL=InventoryPage-Bjpw6vTz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InventoryPage-Bjpw6vTz.js","names":[],"sources":["../src/views/InventoryPage.jsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport { v4 as uuidv4 } from \"uuid\";\nimport {\n Alert,\n Box,\n Button,\n Chip,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n FormControl,\n InputAdornment,\n InputLabel,\n LinearProgress,\n MenuItem,\n Select,\n Skeleton,\n Stack,\n TableBody,\n TableCell,\n TableHead,\n TableRow,\n TextField,\n Tooltip,\n Typography,\n} from \"@mui/material\";\nimport { alpha, useTheme } from \"@mui/material/styles\";\nimport WidgetsRoundedIcon from \"@mui/icons-material/WidgetsRounded\";\nimport { PmEmptyRow, PmRef, PmSelect, PmTable, PmTableCard } from \"@pm/components/PmTable\";\nimport RefreshRoundedIcon from \"@mui/icons-material/RefreshRounded\";\nimport LockRoundedIcon from \"@mui/icons-material/LockRounded\";\nimport LockOpenRoundedIcon from \"@mui/icons-material/LockOpenRounded\";\nimport SearchRoundedIcon from \"@mui/icons-material/SearchRounded\";\nimport { showToast } from \"@/common/toaster/toaster\";\nimport PmPageShell from \"@pm/components/PmPageShell\";\nimport PmNav from \"@pm/components/PmNav\";\nimport PmGuard from \"@pm/components/PmGuard\";\nimport { usePermissionedEffect, usePmPermissions } from \"@pm/utils/permissions\";\nimport {\n listBatches,\n quarantineBatch,\n unquarantineBatch,\n} from \"@pm/services/pmApi\";\nimport { BATCH_STATUSES, QUARANTINE_REASONS, labelOf } from \"@pm/utils/constants\";\nimport { formatDate, isPastExpiry, statusColor } from \"@pm/utils/format\";\nimport { validateRequired } from \"@pm/utils/validation\";\n\n// Shared \"is this batch past its printed expiry?\" check. Used for both the\n// per-row pill and the \"Not yet expired\" filter so they can never disagree.\n// A batch whose expiryDate equals today is still valid — only the day AFTER\n// the printed expiry counts as expired (matches the unit packaging rule).\nfunction isBatchExpired(b) {\n if (!b) return false;\n if (b.status === 'EXPIRED') return true;\n return isPastExpiry(b.expiryDate);\n}\n\nexport default function InventoryPage() {\n const perms = usePmPermissions();\n const canWrite = perms.has('update.manage.productManagement.inventory');\n const [items, setItems] = useState([]);\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState(\"\");\n const [quarantineDialog, setQuarantineDialog] = useState({\n open: false,\n batch: null,\n reason: \"OTHER\",\n notes: \"\",\n });\n const theme = useTheme();\n const [search, setSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState('ALL');\n // Filter chips. notYetExpired excludes anything past its printed expiry\n // (regardless of status). inStock keeps rows with qtyRemaining > 0.\n const [notYetExpired, setNotYetExpired] = useState(false);\n const [inStock, setInStock] = useState(false);\n\n async function load() {\n setLoading(true);\n setError(\"\");\n try {\n setItems(await listBatches());\n } catch (err) {\n const message =\n err?.response?.data?.message ??\n err?.message ??\n \"Failed to load inventory\";\n setError(message);\n showToast({ message, type: \"error\" });\n } finally {\n setLoading(false);\n }\n }\n\n usePermissionedEffect('view.manage.productManagement.inventory', () => {\n void load();\n }, []);\n\n // Filters apply in-memory over whatever the list endpoint returned. Search\n // matches product name + lot (case-insensitive); chips + status narrow the\n // remaining set with AND semantics.\n const filteredItems = useMemo(() => {\n const q = search.trim().toLowerCase();\n return items.filter((b) => {\n if (q) {\n const hay = `${b.productName ?? ''} ${b.lotNumber ?? ''}`.toLowerCase();\n if (!hay.includes(q)) return false;\n }\n if (statusFilter !== 'ALL' && b.status !== statusFilter) return false;\n if (notYetExpired && isBatchExpired(b)) return false;\n if (inStock && !(Number(b.qtyRemaining ?? 0) > 0)) return false;\n return true;\n });\n }, [items, search, statusFilter, notYetExpired, inStock]);\n\n const hasFilter = search.trim() !== '' || statusFilter !== 'ALL' || notYetExpired || inStock;\n\n function clearFilters() {\n setSearch('');\n setStatusFilter('ALL');\n setNotYetExpired(false);\n setInStock(false);\n }\n\n async function doQuarantine() {\n try {\n await quarantineBatch({\n id: uuidv4(),\n batchId: quarantineDialog.batch.id,\n reason: quarantineDialog.reason,\n notes: quarantineDialog.notes || null,\n });\n showToast({ message: \"Batch quarantined.\", type: \"success\" });\n setQuarantineDialog({\n open: false,\n batch: null,\n reason: \"OTHER\",\n notes: \"\",\n });\n await load();\n } catch (err) {\n const message =\n err?.response?.data?.message ?? err?.message ?? \"Failed to quarantine\";\n showToast({ message, type: \"error\" });\n }\n }\n\n async function doUnquarantine(batch) {\n try {\n await unquarantineBatch({ id: uuidv4(), batchId: batch.id });\n showToast({ message: \"Quarantine lifted.\", type: \"success\" });\n await load();\n } catch (err) {\n const message =\n err?.response?.data?.message ??\n err?.message ??\n \"Failed to unquarantine\";\n showToast({ message, type: \"error\" });\n }\n }\n\n return (\n <Box>\n <PmNav />\n <PmGuard perm={'view.manage.productManagement.inventory'}>\n <PmPageShell\n title=\"Inventory\"\n subtitle=\"Your stock batches. Click to see history or quarantine items if there's a problem.\"\n chips={[\"Stock\"]}\n actions={\n <Stack direction=\"row\" spacing={1}>\n <Button\n variant=\"outlined\"\n startIcon={<RefreshRoundedIcon />}\n onClick={() => void load()}\n >\n Refresh\n </Button>\n </Stack>\n }\n >\n {error ? (\n <Alert severity=\"error\" sx={{ mb: 2 }}>\n {error}\n </Alert>\n ) : null}\n\n <PmTableCard\n eyebrow=\"Stock on hand\"\n title=\"Inventory batches\"\n subtitle={\n loading\n ? \"Loading…\"\n : hasFilter\n ? `${filteredItems.length} of ${items.length} ${items.length === 1 ? 'batch' : 'batches'} match`\n : `${items.length} ${items.length === 1 ? 'batch' : 'batches'} visible`\n }\n >\n <Stack direction={{ xs: 'column', md: 'row' }} spacing={1.5} sx={{ mb: 2 }} alignItems={{ md: 'center' }}>\n <TextField\n size=\"small\"\n fullWidth\n placeholder=\"Search product or lot…\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchRoundedIcon fontSize=\"small\" />\n </InputAdornment>\n ),\n }}\n sx={{ maxWidth: { md: 360 } }}\n />\n <FormControl size=\"small\" sx={{ minWidth: 160 }}>\n <InputLabel>Status</InputLabel>\n <Select\n label=\"Status\"\n value={statusFilter}\n onChange={(e) => {\n const next = e.target.value;\n setStatusFilter(next);\n // Picking a terminal status from the dropdown auto-clears the\n // opposing chip, so the filter pair can never resolve to an\n // empty set by construction.\n if (next === 'EXPIRED') setNotYetExpired(false);\n if (next === 'EXHAUSTED') setInStock(false);\n }}\n >\n <MenuItem value=\"ALL\">All statuses</MenuItem>\n {BATCH_STATUSES.map((s) => {\n const blocked = (s.value === 'EXPIRED' && notYetExpired) || (s.value === 'EXHAUSTED' && inStock);\n return (\n <MenuItem key={s.value} value={s.value} disabled={blocked}>\n {s.label}\n {blocked ? (\n <Typography component=\"span\" variant=\"caption\" color=\"text.disabled\" sx={{ ml: 1 }}>\n (clear chip first)\n </Typography>\n ) : null}\n </MenuItem>\n );\n })}\n </Select>\n </FormControl>\n <Stack direction=\"row\" spacing={1} useFlexGap flexWrap=\"wrap\">\n <Chip\n label=\"Not yet expired\"\n size=\"small\"\n disabled={statusFilter === 'EXPIRED'}\n onClick={() => {\n // Auto-reset the conflicting dropdown value so the two\n // controls never produce an impossible combination.\n setNotYetExpired((prev) => {\n const next = !prev;\n if (next && statusFilter === 'EXPIRED') setStatusFilter('ALL');\n return next;\n });\n }}\n color={notYetExpired ? 'primary' : 'default'}\n variant={notYetExpired ? 'filled' : 'outlined'}\n sx={{ fontWeight: 700, borderRadius: 1.5 }}\n />\n <Chip\n label=\"Stock still left\"\n size=\"small\"\n disabled={statusFilter === 'EXHAUSTED'}\n onClick={() => {\n setInStock((prev) => {\n const next = !prev;\n if (next && statusFilter === 'EXHAUSTED') setStatusFilter('ALL');\n return next;\n });\n }}\n color={inStock ? 'primary' : 'default'}\n variant={inStock ? 'filled' : 'outlined'}\n sx={{ fontWeight: 700, borderRadius: 1.5 }}\n />\n </Stack>\n <Box sx={{ flexGrow: 1 }} />\n <Button variant=\"text\" onClick={clearFilters} disabled={!hasFilter}>Clear</Button>\n </Stack>\n\n <PmTable dense>\n <TableHead>\n <TableRow>\n <TableCell>Product</TableCell>\n <TableCell>Lot</TableCell>\n <TableCell>Owner</TableCell>\n <TableCell>Expiry</TableCell>\n <TableCell align=\"right\">Stock</TableCell>\n <TableCell>Storage</TableCell>\n <TableCell>Status</TableCell>\n <TableCell align=\"right\">Action</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {loading ? (\n Array.from({ length: 5 }).map((_, i) => (\n <TableRow key={i}>\n {Array.from({ length: 8 }).map((__, j) => (\n <TableCell key={j}>\n <Skeleton height={22} />\n </TableCell>\n ))}\n </TableRow>\n ))\n ) : filteredItems.length === 0 ? (\n <PmEmptyRow\n colSpan={8}\n icon={WidgetsRoundedIcon}\n title={hasFilter ? 'No batches match your filters' : 'No batches in stock'}\n hint={hasFilter\n ? 'Adjust your search or filters.'\n : 'Record a purchase to add stock.'}\n action={hasFilter ? (\n <Button variant=\"text\" size=\"small\" onClick={clearFilters}>Clear filters</Button>\n ) : null}\n />\n ) : (\n filteredItems.map((b) => {\n const isExpired = isBatchExpired(b);\n const remainingRatio =\n b.qtyPurchased > 0 ? b.qtyRemaining / b.qtyPurchased : 0;\n return (\n <TableRow key={b.id} hover>\n <TableCell>\n <Stack\n direction=\"row\"\n alignItems=\"baseline\"\n spacing={1}\n sx={{ minWidth: 0 }}\n >\n <Typography\n variant=\"body2\"\n sx={{ fontWeight: 700, lineHeight: 1.2 }}\n >\n {b.productName}\n </Typography>\n <PmRef id={b.serialId} />\n </Stack>\n </TableCell>\n <TableCell>\n {b.lotNumber ? (\n <Box\n component=\"span\"\n sx={{\n display: \"inline-flex\",\n px: 0.7,\n py: 0.1,\n borderRadius: 1,\n bgcolor: alpha(theme.palette.primary.main, 0.06),\n color: \"primary.dark\",\n fontFamily: \"monospace\",\n fontSize: \"0.72rem\",\n fontWeight: 700,\n }}\n >\n {b.lotNumber}\n </Box>\n ) : (\n <Typography variant=\"caption\" color=\"text.disabled\">\n —\n </Typography>\n )}\n </TableCell>\n <TableCell>\n <Typography variant=\"body2\" sx={{ fontWeight: 700 }}>\n {b.ownerName || (b.ownerType === 'USER' ? 'Personal' : 'Facility')}\n </Typography>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {b.ownerType}\n </Typography>\n </TableCell>\n <TableCell>\n {b.expiryDate ? (\n <Tooltip\n title={isExpired ? \"Past printed expiry\" : \"\"}\n >\n <Typography\n variant=\"body2\"\n sx={{\n fontWeight: 700,\n fontVariantNumeric: \"tabular-nums\",\n color: isExpired\n ? \"error.dark\"\n : \"text.primary\",\n }}\n >\n {formatDate(b.expiryDate)}\n </Typography>\n </Tooltip>\n ) : (\n <Typography variant=\"caption\" color=\"text.disabled\">\n —\n </Typography>\n )}\n </TableCell>\n <TableCell align=\"right\" sx={{ minWidth: 150 }}>\n <Stack alignItems=\"flex-end\" spacing={0.5}>\n <Typography\n variant=\"body2\"\n sx={{\n fontWeight: 800,\n fontVariantNumeric: \"tabular-nums\",\n }}\n >\n {b.qtyRemaining}\n <Typography\n component=\"span\"\n variant=\"caption\"\n color=\"text.secondary\"\n sx={{\n ml: 0.5,\n fontVariantNumeric: \"tabular-nums\",\n }}\n >\n / {b.qtyPurchased}\n </Typography>\n </Typography>\n <Box sx={{ width: 80 }}>\n <LinearProgress\n variant=\"determinate\"\n value={Math.min(\n 100,\n Math.max(0, remainingRatio * 100),\n )}\n sx={{ height: 4, borderRadius: 2 }}\n color={\n remainingRatio < 0.25 ? \"warning\" : \"primary\"\n }\n />\n </Box>\n </Stack>\n </TableCell>\n <TableCell>\n {b.storageUnitName ? (\n <Typography\n variant=\"caption\"\n sx={{ fontWeight: 700 }}\n >\n {b.storageUnitName}\n </Typography>\n ) : (\n <Typography variant=\"caption\" color=\"text.disabled\">\n —\n </Typography>\n )}\n </TableCell>\n <TableCell>\n <Stack\n direction=\"row\"\n spacing={0.5}\n flexWrap=\"wrap\"\n useFlexGap\n >\n <Chip\n size=\"small\"\n color={statusColor(b.status)}\n label={labelOf(BATCH_STATUSES, b.status)}\n sx={{\n fontWeight: 700,\n borderRadius: 1.5,\n height: 22,\n }}\n />\n {b.isQuarantined ? (\n <Chip\n size=\"small\"\n color=\"error\"\n label={labelOf(QUARANTINE_REASONS, b.quarantineReason) || \"Quarantined\"}\n sx={{\n fontWeight: 700,\n borderRadius: 1.5,\n height: 22,\n }}\n />\n ) : null}\n {isExpired && b.status !== \"EXPIRED\" ? (\n <Chip\n size=\"small\"\n color=\"warning\"\n label=\"Expired\"\n sx={{\n fontWeight: 700,\n borderRadius: 1.5,\n height: 22,\n }}\n />\n ) : null}\n {b.sourceType ? (\n <Chip\n size=\"small\"\n variant=\"outlined\"\n color={\n b.sourceType === 'PICKUP' ? 'info'\n : b.sourceType === 'TRANSFER_IN' ? 'primary'\n : 'default'\n }\n label={b.sourceType === 'TRANSFER_IN' ? 'Transfer' : b.sourceType === 'PICKUP' ? 'Pickup' : b.sourceType === 'PURCHASE' ? 'Purchase' : b.sourceType}\n sx={{\n fontWeight: 700,\n borderRadius: 1.5,\n height: 22,\n }}\n />\n ) : null}\n </Stack>\n </TableCell>\n <TableCell align=\"right\">\n {!canWrite ? null : b.isQuarantined ? (\n <Button\n size=\"small\"\n variant=\"outlined\"\n color=\"success\"\n startIcon={<LockOpenRoundedIcon />}\n onClick={() => void doUnquarantine(b)}\n >\n Unquarantine\n </Button>\n ) : isExpired ||\n b.status === \"EXHAUSTED\" ||\n b.status === \"IN_USE\" ? null : (\n <Button\n size=\"small\"\n variant=\"outlined\"\n color=\"error\"\n startIcon={<LockRoundedIcon />}\n onClick={() =>\n setQuarantineDialog({\n open: true,\n batch: b,\n reason: \"OTHER\",\n notes: \"\",\n })\n }\n >\n Quarantine\n </Button>\n )}\n </TableCell>\n </TableRow>\n );\n })\n )}\n </TableBody>\n </PmTable>\n </PmTableCard>\n </PmPageShell>\n\n <Dialog\n open={quarantineDialog.open}\n onClose={() =>\n setQuarantineDialog({ ...quarantineDialog, open: false })\n }\n fullWidth\n maxWidth=\"sm\"\n >\n <DialogTitle>Quarantine Batch</DialogTitle>\n <DialogContent dividers>\n <Stack spacing={2} sx={{ pt: 1 }}>\n <Typography variant=\"body2\">\n Product: <strong>{quarantineDialog.batch?.productName}</strong>\n <br />\n Lot: <strong>{quarantineDialog.batch?.lotNumber || \"—\"}</strong>\n <br />\n Remaining: <strong>{quarantineDialog.batch?.qtyRemaining}</strong>\n </Typography>\n <PmSelect\n label=\"Reason\"\n required\n value={quarantineDialog.reason}\n onChange={(v) =>\n setQuarantineDialog({ ...quarantineDialog, reason: v })\n }\n options={QUARANTINE_REASONS}\n error={!!validateRequired(quarantineDialog.reason, \"Reason\")}\n helperText={validateRequired(quarantineDialog.reason, \"Reason\") || \"\"}\n />\n <TextField\n label=\"Notes\"\n size=\"small\"\n multiline\n minRows={2}\n fullWidth\n value={quarantineDialog.notes}\n onChange={(e) =>\n setQuarantineDialog({\n ...quarantineDialog,\n notes: e.target.value,\n })\n }\n />\n </Stack>\n </DialogContent>\n <DialogActions>\n <Button\n onClick={() =>\n setQuarantineDialog({ ...quarantineDialog, open: false })\n }\n >\n Cancel\n </Button>\n <Button\n variant=\"contained\"\n color=\"error\"\n disabled={!!validateRequired(quarantineDialog.reason, \"Reason\")}\n onClick={() => void doQuarantine()}\n >\n Quarantine\n </Button>\n </DialogActions>\n </Dialog>\n </PmGuard>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoDA,SAAS,EAAe,GAAG;CAGzB,OAFK,IACD,EAAE,WAAW,YAAkB,KAC5B,EAAa,EAAE,UAAU,IAFjB;AAGjB;AAEA,SAAwB,IAAgB;CAEtC,IAAM,IADQ,GACG,EAAM,IAAI,2CAA2C,GAChE,CAAC,GAAO,MAAY,EAAS,CAAC,CAAC,GAC/B,CAAC,GAAS,KAAc,EAAS,EAAK,GACtC,CAAC,GAAO,KAAY,EAAS,EAAE,GAC/B,CAAC,GAAkB,KAAuB,EAAS;EACvD,MAAM;EACN,OAAO;EACP,QAAQ;EACR,OAAO;CACT,CAAC,GACK,KAAQ,EAAS,GACjB,CAAC,GAAQ,KAAa,EAAS,EAAE,GACjC,CAAC,GAAc,KAAmB,EAAS,KAAK,GAGhD,CAAC,GAAe,KAAoB,EAAS,EAAK,GAClD,CAAC,GAAS,KAAc,EAAS,EAAK;CAE5C,eAAe,IAAO;EAEpB,AADA,EAAW,EAAI,GACf,EAAS,EAAE;EACX,IAAI;GACF,GAAS,MAAM,EAAY,CAAC;EAC9B,SAAS,GAAK;GACZ,IAAM,IACJ,GAAK,UAAU,MAAM,WACrB,GAAK,WACL;GAEF,AADA,EAAS,CAAO,GAChB,EAAU;IAAE;IAAS,MAAM;GAAQ,CAAC;EACtC,UAAU;GACR,EAAW,EAAK;EAClB;CACF;CAEA,GAAsB,iDAAiD;EACrE,EAAU;CACZ,GAAG,CAAC,CAAC;CAKL,IAAM,IAAgB,SAAc;EAClC,IAAM,IAAI,EAAO,KAAK,EAAE,YAAY;EACpC,OAAO,EAAM,QAAQ,MAOnB,EANI,KAEE,CADQ,GAAG,EAAE,eAAe,GAAG,GAAG,EAAE,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