@argusoft/medplat-core 1.0.31 → 1.0.33

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 (218) hide show
  1. package/dist/AccessRights-BC43Jhml.js +1093 -0
  2. package/dist/AccessRights-BC43Jhml.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-DMw2vT0u-BVhvhc6J.js → BrandsPage-CdcAvaml-CYT80CMH.js} +45 -45
  9. package/dist/{BrandsPage-DMw2vT0u-BVhvhc6J.js.map → BrandsPage-CdcAvaml-CYT80CMH.js.map} +1 -1
  10. package/dist/{CategoriesPage-D3ihx9Gi-CT58g0ry.js → CategoriesPage-BprQEYJw-BRAukJB1.js} +43 -43
  11. package/dist/{CategoriesPage-D3ihx9Gi-CT58g0ry.js.map → CategoriesPage-BprQEYJw-BRAukJB1.js.map} +1 -1
  12. package/dist/ChangePasswordModalCore-rypTxA2O.js +238 -0
  13. package/dist/ChangePasswordModalCore-rypTxA2O.js.map +1 -0
  14. package/dist/{ConditionConfig-BQBmBHaM.js → ConditionConfig-Bpm6OoV5.js} +3 -3
  15. package/dist/{ConditionConfig-BQBmBHaM.js.map → ConditionConfig-Bpm6OoV5.js.map} +1 -1
  16. package/dist/{DashboardPage-asr2XDRu-uOOlX9Vq.js → DashboardPage-CTiGSx71-DX-TzGOH.js} +29 -29
  17. package/dist/{DashboardPage-asr2XDRu-uOOlX9Vq.js.map → DashboardPage-CTiGSx71-DX-TzGOH.js.map} +1 -1
  18. package/dist/EntityManagement-BGwJGl9k.js +62 -0
  19. package/dist/EntityManagement-BGwJGl9k.js.map +1 -0
  20. package/dist/{EventConfigurations-CUPEN5BV.js → EventConfigurations-B-z7xHh_.js} +3 -3
  21. package/dist/{EventConfigurations-CUPEN5BV.js.map → EventConfigurations-B-z7xHh_.js.map} +1 -1
  22. package/dist/{EventsExceptionModal-BX-ArkBE.js → EventsExceptionModal-DafomIv6.js} +2 -2
  23. package/dist/{EventsExceptionModal-BX-ArkBE.js.map → EventsExceptionModal-DafomIv6.js.map} +1 -1
  24. package/dist/{EventsUi-D6O9S7BK.js → EventsUi-Dl_yckSA.js} +37 -32
  25. package/dist/EventsUi-Dl_yckSA.js.map +1 -0
  26. package/dist/FacilityPicker-BXa2VF7i-D0JUIqLv.js +112 -0
  27. package/dist/FacilityPicker-BXa2VF7i-D0JUIqLv.js.map +1 -0
  28. package/dist/FaqList-CeDEuhU_.js +237 -0
  29. package/dist/FaqList-CeDEuhU_.js.map +1 -0
  30. package/dist/FaqSkeletons-hLCEcRr-.js +19 -0
  31. package/dist/FaqSkeletons-hLCEcRr-.js.map +1 -0
  32. package/dist/FaqView-sDzBVyXV.js +617 -0
  33. package/dist/FaqView-sDzBVyXV.js.map +1 -0
  34. package/dist/{FeatureMenu-CHsBbw3W.js → FeatureMenu-CaI-ZhSZ.js} +2 -2
  35. package/dist/{FeatureMenu-CHsBbw3W.js.map → FeatureMenu-CaI-ZhSZ.js.map} +1 -1
  36. package/dist/{FhirServerList-iXBPkRVF.js → FhirServerList-CrIHMAxz.js} +19 -19
  37. package/dist/{FhirServerList-iXBPkRVF.js.map → FhirServerList-CrIHMAxz.js.map} +1 -1
  38. package/dist/{FhirServerProfile-CUOwC6Wb.js → FhirServerProfile-D3aYcpwY.js} +8 -8
  39. package/dist/{FhirServerProfile-CUOwC6Wb.js.map → FhirServerProfile-D3aYcpwY.js.map} +1 -1
  40. package/dist/{FhirServerWizard-DZI8Olku.js → FhirServerWizard-Db6Hm4bQ.js} +15 -15
  41. package/dist/{FhirServerWizard-DZI8Olku.js.map → FhirServerWizard-Db6Hm4bQ.js.map} +1 -1
  42. package/dist/{ImmunizationConfigurationBase-aUtx0JEe.js → ImmunizationConfigurationBase-Clkk0-n6.js} +2638 -2577
  43. package/dist/ImmunizationConfigurationBase-Clkk0-n6.js.map +1 -0
  44. package/dist/InventoryPage-JadYMCzU-CWcCauMI.js +1017 -0
  45. package/dist/InventoryPage-JadYMCzU-CWcCauMI.js.map +1 -0
  46. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js +1344 -0
  47. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js.map +1 -0
  48. package/dist/{ManageDynamicFeature-BU0I45dd.js → ManageDynamicFeature-CuyYfx_P.js} +104 -97
  49. package/dist/ManageDynamicFeature-CuyYfx_P.js.map +1 -0
  50. package/dist/{ManageEventConfiguration-DqW3krT6.js → ManageEventConfiguration-DqPbn3Oi.js} +5 -5
  51. package/dist/{ManageEventConfiguration-DqW3krT6.js.map → ManageEventConfiguration-DqPbn3Oi.js.map} +1 -1
  52. package/dist/ManageFaq-4cT6bntx.js +1583 -0
  53. package/dist/ManageFaq-4cT6bntx.js.map +1 -0
  54. package/dist/ManageFaq.css +1 -0
  55. package/dist/ManageRole-CyfpySt9.js +981 -0
  56. package/dist/ManageRole-CyfpySt9.js.map +1 -0
  57. package/dist/{ManageUser-DZltBina.js → ManageUser-DchUMAyC.js} +172 -172
  58. package/dist/{ManageUser-DZltBina.js.map → ManageUser-DchUMAyC.js.map} +1 -1
  59. package/dist/{MemberProfileCard-D5CgkTdJ-D2NgDJl3.js → MemberProfileCard-01d_jz3w-CQi_zu6x.js} +37 -37
  60. package/dist/{MemberProfileCard-D5CgkTdJ-D2NgDJl3.js.map → MemberProfileCard-01d_jz3w-CQi_zu6x.js.map} +1 -1
  61. package/dist/MobileAnalytics-C9oc2yAo.js +18399 -0
  62. package/dist/MobileAnalytics-C9oc2yAo.js.map +1 -0
  63. package/dist/MobileMenuManagement-BmzTPXy7.js +231 -0
  64. package/dist/MobileMenuManagement-BmzTPXy7.js.map +1 -0
  65. package/dist/{MobileTypeEventConfigModal-CMcj7Ozp.js → MobileTypeEventConfigModal-DodU3beR.js} +3 -3
  66. package/dist/{MobileTypeEventConfigModal-CMcj7Ozp.js.map → MobileTypeEventConfigModal-DodU3beR.js.map} +1 -1
  67. package/dist/{NewServerManagement-Cxe0dV0O.js → NewServerManagement-BdayO78D.js} +368 -352
  68. package/dist/NewServerManagement-BdayO78D.js.map +1 -0
  69. package/dist/OtherTypeEventConfigModal-D_9S50aI.js +1414 -0
  70. package/dist/OtherTypeEventConfigModal-D_9S50aI.js.map +1 -0
  71. package/dist/{PaymentCreatePage-DfvSZ-kB-CckogYoe.js → PaymentCreatePage-D6NZBUC3-_98S21Sa.js} +56 -56
  72. package/dist/{PaymentCreatePage-DfvSZ-kB-CckogYoe.js.map → PaymentCreatePage-D6NZBUC3-_98S21Sa.js.map} +1 -1
  73. package/dist/{PaymentsPage-DMNjYWAJ-ChO9IXmk.js → PaymentsPage-CHieGNrn-ChCXEyck.js} +38 -38
  74. package/dist/{PaymentsPage-DMNjYWAJ-ChO9IXmk.js.map → PaymentsPage-CHieGNrn-ChCXEyck.js.map} +1 -1
  75. package/dist/{PermissionsModal-CCYkcKlC.js → PermissionsModal-Dxbkkrqe.js} +18 -18
  76. package/dist/PermissionsModal-Dxbkkrqe.js.map +1 -0
  77. package/dist/{PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js → PickupBatchLinesEditor-QPaqFtUO-BEtI5mIU.js} +2 -2
  78. package/dist/{PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js.map → PickupBatchLinesEditor-QPaqFtUO-BEtI5mIU.js.map} +1 -1
  79. package/dist/PickupCreatePage-C7_67u_u-DbDIZ1WC.js +801 -0
  80. package/dist/PickupCreatePage-C7_67u_u-DbDIZ1WC.js.map +1 -0
  81. package/dist/{PickupsPage-D7zyioJB-bHKnARYw.js → PickupsPage-BWblMlic-KehDMebm.js} +122 -122
  82. package/dist/PickupsPage-BWblMlic-KehDMebm.js.map +1 -0
  83. package/dist/PmGuard-BvUUbU80-DJipZoSg.js +641 -0
  84. package/dist/PmGuard-BvUUbU80-DJipZoSg.js.map +1 -0
  85. package/dist/ProductEditPage-Dbq4vUAA-DusAdAvm.js +1523 -0
  86. package/dist/ProductEditPage-Dbq4vUAA-DusAdAvm.js.map +1 -0
  87. package/dist/{ProductsPage-DvNHIeZt-BoOOJJtk.js → ProductsPage-BI22nPb4-D3GnWz34.js} +29 -29
  88. package/dist/{ProductsPage-DvNHIeZt-BoOOJJtk.js.map → ProductsPage-BI22nPb4-D3GnWz34.js.map} +1 -1
  89. package/dist/PurchaseCreatePage-C0EK9z4w-D4PlZsOH.js +724 -0
  90. package/dist/PurchaseCreatePage-C0EK9z4w-D4PlZsOH.js.map +1 -0
  91. package/dist/{PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js → PurchaseRequestDetailPage-DhBuOGHZ-CAmlL4fP.js} +446 -436
  92. package/dist/PurchaseRequestDetailPage-DhBuOGHZ-CAmlL4fP.js.map +1 -0
  93. package/dist/{PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js → PurchaseRequestsPage-Bj9HUMxb-BCAhEEkL.js} +55 -55
  94. package/dist/{PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js.map → PurchaseRequestsPage-Bj9HUMxb-BCAhEEkL.js.map} +1 -1
  95. package/dist/{PurchasesPage-DgL5T6BY-DePUuE9l.js → PurchasesPage-Djl1AqD_-DxBRFRDy.js} +61 -61
  96. package/dist/{PurchasesPage-DgL5T6BY-DePUuE9l.js.map → PurchasesPage-Djl1AqD_-DxBRFRDy.js.map} +1 -1
  97. package/dist/{RoleManagement-s8iNx2Mu.js → RoleManagement-DVYufwy-.js} +3 -3
  98. package/dist/{RoleManagement-s8iNx2Mu.js.map → RoleManagement-DVYufwy-.js.map} +1 -1
  99. package/dist/Roles-BoNGJhtR.js +19 -0
  100. package/dist/Roles-BoNGJhtR.js.map +1 -0
  101. package/dist/{SaleCreatePage-CZnIOydv-DKBw-qp7.js → SaleCreatePage-DHBLmlBr-aEGmvJQq.js} +33 -33
  102. package/dist/{SaleCreatePage-CZnIOydv-DKBw-qp7.js.map → SaleCreatePage-DHBLmlBr-aEGmvJQq.js.map} +1 -1
  103. package/dist/{SalesPage-DPIRrC_O-M8rqnK7z.js → SalesPage-eF9Yr42z-CvOr82vo.js} +34 -34
  104. package/dist/SalesPage-eF9Yr42z-CvOr82vo.js.map +1 -0
  105. package/dist/SettingsPage-Cre-UE3r-CGTVp5Zw.js +741 -0
  106. package/dist/SettingsPage-Cre-UE3r-CGTVp5Zw.js.map +1 -0
  107. package/dist/{StorageUnitsPage-BDRkdCjW-UF64rf7q.js → StorageUnitsPage-CTEVuemZ-C7zkwKMz.js} +213 -190
  108. package/dist/StorageUnitsPage-CTEVuemZ-C7zkwKMz.js.map +1 -0
  109. package/dist/{SubMenu-BdMTYtC1.js → SubMenu-DZIhur09.js} +2 -2
  110. package/dist/{SubMenu-BdMTYtC1.js.map → SubMenu-DZIhur09.js.map} +1 -1
  111. package/dist/{TableDetails-BtafRxXb.js → TableDetails-Cc40dEUs.js} +272 -267
  112. package/dist/TableDetails-Cc40dEUs.js.map +1 -0
  113. package/dist/{TableList-Dpo6dO7S.js → TableList-B5tX4wII.js} +316 -312
  114. package/dist/TableList-B5tX4wII.js.map +1 -0
  115. package/dist/{TransactionsPage-CqWTMNU8-Df6eGFDW.js → TransactionsPage-Zuu7sjID-BDmUK7s1.js} +185 -170
  116. package/dist/TransactionsPage-Zuu7sjID-BDmUK7s1.js.map +1 -0
  117. package/dist/TransferCreatePage-DlT0nCDj-evHPJc99.js +635 -0
  118. package/dist/TransferCreatePage-DlT0nCDj-evHPJc99.js.map +1 -0
  119. package/dist/TransfersPage-DqaSvHda-DAUn5SSr.js +600 -0
  120. package/dist/TransfersPage-DqaSvHda-DAUn5SSr.js.map +1 -0
  121. package/dist/{TypeConfiguration-JbRCN6GR.js → TypeConfiguration-EaFiOzRE.js} +3 -3
  122. package/dist/{TypeConfiguration-JbRCN6GR.js.map → TypeConfiguration-EaFiOzRE.js.map} +1 -1
  123. package/dist/UserList-Cf5B-o_1.js +1904 -0
  124. package/dist/UserList-Cf5B-o_1.js.map +1 -0
  125. package/dist/Users-MC7txo1V.js +43 -0
  126. package/dist/{Users-CsJ08Kjm.js.map → Users-MC7txo1V.js.map} +1 -1
  127. package/dist/VaccineEducation-DWkNNasF.js +231 -0
  128. package/dist/VaccineEducation-DWkNNasF.js.map +1 -0
  129. package/dist/VaccineEducation.css +1 -0
  130. package/dist/VaccineEducationConfigurator-BFCvu5Mw.js +1450 -0
  131. package/dist/VaccineEducationConfigurator-BFCvu5Mw.js.map +1 -0
  132. package/dist/VaccineEducationConfigurator.css +1 -0
  133. package/dist/VaccineEducationList-BxZHahCh.js +334 -0
  134. package/dist/VaccineEducationList-BxZHahCh.js.map +1 -0
  135. package/dist/VialsPage-LoDaUqVv-Dw00Zc06.js +457 -0
  136. package/dist/VialsPage-LoDaUqVv-Dw00Zc06.js.map +1 -0
  137. package/dist/ckeditor5-_x14lrzc.js +49590 -0
  138. package/dist/ckeditor5-_x14lrzc.js.map +1 -0
  139. package/dist/ckeditor5.css +4 -0
  140. package/dist/{constants-DpXnLsAB-D6lN5cjK.js → constants-BTpJFQe_-CYPZIqQF.js} +160 -61
  141. package/dist/constants-BTpJFQe_-CYPZIqQF.js.map +1 -0
  142. package/dist/dashboardLayoutUtils--xUnoKPa.js +615 -0
  143. package/dist/dashboardLayoutUtils--xUnoKPa.js.map +1 -0
  144. package/dist/faqMedia-FDpje7v0.js +234 -0
  145. package/dist/faqMedia-FDpje7v0.js.map +1 -0
  146. package/dist/index-mfoqII2U.js +524 -0
  147. package/dist/index-mfoqII2U.js.map +1 -0
  148. package/dist/{index-D9YNFPn9.js → index-o8Pyt1Bt.js} +445 -439
  149. package/dist/index-o8Pyt1Bt.js.map +1 -0
  150. package/dist/index.css +1 -1
  151. package/dist/index.js +1 -1
  152. package/dist/{index.lib-ETRQOzvE.js → index.lib-QDEODnRT.js} +409 -327
  153. package/dist/index.lib-QDEODnRT.js.map +1 -0
  154. package/dist/listValueStore-5d4vNGQM-DB08drLf.js +43 -0
  155. package/dist/listValueStore-5d4vNGQM-DB08drLf.js.map +1 -0
  156. package/dist/proxy-C4gcRXzG.js +5265 -0
  157. package/dist/proxy-C4gcRXzG.js.map +1 -0
  158. package/package.json +7 -2
  159. package/dist/AccessRights-DUgY6ewy.js +0 -1031
  160. package/dist/AccessRights-DUgY6ewy.js.map +0 -1
  161. package/dist/AddMenuConfiguration-c6ZKiN0i.js +0 -8898
  162. package/dist/AddMenuConfiguration-c6ZKiN0i.js.map +0 -1
  163. package/dist/ChangePasswordModalCore-lQ9GamH1.js +0 -5494
  164. package/dist/ChangePasswordModalCore-lQ9GamH1.js.map +0 -1
  165. package/dist/EntityManagement-CPQL6qBj.js +0 -50
  166. package/dist/EntityManagement-CPQL6qBj.js.map +0 -1
  167. package/dist/EventsUi-D6O9S7BK.js.map +0 -1
  168. package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js +0 -79
  169. package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js.map +0 -1
  170. package/dist/ImmunizationConfigurationBase-aUtx0JEe.js.map +0 -1
  171. package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js +0 -665
  172. package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js.map +0 -1
  173. package/dist/ManageDynamicFeature-BU0I45dd.js.map +0 -1
  174. package/dist/ManageRole-CNZBRKGU.js +0 -776
  175. package/dist/ManageRole-CNZBRKGU.js.map +0 -1
  176. package/dist/MobileAnalytics-BLOionG_.js +0 -17301
  177. package/dist/MobileAnalytics-BLOionG_.js.map +0 -1
  178. package/dist/MobileMenuManagement-68Wijb0X.js +0 -220
  179. package/dist/MobileMenuManagement-68Wijb0X.js.map +0 -1
  180. package/dist/NewServerManagement-Cxe0dV0O.js.map +0 -1
  181. package/dist/OtherTypeEventConfigModal-stNmuSv_.js +0 -1812
  182. package/dist/OtherTypeEventConfigModal-stNmuSv_.js.map +0 -1
  183. package/dist/PermissionsModal-CCYkcKlC.js.map +0 -1
  184. package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js +0 -783
  185. package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js.map +0 -1
  186. package/dist/PickupsPage-D7zyioJB-bHKnARYw.js.map +0 -1
  187. package/dist/PmGuard-BZE-y4In-D_pUm5MP.js +0 -599
  188. package/dist/PmGuard-BZE-y4In-D_pUm5MP.js.map +0 -1
  189. package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js +0 -1305
  190. package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js.map +0 -1
  191. package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js +0 -675
  192. package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js.map +0 -1
  193. package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map +0 -1
  194. package/dist/Roles-BIyiic67.js +0 -14
  195. package/dist/Roles-BIyiic67.js.map +0 -1
  196. package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js.map +0 -1
  197. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js +0 -676
  198. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js.map +0 -1
  199. package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map +0 -1
  200. package/dist/TableDetails-BtafRxXb.js.map +0 -1
  201. package/dist/TableList-Dpo6dO7S.js.map +0 -1
  202. package/dist/TransactionsPage-CqWTMNU8-Df6eGFDW.js.map +0 -1
  203. package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js +0 -315
  204. package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js.map +0 -1
  205. package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js +0 -476
  206. package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js.map +0 -1
  207. package/dist/UserList-L41Xw0Q6.js +0 -1129
  208. package/dist/UserList-L41Xw0Q6.js.map +0 -1
  209. package/dist/Users-CsJ08Kjm.js +0 -40
  210. package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js +0 -321
  211. package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js.map +0 -1
  212. package/dist/constants-DpXnLsAB-D6lN5cjK.js.map +0 -1
  213. package/dist/dashboardLayoutUtils-CJivzaU1.js +0 -408
  214. package/dist/dashboardLayoutUtils-CJivzaU1.js.map +0 -1
  215. package/dist/index-D9YNFPn9.js.map +0 -1
  216. package/dist/index.lib-ETRQOzvE.js.map +0 -1
  217. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js +0 -36
  218. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js.map +0 -1
