@argusoft/medplat-core 1.0.29 → 1.0.31

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 (217) hide show
  1. package/dist/AccessRights-DUgY6ewy.js +1031 -0
  2. package/dist/AccessRights-DUgY6ewy.js.map +1 -0
  3. package/dist/AddEditQueryBuilder-D-iQiVIe.js +365 -0
  4. package/dist/AddEditQueryBuilder-D-iQiVIe.js.map +1 -0
  5. package/dist/{AddFeatures-v3TmGQee.js → AddFeatures-D1sU8RjY.js} +2 -2
  6. package/dist/{AddFeatures-v3TmGQee.js.map → AddFeatures-D1sU8RjY.js.map} +1 -1
  7. package/dist/AddLabelModal-Bq-wRqv9.js +631 -0
  8. package/dist/AddLabelModal-Bq-wRqv9.js.map +1 -0
  9. package/dist/AddMenuConfiguration-c6ZKiN0i.js +8898 -0
  10. package/dist/AddMenuConfiguration-c6ZKiN0i.js.map +1 -0
  11. package/dist/AppModal-CCtrQ5Tr.js +394 -0
  12. package/dist/AppModal-CCtrQ5Tr.js.map +1 -0
  13. package/dist/BrandsPage-DMw2vT0u-BVhvhc6J.js +387 -0
  14. package/dist/BrandsPage-DMw2vT0u-BVhvhc6J.js.map +1 -0
  15. package/dist/CategoriesPage-D3ihx9Gi-CT58g0ry.js +398 -0
  16. package/dist/CategoriesPage-D3ihx9Gi-CT58g0ry.js.map +1 -0
  17. package/dist/{ChangePasswordModalCore-DutQAZOx.js → ChangePasswordModalCore-lQ9GamH1.js} +1605 -1610
  18. package/dist/ChangePasswordModalCore-lQ9GamH1.js.map +1 -0
  19. package/dist/ConditionConfig-BQBmBHaM.js +408 -0
  20. package/dist/ConditionConfig-BQBmBHaM.js.map +1 -0
  21. package/dist/DashboardPage-asr2XDRu-uOOlX9Vq.js +435 -0
  22. package/dist/DashboardPage-asr2XDRu-uOOlX9Vq.js.map +1 -0
  23. package/dist/EventConfig-BY2cgGyx.js +27 -0
  24. package/dist/EventConfig-BY2cgGyx.js.map +1 -0
  25. package/dist/EventConfigurations-CUPEN5BV.js +544 -0
  26. package/dist/EventConfigurations-CUPEN5BV.js.map +1 -0
  27. package/dist/EventConfigurations.css +1 -1
  28. package/dist/EventsExceptionModal-BX-ArkBE.js +188 -0
  29. package/dist/EventsExceptionModal-BX-ArkBE.js.map +1 -0
  30. package/dist/EventsUi-D6O9S7BK.js +258 -0
  31. package/dist/EventsUi-D6O9S7BK.js.map +1 -0
  32. package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js +79 -0
  33. package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js.map +1 -0
  34. package/dist/FeatureMenu-CHsBbw3W.js +525 -0
  35. package/dist/FeatureMenu-CHsBbw3W.js.map +1 -0
  36. package/dist/{FhirServerList-Dkq7Kbes.js → FhirServerList-iXBPkRVF.js} +22 -22
  37. package/dist/{FhirServerList-Dkq7Kbes.js.map → FhirServerList-iXBPkRVF.js.map} +1 -1
  38. package/dist/{FhirServerWizard-Db6Hm4bQ.js → FhirServerWizard-DZI8Olku.js} +15 -15
  39. package/dist/{FhirServerWizard-Db6Hm4bQ.js.map → FhirServerWizard-DZI8Olku.js.map} +1 -1
  40. package/dist/FlywayQuery-CQygj51V.js +179 -0
  41. package/dist/FlywayQuery-CQygj51V.js.map +1 -0
  42. package/dist/GrantPermissionModal-D7iNZd0M.js +239 -0
  43. package/dist/GrantPermissionModal-D7iNZd0M.js.map +1 -0
  44. package/dist/ImmunizationConfigurationBase-aUtx0JEe.js +8019 -0
  45. package/dist/ImmunizationConfigurationBase-aUtx0JEe.js.map +1 -0
  46. package/dist/ImmunizationConfigurationBase.css +1 -1
  47. package/dist/ImmunizationConfigurationsList-TZcLDEci.js +369 -0
  48. package/dist/ImmunizationConfigurationsList-TZcLDEci.js.map +1 -0
  49. package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js +665 -0
  50. package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js.map +1 -0
  51. package/dist/LanguagesModal-B3NTebYT.js +352 -0
  52. package/dist/LanguagesModal-B3NTebYT.js.map +1 -0
  53. package/dist/ManageDynamicFeature-BU0I45dd.js +4475 -0
  54. package/dist/ManageDynamicFeature-BU0I45dd.js.map +1 -0
  55. package/dist/ManageEventConfiguration-DqW3krT6.js +1216 -0
  56. package/dist/ManageEventConfiguration-DqW3krT6.js.map +1 -0
  57. package/dist/ManageEventConfiguration.css +1 -1
  58. package/dist/{ManageNotification-CfhHlfxA.js → ManageNotification-C5MhV77Q.js} +2 -2
  59. package/dist/{ManageNotification-CfhHlfxA.js.map → ManageNotification-C5MhV77Q.js.map} +1 -1
  60. package/dist/{ManageRole-4Y2PP4dQ.js → ManageRole-CNZBRKGU.js} +2 -2
  61. package/dist/{ManageRole-4Y2PP4dQ.js.map → ManageRole-CNZBRKGU.js.map} +1 -1
  62. package/dist/ManageTranslation-vRiptUAP.js +833 -0
  63. package/dist/ManageTranslation-vRiptUAP.js.map +1 -0
  64. package/dist/ManageTranslation.css +1 -1
  65. package/dist/{ManageUser-DDzyd9jm.js → ManageUser-DZltBina.js} +224 -224
  66. package/dist/{ManageUser-DDzyd9jm.js.map → ManageUser-DZltBina.js.map} +1 -1
  67. package/dist/MemberProfileCard-D5CgkTdJ-D2NgDJl3.js +272 -0
  68. package/dist/MemberProfileCard-D5CgkTdJ-D2NgDJl3.js.map +1 -0
  69. package/dist/MobileAnalytics-BLOionG_.js +17301 -0
  70. package/dist/MobileAnalytics-BLOionG_.js.map +1 -0
  71. package/dist/MobileMenuManagement-68Wijb0X.js +220 -0
  72. package/dist/MobileMenuManagement-68Wijb0X.js.map +1 -0
  73. package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js +752 -0
  74. package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js.map +1 -0
  75. package/dist/NotificationFlywayQuery-BAHVjf6N.js +247 -0
  76. package/dist/NotificationFlywayQuery-BAHVjf6N.js.map +1 -0
  77. package/dist/{NotificationList-BMFpNUJG.js → NotificationList-DEyRZEuM.js} +2 -2
  78. package/dist/{NotificationList-BMFpNUJG.js.map → NotificationList-DEyRZEuM.js.map} +1 -1
  79. package/dist/OtherTypeEventConfigModal-stNmuSv_.js +1812 -0
  80. package/dist/OtherTypeEventConfigModal-stNmuSv_.js.map +1 -0
  81. package/dist/PaymentCreatePage-DfvSZ-kB-CckogYoe.js +482 -0
  82. package/dist/PaymentCreatePage-DfvSZ-kB-CckogYoe.js.map +1 -0
  83. package/dist/PaymentsPage-DMNjYWAJ-ChO9IXmk.js +157 -0
  84. package/dist/PaymentsPage-DMNjYWAJ-ChO9IXmk.js.map +1 -0
  85. package/dist/PermissionsModal-CCYkcKlC.js +151 -0
  86. package/dist/PermissionsModal-CCYkcKlC.js.map +1 -0
  87. package/dist/PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js +119 -0
  88. package/dist/PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js.map +1 -0
  89. package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js +783 -0
  90. package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js.map +1 -0
  91. package/dist/PickupsPage-D7zyioJB-bHKnARYw.js +818 -0
  92. package/dist/PickupsPage-D7zyioJB-bHKnARYw.js.map +1 -0
  93. package/dist/PmGuard-BZE-y4In-D_pUm5MP.js +599 -0
  94. package/dist/PmGuard-BZE-y4In-D_pUm5MP.js.map +1 -0
  95. package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js +1305 -0
  96. package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js.map +1 -0
  97. package/dist/ProductsPage-DvNHIeZt-BoOOJJtk.js +253 -0
  98. package/dist/ProductsPage-DvNHIeZt-BoOOJJtk.js.map +1 -0
  99. package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js +675 -0
  100. package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js.map +1 -0
  101. package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js +1577 -0
  102. package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map +1 -0
  103. package/dist/PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js +279 -0
  104. package/dist/PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js.map +1 -0
  105. package/dist/PurchasesPage-DgL5T6BY-DePUuE9l.js +293 -0
  106. package/dist/PurchasesPage-DgL5T6BY-DePUuE9l.js.map +1 -0
  107. package/dist/QueryBuilder-CXaBe6sr.js +478 -0
  108. package/dist/QueryBuilder-CXaBe6sr.js.map +1 -0
  109. package/dist/{RoleManagement-DEiBNfT8.js → RoleManagement-s8iNx2Mu.js} +145 -155
  110. package/dist/RoleManagement-s8iNx2Mu.js.map +1 -0
  111. package/dist/Roles-BIyiic67.js +14 -0
  112. package/dist/Roles-BIyiic67.js.map +1 -0
  113. package/dist/SaleCreatePage-CZnIOydv-DKBw-qp7.js +544 -0
  114. package/dist/SaleCreatePage-CZnIOydv-DKBw-qp7.js.map +1 -0
  115. package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js +315 -0
  116. package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js.map +1 -0
  117. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js +676 -0
  118. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js.map +1 -0
  119. package/dist/ShowFlywayQuery-D10Olk5Z.js +154 -0
  120. package/dist/ShowFlywayQuery-D10Olk5Z.js.map +1 -0
  121. package/dist/{ShowFlywayQuery-DVRCd384.js → ShowFlywayQuery-DIOUdYfG.js} +170 -123
  122. package/dist/ShowFlywayQuery-DIOUdYfG.js.map +1 -0
  123. package/dist/ShowQueryHistory-DRBKYDKk.js +313 -0
  124. package/dist/ShowQueryHistory-DRBKYDKk.js.map +1 -0
  125. package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js +728 -0
  126. package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map +1 -0
  127. package/dist/SubMenu-BdMTYtC1.js +319 -0
  128. package/dist/SubMenu-BdMTYtC1.js.map +1 -0
  129. package/dist/TransactionsPage-CqWTMNU8-Df6eGFDW.js +746 -0
  130. package/dist/TransactionsPage-CqWTMNU8-Df6eGFDW.js.map +1 -0
  131. package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js +315 -0
  132. package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js.map +1 -0
  133. package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js +476 -0
  134. package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js.map +1 -0
  135. package/dist/TypeConfiguration-JbRCN6GR.js +114 -0
  136. package/dist/TypeConfiguration-JbRCN6GR.js.map +1 -0
  137. package/dist/{UserList-Bc8gYxRL.js → UserList-L41Xw0Q6.js} +253 -236
  138. package/dist/{UserList-Bc8gYxRL.js.map → UserList-L41Xw0Q6.js.map} +1 -1
  139. package/dist/Users-CsJ08Kjm.js.map +1 -1
  140. package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js +321 -0
  141. package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js.map +1 -0
  142. package/dist/constants-DpXnLsAB-D6lN5cjK.js +445 -0
  143. package/dist/constants-DpXnLsAB-D6lN5cjK.js.map +1 -0
  144. package/dist/{dashboardLayoutUtils-D1xCAxp3.js → dashboardLayoutUtils-CJivzaU1.js} +95 -92
  145. package/dist/dashboardLayoutUtils-CJivzaU1.js.map +1 -0
  146. package/dist/format-UOyOu75i-D0GyylyQ.js +63 -0
  147. package/dist/format-UOyOu75i-D0GyylyQ.js.map +1 -0
  148. package/dist/index.css +1 -1
  149. package/dist/index.js +1 -1
  150. package/dist/index.lib-ETRQOzvE.js +894 -0
  151. package/dist/index.lib-ETRQOzvE.js.map +1 -0
  152. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js +36 -0
  153. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js.map +1 -0
  154. package/dist/useFieldErrors-hDG8ox_x-DbSAzrGo.js +28 -0
  155. package/dist/useFieldErrors-hDG8ox_x-DbSAzrGo.js.map +1 -0
  156. package/dist/validation-BzlHnL-r-CCJm2utQ.js +125 -0
  157. package/dist/validation-BzlHnL-r-CCJm2utQ.js.map +1 -0
  158. package/package.json +4 -3
  159. package/dist/AccessRights-Zm8Obm4N.js +0 -1284
  160. package/dist/AccessRights-Zm8Obm4N.js.map +0 -1
  161. package/dist/AddEditQueryBuilder-Brdnm6rQ.js +0 -313
  162. package/dist/AddEditQueryBuilder-Brdnm6rQ.js.map +0 -1
  163. package/dist/AddLabelModal-DFllBVcd.js +0 -734
  164. package/dist/AddLabelModal-DFllBVcd.js.map +0 -1
  165. package/dist/AddMenuConfiguration-Ce91MhnU.js +0 -8547
  166. package/dist/AddMenuConfiguration-Ce91MhnU.js.map +0 -1
  167. package/dist/AppModal-CtG2GjD_.js +0 -428
  168. package/dist/AppModal-CtG2GjD_.js.map +0 -1
  169. package/dist/ChangePasswordModalCore-DutQAZOx.js.map +0 -1
  170. package/dist/ConditionConfig-B4Ffpgj3.js +0 -395
  171. package/dist/ConditionConfig-B4Ffpgj3.js.map +0 -1
  172. package/dist/ConditionConfig.css +0 -1
  173. package/dist/EventConfigurations-BJcURufo.js +0 -449
  174. package/dist/EventConfigurations-BJcURufo.js.map +0 -1
  175. package/dist/EventsExceptionModal-BlZtBQoR.js +0 -200
  176. package/dist/EventsExceptionModal-BlZtBQoR.js.map +0 -1
  177. package/dist/EventsSkeleton-DK6JDKAK.js +0 -83
  178. package/dist/EventsSkeleton-DK6JDKAK.js.map +0 -1
  179. package/dist/FeatureMenu-C3503UIX.js +0 -265
  180. package/dist/FeatureMenu-C3503UIX.js.map +0 -1
  181. package/dist/FlywayQuery-Cx2sly6g.js +0 -169
  182. package/dist/FlywayQuery-Cx2sly6g.js.map +0 -1
  183. package/dist/ImmunizationConfigurationBase-DLQVSNnt.js +0 -5895
  184. package/dist/ImmunizationConfigurationBase-DLQVSNnt.js.map +0 -1
  185. package/dist/ImmunizationConfigurationsList-DdSZicTP.js +0 -344
  186. package/dist/ImmunizationConfigurationsList-DdSZicTP.js.map +0 -1
  187. package/dist/LanguagesModal-D6VfaGrl.js +0 -394
  188. package/dist/LanguagesModal-D6VfaGrl.js.map +0 -1
  189. package/dist/ManageDynamicFeature-dt096fyj.js +0 -4189
  190. package/dist/ManageDynamicFeature-dt096fyj.js.map +0 -1
  191. package/dist/ManageEventConfiguration-BpSJszSX.js +0 -1017
  192. package/dist/ManageEventConfiguration-BpSJszSX.js.map +0 -1
  193. package/dist/ManageTranslation-B4C9-lWD.js +0 -625
  194. package/dist/ManageTranslation-B4C9-lWD.js.map +0 -1
  195. package/dist/MobileMenuManagement-Cf8IZlla.js +0 -108
  196. package/dist/MobileMenuManagement-Cf8IZlla.js.map +0 -1
  197. package/dist/MobileTypeEventConfigModal-DUkUYACe.js +0 -783
  198. package/dist/MobileTypeEventConfigModal-DUkUYACe.js.map +0 -1
  199. package/dist/NotificationFlywayQuery-BY8Zzml_.js +0 -244
  200. package/dist/NotificationFlywayQuery-BY8Zzml_.js.map +0 -1
  201. package/dist/OtherTypeEventConfigModal-CYBfr2XE.js +0 -2046
  202. package/dist/OtherTypeEventConfigModal-CYBfr2XE.js.map +0 -1
  203. package/dist/QueryBuilder-z7eqfd7D.js +0 -383
  204. package/dist/QueryBuilder-z7eqfd7D.js.map +0 -1
  205. package/dist/RoleManagement-DEiBNfT8.js.map +0 -1
  206. package/dist/ShowFlywayQuery-DVRCd384.js.map +0 -1
  207. package/dist/ShowFlywayQuery-tj42YQAS.js +0 -130
  208. package/dist/ShowFlywayQuery-tj42YQAS.js.map +0 -1
  209. package/dist/ShowQueryHistory-BDN0tzHg.js +0 -190
  210. package/dist/ShowQueryHistory-BDN0tzHg.js.map +0 -1
  211. package/dist/SubMenu-B072oEGb.js +0 -191
  212. package/dist/SubMenu-B072oEGb.js.map +0 -1
  213. package/dist/TypeConfiguration-C3xoP2Nb.js +0 -117
  214. package/dist/TypeConfiguration-C3xoP2Nb.js.map +0 -1
  215. package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +0 -1
  216. package/dist/index.lib-C3fwoM3y.js +0 -820
  217. package/dist/index.lib-C3fwoM3y.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { jsx as i, jsxs as $, Fragment as Ce } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as $, Fragment as Ne } from "react/jsx-runtime";
