@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,776 +0,0 @@
1
- import { jsxs as l, jsx as a, Fragment as A } from "react/jsx-runtime";
2
- import { useRef as X, useState as J, useEffect as he } from "react";
3
- import { Modal as ge, Box as H, IconButton as fe, FormControl as y, FormGroup as pe, Button as Q } from "@mui/material";
4
- import ye from "@/hooks/useTrackEvent";
5
- import { a as be, b as ve, c as we } from "./Roles-BIyiic67.js";
6
- import { getRoleList as Ne, getLocationTypes as Te, execute as O } from "@/common/services/GlobalApis";
7
- import { showToast as j } from "@/common/toaster/toaster";
8
- import { useForm as Ie } from "react-hook-form";
9
- import { yupResolver as xe } from "@hookform/resolvers/yup";
10
- import "@/assets/scss/scrollBar.scss";
11
- import { FormItem as d } from "@/views/custom-components/FormItem.jsx";
12
- import * as b from "yup";
13
- import W from "@/views/custom-components/CustomTextField";
14
- import Z from "@/views/custom-components/CustomDropdown";
15
- import $ from "@/views/custom-components/CustomCheckBox";
16
- import x from "@/views/custom-components/CustomAutoComplete";
17
- import { useTranslateProvider as Re } from "@/common/languageTranslator/TranslationContext";
18
- import { FontAwesomeIcon as Me } from "@fortawesome/react-fontawesome";
19
- import { faXmark as Be } from "@fortawesome/free-solid-svg-icons";
20
- import qe from "@/common/services/util/GeneralUtil";
21
- import f from "@/common/config/implementationConfig";
22
- import v from "prop-types";
23
- import z from "@/views/custom-components/CustomToggleSwitch";
24
- import { useSelector as Ce } from "react-redux";
25
- import { getUseSkeleton as Fe } from "@/store/reducers/SkeletonReducer";
26
- const ee = ({ children: N, isLoading: p }) => !Ce(Fe) || !p ? N : /* @__PURE__ */ l("div", { className: "pt-6 h-[88vh]", children: [
27
- /* @__PURE__ */ l("div", { className: "px-8 pt-2 pb-4 flex items-center justify-between", children: [
28
- /* @__PURE__ */ a("div", { className: "bg-gray-300 animate-pulse rounded-md w-32 h-8" }),
29
- /* @__PURE__ */ a("div", { className: "bg-gray-300 animate-pulse rounded-full w-10 h-10" })
30
- ] }),
31
- /* @__PURE__ */ l("div", { className: "px-8 pb-8 space-y-6 overflow-y-auto max-h-[80vh]", children: [
32
- /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [1, 2, 3].map((u) => /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
33
- /* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
34
- /* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
35
- ] }, u)) }),
36
- /* @__PURE__ */ a("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */ l("div", { className: "w-full", children: [
37
- /* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
38
- /* @__PURE__ */ a("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
39
- ] }) }),
40
- /* @__PURE__ */ l("div", { className: "space-y-4", children: [
41
- [1, 2].map((u) => /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
42
- /* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
43
- /* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
44
- ] }, u)),
45
- /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [1, 2].map((u) => /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
46
- /* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
47
- /* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
48
- ] }, u)) }),
49
- [1, 2].map((u) => /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
50
- /* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
51
- /* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
52
- ] }, u))
53
- ] }),
54
- /* @__PURE__ */ l("div", { className: "flex items-center gap-6", children: [
55
- /* @__PURE__ */ l("div", { className: "w-[60%]", children: [
56
- /* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
57
- /* @__PURE__ */ a("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
58
- ] }),
59
- /* @__PURE__ */ l("div", { className: "w-[40%] flex items-center gap-2", children: [
60
- /* @__PURE__ */ a("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
61
- /* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 animate-pulse" })
62
- ] })
63
- ] }),
64
- /* @__PURE__ */ l("div", { className: "space-y-2", children: [
65
- /* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
66
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4", children: [1, 2, 3, 4].map((u) => /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
67
- /* @__PURE__ */ a("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
68
- /* @__PURE__ */ a("div", { className: "h-4 w-16 bg-gray-300 rounded animate-pulse" })
69
- ] }, u)) })
70
- ] })
71
- ] }),
72
- /* @__PURE__ */ l("div", { className: "flex items-center justify-end gap-3 pt-6 px-8 pb-4 border-t border-slate-100", children: [
73
- /* @__PURE__ */ a("div", { className: "h-9 w-20 bg-gray-300 rounded animate-pulse" }),
74
- /* @__PURE__ */ a("div", { className: "h-9 w-24 bg-gray-300 rounded animate-pulse" })
75
- ] })
76
- ] });
77
- ee.propTypes = {
78
- children: v.any,
79
- isLoading: v.any
80
- };
81
- const ke = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], Le = [
82
- { label: "Authenticator App", value: "AUTHENTICATOR_APP" }
83
- ], Se = ({
84
- selectedId: N,
85
- isUpdate: p,
86
- open: q,
87
- setOpen: u,
88
- isRoleListModified: ae
89
- }) => {
90
- const G = X(null), V = X(!1), S = ye(), [w, U] = J({}), [te, D] = J(!1), le = b.object().shape({
91
- name: b.string().required("Enter Role Name"),
92
- locationTypes: b.array().when("isLocationRequired", {
93
- is: !0,
94
- then: (e) => e.min(1, "Select Location Type").required("Select Location Type"),
95
- otherwise: (e) => e.notRequired()
96
- }),
97
- roleType: f.role.showRoleType ? b.string().required("Select Role Type") : b.string().notRequired(),
98
- isBankDetailsRequired: f.role.showBankDetailsRequired ? b.boolean().nullable().defined("Please Select a Value") : b.boolean().notRequired(),
99
- healthInfrastructureIds: b.array().when("isHealthInfraMandatory", {
100
- is: !0,
101
- then: (e) => e.min(1, "Select Health Infrastructure Type").required("Select Health Infrastructure Type"),
102
- otherwise: (e) => e.notRequired()
103
- }),
104
- twoFactorType: b.string().when("isTwoFactorEnabled", {
105
- is: !0,
106
- then: (e) => e.required("Select Authentication Method"),
107
- otherwise: (e) => e.notRequired().nullable()
108
- })
109
- }), {
110
- control: n,
111
- handleSubmit: oe,
112
- formState: { errors: c, isSubmitting: re },
113
- setValue: h,
114
- // getValues,
115
- watch: T,
116
- reset: se
117
- } = Ie({
118
- defaultValues: {
119
- name: "",
120
- locationTypes: [],
121
- maxPosition: "",
122
- maxHealthInfra: "",
123
- roleType: "",
124
- isLastNameMandatory: !1,
125
- isAadharNumMandatory: !1,
126
- isEmailMandatory: !1,
127
- isContactNumMandatory: !1,
128
- isConvoxIdMandatory: !1,
129
- isHealthInfraMandatory: !1,
130
- isGeolocationMandatory: !1,
131
- roleIds: [],
132
- canManageRoleIds: [],
133
- manageByTeamTypeIds: [],
134
- canSelfManage: !1,
135
- healthInfrastructureIds: [],
136
- categoryIds: [],
137
- isBankDetailsRequired: !1,
138
- isBankDetailsMandatory: !1,
139
- isTwoFactorEnabled: !1,
140
- twoFactorType: "",
141
- id: "",
142
- code: "",
143
- description: "",
144
- createdBy: "",
145
- state: "",
146
- createdOn: "",
147
- assignedFeatureList: "",
148
- assignedFeatures: "",
149
- isSmagTrainedMandatory: "",
150
- isLocationRequired: !0,
151
- isNodalMandatory: !1
152
- },
153
- resolver: xe(le),
154
- mode: "onChange",
155
- shouldUnregister: !1
156
- }), ne = T("isBankDetailsRequired"), ie = T("isTwoFactorEnabled"), Y = T("roleType"), de = Y === "WEB" || Y === "BOTH", _ = T("locationTypes"), { translate: E } = Re(), ce = T("isLocationRequired"), me = T("isHealthInfraMandatory"), P = [
157
- { label: "Email", value: "isEmailMandatory" },
158
- { label: "Aadhar Number", value: "isAadharNumMandatory" },
159
- { label: "Contact Number", value: "isContactNumMandatory" },
160
- { label: "Convox Id", value: "isConvoxIdMandatory" },
161
- { label: "Last Name", value: "isLastNameMandatory" },
162
- { label: "Health Infrastructure", value: "isHealthInfraMandatory" },
163
- { label: "GeoLocation", value: "isGeolocationMandatory" },
164
- { label: "Smag Trained", value: "isSmagTrainedMandatory" },
165
- { label: "Nodal", value: "isNodalMandatory" },
166
- { label: "PFMS Code", value: "isPfmsCodeMandatory" },
167
- { label: "SNA Beneficiary ID", value: "isSnaBeneficiaryIdMandatory" }
168
- ].filter((e) => {
169
- var t;
170
- return ((t = f.role.mandatoryFieldsToExclude) == null ? void 0 : t.length) > 0 ? !f.role.mandatoryFieldsToExclude.includes(e.value) : !0;
171
- }), C = () => {
172
- u(0), se(), S("conversion_event", {
173
- form: G.current,
174
- form_name: "Manage Role",
175
- submit: V.current
176
- }), S("button_click", {
177
- button_name: "add role close button",
178
- button_type: "cancel",
179
- button_id: "managerole-close-button"
180
- });
181
- }, I = (e, t, i) => {
182
- h(i, t);
183
- }, ue = async (e) => {
184
- var t, i;
185
- try {
186
- S("button_click", {
187
- button_name: p ? "update role button" : "add role button",
188
- button_type: "submit",
189
- button_id: "managerole-add-button"
190
- }), delete e.bankDetailsRequired, delete e.bankDetailsMandatory, e.roleType !== "WEB" && e.roleType !== "BOTH" && (e.isTwoFactorEnabled = !1), e.isTwoFactorEnabled ? e.twoFactorType || (e.twoFactorType = "AUTHENTICATOR_APP") : e.twoFactorType = null, p || (delete e.id, delete e.state, delete e.createdOn, delete e.createdBy, delete e.code, delete e.description, delete e.assignedFeatures, delete e.assignedFeatureList), e.roleIds = e.roleIds.map((o) => o == null ? void 0 : o.id), e.canManageRoleIds = e.canManageRoleIds.map((o) => o == null ? void 0 : o.id), e.manageByTeamTypeIds = e.manageByTeamTypeIds.map(
191
- (o) => o == null ? void 0 : o.id
192
- ), e.healthInfrastructureIds = e.healthInfrastructureIds.map(
193
- (o) => o == null ? void 0 : o.id
194
- ), e.categoryIds = e.categoryIds.map((o) => o == null ? void 0 : o.id), e.locationTypes = e.isLocationRequired === !0 ? e.locationTypes : [], delete e.isLocationRequired, e.manageByRoleIds = e.roleIds, p ? await ve(e) : await we(e), j({
195
- type: "success",
196
- message: `Role ${p ? "Updated" : "Added"} Successfully`
197
- }), V.current = !0, C(), ae();
198
- } catch (o) {
199
- j({
200
- type: "error",
201
- message: `Role Cannot be added: ${(i = (t = o == null ? void 0 : o.response) == null ? void 0 : t.data) == null ? void 0 : i.message}`
202
- });
203
- }
204
- };
205
- return he(() => {
206
- (async () => {
207
- try {
208
- D((i) => !i);
209
- const t = qe.getEnv();
210
- if (q !== 0) {
211
- const [i, o, F, k, L] = await Promise.all([
212
- Ne(),
213
- Te(),
214
- O({
215
- code: "team_all_types_for_roles",
216
- parameters: {}
217
- }),
218
- O({
219
- code: "retrieve_field_values_for_form_field",
220
- parameters: {
221
- form: "WEB",
222
- fieldKey: "role_catg"
223
- }
224
- }),
225
- O({
226
- code: "retrieve_field_values_for_form_field",
227
- parameters: {
228
- form: "WEB",
229
- fieldKey: "infra_type"
230
- }
231
- })
232
- ]);
233
- if (U((g) => {
234
- var R, M, B;
235
- return {
236
- ...g,
237
- roles: i.data,
238
- locationData: o.data,
239
- manageTeam: (R = F == null ? void 0 : F.data) == null ? void 0 : R.result,
240
- category: (M = k == null ? void 0 : k.data) == null ? void 0 : M.result,
241
- healthInfraType: (B = L == null ? void 0 : L.data) == null ? void 0 : B.result
242
- };
243
- }), N) {
244
- const { data: g } = await be(N);
245
- U((r) => ({ ...r, roleData: g, env: t })), Object.keys(g).map((r) => h(r, g[r])), h("isBankDetailsRequired", g.isBankDetailsRequired), h("isBankDetailsMandatory", g.isBankDetailsMandatory);
246
- const {
247
- manageByTeamTypeIds: R,
248
- healthInfrastructureIds: M,
249
- roleIds: B,
250
- categoryIds: K
251
- } = g;
252
- h(
253
- "manageByTeamTypeIds",
254
- R ? R.map(
255
- (r) => {
256
- var m;
257
- return (m = F.data.result) == null ? void 0 : m.find((s) => (s == null ? void 0 : s.id) === r);
258
- }
259
- ) : []
260
- ), h(
261
- "healthInfrastructureIds",
262
- M ? M.map(
263
- (r) => {
264
- var m;
265
- return (m = L.data.result) == null ? void 0 : m.find(
266
- (s) => (s == null ? void 0 : s.id) === r
267
- );
268
- }
269
- ).filter((r) => r !== void 0) : []
270
- ), h(
271
- "categoryIds",
272
- K ? K.map(
273
- (r) => {
274
- var m;
275
- return (m = k.data.result) == null ? void 0 : m.find((s) => (s == null ? void 0 : s.id) === r);
276
- }
277
- ) : []
278
- ), h(
279
- "roleIds",
280
- B ? B.map((r) => {
281
- var m;
282
- return (m = i.data) == null ? void 0 : m.find((s) => (s == null ? void 0 : s.id) === r);
283
- }).filter((r) => r !== void 0) : []
284
- ), h(
285
- "canManageRoleIds",
286
- g.canManageRoleIds ? g.canManageRoleIds.map((r) => {
287
- var m;
288
- return (m = i.data) == null ? void 0 : m.find((s) => (s == null ? void 0 : s.id) === r);
289
- }).filter((r) => r !== void 0) : []
290
- ), g.locationTypes.length > 0 ? h("isLocationRequired", !0) : h("isLocationRequired", !1);
291
- }
292
- }
293
- D((i) => !i);
294
- } catch (t) {
295
- j({
296
- message: `Error in manage role :${t == null ? void 0 : t.message}`,
297
- type: "error"
298
- }), D((i) => !i);
299
- }
300
- })();
301
- }, [N, q]), /* @__PURE__ */ a(
302
- ge,
303
- {
304
- open: q !== 0,
305
- onClose: C,
306
- "data-testid": "managerole-modal",
307
- children: /* @__PURE__ */ a("div", { className: "mt-10 fixed inset-0 z-[100] flex items-center justify-center p-4 animate-in fade-in duration-200", children: /* @__PURE__ */ a(
308
- H,
309
- {
310
- className: "w-full max-w-2xl rounded-[2.5rem] shadow-2xl shadow-blue-900/10 overflow-hidden flex flex-col animate-in zoom-in-95 duration-300",
311
- sx: { bgcolor: (e) => e.palette.custom.customBackground },
312
- children: /* @__PURE__ */ l(ee, { isLoading: te, children: [
313
- /* @__PURE__ */ l("div", { className: "px-8 pt-8 pb-4 flex items-center justify-between", children: [
314
- /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
315
- H,
316
- {
317
- component: "h2",
318
- className: "text-2xl font-bold text-customBlue",
319
- sx: { color: "text.primary" },
320
- children: p ? "Update Role" : "Add New Role"
321
- }
322
- ) }),
323
- /* @__PURE__ */ a(
324
- fe,
325
- {
326
- size: "small",
327
- onClick: C,
328
- className: "w-10 h-10 rounded-full bg-slate-100 flex items-center justify-center text-slate-400 hover:bg-slate-200 hover:text-slate-600 transition-all",
329
- "data-testid": "managerole-close-icon",
330
- children: /* @__PURE__ */ a(Me, { icon: Be, size: "lg" })
331
- }
332
- )
333
- ] }),
334
- /* @__PURE__ */ l(
335
- "form",
336
- {
337
- onSubmit: oe(ue),
338
- ref: G,
339
- className: "px-8 pb-8 space-y-6 overflow-y-auto max-h-[80vh]",
340
- children: [
341
- /* @__PURE__ */ l("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
342
- /* @__PURE__ */ a(y, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(d, { label: "Role Name", children: /* @__PURE__ */ a(
343
- W,
344
- {
345
- placeholder: "Role Name",
346
- name: "name",
347
- id: "name",
348
- errors: c,
349
- control: n,
350
- dataTestId: "managerole-role-name-field"
351
- }
352
- ) }) }) }),
353
- /* @__PURE__ */ a(y, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
354
- d,
355
- {
356
- label: "Max Position",
357
- tooltip: "This is the maximum no of users that can be created at one location of this role type",
358
- children: /* @__PURE__ */ a(
359
- W,
360
- {
361
- name: "maxPosition",
362
- id: "maxPosition",
363
- errors: c,
364
- control: n,
365
- rules: {
366
- maxLength: 3,
367
- pattern: /^\d{1,3}$/
368
- },
369
- inputProps: {
370
- maxLength: 3,
371
- inputMode: "numeric",
372
- pattern: "[0-9]*",
373
- onInput: (e) => {
374
- e.target.value = e.target.value.replace(/\D/g, "");
375
- }
376
- },
377
- dataTestId: "managerole-max-position-field"
378
- }
379
- )
380
- }
381
- ) }) }),
382
- f.role.showMaxHealthData && /* @__PURE__ */ a(y, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(d, { label: "Max Health Infrastructure", children: /* @__PURE__ */ a(
383
- W,
384
- {
385
- name: "maxHealthInfra",
386
- id: "maxHealthInfra",
387
- control: n,
388
- errors: c,
389
- rules: {
390
- maxLength: 3,
391
- pattern: /^\d{1,3}$/
392
- },
393
- inputProps: {
394
- maxLength: 3,
395
- inputMode: "numeric",
396
- pattern: "[0-9]*",
397
- onInput: (e) => {
398
- e.target.value = e.target.value.replace(
399
- /\D/g,
400
- ""
401
- );
402
- }
403
- },
404
- dataTestId: "managerole-max-health-infra-field"
405
- }
406
- ) }) }) })
407
- ] }),
408
- /* @__PURE__ */ a("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */ a(
409
- y,
410
- {
411
- variant: "outlined",
412
- className: "flex flex-row items-center w-full ",
413
- children: /* @__PURE__ */ a(
414
- d,
415
- {
416
- label: "Location Required",
417
- required: !0,
418
- direction: "row",
419
- children: /* @__PURE__ */ a(
420
- z,
421
- {
422
- control: n,
423
- name: "isLocationRequired",
424
- options: [
425
- { label: "Yes", value: !0 },
426
- { label: "No", value: !1 }
427
- ],
428
- errors: c
429
- }
430
- )
431
- }
432
- )
433
- }
434
- ) }),
435
- /* @__PURE__ */ l("div", { className: "space-y-4", children: [
436
- (ce === !0 || re) && /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
437
- d,
438
- {
439
- label: "Location",
440
- required: !0,
441
- tooltip: "The OU level where users of this role perform their job function",
442
- children: /* @__PURE__ */ a(
443
- x,
444
- {
445
- id: "locationTypes",
446
- control: n,
447
- name: "locationTypes",
448
- options: w.locationData,
449
- value: _ == null ? void 0 : _.map(
450
- (e) => {
451
- var t;
452
- return (t = w.locationData) == null ? void 0 : t.find(
453
- (i) => i.type === (e == null ? void 0 : e.type)
454
- );
455
- }
456
- ),
457
- errors: c,
458
- getOptionLabel: (e) => e == null ? void 0 : e.name,
459
- dataTestId: "managerole-location-type-select",
460
- checkEquality: "type",
461
- onChange: (e, t) => I(e, t, "locationTypes")
462
- }
463
- )
464
- }
465
- ) }) }),
466
- /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
467
- d,
468
- {
469
- label: "Can Manage Role",
470
- tooltip: "Please select the roles that shall be managed by this role",
471
- children: /* @__PURE__ */ a(
472
- x,
473
- {
474
- name: "roleIds",
475
- id: "roleIds",
476
- errors: c,
477
- control: n,
478
- dataTestId: "managerole-manage-role-select",
479
- options: w.roles,
480
- onChange: (e, t) => I(e, t, "roleIds"),
481
- getOptionLabel: (e) => e == null ? void 0 : e.name
482
- }
483
- )
484
- }
485
- ) }),
486
- f.role.showManagedFrom && /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
487
- d,
488
- {
489
- label: "Managed From",
490
- tooltip: "Please select the roles that can manage this role",
491
- children: /* @__PURE__ */ a(
492
- x,
493
- {
494
- name: "canManageRoleIds",
495
- id: "canManageRoleIds",
496
- errors: c,
497
- control: n,
498
- dataTestId: "managerole-managed-by-role-select",
499
- options: w.roles,
500
- onChange: (e, t) => I(e, t, "canManageRoleIds"),
501
- getOptionLabel: (e) => e == null ? void 0 : e.name
502
- }
503
- )
504
- }
505
- ) }),
506
- /* @__PURE__ */ l("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
507
- f.role.showRoleType && /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
508
- d,
509
- {
510
- label: "Role Type",
511
- tooltip: "Please select Role Type",
512
- required: !0,
513
- children: /* @__PURE__ */ a(
514
- Z,
515
- {
516
- control: n,
517
- id: "roleType",
518
- name: "roleType",
519
- options: ke,
520
- displayName: "name",
521
- optionValue: "name",
522
- errors: c,
523
- dataTestId: "managerole-role-type-dropdown"
524
- }
525
- )
526
- }
527
- ) }),
528
- f.role.showCanManageTeam && /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
529
- d,
530
- {
531
- label: "Can Manage Team",
532
- tooltip: "Please select the teams that shall be managed by this role",
533
- children: /* @__PURE__ */ a(
534
- x,
535
- {
536
- control: n,
537
- name: "manageByTeamTypeIds",
538
- id: "manageByTeamTypeIds",
539
- errors: c,
540
- options: w.manageTeam,
541
- dataTestId: "managerole-manage-team-select",
542
- onChange: (e, t) => I(e, t, "manageByTeamTypeIds"),
543
- getOptionLabel: (e) => e == null ? void 0 : e.type
544
- }
545
- )
546
- }
547
- ) })
548
- ] }),
549
- /* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
550
- d,
551
- {
552
- label: "Select Health Infrastructure type",
553
- tooltip: "Please select the institute to be associated with the role",
554
- required: me,
555
- children: /* @__PURE__ */ a(
556
- x,
557
- {
558
- options: w.healthInfraType,
559
- errors: c,
560
- name: "healthInfrastructureIds",
561
- id: "healthInfrastructureIds",
562
- dataTestId: "managerole-health-infrastructure-select",
563
- control: n,
564
- onChange: (e, t) => I(e, t, "healthInfrastructureIds"),
565
- getOptionLabel: (e) => e == null ? void 0 : e.value
566
- }
567
- )
568
- }
569
- ) }) }),
570
- f.role.showCategoryIds && /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
571
- d,
572
- {
573
- label: "Category",
574
- tooltip: "Please select the category to be associated with the role",
575
- children: /* @__PURE__ */ a(
576
- x,
577
- {
578
- id: "categoryIds",
579
- name: "categoryIds",
580
- errors: c,
581
- options: w.category,
582
- dataTestId: "managerole-role-category-select",
583
- control: n,
584
- onChange: (e, t) => I(e, t, "categoryIds"),
585
- getOptionLabel: (e) => e == null ? void 0 : e.value
586
- }
587
- )
588
- }
589
- ) }) }) })
590
- ] }),
591
- /* @__PURE__ */ l("div", { className: "flex items-center gap-6", children: [
592
- f.role.showBankDetailsRequired && /* @__PURE__ */ a(
593
- y,
594
- {
595
- variant: "outlined",
596
- className: "flex flex-row items-center w-[60%] ",
597
- children: /* @__PURE__ */ a(
598
- d,
599
- {
600
- label: "Bank Details Required",
601
- tooltip: "Select if bank details are required for this role",
602
- required: !0,
603
- labelWidth: "50%",
604
- childrenWidth: "50%",
605
- direction: "row",
606
- children: /* @__PURE__ */ a(
607
- z,
608
- {
609
- control: n,
610
- name: "isBankDetailsRequired",
611
- options: [
612
- { label: "Yes", value: !0 },
613
- { label: "No", value: !1 }
614
- ],
615
- errors: c
616
- }
617
- )
618
- }
619
- )
620
- }
621
- ),
622
- !p && /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(y, { variant: "outlined ", className: "w-[40%]", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
623
- /* @__PURE__ */ a("label", { className: "text-sm font-medium text-gray-700", children: "Self Manage" }),
624
- /* @__PURE__ */ a(
625
- $,
626
- {
627
- name: "canSelfManage",
628
- control: n,
629
- isFullWidth: !1,
630
- "data-testid": "managerole-self-manage-checkbox"
631
- }
632
- )
633
- ] }) }) })
634
- ] }),
635
- de && /* @__PURE__ */ l("div", { className: "flex items-center gap-6 w-full", children: [
636
- /* @__PURE__ */ a(
637
- y,
638
- {
639
- variant: "outlined",
640
- className: "flex flex-row items-center w-[50%]",
641
- children: /* @__PURE__ */ a(
642
- d,
643
- {
644
- label: "Two-Factor Authentication",
645
- tooltip: "Require users of this role to use a two-factor authentication app",
646
- labelWidth: "60%",
647
- childrenWidth: "40%",
648
- direction: "row",
649
- children: /* @__PURE__ */ a(
650
- z,
651
- {
652
- control: n,
653
- name: "isTwoFactorEnabled",
654
- options: [
655
- { label: "Yes", value: !0 },
656
- { label: "No", value: !1 }
657
- ],
658
- errors: c
659
- }
660
- )
661
- }
662
- )
663
- }
664
- ),
665
- ie === !0 && /* @__PURE__ */ a(y, { variant: "outlined", className: "w-[50%]", children: /* @__PURE__ */ a(
666
- d,
667
- {
668
- label: "Authentication Method",
669
- tooltip: "Select which authentication method users of this role will use",
670
- required: !0,
671
- children: /* @__PURE__ */ a(
672
- Z,
673
- {
674
- control: n,
675
- id: "twoFactorType",
676
- name: "twoFactorType",
677
- options: Le,
678
- displayName: "label",
679
- optionValue: "value",
680
- errors: c,
681
- dataTestId: "managerole-two-factor-type-dropdown"
682
- }
683
- )
684
- }
685
- ) })
686
- ] }),
687
- /* @__PURE__ */ a("div", { className: "flex items-center gap-6", children: /* @__PURE__ */ a(
688
- y,
689
- {
690
- variant: "outlined",
691
- className: "flex flex-col items-start justify-between",
692
- children: /* @__PURE__ */ a(
693
- d,
694
- {
695
- label: "Mandatory Fields",
696
- tooltip: "These fields are Mandatory when creating users of this role type",
697
- children: /* @__PURE__ */ l(pe, { row: !0, children: [
698
- P == null ? void 0 : P.map((e) => /* @__PURE__ */ a(
699
- $,
700
- {
701
- control: n,
702
- name: e.value,
703
- label: e.label,
704
- isFullWidth: !1,
705
- "data-testid": `managerole-mandatory-field-${e.value}`
706
- },
707
- e.value
708
- )),
709
- ne === !0 && /* @__PURE__ */ a(
710
- $,
711
- {
712
- name: "isBankDetailsMandatory",
713
- control: n,
714
- label: "Bank Details",
715
- isFullWidth: !1,
716
- "data-testid": "managerole-bank-details-mandatory-checkbox"
717
- }
718
- )
719
- ] })
720
- }
721
- )
722
- }
723
- ) }),
724
- /* @__PURE__ */ l(
725
- H,
726
- {
727
- className: "flex items-center justify-end gap-3 pt-6 border-t",
728
- sx: { borderColor: "divider" },
729
- children: [
730
- /* @__PURE__ */ a(
731
- Q,
732
- {
733
- variant: "contained",
734
- color: "secondary",
735
- size: "small",
736
- onClick: C,
737
- "data-testid": "managerole-close-button",
738
- children: E("Close")
739
- }
740
- ),
741
- /* @__PURE__ */ a(
742
- Q,
743
- {
744
- variant: "contained",
745
- color: "primary",
746
- size: "small",
747
- type: "submit",
748
- "data-testid": "managerole-submit-button",
749
- children: p ? `${E("Update Role")}` : `${E("Add Role")}`
750
- }
751
- )
752
- ]
753
- }
754
- )
755
- ]
756
- }
757
- )
758
- ] })
759
- }
760
- ) })
761
- }
762
- );
763
- };
764
- Se.propTypes = {
765
- isUpdate: v.bool,
766
- role: v.object,
767
- onClose: v.func,
768
- open: v.bool,
769
- setOpen: v.func,
770
- selectedId: v.string,
771
- isRoleListModified: v.bool
772
- };
773
- export {
774
- Se as default
775
- };
776
- //# sourceMappingURL=ManageRole-CNZBRKGU.js.map