@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,26 +1,26 @@
1
- import { S as Jt, U as Xt, K as gt, H as vt, F as Zt, k as H, I as It, J as er, L as tr, N as rr, O as ar } from "./ImmunizationConfigurationBase-aUtx0JEe.js";
2
- import { O as kt, S as Ct } from "./constants-DpXnLsAB-D6lN5cjK.js";
3
- import { t as Ae, n as Nt } from "./format-UOyOu75i-D0GyylyQ.js";
4
- import { X as ir, Y as nr, Z as lr, Q as or, q as sr } from "./PmGuard-BZE-y4In-D_pUm5MP.js";
5
- import { useState as b, useMemo as T, Fragment as cr } from "react";
6
- import { jsxs as n, jsx as t, Fragment as $ } from "react/jsx-runtime";
7
- import { Box as C, Alert as Be, Card as ue, CardContent as de, Stack as m, Chip as R, Typography as d, Divider as Ie, ToggleButtonGroup as ke, ToggleButton as B, TextField as I, Button as q, Tooltip as Dt, IconButton as ur, Table as dr, TableHead as hr, TableRow as Ce, TableCell as k, TableBody as mr, Dialog as pr, DialogTitle as yr, DialogContent as br, DialogActions as fr } from "@mui/material";
1
+ import { A as Xt, U as er, K as It, H as Ct, r as tr, a as H, t as kt, E as rr, F as ar, J as ir, Q as nr } from "./ImmunizationConfigurationBase-Clkk0-n6.js";
2
+ import { V as Nt, C as Ae, N as Rt } from "./constants-BTpJFQe_-CYPZIqQF.js";
3
+ import { t as Fe, n as Dt } from "./format-UOyOu75i-D0GyylyQ.js";
4
+ import { Q as lr, Z as or, $ as sr, e as cr, Y as ur } from "./PmGuard-BvUUbU80-DJipZoSg.js";
5
+ import { useState as b, useMemo as $, Fragment as dr } from "react";
6
+ import { jsxs as n, jsx as t, Fragment as E } from "react/jsx-runtime";
7
+ import { Box as k, Alert as Pe, Card as ue, CardContent as de, Stack as p, Chip as w, Typography as d, Divider as Ie, ToggleButtonGroup as Ce, ToggleButton as F, TextField as I, Button as D, Tooltip as qt, IconButton as hr, Table as pr, TableHead as mr, TableRow as ke, TableCell as C, TableBody as yr, Dialog as br, DialogTitle as fr, DialogContent as xr, DialogActions as gr } from "@mui/material";
8
8
  import { alpha as J } from "@mui/material/styles";
9
9
  import { v4 as Ne } from "uuid";