2
2
  import oi, { useMemo as va, useState as U, useEffect as Ue, useRef as sa, useCallback as Aa, Suspense as Sa, lazy as Oa } from "react";
3
3
  import { g as ti, c as li, d as Ea, e as Ra, f as ci, v as wa, h as Pa, i as di, j as mi, u as ui, k as hi } from "./Users-CsJ08Kjm.js";
4
4
  import { showToast as Me } from "@/common/toaster/toaster";
@@ -13,7 +13,7 @@ import { FontAwesomeIcon as Ma } from "@fortawesome/react-fontawesome";
13
13
  import { InputAdornment as Ga, IconButton as ki, FormControl as ca, TextField as fi, Select as vi, MenuItem as wi, FormHelperText as zi, Box as ga, Card as ja, Typography as Ae, CardHeader as ji, Button as ta, CardContent as xi, RadioGroup as pa, FormControlLabel as Se, Radio as Ee, FormLabel as qi, Divider as xa, Chip as _i } from "@mui/material";
14
14
  import Ii from "@/views/custom-components/CustomTextField.jsx";
15
15
  import ye from "prop-types";
16
- import { Controller as da, useForm as Ni, FormProvider as Ci } from "react-hook-form";
16
+ import { Controller as da, useForm as Ci, FormProvider as Ni } from "react-hook-form";
17
17
  import Re from "@/common/config/implementationConfig";
18
18
  import { CountryDialCodes as La, phoneValidationRules as Ye } from "@/utils/FormConstants";
19
19
  import { yupResolver as Ai } from "@hookform/resolvers/yup";
@@ -27,7 +27,7 @@ import Ta from "@/views/custom-components/CustomDatePicker";
27
27
  import { useTranslateProvider as Mi } from "@/common/languageTranslator/TranslationContext";
28
28
  import { M as Li } from "./UserListSkeleton-BMKANCtW.js";
29
29
  import { execute as xe } from "@/common/services/GlobalApis";
