@argusoft/medplat-product-management 1.0.0

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.
Files changed (65) hide show
  1. package/dist/BrandsPage-DCMCVvDY.js +334 -0
  2. package/dist/BrandsPage-DCMCVvDY.js.map +1 -0
  3. package/dist/CategoriesPage-BpRhwfrc.js +284 -0
  4. package/dist/CategoriesPage-BpRhwfrc.js.map +1 -0
  5. package/dist/DashboardPage-BNKUQj46.js +436 -0
  6. package/dist/DashboardPage-BNKUQj46.js.map +1 -0
  7. package/dist/FacilityPicker-Coi8I3yE.js +79 -0
  8. package/dist/FacilityPicker-Coi8I3yE.js.map +1 -0
  9. package/dist/InventoryPage-BR6jOzg2.js +517 -0
  10. package/dist/InventoryPage-BR6jOzg2.js.map +1 -0
  11. package/dist/MemberProfileCard-DbHZCS5n.js +272 -0
  12. package/dist/MemberProfileCard-DbHZCS5n.js.map +1 -0
  13. package/dist/PaymentCreatePage-Ci3ERnby.js +487 -0
  14. package/dist/PaymentCreatePage-Ci3ERnby.js.map +1 -0
  15. package/dist/PaymentsPage-sdg902zX.js +157 -0
  16. package/dist/PaymentsPage-sdg902zX.js.map +1 -0
  17. package/dist/PickupCreatePage-CieMsgWV.js +310 -0
  18. package/dist/PickupCreatePage-CieMsgWV.js.map +1 -0
  19. package/dist/PickupsPage-Ci2Ll0Kn.js +566 -0
  20. package/dist/PickupsPage-Ci2Ll0Kn.js.map +1 -0
  21. package/dist/PmGuard-CjJBisaN.js +1195 -0
  22. package/dist/PmGuard-CjJBisaN.js.map +1 -0
  23. package/dist/PmTable-BuXZQZCU.js +302 -0
  24. package/dist/PmTable-BuXZQZCU.js.map +1 -0
  25. package/dist/ProductEditPage-DL8gy85Y.js +666 -0
  26. package/dist/ProductEditPage-DL8gy85Y.js.map +1 -0
  27. package/dist/ProductsPage-BANTKxLb.js +221 -0
  28. package/dist/ProductsPage-BANTKxLb.js.map +1 -0
  29. package/dist/PurchaseCreatePage-C3KMfBxJ.js +626 -0
  30. package/dist/PurchaseCreatePage-C3KMfBxJ.js.map +1 -0
  31. package/dist/PurchaseRequestDetailPage-C0GYFJDl.js +586 -0
  32. package/dist/PurchaseRequestDetailPage-C0GYFJDl.js.map +1 -0
  33. package/dist/PurchaseRequestsPage-DvFH_tWe.js +265 -0
  34. package/dist/PurchaseRequestsPage-DvFH_tWe.js.map +1 -0
  35. package/dist/PurchasesPage-BCvLvSp4.js +295 -0
  36. package/dist/PurchasesPage-BCvLvSp4.js.map +1 -0
  37. package/dist/SaleCreatePage-DpkQMoTq.js +548 -0
  38. package/dist/SaleCreatePage-DpkQMoTq.js.map +1 -0
  39. package/dist/SalesPage-DUwgkEO-.js +315 -0
  40. package/dist/SalesPage-DUwgkEO-.js.map +1 -0
  41. package/dist/SettingsPage-CusC0jqJ.js +710 -0
  42. package/dist/SettingsPage-CusC0jqJ.js.map +1 -0
  43. package/dist/StorageUnitsPage-BlC2AgrJ.js +469 -0
  44. package/dist/StorageUnitsPage-BlC2AgrJ.js.map +1 -0
  45. package/dist/TransactionsPage-DDaK4VyY.js +714 -0
  46. package/dist/TransactionsPage-DDaK4VyY.js.map +1 -0
  47. package/dist/TransferCreatePage-BxudLfhS.js +363 -0
  48. package/dist/TransferCreatePage-BxudLfhS.js.map +1 -0
  49. package/dist/TransfersPage-zgmt7teZ.js +480 -0
  50. package/dist/TransfersPage-zgmt7teZ.js.map +1 -0
  51. package/dist/VialsPage-CjqPfgpV.js +855 -0
  52. package/dist/VialsPage-CjqPfgpV.js.map +1 -0
  53. package/dist/constants-BrA_hfAI.js +254 -0
  54. package/dist/constants-BrA_hfAI.js.map +1 -0
  55. package/dist/currency-BDDCDgeE.js +169 -0
  56. package/dist/currency-BDDCDgeE.js.map +1 -0
  57. package/dist/format-UOyOu75i.js +52 -0
  58. package/dist/format-UOyOu75i.js.map +1 -0
  59. package/dist/index.js +45 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/useFieldErrors-hDG8ox_x.js +29 -0
  62. package/dist/useFieldErrors-hDG8ox_x.js.map +1 -0
  63. package/dist/validation-Ba7puFIO.js +109 -0
  64. package/dist/validation-Ba7puFIO.js.map +1 -0
  65. package/package.json +36 -0
