@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.
Files changed (156) hide show
  1. package/dist/{AccessRights-xrday-L1.js → AccessRights-DUgY6ewy.js} +151 -143
  2. package/dist/AccessRights-DUgY6ewy.js.map +1 -0
  3. package/dist/AddMenuConfiguration-c6ZKiN0i.js +8898 -0
  4. package/dist/AddMenuConfiguration-c6ZKiN0i.js.map +1 -0
  5. package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js → BrandsPage-DMw2vT0u-BVhvhc6J.js} +14 -14
  6. package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js.map → BrandsPage-DMw2vT0u-BVhvhc6J.js.map} +1 -1
  7. package/dist/{CategoriesPage-BsS5IQh3-B03lWRY5.js → CategoriesPage-D3ihx9Gi-CT58g0ry.js} +112 -105
  8. package/dist/CategoriesPage-D3ihx9Gi-CT58g0ry.js.map +1 -0
  9. package/dist/{ChangePasswordModalCore-BPsJquTS.js → ChangePasswordModalCore-lQ9GamH1.js} +3 -3
  10. package/dist/{ChangePasswordModalCore-BPsJquTS.js.map → ChangePasswordModalCore-lQ9GamH1.js.map} +1 -1
  11. package/dist/ConditionConfig-BQBmBHaM.js +408 -0
  12. package/dist/ConditionConfig-BQBmBHaM.js.map +1 -0
  13. package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js → DashboardPage-asr2XDRu-uOOlX9Vq.js} +29 -29
  14. package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js.map → DashboardPage-asr2XDRu-uOOlX9Vq.js.map} +1 -1
  15. package/dist/EventConfig-BY2cgGyx.js +27 -0
  16. package/dist/{EventConfig-BmLemzX3.js.map → EventConfig-BY2cgGyx.js.map} +1 -1
  17. package/dist/EventConfigurations-CUPEN5BV.js +544 -0
  18. package/dist/EventConfigurations-CUPEN5BV.js.map +1 -0
  19. package/dist/EventConfigurations.css +1 -1
  20. package/dist/EventsExceptionModal-BX-ArkBE.js +188 -0
  21. package/dist/EventsExceptionModal-BX-ArkBE.js.map +1 -0
  22. package/dist/EventsUi-D6O9S7BK.js +258 -0
  23. package/dist/EventsUi-D6O9S7BK.js.map +1 -0
  24. package/dist/{FacilityPicker-BiZeupmP-CyPHmj6b.js → FacilityPicker-DYl_PDyt-Cbwo2tAY.js} +10 -10
  25. package/dist/{FacilityPicker-BiZeupmP-CyPHmj6b.js.map → FacilityPicker-DYl_PDyt-Cbwo2tAY.js.map} +1 -1
  26. package/dist/{FeatureMenu-DYJmDt7q.js → FeatureMenu-CHsBbw3W.js} +9 -5
  27. package/dist/FeatureMenu-CHsBbw3W.js.map +1 -0
  28. package/dist/{FhirServerList-DuTwnngN.js → FhirServerList-iXBPkRVF.js} +11 -11
  29. package/dist/{FhirServerList-DuTwnngN.js.map → FhirServerList-iXBPkRVF.js.map} +1 -1
  30. package/dist/{GrantPermissionModal-BDN66Atn.js → GrantPermissionModal-D7iNZd0M.js} +54 -51
  31. package/dist/GrantPermissionModal-D7iNZd0M.js.map +1 -0
  32. package/dist/{ImmunizationConfigurationBase-Di1KO3oW.js → ImmunizationConfigurationBase-aUtx0JEe.js} +3440 -3060
  33. package/dist/ImmunizationConfigurationBase-aUtx0JEe.js.map +1 -0
  34. package/dist/{InventoryPage-C_AxSy7A-QLvlL4rE.js → InventoryPage-DOotGZrj-CoPjOJEI.js} +10 -10
  35. package/dist/{InventoryPage-C_AxSy7A-QLvlL4rE.js.map → InventoryPage-DOotGZrj-CoPjOJEI.js.map} +1 -1
  36. package/dist/ManageEventConfiguration-DqW3krT6.js +1216 -0
  37. package/dist/ManageEventConfiguration-DqW3krT6.js.map +1 -0
  38. package/dist/ManageEventConfiguration.css +1 -1
  39. package/dist/{ManageUser-DCFkUMV9.js → ManageUser-DZltBina.js} +134 -134
  40. package/dist/{ManageUser-DCFkUMV9.js.map → ManageUser-DZltBina.js.map} +1 -1
  41. package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js → MemberProfileCard-D5CgkTdJ-D2NgDJl3.js} +25 -25
  42. package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js.map → MemberProfileCard-D5CgkTdJ-D2NgDJl3.js.map} +1 -1
  43. package/dist/MobileAnalytics-BLOionG_.js +17301 -0
  44. package/dist/MobileAnalytics-BLOionG_.js.map +1 -0
  45. package/dist/MobileMenuManagement-68Wijb0X.js +220 -0
  46. package/dist/MobileMenuManagement-68Wijb0X.js.map +1 -0
  47. package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js +752 -0
  48. package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js.map +1 -0
  49. package/dist/OtherTypeEventConfigModal-stNmuSv_.js +1812 -0
  50. package/dist/OtherTypeEventConfigModal-stNmuSv_.js.map +1 -0
  51. package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js → PaymentCreatePage-DfvSZ-kB-CckogYoe.js} +14 -14
  52. package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js.map → PaymentCreatePage-DfvSZ-kB-CckogYoe.js.map} +1 -1
  53. package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js → PaymentsPage-DMNjYWAJ-ChO9IXmk.js} +24 -24
  54. package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js.map → PaymentsPage-DMNjYWAJ-ChO9IXmk.js.map} +1 -1
  55. package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js → PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js} +2 -2
  56. package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js.map → PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js.map} +1 -1
  57. package/dist/{PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js → PickupCreatePage-B4O_-vE5-DoOo9nJO.js} +64 -64
  58. package/dist/{PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js.map → PickupCreatePage-B4O_-vE5-DoOo9nJO.js.map} +1 -1
  59. package/dist/{PickupsPage-Ctpghavs-CUp4uIZq.js → PickupsPage-D7zyioJB-bHKnARYw.js} +29 -29
  60. package/dist/PickupsPage-D7zyioJB-bHKnARYw.js.map +1 -0
  61. package/dist/{PmGuard-b10TGXEi-G3N0G_Wg.js → PmGuard-BZE-y4In-D_pUm5MP.js} +25 -25
  62. package/dist/{PmGuard-b10TGXEi-G3N0G_Wg.js.map → PmGuard-BZE-y4In-D_pUm5MP.js.map} +1 -1
  63. package/dist/{ProductEditPage-C1thoKHu-URQaZ6st.js → ProductEditPage-BVlVUCtD-BR-tJ5Wb.js} +475 -472
  64. package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js.map +1 -0
  65. package/dist/{ProductsPage-CupVmOD4-D45a_hf-.js → ProductsPage-DvNHIeZt-BoOOJJtk.js} +36 -35
  66. package/dist/ProductsPage-DvNHIeZt-BoOOJJtk.js.map +1 -0
  67. package/dist/{PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js → PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js} +214 -187
  68. package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js.map +1 -0
  69. package/dist/{PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js → PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js} +80 -80
  70. package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map +1 -0
  71. package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js → PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js} +29 -29
  72. package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js.map → PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js.map} +1 -1
  73. package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js → PurchasesPage-DgL5T6BY-DePUuE9l.js} +31 -31
  74. package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js.map → PurchasesPage-DgL5T6BY-DePUuE9l.js.map} +1 -1
  75. package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js → SaleCreatePage-CZnIOydv-DKBw-qp7.js} +15 -15
  76. package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js.map → SaleCreatePage-CZnIOydv-DKBw-qp7.js.map} +1 -1
  77. package/dist/{SalesPage-D18DCseD-BxktGDRQ.js → SalesPage-DPIRrC_O-M8rqnK7z.js} +62 -62
  78. package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js.map +1 -0
  79. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js +676 -0
  80. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js.map +1 -0
  81. package/dist/{ShowFlywayQuery-D1y_4A1u.js → ShowFlywayQuery-DIOUdYfG.js} +26 -19
  82. package/dist/{ShowFlywayQuery-D1y_4A1u.js.map → ShowFlywayQuery-DIOUdYfG.js.map} +1 -1
  83. package/dist/{StorageUnitsPage-7EqwuMOI-BwUso1Th.js → StorageUnitsPage-BDRkdCjW-UF64rf7q.js} +195 -188
  84. package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map +1 -0
  85. package/dist/{SubMenu-eEDhZUvh.js → SubMenu-BdMTYtC1.js} +5 -3
  86. package/dist/SubMenu-BdMTYtC1.js.map +1 -0
  87. package/dist/{TransactionsPage-DrH53pVS-BkhIGB6C.js → TransactionsPage-CqWTMNU8-Df6eGFDW.js} +48 -48
  88. package/dist/{TransactionsPage-DrH53pVS-BkhIGB6C.js.map → TransactionsPage-CqWTMNU8-Df6eGFDW.js.map} +1 -1
  89. package/dist/{TransferCreatePage-CuvoMrYH-DTTfHjz-.js → TransferCreatePage-DF7FZaTJ-CL79V3aR.js} +8 -8
  90. package/dist/{TransferCreatePage-CuvoMrYH-DTTfHjz-.js.map → TransferCreatePage-DF7FZaTJ-CL79V3aR.js.map} +1 -1
  91. package/dist/{TransfersPage-Cf701t8s-BBbN7cBf.js → TransfersPage-CGrRFaBF-cTwBUv0o.js} +69 -69
  92. package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js.map +1 -0
  93. package/dist/TypeConfiguration-JbRCN6GR.js +114 -0
  94. package/dist/TypeConfiguration-JbRCN6GR.js.map +1 -0
  95. package/dist/{UserList-DgPxsnj2.js → UserList-L41Xw0Q6.js} +2 -2
  96. package/dist/{UserList-DgPxsnj2.js.map → UserList-L41Xw0Q6.js.map} +1 -1
  97. package/dist/Users-CsJ08Kjm.js +40 -0
  98. package/dist/{Users-Bpc4Sazd.js.map → Users-CsJ08Kjm.js.map} +1 -1
  99. package/dist/{VialsPage-8oAc1yFv-Cl3FUXBJ.js → VialsPage-rvvXjgZG-Oqo1v6kQ.js} +35 -35
  100. package/dist/{VialsPage-8oAc1yFv-Cl3FUXBJ.js.map → VialsPage-rvvXjgZG-Oqo1v6kQ.js.map} +1 -1
  101. package/dist/{constants-ClZJY2x1-MkSWn6TZ.js → constants-DpXnLsAB-D6lN5cjK.js} +58 -47
  102. package/dist/constants-DpXnLsAB-D6lN5cjK.js.map +1 -0
  103. package/dist/{dashboardLayoutUtils-D1xCAxp3.js → dashboardLayoutUtils-CJivzaU1.js} +95 -92
  104. package/dist/dashboardLayoutUtils-CJivzaU1.js.map +1 -0
  105. package/dist/index.css +1 -1
  106. package/dist/index.js +1 -1
  107. package/dist/index.lib-ETRQOzvE.js +894 -0
  108. package/dist/index.lib-ETRQOzvE.js.map +1 -0
  109. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js +36 -0
  110. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js.map +1 -0
  111. package/package.json +1 -1
  112. package/dist/AccessRights-xrday-L1.js.map +0 -1
  113. package/dist/AddMenuConfiguration-e5BVXhmw.js +0 -8547
  114. package/dist/AddMenuConfiguration-e5BVXhmw.js.map +0 -1
  115. package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js.map +0 -1
  116. package/dist/ConditionConfig-Ddz9halE.js +0 -395
  117. package/dist/ConditionConfig-Ddz9halE.js.map +0 -1
  118. package/dist/ConditionConfig.css +0 -1
  119. package/dist/EventConfig-BmLemzX3.js +0 -26
  120. package/dist/EventConfigurations-Bzh1qWXU.js +0 -450
  121. package/dist/EventConfigurations-Bzh1qWXU.js.map +0 -1
  122. package/dist/EventsExceptionModal-B2SRrnB1.js +0 -200
  123. package/dist/EventsExceptionModal-B2SRrnB1.js.map +0 -1
  124. package/dist/EventsSkeleton-BIcPks4T.js +0 -61
  125. package/dist/EventsSkeleton-BIcPks4T.js.map +0 -1
  126. package/dist/FeatureMenu-DYJmDt7q.js.map +0 -1
  127. package/dist/GrantPermissionModal-BDN66Atn.js.map +0 -1
  128. package/dist/ImmunizationConfigurationBase-Di1KO3oW.js.map +0 -1
  129. package/dist/ManageEventConfiguration-CoYcpjR9.js +0 -1085
  130. package/dist/ManageEventConfiguration-CoYcpjR9.js.map +0 -1
  131. package/dist/MobileAnalytics-pQoE8cG1.js +0 -16888
  132. package/dist/MobileAnalytics-pQoE8cG1.js.map +0 -1
  133. package/dist/MobileMenuManagement-Cf8IZlla.js +0 -108
  134. package/dist/MobileMenuManagement-Cf8IZlla.js.map +0 -1
  135. package/dist/MobileTypeEventConfigModal-BeveaX0C.js +0 -783
  136. package/dist/MobileTypeEventConfigModal-BeveaX0C.js.map +0 -1
  137. package/dist/OtherTypeEventConfigModal-CM6VkdmY.js +0 -2046
  138. package/dist/OtherTypeEventConfigModal-CM6VkdmY.js.map +0 -1
  139. package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js.map +0 -1
  140. package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js.map +0 -1
  141. package/dist/ProductsPage-CupVmOD4-D45a_hf-.js.map +0 -1
  142. package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js.map +0 -1
  143. package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js.map +0 -1
  144. package/dist/SalesPage-D18DCseD-BxktGDRQ.js.map +0 -1
  145. package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js +0 -747
  146. package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js.map +0 -1
  147. package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map +0 -1
  148. package/dist/SubMenu-eEDhZUvh.js.map +0 -1
  149. package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js.map +0 -1
  150. package/dist/TypeConfiguration-3O6ABrK-.js +0 -117
  151. package/dist/TypeConfiguration-3O6ABrK-.js.map +0 -1
  152. package/dist/Users-Bpc4Sazd.js +0 -41
  153. package/dist/constants-ClZJY2x1-MkSWn6TZ.js.map +0 -1
  154. package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +0 -1
  155. package/dist/index.lib-Dn8PMkeD.js +0 -862
  156. package/dist/index.lib-Dn8PMkeD.js.map +0 -1
