@argusoft/medplat-core 1.0.30 → 1.0.32

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 (226) hide show
  1. package/dist/{AccessRights-xrday-L1.js → AccessRights-DBjTQA1-.js} +395 -390
  2. package/dist/AccessRights-DBjTQA1-.js.map +1 -0
  3. package/dist/{AddFeatures-D1sU8RjY.js → AddFeatures-COj4ZTIM.js} +2 -2
  4. package/dist/{AddFeatures-D1sU8RjY.js.map → AddFeatures-COj4ZTIM.js.map} +1 -1
  5. package/dist/AddMenuConfiguration-Creeib5X.js +11223 -0
  6. package/dist/AddMenuConfiguration-Creeib5X.js.map +1 -0
  7. package/dist/AddMenuConfiguration.css +1 -1
  8. package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js → BrandsPage-CdcAvaml-ZtVTX6vX.js} +43 -43
  9. package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js.map → BrandsPage-CdcAvaml-ZtVTX6vX.js.map} +1 -1
  10. package/dist/{CategoriesPage-BsS5IQh3-B03lWRY5.js → CategoriesPage-BprQEYJw-CclreTv1.js} +109 -102
  11. package/dist/CategoriesPage-BprQEYJw-CclreTv1.js.map +1 -0
  12. package/dist/{ChangePasswordModalCore-BPsJquTS.js → ChangePasswordModalCore-DZGOkbRY.js} +3 -3
  13. package/dist/{ChangePasswordModalCore-BPsJquTS.js.map → ChangePasswordModalCore-DZGOkbRY.js.map} +1 -1
  14. package/dist/ConditionConfig-Bpm6OoV5.js +408 -0
  15. package/dist/ConditionConfig-Bpm6OoV5.js.map +1 -0
  16. package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js → DashboardPage-CTiGSx71-CsYohJ5e.js} +32 -32
  17. package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js.map → DashboardPage-CTiGSx71-CsYohJ5e.js.map} +1 -1
  18. package/dist/EntityManagement-BGwJGl9k.js +62 -0
  19. package/dist/EntityManagement-BGwJGl9k.js.map +1 -0
  20. package/dist/EventConfig-BY2cgGyx.js +27 -0
  21. package/dist/{EventConfig-BmLemzX3.js.map → EventConfig-BY2cgGyx.js.map} +1 -1
  22. package/dist/EventConfigurations-B-z7xHh_.js +544 -0
  23. package/dist/EventConfigurations-B-z7xHh_.js.map +1 -0
  24. package/dist/EventConfigurations.css +1 -1
  25. package/dist/EventsExceptionModal-DafomIv6.js +188 -0
  26. package/dist/EventsExceptionModal-DafomIv6.js.map +1 -0
  27. package/dist/EventsUi-Dl_yckSA.js +263 -0
  28. package/dist/EventsUi-Dl_yckSA.js.map +1 -0
  29. package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js +112 -0
  30. package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js.map +1 -0
  31. package/dist/{FeatureMenu-DYJmDt7q.js → FeatureMenu-Kc73yPHH.js} +9 -5
  32. package/dist/FeatureMenu-Kc73yPHH.js.map +1 -0
  33. package/dist/{FhirServerList-DuTwnngN.js → FhirServerList-CrIHMAxz.js} +16 -16
  34. package/dist/{FhirServerList-DuTwnngN.js.map → FhirServerList-CrIHMAxz.js.map} +1 -1
  35. package/dist/{FhirServerProfile-CUOwC6Wb.js → FhirServerProfile-D3aYcpwY.js} +8 -8
  36. package/dist/{FhirServerProfile-CUOwC6Wb.js.map → FhirServerProfile-D3aYcpwY.js.map} +1 -1
  37. package/dist/{FhirServerWizard-DZI8Olku.js → FhirServerWizard-Db6Hm4bQ.js} +15 -15
  38. package/dist/{FhirServerWizard-DZI8Olku.js.map → FhirServerWizard-Db6Hm4bQ.js.map} +1 -1
  39. package/dist/{GrantPermissionModal-BDN66Atn.js → GrantPermissionModal-D7iNZd0M.js} +54 -51
  40. package/dist/GrantPermissionModal-D7iNZd0M.js.map +1 -0
  41. package/dist/ImmunizationConfigurationBase-lKsJZMak.js +8060 -0
  42. package/dist/ImmunizationConfigurationBase-lKsJZMak.js.map +1 -0
  43. package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js +1017 -0
  44. package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js.map +1 -0
  45. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js +1344 -0
  46. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js.map +1 -0
  47. package/dist/{ManageDynamicFeature-BU0I45dd.js → ManageDynamicFeature-CuyYfx_P.js} +104 -97
  48. package/dist/ManageDynamicFeature-CuyYfx_P.js.map +1 -0
  49. package/dist/ManageEventConfiguration-DqPbn3Oi.js +1216 -0
  50. package/dist/ManageEventConfiguration-DqPbn3Oi.js.map +1 -0
  51. package/dist/ManageEventConfiguration.css +1 -1
  52. package/dist/ManageRole-CyfpySt9.js +981 -0
  53. package/dist/ManageRole-CyfpySt9.js.map +1 -0
  54. package/dist/{ManageUser-DCFkUMV9.js → ManageUser-Dm0l833u.js} +286 -286
  55. package/dist/{ManageUser-DCFkUMV9.js.map → ManageUser-Dm0l833u.js.map} +1 -1
  56. package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js → MemberProfileCard-01d_jz3w-DYHtbgMX.js} +46 -46
  57. package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js.map → MemberProfileCard-01d_jz3w-DYHtbgMX.js.map} +1 -1
  58. package/dist/MobileAnalytics-C9oc2yAo.js +18399 -0
  59. package/dist/MobileAnalytics-C9oc2yAo.js.map +1 -0
  60. package/dist/MobileMenuManagement-BmzTPXy7.js +231 -0
  61. package/dist/MobileMenuManagement-BmzTPXy7.js.map +1 -0
  62. package/dist/MobileTypeEventConfigModal-DodU3beR.js +752 -0
  63. package/dist/MobileTypeEventConfigModal-DodU3beR.js.map +1 -0
  64. package/dist/{NewServerManagement-Cxe0dV0O.js → NewServerManagement-BdayO78D.js} +368 -352
  65. package/dist/NewServerManagement-BdayO78D.js.map +1 -0
  66. package/dist/OtherTypeEventConfigModal-D_9S50aI.js +1414 -0
  67. package/dist/OtherTypeEventConfigModal-D_9S50aI.js.map +1 -0
  68. package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js} +58 -58
  69. package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js.map → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js.map} +1 -1
  70. package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js → PaymentsPage-CHieGNrn-BnYCtqHd.js} +37 -37
  71. package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js.map → PaymentsPage-CHieGNrn-BnYCtqHd.js.map} +1 -1
  72. package/dist/{PermissionsModal-CCYkcKlC.js → PermissionsModal-Dxbkkrqe.js} +18 -18
  73. package/dist/PermissionsModal-Dxbkkrqe.js.map +1 -0
  74. package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js} +2 -2
  75. package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js.map → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js.map} +1 -1
  76. package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js +801 -0
  77. package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js.map +1 -0
  78. package/dist/{PickupsPage-Ctpghavs-CUp4uIZq.js → PickupsPage-BWblMlic-CWkgeBw0.js} +132 -132
  79. package/dist/PickupsPage-BWblMlic-CWkgeBw0.js.map +1 -0
  80. package/dist/PmGuard-BvUUbU80-BpYNaDzl.js +641 -0
  81. package/dist/PmGuard-BvUUbU80-BpYNaDzl.js.map +1 -0
  82. package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js +1523 -0
  83. package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js.map +1 -0
  84. package/dist/{ProductsPage-CupVmOD4-D45a_hf-.js → ProductsPage-BI22nPb4-CQBjnc-n.js} +44 -43
  85. package/dist/ProductsPage-BI22nPb4-CQBjnc-n.js.map +1 -0
  86. package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js +724 -0
  87. package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js.map +1 -0
  88. package/dist/{PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js → PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js} +428 -418
  89. package/dist/PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js.map +1 -0
  90. package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js} +65 -65
  91. package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js.map → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js.map} +1 -1
  92. package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js → PurchasesPage-Djl1AqD_-DXeYFMrX.js} +55 -55
  93. package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js.map → PurchasesPage-Djl1AqD_-DXeYFMrX.js.map} +1 -1
  94. package/dist/{RoleManagement-s8iNx2Mu.js → RoleManagement-DVYufwy-.js} +3 -3
  95. package/dist/{RoleManagement-s8iNx2Mu.js.map → RoleManagement-DVYufwy-.js.map} +1 -1
  96. package/dist/Roles-BoNGJhtR.js +19 -0
  97. package/dist/Roles-BoNGJhtR.js.map +1 -0
  98. package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js → SaleCreatePage-DHBLmlBr-BlgjVsq6.js} +39 -39
  99. package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js.map → SaleCreatePage-DHBLmlBr-BlgjVsq6.js.map} +1 -1
  100. package/dist/{SalesPage-D18DCseD-BxktGDRQ.js → SalesPage-eF9Yr42z-BQ9FlXC3.js} +61 -61
  101. package/dist/{SalesPage-D18DCseD-BxktGDRQ.js.map → SalesPage-eF9Yr42z-BQ9FlXC3.js.map} +1 -1
  102. package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js +741 -0
  103. package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js.map +1 -0
  104. package/dist/{ShowFlywayQuery-D1y_4A1u.js → ShowFlywayQuery-DIOUdYfG.js} +26 -19
  105. package/dist/{ShowFlywayQuery-D1y_4A1u.js.map → ShowFlywayQuery-DIOUdYfG.js.map} +1 -1
  106. package/dist/{StorageUnitsPage-7EqwuMOI-BwUso1Th.js → StorageUnitsPage-CTEVuemZ-B4osG74N.js} +253 -223
  107. package/dist/StorageUnitsPage-CTEVuemZ-B4osG74N.js.map +1 -0
  108. package/dist/{SubMenu-eEDhZUvh.js → SubMenu-OO2zhKiu.js} +5 -3
  109. package/dist/SubMenu-OO2zhKiu.js.map +1 -0
  110. package/dist/{TableDetails-BtafRxXb.js → TableDetails-Cc40dEUs.js} +272 -267
  111. package/dist/TableDetails-Cc40dEUs.js.map +1 -0
  112. package/dist/{TableList-Dpo6dO7S.js → TableList-B5tX4wII.js} +316 -312
  113. package/dist/TableList-B5tX4wII.js.map +1 -0
  114. package/dist/{TransactionsPage-DrH53pVS-BkhIGB6C.js → TransactionsPage-Zuu7sjID-B-ACzvd1.js} +195 -180
  115. package/dist/TransactionsPage-Zuu7sjID-B-ACzvd1.js.map +1 -0
  116. package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js +635 -0
  117. package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js.map +1 -0
  118. package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js +600 -0
  119. package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js.map +1 -0
  120. package/dist/TypeConfiguration-EaFiOzRE.js +114 -0
  121. package/dist/TypeConfiguration-EaFiOzRE.js.map +1 -0
  122. package/dist/UserList-Cf5B-o_1.js +1904 -0
  123. package/dist/UserList-Cf5B-o_1.js.map +1 -0
  124. package/dist/Users-MC7txo1V.js +43 -0
  125. package/dist/{Users-Bpc4Sazd.js.map → Users-MC7txo1V.js.map} +1 -1
  126. package/dist/VaccineEducation-T_UE57Ef.js +231 -0
  127. package/dist/VaccineEducation-T_UE57Ef.js.map +1 -0
  128. package/dist/VaccineEducation.css +1 -0
  129. package/dist/VaccineEducationConfigurator-CWc20_rv.js +50948 -0
  130. package/dist/VaccineEducationConfigurator-CWc20_rv.js.map +1 -0
  131. package/dist/VaccineEducationConfigurator.css +4 -0
  132. package/dist/VaccineEducationList-Ok7_5EFb.js +334 -0
  133. package/dist/VaccineEducationList-Ok7_5EFb.js.map +1 -0
  134. package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js +457 -0
  135. package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js.map +1 -0
  136. package/dist/{constants-ClZJY2x1-MkSWn6TZ.js → constants-BTpJFQe_-CYPZIqQF.js} +166 -56
  137. package/dist/constants-BTpJFQe_-CYPZIqQF.js.map +1 -0
  138. package/dist/dashboardLayoutUtils--xUnoKPa.js +615 -0
  139. package/dist/dashboardLayoutUtils--xUnoKPa.js.map +1 -0
  140. package/dist/index-mfoqII2U.js +524 -0
  141. package/dist/index-mfoqII2U.js.map +1 -0
  142. package/dist/{index-D9YNFPn9.js → index-o8Pyt1Bt.js} +445 -439
  143. package/dist/index-o8Pyt1Bt.js.map +1 -0
  144. package/dist/index.css +1 -1
  145. package/dist/index.js +1 -1
  146. package/dist/index.lib-BySa9-Z-.js +936 -0
  147. package/dist/index.lib-BySa9-Z-.js.map +1 -0
  148. package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js +43 -0
  149. package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js.map +1 -0
  150. package/package.json +5 -1
  151. package/dist/AccessRights-xrday-L1.js.map +0 -1
  152. package/dist/AddMenuConfiguration-e5BVXhmw.js +0 -8547
  153. package/dist/AddMenuConfiguration-e5BVXhmw.js.map +0 -1
  154. package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js.map +0 -1
  155. package/dist/ConditionConfig-Ddz9halE.js +0 -395
  156. package/dist/ConditionConfig-Ddz9halE.js.map +0 -1
  157. package/dist/ConditionConfig.css +0 -1
  158. package/dist/EntityManagement-CPQL6qBj.js +0 -50
  159. package/dist/EntityManagement-CPQL6qBj.js.map +0 -1
  160. package/dist/EventConfig-BmLemzX3.js +0 -26
  161. package/dist/EventConfigurations-Bzh1qWXU.js +0 -450
  162. package/dist/EventConfigurations-Bzh1qWXU.js.map +0 -1
  163. package/dist/EventsExceptionModal-B2SRrnB1.js +0 -200
  164. package/dist/EventsExceptionModal-B2SRrnB1.js.map +0 -1
  165. package/dist/EventsSkeleton-BIcPks4T.js +0 -61
  166. package/dist/EventsSkeleton-BIcPks4T.js.map +0 -1
  167. package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js +0 -79
  168. package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js.map +0 -1
  169. package/dist/FeatureMenu-DYJmDt7q.js.map +0 -1
  170. package/dist/GrantPermissionModal-BDN66Atn.js.map +0 -1
  171. package/dist/ImmunizationConfigurationBase-Di1KO3oW.js +0 -7639
  172. package/dist/ImmunizationConfigurationBase-Di1KO3oW.js.map +0 -1
  173. package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js +0 -665
  174. package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js.map +0 -1
  175. package/dist/ManageDynamicFeature-BU0I45dd.js.map +0 -1
  176. package/dist/ManageEventConfiguration-CoYcpjR9.js +0 -1085
  177. package/dist/ManageEventConfiguration-CoYcpjR9.js.map +0 -1
  178. package/dist/ManageRole-CNZBRKGU.js +0 -776
  179. package/dist/ManageRole-CNZBRKGU.js.map +0 -1
  180. package/dist/MobileAnalytics-pQoE8cG1.js +0 -16888
  181. package/dist/MobileAnalytics-pQoE8cG1.js.map +0 -1
  182. package/dist/MobileMenuManagement-Cf8IZlla.js +0 -108
  183. package/dist/MobileMenuManagement-Cf8IZlla.js.map +0 -1
  184. package/dist/MobileTypeEventConfigModal-BeveaX0C.js +0 -783
  185. package/dist/MobileTypeEventConfigModal-BeveaX0C.js.map +0 -1
  186. package/dist/NewServerManagement-Cxe0dV0O.js.map +0 -1
  187. package/dist/OtherTypeEventConfigModal-CM6VkdmY.js +0 -2046
  188. package/dist/OtherTypeEventConfigModal-CM6VkdmY.js.map +0 -1
  189. package/dist/PermissionsModal-CCYkcKlC.js.map +0 -1
  190. package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js +0 -783
  191. package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js.map +0 -1
  192. package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js.map +0 -1
  193. package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js +0 -599
  194. package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js.map +0 -1
  195. package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js +0 -1302
  196. package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js.map +0 -1
  197. package/dist/ProductsPage-CupVmOD4-D45a_hf-.js.map +0 -1
  198. package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js +0 -648
  199. package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js.map +0 -1
  200. package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js.map +0 -1
  201. package/dist/Roles-BIyiic67.js +0 -14
  202. package/dist/Roles-BIyiic67.js.map +0 -1
  203. package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js +0 -747
  204. package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js.map +0 -1
  205. package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map +0 -1
  206. package/dist/SubMenu-eEDhZUvh.js.map +0 -1
  207. package/dist/TableDetails-BtafRxXb.js.map +0 -1
  208. package/dist/TableList-Dpo6dO7S.js.map +0 -1
  209. package/dist/TransactionsPage-DrH53pVS-BkhIGB6C.js.map +0 -1
  210. package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js +0 -315
  211. package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js.map +0 -1
  212. package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js +0 -476
  213. package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js.map +0 -1
  214. package/dist/TypeConfiguration-3O6ABrK-.js +0 -117
  215. package/dist/TypeConfiguration-3O6ABrK-.js.map +0 -1
  216. package/dist/UserList-DgPxsnj2.js +0 -1129
  217. package/dist/UserList-DgPxsnj2.js.map +0 -1
  218. package/dist/Users-Bpc4Sazd.js +0 -41
  219. package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js +0 -321
  220. package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js.map +0 -1
  221. package/dist/constants-ClZJY2x1-MkSWn6TZ.js.map +0 -1
  222. package/dist/dashboardLayoutUtils-D1xCAxp3.js +0 -405
  223. package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +0 -1
  224. package/dist/index-D9YNFPn9.js.map +0 -1
  225. package/dist/index.lib-Dn8PMkeD.js +0 -862
  226. package/dist/index.lib-Dn8PMkeD.js.map +0 -1
