@argusoft/medplat-core 1.0.30 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/{AccessRights-xrday-L1.js → AccessRights-DBjTQA1-.js} +395 -390
  2. package/dist/AccessRights-DBjTQA1-.js.map +1 -0
  3. package/dist/{AddFeatures-D1sU8RjY.js → AddFeatures-COj4ZTIM.js} +2 -2
  4. package/dist/{AddFeatures-D1sU8RjY.js.map → AddFeatures-COj4ZTIM.js.map} +1 -1
  5. package/dist/AddMenuConfiguration-Creeib5X.js +11223 -0
  6. package/dist/AddMenuConfiguration-Creeib5X.js.map +1 -0
  7. package/dist/AddMenuConfiguration.css +1 -1
  8. package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js → BrandsPage-CdcAvaml-ZtVTX6vX.js} +43 -43
  9. package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js.map → BrandsPage-CdcAvaml-ZtVTX6vX.js.map} +1 -1
  10. package/dist/{CategoriesPage-BsS5IQh3-B03lWRY5.js → CategoriesPage-BprQEYJw-CclreTv1.js} +109 -102
  11. package/dist/CategoriesPage-BprQEYJw-CclreTv1.js.map +1 -0
  12. package/dist/{ChangePasswordModalCore-BPsJquTS.js → ChangePasswordModalCore-DZGOkbRY.js} +3 -3
  13. package/dist/{ChangePasswordModalCore-BPsJquTS.js.map → ChangePasswordModalCore-DZGOkbRY.js.map} +1 -1
  14. package/dist/ConditionConfig-Bpm6OoV5.js +408 -0
  15. package/dist/ConditionConfig-Bpm6OoV5.js.map +1 -0
  16. package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js → DashboardPage-CTiGSx71-CsYohJ5e.js} +32 -32
  17. package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js.map → DashboardPage-CTiGSx71-CsYohJ5e.js.map} +1 -1
  18. package/dist/EntityManagement-BGwJGl9k.js +62 -0
  19. package/dist/EntityManagement-BGwJGl9k.js.map +1 -0
  20. package/dist/EventConfig-BY2cgGyx.js +27 -0
  21. package/dist/{EventConfig-BmLemzX3.js.map → EventConfig-BY2cgGyx.js.map} +1 -1
  22. package/dist/EventConfigurations-B-z7xHh_.js +544 -0
  23. package/dist/EventConfigurations-B-z7xHh_.js.map +1 -0
  24. package/dist/EventConfigurations.css +1 -1
  25. package/dist/EventsExceptionModal-DafomIv6.js +188 -0
  26. package/dist/EventsExceptionModal-DafomIv6.js.map +1 -0
  27. package/dist/EventsUi-Dl_yckSA.js +263 -0
  28. package/dist/EventsUi-Dl_yckSA.js.map +1 -0
  29. package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js +112 -0
  30. package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js.map +1 -0
  31. package/dist/{FeatureMenu-DYJmDt7q.js → FeatureMenu-Kc73yPHH.js} +9 -5
  32. package/dist/FeatureMenu-Kc73yPHH.js.map +1 -0
  33. package/dist/{FhirServerList-DuTwnngN.js → FhirServerList-CrIHMAxz.js} +16 -16
  34. package/dist/{FhirServerList-DuTwnngN.js.map → FhirServerList-CrIHMAxz.js.map} +1 -1
  35. package/dist/{FhirServerProfile-CUOwC6Wb.js → FhirServerProfile-D3aYcpwY.js} +8 -8
  36. package/dist/{FhirServerProfile-CUOwC6Wb.js.map → FhirServerProfile-D3aYcpwY.js.map} +1 -1
  37. package/dist/{FhirServerWizard-DZI8Olku.js → FhirServerWizard-Db6Hm4bQ.js} +15 -15
  38. package/dist/{FhirServerWizard-DZI8Olku.js.map → FhirServerWizard-Db6Hm4bQ.js.map} +1 -1
  39. package/dist/{GrantPermissionModal-BDN66Atn.js → GrantPermissionModal-D7iNZd0M.js} +54 -51
  40. package/dist/GrantPermissionModal-D7iNZd0M.js.map +1 -0
  41. package/dist/ImmunizationConfigurationBase-lKsJZMak.js +8060 -0
  42. package/dist/ImmunizationConfigurationBase-lKsJZMak.js.map +1 -0
  43. package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js +1017 -0
  44. package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js.map +1 -0
  45. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js +1344 -0
  46. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js.map +1 -0
  47. package/dist/{ManageDynamicFeature-BU0I45dd.js → ManageDynamicFeature-CuyYfx_P.js} +104 -97
  48. package/dist/ManageDynamicFeature-CuyYfx_P.js.map +1 -0
  49. package/dist/ManageEventConfiguration-DqPbn3Oi.js +1216 -0
  50. package/dist/ManageEventConfiguration-DqPbn3Oi.js.map +1 -0
  51. package/dist/ManageEventConfiguration.css +1 -1
  52. package/dist/ManageRole-CyfpySt9.js +981 -0
  53. package/dist/ManageRole-CyfpySt9.js.map +1 -0
  54. package/dist/{ManageUser-DCFkUMV9.js → ManageUser-Dm0l833u.js} +286 -286
  55. package/dist/{ManageUser-DCFkUMV9.js.map → ManageUser-Dm0l833u.js.map} +1 -1
  56. package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js → MemberProfileCard-01d_jz3w-DYHtbgMX.js} +46 -46
  57. package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js.map → MemberProfileCard-01d_jz3w-DYHtbgMX.js.map} +1 -1
  58. package/dist/MobileAnalytics-C9oc2yAo.js +18399 -0
  59. package/dist/MobileAnalytics-C9oc2yAo.js.map +1 -0
  60. package/dist/MobileMenuManagement-BmzTPXy7.js +231 -0
  61. package/dist/MobileMenuManagement-BmzTPXy7.js.map +1 -0
  62. package/dist/MobileTypeEventConfigModal-DodU3beR.js +752 -0
  63. package/dist/MobileTypeEventConfigModal-DodU3beR.js.map +1 -0
  64. package/dist/{NewServerManagement-Cxe0dV0O.js → NewServerManagement-BdayO78D.js} +368 -352
  65. package/dist/NewServerManagement-BdayO78D.js.map +1 -0
  66. package/dist/OtherTypeEventConfigModal-D_9S50aI.js +1414 -0
  67. package/dist/OtherTypeEventConfigModal-D_9S50aI.js.map +1 -0
  68. package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js} +58 -58
  69. package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js.map → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js.map} +1 -1
  70. package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js → PaymentsPage-CHieGNrn-BnYCtqHd.js} +37 -37
  71. package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js.map → PaymentsPage-CHieGNrn-BnYCtqHd.js.map} +1 -1
  72. package/dist/{PermissionsModal-CCYkcKlC.js → PermissionsModal-Dxbkkrqe.js} +18 -18
  73. package/dist/PermissionsModal-Dxbkkrqe.js.map +1 -0
  74. package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js} +2 -2
  75. package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js.map → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js.map} +1 -1
  76. package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js +801 -0
  77. package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js.map +1 -0
  78. package/dist/{PickupsPage-Ctpghavs-CUp4uIZq.js → PickupsPage-BWblMlic-CWkgeBw0.js} +132 -132
  79. package/dist/PickupsPage-BWblMlic-CWkgeBw0.js.map +1 -0
  80. package/dist/PmGuard-BvUUbU80-BpYNaDzl.js +641 -0
  81. package/dist/PmGuard-BvUUbU80-BpYNaDzl.js.map +1 -0
  82. package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js +1523 -0
  83. package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js.map +1 -0
  84. package/dist/{ProductsPage-CupVmOD4-D45a_hf-.js → ProductsPage-BI22nPb4-CQBjnc-n.js} +44 -43
  85. package/dist/ProductsPage-BI22nPb4-CQBjnc-n.js.map +1 -0
  86. package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js +724 -0
  87. package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js.map +1 -0
  88. package/dist/{PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js → PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js} +428 -418
  89. package/dist/PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js.map +1 -0
  90. package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js} +65 -65
  91. package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js.map → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js.map} +1 -1
  92. package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js → PurchasesPage-Djl1AqD_-DXeYFMrX.js} +55 -55
  93. package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js.map → PurchasesPage-Djl1AqD_-DXeYFMrX.js.map} +1 -1
  94. package/dist/{RoleManagement-s8iNx2Mu.js → RoleManagement-DVYufwy-.js} +3 -3
  95. package/dist/{RoleManagement-s8iNx2Mu.js.map → RoleManagement-DVYufwy-.js.map} +1 -1
  96. package/dist/Roles-BoNGJhtR.js +19 -0
  97. package/dist/Roles-BoNGJhtR.js.map +1 -0
  98. package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js → SaleCreatePage-DHBLmlBr-BlgjVsq6.js} +39 -39
  99. package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js.map → SaleCreatePage-DHBLmlBr-BlgjVsq6.js.map} +1 -1
  100. package/dist/{SalesPage-D18DCseD-BxktGDRQ.js → SalesPage-eF9Yr42z-BQ9FlXC3.js} +61 -61
  101. package/dist/{SalesPage-D18DCseD-BxktGDRQ.js.map → SalesPage-eF9Yr42z-BQ9FlXC3.js.map} +1 -1
  102. package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js +741 -0
  103. package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js.map +1 -0
  104. package/dist/{ShowFlywayQuery-D1y_4A1u.js → ShowFlywayQuery-DIOUdYfG.js} +26 -19
  105. package/dist/{ShowFlywayQuery-D1y_4A1u.js.map → ShowFlywayQuery-DIOUdYfG.js.map} +1 -1
  106. package/dist/{StorageUnitsPage-7EqwuMOI-BwUso1Th.js → StorageUnitsPage-CTEVuemZ-B4osG74N.js} +253 -223
  107. package/dist/StorageUnitsPage-CTEVuemZ-B4osG74N.js.map +1 -0
  108. package/dist/{SubMenu-eEDhZUvh.js → SubMenu-OO2zhKiu.js} +5 -3
  109. package/dist/SubMenu-OO2zhKiu.js.map +1 -0
  110. package/dist/{TableDetails-BtafRxXb.js → TableDetails-Cc40dEUs.js} +272 -267
  111. package/dist/TableDetails-Cc40dEUs.js.map +1 -0
  112. package/dist/{TableList-Dpo6dO7S.js → TableList-B5tX4wII.js} +316 -312
  113. package/dist/TableList-B5tX4wII.js.map +1 -0
  114. package/dist/{TransactionsPage-DrH53pVS-BkhIGB6C.js → TransactionsPage-Zuu7sjID-B-ACzvd1.js} +195 -180
  115. package/dist/TransactionsPage-Zuu7sjID-B-ACzvd1.js.map +1 -0
  116. package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js +635 -0
  117. package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js.map +1 -0
  118. package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js +600 -0
  119. package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js.map +1 -0
  120. package/dist/TypeConfiguration-EaFiOzRE.js +114 -0
  121. package/dist/TypeConfiguration-EaFiOzRE.js.map +1 -0
  122. package/dist/UserList-Cf5B-o_1.js +1904 -0
  123. package/dist/UserList-Cf5B-o_1.js.map +1 -0
  124. package/dist/Users-MC7txo1V.js +43 -0
  125. package/dist/{Users-Bpc4Sazd.js.map → Users-MC7txo1V.js.map} +1 -1
  126. package/dist/VaccineEducation-T_UE57Ef.js +231 -0
  127. package/dist/VaccineEducation-T_UE57Ef.js.map +1 -0
  128. package/dist/VaccineEducation.css +1 -0
  129. package/dist/VaccineEducationConfigurator-CWc20_rv.js +50948 -0
  130. package/dist/VaccineEducationConfigurator-CWc20_rv.js.map +1 -0
  131. package/dist/VaccineEducationConfigurator.css +4 -0
  132. package/dist/VaccineEducationList-Ok7_5EFb.js +334 -0
  133. package/dist/VaccineEducationList-Ok7_5EFb.js.map +1 -0
  134. package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js +457 -0
  135. package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js.map +1 -0
  136. package/dist/{constants-ClZJY2x1-MkSWn6TZ.js → constants-BTpJFQe_-CYPZIqQF.js} +166 -56
  137. package/dist/constants-BTpJFQe_-CYPZIqQF.js.map +1 -0
  138. package/dist/dashboardLayoutUtils--xUnoKPa.js +615 -0
  139. package/dist/dashboardLayoutUtils--xUnoKPa.js.map +1 -0
  140. package/dist/index-mfoqII2U.js +524 -0
  141. package/dist/index-mfoqII2U.js.map +1 -0
  142. package/dist/{index-D9YNFPn9.js → index-o8Pyt1Bt.js} +445 -439
  143. package/dist/index-o8Pyt1Bt.js.map +1 -0
  144. package/dist/index.css +1 -1
  145. package/dist/index.js +1 -1
  146. package/dist/index.lib-BySa9-Z-.js +936 -0
  147. package/dist/index.lib-BySa9-Z-.js.map +1 -0
  148. package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js +43 -0
  149. package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js.map +1 -0
  150. package/package.json +5 -1
  151. package/dist/AccessRights-xrday-L1.js.map +0 -1
  152. package/dist/AddMenuConfiguration-e5BVXhmw.js +0 -8547
  153. package/dist/AddMenuConfiguration-e5BVXhmw.js.map +0 -1
  154. package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js.map +0 -1
  155. package/dist/ConditionConfig-Ddz9halE.js +0 -395
  156. package/dist/ConditionConfig-Ddz9halE.js.map +0 -1
  157. package/dist/ConditionConfig.css +0 -1
  158. package/dist/EntityManagement-CPQL6qBj.js +0 -50
  159. package/dist/EntityManagement-CPQL6qBj.js.map +0 -1
  160. package/dist/EventConfig-BmLemzX3.js +0 -26
  161. package/dist/EventConfigurations-Bzh1qWXU.js +0 -450
  162. package/dist/EventConfigurations-Bzh1qWXU.js.map +0 -1
  163. package/dist/EventsExceptionModal-B2SRrnB1.js +0 -200
  164. package/dist/EventsExceptionModal-B2SRrnB1.js.map +0 -1
  165. package/dist/EventsSkeleton-BIcPks4T.js +0 -61
  166. package/dist/EventsSkeleton-BIcPks4T.js.map +0 -1
  167. package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js +0 -79
  168. package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js.map +0 -1
  169. package/dist/FeatureMenu-DYJmDt7q.js.map +0 -1
  170. package/dist/GrantPermissionModal-BDN66Atn.js.map +0 -1
  171. package/dist/ImmunizationConfigurationBase-Di1KO3oW.js +0 -7639
  172. package/dist/ImmunizationConfigurationBase-Di1KO3oW.js.map +0 -1
  173. package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js +0 -665
  174. package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js.map +0 -1
  175. package/dist/ManageDynamicFeature-BU0I45dd.js.map +0 -1
  176. package/dist/ManageEventConfiguration-CoYcpjR9.js +0 -1085
  177. package/dist/ManageEventConfiguration-CoYcpjR9.js.map +0 -1
  178. package/dist/ManageRole-CNZBRKGU.js +0 -776
  179. package/dist/ManageRole-CNZBRKGU.js.map +0 -1
  180. package/dist/MobileAnalytics-pQoE8cG1.js +0 -16888
  181. package/dist/MobileAnalytics-pQoE8cG1.js.map +0 -1
  182. package/dist/MobileMenuManagement-Cf8IZlla.js +0 -108
  183. package/dist/MobileMenuManagement-Cf8IZlla.js.map +0 -1
  184. package/dist/MobileTypeEventConfigModal-BeveaX0C.js +0 -783
  185. package/dist/MobileTypeEventConfigModal-BeveaX0C.js.map +0 -1
  186. package/dist/NewServerManagement-Cxe0dV0O.js.map +0 -1
  187. package/dist/OtherTypeEventConfigModal-CM6VkdmY.js +0 -2046
  188. package/dist/OtherTypeEventConfigModal-CM6VkdmY.js.map +0 -1
  189. package/dist/PermissionsModal-CCYkcKlC.js.map +0 -1
  190. package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js +0 -783
  191. package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js.map +0 -1
  192. package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js.map +0 -1
  193. package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js +0 -599
  194. package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js.map +0 -1
  195. package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js +0 -1302
  196. package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js.map +0 -1
  197. package/dist/ProductsPage-CupVmOD4-D45a_hf-.js.map +0 -1
  198. package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js +0 -648
  199. package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js.map +0 -1
  200. package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js.map +0 -1
  201. package/dist/Roles-BIyiic67.js +0 -14
  202. package/dist/Roles-BIyiic67.js.map +0 -1
  203. package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js +0 -747
  204. package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js.map +0 -1
  205. package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map +0 -1
  206. package/dist/SubMenu-eEDhZUvh.js.map +0 -1
  207. package/dist/TableDetails-BtafRxXb.js.map +0 -1
  208. package/dist/TableList-Dpo6dO7S.js.map +0 -1
  209. package/dist/TransactionsPage-DrH53pVS-BkhIGB6C.js.map +0 -1
  210. package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js +0 -315
  211. package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js.map +0 -1
  212. package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js +0 -476
  213. package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js.map +0 -1
  214. package/dist/TypeConfiguration-3O6ABrK-.js +0 -117
  215. package/dist/TypeConfiguration-3O6ABrK-.js.map +0 -1
  216. package/dist/UserList-DgPxsnj2.js +0 -1129
  217. package/dist/UserList-DgPxsnj2.js.map +0 -1
  218. package/dist/Users-Bpc4Sazd.js +0 -41
  219. package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js +0 -321
  220. package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js.map +0 -1
  221. package/dist/constants-ClZJY2x1-MkSWn6TZ.js.map +0 -1
  222. package/dist/dashboardLayoutUtils-D1xCAxp3.js +0 -405
  223. package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +0 -1
  224. package/dist/index-D9YNFPn9.js.map +0 -1
  225. package/dist/index.lib-Dn8PMkeD.js +0 -862
  226. package/dist/index.lib-Dn8PMkeD.js.map +0 -1
