@argusoft/medplat-product-management 1.0.3 → 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-NSvaMXWg.js → BrandsPage-BE3kn-8b.js} +79 -78
- package/dist/{BrandsPage-NSvaMXWg.js.map → BrandsPage-BE3kn-8b.js.map} +1 -1
- package/dist/{CategoriesPage-aZBZrDOi.js → CategoriesPage-COqi3pMi.js} +70 -69
- package/dist/{CategoriesPage-aZBZrDOi.js.map → CategoriesPage-COqi3pMi.js.map} +1 -1
- package/dist/{DashboardPage-DjwlOhrd.js → DashboardPage-C_H1Jrey.js} +91 -90
- package/dist/{DashboardPage-DjwlOhrd.js.map → DashboardPage-C_H1Jrey.js.map} +1 -1
- package/dist/{FacilityPicker-Chh-ZaR0.js → FacilityPicker-Diq2hnYg.js} +2 -2
- package/dist/{FacilityPicker-Chh-ZaR0.js.map → FacilityPicker-Diq2hnYg.js.map} +1 -1
- package/dist/{InventoryPage-cy76UsMp.js → InventoryPage-Bjpw6vTz.js} +113 -112
- package/dist/{InventoryPage-cy76UsMp.js.map → InventoryPage-Bjpw6vTz.js.map} +1 -1
- package/dist/{MemberProfileCard-CinPt09F.js → MemberProfileCard-BLUVRILO.js} +6 -5
- package/dist/{MemberProfileCard-CinPt09F.js.map → MemberProfileCard-BLUVRILO.js.map} +1 -1
- package/dist/{PaymentCreatePage-BJe3LyFF.js → PaymentCreatePage-B5VOgTx9.js} +125 -124
- package/dist/{PaymentCreatePage-BJe3LyFF.js.map → PaymentCreatePage-B5VOgTx9.js.map} +1 -1
- package/dist/{PaymentsPage-DxHoKksN.js → PaymentsPage-DY6BclkN.js} +21 -20
- package/dist/{PaymentsPage-DxHoKksN.js.map → PaymentsPage-DY6BclkN.js.map} +1 -1
- package/dist/{PickupCreatePage-Cq8zJ62Y.js → PickupCreatePage-CCSiyFQF.js} +63 -62
- package/dist/{PickupCreatePage-Cq8zJ62Y.js.map → PickupCreatePage-CCSiyFQF.js.map} +1 -1
- package/dist/{PickupsPage-BOygBQAb.js → PickupsPage-DGi6T5Of.js} +42 -41
- package/dist/{PickupsPage-BOygBQAb.js.map → PickupsPage-DGi6T5Of.js.map} +1 -1
- package/dist/PmGuard-C90yhpsN.js +592 -0
- package/dist/PmGuard-C90yhpsN.js.map +1 -0
- package/dist/{PmTable-CCpaJEA_.js → PmTable-BkK65bJQ.js} +96 -96
- package/dist/{PmTable-CCpaJEA_.js.map → PmTable-BkK65bJQ.js.map} +1 -1
- package/dist/{ProductEditPage-DmdHO-fS.js → ProductEditPage-CQj9egzW.js} +130 -129
- package/dist/{ProductEditPage-DmdHO-fS.js.map → ProductEditPage-CQj9egzW.js.map} +1 -1
- package/dist/{ProductsPage-BglMe8EM.js → ProductsPage-i8QVw_Jm.js} +64 -63
- package/dist/{ProductsPage-BglMe8EM.js.map → ProductsPage-i8QVw_Jm.js.map} +1 -1
- package/dist/{PurchaseCreatePage-1tYk41RS.js → PurchaseCreatePage-Bp6bl9n8.js} +120 -119
- package/dist/{PurchaseCreatePage-1tYk41RS.js.map → PurchaseCreatePage-Bp6bl9n8.js.map} +1 -1
- package/dist/{PurchaseRequestDetailPage-BYLx3aBI.js → PurchaseRequestDetailPage-CNAqIFef.js} +216 -215
- package/dist/{PurchaseRequestDetailPage-BYLx3aBI.js.map → PurchaseRequestDetailPage-CNAqIFef.js.map} +1 -1
- package/dist/{PurchaseRequestsPage-D2yorc4s.js → PurchaseRequestsPage-BJqDlNrc.js} +57 -56
- package/dist/{PurchaseRequestsPage-D2yorc4s.js.map → PurchaseRequestsPage-BJqDlNrc.js.map} +1 -1
- package/dist/{PurchasesPage-CanQTjlw.js → PurchasesPage-BQEToymQ.js} +76 -75
- package/dist/{PurchasesPage-CanQTjlw.js.map → PurchasesPage-BQEToymQ.js.map} +1 -1
- package/dist/{SaleCreatePage-DxFvPvju.js → SaleCreatePage-DbfBK4PH.js} +89 -88
- package/dist/{SaleCreatePage-DxFvPvju.js.map → SaleCreatePage-DbfBK4PH.js.map} +1 -1
- package/dist/{SalesPage-CPMrdr5-.js → SalesPage-CTBJMxZe.js} +46 -45
- package/dist/{SalesPage-CPMrdr5-.js.map → SalesPage-CTBJMxZe.js.map} +1 -1
- package/dist/{SettingsPage-CEy922rW.js → SettingsPage-CiwVmzM3.js} +47 -46
- package/dist/{SettingsPage-CEy922rW.js.map → SettingsPage-CiwVmzM3.js.map} +1 -1
- package/dist/{StorageUnitsPage-DfLT6xC_.js → StorageUnitsPage-BV7nK_iE.js} +55 -54
- package/dist/{StorageUnitsPage-DfLT6xC_.js.map → StorageUnitsPage-BV7nK_iE.js.map} +1 -1
- package/dist/{TransactionsPage-KFUJ4O5g.js → TransactionsPage-Cocn4901.js} +54 -53
- package/dist/{TransactionsPage-KFUJ4O5g.js.map → TransactionsPage-Cocn4901.js.map} +1 -1
- package/dist/{TransferCreatePage-k1tsRGB3.js → TransferCreatePage-DbjcjuOg.js} +74 -73
- package/dist/{TransferCreatePage-k1tsRGB3.js.map → TransferCreatePage-DbjcjuOg.js.map} +1 -1
- package/dist/{TransfersPage-CDafSVO9.js → TransfersPage-BFVF7Xvc.js} +108 -107
- package/dist/{TransfersPage-CDafSVO9.js.map → TransfersPage-BFVF7Xvc.js.map} +1 -1
- 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/VialsPage-DPsYFgaQ.js +0 -897
- package/dist/VialsPage-DPsYFgaQ.js.map +0 -1
- package/dist/currency-bVQ7aEk2.js +0 -1007
- package/dist/currency-bVQ7aEk2.js.map +0 -1
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { Alert as
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
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";
|
|
8
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
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__ */ m
|
|
98
|
+
return /* @__PURE__ */ p(m, { children: [/* @__PURE__ */ f(oe, {}), /* @__PURE__ */ p(ce, {
|
|
98
99
|
perm: "view.manage.productManagement.inventory",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
104
|
+
actions: /* @__PURE__ */ f(b, {
|
|
104
105
|
direction: "row",
|
|
105
106
|
spacing: 1,
|
|
106
|
-
children: /* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ f(h, {
|
|
107
108
|
variant: "outlined",
|
|
108
|
-
startIcon: /* @__PURE__ */
|
|
109
|
+
startIcon: /* @__PURE__ */ f(A, {}),
|
|
109
110
|
onClick: () => void X(),
|
|
110
111
|
children: "Refresh"
|
|
111
112
|
})
|
|
112
113
|
}),
|
|
113
|
-
children: [R ? /* @__PURE__ */
|
|
114
|
+
children: [R ? /* @__PURE__ */ f(ue, {
|
|
114
115
|
severity: "error",
|
|
115
116
|
sx: { mb: 2 },
|
|
116
117
|
children: R
|
|
117
|
-
}) : null, /* @__PURE__ */
|
|
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__ */
|
|
122
|
+
children: [/* @__PURE__ */ p(b, {
|
|
122
123
|
direction: {
|
|
123
124
|
xs: "column",
|
|
124
125
|
md: "row"
|
|
@@ -127,37 +128,37 @@ function F() {
|
|
|
127
128
|
sx: { mb: 2 },
|
|
128
129
|
alignItems: { md: "center" },
|
|
129
130
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ f(C, {
|
|
131
132
|
size: "small",
|
|
132
133
|
fullWidth: !0,
|
|
133
134
|
placeholder: "Search product or lot…",
|
|
134
135
|
value: H,
|
|
135
136
|
onChange: (e) => U(e.target.value),
|
|
136
|
-
InputProps: { startAdornment: /* @__PURE__ */
|
|
137
|
+
InputProps: { startAdornment: /* @__PURE__ */ f(he, {
|
|
137
138
|
position: "start",
|
|
138
|
-
children: /* @__PURE__ */
|
|
139
|
+
children: /* @__PURE__ */ f(xe, { fontSize: "small" })
|
|
139
140
|
}) },
|
|
140
141
|
sx: { maxWidth: { md: 360 } }
|
|
141
142
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ p(me, {
|
|
143
144
|
size: "small",
|
|
144
145
|
sx: { minWidth: 160 },
|
|
145
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
158
|
+
return /* @__PURE__ */ p(y, {
|
|
158
159
|
value: e.value,
|
|
159
160
|
disabled: t,
|
|
160
|
-
children: [e.label, t ? /* @__PURE__ */
|
|
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__ */
|
|
172
|
+
/* @__PURE__ */ p(b, {
|
|
172
173
|
direction: "row",
|
|
173
174
|
spacing: 1,
|
|
174
175
|
useFlexGap: !0,
|
|
175
176
|
flexWrap: "wrap",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
211
|
-
/* @__PURE__ */
|
|
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__ */
|
|
219
|
+
}), /* @__PURE__ */ p(ne, {
|
|
219
220
|
dense: !0,
|
|
220
|
-
children: [/* @__PURE__ */
|
|
221
|
-
/* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
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__ */
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
249
|
+
return /* @__PURE__ */ p(S, {
|
|
249
250
|
hover: !0,
|
|
250
251
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
264
|
+
}), /* @__PURE__ */ f(r, { id: e.serialId })]
|
|
264
265
|
}) }),
|
|
265
|
-
/* @__PURE__ */
|
|
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__ */
|
|
280
|
+
}) : /* @__PURE__ */ f(T, {
|
|
280
281
|
variant: "caption",
|
|
281
282
|
color: "text.disabled",
|
|
282
283
|
children: "—"
|
|
283
284
|
}) }),
|
|
284
|
-
/* @__PURE__ */
|
|
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__ */
|
|
289
|
+
}), /* @__PURE__ */ f(T, {
|
|
289
290
|
variant: "caption",
|
|
290
291
|
color: "text.secondary",
|
|
291
292
|
children: e.ownerType
|
|
292
293
|
})] }),
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ f(x, { children: e.expiryDate ? /* @__PURE__ */ f(w, {
|
|
294
295
|
title: t ? "Past printed expiry" : "",
|
|
295
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
305
|
+
}) : /* @__PURE__ */ f(T, {
|
|
305
306
|
variant: "caption",
|
|
306
307
|
color: "text.disabled",
|
|
307
308
|
children: "—"
|
|
308
309
|
}) }),
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ f(x, {
|
|
310
311
|
align: "right",
|
|
311
312
|
sx: { minWidth: 150 },
|
|
312
|
-
children: /* @__PURE__ */
|
|
313
|
+
children: /* @__PURE__ */ p(b, {
|
|
313
314
|
alignItems: "flex-end",
|
|
314
315
|
spacing: .5,
|
|
315
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
322
|
+
children: [e.qtyRemaining, /* @__PURE__ */ p(T, {
|
|
322
323
|
component: "span",
|
|
323
324
|
variant: "caption",
|
|
324
325
|
color: "text.secondary",
|
|
@@ -328,9 +329,9 @@ function F() {
|
|
|
328
329
|
},
|
|
329
330
|
children: ["/ ", e.qtyPurchased]
|
|
330
331
|
})]
|
|
331
|
-
}), /* @__PURE__ */
|
|
332
|
+
}), /* @__PURE__ */ f(m, {
|
|
332
333
|
sx: { width: 80 },
|
|
333
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ f(ge, {
|
|
334
335
|
variant: "determinate",
|
|
335
336
|
value: Math.min(100, Math.max(0, n * 100)),
|
|
336
337
|
sx: {
|
|
@@ -342,42 +343,42 @@ function F() {
|
|
|
342
343
|
})]
|
|
343
344
|
})
|
|
344
345
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
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__ */
|
|
350
|
+
}) : /* @__PURE__ */ f(T, {
|
|
350
351
|
variant: "caption",
|
|
351
352
|
color: "text.disabled",
|
|
352
353
|
children: "—"
|
|
353
354
|
}) }),
|
|
354
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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,20 +401,20 @@ function F() {
|
|
|
400
401
|
}) : null
|
|
401
402
|
]
|
|
402
403
|
}) }),
|
|
403
|
-
/* @__PURE__ */
|
|
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
|
-
startIcon: /* @__PURE__ */
|
|
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__ */
|
|
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",
|
|
416
|
-
startIcon: /* @__PURE__ */
|
|
417
|
+
startIcon: /* @__PURE__ */ f(M, {}),
|
|
417
418
|
onClick: () => V({
|
|
418
419
|
open: !0,
|
|
419
420
|
batch: e,
|
|
@@ -428,7 +429,7 @@ function F() {
|
|
|
428
429
|
}) })]
|
|
429
430
|
})]
|
|
430
431
|
})]
|
|
431
|
-
}), /* @__PURE__ */
|
|
432
|
+
}), /* @__PURE__ */ p(de, {
|
|
432
433
|
open: B.open,
|
|
433
434
|
onClose: () => V({
|
|
434
435
|
...B,
|
|
@@ -437,27 +438,27 @@ function F() {
|
|
|
437
438
|
fullWidth: !0,
|
|
438
439
|
maxWidth: "sm",
|
|
439
440
|
children: [
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ f(pe, { children: "Quarantine Batch" }),
|
|
442
|
+
/* @__PURE__ */ f(fe, {
|
|
442
443
|
dividers: !0,
|
|
443
|
-
children: /* @__PURE__ */
|
|
444
|
+
children: /* @__PURE__ */ p(b, {
|
|
444
445
|
spacing: 2,
|
|
445
446
|
sx: { pt: 1 },
|
|
446
447
|
children: [
|
|
447
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ p(T, {
|
|
448
449
|
variant: "body2",
|
|
449
450
|
children: [
|
|
450
451
|
"Product: ",
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ f("strong", { children: B.batch?.productName }),
|
|
453
|
+
/* @__PURE__ */ f("br", {}),
|
|
453
454
|
"Lot: ",
|
|
454
|
-
/* @__PURE__ */
|
|
455
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ f("strong", { children: B.batch?.lotNumber || "—" }),
|
|
456
|
+
/* @__PURE__ */ f("br", {}),
|
|
456
457
|
"Remaining: ",
|
|
457
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ f("strong", { children: B.batch?.qtyRemaining })
|
|
458
459
|
]
|
|
459
460
|
}),
|
|
460
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ f(te, {
|
|
461
462
|
label: "Reason",
|
|
462
463
|
required: !0,
|
|
463
464
|
value: B.reason,
|
|
@@ -465,11 +466,11 @@ function F() {
|
|
|
465
466
|
...B,
|
|
466
467
|
reason: e
|
|
467
468
|
}),
|
|
468
|
-
options:
|
|
469
|
-
error: !!
|
|
470
|
-
helperText:
|
|
469
|
+
options: i,
|
|
470
|
+
error: !!l(B.reason, "Reason"),
|
|
471
|
+
helperText: l(B.reason, "Reason") || ""
|
|
471
472
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ f(C, {
|
|
473
474
|
label: "Notes",
|
|
474
475
|
size: "small",
|
|
475
476
|
multiline: !0,
|
|
@@ -484,16 +485,16 @@ function F() {
|
|
|
484
485
|
]
|
|
485
486
|
})
|
|
486
487
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ p(_, { children: [/* @__PURE__ */ f(h, {
|
|
488
489
|
onClick: () => V({
|
|
489
490
|
...B,
|
|
490
491
|
open: !1
|
|
491
492
|
}),
|
|
492
493
|
children: "Cancel"
|
|
493
|
-
}), /* @__PURE__ */
|
|
494
|
+
}), /* @__PURE__ */ f(h, {
|
|
494
495
|
variant: "contained",
|
|
495
496
|
color: "error",
|
|
496
|
-
disabled: !!
|
|
497
|
+
disabled: !!l(B.reason, "Reason"),
|
|
497
498
|
onClick: () => void we(),
|
|
498
499
|
children: "Quarantine"
|
|
499
500
|
})] })
|
|
@@ -504,4 +505,4 @@ function F() {
|
|
|
504
505
|
//#endregion
|
|
505
506
|
export { F as default };
|
|
506
507
|
|
|
507
|
-
//# sourceMappingURL=InventoryPage-
|
|
508
|
+
//# sourceMappingURL=InventoryPage-Bjpw6vTz.js.map
|