@@ -1,32 +1,33 @@
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";
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-Clkk0-n6.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-DJipZoSg.js";
7
+ import { y as di } from "./listValueStore-5d4vNGQM-DB08drLf.js";
8
+ import { f as ci } from "./FacilityPicker-BXa2VF7i-D0JUIqLv.js";
9
9
  import { useState as p } from "react";
10
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";
19
- import Ae from "@mui/icons-material/WarningAmberRounded";
20
- var yi = [{
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 = [{
21
22
  value: "FACILITY",
22
23
  label: "Facility"
23
24
  }];
24
- function Di() {
25
- var ce, pe, me, he;
26
- let W = ni().has("update.manage.productManagement.storageUnit"), { storageUnitTypes: q } = si(), Be = (e) => {
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) => {
27
28
  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();
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();
30
31
  function X() {
31
32
  return {
32
33
  id: "",
@@ -40,49 +41,50 @@ function Di() {
40
41
  comments: "",
41
42
  operatingTempMinCelsius: "",
42
43
  operatingTempMaxCelsius: "",
43
- isActive: !0
44
+ isActive: !0,
45
+ occupyingBatchCount: 0
44
46
  };
45
47
  }
46
- async function S() {
48
+ async function z() {
47
49
  var e, s;
48
- Q(!0), b("");
50
+ Z(!0), x("");
49
51
  try {
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({});
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({});
54
56
  else try {
55
- let T = await Qe(u), h = {};
56
- T.forEach((c) => {
57
+ let y = await _e(u), h = {};
58
+ y.forEach((c) => {
57
59
  h[c.id] = c.name;
58
- }), D(h);
60
+ }), E(h);
59
61
  } catch {
60
- D({});
62
+ E({});
61
63
  }
62
64
  } catch (r) {
63
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";
64
- b(u), R({
66
+ x(u), U({
65
67
  message: u,
66
68
  type: "error"
67
69
  });
68
70
  } finally {
69
- Q(!1);
71
+ Z(!1);
70
72
  }
71
73
  }
72
- ri("view.manage.productManagement.storageUnit", () => {
73
- S();
74
+ li("view.manage.productManagement.storageUnit", () => {
75
+ z();
74
76
  }, []);
75
- function ze(e) {
76
- return qe[e] ?? e;
77
+ function Ue(e) {
78
+ return ze[e] ?? e;
77
79
  }
78
- function J() {
79
- _(null), m({
80
+ function G() {
81
+ J(null), m({
80
82
  ...X(),
81
- id: Ne()
82
- }), l.reset(), b(""), k(!0);
83
+ id: Be()
84
+ }), l.reset(), x(""), k(!0);
83
85
  }
84
- function Ue(e) {
85
- _(e), l.reset(), b(""), m({
86
+ function Le(e) {
87
+ J(e), l.reset(), x(""), m({
86
88
  id: e.id,
87
89
  ownerType: e.ownerType ?? "FACILITY",
88
90
  ownerId: e.ownerId ?? "",
@@ -94,29 +96,30 @@ function Di() {
94
96
  comments: e.comments ?? "",
95
97
  operatingTempMinCelsius: e.operatingTempMinCelsius ?? "",
96
98
  operatingTempMaxCelsius: e.operatingTempMaxCelsius ?? "",
97
- isActive: e.isActive !== !1
99
+ isActive: e.isActive !== !1,
100
+ occupyingBatchCount: e.occupyingBatchCount ?? 0
98
101
  }), k(!0);
99
102
  }
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, {
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, {
101
104
  value: t.unitType,
102
- label: Ce(t.unitType)
103
- }] : q, o = {
105
+ label: ye(t.unitType)
106
+ }] : F, o = {
104
107
  ownerType: L(t.ownerType, "Owner type"),
105
108
  ownerId: L(t.ownerId, "Facility"),
106
109
  unitName: L(t.unitName, "Name"),
107
- unitCode: ee || (Re ? "Code is already in use for this facility." : ""),
110
+ unitCode: te || (Ee ? "Code is already in use for this facility." : ""),
108
111
  unitType: L(t.unitType, "Type"),
109
- operatingTempMinCelsius: K.min,
110
- operatingTempMaxCelsius: K.max
111
- }, te = ei(o);
112
- async function De() {
113
- var e, s, r, u, T;
114
- if (!te) {
115
- l.markAllTouched(), b("Please fix the highlighted fields.");
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.");
116
119
  return;
117
120
  }
118
121
  try {
119
- await Ze({
122
+ await Je({
120
123
  id: t.id,
121
124
  ownerId: t.ownerId,
122
125
  unitName: t.unitName.trim(),
@@ -128,13 +131,13 @@ function Di() {
128
131
  operatingTempMinCelsius: t.operatingTempMinCelsius === "" ? null : Number(t.operatingTempMinCelsius),
129
132
  operatingTempMaxCelsius: t.operatingTempMaxCelsius === "" ? null : Number(t.operatingTempMaxCelsius),
130
133
  isActive: t.isActive
131
- }), R({
134
+ }), U({
132
135
  message: "Storage unit saved.",
133
136
  type: "success"
134
- }), k(!1), await S();
137
+ }), k(!1), await z();
135
138
  } catch (h) {
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({
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({
138
141
  message: c,
139
142
  type: "error"
140
143
  });
@@ -143,69 +146,69 @@ function Di() {
143
146
  let [d, O] = p({
144
147
  open: !1,
145
148
  unit: null
146
- }), [M, P] = p({
149
+ }), [M, V] = p({
147
150
  temperatureCelsius: "",
148
151
  notes: ""
149
- }), [ne, V] = p("input"), [C, re] = p(null), [f, z] = p(!1), [ae, I] = p("");
150
- function Ee(e) {
152
+ }), [ae, P] = p("input"), [C, le] = p(null), [f, S] = p(!1), [oe, N] = p("");
153
+ function Ve(e) {
151
154
  O({
152
155
  open: !0,
153
156
  unit: e
154
- }), P({
157
+ }), V({
155
158
  temperatureCelsius: "",
156
159
  notes: ""
157
- }), V("input"), re(null), I(""), E.reset();
160
+ }), P("input"), le(null), N(""), D.reset();
158
161
  }
159
- function le() {
162
+ function se() {
160
163
  f || O({
161
164
  open: !1,
162
165
  unit: null
163
166
  });
164
167
  }
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() {
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() {
167
170
  var e, s;
168
- if (!(!d.unit || !se)) {
169
- z(!0), I("");
171
+ if (!(!d.unit || !de)) {
172
+ S(!0), N("");
170
173
  try {
171
- re(await _e(d.unit.id, Number(N))), V("result");
174
+ le(await Ke(d.unit.id, Number(B))), P("result");
172
175
  } 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");
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");
174
177
  } finally {
175
- z(!1);
178
+ S(!1);
176
179
  }
177
180
  }
178
181
  }
179
- async function de(e) {
180
- var s, r, u, T, h;
182
+ async function pe(e) {
183
+ var s, r, u, y, h;
181
184
  if (d.unit) {
182
- z(!0), I("");
185
+ S(!0), N("");
183
186
  try {
184
- let c = ((u = (r = await He(d.unit.id, {
185
- id: Ne(),
186
- temperatureCelsius: Number(N),
187
+ let c = ((u = (r = await Xe(d.unit.id, {
188
+ id: Be(),
189
+ temperatureCelsius: Number(B),
187
190
  wasteOutOfRange: e,
188
191
  notes: ((s = M.notes) == null ? void 0 : s.trim()) || null
189
192
  })) == null ? void 0 : r.affectedBatches) == null ? void 0 : u.length) ?? 0;
190
- R({
193
+ U({
191
194
  message: e && c > 0 ? `Reading logged. ${c} ${c === 1 ? "batch" : "batches"} marked as wastage.` : "Temperature reading logged.",
192
195
  type: "success"
193
196
  }), O({
194
197
  open: !1,
195
198
  unit: null
196
- }), await S();
199
+ }), await z();
197
200
  } catch (c) {
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");
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");
199
202
  } finally {
200
- z(!1);
203
+ S(!1);
201
204
  }
202
205
  }
203
206
  }
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, {
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, {
206
209
  perm: "view.manage.productManagement.storageUnit",
207
210
  children: [
208
- /* @__PURE__ */ n(oi, {
211
+ /* @__PURE__ */ n(ui, {
209
212
  title: "Storage Units",
210
213
  subtitle: "Cold-chain equipment for storing vaccine and product batches. Currently managed per facility.",
211
214
  chips: ["Catalog", "Facility-owned"],
@@ -214,30 +217,30 @@ function Di() {
214
217
  spacing: 1,
215
218
  children: [/* @__PURE__ */ i(g, {
216
219
  variant: "outlined",
217
- startIcon: /* @__PURE__ */ i(hi, {}),
218
- onClick: () => void S(),
220
+ startIcon: /* @__PURE__ */ i(fi, {}),
221
+ onClick: () => void z(),
219
222
  children: "Refresh"
220
- }), W ? /* @__PURE__ */ i(g, {
223
+ }), q ? /* @__PURE__ */ i(g, {
221
224
  variant: "contained",
222
- startIcon: /* @__PURE__ */ i($e, {}),
223
- onClick: J,
225
+ startIcon: /* @__PURE__ */ i(Ae, {}),
226
+ onClick: G,
224
227
  children: "New Storage Unit"
225
228
  }) : null]
226
229
  }),
227
- children: [Z ? /* @__PURE__ */ i(A, {
230
+ children: [_ ? /* @__PURE__ */ i($, {
228
231
  severity: "error",
229
232
  sx: { mb: 2 },
230
- children: Z
231
- }) : null, /* @__PURE__ */ i(Ve, {
233
+ children: _
234
+ }) : null, /* @__PURE__ */ i(je, {
232
235
  eyebrow: "Cold-chain network",
233
236
  title: "Storage units",
234
- subtitle: G ? "Loading…" : `${U.length} ${U.length === 1 ? "unit" : "units"}`,
237
+ subtitle: Q ? "Loading…" : `${R.length} ${R.length === 1 ? "unit" : "units"}`,
235
238
  actions: /* @__PURE__ */ i(xe, {
236
- control: /* @__PURE__ */ i(gi, {
237
- checked: H,
238
- onChange: (e) => Se(e.target.checked)
239
+ control: /* @__PURE__ */ i(yi, {
240
+ checked: K,
241
+ onChange: (e) => Re(e.target.checked)
239
242
  }),
240
- label: /* @__PURE__ */ i(w, {
243
+ label: /* @__PURE__ */ i(T, {
241
244
  variant: "body2",
242
245
  sx: { fontWeight: 600 },
243
246
  children: "Show inactive"
@@ -248,7 +251,7 @@ function Di() {
248
251
  ml: 0
249
252
  }
250
253
  }),
251
- children: /* @__PURE__ */ n(Ye, { children: [/* @__PURE__ */ i(ye, { children: /* @__PURE__ */ n(B, { children: [
254
+ children: /* @__PURE__ */ n(He, { children: [/* @__PURE__ */ i(we, { children: /* @__PURE__ */ n(W, { children: [
252
255
  /* @__PURE__ */ i(a, { children: "Code" }),
253
256
  /* @__PURE__ */ i(a, { children: "Name" }),
254
257
  /* @__PURE__ */ i(a, { children: "Facility" }),
@@ -259,22 +262,22 @@ function Di() {
259
262
  align: "right",
260
263
  children: "Action"
261
264
  })
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, {
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, {
263
266
  colSpan: 7,
264
- icon: Ci,
265
- title: x.length === 0 ? "No storage units yet" : "No active storage units",
266
- hint: x.length === 0 ? "You need storage equipment to keep vaccine batches safe." : "Turn on “Show inactive” to see deactivated storage units.",
267
- 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, {
268
271
  variant: "contained",
269
272
  size: "small",
270
- startIcon: /* @__PURE__ */ i($e, {}),
271
- onClick: J,
273
+ startIcon: /* @__PURE__ */ i(Ae, {}),
274
+ onClick: G,
272
275
  children: "Create first unit"
273
276
  }) : null
274
- }) : U.map((e) => /* @__PURE__ */ n(B, {
277
+ }) : R.map((e) => /* @__PURE__ */ n(W, {
275
278
  hover: !0,
276
279
  children: [
277
- /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(Te, {
280
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(H, {
278
281
  component: "span",
279
282
  sx: {
280
283
  display: "inline-flex",
@@ -288,19 +291,19 @@ function Di() {
288
291
  },
289
292
  children: e.unitCode
290
293
  }) }),
291
- /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(w, {
294
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(T, {
292
295
  variant: "body2",
293
296
  sx: { fontWeight: 700 },
294
297
  children: e.unitName
295
298
  }) }),
296
- /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(w, {
299
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(T, {
297
300
  variant: "caption",
298
301
  color: "text.secondary",
299
- children: ze(e.ownerId)
302
+ children: Ue(e.ownerId)
300
303
  }) }),
301
- /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(ve, {
304
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(be, {
302
305
  size: "small",
303
- label: Be(e.unitType),
306
+ label: qe(e.unitType),
304
307
  variant: "outlined",
305
308
  sx: {
306
309
  fontWeight: 700,
@@ -308,7 +311,7 @@ function Di() {
308
311
  height: 22
309
312
  }
310
313
  }) }),
311
- /* @__PURE__ */ i(a, { children: e.operatingTempMinCelsius != null && e.operatingTempMaxCelsius != null ? /* @__PURE__ */ n(w, {
314
+ /* @__PURE__ */ i(a, { children: e.operatingTempMinCelsius != null && e.operatingTempMaxCelsius != null ? /* @__PURE__ */ n(T, {
312
315
  variant: "caption",
313
316
  sx: {
314
317
  fontWeight: 700,
@@ -320,12 +323,12 @@ function Di() {
320
323
  e.operatingTempMaxCelsius,
321
324
  "°C"
322
325
  ]
323
- }) : /* @__PURE__ */ i(w, {
326
+ }) : /* @__PURE__ */ i(T, {
324
327
  variant: "caption",
325
328
  color: "text.disabled",
326
329
  children: "—"
327
330
  }) }),
328
- /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(ve, {
331
+ /* @__PURE__ */ i(a, { children: /* @__PURE__ */ i(be, {
329
332
  size: "small",
330
333
  label: e.isActive ? "Active" : "Inactive",
331
334
  color: e.isActive ? "success" : "default",
@@ -342,17 +345,17 @@ function Di() {
342
345
  direction: "row",
343
346
  spacing: 1,
344
347
  justifyContent: "flex-end",
345
- children: [W ? /* @__PURE__ */ i(g, {
348
+ children: [q ? /* @__PURE__ */ i(g, {
346
349
  size: "small",
347
350
  variant: "outlined",
348
351
  color: "info",
349
- startIcon: /* @__PURE__ */ i(Ti, {}),
350
- onClick: () => Ee(e),
352
+ startIcon: /* @__PURE__ */ i(bi, {}),
353
+ onClick: () => Ve(e),
351
354
  children: "Log temp"
352
- }) : null, W ? /* @__PURE__ */ i(g, {
355
+ }) : null, q ? /* @__PURE__ */ i(g, {
353
356
  size: "small",
354
357
  variant: "outlined",
355
- onClick: () => Ue(e),
358
+ onClick: () => Le(e),
356
359
  children: "Edit"
357
360
  }) : null]
358
361
  })
@@ -361,23 +364,23 @@ function Di() {
361
364
  }, e.id)) })] })
362
365
  })]
363
366
  }),
364
- /* @__PURE__ */ n(be, {
365
- open: Fe,
367
+ /* @__PURE__ */ n(Me, {
368
+ open: Se,
366
369
  onClose: () => k(!1),
367
370
  fullWidth: !0,
368
371
  maxWidth: "sm",
369
372
  children: [
370
- /* @__PURE__ */ i(Me, { children: F ? "Edit Storage Unit" : "New Storage Unit" }),
371
- /* @__PURE__ */ i(ke, {
373
+ /* @__PURE__ */ i(ke, { children: I ? "Edit Storage Unit" : "New Storage Unit" }),
374
+ /* @__PURE__ */ i(Ie, {
372
375
  dividers: !0,
373
376
  children: /* @__PURE__ */ n(v, {
374
377
  spacing: 2,
375
378
  sx: { pt: 1 },
376
379
  children: [
377
- /* @__PURE__ */ i(ge, {
380
+ /* @__PURE__ */ i(fe, {
378
381
  label: "Owner Type",
379
382
  required: !0,
380
- disabled: !!F,
383
+ disabled: !!I,
381
384
  value: t.ownerType,
382
385
  onChange: (e) => m({
383
386
  ...t,
@@ -387,11 +390,11 @@ function Di() {
387
390
  onBlur: l.onBlur("ownerType"),
388
391
  error: l.show("ownerType") && !!o.ownerType,
389
392
  helperText: l.show("ownerType") && o.ownerType ? o.ownerType : "Only Facility is available currently.",
390
- options: yi
393
+ options: xi
391
394
  }),
392
- /* @__PURE__ */ i(ui, {
395
+ /* @__PURE__ */ i(ci, {
393
396
  required: !0,
394
- disabled: !!F || t.ownerType !== "FACILITY",
397
+ disabled: !!I || t.ownerType !== "FACILITY",
395
398
  value: t.ownerId,
396
399
  onChange: (e) => m({
397
400
  ...t,
@@ -401,8 +404,8 @@ function Di() {
401
404
  error: l.show("ownerId") && !!o.ownerId,
402
405
  helperText: l.show("ownerId") && o.ownerId ? o.ownerId : "Search by name. The owner cannot be changed once created."
403
406
  }),
404
- /* @__PURE__ */ i(ci, {}),
405
- /* @__PURE__ */ i(y, {
407
+ /* @__PURE__ */ i(mi, {}),
408
+ /* @__PURE__ */ i(w, {
406
409
  required: !0,
407
410
  label: "Unit name",
408
411
  size: "small",
@@ -413,14 +416,14 @@ function Di() {
413
416
  m((u) => ({
414
417
  ...u,
415
418
  unitName: s,
416
- unitCode: F ? u.unitCode : r
419
+ unitCode: I ? u.unitCode : r
417
420
  }));
418
421
  },
419
422
  onBlur: l.onBlur("unitName"),
420
423
  error: l.show("unitName") && !!o.unitName,
421
424
  helperText: l.show("unitName") ? o.unitName : ""
422
425
  }),
423
- /* @__PURE__ */ i(y, {
426
+ /* @__PURE__ */ i(w, {
424
427
  required: !0,
425
428
  label: "Unit code (unique within facility)",
426
429
  size: "small",
@@ -434,7 +437,7 @@ function Di() {
434
437
  error: l.show("unitCode") && !!o.unitCode,
435
438
  helperText: l.show("unitCode") && o.unitCode ? o.unitCode : "Auto-generated from the name. Edit if needed to make it unique within this facility."
436
439
  }),
437
- /* @__PURE__ */ i(ge, {
440
+ /* @__PURE__ */ i(fe, {
438
441
  label: "Type",
439
442
  required: !0,
440
443
  value: t.unitType,
@@ -444,12 +447,12 @@ function Di() {
444
447
  }),
445
448
  onBlur: l.onBlur("unitType"),
446
449
  error: l.show("unitType") && !!o.unitType,
447
- options: Le
450
+ options: De
448
451
  }),
449
452
  /* @__PURE__ */ n(v, {
450
453
  direction: "row",
451
454
  spacing: 2,
452
- children: [/* @__PURE__ */ i(y, {
455
+ children: [/* @__PURE__ */ i(w, {
453
456
  label: "Make",
454
457
  size: "small",
455
458
  fullWidth: !0,
@@ -459,7 +462,7 @@ function Di() {
459
462
  make: e.target.value
460
463
  }),
461
464
  helperText: "Example: Godrej, Vestfrost"
462
- }), /* @__PURE__ */ i(y, {
465
+ }), /* @__PURE__ */ i(w, {
463
466
  label: "Model",
464
467
  size: "small",
465
468
  fullWidth: !0,
@@ -474,7 +477,7 @@ function Di() {
474
477
  /* @__PURE__ */ n(v, {
475
478
  direction: "row",
476
479
  spacing: 2,
477
- children: [/* @__PURE__ */ i(y, {
480
+ children: [/* @__PURE__ */ i(w, {
478
481
  label: "Min °C",
479
482
  size: "small",
480
483
  type: "number",
@@ -492,7 +495,7 @@ function Di() {
492
495
  onBlur: l.onBlur("operatingTempMinCelsius"),
493
496
  error: l.show("operatingTempMinCelsius") && !!o.operatingTempMinCelsius,
494
497
  helperText: l.show("operatingTempMinCelsius") && o.operatingTempMinCelsius ? o.operatingTempMinCelsius : "Allowed range: −90°C to +30°C"
495
- }), /* @__PURE__ */ i(y, {
498
+ }), /* @__PURE__ */ i(w, {
496
499
  label: "Max °C",
497
500
  size: "small",
498
501
  type: "number",
@@ -512,7 +515,7 @@ function Di() {
512
515
  helperText: l.show("operatingTempMaxCelsius") && o.operatingTempMaxCelsius ? o.operatingTempMaxCelsius : "Allowed range: −90°C to +30°C"
513
516
  })]
514
517
  }),
515
- /* @__PURE__ */ i(y, {
518
+ /* @__PURE__ */ i(w, {
516
519
  label: "Comments",
517
520
  size: "small",
518
521
  multiline: !0,
@@ -525,37 +528,57 @@ function Di() {
525
528
  }),
526
529
  helperText: "Notes about placement, maintenance schedule, or other details."
527
530
  }),
528
- /* @__PURE__ */ i(xe, {
529
- control: /* @__PURE__ */ i(pi, {
531
+ /* @__PURE__ */ n(H, { children: [/* @__PURE__ */ i(xe, {
532
+ control: /* @__PURE__ */ i(hi, {
530
533
  checked: t.isActive,
534
+ disabled: ee,
531
535
  onChange: (e) => m({
532
536
  ...t,
533
537
  isActive: e.target.checked
534
538
  })
535
539
  }),
536
540
  label: "Active"
537
- })
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] })
538
561
  ]
539
562
  })
540
563
  }),
541
- /* @__PURE__ */ n(Ie, { children: [/* @__PURE__ */ i(g, {
564
+ /* @__PURE__ */ n(Ne, { children: [/* @__PURE__ */ i(g, {
542
565
  onClick: () => k(!1),
543
566
  children: "Cancel"
544
567
  }), /* @__PURE__ */ i(g, {
545
568
  variant: "contained",
546
- disabled: !te,
547
- onClick: () => void De(),
569
+ disabled: !re,
570
+ onClick: () => void Oe(),
548
571
  children: "Save"
549
572
  })] })
550
573
  ]
551
574
  }),
552
- /* @__PURE__ */ n(be, {
575
+ /* @__PURE__ */ n(Me, {
553
576
  open: d.open,
554
- onClose: le,
577
+ onClose: se,
555
578
  fullWidth: !0,
556
579
  maxWidth: "sm",
557
580
  children: [
558
- /* @__PURE__ */ n(Me, { children: ["Log Temperature", d.unit ? /* @__PURE__ */ n(w, {
581
+ /* @__PURE__ */ n(ke, { children: ["Log Temperature", d.unit ? /* @__PURE__ */ n(T, {
559
582
  variant: "caption",
560
583
  color: "text.secondary",
561
584
  sx: {
@@ -564,22 +587,22 @@ function Di() {
564
587
  },
565
588
  children: [d.unit.unitName, d.unit.operatingTempMinCelsius != null && d.unit.operatingTempMaxCelsius != null ? ` · operates ${d.unit.operatingTempMinCelsius}°C → ${d.unit.operatingTempMaxCelsius}°C` : ""]
566
589
  }) : null] }),
567
- /* @__PURE__ */ n(ke, {
590
+ /* @__PURE__ */ n(Ie, {
568
591
  dividers: !0,
569
- children: [ae ? /* @__PURE__ */ i(A, {
592
+ children: [oe ? /* @__PURE__ */ i($, {
570
593
  severity: "error",
571
594
  sx: { mb: 2 },
572
- children: ae
573
- }) : null, ne === "input" ? /* @__PURE__ */ n(v, {
595
+ children: oe
596
+ }) : null, ae === "input" ? /* @__PURE__ */ n(v, {
574
597
  spacing: 2,
575
598
  sx: { pt: 1 },
576
599
  children: [
577
- /* @__PURE__ */ i(w, {
600
+ /* @__PURE__ */ i(T, {
578
601
  variant: "body2",
579
602
  color: "text.secondary",
580
603
  children: "Record the current temperature reading for this storage unit. We will check whether any stored product batch falls outside its required range."
581
604
  }),
582
- /* @__PURE__ */ i(y, {
605
+ /* @__PURE__ */ i(w, {
583
606
  required: !0,
584
607
  autoFocus: !0,
585
608
  label: "Temperature (°C)",
@@ -592,27 +615,27 @@ function Di() {
592
615
  max: 30
593
616
  },
594
617
  value: M.temperatureCelsius,
595
- onChange: (e) => P({
618
+ onChange: (e) => V({
596
619
  ...M,
597
620
  temperatureCelsius: e.target.value
598
621
  }),
599
- onBlur: E.onBlur("temperatureCelsius"),
600
- error: ue,
601
- helperText: ue ? Y : `Enter the reading in degrees Celsius.${Oe}`
622
+ onBlur: D.onBlur("temperatureCelsius"),
623
+ error: ce,
624
+ helperText: ce ? Y : `Enter the reading in degrees Celsius.${Pe}`
602
625
  }),
603
- oe ? /* @__PURE__ */ i(A, {
626
+ ue ? /* @__PURE__ */ i($, {
604
627
  severity: "warning",
605
- icon: /* @__PURE__ */ i(Ae, {}),
606
- children: oe
628
+ icon: /* @__PURE__ */ i($e, {}),
629
+ children: ue
607
630
  }) : null,
608
- /* @__PURE__ */ i(y, {
631
+ /* @__PURE__ */ i(w, {
609
632
  label: "Notes (optional)",
610
633
  size: "small",
611
634
  multiline: !0,
612
635
  minRows: 2,
613
636
  fullWidth: !0,
614
637
  value: M.notes,
615
- onChange: (e) => P({
638
+ onChange: (e) => V({
616
639
  ...M,
617
640
  notes: e.target.value
618
641
  }),
@@ -622,7 +645,7 @@ function Di() {
622
645
  }) : /* @__PURE__ */ n(v, {
623
646
  spacing: 2,
624
647
  sx: { pt: 1 },
625
- children: [/* @__PURE__ */ n(w, {
648
+ children: [/* @__PURE__ */ n(T, {
626
649
  variant: "body2",
627
650
  sx: { fontWeight: 700 },
628
651
  children: [
@@ -630,25 +653,25 @@ function Di() {
630
653
  C == null ? void 0 : C.temperatureCelsius,
631
654
  "°C"
632
655
  ]
633
- }), $.length === 0 ? /* @__PURE__ */ i(A, {
656
+ }), A.length === 0 ? /* @__PURE__ */ i($, {
634
657
  severity: "success",
635
- icon: /* @__PURE__ */ i(fi, {}),
658
+ icon: /* @__PURE__ */ i(vi, {}),
636
659
  children: "Every stored product tolerates this temperature. Nothing will be wasted — you can still log the reading for the record."
637
- }) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ n(A, {
660
+ }) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ n($, {
638
661
  severity: "warning",
639
- icon: /* @__PURE__ */ i(Ae, {}),
662
+ icon: /* @__PURE__ */ i($e, {}),
640
663
  children: [
641
664
  "At ",
642
665
  C == null ? void 0 : C.temperatureCelsius,
643
666
  "°C the following ",
644
- $.length === 1 ? "batch is" : "batches are",
667
+ A.length === 1 ? "batch is" : "batches are",
645
668
  " out of range. Confirming will mark ",
646
- $.length === 1 ? "it" : "them",
669
+ A.length === 1 ? "it" : "them",
647
670
  " — and any open vials — as wastage. This cannot be undone."
648
671
  ]
649
- }), /* @__PURE__ */ n(mi, {
672
+ }), /* @__PURE__ */ n(Ci, {
650
673
  size: "small",
651
- children: [/* @__PURE__ */ i(ye, { children: /* @__PURE__ */ n(B, { children: [
674
+ children: [/* @__PURE__ */ i(we, { children: /* @__PURE__ */ n(W, { children: [
652
675
  /* @__PURE__ */ i(a, { children: "Product" }),
653
676
  /* @__PURE__ */ i(a, { children: "Lot" }),
654
677
  /* @__PURE__ */ i(a, { children: "Expiry" }),
@@ -661,7 +684,7 @@ function Di() {
661
684
  children: "Open vials"
662
685
  }),
663
686
  /* @__PURE__ */ i(a, { children: "Required" })
664
- ] }) }), /* @__PURE__ */ i(we, { children: $.map((e) => /* @__PURE__ */ n(B, { children: [
687
+ ] }) }), /* @__PURE__ */ i(ve, { children: A.map((e) => /* @__PURE__ */ n(W, { children: [
665
688
  /* @__PURE__ */ i(a, {
666
689
  sx: { fontWeight: 700 },
667
690
  children: e.productName
@@ -673,7 +696,7 @@ function Di() {
673
696
  },
674
697
  children: e.lotNumber || "—"
675
698
  }),
676
- /* @__PURE__ */ i(a, { children: e.expiryDate ? Xe(e.expiryDate) : "—" }),
699
+ /* @__PURE__ */ i(a, { children: e.expiryDate ? Ge(e.expiryDate) : "—" }),
677
700
  /* @__PURE__ */ i(a, {
678
701
  align: "right",
679
702
  sx: { fontVariantNumeric: "tabular-nums" },
@@ -692,29 +715,29 @@ function Di() {
692
715
  })] })]
693
716
  })]
694
717
  }),
695
- /* @__PURE__ */ i(Ie, { children: ne === "input" ? /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
696
- onClick: le,
718
+ /* @__PURE__ */ i(Ne, { children: ae === "input" ? /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
719
+ onClick: se,
697
720
  disabled: f,
698
721
  children: "Cancel"
699
722
  }), /* @__PURE__ */ i(g, {
700
723
  variant: "contained",
701
- disabled: !se || f,
702
- onClick: () => void Pe(),
724
+ disabled: !de || f,
725
+ onClick: () => void Ye(),
703
726
  children: f ? "Checking…" : "Check"
704
727
  })] }) : /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ i(g, {
705
- onClick: () => V("input"),
728
+ onClick: () => P("input"),
706
729
  disabled: f,
707
730
  children: "Back"
708
- }), $.length === 0 ? /* @__PURE__ */ i(g, {
731
+ }), A.length === 0 ? /* @__PURE__ */ i(g, {
709
732
  variant: "contained",
710
733
  disabled: f,
711
- onClick: () => void de(!1),
734
+ onClick: () => void pe(!1),
712
735
  children: f ? "Logging…" : "Log reading"
713
736
  }) : /* @__PURE__ */ i(g, {
714
737
  variant: "contained",
715
738
  color: "error",
716
739
  disabled: f,
717
- onClick: () => void de(!0),
740
+ onClick: () => void pe(!0),
718
741
  children: f ? "Processing…" : "Confirm & mark wastage"
719
742
  })] }) })
720
743
  ]
@@ -723,6 +746,6 @@ function Di() {
723
746
  })] });
724
747
  }
725
748
  export {
726
- Di as default
749
+ Yi as default
727
750
  };
728
- //# sourceMappingURL=StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map
751
+ //# sourceMappingURL=StorageUnitsPage-CTEVuemZ-C7zkwKMz.js.map