@@ -1,1085 +0,0 @@
1
- import { jsxs as l, Fragment as ct, jsx as t } from "react/jsx-runtime";
2
- import { b as dt, c as ut, d as mt, u as ft, s as gt } from "./EventConfig-BmLemzX3.js";
3
- import { retrieveAllNotifications as ht, getReportsList as pt } from "@/common/services/GlobalApis";
4
- import { showToast as Y } from "@/common/toaster/toaster";
5
- import Ie from "@/views/custom-components/CustomTextArea";
6
- import k from "@/views/custom-components/CustomTextField";
7
- import { yupResolver as vt } from "@hookform/resolvers/yup";
8
- import yt from "@/views/custom-components/CustomDropdown";
9
- import { Card as bt, CardHeader as Ct, CardContent as Nt, FormControl as E, Typography as m, Box as w, Select as H, MenuItem as b, Divider as ae, Button as j, TableContainer as Tt, Paper as Et, Table as wt, TableHead as xt, TableRow as Me, TableCell as _, TableBody as It, CardActions as Mt } from "@mui/material";
10
- import v from "@mui/material/Grid2";
11
- import { useRef as De, useState as g, useEffect as Re, Suspense as qe, lazy as ne } from "react";
12
- import { useForm as Dt, Controller as V } from "react-hook-form";
13
- import { useNavigate as Rt } from "react-router";
14
- import { useParams as qt } from "react-router-dom";
15
- import * as x from "yup";
16
- import { useTranslateProvider as St } from "@/common/languageTranslator/TranslationContext";
17
- import At from "@/hooks/useTrackEvent";
18
- import { M as Ot } from "./EventsSkeleton-BIcPks4T.js";
19
- import { FontAwesomeIcon as $ } from "@fortawesome/react-fontawesome";
20
- import { faPen as _t, faTrash as Se, faPlus as Ae } from "@fortawesome/free-solid-svg-icons";
21
- import './ManageEventConfiguration.css';const Lt = ne(() => import("./ConditionConfig-Ddz9halE.js")), zt = ne(
22
- () => import("./MobileTypeEventConfigModal-BeveaX0C.js")
23
- ), kt = ne(
24
- () => import("./OtherTypeEventConfigModal-CM6VkdmY.js")
25
- );
26
- function ia() {
27
- var Te, Ee, we;
28
- const { translate: o } = St(), ie = De(null), re = De(!1), { id: O } = qt(), le = Rt(), [U, Oe] = g(null), [oe, _e] = g(null), [se, Le] = g({}), [C, I] = g(
29
- []
30
- ), [ce, ze] = g(null), [K, ke] = g(null), [$e, de] = g(null), [Ue, Pe] = g(null), [M, L] = g(null), [We, ue] = g(null), [Be, Fe] = g(null), [D, R] = g(null), [me, Ye] = g(!1), [fe, ge] = g(!1), [he, Q] = g(!1), [P, q] = g([]), [He, W] = g(!1), [je, Ve] = g([]), Ke = window.getComputedStyle(document.body).lineHeight, pe = () => Ye(!me), Qe = x.object().shape({
31
- name: x.string().required("Enter Name"),
32
- eventType: x.string().required("Select Event Type"),
33
- recursionInterval: x.number().typeError("Recursion Interval must be a number").when([], {
34
- is: () => h === "RECURSION",
35
- then: (e) => e.required("Recursion Interval is required").moreThan(0, "Recursion Interval must be greater than or equal to 1").lessThan(1441, "Recursion Interval must be less than or equal to 1440"),
36
- otherwise: (e) => e.notRequired()
37
- }),
38
- trigerWhen: x.string().test(
39
- "is-required",
40
- "trigerWhen is required",
41
- function(e) {
42
- return h === "TIMMER_BASED" ? !!e : !0;
43
- }
44
- ),
45
- day: x.string().test("is-required", "day is required", function(e) {
46
- return h === "TIMMER_BASED" && (p === "AFTER" || p === "MONTHLY") ? !!e : !0;
47
- }),
48
- hour: x.string().test(
49
- "is-required",
50
- "hour is required",
51
- function(e) {
52
- return h === "TIMMER_BASED" && (p === "AFTER" || p === "MONTHLY" || p === "DAILY") ? !!e : !0;
53
- }
54
- ),
55
- minute: x.string().notRequired()
56
- // notificationConfigDetails: Yup.array().of(
57
- // Yup.object().shape({
58
- // query: Yup.string().required('Query is required'), // Ensure query is present
59
- // // condition: Yup.string().required('Condition is required'), // Ensure condition is present
60
- // // action: Yup.string().required('Action is required'), // Ensure action is present
61
- // })
62
- // ),
63
- }), {
64
- control: N,
65
- handleSubmit: Je,
66
- setValue: B,
67
- setError: J,
68
- clearErrors: G,
69
- getValues: ve,
70
- watch: ye,
71
- formState: { errors: d }
72
- } = Dt({
73
- defaultValues: {
74
- name: "",
75
- description: "",
76
- eventType: "",
77
- recursionInterval: 0,
78
- minute: 0
79
- },
80
- resolver: vt(Qe),
81
- mode: "onChange"
82
- }), h = ye("eventType");
83
- let p = ye("trigerWhen");
84
- Re(() => {
85
- let e = ie.current;
86
- return () => {
87
- Z("conversion_event", {
88
- form: e,
89
- form_name: "Manage Event Configuration",
90
- submit: re.current
91
- });
92
- };
93
- }, []);
94
- const Ge = async (e) => {
95
- try {
96
- if (C.length > 0) {
97
- e.minute = Number(e.minute || 0), e.notificationConfigDetails = C;
98
- const a = h === "TIMMER_BASED", i = h === "FORM_SUBMITTED", n = h === "MANUAL", c = h === "RECURSION";
99
- a || (delete e.trigerWhen, delete e.day, delete e.hour, delete e.minute), i || delete e.formTypeId, !i && !n && (delete e.eventTypeDetailCode, delete e.eventTypeDetailId), c ? (delete e.formTypeId, e.trigerWhen = "RECURSION") : delete e.recursionInterval;
100
- const y = ["AFTER", "MONTHLY", "WEEKLY"], T = ["AFTER", "MONTHLY", "DAILY", "WEEKLY"];
101
- y.includes(p) || delete e.day, T.includes(p) || (delete e.day, delete e.hour), p === "IMMEDIATELY" && (delete e.day, delete e.hour, delete e.minute);
102
- const S = C.map((s) => {
103
- var r;
104
- return {
105
- ...s,
106
- conditions: (r = s.conditions) == null ? void 0 : r.map((u) => ({
107
- ...u,
108
- notificaitonConfigsType: u.notificaitonConfigsType ? u.notificaitonConfigsType.map((f) => ({
109
- ...f,
110
- queryCode: f.queryCode === "" ? null : f.queryCode
111
- })) : u.notificaitonConfigsType
112
- }))
113
- };
114
- });
115
- e.notificationConfigDetails = S, O ? await ft(e) : await gt(e), Z("button_click", {
116
- button_name: "manageeventconfiguration-save-button",
117
- button_type: "submit",
118
- button_id: "manageeventconfiguration-save-button"
119
- }), Y({
120
- message: O ? "Event Configuration Updated successfully" : "submit successfully",
121
- type: "success"
122
- }), re.current = !0, le("/ui/medplat/notification/all");
123
- } else
124
- Y({
125
- message: "Please add atleast query / condition for the configuration",
126
- type: "warn"
127
- });
128
- } catch {
129
- Y({ message: "submit problem", type: "error" }), W((a) => !a);
130
- }
131
- };
132
- Re(() => {
133
- Xe();
134
- }, []);
135
- const Xe = async () => {
136
- var e, a, i, n;
137
- try {
138
- W((r) => !r);
139
- const c = await dt({ is_active: !0 });
140
- Oe(c == null ? void 0 : c.data);
141
- const y = await ut();
142
- _e(y == null ? void 0 : y.data);
143
- const T = await ht(!0);
144
- let S = {};
145
- (e = T == null ? void 0 : T.data) == null || e.forEach((r) => {
146
- S[r == null ? void 0 : r.id] = r == null ? void 0 : r.notificationName;
147
- }), Le(S);
148
- const { data: s } = await pt();
149
- if (Ve(s || []), O) {
150
- const r = await mt(O);
151
- (i = (a = r == null ? void 0 : r.data) == null ? void 0 : a.notificationConfigDetails) == null || i.forEach((f) => {
152
- be(f);
153
- });
154
- let u = r == null ? void 0 : r.data;
155
- (n = Object.keys(u)) == null || n.forEach((f) => {
156
- u[f] !== void 0 && u[f] !== null && B(f, u[f]);
157
- }), I((u == null ? void 0 : u.notificationConfigDetails) || []);
158
- }
159
- W((r) => !r);
160
- } catch (c) {
161
- Y({
162
- message: "Error in loading manage events",
163
- type: `Error:${c == null ? void 0 : c.message}`
164
- }), W((y) => !y);
165
- }
166
- }, be = (e) => {
167
- e.implicitParam = ["#resourceId#"];
168
- const a = [
169
- "from",
170
- "where",
171
- "group",
172
- "having",
173
- "order",
174
- "limit",
175
- "offset",
176
- "union",
177
- "intersect",
178
- "except",
179
- "window",
180
- "fetch",
181
- "into",
182
- "returning"
183
- ];
184
- if (e != null && e.query) {
185
- let i = "", n = null;
186
- for (let s = 0; s < e.query.length; s++) {
187
- const r = e.query[s], u = e.query[s + 1];
188
- if (n)
189
- i += r, r === n && (n = null);
190
- else if (r === "'" || r === '"')
191
- n = r, i += r;
192
- else if (r === "-" && u === "-") {
193
- for (; s < e.query.length && e.query[s] !== `
194
- `; )
195
- s++;
196
- i += `
197
- `;
198
- } else if (r === "/" && u === "*") {
199
- for (s += 2; s < e.query.length && !(e.query[s] === "*" && e.query[s + 1] === "/"); )
200
- s++;
201
- s++, i += " ";
202
- } else
203
- i += r;
204
- }
205
- let c = 0;
206
- n = null;
207
- let y = -1, T = -1;
208
- const S = [];
209
- for (let s = 0; s < i.length; s++) {
210
- const r = i[s];
211
- if (n)
212
- r === n && (n = null);
213
- else if (r === "'" || r === '"')
214
- n = r;
215
- else if (r === "(")
216
- c++;
217
- else if (r === ")")
218
- c--;
219
- else if (c === 0) {
220
- if (r === ";" && y >= 0) {
221
- T = s;
222
- break;
223
- } else if (r === "," && y >= 0)
224
- S.push(s);
225
- else if (/[a-z_]/i.test(r) && !/[\w.]/.test(i[s - 1] || "")) {
226
- const u = (i.slice(s).match(/^[a-z_]+/i) || [""])[0];
227
- if (y < 0)
228
- u.toLowerCase() === "select" && (y = s + u.length), s += u.length - 1;
229
- else if (a.includes(u.toLowerCase())) {
230
- T = s;
231
- break;
232
- } else
233
- s += u.length - 1;
234
- }
235
- }
236
- }
237
- if (y >= 0) {
238
- T < 0 && (T = i.length);
239
- const s = [];
240
- let r = y;
241
- S.filter((u) => u < T).forEach((u) => {
242
- s.push(i.substring(r, u)), r = u + 1;
243
- }), s.push(i.substring(r, T)), s.forEach((u) => {
244
- const f = u.replace(/^\s*(distinct\s+on\s*\([\s\S]*?\)|distinct|all)\s+/i, "").trim();
245
- if (f && f !== "*" && !f.endsWith(".*")) {
246
- let ee = 0, F = null, te = -1;
247
- for (let z = 0; z < f.length; z++) {
248
- const A = f[z];
249
- F ? A === F && (F = null) : A === "'" || A === '"' ? F = A : A === "(" ? ee++ : A === ")" ? ee-- : ee === 0 && /\s/.test(A) && /^as\s/i.test(f.substring(z + 1)) && (te = z + 1);
250
- }
251
- const xe = (te >= 0 ? f.substring(te + 3).trim() : f.replace(/\s+/g, " ").trim()).replace(/^"|"$/g, "");
252
- /^[a-z_][\w$]*(\.[a-z_][\w$]*)*$/i.test(xe) && e.implicitParam.push("#" + xe + "#");
253
- }
254
- });
255
- }
256
- }
257
- }, Ze = (e) => {
258
- const a = C == null ? void 0 : C.filter(
259
- (i, n) => n !== e
260
- );
261
- I(a);
262
- }, et = (e, a) => {
263
- const i = [...C], n = i[e].conditions.filter((c, y) => y !== a);
264
- i[e].conditions = n, I(i);
265
- }, X = async (e, a, i, n) => {
266
- ke(e), ze(a), i ? (de(i), ue(!0), L(JSON.parse(JSON.stringify(i))), q((i == null ? void 0 : i.notificaitonConfigsType) || []), Pe(n)) : (de({}), L({}), q([]), ue(!1)), R({}), pe();
267
- }, tt = (e, a) => {
268
- const i = [...C];
269
- i[e].query = a, I(i);
270
- }, at = async () => {
271
- let e = [...C], a = !0;
272
- C.forEach((i, n) => {
273
- if (i.query === "") {
274
- a = !1;
275
- const c = `notificationConfigDetails.${n}.query`;
276
- J(c, { type: "manual", message: "Query Required" });
277
- }
278
- }), a && (e.push({ query: "", conditions: [], queryParam: null }), I(e));
279
- }, Ce = async (e, a) => {
280
- e ? (e.index = a, Fe(e), R({
281
- ...JSON.parse(JSON.stringify(e)),
282
- implicitParam: K.implicitParam
283
- }), ge(!0)) : (R({ ...D, implicitParam: K.implicitParam }), ge(!1)), nt();
284
- }, nt = () => {
285
- Q((e) => !e);
286
- }, Ne = (e) => {
287
- if (fe) {
288
- const a = P.map((i, n) => n === e.index ? { ...i, ...e } : i);
289
- q(a);
290
- } else
291
- q([...P, e]);
292
- lt(e);
293
- }, it = (e) => {
294
- q(
295
- (a) => a.filter((i, n) => n !== e)
296
- );
297
- }, rt = (e) => {
298
- Ce(P[e], e);
299
- }, lt = (e) => {
300
- let a = { ...M };
301
- M.notificaitonConfigsType || (a.notificaitonConfigsType = []), fe ? a.notificaitonConfigsType[Be.index] = e : a.notificaitonConfigsType.push(e), L(a), R({});
302
- }, Z = At(), ot = (e) => {
303
- if (We) {
304
- const a = [...C];
305
- L({ ...M, ...e });
306
- let i = { ...M, ...e };
307
- a[ce].conditions[Ue] = i, I(a), q([]);
308
- } else {
309
- const a = [...C];
310
- L({ ...M, ...e });
311
- let i = { ...M, ...e };
312
- a[ce].conditions.push(i), I(a), q([]);
313
- }
314
- }, st = (e) => {
315
- R({ ...D, ...e });
316
- };
317
- return /* @__PURE__ */ l(ct, { children: [
318
- /* @__PURE__ */ t(Ot, { isLoading: He, children: /* @__PURE__ */ l(
319
- bt,
320
- {
321
- className: "manage-eventConfiguration-type-body",
322
- component: "form",
323
- ref: ie,
324
- onSubmit: Je(Ge),
325
- "data-testid": "manageeventconfiguration-form",
326
- children: [
327
- /* @__PURE__ */ t(
328
- Ct,
329
- {
330
- className: "p-2.5 px-5 flex border-b text-customBlue",
331
- subheader: o(
332
- `${O ? "UPDATE" : "ADD"} EVENT CONFIGURATION`
333
- ),
334
- slotProps: {
335
- subheader: { className: "font-medium text-lg text-customBlue" }
336
- },
337
- "data-testid": "manageeventconfiguration-cardheader-subheader"
338
- }
339
- ),
340
- /* @__PURE__ */ l(Nt, { "data-testid": "manageeventconfiguration-cardcontent", children: [
341
- /* @__PURE__ */ l(v, { container: !0, spacing: 2, children: [
342
- /* @__PURE__ */ t(
343
- v,
344
- {
345
- item: !0,
346
- size: { xs: 12, sm: 6 },
347
- "data-testid": "manageeventconfiguration-name-field",
348
- children: /* @__PURE__ */ l(E, { variant: "outlined", className: "w-full", children: [
349
- /* @__PURE__ */ l(m, { variant: "body2", children: [
350
- o("Name"),
351
- /* @__PURE__ */ t("span", { className: "text-red-500 ml-1", children: "*" })
352
- ] }),
353
- /* @__PURE__ */ t(w, { className: "w-full", children: /* @__PURE__ */ t(
354
- k,
355
- {
356
- control: N,
357
- id: "name",
358
- name: "name",
359
- errors: d,
360
- label: "",
361
- size: "small",
362
- dataTestId: "manageeventconfiguration-name-textfield"
363
- }
364
- ) })
365
- ] })
366
- }
367
- ),
368
- /* @__PURE__ */ t(
369
- v,
370
- {
371
- item: !0,
372
- size: { xs: 12, sm: 6 },
373
- "data-testid": "manageeventconfiguration-description-field",
374
- children: /* @__PURE__ */ l(E, { variant: "outlined", className: "w-full", children: [
375
- /* @__PURE__ */ t(m, { variant: "body2", children: o("Description") }),
376
- /* @__PURE__ */ t(w, { className: "w-full", children: /* @__PURE__ */ t(
377
- Ie,
378
- {
379
- control: N,
380
- id: "description",
381
- name: "description",
382
- errors: d,
383
- label: "",
384
- minRows: 2,
385
- "data-testid": "manageeventconfiguration-description-textarea"
386
- }
387
- ) })
388
- ] })
389
- }
390
- ),
391
- /* @__PURE__ */ t(
392
- v,
393
- {
394
- item: !0,
395
- size: { xs: 12, sm: 6 },
396
- "data-testid": "manageeventconfiguration-eventtype-field",
397
- children: /* @__PURE__ */ l(E, { variant: "outlined", className: "w-full", children: [
398
- /* @__PURE__ */ l(m, { variant: "body2", children: [
399
- o("Event Type"),
400
- /* @__PURE__ */ t("span", { className: "text-red-500 ml-1", children: "*" })
401
- ] }),
402
- /* @__PURE__ */ l(w, { className: "w-full", children: [
403
- /* @__PURE__ */ t(
404
- V,
405
- {
406
- name: "eventType",
407
- control: N,
408
- defaultValue: "",
409
- className: "w-full",
410
- render: ({ field: e }) => /* @__PURE__ */ l(
411
- H,
412
- {
413
- className: "w-full",
414
- labelId: "event-type-label",
415
- id: "reportgroup",
416
- ...e,
417
- error: d.eventType,
418
- size: "small",
419
- "data-testid": "manageeventconfiguration-eventtype-select",
420
- children: [
421
- /* @__PURE__ */ t(b, { value: "FORM_SUBMITTED", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Form Submitted") }) }),
422
- /* @__PURE__ */ t(b, { value: "TIMMER_BASED", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Timer Based") }) }),
423
- /* @__PURE__ */ t(b, { value: "MANUAL", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Manual") }) }),
424
- /* @__PURE__ */ t(b, { value: "RECURSION", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Recursion") }) })
425
- ]
426
- }
427
- )
428
- }
429
- ),
430
- (d == null ? void 0 : d.eventType) && /* @__PURE__ */ t(
431
- "p",
432
- {
433
- className: "error-helper-manage-event",
434
- "data-testid": "custom-error-message",
435
- children: (Te = d == null ? void 0 : d.eventType) == null ? void 0 : Te.message
436
- }
437
- )
438
- ] })
439
- ] })
440
- }
441
- ),
442
- h === "FORM_SUBMITTED" && /* @__PURE__ */ t(
443
- v,
444
- {
445
- item: !0,
446
- size: { xs: 12, sm: 6 },
447
- "data-testid": "manageeventconfiguration-formtype-field",
448
- children: /* @__PURE__ */ l(E, { variant: "outlined", className: "w-full", children: [
449
- /* @__PURE__ */ t(m, { variant: "body2", children: o("Form Type") }),
450
- /* @__PURE__ */ t(w, { className: "w-full", children: /* @__PURE__ */ t(
451
- V,
452
- {
453
- className: "w-full",
454
- name: "formTypeId",
455
- control: N,
456
- defaultValue: "",
457
- render: ({ field: e }) => /* @__PURE__ */ l(
458
- H,
459
- {
460
- ...e,
461
- className: "w-full",
462
- labelId: "event-type-label",
463
- displayEmpty: !0,
464
- size: "small",
465
- onChange: (a) => {
466
- const i = a.target.value;
467
- e.onChange(i);
468
- const n = U.find(
469
- (c) => c.id === i
470
- );
471
- B(
472
- "eventTypeDetailCode",
473
- n == null ? void 0 : n.code
474
- ), B(
475
- "eventTypeDetailId",
476
- (n == null ? void 0 : n.detaiId) || null
477
- );
478
- },
479
- "data-testid": "manageeventconfiguration-formtype-select",
480
- children: [
481
- /* @__PURE__ */ t(b, { value: "", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Select") }) }),
482
- U == null ? void 0 : U.map((a) => /* @__PURE__ */ t(b, { value: a.id, children: /* @__PURE__ */ t(m, { variant: "body2", children: o(a.name) }) }, a.id))
483
- ]
484
- }
485
- )
486
- }
487
- ) })
488
- ] })
489
- }
490
- ),
491
- h === "TIMMER_BASED" && /* @__PURE__ */ t(
492
- v,
493
- {
494
- item: !0,
495
- size: { xs: 12, sm: 6 },
496
- "data-testid": "manageeventconfiguration-triggerwhen-field",
497
- children: /* @__PURE__ */ l(E, { variant: "outlined", className: "w-full", children: [
498
- /* @__PURE__ */ l(m, { variant: "body2", children: [
499
- o("Trigger When"),
500
- /* @__PURE__ */ t("span", { className: "text-red-500 ml-1", children: "*" })
501
- ] }),
502
- /* @__PURE__ */ l(w, { className: "w-full", children: [
503
- /* @__PURE__ */ t(
504
- V,
505
- {
506
- name: "trigerWhen",
507
- control: N,
508
- defaultValue: "",
509
- className: "w-full",
510
- render: ({ field: e }) => /* @__PURE__ */ l(
511
- H,
512
- {
513
- className: "w-full",
514
- ...e,
515
- value: e.value,
516
- error: d.trigerWhen,
517
- size: "small",
518
- "data-testid": "manageeventconfiguration-triggerwhen-select",
519
- children: [
520
- /* @__PURE__ */ t(b, { value: "", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Select") }) }),
521
- /* @__PURE__ */ t(b, { value: "IMMEDIATELY", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Immediately") }) }),
522
- /* @__PURE__ */ t(b, { value: "AFTER", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("After") }) }),
523
- /* @__PURE__ */ t(b, { value: "MONTHLY", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Monthly") }) }),
524
- /* @__PURE__ */ t(b, { value: "WEEKLY", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Weekly") }) }),
525
- /* @__PURE__ */ t(b, { value: "DAILY", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Daily") }) }),
526
- /* @__PURE__ */ t(b, { value: "HOURLY", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Hourly") }) }),
527
- /* @__PURE__ */ t(b, { value: "MINUTE", children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Minutely") }) })
528
- ]
529
- }
530
- )
531
- }
532
- ),
533
- (d == null ? void 0 : d.trigerWhen) && /* @__PURE__ */ t(
534
- "p",
535
- {
536
- className: "error-helper-manage-event",
537
- "data-testid": "custom-error-message",
538
- children: (Ee = d == null ? void 0 : d.trigerWhen) == null ? void 0 : Ee.message
539
- }
540
- )
541
- ] })
542
- ] })
543
- }
544
- ),
545
- h === "TIMMER_BASED" && (p === "AFTER" || p === "MONTHLY" || p === "WEEKLY") && /* @__PURE__ */ t(
546
- v,
547
- {
548
- item: !0,
549
- size: { xs: 12, sm: 6 },
550
- "data-testid": "manageeventconfiguration-day-field",
551
- children: /* @__PURE__ */ l(E, { variant: "outlined", className: "w-full", children: [
552
- /* @__PURE__ */ l(m, { variant: "body2", children: [
553
- o("day"),
554
- /* @__PURE__ */ t("span", { className: "text-red-500 ml-1", children: "*" })
555
- ] }),
556
- /* @__PURE__ */ t(
557
- k,
558
- {
559
- control: N,
560
- id: "day",
561
- name: "day",
562
- errors: d,
563
- type: "number",
564
- label: "",
565
- size: "small",
566
- dataTestId: "manageeventconfiguration-day-textfield"
567
- }
568
- )
569
- ] })
570
- }
571
- ),
572
- h === "TIMMER_BASED" && (p === "AFTER" || p === "MONTHLY" || p === "DAILY" || p === "WEEKLY") && /* @__PURE__ */ t(
573
- v,
574
- {
575
- item: !0,
576
- size: { xs: 12, sm: 6 },
577
- "data-testid": "manageeventconfiguration-hour-field",
578
- children: /* @__PURE__ */ l(E, { variant: "outlined", className: "w-full", children: [
579
- /* @__PURE__ */ l(m, { variant: "body2", children: [
580
- o("Hour"),
581
- /* @__PURE__ */ t("span", { className: "text-red-500 ml-1", children: "*" })
582
- ] }),
583
- /* @__PURE__ */ t(
584
- k,
585
- {
586
- control: N,
587
- id: "hour",
588
- name: "hour",
589
- type: "number",
590
- errors: d,
591
- label: "",
592
- size: "small",
593
- dataTestId: "manageeventconfiguration-hour-textfield"
594
- }
595
- )
596
- ] })
597
- }
598
- ),
599
- h === "TIMMER_BASED" && p && p !== "IMMEDIATELY" && /* @__PURE__ */ t(
600
- v,
601
- {
602
- item: !0,
603
- size: { xs: 12, sm: 6 },
604
- "data-testid": "manageeventconfiguration-minute-field",
605
- children: /* @__PURE__ */ l(E, { variant: "outlined", className: "w-full", children: [
606
- /* @__PURE__ */ t(m, { variant: "body2", children: o("Minute") }),
607
- /* @__PURE__ */ t(
608
- k,
609
- {
610
- control: N,
611
- id: "minute",
612
- name: "minute",
613
- errors: d,
614
- type: "number",
615
- label: "",
616
- size: "small",
617
- dataTestId: "manageeventconfiguration-minute-textfield"
618
- }
619
- )
620
- ] })
621
- }
622
- ),
623
- h === "RECURSION" && /* @__PURE__ */ t(v, { item: !0, size: { xs: 12, sm: 6 }, children: /* @__PURE__ */ l(E, { variant: "outlined", className: "w-full", children: [
624
- /* @__PURE__ */ l(m, { variant: "body2", children: [
625
- o("Recursion Interval (in Minutes)"),
626
- /* @__PURE__ */ t("span", { className: "text-red-500 ml-1", children: "*" })
627
- ] }),
628
- /* @__PURE__ */ t(w, { className: "w-full", children: /* @__PURE__ */ t(
629
- k,
630
- {
631
- type: "number",
632
- control: N,
633
- id: "recursionInterval",
634
- name: "recursionInterval",
635
- errors: d,
636
- label: "",
637
- size: "small",
638
- dataTestId: "manageeventconfiguration-recursionInterval-textfield"
639
- }
640
- ) })
641
- ] }) }),
642
- (h === "TIMMER_BASED" || h === "RECURSION") && /* @__PURE__ */ t(v, { item: !0, size: { xs: 12, sm: 6 }, children: /* @__PURE__ */ l(E, { variant: "outlined", className: "w-full", children: [
643
- /* @__PURE__ */ t(m, { variant: "body2", children: o("Reports") }),
644
- /* @__PURE__ */ t(w, { className: "w-full", children: /* @__PURE__ */ t(
645
- yt,
646
- {
647
- id: "reportUUID",
648
- name: "reportUUID",
649
- displayName: "name",
650
- optionValue: "uuid",
651
- multiple: !0,
652
- control: N,
653
- options: je
654
- }
655
- ) })
656
- ] }) }),
657
- h === "MANUAL" && /* @__PURE__ */ t(
658
- v,
659
- {
660
- item: !0,
661
- size: { xs: 12, sm: 6 },
662
- "data-testid": "manageeventconfiguration-event-field",
663
- children: /* @__PURE__ */ l(E, { variant: "outlined", className: "w-full", children: [
664
- /* @__PURE__ */ t(m, { variant: "body2", children: o("Event") }),
665
- /* @__PURE__ */ l(w, { className: "w-full", children: [
666
- /* @__PURE__ */ t(
667
- V,
668
- {
669
- name: "eventTypeDetailCode",
670
- control: N,
671
- className: "w-full",
672
- render: ({ field: e }) => /* @__PURE__ */ l(
673
- H,
674
- {
675
- className: "w-full",
676
- ...e,
677
- value: e.value,
678
- error: d.eventTypeDetailCode,
679
- size: "small",
680
- "data-testid": "manageeventconfiguration-eventtype-detail-select",
681
- children: [
682
- /* @__PURE__ */ t(b, { value: "", children: o("None") }),
683
- oe && Object.entries(oe).map(([a, i]) => /* @__PURE__ */ t(b, { value: a, children: i }, a))
684
- ]
685
- }
686
- )
687
- }
688
- ),
689
- (d == null ? void 0 : d.eventTypeDetailCode) && /* @__PURE__ */ t(
690
- "p",
691
- {
692
- className: "error-helper-manage-event",
693
- "data-testid": "manageeventconfiguration-eventtype-detail-error",
694
- children: (we = d == null ? void 0 : d.eventTypeDetailCode) == null ? void 0 : we.message
695
- }
696
- )
697
- ] })
698
- ] })
699
- }
700
- )
701
- ] }),
702
- /* @__PURE__ */ t(ae, { className: "m-[20px_3px]" }),
703
- /* @__PURE__ */ l(
704
- v,
705
- {
706
- container: !0,
707
- spacing: 5,
708
- justifyContent: "space-between",
709
- alignItems: "center",
710
- "data-testid": "manageeventconfiguration-add-configuration",
711
- children: [
712
- /* @__PURE__ */ t(v, { item: !0, children: /* @__PURE__ */ t(m, { variant: "body2", children: o("Add Configuration") }) }),
713
- /* @__PURE__ */ t(v, { item: !0, children: /* @__PURE__ */ t(
714
- j,
715
- {
716
- size: "small",
717
- variant: "contained",
718
- onClick: at,
719
- "data-testid": "manageeventconfiguration-add-button",
720
- children: o("Add")
721
- }
722
- ) })
723
- ]
724
- }
725
- ),
726
- /* @__PURE__ */ t(v, { container: !0, className: "w-full mt-5", children: /* @__PURE__ */ t(v, { item: !0, className: "w-full", children: /* @__PURE__ */ t(
727
- Tt,
728
- {
729
- component: Et,
730
- className: "w-full",
731
- "data-testid": "manageeventconfiguration-table-container",
732
- children: /* @__PURE__ */ l(wt, { sx: { minWidth: 800 }, children: [
733
- /* @__PURE__ */ t(xt, { children: /* @__PURE__ */ l(
734
- Me,
735
- {
736
- sx: {
737
- backgroundColor: (e) => e.palette.mode === "dark" ? e.palette.custom.tableHeader : "var(--color-gray4)"
738
- },
739
- children: [
740
- /* @__PURE__ */ t(
741
- _,
742
- {
743
- className: "border border-gray-300 align-top text-[13px]",
744
- "data-testid": "manageeventconfiguration-table-header-query",
745
- children: o("Query")
746
- }
747
- ),
748
- /* @__PURE__ */ t(
749
- _,
750
- {
751
- className: "border border-gray-300 align-top text-[13px]",
752
- "data-testid": "manageeventconfiguration-table-header-condition",
753
- children: o("Condition")
754
- }
755
- ),
756
- /* @__PURE__ */ t(
757
- _,
758
- {
759
- className: "border border-gray-300 align-top text-[13px]",
760
- "data-testid": "manageeventconfiguration-table-header-action",
761
- children: o("Actions")
762
- }
763
- )
764
- ]
765
- }
766
- ) }),
767
- /* @__PURE__ */ t(It, { children: C == null ? void 0 : C.map((e, a) => {
768
- var i;
769
- return /* @__PURE__ */ l(
770
- Me,
771
- {
772
- sx: {
773
- backgroundColor: (n) => {
774
- const c = n.palette.mode === "dark";
775
- return a % 2 === 0 ? c ? n.palette.background.paper : "#fff" : c ? "#1C2128" : "var(--color-gray4)";
776
- },
777
- // Adding a hover state that works in both modes
778
- "&:hover": {
779
- backgroundColor: (n) => n.palette.mode === "dark" ? "#21262D" : "var(--color-gray4)"
780
- }
781
- },
782
- "data-testid": `manageeventconfiguration-table-row-${a}`,
783
- children: [
784
- /* @__PURE__ */ t(
785
- _,
786
- {
787
- className: "border border-gray-300 align-top",
788
- style: { lineHeight: Ke },
789
- "data-testid": `manageeventconfiguration-table-row-${a}-query`,
790
- children: /* @__PURE__ */ l("div", { className: "flex flex-col items-start min-w-[300px]", children: [
791
- /* @__PURE__ */ t(
792
- E,
793
- {
794
- variant: "outlined",
795
- className: "w-full",
796
- children: /* @__PURE__ */ t(w, { className: "w-full", children: /* @__PURE__ */ t(
797
- Ie,
798
- {
799
- required: !0,
800
- control: N,
801
- id: `notificationConfigDetails.${a}.query`,
802
- name: `notificationConfigDetails.${a}.query`,
803
- errors: d,
804
- value: e.query,
805
- onChange: (n) => {
806
- B(
807
- `notificationConfigDetails.${a}.query`,
808
- n.target.value
809
- ), tt(a, n.target.value);
810
- const c = `notificationConfigDetails.${a}.query`;
811
- ve(c) === "" ? J(c, {
812
- type: "manual",
813
- message: "Query Required"
814
- }) : G(c);
815
- },
816
- onBlur: () => {
817
- const n = `notificationConfigDetails.${a}.query`;
818
- ve(n) === "" ? J(n, {
819
- type: "manual",
820
- message: "Query Required"
821
- }) : G(n), be(e);
822
- },
823
- label: "",
824
- minRows: 5,
825
- maxRows: 20,
826
- "data-testid": `manageeventconfiguration-table-row-${a}-query-textarea`
827
- }
828
- ) })
829
- }
830
- ),
831
- /* @__PURE__ */ t(
832
- "td",
833
- {
834
- style: {
835
- whiteSpace: "normal",
836
- width: "100%",
837
- overflowWrap: "break-word"
838
- },
839
- children: /* @__PURE__ */ t("b", { children: e == null ? void 0 : e.implicitParam })
840
- }
841
- )
842
- ] })
843
- }
844
- ),
845
- /* @__PURE__ */ t(
846
- _,
847
- {
848
- className: "border border-gray-300 align-top",
849
- "data-testid": `manageeventconfiguration-table-row-${a}-condition`,
850
- children: /* @__PURE__ */ t(
851
- "div",
852
- {
853
- style: {
854
- display: "flex",
855
- flexDirection: "column",
856
- alignItems: "flex-start",
857
- width: "100%"
858
- },
859
- children: ((i = e == null ? void 0 : e.conditions) == null ? void 0 : i.length) > 0 ? e == null ? void 0 : e.conditions.map(
860
- (n, c) => /* @__PURE__ */ l(
861
- "div",
862
- {
863
- style: { width: "100%" },
864
- children: [
865
- /* @__PURE__ */ l(
866
- "div",
867
- {
868
- style: {
869
- display: "flex",
870
- alignItems: "center",
871
- width: "100%"
872
- },
873
- "data-testid": "manageeventconfiguration-condition-rows",
874
- children: [
875
- /* @__PURE__ */ t(
876
- m,
877
- {
878
- className: "mr-1",
879
- variant: "body2",
880
- children: (n == null ? void 0 : n.condition) || "No condition specified"
881
- }
882
- ),
883
- /* @__PURE__ */ t(
884
- $,
885
- {
886
- className: "bg-[var(--color-gray3)] text-gray-600 rounded-full p-[10px] w-[14px] h-[14px] mx-1 cursor-pointer hover:bg-gray-300 hover:text-[#11B666] transition-all",
887
- icon: _t,
888
- onClick: () => X(
889
- e,
890
- a,
891
- n,
892
- c
893
- ),
894
- "data-testid": `manageeventconfiguration-table-row-${a}-condition-edit-${c}`
895
- }
896
- ),
897
- /* @__PURE__ */ t(
898
- $,
899
- {
900
- icon: Se,
901
- className: "bg-[var(--color-gray3)] text-gray-600 rounded-full p-[10px] w-[14px] h-[14px] mx-1 cursor-pointer hover:bg-gray-300 hover:text-[var(--color-error)] transition-all",
902
- onClick: () => et(
903
- a,
904
- c
905
- ),
906
- "data-testid": `manageeventconfiguration-table-row-${a}-condition-delete-${c}`
907
- }
908
- ),
909
- c === (e == null ? void 0 : e.conditions.length) - 1 && /* @__PURE__ */ t(
910
- $,
911
- {
912
- icon: Ae,
913
- onClick: () => X(e, a),
914
- className: "bg-[var(--color-gray3)] text-gray-600 rounded-full p-[10px] w-[14px] h-[14px] mx-1 cursor-pointer hover:bg-gray-300 hover:text-[var(--color-primary)] transition-all",
915
- "data-testid": `manageeventconfiguration-table-row-${a}-condition-add`
916
- }
917
- )
918
- ]
919
- }
920
- ),
921
- c < (e == null ? void 0 : e.conditions.length) - 1 && /* @__PURE__ */ t(ae, { className: "w-full m-[10px_0px]" })
922
- ]
923
- },
924
- c + 1
925
- )
926
- ) : /* @__PURE__ */ l(
927
- "div",
928
- {
929
- className: "flex flex-row items-center justify-between w-full mt-2 sm:mt-0 text-[14px]",
930
- children: [
931
- /* @__PURE__ */ t("span", { className: "mr-3 flex-1", children: o("No Condition Added") }),
932
- /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ t(
933
- $,
934
- {
935
- icon: Ae,
936
- onClick: () => X(e, a),
937
- className: "bg-gray-200 text-gray-600 rounded-full p-2 w-[16px] h-[16px] cursor-pointer hover:bg-gray-300 hover:text-[var(--color-primary)] transition-all",
938
- "data-testid": `manageeventconfiguration-table-row-${a}-condition-add-empty`
939
- }
940
- ) })
941
- ]
942
- }
943
- )
944
- }
945
- )
946
- }
947
- ),
948
- /* @__PURE__ */ t(
949
- _,
950
- {
951
- className: "border border-gray-300 align-top",
952
- "data-testid": `manageeventconfiguration-table-row-${a}-action`,
953
- children: /* @__PURE__ */ t(
954
- "div",
955
- {
956
- style: {
957
- display: "flex",
958
- flexDirection: "column",
959
- alignItems: "flex-start"
960
- },
961
- children: /* @__PURE__ */ t(
962
- j,
963
- {
964
- onClick: () => {
965
- Ze(a);
966
- const n = `notificationConfigDetails.${a}.query`;
967
- G(n);
968
- },
969
- size: "small",
970
- "aria-label": "delete",
971
- "data-testid": `manageeventconfiguration-table-row-${a}-action-delete`,
972
- children: /* @__PURE__ */ t(
973
- $,
974
- {
975
- icon: Se,
976
- className: "text-[19px] text-[var(--color-error)]"
977
- }
978
- )
979
- }
980
- )
981
- }
982
- )
983
- }
984
- )
985
- ]
986
- },
987
- a + 1
988
- );
989
- }) })
990
- ] })
991
- }
992
- ) }) })
993
- ] }),
994
- /* @__PURE__ */ t(ae, { className: "m-[8px_0px]" }),
995
- /* @__PURE__ */ l(
996
- Mt,
997
- {
998
- className: "flex flex-col sm:flex-row justify-end gap-2",
999
- "data-testid": "manageeventconfiguration-cardactions",
1000
- children: [
1001
- /* @__PURE__ */ t(
1002
- j,
1003
- {
1004
- variant: "contained",
1005
- color: "secondary",
1006
- type: "button",
1007
- size: "small",
1008
- className: "w-full sm:w-auto",
1009
- onClick: () => {
1010
- Z("button_click", {
1011
- button_name: "manageeventconfiguration-back-button",
1012
- button_type: "cancel",
1013
- button_id: "manageeventconfiguration-back-button"
1014
- }), le("/ui/medplat/notification/all");
1015
- },
1016
- "data-testid": "manageeventconfiguration-back-button",
1017
- children: o("Cancel")
1018
- }
1019
- ),
1020
- /* @__PURE__ */ t(
1021
- j,
1022
- {
1023
- size: "small",
1024
- variant: "contained",
1025
- type: "submit",
1026
- color: "primary",
1027
- className: "w-full sm:w-auto m-0",
1028
- "data-testid": "manageeventconfiguration-save-button",
1029
- children: o(`${O ? "Update" : "Save"}`)
1030
- }
1031
- )
1032
- ]
1033
- }
1034
- )
1035
- ]
1036
- }
1037
- ) }),
1038
- /* @__PURE__ */ t(qe, { children: /* @__PURE__ */ t(
1039
- Lt,
1040
- {
1041
- selectedConfig: K,
1042
- notificationtypeMap: se,
1043
- selectedCondition: $e,
1044
- newCondition: M,
1045
- handleTypeConfigurationDelete: it,
1046
- handleTypeConfigurationEdit: rt,
1047
- addTypeConfig: Ce,
1048
- setNewConditionData: ot,
1049
- typeConfigurationData: P,
1050
- setNewTypeData: st,
1051
- overlayOpen: me,
1052
- handleOverlayState: pe,
1053
- "data-testid": "manageeventconfiguration-conditionconfig"
1054
- }
1055
- ) }),
1056
- /* @__PURE__ */ t(qe, { children: (D == null ? void 0 : D.type) === "MOBILE" ? /* @__PURE__ */ t(
1057
- zt,
1058
- {
1059
- type: D,
1060
- open: he,
1061
- notificationtypeMap: se,
1062
- handleClick: Ne,
1063
- handleClose: () => {
1064
- Q((e) => !e), R({});
1065
- },
1066
- "data-testid": "manageeventconfiguration-mobiletypeeventconfigmodal"
1067
- }
1068
- ) : /* @__PURE__ */ t(
1069
- kt,
1070
- {
1071
- type: D,
1072
- open: he,
1073
- handleClick: Ne,
1074
- handleClose: () => {
1075
- Q((e) => !e), R({});
1076
- },
1077
- "data-testid": "manageeventconfiguration-othertypeeventconfigmodal"
1078
- }
1079
- ) })
1080
- ] });
1081
- }
1082
- export {
1083
- ia as default
1084
- };
1085
- //# sourceMappingURL=ManageEventConfiguration-CoYcpjR9.js.map