@@ -1,28 +1,33 @@
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 je, z as He, V as Qe, G as fe, _ as Ze, C as _e, a as U, v as Je, y as Ke, e as Xe } from "./ImmunizationConfigurationBase-lKsJZMak.js";
2
+ import { H as ye } from "./constants-BTpJFQe_-CYPZIqQF.js";
3
+ import { t as Ge } from "./format-UOyOu75i-D0GyylyQ.js";
4
+ import { v as ei, i as ii, r as L, C as ti, g as ni, _ as ri } from "./validation-BzlHnL-r-CCJm2utQ.js";
5
+ import { n as Te } from "./useFieldErrors-hDG8ox_x-DbSAzrGo.js";
6
+ import { Q as ai, Z as li, $ as oi, e as si, Y as ui } from "./PmGuard-BvUUbU80-BpYNaDzl.js";
7
+ import { y as di } from "./listValueStore-5d4vNGQM-WclZ5nBG.js";
8
+ import { f as ci } from "./FacilityPicker-BXa2VF7i-Dab_Jwa5.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";
18
- import Ae from "@mui/icons-material/WarningAmberRounded";
19
- var Ci = [{
10
+ import { jsxs as n, jsx as i, Fragment as j } from "react/jsx-runtime";
11
+ import { Box as H, Alert as $, TableHead as we, TableRow as W, TableCell as a, TableBody as ve, Skeleton as pi, Button as g, Typography as T, Chip as be, Stack as v, FormControlLabel as xe, Dialog as Me, DialogTitle as ke, DialogContent as Ie, Divider as mi, TextField as w, Checkbox as hi, Link as gi, DialogActions as Ne, Table as Ci } from "@mui/material";
12
+ import { v4 as Be } from "uuid";
13
+ import Ae from "@mui/icons-material/AddRounded";
14
+ import fi from "@mui/icons-material/RefreshRounded";
15
+ import yi from "@/views/custom-components/CustomSwitch";
16
+ import { useNavigate as Ti } from "react-router-dom";
17
+ import wi from "@mui/icons-material/WarehouseRounded";
18
+ import vi from "@mui/icons-material/CheckCircleRounded";
19
+ import bi from "@mui/icons-material/DeviceThermostatRounded";
20
+ import $e from "@mui/icons-material/WarningAmberRounded";
21
+ var xi = [{
20
22
  value: "FACILITY",
21
23
  label: "Facility"
22
24
  }];
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();
25
+ function Yi() {
26
+ var me, he, ge, Ce;
27
+ let q = ai().has("update.manage.productManagement.storageUnit"), { storageUnitTypes: F } = di(), We = Ti(), qe = (e) => {
28
+ var s;
29
+ return e ? ((s = F.find((r) => r.value === e)) == null ? void 0 : s.label) ?? ye(e) : "";
30
+ }, [b, Fe] = p([]), [ze, E] = p({}), [Q, Z] = p(!1), [_, x] = p(""), [Se, k] = p(!1), [I, J] = p(null), [t, m] = p(X()), [K, Re] = p(!1), l = Te(), D = Te();
26
31
  function X() {
27
32
  return {
28
33
  id: "",
@@ -30,175 +35,180 @@ function qi() {
30
35
  ownerId: "",
31
36
  unitName: "",
32
37
  unitCode: "",
33
- unitType: "REFRIGERATOR",
38
+ unitType: "",
34
39
  make: "",
35
40
  model: "",
36
41
  comments: "",
37
42
  operatingTempMinCelsius: "",
38
43
  operatingTempMaxCelsius: "",
39
- isActive: !0
44
+ isActive: !0,
45
+ occupyingBatchCount: 0
40
46
  };
41
47
  }
42
- async function R() {
43
- var e, d;
44
- Q(!0), b("");
48
+ async function z() {
49
+ var e, s;
50
+ Z(!0), x("");
45
51
  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({});
52
+ let r = await Ze({ activeOnly: !1 });
53
+ Fe(r);
54
+ let u = Array.from(new Set(r.map((y) => y.ownerId).filter(Boolean)));
55
+ if (u.length === 0) E({});
50
56
  else try {
51
- let T = await Ye(s), h = {};
52
- T.forEach((c) => {
57
+ let y = await _e(u), h = {};
58
+ y.forEach((c) => {
53
59
  h[c.id] = c.name;
54
60
  }), E(h);
55
61
  } catch {
56
62
  E({});
57
63
  }
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,
64
+ } catch (r) {
65
+ 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";
66
+ x(u), U({
67
+ message: u,
62
68
  type: "error"
63
69
  });
64
70
  } finally {
65
- Q(!1);
71
+ Z(!1);
66
72
  }
67
73
  }
68
- ti("view.manage.productManagement.storageUnit", () => {
69
- R();
74
+ li("view.manage.productManagement.storageUnit", () => {
75
+ z();
70
76
  }, []);
71
- function Re(e) {
72
- return $e[e] ?? e;
77
+ function Ue(e) {
78
+ return ze[e] ?? e;
73
79
  }
74
- function J() {
75
- _(null), m({
80
+ function G() {
81
+ J(null), m({
76
82
  ...X(),
77
- id: Ie()
78
- }), l.reset(), b(""), k(!0);
83
+ id: Be()
84
+ }), l.reset(), x(""), k(!0);
79
85
  }
80
- function Se(e) {
81
- _(e), l.reset(), b(""), m({
86
+ function Le(e) {
87
+ J(e), l.reset(), x(""), m({
82
88
  id: e.id,
83
89
  ownerType: e.ownerType ?? "FACILITY",
84
90
  ownerId: e.ownerId ?? "",
85
91
  unitName: e.unitName ?? "",
86
92
  unitCode: e.unitCode ?? "",
87
- unitType: e.unitType ?? "REFRIGERATOR",
93
+ unitType: e.unitType ?? "",
88
94
  make: e.make ?? "",
89
95
  model: e.model ?? "",
90
96
  comments: e.comments ?? "",
91
97
  operatingTempMinCelsius: e.operatingTempMinCelsius ?? "",
92
98
  operatingTempMaxCelsius: e.operatingTempMaxCelsius ?? "",
93
- isActive: e.isActive !== !1
99
+ isActive: e.isActive !== !1,
100
+ occupyingBatchCount: e.occupyingBatchCount ?? 0
94
101
  }), k(!0);
95
102
  }
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"),
102
- operatingTempMinCelsius: K.min,
103
- operatingTempMaxCelsius: K.max
104
- }, ie = Ke(o);
105
- async function ze() {
106
- var e, d, a, s, T;
107
- if (!ie) {
108
- l.markAllTouched(), b("Please fix the highlighted fields.");
103
+ let ee = !!I && t.isActive && (t.occupyingBatchCount ?? 0) > 0, ie = ei(t.operatingTempMinCelsius, t.operatingTempMaxCelsius), te = ii(t.unitCode, { required: !0 }), ne = (t.unitCode || "").trim().toUpperCase(), Ee = !te && ne && t.ownerId && b.some((e) => e.id !== t.id && e.ownerId === t.ownerId && (e.unitCode || "").toUpperCase() === ne), De = t.unitType && !F.some((e) => e.value === t.unitType) ? [...F, {
104
+ value: t.unitType,
105
+ label: ye(t.unitType)
106
+ }] : F, o = {
107
+ ownerType: L(t.ownerType, "Owner type"),
108
+ ownerId: L(t.ownerId, "Facility"),
109
+ unitName: L(t.unitName, "Name"),
110
+ unitCode: te || (Ee ? "Code is already in use for this facility." : ""),
111
+ unitType: L(t.unitType, "Type"),
112
+ operatingTempMinCelsius: ie.min,
113
+ operatingTempMaxCelsius: ie.max
114
+ }, re = ti(o);
115
+ async function Oe() {
116
+ var e, s, r, u, y;
117
+ if (!re) {
118
+ l.markAllTouched(), x("Please fix the highlighted fields.");
109
119
  return;
110
120
  }
111
121
  try {
112
- await je({
122
+ await Je({
113
123
  id: t.id,
114
124
  ownerId: t.ownerId,
115
125
  unitName: t.unitName.trim(),
116
126
  unitCode: t.unitCode.trim().toUpperCase(),
117
127
  unitType: t.unitType,
118
128
  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,
129
+ model: ((s = t.model) == null ? void 0 : s.trim()) || null,
130
+ comments: ((r = t.comments) == null ? void 0 : r.trim()) || null,
121
131
  operatingTempMinCelsius: t.operatingTempMinCelsius === "" ? null : Number(t.operatingTempMinCelsius),
122
132
  operatingTempMaxCelsius: t.operatingTempMaxCelsius === "" ? null : Number(t.operatingTempMaxCelsius),
123
133
  isActive: t.isActive
124
- }), z({
134
+ }), U({
125
135
  message: "Storage unit saved.",
126
136
  type: "success"
127
- }), k(!1), await R();
137
+ }), k(!1), await z();
128
138
  } 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({
139
+ let c = ((y = (u = h == null ? void 0 : h.response) == null ? void 0 : u.data) == null ? void 0 : y.message) ?? (h == null ? void 0 : h.message) ?? "Failed to save storage unit";
140
+ x(c), U({
131
141
  message: c,
132
142
  type: "error"
133
143
  });
134
144
  }
135
145
  }
136
- let [u, O] = p({
146
+ let [d, O] = p({
137
147
  open: !1,
138
148
  unit: null
139
- }), [M, D] = p({
149
+ }), [M, V] = p({
140
150
  temperatureCelsius: "",
141
151
  notes: ""
142
- }), [te, P] = p("input"), [C, ne] = p(null), [f, S] = p(!1), [re, I] = p("");
143
- function Ue(e) {
152
+ }), [ae, P] = p("input"), [C, le] = p(null), [f, S] = p(!1), [oe, N] = p("");
153
+ function Ve(e) {
144
154
  O({
145
155
  open: !0,
146
156
  unit: e
147
- }), D({
157
+ }), V({
148
158
  temperatureCelsius: "",
149
159
  notes: ""
150
- }), P("input"), ne(null), I(""), L.reset();
160
+ }), P("input"), le(null), N(""), D.reset();
151
161
  }
152
- function ae() {
162
+ function se() {
153
163
  f || O({
154
164
  open: !1,
155
165
  unit: null
156
166
  });
157
167
  }
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("");
168
+ let B = M.temperatureCelsius, Y = ni(B, { required: !0 }), ue = ri(B, (me = d.unit) == null ? void 0 : me.operatingTempMinCelsius, (he = d.unit) == null ? void 0 : he.operatingTempMaxCelsius), de = !Y, ce = !!Y && (B !== "" || D.show("temperatureCelsius")), Pe = ((ge = d.unit) == null ? void 0 : ge.operatingTempMinCelsius) != null && ((Ce = d.unit) == null ? void 0 : Ce.operatingTempMaxCelsius) != null ? ` This unit operates between ${d.unit.operatingTempMinCelsius}°C and ${d.unit.operatingTempMaxCelsius}°C.` : "";
169
+ async function Ye() {
170
+ var e, s;
171
+ if (!(!d.unit || !de)) {
172
+ S(!0), N("");
163
173
  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");
174
+ le(await Ke(d.unit.id, Number(B))), P("result");
175
+ } catch (r) {
176
+ N(((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
177
  } finally {
168
178
  S(!1);
169
179
  }
170
180
  }
171
181
  }
172
- async function ue(e) {
173
- var d, a, s, T, h;
174
- if (u.unit) {
175
- S(!0), I("");
182
+ async function pe(e) {
183
+ var s, r, u, y, h;
184
+ if (d.unit) {
185
+ S(!0), N("");
176
186
  try {
177
- let c = ((s = (a = await Ze(u.unit.id, {
178
- id: Ie(),
179
- temperatureCelsius: Number(N),
187
+ let c = ((u = (r = await Xe(d.unit.id, {
188
+ id: Be(),
189
+ temperatureCelsius: Number(B),
180
190
  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({
191
+ notes: ((s = M.notes) == null ? void 0 : s.trim()) || null
192
+ })) == null ? void 0 : r.affectedBatches) == null ? void 0 : u.length) ?? 0;
193
+ U({
184
194
  message: e && c > 0 ? `Reading logged. ${c} ${c === 1 ? "batch" : "batches"} marked as wastage.` : "Temperature reading logged.",
185
195
  type: "success"
186
196
  }), O({
187
197
  open: !1,
188
198
  unit: null
189
- }), await R();
199
+ }), await z();
190
200
  } catch (c) {
191
- 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");
201
+ N(((h = (y = c == null ? void 0 : c.response) == null ? void 0 : y.data) == null ? void 0 : h.message) ?? (c == null ? void 0 : c.message) ?? "Failed to log temperature");
192
202
  } finally {
193
203
  S(!1);
194
204
  }
195
205
  }
196
206
  }
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, {
207
+ let A = (C == null ? void 0 : C.affectedBatches) ?? [], R = K ? b : b.filter((e) => e.isActive !== !1);
208
+ return /* @__PURE__ */ n(H, { children: [/* @__PURE__ */ i(oi, {}), /* @__PURE__ */ n(si, {
199
209
  perm: "view.manage.productManagement.storageUnit",
200
210
  children: [
201
- /* @__PURE__ */ n(ai, {
211
+ /* @__PURE__ */ n(ui, {
202
212
  title: "Storage Units",
203
213
  subtitle: "Cold-chain equipment for storing vaccine and product batches. Currently managed per facility.",
204
214
  chips: ["Catalog", "Facility-owned"],
@@ -207,30 +217,30 @@ function qi() {
207
217
  spacing: 1,
208
218
  children: [/* @__PURE__ */ i(g, {
209
219
  variant: "outlined",
210
- startIcon: /* @__PURE__ */ i(ci, {}),
211
- onClick: () => void R(),
220
+ startIcon: /* @__PURE__ */ i(fi, {}),
221
+ onClick: () => void z(),
212
222
  children: "Refresh"
213
- }), W ? /* @__PURE__ */ i(g, {
223
+ }), q ? /* @__PURE__ */ i(g, {
214
224
  variant: "contained",
215
- startIcon: /* @__PURE__ */ i(Ne, {}),
216
- onClick: J,
225
+ startIcon: /* @__PURE__ */ i(Ae, {}),
226
+ onClick: G,
217
227
  children: "New Storage Unit"
218
228
  }) : null]
219
229
  }),
220
- children: [Z ? /* @__PURE__ */ i(B, {
230
+ children: [_ ? /* @__PURE__ */ i($, {
221
231
  severity: "error",
222
232
  sx: { mb: 2 },
223
- children: Z
224
- }) : null, /* @__PURE__ */ i(Oe, {
233
+ children: _
234
+ }) : null, /* @__PURE__ */ i(je, {
225
235
  eyebrow: "Cold-chain network",
226
236
  title: "Storage units",
227
- subtitle: j ? "Loading…" : `${q.length} ${q.length === 1 ? "unit" : "units"}`,
228
- actions: /* @__PURE__ */ i(ve, {
229
- control: /* @__PURE__ */ i(pi, {
230
- checked: H,
231
- onChange: (e) => Fe(e.target.checked)
237
+ subtitle: Q ? "Loading…" : `${R.length} ${R.length === 1 ? "unit" : "units"}`,
238
+ actions: /* @__PURE__ */ i(xe, {
239
+ control: /* @__PURE__ */ i(yi, {
240
+ checked: K,
241
+ onChange: (e) => Re(e.target.checked)
232
242
  }),
233
- label: /* @__PURE__ */ i(w, {
243
+ label: /* @__PURE__ */ i(T, {
234
244
  variant: "body2",
235
245
  sx: { fontWeight: 600 },
236
246
  children: "Show inactive"
@@ -241,33 +251,33 @@ function qi() {
241
251
  ml: 0
242
252
  }
243
253
  }),
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, {
254
+ children: /* @__PURE__ */ n(He, { children: [/* @__PURE__ */ i(we, { children: /* @__PURE__ */ n(W, { children: [
255
+ /* @__PURE__ */ i(a, { children: "Code" }),
256
+ /* @__PURE__ */ i(a, { children: "Name" }),
257
+ /* @__PURE__ */ i(a, { children: "Facility" }),
258
+ /* @__PURE__ */ i(a, { children: "Type" }),
259
+ /* @__PURE__ */ i(a, { children: "Operating range" }),
260
+ /* @__PURE__ */ i(a, { children: "Status" }),
261
+ /* @__PURE__ */ i(a, {
252
262
  align: "right",
253
263
  children: "Action"
254
264
  })
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, {
265
+ ] }) }), /* @__PURE__ */ i(ve, { children: Q ? Array.from({ length: 4 }).map((e, s) => /* @__PURE__ */ i(W, { children: Array.from({ length: 7 }).map((r, u) => /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(pi, { height: 22 }) }, u)) }, s)) : R.length === 0 ? /* @__PURE__ */ i(Qe, {
256
266
  colSpan: 7,
257
- icon: mi,
258
- title: x.length === 0 ? "No storage units yet" : "No active storage units",
259
- hint: x.length === 0 ? "You need storage equipment to keep vaccine batches safe." : "Turn on “Show inactive” to see deactivated storage units.",
260
- action: x.length === 0 && W ? /* @__PURE__ */ i(g, {
267
+ icon: wi,
268
+ title: b.length === 0 ? "No storage units yet" : "No active storage units",
269
+ hint: b.length === 0 ? "You need storage equipment to keep vaccine batches safe." : "Turn on “Show inactive” to see deactivated storage units.",
270
+ action: b.length === 0 && q ? /* @__PURE__ */ i(g, {
261
271
  variant: "contained",
262
272
  size: "small",
263
- startIcon: /* @__PURE__ */ i(Ne, {}),
264
- onClick: J,
273
+ startIcon: /* @__PURE__ */ i(Ae, {}),
274
+ onClick: G,
265
275
  children: "Create first unit"
266
276
  }) : null
267
- }) : q.map((e) => /* @__PURE__ */ n($, {
277
+ }) : R.map((e) => /* @__PURE__ */ n(W, {
268
278
  hover: !0,
269
279
  children: [
270
- /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(fe, {
280
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(H, {
271
281
  component: "span",
272
282
  sx: {
273
283
  display: "inline-flex",
@@ -281,19 +291,19 @@ function qi() {
281
291
  },
282
292
  children: e.unitCode
283
293
  }) }),
284
- /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(w, {
294
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(T, {
285
295
  variant: "body2",
286
296
  sx: { fontWeight: 700 },
287
297
  children: e.unitName
288
298
  }) }),
289
- /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(w, {
299
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(T, {
290
300
  variant: "caption",
291
301
  color: "text.secondary",
292
- children: Re(e.ownerId)
302
+ children: Ue(e.ownerId)
293
303
  }) }),
294
- /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(we, {
304
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(be, {
295
305
  size: "small",
296
- label: _e(ge, e.unitType),
306
+ label: qe(e.unitType),
297
307
  variant: "outlined",
298
308
  sx: {
299
309
  fontWeight: 700,
@@ -301,7 +311,7 @@ function qi() {
301
311
  height: 22
302
312
  }
303
313
  }) }),
304
- /* @__PURE__ */ i(r, { children: e.operatingTempMinCelsius != null && e.operatingTempMaxCelsius != null ? /* @__PURE__ */ n(w, {
314
+ /* @__PURE__ */ i(a, { children: e.operatingTempMinCelsius != null && e.operatingTempMaxCelsius != null ? /* @__PURE__ */ n(T, {
305
315
  variant: "caption",
306
316
  sx: {
307
317
  fontWeight: 700,
@@ -313,12 +323,12 @@ function qi() {
313
323
  e.operatingTempMaxCelsius,
314
324
  "°C"
315
325
  ]
316
- }) : /* @__PURE__ */ i(w, {
326
+ }) : /* @__PURE__ */ i(T, {
317
327
  variant: "caption",
318
328
  color: "text.disabled",
319
329
  children: "—"
320
330
  }) }),
321
- /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(we, {
331
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(be, {
322
332
  size: "small",
323
333
  label: e.isActive ? "Active" : "Inactive",
324
334
  color: e.isActive ? "success" : "default",
@@ -329,23 +339,23 @@ function qi() {
329
339
  height: 22
330
340
  }
331
341
  }) }),
332
- /* @__PURE__ */ i(r, {
342
+ /* @__PURE__ */ i(a, {
333
343
  align: "right",
334
344
  children: /* @__PURE__ */ n(v, {
335
345
  direction: "row",
336
346
  spacing: 1,
337
347
  justifyContent: "flex-end",
338
- children: [W ? /* @__PURE__ */ i(g, {
348
+ children: [q ? /* @__PURE__ */ i(g, {
339
349
  size: "small",
340
350
  variant: "outlined",
341
351
  color: "info",
342
- startIcon: /* @__PURE__ */ i(gi, {}),
343
- onClick: () => Ue(e),
352
+ startIcon: /* @__PURE__ */ i(bi, {}),
353
+ onClick: () => Ve(e),
344
354
  children: "Log temp"
345
- }) : null, W ? /* @__PURE__ */ i(g, {
355
+ }) : null, q ? /* @__PURE__ */ i(g, {
346
356
  size: "small",
347
357
  variant: "outlined",
348
- onClick: () => Se(e),
358
+ onClick: () => Le(e),
349
359
  children: "Edit"
350
360
  }) : null]
351
361
  })
@@ -354,23 +364,23 @@ function qi() {
354
364
  }, e.id)) })] })
355
365
  })]
356
366
  }),
357
- /* @__PURE__ */ n(xe, {
358
- open: We,
367
+ /* @__PURE__ */ n(Me, {
368
+ open: Se,
359
369
  onClose: () => k(!1),
360
370
  fullWidth: !0,
361
371
  maxWidth: "sm",
362
372
  children: [
363
- /* @__PURE__ */ i(be, { children: F ? "Edit Storage Unit" : "New Storage Unit" }),
364
- /* @__PURE__ */ i(Me, {
373
+ /* @__PURE__ */ i(ke, { children: I ? "Edit Storage Unit" : "New Storage Unit" }),
374
+ /* @__PURE__ */ i(Ie, {
365
375
  dividers: !0,
366
376
  children: /* @__PURE__ */ n(v, {
367
377
  spacing: 2,
368
378
  sx: { pt: 1 },
369
379
  children: [
370
- /* @__PURE__ */ i(he, {
380
+ /* @__PURE__ */ i(fe, {
371
381
  label: "Owner Type",
372
382
  required: !0,
373
- disabled: !!F,
383
+ disabled: !!I,
374
384
  value: t.ownerType,
375
385
  onChange: (e) => m({
376
386
  ...t,
@@ -380,11 +390,11 @@ function qi() {
380
390
  onBlur: l.onBlur("ownerType"),
381
391
  error: l.show("ownerType") && !!o.ownerType,
382
392
  helperText: l.show("ownerType") && o.ownerType ? o.ownerType : "Only Facility is available currently.",
383
- options: Ci
393
+ options: xi
384
394
  }),
385
- /* @__PURE__ */ i(li, {
395
+ /* @__PURE__ */ i(ci, {
386
396
  required: !0,
387
- disabled: !!F || t.ownerType !== "FACILITY",
397
+ disabled: !!I || t.ownerType !== "FACILITY",
388
398
  value: t.ownerId,
389
399
  onChange: (e) => m({
390
400
  ...t,
@@ -394,26 +404,26 @@ function qi() {
394
404
  error: l.show("ownerId") && !!o.ownerId,
395
405
  helperText: l.show("ownerId") && o.ownerId ? o.ownerId : "Search by name. The owner cannot be changed once created."
396
406
  }),
397
- /* @__PURE__ */ i(si, {}),
398
- /* @__PURE__ */ i(y, {
407
+ /* @__PURE__ */ i(mi, {}),
408
+ /* @__PURE__ */ i(w, {
399
409
  required: !0,
400
410
  label: "Unit name",
401
411
  size: "small",
402
412
  fullWidth: !0,
403
413
  value: t.unitName,
404
414
  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
415
+ let s = e.target.value, r = s.split(/\s+/).filter(Boolean).map((u) => u[0]).join("").toUpperCase().replace(/[^A-Z0-9_]/g, "");
416
+ m((u) => ({
417
+ ...u,
418
+ unitName: s,
419
+ unitCode: I ? u.unitCode : r
410
420
  }));
411
421
  },
412
422
  onBlur: l.onBlur("unitName"),
413
423
  error: l.show("unitName") && !!o.unitName,
414
424
  helperText: l.show("unitName") ? o.unitName : ""
415
425
  }),
416
- /* @__PURE__ */ i(y, {
426
+ /* @__PURE__ */ i(w, {
417
427
  required: !0,
418
428
  label: "Unit code (unique within facility)",
419
429
  size: "small",
@@ -427,7 +437,7 @@ function qi() {
427
437
  error: l.show("unitCode") && !!o.unitCode,
428
438
  helperText: l.show("unitCode") && o.unitCode ? o.unitCode : "Auto-generated from the name. Edit if needed to make it unique within this facility."
429
439
  }),
430
- /* @__PURE__ */ i(he, {
440
+ /* @__PURE__ */ i(fe, {
431
441
  label: "Type",
432
442
  required: !0,
433
443
  value: t.unitType,
@@ -437,12 +447,12 @@ function qi() {
437
447
  }),
438
448
  onBlur: l.onBlur("unitType"),
439
449
  error: l.show("unitType") && !!o.unitType,
440
- options: ge
450
+ options: De
441
451
  }),
442
452
  /* @__PURE__ */ n(v, {
443
453
  direction: "row",
444
454
  spacing: 2,
445
- children: [/* @__PURE__ */ i(y, {
455
+ children: [/* @__PURE__ */ i(w, {
446
456
  label: "Make",
447
457
  size: "small",
448
458
  fullWidth: !0,
@@ -452,7 +462,7 @@ function qi() {
452
462
  make: e.target.value
453
463
  }),
454
464
  helperText: "Example: Godrej, Vestfrost"
455
- }), /* @__PURE__ */ i(y, {
465
+ }), /* @__PURE__ */ i(w, {
456
466
  label: "Model",
457
467
  size: "small",
458
468
  fullWidth: !0,
@@ -467,7 +477,7 @@ function qi() {
467
477
  /* @__PURE__ */ n(v, {
468
478
  direction: "row",
469
479
  spacing: 2,
470
- children: [/* @__PURE__ */ i(y, {
480
+ children: [/* @__PURE__ */ i(w, {
471
481
  label: "Min °C",
472
482
  size: "small",
473
483
  type: "number",
@@ -485,7 +495,7 @@ function qi() {
485
495
  onBlur: l.onBlur("operatingTempMinCelsius"),
486
496
  error: l.show("operatingTempMinCelsius") && !!o.operatingTempMinCelsius,
487
497
  helperText: l.show("operatingTempMinCelsius") && o.operatingTempMinCelsius ? o.operatingTempMinCelsius : "Allowed range: −90°C to +30°C"
488
- }), /* @__PURE__ */ i(y, {
498
+ }), /* @__PURE__ */ i(w, {
489
499
  label: "Max °C",
490
500
  size: "small",
491
501
  type: "number",
@@ -505,7 +515,7 @@ function qi() {
505
515
  helperText: l.show("operatingTempMaxCelsius") && o.operatingTempMaxCelsius ? o.operatingTempMaxCelsius : "Allowed range: −90°C to +30°C"
506
516
  })]
507
517
  }),
508
- /* @__PURE__ */ i(y, {
518
+ /* @__PURE__ */ i(w, {
509
519
  label: "Comments",
510
520
  size: "small",
511
521
  multiline: !0,
@@ -518,61 +528,81 @@ function qi() {
518
528
  }),
519
529
  helperText: "Notes about placement, maintenance schedule, or other details."
520
530
  }),
521
- /* @__PURE__ */ i(ve, {
522
- control: /* @__PURE__ */ i(ui, {
531
+ /* @__PURE__ */ n(H, { children: [/* @__PURE__ */ i(xe, {
532
+ control: /* @__PURE__ */ i(hi, {
523
533
  checked: t.isActive,
534
+ disabled: ee,
524
535
  onChange: (e) => m({
525
536
  ...t,
526
537
  isActive: e.target.checked
527
538
  })
528
539
  }),
529
540
  label: "Active"
530
- })
541
+ }), ee ? /* @__PURE__ */ n(T, {
542
+ variant: "caption",
543
+ sx: {
544
+ display: "block",
545
+ color: "text.secondary",
546
+ ml: 4,
547
+ mt: -0.5
548
+ },
549
+ children: [
550
+ `This unit holds ${t.occupyingBatchCount} ${t.occupyingBatchCount === 1 ? "batch" : "batches"}. `,
551
+ /* @__PURE__ */ i(gi, {
552
+ component: "button",
553
+ type: "button",
554
+ underline: "always",
555
+ onClick: () => We(`/ui/medplat/manage/pm/inventory?storageUnitId=${t.id}`),
556
+ children: "Move that stock"
557
+ }),
558
+ " or write it off before marking it inactive."
559
+ ]
560
+ }) : null] })
531
561
  ]
532
562
  })
533
563
  }),
534
- /* @__PURE__ */ n(ke, { children: [/* @__PURE__ */ i(g, {
564
+ /* @__PURE__ */ n(Ne, { children: [/* @__PURE__ */ i(g, {
535
565
  onClick: () => k(!1),
536
566
  children: "Cancel"
537
567
  }), /* @__PURE__ */ i(g, {
538
568
  variant: "contained",
539
- disabled: !ie,
540
- onClick: () => void ze(),
569
+ disabled: !re,
570
+ onClick: () => void Oe(),
541
571
  children: "Save"
542
572
  })] })
543
573
  ]
544
574
  }),
545
- /* @__PURE__ */ n(xe, {
546
- open: u.open,
547
- onClose: ae,
575
+ /* @__PURE__ */ n(Me, {
576
+ open: d.open,
577
+ onClose: se,
548
578
  fullWidth: !0,
549
579
  maxWidth: "sm",
550
580
  children: [
551
- /* @__PURE__ */ n(be, { children: ["Log Temperature", u.unit ? /* @__PURE__ */ n(w, {
581
+ /* @__PURE__ */ n(ke, { children: ["Log Temperature", d.unit ? /* @__PURE__ */ n(T, {
552
582
  variant: "caption",
553
583
  color: "text.secondary",
554
584
  sx: {
555
585
  display: "block",
556
586
  fontWeight: 600
557
587
  },
558
- children: [u.unit.unitName, u.unit.operatingTempMinCelsius != null && u.unit.operatingTempMaxCelsius != null ? ` · operates ${u.unit.operatingTempMinCelsius}°C → ${u.unit.operatingTempMaxCelsius}°C` : ""]
588
+ children: [d.unit.unitName, d.unit.operatingTempMinCelsius != null && d.unit.operatingTempMaxCelsius != null ? ` · operates ${d.unit.operatingTempMinCelsius}°C → ${d.unit.operatingTempMaxCelsius}°C` : ""]
559
589
  }) : null] }),
560
- /* @__PURE__ */ n(Me, {
590
+ /* @__PURE__ */ n(Ie, {
561
591
  dividers: !0,
562
- children: [re ? /* @__PURE__ */ i(B, {
592
+ children: [oe ? /* @__PURE__ */ i($, {
563
593
  severity: "error",
564
594
  sx: { mb: 2 },
565
- children: re
566
- }) : null, te === "input" ? /* @__PURE__ */ n(v, {
595
+ children: oe
596
+ }) : null, ae === "input" ? /* @__PURE__ */ n(v, {
567
597
  spacing: 2,
568
598
  sx: { pt: 1 },
569
599
  children: [
570
- /* @__PURE__ */ i(w, {
600
+ /* @__PURE__ */ i(T, {
571
601
  variant: "body2",
572
602
  color: "text.secondary",
573
603
  children: "Record the current temperature reading for this storage unit. We will check whether any stored product batch falls outside its required range."
574
604
  }),
575
- /* @__PURE__ */ i(y, {
605
+ /* @__PURE__ */ i(w, {
576
606
  required: !0,
577
607
  autoFocus: !0,
578
608
  label: "Temperature (°C)",
@@ -585,27 +615,27 @@ function qi() {
585
615
  max: 30
586
616
  },
587
617
  value: M.temperatureCelsius,
588
- onChange: (e) => D({
618
+ onChange: (e) => V({
589
619
  ...M,
590
620
  temperatureCelsius: e.target.value
591
621
  }),
592
- onBlur: L.onBlur("temperatureCelsius"),
593
- error: se,
594
- helperText: se ? V : `Enter the reading in degrees Celsius.${Ee}`
622
+ onBlur: D.onBlur("temperatureCelsius"),
623
+ error: ce,
624
+ helperText: ce ? Y : `Enter the reading in degrees Celsius.${Pe}`
595
625
  }),
596
- le ? /* @__PURE__ */ i(B, {
626
+ ue ? /* @__PURE__ */ i($, {
597
627
  severity: "warning",
598
- icon: /* @__PURE__ */ i(Ae, {}),
599
- children: le
628
+ icon: /* @__PURE__ */ i($e, {}),
629
+ children: ue
600
630
  }) : null,
601
- /* @__PURE__ */ i(y, {
631
+ /* @__PURE__ */ i(w, {
602
632
  label: "Notes (optional)",
603
633
  size: "small",
604
634
  multiline: !0,
605
635
  minRows: 2,
606
636
  fullWidth: !0,
607
637
  value: M.notes,
608
- onChange: (e) => D({
638
+ onChange: (e) => V({
609
639
  ...M,
610
640
  notes: e.target.value
611
641
  }),
@@ -615,7 +645,7 @@ function qi() {
615
645
  }) : /* @__PURE__ */ n(v, {
616
646
  spacing: 2,
617
647
  sx: { pt: 1 },
618
- children: [/* @__PURE__ */ n(w, {
648
+ children: [/* @__PURE__ */ n(T, {
619
649
  variant: "body2",
620
650
  sx: { fontWeight: 700 },
621
651
  children: [
@@ -623,13 +653,13 @@ function qi() {
623
653
  C == null ? void 0 : C.temperatureCelsius,
624
654
  "°C"
625
655
  ]
626
- }), A.length === 0 ? /* @__PURE__ */ i(B, {
656
+ }), A.length === 0 ? /* @__PURE__ */ i($, {
627
657
  severity: "success",
628
- icon: /* @__PURE__ */ i(hi, {}),
658
+ icon: /* @__PURE__ */ i(vi, {}),
629
659
  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, {
660
+ }) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ n($, {
631
661
  severity: "warning",
632
- icon: /* @__PURE__ */ i(Ae, {}),
662
+ icon: /* @__PURE__ */ i($e, {}),
633
663
  children: [
634
664
  "At ",
635
665
  C == null ? void 0 : C.temperatureCelsius,
@@ -639,45 +669,45 @@ function qi() {
639
669
  A.length === 1 ? "it" : "them",
640
670
  " — and any open vials — as wastage. This cannot be undone."
641
671
  ]
642
- }), /* @__PURE__ */ n(di, {
672
+ }), /* @__PURE__ */ n(Ci, {
643
673
  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, {
674
+ children: [/* @__PURE__ */ i(we, { children: /* @__PURE__ */ n(W, { children: [
675
+ /* @__PURE__ */ i(a, { children: "Product" }),
676
+ /* @__PURE__ */ i(a, { children: "Lot" }),
677
+ /* @__PURE__ */ i(a, { children: "Expiry" }),
678
+ /* @__PURE__ */ i(a, {
649
679
  align: "right",
650
680
  children: "Qty"
651
681
  }),
652
- /* @__PURE__ */ i(r, {
682
+ /* @__PURE__ */ i(a, {
653
683
  align: "right",
654
684
  children: "Open vials"
655
685
  }),
656
- /* @__PURE__ */ i(r, { children: "Required" })
657
- ] }) }), /* @__PURE__ */ i(ye, { children: A.map((e) => /* @__PURE__ */ n($, { children: [
658
- /* @__PURE__ */ i(r, {
686
+ /* @__PURE__ */ i(a, { children: "Required" })
687
+ ] }) }), /* @__PURE__ */ i(ve, { children: A.map((e) => /* @__PURE__ */ n(W, { children: [
688
+ /* @__PURE__ */ i(a, {
659
689
  sx: { fontWeight: 700 },
660
690
  children: e.productName
661
691
  }),
662
- /* @__PURE__ */ i(r, {
692
+ /* @__PURE__ */ i(a, {
663
693
  sx: {
664
694
  fontFamily: "monospace",
665
695
  fontSize: "0.78rem"
666
696
  },
667
697
  children: e.lotNumber || "—"
668
698
  }),
669
- /* @__PURE__ */ i(r, { children: e.expiryDate ? He(e.expiryDate) : "—" }),
670
- /* @__PURE__ */ i(r, {
699
+ /* @__PURE__ */ i(a, { children: e.expiryDate ? Ge(e.expiryDate) : "—" }),
700
+ /* @__PURE__ */ i(a, {
671
701
  align: "right",
672
702
  sx: { fontVariantNumeric: "tabular-nums" },
673
703
  children: e.qtyRemaining ?? 0
674
704
  }),
675
- /* @__PURE__ */ i(r, {
705
+ /* @__PURE__ */ i(a, {
676
706
  align: "right",
677
707
  sx: { fontVariantNumeric: "tabular-nums" },
678
708
  children: e.openVialCount ?? 0
679
709
  }),
680
- /* @__PURE__ */ i(r, {
710
+ /* @__PURE__ */ i(a, {
681
711
  sx: { whiteSpace: "nowrap" },
682
712
  children: e.requiredMinCelsius != null && e.requiredMaxCelsius != null ? `${e.requiredMinCelsius}°C → ${e.requiredMaxCelsius}°C` : "—"
683
713
  })
@@ -685,29 +715,29 @@ function qi() {
685
715
  })] })]
686
716
  })]
687
717
  }),
688
- /* @__PURE__ */ i(ke, { children: te === "input" ? /* @__PURE__ */ n(Y, { children: [/* @__PURE__ */ i(g, {
689
- onClick: ae,
718
+ /* @__PURE__ */ i(Ne, { children: ae === "input" ? /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
719
+ onClick: se,
690
720
  disabled: f,
691
721
  children: "Cancel"
692
722
  }), /* @__PURE__ */ i(g, {
693
723
  variant: "contained",
694
- disabled: !oe || f,
695
- onClick: () => void Le(),
724
+ disabled: !de || f,
725
+ onClick: () => void Ye(),
696
726
  children: f ? "Checking…" : "Check"
697
- })] }) : /* @__PURE__ */ n(Y, { children: [/* @__PURE__ */ i(g, {
727
+ })] }) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
698
728
  onClick: () => P("input"),
699
729
  disabled: f,
700
730
  children: "Back"
701
731
  }), A.length === 0 ? /* @__PURE__ */ i(g, {
702
732
  variant: "contained",
703
733
  disabled: f,
704
- onClick: () => void ue(!1),
734
+ onClick: () => void pe(!1),
705
735
  children: f ? "Logging…" : "Log reading"
706
736
  }) : /* @__PURE__ */ i(g, {
707
737
  variant: "contained",
708
738
  color: "error",
709
739
  disabled: f,
710
- onClick: () => void ue(!0),
740
+ onClick: () => void pe(!0),
711
741
  children: f ? "Processing…" : "Confirm & mark wastage"
712
742
  })] }) })
713
743
  ]
@@ -716,6 +746,6 @@ function qi() {
716
746
  })] });
717
747
  }
718
748
  export {
719
- qi as default
749
+ Yi as default
720
750
  };
721
- //# sourceMappingURL=StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map
751
+ //# sourceMappingURL=StorageUnitsPage-CTEVuemZ-B4osG74N.js.map