10
- import xr from "@mui/icons-material/AddRounded";
11
- import gr from "@mui/icons-material/RefreshRounded";
12
- import { useNavigate as vr, useParams as Ir } from "react-router-dom";
13
- import kr from "@mui/icons-material/Inventory2Rounded";
14
- import Cr from "@mui/icons-material/LocalShippingRounded";
15
- import { useSelector as Nr } from "react-redux";
16
- import Dr from "@mui/icons-material/DeleteOutlineRounded";
17
- import qr from "@mui/icons-material/ArrowBackRounded";
18
- import ze from "@mui/icons-material/CheckCircleRounded";
19
- import De from "@mui/icons-material/DoNotDisturbRounded";
20
- import qe from "@mui/icons-material/ReportProblemRounded";
21
- import wr from "@mui/icons-material/BlockRounded";
22
- import Rr from "@mui/icons-material/HourglassEmptyRounded";
23
- function Sr(g) {
10
+ import vr from "@mui/icons-material/AddRounded";
11
+ import Ir from "@mui/icons-material/RefreshRounded";
12
+ import { useNavigate as Cr, useParams as kr } from "react-router-dom";
13
+ import Nr from "@mui/icons-material/Inventory2Rounded";
14
+ import Rr from "@mui/icons-material/LocalShippingRounded";
15
+ import { useSelector as Dr } from "react-redux";
16
+ import qr from "@mui/icons-material/DeleteOutlineRounded";
17
+ import wr from "@mui/icons-material/ArrowBackRounded";
18
+ import Oe from "@mui/icons-material/CheckCircleRounded";
19
+ import Re from "@mui/icons-material/DoNotDisturbRounded";
20
+ import De from "@mui/icons-material/ReportProblemRounded";
21
+ import Tr from "@mui/icons-material/BlockRounded";
22
+ import $r from "@mui/icons-material/HourglassEmptyRounded";
23
+ function Er(g) {
24
24
  switch (g) {
25
25
  case "PENDING":
26
26
  return "info";
@@ -36,7 +36,7 @@ function Sr(g) {
36
36
  return "default";
37
37
  }
38
38
  }
39
- function Tr(g) {
39
+ function Sr(g) {
40
40
  switch (g) {
41
41
  case "PENDING_SHIPMENT":
42
42
  return "warning";
@@ -52,91 +52,91 @@ function Tr(g) {
52
52
  return "default";
53
53
  }
54
54
  }
55
- function qt(g) {
56
- return g ? g.toLowerCase().split("_").map((z) => z.charAt(0).toUpperCase() + z.slice(1)).join(" ") : "";
55
+ function wt(g) {
56
+ return g ? g.toLowerCase().split("_").map((P) => P.charAt(0).toUpperCase() + P.slice(1)).join(" ") : "";
57
57
  }
58
- function we(g) {
58
+ function qe(g) {
59
59
  return g ? new Date(g).toISOString().substring(0, 10) : "";
60
60
  }
61
- function Zr() {
62
- var nt;
63
- let g = vr(), { requestId: z } = Ir(), Se = ir().has("approve.manage.productManagement.purchase"), We = Nr((e) => {
64
- var i, r;
65
- return (r = (i = e.Authenticate) == null ? void 0 : i.user) == null ? void 0 : r.id;
66
- }), X = ((nt = Jt()) == null ? void 0 : nt.managePurchaseAmounts) !== !1, [a, W] = b(null), [wt, Oe] = b(!0), [f, N] = b(!1), [je, v] = b(""), [Q, he] = b({}), [S, Fe] = b({}), [Y, Le] = b({}), [Z, Me] = b({}), [Te, Qe] = b(!1), [$e, Ye] = b(""), [ee, Ue] = b({}), [Ee, Ge] = b({}), [Ke, _e] = b(""), [Rt, te] = b(!1), [re, Ve] = b({}), [me, He] = b({}), [St, pe] = b({}), [Tt, Je] = b(!1);
67
- function U(e) {
68
- let i = {}, r = {}, l = {};
69
- ((e == null ? void 0 : e.items) ?? []).forEach((p) => {
70
- let c = (p.batches ?? []).map((w) => ({
61
+ function ta() {
62
+ var lt;
63
+ let g = Cr(), { requestId: P } = kr(), Te = lr().has("approve.manage.productManagement.purchase"), Ue = Dr((e) => {
64
+ var a, r;
65
+ return (r = (a = e.Authenticate) == null ? void 0 : a.user) == null ? void 0 : r.id;
66
+ }), Z = ((lt = Xt()) == null ? void 0 : lt.managePurchaseAmounts) !== !1, [i, O] = b(null), [Tt, Be] = b(!0), [f, N] = b(!1), [ze, v] = b(""), [L, he] = b({}), [T, We] = b({}), [Q, je] = b({}), [X, Le] = b({}), [$e, Qe] = b(!1), [Ee, _e] = b(""), [ee, Ye] = b({}), [Se, Ge] = b({}), [Ke, Ve] = b(""), [$t, te] = b(!1), [re, He] = b({}), [pe, Je] = b({}), [Et, me] = b({}), [St, Ze] = b(!1);
67
+ function _(e) {
68
+ let a = {}, r = {}, l = {};
69
+ ((e == null ? void 0 : e.items) ?? []).forEach((m) => {
70
+ let c = (m.batches ?? []).map((q) => ({
71
71
  key: Ne(),
72
- batchId: w.batchId ?? null,
73
- receiptStatus: w.receiptStatus ?? null,
74
- quantity: String(w.quantity ?? ""),
75
- lotNumber: w.lotNumber ?? "",
76
- expiryDate: we(w.expiryDate),
77
- manufactureDate: we(w.manufactureDate)
72
+ batchId: q.batchId ?? null,
73
+ receiptStatus: q.receiptStatus ?? null,
74
+ quantity: String(q.quantity ?? ""),
75
+ lotNumber: q.lotNumber ?? "",
76
+ expiryDate: qe(q.expiryDate),
77
+ manufactureDate: qe(q.manufactureDate)
78
78
  }));
79
79
  c.length === 0 && c.push({
80
80
  key: Ne(),
81
81
  batchId: null,
82
82
  receiptStatus: null,
83
- quantity: String(p.requestedQuantity),
83
+ quantity: String(m.requestedQuantity),
84
84
  lotNumber: "",
85
85
  expiryDate: "",
86
86
  manufactureDate: ""
87
- }), i[p.id] = c, r[p.id] = p.approvedQuantity == null ? !0 : p.approvedQuantity > 0, l[p.id] = !!p.isSplit || c.length > 1;
88
- }), he(i), Fe(r), Le(l), Me({}), Qe(!1);
87
+ }), a[m.id] = c, r[m.id] = m.approvedQuantity == null ? !0 : m.approvedQuantity > 0, l[m.id] = !!m.isSplit || c.length > 1;
88
+ }), he(a), We(r), je(l), Le({}), Qe(!1);
89
89
  let o = {}, u = {}, h = {};
90
- ((e == null ? void 0 : e.items) ?? []).forEach((p) => {
91
- (p.batches ?? []).forEach((c) => {
90
+ ((e == null ? void 0 : e.items) ?? []).forEach((m) => {
91
+ (m.batches ?? []).forEach((c) => {
92
92
  c.batchId && (c.receiptStatus ?? (o[c.batchId] = "OK"), c.receiptStatus === "DISCREPANCY" && (u[c.batchId] = "CORRECT", h[c.batchId] = {
93
93
  lotNumber: c.lotNumber ?? "",
94
- expiryDate: we(c.expiryDate),
95
- manufactureDate: we(c.manufactureDate)
94
+ expiryDate: qe(c.expiryDate),
95
+ manufactureDate: qe(c.manufactureDate)
96
96
  }));
97
97
  });
98
- }), Ue(o), Ge({}), _e(""), Ve(u), He(h), pe({}), Je(!1);
98
+ }), Ye(o), Ge({}), Ve(""), He(u), Je(h), me({}), Ze(!1);
99
99
  }
100
100
  async function Xe() {
101
- var e, i;
102
- Oe(!0), v("");
101
+ var e, a;
102
+ Be(!0), v("");
103
103
  try {
104
- let r = await ar(z);
105
- W(r), U(r), Ye((r == null ? void 0 : r.decisionNotes) ?? "");
104
+ let r = await nr(P);
105
+ O(r), _(r), _e((r == null ? void 0 : r.decisionNotes) ?? "");
106
106
  } catch (r) {
107
- v(((i = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : i.message) ?? (r == null ? void 0 : r.message) ?? "Failed to load purchase request");
107
+ v(((a = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : a.message) ?? (r == null ? void 0 : r.message) ?? "Failed to load purchase request");
108
108
  } finally {
109
- Oe(!1);
109
+ Be(!1);
110
110
  }
111
111
  }
112
- nr(["view.manage.productManagement.purchase", "approve.manage.productManagement.purchase"], () => {
112
+ or(["view.manage.productManagement.purchase", "approve.manage.productManagement.purchase"], () => {
113
113
  Xe();
114
- }, [z]);
115
- let Ze = (a == null ? void 0 : a.status) === "PENDING", D = (a == null ? void 0 : a.fulfillmentStatus) ?? null, et = (a == null ? void 0 : a.requestedBy) != null && We != null && Number(a.requestedBy) === Number(We), $t = Ze && Se, Et = D === "DISCREPANCY" && Se, ae = $t, Pt = D === "PENDING_SHIPMENT" && Se, G = D === "IN_TRANSIT" && et, At = D === "IN_TRANSIT" || D === "DISCREPANCY";
116
- function tt(e) {
117
- return Q[e] ?? [];
114
+ }, [P]);
115
+ let et = (i == null ? void 0 : i.status) === "PENDING", R = (i == null ? void 0 : i.fulfillmentStatus) ?? null, tt = (i == null ? void 0 : i.requestedBy) != null && Ue != null && Number(i.requestedBy) === Number(Ue), Mt = et && Te, At = R === "DISCREPANCY" && Te, ae = Mt, Ft = R === "PENDING_SHIPMENT" && Te, Y = R === "IN_TRANSIT" && tt, Pt = R === "IN_TRANSIT" || R === "DISCREPANCY";
116
+ function rt(e) {
117
+ return L[e] ?? [];
118
118
  }
119
119
  function ye(e) {
120
- let i = tt(e);
121
- return Y[e] ? i : i.slice(0, 1);
120
+ let a = rt(e);
121
+ return Q[e] ? a : a.slice(0, 1);
122
122
  }
123
- function E(e) {
124
- Me((i) => i[e] ? i : {
125
- ...i,
123
+ function S(e) {
124
+ Le((a) => a[e] ? a : {
125
+ ...a,
126
126
  [e]: !0
127
127
  });
128
128
  }
129
- function P(e, i, r, l) {
129
+ function M(e, a, r, l) {
130
130
  he((o) => ({
131
131
  ...o,
132
- [e]: (o[e] ?? []).map((u) => u.key === i ? {
132
+ [e]: (o[e] ?? []).map((u) => u.key === a ? {
133
133
  ...u,
134
134
  [r]: l
135
135
  } : u)
136
- })), E(`${i}:${r}`);
136
+ })), S(`${a}:${r}`);
137
137
  }
138
- function Bt(e) {
139
- let i = ((a == null ? void 0 : a.items) ?? []).find((l) => l.id === e), r = i ? Math.max(i.requestedQuantity - be(e), 0) : 0;
138
+ function Ot(e) {
139
+ let a = ((i == null ? void 0 : i.items) ?? []).find((l) => l.id === e), r = a ? Math.max(a.requestedQuantity - be(e), 0) : 0;
140
140
  he((l) => ({
141
141
  ...l,
142
142
  [e]: [...l[e] ?? [], {
@@ -150,20 +150,20 @@ function Zr() {
150
150
  }]
151
151
  }));
152
152
  }
153
- function rt(e, i, r, l) {
153
+ function at(e, a, r, l) {
154
154
  if (r === "") {
155
- P(e, i, "quantity", "");
155
+ M(e, a, "quantity", "");
156
156
  return;
157
157
  }
158
158
  let o = Math.floor(Number(r));
159
159
  if (!Number.isFinite(o)) return;
160
160
  o < 1 && (o = 1);
161
- let u = ye(e).filter((p) => p.key !== i).reduce((p, c) => p + (Number(c.quantity) > 0 ? Number(c.quantity) : 0), 0), h = Math.max(l - u, 1);
162
- o > h && (o = h), P(e, i, "quantity", String(o));
161
+ let u = ye(e).filter((m) => m.key !== a).reduce((m, c) => m + (Number(c.quantity) > 0 ? Number(c.quantity) : 0), 0), h = Math.max(l - u, 1);
162
+ o > h && (o = h), M(e, a, "quantity", String(o));
163
163
  }
164
- function zt(e, i) {
164
+ function Ut(e, a) {
165
165
  he((r) => {
166
- let l = (r[e] ?? []).filter((o) => o.key !== i);
166
+ let l = (r[e] ?? []).filter((o) => o.key !== a);
167
167
  return {
168
168
  ...r,
169
169
  [e]: l.length ? l : [{
@@ -175,159 +175,159 @@ function Zr() {
175
175
  };
176
176
  });
177
177
  }
178
- function Wt(e, i) {
179
- Fe((r) => ({
178
+ function Bt(e, a) {
179
+ We((r) => ({
180
180
  ...r,
181
- [e]: i
181
+ [e]: a
182
182
  }));
183
183
  }
184
- function Ot(e, i) {
185
- Le((r) => ({
184
+ function zt(e, a) {
185
+ je((r) => ({
186
186
  ...r,
187
- [e]: i
187
+ [e]: a
188
188
  }));
189
189
  }
190
190
  function be(e) {
191
- return S[e] ? ye(e).reduce((i, r) => {
191
+ return T[e] ? ye(e).reduce((a, r) => {
192
192
  let l = Number(r.quantity);
193
- return i + (Number.isFinite(l) && l > 0 ? l : 0);
193
+ return a + (Number.isFinite(l) && l > 0 ? l : 0);
194
194
  }, 0) : 0;
195
195
  }
196
- let y = T(() => {
197
- if (!a || !ae) return {};
198
- let e = {}, i = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
199
- return (a.items ?? []).forEach((r) => {
200
- if (!S[r.id]) return;
201
- let l = Y[r.id] ? Q[r.id] ?? [] : (Q[r.id] ?? []).slice(0, 1), o = 0;
196
+ let y = $(() => {
197
+ if (!i || !ae) return {};
198
+ let e = {}, a = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
199
+ return (i.items ?? []).forEach((r) => {
200
+ if (!T[r.id]) return;
201
+ let l = Q[r.id] ? L[r.id] ?? [] : (L[r.id] ?? []).slice(0, 1), o = 0;
202
202
  l.forEach((u) => {
203
203
  let h = Number(u.quantity);
204
- !Number.isInteger(h) || h <= 0 ? e[`${u.key}:quantity`] = "Enter a quantity" : o += h, (!u.lotNumber || !u.lotNumber.trim()) && (e[`${u.key}:lotNumber`] = "Lot is required"), u.expiryDate ? u.expiryDate < i && (e[`${u.key}:expiryDate`] = "Must be today or later") : e[`${u.key}:expiryDate`] = "Expiry is required", u.manufactureDate && u.manufactureDate > i && (e[`${u.key}:manufactureDate`] = "Cannot be in the future");
204
+ !Number.isInteger(h) || h <= 0 ? e[`${u.key}:quantity`] = "Enter a quantity" : o += h, (!u.lotNumber || !u.lotNumber.trim()) && (e[`${u.key}:lotNumber`] = "Lot is required"), r.expiryMode !== "FROM_MANUFACTURE" && (u.expiryDate ? u.expiryDate < a && (e[`${u.key}:expiryDate`] = "Must be today or later") : e[`${u.key}:expiryDate`] = "Expiry is required"), u.manufactureDate ? u.manufactureDate > a && (e[`${u.key}:manufactureDate`] = "Cannot be in the future") : r.hasManufactureDate && (e[`${u.key}:manufactureDate`] = "Manufactured date is required");
205
205
  }), o > r.requestedQuantity && (e[`${r.id}:sum`] = `Total exceeds the requested ${r.requestedQuantity}`);
206
206
  }), e;
207
207
  }, [
208
- a,
208
+ i,
209
+ L,
210
+ T,
209
211
  Q,
210
- S,
211
- Y,
212
212
  ae
213
- ]), jt = Object.keys(y).length === 0;
214
- T(() => ((a == null ? void 0 : a.items) ?? []).some((e) => S[e.id] && be(e.id) > 0), [
215
- a,
216
- Q,
217
- S,
218
- Y
213
+ ]), Wt = Object.keys(y).length === 0;
214
+ $(() => ((i == null ? void 0 : i.items) ?? []).some((e) => T[e.id] && be(e.id) > 0), [
215
+ i,
216
+ L,
217
+ T,
218
+ Q
219
219
  ]);
220
- let Ft = T(() => ((a == null ? void 0 : a.items) ?? []).some((e) => S[e.id]), [a, S]), x = (e) => Te || Z[e];
220
+ let jt = $(() => ((i == null ? void 0 : i.items) ?? []).some((e) => T[e.id]), [i, T]), x = (e) => $e || X[e];
221
221
  function Lt(e) {
222
- return Te ? !0 : ye(e).some((i) => Z[`${i.key}:quantity`] || Z[`${i.key}:lotNumber`] || Z[`${i.key}:expiryDate`] || Z[`${i.key}:manufactureDate`]);
222
+ return $e ? !0 : ye(e).some((a) => X[`${a.key}:quantity`] || X[`${a.key}:lotNumber`] || X[`${a.key}:expiryDate`] || X[`${a.key}:manufactureDate`]);
223
223
  }
224
- function Mt() {
225
- return (a.items ?? []).map((e) => ({
224
+ function Qt() {
225
+ return (i.items ?? []).map((e) => ({
226
226
  itemId: e.id,
227
- batches: S[e.id] ? ye(e.id).map((i) => ({
228
- quantity: Number(i.quantity),
229
- lotNumber: i.lotNumber.trim(),
230
- expiryDate: i.expiryDate,
231
- manufactureDate: i.manufactureDate || null,
227
+ batches: T[e.id] ? ye(e.id).map((a) => ({
228
+ quantity: Number(a.quantity),
229
+ lotNumber: a.lotNumber.trim(),
230
+ expiryDate: a.expiryDate,
231
+ manufactureDate: a.manufactureDate || null,
232
232
  storageUnitId: e.storageUnitId ?? null
233
233
  })) : []
234
234
  }));
235
235
  }
236
- let at = T(() => {
237
- if (!a || !X || !ae) return null;
238
- let e = 0, i = !1;
239
- return (a.items ?? []).forEach((r) => {
236
+ let it = $(() => {
237
+ if (!i || !Z || !ae) return null;
238
+ let e = 0, a = !1;
239
+ return (i.items ?? []).forEach((r) => {
240
240
  let l = be(r.id);
241
- l <= 0 || r.buyPrice == null || (e += Number(r.buyPrice) * l, i = !0);
242
- }), i ? e : null;
241
+ l <= 0 || r.buyPrice == null || (e += Number(r.buyPrice) * l, a = !0);
242
+ }), a ? e : null;
243
243
  }, [
244
- a,
244
+ i,
245
+ L,
246
+ T,
245
247
  Q,
246
- S,
247
- Y,
248
- X,
248
+ Z,
249
249
  ae
250
250
  ]);
251
- async function Qt() {
252
- var e, i;
253
- if (a) {
254
- if (!jt) {
251
+ async function _t() {
252
+ var e, a;
253
+ if (i) {
254
+ if (!Wt) {
255
255
  Qe(!0);
256
256
  return;
257
257
  }
258
258
  N(!0), v("");
259
259
  try {
260
- let r = await It(a.id, {
261
- decisionNotes: $e || null,
262
- items: Mt()
260
+ let r = await kt(i.id, {
261
+ decisionNotes: Ee || null,
262
+ items: Qt()
263
263
  });
264
- W(r), U(r), H({
264
+ O(r), _(r), H({
265
265
  message: "Decision saved. Mark it as sent once it's on the way.",
266
266
  type: "success"
267
267
  });
268
268
  } catch (r) {
269
- v(((i = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : i.message) ?? (r == null ? void 0 : r.message) ?? "Failed to submit decision");
269
+ v(((a = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : a.message) ?? (r == null ? void 0 : r.message) ?? "Failed to submit decision");
270
270
  } finally {
271
271
  N(!1);
272
272
  }
273
273
  }
274
274
  }
275
275
  async function Yt() {
276
- var e, i;
277
- if (a) {
276
+ var e, a;
277
+ if (i) {
278
278
  N(!0), v("");
279
279
  try {
280
- let r = await It(a.id, {
281
- decisionNotes: $e || null,
282
- items: (a.items ?? []).map((l) => ({
280
+ let r = await kt(i.id, {
281
+ decisionNotes: Ee || null,
282
+ items: (i.items ?? []).map((l) => ({
283
283
  itemId: l.id,
284
284
  batches: []
285
285
  }))
286
286
  });
287
- W(r), U(r), te(!1), H({
287
+ O(r), _(r), te(!1), H({
288
288
  message: "Request rejected.",
289
289
  type: "success"
290
290
  });
291
291
  } catch (r) {
292
- v(((i = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : i.message) ?? (r == null ? void 0 : r.message) ?? "Failed to reject request");
292
+ v(((a = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : a.message) ?? (r == null ? void 0 : r.message) ?? "Failed to reject request");
293
293
  } finally {
294
294
  N(!1);
295
295
  }
296
296
  }
297
297
  }
298
- async function Ut() {
299
- var e, i;
300
- if (a) {
298
+ async function Gt() {
299
+ var e, a;
300
+ if (i) {
301
301
  N(!0), v("");
302
302
  try {
303
- let r = await er(a.id, {});
304
- W(r), U(r), H({
303
+ let r = await rr(i.id, {});
304
+ O(r), _(r), H({
305
305
  message: "Marked as on the way. The requester can confirm it when it arrives.",
306
306
  type: "success"
307
307
  });
308
308
  } catch (r) {
309
- v(((i = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : i.message) ?? (r == null ? void 0 : r.message) ?? "Failed to mark in transit");
309
+ v(((a = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : a.message) ?? (r == null ? void 0 : r.message) ?? "Failed to mark in transit");
310
310
  } finally {
311
311
  N(!1);
312
312
  }
313
313
  }
314
314
  }
315
- async function Gt() {
316
- var e, i;
317
- if (a) {
318
- if (!Ht) {
319
- Je(!0);
315
+ async function Kt() {
316
+ var e, a;
317
+ if (i) {
318
+ if (!Zt) {
319
+ Ze(!0);
320
320
  return;
321
321
  }
322
322
  N(!0), v("");
323
323
  try {
324
- let r = await Zt(a.id, { corrections: A.map((l) => {
324
+ let r = await tr(i.id, { corrections: A.map((l) => {
325
325
  let o = re[l.batchId] ?? "CORRECT";
326
326
  if (o === "CANNOT_SUPPLY") return {
327
327
  batchId: l.batchId,
328
328
  action: o
329
329
  };
330
- let u = me[l.batchId] ?? {};
330
+ let u = pe[l.batchId] ?? {};
331
331
  return {
332
332
  batchId: l.batchId,
333
333
  action: o,
@@ -336,117 +336,121 @@ function Zr() {
336
336
  manufactureDate: u.manufactureDate || null
337
337
  };
338
338
  }) });
339
- W(r), U(r), H({
340
- message: _ > 0 ? `Sent back to ${a.requestedByName || "the requester"} to check again.` : "Closed. Those batches will not be supplied.",
339
+ O(r), _(r), H({
340
+ message: K > 0 ? `Sent back to ${i.requestedByName || "the requester"} to check again.` : "Closed. Those batches will not be supplied.",
341
341
  type: "success"
342
342
  });
343
343
  } catch (r) {
344
- v(((i = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : i.message) ?? (r == null ? void 0 : r.message) ?? "Could not send the corrections.");
344
+ v(((a = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : a.message) ?? (r == null ? void 0 : r.message) ?? "Could not send the corrections.");
345
345
  } finally {
346
346
  N(!1);
347
347
  }
348
348
  }
349
349
  }
350
- async function Kt() {
351
- var e, i;
352
- if (a) {
350
+ async function Vt() {
351
+ var e, a;
352
+ if (i) {
353
353
  N(!0), v("");
354
354
  try {
355
355
  let r = {};
356
- O.forEach((o) => {
357
- r[o] = (Ee[o] ?? "").trim();
356
+ U.forEach((o) => {
357
+ r[o] = (Se[o] ?? "").trim();
358
358
  });
359
- let l = await tr(a.id, {
359
+ let l = await ar(i.id, {
360
360
  verifiedBatchIds: xe,
361
- flaggedBatchIds: O,
361
+ flaggedBatchIds: U,
362
362
  discrepancyReasons: r,
363
363
  notes: ie && Ke.trim() || null
364
364
  });
365
- W(l), U(l), H({
366
- message: ne ? "Sent back to the approver." : ie ? `Received the OK batches. ${O.length} flagged ${O.length === 1 ? "batch was" : "batches were"} sent to the approver.` : "Received. The stock is now in your inventory.",
365
+ O(l), _(l), H({
366
+ message: ne ? "Sent back to the approver." : ie ? `Received the OK batches. ${U.length} flagged ${U.length === 1 ? "batch was" : "batches were"} sent to the approver.` : "Received. The stock is now in your inventory.",
367
367
  type: "success"
368
368
  });
369
369
  } catch (r) {
370
- v(((i = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : i.message) ?? (r == null ? void 0 : r.message) ?? "Could not submit the receipt.");
370
+ v(((a = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : a.message) ?? (r == null ? void 0 : r.message) ?? "Could not submit the receipt.");
371
371
  } finally {
372
372
  N(!1);
373
373
  }
374
374
  }
375
375
  }
376
- async function _t() {
377
- var e, i;
378
- if (a) {
376
+ async function Ht() {
377
+ var e, a;
378
+ if (i) {
379
379
  N(!0), v("");
380
380
  try {
381
- W(await rr(a.id)), H({
381
+ O(await ir(i.id)), H({
382
382
  message: "Request cancelled.",
383
383
  type: "success"
384
384
  });
385
385
  } catch (r) {
386
- v(((i = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : i.message) ?? (r == null ? void 0 : r.message) ?? "Failed to cancel request");
386
+ v(((a = (e = r == null ? void 0 : r.response) == null ? void 0 : e.data) == null ? void 0 : a.message) ?? (r == null ? void 0 : r.message) ?? "Failed to cancel request");
387
387
  } finally {
388
388
  N(!1);
389
389
  }
390
390
  }
391
391
  }
392
- let fe = T(() => {
392
+ let fe = $(() => {
393
393
  let e = [];
394
- return ((a == null ? void 0 : a.items) ?? []).forEach((i) => {
395
- (i.batches ?? []).forEach((r) => {
394
+ return ((i == null ? void 0 : i.items) ?? []).forEach((a) => {
395
+ (a.batches ?? []).forEach((r) => {
396
396
  (r.quantity ?? 0) > 0 && (r.lotNumber || r.expiryDate) && e.push({
397
397
  ...r,
398
- productName: i.productName,
399
- itemId: i.id
398
+ productName: a.productName,
399
+ hasManufactureDate: a.hasManufactureDate,
400
+ expiryMode: a.expiryMode,
401
+ expiryInterval: a.expiryInterval,
402
+ expiryIntervalUnit: a.expiryIntervalUnit,
403
+ itemId: a.id
400
404
  });
401
405
  });
402
406
  }), e;
403
- }, [a]), K = T(() => fe.filter((e) => e.batchId && e.receiptStatus == null), [fe]), xe = T(() => K.filter((e) => (ee[e.batchId] ?? "OK") === "OK").map((e) => e.batchId), [K, ee]), O = T(() => K.filter((e) => ee[e.batchId] === "ISSUE").map((e) => e.batchId), [K, ee]), ie = O.length > 0, ne = K.length > 0 && xe.length === 0, Vt = K.length > 0 && O.every((e) => (Ee[e] ?? "").trim()), A = T(() => fe.filter((e) => e.batchId && e.receiptStatus === "DISCREPANCY"), [fe]), _ = A.filter((e) => (re[e.batchId] ?? "CORRECT") === "CORRECT").length, it = A.length - _, le = T(() => {
404
- let e = {}, i = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
407
+ }, [i]), G = $(() => fe.filter((e) => e.batchId && e.receiptStatus == null), [fe]), xe = $(() => G.filter((e) => (ee[e.batchId] ?? "OK") === "OK").map((e) => e.batchId), [G, ee]), U = $(() => G.filter((e) => ee[e.batchId] === "ISSUE").map((e) => e.batchId), [G, ee]), ie = U.length > 0, ne = G.length > 0 && xe.length === 0, Jt = G.length > 0 && U.every((e) => (Se[e] ?? "").trim()), A = $(() => fe.filter((e) => e.batchId && e.receiptStatus === "DISCREPANCY"), [fe]), K = A.filter((e) => (re[e.batchId] ?? "CORRECT") === "CORRECT").length, nt = A.length - K, le = $(() => {
408
+ let e = {}, a = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
405
409
  return A.forEach((r) => {
406
410
  if ((re[r.batchId] ?? "CORRECT") !== "CORRECT") return;
407
- let l = me[r.batchId] ?? {};
408
- (!l.lotNumber || !l.lotNumber.trim()) && (e[`${r.batchId}:lotNumber`] = "Lot number is required"), l.expiryDate ? l.expiryDate < i && (e[`${r.batchId}:expiryDate`] = "Must be today or later") : e[`${r.batchId}:expiryDate`] = "Expiry is required", l.manufactureDate && l.manufactureDate > i && (e[`${r.batchId}:manufactureDate`] = "Cannot be in the future");
411
+ let l = pe[r.batchId] ?? {};
412
+ (!l.lotNumber || !l.lotNumber.trim()) && (e[`${r.batchId}:lotNumber`] = "Lot number is required"), r.expiryMode !== "FROM_MANUFACTURE" && (l.expiryDate ? l.expiryDate < a && (e[`${r.batchId}:expiryDate`] = "Must be today or later") : e[`${r.batchId}:expiryDate`] = "Expiry is required"), l.manufactureDate ? l.manufactureDate > a && (e[`${r.batchId}:manufactureDate`] = "Cannot be in the future") : r.hasManufactureDate && (e[`${r.batchId}:manufactureDate`] = "Manufactured date is required");
409
413
  }), e;
410
414
  }, [
411
415
  A,
412
416
  re,
413
- me
414
- ]), Ht = Object.keys(le).length === 0, V = (e) => (Tt || St[e]) && !!le[e];
415
- function Pe(e, i, r) {
416
- He((l) => ({
417
+ pe
418
+ ]), Zt = Object.keys(le).length === 0, V = (e) => (St || Et[e]) && !!le[e];
419
+ function Me(e, a, r) {
420
+ Je((l) => ({
417
421
  ...l,
418
422
  [e]: {
419
423
  ...l[e] ?? {},
420
- [i]: r
424
+ [a]: r
421
425
  }
422
426
  }));
423
427
  }
424
- return /* @__PURE__ */ n(C, { children: [/* @__PURE__ */ t(lr, {}), /* @__PURE__ */ n(or, {
428
+ return /* @__PURE__ */ n(k, { children: [/* @__PURE__ */ t(sr, {}), /* @__PURE__ */ n(cr, {
425
429
  anyOf: ["view.manage.productManagement.purchase", "approve.manage.productManagement.purchase"],
426
- children: [/* @__PURE__ */ n(sr, {
427
- title: a != null && a.serialId ? `Purchase Request #${a.serialId}` : "Purchase Request",
430
+ children: [/* @__PURE__ */ n(ur, {
431
+ title: i != null && i.serialId ? `Purchase Request #${i.serialId}` : "Purchase Request",
428
432
  subtitle: "Track this request from approval through to the stock arriving.",
429
- chips: [...a != null && a.status ? [qt(a.status)] : [], ...D ? [kt(Ct, D)] : []],
430
- actions: /* @__PURE__ */ n(m, {
433
+ chips: [...i != null && i.status ? [wt(i.status)] : [], ...R ? [Nt(Rt, R)] : []],
434
+ actions: /* @__PURE__ */ n(p, {
431
435
  direction: "row",
432
436
  spacing: 1,
433
- children: [/* @__PURE__ */ t(q, {
437
+ children: [/* @__PURE__ */ t(D, {
434
438
  variant: "outlined",
435
- startIcon: /* @__PURE__ */ t(qr, {}),
439
+ startIcon: /* @__PURE__ */ t(wr, {}),
436
440
  onClick: () => g("/ui/medplat/manage/pm/purchase-requests"),
437
441
  children: "Back"
438
- }), /* @__PURE__ */ t(q, {
442
+ }), /* @__PURE__ */ t(D, {
439
443
  variant: "outlined",
440
- startIcon: /* @__PURE__ */ t(gr, {}),
444
+ startIcon: /* @__PURE__ */ t(Ir, {}),
441
445
  onClick: () => void Xe(),
442
446
  children: "Refresh"
443
447
  })]
444
448
  }),
445
- children: [je ? /* @__PURE__ */ t(Be, {
449
+ children: [ze ? /* @__PURE__ */ t(Pe, {
446
450
  severity: "error",
447
451
  sx: { mb: 2 },
448
- children: je
449
- }) : null, !wt && a ? /* @__PURE__ */ n($, { children: [
452
+ children: ze
453
+ }) : null, !Tt && i ? /* @__PURE__ */ n(E, { children: [
450
454
  /* @__PURE__ */ t(ue, {
451
455
  sx: {
452
456
  borderRadius: 1.5,
@@ -458,20 +462,20 @@ function Zr() {
458
462
  children: /* @__PURE__ */ n(de, {
459
463
  sx: { p: 2.5 },
460
464
  children: [
461
- /* @__PURE__ */ n(m, {
465
+ /* @__PURE__ */ n(p, {
462
466
  direction: {
463
467
  xs: "column",
464
468
  md: "row"
465
469
  },
466
470
  spacing: 2,
467
471
  alignItems: { md: "flex-start" },
468
- children: [/* @__PURE__ */ n(C, {
472
+ children: [/* @__PURE__ */ n(k, {
469
473
  sx: {
470
474
  flexGrow: 1,
471
475
  minWidth: 0
472
476
  },
473
477
  children: [
474
- /* @__PURE__ */ n(m, {
478
+ /* @__PURE__ */ n(p, {
475
479
  direction: "row",
476
480
  alignItems: "center",
477
481
  spacing: 1,
@@ -479,119 +483,119 @@ function Zr() {
479
483
  flexWrap: "wrap",
480
484
  useFlexGap: !0,
481
485
  children: [
482
- /* @__PURE__ */ t(Xt, { id: a.serialId }),
483
- /* @__PURE__ */ t(R, {
486
+ /* @__PURE__ */ t(er, { id: i.serialId }),
487
+ /* @__PURE__ */ t(w, {
484
488
  size: "small",
485
- label: qt(a.status),
486
- color: Sr(a.status)
489
+ label: wt(i.status),
490
+ color: Er(i.status)
487
491
  }),
488
- D ? /* @__PURE__ */ t(R, {
492
+ R ? /* @__PURE__ */ t(w, {
489
493
  size: "small",
490
- label: kt(Ct, D),
491
- color: Tr(D)
494
+ label: Nt(Rt, R),
495
+ color: Sr(R)
492
496
  }) : null,
493
497
  /* @__PURE__ */ t(d, {
494
498
  variant: "caption",
495
499
  color: "text.secondary",
496
- children: a.ownerType
500
+ children: i.ownerType
497
501
  })
498
502
  ]
499
503
  }),
500
504
  /* @__PURE__ */ t(d, {
501
505
  variant: "h6",
502
506
  sx: { fontWeight: 800 },
503
- children: a.ownerName || (a.ownerType === "USER" ? "Personal" : "Facility")
507
+ children: i.ownerName || (i.ownerType === "USER" ? "Personal" : "Facility")
504
508
  }),
505
509
  /* @__PURE__ */ n(d, {
506
510
  variant: "caption",
507
511
  color: "text.secondary",
508
512
  sx: { display: "block" },
509
- children: ["For purchase date ", Ae(a.purchaseDate)]
513
+ children: ["For purchase date ", Fe(i.purchaseDate)]
510
514
  })
511
515
  ]
512
- }), /* @__PURE__ */ n(m, {
516
+ }), /* @__PURE__ */ n(p, {
513
517
  spacing: 0.25,
514
518
  sx: { minWidth: 260 },
515
519
  children: [
516
- /* @__PURE__ */ t(M, {
520
+ /* @__PURE__ */ t(j, {
517
521
  label: "Requested by",
518
- children: a.requestedByName || `#${a.requestedBy}`
522
+ children: i.requestedByName || `#${i.requestedBy}`
519
523
  }),
520
- /* @__PURE__ */ t(M, {
524
+ /* @__PURE__ */ t(j, {
521
525
  label: "Requested on",
522
- children: Nt(a.requestedOn)
526
+ children: Dt(i.requestedOn)
523
527
  }),
524
- a.decidedBy ? /* @__PURE__ */ n($, { children: [/* @__PURE__ */ t(M, {
528
+ i.decidedBy ? /* @__PURE__ */ n(E, { children: [/* @__PURE__ */ t(j, {
525
529
  label: "Decided by",
526
- children: a.decidedByName || `#${a.decidedBy}`
527
- }), /* @__PURE__ */ t(M, {
530
+ children: i.decidedByName || `#${i.decidedBy}`
531
+ }), /* @__PURE__ */ t(j, {
528
532
  label: "Decided on",
529
- children: Nt(a.decidedOn)
533
+ children: Dt(i.decidedOn)
530
534
  })] }) : null,
531
- a.shippedBy ? /* @__PURE__ */ t(M, {
535
+ i.shippedBy ? /* @__PURE__ */ t(j, {
532
536
  label: "Shipped by",
533
- children: a.shippedByName || `#${a.shippedBy}`
537
+ children: i.shippedByName || `#${i.shippedBy}`
534
538
  }) : null,
535
- a.receivedBy ? /* @__PURE__ */ t(M, {
539
+ i.receivedBy ? /* @__PURE__ */ t(j, {
536
540
  label: "Received by",
537
- children: a.receivedByName || `#${a.receivedBy}`
541
+ children: i.receivedByName || `#${i.receivedBy}`
538
542
  }) : null,
539
- X && a.paymentMode ? /* @__PURE__ */ t(M, {
543
+ Z && i.paymentMode ? /* @__PURE__ */ t(j, {
540
544
  label: "Payment",
541
- children: a.paymentMode
545
+ children: i.paymentMode
542
546
  }) : null
543
547
  ]
544
548
  })]
545
549
  }),
546
- a.notes ? /* @__PURE__ */ n($, { children: [
550
+ i.notes ? /* @__PURE__ */ n(E, { children: [
547
551
  /* @__PURE__ */ t(Ie, { sx: { my: 1.5 } }),
548
- /* @__PURE__ */ t(Re, { children: "Requester notes" }),
552
+ /* @__PURE__ */ t(we, { children: "Requester notes" }),
549
553
  /* @__PURE__ */ t(d, {
550
554
  variant: "body2",
551
- children: a.notes
555
+ children: i.notes
552
556
  })
553
557
  ] }) : null,
554
- a.decisionNotes ? /* @__PURE__ */ n($, { children: [
558
+ i.decisionNotes ? /* @__PURE__ */ n(E, { children: [
555
559
  /* @__PURE__ */ t(Ie, { sx: { my: 1.5 } }),
556
- /* @__PURE__ */ t(Re, { children: "Decision notes" }),
560
+ /* @__PURE__ */ t(we, { children: "Decision notes" }),
557
561
  /* @__PURE__ */ t(d, {
558
562
  variant: "body2",
559
- children: a.decisionNotes
563
+ children: i.decisionNotes
560
564
  })
561
565
  ] }) : null,
562
- a.fulfillmentNotes ? /* @__PURE__ */ n($, { children: [
566
+ i.fulfillmentNotes ? /* @__PURE__ */ n(E, { children: [
563
567
  /* @__PURE__ */ t(Ie, { sx: { my: 1.5 } }),
564
- /* @__PURE__ */ t(Re, { children: D === "DISCREPANCY" || D === "PARTIALLY_RECEIVED" ? "Reported discrepancy" : "Delivery note" }),
568
+ /* @__PURE__ */ t(we, { children: R === "DISCREPANCY" || R === "PARTIALLY_RECEIVED" ? "Reported discrepancy" : "Delivery note" }),
565
569
  /* @__PURE__ */ t(d, {
566
570
  variant: "body2",
567
- children: a.fulfillmentNotes
571
+ children: i.fulfillmentNotes
568
572
  })
569
573
  ] }) : null
570
574
  ]
571
575
  })
572
576
  }),
573
- Et ? /* @__PURE__ */ t(ue, {
577
+ At ? /* @__PURE__ */ t(ue, {
574
578
  variant: "outlined",
575
579
  sx: { mb: 2 },
576
580
  children: /* @__PURE__ */ n(de, {
577
581
  sx: { p: 2 },
578
582
  children: [
579
- /* @__PURE__ */ n(Be, {
583
+ /* @__PURE__ */ n(Pe, {
580
584
  severity: "warning",
581
585
  sx: { mb: 2 },
582
- icon: /* @__PURE__ */ t(qe, {}),
586
+ icon: /* @__PURE__ */ t(De, {}),
583
587
  children: [
584
- a.requestedByName || "The requester",
588
+ i.requestedByName || "The requester",
585
589
  " could not accept",
586
590
  A.length === 1 ? " this batch" : ` these ${A.length} batches`,
587
591
  ". Fix the details so they can check again, or say it cannot be supplied."
588
592
  ]
589
593
  }),
590
- /* @__PURE__ */ t(m, {
594
+ /* @__PURE__ */ t(p, {
591
595
  spacing: 1.5,
592
596
  children: A.map((e) => {
593
- let i = re[e.batchId] ?? "CORRECT", r = me[e.batchId] ?? {};
594
- return /* @__PURE__ */ n(C, {
597
+ let a = re[e.batchId] ?? "CORRECT", r = pe[e.batchId] ?? {};
598
+ return /* @__PURE__ */ n(k, {
595
599
  sx: (l) => ({
596
600
  p: 1.5,
597
601
  borderRadius: 1.5,
@@ -599,7 +603,7 @@ function Zr() {
599
603
  bgcolor: J(l.palette.warning.main, 0.04)
600
604
  }),
601
605
  children: [
602
- /* @__PURE__ */ n(m, {
606
+ /* @__PURE__ */ n(p, {
603
607
  direction: {
604
608
  xs: "column",
605
609
  sm: "row"
@@ -607,7 +611,7 @@ function Zr() {
607
611
  spacing: 1,
608
612
  justifyContent: "space-between",
609
613
  alignItems: { sm: "center" },
610
- children: [/* @__PURE__ */ n(C, { children: [/* @__PURE__ */ t(d, {
614
+ children: [/* @__PURE__ */ n(k, { children: [/* @__PURE__ */ t(d, {
611
615
  variant: "body2",
612
616
  sx: { fontWeight: 700 },
613
617
  children: e.productName
@@ -622,24 +626,24 @@ function Zr() {
622
626
  " unit",
623
627
  e.quantity === 1 ? "" : "s"
624
628
  ]
625
- })] }), /* @__PURE__ */ n(ke, {
629
+ })] }), /* @__PURE__ */ n(Ce, {
626
630
  size: "small",
627
631
  exclusive: !0,
628
- value: i,
632
+ value: a,
629
633
  onChange: (l, o) => {
630
- o && Ve((u) => ({
634
+ o && He((u) => ({
631
635
  ...u,
632
636
  [e.batchId]: o
633
637
  }));
634
638
  },
635
- children: [/* @__PURE__ */ t(B, {
639
+ children: [/* @__PURE__ */ t(F, {
636
640
  value: "CORRECT",
637
641
  sx: {
638
642
  textTransform: "none",
639
643
  px: 1.25
640
644
  },
641
645
  children: "Fix details"
642
- }), /* @__PURE__ */ t(B, {
646
+ }), /* @__PURE__ */ t(F, {
643
647
  value: "CANNOT_SUPPLY",
644
648
  color: "error",
645
649
  sx: {
@@ -662,7 +666,7 @@ function Zr() {
662
666
  "”"
663
667
  ]
664
668
  }) : null,
665
- i === "CORRECT" ? /* @__PURE__ */ n(C, {
669
+ a === "CORRECT" ? /* @__PURE__ */ n(k, {
666
670
  sx: {
667
671
  mt: 1.5,
668
672
  display: "grid",
@@ -678,8 +682,8 @@ function Zr() {
678
682
  label: "Lot number",
679
683
  required: !0,
680
684
  value: r.lotNumber ?? "",
681
- onChange: (l) => Pe(e.batchId, "lotNumber", l.target.value),
682
- onBlur: () => pe((l) => ({
685
+ onChange: (l) => Me(e.batchId, "lotNumber", l.target.value),
686
+ onBlur: () => me((l) => ({
683
687
  ...l,
684
688
  [`${e.batchId}:lotNumber`]: !0
685
689
  })),
@@ -690,30 +694,32 @@ function Zr() {
690
694
  size: "small",
691
695
  type: "date",
692
696
  label: "Expiry",
693
- required: !0,
697
+ required: e.expiryMode !== "FROM_MANUFACTURE",
694
698
  InputLabelProps: { shrink: !0 },
695
- value: r.expiryDate ?? "",
696
- onChange: (l) => Pe(e.batchId, "expiryDate", l.target.value),
697
- onBlur: () => pe((l) => ({
699
+ inputProps: e.expiryMode === "FROM_MANUFACTURE" ? { readOnly: !0 } : void 0,
700
+ value: e.expiryMode === "FROM_MANUFACTURE" ? Ae(r.manufactureDate, e.expiryInterval, e.expiryIntervalUnit) : r.expiryDate ?? "",
701
+ onChange: (l) => Me(e.batchId, "expiryDate", l.target.value),
702
+ onBlur: () => me((l) => ({
698
703
  ...l,
699
704
  [`${e.batchId}:expiryDate`]: !0
700
705
  })),
701
706
  error: V(`${e.batchId}:expiryDate`),
702
- helperText: V(`${e.batchId}:expiryDate`) ? le[`${e.batchId}:expiryDate`] : " "
707
+ helperText: e.expiryMode === "FROM_MANUFACTURE" ? `${e.expiryInterval} ${String(e.expiryIntervalUnit ?? "").toLowerCase()} after manufacture` : V(`${e.batchId}:expiryDate`) ? le[`${e.batchId}:expiryDate`] : " "
703
708
  }),
704
709
  /* @__PURE__ */ t(I, {
705
710
  size: "small",
706
711
  type: "date",
707
712
  label: "Manufactured",
708
713
  InputLabelProps: { shrink: !0 },
714
+ required: !!e.hasManufactureDate,
709
715
  value: r.manufactureDate ?? "",
710
- onChange: (l) => Pe(e.batchId, "manufactureDate", l.target.value),
711
- onBlur: () => pe((l) => ({
716
+ onChange: (l) => Me(e.batchId, "manufactureDate", l.target.value),
717
+ onBlur: () => me((l) => ({
712
718
  ...l,
713
719
  [`${e.batchId}:manufactureDate`]: !0
714
720
  })),
715
721
  error: V(`${e.batchId}:manufactureDate`),
716
- helperText: V(`${e.batchId}:manufactureDate`) ? le[`${e.batchId}:manufactureDate`] : "Optional"
722
+ helperText: V(`${e.batchId}:manufactureDate`) ? le[`${e.batchId}:manufactureDate`] : e.hasManufactureDate ? "Required for this product" : "Optional"
717
723
  })
718
724
  ]
719
725
  }) : /* @__PURE__ */ t(d, {
@@ -737,39 +743,39 @@ function Zr() {
737
743
  display: "block",
738
744
  mt: 2
739
745
  },
740
- children: [_ > 0 ? `${_} will go back for checking. ` : "", it > 0 ? `${it} will be closed.` : ""]
746
+ children: [K > 0 ? `${K} will go back for checking. ` : "", nt > 0 ? `${nt} will be closed.` : ""]
741
747
  }),
742
- /* @__PURE__ */ t(m, {
748
+ /* @__PURE__ */ t(p, {
743
749
  direction: "row",
744
750
  spacing: 1,
745
751
  justifyContent: "flex-end",
746
752
  sx: { mt: 1 },
747
- children: /* @__PURE__ */ t(q, {
753
+ children: /* @__PURE__ */ t(D, {
748
754
  variant: "contained",
749
- color: _ === 0 ? "error" : "primary",
755
+ color: K === 0 ? "error" : "primary",
750
756
  disabled: f,
751
- onClick: () => void Gt(),
752
- children: f ? "Sending…" : _ === 0 ? "Close These Batches" : "Send Corrections"
757
+ onClick: () => void Kt(),
758
+ children: f ? "Sending…" : K === 0 ? "Close These Batches" : "Send Corrections"
753
759
  })
754
760
  })
755
761
  ]
756
762
  })
757
763
  }) : null,
758
- ae ? /* @__PURE__ */ n($, { children: [
759
- /* @__PURE__ */ t(gt, {
764
+ ae ? /* @__PURE__ */ n(E, { children: [
765
+ /* @__PURE__ */ t(It, {
760
766
  eyebrow: "Decision",
761
767
  title: "Requested items",
762
768
  hint: "Approve or reject each item. For approved items, add the batch(es) coming in with their lot number and expiry."
763
769
  }),
764
- /* @__PURE__ */ t(m, {
770
+ /* @__PURE__ */ t(p, {
765
771
  spacing: 2,
766
772
  sx: {
767
773
  mt: 1.5,
768
774
  mb: 2
769
775
  },
770
- children: a.items.map((e) => {
771
- var w, oe, se, ge, ce, j, ve, lt, ot, st, ct, ut, dt, ht, mt, pt, yt, bt, ft, xt;
772
- let i = !!S[e.id], r = !!Y[e.id], l = tt(e.id), o = r ? l : l.slice(0, 1), u = be(e.id), h = Math.max(e.requestedQuantity - u, 0), p = y[`${e.id}:sum`], c = i ? u === e.requestedQuantity ? {
776
+ children: i.items.map((e) => {
777
+ var q, oe, se, ge, ce, B, ve, ot, st, ct, ut, dt, ht, pt, mt, yt, bt, ft, xt, gt, vt;
778
+ let a = !!T[e.id], r = !!Q[e.id], l = rt(e.id), o = r ? l : l.slice(0, 1), u = be(e.id), h = Math.max(e.requestedQuantity - u, 0), m = y[`${e.id}:sum`], c = a ? u === e.requestedQuantity ? {
773
779
  label: "Full",
774
780
  color: "success"
775
781
  } : u > 0 ? {
@@ -786,12 +792,12 @@ function Zr() {
786
792
  variant: "outlined",
787
793
  sx: {
788
794
  borderRadius: 1.5,
789
- borderColor: i ? "divider" : "action.disabledBackground",
790
- bgcolor: i ? "background.paper" : (s) => J(s.palette.action.disabled, 0.03)
795
+ borderColor: a ? "divider" : "action.disabledBackground",
796
+ bgcolor: a ? "background.paper" : (s) => J(s.palette.action.disabled, 0.03)
791
797
  },
792
798
  children: /* @__PURE__ */ n(de, {
793
799
  sx: { p: 2 },
794
- children: [/* @__PURE__ */ n(m, {
800
+ children: [/* @__PURE__ */ n(p, {
795
801
  direction: {
796
802
  xs: "column",
797
803
  sm: "row"
@@ -799,20 +805,20 @@ function Zr() {
799
805
  justifyContent: "space-between",
800
806
  alignItems: { sm: "center" },
801
807
  spacing: 1,
802
- children: [/* @__PURE__ */ n(C, {
808
+ children: [/* @__PURE__ */ n(k, {
803
809
  sx: { minWidth: 0 },
804
810
  children: [/* @__PURE__ */ t(d, {
805
811
  variant: "subtitle1",
806
812
  sx: { fontWeight: 800 },
807
813
  children: e.productName
808
- }), /* @__PURE__ */ n(m, {
814
+ }), /* @__PURE__ */ n(p, {
809
815
  direction: "row",
810
816
  spacing: 1,
811
817
  alignItems: "center",
812
818
  flexWrap: "wrap",
813
819
  useFlexGap: !0,
814
820
  children: [
815
- /* @__PURE__ */ t(R, {
821
+ /* @__PURE__ */ t(w, {
816
822
  size: "small",
817
823
  variant: "outlined",
818
824
  label: `Requested ${e.requestedQuantity}`,
@@ -821,10 +827,10 @@ function Zr() {
821
827
  height: 22
822
828
  }
823
829
  }),
824
- X && e.buyPrice != null ? /* @__PURE__ */ n(d, {
830
+ Z && e.buyPrice != null ? /* @__PURE__ */ n(d, {
825
831
  variant: "caption",
826
832
  color: "text.secondary",
827
- children: [/* @__PURE__ */ t(vt, {
833
+ children: [/* @__PURE__ */ t(Ct, {
828
834
  value: e.buyPrice,
829
835
  bold: !1
830
836
  }), " each"]
@@ -836,14 +842,14 @@ function Zr() {
836
842
  }) : null
837
843
  ]
838
844
  })]
839
- }), /* @__PURE__ */ n(ke, {
845
+ }), /* @__PURE__ */ n(Ce, {
840
846
  size: "small",
841
847
  exclusive: !0,
842
- value: i ? "approve" : "reject",
843
- onChange: (s, F) => {
844
- F && Wt(e.id, F === "approve");
848
+ value: a ? "approve" : "reject",
849
+ onChange: (s, z) => {
850
+ z && Bt(e.id, z === "approve");
845
851
  },
846
- children: [/* @__PURE__ */ t(B, {
852
+ children: [/* @__PURE__ */ t(F, {
847
853
  value: "approve",
848
854
  color: "success",
849
855
  sx: {
@@ -852,7 +858,7 @@ function Zr() {
852
858
  fontWeight: 700
853
859
  },
854
860
  children: "Approve"
855
- }), /* @__PURE__ */ t(B, {
861
+ }), /* @__PURE__ */ t(F, {
856
862
  value: "reject",
857
863
  color: "error",
858
864
  sx: {
@@ -863,9 +869,9 @@ function Zr() {
863
869
  children: "Reject"
864
870
  })]
865
871
  })]
866
- }), i ? /* @__PURE__ */ n($, { children: [
872
+ }), a ? /* @__PURE__ */ n(E, { children: [
867
873
  /* @__PURE__ */ t(Ie, { sx: { my: 1.5 } }),
868
- /* @__PURE__ */ n(m, {
874
+ /* @__PURE__ */ n(p, {
869
875
  direction: {
870
876
  xs: "column",
871
877
  sm: "row"
@@ -874,21 +880,21 @@ function Zr() {
874
880
  alignItems: { sm: "center" },
875
881
  spacing: 1,
876
882
  sx: { mb: 1.5 },
877
- children: [/* @__PURE__ */ n(ke, {
883
+ children: [/* @__PURE__ */ n(Ce, {
878
884
  size: "small",
879
885
  exclusive: !0,
880
886
  value: r ? "multi" : "single",
881
- onChange: (s, F) => {
882
- F && Ot(e.id, F === "multi");
887
+ onChange: (s, z) => {
888
+ z && zt(e.id, z === "multi");
883
889
  },
884
- children: [/* @__PURE__ */ t(B, {
890
+ children: [/* @__PURE__ */ t(F, {
885
891
  value: "single",
886
892
  sx: {
887
893
  textTransform: "none",
888
894
  px: 1.5
889
895
  },
890
896
  children: "Single batch"
891
- }), /* @__PURE__ */ t(B, {
897
+ }), /* @__PURE__ */ t(F, {
892
898
  value: "multi",
893
899
  sx: {
894
900
  textTransform: "none",
@@ -896,15 +902,15 @@ function Zr() {
896
902
  },
897
903
  children: "Multiple batches"
898
904
  })]
899
- }), /* @__PURE__ */ t(R, {
905
+ }), /* @__PURE__ */ t(w, {
900
906
  size: "small",
901
907
  color: c.color,
902
908
  label: `${u} of ${e.requestedQuantity} · ${c.label}`,
903
909
  sx: { fontWeight: 700 }
904
910
  })]
905
911
  }),
906
- r ? /* @__PURE__ */ n($, { children: [
907
- /* @__PURE__ */ n(C, {
912
+ r ? /* @__PURE__ */ n(E, { children: [
913
+ /* @__PURE__ */ n(k, {
908
914
  sx: (s) => ({
909
915
  display: "flex",
910
916
  justifyContent: "space-between",
@@ -928,7 +934,7 @@ function Zr() {
928
934
  e.requestedQuantity,
929
935
  " allocated"
930
936
  ]
931
- }), /* @__PURE__ */ t(R, {
937
+ }), /* @__PURE__ */ t(w, {
932
938
  size: "small",
933
939
  color: h === 0 ? "success" : "default",
934
940
  label: h === 0 ? "Fully allocated" : `${h} left`,
@@ -938,37 +944,37 @@ function Zr() {
938
944
  }
939
945
  })]
940
946
  }),
941
- /* @__PURE__ */ t(m, {
947
+ /* @__PURE__ */ t(p, {
942
948
  spacing: 1.5,
943
- children: o.map((s, F) => /* @__PURE__ */ n(C, {
949
+ children: o.map((s, z) => /* @__PURE__ */ n(k, {
944
950
  sx: {
945
951
  p: 1.5,
946
952
  border: "1px solid",
947
953
  borderColor: "divider",
948
954
  borderRadius: 1.5
949
955
  },
950
- children: [/* @__PURE__ */ n(m, {
956
+ children: [/* @__PURE__ */ n(p, {
951
957
  direction: "row",
952
958
  justifyContent: "space-between",
953
959
  alignItems: "center",
954
960
  sx: { mb: 1 },
955
- children: [/* @__PURE__ */ t(R, {
961
+ children: [/* @__PURE__ */ t(w, {
956
962
  size: "small",
957
- label: `Batch ${F + 1}`,
963
+ label: `Batch ${z + 1}`,
958
964
  sx: {
959
965
  fontWeight: 700,
960
966
  height: 22
961
967
  }
962
- }), /* @__PURE__ */ t(Dt, {
968
+ }), /* @__PURE__ */ t(qt, {
963
969
  title: "Remove batch",
964
- children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(ur, {
970
+ children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(hr, {
965
971
  size: "small",
966
972
  disabled: o.length <= 1,
967
- onClick: () => zt(e.id, s.key),
968
- children: /* @__PURE__ */ t(Dr, { fontSize: "small" })
973
+ onClick: () => Ut(e.id, s.key),
974
+ children: /* @__PURE__ */ t(qr, { fontSize: "small" })
969
975
  }) })
970
976
  })]
971
- }), /* @__PURE__ */ n(C, {
977
+ }), /* @__PURE__ */ n(k, {
972
978
  sx: {
973
979
  display: "grid",
974
980
  gridTemplateColumns: {
@@ -988,8 +994,8 @@ function Zr() {
988
994
  style: { textAlign: "right" }
989
995
  },
990
996
  value: s.quantity,
991
- onChange: (L) => rt(e.id, s.key, L.target.value, e.requestedQuantity),
992
- onBlur: () => E(`${s.key}:quantity`),
997
+ onChange: (W) => at(e.id, s.key, W.target.value, e.requestedQuantity),
998
+ onBlur: () => S(`${s.key}:quantity`),
993
999
  error: x(`${s.key}:quantity`) && !!y[`${s.key}:quantity`],
994
1000
  helperText: x(`${s.key}:quantity`) && y[`${s.key}:quantity`] || ""
995
1001
  }),
@@ -997,8 +1003,8 @@ function Zr() {
997
1003
  size: "small",
998
1004
  label: "Lot number",
999
1005
  value: s.lotNumber,
1000
- onChange: (L) => P(e.id, s.key, "lotNumber", L.target.value),
1001
- onBlur: () => E(`${s.key}:lotNumber`),
1006
+ onChange: (W) => M(e.id, s.key, "lotNumber", W.target.value),
1007
+ onBlur: () => S(`${s.key}:lotNumber`),
1002
1008
  error: x(`${s.key}:lotNumber`) && !!y[`${s.key}:lotNumber`],
1003
1009
  helperText: x(`${s.key}:lotNumber`) && y[`${s.key}:lotNumber`] || "",
1004
1010
  inputProps: { style: {
@@ -1011,39 +1017,41 @@ function Zr() {
1011
1017
  label: "Expiry",
1012
1018
  type: "date",
1013
1019
  InputLabelProps: { shrink: !0 },
1014
- value: s.expiryDate,
1015
- onChange: (L) => P(e.id, s.key, "expiryDate", L.target.value),
1016
- onBlur: () => E(`${s.key}:expiryDate`),
1020
+ inputProps: e.expiryMode === "FROM_MANUFACTURE" ? { readOnly: !0 } : void 0,
1021
+ value: e.expiryMode === "FROM_MANUFACTURE" ? Ae(s.manufactureDate, e.expiryInterval, e.expiryIntervalUnit) : s.expiryDate,
1022
+ onChange: (W) => M(e.id, s.key, "expiryDate", W.target.value),
1023
+ onBlur: () => S(`${s.key}:expiryDate`),
1017
1024
  error: x(`${s.key}:expiryDate`) && !!y[`${s.key}:expiryDate`],
1018
- helperText: x(`${s.key}:expiryDate`) && y[`${s.key}:expiryDate`] || ""
1025
+ helperText: e.expiryMode === "FROM_MANUFACTURE" ? `${e.expiryInterval} ${String(e.expiryIntervalUnit ?? "").toLowerCase()} after manufacture` : x(`${s.key}:expiryDate`) && y[`${s.key}:expiryDate`] || ""
1019
1026
  }),
1020
1027
  /* @__PURE__ */ t(I, {
1021
1028
  size: "small",
1022
1029
  label: "Manufactured",
1023
1030
  type: "date",
1024
1031
  InputLabelProps: { shrink: !0 },
1032
+ required: !!e.hasManufactureDate,
1025
1033
  value: s.manufactureDate ?? "",
1026
- onChange: (L) => P(e.id, s.key, "manufactureDate", L.target.value),
1027
- onBlur: () => E(`${s.key}:manufactureDate`),
1034
+ onChange: (W) => M(e.id, s.key, "manufactureDate", W.target.value),
1035
+ onBlur: () => S(`${s.key}:manufactureDate`),
1028
1036
  error: x(`${s.key}:manufactureDate`) && !!y[`${s.key}:manufactureDate`],
1029
- helperText: x(`${s.key}:manufactureDate`) ? y[`${s.key}:manufactureDate`] || "" : "Optional"
1037
+ helperText: x(`${s.key}:manufactureDate`) ? y[`${s.key}:manufactureDate`] || "" : e.hasManufactureDate ? "Required for this product" : "Optional"
1030
1038
  })
1031
1039
  ]
1032
1040
  })]
1033
1041
  }, s.key))
1034
1042
  }),
1035
- /* @__PURE__ */ t(Dt, {
1043
+ /* @__PURE__ */ t(qt, {
1036
1044
  title: h === 0 ? "All requested quantity is already allocated" : "",
1037
- children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(q, {
1045
+ children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(D, {
1038
1046
  size: "small",
1039
- startIcon: /* @__PURE__ */ t(xr, {}),
1047
+ startIcon: /* @__PURE__ */ t(vr, {}),
1040
1048
  sx: { mt: 1 },
1041
1049
  disabled: h <= 0,
1042
- onClick: () => Bt(e.id),
1050
+ onClick: () => Ot(e.id),
1043
1051
  children: h > 0 ? `Add batch (${h} left)` : "Fully allocated"
1044
1052
  }) })
1045
1053
  })
1046
- ] }) : /* @__PURE__ */ n(C, {
1054
+ ] }) : /* @__PURE__ */ n(k, {
1047
1055
  sx: {
1048
1056
  display: "grid",
1049
1057
  gridTemplateColumns: {
@@ -1062,11 +1070,11 @@ function Zr() {
1062
1070
  max: e.requestedQuantity,
1063
1071
  style: { textAlign: "right" }
1064
1072
  },
1065
- value: ((w = o[0]) == null ? void 0 : w.quantity) ?? "",
1066
- onChange: (s) => rt(e.id, o[0].key, s.target.value, e.requestedQuantity),
1073
+ value: ((q = o[0]) == null ? void 0 : q.quantity) ?? "",
1074
+ onChange: (s) => at(e.id, o[0].key, s.target.value, e.requestedQuantity),
1067
1075
  onBlur: () => {
1068
1076
  var s;
1069
- return E(`${(s = o[0]) == null ? void 0 : s.key}:quantity`);
1077
+ return S(`${(s = o[0]) == null ? void 0 : s.key}:quantity`);
1070
1078
  },
1071
1079
  error: x(`${(oe = o[0]) == null ? void 0 : oe.key}:quantity`) && !!y[`${(se = o[0]) == null ? void 0 : se.key}:quantity`],
1072
1080
  helperText: x(`${(ge = o[0]) == null ? void 0 : ge.key}:quantity`) && y[`${(ce = o[0]) == null ? void 0 : ce.key}:quantity`] || ""
@@ -1074,14 +1082,14 @@ function Zr() {
1074
1082
  /* @__PURE__ */ t(I, {
1075
1083
  size: "small",
1076
1084
  label: "Lot number",
1077
- value: ((j = o[0]) == null ? void 0 : j.lotNumber) ?? "",
1078
- onChange: (s) => P(e.id, o[0].key, "lotNumber", s.target.value),
1085
+ value: ((B = o[0]) == null ? void 0 : B.lotNumber) ?? "",
1086
+ onChange: (s) => M(e.id, o[0].key, "lotNumber", s.target.value),
1079
1087
  onBlur: () => {
1080
1088
  var s;
1081
- return E(`${(s = o[0]) == null ? void 0 : s.key}:lotNumber`);
1089
+ return S(`${(s = o[0]) == null ? void 0 : s.key}:lotNumber`);
1082
1090
  },
1083
- error: x(`${(ve = o[0]) == null ? void 0 : ve.key}:lotNumber`) && !!y[`${(lt = o[0]) == null ? void 0 : lt.key}:lotNumber`],
1084
- helperText: x(`${(ot = o[0]) == null ? void 0 : ot.key}:lotNumber`) && y[`${(st = o[0]) == null ? void 0 : st.key}:lotNumber`] || "",
1091
+ error: x(`${(ve = o[0]) == null ? void 0 : ve.key}:lotNumber`) && !!y[`${(ot = o[0]) == null ? void 0 : ot.key}:lotNumber`],
1092
+ helperText: x(`${(st = o[0]) == null ? void 0 : st.key}:lotNumber`) && y[`${(ct = o[0]) == null ? void 0 : ct.key}:lotNumber`] || "",
1085
1093
  inputProps: { style: {
1086
1094
  fontFamily: "monospace",
1087
1095
  fontSize: "0.8rem"
@@ -1092,39 +1100,41 @@ function Zr() {
1092
1100
  label: "Expiry",
1093
1101
  type: "date",
1094
1102
  InputLabelProps: { shrink: !0 },
1095
- value: ((ct = o[0]) == null ? void 0 : ct.expiryDate) ?? "",
1096
- onChange: (s) => P(e.id, o[0].key, "expiryDate", s.target.value),
1103
+ inputProps: e.expiryMode === "FROM_MANUFACTURE" ? { readOnly: !0 } : void 0,
1104
+ value: e.expiryMode === "FROM_MANUFACTURE" ? Ae((ut = o[0]) == null ? void 0 : ut.manufactureDate, e.expiryInterval, e.expiryIntervalUnit) : ((dt = o[0]) == null ? void 0 : dt.expiryDate) ?? "",
1105
+ onChange: (s) => M(e.id, o[0].key, "expiryDate", s.target.value),
1097
1106
  onBlur: () => {
1098
1107
  var s;
1099
- return E(`${(s = o[0]) == null ? void 0 : s.key}:expiryDate`);
1108
+ return S(`${(s = o[0]) == null ? void 0 : s.key}:expiryDate`);
1100
1109
  },
1101
- error: x(`${(ut = o[0]) == null ? void 0 : ut.key}:expiryDate`) && !!y[`${(dt = o[0]) == null ? void 0 : dt.key}:expiryDate`],
1102
- helperText: x(`${(ht = o[0]) == null ? void 0 : ht.key}:expiryDate`) && y[`${(mt = o[0]) == null ? void 0 : mt.key}:expiryDate`] || ""
1110
+ error: x(`${(ht = o[0]) == null ? void 0 : ht.key}:expiryDate`) && !!y[`${(pt = o[0]) == null ? void 0 : pt.key}:expiryDate`],
1111
+ helperText: e.expiryMode === "FROM_MANUFACTURE" ? `${e.expiryInterval} ${String(e.expiryIntervalUnit ?? "").toLowerCase()} after manufacture` : x(`${(mt = o[0]) == null ? void 0 : mt.key}:expiryDate`) && y[`${(yt = o[0]) == null ? void 0 : yt.key}:expiryDate`] || ""
1103
1112
  }),
1104
1113
  /* @__PURE__ */ t(I, {
1105
1114
  size: "small",
1106
1115
  label: "Manufactured",
1107
1116
  type: "date",
1108
1117
  InputLabelProps: { shrink: !0 },
1109
- value: ((pt = o[0]) == null ? void 0 : pt.manufactureDate) ?? "",
1110
- onChange: (s) => P(e.id, o[0].key, "manufactureDate", s.target.value),
1118
+ required: !!e.hasManufactureDate,
1119
+ value: ((bt = o[0]) == null ? void 0 : bt.manufactureDate) ?? "",
1120
+ onChange: (s) => M(e.id, o[0].key, "manufactureDate", s.target.value),
1111
1121
  onBlur: () => {
1112
1122
  var s;
1113
- return E(`${(s = o[0]) == null ? void 0 : s.key}:manufactureDate`);
1123
+ return S(`${(s = o[0]) == null ? void 0 : s.key}:manufactureDate`);
1114
1124
  },
1115
- error: x(`${(yt = o[0]) == null ? void 0 : yt.key}:manufactureDate`) && !!y[`${(bt = o[0]) == null ? void 0 : bt.key}:manufactureDate`],
1116
- helperText: x(`${(ft = o[0]) == null ? void 0 : ft.key}:manufactureDate`) ? y[`${(xt = o[0]) == null ? void 0 : xt.key}:manufactureDate`] || "" : "Optional"
1125
+ error: x(`${(ft = o[0]) == null ? void 0 : ft.key}:manufactureDate`) && !!y[`${(xt = o[0]) == null ? void 0 : xt.key}:manufactureDate`],
1126
+ helperText: x(`${(gt = o[0]) == null ? void 0 : gt.key}:manufactureDate`) ? y[`${(vt = o[0]) == null ? void 0 : vt.key}:manufactureDate`] || "" : e.hasManufactureDate ? "Required for this product" : "Optional"
1117
1127
  })
1118
1128
  ]
1119
1129
  }),
1120
- (Te || Lt(e.id)) && p ? /* @__PURE__ */ t(d, {
1130
+ ($e || Lt(e.id)) && m ? /* @__PURE__ */ t(d, {
1121
1131
  variant: "caption",
1122
1132
  color: "error",
1123
1133
  sx: {
1124
1134
  display: "block",
1125
1135
  mt: 1
1126
1136
  },
1127
- children: p
1137
+ children: m
1128
1138
  }) : null
1129
1139
  ] }) : /* @__PURE__ */ t(d, {
1130
1140
  variant: "caption",
@@ -1148,7 +1158,7 @@ function Zr() {
1148
1158
  },
1149
1159
  children: /* @__PURE__ */ n(de, {
1150
1160
  sx: { p: 2.5 },
1151
- children: [/* @__PURE__ */ n(m, {
1161
+ children: [/* @__PURE__ */ n(p, {
1152
1162
  direction: {
1153
1163
  xs: "column",
1154
1164
  md: "row"
@@ -1162,9 +1172,9 @@ function Zr() {
1162
1172
  minRows: 2,
1163
1173
  label: "Decision notes (optional)",
1164
1174
  placeholder: "Shown to the requester",
1165
- value: $e,
1166
- onChange: (e) => Ye(e.target.value)
1167
- }), X && at != null ? /* @__PURE__ */ n(C, {
1175
+ value: Ee,
1176
+ onChange: (e) => _e(e.target.value)
1177
+ }), Z && it != null ? /* @__PURE__ */ n(k, {
1168
1178
  sx: (e) => ({
1169
1179
  minWidth: 220,
1170
1180
  p: 1.5,
@@ -1174,35 +1184,35 @@ function Zr() {
1174
1184
  bgcolor: J(e.palette.primary.main, 0.04),
1175
1185
  textAlign: "right"
1176
1186
  }),
1177
- children: [/* @__PURE__ */ t(Re, { children: "Total if approved" }), /* @__PURE__ */ t(vt, {
1178
- value: Number(at.toFixed(2)),
1187
+ children: [/* @__PURE__ */ t(we, { children: "Total if approved" }), /* @__PURE__ */ t(Ct, {
1188
+ value: Number(it.toFixed(2)),
1179
1189
  size: "big"
1180
1190
  })]
1181
1191
  }) : null]
1182
- }), /* @__PURE__ */ t(m, {
1192
+ }), /* @__PURE__ */ t(p, {
1183
1193
  direction: "row",
1184
1194
  spacing: 1,
1185
1195
  justifyContent: "flex-end",
1186
1196
  sx: { mt: 2 },
1187
1197
  flexWrap: "wrap",
1188
1198
  useFlexGap: !0,
1189
- children: Ft ? /* @__PURE__ */ n($, { children: [/* @__PURE__ */ t(q, {
1199
+ children: jt ? /* @__PURE__ */ n(E, { children: [/* @__PURE__ */ t(D, {
1190
1200
  variant: "outlined",
1191
1201
  color: "error",
1192
- startIcon: /* @__PURE__ */ t(De, {}),
1202
+ startIcon: /* @__PURE__ */ t(Re, {}),
1193
1203
  disabled: f,
1194
1204
  onClick: () => te(!0),
1195
1205
  children: "Reject Request"
1196
- }), /* @__PURE__ */ t(q, {
1206
+ }), /* @__PURE__ */ t(D, {
1197
1207
  variant: "contained",
1198
- startIcon: /* @__PURE__ */ t(ze, {}),
1208
+ startIcon: /* @__PURE__ */ t(Oe, {}),
1199
1209
  disabled: f,
1200
- onClick: () => void Qt(),
1210
+ onClick: () => void _t(),
1201
1211
  children: f ? "Submitting…" : "Submit Decision"
1202
- })] }) : /* @__PURE__ */ t(q, {
1212
+ })] }) : /* @__PURE__ */ t(D, {
1203
1213
  variant: "contained",
1204
1214
  color: "error",
1205
- startIcon: /* @__PURE__ */ t(De, {}),
1215
+ startIcon: /* @__PURE__ */ t(Re, {}),
1206
1216
  disabled: f,
1207
1217
  onClick: () => te(!0),
1208
1218
  children: "Reject Request"
@@ -1221,16 +1231,16 @@ function Zr() {
1221
1231
  children: /* @__PURE__ */ n(de, {
1222
1232
  sx: { p: 2.5 },
1223
1233
  children: [
1224
- /* @__PURE__ */ t(gt, {
1234
+ /* @__PURE__ */ t(It, {
1225
1235
  eyebrow: "Items",
1226
- title: G ? "Check what arrived" : "Items & outcome",
1227
- hint: G ? "Mark each batch OK if its lot and expiry match what you received, or flag it if something is off. Then submit." : "What was approved or rejected per item, the batches, and where each ended up."
1236
+ title: Y ? "Check what arrived" : "Items & outcome",
1237
+ hint: Y ? "Mark each batch OK if its lot and expiry match what you received, or flag it if something is off. Then submit." : "What was approved or rejected per item, the batches, and where each ended up."
1228
1238
  }),
1229
- /* @__PURE__ */ t(m, {
1239
+ /* @__PURE__ */ t(p, {
1230
1240
  spacing: 1.5,
1231
1241
  sx: { mt: 1.5 },
1232
- children: a.items.map((e) => {
1233
- let i = a.status !== "PENDING", r = e.approvedQuantity, l = i && !(r > 0), o = i ? l ? {
1242
+ children: i.items.map((e) => {
1243
+ let a = i.status !== "PENDING", r = e.approvedQuantity, l = a && !(r > 0), o = a ? l ? {
1234
1244
  label: "Rejected",
1235
1245
  color: "default"
1236
1246
  } : r >= e.requestedQuantity ? {
@@ -1242,15 +1252,15 @@ function Zr() {
1242
1252
  } : {
1243
1253
  label: "Awaiting approval",
1244
1254
  color: "info"
1245
- }, u = (e.batches ?? []).filter((c) => (c.quantity ?? 0) > 0 && (c.lotNumber || c.expiryDate)), h = G || u.some((c) => c.receiptStatus != null), p = 4 + +(a.ownerType === "FACILITY") + +!!h;
1246
- return /* @__PURE__ */ n(C, {
1255
+ }, u = (e.batches ?? []).filter((c) => (c.quantity ?? 0) > 0 && (c.lotNumber || c.expiryDate)), h = Y || u.some((c) => c.receiptStatus != null), m = 4 + +(i.ownerType === "FACILITY") + +!!h;
1256
+ return /* @__PURE__ */ n(k, {
1247
1257
  sx: {
1248
1258
  p: 1.5,
1249
1259
  border: "1px solid",
1250
1260
  borderColor: "divider",
1251
1261
  borderRadius: 1.5
1252
1262
  },
1253
- children: [/* @__PURE__ */ n(m, {
1263
+ children: [/* @__PURE__ */ n(p, {
1254
1264
  direction: {
1255
1265
  xs: "column",
1256
1266
  sm: "row"
@@ -1259,7 +1269,7 @@ function Zr() {
1259
1269
  alignItems: { sm: "center" },
1260
1270
  spacing: 1,
1261
1271
  sx: { mb: +!!u.length },
1262
- children: [/* @__PURE__ */ n(C, { children: [/* @__PURE__ */ t(d, {
1272
+ children: [/* @__PURE__ */ n(k, { children: [/* @__PURE__ */ t(d, {
1263
1273
  variant: "subtitle2",
1264
1274
  sx: { fontWeight: 800 },
1265
1275
  children: e.productName
@@ -1271,41 +1281,41 @@ function Zr() {
1271
1281
  e.requestedQuantity,
1272
1282
  r == null ? "" : ` · Approved ${r}`
1273
1283
  ]
1274
- })] }), /* @__PURE__ */ t(R, {
1284
+ })] }), /* @__PURE__ */ t(w, {
1275
1285
  size: "small",
1276
1286
  color: o.color,
1277
1287
  label: o.label,
1278
1288
  sx: { fontWeight: 700 }
1279
1289
  })]
1280
- }), u.length > 0 ? /* @__PURE__ */ n(dr, {
1290
+ }), u.length > 0 ? /* @__PURE__ */ n(pr, {
1281
1291
  size: "small",
1282
- children: [/* @__PURE__ */ t(hr, { children: /* @__PURE__ */ n(Ce, { children: [
1283
- /* @__PURE__ */ t(k, { children: "Lot" }),
1284
- /* @__PURE__ */ t(k, { children: "Expiry" }),
1285
- /* @__PURE__ */ t(k, { children: "Manufactured" }),
1286
- /* @__PURE__ */ t(k, {
1292
+ children: [/* @__PURE__ */ t(mr, { children: /* @__PURE__ */ n(ke, { children: [
1293
+ /* @__PURE__ */ t(C, { children: "Lot" }),
1294
+ /* @__PURE__ */ t(C, { children: "Expiry" }),
1295
+ /* @__PURE__ */ t(C, { children: "Manufactured" }),
1296
+ /* @__PURE__ */ t(C, {
1287
1297
  align: "right",
1288
1298
  children: "Qty"
1289
1299
  }),
1290
- a.ownerType === "FACILITY" ? /* @__PURE__ */ t(k, { children: "Storage" }) : null,
1291
- h ? /* @__PURE__ */ t(k, {
1300
+ i.ownerType === "FACILITY" ? /* @__PURE__ */ t(C, { children: "Storage" }) : null,
1301
+ h ? /* @__PURE__ */ t(C, {
1292
1302
  align: "center",
1293
1303
  sx: { width: 200 },
1294
- children: G ? "Condition" : "Receipt"
1304
+ children: Y ? "Condition" : "Receipt"
1295
1305
  }) : null
1296
- ] }) }), /* @__PURE__ */ t(mr, { children: u.map((c, w) => {
1297
- let oe = ee[c.batchId] ?? "OK", se = G && c.batchId && c.receiptStatus == null, ge = se && oe === "ISSUE";
1298
- return /* @__PURE__ */ n(cr, { children: [/* @__PURE__ */ n(Ce, { children: [
1299
- /* @__PURE__ */ t(k, {
1306
+ ] }) }), /* @__PURE__ */ t(yr, { children: u.map((c, q) => {
1307
+ let oe = ee[c.batchId] ?? "OK", se = Y && c.batchId && c.receiptStatus == null, ge = se && oe === "ISSUE";
1308
+ return /* @__PURE__ */ n(dr, { children: [/* @__PURE__ */ n(ke, { children: [
1309
+ /* @__PURE__ */ t(C, {
1300
1310
  sx: {
1301
1311
  fontFamily: "monospace",
1302
1312
  fontSize: "0.8rem"
1303
1313
  },
1304
1314
  children: c.lotNumber || "—"
1305
1315
  }),
1306
- /* @__PURE__ */ t(k, { children: c.expiryDate ? Ae(c.expiryDate) : "—" }),
1307
- /* @__PURE__ */ t(k, { children: c.manufactureDate ? Ae(c.manufactureDate) : "—" }),
1308
- /* @__PURE__ */ t(k, {
1316
+ /* @__PURE__ */ t(C, { children: c.expiryDate ? Fe(c.expiryDate) : "—" }),
1317
+ /* @__PURE__ */ t(C, { children: c.manufactureDate ? Fe(c.manufactureDate) : "—" }),
1318
+ /* @__PURE__ */ t(C, {
1309
1319
  align: "right",
1310
1320
  sx: {
1311
1321
  fontVariantNumeric: "tabular-nums",
@@ -1313,68 +1323,68 @@ function Zr() {
1313
1323
  },
1314
1324
  children: c.quantity
1315
1325
  }),
1316
- a.ownerType === "FACILITY" ? /* @__PURE__ */ t(k, { children: c.storageUnitName || "—" }) : null,
1317
- h ? /* @__PURE__ */ t(k, {
1326
+ i.ownerType === "FACILITY" ? /* @__PURE__ */ t(C, { children: c.storageUnitName || "—" }) : null,
1327
+ h ? /* @__PURE__ */ t(C, {
1318
1328
  align: "center",
1319
- children: se ? /* @__PURE__ */ n(ke, {
1329
+ children: se ? /* @__PURE__ */ n(Ce, {
1320
1330
  size: "small",
1321
1331
  exclusive: !0,
1322
1332
  value: oe,
1323
- onChange: (ce, j) => {
1324
- j && Ue((ve) => ({
1333
+ onChange: (ce, B) => {
1334
+ B && Ye((ve) => ({
1325
1335
  ...ve,
1326
- [c.batchId]: j
1336
+ [c.batchId]: B
1327
1337
  }));
1328
1338
  },
1329
- children: [/* @__PURE__ */ n(B, {
1339
+ children: [/* @__PURE__ */ n(F, {
1330
1340
  value: "OK",
1331
1341
  color: "success",
1332
1342
  sx: {
1333
1343
  textTransform: "none",
1334
1344
  px: 1.25
1335
1345
  },
1336
- children: [/* @__PURE__ */ t(ze, {
1346
+ children: [/* @__PURE__ */ t(Oe, {
1337
1347
  fontSize: "small",
1338
1348
  sx: { mr: 0.5 }
1339
1349
  }), " OK"]
1340
- }), /* @__PURE__ */ n(B, {
1350
+ }), /* @__PURE__ */ n(F, {
1341
1351
  value: "ISSUE",
1342
1352
  color: "error",
1343
1353
  sx: {
1344
1354
  textTransform: "none",
1345
1355
  px: 1.25
1346
1356
  },
1347
- children: [/* @__PURE__ */ t(qe, {
1357
+ children: [/* @__PURE__ */ t(De, {
1348
1358
  fontSize: "small",
1349
1359
  sx: { mr: 0.5 }
1350
1360
  }), " Issue"]
1351
1361
  })]
1352
- }) : c.receiptStatus === "RECEIVED" ? /* @__PURE__ */ t(R, {
1362
+ }) : c.receiptStatus === "RECEIVED" ? /* @__PURE__ */ t(w, {
1353
1363
  size: "small",
1354
1364
  color: "success",
1355
1365
  variant: "outlined",
1356
- icon: /* @__PURE__ */ t(ze, {}),
1366
+ icon: /* @__PURE__ */ t(Oe, {}),
1357
1367
  label: "Received",
1358
1368
  sx: { fontWeight: 700 }
1359
- }) : c.receiptStatus === "DISCREPANCY" ? /* @__PURE__ */ t(R, {
1369
+ }) : c.receiptStatus === "DISCREPANCY" ? /* @__PURE__ */ t(w, {
1360
1370
  size: "small",
1361
1371
  color: "error",
1362
1372
  variant: "outlined",
1363
- icon: /* @__PURE__ */ t(qe, {}),
1373
+ icon: /* @__PURE__ */ t(De, {}),
1364
1374
  label: "Discrepancy",
1365
1375
  sx: { fontWeight: 700 }
1366
- }) : c.receiptStatus === "REJECTED" ? /* @__PURE__ */ t(R, {
1376
+ }) : c.receiptStatus === "REJECTED" ? /* @__PURE__ */ t(w, {
1367
1377
  size: "small",
1368
1378
  color: "error",
1369
1379
  variant: "outlined",
1370
- icon: /* @__PURE__ */ t(wr, {}),
1380
+ icon: /* @__PURE__ */ t(Tr, {}),
1371
1381
  label: "Not supplied",
1372
1382
  sx: { fontWeight: 700 }
1373
- }) : At ? /* @__PURE__ */ t(R, {
1383
+ }) : Pt ? /* @__PURE__ */ t(w, {
1374
1384
  size: "small",
1375
1385
  color: "info",
1376
1386
  variant: "outlined",
1377
- icon: /* @__PURE__ */ t(Rr, {}),
1387
+ icon: /* @__PURE__ */ t($r, {}),
1378
1388
  label: "Awaiting check",
1379
1389
  sx: { fontWeight: 700 }
1380
1390
  }) : /* @__PURE__ */ t(d, {
@@ -1383,8 +1393,8 @@ function Zr() {
1383
1393
  children: "—"
1384
1394
  })
1385
1395
  }) : null
1386
- ] }), ge ? /* @__PURE__ */ t(Ce, { children: /* @__PURE__ */ t(k, {
1387
- colSpan: p,
1396
+ ] }), ge ? /* @__PURE__ */ t(ke, { children: /* @__PURE__ */ t(C, {
1397
+ colSpan: m,
1388
1398
  sx: { py: 1 },
1389
1399
  children: /* @__PURE__ */ t(I, {
1390
1400
  fullWidth: !0,
@@ -1392,14 +1402,14 @@ function Zr() {
1392
1402
  required: !0,
1393
1403
  label: "What is wrong with this batch?",
1394
1404
  placeholder: "Say what did not match so the approver knows what to fix.",
1395
- value: Ee[c.batchId] ?? "",
1396
- onChange: (ce) => Ge((j) => ({
1397
- ...j,
1405
+ value: Se[c.batchId] ?? "",
1406
+ onChange: (ce) => Ge((B) => ({
1407
+ ...B,
1398
1408
  [c.batchId]: ce.target.value
1399
1409
  }))
1400
1410
  })
1401
- }) }) : c.discrepancyReason ? /* @__PURE__ */ t(Ce, { children: /* @__PURE__ */ t(k, {
1402
- colSpan: p,
1411
+ }) }) : c.discrepancyReason ? /* @__PURE__ */ t(ke, { children: /* @__PURE__ */ t(C, {
1412
+ colSpan: m,
1403
1413
  sx: {
1404
1414
  py: 0.5,
1405
1415
  borderBottom: "none"
@@ -1414,13 +1424,13 @@ function Zr() {
1414
1424
  "”"
1415
1425
  ]
1416
1426
  })
1417
- }) }) : null] }, c.batchId || `${e.id}:${w}`);
1427
+ }) }) : null] }, c.batchId || `${e.id}:${q}`);
1418
1428
  }) })]
1419
1429
  }) : l ? /* @__PURE__ */ t(d, {
1420
1430
  variant: "caption",
1421
1431
  color: "text.disabled",
1422
1432
  children: "No stock received for this item."
1423
- }) : i ? null : /* @__PURE__ */ t(d, {
1433
+ }) : a ? null : /* @__PURE__ */ t(d, {
1424
1434
  variant: "caption",
1425
1435
  color: "text.disabled",
1426
1436
  children: "Waiting for the approver's decision."
@@ -1428,20 +1438,20 @@ function Zr() {
1428
1438
  }, e.id);
1429
1439
  })
1430
1440
  }),
1431
- Pt ? /* @__PURE__ */ t(m, {
1441
+ Ft ? /* @__PURE__ */ t(p, {
1432
1442
  direction: "row",
1433
1443
  spacing: 1,
1434
1444
  justifyContent: "flex-end",
1435
1445
  sx: { mt: 2 },
1436
- children: /* @__PURE__ */ t(q, {
1446
+ children: /* @__PURE__ */ t(D, {
1437
1447
  variant: "contained",
1438
- startIcon: /* @__PURE__ */ t(Cr, {}),
1448
+ startIcon: /* @__PURE__ */ t(Rr, {}),
1439
1449
  disabled: f,
1440
- onClick: () => void Ut(),
1450
+ onClick: () => void Gt(),
1441
1451
  children: f ? "Updating…" : "Mark In Transit"
1442
1452
  })
1443
1453
  }) : null,
1444
- G ? /* @__PURE__ */ n($, { children: [ie ? /* @__PURE__ */ t(I, {
1454
+ Y ? /* @__PURE__ */ n(E, { children: [ie ? /* @__PURE__ */ t(I, {
1445
1455
  sx: { mt: 2 },
1446
1456
  fullWidth: !0,
1447
1457
  size: "small",
@@ -1450,8 +1460,8 @@ function Zr() {
1450
1460
  label: "Anything else about this delivery? (optional)",
1451
1461
  placeholder: "Only if something applies to the shipment as a whole.",
1452
1462
  value: Ke,
1453
- onChange: (e) => _e(e.target.value)
1454
- }) : null, /* @__PURE__ */ n(m, {
1463
+ onChange: (e) => Ve(e.target.value)
1464
+ }) : null, /* @__PURE__ */ n(p, {
1455
1465
  direction: {
1456
1466
  xs: "column",
1457
1467
  sm: "row"
@@ -1464,36 +1474,36 @@ function Zr() {
1464
1474
  variant: "caption",
1465
1475
  color: "text.secondary",
1466
1476
  sx: { mr: "auto" },
1467
- children: ne ? "Every batch is flagged, so the whole shipment goes back to the approver." : `${xe.length} batch${xe.length === 1 ? "" : "es"} will come into inventory; the flagged ${O.length === 1 ? "one goes" : "ones go"} back to the approver.`
1468
- }) : null, /* @__PURE__ */ t(q, {
1477
+ children: ne ? "Every batch is flagged, so the whole shipment goes back to the approver." : `${xe.length} batch${xe.length === 1 ? "" : "es"} will come into inventory; the flagged ${U.length === 1 ? "one goes" : "ones go"} back to the approver.`
1478
+ }) : null, /* @__PURE__ */ t(D, {
1469
1479
  variant: "contained",
1470
1480
  color: ne ? "error" : "primary",
1471
- startIcon: t(ne ? qe : kr, {}),
1472
- disabled: f || !Vt,
1473
- onClick: () => void Kt(),
1481
+ startIcon: t(ne ? De : Nr, {}),
1482
+ disabled: f || !Jt,
1483
+ onClick: () => void Vt(),
1474
1484
  children: f ? "Submitting…" : ne ? "Send Back to Approver" : ie ? "Receive OK & Flag Issues" : "Receive into Inventory"
1475
1485
  })]
1476
1486
  })] }) : null,
1477
- Ze && et ? /* @__PURE__ */ t(m, {
1487
+ et && tt ? /* @__PURE__ */ t(p, {
1478
1488
  direction: "row",
1479
1489
  spacing: 1,
1480
1490
  justifyContent: "flex-end",
1481
1491
  sx: { mt: 2 },
1482
- children: /* @__PURE__ */ t(q, {
1492
+ children: /* @__PURE__ */ t(D, {
1483
1493
  variant: "outlined",
1484
1494
  color: "error",
1485
- startIcon: /* @__PURE__ */ t(De, {}),
1495
+ startIcon: /* @__PURE__ */ t(Re, {}),
1486
1496
  disabled: f,
1487
- onClick: () => void _t(),
1497
+ onClick: () => void Ht(),
1488
1498
  children: f ? "Cancelling…" : "Cancel Request"
1489
1499
  })
1490
1500
  }) : null,
1491
- a.approvedPurchaseId ? /* @__PURE__ */ n(Be, {
1501
+ i.approvedPurchaseId ? /* @__PURE__ */ n(Pe, {
1492
1502
  severity: "success",
1493
1503
  sx: { mt: 2 },
1494
1504
  children: [
1495
1505
  "Stock was added to inventory under purchase id ",
1496
- /* @__PURE__ */ t("strong", { children: a.approvedPurchaseId }),
1506
+ /* @__PURE__ */ t("strong", { children: i.approvedPurchaseId }),
1497
1507
  "."
1498
1508
  ]
1499
1509
  }) : null
@@ -1501,14 +1511,14 @@ function Zr() {
1501
1511
  })
1502
1512
  })
1503
1513
  ] }) : null]
1504
- }), /* @__PURE__ */ n(pr, {
1505
- open: Rt,
1514
+ }), /* @__PURE__ */ n(br, {
1515
+ open: $t,
1506
1516
  onClose: () => f ? null : te(!1),
1507
1517
  fullWidth: !0,
1508
1518
  maxWidth: "xs",
1509
1519
  children: [
1510
- /* @__PURE__ */ t(yr, { children: "Reject this request?" }),
1511
- /* @__PURE__ */ t(br, {
1520
+ /* @__PURE__ */ t(fr, { children: "Reject this request?" }),
1521
+ /* @__PURE__ */ t(xr, {
1512
1522
  dividers: !0,
1513
1523
  children: /* @__PURE__ */ t(d, {
1514
1524
  variant: "body2",
@@ -1516,14 +1526,14 @@ function Zr() {
1516
1526
  children: "Every item will be rejected and no stock will be received. This closes the request."
1517
1527
  })
1518
1528
  }),
1519
- /* @__PURE__ */ n(fr, { children: [/* @__PURE__ */ t(q, {
1529
+ /* @__PURE__ */ n(gr, { children: [/* @__PURE__ */ t(D, {
1520
1530
  onClick: () => te(!1),
1521
1531
  disabled: f,
1522
1532
  children: "Cancel"
1523
- }), /* @__PURE__ */ t(q, {
1533
+ }), /* @__PURE__ */ t(D, {
1524
1534
  variant: "contained",
1525
1535
  color: "error",
1526
- startIcon: /* @__PURE__ */ t(De, {}),
1536
+ startIcon: /* @__PURE__ */ t(Re, {}),
1527
1537
  disabled: f,
1528
1538
  onClick: () => void Yt(),
1529
1539
  children: f ? "Rejecting…" : "Reject Request"
@@ -1532,7 +1542,7 @@ function Zr() {
1532
1542
  })]
1533
1543
  })] });
1534
1544
  }
1535
- function Re({ children: g }) {
1545
+ function we({ children: g }) {
1536
1546
  return /* @__PURE__ */ t(d, {
1537
1547
  variant: "caption",
1538
1548
  color: "text.secondary",
@@ -1546,8 +1556,8 @@ function Re({ children: g }) {
1546
1556
  children: g
1547
1557
  });
1548
1558
  }
1549
- function M({ label: g, children: z }) {
1550
- return /* @__PURE__ */ n(m, {
1559
+ function j({ label: g, children: P }) {
1560
+ return /* @__PURE__ */ n(p, {
1551
1561
  direction: "row",
1552
1562
  spacing: 1,
1553
1563
  sx: { minWidth: 0 },
@@ -1567,11 +1577,11 @@ function M({ label: g, children: z }) {
1567
1577
  minWidth: 0,
1568
1578
  fontWeight: 700
1569
1579
  },
1570
- children: z
1580
+ children: P
1571
1581
  })]
1572
1582
  });
1573
1583
  }
1574
1584
  export {
1575
- Zr as default
1585
+ ta as default
1576
1586
  };
1577
- //# sourceMappingURL=PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map
1587
+ //# sourceMappingURL=PurchaseRequestDetailPage-DhBuOGHZ-CAmlL4fP.js.map