@argusoft/medplat-product-management 1.0.1 → 1.0.2
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/PickupCreatePage-CMGwoAXj.js +426 -0
- package/dist/PickupCreatePage-CMGwoAXj.js.map +1 -0
- package/dist/{PickupsPage-DCEr0LHK.js → PickupsPage-D66_Wta4.js} +144 -108
- package/dist/PickupsPage-D66_Wta4.js.map +1 -0
- package/dist/{PurchaseCreatePage-Dcsg4uoB.js → PurchaseCreatePage-CDfNDcKG.js} +138 -137
- package/dist/PurchaseCreatePage-CDfNDcKG.js.map +1 -0
- package/dist/{VialsPage-CcbY4v6H.js → VialsPage-BNPUwGCU.js} +291 -224
- package/dist/VialsPage-BNPUwGCU.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/PickupCreatePage-CE-oCXD_.js +0 -310
- package/dist/PickupCreatePage-CE-oCXD_.js.map +0 -1
- package/dist/PickupsPage-DCEr0LHK.js.map +0 -1
- package/dist/PurchaseCreatePage-Dcsg4uoB.js.map +0 -1
- package/dist/VialsPage-CcbY4v6H.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { U as e, a as t, i as ee, n as te, nt as ne, o as re, r as ie, tt as ae } from "./currency-ClRLIEg2.js";
|
|
2
2
|
import { a as oe, c as se, s as ce, t as le } from "./PmTable-B9970kPY.js";
|
|
3
|
-
import { n
|
|
4
|
-
import { f as
|
|
5
|
-
import { useMemo as
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { v4 as
|
|
8
|
-
import { Alert as
|
|
3
|
+
import { n, t as ue } from "./format-UOyOu75i.js";
|
|
4
|
+
import { f as de, p as fe, r as pe } from "./constants-5ZCZo-Zm.js";
|
|
5
|
+
import { useMemo as me, useState as r } from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
import { v4 as he } from "uuid";
|
|
8
|
+
import { Alert as o, Box as s, Button as c, Chip as l, Dialog as u, DialogActions as d, DialogContent as f, DialogTitle as ge, FormControl as _e, FormHelperText as ve, InputAdornment as ye, InputLabel as be, MenuItem as p, Select as xe, Skeleton as Se, Stack as m, TableBody as Ce, TableCell as h, TableHead as we, TableRow as g, TextField as _, Typography as v } from "@mui/material";
|
|
9
9
|
import y from "@mui/icons-material/AddRounded";
|
|
10
10
|
import Te from "@mui/icons-material/RefreshRounded";
|
|
11
11
|
import { showToast as b } from "@/common/toaster/toaster";
|
|
@@ -24,20 +24,20 @@ function Ae(e) {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
function S() {
|
|
27
|
-
let S = Ee(), C = t().has("update.manage.productManagement.pickup"), [w, je] =
|
|
27
|
+
let S = Ee(), C = t().has("update.manage.productManagement.pickup"), [w, je] = r([]), [T, E] = r(!0), [D, O] = r(""), [k, Me] = r(""), [A, j] = r({
|
|
28
28
|
open: !1,
|
|
29
29
|
pickup: null
|
|
30
|
-
}), [M, N] =
|
|
30
|
+
}), [M, N] = r({
|
|
31
31
|
returnedQty: "",
|
|
32
32
|
wastageReason: "",
|
|
33
33
|
notes: ""
|
|
34
|
-
}), [P, F] =
|
|
34
|
+
}), [P, F] = r({
|
|
35
35
|
open: !1,
|
|
36
36
|
pickup: null
|
|
37
|
-
}), [I, L] =
|
|
37
|
+
}), [I, L] = r({
|
|
38
38
|
additionalQty: "",
|
|
39
39
|
notes: ""
|
|
40
|
-
}), [R, z] =
|
|
40
|
+
}), [R, z] = r(!1);
|
|
41
41
|
async function B() {
|
|
42
42
|
E(!0), O("");
|
|
43
43
|
try {
|
|
@@ -55,9 +55,9 @@ function S() {
|
|
|
55
55
|
ee("view.manage.productManagement.pickup", () => {
|
|
56
56
|
B();
|
|
57
57
|
}, []);
|
|
58
|
-
let V =
|
|
58
|
+
let V = me(() => {
|
|
59
59
|
let e = k.trim().toLowerCase();
|
|
60
|
-
return e ? w.filter((t) => `${t.productName ?? ""} ${t.facilityName ?? ""} ${t.userName ?? ""} ${t.lotNumber ?? ""} ${t.notes ?? ""}`.toLowerCase().includes(e)) : w;
|
|
60
|
+
return e ? w.filter((t) => `${t.sessionName ?? ""} ${t.sessionSite ?? ""} ${t.productName ?? ""} ${t.facilityName ?? ""} ${t.userName ?? ""} ${t.lotNumber ?? ""} ${t.notes ?? ""}`.toLowerCase().includes(e)) : w;
|
|
61
61
|
}, [w, k]);
|
|
62
62
|
function Ne(e) {
|
|
63
63
|
let t = e.expectedRemainingQty ?? 0;
|
|
@@ -97,7 +97,7 @@ function S() {
|
|
|
97
97
|
z(!0);
|
|
98
98
|
try {
|
|
99
99
|
await ne(P.pickup.id, {
|
|
100
|
-
id:
|
|
100
|
+
id: he(),
|
|
101
101
|
additionalQty: G,
|
|
102
102
|
notes: I.notes || null
|
|
103
103
|
}), b({
|
|
@@ -137,92 +137,124 @@ function S() {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
return /* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ a(s, { children: [
|
|
141
|
+
/* @__PURE__ */ i(ie, {}),
|
|
142
|
+
/* @__PURE__ */ i(te, {
|
|
143
143
|
perm: "view.manage.productManagement.pickup",
|
|
144
|
-
children: /* @__PURE__ */
|
|
144
|
+
children: /* @__PURE__ */ a(re, {
|
|
145
145
|
title: "Stock Pickups",
|
|
146
146
|
subtitle: "Stock you're carrying for field work. Record returns and any items lost or used.",
|
|
147
|
-
actions: /* @__PURE__ */
|
|
147
|
+
actions: /* @__PURE__ */ a(m, {
|
|
148
148
|
direction: "row",
|
|
149
149
|
spacing: 1,
|
|
150
|
-
children: [/* @__PURE__ */
|
|
150
|
+
children: [/* @__PURE__ */ i(c, {
|
|
151
151
|
variant: "outlined",
|
|
152
|
-
startIcon: /* @__PURE__ */
|
|
152
|
+
startIcon: /* @__PURE__ */ i(Te, {}),
|
|
153
153
|
onClick: () => void B(),
|
|
154
154
|
children: "Refresh"
|
|
155
|
-
}), C ? /* @__PURE__ */
|
|
155
|
+
}), C ? /* @__PURE__ */ i(c, {
|
|
156
156
|
variant: "contained",
|
|
157
|
-
startIcon: /* @__PURE__ */
|
|
157
|
+
startIcon: /* @__PURE__ */ i(y, {}),
|
|
158
158
|
onClick: () => S("/ui/medplat/manage/pm/pickups/new"),
|
|
159
159
|
children: "New Pickup"
|
|
160
160
|
}) : null]
|
|
161
161
|
}),
|
|
162
|
-
children: [D ? /* @__PURE__ */
|
|
162
|
+
children: [D ? /* @__PURE__ */ i(o, {
|
|
163
163
|
severity: "error",
|
|
164
164
|
sx: { mb: 2 },
|
|
165
165
|
children: D
|
|
166
|
-
}) : null, /* @__PURE__ */
|
|
166
|
+
}) : null, /* @__PURE__ */ a(se, {
|
|
167
167
|
eyebrow: "Operations",
|
|
168
168
|
title: "Pickups",
|
|
169
169
|
subtitle: T ? "Loading…" : `${V.length} ${V.length === 1 ? "pickup" : "pickups"}`,
|
|
170
|
-
children: [/* @__PURE__ */
|
|
170
|
+
children: [/* @__PURE__ */ i(m, {
|
|
171
171
|
direction: {
|
|
172
172
|
xs: "column",
|
|
173
173
|
md: "row"
|
|
174
174
|
},
|
|
175
175
|
spacing: 1.5,
|
|
176
176
|
sx: { mb: 2 },
|
|
177
|
-
children: /* @__PURE__ */
|
|
177
|
+
children: /* @__PURE__ */ i(_, {
|
|
178
178
|
size: "small",
|
|
179
179
|
fullWidth: !0,
|
|
180
180
|
placeholder: "Search by product, facility, user, lot, notes…",
|
|
181
181
|
value: k,
|
|
182
182
|
onChange: (e) => Me(e.target.value),
|
|
183
|
-
InputProps: { startAdornment: /* @__PURE__ */
|
|
183
|
+
InputProps: { startAdornment: /* @__PURE__ */ i(ye, {
|
|
184
184
|
position: "start",
|
|
185
|
-
children: /* @__PURE__ */
|
|
185
|
+
children: /* @__PURE__ */ i(Oe, { fontSize: "small" })
|
|
186
186
|
}) }
|
|
187
187
|
})
|
|
188
|
-
}), /* @__PURE__ */
|
|
188
|
+
}), /* @__PURE__ */ a(ce, {
|
|
189
189
|
dense: !0,
|
|
190
|
-
children: [/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ i(we, { children: /* @__PURE__ */ a(g, { children: [
|
|
191
|
+
/* @__PURE__ */ i(h, { children: "Ref" }),
|
|
192
|
+
/* @__PURE__ */ i(h, { children: "Session" }),
|
|
193
|
+
/* @__PURE__ */ i(h, { children: "Product" }),
|
|
194
|
+
/* @__PURE__ */ i(h, { children: "Facility" }),
|
|
195
|
+
/* @__PURE__ */ i(h, { children: "User" }),
|
|
196
|
+
/* @__PURE__ */ i(h, {
|
|
196
197
|
align: "right",
|
|
197
198
|
children: "Qty"
|
|
198
199
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ i(h, { children: "Picked" }),
|
|
201
|
+
/* @__PURE__ */ i(h, { children: "Status" }),
|
|
202
|
+
/* @__PURE__ */ i(h, {
|
|
202
203
|
align: "right",
|
|
203
204
|
children: "Action"
|
|
204
205
|
})
|
|
205
|
-
] }) }), /* @__PURE__ */
|
|
206
|
-
colSpan:
|
|
206
|
+
] }) }), /* @__PURE__ */ i(Ce, { children: T ? Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ i(g, { children: Array.from({ length: 9 }).map((e, t) => /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(Se, { height: 22 }) }, t)) }, t)) : V.length === 0 ? /* @__PURE__ */ i(le, {
|
|
207
|
+
colSpan: 9,
|
|
207
208
|
icon: De,
|
|
208
209
|
title: k.trim() === "" ? "No pickups yet" : "No pickups match your search",
|
|
209
210
|
hint: "Check out stock from a facility to use in the field.",
|
|
210
|
-
action: C ? /* @__PURE__ */
|
|
211
|
+
action: C ? /* @__PURE__ */ i(c, {
|
|
211
212
|
variant: "contained",
|
|
212
213
|
size: "small",
|
|
213
|
-
startIcon: /* @__PURE__ */
|
|
214
|
+
startIcon: /* @__PURE__ */ i(y, {}),
|
|
214
215
|
onClick: () => S("/ui/medplat/manage/pm/pickups/new"),
|
|
215
216
|
children: "Record first pickup"
|
|
216
217
|
}) : null
|
|
217
|
-
}) : V.map((e) => /* @__PURE__ */
|
|
218
|
+
}) : V.map((e) => /* @__PURE__ */ a(g, {
|
|
218
219
|
hover: !0,
|
|
219
220
|
children: [
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(oe, { id: e.serialId }) }),
|
|
222
|
+
/* @__PURE__ */ a(h, {
|
|
223
|
+
sx: { maxWidth: 220 },
|
|
224
|
+
children: [
|
|
225
|
+
/* @__PURE__ */ i(v, {
|
|
226
|
+
variant: "body2",
|
|
227
|
+
sx: {
|
|
228
|
+
fontWeight: 700,
|
|
229
|
+
wordBreak: "break-word"
|
|
230
|
+
},
|
|
231
|
+
children: e.sessionName ?? "—"
|
|
232
|
+
}),
|
|
233
|
+
e.sessionSite ? /* @__PURE__ */ i(v, {
|
|
234
|
+
variant: "caption",
|
|
235
|
+
color: "text.secondary",
|
|
236
|
+
sx: {
|
|
237
|
+
display: "block",
|
|
238
|
+
wordBreak: "break-word"
|
|
239
|
+
},
|
|
240
|
+
children: e.sessionSite
|
|
241
|
+
}) : null,
|
|
242
|
+
e.sessionStartTime ? /* @__PURE__ */ a(v, {
|
|
243
|
+
variant: "caption",
|
|
244
|
+
color: "text.secondary",
|
|
245
|
+
sx: {
|
|
246
|
+
display: "block",
|
|
247
|
+
fontVariantNumeric: "tabular-nums"
|
|
248
|
+
},
|
|
249
|
+
children: [n(e.sessionStartTime), e.sessionExpectedEndTime ? ` → ${n(e.sessionExpectedEndTime)}` : ""]
|
|
250
|
+
}) : null
|
|
251
|
+
]
|
|
252
|
+
}),
|
|
253
|
+
/* @__PURE__ */ a(h, { children: [/* @__PURE__ */ i(v, {
|
|
222
254
|
variant: "body2",
|
|
223
255
|
sx: { fontWeight: 700 },
|
|
224
256
|
children: e.productName ?? "—"
|
|
225
|
-
}), e.lotNumber ? /* @__PURE__ */
|
|
257
|
+
}), e.lotNumber ? /* @__PURE__ */ i(v, {
|
|
226
258
|
variant: "caption",
|
|
227
259
|
sx: {
|
|
228
260
|
fontFamily: "monospace",
|
|
@@ -230,21 +262,21 @@ function S() {
|
|
|
230
262
|
},
|
|
231
263
|
children: e.lotNumber
|
|
232
264
|
}) : null] }),
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ i(h, { children: e.facilityName ?? "—" }),
|
|
266
|
+
/* @__PURE__ */ i(h, { children: e.userName ?? "—" }),
|
|
267
|
+
/* @__PURE__ */ a(h, {
|
|
236
268
|
align: "right",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ i(v, {
|
|
238
270
|
sx: {
|
|
239
271
|
fontWeight: 700,
|
|
240
272
|
fontVariantNumeric: "tabular-nums"
|
|
241
273
|
},
|
|
242
274
|
children: e.pickedQty
|
|
243
|
-
}), e.status === "OPEN" && e.expectedRemainingQty != null ? /* @__PURE__ */
|
|
275
|
+
}), e.status === "OPEN" && e.expectedRemainingQty != null ? /* @__PURE__ */ a(v, {
|
|
244
276
|
variant: "caption",
|
|
245
277
|
color: "text.secondary",
|
|
246
278
|
children: [e.expectedRemainingQty, " left on user"]
|
|
247
|
-
}) : e.status === "RETURNED" ? /* @__PURE__ */
|
|
279
|
+
}) : e.status === "RETURNED" ? /* @__PURE__ */ a(v, {
|
|
248
280
|
variant: "caption",
|
|
249
281
|
color: "text.secondary",
|
|
250
282
|
children: [
|
|
@@ -254,35 +286,39 @@ function S() {
|
|
|
254
286
|
]
|
|
255
287
|
}) : null]
|
|
256
288
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(v, {
|
|
258
290
|
variant: "body2",
|
|
259
|
-
children:
|
|
291
|
+
children: ue(e.pickedOn)
|
|
260
292
|
}) }),
|
|
261
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ i(h, { children: e.status === "OPEN" && e.sessionExpectedEndTime && new Date(e.sessionExpectedEndTime).getTime() < Date.now() ? /* @__PURE__ */ i(l, {
|
|
294
|
+
size: "small",
|
|
295
|
+
label: "Overdue",
|
|
296
|
+
color: "error"
|
|
297
|
+
}) : /* @__PURE__ */ i(l, {
|
|
262
298
|
size: "small",
|
|
263
|
-
label: pe
|
|
299
|
+
label: fe(pe, e.status),
|
|
264
300
|
color: Ae(e.status)
|
|
265
301
|
}) }),
|
|
266
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ i(h, {
|
|
267
303
|
align: "right",
|
|
268
|
-
children: e.status === "OPEN" && C ? /* @__PURE__ */
|
|
304
|
+
children: e.status === "OPEN" && C ? /* @__PURE__ */ a(m, {
|
|
269
305
|
direction: "row",
|
|
270
306
|
spacing: 1,
|
|
271
307
|
justifyContent: "flex-end",
|
|
272
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ i(c, {
|
|
273
309
|
size: "small",
|
|
274
310
|
variant: "outlined",
|
|
275
|
-
startIcon: /* @__PURE__ */
|
|
311
|
+
startIcon: /* @__PURE__ */ i(y, {}),
|
|
276
312
|
onClick: () => Pe(e),
|
|
277
313
|
children: "Top Up"
|
|
278
|
-
}), /* @__PURE__ */
|
|
314
|
+
}), /* @__PURE__ */ i(c, {
|
|
279
315
|
size: "small",
|
|
280
316
|
variant: "outlined",
|
|
281
|
-
startIcon: /* @__PURE__ */
|
|
317
|
+
startIcon: /* @__PURE__ */ i(ke, {}),
|
|
282
318
|
onClick: () => Ne(e),
|
|
283
319
|
children: "End Session"
|
|
284
320
|
})]
|
|
285
|
-
}) : /* @__PURE__ */
|
|
321
|
+
}) : /* @__PURE__ */ i(v, {
|
|
286
322
|
variant: "caption",
|
|
287
323
|
color: "text.disabled",
|
|
288
324
|
children: "—"
|
|
@@ -294,18 +330,18 @@ function S() {
|
|
|
294
330
|
})]
|
|
295
331
|
})
|
|
296
332
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ a(u, {
|
|
298
334
|
open: A.open,
|
|
299
335
|
onClose: H,
|
|
300
336
|
maxWidth: "sm",
|
|
301
337
|
fullWidth: !0,
|
|
302
338
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ a(ge, { children: ["End outreach session #", A.pickup?.serialId] }),
|
|
340
|
+
/* @__PURE__ */ i(f, { children: A.pickup ? /* @__PURE__ */ a(m, {
|
|
305
341
|
spacing: 2,
|
|
306
342
|
sx: { mt: 1 },
|
|
307
343
|
children: [
|
|
308
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ a(s, {
|
|
309
345
|
sx: (e) => ({
|
|
310
346
|
p: 1.5,
|
|
311
347
|
borderRadius: 3,
|
|
@@ -313,11 +349,11 @@ function S() {
|
|
|
313
349
|
border: `1px solid ${x(e.palette.primary.main, .12)}`
|
|
314
350
|
}),
|
|
315
351
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ i(v, {
|
|
317
353
|
variant: "body2",
|
|
318
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */ i("strong", { children: A.pickup.productName })
|
|
319
355
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ a(v, {
|
|
321
357
|
variant: "caption",
|
|
322
358
|
color: "text.secondary",
|
|
323
359
|
sx: { display: "block" },
|
|
@@ -325,12 +361,12 @@ function S() {
|
|
|
325
361
|
"Picked ",
|
|
326
362
|
A.pickup.pickedQty,
|
|
327
363
|
" on ",
|
|
328
|
-
|
|
364
|
+
n(A.pickup.pickedOn),
|
|
329
365
|
" from ",
|
|
330
366
|
A.pickup.facilityName
|
|
331
367
|
]
|
|
332
368
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ a(v, {
|
|
334
370
|
variant: "caption",
|
|
335
371
|
color: "text.secondary",
|
|
336
372
|
sx: {
|
|
@@ -339,7 +375,7 @@ function S() {
|
|
|
339
375
|
},
|
|
340
376
|
children: [
|
|
341
377
|
"Sealed units expected on user: ",
|
|
342
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ i("strong", { children: q }),
|
|
343
379
|
" ",
|
|
344
380
|
"(",
|
|
345
381
|
(A.pickup.pickedQty ?? 0) - q - (A.pickup.openVials ?? []).length,
|
|
@@ -348,7 +384,7 @@ function S() {
|
|
|
348
384
|
})
|
|
349
385
|
]
|
|
350
386
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ i(_, {
|
|
352
388
|
required: !0,
|
|
353
389
|
size: "small",
|
|
354
390
|
type: "number",
|
|
@@ -365,21 +401,21 @@ function S() {
|
|
|
365
401
|
error: !!X,
|
|
366
402
|
helperText: X || `Out of ${q} sealed units expected to remain`
|
|
367
403
|
}),
|
|
368
|
-
Y != null && Y > 0 ? /* @__PURE__ */
|
|
404
|
+
Y != null && Y > 0 ? /* @__PURE__ */ a(o, {
|
|
369
405
|
severity: "warning",
|
|
370
406
|
variant: "outlined",
|
|
371
407
|
children: [
|
|
372
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ i("strong", { children: Y }),
|
|
373
409
|
" sealed ",
|
|
374
410
|
Y === 1 ? "unit" : "units",
|
|
375
411
|
" unaccounted for — will be marked as wastage."
|
|
376
412
|
]
|
|
377
413
|
}) : null,
|
|
378
|
-
(A.pickup.openVials ?? []).length > 0 ? /* @__PURE__ */
|
|
414
|
+
(A.pickup.openVials ?? []).length > 0 ? /* @__PURE__ */ a(o, {
|
|
379
415
|
severity: "info",
|
|
380
416
|
variant: "outlined",
|
|
381
417
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ a(v, {
|
|
383
419
|
variant: "body2",
|
|
384
420
|
sx: {
|
|
385
421
|
fontWeight: 700,
|
|
@@ -392,10 +428,10 @@ function S() {
|
|
|
392
428
|
" on you will be closed with wastage"
|
|
393
429
|
]
|
|
394
430
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ i(m, {
|
|
396
432
|
spacing: .25,
|
|
397
433
|
sx: { mt: .5 },
|
|
398
|
-
children: A.pickup.openVials.map((e) => /* @__PURE__ */
|
|
434
|
+
children: A.pickup.openVials.map((e) => /* @__PURE__ */ a(v, {
|
|
399
435
|
variant: "caption",
|
|
400
436
|
color: "text.secondary",
|
|
401
437
|
children: [
|
|
@@ -407,7 +443,7 @@ function S() {
|
|
|
407
443
|
]
|
|
408
444
|
}, e.id))
|
|
409
445
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ i(v, {
|
|
411
447
|
variant: "caption",
|
|
412
448
|
color: "text.secondary",
|
|
413
449
|
sx: {
|
|
@@ -418,31 +454,31 @@ function S() {
|
|
|
418
454
|
})
|
|
419
455
|
]
|
|
420
456
|
}) : null,
|
|
421
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ a(_e, {
|
|
422
458
|
size: "small",
|
|
423
459
|
disabled: !Z,
|
|
424
460
|
error: !!Q,
|
|
425
461
|
children: [
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ a(be, { children: ["Wastage Reason", Z ? " *" : ""] }),
|
|
463
|
+
/* @__PURE__ */ a(xe, {
|
|
428
464
|
label: `Wastage Reason${Z ? " *" : ""}`,
|
|
429
465
|
value: M.wastageReason,
|
|
430
466
|
onChange: (e) => N((t) => ({
|
|
431
467
|
...t,
|
|
432
468
|
wastageReason: e.target.value
|
|
433
469
|
})),
|
|
434
|
-
children: [/* @__PURE__ */
|
|
470
|
+
children: [/* @__PURE__ */ i(p, {
|
|
435
471
|
value: "",
|
|
436
|
-
children: /* @__PURE__ */
|
|
437
|
-
}),
|
|
472
|
+
children: /* @__PURE__ */ i("em", { children: "—" })
|
|
473
|
+
}), de.map((e) => /* @__PURE__ */ i(p, {
|
|
438
474
|
value: e.value,
|
|
439
475
|
children: e.label
|
|
440
476
|
}, e.value))]
|
|
441
477
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ i(ve, { children: Q || (Z ? "Required — same reason covers both unaccounted sealed units and any open-vial remaining volume." : "Not needed — nothing being wasted.") })
|
|
443
479
|
]
|
|
444
480
|
}),
|
|
445
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ i(_, {
|
|
446
482
|
size: "small",
|
|
447
483
|
multiline: !0,
|
|
448
484
|
minRows: 2,
|
|
@@ -455,11 +491,11 @@ function S() {
|
|
|
455
491
|
})
|
|
456
492
|
]
|
|
457
493
|
}) : null }),
|
|
458
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ a(d, { children: [/* @__PURE__ */ i(c, {
|
|
459
495
|
onClick: H,
|
|
460
496
|
disabled: R,
|
|
461
497
|
children: "Cancel"
|
|
462
|
-
}), /* @__PURE__ */
|
|
498
|
+
}), /* @__PURE__ */ i(c, {
|
|
463
499
|
variant: "contained",
|
|
464
500
|
onClick: () => void Ie(),
|
|
465
501
|
disabled: !$ || R,
|
|
@@ -467,18 +503,18 @@ function S() {
|
|
|
467
503
|
})] })
|
|
468
504
|
]
|
|
469
505
|
}),
|
|
470
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ a(u, {
|
|
471
507
|
open: P.open,
|
|
472
508
|
onClose: U,
|
|
473
509
|
maxWidth: "xs",
|
|
474
510
|
fullWidth: !0,
|
|
475
511
|
children: [
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ a(ge, { children: ["Top up session #", P.pickup?.serialId] }),
|
|
513
|
+
/* @__PURE__ */ i(f, { children: P.pickup ? /* @__PURE__ */ a(m, {
|
|
478
514
|
spacing: 2,
|
|
479
515
|
sx: { mt: 1 },
|
|
480
516
|
children: [
|
|
481
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ a(s, {
|
|
482
518
|
sx: (e) => ({
|
|
483
519
|
p: 1.5,
|
|
484
520
|
borderRadius: 3,
|
|
@@ -486,11 +522,11 @@ function S() {
|
|
|
486
522
|
border: `1px solid ${x(e.palette.primary.main, .12)}`
|
|
487
523
|
}),
|
|
488
524
|
children: [
|
|
489
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ i(v, {
|
|
490
526
|
variant: "body2",
|
|
491
|
-
children: /* @__PURE__ */
|
|
527
|
+
children: /* @__PURE__ */ i("strong", { children: P.pickup.productName })
|
|
492
528
|
}),
|
|
493
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ a(v, {
|
|
494
530
|
variant: "caption",
|
|
495
531
|
color: "text.secondary",
|
|
496
532
|
sx: { display: "block" },
|
|
@@ -501,7 +537,7 @@ function S() {
|
|
|
501
537
|
P.pickup.lotNumber || "—"
|
|
502
538
|
]
|
|
503
539
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ a(v, {
|
|
505
541
|
variant: "caption",
|
|
506
542
|
color: "text.secondary",
|
|
507
543
|
sx: { display: "block" },
|
|
@@ -512,20 +548,20 @@ function S() {
|
|
|
512
548
|
P.pickup.expectedRemainingQty ?? 0
|
|
513
549
|
]
|
|
514
550
|
}),
|
|
515
|
-
W == null ? null : /* @__PURE__ */
|
|
551
|
+
W == null ? null : /* @__PURE__ */ a(v, {
|
|
516
552
|
variant: "caption",
|
|
517
553
|
color: "text.secondary",
|
|
518
554
|
sx: { display: "block" },
|
|
519
|
-
children: ["Available at source: ", /* @__PURE__ */
|
|
555
|
+
children: ["Available at source: ", /* @__PURE__ */ i("strong", { children: W })]
|
|
520
556
|
})
|
|
521
557
|
]
|
|
522
558
|
}),
|
|
523
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ i(o, {
|
|
524
560
|
severity: "info",
|
|
525
561
|
variant: "outlined",
|
|
526
562
|
children: "Top-ups come from the same source batch as the original pickup so lot / expiry stays consistent. To pick from a different batch, end this session first."
|
|
527
563
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ i(_, {
|
|
529
565
|
required: !0,
|
|
530
566
|
size: "small",
|
|
531
567
|
type: "number",
|
|
@@ -542,7 +578,7 @@ function S() {
|
|
|
542
578
|
error: !!K,
|
|
543
579
|
helperText: K || (W == null ? "Sealed units to add to this session." : `Sealed units to add. Up to ${W} available at the source.`)
|
|
544
580
|
}),
|
|
545
|
-
/* @__PURE__ */
|
|
581
|
+
/* @__PURE__ */ i(_, {
|
|
546
582
|
size: "small",
|
|
547
583
|
multiline: !0,
|
|
548
584
|
minRows: 2,
|
|
@@ -555,11 +591,11 @@ function S() {
|
|
|
555
591
|
})
|
|
556
592
|
]
|
|
557
593
|
}) : null }),
|
|
558
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ a(d, { children: [/* @__PURE__ */ i(c, {
|
|
559
595
|
onClick: U,
|
|
560
596
|
disabled: R,
|
|
561
597
|
children: "Cancel"
|
|
562
|
-
}), /* @__PURE__ */
|
|
598
|
+
}), /* @__PURE__ */ i(c, {
|
|
563
599
|
variant: "contained",
|
|
564
600
|
onClick: () => void Fe(),
|
|
565
601
|
disabled: !!K || R,
|
|
@@ -572,4 +608,4 @@ function S() {
|
|
|
572
608
|
//#endregion
|
|
573
609
|
export { S as default };
|
|
574
610
|
|
|
575
|
-
//# sourceMappingURL=PickupsPage-
|
|
611
|
+
//# sourceMappingURL=PickupsPage-D66_Wta4.js.map
|