@@ -1,28 +1,32 @@
1
- import { B as Oe, z as De, V as Pe, G as he, _ as Ve, S as Ye, k as z, v as je, y as Qe, a as Ze } from "./ImmunizationConfigurationBase-Di1KO3oW.js";
2
- import { C as _e, o as ge } from "./constants-ClZJY2x1-MkSWn6TZ.js";
3
- import { t as He } from "./format-UOyOu75i-D0GyylyQ.js";
4
- import { v as Xe, i as Je, r as U, C as Ke, g as Ge, _ as ei } from "./validation-BzlHnL-r-CCJm2utQ.js";
5
- import { n as Ce } from "./useFieldErrors-hDG8ox_x-DbSAzrGo.js";
6
- import { X as ii, Y as ti, Z as ni, Q as ri, q as ai } from "./PmGuard-b10TGXEi-G3N0G_Wg.js";
7
- import { d as li } from "./FacilityPicker-BiZeupmP-CyPHmj6b.js";
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 Y } from "react/jsx-runtime";
10
- import { Box as fe, Alert as B, TableHead as Te, TableRow as $, TableCell as r, TableBody as ye, Skeleton as oi, Button as g, Typography as w, Chip as we, Stack as v, FormControlLabel as ve, Dialog as xe, DialogTitle as be, DialogContent as Me, Divider as si, TextField as y, Checkbox as ui, DialogActions as ke, Table as di } from "@mui/material";
11
- import { v4 as Ie } from "uuid";
12
- import Ne from "@mui/icons-material/AddRounded";
13
- import ci from "@mui/icons-material/RefreshRounded";
14
- import pi from "@/views/custom-components/CustomSwitch";
15
- import mi from "@mui/icons-material/WarehouseRounded";
16
- import hi from "@mui/icons-material/CheckCircleRounded";
17
- import gi from "@mui/icons-material/DeviceThermostatRounded";
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 Ci = [{
20
+ var yi = [{
20
21
  value: "FACILITY",
21
22
  label: "Facility"
22
23
  }];
23
- function qi() {
24
- var de, ce, pe, me;
25
- let W = ii().has("update.manage.productManagement.storageUnit"), [x, Be] = p([]), [$e, E] = p({}), [j, Q] = p(!1), [Z, b] = p(""), [We, k] = p(!1), [F, _] = p(null), [t, m] = p(X()), [H, Fe] = p(!1), l = Ce(), L = Ce();
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: "REFRIGERATOR",
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 R() {
43
- var e, d;
46
+ async function S() {
47
+ var e, s;
44
48
  Q(!0), b("");
45
49
  try {
46
- let a = await Ve({ activeOnly: !1 });
47
- Be(a);
48
- let s = Array.from(new Set(a.map((T) => T.ownerId).filter(Boolean)));
49
- if (s.length === 0) E({});
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 Ye(s), h = {};
55
+ let T = await Qe(u), h = {};
52
56
  T.forEach((c) => {
53
57
  h[c.id] = c.name;
54
- }), E(h);
58
+ }), D(h);
55
59
  } catch {
56
- E({});
60
+ D({});
57
61
  }
58
- } catch (a) {
59
- let s = ((d = (e = a == null ? void 0 : a.response) == null ? void 0 : e.data) == null ? void 0 : d.message) ?? (a == null ? void 0 : a.message) ?? "Failed to load storage units";
60
- b(s), z({
61
- message: s,
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
- ti("view.manage.productManagement.storageUnit", () => {
69
- R();
72
+ ri("view.manage.productManagement.storageUnit", () => {
73
+ S();
70
74
  }, []);
71
- function Re(e) {
72
- return $e[e] ?? e;
75
+ function ze(e) {
76
+ return qe[e] ?? e;
73
77
  }
74
78
  function J() {
75
79
  _(null), m({
76
80
  ...X(),
77
- id: Ie()
81
+ id: Ne()
78
82
  }), l.reset(), b(""), k(!0);
79
83
  }
80
- function Se(e) {
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 ?? "REFRIGERATOR",
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 = Xe(t.operatingTempMinCelsius, t.operatingTempMaxCelsius), G = Je(t.unitCode, { required: !0 }), ee = (t.unitCode || "").trim().toUpperCase(), qe = !G && ee && t.ownerId && x.some((e) => e.id !== t.id && e.ownerId === t.ownerId && (e.unitCode || "").toUpperCase() === ee), o = {
97
- ownerType: U(t.ownerType, "Owner type"),
98
- ownerId: U(t.ownerId, "Facility"),
99
- unitName: U(t.unitName, "Name"),
100
- unitCode: G || (qe ? "Code is already in use for this facility." : ""),
101
- unitType: U(t.unitType, "Type"),
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
- }, ie = Ke(o);
105
- async function ze() {
106
- var e, d, a, s, T;
107
- if (!ie) {
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 je({
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: ((d = t.model) == null ? void 0 : d.trim()) || null,
120
- comments: ((a = t.comments) == null ? void 0 : a.trim()) || null,
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
- }), z({
131
+ }), R({
125
132
  message: "Storage unit saved.",
126
133
  type: "success"
127
- }), k(!1), await R();
134
+ }), k(!1), await S();
128
135
  } catch (h) {
129
- let c = ((T = (s = h == null ? void 0 : h.response) == null ? void 0 : s.data) == null ? void 0 : T.message) ?? (h == null ? void 0 : h.message) ?? "Failed to save storage unit";
130
- b(c), z({
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 [u, O] = p({
143
+ let [d, O] = p({
137
144
  open: !1,
138
145
  unit: null
139
- }), [M, D] = p({
146
+ }), [M, P] = p({
140
147
  temperatureCelsius: "",
141
148
  notes: ""
142
- }), [te, P] = p("input"), [C, ne] = p(null), [f, S] = p(!1), [re, I] = p("");
143
- function Ue(e) {
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
- }), D({
154
+ }), P({
148
155
  temperatureCelsius: "",
149
156
  notes: ""
150
- }), P("input"), ne(null), I(""), L.reset();
157
+ }), V("input"), re(null), I(""), E.reset();
151
158
  }
152
- function ae() {
159
+ function le() {
153
160
  f || O({
154
161
  open: !1,
155
162
  unit: null
156
163
  });
157
164
  }
158
- let N = M.temperatureCelsius, V = Ge(N, { required: !0 }), le = ei(N, (de = u.unit) == null ? void 0 : de.operatingTempMinCelsius, (ce = u.unit) == null ? void 0 : ce.operatingTempMaxCelsius), oe = !V, se = !!V && (N !== "" || L.show("temperatureCelsius")), Ee = ((pe = u.unit) == null ? void 0 : pe.operatingTempMinCelsius) != null && ((me = u.unit) == null ? void 0 : me.operatingTempMaxCelsius) != null ? ` This unit operates between ${u.unit.operatingTempMinCelsius}°C and ${u.unit.operatingTempMaxCelsius}°C.` : "";
159
- async function Le() {
160
- var e, d;
161
- if (!(!u.unit || !oe)) {
162
- S(!0), I("");
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
- ne(await Qe(u.unit.id, Number(N))), P("result");
165
- } catch (a) {
166
- I(((d = (e = a == null ? void 0 : a.response) == null ? void 0 : e.data) == null ? void 0 : d.message) ?? (a == null ? void 0 : a.message) ?? "Failed to evaluate temperature");
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
- S(!1);
175
+ z(!1);
169
176
  }
170
177
  }
171
178
  }
172
- async function ue(e) {
173
- var d, a, s, T, h;
174
- if (u.unit) {
175
- S(!0), I("");
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 = ((s = (a = await Ze(u.unit.id, {
178
- id: Ie(),
184
+ let c = ((u = (r = await He(d.unit.id, {
185
+ id: Ne(),
179
186
  temperatureCelsius: Number(N),
180
187
  wasteOutOfRange: e,
181
- notes: ((d = M.notes) == null ? void 0 : d.trim()) || null
182
- })) == null ? void 0 : a.affectedBatches) == null ? void 0 : s.length) ?? 0;
183
- z({
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 R();
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
- S(!1);
200
+ z(!1);
194
201
  }
195
202
  }
196
203
  }
197
- let A = (C == null ? void 0 : C.affectedBatches) ?? [], q = H ? x : x.filter((e) => e.isActive !== !1);
198
- return /* @__PURE__ */ n(fe, { children: [/* @__PURE__ */ i(ni, {}), /* @__PURE__ */ n(ri, {
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(ai, {
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(ci, {}),
211
- onClick: () => void R(),
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(Ne, {}),
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(B, {
227
+ children: [Z ? /* @__PURE__ */ i(A, {
221
228
  severity: "error",
222
229
  sx: { mb: 2 },
223
230
  children: Z
224
- }) : null, /* @__PURE__ */ i(Oe, {
231
+ }) : null, /* @__PURE__ */ i(Ve, {
225
232
  eyebrow: "Cold-chain network",
226
233
  title: "Storage units",
227
- subtitle: j ? "Loading…" : `${q.length} ${q.length === 1 ? "unit" : "units"}`,
228
- actions: /* @__PURE__ */ i(ve, {
229
- control: /* @__PURE__ */ i(pi, {
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) => Fe(e.target.checked)
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(De, { children: [/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ n($, { children: [
245
- /* @__PURE__ */ i(r, { children: "Code" }),
246
- /* @__PURE__ */ i(r, { children: "Name" }),
247
- /* @__PURE__ */ i(r, { children: "Facility" }),
248
- /* @__PURE__ */ i(r, { children: "Type" }),
249
- /* @__PURE__ */ i(r, { children: "Operating range" }),
250
- /* @__PURE__ */ i(r, { children: "Status" }),
251
- /* @__PURE__ */ i(r, {
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(ye, { children: j ? Array.from({ length: 4 }).map((e, d) => /* @__PURE__ */ i($, { children: Array.from({ length: 7 }).map((a, s) => /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(oi, { height: 22 }) }, s)) }, d)) : q.length === 0 ? /* @__PURE__ */ i(Pe, {
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: mi,
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(Ne, {}),
270
+ startIcon: /* @__PURE__ */ i($e, {}),
264
271
  onClick: J,
265
272
  children: "Create first unit"
266
273
  }) : null
267
- }) : q.map((e) => /* @__PURE__ */ n($, {
274
+ }) : U.map((e) => /* @__PURE__ */ n(B, {
268
275
  hover: !0,
269
276
  children: [
270
- /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(fe, {
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(r, { children: /* @__PURE__ */ i(w, {
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(r, { children: /* @__PURE__ */ i(w, {
296
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(w, {
290
297
  variant: "caption",
291
298
  color: "text.secondary",
292
- children: Re(e.ownerId)
299
+ children: ze(e.ownerId)
293
300
  }) }),
294
- /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(we, {
301
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(ve, {
295
302
  size: "small",
296
- label: _e(ge, e.unitType),
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(r, { children: e.operatingTempMinCelsius != null && e.operatingTempMaxCelsius != null ? /* @__PURE__ */ n(w, {
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(r, { children: /* @__PURE__ */ i(we, {
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(r, {
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(gi, {}),
343
- onClick: () => Ue(e),
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: () => Se(e),
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(xe, {
358
- open: We,
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(be, { children: F ? "Edit Storage Unit" : "New Storage Unit" }),
364
- /* @__PURE__ */ i(Me, {
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(he, {
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: Ci
390
+ options: yi
384
391
  }),
385
- /* @__PURE__ */ i(li, {
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(si, {}),
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 d = e.target.value, a = d.split(/\s+/).filter(Boolean).map((s) => s[0]).join("").toUpperCase().replace(/[^A-Z0-9_]/g, "");
406
- m((s) => ({
407
- ...s,
408
- unitName: d,
409
- unitCode: F ? s.unitCode : a
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(he, {
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: ge
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(ve, {
522
- control: /* @__PURE__ */ i(ui, {
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(ke, { children: [/* @__PURE__ */ i(g, {
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: !ie,
540
- onClick: () => void ze(),
546
+ disabled: !te,
547
+ onClick: () => void De(),
541
548
  children: "Save"
542
549
  })] })
543
550
  ]
544
551
  }),
545
- /* @__PURE__ */ n(xe, {
546
- open: u.open,
547
- onClose: ae,
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(be, { children: ["Log Temperature", u.unit ? /* @__PURE__ */ n(w, {
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: [u.unit.unitName, u.unit.operatingTempMinCelsius != null && u.unit.operatingTempMaxCelsius != null ? ` · operates ${u.unit.operatingTempMinCelsius}°C → ${u.unit.operatingTempMaxCelsius}°C` : ""]
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(Me, {
567
+ /* @__PURE__ */ n(ke, {
561
568
  dividers: !0,
562
- children: [re ? /* @__PURE__ */ i(B, {
569
+ children: [ae ? /* @__PURE__ */ i(A, {
563
570
  severity: "error",
564
571
  sx: { mb: 2 },
565
- children: re
566
- }) : null, te === "input" ? /* @__PURE__ */ n(v, {
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) => D({
595
+ onChange: (e) => P({
589
596
  ...M,
590
597
  temperatureCelsius: e.target.value
591
598
  }),
592
- onBlur: L.onBlur("temperatureCelsius"),
593
- error: se,
594
- helperText: se ? V : `Enter the reading in degrees Celsius.${Ee}`
599
+ onBlur: E.onBlur("temperatureCelsius"),
600
+ error: ue,
601
+ helperText: ue ? Y : `Enter the reading in degrees Celsius.${Oe}`
595
602
  }),
596
- le ? /* @__PURE__ */ i(B, {
603
+ oe ? /* @__PURE__ */ i(A, {
597
604
  severity: "warning",
598
605
  icon: /* @__PURE__ */ i(Ae, {}),
599
- children: le
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) => D({
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
- }), A.length === 0 ? /* @__PURE__ */ i(B, {
633
+ }), $.length === 0 ? /* @__PURE__ */ i(A, {
627
634
  severity: "success",
628
- icon: /* @__PURE__ */ i(hi, {}),
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(Y, { children: [/* @__PURE__ */ n(B, {
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
- A.length === 1 ? "batch is" : "batches are",
644
+ $.length === 1 ? "batch is" : "batches are",
638
645
  " out of range. Confirming will mark ",
639
- A.length === 1 ? "it" : "them",
646
+ $.length === 1 ? "it" : "them",
640
647
  " — and any open vials — as wastage. This cannot be undone."
641
648
  ]
642
- }), /* @__PURE__ */ n(di, {
649
+ }), /* @__PURE__ */ n(mi, {
643
650
  size: "small",
644
- children: [/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ n($, { children: [
645
- /* @__PURE__ */ i(r, { children: "Product" }),
646
- /* @__PURE__ */ i(r, { children: "Lot" }),
647
- /* @__PURE__ */ i(r, { children: "Expiry" }),
648
- /* @__PURE__ */ i(r, {
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(r, {
659
+ /* @__PURE__ */ i(a, {
653
660
  align: "right",
654
661
  children: "Open vials"
655
662
  }),
656
- /* @__PURE__ */ i(r, { children: "Required" })
657
- ] }) }), /* @__PURE__ */ i(ye, { children: A.map((e) => /* @__PURE__ */ n($, { children: [
658
- /* @__PURE__ */ i(r, {
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(r, {
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(r, { children: e.expiryDate ? He(e.expiryDate) : "—" }),
670
- /* @__PURE__ */ i(r, {
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(r, {
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(r, {
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(ke, { children: te === "input" ? /* @__PURE__ */ n(Y, { children: [/* @__PURE__ */ i(g, {
689
- onClick: ae,
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: !oe || f,
695
- onClick: () => void Le(),
701
+ disabled: !se || f,
702
+ onClick: () => void Pe(),
696
703
  children: f ? "Checking…" : "Check"
697
- })] }) : /* @__PURE__ */ n(Y, { children: [/* @__PURE__ */ i(g, {
698
- onClick: () => P("input"),
704
+ })] }) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
705
+ onClick: () => V("input"),
699
706
  disabled: f,
700
707
  children: "Back"
701
- }), A.length === 0 ? /* @__PURE__ */ i(g, {
708
+ }), $.length === 0 ? /* @__PURE__ */ i(g, {
702
709
  variant: "contained",
703
710
  disabled: f,
704
- onClick: () => void ue(!1),
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 ue(!0),
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
- qi as default
726
+ Di as default
720
727
  };
721
- //# sourceMappingURL=StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map
728
+ //# sourceMappingURL=StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map