@argusoft/medplat-core 1.0.31 → 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.
- package/dist/{AccessRights-DUgY6ewy.js → AccessRights-DBjTQA1-.js} +421 -424
- package/dist/AccessRights-DBjTQA1-.js.map +1 -0
- package/dist/{AddFeatures-D1sU8RjY.js → AddFeatures-COj4ZTIM.js} +2 -2
- package/dist/{AddFeatures-D1sU8RjY.js.map → AddFeatures-COj4ZTIM.js.map} +1 -1
- package/dist/AddMenuConfiguration-Creeib5X.js +11223 -0
- package/dist/AddMenuConfiguration-Creeib5X.js.map +1 -0
- package/dist/AddMenuConfiguration.css +1 -1
- package/dist/{BrandsPage-DMw2vT0u-BVhvhc6J.js → BrandsPage-CdcAvaml-ZtVTX6vX.js} +45 -45
- package/dist/{BrandsPage-DMw2vT0u-BVhvhc6J.js.map → BrandsPage-CdcAvaml-ZtVTX6vX.js.map} +1 -1
- package/dist/{CategoriesPage-D3ihx9Gi-CT58g0ry.js → CategoriesPage-BprQEYJw-CclreTv1.js} +43 -43
- package/dist/{CategoriesPage-D3ihx9Gi-CT58g0ry.js.map → CategoriesPage-BprQEYJw-CclreTv1.js.map} +1 -1
- package/dist/{ChangePasswordModalCore-lQ9GamH1.js → ChangePasswordModalCore-DZGOkbRY.js} +3 -3
- package/dist/{ChangePasswordModalCore-lQ9GamH1.js.map → ChangePasswordModalCore-DZGOkbRY.js.map} +1 -1
- package/dist/{ConditionConfig-BQBmBHaM.js → ConditionConfig-Bpm6OoV5.js} +3 -3
- package/dist/{ConditionConfig-BQBmBHaM.js.map → ConditionConfig-Bpm6OoV5.js.map} +1 -1
- package/dist/{DashboardPage-asr2XDRu-uOOlX9Vq.js → DashboardPage-CTiGSx71-CsYohJ5e.js} +29 -29
- package/dist/{DashboardPage-asr2XDRu-uOOlX9Vq.js.map → DashboardPage-CTiGSx71-CsYohJ5e.js.map} +1 -1
- package/dist/EntityManagement-BGwJGl9k.js +62 -0
- package/dist/EntityManagement-BGwJGl9k.js.map +1 -0
- package/dist/{EventConfigurations-CUPEN5BV.js → EventConfigurations-B-z7xHh_.js} +3 -3
- package/dist/{EventConfigurations-CUPEN5BV.js.map → EventConfigurations-B-z7xHh_.js.map} +1 -1
- package/dist/{EventsExceptionModal-BX-ArkBE.js → EventsExceptionModal-DafomIv6.js} +2 -2
- package/dist/{EventsExceptionModal-BX-ArkBE.js.map → EventsExceptionModal-DafomIv6.js.map} +1 -1
- package/dist/{EventsUi-D6O9S7BK.js → EventsUi-Dl_yckSA.js} +37 -32
- package/dist/EventsUi-Dl_yckSA.js.map +1 -0
- package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js +112 -0
- package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js.map +1 -0
- package/dist/{FeatureMenu-CHsBbw3W.js → FeatureMenu-Kc73yPHH.js} +2 -2
- package/dist/{FeatureMenu-CHsBbw3W.js.map → FeatureMenu-Kc73yPHH.js.map} +1 -1
- package/dist/{FhirServerList-iXBPkRVF.js → FhirServerList-CrIHMAxz.js} +19 -19
- package/dist/{FhirServerList-iXBPkRVF.js.map → FhirServerList-CrIHMAxz.js.map} +1 -1
- package/dist/{FhirServerProfile-CUOwC6Wb.js → FhirServerProfile-D3aYcpwY.js} +8 -8
- package/dist/{FhirServerProfile-CUOwC6Wb.js.map → FhirServerProfile-D3aYcpwY.js.map} +1 -1
- package/dist/{FhirServerWizard-DZI8Olku.js → FhirServerWizard-Db6Hm4bQ.js} +15 -15
- package/dist/{FhirServerWizard-DZI8Olku.js.map → FhirServerWizard-Db6Hm4bQ.js.map} +1 -1
- package/dist/{ImmunizationConfigurationBase-aUtx0JEe.js → ImmunizationConfigurationBase-lKsJZMak.js} +1342 -1301
- package/dist/ImmunizationConfigurationBase-lKsJZMak.js.map +1 -0
- package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js +1017 -0
- package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js.map +1 -0
- package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js +1344 -0
- package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js.map +1 -0
- package/dist/{ManageDynamicFeature-BU0I45dd.js → ManageDynamicFeature-CuyYfx_P.js} +104 -97
- package/dist/ManageDynamicFeature-CuyYfx_P.js.map +1 -0
- package/dist/{ManageEventConfiguration-DqW3krT6.js → ManageEventConfiguration-DqPbn3Oi.js} +5 -5
- package/dist/{ManageEventConfiguration-DqW3krT6.js.map → ManageEventConfiguration-DqPbn3Oi.js.map} +1 -1
- package/dist/ManageRole-CyfpySt9.js +981 -0
- package/dist/ManageRole-CyfpySt9.js.map +1 -0
- package/dist/{ManageUser-DZltBina.js → ManageUser-Dm0l833u.js} +172 -172
- package/dist/{ManageUser-DZltBina.js.map → ManageUser-Dm0l833u.js.map} +1 -1
- package/dist/{MemberProfileCard-D5CgkTdJ-D2NgDJl3.js → MemberProfileCard-01d_jz3w-DYHtbgMX.js} +37 -37
- package/dist/{MemberProfileCard-D5CgkTdJ-D2NgDJl3.js.map → MemberProfileCard-01d_jz3w-DYHtbgMX.js.map} +1 -1
- package/dist/MobileAnalytics-C9oc2yAo.js +18399 -0
- package/dist/MobileAnalytics-C9oc2yAo.js.map +1 -0
- package/dist/MobileMenuManagement-BmzTPXy7.js +231 -0
- package/dist/MobileMenuManagement-BmzTPXy7.js.map +1 -0
- package/dist/{MobileTypeEventConfigModal-CMcj7Ozp.js → MobileTypeEventConfigModal-DodU3beR.js} +3 -3
- package/dist/{MobileTypeEventConfigModal-CMcj7Ozp.js.map → MobileTypeEventConfigModal-DodU3beR.js.map} +1 -1
- package/dist/{NewServerManagement-Cxe0dV0O.js → NewServerManagement-BdayO78D.js} +368 -352
- package/dist/NewServerManagement-BdayO78D.js.map +1 -0
- package/dist/OtherTypeEventConfigModal-D_9S50aI.js +1414 -0
- package/dist/OtherTypeEventConfigModal-D_9S50aI.js.map +1 -0
- package/dist/{PaymentCreatePage-DfvSZ-kB-CckogYoe.js → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js} +56 -56
- package/dist/{PaymentCreatePage-DfvSZ-kB-CckogYoe.js.map → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js.map} +1 -1
- package/dist/{PaymentsPage-DMNjYWAJ-ChO9IXmk.js → PaymentsPage-CHieGNrn-BnYCtqHd.js} +38 -38
- package/dist/{PaymentsPage-DMNjYWAJ-ChO9IXmk.js.map → PaymentsPage-CHieGNrn-BnYCtqHd.js.map} +1 -1
- package/dist/{PermissionsModal-CCYkcKlC.js → PermissionsModal-Dxbkkrqe.js} +18 -18
- package/dist/PermissionsModal-Dxbkkrqe.js.map +1 -0
- package/dist/{PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js} +2 -2
- package/dist/{PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js.map → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js.map} +1 -1
- package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js +801 -0
- package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js.map +1 -0
- package/dist/{PickupsPage-D7zyioJB-bHKnARYw.js → PickupsPage-BWblMlic-CWkgeBw0.js} +122 -122
- package/dist/PickupsPage-BWblMlic-CWkgeBw0.js.map +1 -0
- package/dist/PmGuard-BvUUbU80-BpYNaDzl.js +641 -0
- package/dist/PmGuard-BvUUbU80-BpYNaDzl.js.map +1 -0
- package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js +1523 -0
- package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js.map +1 -0
- package/dist/{ProductsPage-DvNHIeZt-BoOOJJtk.js → ProductsPage-BI22nPb4-CQBjnc-n.js} +29 -29
- package/dist/{ProductsPage-DvNHIeZt-BoOOJJtk.js.map → ProductsPage-BI22nPb4-CQBjnc-n.js.map} +1 -1
- package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js +724 -0
- package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js.map +1 -0
- package/dist/{PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js → PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js} +446 -436
- package/dist/PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js.map +1 -0
- package/dist/{PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js} +55 -55
- package/dist/{PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js.map → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js.map} +1 -1
- package/dist/{PurchasesPage-DgL5T6BY-DePUuE9l.js → PurchasesPage-Djl1AqD_-DXeYFMrX.js} +61 -61
- package/dist/{PurchasesPage-DgL5T6BY-DePUuE9l.js.map → PurchasesPage-Djl1AqD_-DXeYFMrX.js.map} +1 -1
- package/dist/{RoleManagement-s8iNx2Mu.js → RoleManagement-DVYufwy-.js} +3 -3
- package/dist/{RoleManagement-s8iNx2Mu.js.map → RoleManagement-DVYufwy-.js.map} +1 -1
- package/dist/Roles-BoNGJhtR.js +19 -0
- package/dist/Roles-BoNGJhtR.js.map +1 -0
- package/dist/{SaleCreatePage-CZnIOydv-DKBw-qp7.js → SaleCreatePage-DHBLmlBr-BlgjVsq6.js} +33 -33
- package/dist/{SaleCreatePage-CZnIOydv-DKBw-qp7.js.map → SaleCreatePage-DHBLmlBr-BlgjVsq6.js.map} +1 -1
- package/dist/{SalesPage-DPIRrC_O-M8rqnK7z.js → SalesPage-eF9Yr42z-BQ9FlXC3.js} +34 -34
- package/dist/SalesPage-eF9Yr42z-BQ9FlXC3.js.map +1 -0
- package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js +741 -0
- package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js.map +1 -0
- package/dist/{StorageUnitsPage-BDRkdCjW-UF64rf7q.js → StorageUnitsPage-CTEVuemZ-B4osG74N.js} +213 -190
- package/dist/StorageUnitsPage-CTEVuemZ-B4osG74N.js.map +1 -0
- package/dist/{SubMenu-BdMTYtC1.js → SubMenu-OO2zhKiu.js} +2 -2
- package/dist/{SubMenu-BdMTYtC1.js.map → SubMenu-OO2zhKiu.js.map} +1 -1
- package/dist/{TableDetails-BtafRxXb.js → TableDetails-Cc40dEUs.js} +272 -267
- package/dist/TableDetails-Cc40dEUs.js.map +1 -0
- package/dist/{TableList-Dpo6dO7S.js → TableList-B5tX4wII.js} +316 -312
- package/dist/TableList-B5tX4wII.js.map +1 -0
- package/dist/{TransactionsPage-CqWTMNU8-Df6eGFDW.js → TransactionsPage-Zuu7sjID-B-ACzvd1.js} +185 -170
- package/dist/TransactionsPage-Zuu7sjID-B-ACzvd1.js.map +1 -0
- package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js +635 -0
- package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js.map +1 -0
- package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js +600 -0
- package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js.map +1 -0
- package/dist/{TypeConfiguration-JbRCN6GR.js → TypeConfiguration-EaFiOzRE.js} +3 -3
- package/dist/{TypeConfiguration-JbRCN6GR.js.map → TypeConfiguration-EaFiOzRE.js.map} +1 -1
- package/dist/UserList-Cf5B-o_1.js +1904 -0
- package/dist/UserList-Cf5B-o_1.js.map +1 -0
- package/dist/Users-MC7txo1V.js +43 -0
- package/dist/{Users-CsJ08Kjm.js.map → Users-MC7txo1V.js.map} +1 -1
- package/dist/VaccineEducation-T_UE57Ef.js +231 -0
- package/dist/VaccineEducation-T_UE57Ef.js.map +1 -0
- package/dist/VaccineEducation.css +1 -0
- package/dist/VaccineEducationConfigurator-CWc20_rv.js +50948 -0
- package/dist/VaccineEducationConfigurator-CWc20_rv.js.map +1 -0
- package/dist/VaccineEducationConfigurator.css +4 -0
- package/dist/VaccineEducationList-Ok7_5EFb.js +334 -0
- package/dist/VaccineEducationList-Ok7_5EFb.js.map +1 -0
- package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js +457 -0
- package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js.map +1 -0
- package/dist/{constants-DpXnLsAB-D6lN5cjK.js → constants-BTpJFQe_-CYPZIqQF.js} +160 -61
- package/dist/constants-BTpJFQe_-CYPZIqQF.js.map +1 -0
- package/dist/dashboardLayoutUtils--xUnoKPa.js +615 -0
- package/dist/dashboardLayoutUtils--xUnoKPa.js.map +1 -0
- package/dist/index-mfoqII2U.js +524 -0
- package/dist/index-mfoqII2U.js.map +1 -0
- package/dist/{index-D9YNFPn9.js → index-o8Pyt1Bt.js} +445 -439
- package/dist/index-o8Pyt1Bt.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.lib-ETRQOzvE.js → index.lib-BySa9-Z-.js} +302 -260
- package/dist/index.lib-BySa9-Z-.js.map +1 -0
- package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js +43 -0
- package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js.map +1 -0
- package/package.json +5 -1
- package/dist/AccessRights-DUgY6ewy.js.map +0 -1
- package/dist/AddMenuConfiguration-c6ZKiN0i.js +0 -8898
- package/dist/AddMenuConfiguration-c6ZKiN0i.js.map +0 -1
- package/dist/EntityManagement-CPQL6qBj.js +0 -50
- package/dist/EntityManagement-CPQL6qBj.js.map +0 -1
- package/dist/EventsUi-D6O9S7BK.js.map +0 -1
- package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js +0 -79
- package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-aUtx0JEe.js.map +0 -1
- package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js +0 -665
- package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js.map +0 -1
- package/dist/ManageDynamicFeature-BU0I45dd.js.map +0 -1
- package/dist/ManageRole-CNZBRKGU.js +0 -776
- package/dist/ManageRole-CNZBRKGU.js.map +0 -1
- package/dist/MobileAnalytics-BLOionG_.js +0 -17301
- package/dist/MobileAnalytics-BLOionG_.js.map +0 -1
- package/dist/MobileMenuManagement-68Wijb0X.js +0 -220
- package/dist/MobileMenuManagement-68Wijb0X.js.map +0 -1
- package/dist/NewServerManagement-Cxe0dV0O.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-stNmuSv_.js +0 -1812
- package/dist/OtherTypeEventConfigModal-stNmuSv_.js.map +0 -1
- package/dist/PermissionsModal-CCYkcKlC.js.map +0 -1
- package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js +0 -783
- package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js.map +0 -1
- package/dist/PickupsPage-D7zyioJB-bHKnARYw.js.map +0 -1
- package/dist/PmGuard-BZE-y4In-D_pUm5MP.js +0 -599
- package/dist/PmGuard-BZE-y4In-D_pUm5MP.js.map +0 -1
- package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js +0 -1305
- package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js.map +0 -1
- package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js +0 -675
- package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js.map +0 -1
- package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map +0 -1
- package/dist/Roles-BIyiic67.js +0 -14
- package/dist/Roles-BIyiic67.js.map +0 -1
- package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js.map +0 -1
- package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js +0 -676
- package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js.map +0 -1
- package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map +0 -1
- package/dist/TableDetails-BtafRxXb.js.map +0 -1
- package/dist/TableList-Dpo6dO7S.js.map +0 -1
- package/dist/TransactionsPage-CqWTMNU8-Df6eGFDW.js.map +0 -1
- package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js +0 -315
- package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js.map +0 -1
- package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js +0 -476
- package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js.map +0 -1
- package/dist/UserList-L41Xw0Q6.js +0 -1129
- package/dist/UserList-L41Xw0Q6.js.map +0 -1
- package/dist/Users-CsJ08Kjm.js +0 -40
- package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js +0 -321
- package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js.map +0 -1
- package/dist/constants-DpXnLsAB-D6lN5cjK.js.map +0 -1
- package/dist/dashboardLayoutUtils-CJivzaU1.js +0 -408
- package/dist/dashboardLayoutUtils-CJivzaU1.js.map +0 -1
- package/dist/index-D9YNFPn9.js.map +0 -1
- package/dist/index.lib-ETRQOzvE.js.map +0 -1
- package/dist/listValueStore-BFQtDYIR-Bj0yX145.js +0 -36
- package/dist/listValueStore-BFQtDYIR-Bj0yX145.js.map +0 -1
|
@@ -0,0 +1,981 @@
|
|
|
1
|
+
import { jsxs as r, jsx as a, Fragment as ee } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as A, useState as se, useEffect as Z, useCallback as ae } from "react";
|
|
3
|
+
import { Modal as Ee, Box as G, IconButton as ke, Alert as _e, FormControl as C, Tooltip as Be, FormGroup as Fe, Button as me } from "@mui/material";
|
|
4
|
+
import Se from "@/hooks/useTrackEvent";
|
|
5
|
+
import { b as qe, a as Le, c as Ae, e as De } from "./Roles-BoNGJhtR.js";
|
|
6
|
+
import { getRoleList as Oe, getLocationTypes as Pe, execute as te } from "@/common/services/GlobalApis";
|
|
7
|
+
import { showToast as le } from "@/common/toaster/toaster";
|
|
8
|
+
import { useForm as He } from "react-hook-form";
|
|
9
|
+
import { yupResolver as We } from "@hookform/resolvers/yup";
|
|
10
|
+
import "@/assets/scss/scrollBar.scss";
|
|
11
|
+
import { FormItem as g } from "@/views/custom-components/FormItem.jsx";
|
|
12
|
+
import * as R from "yup";
|
|
13
|
+
import V from "@/views/custom-components/CustomTextField";
|
|
14
|
+
import ue from "@/views/custom-components/CustomDropdown";
|
|
15
|
+
import oe from "@/views/custom-components/CustomCheckBox";
|
|
16
|
+
import L from "@/views/custom-components/CustomAutoComplete";
|
|
17
|
+
import { useTranslateProvider as $e } from "@/common/languageTranslator/TranslationContext";
|
|
18
|
+
import { FontAwesomeIcon as he } from "@fortawesome/react-fontawesome";
|
|
19
|
+
import { faXmark as je, faCircleInfo as Ue } from "@fortawesome/free-solid-svg-icons";
|
|
20
|
+
import ze from "@/common/services/util/GeneralUtil";
|
|
21
|
+
import x from "@/common/config/implementationConfig";
|
|
22
|
+
import k from "prop-types";
|
|
23
|
+
import re from "@/views/custom-components/CustomToggleSwitch";
|
|
24
|
+
import { useSelector as Ge } from "react-redux";
|
|
25
|
+
import { getUseSkeleton as Ve } from "@/store/reducers/SkeletonReducer";
|
|
26
|
+
const fe = ({ children: d, isLoading: i }) => !Ge(Ve) || !i ? d : /* @__PURE__ */ r("div", { className: "pt-6 h-[88vh]", children: [
|
|
27
|
+
/* @__PURE__ */ r("div", { className: "px-8 pt-2 pb-4 flex items-center justify-between", children: [
|
|
28
|
+
/* @__PURE__ */ a("div", { className: "bg-gray-300 animate-pulse rounded-md w-32 h-8" }),
|
|
29
|
+
/* @__PURE__ */ a("div", { className: "bg-gray-300 animate-pulse rounded-full w-10 h-10" })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ r("div", { className: "px-8 pb-8 space-y-6 overflow-y-auto max-h-[80vh]", children: [
|
|
32
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [1, 2, 3].map((s) => /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
33
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
34
|
+
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
35
|
+
] }, s)) }),
|
|
36
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */ r("div", { className: "w-full", children: [
|
|
37
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
|
|
38
|
+
/* @__PURE__ */ a("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
|
|
39
|
+
] }) }),
|
|
40
|
+
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
41
|
+
[1, 2].map((s) => /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
42
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
|
|
43
|
+
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
44
|
+
] }, s)),
|
|
45
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [1, 2].map((s) => /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
46
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
47
|
+
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
48
|
+
] }, s)) }),
|
|
49
|
+
[1, 2].map((s) => /* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
50
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
51
|
+
/* @__PURE__ */ a("div", { className: "h-10 bg-gray-300 rounded animate-pulse w-full" })
|
|
52
|
+
] }, s))
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-6", children: [
|
|
55
|
+
/* @__PURE__ */ r("div", { className: "w-[60%]", children: [
|
|
56
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 mb-2 animate-pulse" }),
|
|
57
|
+
/* @__PURE__ */ a("div", { className: "h-8 bg-gray-300 rounded-full w-16 animate-pulse" })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ r("div", { className: "w-[40%] flex items-center gap-2", children: [
|
|
60
|
+
/* @__PURE__ */ a("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
|
|
61
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/3 animate-pulse" })
|
|
62
|
+
] })
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
65
|
+
/* @__PURE__ */ a("div", { className: "h-4 bg-gray-300 rounded w-1/4 mb-2 animate-pulse" }),
|
|
66
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4", children: [1, 2, 3, 4].map((s) => /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
67
|
+
/* @__PURE__ */ a("div", { className: "h-5 w-5 bg-gray-300 rounded animate-pulse" }),
|
|
68
|
+
/* @__PURE__ */ a("div", { className: "h-4 w-16 bg-gray-300 rounded animate-pulse" })
|
|
69
|
+
] }, s)) })
|
|
70
|
+
] })
|
|
71
|
+
] }),
|
|
72
|
+
/* @__PURE__ */ r("div", { className: "flex items-center justify-end gap-3 pt-6 px-8 pb-4 border-t border-slate-100", children: [
|
|
73
|
+
/* @__PURE__ */ a("div", { className: "h-9 w-20 bg-gray-300 rounded animate-pulse" }),
|
|
74
|
+
/* @__PURE__ */ a("div", { className: "h-9 w-24 bg-gray-300 rounded animate-pulse" })
|
|
75
|
+
] })
|
|
76
|
+
] });
|
|
77
|
+
fe.propTypes = {
|
|
78
|
+
children: k.any,
|
|
79
|
+
isLoading: k.any
|
|
80
|
+
};
|
|
81
|
+
const D = 50, Ze = /^[A-Z]+(_[A-Z]+)*$/, Xe = [
|
|
82
|
+
"TWO",
|
|
83
|
+
"THREE",
|
|
84
|
+
"FOUR",
|
|
85
|
+
"FIVE",
|
|
86
|
+
"SIX",
|
|
87
|
+
"SEVEN",
|
|
88
|
+
"EIGHT",
|
|
89
|
+
"NINE",
|
|
90
|
+
"TEN"
|
|
91
|
+
], ge = 400, Ke = (d = "") => d.toUpperCase().replace(/[^A-Z]+/g, "_").replace(/^_+|_+$/g, "").slice(0, D).replace(/_+$/g, ""), Ye = (d = "") => d.toUpperCase().replace(/[^A-Z_]/g, "").slice(0, D), Je = (d, i) => {
|
|
92
|
+
const u = D - i.length - 1, s = d.slice(0, Math.max(u, 0)).replace(/_+$/g, "");
|
|
93
|
+
return s ? `${s}_${i}` : "";
|
|
94
|
+
}, Qe = (d, i, u) => {
|
|
95
|
+
const s = (f) => {
|
|
96
|
+
const M = i.get(f);
|
|
97
|
+
return !M || M.roleId === u;
|
|
98
|
+
};
|
|
99
|
+
return s(d) ? d : Xe.map((f) => Je(d, f)).find(
|
|
100
|
+
(f) => f && s(f)
|
|
101
|
+
) ?? "";
|
|
102
|
+
}, ea = ({
|
|
103
|
+
name: d,
|
|
104
|
+
code: i,
|
|
105
|
+
roleId: u,
|
|
106
|
+
isLocked: s,
|
|
107
|
+
isOpen: f,
|
|
108
|
+
setValue: M,
|
|
109
|
+
trigger: B
|
|
110
|
+
}) => {
|
|
111
|
+
const E = A(/* @__PURE__ */ new Map()), p = A(!1), S = A(0), [X, v] = se({ state: "idle", message: "" });
|
|
112
|
+
Z(() => {
|
|
113
|
+
f || (p.current = !1, E.current = /* @__PURE__ */ new Map(), v({ state: "idle", message: "" }));
|
|
114
|
+
}, [f]);
|
|
115
|
+
const w = ae(async (T) => {
|
|
116
|
+
const t = S.current + 1;
|
|
117
|
+
S.current = t;
|
|
118
|
+
const { data: y } = await qe(T);
|
|
119
|
+
if (t !== S.current)
|
|
120
|
+
return null;
|
|
121
|
+
const n = /* @__PURE__ */ new Map();
|
|
122
|
+
return ((y == null ? void 0 : y.result) ?? []).forEach((F) => {
|
|
123
|
+
F != null && F.roleCode && n.set(F.roleCode.trim().toUpperCase(), F);
|
|
124
|
+
}), E.current = n, n;
|
|
125
|
+
}, []), K = ae(
|
|
126
|
+
(T) => {
|
|
127
|
+
const t = E.current.get((T ?? "").toUpperCase());
|
|
128
|
+
return !t || t.roleId === u;
|
|
129
|
+
},
|
|
130
|
+
[u]
|
|
131
|
+
), W = ae(() => {
|
|
132
|
+
p.current = !0;
|
|
133
|
+
}, []);
|
|
134
|
+
return Z(() => {
|
|
135
|
+
if (!f || s || p.current)
|
|
136
|
+
return;
|
|
137
|
+
const T = Ke(d);
|
|
138
|
+
if (!T) {
|
|
139
|
+
E.current = /* @__PURE__ */ new Map(), M("code", ""), v({ state: "idle", message: "" });
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
v({ state: "checking", message: "Checking availability..." });
|
|
143
|
+
const t = setTimeout(async () => {
|
|
144
|
+
try {
|
|
145
|
+
const y = await w(T);
|
|
146
|
+
if (!y)
|
|
147
|
+
return;
|
|
148
|
+
const n = Qe(T, y, u);
|
|
149
|
+
M("code", n), v(
|
|
150
|
+
n ? {
|
|
151
|
+
state: "available",
|
|
152
|
+
message: "System generated, you can change it"
|
|
153
|
+
} : {
|
|
154
|
+
state: "taken",
|
|
155
|
+
message: "Could not generate a free code, please enter one"
|
|
156
|
+
}
|
|
157
|
+
), B("code");
|
|
158
|
+
} catch (y) {
|
|
159
|
+
console.error(y), v({
|
|
160
|
+
state: "error",
|
|
161
|
+
message: "Could not verify Role Code availability"
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}, ge);
|
|
165
|
+
return () => clearTimeout(t);
|
|
166
|
+
}, [d, f, s, u, w, M, B]), Z(() => {
|
|
167
|
+
if (!f || s || !p.current)
|
|
168
|
+
return;
|
|
169
|
+
if (!i) {
|
|
170
|
+
E.current = /* @__PURE__ */ new Map(), v({ state: "idle", message: "" });
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
v({ state: "checking", message: "Checking availability..." });
|
|
174
|
+
const T = setTimeout(async () => {
|
|
175
|
+
try {
|
|
176
|
+
const t = await w(i);
|
|
177
|
+
if (!t)
|
|
178
|
+
return;
|
|
179
|
+
const y = t.get(i.toUpperCase());
|
|
180
|
+
v(
|
|
181
|
+
y && y.roleId !== u ? {
|
|
182
|
+
state: "taken",
|
|
183
|
+
message: `Already used by "${y.roleName}"`
|
|
184
|
+
} : { state: "available", message: "Role Code is available" }
|
|
185
|
+
), B("code");
|
|
186
|
+
} catch (t) {
|
|
187
|
+
console.error(t), v({
|
|
188
|
+
state: "error",
|
|
189
|
+
message: "Could not verify Role Code availability"
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}, ge);
|
|
193
|
+
return () => clearTimeout(T);
|
|
194
|
+
}, [i, f, s, u, w, B]), { status: X, isCodeAvailable: K, markAsManuallyEdited: W };
|
|
195
|
+
}, aa = [{ name: "WEB" }, { name: "MOBILE" }, { name: "BOTH" }], ta = [
|
|
196
|
+
{ label: "Authenticator App", value: "AUTHENTICATOR_APP" }
|
|
197
|
+
], la = ({
|
|
198
|
+
selectedId: d,
|
|
199
|
+
isUpdate: i,
|
|
200
|
+
open: u,
|
|
201
|
+
setOpen: s,
|
|
202
|
+
isRoleListModified: f
|
|
203
|
+
}) => {
|
|
204
|
+
var de;
|
|
205
|
+
const M = A(null), B = A(!1), E = Se(), [p, S] = se({}), [X, v] = se(!1), w = !!(i && ((de = p == null ? void 0 : p.roleData) != null && de.code)), K = i && !w, W = A(() => !0), T = R.object().shape({
|
|
206
|
+
name: R.string().required("Enter Role Name"),
|
|
207
|
+
code: w ? R.string().notRequired() : R.string().required("Enter Role Code").max(
|
|
208
|
+
D,
|
|
209
|
+
`Role Code cannot be longer than ${D} characters`
|
|
210
|
+
).test("role-code-format", "Enter a valid Role Code", function(e) {
|
|
211
|
+
return e ? /[^A-Z_]/.test(e) ? this.createError({
|
|
212
|
+
message: "Role Code can contain capital letters and underscores only"
|
|
213
|
+
}) : e.startsWith("_") ? this.createError({
|
|
214
|
+
message: "Role Code cannot start with an underscore"
|
|
215
|
+
}) : e.endsWith("_") ? this.createError({
|
|
216
|
+
message: "Role Code cannot end with an underscore"
|
|
217
|
+
}) : e.includes("__") ? this.createError({
|
|
218
|
+
message: "Role Code cannot contain two underscores in a row"
|
|
219
|
+
}) : Ze.test(e) : !0;
|
|
220
|
+
}).test(
|
|
221
|
+
"role-code-available",
|
|
222
|
+
"This Role Code is already in use",
|
|
223
|
+
(e) => W.current(e)
|
|
224
|
+
),
|
|
225
|
+
locationTypes: R.array().when("isLocationRequired", {
|
|
226
|
+
is: !0,
|
|
227
|
+
then: (e) => e.min(1, "Select Location Type").required("Select Location Type"),
|
|
228
|
+
otherwise: (e) => e.notRequired()
|
|
229
|
+
}),
|
|
230
|
+
roleType: x.role.showRoleType ? R.string().required("Select Role Type") : R.string().notRequired(),
|
|
231
|
+
isBankDetailsRequired: x.role.showBankDetailsRequired ? R.boolean().nullable().defined("Please Select a Value") : R.boolean().notRequired(),
|
|
232
|
+
healthInfrastructureIds: R.array().when("isHealthInfraMandatory", {
|
|
233
|
+
is: !0,
|
|
234
|
+
then: (e) => e.min(1, "Select Health Infrastructure Type").required("Select Health Infrastructure Type"),
|
|
235
|
+
otherwise: (e) => e.notRequired()
|
|
236
|
+
}),
|
|
237
|
+
twoFactorType: R.string().when("isTwoFactorEnabled", {
|
|
238
|
+
is: !0,
|
|
239
|
+
then: (e) => e.required("Select Authentication Method"),
|
|
240
|
+
otherwise: (e) => e.notRequired().nullable()
|
|
241
|
+
})
|
|
242
|
+
}), {
|
|
243
|
+
control: t,
|
|
244
|
+
handleSubmit: y,
|
|
245
|
+
formState: { errors: n, isSubmitting: F },
|
|
246
|
+
setValue: N,
|
|
247
|
+
// getValues,
|
|
248
|
+
watch: _,
|
|
249
|
+
reset: pe,
|
|
250
|
+
trigger: ye
|
|
251
|
+
} = He({
|
|
252
|
+
defaultValues: {
|
|
253
|
+
name: "",
|
|
254
|
+
locationTypes: [],
|
|
255
|
+
maxPosition: "",
|
|
256
|
+
maxHealthInfra: "",
|
|
257
|
+
roleType: "",
|
|
258
|
+
isLastNameMandatory: !1,
|
|
259
|
+
isAadharNumMandatory: !1,
|
|
260
|
+
isEmailMandatory: !1,
|
|
261
|
+
isContactNumMandatory: !1,
|
|
262
|
+
isConvoxIdMandatory: !1,
|
|
263
|
+
isHealthInfraMandatory: !1,
|
|
264
|
+
isGeolocationMandatory: !1,
|
|
265
|
+
roleIds: [],
|
|
266
|
+
canManageRoleIds: [],
|
|
267
|
+
manageByTeamTypeIds: [],
|
|
268
|
+
canSelfManage: !1,
|
|
269
|
+
healthInfrastructureIds: [],
|
|
270
|
+
categoryIds: [],
|
|
271
|
+
isBankDetailsRequired: !1,
|
|
272
|
+
isBankDetailsMandatory: !1,
|
|
273
|
+
isTwoFactorEnabled: !1,
|
|
274
|
+
twoFactorType: "",
|
|
275
|
+
id: "",
|
|
276
|
+
code: "",
|
|
277
|
+
description: "",
|
|
278
|
+
createdBy: "",
|
|
279
|
+
state: "",
|
|
280
|
+
createdOn: "",
|
|
281
|
+
assignedFeatureList: "",
|
|
282
|
+
assignedFeatures: "",
|
|
283
|
+
isSmagTrainedMandatory: "",
|
|
284
|
+
isLocationRequired: !0,
|
|
285
|
+
isNodalMandatory: !1
|
|
286
|
+
},
|
|
287
|
+
resolver: We(T),
|
|
288
|
+
mode: "onChange",
|
|
289
|
+
shouldUnregister: !1
|
|
290
|
+
}), be = _("isBankDetailsRequired"), ve = _("isTwoFactorEnabled"), ne = _("roleType"), we = ne === "WEB" || ne === "BOTH", Y = _("locationTypes"), { translate: J } = $e(), Ne = _("isLocationRequired"), Te = _("isHealthInfraMandatory"), Ie = _("name"), Re = _("code"), {
|
|
291
|
+
status: ie,
|
|
292
|
+
isCodeAvailable: Ce,
|
|
293
|
+
markAsManuallyEdited: xe
|
|
294
|
+
} = ea({
|
|
295
|
+
name: Ie,
|
|
296
|
+
code: Re,
|
|
297
|
+
roleId: d,
|
|
298
|
+
isLocked: w,
|
|
299
|
+
isOpen: u !== 0,
|
|
300
|
+
setValue: N,
|
|
301
|
+
trigger: ye
|
|
302
|
+
});
|
|
303
|
+
W.current = Ce;
|
|
304
|
+
const Q = [
|
|
305
|
+
{ label: "Email", value: "isEmailMandatory" },
|
|
306
|
+
{ label: "Aadhar Number", value: "isAadharNumMandatory" },
|
|
307
|
+
{ label: "Contact Number", value: "isContactNumMandatory" },
|
|
308
|
+
{ label: "Convox Id", value: "isConvoxIdMandatory" },
|
|
309
|
+
{ label: "Last Name", value: "isLastNameMandatory" },
|
|
310
|
+
{ label: "Health Infrastructure", value: "isHealthInfraMandatory" },
|
|
311
|
+
{ label: "GeoLocation", value: "isGeolocationMandatory" },
|
|
312
|
+
{ label: "Smag Trained", value: "isSmagTrainedMandatory" },
|
|
313
|
+
{ label: "Nodal", value: "isNodalMandatory" },
|
|
314
|
+
{ label: "PFMS Code", value: "isPfmsCodeMandatory" },
|
|
315
|
+
{ label: "SNA Beneficiary ID", value: "isSnaBeneficiaryIdMandatory" }
|
|
316
|
+
].filter((e) => {
|
|
317
|
+
var l;
|
|
318
|
+
return ((l = x.role.mandatoryFieldsToExclude) == null ? void 0 : l.length) > 0 ? !x.role.mandatoryFieldsToExclude.includes(e.value) : !0;
|
|
319
|
+
}), $ = () => {
|
|
320
|
+
s(0), pe(), E("conversion_event", {
|
|
321
|
+
form: M.current,
|
|
322
|
+
form_name: "Manage Role",
|
|
323
|
+
submit: B.current
|
|
324
|
+
}), E("button_click", {
|
|
325
|
+
button_name: "add role close button",
|
|
326
|
+
button_type: "cancel",
|
|
327
|
+
button_id: "managerole-close-button"
|
|
328
|
+
});
|
|
329
|
+
}, q = (e, l, h) => {
|
|
330
|
+
N(h, l);
|
|
331
|
+
}, Me = async (e) => {
|
|
332
|
+
var l, h, j;
|
|
333
|
+
try {
|
|
334
|
+
E("button_click", {
|
|
335
|
+
button_name: i ? "update role button" : "add role button",
|
|
336
|
+
button_type: "submit",
|
|
337
|
+
button_id: "managerole-add-button"
|
|
338
|
+
}), delete e.bankDetailsRequired, delete e.bankDetailsMandatory, e.roleType !== "WEB" && e.roleType !== "BOTH" && (e.isTwoFactorEnabled = !1), e.isTwoFactorEnabled ? e.twoFactorType || (e.twoFactorType = "AUTHENTICATOR_APP") : e.twoFactorType = null, i || (delete e.id, delete e.state, delete e.createdOn, delete e.createdBy, delete e.description, delete e.assignedFeatures, delete e.assignedFeatureList), w || (e.code = (l = e.code) == null ? void 0 : l.trim().toUpperCase()), e.roleIds = e.roleIds.map((o) => o == null ? void 0 : o.id), e.canManageRoleIds = e.canManageRoleIds.map((o) => o == null ? void 0 : o.id), e.manageByTeamTypeIds = e.manageByTeamTypeIds.map(
|
|
339
|
+
(o) => o == null ? void 0 : o.id
|
|
340
|
+
), e.healthInfrastructureIds = e.healthInfrastructureIds.map(
|
|
341
|
+
(o) => o == null ? void 0 : o.id
|
|
342
|
+
), e.categoryIds = e.categoryIds.map((o) => o == null ? void 0 : o.id), e.locationTypes = e.isLocationRequired === !0 ? e.locationTypes : [], delete e.isLocationRequired, e.manageByRoleIds = e.roleIds, i ? await Ae(e) : await De(e), le({
|
|
343
|
+
type: "success",
|
|
344
|
+
message: `Role ${i ? "Updated" : "Added"} Successfully`
|
|
345
|
+
}), B.current = !0, $(), f();
|
|
346
|
+
} catch (o) {
|
|
347
|
+
le({
|
|
348
|
+
type: "error",
|
|
349
|
+
message: `Role Cannot be added: ${(j = (h = o == null ? void 0 : o.response) == null ? void 0 : h.data) == null ? void 0 : j.message}`
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
return Z(() => {
|
|
354
|
+
(async () => {
|
|
355
|
+
try {
|
|
356
|
+
v((h) => !h);
|
|
357
|
+
const l = ze.getEnv();
|
|
358
|
+
if (u !== 0) {
|
|
359
|
+
const [h, j, o, U, z] = await Promise.all([
|
|
360
|
+
Oe(),
|
|
361
|
+
Pe(),
|
|
362
|
+
te({
|
|
363
|
+
code: "team_all_types_for_roles",
|
|
364
|
+
parameters: {}
|
|
365
|
+
}),
|
|
366
|
+
te({
|
|
367
|
+
code: "retrieve_field_values_for_form_field",
|
|
368
|
+
parameters: {
|
|
369
|
+
form: "WEB",
|
|
370
|
+
fieldKey: "role_catg"
|
|
371
|
+
}
|
|
372
|
+
}),
|
|
373
|
+
te({
|
|
374
|
+
code: "retrieve_field_values_for_form_field",
|
|
375
|
+
parameters: {
|
|
376
|
+
form: "WEB",
|
|
377
|
+
fieldKey: "infra_type"
|
|
378
|
+
}
|
|
379
|
+
})
|
|
380
|
+
]);
|
|
381
|
+
if (S((I) => {
|
|
382
|
+
var O, P, H;
|
|
383
|
+
return {
|
|
384
|
+
...I,
|
|
385
|
+
roles: h.data,
|
|
386
|
+
locationData: j.data,
|
|
387
|
+
manageTeam: (O = o == null ? void 0 : o.data) == null ? void 0 : O.result,
|
|
388
|
+
category: (P = U == null ? void 0 : U.data) == null ? void 0 : P.result,
|
|
389
|
+
healthInfraType: (H = z == null ? void 0 : z.data) == null ? void 0 : H.result
|
|
390
|
+
};
|
|
391
|
+
}), d) {
|
|
392
|
+
const { data: I } = await Le(d);
|
|
393
|
+
S((c) => ({ ...c, roleData: I, env: l })), Object.keys(I).map((c) => N(c, I[c])), N("isBankDetailsRequired", I.isBankDetailsRequired), N("isBankDetailsMandatory", I.isBankDetailsMandatory);
|
|
394
|
+
const {
|
|
395
|
+
manageByTeamTypeIds: O,
|
|
396
|
+
healthInfrastructureIds: P,
|
|
397
|
+
roleIds: H,
|
|
398
|
+
categoryIds: ce
|
|
399
|
+
} = I;
|
|
400
|
+
N(
|
|
401
|
+
"manageByTeamTypeIds",
|
|
402
|
+
O ? O.map(
|
|
403
|
+
(c) => {
|
|
404
|
+
var b;
|
|
405
|
+
return (b = o.data.result) == null ? void 0 : b.find((m) => (m == null ? void 0 : m.id) === c);
|
|
406
|
+
}
|
|
407
|
+
) : []
|
|
408
|
+
), N(
|
|
409
|
+
"healthInfrastructureIds",
|
|
410
|
+
P ? P.map(
|
|
411
|
+
(c) => {
|
|
412
|
+
var b;
|
|
413
|
+
return (b = z.data.result) == null ? void 0 : b.find(
|
|
414
|
+
(m) => (m == null ? void 0 : m.id) === c
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
).filter((c) => c !== void 0) : []
|
|
418
|
+
), N(
|
|
419
|
+
"categoryIds",
|
|
420
|
+
ce ? ce.map(
|
|
421
|
+
(c) => {
|
|
422
|
+
var b;
|
|
423
|
+
return (b = U.data.result) == null ? void 0 : b.find((m) => (m == null ? void 0 : m.id) === c);
|
|
424
|
+
}
|
|
425
|
+
) : []
|
|
426
|
+
), N(
|
|
427
|
+
"roleIds",
|
|
428
|
+
H ? H.map((c) => {
|
|
429
|
+
var b;
|
|
430
|
+
return (b = h.data) == null ? void 0 : b.find((m) => (m == null ? void 0 : m.id) === c);
|
|
431
|
+
}).filter((c) => c !== void 0) : []
|
|
432
|
+
), N(
|
|
433
|
+
"canManageRoleIds",
|
|
434
|
+
I.canManageRoleIds ? I.canManageRoleIds.map((c) => {
|
|
435
|
+
var b;
|
|
436
|
+
return (b = h.data) == null ? void 0 : b.find((m) => (m == null ? void 0 : m.id) === c);
|
|
437
|
+
}).filter((c) => c !== void 0) : []
|
|
438
|
+
), I.locationTypes.length > 0 ? N("isLocationRequired", !0) : N("isLocationRequired", !1);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
v((h) => !h);
|
|
442
|
+
} catch (l) {
|
|
443
|
+
le({
|
|
444
|
+
message: `Error in manage role :${l == null ? void 0 : l.message}`,
|
|
445
|
+
type: "error"
|
|
446
|
+
}), v((h) => !h);
|
|
447
|
+
}
|
|
448
|
+
})();
|
|
449
|
+
}, [d, u]), /* @__PURE__ */ a(
|
|
450
|
+
Ee,
|
|
451
|
+
{
|
|
452
|
+
open: u !== 0,
|
|
453
|
+
onClose: $,
|
|
454
|
+
"data-testid": "managerole-modal",
|
|
455
|
+
children: /* @__PURE__ */ a("div", { className: "mt-10 fixed inset-0 z-[100] flex items-center justify-center p-4 animate-in fade-in duration-200", children: /* @__PURE__ */ a(
|
|
456
|
+
G,
|
|
457
|
+
{
|
|
458
|
+
className: "w-full max-w-2xl rounded-[2.5rem] shadow-2xl shadow-blue-900/10 overflow-hidden flex flex-col animate-in zoom-in-95 duration-300",
|
|
459
|
+
sx: { bgcolor: (e) => e.palette.custom.customBackground },
|
|
460
|
+
children: /* @__PURE__ */ r(fe, { isLoading: X, children: [
|
|
461
|
+
/* @__PURE__ */ r("div", { className: "px-8 pt-8 pb-4 flex items-center justify-between", children: [
|
|
462
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
|
|
463
|
+
G,
|
|
464
|
+
{
|
|
465
|
+
component: "h2",
|
|
466
|
+
className: "text-2xl font-bold text-customBlue",
|
|
467
|
+
sx: { color: "text.primary" },
|
|
468
|
+
children: i ? "Update Role" : "Add New Role"
|
|
469
|
+
}
|
|
470
|
+
) }),
|
|
471
|
+
/* @__PURE__ */ a(
|
|
472
|
+
ke,
|
|
473
|
+
{
|
|
474
|
+
size: "small",
|
|
475
|
+
onClick: $,
|
|
476
|
+
className: "w-10 h-10 rounded-full bg-slate-100 flex items-center justify-center text-slate-400 hover:bg-slate-200 hover:text-slate-600 transition-all",
|
|
477
|
+
"data-testid": "managerole-close-icon",
|
|
478
|
+
children: /* @__PURE__ */ a(he, { icon: je, size: "lg" })
|
|
479
|
+
}
|
|
480
|
+
)
|
|
481
|
+
] }),
|
|
482
|
+
/* @__PURE__ */ r(
|
|
483
|
+
"form",
|
|
484
|
+
{
|
|
485
|
+
onSubmit: y(Me),
|
|
486
|
+
ref: M,
|
|
487
|
+
className: "px-8 pb-8 space-y-6 overflow-y-auto max-h-[80vh]",
|
|
488
|
+
children: [
|
|
489
|
+
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
490
|
+
K && /* @__PURE__ */ a(
|
|
491
|
+
_e,
|
|
492
|
+
{
|
|
493
|
+
severity: "warning",
|
|
494
|
+
"data-testid": "managerole-legacy-code-alert",
|
|
495
|
+
children: "This role does not have a Role Code yet. A code has been generated below — review or edit it before saving, as it cannot be changed once this role is saved with a code."
|
|
496
|
+
}
|
|
497
|
+
),
|
|
498
|
+
/* @__PURE__ */ r("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
499
|
+
/* @__PURE__ */ a(C, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(g, { label: "Role Name", children: /* @__PURE__ */ a(
|
|
500
|
+
V,
|
|
501
|
+
{
|
|
502
|
+
placeholder: "Role Name",
|
|
503
|
+
name: "name",
|
|
504
|
+
id: "name",
|
|
505
|
+
errors: n,
|
|
506
|
+
control: t,
|
|
507
|
+
dataTestId: "managerole-role-name-field"
|
|
508
|
+
}
|
|
509
|
+
) }) }) }),
|
|
510
|
+
/* @__PURE__ */ a(C, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
511
|
+
g,
|
|
512
|
+
{
|
|
513
|
+
label: "Role Code",
|
|
514
|
+
required: !w,
|
|
515
|
+
additionalLabel: /* @__PURE__ */ a(
|
|
516
|
+
Be,
|
|
517
|
+
{
|
|
518
|
+
arrow: !0,
|
|
519
|
+
placement: "top",
|
|
520
|
+
title: w ? "This role already has a saved Role Code. Once a Role Code is set it can never be changed, so this field is locked." : "Auto-generated from the Role Name (capital letters and underscores only) as you type. Edit it yourself at any time — once you do, it stops following the Role Name. After you save this role, its Role Code becomes permanent and this field will be locked on every future edit.",
|
|
521
|
+
children: /* @__PURE__ */ a(
|
|
522
|
+
G,
|
|
523
|
+
{
|
|
524
|
+
component: "span",
|
|
525
|
+
className: "cursor-help",
|
|
526
|
+
sx: { color: "info.main", display: "inline-flex" },
|
|
527
|
+
"data-testid": "managerole-role-code-info-icon",
|
|
528
|
+
children: /* @__PURE__ */ a(he, { icon: Ue, size: "sm" })
|
|
529
|
+
}
|
|
530
|
+
)
|
|
531
|
+
}
|
|
532
|
+
),
|
|
533
|
+
children: /* @__PURE__ */ a(
|
|
534
|
+
V,
|
|
535
|
+
{
|
|
536
|
+
placeholder: "ROLE_CODE",
|
|
537
|
+
name: "code",
|
|
538
|
+
id: "code",
|
|
539
|
+
errors: n,
|
|
540
|
+
control: t,
|
|
541
|
+
disabled: w,
|
|
542
|
+
successMessage: w ? "" : ie.message,
|
|
543
|
+
inputProps: { maxLength: D },
|
|
544
|
+
onChange: (e) => {
|
|
545
|
+
xe(), N("code", Ye(e.target.value), {
|
|
546
|
+
shouldValidate: !0
|
|
547
|
+
});
|
|
548
|
+
},
|
|
549
|
+
dataTestId: "managerole-role-code-field"
|
|
550
|
+
}
|
|
551
|
+
)
|
|
552
|
+
}
|
|
553
|
+
) }) })
|
|
554
|
+
] }),
|
|
555
|
+
/* @__PURE__ */ r("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
556
|
+
/* @__PURE__ */ a(C, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
557
|
+
g,
|
|
558
|
+
{
|
|
559
|
+
label: "Max Position",
|
|
560
|
+
tooltip: "This is the maximum no of users that can be created at one location of this role type",
|
|
561
|
+
children: /* @__PURE__ */ a(
|
|
562
|
+
V,
|
|
563
|
+
{
|
|
564
|
+
name: "maxPosition",
|
|
565
|
+
id: "maxPosition",
|
|
566
|
+
errors: n,
|
|
567
|
+
control: t,
|
|
568
|
+
rules: {
|
|
569
|
+
maxLength: 3,
|
|
570
|
+
pattern: /^\d{1,3}$/
|
|
571
|
+
},
|
|
572
|
+
inputProps: {
|
|
573
|
+
maxLength: 3,
|
|
574
|
+
inputMode: "numeric",
|
|
575
|
+
pattern: "[0-9]*",
|
|
576
|
+
onInput: (e) => {
|
|
577
|
+
e.target.value = e.target.value.replace(/\D/g, "");
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
dataTestId: "managerole-max-position-field"
|
|
581
|
+
}
|
|
582
|
+
)
|
|
583
|
+
}
|
|
584
|
+
) }) }),
|
|
585
|
+
x.role.showMaxHealthData && /* @__PURE__ */ a(C, { variant: "outlined", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(g, { label: "Max Health Infrastructure", children: /* @__PURE__ */ a(
|
|
586
|
+
V,
|
|
587
|
+
{
|
|
588
|
+
name: "maxHealthInfra",
|
|
589
|
+
id: "maxHealthInfra",
|
|
590
|
+
control: t,
|
|
591
|
+
errors: n,
|
|
592
|
+
rules: {
|
|
593
|
+
maxLength: 3,
|
|
594
|
+
pattern: /^\d{1,3}$/
|
|
595
|
+
},
|
|
596
|
+
inputProps: {
|
|
597
|
+
maxLength: 3,
|
|
598
|
+
inputMode: "numeric",
|
|
599
|
+
pattern: "[0-9]*",
|
|
600
|
+
onInput: (e) => {
|
|
601
|
+
e.target.value = e.target.value.replace(
|
|
602
|
+
/\D/g,
|
|
603
|
+
""
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
dataTestId: "managerole-max-health-infra-field"
|
|
608
|
+
}
|
|
609
|
+
) }) }) })
|
|
610
|
+
] })
|
|
611
|
+
] }),
|
|
612
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-6 w-full", children: /* @__PURE__ */ a(
|
|
613
|
+
C,
|
|
614
|
+
{
|
|
615
|
+
variant: "outlined",
|
|
616
|
+
className: "flex flex-row items-center w-full ",
|
|
617
|
+
children: /* @__PURE__ */ a(
|
|
618
|
+
g,
|
|
619
|
+
{
|
|
620
|
+
label: "Location Required",
|
|
621
|
+
required: !0,
|
|
622
|
+
direction: "row",
|
|
623
|
+
children: /* @__PURE__ */ a(
|
|
624
|
+
re,
|
|
625
|
+
{
|
|
626
|
+
control: t,
|
|
627
|
+
name: "isLocationRequired",
|
|
628
|
+
options: [
|
|
629
|
+
{ label: "Yes", value: !0 },
|
|
630
|
+
{ label: "No", value: !1 }
|
|
631
|
+
],
|
|
632
|
+
errors: n
|
|
633
|
+
}
|
|
634
|
+
)
|
|
635
|
+
}
|
|
636
|
+
)
|
|
637
|
+
}
|
|
638
|
+
) }),
|
|
639
|
+
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
640
|
+
(Ne === !0 || F) && /* @__PURE__ */ a(ee, { children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
641
|
+
g,
|
|
642
|
+
{
|
|
643
|
+
label: "Location",
|
|
644
|
+
required: !0,
|
|
645
|
+
tooltip: "The OU level where users of this role perform their job function",
|
|
646
|
+
children: /* @__PURE__ */ a(
|
|
647
|
+
L,
|
|
648
|
+
{
|
|
649
|
+
id: "locationTypes",
|
|
650
|
+
control: t,
|
|
651
|
+
name: "locationTypes",
|
|
652
|
+
options: p.locationData,
|
|
653
|
+
value: Y == null ? void 0 : Y.map(
|
|
654
|
+
(e) => {
|
|
655
|
+
var l;
|
|
656
|
+
return (l = p.locationData) == null ? void 0 : l.find(
|
|
657
|
+
(h) => h.type === (e == null ? void 0 : e.type)
|
|
658
|
+
);
|
|
659
|
+
}
|
|
660
|
+
),
|
|
661
|
+
errors: n,
|
|
662
|
+
getOptionLabel: (e) => e == null ? void 0 : e.name,
|
|
663
|
+
dataTestId: "managerole-location-type-select",
|
|
664
|
+
checkEquality: "type",
|
|
665
|
+
onChange: (e, l) => q(e, l, "locationTypes")
|
|
666
|
+
}
|
|
667
|
+
)
|
|
668
|
+
}
|
|
669
|
+
) }) }),
|
|
670
|
+
/* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
671
|
+
g,
|
|
672
|
+
{
|
|
673
|
+
label: "Can Manage Role",
|
|
674
|
+
tooltip: "Please select the roles that shall be managed by this role",
|
|
675
|
+
children: /* @__PURE__ */ a(
|
|
676
|
+
L,
|
|
677
|
+
{
|
|
678
|
+
name: "roleIds",
|
|
679
|
+
id: "roleIds",
|
|
680
|
+
errors: n,
|
|
681
|
+
control: t,
|
|
682
|
+
dataTestId: "managerole-manage-role-select",
|
|
683
|
+
options: p.roles,
|
|
684
|
+
onChange: (e, l) => q(e, l, "roleIds"),
|
|
685
|
+
getOptionLabel: (e) => e == null ? void 0 : e.name
|
|
686
|
+
}
|
|
687
|
+
)
|
|
688
|
+
}
|
|
689
|
+
) }),
|
|
690
|
+
x.role.showManagedFrom && /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
691
|
+
g,
|
|
692
|
+
{
|
|
693
|
+
label: "Managed From",
|
|
694
|
+
tooltip: "Please select the roles that can manage this role",
|
|
695
|
+
children: /* @__PURE__ */ a(
|
|
696
|
+
L,
|
|
697
|
+
{
|
|
698
|
+
name: "canManageRoleIds",
|
|
699
|
+
id: "canManageRoleIds",
|
|
700
|
+
errors: n,
|
|
701
|
+
control: t,
|
|
702
|
+
dataTestId: "managerole-managed-by-role-select",
|
|
703
|
+
options: p.roles,
|
|
704
|
+
onChange: (e, l) => q(e, l, "canManageRoleIds"),
|
|
705
|
+
getOptionLabel: (e) => e == null ? void 0 : e.name
|
|
706
|
+
}
|
|
707
|
+
)
|
|
708
|
+
}
|
|
709
|
+
) }),
|
|
710
|
+
/* @__PURE__ */ r("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
711
|
+
x.role.showRoleType && /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
712
|
+
g,
|
|
713
|
+
{
|
|
714
|
+
label: "Role Type",
|
|
715
|
+
tooltip: "Please select Role Type",
|
|
716
|
+
required: !0,
|
|
717
|
+
children: /* @__PURE__ */ a(
|
|
718
|
+
ue,
|
|
719
|
+
{
|
|
720
|
+
control: t,
|
|
721
|
+
id: "roleType",
|
|
722
|
+
name: "roleType",
|
|
723
|
+
options: aa,
|
|
724
|
+
displayName: "name",
|
|
725
|
+
optionValue: "name",
|
|
726
|
+
errors: n,
|
|
727
|
+
dataTestId: "managerole-role-type-dropdown"
|
|
728
|
+
}
|
|
729
|
+
)
|
|
730
|
+
}
|
|
731
|
+
) }),
|
|
732
|
+
x.role.showCanManageTeam && /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
733
|
+
g,
|
|
734
|
+
{
|
|
735
|
+
label: "Can Manage Team",
|
|
736
|
+
tooltip: "Please select the teams that shall be managed by this role",
|
|
737
|
+
children: /* @__PURE__ */ a(
|
|
738
|
+
L,
|
|
739
|
+
{
|
|
740
|
+
control: t,
|
|
741
|
+
name: "manageByTeamTypeIds",
|
|
742
|
+
id: "manageByTeamTypeIds",
|
|
743
|
+
errors: n,
|
|
744
|
+
options: p.manageTeam,
|
|
745
|
+
dataTestId: "managerole-manage-team-select",
|
|
746
|
+
onChange: (e, l) => q(e, l, "manageByTeamTypeIds"),
|
|
747
|
+
getOptionLabel: (e) => e == null ? void 0 : e.type
|
|
748
|
+
}
|
|
749
|
+
)
|
|
750
|
+
}
|
|
751
|
+
) })
|
|
752
|
+
] }),
|
|
753
|
+
/* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
754
|
+
g,
|
|
755
|
+
{
|
|
756
|
+
label: "Select Health Infrastructure type",
|
|
757
|
+
tooltip: "Please select the institute to be associated with the role",
|
|
758
|
+
required: Te,
|
|
759
|
+
children: /* @__PURE__ */ a(
|
|
760
|
+
L,
|
|
761
|
+
{
|
|
762
|
+
options: p.healthInfraType,
|
|
763
|
+
errors: n,
|
|
764
|
+
name: "healthInfrastructureIds",
|
|
765
|
+
id: "healthInfrastructureIds",
|
|
766
|
+
dataTestId: "managerole-health-infrastructure-select",
|
|
767
|
+
control: t,
|
|
768
|
+
onChange: (e, l) => q(e, l, "healthInfrastructureIds"),
|
|
769
|
+
getOptionLabel: (e) => e == null ? void 0 : e.value
|
|
770
|
+
}
|
|
771
|
+
)
|
|
772
|
+
}
|
|
773
|
+
) }) }),
|
|
774
|
+
x.role.showCategoryIds && /* @__PURE__ */ a(ee, { children: /* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: /* @__PURE__ */ a(
|
|
775
|
+
g,
|
|
776
|
+
{
|
|
777
|
+
label: "Category",
|
|
778
|
+
tooltip: "Please select the category to be associated with the role",
|
|
779
|
+
children: /* @__PURE__ */ a(
|
|
780
|
+
L,
|
|
781
|
+
{
|
|
782
|
+
id: "categoryIds",
|
|
783
|
+
name: "categoryIds",
|
|
784
|
+
errors: n,
|
|
785
|
+
options: p.category,
|
|
786
|
+
dataTestId: "managerole-role-category-select",
|
|
787
|
+
control: t,
|
|
788
|
+
onChange: (e, l) => q(e, l, "categoryIds"),
|
|
789
|
+
getOptionLabel: (e) => e == null ? void 0 : e.value
|
|
790
|
+
}
|
|
791
|
+
)
|
|
792
|
+
}
|
|
793
|
+
) }) }) })
|
|
794
|
+
] }),
|
|
795
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-6", children: [
|
|
796
|
+
x.role.showBankDetailsRequired && /* @__PURE__ */ a(
|
|
797
|
+
C,
|
|
798
|
+
{
|
|
799
|
+
variant: "outlined",
|
|
800
|
+
className: "flex flex-row items-center w-[60%] ",
|
|
801
|
+
children: /* @__PURE__ */ a(
|
|
802
|
+
g,
|
|
803
|
+
{
|
|
804
|
+
label: "Bank Details Required",
|
|
805
|
+
tooltip: "Select if bank details are required for this role",
|
|
806
|
+
required: !0,
|
|
807
|
+
labelWidth: "50%",
|
|
808
|
+
childrenWidth: "50%",
|
|
809
|
+
direction: "row",
|
|
810
|
+
children: /* @__PURE__ */ a(
|
|
811
|
+
re,
|
|
812
|
+
{
|
|
813
|
+
control: t,
|
|
814
|
+
name: "isBankDetailsRequired",
|
|
815
|
+
options: [
|
|
816
|
+
{ label: "Yes", value: !0 },
|
|
817
|
+
{ label: "No", value: !1 }
|
|
818
|
+
],
|
|
819
|
+
errors: n
|
|
820
|
+
}
|
|
821
|
+
)
|
|
822
|
+
}
|
|
823
|
+
)
|
|
824
|
+
}
|
|
825
|
+
),
|
|
826
|
+
!i && /* @__PURE__ */ a(ee, { children: /* @__PURE__ */ a(C, { variant: "outlined ", className: "w-[40%]", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
827
|
+
/* @__PURE__ */ a("label", { className: "text-sm font-medium text-gray-700", children: "Self Manage" }),
|
|
828
|
+
/* @__PURE__ */ a(
|
|
829
|
+
oe,
|
|
830
|
+
{
|
|
831
|
+
name: "canSelfManage",
|
|
832
|
+
control: t,
|
|
833
|
+
isFullWidth: !1,
|
|
834
|
+
"data-testid": "managerole-self-manage-checkbox"
|
|
835
|
+
}
|
|
836
|
+
)
|
|
837
|
+
] }) }) })
|
|
838
|
+
] }),
|
|
839
|
+
we && /* @__PURE__ */ r("div", { className: "flex items-center gap-6 w-full", children: [
|
|
840
|
+
/* @__PURE__ */ a(
|
|
841
|
+
C,
|
|
842
|
+
{
|
|
843
|
+
variant: "outlined",
|
|
844
|
+
className: "flex flex-row items-center w-[50%]",
|
|
845
|
+
children: /* @__PURE__ */ a(
|
|
846
|
+
g,
|
|
847
|
+
{
|
|
848
|
+
label: "Two-Factor Authentication",
|
|
849
|
+
tooltip: "Require users of this role to use a two-factor authentication app",
|
|
850
|
+
labelWidth: "60%",
|
|
851
|
+
childrenWidth: "40%",
|
|
852
|
+
direction: "row",
|
|
853
|
+
children: /* @__PURE__ */ a(
|
|
854
|
+
re,
|
|
855
|
+
{
|
|
856
|
+
control: t,
|
|
857
|
+
name: "isTwoFactorEnabled",
|
|
858
|
+
options: [
|
|
859
|
+
{ label: "Yes", value: !0 },
|
|
860
|
+
{ label: "No", value: !1 }
|
|
861
|
+
],
|
|
862
|
+
errors: n
|
|
863
|
+
}
|
|
864
|
+
)
|
|
865
|
+
}
|
|
866
|
+
)
|
|
867
|
+
}
|
|
868
|
+
),
|
|
869
|
+
ve === !0 && /* @__PURE__ */ a(C, { variant: "outlined", className: "w-[50%]", children: /* @__PURE__ */ a(
|
|
870
|
+
g,
|
|
871
|
+
{
|
|
872
|
+
label: "Authentication Method",
|
|
873
|
+
tooltip: "Select which authentication method users of this role will use",
|
|
874
|
+
required: !0,
|
|
875
|
+
children: /* @__PURE__ */ a(
|
|
876
|
+
ue,
|
|
877
|
+
{
|
|
878
|
+
control: t,
|
|
879
|
+
id: "twoFactorType",
|
|
880
|
+
name: "twoFactorType",
|
|
881
|
+
options: ta,
|
|
882
|
+
displayName: "label",
|
|
883
|
+
optionValue: "value",
|
|
884
|
+
errors: n,
|
|
885
|
+
dataTestId: "managerole-two-factor-type-dropdown"
|
|
886
|
+
}
|
|
887
|
+
)
|
|
888
|
+
}
|
|
889
|
+
) })
|
|
890
|
+
] }),
|
|
891
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-6", children: /* @__PURE__ */ a(
|
|
892
|
+
C,
|
|
893
|
+
{
|
|
894
|
+
variant: "outlined",
|
|
895
|
+
className: "flex flex-col items-start justify-between",
|
|
896
|
+
children: /* @__PURE__ */ a(
|
|
897
|
+
g,
|
|
898
|
+
{
|
|
899
|
+
label: "Mandatory Fields",
|
|
900
|
+
tooltip: "These fields are Mandatory when creating users of this role type",
|
|
901
|
+
children: /* @__PURE__ */ r(Fe, { row: !0, children: [
|
|
902
|
+
Q == null ? void 0 : Q.map((e) => /* @__PURE__ */ a(
|
|
903
|
+
oe,
|
|
904
|
+
{
|
|
905
|
+
control: t,
|
|
906
|
+
name: e.value,
|
|
907
|
+
label: e.label,
|
|
908
|
+
isFullWidth: !1,
|
|
909
|
+
"data-testid": `managerole-mandatory-field-${e.value}`
|
|
910
|
+
},
|
|
911
|
+
e.value
|
|
912
|
+
)),
|
|
913
|
+
be === !0 && /* @__PURE__ */ a(
|
|
914
|
+
oe,
|
|
915
|
+
{
|
|
916
|
+
name: "isBankDetailsMandatory",
|
|
917
|
+
control: t,
|
|
918
|
+
label: "Bank Details",
|
|
919
|
+
isFullWidth: !1,
|
|
920
|
+
"data-testid": "managerole-bank-details-mandatory-checkbox"
|
|
921
|
+
}
|
|
922
|
+
)
|
|
923
|
+
] })
|
|
924
|
+
}
|
|
925
|
+
)
|
|
926
|
+
}
|
|
927
|
+
) }),
|
|
928
|
+
/* @__PURE__ */ r(
|
|
929
|
+
G,
|
|
930
|
+
{
|
|
931
|
+
className: "flex items-center justify-end gap-3 pt-6 border-t",
|
|
932
|
+
sx: { borderColor: "divider" },
|
|
933
|
+
children: [
|
|
934
|
+
/* @__PURE__ */ a(
|
|
935
|
+
me,
|
|
936
|
+
{
|
|
937
|
+
variant: "contained",
|
|
938
|
+
color: "secondary",
|
|
939
|
+
size: "small",
|
|
940
|
+
onClick: $,
|
|
941
|
+
"data-testid": "managerole-close-button",
|
|
942
|
+
children: J("Close")
|
|
943
|
+
}
|
|
944
|
+
),
|
|
945
|
+
/* @__PURE__ */ a(
|
|
946
|
+
me,
|
|
947
|
+
{
|
|
948
|
+
variant: "contained",
|
|
949
|
+
color: "primary",
|
|
950
|
+
size: "small",
|
|
951
|
+
type: "submit",
|
|
952
|
+
disabled: ie.state === "checking",
|
|
953
|
+
"data-testid": "managerole-submit-button",
|
|
954
|
+
children: i ? `${J("Update Role")}` : `${J("Add Role")}`
|
|
955
|
+
}
|
|
956
|
+
)
|
|
957
|
+
]
|
|
958
|
+
}
|
|
959
|
+
)
|
|
960
|
+
]
|
|
961
|
+
}
|
|
962
|
+
)
|
|
963
|
+
] })
|
|
964
|
+
}
|
|
965
|
+
) })
|
|
966
|
+
}
|
|
967
|
+
);
|
|
968
|
+
};
|
|
969
|
+
la.propTypes = {
|
|
970
|
+
isUpdate: k.bool,
|
|
971
|
+
role: k.object,
|
|
972
|
+
onClose: k.func,
|
|
973
|
+
open: k.bool,
|
|
974
|
+
setOpen: k.func,
|
|
975
|
+
selectedId: k.string,
|
|
976
|
+
isRoleListModified: k.bool
|
|
977
|
+
};
|
|
978
|
+
export {
|
|
979
|
+
la as default
|
|
980
|
+
};
|
|
981
|
+
//# sourceMappingURL=ManageRole-CyfpySt9.js.map
|