@@ -0,0 +1,714 @@
1
+ import { Q as e, a as t, n, r, t as i } from "./PmGuard-CjJBisaN.js";
2
+ import { a as ee, o as te, r as ne, t as re } from "./PmTable-BuXZQZCU.js";
3
+ import { n as a, r as o } from "./format-UOyOu75i.js";
4
+ import { p as s, s as c } from "./constants-BrA_hfAI.js";
5
+ import { useMemo as ie, useState as l } from "react";
6
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
7
+ import { Alert as ae, Autocomplete as oe, Box as f, Button as p, Chip as m, FormControl as h, IconButton as g, InputLabel as _, MenuItem as v, Select as y, Skeleton as se, Stack as b, TableBody as ce, TableCell as x, TableHead as le, TableRow as S, TextField as C, Tooltip as w, Typography as T } from "@mui/material";
8
+ import ue from "@mui/icons-material/RefreshRounded";
9
+ import { showToast as E } from "@/common/toaster/toaster";
10
+ import { alpha as D, useTheme as O } from "@mui/material/styles";
11
+ import k from "@mui/icons-material/ShoppingCartRounded";
12
+ import A from "@mui/icons-material/FactCheckRounded";
13
+ import j from "@mui/icons-material/MoveDownRounded";
14
+ import M from "@mui/icons-material/SwapHorizRounded";
15
+ import N from "@mui/icons-material/PointOfSaleRounded";
16
+ import P from "@mui/icons-material/VaccinesRounded";
17
+ import F from "@mui/icons-material/PaymentsRounded";
18
+ import de from "@mui/icons-material/ReceiptLongRounded";
19
+ import I from "@mui/icons-material/LockOpenRounded";
20
+ import fe from "@mui/icons-material/SearchRounded";
21
+ import L from "@mui/icons-material/CheckCircleRounded";
22
+ import R from "@mui/icons-material/CancelRounded";
23
+ import pe from "@mui/icons-material/ChevronLeftRounded";
24
+ import me from "@mui/icons-material/ChevronRightRounded";
25
+ import z from "@mui/icons-material/CallMadeRounded";
26
+ import B from "@mui/icons-material/CallReceivedRounded";
27
+ import V from "@mui/icons-material/ReportRounded";
28
+ import H from "@mui/icons-material/BlockRounded";
29
+ import U from "@mui/icons-material/HourglassEmptyRounded";
30
+ import he from "@mui/icons-material/PictureAsPdfRounded";
31
+ import ge from "@mui/icons-material/InsertDriveFileRounded";
32
+ import _e from "@/hooks/useDownloadPdf";
33
+ import { useDownloadXlsx as ve } from "@/hooks/useDownloadXlsx";
34
+ //#region src/views/TransactionsPage.jsx
35
+ var W = {
36
+ RECEIPT: {
37
+ color: "success",
38
+ icon: B,
39
+ label: "Receipt"
40
+ },
41
+ VIAL_OPENED: {
42
+ color: "info",
43
+ icon: P,
44
+ label: "Vial opened"
45
+ },
46
+ ADMINISTRATION: {
47
+ color: "primary",
48
+ icon: P,
49
+ label: "Administration"
50
+ },
51
+ WASTAGE: {
52
+ color: "warning",
53
+ icon: V,
54
+ label: "Wastage"
55
+ },
56
+ EXPIRY: {
57
+ color: "warning",
58
+ icon: V,
59
+ label: "Expiry"
60
+ },
61
+ SALE: {
62
+ color: "success",
63
+ icon: N,
64
+ label: "Sale"
65
+ },
66
+ PAYMENT: {
67
+ color: "success",
68
+ icon: F,
69
+ label: "Payment"
70
+ },
71
+ QUARANTINE: {
72
+ color: "error",
73
+ icon: H,
74
+ label: "Quarantine"
75
+ },
76
+ RECALL: {
77
+ color: "error",
78
+ icon: H,
79
+ label: "Recall"
80
+ },
81
+ UNQUARANTINE: {
82
+ color: "info",
83
+ icon: I,
84
+ label: "Unquarantine"
85
+ },
86
+ TRANSFER_OUT: {
87
+ color: "default",
88
+ icon: z,
89
+ label: "Transfer out"
90
+ },
91
+ TRANSFER_IN: {
92
+ color: "default",
93
+ icon: M,
94
+ label: "Transfer in"
95
+ },
96
+ PICKUP_OUT: {
97
+ color: "default",
98
+ icon: j,
99
+ label: "Pickup — out"
100
+ },
101
+ PICKUP_IN: {
102
+ color: "default",
103
+ icon: j,
104
+ label: "Pickup — in"
105
+ },
106
+ TOPUP_OUT: {
107
+ color: "default",
108
+ icon: j,
109
+ label: "Top-up — out"
110
+ },
111
+ TOPUP_IN: {
112
+ color: "default",
113
+ icon: j,
114
+ label: "Top-up — in"
115
+ },
116
+ RETURN_OUT: {
117
+ color: "default",
118
+ icon: j,
119
+ label: "Return — out"
120
+ },
121
+ RETURN_IN: {
122
+ color: "default",
123
+ icon: j,
124
+ label: "Return — in"
125
+ },
126
+ PURCHASE_REQUEST_SUBMITTED: {
127
+ color: "info",
128
+ icon: U,
129
+ label: "Request submitted"
130
+ },
131
+ PURCHASE_REQUEST_APPROVED: {
132
+ color: "success",
133
+ icon: L,
134
+ label: "Request approved"
135
+ },
136
+ PURCHASE_REQUEST_PARTIAL: {
137
+ color: "warning",
138
+ icon: A,
139
+ label: "Request partial"
140
+ },
141
+ PURCHASE_REQUEST_REJECTED: {
142
+ color: "error",
143
+ icon: R,
144
+ label: "Request rejected"
145
+ },
146
+ PURCHASE_REQUEST_CANCELLED: {
147
+ color: "default",
148
+ icon: R,
149
+ label: "Request cancelled"
150
+ }
151
+ };
152
+ function ye({ type: e }) {
153
+ let t = W[e] || {
154
+ color: "default",
155
+ icon: k,
156
+ label: e
157
+ }, n = t.icon;
158
+ return /* @__PURE__ */ u(m, {
159
+ size: "small",
160
+ color: t.color,
161
+ icon: /* @__PURE__ */ u(n, { sx: { fontSize: "1rem !important" } }),
162
+ label: t.label,
163
+ sx: {
164
+ fontWeight: 700,
165
+ height: 24,
166
+ borderRadius: 1.5,
167
+ "& .MuiChip-icon": {
168
+ ml: .75,
169
+ mr: -.25
170
+ }
171
+ }
172
+ });
173
+ }
174
+ function be({ status: e }) {
175
+ let t = e === "COMPLETED" ? "success" : e === "FAILED" ? "error" : "warning";
176
+ return /* @__PURE__ */ u(m, {
177
+ size: "small",
178
+ label: s(c, e),
179
+ color: t,
180
+ variant: "outlined",
181
+ sx: {
182
+ fontWeight: 700,
183
+ height: 22,
184
+ borderRadius: 1.5,
185
+ fontSize: "0.7rem"
186
+ }
187
+ });
188
+ }
189
+ var G = Object.keys(W).map((e) => ({
190
+ value: e,
191
+ label: W[e].label
192
+ }));
193
+ function K() {
194
+ let s = O(), c = _e(), m = ve(), [k, A] = l([]), [j, M] = l(0), [N, P] = l(0), [F, I] = l(50), [L, R] = l(!0), [z, B] = l(""), [V, H] = l({
195
+ dateFrom: "",
196
+ dateTo: "",
197
+ types: [],
198
+ search: "",
199
+ ownerType: ""
200
+ });
201
+ async function U(t = N, n = F, r = V) {
202
+ R(!0), B("");
203
+ try {
204
+ let i = await e({
205
+ page: t,
206
+ size: n,
207
+ dateFrom: r.dateFrom ? new Date(r.dateFrom).toISOString() : void 0,
208
+ dateTo: r.dateTo ? (/* @__PURE__ */ new Date(`${r.dateTo}T23:59:59`)).toISOString() : void 0,
209
+ types: r.types.length > 0 ? r.types : void 0,
210
+ ownerType: r.ownerType || void 0,
211
+ search: r.search?.trim() || void 0
212
+ });
213
+ A(i.content ?? []), M(i.totalElements ?? 0), P(i.page ?? 0), I(i.size ?? n);
214
+ } catch (e) {
215
+ let t = e?.response?.data?.message ?? e?.message ?? "Failed to load ledger";
216
+ B(t), E({
217
+ message: t,
218
+ type: "error"
219
+ });
220
+ } finally {
221
+ R(!1);
222
+ }
223
+ }
224
+ r("view.manage.productManagement.ledger", () => {
225
+ U(0, F, V);
226
+ }, []);
227
+ let K = j === 0 ? 0 : N * F + 1, q = N * F + k.length, J = F > 0 ? Math.ceil(j / F) : 0;
228
+ function Y(e) {
229
+ H(e), U(0, F, e);
230
+ }
231
+ function xe() {
232
+ let e = {
233
+ dateFrom: "",
234
+ dateTo: "",
235
+ types: [],
236
+ search: "",
237
+ ownerType: ""
238
+ };
239
+ H(e), U(0, F, e);
240
+ }
241
+ let X = [
242
+ "Time",
243
+ "Type",
244
+ "Owner",
245
+ "Product",
246
+ "Vaccine",
247
+ "Lot",
248
+ "Qty",
249
+ "Volume",
250
+ "Money",
251
+ "Notes"
252
+ ], Z = [
253
+ "time",
254
+ "type",
255
+ "owner",
256
+ "product",
257
+ "vaccine",
258
+ "lot",
259
+ "qty",
260
+ "volume",
261
+ "money",
262
+ "notes"
263
+ ], Q = ie(() => k.map((e) => ({
264
+ time: e.transactionTime ? a(e.transactionTime) : "",
265
+ type: W[e.transactionType]?.label ?? e.transactionType ?? "",
266
+ owner: `${e.ownerName ?? (e.ownerType === "USER" ? "Personal" : "Facility")} (${e.ownerType ?? "—"})`,
267
+ product: e.productName ?? "",
268
+ vaccine: e.vaccineCode ?? "",
269
+ lot: e.lotNumber ?? "",
270
+ qty: e.quantity ?? "",
271
+ volume: e.volumeMl == null ? "" : `${o(e.volumeMl)} ml`,
272
+ money: e.monetaryAmount == null ? "" : o(e.monetaryAmount),
273
+ notes: e.notes ?? ""
274
+ })), [k]);
275
+ function $(e) {
276
+ return `pm-ledger-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:T]/g, "-").slice(0, 16)}.${e}`;
277
+ }
278
+ function Se() {
279
+ if (Q.length === 0) {
280
+ E({
281
+ message: "Nothing to export on this page.",
282
+ type: "info"
283
+ });
284
+ return;
285
+ }
286
+ c({
287
+ title: "PM Stock Ledger",
288
+ columns: X,
289
+ keys: Z,
290
+ data: Q,
291
+ fileName: $("pdf"),
292
+ headerText: "Product Management — Stock Ledger",
293
+ footerText: "Generated by MEDplat PM",
294
+ orientation: "landscape"
295
+ });
296
+ }
297
+ function Ce() {
298
+ if (Q.length === 0) {
299
+ E({
300
+ message: "Nothing to export on this page.",
301
+ type: "info"
302
+ });
303
+ return;
304
+ }
305
+ m({
306
+ columns: X,
307
+ keys: Z,
308
+ data: Q,
309
+ filename: $("xlsx")
310
+ });
311
+ }
312
+ return /* @__PURE__ */ d(f, { children: [/* @__PURE__ */ u(n, {}), /* @__PURE__ */ u(i, {
313
+ perm: "view.manage.productManagement.ledger",
314
+ children: /* @__PURE__ */ d(t, {
315
+ title: "Stock Ledger",
316
+ subtitle: "Complete record of all stock and money movements. Balances always match this ledger.",
317
+ actions: /* @__PURE__ */ d(b, {
318
+ direction: "row",
319
+ spacing: 1,
320
+ children: [
321
+ /* @__PURE__ */ u(p, {
322
+ variant: "outlined",
323
+ startIcon: /* @__PURE__ */ u(he, {}),
324
+ onClick: Se,
325
+ disabled: L || k.length === 0,
326
+ children: "PDF"
327
+ }),
328
+ /* @__PURE__ */ u(p, {
329
+ variant: "outlined",
330
+ startIcon: /* @__PURE__ */ u(ge, {}),
331
+ onClick: Ce,
332
+ disabled: L || k.length === 0,
333
+ children: "Excel"
334
+ }),
335
+ /* @__PURE__ */ u(p, {
336
+ variant: "outlined",
337
+ startIcon: /* @__PURE__ */ u(ue, {}),
338
+ onClick: () => void U(0, F, V),
339
+ children: "Refresh"
340
+ })
341
+ ]
342
+ }),
343
+ children: [
344
+ z ? /* @__PURE__ */ u(ae, {
345
+ severity: "error",
346
+ sx: { mb: 2 },
347
+ children: z
348
+ }) : null,
349
+ /* @__PURE__ */ u(f, {
350
+ sx: {
351
+ mb: 2,
352
+ p: 2,
353
+ borderRadius: 3,
354
+ border: "1px solid",
355
+ borderColor: "divider"
356
+ },
357
+ children: /* @__PURE__ */ d(b, {
358
+ direction: {
359
+ xs: "column",
360
+ md: "row"
361
+ },
362
+ spacing: 1.5,
363
+ alignItems: { md: "center" },
364
+ children: [
365
+ /* @__PURE__ */ u(C, {
366
+ size: "small",
367
+ type: "date",
368
+ label: "From",
369
+ InputLabelProps: { shrink: !0 },
370
+ value: V.dateFrom,
371
+ onChange: (e) => H((t) => ({
372
+ ...t,
373
+ dateFrom: e.target.value
374
+ })),
375
+ sx: { minWidth: 160 }
376
+ }),
377
+ /* @__PURE__ */ u(C, {
378
+ size: "small",
379
+ type: "date",
380
+ label: "To",
381
+ InputLabelProps: { shrink: !0 },
382
+ value: V.dateTo,
383
+ onChange: (e) => H((t) => ({
384
+ ...t,
385
+ dateTo: e.target.value
386
+ })),
387
+ sx: { minWidth: 160 }
388
+ }),
389
+ /* @__PURE__ */ u(oe, {
390
+ size: "small",
391
+ multiple: !0,
392
+ disableCloseOnSelect: !0,
393
+ options: G,
394
+ getOptionLabel: (e) => e.label,
395
+ isOptionEqualToValue: (e, t) => e.value === t.value,
396
+ value: G.filter((e) => V.types.includes(e.value)),
397
+ onChange: (e, t) => H((e) => ({
398
+ ...e,
399
+ types: t.map((e) => e.value)
400
+ })),
401
+ renderInput: (e) => /* @__PURE__ */ u(C, {
402
+ ...e,
403
+ label: "Types",
404
+ placeholder: "Any"
405
+ }),
406
+ sx: {
407
+ minWidth: 240,
408
+ flexGrow: 1
409
+ }
410
+ }),
411
+ /* @__PURE__ */ d(h, {
412
+ size: "small",
413
+ sx: { minWidth: 140 },
414
+ children: [/* @__PURE__ */ u(_, { children: "Owner" }), /* @__PURE__ */ d(y, {
415
+ label: "Owner",
416
+ value: V.ownerType,
417
+ onChange: (e) => H((t) => ({
418
+ ...t,
419
+ ownerType: e.target.value
420
+ })),
421
+ children: [
422
+ /* @__PURE__ */ u(v, {
423
+ value: "",
424
+ children: "Any"
425
+ }),
426
+ /* @__PURE__ */ u(v, {
427
+ value: "FACILITY",
428
+ children: "Facility"
429
+ }),
430
+ /* @__PURE__ */ u(v, {
431
+ value: "USER",
432
+ children: "Personal"
433
+ })
434
+ ]
435
+ })]
436
+ }),
437
+ /* @__PURE__ */ u(C, {
438
+ size: "small",
439
+ label: "Search",
440
+ placeholder: "Lot, vaccine code, notes…",
441
+ value: V.search,
442
+ onChange: (e) => H((t) => ({
443
+ ...t,
444
+ search: e.target.value
445
+ })),
446
+ onKeyDown: (e) => {
447
+ e.key === "Enter" && Y(V);
448
+ },
449
+ sx: {
450
+ minWidth: 220,
451
+ flexGrow: 1
452
+ },
453
+ InputProps: { startAdornment: /* @__PURE__ */ u(fe, {
454
+ fontSize: "small",
455
+ sx: {
456
+ color: "text.secondary",
457
+ mr: 1
458
+ }
459
+ }) }
460
+ }),
461
+ /* @__PURE__ */ u(p, {
462
+ variant: "contained",
463
+ onClick: () => Y(V),
464
+ disabled: L,
465
+ children: "Apply"
466
+ }),
467
+ /* @__PURE__ */ u(p, {
468
+ variant: "text",
469
+ onClick: xe,
470
+ disabled: L,
471
+ children: "Clear"
472
+ })
473
+ ]
474
+ })
475
+ }),
476
+ /* @__PURE__ */ u(te, {
477
+ eyebrow: "Audit feed",
478
+ title: "Transactions",
479
+ subtitle: L ? "Loading…" : j === 0 ? "No transactions in this window" : `Showing ${K}–${q} of ${j} · page ${N + 1} of ${J}`,
480
+ actions: /* @__PURE__ */ d(b, {
481
+ direction: "row",
482
+ spacing: .5,
483
+ alignItems: "center",
484
+ children: [
485
+ /* @__PURE__ */ d(h, {
486
+ size: "small",
487
+ variant: "outlined",
488
+ sx: {
489
+ minWidth: 88,
490
+ mr: 1
491
+ },
492
+ children: [/* @__PURE__ */ u(_, { children: "Size" }), /* @__PURE__ */ u(y, {
493
+ label: "Size",
494
+ value: F,
495
+ onChange: (e) => {
496
+ let t = Number(e.target.value);
497
+ I(t), U(0, t, V);
498
+ },
499
+ children: [
500
+ 25,
501
+ 50,
502
+ 100,
503
+ 200
504
+ ].map((e) => /* @__PURE__ */ u(v, {
505
+ value: e,
506
+ children: e
507
+ }, e))
508
+ })]
509
+ }),
510
+ /* @__PURE__ */ u(w, {
511
+ title: "Previous page",
512
+ children: /* @__PURE__ */ u("span", { children: /* @__PURE__ */ u(g, {
513
+ size: "small",
514
+ disabled: N === 0 || L,
515
+ onClick: () => void U(N - 1, F, V),
516
+ sx: {
517
+ border: "1px solid",
518
+ borderColor: "divider"
519
+ },
520
+ children: /* @__PURE__ */ u(pe, { fontSize: "small" })
521
+ }) })
522
+ }),
523
+ /* @__PURE__ */ u(f, {
524
+ sx: {
525
+ px: 1,
526
+ minWidth: 64,
527
+ textAlign: "center"
528
+ },
529
+ children: /* @__PURE__ */ u(T, {
530
+ variant: "caption",
531
+ sx: {
532
+ fontWeight: 800,
533
+ color: "text.secondary",
534
+ fontVariantNumeric: "tabular-nums"
535
+ },
536
+ children: j === 0 ? "—" : `${K}–${q}`
537
+ })
538
+ }),
539
+ /* @__PURE__ */ u(w, {
540
+ title: "Next page",
541
+ children: /* @__PURE__ */ u("span", { children: /* @__PURE__ */ u(g, {
542
+ size: "small",
543
+ disabled: N + 1 >= J || L,
544
+ onClick: () => void U(N + 1, F, V),
545
+ sx: {
546
+ border: "1px solid",
547
+ borderColor: "divider"
548
+ },
549
+ children: /* @__PURE__ */ u(me, { fontSize: "small" })
550
+ }) })
551
+ })
552
+ ]
553
+ }),
554
+ children: /* @__PURE__ */ d(ee, {
555
+ dense: !0,
556
+ children: [/* @__PURE__ */ u(le, { children: /* @__PURE__ */ d(S, { children: [
557
+ /* @__PURE__ */ u(x, { children: "Time" }),
558
+ /* @__PURE__ */ u(x, { children: "Type" }),
559
+ /* @__PURE__ */ u(x, { children: "Owner" }),
560
+ /* @__PURE__ */ u(x, { children: "Product · Lot" }),
561
+ /* @__PURE__ */ u(x, {
562
+ align: "right",
563
+ children: "Qty"
564
+ }),
565
+ /* @__PURE__ */ u(x, {
566
+ align: "right",
567
+ children: "Volume"
568
+ }),
569
+ /* @__PURE__ */ u(x, {
570
+ align: "right",
571
+ children: "Money"
572
+ }),
573
+ /* @__PURE__ */ u(x, { children: "Sync" }),
574
+ /* @__PURE__ */ u(x, { children: "Notes" })
575
+ ] }) }), /* @__PURE__ */ u(ce, { children: L ? Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ u(S, { children: Array.from({ length: 9 }).map((e, t) => /* @__PURE__ */ u(x, { children: /* @__PURE__ */ u(se, { height: 22 }) }, t)) }, t)) : k.length === 0 ? /* @__PURE__ */ u(re, {
576
+ colSpan: 9,
577
+ icon: de,
578
+ title: "No transactions in this window",
579
+ hint: "Record a purchase, sale, vial open, or payment. Every stock and money movement lands here."
580
+ }) : k.map((e) => /* @__PURE__ */ d(S, {
581
+ hover: !0,
582
+ children: [
583
+ /* @__PURE__ */ u(x, { children: /* @__PURE__ */ u(T, {
584
+ variant: "body2",
585
+ sx: {
586
+ fontWeight: 700,
587
+ lineHeight: 1.2
588
+ },
589
+ children: a(e.transactionTime)
590
+ }) }),
591
+ /* @__PURE__ */ u(x, { children: /* @__PURE__ */ u(ye, { type: e.transactionType }) }),
592
+ /* @__PURE__ */ d(x, { children: [/* @__PURE__ */ u(T, {
593
+ variant: "body2",
594
+ sx: { fontWeight: 700 },
595
+ children: e.ownerName || (e.ownerType === "USER" ? "Personal" : "Facility")
596
+ }), /* @__PURE__ */ u(T, {
597
+ variant: "caption",
598
+ color: "text.secondary",
599
+ children: e.ownerType
600
+ })] }),
601
+ /* @__PURE__ */ u(x, { children: /* @__PURE__ */ d(b, {
602
+ direction: "row",
603
+ alignItems: "baseline",
604
+ spacing: 1,
605
+ sx: { minWidth: 0 },
606
+ children: [
607
+ /* @__PURE__ */ u(T, {
608
+ variant: "body2",
609
+ sx: {
610
+ fontWeight: 700,
611
+ lineHeight: 1.2
612
+ },
613
+ noWrap: !0,
614
+ children: e.productName || "—"
615
+ }),
616
+ e.vaccineCode ? /* @__PURE__ */ u(f, {
617
+ component: "span",
618
+ sx: {
619
+ px: .6,
620
+ py: .05,
621
+ borderRadius: 1,
622
+ bgcolor: D(s.palette.info.main, .1),
623
+ color: "info.dark",
624
+ fontFamily: "monospace",
625
+ fontSize: "0.65rem",
626
+ fontWeight: 700
627
+ },
628
+ children: e.vaccineCode
629
+ }) : null,
630
+ e.lotNumber ? /* @__PURE__ */ u(f, {
631
+ component: "span",
632
+ sx: {
633
+ display: "inline-flex",
634
+ px: .7,
635
+ py: .1,
636
+ borderRadius: 1,
637
+ bgcolor: D(s.palette.primary.main, .06),
638
+ color: "primary.dark",
639
+ fontFamily: "monospace",
640
+ fontSize: "0.7rem",
641
+ fontWeight: 700
642
+ },
643
+ children: e.lotNumber
644
+ }) : null
645
+ ]
646
+ }) }),
647
+ /* @__PURE__ */ u(x, {
648
+ align: "right",
649
+ children: e.quantity == null ? /* @__PURE__ */ u(T, {
650
+ variant: "caption",
651
+ color: "text.disabled",
652
+ children: "—"
653
+ }) : /* @__PURE__ */ u(T, {
654
+ variant: "body2",
655
+ sx: {
656
+ fontWeight: 700,
657
+ fontVariantNumeric: "tabular-nums"
658
+ },
659
+ children: e.quantity
660
+ })
661
+ }),
662
+ /* @__PURE__ */ u(x, {
663
+ align: "right",
664
+ children: e.volumeMl == null ? /* @__PURE__ */ u(T, {
665
+ variant: "caption",
666
+ color: "text.disabled",
667
+ children: "—"
668
+ }) : /* @__PURE__ */ d(T, {
669
+ variant: "body2",
670
+ sx: {
671
+ fontWeight: 700,
672
+ fontVariantNumeric: "tabular-nums"
673
+ },
674
+ children: [o(e.volumeMl), " ml"]
675
+ })
676
+ }),
677
+ /* @__PURE__ */ u(x, {
678
+ align: "right",
679
+ children: /* @__PURE__ */ u(ne, { value: e.monetaryAmount })
680
+ }),
681
+ /* @__PURE__ */ u(x, { children: /* @__PURE__ */ u(be, { status: e.syncStatus }) }),
682
+ /* @__PURE__ */ u(x, {
683
+ sx: { maxWidth: 240 },
684
+ children: e.notes ? /* @__PURE__ */ u(w, {
685
+ title: e.notes,
686
+ children: /* @__PURE__ */ u(T, {
687
+ variant: "caption",
688
+ color: "text.secondary",
689
+ sx: {
690
+ display: "block",
691
+ overflow: "hidden",
692
+ textOverflow: "ellipsis",
693
+ whiteSpace: "nowrap"
694
+ },
695
+ children: e.notes
696
+ })
697
+ }) : /* @__PURE__ */ u(T, {
698
+ variant: "caption",
699
+ color: "text.disabled",
700
+ children: "—"
701
+ })
702
+ })
703
+ ]
704
+ }, e.id)) })]
705
+ })
706
+ })
707
+ ]
708
+ })
709
+ })] });
710
+ }
711
+ //#endregion
712
+ export { K as default };
713
+
714
+ //# sourceMappingURL=TransactionsPage-DDaK4VyY.js.map