@argusoft/medplat-core 1.0.30 → 1.0.31
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/{AccessRights-xrday-L1.js → AccessRights-DUgY6ewy.js} +151 -143
- package/dist/AccessRights-DUgY6ewy.js.map +1 -0
- package/dist/AddMenuConfiguration-c6ZKiN0i.js +8898 -0
- package/dist/AddMenuConfiguration-c6ZKiN0i.js.map +1 -0
- package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js → BrandsPage-DMw2vT0u-BVhvhc6J.js} +14 -14
- package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js.map → BrandsPage-DMw2vT0u-BVhvhc6J.js.map} +1 -1
- package/dist/{CategoriesPage-BsS5IQh3-B03lWRY5.js → CategoriesPage-D3ihx9Gi-CT58g0ry.js} +112 -105
- package/dist/CategoriesPage-D3ihx9Gi-CT58g0ry.js.map +1 -0
- package/dist/{ChangePasswordModalCore-BPsJquTS.js → ChangePasswordModalCore-lQ9GamH1.js} +3 -3
- package/dist/{ChangePasswordModalCore-BPsJquTS.js.map → ChangePasswordModalCore-lQ9GamH1.js.map} +1 -1
- package/dist/ConditionConfig-BQBmBHaM.js +408 -0
- package/dist/ConditionConfig-BQBmBHaM.js.map +1 -0
- package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js → DashboardPage-asr2XDRu-uOOlX9Vq.js} +29 -29
- package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js.map → DashboardPage-asr2XDRu-uOOlX9Vq.js.map} +1 -1
- package/dist/EventConfig-BY2cgGyx.js +27 -0
- package/dist/{EventConfig-BmLemzX3.js.map → EventConfig-BY2cgGyx.js.map} +1 -1
- package/dist/EventConfigurations-CUPEN5BV.js +544 -0
- package/dist/EventConfigurations-CUPEN5BV.js.map +1 -0
- package/dist/EventConfigurations.css +1 -1
- package/dist/EventsExceptionModal-BX-ArkBE.js +188 -0
- package/dist/EventsExceptionModal-BX-ArkBE.js.map +1 -0
- package/dist/EventsUi-D6O9S7BK.js +258 -0
- package/dist/EventsUi-D6O9S7BK.js.map +1 -0
- package/dist/{FacilityPicker-BiZeupmP-CyPHmj6b.js → FacilityPicker-DYl_PDyt-Cbwo2tAY.js} +10 -10
- package/dist/{FacilityPicker-BiZeupmP-CyPHmj6b.js.map → FacilityPicker-DYl_PDyt-Cbwo2tAY.js.map} +1 -1
- package/dist/{FeatureMenu-DYJmDt7q.js → FeatureMenu-CHsBbw3W.js} +9 -5
- package/dist/FeatureMenu-CHsBbw3W.js.map +1 -0
- package/dist/{FhirServerList-DuTwnngN.js → FhirServerList-iXBPkRVF.js} +11 -11
- package/dist/{FhirServerList-DuTwnngN.js.map → FhirServerList-iXBPkRVF.js.map} +1 -1
- package/dist/{GrantPermissionModal-BDN66Atn.js → GrantPermissionModal-D7iNZd0M.js} +54 -51
- package/dist/GrantPermissionModal-D7iNZd0M.js.map +1 -0
- package/dist/{ImmunizationConfigurationBase-Di1KO3oW.js → ImmunizationConfigurationBase-aUtx0JEe.js} +3440 -3060
- package/dist/ImmunizationConfigurationBase-aUtx0JEe.js.map +1 -0
- package/dist/{InventoryPage-C_AxSy7A-QLvlL4rE.js → InventoryPage-DOotGZrj-CoPjOJEI.js} +10 -10
- package/dist/{InventoryPage-C_AxSy7A-QLvlL4rE.js.map → InventoryPage-DOotGZrj-CoPjOJEI.js.map} +1 -1
- package/dist/ManageEventConfiguration-DqW3krT6.js +1216 -0
- package/dist/ManageEventConfiguration-DqW3krT6.js.map +1 -0
- package/dist/ManageEventConfiguration.css +1 -1
- package/dist/{ManageUser-DCFkUMV9.js → ManageUser-DZltBina.js} +134 -134
- package/dist/{ManageUser-DCFkUMV9.js.map → ManageUser-DZltBina.js.map} +1 -1
- package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js → MemberProfileCard-D5CgkTdJ-D2NgDJl3.js} +25 -25
- package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js.map → MemberProfileCard-D5CgkTdJ-D2NgDJl3.js.map} +1 -1
- package/dist/MobileAnalytics-BLOionG_.js +17301 -0
- package/dist/MobileAnalytics-BLOionG_.js.map +1 -0
- package/dist/MobileMenuManagement-68Wijb0X.js +220 -0
- package/dist/MobileMenuManagement-68Wijb0X.js.map +1 -0
- package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js +752 -0
- package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js.map +1 -0
- package/dist/OtherTypeEventConfigModal-stNmuSv_.js +1812 -0
- package/dist/OtherTypeEventConfigModal-stNmuSv_.js.map +1 -0
- package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js → PaymentCreatePage-DfvSZ-kB-CckogYoe.js} +14 -14
- package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js.map → PaymentCreatePage-DfvSZ-kB-CckogYoe.js.map} +1 -1
- package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js → PaymentsPage-DMNjYWAJ-ChO9IXmk.js} +24 -24
- package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js.map → PaymentsPage-DMNjYWAJ-ChO9IXmk.js.map} +1 -1
- package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js → PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js} +2 -2
- package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js.map → PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js.map} +1 -1
- package/dist/{PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js → PickupCreatePage-B4O_-vE5-DoOo9nJO.js} +64 -64
- package/dist/{PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js.map → PickupCreatePage-B4O_-vE5-DoOo9nJO.js.map} +1 -1
- package/dist/{PickupsPage-Ctpghavs-CUp4uIZq.js → PickupsPage-D7zyioJB-bHKnARYw.js} +29 -29
- package/dist/PickupsPage-D7zyioJB-bHKnARYw.js.map +1 -0
- package/dist/{PmGuard-b10TGXEi-G3N0G_Wg.js → PmGuard-BZE-y4In-D_pUm5MP.js} +25 -25
- package/dist/{PmGuard-b10TGXEi-G3N0G_Wg.js.map → PmGuard-BZE-y4In-D_pUm5MP.js.map} +1 -1
- package/dist/{ProductEditPage-C1thoKHu-URQaZ6st.js → ProductEditPage-BVlVUCtD-BR-tJ5Wb.js} +475 -472
- package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js.map +1 -0
- package/dist/{ProductsPage-CupVmOD4-D45a_hf-.js → ProductsPage-DvNHIeZt-BoOOJJtk.js} +36 -35
- package/dist/ProductsPage-DvNHIeZt-BoOOJJtk.js.map +1 -0
- package/dist/{PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js → PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js} +214 -187
- package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js.map +1 -0
- package/dist/{PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js → PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js} +80 -80
- package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map +1 -0
- package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js → PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js} +29 -29
- package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js.map → PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js.map} +1 -1
- package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js → PurchasesPage-DgL5T6BY-DePUuE9l.js} +31 -31
- package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js.map → PurchasesPage-DgL5T6BY-DePUuE9l.js.map} +1 -1
- package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js → SaleCreatePage-CZnIOydv-DKBw-qp7.js} +15 -15
- package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js.map → SaleCreatePage-CZnIOydv-DKBw-qp7.js.map} +1 -1
- package/dist/{SalesPage-D18DCseD-BxktGDRQ.js → SalesPage-DPIRrC_O-M8rqnK7z.js} +62 -62
- package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js.map +1 -0
- package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js +676 -0
- package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js.map +1 -0
- package/dist/{ShowFlywayQuery-D1y_4A1u.js → ShowFlywayQuery-DIOUdYfG.js} +26 -19
- package/dist/{ShowFlywayQuery-D1y_4A1u.js.map → ShowFlywayQuery-DIOUdYfG.js.map} +1 -1
- package/dist/{StorageUnitsPage-7EqwuMOI-BwUso1Th.js → StorageUnitsPage-BDRkdCjW-UF64rf7q.js} +195 -188
- package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map +1 -0
- package/dist/{SubMenu-eEDhZUvh.js → SubMenu-BdMTYtC1.js} +5 -3
- package/dist/SubMenu-BdMTYtC1.js.map +1 -0
- package/dist/{TransactionsPage-DrH53pVS-BkhIGB6C.js → TransactionsPage-CqWTMNU8-Df6eGFDW.js} +48 -48
- package/dist/{TransactionsPage-DrH53pVS-BkhIGB6C.js.map → TransactionsPage-CqWTMNU8-Df6eGFDW.js.map} +1 -1
- package/dist/{TransferCreatePage-CuvoMrYH-DTTfHjz-.js → TransferCreatePage-DF7FZaTJ-CL79V3aR.js} +8 -8
- package/dist/{TransferCreatePage-CuvoMrYH-DTTfHjz-.js.map → TransferCreatePage-DF7FZaTJ-CL79V3aR.js.map} +1 -1
- package/dist/{TransfersPage-Cf701t8s-BBbN7cBf.js → TransfersPage-CGrRFaBF-cTwBUv0o.js} +69 -69
- package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js.map +1 -0
- package/dist/TypeConfiguration-JbRCN6GR.js +114 -0
- package/dist/TypeConfiguration-JbRCN6GR.js.map +1 -0
- package/dist/{UserList-DgPxsnj2.js → UserList-L41Xw0Q6.js} +2 -2
- package/dist/{UserList-DgPxsnj2.js.map → UserList-L41Xw0Q6.js.map} +1 -1
- package/dist/Users-CsJ08Kjm.js +40 -0
- package/dist/{Users-Bpc4Sazd.js.map → Users-CsJ08Kjm.js.map} +1 -1
- package/dist/{VialsPage-8oAc1yFv-Cl3FUXBJ.js → VialsPage-rvvXjgZG-Oqo1v6kQ.js} +35 -35
- package/dist/{VialsPage-8oAc1yFv-Cl3FUXBJ.js.map → VialsPage-rvvXjgZG-Oqo1v6kQ.js.map} +1 -1
- package/dist/{constants-ClZJY2x1-MkSWn6TZ.js → constants-DpXnLsAB-D6lN5cjK.js} +58 -47
- package/dist/constants-DpXnLsAB-D6lN5cjK.js.map +1 -0
- package/dist/{dashboardLayoutUtils-D1xCAxp3.js → dashboardLayoutUtils-CJivzaU1.js} +95 -92
- package/dist/dashboardLayoutUtils-CJivzaU1.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.lib-ETRQOzvE.js +894 -0
- package/dist/index.lib-ETRQOzvE.js.map +1 -0
- package/dist/listValueStore-BFQtDYIR-Bj0yX145.js +36 -0
- package/dist/listValueStore-BFQtDYIR-Bj0yX145.js.map +1 -0
- package/package.json +1 -1
- package/dist/AccessRights-xrday-L1.js.map +0 -1
- package/dist/AddMenuConfiguration-e5BVXhmw.js +0 -8547
- package/dist/AddMenuConfiguration-e5BVXhmw.js.map +0 -1
- package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js.map +0 -1
- package/dist/ConditionConfig-Ddz9halE.js +0 -395
- package/dist/ConditionConfig-Ddz9halE.js.map +0 -1
- package/dist/ConditionConfig.css +0 -1
- package/dist/EventConfig-BmLemzX3.js +0 -26
- package/dist/EventConfigurations-Bzh1qWXU.js +0 -450
- package/dist/EventConfigurations-Bzh1qWXU.js.map +0 -1
- package/dist/EventsExceptionModal-B2SRrnB1.js +0 -200
- package/dist/EventsExceptionModal-B2SRrnB1.js.map +0 -1
- package/dist/EventsSkeleton-BIcPks4T.js +0 -61
- package/dist/EventsSkeleton-BIcPks4T.js.map +0 -1
- package/dist/FeatureMenu-DYJmDt7q.js.map +0 -1
- package/dist/GrantPermissionModal-BDN66Atn.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-Di1KO3oW.js.map +0 -1
- package/dist/ManageEventConfiguration-CoYcpjR9.js +0 -1085
- package/dist/ManageEventConfiguration-CoYcpjR9.js.map +0 -1
- package/dist/MobileAnalytics-pQoE8cG1.js +0 -16888
- package/dist/MobileAnalytics-pQoE8cG1.js.map +0 -1
- package/dist/MobileMenuManagement-Cf8IZlla.js +0 -108
- package/dist/MobileMenuManagement-Cf8IZlla.js.map +0 -1
- package/dist/MobileTypeEventConfigModal-BeveaX0C.js +0 -783
- package/dist/MobileTypeEventConfigModal-BeveaX0C.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-CM6VkdmY.js +0 -2046
- package/dist/OtherTypeEventConfigModal-CM6VkdmY.js.map +0 -1
- package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js.map +0 -1
- package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js.map +0 -1
- package/dist/ProductsPage-CupVmOD4-D45a_hf-.js.map +0 -1
- package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js.map +0 -1
- package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js.map +0 -1
- package/dist/SalesPage-D18DCseD-BxktGDRQ.js.map +0 -1
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js +0 -747
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js.map +0 -1
- package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map +0 -1
- package/dist/SubMenu-eEDhZUvh.js.map +0 -1
- package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js.map +0 -1
- package/dist/TypeConfiguration-3O6ABrK-.js +0 -117
- package/dist/TypeConfiguration-3O6ABrK-.js.map +0 -1
- package/dist/Users-Bpc4Sazd.js +0 -41
- package/dist/constants-ClZJY2x1-MkSWn6TZ.js.map +0 -1
- package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +0 -1
- package/dist/index.lib-Dn8PMkeD.js +0 -862
- package/dist/index.lib-Dn8PMkeD.js.map +0 -1
package/dist/{StorageUnitsPage-7EqwuMOI-BwUso1Th.js → StorageUnitsPage-BDRkdCjW-UF64rf7q.js}
RENAMED
|
@@ -1,28 +1,32 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { v as
|
|
5
|
-
import { n as
|
|
6
|
-
import { X as
|
|
7
|
-
import {
|
|
1
|
+
import { B as Ve, z as Ye, V as je, G as ge, g as Ge, x as Qe, k as R, _ as Ze, v as _e, b as He } from "./ImmunizationConfigurationBase-aUtx0JEe.js";
|
|
2
|
+
import { k as Ce } from "./constants-DpXnLsAB-D6lN5cjK.js";
|
|
3
|
+
import { t as Xe } from "./format-UOyOu75i-D0GyylyQ.js";
|
|
4
|
+
import { v as Je, i as Ke, r as L, C as ei, g as ii, _ as ti } from "./validation-BzlHnL-r-CCJm2utQ.js";
|
|
5
|
+
import { n as fe } from "./useFieldErrors-hDG8ox_x-DbSAzrGo.js";
|
|
6
|
+
import { X as ni, Y as ri, Z as ai, Q as li, q as oi } from "./PmGuard-BZE-y4In-D_pUm5MP.js";
|
|
7
|
+
import { m as si } from "./listValueStore-BFQtDYIR-Bj0yX145.js";
|
|
8
|
+
import { d as ui } from "./FacilityPicker-DYl_PDyt-Cbwo2tAY.js";
|
|
8
9
|
import { useState as p } from "react";
|
|
9
|
-
import { jsxs as n, jsx as i, Fragment as
|
|
10
|
-
import { Box as
|
|
11
|
-
import { v4 as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
10
|
+
import { jsxs as n, jsx as i, Fragment as j } from "react/jsx-runtime";
|
|
11
|
+
import { Box as Te, Alert as A, TableHead as ye, TableRow as B, TableCell as a, TableBody as we, Skeleton as di, Button as g, Typography as w, Chip as ve, Stack as v, FormControlLabel as xe, Dialog as be, DialogTitle as Me, DialogContent as ke, Divider as ci, TextField as y, Checkbox as pi, DialogActions as Ie, Table as mi } from "@mui/material";
|
|
12
|
+
import { v4 as Ne } from "uuid";
|
|
13
|
+
import $e from "@mui/icons-material/AddRounded";
|
|
14
|
+
import hi from "@mui/icons-material/RefreshRounded";
|
|
15
|
+
import gi from "@/views/custom-components/CustomSwitch";
|
|
16
|
+
import Ci from "@mui/icons-material/WarehouseRounded";
|
|
17
|
+
import fi from "@mui/icons-material/CheckCircleRounded";
|
|
18
|
+
import Ti from "@mui/icons-material/DeviceThermostatRounded";
|
|
18
19
|
import Ae from "@mui/icons-material/WarningAmberRounded";
|
|
19
|
-
var
|
|
20
|
+
var yi = [{
|
|
20
21
|
value: "FACILITY",
|
|
21
22
|
label: "Facility"
|
|
22
23
|
}];
|
|
23
|
-
function
|
|
24
|
-
var
|
|
25
|
-
let W =
|
|
24
|
+
function Di() {
|
|
25
|
+
var ce, pe, me, he;
|
|
26
|
+
let W = ni().has("update.manage.productManagement.storageUnit"), { storageUnitTypes: q } = si(), Be = (e) => {
|
|
27
|
+
var s;
|
|
28
|
+
return e ? ((s = q.find((r) => r.value === e)) == null ? void 0 : s.label) ?? Ce(e) : "";
|
|
29
|
+
}, [x, We] = p([]), [qe, D] = p({}), [G, Q] = p(!1), [Z, b] = p(""), [Fe, k] = p(!1), [F, _] = p(null), [t, m] = p(X()), [H, Se] = p(!1), l = fe(), E = fe();
|
|
26
30
|
function X() {
|
|
27
31
|
return {
|
|
28
32
|
id: "",
|
|
@@ -30,7 +34,7 @@ function qi() {
|
|
|
30
34
|
ownerId: "",
|
|
31
35
|
unitName: "",
|
|
32
36
|
unitCode: "",
|
|
33
|
-
unitType: "
|
|
37
|
+
unitType: "",
|
|
34
38
|
make: "",
|
|
35
39
|
model: "",
|
|
36
40
|
comments: "",
|
|
@@ -39,52 +43,52 @@ function qi() {
|
|
|
39
43
|
isActive: !0
|
|
40
44
|
};
|
|
41
45
|
}
|
|
42
|
-
async function
|
|
43
|
-
var e,
|
|
46
|
+
async function S() {
|
|
47
|
+
var e, s;
|
|
44
48
|
Q(!0), b("");
|
|
45
49
|
try {
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
let
|
|
49
|
-
if (
|
|
50
|
+
let r = await Ge({ activeOnly: !1 });
|
|
51
|
+
We(r);
|
|
52
|
+
let u = Array.from(new Set(r.map((T) => T.ownerId).filter(Boolean)));
|
|
53
|
+
if (u.length === 0) D({});
|
|
50
54
|
else try {
|
|
51
|
-
let T = await
|
|
55
|
+
let T = await Qe(u), h = {};
|
|
52
56
|
T.forEach((c) => {
|
|
53
57
|
h[c.id] = c.name;
|
|
54
|
-
}),
|
|
58
|
+
}), D(h);
|
|
55
59
|
} catch {
|
|
56
|
-
|
|
60
|
+
D({});
|
|
57
61
|
}
|
|
58
|
-
} catch (
|
|
59
|
-
let
|
|
60
|
-
b(
|
|
61
|
-
message:
|
|
62
|
+
} catch (r) {
|
|
63
|
+
let u = ((s = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : s.message) ?? (r == null ? void 0 : r.message) ?? "Failed to load storage units";
|
|
64
|
+
b(u), R({
|
|
65
|
+
message: u,
|
|
62
66
|
type: "error"
|
|
63
67
|
});
|
|
64
68
|
} finally {
|
|
65
69
|
Q(!1);
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
ri("view.manage.productManagement.storageUnit", () => {
|
|
73
|
+
S();
|
|
70
74
|
}, []);
|
|
71
|
-
function
|
|
72
|
-
return
|
|
75
|
+
function ze(e) {
|
|
76
|
+
return qe[e] ?? e;
|
|
73
77
|
}
|
|
74
78
|
function J() {
|
|
75
79
|
_(null), m({
|
|
76
80
|
...X(),
|
|
77
|
-
id:
|
|
81
|
+
id: Ne()
|
|
78
82
|
}), l.reset(), b(""), k(!0);
|
|
79
83
|
}
|
|
80
|
-
function
|
|
84
|
+
function Ue(e) {
|
|
81
85
|
_(e), l.reset(), b(""), m({
|
|
82
86
|
id: e.id,
|
|
83
87
|
ownerType: e.ownerType ?? "FACILITY",
|
|
84
88
|
ownerId: e.ownerId ?? "",
|
|
85
89
|
unitName: e.unitName ?? "",
|
|
86
90
|
unitCode: e.unitCode ?? "",
|
|
87
|
-
unitType: e.unitType ?? "
|
|
91
|
+
unitType: e.unitType ?? "",
|
|
88
92
|
make: e.make ?? "",
|
|
89
93
|
model: e.model ?? "",
|
|
90
94
|
comments: e.comments ?? "",
|
|
@@ -93,112 +97,115 @@ function qi() {
|
|
|
93
97
|
isActive: e.isActive !== !1
|
|
94
98
|
}), k(!0);
|
|
95
99
|
}
|
|
96
|
-
let K =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
let K = Je(t.operatingTempMinCelsius, t.operatingTempMaxCelsius), ee = Ke(t.unitCode, { required: !0 }), ie = (t.unitCode || "").trim().toUpperCase(), Re = !ee && ie && t.ownerId && x.some((e) => e.id !== t.id && e.ownerId === t.ownerId && (e.unitCode || "").toUpperCase() === ie), Le = t.unitType && !q.some((e) => e.value === t.unitType) ? [...q, {
|
|
101
|
+
value: t.unitType,
|
|
102
|
+
label: Ce(t.unitType)
|
|
103
|
+
}] : q, o = {
|
|
104
|
+
ownerType: L(t.ownerType, "Owner type"),
|
|
105
|
+
ownerId: L(t.ownerId, "Facility"),
|
|
106
|
+
unitName: L(t.unitName, "Name"),
|
|
107
|
+
unitCode: ee || (Re ? "Code is already in use for this facility." : ""),
|
|
108
|
+
unitType: L(t.unitType, "Type"),
|
|
102
109
|
operatingTempMinCelsius: K.min,
|
|
103
110
|
operatingTempMaxCelsius: K.max
|
|
104
|
-
},
|
|
105
|
-
async function
|
|
106
|
-
var e,
|
|
107
|
-
if (!
|
|
111
|
+
}, te = ei(o);
|
|
112
|
+
async function De() {
|
|
113
|
+
var e, s, r, u, T;
|
|
114
|
+
if (!te) {
|
|
108
115
|
l.markAllTouched(), b("Please fix the highlighted fields.");
|
|
109
116
|
return;
|
|
110
117
|
}
|
|
111
118
|
try {
|
|
112
|
-
await
|
|
119
|
+
await Ze({
|
|
113
120
|
id: t.id,
|
|
114
121
|
ownerId: t.ownerId,
|
|
115
122
|
unitName: t.unitName.trim(),
|
|
116
123
|
unitCode: t.unitCode.trim().toUpperCase(),
|
|
117
124
|
unitType: t.unitType,
|
|
118
125
|
make: ((e = t.make) == null ? void 0 : e.trim()) || null,
|
|
119
|
-
model: ((
|
|
120
|
-
comments: ((
|
|
126
|
+
model: ((s = t.model) == null ? void 0 : s.trim()) || null,
|
|
127
|
+
comments: ((r = t.comments) == null ? void 0 : r.trim()) || null,
|
|
121
128
|
operatingTempMinCelsius: t.operatingTempMinCelsius === "" ? null : Number(t.operatingTempMinCelsius),
|
|
122
129
|
operatingTempMaxCelsius: t.operatingTempMaxCelsius === "" ? null : Number(t.operatingTempMaxCelsius),
|
|
123
130
|
isActive: t.isActive
|
|
124
|
-
}),
|
|
131
|
+
}), R({
|
|
125
132
|
message: "Storage unit saved.",
|
|
126
133
|
type: "success"
|
|
127
|
-
}), k(!1), await
|
|
134
|
+
}), k(!1), await S();
|
|
128
135
|
} catch (h) {
|
|
129
|
-
let c = ((T = (
|
|
130
|
-
b(c),
|
|
136
|
+
let c = ((T = (u = h == null ? void 0 : h.response) == null ? void 0 : u.data) == null ? void 0 : T.message) ?? (h == null ? void 0 : h.message) ?? "Failed to save storage unit";
|
|
137
|
+
b(c), R({
|
|
131
138
|
message: c,
|
|
132
139
|
type: "error"
|
|
133
140
|
});
|
|
134
141
|
}
|
|
135
142
|
}
|
|
136
|
-
let [
|
|
143
|
+
let [d, O] = p({
|
|
137
144
|
open: !1,
|
|
138
145
|
unit: null
|
|
139
|
-
}), [M,
|
|
146
|
+
}), [M, P] = p({
|
|
140
147
|
temperatureCelsius: "",
|
|
141
148
|
notes: ""
|
|
142
|
-
}), [
|
|
143
|
-
function
|
|
149
|
+
}), [ne, V] = p("input"), [C, re] = p(null), [f, z] = p(!1), [ae, I] = p("");
|
|
150
|
+
function Ee(e) {
|
|
144
151
|
O({
|
|
145
152
|
open: !0,
|
|
146
153
|
unit: e
|
|
147
|
-
}),
|
|
154
|
+
}), P({
|
|
148
155
|
temperatureCelsius: "",
|
|
149
156
|
notes: ""
|
|
150
|
-
}),
|
|
157
|
+
}), V("input"), re(null), I(""), E.reset();
|
|
151
158
|
}
|
|
152
|
-
function
|
|
159
|
+
function le() {
|
|
153
160
|
f || O({
|
|
154
161
|
open: !1,
|
|
155
162
|
unit: null
|
|
156
163
|
});
|
|
157
164
|
}
|
|
158
|
-
let N = M.temperatureCelsius,
|
|
159
|
-
async function
|
|
160
|
-
var e,
|
|
161
|
-
if (!(!
|
|
162
|
-
|
|
165
|
+
let N = M.temperatureCelsius, Y = ii(N, { required: !0 }), oe = ti(N, (ce = d.unit) == null ? void 0 : ce.operatingTempMinCelsius, (pe = d.unit) == null ? void 0 : pe.operatingTempMaxCelsius), se = !Y, ue = !!Y && (N !== "" || E.show("temperatureCelsius")), Oe = ((me = d.unit) == null ? void 0 : me.operatingTempMinCelsius) != null && ((he = d.unit) == null ? void 0 : he.operatingTempMaxCelsius) != null ? ` This unit operates between ${d.unit.operatingTempMinCelsius}°C and ${d.unit.operatingTempMaxCelsius}°C.` : "";
|
|
166
|
+
async function Pe() {
|
|
167
|
+
var e, s;
|
|
168
|
+
if (!(!d.unit || !se)) {
|
|
169
|
+
z(!0), I("");
|
|
163
170
|
try {
|
|
164
|
-
|
|
165
|
-
} catch (
|
|
166
|
-
I(((
|
|
171
|
+
re(await _e(d.unit.id, Number(N))), V("result");
|
|
172
|
+
} catch (r) {
|
|
173
|
+
I(((s = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : s.message) ?? (r == null ? void 0 : r.message) ?? "Failed to evaluate temperature");
|
|
167
174
|
} finally {
|
|
168
|
-
|
|
175
|
+
z(!1);
|
|
169
176
|
}
|
|
170
177
|
}
|
|
171
178
|
}
|
|
172
|
-
async function
|
|
173
|
-
var
|
|
174
|
-
if (
|
|
175
|
-
|
|
179
|
+
async function de(e) {
|
|
180
|
+
var s, r, u, T, h;
|
|
181
|
+
if (d.unit) {
|
|
182
|
+
z(!0), I("");
|
|
176
183
|
try {
|
|
177
|
-
let c = ((
|
|
178
|
-
id:
|
|
184
|
+
let c = ((u = (r = await He(d.unit.id, {
|
|
185
|
+
id: Ne(),
|
|
179
186
|
temperatureCelsius: Number(N),
|
|
180
187
|
wasteOutOfRange: e,
|
|
181
|
-
notes: ((
|
|
182
|
-
})) == null ? void 0 :
|
|
183
|
-
|
|
188
|
+
notes: ((s = M.notes) == null ? void 0 : s.trim()) || null
|
|
189
|
+
})) == null ? void 0 : r.affectedBatches) == null ? void 0 : u.length) ?? 0;
|
|
190
|
+
R({
|
|
184
191
|
message: e && c > 0 ? `Reading logged. ${c} ${c === 1 ? "batch" : "batches"} marked as wastage.` : "Temperature reading logged.",
|
|
185
192
|
type: "success"
|
|
186
193
|
}), O({
|
|
187
194
|
open: !1,
|
|
188
195
|
unit: null
|
|
189
|
-
}), await
|
|
196
|
+
}), await S();
|
|
190
197
|
} catch (c) {
|
|
191
198
|
I(((h = (T = c == null ? void 0 : c.response) == null ? void 0 : T.data) == null ? void 0 : h.message) ?? (c == null ? void 0 : c.message) ?? "Failed to log temperature");
|
|
192
199
|
} finally {
|
|
193
|
-
|
|
200
|
+
z(!1);
|
|
194
201
|
}
|
|
195
202
|
}
|
|
196
203
|
}
|
|
197
|
-
let
|
|
198
|
-
return /* @__PURE__ */ n(
|
|
204
|
+
let $ = (C == null ? void 0 : C.affectedBatches) ?? [], U = H ? x : x.filter((e) => e.isActive !== !1);
|
|
205
|
+
return /* @__PURE__ */ n(Te, { children: [/* @__PURE__ */ i(ai, {}), /* @__PURE__ */ n(li, {
|
|
199
206
|
perm: "view.manage.productManagement.storageUnit",
|
|
200
207
|
children: [
|
|
201
|
-
/* @__PURE__ */ n(
|
|
208
|
+
/* @__PURE__ */ n(oi, {
|
|
202
209
|
title: "Storage Units",
|
|
203
210
|
subtitle: "Cold-chain equipment for storing vaccine and product batches. Currently managed per facility.",
|
|
204
211
|
chips: ["Catalog", "Facility-owned"],
|
|
@@ -207,28 +214,28 @@ function qi() {
|
|
|
207
214
|
spacing: 1,
|
|
208
215
|
children: [/* @__PURE__ */ i(g, {
|
|
209
216
|
variant: "outlined",
|
|
210
|
-
startIcon: /* @__PURE__ */ i(
|
|
211
|
-
onClick: () => void
|
|
217
|
+
startIcon: /* @__PURE__ */ i(hi, {}),
|
|
218
|
+
onClick: () => void S(),
|
|
212
219
|
children: "Refresh"
|
|
213
220
|
}), W ? /* @__PURE__ */ i(g, {
|
|
214
221
|
variant: "contained",
|
|
215
|
-
startIcon: /* @__PURE__ */ i(
|
|
222
|
+
startIcon: /* @__PURE__ */ i($e, {}),
|
|
216
223
|
onClick: J,
|
|
217
224
|
children: "New Storage Unit"
|
|
218
225
|
}) : null]
|
|
219
226
|
}),
|
|
220
|
-
children: [Z ? /* @__PURE__ */ i(
|
|
227
|
+
children: [Z ? /* @__PURE__ */ i(A, {
|
|
221
228
|
severity: "error",
|
|
222
229
|
sx: { mb: 2 },
|
|
223
230
|
children: Z
|
|
224
|
-
}) : null, /* @__PURE__ */ i(
|
|
231
|
+
}) : null, /* @__PURE__ */ i(Ve, {
|
|
225
232
|
eyebrow: "Cold-chain network",
|
|
226
233
|
title: "Storage units",
|
|
227
|
-
subtitle:
|
|
228
|
-
actions: /* @__PURE__ */ i(
|
|
229
|
-
control: /* @__PURE__ */ i(
|
|
234
|
+
subtitle: G ? "Loading…" : `${U.length} ${U.length === 1 ? "unit" : "units"}`,
|
|
235
|
+
actions: /* @__PURE__ */ i(xe, {
|
|
236
|
+
control: /* @__PURE__ */ i(gi, {
|
|
230
237
|
checked: H,
|
|
231
|
-
onChange: (e) =>
|
|
238
|
+
onChange: (e) => Se(e.target.checked)
|
|
232
239
|
}),
|
|
233
240
|
label: /* @__PURE__ */ i(w, {
|
|
234
241
|
variant: "body2",
|
|
@@ -241,33 +248,33 @@ function qi() {
|
|
|
241
248
|
ml: 0
|
|
242
249
|
}
|
|
243
250
|
}),
|
|
244
|
-
children: /* @__PURE__ */ n(
|
|
245
|
-
/* @__PURE__ */ i(
|
|
246
|
-
/* @__PURE__ */ i(
|
|
247
|
-
/* @__PURE__ */ i(
|
|
248
|
-
/* @__PURE__ */ i(
|
|
249
|
-
/* @__PURE__ */ i(
|
|
250
|
-
/* @__PURE__ */ i(
|
|
251
|
-
/* @__PURE__ */ i(
|
|
251
|
+
children: /* @__PURE__ */ n(Ye, { children: [/* @__PURE__ */ i(ye, { children: /* @__PURE__ */ n(B, { children: [
|
|
252
|
+
/* @__PURE__ */ i(a, { children: "Code" }),
|
|
253
|
+
/* @__PURE__ */ i(a, { children: "Name" }),
|
|
254
|
+
/* @__PURE__ */ i(a, { children: "Facility" }),
|
|
255
|
+
/* @__PURE__ */ i(a, { children: "Type" }),
|
|
256
|
+
/* @__PURE__ */ i(a, { children: "Operating range" }),
|
|
257
|
+
/* @__PURE__ */ i(a, { children: "Status" }),
|
|
258
|
+
/* @__PURE__ */ i(a, {
|
|
252
259
|
align: "right",
|
|
253
260
|
children: "Action"
|
|
254
261
|
})
|
|
255
|
-
] }) }), /* @__PURE__ */ i(
|
|
262
|
+
] }) }), /* @__PURE__ */ i(we, { children: G ? Array.from({ length: 4 }).map((e, s) => /* @__PURE__ */ i(B, { children: Array.from({ length: 7 }).map((r, u) => /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(di, { height: 22 }) }, u)) }, s)) : U.length === 0 ? /* @__PURE__ */ i(je, {
|
|
256
263
|
colSpan: 7,
|
|
257
|
-
icon:
|
|
264
|
+
icon: Ci,
|
|
258
265
|
title: x.length === 0 ? "No storage units yet" : "No active storage units",
|
|
259
266
|
hint: x.length === 0 ? "You need storage equipment to keep vaccine batches safe." : "Turn on “Show inactive” to see deactivated storage units.",
|
|
260
267
|
action: x.length === 0 && W ? /* @__PURE__ */ i(g, {
|
|
261
268
|
variant: "contained",
|
|
262
269
|
size: "small",
|
|
263
|
-
startIcon: /* @__PURE__ */ i(
|
|
270
|
+
startIcon: /* @__PURE__ */ i($e, {}),
|
|
264
271
|
onClick: J,
|
|
265
272
|
children: "Create first unit"
|
|
266
273
|
}) : null
|
|
267
|
-
}) :
|
|
274
|
+
}) : U.map((e) => /* @__PURE__ */ n(B, {
|
|
268
275
|
hover: !0,
|
|
269
276
|
children: [
|
|
270
|
-
/* @__PURE__ */ i(
|
|
277
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(Te, {
|
|
271
278
|
component: "span",
|
|
272
279
|
sx: {
|
|
273
280
|
display: "inline-flex",
|
|
@@ -281,19 +288,19 @@ function qi() {
|
|
|
281
288
|
},
|
|
282
289
|
children: e.unitCode
|
|
283
290
|
}) }),
|
|
284
|
-
/* @__PURE__ */ i(
|
|
291
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(w, {
|
|
285
292
|
variant: "body2",
|
|
286
293
|
sx: { fontWeight: 700 },
|
|
287
294
|
children: e.unitName
|
|
288
295
|
}) }),
|
|
289
|
-
/* @__PURE__ */ i(
|
|
296
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(w, {
|
|
290
297
|
variant: "caption",
|
|
291
298
|
color: "text.secondary",
|
|
292
|
-
children:
|
|
299
|
+
children: ze(e.ownerId)
|
|
293
300
|
}) }),
|
|
294
|
-
/* @__PURE__ */ i(
|
|
301
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(ve, {
|
|
295
302
|
size: "small",
|
|
296
|
-
label:
|
|
303
|
+
label: Be(e.unitType),
|
|
297
304
|
variant: "outlined",
|
|
298
305
|
sx: {
|
|
299
306
|
fontWeight: 700,
|
|
@@ -301,7 +308,7 @@ function qi() {
|
|
|
301
308
|
height: 22
|
|
302
309
|
}
|
|
303
310
|
}) }),
|
|
304
|
-
/* @__PURE__ */ i(
|
|
311
|
+
/* @__PURE__ */ i(a, { children: e.operatingTempMinCelsius != null && e.operatingTempMaxCelsius != null ? /* @__PURE__ */ n(w, {
|
|
305
312
|
variant: "caption",
|
|
306
313
|
sx: {
|
|
307
314
|
fontWeight: 700,
|
|
@@ -318,7 +325,7 @@ function qi() {
|
|
|
318
325
|
color: "text.disabled",
|
|
319
326
|
children: "—"
|
|
320
327
|
}) }),
|
|
321
|
-
/* @__PURE__ */ i(
|
|
328
|
+
/* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(ve, {
|
|
322
329
|
size: "small",
|
|
323
330
|
label: e.isActive ? "Active" : "Inactive",
|
|
324
331
|
color: e.isActive ? "success" : "default",
|
|
@@ -329,7 +336,7 @@ function qi() {
|
|
|
329
336
|
height: 22
|
|
330
337
|
}
|
|
331
338
|
}) }),
|
|
332
|
-
/* @__PURE__ */ i(
|
|
339
|
+
/* @__PURE__ */ i(a, {
|
|
333
340
|
align: "right",
|
|
334
341
|
children: /* @__PURE__ */ n(v, {
|
|
335
342
|
direction: "row",
|
|
@@ -339,13 +346,13 @@ function qi() {
|
|
|
339
346
|
size: "small",
|
|
340
347
|
variant: "outlined",
|
|
341
348
|
color: "info",
|
|
342
|
-
startIcon: /* @__PURE__ */ i(
|
|
343
|
-
onClick: () =>
|
|
349
|
+
startIcon: /* @__PURE__ */ i(Ti, {}),
|
|
350
|
+
onClick: () => Ee(e),
|
|
344
351
|
children: "Log temp"
|
|
345
352
|
}) : null, W ? /* @__PURE__ */ i(g, {
|
|
346
353
|
size: "small",
|
|
347
354
|
variant: "outlined",
|
|
348
|
-
onClick: () =>
|
|
355
|
+
onClick: () => Ue(e),
|
|
349
356
|
children: "Edit"
|
|
350
357
|
}) : null]
|
|
351
358
|
})
|
|
@@ -354,20 +361,20 @@ function qi() {
|
|
|
354
361
|
}, e.id)) })] })
|
|
355
362
|
})]
|
|
356
363
|
}),
|
|
357
|
-
/* @__PURE__ */ n(
|
|
358
|
-
open:
|
|
364
|
+
/* @__PURE__ */ n(be, {
|
|
365
|
+
open: Fe,
|
|
359
366
|
onClose: () => k(!1),
|
|
360
367
|
fullWidth: !0,
|
|
361
368
|
maxWidth: "sm",
|
|
362
369
|
children: [
|
|
363
|
-
/* @__PURE__ */ i(
|
|
364
|
-
/* @__PURE__ */ i(
|
|
370
|
+
/* @__PURE__ */ i(Me, { children: F ? "Edit Storage Unit" : "New Storage Unit" }),
|
|
371
|
+
/* @__PURE__ */ i(ke, {
|
|
365
372
|
dividers: !0,
|
|
366
373
|
children: /* @__PURE__ */ n(v, {
|
|
367
374
|
spacing: 2,
|
|
368
375
|
sx: { pt: 1 },
|
|
369
376
|
children: [
|
|
370
|
-
/* @__PURE__ */ i(
|
|
377
|
+
/* @__PURE__ */ i(ge, {
|
|
371
378
|
label: "Owner Type",
|
|
372
379
|
required: !0,
|
|
373
380
|
disabled: !!F,
|
|
@@ -380,9 +387,9 @@ function qi() {
|
|
|
380
387
|
onBlur: l.onBlur("ownerType"),
|
|
381
388
|
error: l.show("ownerType") && !!o.ownerType,
|
|
382
389
|
helperText: l.show("ownerType") && o.ownerType ? o.ownerType : "Only Facility is available currently.",
|
|
383
|
-
options:
|
|
390
|
+
options: yi
|
|
384
391
|
}),
|
|
385
|
-
/* @__PURE__ */ i(
|
|
392
|
+
/* @__PURE__ */ i(ui, {
|
|
386
393
|
required: !0,
|
|
387
394
|
disabled: !!F || t.ownerType !== "FACILITY",
|
|
388
395
|
value: t.ownerId,
|
|
@@ -394,7 +401,7 @@ function qi() {
|
|
|
394
401
|
error: l.show("ownerId") && !!o.ownerId,
|
|
395
402
|
helperText: l.show("ownerId") && o.ownerId ? o.ownerId : "Search by name. The owner cannot be changed once created."
|
|
396
403
|
}),
|
|
397
|
-
/* @__PURE__ */ i(
|
|
404
|
+
/* @__PURE__ */ i(ci, {}),
|
|
398
405
|
/* @__PURE__ */ i(y, {
|
|
399
406
|
required: !0,
|
|
400
407
|
label: "Unit name",
|
|
@@ -402,11 +409,11 @@ function qi() {
|
|
|
402
409
|
fullWidth: !0,
|
|
403
410
|
value: t.unitName,
|
|
404
411
|
onChange: (e) => {
|
|
405
|
-
let
|
|
406
|
-
m((
|
|
407
|
-
...
|
|
408
|
-
unitName:
|
|
409
|
-
unitCode: F ?
|
|
412
|
+
let s = e.target.value, r = s.split(/\s+/).filter(Boolean).map((u) => u[0]).join("").toUpperCase().replace(/[^A-Z0-9_]/g, "");
|
|
413
|
+
m((u) => ({
|
|
414
|
+
...u,
|
|
415
|
+
unitName: s,
|
|
416
|
+
unitCode: F ? u.unitCode : r
|
|
410
417
|
}));
|
|
411
418
|
},
|
|
412
419
|
onBlur: l.onBlur("unitName"),
|
|
@@ -427,7 +434,7 @@ function qi() {
|
|
|
427
434
|
error: l.show("unitCode") && !!o.unitCode,
|
|
428
435
|
helperText: l.show("unitCode") && o.unitCode ? o.unitCode : "Auto-generated from the name. Edit if needed to make it unique within this facility."
|
|
429
436
|
}),
|
|
430
|
-
/* @__PURE__ */ i(
|
|
437
|
+
/* @__PURE__ */ i(ge, {
|
|
431
438
|
label: "Type",
|
|
432
439
|
required: !0,
|
|
433
440
|
value: t.unitType,
|
|
@@ -437,7 +444,7 @@ function qi() {
|
|
|
437
444
|
}),
|
|
438
445
|
onBlur: l.onBlur("unitType"),
|
|
439
446
|
error: l.show("unitType") && !!o.unitType,
|
|
440
|
-
options:
|
|
447
|
+
options: Le
|
|
441
448
|
}),
|
|
442
449
|
/* @__PURE__ */ n(v, {
|
|
443
450
|
direction: "row",
|
|
@@ -518,8 +525,8 @@ function qi() {
|
|
|
518
525
|
}),
|
|
519
526
|
helperText: "Notes about placement, maintenance schedule, or other details."
|
|
520
527
|
}),
|
|
521
|
-
/* @__PURE__ */ i(
|
|
522
|
-
control: /* @__PURE__ */ i(
|
|
528
|
+
/* @__PURE__ */ i(xe, {
|
|
529
|
+
control: /* @__PURE__ */ i(pi, {
|
|
523
530
|
checked: t.isActive,
|
|
524
531
|
onChange: (e) => m({
|
|
525
532
|
...t,
|
|
@@ -531,39 +538,39 @@ function qi() {
|
|
|
531
538
|
]
|
|
532
539
|
})
|
|
533
540
|
}),
|
|
534
|
-
/* @__PURE__ */ n(
|
|
541
|
+
/* @__PURE__ */ n(Ie, { children: [/* @__PURE__ */ i(g, {
|
|
535
542
|
onClick: () => k(!1),
|
|
536
543
|
children: "Cancel"
|
|
537
544
|
}), /* @__PURE__ */ i(g, {
|
|
538
545
|
variant: "contained",
|
|
539
|
-
disabled: !
|
|
540
|
-
onClick: () => void
|
|
546
|
+
disabled: !te,
|
|
547
|
+
onClick: () => void De(),
|
|
541
548
|
children: "Save"
|
|
542
549
|
})] })
|
|
543
550
|
]
|
|
544
551
|
}),
|
|
545
|
-
/* @__PURE__ */ n(
|
|
546
|
-
open:
|
|
547
|
-
onClose:
|
|
552
|
+
/* @__PURE__ */ n(be, {
|
|
553
|
+
open: d.open,
|
|
554
|
+
onClose: le,
|
|
548
555
|
fullWidth: !0,
|
|
549
556
|
maxWidth: "sm",
|
|
550
557
|
children: [
|
|
551
|
-
/* @__PURE__ */ n(
|
|
558
|
+
/* @__PURE__ */ n(Me, { children: ["Log Temperature", d.unit ? /* @__PURE__ */ n(w, {
|
|
552
559
|
variant: "caption",
|
|
553
560
|
color: "text.secondary",
|
|
554
561
|
sx: {
|
|
555
562
|
display: "block",
|
|
556
563
|
fontWeight: 600
|
|
557
564
|
},
|
|
558
|
-
children: [
|
|
565
|
+
children: [d.unit.unitName, d.unit.operatingTempMinCelsius != null && d.unit.operatingTempMaxCelsius != null ? ` · operates ${d.unit.operatingTempMinCelsius}°C → ${d.unit.operatingTempMaxCelsius}°C` : ""]
|
|
559
566
|
}) : null] }),
|
|
560
|
-
/* @__PURE__ */ n(
|
|
567
|
+
/* @__PURE__ */ n(ke, {
|
|
561
568
|
dividers: !0,
|
|
562
|
-
children: [
|
|
569
|
+
children: [ae ? /* @__PURE__ */ i(A, {
|
|
563
570
|
severity: "error",
|
|
564
571
|
sx: { mb: 2 },
|
|
565
|
-
children:
|
|
566
|
-
}) : null,
|
|
572
|
+
children: ae
|
|
573
|
+
}) : null, ne === "input" ? /* @__PURE__ */ n(v, {
|
|
567
574
|
spacing: 2,
|
|
568
575
|
sx: { pt: 1 },
|
|
569
576
|
children: [
|
|
@@ -585,18 +592,18 @@ function qi() {
|
|
|
585
592
|
max: 30
|
|
586
593
|
},
|
|
587
594
|
value: M.temperatureCelsius,
|
|
588
|
-
onChange: (e) =>
|
|
595
|
+
onChange: (e) => P({
|
|
589
596
|
...M,
|
|
590
597
|
temperatureCelsius: e.target.value
|
|
591
598
|
}),
|
|
592
|
-
onBlur:
|
|
593
|
-
error:
|
|
594
|
-
helperText:
|
|
599
|
+
onBlur: E.onBlur("temperatureCelsius"),
|
|
600
|
+
error: ue,
|
|
601
|
+
helperText: ue ? Y : `Enter the reading in degrees Celsius.${Oe}`
|
|
595
602
|
}),
|
|
596
|
-
|
|
603
|
+
oe ? /* @__PURE__ */ i(A, {
|
|
597
604
|
severity: "warning",
|
|
598
605
|
icon: /* @__PURE__ */ i(Ae, {}),
|
|
599
|
-
children:
|
|
606
|
+
children: oe
|
|
600
607
|
}) : null,
|
|
601
608
|
/* @__PURE__ */ i(y, {
|
|
602
609
|
label: "Notes (optional)",
|
|
@@ -605,7 +612,7 @@ function qi() {
|
|
|
605
612
|
minRows: 2,
|
|
606
613
|
fullWidth: !0,
|
|
607
614
|
value: M.notes,
|
|
608
|
-
onChange: (e) =>
|
|
615
|
+
onChange: (e) => P({
|
|
609
616
|
...M,
|
|
610
617
|
notes: e.target.value
|
|
611
618
|
}),
|
|
@@ -623,61 +630,61 @@ function qi() {
|
|
|
623
630
|
C == null ? void 0 : C.temperatureCelsius,
|
|
624
631
|
"°C"
|
|
625
632
|
]
|
|
626
|
-
}),
|
|
633
|
+
}), $.length === 0 ? /* @__PURE__ */ i(A, {
|
|
627
634
|
severity: "success",
|
|
628
|
-
icon: /* @__PURE__ */ i(
|
|
635
|
+
icon: /* @__PURE__ */ i(fi, {}),
|
|
629
636
|
children: "Every stored product tolerates this temperature. Nothing will be wasted — you can still log the reading for the record."
|
|
630
|
-
}) : /* @__PURE__ */ n(
|
|
637
|
+
}) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ n(A, {
|
|
631
638
|
severity: "warning",
|
|
632
639
|
icon: /* @__PURE__ */ i(Ae, {}),
|
|
633
640
|
children: [
|
|
634
641
|
"At ",
|
|
635
642
|
C == null ? void 0 : C.temperatureCelsius,
|
|
636
643
|
"°C the following ",
|
|
637
|
-
|
|
644
|
+
$.length === 1 ? "batch is" : "batches are",
|
|
638
645
|
" out of range. Confirming will mark ",
|
|
639
|
-
|
|
646
|
+
$.length === 1 ? "it" : "them",
|
|
640
647
|
" — and any open vials — as wastage. This cannot be undone."
|
|
641
648
|
]
|
|
642
|
-
}), /* @__PURE__ */ n(
|
|
649
|
+
}), /* @__PURE__ */ n(mi, {
|
|
643
650
|
size: "small",
|
|
644
|
-
children: [/* @__PURE__ */ i(
|
|
645
|
-
/* @__PURE__ */ i(
|
|
646
|
-
/* @__PURE__ */ i(
|
|
647
|
-
/* @__PURE__ */ i(
|
|
648
|
-
/* @__PURE__ */ i(
|
|
651
|
+
children: [/* @__PURE__ */ i(ye, { children: /* @__PURE__ */ n(B, { children: [
|
|
652
|
+
/* @__PURE__ */ i(a, { children: "Product" }),
|
|
653
|
+
/* @__PURE__ */ i(a, { children: "Lot" }),
|
|
654
|
+
/* @__PURE__ */ i(a, { children: "Expiry" }),
|
|
655
|
+
/* @__PURE__ */ i(a, {
|
|
649
656
|
align: "right",
|
|
650
657
|
children: "Qty"
|
|
651
658
|
}),
|
|
652
|
-
/* @__PURE__ */ i(
|
|
659
|
+
/* @__PURE__ */ i(a, {
|
|
653
660
|
align: "right",
|
|
654
661
|
children: "Open vials"
|
|
655
662
|
}),
|
|
656
|
-
/* @__PURE__ */ i(
|
|
657
|
-
] }) }), /* @__PURE__ */ i(
|
|
658
|
-
/* @__PURE__ */ i(
|
|
663
|
+
/* @__PURE__ */ i(a, { children: "Required" })
|
|
664
|
+
] }) }), /* @__PURE__ */ i(we, { children: $.map((e) => /* @__PURE__ */ n(B, { children: [
|
|
665
|
+
/* @__PURE__ */ i(a, {
|
|
659
666
|
sx: { fontWeight: 700 },
|
|
660
667
|
children: e.productName
|
|
661
668
|
}),
|
|
662
|
-
/* @__PURE__ */ i(
|
|
669
|
+
/* @__PURE__ */ i(a, {
|
|
663
670
|
sx: {
|
|
664
671
|
fontFamily: "monospace",
|
|
665
672
|
fontSize: "0.78rem"
|
|
666
673
|
},
|
|
667
674
|
children: e.lotNumber || "—"
|
|
668
675
|
}),
|
|
669
|
-
/* @__PURE__ */ i(
|
|
670
|
-
/* @__PURE__ */ i(
|
|
676
|
+
/* @__PURE__ */ i(a, { children: e.expiryDate ? Xe(e.expiryDate) : "—" }),
|
|
677
|
+
/* @__PURE__ */ i(a, {
|
|
671
678
|
align: "right",
|
|
672
679
|
sx: { fontVariantNumeric: "tabular-nums" },
|
|
673
680
|
children: e.qtyRemaining ?? 0
|
|
674
681
|
}),
|
|
675
|
-
/* @__PURE__ */ i(
|
|
682
|
+
/* @__PURE__ */ i(a, {
|
|
676
683
|
align: "right",
|
|
677
684
|
sx: { fontVariantNumeric: "tabular-nums" },
|
|
678
685
|
children: e.openVialCount ?? 0
|
|
679
686
|
}),
|
|
680
|
-
/* @__PURE__ */ i(
|
|
687
|
+
/* @__PURE__ */ i(a, {
|
|
681
688
|
sx: { whiteSpace: "nowrap" },
|
|
682
689
|
children: e.requiredMinCelsius != null && e.requiredMaxCelsius != null ? `${e.requiredMinCelsius}°C → ${e.requiredMaxCelsius}°C` : "—"
|
|
683
690
|
})
|
|
@@ -685,29 +692,29 @@ function qi() {
|
|
|
685
692
|
})] })]
|
|
686
693
|
})]
|
|
687
694
|
}),
|
|
688
|
-
/* @__PURE__ */ i(
|
|
689
|
-
onClick:
|
|
695
|
+
/* @__PURE__ */ i(Ie, { children: ne === "input" ? /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
|
|
696
|
+
onClick: le,
|
|
690
697
|
disabled: f,
|
|
691
698
|
children: "Cancel"
|
|
692
699
|
}), /* @__PURE__ */ i(g, {
|
|
693
700
|
variant: "contained",
|
|
694
|
-
disabled: !
|
|
695
|
-
onClick: () => void
|
|
701
|
+
disabled: !se || f,
|
|
702
|
+
onClick: () => void Pe(),
|
|
696
703
|
children: f ? "Checking…" : "Check"
|
|
697
|
-
})] }) : /* @__PURE__ */ n(
|
|
698
|
-
onClick: () =>
|
|
704
|
+
})] }) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
|
|
705
|
+
onClick: () => V("input"),
|
|
699
706
|
disabled: f,
|
|
700
707
|
children: "Back"
|
|
701
|
-
}),
|
|
708
|
+
}), $.length === 0 ? /* @__PURE__ */ i(g, {
|
|
702
709
|
variant: "contained",
|
|
703
710
|
disabled: f,
|
|
704
|
-
onClick: () => void
|
|
711
|
+
onClick: () => void de(!1),
|
|
705
712
|
children: f ? "Logging…" : "Log reading"
|
|
706
713
|
}) : /* @__PURE__ */ i(g, {
|
|
707
714
|
variant: "contained",
|
|
708
715
|
color: "error",
|
|
709
716
|
disabled: f,
|
|
710
|
-
onClick: () => void
|
|
717
|
+
onClick: () => void de(!0),
|
|
711
718
|
children: f ? "Processing…" : "Confirm & mark wastage"
|
|
712
719
|
})] }) })
|
|
713
720
|
]
|
|
@@ -716,6 +723,6 @@ function qi() {
|
|
|
716
723
|
})] });
|
|
717
724
|
}
|
|
718
725
|
export {
|
|
719
|
-
|
|
726
|
+
Di as default
|
|
720
727
|
};
|
|
721
|
-
//# sourceMappingURL=StorageUnitsPage-
|
|
728
|
+
//# sourceMappingURL=StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map
|