30
- import R from "@/common/services/util/GeneralUtil";
30
+ import M from "@/common/services/util/GeneralUtil";
31
31
  import './ManageUser.css';const qa = ({
32
32
  control: re,
33
33
  showPassword: W,
@@ -98,30 +98,30 @@ const Ti = (re) => re ? re.toUpperCase().replace(
98
98
  const V = ((He = Re.user) == null ? void 0 : He.countriesToShowWhenAskingContactNumber) || ((l = Re.user) == null ? void 0 : l.countriesForContactNumber), fe = ((Le = Re.user) == null ? void 0 : Le.defaultCountryForContactNumber) || Re.country || "IN", ae = va(() => {
99
99
  let K = [...La];
100
100
  if (Array.isArray(V) && V.length > 0) {
101
- const je = new Set(V);
102
- K = K.filter((qe) => je.has(qe.iso2));
101
+ const ze = new Set(V);
102
+ K = K.filter((qe) => ze.has(qe.iso2));
103
103
  }
104
- return K.length === 0 && (K = [...La]), K.sort((je, qe) => je.name.localeCompare(qe.name));
104
+ return K.length === 0 && (K = [...La]), K.sort((ze, qe) => ze.name.localeCompare(qe.name));
105
105
  }, [V]), ne = va(() => {
106
106
  var K;
107
- return ae.some((je) => je.iso2 === fe) ? fe : ((K = ae[0]) == null ? void 0 : K.iso2) || "IN";
108
- }, [ae, fe]), [C, we] = U(ne);
107
+ return ae.some((ze) => ze.iso2 === fe) ? fe : ((K = ae[0]) == null ? void 0 : K.iso2) || "IN";
108
+ }, [ae, fe]), [N, ve] = U(ne);
109
109
  Ue(() => {
110
- ae.some((K) => K.iso2 === C) || we(ne);
111
- }, [ne, ae, C]);
112
- const $e = va(() => Ye[C] || Ye.IN, [C]);
110
+ ae.some((K) => K.iso2 === N) || ve(ne);
111
+ }, [ne, ae, N]);
112
+ const $e = va(() => Ye[N] || Ye.IN, [N]);
113
113
  return /* @__PURE__ */ i(
114
114
  da,
115
115
  {
116
116
  name: W,
117
117
  control: re,
118
- render: ({ field: K, fieldState: je }) => {
118
+ render: ({ field: K, fieldState: ze }) => {
119
119
  var Fe, Ze;
120
- const qe = ((Fe = je.error) == null ? void 0 : Fe.message) || ((Ze = ce == null ? void 0 : ce[W]) == null ? void 0 : Ze.message), Ie = K.value ? Ba(K.value, C) : null;
121
- let N = qe;
122
- Ie ? N = Ie : qe && C !== "IN" && qe.includes("10 digits") && (N = Ba(K.value, C) || `Please enter a valid ${$e.name} phone number`);
123
- const Ne = !!N || !!je.error || !!(ce != null && ce[W]);
124
- return /* @__PURE__ */ $(ca, { fullWidth: !0, error: Ne, required: ke, children: [
120
+ const qe = ((Fe = ze.error) == null ? void 0 : Fe.message) || ((Ze = ce == null ? void 0 : ce[W]) == null ? void 0 : Ze.message), Ie = K.value ? Ba(K.value, N) : null;
121
+ let C = qe;
122
+ Ie ? C = Ie : qe && N !== "IN" && qe.includes("10 digits") && (C = Ba(K.value, N) || `Please enter a valid ${$e.name} phone number`);
123
+ const Ce = !!C || !!ze.error || !!(ce != null && ce[W]);
124
+ return /* @__PURE__ */ $(ca, { fullWidth: !0, error: Ce, required: ke, children: [
125
125
  /* @__PURE__ */ i(
126
126
  fi,
127
127
  {
@@ -130,25 +130,25 @@ const Ti = (re) => re ? re.toUpperCase().replace(
130
130
  "data-testid": O,
131
131
  id: W,
132
132
  disabled: H,
133
- error: Ne,
133
+ error: Ce,
134
134
  value: K.value || "",
135
- onChange: (ue) => {
136
- let G = ue.target.value;
135
+ onChange: (he) => {
136
+ let G = he.target.value;
137
137
  if (G.startsWith("+")) {
138
138
  const Te = [...ae].sort(
139
139
  (de, _e) => _e.dialCode.length - de.dialCode.length
140
140
  );
141
141
  for (const de of Te)
142
142
  if (G.startsWith(de.dialCode)) {
143
- we(de.iso2), G = G.substring(de.dialCode.length);
143
+ ve(de.iso2), G = G.substring(de.dialCode.length);
144
144
  break;
145
145
  }
146
146
  }
147
- const ze = G.replace(/\D/g, "").slice(0, $e.maxLength);
148
- K.onChange(ze);
147
+ const we = G.replace(/\D/g, "").slice(0, $e.maxLength);
148
+ K.onChange(we);
149
149
  },
150
- onBlur: (ue) => {
151
- K.onBlur(), L && L(ue);
150
+ onBlur: (he) => {
151
+ K.onBlur(), L && L(he);
152
152
  },
153
153
  slotProps: {
154
154
  htmlInput: {
@@ -161,13 +161,13 @@ const Ti = (re) => re ? re.toUpperCase().replace(
161
161
  startAdornment: /* @__PURE__ */ i(Ga, { position: "start", children: /* @__PURE__ */ i(
162
162
  vi,
163
163
  {
164
- value: C,
165
- onChange: (ue) => {
166
- const G = ue.target.value;
167
- we(G);
168
- const ze = Ye[G] || Ye.IN;
164
+ value: N,
165
+ onChange: (he) => {
166
+ const G = he.target.value;
167
+ ve(G);
168
+ const we = Ye[G] || Ye.IN;
169
169
  if (K.value) {
170
- const Te = String(K.value).replace(/\D/g, "").slice(0, ze.maxLength);
170
+ const Te = String(K.value).replace(/\D/g, "").slice(0, we.maxLength);
171
171
  K.onChange(Te);
172
172
  }
173
173
  },
@@ -195,20 +195,20 @@ const Ti = (re) => re ? re.toUpperCase().replace(
195
195
  }
196
196
  }
197
197
  },
198
- children: ae.map((ue) => /* @__PURE__ */ $(
198
+ children: ae.map((he) => /* @__PURE__ */ $(
199
199
  wi,
200
200
  {
201
- value: ue.iso2,
202
- "data-testid": `country-option-${ue.iso2}`,
201
+ value: he.iso2,
202
+ "data-testid": `country-option-${he.iso2}`,
203
203
  children: [
204
- /* @__PURE__ */ i("span", { style: { marginRight: "6px" }, children: Ti(ue.iso2) }),
205
- ue.name,
204
+ /* @__PURE__ */ i("span", { style: { marginRight: "6px" }, children: Ti(he.iso2) }),
205
+ he.name,
206
206
  " (",
207
- ue.dialCode,
207
+ he.dialCode,
208
208
  ")"
209
209
  ]
210
210
  },
211
- ue.iso2
211
+ he.iso2
212
212
  ))
213
213
  }
214
214
  ) })
@@ -216,7 +216,7 @@ const Ti = (re) => re ? re.toUpperCase().replace(
216
216
  }
217
217
  }
218
218
  ),
219
- Ne && /* @__PURE__ */ i(zi, { "data-testid": "custom-error-message", children: N })
219
+ Ce && /* @__PURE__ */ i(zi, { "data-testid": "custom-error-message", children: C })
220
220
  ] });
221
221
  }
222
222
  }
@@ -252,8 +252,8 @@ function Bi() {
252
252
  }
253
253
  ce(e, a), e.prototype = a === null ? Object.create(a) : (n.prototype = a.prototype, new n());
254
254
  }
255
- var ke, O, V, fe, ae, ne, C, we = function() {
256
- return (we = Object.assign || function(e) {
255
+ var ke, O, V, fe, ae, ne, N, ve = function() {
256
+ return (ve = Object.assign || function(e) {
257
257
  for (var a, n = 1, s = arguments.length; n < s; n++) for (var o in a = arguments[n]) Object.prototype.hasOwnProperty.call(a, o) && (e[o] = a[o]);
258
258
  return e;
259
259
  }).apply(this, arguments);
@@ -271,7 +271,7 @@ function Bi() {
271
271
  return d;
272
272
  })().length;
273
273
  }, O = 1e4, fe = ke = 10, V = 50;
274
- var l, Le, K, je, qe, Ie, N, Ne, Fe, Ze, ue, G, ze, Te = { nCk: function(e, a) {
274
+ var l, Le, K, ze, qe, Ie, C, Ce, Fe, Ze, he, G, we, Te = { nCk: function(e, a) {
275
275
  var n, s, o, c;
276
276
  if (e < a) return 0;
277
277
  if (a === 0) return 1;
@@ -287,7 +287,7 @@ function Bi() {
287
287
  for (a = 1, n = s = 2, o = e; 2 <= o ? s <= o : o <= s; n = 2 <= o ? ++s : --s) a *= n;
288
288
  return a;
289
289
  }, most_guessable_match_sequence: function(e, a, n) {
290
- var s, o, c, d, m, y, u, h, w, k, f, g, v, A, T, Z, D, me, se, he, ee, ie, oe;
290
+ var s, o, c, d, m, y, u, h, w, k, f, g, v, A, T, Z, D, me, se, ue, ee, ie, oe;
291
291
  for (n == null && (n = !1), f = e.length, k = (function() {
292
292
  var z, _, S;
293
293
  for (S = [], z = 0, _ = f; 0 <= _ ? z < _ : _ < z; 0 <= _ ? ++z : --z) S.push([]);
@@ -322,7 +322,7 @@ function Bi() {
322
322
  return x;
323
323
  }, w = function(z, _) {
324
324
  return { pattern: "bruteforce", token: e.slice(z, +_ + 1 || 9e9), i: z, j: _ };
325
- }, he = function(z) {
325
+ }, ue = function(z) {
326
326
  var _, S, te, F, x, J, be;
327
327
  for (S in J = [], F = z - 1, x = void 0, te = 1 / 0, be = v.g[F]) (_ = be[S]) < te && (x = S, te = _);
328
328
  for (; 0 <= F; ) h = v.m[F][x], J.unshift(h), F = h.i - 1, x--;
@@ -332,7 +332,7 @@ function Bi() {
332
332
  else ee(h, 1);
333
333
  s(c);
334
334
  }
335
- return A = (T = he(f)).length, o = e.length === 0 ? 1 : v.g[f - 1][A], { password: e, guesses: o, guesses_log10: this.log10(o), sequence: T };
335
+ return A = (T = ue(f)).length, o = e.length === 0 ? 1 : v.g[f - 1][A], { password: e, guesses: o, guesses_log10: this.log10(o), sequence: T };
336
336
  }, estimate_guesses: function(e, a) {
337
337
  var n, s;
338
338
  return e.guesses != null || (s = 1, e.token.length < a.length && (s = e.token.length === 1 ? fe : V), n = { bruteforce: this.bruteforce_guesses, dictionary: this.dictionary_guesses, spatial: this.spatial_guesses, repeat: this.repeat_guesses, sequence: this.sequence_guesses, regex: this.regex_guesses, date: this.date_guesses }[e.pattern].call(this, e), e.guesses = Math.max(n, s), e.guesses_log10 = this.log10(e.guesses)), e.guesses;
@@ -356,11 +356,11 @@ function Bi() {
356
356
  return a = 365 * Math.max(Math.abs(e.year - this.REFERENCE_YEAR), this.MIN_YEAR_SPACE), e.separator && (a *= 4), a;
357
357
  }, KEYBOARD_AVERAGE_DEGREE: ne(ae.qwerty), KEYPAD_AVERAGE_DEGREE: ne(ae.keypad), KEYBOARD_STARTING_POSITIONS: (function() {
358
358
  var e, a;
359
- for (C in a = [], e = ae.qwerty) e[C], a.push(C);
359
+ for (N in a = [], e = ae.qwerty) e[N], a.push(N);
360
360
  return a;
361
361
  })().length, KEYPAD_STARTING_POSITIONS: (function() {
362
362
  var e, a;
363
- for (C in a = [], e = ae.keypad) e[C], a.push(C);
363
+ for (N in a = [], e = ae.keypad) e[N], a.push(N);
364
364
  return a;
365
365
  })().length, spatial_guesses: function(e) {
366
366
  var a, n, s, o, c, d, m, y, u, h, w, k, f, g, v, A, T;
@@ -406,12 +406,12 @@ function Bi() {
406
406
  }
407
407
  return k;
408
408
  } };
409
- for (G in Ne = He, ze = Te, Fe = function(e) {
409
+ for (G in Ce = He, we = Te, Fe = function(e) {
410
410
  var a, n, s, o;
411
411
  for (o = {}, a = 1, s = 0, n = e.length; s < n; s++) o[e[s]] = a, a += 1;
412
412
  return o;
413
- }, Ie = {}, Ze = $e) ue = Ze[G], Ie[G] = Fe(ue);
414
- je = { qwerty: Ne.qwerty, dvorak: Ne.dvorak, keypad: Ne.keypad, mac_keypad: Ne.mac_keypad }, qe = { a: ["4", "@"], b: ["8"], c: ["(", "{", "[", "<"], e: ["3"], g: ["6", "9"], i: ["1", "!", "|"], l: ["1", "|", "7"], o: ["0"], s: ["$", "5"], t: ["+", "7"], x: ["%"], z: ["2"] }, N = { recent_year: /19\d\d|200\d|201\d/g }, l = 2050, Le = 1e3, K = { 4: [[1, 2], [2, 3]], 5: [[1, 3], [2, 3]], 6: [[1, 2], [2, 4], [4, 5]], 7: [[1, 3], [2, 3], [4, 5], [4, 6]], 8: [[2, 4], [4, 6]] };
413
+ }, Ie = {}, Ze = $e) he = Ze[G], Ie[G] = Fe(he);
414
+ ze = { qwerty: Ce.qwerty, dvorak: Ce.dvorak, keypad: Ce.keypad, mac_keypad: Ce.mac_keypad }, qe = { a: ["4", "@"], b: ["8"], c: ["(", "{", "[", "<"], e: ["3"], g: ["6", "9"], i: ["1", "!", "|"], l: ["1", "|", "7"], o: ["0"], s: ["$", "5"], t: ["+", "7"], x: ["%"], z: ["2"] }, C = { recent_year: /19\d\d|200\d|201\d/g }, l = 2050, Le = 1e3, K = { 4: [[1, 2], [2, 3]], 5: [[1, 3], [2, 3]], 6: [[1, 2], [2, 4], [4, 5]], 7: [[1, 3], [2, 3], [4, 5], [4, 6]], 8: [[2, 4], [4, 6]] };
415
415
  var de, _e, Je, t, ma, ea, De, We = { empty: function(e) {
416
416
  var a;
417
417
  return (function() {
@@ -464,8 +464,8 @@ function Bi() {
464
464
  for (o in A = [], e) A.push(o);
465
465
  return A;
466
466
  })(), v = [[]], n = function(A) {
467
- var T, Z, D, me, se, he, ee, ie;
468
- for (Z = [], se = {}, he = 0, me = A.length; he < me; he++) ee = A[he], (T = (function() {
467
+ var T, Z, D, me, se, ue, ee, ie;
468
+ for (Z = [], se = {}, ue = 0, me = A.length; ue < me; ue++) ee = A[ue], (T = (function() {
469
469
  var oe, z, _;
470
470
  for (_ = [], ie = z = 0, oe = ee.length; z < oe; ie = ++z) o = ee[ie], _.push([o, ie]);
471
471
  return _;
@@ -476,9 +476,9 @@ function Bi() {
476
476
  })().join("-")) in se || (se[D] = !0, Z.push(ee));
477
477
  return Z;
478
478
  }, (s = function(A) {
479
- var T, Z, D, me, se, he, ee, ie, oe, z, _, S, te, F, x, J;
479
+ var T, Z, D, me, se, ue, ee, ie, oe, z, _, S, te, F, x, J;
480
480
  if (A.length) {
481
- for (Z = A[0], te = A.slice(1), ee = [], ie = 0, se = (_ = e[Z]).length; ie < se; ie++) for (me = _[ie], oe = 0, he = v.length; oe < he; oe++) {
481
+ for (Z = A[0], te = A.slice(1), ee = [], ie = 0, se = (_ = e[Z]).length; ie < se; ie++) for (me = _[ie], oe = 0, ue = v.length; oe < ue; oe++) {
482
482
  for (T = -1, D = z = 0, S = (F = v[oe]).length; 0 <= S ? z < S : S < z; D = 0 <= S ? ++z : --z) if (F[D][0] === me) {
483
483
  T = D;
484
484
  break;
@@ -507,7 +507,7 @@ function Bi() {
507
507
  }));
508
508
  }, spatial_match: function(e, a) {
509
509
  var n, s, o;
510
- for (s in a == null && (a = je), o = [], a) n = a[s], this.extend(o, this.spatial_match_helper(e, n, s));
510
+ for (s in a == null && (a = ze), o = [], a) n = a[s], this.extend(o, this.spatial_match_helper(e, n, s));
511
511
  return this.sorted(o);
512
512
  }, SHIFTED_RX: /[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/, spatial_match_helper: function(e, a, n) {
513
513
  var s, o, c, d, m, y, u, h, w, k, f, g, v, A;
@@ -527,7 +527,7 @@ function Bi() {
527
527
  return f;
528
528
  }, repeat_match: function(e) {
529
529
  var a, n, s, o, c, d, m, y, u, h, w, k, f, g, v;
530
- for (g = [], c = /(.+)\1+/g, h = /(.+?)\1+/g, w = /^(.+?)\1+$/, u = 0; u < e.length && (c.lastIndex = h.lastIndex = u, d = c.exec(e), k = h.exec(e), d != null); ) o = d[0].length > k[0].length ? (f = d, w.exec(f[0])[1]) : (f = k)[1], m = (v = [f.index, f.index + f[0].length - 1])[0], y = v[1], s = (a = ze.most_guessable_match_sequence(o, this.omnimatch(o))).sequence, n = a.guesses, g.push({ pattern: "repeat", i: m, j: y, token: f[0], base_token: o, base_guesses: n, base_matches: s, repeat_count: f[0].length / o.length }), u = y + 1;
530
+ for (g = [], c = /(.+)\1+/g, h = /(.+?)\1+/g, w = /^(.+?)\1+$/, u = 0; u < e.length && (c.lastIndex = h.lastIndex = u, d = c.exec(e), k = h.exec(e), d != null); ) o = d[0].length > k[0].length ? (f = d, w.exec(f[0])[1]) : (f = k)[1], m = (v = [f.index, f.index + f[0].length - 1])[0], y = v[1], s = (a = we.most_guessable_match_sequence(o, this.omnimatch(o))).sequence, n = a.guesses, g.push({ pattern: "repeat", i: m, j: y, token: f[0], base_token: o, base_guesses: n, base_matches: s, repeat_count: f[0].length / o.length }), u = y + 1;
531
531
  return g;
532
532
  }, MAX_DELTA: 5, sequence_match: function(e) {
533
533
  var a, n, s, o, c, d, m, y, u, h;
@@ -539,23 +539,23 @@ function Bi() {
539
539
  return u(n, e.length - 1, c), y;
540
540
  }, regex_match: function(e, a) {
541
541
  var n, s, o, c;
542
- for (G in a == null && (a = N), n = [], a) for ((s = a[G]).lastIndex = 0; o = s.exec(e); ) c = o[0], n.push({ pattern: "regex", token: c, i: o.index, j: o.index + o[0].length - 1, regex_name: G, regex_match: o });
542
+ for (G in a == null && (a = C), n = [], a) for ((s = a[G]).lastIndex = 0; o = s.exec(e); ) c = o[0], n.push({ pattern: "regex", token: c, i: o.index, j: o.index + o[0].length - 1, regex_name: G, regex_match: o });
543
543
  return this.sorted(n);
544
544
  }, date_match: function(e) {
545
- var a, n, s, o, c, d, m, y, u, h, w, k, f, g, v, A, T, Z, D, me, se, he, ee, ie, oe, z, _, S, te, F, x, J, be, E;
546
- for (k = [], f = /^\d{4,8}$/, g = /^(\d{1,4})([\s\/\\_.-])(\d{1,2})\2(\d{1,4})$/, d = T = 0, se = e.length - 4; 0 <= se ? T <= se : se <= T; d = 0 <= se ? ++T : --T) for (m = Z = he = d + 3, ee = d + 7; (he <= ee ? Z <= ee : ee <= Z) && !(m >= e.length); m = he <= ee ? ++Z : --Z) if (E = e.slice(d, +m + 1 || 9e9), f.exec(E)) {
545
+ var a, n, s, o, c, d, m, y, u, h, w, k, f, g, v, A, T, Z, D, me, se, ue, ee, ie, oe, z, _, S, te, F, x, J, be, E;
546
+ for (k = [], f = /^\d{4,8}$/, g = /^(\d{1,4})([\s\/\\_.-])(\d{1,2})\2(\d{1,4})$/, d = T = 0, se = e.length - 4; 0 <= se ? T <= se : se <= T; d = 0 <= se ? ++T : --T) for (m = Z = ue = d + 3, ee = d + 7; (ue <= ee ? Z <= ee : ee <= Z) && !(m >= e.length); m = ue <= ee ? ++Z : --Z) if (E = e.slice(d, +m + 1 || 9e9), f.exec(E)) {
547
547
  for (s = [], D = 0, h = (ie = K[E.length]).length; D < h; D++) y = (oe = ie[D])[0], u = oe[1], (c = this.map_ints_to_dmy([parseInt(E.slice(0, y)), parseInt(E.slice(y, u)), parseInt(E.slice(u))])) != null && s.push(c);
548
548
  if (0 < s.length) {
549
549
  for (a = s[0], A = (v = function(Oe) {
550
- return Math.abs(Oe.year - ze.REFERENCE_YEAR);
550
+ return Math.abs(Oe.year - we.REFERENCE_YEAR);
551
551
  })(s[0]), me = 0, w = (z = s.slice(1)).length; me < w; me++) (o = v(n = z[me])) < A && (a = (_ = [n, o])[0], A = _[1]);
552
552
  k.push({ pattern: "date", token: E, i: d, j: m, separator: "", year: a.year, month: a.month, day: a.day });
553
553
  }
554
554
  }
555
555
  for (d = J = 0, S = e.length - 6; 0 <= S ? J <= S : S <= J; d = 0 <= S ? ++J : --J) for (m = be = te = d + 5, F = d + 9; (te <= F ? be <= F : F <= be) && !(m >= e.length); m = te <= F ? ++be : --be) E = e.slice(d, +m + 1 || 9e9), (x = g.exec(E)) != null && (c = this.map_ints_to_dmy([parseInt(x[1]), parseInt(x[3]), parseInt(x[4])])) != null && k.push({ pattern: "date", token: E, i: d, j: m, separator: x[2], year: c.year, month: c.month, day: c.day });
556
556
  return this.sorted(k.filter(function(Oe) {
557
- var ge, ve, Ke, Be;
558
- for (ge = !1, Be = 0, ve = k.length; Be < ve; Be++) if (Oe !== (Ke = k[Be]) && Ke.i <= Oe.i && Ke.j >= Oe.j) {
557
+ var ge, je, Ke, Be;
558
+ for (ge = !1, Be = 0, je = k.length; Be < je; Be++) if (Oe !== (Ke = k[Be]) && Ke.i <= Oe.i && Ke.j >= Oe.j) {
559
559
  ge = !0;
560
560
  break;
561
561
  }
@@ -623,7 +623,7 @@ function Bi() {
623
623
  return u.feedback = Je.get_feedback(u.score, u.sequence), u;
624
624
  }, Ve = { flexBasis: 0, flexGrow: 1, position: "relative", maxWidth: "100%", width: "100%", height: 2 }, ua = function(e) {
625
625
  var a = e.score, n = e.itemNum, s = e.barColors, o = s[0];
626
- return n <= a && (o = s[a]), H.createElement("div", { style: we(we({}, Ve), { backgroundColor: o }) });
626
+ return n <= a && (o = s[a]), H.createElement("div", { style: ve(ve({}, Ve), { backgroundColor: o }) });
627
627
  }, Pe = { position: "relative" }, fa = { display: "flex", alignItems: "center", margin: "5px 0 0" }, aa = { width: 4 }, ia = { margin: "5px 0 0", color: "#898792", fontSize: 14, textAlign: "right" }, ra = (function(e) {
628
628
  function a() {
629
629
  var n = e !== null && e.apply(this, arguments) || this;
@@ -641,15 +641,15 @@ function Bi() {
641
641
  n.password !== s && this.setScore();
642
642
  }, a.prototype.render = function() {
643
643
  var n = this.props, s = n.className, o = n.style, c = n.scoreWordClassName, d = n.scoreWordStyle, m = n.password, y = n.barColors, u = n.scoreWords, h = n.minLength, w = n.shortScoreWord, k = this.state.score, f = m.length >= h ? u[k] : w;
644
- return H.createElement("div", { className: s, style: we(we({}, Pe), o) }, H.createElement("div", { style: fa }, [1, 2, 3, 4].map(function(g) {
644
+ return H.createElement("div", { className: s, style: ve(ve({}, Pe), o) }, H.createElement("div", { style: fa }, [1, 2, 3, 4].map(function(g) {
645
645
  return H.createElement(W.Fragment, { key: "password-strength-bar-item-" + g }, 1 < g && H.createElement("div", { style: aa }), H.createElement(ua, { score: k, itemNum: g, barColors: y }));
646
- })), H.createElement("p", { className: c, style: we(we({}, ia), d) }, f));
646
+ })), H.createElement("p", { className: c, style: ve(ve({}, ia), d) }, f));
647
647
  }, a.defaultProps = { className: void 0, style: void 0, scoreWordClassName: void 0, scoreWordStyle: void 0, password: "", userInputs: [], barColors: ["#ddd", "#ef4836", "#f6b44d", "#2b90ef", "#25c281"], scoreWords: ["weak", "weak", "okay", "good", "strong"], minLength: 4, shortScoreWord: "too short", onChangeScore: void 0 }, a;
648
648
  })(H.Component);
649
649
  return ba.default = ra, ba;
650
650
  }
651
651
  var Ui = Bi();
652
- const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCore-DutQAZOx.js")), Fi = $a.default || $a, ya = (re) => {
652
+ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCore-lQ9GamH1.js")), Fi = $a.default || $a, ya = (re) => {
653
653
  var H;
654
654
  const W = (H = Re.user) == null ? void 0 : H.fieldsToExclude;
655
655
  return Array.isArray(W) && W.includes(re);
@@ -682,12 +682,12 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
682
682
  prefferedLanguage: q.string().required("Preffered Language is required")
683
683
  });
684
684
  }, Gi = () => {
685
- var Ca;
686
- const [re, W] = U(Fa), H = sa(null), ce = sa(!1), L = Pi(), ke = Ei(), { translate: O } = Mi(), [V, fe] = U([]), [ae, ne] = U(0), [C, we] = U(), [$e, He] = U([]), [l, Le] = U({}), [K, je] = U(!1), [qe, Ie] = U("Add User"), { id: N } = Ri(), [Ne, Fe] = U(!1), [Ze, ue] = U(!1), [G, ze] = U([]), [Te, de] = U([]), [_e, Je] = U([]), [t, ma] = U(null), ea = sa(t);
685
+ var Na;
686
+ const [re, W] = U(Fa), H = sa(null), ce = sa(!1), L = Pi(), ke = Ei(), { translate: O } = Mi(), [V, fe] = U([]), [ae, ne] = U(0), [N, ve] = U(), [$e, He] = U([]), [l, Le] = U({}), [K, ze] = U(!1), [qe, Ie] = U("Add User"), { id: C } = Ri(), [Ce, Fe] = U(!1), [Ze, he] = U(!1), [G, we] = U([]), [Te, de] = U([]), [_e, Je] = U([]), [t, ma] = U(null), ea = sa(t);
687
687
  Ue(() => {
688
688
  ea.current = t;
689
689
  }, [t]);
690
- const [De, We] = U({}), [Xe, Qe] = U({}), [ka, Ve] = U(10), ua = sa(ka), [Pe, fa] = U({}), [aa, ia] = U({}), [ra, e] = U([]), [a, n] = U([]), [s, o] = U(""), [c, d] = U(!1), [m, y] = U("34px"), [u, h] = U(!1), [w, k] = U(!1), [f, g] = U([]), [v, A] = U([]), T = sa(null), [Z, D] = U([]), [me, se] = U(!1), [he, ee] = U(!1), [ie, oe] = U(null), [z, _] = U(null), S = (r) => {
690
+ const [De, We] = U({}), [Xe, Qe] = U({}), [ka, Ve] = U(10), ua = sa(ka), [Pe, fa] = U({}), [aa, ia] = U({}), [ra, e] = U([]), [a, n] = U([]), [s, o] = U(""), [c, d] = U(!1), [m, y] = U("34px"), [u, h] = U(!1), [w, k] = U(!1), [f, g] = U([]), [v, A] = U([]), T = sa(null), [Z, D] = U([]), [me, se] = U(!1), [ue, ee] = U(!1), [ie, oe] = U(null), [z, _] = U(null), S = (r) => {
691
691
  const p = r.target.files[0];
692
692
  if (p) {
693
693
  _(p);
@@ -705,11 +705,11 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
705
705
  }, [G]), Ue(() => {
706
706
  let r = q.object().shape({});
707
707
  if (t) {
708
- if (R.hasCheckRights(t == null ? void 0 : t["manage.users.batchNo"], void 0, !0) && (r = r.concat(
708
+ if (M.hasCheckRights(t == null ? void 0 : t["manage.users.batchNo"], void 0, !0) && (r = r.concat(
709
709
  q.object().shape({
710
710
  batchNo: q.number().transform((p, j) => j === "" ? void 0 : p).typeError("Batch No. must be a number").min(1, "Batch No. cannot be < 1").max(999, "Batch No. cannot have more than 3 digits").notRequired()
711
711
  })
712
- )), R.hasCheckRights(t == null ? void 0 : t["manage.users.dateOfBirth"], void 0, !0)) {
712
+ )), M.hasCheckRights(t == null ? void 0 : t["manage.users.dateOfBirth"], void 0, !0)) {
713
713
  const p = q.date().nullable().typeError("Invalid Date Format").max(/* @__PURE__ */ new Date(), "Date of birth cannot be in the future").notRequired();
714
714
  r = r.concat(
715
715
  q.object().shape({
@@ -717,11 +717,11 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
717
717
  })
718
718
  );
719
719
  }
720
- R.hasCheckRights(t == null ? void 0 : t["manage.users.maritalStatus"], void 0, !0) && (r = r.concat(
720
+ M.hasCheckRights(t == null ? void 0 : t["manage.users.maritalStatus"], void 0, !0) && (r = r.concat(
721
721
  q.object().shape({
722
722
  maritalStatus: q.string().required("Marital status is required")
723
723
  })
724
- )), R.hasCheckRights(t == null ? void 0 : t["manage.users.joiningDate"], void 0, !0) && (r = r.concat(
724
+ )), M.hasCheckRights(t == null ? void 0 : t["manage.users.joiningDate"], void 0, !0) && (r = r.concat(
725
725
  q.object().shape({
726
726
  joiningDate: q.date().nullable().typeError("Invalid Date Format").max(/* @__PURE__ */ new Date(), "Joining date cannot be in the future").test("is-after-dob", "Joining date cannot be before date of birth", function(p) {
727
727
  const { dateOfBirth: j } = this.parent;
@@ -745,11 +745,11 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
745
745
  nameAccToBank: q.string().nullable().notRequired()
746
746
  })
747
747
  ), l) {
748
- const p = (b, P) => {
748
+ const p = (b, R) => {
749
749
  if (!b) return !0;
750
750
  const B = String(b).replace(/\D/g, "");
751
751
  if (Ya(B))
752
- return P.createError({
752
+ return R.createError({
753
753
  message: "Please enter a valid phone number"
754
754
  });
755
755
  if (!Object.values(Ye).find(
@@ -758,11 +758,11 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
758
758
  const Q = Object.values(Ye).find(
759
759
  (Ge) => B.length >= Ge.minLength && B.length <= Ge.maxLength
760
760
  );
761
- return Q ? Q.iso2 === "IN" ? P.createError({
761
+ return Q ? Q.iso2 === "IN" ? R.createError({
762
762
  message: "Phone number must be 10 digits starting with 6-9"
763
- }) : P.createError({
763
+ }) : R.createError({
764
764
  message: `Please enter a valid ${Q.name} phone number`
765
- }) : P.createError({
765
+ }) : R.createError({
766
766
  message: "Please enter a valid phone number"
767
767
  });
768
768
  }
@@ -788,7 +788,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
788
788
  q.object().shape({
789
789
  convoxId: q.string().required("Convox Id is required")
790
790
  })
791
- )), (l == null ? void 0 : l.isAadharNumMandatory) && !N ? r = r.concat(
791
+ )), (l == null ? void 0 : l.isAadharNumMandatory) && !C ? r = r.concat(
792
792
  q.object().shape({
793
793
  aadharNumber: q.string().required("Aadhaar number is required").matches(/^\d{12}$/, "Aadhaar number must be 12 digits")
794
794
  })
@@ -806,12 +806,12 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
806
806
  })
807
807
  ) : r = r.concat(
808
808
  q.object().shape({
809
- latitude: q.number().transform((b, P) => P === "" ? void 0 : b).typeError("Latitude must be a number").nullable().min(-90, "Latitude must be between -90 and 90").max(90, "Latitude must be between -90 and 90").notRequired(),
810
- longitude: q.number().transform((b, P) => P === "" ? void 0 : b).typeError("Longitude must be a number").nullable().min(-180, "Longitude must be between -180 and 180").max(180, "Longitude must be between -180 and 180").notRequired()
809
+ latitude: q.number().transform((b, R) => R === "" ? void 0 : b).typeError("Latitude must be a number").nullable().min(-90, "Latitude must be between -90 and 90").max(90, "Latitude must be between -90 and 90").notRequired(),
810
+ longitude: q.number().transform((b, R) => R === "" ? void 0 : b).typeError("Longitude must be a number").nullable().min(-180, "Longitude must be between -180 and 180").max(180, "Longitude must be between -180 and 180").notRequired()
811
811
  })
812
812
  );
813
- const M = t == null ? void 0 : t["update.manage.users.canEditPfmsCode"];
814
- console.log("canEditPfms..", M), l != null && l.isPfmsCodeMandatory && M ? r = r.concat(
813
+ const P = t == null ? void 0 : t["update.manage.users.canEditPfmsCode"];
814
+ console.log("canEditPfms..", P), l != null && l.isPfmsCodeMandatory && P ? r = r.concat(
815
815
  q.object().shape({
816
816
  pfmsCode: q.string().required("Enter PFMS Code").matches(/^[a-zA-Z0-9]+$/, "PFMS code can have alphanumeric values").min(13, "PFMS code should be 13-14 character long").max(14, "PFMS code should be 13-14 character long")
817
817
  })
@@ -826,23 +826,23 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
826
826
  const X = t == null ? void 0 : t["update.manage.users.canEditSnaBeneficiaryId"];
827
827
  console.log("canEditSna..", X), l != null && l.isSnaBeneficiaryIdMandatory && X ? r = r.concat(
828
828
  q.object().shape({
829
- snaBeneficiaryId: q.string().required("Enter SNA Beneficiary ID").matches(/^[a-zA-Z0-9]+$/, "SNA Beneficiary ID can have alphanumeric values").length(17, "SNA Beneficiary ID should be 17 character long")
829
+ snaBeneficiaryId: q.string().required("Enter SNA Code/ Beneficiary ID").matches(/^[a-zA-Z0-9]+$/, "SNA Code/ Beneficiary ID can have alphanumeric values").length(17, "SNA Code/ Beneficiary ID should be 17 character long")
830
830
  })
831
831
  ) : r = r.concat(
832
832
  q.object().shape({
833
833
  snaBeneficiaryId: q.string().nullable().transform((b) => b === "" ? null : b).matches(/^[a-zA-Z0-9]+$/, {
834
- message: "SNA Beneficiary ID can have alphanumeric values",
834
+ message: "SNA Code/ Beneficiary ID can have alphanumeric values",
835
835
  excludeEmptyString: !0
836
- }).length(17, "SNA Beneficiary ID should be 17 character long").notRequired()
836
+ }).length(17, "SNA Code/ Beneficiary ID should be 17 character long").notRequired()
837
837
  })
838
838
  );
839
839
  }
840
840
  W(Fa().concat(r));
841
- }, [t, l, N]);
842
- const te = ((Ca = Re.user) == null ? void 0 : Ca.defaultPassword) || "Abcd@123", F = Ni({
841
+ }, [t, l, C]);
842
+ const te = ((Na = Re.user) == null ? void 0 : Na.defaultPassword) || "Abcd@123", F = Ci({
843
843
  mode: "onChange",
844
844
  resolver: Ai(re),
845
- context: { id: !!N, roleDetails: l },
845
+ context: { id: !!C, roleDetails: l },
846
846
  defaultValues: {
847
847
  infrastructureIds: [],
848
848
  prefferedLanguage: "",
@@ -856,18 +856,18 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
856
856
  formState: { errors: E },
857
857
  getValues: Oe,
858
858
  setValue: ge,
859
- watch: ve,
859
+ watch: je,
860
860
  clearErrors: Ke,
861
861
  resetField: Be,
862
862
  trigger: ha
863
863
  } = F;
864
864
  Ue(() => {
865
865
  var r;
866
- if (!N) {
866
+ if (!C) {
867
867
  const p = ((r = Re.user) == null ? void 0 : r.defaultPassword) || "Abcd@123";
868
868
  ge("password", p), ge("confirmPassword", p), ha(["password", "confirmPassword"]);
869
869
  }
870
- }, [re, N, ha, ge]), Ue(() => {
870
+ }, [re, C, ha, ge]), Ue(() => {
871
871
  let r = H.current;
872
872
  return () => {
873
873
  L("conversion_event", {
@@ -883,24 +883,24 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
883
883
  if (!r.target.value)
884
884
  return;
885
885
  const j = parseInt(r.target.value);
886
- e([]), ze([]), Je([]);
887
- const { data: M } = await Ra({
886
+ e([]), we([]), Je([]);
887
+ const { data: P } = await Ra({
888
888
  role_id: j
889
889
  });
890
- if (((p = M.hierarchy) == null ? void 0 : p.length) > 0) {
891
- const X = M.hierarchy.map((P) => P.locationType);
890
+ if (((p = P.hierarchy) == null ? void 0 : p.length) > 0) {
891
+ const X = P.hierarchy.map((R) => R.locationType);
892
892
  e(() => X), h(!0);
893
- const b = M.hierarchy.map((P) => P.level);
893
+ const b = P.hierarchy.map((R) => R.level);
894
894
  Ve(Math.max(...b)), n([]);
895
895
  } else
896
- ua.current = 10, Ve(10), h(!1), n((C == null ? void 0 : C.addedLocations) || []);
896
+ ua.current = 10, Ve(10), h(!1), n((N == null ? void 0 : N.addedLocations) || []);
897
897
  if (Le(() => {
898
898
  const X = V.find((b) => b.id === j);
899
899
  return X ? {
900
900
  ...X,
901
901
  isDoctor: X.name.toLowerCase() === "doctor"
902
902
  } : null;
903
- }), Ke(), Qe({}), We({}), Be("addedareas"), Be("areas"), M.roles.name.toLowerCase() === "doctor") {
903
+ }), Ke(), Qe({}), We({}), Be("addedareas"), Be("areas"), P.roles.name.toLowerCase() === "doctor") {
904
904
  const X = await xe({
905
905
  code: "GET_SPECIALIZATION"
906
906
  });
@@ -916,19 +916,19 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
916
916
  }, Wa = async (r) => {
917
917
  var p;
918
918
  try {
919
- G.length === 0 && (Ke("areas"), We({})), N && ((p = C == null ? void 0 : C.addedLocations) != null && p.includes(r)) && n((B) => [...B, r]);
920
- const j = _e == null ? void 0 : _e.map((P) => P.infraid), { data: M } = await mi([...j], r.locationId);
921
- if (M.errorcode === 400) {
922
- ia(M.message), ne(3);
919
+ G.length === 0 && (Ke("areas"), We({})), C && ((p = N == null ? void 0 : N.addedLocations) != null && p.includes(r)) && n((B) => [...B, r]);
920
+ const j = _e == null ? void 0 : _e.map((R) => R.infraid), { data: P } = await mi([...j], r.locationId);
921
+ if (P.errorcode === 400) {
922
+ ia(P.message), ne(3);
923
923
  return;
924
924
  }
925
- const X = G.filter((P) => P !== r);
926
- ze(X);
925
+ const X = G.filter((R) => R !== r);
926
+ we(X);
927
927
  const { data: b } = await xe({
928
928
  code: "retrieve_infra_by_role_location",
929
929
  parameters: {
930
930
  roleId: l == null ? void 0 : l.id,
931
- locationIds: X.map((P) => P.locationId)
931
+ locationIds: X.map((R) => R.locationId)
932
932
  }
933
933
  });
934
934
  de(b.result);
@@ -937,13 +937,13 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
937
937
  }
938
938
  }, _a = Aa(
939
939
  (r) => {
940
- R.isBahaar || (r === "Mr" ? ge("gender", "M") : (r === "Mrs" || r === "Ms") && ge("gender", "F"));
940
+ r === "Mr" ? ge("gender", "M") : (r === "Mrs" || r === "Ms") && ge("gender", "F");
941
941
  },
942
942
  [ge]
943
943
  ), Ka = async (r) => {
944
- var j, M, X, b, P;
944
+ var j, P, X, b, R;
945
945
  const p = {
946
- ...C,
946
+ ...N,
947
947
  // Spread only if needed, else write explicitly too
948
948
  ...r,
949
949
  lastName: (r == null ? void 0 : r.lastName) || "",
@@ -967,10 +967,10 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
967
967
  return;
968
968
  }
969
969
  try {
970
- await ui(p) && (N ? Me({ message: "User Updated Successfully", type: "success" }) : Me({ message: "User Added Successfully", type: "success" }), l.name.toLowerCase() === "doctor" && (N ? await xe({
970
+ await ui(p) && (C ? Me({ message: "User Updated Successfully", type: "success" }) : Me({ message: "User Added Successfully", type: "success" }), l.name.toLowerCase() === "doctor" && (C ? await xe({
971
971
  code: "UPDATE_DOCTOR_DETAILS",
972
972
  parameters: {
973
- userId: parseInt(N),
973
+ userId: parseInt(C),
974
974
  specializationId: parseInt(r == null ? void 0 : r.specialization)
975
975
  // averageDuration: parseInt(formValues?.averageDuration),
976
976
  }
@@ -987,11 +987,11 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
987
987
  }
988
988
  }));
989
989
  } catch (B) {
990
- ((X = (M = B == null ? void 0 : B.response) == null ? void 0 : M.data) == null ? void 0 : X.errorcode) === 400 ? Me({
991
- message: (P = (b = B == null ? void 0 : B.response) == null ? void 0 : b.data) == null ? void 0 : P.message,
990
+ ((X = (P = B == null ? void 0 : B.response) == null ? void 0 : P.data) == null ? void 0 : X.errorcode) === 400 ? Me({
991
+ message: (R = (b = B == null ? void 0 : B.response) == null ? void 0 : b.data) == null ? void 0 : R.message,
992
992
  type: "error"
993
993
  }) : Me({
994
- message: `Something went wrong while ${N ? "Updating" : "Adding"} user`,
994
+ message: `Something went wrong while ${C ? "Updating" : "Adding"} user`,
995
995
  type: "error"
996
996
  });
997
997
  }
@@ -1004,7 +1004,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1004
1004
  }, Xa = async (r) => {
1005
1005
  try {
1006
1006
  const p = r.target.value.toLowerCase();
1007
- if (ge("userName", p, { shouldValidate: !0 }), (C == null ? void 0 : C.userName) !== p) {
1007
+ if (ge("userName", p, { shouldValidate: !0 }), (N == null ? void 0 : N.userName) !== p) {
1008
1008
  const { data: j } = await Pa({
1009
1009
  action: "checkusername",
1010
1010
  username: p
@@ -1022,11 +1022,11 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1022
1022
  var p;
1023
1023
  try {
1024
1024
  const j = Number((p = r.target) == null ? void 0 : p.value);
1025
- return j && Number(C == null ? void 0 : C.contactNumber) !== j && await Pa({
1025
+ return j && Number(N == null ? void 0 : N.contactNumber) !== j && await Pa({
1026
1026
  action: "checkphone",
1027
1027
  phone: j
1028
- }).catch((M) => {
1029
- const { data: X, message: b } = M.response.data;
1028
+ }).catch((P) => {
1029
+ const { data: X, message: b } = P.response.data;
1030
1030
  J("contactNumber", {
1031
1031
  type: "manual",
1032
1032
  message: `${b} ${X}`
@@ -1052,10 +1052,10 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1052
1052
  message: `The role you have selected is allowed to add only - ${[...na]}`
1053
1053
  }), null;
1054
1054
  }
1055
- const { name: M, type: X, id: b } = Pe.finalSelected.optionSelected, P = {
1055
+ const { name: P, type: X, id: b } = Pe.finalSelected.optionSelected, R = {
1056
1056
  locationId: b,
1057
1057
  type: X,
1058
- name: M,
1058
+ name: P,
1059
1059
  level: Pe.finalSelected.level
1060
1060
  };
1061
1061
  if (G.find((Q) => Q.locationId === b)) {
@@ -1081,9 +1081,9 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1081
1081
  ia(Q), ne(4);
1082
1082
  return;
1083
1083
  } else if (le.errorcode === 1 && !le.data) {
1084
- P.locationFullName = le.message;
1085
- const Q = [...G, { ...P }];
1086
- ze(Q);
1084
+ R.locationFullName = le.message;
1085
+ const Q = [...G, { ...R }];
1086
+ we(Q);
1087
1087
  const { data: Ge } = await xe({
1088
1088
  code: "retrieve_infra_by_role_location",
1089
1089
  parameters: {
@@ -1117,61 +1117,61 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1117
1117
  var p, j;
1118
1118
  if (se(!1), r != null && r !== "")
1119
1119
  try {
1120
- const M = await xe({
1120
+ const P = await xe({
1121
1121
  code: "check_pfms_code_exists",
1122
1122
  parameters: {
1123
- userId: (C == null ? void 0 : C.id) ?? null,
1123
+ userId: (N == null ? void 0 : N.id) ?? null,
1124
1124
  pfmsCode: r
1125
1125
  }
1126
1126
  });
1127
- ((j = (p = M == null ? void 0 : M.data) == null ? void 0 : p.result) == null ? void 0 : j.length) > 0 && se(!0);
1128
- } catch (M) {
1129
- console.error(M);
1127
+ ((j = (p = P == null ? void 0 : P.data) == null ? void 0 : p.result) == null ? void 0 : j.length) > 0 && se(!0);
1128
+ } catch (P) {
1129
+ console.error(P);
1130
1130
  }
1131
1131
  }, ai = async (r) => {
1132
1132
  var p, j;
1133
1133
  if (ee(!1), r != null && r !== "")
1134
1134
  try {
1135
- const M = await xe({
1135
+ const P = await xe({
1136
1136
  code: "check_sna_beneficiary_id_exists",
1137
1137
  parameters: {
1138
- userId: (C == null ? void 0 : C.id) ?? null,
1138
+ userId: (N == null ? void 0 : N.id) ?? null,
1139
1139
  snaBeneficiaryId: r
1140
1140
  }
1141
1141
  });
1142
- ((j = (p = M == null ? void 0 : M.data) == null ? void 0 : p.result) == null ? void 0 : j.length) > 0 && ee(!0);
1143
- } catch (M) {
1144
- console.error(M);
1142
+ ((j = (p = P == null ? void 0 : P.data) == null ? void 0 : p.result) == null ? void 0 : j.length) > 0 && ee(P.data.result[0].error_message);
1143
+ } catch (P) {
1144
+ console.error(P);
1145
1145
  }
1146
1146
  }, ii = async () => {
1147
1147
  try {
1148
1148
  const { data: r } = await xe({
1149
1149
  code: "unlock_user_option",
1150
1150
  parameters: {
1151
- userId: C == null ? void 0 : C.id
1151
+ userId: N == null ? void 0 : N.id
1152
1152
  }
1153
1153
  });
1154
1154
  ne(0);
1155
- const { data: p } = await Ea(N);
1156
- we(p), r.result ? Me({ message: "User Unlocked Successfully", type: "success" }) : Me({
1155
+ const { data: p } = await Ea(C);
1156
+ ve(p), r.result ? Me({ message: "User Unlocked Successfully", type: "success" }) : Me({
1157
1157
  message: "Facing issue in Unlocking User",
1158
1158
  type: "error"
1159
1159
  });
1160
1160
  } catch (r) {
1161
1161
  console.error(r);
1162
1162
  }
1163
- }, Na = Aa(async () => {
1163
+ }, Ca = Aa(async () => {
1164
1164
  var r, p;
1165
1165
  try {
1166
1166
  d(!0);
1167
- const [j, M, X] = await Promise.all([
1167
+ const [j, P, X] = await Promise.all([
1168
1168
  ti(),
1169
1169
  gi("techo.manage.users"),
1170
1170
  li()
1171
1171
  ]);
1172
- fe(j == null ? void 0 : j.data), ma(JSON.parse(M == null ? void 0 : M.data)), He(X == null ? void 0 : X.data);
1172
+ fe(j == null ? void 0 : j.data), ma(JSON.parse(P == null ? void 0 : P.data)), He(X == null ? void 0 : X.data);
1173
1173
  try {
1174
- if (R.isTecho)
1174
+ if (M.isTecho)
1175
1175
  D([]);
1176
1176
  else {
1177
1177
  const b = await xe({
@@ -1182,27 +1182,27 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1182
1182
  } catch {
1183
1183
  D([]);
1184
1184
  }
1185
- if (N) {
1186
- Ie("Update User"), e([]), ze([]);
1187
- const { data: b } = await Ea(N);
1188
- we(b), b.addedLocations && ze(b.addedLocations);
1189
- const { data: P } = await Ra({
1185
+ if (C) {
1186
+ Ie("Update User"), e([]), we([]);
1187
+ const { data: b } = await Ea(C);
1188
+ ve(b), b.addedLocations && we(b.addedLocations);
1189
+ const { data: R } = await Ra({
1190
1190
  role_id: b.roleId
1191
1191
  });
1192
- if (((p = P.hierarchy) == null ? void 0 : p.length) > 0) {
1193
- const B = P.hierarchy.map((Q) => Q.locationType);
1192
+ if (((p = R.hierarchy) == null ? void 0 : p.length) > 0) {
1193
+ const B = R.hierarchy.map((Q) => Q.locationType);
1194
1194
  e(B);
1195
- const le = P.hierarchy.map((Q) => Q.level);
1195
+ const le = R.hierarchy.map((Q) => Q.level);
1196
1196
  Ve(Math.max(...le));
1197
1197
  } else
1198
1198
  ua.current = 10, Ve(10);
1199
1199
  if (Le(() => {
1200
1200
  var B;
1201
- return P != null && P.roles ? {
1202
- ...P == null ? void 0 : P.roles,
1203
- isDoctor: ((B = P == null ? void 0 : P.roles) == null ? void 0 : B.name.toLowerCase()) === "doctor"
1201
+ return R != null && R.roles ? {
1202
+ ...R == null ? void 0 : R.roles,
1203
+ isDoctor: ((B = R == null ? void 0 : R.roles) == null ? void 0 : B.name.toLowerCase()) === "doctor"
1204
1204
  } : null;
1205
- }), P.roles.name.toLowerCase() === "doctor") {
1205
+ }), R.roles.name.toLowerCase() === "doctor") {
1206
1206
  const B = await xe({
1207
1207
  code: "GET_SPECIALIZATION"
1208
1208
  });
@@ -1222,49 +1222,49 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1222
1222
  B.result.filter((le) => b == null ? void 0 : b.infrastructureIds.includes(le.infraid))
1223
1223
  );
1224
1224
  }
1225
- je(!0), Object.keys(b).map((B) => ge(B, b == null ? void 0 : b[B])), ge("prefferedLanguage", b == null ? void 0 : b.prefferedLanguage), b != null && b.bankNameId && !R.isTecho && ge("bankName", b.bankNameId);
1225
+ ze(!0), Object.keys(b).map((B) => ge(B, b == null ? void 0 : b[B])), ge("prefferedLanguage", b == null ? void 0 : b.prefferedLanguage), b != null && b.bankNameId && !M.isTecho && ge("bankName", b.bankNameId);
1226
1226
  }
1227
1227
  d(!1);
1228
1228
  } catch (j) {
1229
1229
  console.error("Error loading initial data:", j), Me({
1230
1230
  message: `error : ${j == null ? void 0 : j.message}`,
1231
1231
  type: "error"
1232
- }), d((M) => !M);
1232
+ }), d((P) => !P);
1233
1233
  }
1234
- }, [N, ge]);
1234
+ }, [C, ge]);
1235
1235
  Ue(() => {
1236
- Na();
1237
- }, [Na]), Ue(() => {
1238
- w && N && ri();
1239
- }, [w, N]);
1236
+ Ca();
1237
+ }, [Ca]), Ue(() => {
1238
+ w && C && ri();
1239
+ }, [w, C]);
1240
1240
  const ri = async () => {
1241
1241
  try {
1242
1242
  const r = await xe({
1243
1243
  code: "GET_SPECIALIZATION_BY_USERID",
1244
1244
  parameters: {
1245
- id: parseInt(N)
1245
+ id: parseInt(C)
1246
1246
  }
1247
1247
  });
1248
1248
  ge("specialization", r.data.result[0].specialization_id);
1249
- const p = await ci(parseInt(N)), j = new Blob([p], { type: "application/image" }), M = URL.createObjectURL(j);
1250
- oe(M);
1249
+ const p = await ci(parseInt(C)), j = new Blob([p], { type: "application/image" }), P = URL.createObjectURL(j);
1250
+ oe(P);
1251
1251
  } catch (r) {
1252
1252
  console.error(r);
1253
1253
  }
1254
1254
  };
1255
1255
  return Ue(() => {
1256
- const r = ve((p, { name: j }) => {
1256
+ const r = je((p, { name: j }) => {
1257
1257
  j === "title" && _a(p.title);
1258
1258
  });
1259
1259
  return () => r.unsubscribe();
1260
- }, [ve, _a]), N && t !== null && !R.hasCheckRights(t == null ? void 0 : t["update.manage.users"], void 0, !0) && !c ? /* @__PURE__ */ i(ga, { className: "flex justify-center items-center w-full h-[80vh]", "data-testid": "update-user-permission", children: /* @__PURE__ */ i(ja, { className: "h-80 w-150 flex justify-center items-center", children: /* @__PURE__ */ i(Ae, { variant: "h5", className: "text-customBlue", children: "You dont have permission to update Users" }) }) }) : !N && t !== null && !R.hasCheckRights(t == null ? void 0 : t["create.manage.users"], void 0, !0) && !c ? /* @__PURE__ */ i(ga, { className: "flex justify-center items-center w-full h-[80vh]", "data-testid": "create-user-permission", children: /* @__PURE__ */ i(ja, { className: "h-80 w-150 flex justify-center items-center", children: /* @__PURE__ */ i(Ae, { variant: "h5", className: "text-customBlue", children: "You dont have permission to Add Users" }) }) }) : /* @__PURE__ */ $(Ce, { children: [
1260
+ }, [je, _a]), C && t !== null && !M.hasCheckRights(t == null ? void 0 : t["update.manage.users"], void 0, !0) && !c ? /* @__PURE__ */ i(ga, { className: "flex justify-center items-center w-full h-[80vh]", "data-testid": "update-user-permission", children: /* @__PURE__ */ i(ja, { className: "h-80 w-150 flex justify-center items-center", children: /* @__PURE__ */ i(Ae, { variant: "h5", className: "text-customBlue", children: "You dont have permission to update Users" }) }) }) : !C && t !== null && !M.hasCheckRights(t == null ? void 0 : t["create.manage.users"], void 0, !0) && !c ? /* @__PURE__ */ i(ga, { className: "flex justify-center items-center w-full h-[80vh]", "data-testid": "create-user-permission", children: /* @__PURE__ */ i(ja, { className: "h-80 w-150 flex justify-center items-center", children: /* @__PURE__ */ i(Ae, { variant: "h5", className: "text-customBlue", children: "You dont have permission to Add Users" }) }) }) : /* @__PURE__ */ $(Ne, { children: [
1261
1261
  ae === 1 && /* @__PURE__ */ i(Sa, { children: /* @__PURE__ */ i(
1262
1262
  $i,
1263
1263
  {
1264
1264
  open: ae === 1,
1265
1265
  onClose: () => ne(0),
1266
- userId: C == null ? void 0 : C.id,
1267
- roleCode: C == null ? void 0 : C.roleCode,
1266
+ userId: N == null ? void 0 : N.id,
1267
+ roleCode: N == null ? void 0 : N.roleCode,
1268
1268
  "data-testid": "change-password-modal"
1269
1269
  }
1270
1270
  ) }),
@@ -1279,7 +1279,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1279
1279
  dataTestId: "unlock-user-modal"
1280
1280
  }
1281
1281
  ),
1282
- /* @__PURE__ */ i(Ci, { ...F, children: /* @__PURE__ */ i(
1282
+ /* @__PURE__ */ i(Ni, { ...F, children: /* @__PURE__ */ i(
1283
1283
  ja,
1284
1284
  {
1285
1285
  "data-testid": "ManageUserForm",
@@ -1289,7 +1289,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1289
1289
  component: "form",
1290
1290
  onSubmit: (r) => {
1291
1291
  L("button_click", {
1292
- button_name: N ? "add-user-button" : "update-user-button",
1292
+ button_name: C ? "add-user-button" : "update-user-button",
1293
1293
  button_type: "submit",
1294
1294
  button_id: "submit-button"
1295
1295
  });
@@ -1317,7 +1317,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1317
1317
  }
1318
1318
  ),
1319
1319
  /* @__PURE__ */ $(I, { item: !0, children: [
1320
- N && R.hasCheckRights(t == null ? void 0 : t["update.manage.users.canUnlockUser"], void 0, !0) && (C == null ? void 0 : C.isLocked) && /* @__PURE__ */ i(
1320
+ C && M.hasCheckRights(t == null ? void 0 : t["update.manage.users.canUnlockUser"], void 0, !0) && (N == null ? void 0 : N.isLocked) && /* @__PURE__ */ i(
1321
1321
  ta,
1322
1322
  {
1323
1323
  variant: "contained",
@@ -1329,7 +1329,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1329
1329
  children: O("Unlock User")
1330
1330
  }
1331
1331
  ),
1332
- N && R.hasCheckRights(
1332
+ C && M.hasCheckRights(
1333
1333
  t == null ? void 0 : t["update.manage.users.changePassword"],
1334
1334
  void 0,
1335
1335
  !0
@@ -1385,7 +1385,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1385
1385
  onChange: (r) => {
1386
1386
  Za(r);
1387
1387
  },
1388
- disabled: N && !R.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManageRole"]),
1388
+ disabled: C && !M.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManageRole"]),
1389
1389
  errors: E,
1390
1390
  dataTestId: "role-dropdown"
1391
1391
  }
@@ -1397,8 +1397,8 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1397
1397
  name: "title",
1398
1398
  id: "title",
1399
1399
  options: ["Mr", "Mrs", "Dr", "Ms"],
1400
- disableClearable: !R.isBahaar,
1401
- disabled: N && !R.hasCheckRights(
1400
+ disableClearable: !M.isBahaar,
1401
+ disabled: C && !M.hasCheckRights(
1402
1402
  t == null ? void 0 : t["update.manage.users.canManageUsersBasicInformation"]
1403
1403
  ),
1404
1404
  errors: E,
@@ -1411,7 +1411,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1411
1411
  control: x,
1412
1412
  id: "firstName",
1413
1413
  name: "firstName",
1414
- disabled: N && !R.hasCheckRights(
1414
+ disabled: C && !M.hasCheckRights(
1415
1415
  t == null ? void 0 : t["update.manage.users.canManageUsersBasicInformation"]
1416
1416
  ),
1417
1417
  errors: E,
@@ -1425,7 +1425,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1425
1425
  control: x,
1426
1426
  id: "middleName",
1427
1427
  name: "middleName",
1428
- disabled: N && !R.hasCheckRights(
1428
+ disabled: C && !M.hasCheckRights(
1429
1429
  t == null ? void 0 : t["update.manage.users.canManageUsersBasicInformation"]
1430
1430
  ),
1431
1431
  errors: E,
@@ -1439,7 +1439,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1439
1439
  control: x,
1440
1440
  id: "lastName",
1441
1441
  name: "lastName",
1442
- disabled: N && !R.hasCheckRights(
1442
+ disabled: C && !M.hasCheckRights(
1443
1443
  t == null ? void 0 : t["update.manage.users.canManageUsersBasicInformation"]
1444
1444
  ),
1445
1445
  errors: E,
@@ -1447,7 +1447,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1447
1447
  dataTestId: "last-name-input"
1448
1448
  }
1449
1449
  ) }) }),
1450
- R.hasCheckRights(t == null ? void 0 : t["manage.users.dateOfBirth"], void 0, !0) && /* @__PURE__ */ i(Ce, { children: /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Date Of Birth", children: /* @__PURE__ */ i(
1450
+ M.hasCheckRights(t == null ? void 0 : t["manage.users.dateOfBirth"], void 0, !0) && /* @__PURE__ */ i(Ne, { children: /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Date Of Birth", children: /* @__PURE__ */ i(
1451
1451
  Ta,
1452
1452
  {
1453
1453
  control: x,
@@ -1473,7 +1473,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1473
1473
  control: /* @__PURE__ */ i(
1474
1474
  Ee,
1475
1475
  {
1476
- disabled: !R.isBahaar && (ve("title") === "Mrs" || ve("title") === "Ms") || N && !R.hasCheckRights(
1476
+ disabled: je("title") === "Mrs" || je("title") === "Ms" || C && !M.hasCheckRights(
1477
1477
  t == null ? void 0 : t["update.manage.users.canManageUsersBasicInformation"]
1478
1478
  )
1479
1479
  }
@@ -1494,7 +1494,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1494
1494
  control: /* @__PURE__ */ i(
1495
1495
  Ee,
1496
1496
  {
1497
- disabled: !R.isBahaar && ve("title") === "Mr" || N && !R.hasCheckRights(
1497
+ disabled: je("title") === "Mr" || C && !M.hasCheckRights(
1498
1498
  t == null ? void 0 : t["update.manage.users.canManageUsersBasicInformation"]
1499
1499
  )
1500
1500
  }
@@ -1508,14 +1508,14 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1508
1508
  "data-testid": "gender-female"
1509
1509
  }
1510
1510
  ),
1511
- R.isBahaar && /* @__PURE__ */ i(
1511
+ M.isBahaar && /* @__PURE__ */ i(
1512
1512
  Se,
1513
1513
  {
1514
1514
  value: "O",
1515
1515
  control: /* @__PURE__ */ i(
1516
1516
  Ee,
1517
1517
  {
1518
- disabled: !R.isBahaar && ve("title") && ve("title") !== "Dr" || N && !R.hasCheckRights(
1518
+ disabled: C && !M.hasCheckRights(
1519
1519
  t == null ? void 0 : t["update.manage.users.canManageUsersBasicInformation"]
1520
1520
  )
1521
1521
  }
@@ -1534,18 +1534,18 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1534
1534
  ),
1535
1535
  E.gender && /* @__PURE__ */ i(Ae, { color: "error", children: E.gender.message })
1536
1536
  ] }) }) }),
1537
- R.hasCheckRights(t == null ? void 0 : t["manage.users.joiningDate"], void 0, !0) && !ya("joiningDate") && /* @__PURE__ */ i(Ce, { children: /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Joining date", children: /* @__PURE__ */ i(
1537
+ M.hasCheckRights(t == null ? void 0 : t["manage.users.joiningDate"], void 0, !0) && !ya("joiningDate") && /* @__PURE__ */ i(Ne, { children: /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Joining date", children: /* @__PURE__ */ i(
1538
1538
  Ta,
1539
1539
  {
1540
1540
  control: x,
1541
1541
  name: "joiningDate",
1542
1542
  errors: E,
1543
1543
  format: "DD/MM/YYYY",
1544
- minDate: ve("dateOfBirth") ? la(ve("dateOfBirth")) : la("2000-01-01"),
1544
+ minDate: je("dateOfBirth") ? la(je("dateOfBirth")) : la("2000-01-01"),
1545
1545
  maxDate: la()
1546
1546
  }
1547
1547
  ) }) }) }),
1548
- R.hasCheckRights(t == null ? void 0 : t["manage.users.batchNo"], void 0, !0) && !ya("batchNo") && /* @__PURE__ */ i(Ce, { children: /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Batch No.", children: /* @__PURE__ */ i(
1548
+ M.hasCheckRights(t == null ? void 0 : t["manage.users.batchNo"], void 0, !0) && !ya("batchNo") && /* @__PURE__ */ i(Ne, { children: /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Batch No.", children: /* @__PURE__ */ i(
1549
1549
  pe,
1550
1550
  {
1551
1551
  control: x,
@@ -1561,7 +1561,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1561
1561
  }
1562
1562
  }
1563
1563
  ) }) }) }),
1564
- R.hasCheckRights(t == null ? void 0 : t["manage.users.maritalStatus"], void 0, !0) && !ya("maritalStatus") && /* @__PURE__ */ i(Ce, { children: /* @__PURE__ */ i(Y, { label: "Marital Status", required: !0, direction: "row", children: /* @__PURE__ */ i(ca, { component: "fieldset", margin: "normal", children: /* @__PURE__ */ i(
1564
+ M.hasCheckRights(t == null ? void 0 : t["manage.users.maritalStatus"], void 0, !0) && !ya("maritalStatus") && /* @__PURE__ */ i(Ne, { children: /* @__PURE__ */ i(Y, { label: "Marital Status", required: !0, direction: "row", children: /* @__PURE__ */ i(ca, { component: "fieldset", margin: "normal", children: /* @__PURE__ */ i(
1565
1565
  da,
1566
1566
  {
1567
1567
  name: "maritalStatus",
@@ -1646,18 +1646,18 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1646
1646
  onChange: async (r) => {
1647
1647
  await ha("userName") && Xa(r);
1648
1648
  },
1649
- disabled: N && (R.isTecho || R.isEkavach) && !R.hasCheckRights(t == null ? void 0 : t["update.manage.users.userName"], void 0, !0),
1649
+ disabled: C && (M.isTecho || M.isEkavach) && !M.hasCheckRights(t == null ? void 0 : t["update.manage.users.userName"], void 0, !0),
1650
1650
  autoComplete: "off",
1651
1651
  dataTestId: "username-input"
1652
1652
  }
1653
1653
  ) }),
1654
- !K && /* @__PURE__ */ i(Ce, { children: /* @__PURE__ */ i(I, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ $(I, { container: !0, spacing: 2, className: "flex items-start", children: [
1654
+ !K && /* @__PURE__ */ i(Ne, { children: /* @__PURE__ */ i(I, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ $(I, { container: !0, spacing: 2, className: "flex items-start", children: [
1655
1655
  /* @__PURE__ */ $(I, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: [
1656
1656
  /* @__PURE__ */ i(Y, { label: "Password", required: !0, children: /* @__PURE__ */ i(
1657
1657
  qa,
1658
1658
  {
1659
1659
  control: x,
1660
- showPassword: Ne,
1660
+ showPassword: Ce,
1661
1661
  togglePasswordVisibility: () => Fe((r) => !r),
1662
1662
  name: "password",
1663
1663
  errors: E,
@@ -1669,7 +1669,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1669
1669
  /* @__PURE__ */ i(Y, { children: /* @__PURE__ */ i(
1670
1670
  Fi,
1671
1671
  {
1672
- password: ve("password"),
1672
+ password: je("password"),
1673
1673
  "data-testid": "password-strength-bar"
1674
1674
  }
1675
1675
  ) })
@@ -1679,7 +1679,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1679
1679
  {
1680
1680
  control: x,
1681
1681
  showPassword: Ze,
1682
- togglePasswordVisibility: () => ue((r) => !r),
1682
+ togglePasswordVisibility: () => he((r) => !r),
1683
1683
  name: "confirmPassword",
1684
1684
  errors: E,
1685
1685
  onChange: Ia,
@@ -1703,7 +1703,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1703
1703
  {
1704
1704
  control: x,
1705
1705
  name: "contactNumber",
1706
- disabled: N && !R.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManagePhonenumber"]),
1706
+ disabled: C && !M.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManagePhonenumber"]),
1707
1707
  errors: E,
1708
1708
  onBlur: Qa,
1709
1709
  required: l == null ? void 0 : l.isContactNumMandatory,
@@ -1718,7 +1718,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1718
1718
  control: x,
1719
1719
  id: "convoxId",
1720
1720
  name: "convoxId",
1721
- disabled: N && !R.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManageConvexID"]),
1721
+ disabled: C && !M.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManageConvexID"]),
1722
1722
  errors: E,
1723
1723
  label: "",
1724
1724
  dataTestId: "convox-id-input"
@@ -1730,7 +1730,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1730
1730
  control: x,
1731
1731
  id: "emailId",
1732
1732
  name: "emailId",
1733
- disabled: N && !R.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManageEmail"]),
1733
+ disabled: C && !M.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManageEmail"]),
1734
1734
  errors: E,
1735
1735
  label: "",
1736
1736
  type: "email",
@@ -1741,7 +1741,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1741
1741
  Y,
1742
1742
  {
1743
1743
  label: "Aadhar Number",
1744
- required: (l == null ? void 0 : l.isAadharNumMandatory) && !N,
1744
+ required: (l == null ? void 0 : l.isAadharNumMandatory) && !C,
1745
1745
  "data-testid": "aadhaar-number-label",
1746
1746
  children: /* @__PURE__ */ i(
1747
1747
  pe,
@@ -1749,7 +1749,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1749
1749
  control: x,
1750
1750
  id: "aadharNumber",
1751
1751
  name: "aadharNumber",
1752
- disabled: N && !R.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManageAadharnumber"]),
1752
+ disabled: C && !M.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManageAadharnumber"]),
1753
1753
  errors: E,
1754
1754
  label: "",
1755
1755
  rules: {
@@ -1769,7 +1769,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1769
1769
  )
1770
1770
  }
1771
1771
  ) }),
1772
- (l == null ? void 0 : l.isBankDetailsRequired) && /* @__PURE__ */ $(Ce, { children: [
1772
+ (l == null ? void 0 : l.isBankDetailsRequired) && /* @__PURE__ */ $(Ne, { children: [
1773
1773
  /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Bank Name", required: l == null ? void 0 : l.isBankDetailsMandatory, children: Z.length > 0 ? /* @__PURE__ */ i(
1774
1774
  oa,
1775
1775
  {
@@ -1779,7 +1779,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1779
1779
  options: Z,
1780
1780
  displayName: "value",
1781
1781
  optionValue: "id",
1782
- disabled: N && !R.hasCheckRights(
1782
+ disabled: C && !M.hasCheckRights(
1783
1783
  t == null ? void 0 : t["update.manage.users.canManageBankingInformation"]
1784
1784
  ),
1785
1785
  errors: E,
@@ -1791,7 +1791,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1791
1791
  control: x,
1792
1792
  id: "bankName",
1793
1793
  name: "bankName",
1794
- disabled: N && !R.hasCheckRights(
1794
+ disabled: C && !M.hasCheckRights(
1795
1795
  t == null ? void 0 : t["update.manage.users.canManageBankingInformation"]
1796
1796
  ),
1797
1797
  errors: E,
@@ -1805,7 +1805,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1805
1805
  control: x,
1806
1806
  id: "bankAccNo",
1807
1807
  name: "bankAccNo",
1808
- disabled: N && !R.hasCheckRights(
1808
+ disabled: C && !M.hasCheckRights(
1809
1809
  t == null ? void 0 : t["update.manage.users.canManageBankingInformation"]
1810
1810
  ),
1811
1811
  errors: E,
@@ -1826,7 +1826,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1826
1826
  control: x,
1827
1827
  id: "ifscCode",
1828
1828
  name: "ifscCode",
1829
- disabled: N && !R.hasCheckRights(
1829
+ disabled: C && !M.hasCheckRights(
1830
1830
  t == null ? void 0 : t["update.manage.users.canManageBankingInformation"]
1831
1831
  ),
1832
1832
  errors: E,
@@ -1845,7 +1845,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1845
1845
  control: x,
1846
1846
  id: "nameAccToBank",
1847
1847
  name: "nameAccToBank",
1848
- disabled: N && !R.hasCheckRights(
1848
+ disabled: C && !M.hasCheckRights(
1849
1849
  t == null ? void 0 : t["update.manage.users.canManageBankingInformation"]
1850
1850
  ),
1851
1851
  errors: E,
@@ -1905,7 +1905,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1905
1905
  (l == null ? void 0 : l.isSnaBeneficiaryIdMandatory) && /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ $(
1906
1906
  Y,
1907
1907
  {
1908
- label: "SNA Beneficiary ID",
1908
+ label: "SNA Code/ Beneficiary ID",
1909
1909
  required: (l == null ? void 0 : l.isSnaBeneficiaryIdMandatory) && !!(t != null && t["update.manage.users.canEditSnaBeneficiaryId"]),
1910
1910
  children: [
1911
1911
  /* @__PURE__ */ i(
@@ -1918,18 +1918,18 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1918
1918
  errors: E,
1919
1919
  label: "",
1920
1920
  rules: {
1921
- required: l != null && l.isSnaBeneficiaryIdMandatory && (t != null && t["update.manage.users.canEditSnaBeneficiaryId"]) ? "Enter SNA Beneficiary ID" : !1,
1921
+ required: l != null && l.isSnaBeneficiaryIdMandatory && (t != null && t["update.manage.users.canEditSnaBeneficiaryId"]) ? "Enter SNA Code/ Beneficiary ID" : !1,
1922
1922
  pattern: {
1923
1923
  value: /^[a-zA-Z0-9]+$/,
1924
- message: "SNA Beneficiary ID can have alphanumeric values"
1924
+ message: "SNA Code/ Beneficiary ID can have alphanumeric values"
1925
1925
  },
1926
1926
  minLength: {
1927
1927
  value: 17,
1928
- message: "SNA Beneficiary ID should be 17 character long"
1928
+ message: "SNA Code/ Beneficiary ID should be 17 character long"
1929
1929
  },
1930
1930
  maxLength: {
1931
1931
  value: 17,
1932
- message: "SNA Beneficiary ID should be 17 character long"
1932
+ message: "SNA Code/ Beneficiary ID should be 17 character long"
1933
1933
  }
1934
1934
  },
1935
1935
  inputProps: {
@@ -1944,7 +1944,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1944
1944
  dataTestId: "sna-beneficiary-id-input"
1945
1945
  }
1946
1946
  ),
1947
- he && /* @__PURE__ */ i(Ae, { color: "error", variant: "caption", children: "SNA Beneficiary ID is already linked to other user." })
1947
+ ue && /* @__PURE__ */ i(Ae, { color: "error", variant: "caption", children: ue })
1948
1948
  ]
1949
1949
  }
1950
1950
  ) }),
@@ -1957,7 +1957,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1957
1957
  options: $e,
1958
1958
  displayName: "languageValue",
1959
1959
  optionValue: "languageKey",
1960
- disabled: N && !R.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManagePreferredLanguage"]),
1960
+ disabled: C && !M.hasCheckRights(t == null ? void 0 : t["update.manage.users.canManagePreferredLanguage"]),
1961
1961
  errors: E,
1962
1962
  onChange: (r) => {
1963
1963
  Da(r);
@@ -1993,13 +1993,13 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
1993
1993
  }
1994
1994
  ) })
1995
1995
  ] }) }) }),
1996
- (C == null ? void 0 : C.loginCode) && /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Login Code", children: /* @__PURE__ */ i(
1996
+ (N == null ? void 0 : N.loginCode) && /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 12, md: 6 }, children: /* @__PURE__ */ i(Y, { label: "Login Code", children: /* @__PURE__ */ i(
1997
1997
  pe,
1998
1998
  {
1999
1999
  control: x,
2000
2000
  id: "loginCode",
2001
2001
  name: "loginCode",
2002
- value: C.loginCode,
2002
+ value: N.loginCode,
2003
2003
  errors: E,
2004
2004
  InputProps: {
2005
2005
  readOnly: !0
@@ -2015,7 +2015,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
2015
2015
  {
2016
2016
  name: "isUserSmagTrained",
2017
2017
  control: x,
2018
- render: ({ field: r, fieldState: p }) => /* @__PURE__ */ $(Ce, { children: [
2018
+ render: ({ field: r, fieldState: p }) => /* @__PURE__ */ $(Ne, { children: [
2019
2019
  /* @__PURE__ */ $(
2020
2020
  pa,
2021
2021
  {
@@ -2088,7 +2088,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
2088
2088
  open: ae === 4,
2089
2089
  handleClick: async () => {
2090
2090
  try {
2091
- const { name: r, type: p, id: j } = Pe.finalSelected.optionSelected, { data: M } = await wa({
2091
+ const { name: r, type: p, id: j } = Pe.finalSelected.optionSelected, { data: P } = await wa({
2092
2092
  roleId: Oe("roleId"),
2093
2093
  toBeAdded: j
2094
2094
  }), X = {
@@ -2096,17 +2096,17 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
2096
2096
  type: p,
2097
2097
  name: r,
2098
2098
  level: Pe.finalSelected.level,
2099
- locationFullName: M.message
2099
+ locationFullName: P.message
2100
2100
  }, b = [...G, { ...X }];
2101
- ze(() => b);
2102
- const { data: P } = await xe({
2101
+ we(() => b);
2102
+ const { data: R } = await xe({
2103
2103
  code: "retrieve_infra_by_role_location",
2104
2104
  parameters: {
2105
2105
  roleId: l == null ? void 0 : l.id,
2106
2106
  locationIds: b.map((B) => B.locationId)
2107
2107
  }
2108
2108
  });
2109
- de(P.result), ne(0);
2109
+ de(R.result), ne(0);
2110
2110
  } catch (r) {
2111
2111
  console.error(r);
2112
2112
  }
@@ -2161,7 +2161,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
2161
2161
  ),
2162
2162
  (Xe == null ? void 0 : Xe.message) && /* @__PURE__ */ i(Ae, { color: "error", className: "mt-[0.5rem]", children: Xe.message })
2163
2163
  ] }) }),
2164
- G.length > 0 && Te.length > 0 && /* @__PURE__ */ $(Ce, { children: [
2164
+ G.length > 0 && Te.length > 0 && /* @__PURE__ */ $(Ne, { children: [
2165
2165
  /* @__PURE__ */ i(xa, { className: "my-2" }),
2166
2166
  /* @__PURE__ */ i(I, { item: !0, container: !0, children: /* @__PURE__ */ $(I, { item: !0, size: { xs: 11 }, children: [
2167
2167
  /* @__PURE__ */ i(Ae, { variant: "h6", "data-testid": "health-infra-header", className: "text-customBlue", children: O("Health InfraStructure") }),
@@ -2181,7 +2181,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
2181
2181
  )
2182
2182
  ] }) })
2183
2183
  ] }),
2184
- R.isEkavach && ve("roleId") != null && [66, 143].includes(Number(ve("roleId"))) && /* @__PURE__ */ i(I, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ i(Y, { label: "Select User Type", children: /* @__PURE__ */ i(ca, { component: "fieldset", children: /* @__PURE__ */ i(
2184
+ M.isEkavach && je("roleId") != null && [66, 143].includes(Number(je("roleId"))) && /* @__PURE__ */ i(I, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ i(Y, { label: "Select User Type", children: /* @__PURE__ */ i(ca, { component: "fieldset", children: /* @__PURE__ */ i(
2185
2185
  da,
2186
2186
  {
2187
2187
  name: "typeOfUser",
@@ -2234,7 +2234,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
2234
2234
  }
2235
2235
  ) }) }) })
2236
2236
  ] }) }),
2237
- w && /* @__PURE__ */ i(Ce, { children: /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 6 }, className: "mx-0", children: /* @__PURE__ */ i(I, { container: !0, direction: "column", spacing: 0, className: "h-full", children: /* @__PURE__ */ $(I, { container: !0, children: [
2237
+ w && /* @__PURE__ */ i(Ne, { children: /* @__PURE__ */ i(I, { item: !0, size: { xs: 12, sm: 6 }, className: "mx-0", children: /* @__PURE__ */ i(I, { container: !0, direction: "column", spacing: 0, className: "h-full", children: /* @__PURE__ */ $(I, { container: !0, children: [
2238
2238
  /* @__PURE__ */ i(I, { item: !0, size: { xs: 11 }, children: /* @__PURE__ */ i(Y, { label: "Specialization", required: !0, children: /* @__PURE__ */ i(
2239
2239
  oa,
2240
2240
  {
@@ -2248,7 +2248,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
2248
2248
  dataTestId: "specialization-dropdown"
2249
2249
  }
2250
2250
  ) }) }),
2251
- R.hasCheckRights(
2251
+ M.hasCheckRights(
2252
2252
  t == null ? void 0 : t["upload.manage.users.doctorSignature"],
2253
2253
  void 0,
2254
2254
  !0
@@ -2278,7 +2278,7 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
2278
2278
  ] }) })
2279
2279
  ] }) }) }) }),
2280
2280
  /* @__PURE__ */ i(xa, { className: "my-2" }),
2281
- /* @__PURE__ */ i(I, { item: !0, container: !0, size: { xs: 12 }, justifyContent: "flex-end", children: /* @__PURE__ */ $(Ce, { children: [
2281
+ /* @__PURE__ */ i(I, { item: !0, container: !0, size: { xs: 12 }, justifyContent: "flex-end", children: /* @__PURE__ */ $(Ne, { children: [
2282
2282
  /* @__PURE__ */ i(
2283
2283
  ta,
2284
2284
  {
@@ -2298,9 +2298,9 @@ const $a = /* @__PURE__ */ Si(Ui), $i = Oa(() => import("./ChangePasswordModalCo
2298
2298
  variant: "contained",
2299
2299
  color: "primary",
2300
2300
  type: "submit",
2301
- disabled: me || he,
2301
+ disabled: me || ue,
2302
2302
  "data-testid": "submit-button",
2303
- children: N ? ` ${O("Update")}` : `${O("Submit")}`
2303
+ children: C ? ` ${O("Update")}` : `${O("Submit")}`
2304
2304
  }
2305
2305
  )
2306
2306
  ] }) })
@@ -2317,4 +2317,4 @@ export {
2317
2317
  fr as M,
2318
2318
  qa as P
2319
2319
  };
2320
- //# sourceMappingURL=ManageUser-DDzyd9jm.js.map
2320
+ //# sourceMappingURL=ManageUser-DZltBina.js.map