@argusoft/medplat-core 1.0.28 → 1.0.30
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-xrday-L1.js +1023 -0
- package/dist/AccessRights-xrday-L1.js.map +1 -0
- package/dist/AddEditQueryBuilder-D-iQiVIe.js +365 -0
- package/dist/AddEditQueryBuilder-D-iQiVIe.js.map +1 -0
- package/dist/{AddFeatures-C0Z29oSd.js → AddFeatures-D1sU8RjY.js} +2 -2
- package/dist/{AddFeatures-C0Z29oSd.js.map → AddFeatures-D1sU8RjY.js.map} +1 -1
- package/dist/AddLabelModal-Bq-wRqv9.js +631 -0
- package/dist/AddLabelModal-Bq-wRqv9.js.map +1 -0
- package/dist/AddMenuConfiguration-e5BVXhmw.js +8547 -0
- package/dist/AddMenuConfiguration-e5BVXhmw.js.map +1 -0
- package/dist/{AddRoleDrawer-CQdzQZLb.js → AddRoleDrawer-0gqAK8N0.js} +62 -63
- package/dist/AddRoleDrawer-0gqAK8N0.js.map +1 -0
- package/dist/AppModal-CCtrQ5Tr.js +394 -0
- package/dist/AppModal-CCtrQ5Tr.js.map +1 -0
- package/dist/BrandsPage-DmRW5bhm-Bk1szrjI.js +387 -0
- package/dist/BrandsPage-DmRW5bhm-Bk1szrjI.js.map +1 -0
- package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js +391 -0
- package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js.map +1 -0
- package/dist/{ChangePasswordModalCore-CDxkeIIM.js → ChangePasswordModalCore-BPsJquTS.js} +1606 -1611
- package/dist/ChangePasswordModalCore-BPsJquTS.js.map +1 -0
- package/dist/{ConditionConfig-DSsgGEXS.js → ConditionConfig-Ddz9halE.js} +2 -2
- package/dist/ConditionConfig-Ddz9halE.js.map +1 -0
- package/dist/DashboardPage-C3bKc5na-sBd9Yqbi.js +435 -0
- package/dist/DashboardPage-C3bKc5na-sBd9Yqbi.js.map +1 -0
- package/dist/{EntityManagement-GaYsBTvf.js → EntityManagement-CPQL6qBj.js} +2 -2
- package/dist/{EntityManagement-GaYsBTvf.js.map → EntityManagement-CPQL6qBj.js.map} +1 -1
- package/dist/EventConfig-BmLemzX3.js +26 -0
- package/dist/EventConfig-BmLemzX3.js.map +1 -0
- package/dist/{EventConfigurations-kNtAj_WM.js → EventConfigurations-Bzh1qWXU.js} +31 -30
- package/dist/{EventConfigurations-kNtAj_WM.js.map → EventConfigurations-Bzh1qWXU.js.map} +1 -1
- package/dist/{EventsExceptionModal-D4Bf1ilS.js → EventsExceptionModal-B2SRrnB1.js} +2 -2
- package/dist/{EventsExceptionModal-D4Bf1ilS.js.map → EventsExceptionModal-B2SRrnB1.js.map} +1 -1
- package/dist/EventsSkeleton-BIcPks4T.js +61 -0
- package/dist/EventsSkeleton-BIcPks4T.js.map +1 -0
- package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js +79 -0
- package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js.map +1 -0
- package/dist/FeatureMenu-DYJmDt7q.js +521 -0
- package/dist/FeatureMenu-DYJmDt7q.js.map +1 -0
- package/dist/Features-Dne21RWu.js +14 -0
- package/dist/Features-Dne21RWu.js.map +1 -0
- package/dist/{FhirServerList-Dkq7Kbes.js → FhirServerList-DuTwnngN.js} +19 -19
- package/dist/{FhirServerList-Dkq7Kbes.js.map → FhirServerList-DuTwnngN.js.map} +1 -1
- package/dist/{FhirServerWizard-Db6Hm4bQ.js → FhirServerWizard-DZI8Olku.js} +15 -15
- package/dist/{FhirServerWizard-Db6Hm4bQ.js.map → FhirServerWizard-DZI8Olku.js.map} +1 -1
- package/dist/FlywayQuery-CQygj51V.js +179 -0
- package/dist/FlywayQuery-CQygj51V.js.map +1 -0
- package/dist/{ManageNotification-CaBAOhji.js → Google-DQxMfbaL.js} +1725 -2652
- package/dist/{ManageNotification-CaBAOhji.js.map → Google-DQxMfbaL.js.map} +1 -1
- package/dist/GrantPermissionModal-BDN66Atn.js +236 -0
- package/dist/GrantPermissionModal-BDN66Atn.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-Di1KO3oW.js +7639 -0
- package/dist/ImmunizationConfigurationBase-Di1KO3oW.js.map +1 -0
- package/dist/ImmunizationConfigurationBase.css +1 -1
- package/dist/ImmunizationConfigurationsList-TZcLDEci.js +369 -0
- package/dist/ImmunizationConfigurationsList-TZcLDEci.js.map +1 -0
- package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js +665 -0
- package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js.map +1 -0
- package/dist/LanguagesModal-B3NTebYT.js +352 -0
- package/dist/LanguagesModal-B3NTebYT.js.map +1 -0
- package/dist/ManageDynamicFeature-BU0I45dd.js +4475 -0
- package/dist/ManageDynamicFeature-BU0I45dd.js.map +1 -0
- package/dist/{ManageEventConfiguration-DV3I5POA.js → ManageEventConfiguration-CoYcpjR9.js} +465 -397
- package/dist/ManageEventConfiguration-CoYcpjR9.js.map +1 -0
- package/dist/ManageNotification-C5MhV77Q.js +934 -0
- package/dist/ManageNotification-C5MhV77Q.js.map +1 -0
- package/dist/{ManageRole-CGYfglpo.js → ManageRole-CNZBRKGU.js} +32 -30
- package/dist/ManageRole-CNZBRKGU.js.map +1 -0
- package/dist/ManageTranslation-vRiptUAP.js +833 -0
- package/dist/ManageTranslation-vRiptUAP.js.map +1 -0
- package/dist/ManageTranslation.css +1 -1
- package/dist/{ManageUser-AY1EUDLI.js → ManageUser-DCFkUMV9.js} +1722 -1586
- package/dist/ManageUser-DCFkUMV9.js.map +1 -0
- package/dist/MemberProfileCard-BdUNgHRB-VywqQdFF.js +272 -0
- package/dist/MemberProfileCard-BdUNgHRB-VywqQdFF.js.map +1 -0
- package/dist/MobileAnalytics-pQoE8cG1.js +16888 -0
- package/dist/MobileAnalytics-pQoE8cG1.js.map +1 -0
- package/dist/MobileMenuManagement-Cf8IZlla.js +108 -0
- package/dist/MobileMenuManagement-Cf8IZlla.js.map +1 -0
- package/dist/{MobileTypeEventConfigModal-BxLympIO.js → MobileTypeEventConfigModal-BeveaX0C.js} +2 -2
- package/dist/MobileTypeEventConfigModal-BeveaX0C.js.map +1 -0
- package/dist/NotificationFlywayQuery-BAHVjf6N.js +247 -0
- package/dist/NotificationFlywayQuery-BAHVjf6N.js.map +1 -0
- package/dist/{NotificationList-C3Vb_jKU.js → NotificationList-DEyRZEuM.js} +109 -110
- package/dist/NotificationList-DEyRZEuM.js.map +1 -0
- package/dist/{OtherTypeEventConfigModal-BeG1GrUi.js → OtherTypeEventConfigModal-CM6VkdmY.js} +570 -478
- package/dist/OtherTypeEventConfigModal-CM6VkdmY.js.map +1 -0
- package/dist/PaymentCreatePage-CIVe0P0p-25BQVpOX.js +482 -0
- package/dist/PaymentCreatePage-CIVe0P0p-25BQVpOX.js.map +1 -0
- package/dist/PaymentsPage-BvPe5Q9F-D2gfziwW.js +157 -0
- package/dist/PaymentsPage-BvPe5Q9F-D2gfziwW.js.map +1 -0
- package/dist/PermissionsModal-CCYkcKlC.js +151 -0
- package/dist/PermissionsModal-CCYkcKlC.js.map +1 -0
- package/dist/PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js +119 -0
- package/dist/PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js.map +1 -0
- package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js +783 -0
- package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js.map +1 -0
- package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js +818 -0
- package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js.map +1 -0
- package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js +599 -0
- package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js.map +1 -0
- package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js +1302 -0
- package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js.map +1 -0
- package/dist/ProductsPage-CupVmOD4-D45a_hf-.js +252 -0
- package/dist/ProductsPage-CupVmOD4-D45a_hf-.js.map +1 -0
- package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js +648 -0
- package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js.map +1 -0
- package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js +1577 -0
- package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js.map +1 -0
- package/dist/PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js +279 -0
- package/dist/PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js.map +1 -0
- package/dist/PurchasesPage-It1GHiXl-eH4IsF_U.js +293 -0
- package/dist/PurchasesPage-It1GHiXl-eH4IsF_U.js.map +1 -0
- package/dist/QueryBuilder-CXaBe6sr.js +478 -0
- package/dist/QueryBuilder-CXaBe6sr.js.map +1 -0
- package/dist/{RoleManagement-BPl2cE27.js → RoleManagement-s8iNx2Mu.js} +131 -142
- package/dist/RoleManagement-s8iNx2Mu.js.map +1 -0
- package/dist/Roles-BIyiic67.js +14 -0
- package/dist/Roles-BIyiic67.js.map +1 -0
- package/dist/SaleCreatePage-C9kFmTvm-B3Y0o4CX.js +544 -0
- package/dist/SaleCreatePage-C9kFmTvm-B3Y0o4CX.js.map +1 -0
- package/dist/SalesPage-D18DCseD-BxktGDRQ.js +315 -0
- package/dist/SalesPage-D18DCseD-BxktGDRQ.js.map +1 -0
- package/dist/{ServerSyncModal-D_oFpv3C.js → ServerSyncModal-92U3xtqI.js} +84 -85
- package/dist/ServerSyncModal-92U3xtqI.js.map +1 -0
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js +747 -0
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js.map +1 -0
- package/dist/ShowFlywayQuery-D10Olk5Z.js +154 -0
- package/dist/ShowFlywayQuery-D10Olk5Z.js.map +1 -0
- package/dist/{ShowFlywayQuery-DVRCd384.js → ShowFlywayQuery-D1y_4A1u.js} +161 -121
- package/dist/ShowFlywayQuery-D1y_4A1u.js.map +1 -0
- package/dist/ShowQueryHistory-DRBKYDKk.js +313 -0
- package/dist/ShowQueryHistory-DRBKYDKk.js.map +1 -0
- package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js +721 -0
- package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map +1 -0
- package/dist/SubMenu-eEDhZUvh.js +317 -0
- package/dist/SubMenu-eEDhZUvh.js.map +1 -0
- package/dist/{TableDetails-Cf_YfnY2.js → TableDetails-BtafRxXb.js} +1069 -831
- package/dist/TableDetails-BtafRxXb.js.map +1 -0
- package/dist/{TableList-D6jnIbnz.js → TableList-Dpo6dO7S.js} +2 -2
- package/dist/{TableList-D6jnIbnz.js.map → TableList-Dpo6dO7S.js.map} +1 -1
- package/dist/TransactionsPage-DrH53pVS-BkhIGB6C.js +746 -0
- package/dist/TransactionsPage-DrH53pVS-BkhIGB6C.js.map +1 -0
- package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js +315 -0
- package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js.map +1 -0
- package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js +476 -0
- package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js.map +1 -0
- package/dist/{TypeConfiguration-37wp-gsl.js → TypeConfiguration-3O6ABrK-.js} +2 -2
- package/dist/{TypeConfiguration-37wp-gsl.js.map → TypeConfiguration-3O6ABrK-.js.map} +1 -1
- package/dist/{UserList-Bc8gYxRL.js → UserList-DgPxsnj2.js} +253 -236
- package/dist/{UserList-Bc8gYxRL.js.map → UserList-DgPxsnj2.js.map} +1 -1
- package/dist/Users-Bpc4Sazd.js +41 -0
- package/dist/Users-Bpc4Sazd.js.map +1 -0
- package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js +321 -0
- package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js.map +1 -0
- package/dist/{WidgetList-Dw_FmbbE.js → WidgetList-D7YuWfDD.js} +2 -2
- package/dist/{WidgetList-Dw_FmbbE.js.map → WidgetList-D7YuWfDD.js.map} +1 -1
- package/dist/constants-ClZJY2x1-MkSWn6TZ.js +434 -0
- package/dist/constants-ClZJY2x1-MkSWn6TZ.js.map +1 -0
- package/dist/dashboardLayoutUtils-D1xCAxp3.js +405 -0
- package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +1 -0
- package/dist/format-UOyOu75i-D0GyylyQ.js +63 -0
- package/dist/format-UOyOu75i-D0GyylyQ.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +4 -752
- package/dist/index.js.map +1 -1
- package/dist/index.lib-Dn8PMkeD.js +862 -0
- package/dist/index.lib-Dn8PMkeD.js.map +1 -0
- package/dist/useFieldErrors-hDG8ox_x-DbSAzrGo.js +28 -0
- package/dist/useFieldErrors-hDG8ox_x-DbSAzrGo.js.map +1 -0
- package/dist/validation-BzlHnL-r-CCJm2utQ.js +125 -0
- package/dist/validation-BzlHnL-r-CCJm2utQ.js.map +1 -0
- package/package.json +5 -4
- package/dist/AccessRights-CHu27ZOw.js +0 -1262
- package/dist/AccessRights-CHu27ZOw.js.map +0 -1
- package/dist/AddEditQueryBuilder-Brdnm6rQ.js +0 -313
- package/dist/AddEditQueryBuilder-Brdnm6rQ.js.map +0 -1
- package/dist/AddLabelModal-DFllBVcd.js +0 -734
- package/dist/AddLabelModal-DFllBVcd.js.map +0 -1
- package/dist/AddMenuConfiguration-BSQLl88V.js +0 -6570
- package/dist/AddMenuConfiguration-BSQLl88V.js.map +0 -1
- package/dist/AddRoleDrawer-CQdzQZLb.js.map +0 -1
- package/dist/AppModal-CtG2GjD_.js +0 -428
- package/dist/AppModal-CtG2GjD_.js.map +0 -1
- package/dist/ChangePasswordModalCore-CDxkeIIM.js.map +0 -1
- package/dist/ConditionConfig-DSsgGEXS.js.map +0 -1
- package/dist/EventsSkeleton-8iiETGcf.js +0 -76
- package/dist/EventsSkeleton-8iiETGcf.js.map +0 -1
- package/dist/FeatureMenu-jl7-Tk6y.js +0 -265
- package/dist/FeatureMenu-jl7-Tk6y.js.map +0 -1
- package/dist/Features-CObdzJp_.js +0 -13
- package/dist/Features-CObdzJp_.js.map +0 -1
- package/dist/FlywayQuery-Cx2sly6g.js +0 -169
- package/dist/FlywayQuery-Cx2sly6g.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-DZGqwda2.js +0 -5910
- package/dist/ImmunizationConfigurationBase-DZGqwda2.js.map +0 -1
- package/dist/ImmunizationConfigurationsList-DdSZicTP.js +0 -344
- package/dist/ImmunizationConfigurationsList-DdSZicTP.js.map +0 -1
- package/dist/LanguagesModal-D6VfaGrl.js +0 -394
- package/dist/LanguagesModal-D6VfaGrl.js.map +0 -1
- package/dist/ManageDynamicFeature-BhONvfC_.js +0 -4189
- package/dist/ManageDynamicFeature-BhONvfC_.js.map +0 -1
- package/dist/ManageEventConfiguration-DV3I5POA.js.map +0 -1
- package/dist/ManageRole-CGYfglpo.js.map +0 -1
- package/dist/ManageTranslation-B4C9-lWD.js +0 -625
- package/dist/ManageTranslation-B4C9-lWD.js.map +0 -1
- package/dist/ManageUser-AY1EUDLI.js.map +0 -1
- package/dist/MobileMenuManagement-CVAKyKDa.js +0 -112
- package/dist/MobileMenuManagement-CVAKyKDa.js.map +0 -1
- package/dist/MobileTypeEventConfigModal-BxLympIO.js.map +0 -1
- package/dist/NotificationFlywayQuery-BY8Zzml_.js +0 -244
- package/dist/NotificationFlywayQuery-BY8Zzml_.js.map +0 -1
- package/dist/NotificationList-C3Vb_jKU.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-BeG1GrUi.js.map +0 -1
- package/dist/QueryBuilder-z7eqfd7D.js +0 -383
- package/dist/QueryBuilder-z7eqfd7D.js.map +0 -1
- package/dist/RoleManagement-BPl2cE27.js.map +0 -1
- package/dist/ServerSyncModal-D_oFpv3C.js.map +0 -1
- package/dist/ShowFlywayQuery-DVRCd384.js.map +0 -1
- package/dist/ShowFlywayQuery-tj42YQAS.js +0 -130
- package/dist/ShowFlywayQuery-tj42YQAS.js.map +0 -1
- package/dist/ShowQueryHistory-BDN0tzHg.js +0 -190
- package/dist/ShowQueryHistory-BDN0tzHg.js.map +0 -1
- package/dist/SubMenu-DYxAPH2Z.js +0 -191
- package/dist/SubMenu-DYxAPH2Z.js.map +0 -1
- package/dist/TableDetails-Cf_YfnY2.js.map +0 -1
- package/dist/Users-CsJ08Kjm.js +0 -40
- package/dist/Users-CsJ08Kjm.js.map +0 -1
- package/dist/dashboardLayoutUtils-Bt5HA96J.js +0 -265
- package/dist/dashboardLayoutUtils-Bt5HA96J.js.map +0 -1
|
@@ -0,0 +1,934 @@
|
|
|
1
|
+
import { jsx as a, jsxs as o, Fragment as H } from "react/jsx-runtime";
|
|
2
|
+
import { yupResolver as Ne } from "@hookform/resolvers/yup";
|
|
3
|
+
import { Drawer as xe, Typography as c, Popover as ve, FormControl as Te, RadioGroup as Be, FormControlLabel as R, Radio as I, Button as L, TableContainer as Ce, Table as Re, TableHead as Ie, TableRow as J, TableCell as y, TableBody as we } from "@mui/material";
|
|
4
|
+
import { Grid as l, Stack as Ae } from "@mui/system";
|
|
5
|
+
import T from "prop-types";
|
|
6
|
+
import { useForm as Le } from "react-hook-form";
|
|
7
|
+
import * as u from "yup";
|
|
8
|
+
import N from "@/views/custom-components/CustomDropdown";
|
|
9
|
+
import g from "@/views/custom-components/CustomTextField";
|
|
10
|
+
import { useRef as X, useState as F, useEffect as O } from "react";
|
|
11
|
+
import { showToast as q } from "@/common/toaster/toaster";
|
|
12
|
+
import Y from "@/views/custom-components/CustomTextArea";
|
|
13
|
+
import K from "@/views/custom-components/CustomCheckBox";
|
|
14
|
+
import { S as Fe } from "./Google-DQxMfbaL.js";
|
|
15
|
+
import { M as Oe, u as qe, c as Ue } from "./NotificationList-DEyRZEuM.js";
|
|
16
|
+
import Ee from "@/hooks/useTrackEvent";
|
|
17
|
+
import Z from "@/views/custom-components/CustomAutoComplete";
|
|
18
|
+
import { useTranslateProvider as _e } from "@/common/languageTranslator/TranslationContext";
|
|
19
|
+
import { FontAwesomeIcon as Me } from "@fortawesome/react-fontawesome";
|
|
20
|
+
import { faTrash as Se } from "@fortawesome/free-solid-svg-icons";
|
|
21
|
+
import { executeQuery as ke } from "@/common/services/GlobalApis";
|
|
22
|
+
function De({
|
|
23
|
+
open: w,
|
|
24
|
+
data: f,
|
|
25
|
+
handleClose: U,
|
|
26
|
+
roleData: x,
|
|
27
|
+
setNotifications: ee
|
|
28
|
+
}) {
|
|
29
|
+
var z, Q, G;
|
|
30
|
+
const B = X(null), E = X(!1), [_, M] = F(null), te = !!_, ae = w ? "color-picker-popover" : void 0, [oe, v] = F(!1), [S, ie] = F([]), ne = async () => {
|
|
31
|
+
var e;
|
|
32
|
+
try {
|
|
33
|
+
v(!0);
|
|
34
|
+
const t = await ke({
|
|
35
|
+
code: "medplat_form_get_all_form_details",
|
|
36
|
+
parameters: {}
|
|
37
|
+
}), n = (e = t == null ? void 0 : t.data) == null ? void 0 : e.result;
|
|
38
|
+
ie(n == null ? void 0 : n.filter((p) => p.is_web_feature === !0));
|
|
39
|
+
} catch (t) {
|
|
40
|
+
console.error(t);
|
|
41
|
+
} finally {
|
|
42
|
+
v(!1);
|
|
43
|
+
}
|
|
44
|
+
}, re = u.object().shape({
|
|
45
|
+
notificationName: u.string().required("Enter Notification Name"),
|
|
46
|
+
code: u.string().required("Enter code"),
|
|
47
|
+
notificationFor: u.string().required("Select Notification For"),
|
|
48
|
+
notificationType: u.string().required("Enter Notification Type"),
|
|
49
|
+
dataFor: u.string().when("notificationType", (e, t) => String(e) === "WEB" ? t.required("Select Data For") : t.notRequired()),
|
|
50
|
+
actionBase: u.string().when("notificationType", (e, t) => String(e) === "WEB" ? t.required("Select a Value") : t.notRequired()),
|
|
51
|
+
dataQuery: u.string().when("notificationType", (e, t) => String(e) === "WEB" ? t.required("Enter Data Query") : t.notRequired()),
|
|
52
|
+
fetchUptoLevel: u.string().when(
|
|
53
|
+
["notificationType", "isLocationFilterRequired"],
|
|
54
|
+
([e, t], n) => e === "WEB" && t ? n.required("Enter fetch up to level") : n.notRequired()
|
|
55
|
+
),
|
|
56
|
+
requiredUptoLevel: u.string().when(
|
|
57
|
+
["notificationType", "isLocationFilterRequired"],
|
|
58
|
+
([e, t], n) => e === "WEB" && t ? n.required("Enter required up to level") : n.notRequired()
|
|
59
|
+
),
|
|
60
|
+
roleId: u.string().when("notificationType", (e, t) => String(e) === "MO" ? t.required("Enter Role") : t.notRequired()),
|
|
61
|
+
url: u.string().when("actionBase", (e, t) => String(e) === "URL" ? t.required("Enter URL") : t.notRequired()),
|
|
62
|
+
modalName: u.string().when("actionBase", (e, t) => String(e) === "MODAL" ? t.required("Enter Modal Name") : t.notRequired()),
|
|
63
|
+
actionQuery: (f == null ? void 0 : f.notificationType) === "WEB" && u.string().when("actionBase", (e, t) => String(e) === "ACTION" ? t.required("Enter Option Query") : t.notRequired()),
|
|
64
|
+
formCode: u.string().when("actionBase", (e, t) => String(e) === "FORM_CONFIGURATOR" ? t.required("Select Form Configurator") : t.notRequired()),
|
|
65
|
+
escalationLevels: u.array().of(
|
|
66
|
+
u.object().shape({
|
|
67
|
+
name: u.string().required("Enter Name")
|
|
68
|
+
})
|
|
69
|
+
)
|
|
70
|
+
}), {
|
|
71
|
+
handleSubmit: le,
|
|
72
|
+
getValues: C,
|
|
73
|
+
control: m,
|
|
74
|
+
formState: { errors: d },
|
|
75
|
+
setValue: i,
|
|
76
|
+
reset: k,
|
|
77
|
+
watch: D,
|
|
78
|
+
clearErrors: ce
|
|
79
|
+
} = Le({
|
|
80
|
+
defaultValues: {
|
|
81
|
+
notificationType: "MO",
|
|
82
|
+
isLocationFilterRequired: !1,
|
|
83
|
+
modalBasedAction: !1,
|
|
84
|
+
fetchUptoLevel: null,
|
|
85
|
+
requiredUptoLevel: null,
|
|
86
|
+
urlBasedAction: !1,
|
|
87
|
+
formBasedAction: !1
|
|
88
|
+
},
|
|
89
|
+
resolver: Ne(re),
|
|
90
|
+
mode: "onChange"
|
|
91
|
+
}), s = D();
|
|
92
|
+
O(() => {
|
|
93
|
+
s.actionBase === "FORM_CONFIGURATOR" && ne();
|
|
94
|
+
}, [s.actionBase]);
|
|
95
|
+
const { translate: r } = _e(), de = [
|
|
96
|
+
{ value: "WEB", label: "Web" },
|
|
97
|
+
{ value: "MO", label: "Mobile" }
|
|
98
|
+
], P = [
|
|
99
|
+
{ value: "USER", label: "User" },
|
|
100
|
+
{ value: "MEMBER", label: "Member" }
|
|
101
|
+
], se = [
|
|
102
|
+
{ value: "#taskTypeId#", label: "#taskTypeId#" },
|
|
103
|
+
{ value: "#limit#", label: "#limit#" },
|
|
104
|
+
{ value: "#offset#", label: "#offset#" },
|
|
105
|
+
{ value: "#userId#", label: "#userId#" },
|
|
106
|
+
{ value: "#memberId#", label: "#memberId#" },
|
|
107
|
+
{ value: "#loggedInUserId#", label: "#loggedInUserId#" },
|
|
108
|
+
...s.isLocationFilterRequired ? [{ value: "#locationId#", label: "#locationId#" }] : []
|
|
109
|
+
], W = () => {
|
|
110
|
+
k(), U();
|
|
111
|
+
}, me = (e) => {
|
|
112
|
+
i("notificationType", e.target.value);
|
|
113
|
+
}, $ = (e, t) => {
|
|
114
|
+
i(t, e.target.value);
|
|
115
|
+
}, fe = (e, t, n) => {
|
|
116
|
+
const p = e == null ? void 0 : e.map((h) => h == null ? void 0 : h.id);
|
|
117
|
+
if (i(t, p), n) {
|
|
118
|
+
const b = C("escalationLevels").map((V) => {
|
|
119
|
+
var j;
|
|
120
|
+
return {
|
|
121
|
+
...V,
|
|
122
|
+
roles: (j = V.roles) == null ? void 0 : j.filter((ye) => ye !== (n == null ? void 0 : n.id))
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
i("escalationLevels", b);
|
|
126
|
+
}
|
|
127
|
+
}, ue = (e, t) => {
|
|
128
|
+
const n = e == null ? void 0 : e.map((p) => p.id);
|
|
129
|
+
i(`escalationLevels[${t}].roles`, n);
|
|
130
|
+
}, pe = () => {
|
|
131
|
+
const e = C("escalationLevels");
|
|
132
|
+
if (e.length === 0) {
|
|
133
|
+
const t = {
|
|
134
|
+
counter: e.length + 1,
|
|
135
|
+
name: "",
|
|
136
|
+
roles: []
|
|
137
|
+
};
|
|
138
|
+
i("escalationLevels", [...e, t]);
|
|
139
|
+
} else if (e[e.length - 1].name && e[e.length - 1].roles.length) {
|
|
140
|
+
const t = {
|
|
141
|
+
counter: e.length + 1,
|
|
142
|
+
name: "",
|
|
143
|
+
roles: []
|
|
144
|
+
};
|
|
145
|
+
i("escalationLevels", [...e, t]);
|
|
146
|
+
}
|
|
147
|
+
}, he = (e) => {
|
|
148
|
+
const n = C("escalationLevels").filter(
|
|
149
|
+
(p) => p.id ? p.id !== e : p.counter !== e
|
|
150
|
+
);
|
|
151
|
+
i("escalationLevels", n);
|
|
152
|
+
}, ge = (e) => {
|
|
153
|
+
const { value: t } = e.target;
|
|
154
|
+
ce("actionBase"), i("actionBase", t), t === "URL" ? (i("urlBasedAction", !0), i("modalBasedAction", !1), i("actionBased", !1), i("formBasedAction", !1)) : t === "MODAL" ? (i("urlBasedAction", !1), i("modalBasedAction", !0), i("actionBased", !1), i("formBasedAction", !1)) : t === "ACTION" ? (i("urlBasedAction", !1), i("modalBasedAction", !1), i("actionBased", !0), i("formBasedAction", !1)) : (i("urlBasedAction", !1), i("modalBasedAction", !1), i("actionBased", !1), i("formBasedAction", !0));
|
|
155
|
+
}, A = Ee(), be = async (e) => {
|
|
156
|
+
try {
|
|
157
|
+
delete e.actionBased, e.actionBase === "FORM_CONFIGURATOR" ? (e.formBasedAction = !0, e.urlBasedAction = !1, e.modalBasedAction = !1, e.url = e.formCode, e.otherData.form_page_params = e.formParams, e.otherData = JSON.stringify(e.otherData, null, 2), delete e.modalName, delete e.formParams) : (delete e.otherData, e.formBasedAction = !1, delete e.formCode, delete e.formParams), e.notificationType === "MO" && !f && (e.isLocationFilterRequired = !1, e.modalBasedAction = !1, e.fetchUptoLevel = null, e.requiredUptoLevel = null, e.urlBasedAction = !1), f ? await qe(e) : await Ue(e), A("button_click", {
|
|
158
|
+
button_name: "managenotification-submit-button",
|
|
159
|
+
button_type: "submit",
|
|
160
|
+
button_id: "managenotification-submit-button"
|
|
161
|
+
}), q({
|
|
162
|
+
type: "success",
|
|
163
|
+
message: `Notification ${f ? "updated" : "added"} successfully`
|
|
164
|
+
}), E.current = !0, W(), await ee();
|
|
165
|
+
} catch (t) {
|
|
166
|
+
q({ type: "error", message: "Error in Submission!" }), console.error("error", t);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
return O(() => {
|
|
170
|
+
(async () => {
|
|
171
|
+
try {
|
|
172
|
+
if (v((t) => !t), k(), f) {
|
|
173
|
+
Object.keys(f).map((n) => i(n, f[n]));
|
|
174
|
+
const t = JSON.parse(f.otherData ?? "{}");
|
|
175
|
+
i("otherData", t), f.formBasedAction && (i("formCode", f.url), t && t.form_page_params && i("formParams", t.form_page_params)), f.formBasedAction || f.formCode || f.actionBase === "FORM_CONFIGURATOR" ? i("actionBase", "FORM_CONFIGURATOR") : f.modalBasedAction ? i("actionBase", "MODAL") : f.urlBasedAction ? i("actionBase", "URL") : i("actionBase", "ACTION");
|
|
176
|
+
} else
|
|
177
|
+
i("escalationLevels", [
|
|
178
|
+
{ counter: 1, name: "Default", roles: [] }
|
|
179
|
+
]);
|
|
180
|
+
v((t) => !t);
|
|
181
|
+
} catch (t) {
|
|
182
|
+
q({
|
|
183
|
+
type: "error",
|
|
184
|
+
message: `error ${t}`
|
|
185
|
+
}), v((n) => !n);
|
|
186
|
+
}
|
|
187
|
+
})();
|
|
188
|
+
}, [w]), O(() => {
|
|
189
|
+
if (B.current) {
|
|
190
|
+
let e = B.current;
|
|
191
|
+
return () => {
|
|
192
|
+
A("conversion_event", {
|
|
193
|
+
form: e,
|
|
194
|
+
form_name: "Add Notification",
|
|
195
|
+
submit: E.current
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
}, [B.current]), /* @__PURE__ */ a(
|
|
200
|
+
xe,
|
|
201
|
+
{
|
|
202
|
+
open: w,
|
|
203
|
+
anchor: "right",
|
|
204
|
+
onClose: U,
|
|
205
|
+
className: "z-[1300]",
|
|
206
|
+
slotProps: {
|
|
207
|
+
paper: {
|
|
208
|
+
sx: {
|
|
209
|
+
width: { xs: "calc(100vw - 16px)", sm: 480, md: 650 },
|
|
210
|
+
maxWidth: "100vw",
|
|
211
|
+
overflowX: "hidden"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"data-testid": "managenotification-drawer",
|
|
216
|
+
children: /* @__PURE__ */ a(Oe, { isLoading: oe, children: /* @__PURE__ */ o(
|
|
217
|
+
l,
|
|
218
|
+
{
|
|
219
|
+
container: !0,
|
|
220
|
+
className: "flex flex-col w-full md:w-[650px] max-w-full min-w-0",
|
|
221
|
+
ref: B,
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ a(l, { className: "p-2.5 px-5 flex border-b w-full", children: /* @__PURE__ */ a(
|
|
224
|
+
c,
|
|
225
|
+
{
|
|
226
|
+
className: "font-medium text-lg text-customBlue",
|
|
227
|
+
"data-testid": "managenotification-typography-title",
|
|
228
|
+
children: f ? `${r("Update Notification")} ` : `${r("ADD NOTIFICATION")}`
|
|
229
|
+
}
|
|
230
|
+
) }),
|
|
231
|
+
/* @__PURE__ */ o(l, { className: "flex flex-col p-4 w-full min-w-0", container: !0, children: [
|
|
232
|
+
/* @__PURE__ */ o(l, { children: [
|
|
233
|
+
/* @__PURE__ */ o(c, { variant: "body2", children: [
|
|
234
|
+
r("Type"),
|
|
235
|
+
" ",
|
|
236
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
237
|
+
] }),
|
|
238
|
+
/* @__PURE__ */ a(
|
|
239
|
+
N,
|
|
240
|
+
{
|
|
241
|
+
control: m,
|
|
242
|
+
name: "notificationType",
|
|
243
|
+
id: "notificationType",
|
|
244
|
+
options: de,
|
|
245
|
+
displayName: "label",
|
|
246
|
+
optionValue: "value",
|
|
247
|
+
errors: d,
|
|
248
|
+
onChange: me,
|
|
249
|
+
dataTestId: "managenotification-dropdown-notification-type"
|
|
250
|
+
}
|
|
251
|
+
)
|
|
252
|
+
] }),
|
|
253
|
+
/* @__PURE__ */ o(l, { children: [
|
|
254
|
+
/* @__PURE__ */ o(c, { variant: "body2", children: [
|
|
255
|
+
r("Name"),
|
|
256
|
+
" ",
|
|
257
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
258
|
+
] }),
|
|
259
|
+
/* @__PURE__ */ a(
|
|
260
|
+
g,
|
|
261
|
+
{
|
|
262
|
+
control: m,
|
|
263
|
+
name: "notificationName",
|
|
264
|
+
placeholder: "Enter Name",
|
|
265
|
+
id: "notificationName",
|
|
266
|
+
errors: d,
|
|
267
|
+
dataTestId: "managenotification-textfield-notification-name"
|
|
268
|
+
}
|
|
269
|
+
)
|
|
270
|
+
] }),
|
|
271
|
+
/* @__PURE__ */ o(l, { children: [
|
|
272
|
+
/* @__PURE__ */ o(c, { variant: "body2", children: [
|
|
273
|
+
r("Code"),
|
|
274
|
+
" ",
|
|
275
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
276
|
+
] }),
|
|
277
|
+
/* @__PURE__ */ a(
|
|
278
|
+
g,
|
|
279
|
+
{
|
|
280
|
+
control: m,
|
|
281
|
+
placeholder: "Enter Code",
|
|
282
|
+
name: "code",
|
|
283
|
+
id: "code",
|
|
284
|
+
errors: d,
|
|
285
|
+
dataTestId: "managenotification-textfield-code"
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
] }),
|
|
289
|
+
/* @__PURE__ */ o(l, { children: [
|
|
290
|
+
/* @__PURE__ */ o(c, { variant: "body2", children: [
|
|
291
|
+
r("Action For"),
|
|
292
|
+
" ",
|
|
293
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
294
|
+
] }),
|
|
295
|
+
/* @__PURE__ */ a(
|
|
296
|
+
N,
|
|
297
|
+
{
|
|
298
|
+
control: m,
|
|
299
|
+
name: "notificationFor",
|
|
300
|
+
id: "notificationFor",
|
|
301
|
+
options: P,
|
|
302
|
+
displayName: "label",
|
|
303
|
+
optionValue: "value",
|
|
304
|
+
errors: d,
|
|
305
|
+
onChange: (e) => $(e, "notificationFor"),
|
|
306
|
+
dataTestId: "managenotification-dropdown-notification-for"
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
] }),
|
|
310
|
+
s.notificationType === "WEB" && /* @__PURE__ */ o(
|
|
311
|
+
l,
|
|
312
|
+
{
|
|
313
|
+
container: !0,
|
|
314
|
+
spacing: 1,
|
|
315
|
+
display: "flex",
|
|
316
|
+
flexDirection: "column",
|
|
317
|
+
children: [
|
|
318
|
+
/* @__PURE__ */ o(l, { children: [
|
|
319
|
+
/* @__PURE__ */ o(c, { variant: "body2", children: [
|
|
320
|
+
r("Data For"),
|
|
321
|
+
" ",
|
|
322
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
323
|
+
] }),
|
|
324
|
+
/* @__PURE__ */ a(
|
|
325
|
+
N,
|
|
326
|
+
{
|
|
327
|
+
control: m,
|
|
328
|
+
name: "dataFor",
|
|
329
|
+
id: "dataFor",
|
|
330
|
+
options: P,
|
|
331
|
+
displayName: "label",
|
|
332
|
+
optionValue: "value",
|
|
333
|
+
errors: d,
|
|
334
|
+
onChange: (e) => $(e, "dataFor"),
|
|
335
|
+
dataTestId: "managenotification-dropdown-data-for"
|
|
336
|
+
}
|
|
337
|
+
)
|
|
338
|
+
] }),
|
|
339
|
+
/* @__PURE__ */ o(l, { children: [
|
|
340
|
+
/* @__PURE__ */ a(c, { variant: "body2", children: r("Action By") }),
|
|
341
|
+
/* @__PURE__ */ a(
|
|
342
|
+
Z,
|
|
343
|
+
{
|
|
344
|
+
options: x,
|
|
345
|
+
control: m,
|
|
346
|
+
name: "roles",
|
|
347
|
+
placeholder: "Select Role",
|
|
348
|
+
onChange: (e, t, n) => fe(t, "roles", n),
|
|
349
|
+
value: (z = s == null ? void 0 : s.roles) == null ? void 0 : z.map(
|
|
350
|
+
(e) => x.find((t) => t.id === e)
|
|
351
|
+
),
|
|
352
|
+
errors: d,
|
|
353
|
+
getOptionLabel: (e) => e == null ? void 0 : e.name,
|
|
354
|
+
dataTestId: "managenotification-select-action-by"
|
|
355
|
+
}
|
|
356
|
+
)
|
|
357
|
+
] }),
|
|
358
|
+
/* @__PURE__ */ o(l, { children: [
|
|
359
|
+
/* @__PURE__ */ a(c, { variant: "body2", children: r("Order No.") }),
|
|
360
|
+
/* @__PURE__ */ a(
|
|
361
|
+
g,
|
|
362
|
+
{
|
|
363
|
+
control: m,
|
|
364
|
+
name: "orderNo",
|
|
365
|
+
id: "orderNo",
|
|
366
|
+
errors: d,
|
|
367
|
+
placeholder: "Enter Order No",
|
|
368
|
+
inputProps: { inputMode: "numeric", pattern: "[0-9]*" },
|
|
369
|
+
type: "number",
|
|
370
|
+
onInput: (e) => {
|
|
371
|
+
e.target.value = e.target.value.replace(/\D/g, "");
|
|
372
|
+
},
|
|
373
|
+
dataTestId: "managenotification-textfield-order-no"
|
|
374
|
+
}
|
|
375
|
+
)
|
|
376
|
+
] }),
|
|
377
|
+
/* @__PURE__ */ o(l, { children: [
|
|
378
|
+
/* @__PURE__ */ a(c, { variant: "body2", children: r("Color Code") }),
|
|
379
|
+
/* @__PURE__ */ a(
|
|
380
|
+
l,
|
|
381
|
+
{
|
|
382
|
+
onClick: (e) => M(e.currentTarget),
|
|
383
|
+
className: "w-full h-[20px] border border-gray-300 cursor-pointer",
|
|
384
|
+
style: {
|
|
385
|
+
backgroundColor: s.colorCode || "#000"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
),
|
|
389
|
+
/* @__PURE__ */ a(
|
|
390
|
+
ve,
|
|
391
|
+
{
|
|
392
|
+
id: ae,
|
|
393
|
+
open: te,
|
|
394
|
+
anchorEl: _,
|
|
395
|
+
onClose: () => M(null),
|
|
396
|
+
anchorOrigin: {
|
|
397
|
+
vertical: "bottom",
|
|
398
|
+
horizontal: "left"
|
|
399
|
+
},
|
|
400
|
+
transformOrigin: {
|
|
401
|
+
vertical: "top",
|
|
402
|
+
horizontal: "left"
|
|
403
|
+
},
|
|
404
|
+
children: /* @__PURE__ */ a(l, { className: "p-2", children: /* @__PURE__ */ a(
|
|
405
|
+
Fe,
|
|
406
|
+
{
|
|
407
|
+
color: s.colorCode || "#000",
|
|
408
|
+
onChangeComplete: (e) => i("colorCode", e.hex),
|
|
409
|
+
"data-testid": "managenotification-sketch-picker"
|
|
410
|
+
}
|
|
411
|
+
) })
|
|
412
|
+
}
|
|
413
|
+
)
|
|
414
|
+
] }),
|
|
415
|
+
/* @__PURE__ */ a(l, { children: /* @__PURE__ */ a(
|
|
416
|
+
K,
|
|
417
|
+
{
|
|
418
|
+
name: "isLocationFilterRequired",
|
|
419
|
+
label: "Do you want location based filter?",
|
|
420
|
+
labelSizeInRem: ".9rem",
|
|
421
|
+
control: m,
|
|
422
|
+
dataTestId: "managenotification-checkbox-location-filter"
|
|
423
|
+
}
|
|
424
|
+
) }),
|
|
425
|
+
s.isLocationFilterRequired && /* @__PURE__ */ o(H, { children: [
|
|
426
|
+
/* @__PURE__ */ o(l, { children: [
|
|
427
|
+
/* @__PURE__ */ o(c, { variant: "body2", children: [
|
|
428
|
+
r("Fetch Up to Level"),
|
|
429
|
+
" ",
|
|
430
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
431
|
+
] }),
|
|
432
|
+
/* @__PURE__ */ a(
|
|
433
|
+
g,
|
|
434
|
+
{
|
|
435
|
+
control: m,
|
|
436
|
+
placeholder: "Fetch Upto Level",
|
|
437
|
+
name: "fetchUptoLevel",
|
|
438
|
+
id: "fetchUptoLevel",
|
|
439
|
+
errors: d,
|
|
440
|
+
dataTestId: "managenotification-textfield-fetch-upto-level"
|
|
441
|
+
}
|
|
442
|
+
)
|
|
443
|
+
] }),
|
|
444
|
+
/* @__PURE__ */ o(l, { children: [
|
|
445
|
+
/* @__PURE__ */ o(c, { variant: "body2", children: [
|
|
446
|
+
r("Required Upto Level"),
|
|
447
|
+
" ",
|
|
448
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
449
|
+
] }),
|
|
450
|
+
/* @__PURE__ */ a(
|
|
451
|
+
g,
|
|
452
|
+
{
|
|
453
|
+
control: m,
|
|
454
|
+
name: "requiredUptoLevel",
|
|
455
|
+
placeholder: "Required Upto Level",
|
|
456
|
+
id: "requiredUptoLevel",
|
|
457
|
+
errors: d,
|
|
458
|
+
dataTestId: "managenotification-textfield--upto-level"
|
|
459
|
+
}
|
|
460
|
+
)
|
|
461
|
+
] }),
|
|
462
|
+
/* @__PURE__ */ a(l, { children: /* @__PURE__ */ a(
|
|
463
|
+
K,
|
|
464
|
+
{
|
|
465
|
+
name: "isFetchAccordingAOI",
|
|
466
|
+
label: "fetch according to user aoi",
|
|
467
|
+
labelSizeInRem: ".9rem",
|
|
468
|
+
control: m,
|
|
469
|
+
dataTestId: "managenotification-checkbox-fetch-according-aoi"
|
|
470
|
+
}
|
|
471
|
+
) })
|
|
472
|
+
] }),
|
|
473
|
+
/* @__PURE__ */ o(l, { children: [
|
|
474
|
+
/* @__PURE__ */ o(c, { variant: "body2", children: [
|
|
475
|
+
r("Data Query"),
|
|
476
|
+
" ",
|
|
477
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
478
|
+
] }),
|
|
479
|
+
/* @__PURE__ */ a(
|
|
480
|
+
Y,
|
|
481
|
+
{
|
|
482
|
+
control: m,
|
|
483
|
+
id: "dataQuery",
|
|
484
|
+
name: "dataQuery",
|
|
485
|
+
errors: d,
|
|
486
|
+
label: "",
|
|
487
|
+
minRows: 5,
|
|
488
|
+
dataTestId: "managenotification-textarea-data-query"
|
|
489
|
+
}
|
|
490
|
+
),
|
|
491
|
+
/* @__PURE__ */ o(c, { variant: "caption", className: "font-bold", children: [
|
|
492
|
+
"#taskTypeId# #limit# #offset# #userId# #memberId# #loggedInUserId#",
|
|
493
|
+
s.isLocationFilterRequired && "#locationId#"
|
|
494
|
+
] })
|
|
495
|
+
] }),
|
|
496
|
+
/* @__PURE__ */ a(l, { container: !0, display: "flex", size: { xs: 12 }, children: /* @__PURE__ */ o(Te, { className: "flex flex-row", component: "fieldset", children: [
|
|
497
|
+
/* @__PURE__ */ o(c, { variant: "body2", mt: 1.4, mr: 2, children: [
|
|
498
|
+
r("Type of Action"),
|
|
499
|
+
" ",
|
|
500
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
501
|
+
] }),
|
|
502
|
+
/* @__PURE__ */ o(
|
|
503
|
+
Be,
|
|
504
|
+
{
|
|
505
|
+
row: !0,
|
|
506
|
+
"aria-label": "radio-group",
|
|
507
|
+
value: s.actionBase,
|
|
508
|
+
name: "actionBase",
|
|
509
|
+
onChange: ge,
|
|
510
|
+
"data-testid": "managenotification-radiogroup-actionbase",
|
|
511
|
+
children: [
|
|
512
|
+
/* @__PURE__ */ a(
|
|
513
|
+
R,
|
|
514
|
+
{
|
|
515
|
+
value: "URL",
|
|
516
|
+
control: /* @__PURE__ */ a(I, {}),
|
|
517
|
+
label: r("URL Based"),
|
|
518
|
+
sx: {
|
|
519
|
+
"& .MuiFormControlLabel-label": {
|
|
520
|
+
fontSize: "13px"
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
"data-testid": "managenotification-formcontrollabel-url"
|
|
524
|
+
}
|
|
525
|
+
),
|
|
526
|
+
/* @__PURE__ */ a(
|
|
527
|
+
R,
|
|
528
|
+
{
|
|
529
|
+
value: "MODAL",
|
|
530
|
+
control: /* @__PURE__ */ a(I, {}),
|
|
531
|
+
label: r("Modal Based"),
|
|
532
|
+
sx: {
|
|
533
|
+
"& .MuiFormControlLabel-label": {
|
|
534
|
+
fontSize: "13px"
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
"data-testid": "managenotification-formcontrollabel-modal"
|
|
538
|
+
}
|
|
539
|
+
),
|
|
540
|
+
/* @__PURE__ */ a(
|
|
541
|
+
R,
|
|
542
|
+
{
|
|
543
|
+
value: "ACTION",
|
|
544
|
+
control: /* @__PURE__ */ a(I, {}),
|
|
545
|
+
label: r("Action based"),
|
|
546
|
+
sx: {
|
|
547
|
+
"& .MuiFormControlLabel-label": {
|
|
548
|
+
fontSize: "13px"
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
"data-testid": "managenotification-formcontrollabel-action"
|
|
552
|
+
}
|
|
553
|
+
),
|
|
554
|
+
/* @__PURE__ */ a(
|
|
555
|
+
R,
|
|
556
|
+
{
|
|
557
|
+
value: "FORM_CONFIGURATOR",
|
|
558
|
+
control: /* @__PURE__ */ a(I, {}),
|
|
559
|
+
label: r("Form Configurator"),
|
|
560
|
+
sx: {
|
|
561
|
+
"& .MuiFormControlLabel-label": {
|
|
562
|
+
fontSize: "13px"
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
"data-testid": "managenotification-formcontrollabel-form-configurator"
|
|
566
|
+
}
|
|
567
|
+
)
|
|
568
|
+
]
|
|
569
|
+
}
|
|
570
|
+
),
|
|
571
|
+
/* @__PURE__ */ o(c, { "data-testid": "managenotification-typography-actionbase-error", children: [
|
|
572
|
+
(d == null ? void 0 : d.actionBase) && /* @__PURE__ */ a("p", { className: "error-helper-text", children: (Q = d == null ? void 0 : d.actionBase) == null ? void 0 : Q.message }),
|
|
573
|
+
" "
|
|
574
|
+
] })
|
|
575
|
+
] }) }),
|
|
576
|
+
s.actionBase === "URL" && /* @__PURE__ */ o(l, { children: [
|
|
577
|
+
/* @__PURE__ */ o(c, { variant: "body2", children: [
|
|
578
|
+
r("URL"),
|
|
579
|
+
" ",
|
|
580
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
581
|
+
] }),
|
|
582
|
+
/* @__PURE__ */ a(
|
|
583
|
+
g,
|
|
584
|
+
{
|
|
585
|
+
placeholder: "Enter Url",
|
|
586
|
+
control: m,
|
|
587
|
+
name: "url",
|
|
588
|
+
id: "url",
|
|
589
|
+
errors: d,
|
|
590
|
+
dataTestId: "managenotification-customtextfield-url"
|
|
591
|
+
}
|
|
592
|
+
)
|
|
593
|
+
] }),
|
|
594
|
+
s.actionBase === "MODAL" && /* @__PURE__ */ o(l, { children: [
|
|
595
|
+
/* @__PURE__ */ o(
|
|
596
|
+
c,
|
|
597
|
+
{
|
|
598
|
+
variant: "body2",
|
|
599
|
+
"data-testid": "managenotification-typography-modal-label",
|
|
600
|
+
children: [
|
|
601
|
+
r("Modal Name"),
|
|
602
|
+
" ",
|
|
603
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
604
|
+
]
|
|
605
|
+
}
|
|
606
|
+
),
|
|
607
|
+
/* @__PURE__ */ a(
|
|
608
|
+
g,
|
|
609
|
+
{
|
|
610
|
+
placeholder: "Enter Modal Name",
|
|
611
|
+
control: m,
|
|
612
|
+
name: "modalName",
|
|
613
|
+
id: "modalName",
|
|
614
|
+
errors: d,
|
|
615
|
+
dataTestId: "managenotification-customtextfield-modal"
|
|
616
|
+
}
|
|
617
|
+
)
|
|
618
|
+
] }),
|
|
619
|
+
s.actionBase === "ACTION" && /* @__PURE__ */ o(l, { children: [
|
|
620
|
+
/* @__PURE__ */ o(
|
|
621
|
+
c,
|
|
622
|
+
{
|
|
623
|
+
variant: "body2",
|
|
624
|
+
className: "mb-1",
|
|
625
|
+
"data-testid": "managenotification-typography-action-label",
|
|
626
|
+
children: [
|
|
627
|
+
r("Action Query"),
|
|
628
|
+
" ",
|
|
629
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
630
|
+
]
|
|
631
|
+
}
|
|
632
|
+
),
|
|
633
|
+
/* @__PURE__ */ a(
|
|
634
|
+
Y,
|
|
635
|
+
{
|
|
636
|
+
control: m,
|
|
637
|
+
id: "actionQuery",
|
|
638
|
+
name: "actionQuery",
|
|
639
|
+
errors: d,
|
|
640
|
+
label: "",
|
|
641
|
+
minRows: 5,
|
|
642
|
+
"data-testid": "managenotification-customtextarea-actionquery"
|
|
643
|
+
}
|
|
644
|
+
)
|
|
645
|
+
] }),
|
|
646
|
+
s.actionBase === "FORM_CONFIGURATOR" && /* @__PURE__ */ o(H, { children: [
|
|
647
|
+
/* @__PURE__ */ o(l, { children: [
|
|
648
|
+
/* @__PURE__ */ o(c, { variant: "body2", children: [
|
|
649
|
+
r("Form Configurator"),
|
|
650
|
+
" ",
|
|
651
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
652
|
+
] }),
|
|
653
|
+
/* @__PURE__ */ a(
|
|
654
|
+
N,
|
|
655
|
+
{
|
|
656
|
+
control: m,
|
|
657
|
+
name: "formCode",
|
|
658
|
+
id: "formCode",
|
|
659
|
+
options: S,
|
|
660
|
+
displayName: "form_name",
|
|
661
|
+
optionValue: "form_code",
|
|
662
|
+
errors: d,
|
|
663
|
+
onChange: (e) => {
|
|
664
|
+
i("formCode", e.target.value);
|
|
665
|
+
const t = S.find((n) => n.form_code === e.target.value);
|
|
666
|
+
t && t.page_params ? i("formParams", t.page_params.split(",").reduce((n, p) => ({ ...n, [p]: "" }), {})) : i("formParams", {});
|
|
667
|
+
},
|
|
668
|
+
dataTestId: "managenotification-dropdown-form-configurator"
|
|
669
|
+
}
|
|
670
|
+
)
|
|
671
|
+
] }),
|
|
672
|
+
s.formParams && Object.keys(s.formParams).map((e) => /* @__PURE__ */ o(l, { children: [
|
|
673
|
+
/* @__PURE__ */ a(c, { variant: "body2", className: "mb-1", children: e }),
|
|
674
|
+
/* @__PURE__ */ a(
|
|
675
|
+
N,
|
|
676
|
+
{
|
|
677
|
+
control: m,
|
|
678
|
+
name: `formParams.${e}`,
|
|
679
|
+
id: `formParams_${e}`,
|
|
680
|
+
options: se,
|
|
681
|
+
displayName: "label",
|
|
682
|
+
optionValue: "value",
|
|
683
|
+
errors: d,
|
|
684
|
+
dataTestId: `managenotification-dropdown-${e}`
|
|
685
|
+
}
|
|
686
|
+
)
|
|
687
|
+
] }, e))
|
|
688
|
+
] }),
|
|
689
|
+
/* @__PURE__ */ o(l, { className: "w-full min-w-0", children: [
|
|
690
|
+
/* @__PURE__ */ a(
|
|
691
|
+
L,
|
|
692
|
+
{
|
|
693
|
+
onClick: pe,
|
|
694
|
+
variant: "contained",
|
|
695
|
+
size: "small",
|
|
696
|
+
className: "mb-2 mt-2",
|
|
697
|
+
"data-testid": "managenotification-button-add-escalation",
|
|
698
|
+
children: `${r("Add")} ${r("Escalation Level")}`
|
|
699
|
+
}
|
|
700
|
+
),
|
|
701
|
+
/* @__PURE__ */ a(
|
|
702
|
+
Ce,
|
|
703
|
+
{
|
|
704
|
+
sx: {
|
|
705
|
+
border: "1px solid #d1d5db",
|
|
706
|
+
display: "block",
|
|
707
|
+
maxHeight: 260,
|
|
708
|
+
maxWidth: "100%",
|
|
709
|
+
overflowX: "scroll",
|
|
710
|
+
overflowY: "auto",
|
|
711
|
+
scrollbarGutter: "stable",
|
|
712
|
+
width: {
|
|
713
|
+
xs: "calc(100vw - 48px)",
|
|
714
|
+
sm: 448,
|
|
715
|
+
md: 618
|
|
716
|
+
},
|
|
717
|
+
"&::-webkit-scrollbar": {
|
|
718
|
+
height: 8,
|
|
719
|
+
width: 8
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
"data-testid": "managenotification-escalation-table-container",
|
|
723
|
+
children: /* @__PURE__ */ o(
|
|
724
|
+
Re,
|
|
725
|
+
{
|
|
726
|
+
stickyHeader: !0,
|
|
727
|
+
sx: {
|
|
728
|
+
minWidth: 900,
|
|
729
|
+
tableLayout: "fixed",
|
|
730
|
+
width: 900
|
|
731
|
+
},
|
|
732
|
+
className: "border border-gray-300",
|
|
733
|
+
children: [
|
|
734
|
+
/* @__PURE__ */ a(Ie, { children: /* @__PURE__ */ o(J, { children: [
|
|
735
|
+
/* @__PURE__ */ a(
|
|
736
|
+
y,
|
|
737
|
+
{
|
|
738
|
+
className: "border border-gray-300 p-2",
|
|
739
|
+
sx: { minWidth: 280, width: 280 },
|
|
740
|
+
children: /* @__PURE__ */ a(
|
|
741
|
+
c,
|
|
742
|
+
{
|
|
743
|
+
variant: "body2",
|
|
744
|
+
className: "font-bold",
|
|
745
|
+
"data-testid": "managenotification-typography-name",
|
|
746
|
+
children: r("Name")
|
|
747
|
+
}
|
|
748
|
+
)
|
|
749
|
+
}
|
|
750
|
+
),
|
|
751
|
+
/* @__PURE__ */ a(
|
|
752
|
+
y,
|
|
753
|
+
{
|
|
754
|
+
className: "border border-gray-300 p-2",
|
|
755
|
+
sx: { minWidth: 430, width: 430 },
|
|
756
|
+
children: /* @__PURE__ */ a(
|
|
757
|
+
c,
|
|
758
|
+
{
|
|
759
|
+
variant: "body2",
|
|
760
|
+
className: "font-bold",
|
|
761
|
+
"data-testid": "managenotification-typography-performer",
|
|
762
|
+
children: r("Performer")
|
|
763
|
+
}
|
|
764
|
+
)
|
|
765
|
+
}
|
|
766
|
+
),
|
|
767
|
+
/* @__PURE__ */ a(
|
|
768
|
+
y,
|
|
769
|
+
{
|
|
770
|
+
className: "p-2",
|
|
771
|
+
sx: { minWidth: 130, width: 130 },
|
|
772
|
+
children: /* @__PURE__ */ a(
|
|
773
|
+
c,
|
|
774
|
+
{
|
|
775
|
+
variant: "body2",
|
|
776
|
+
className: "font-bold",
|
|
777
|
+
"data-testid": "managenotification-typography-action",
|
|
778
|
+
children: r("Actions")
|
|
779
|
+
}
|
|
780
|
+
)
|
|
781
|
+
}
|
|
782
|
+
)
|
|
783
|
+
] }) }),
|
|
784
|
+
/* @__PURE__ */ a(we, { children: (G = C("escalationLevels")) == null ? void 0 : G.map((e, t) => {
|
|
785
|
+
var n, p;
|
|
786
|
+
return /* @__PURE__ */ o(
|
|
787
|
+
J,
|
|
788
|
+
{
|
|
789
|
+
children: [
|
|
790
|
+
/* @__PURE__ */ a(
|
|
791
|
+
y,
|
|
792
|
+
{
|
|
793
|
+
className: "border border-gray-300 p-2",
|
|
794
|
+
sx: { minWidth: 280, width: 280 },
|
|
795
|
+
children: /* @__PURE__ */ a(
|
|
796
|
+
g,
|
|
797
|
+
{
|
|
798
|
+
control: m,
|
|
799
|
+
errors: d,
|
|
800
|
+
name: `escalationLevels[${t}].name`,
|
|
801
|
+
dataTestId: `managenotification-customtextfield-name-${e.counter}`
|
|
802
|
+
}
|
|
803
|
+
)
|
|
804
|
+
}
|
|
805
|
+
),
|
|
806
|
+
/* @__PURE__ */ a(
|
|
807
|
+
y,
|
|
808
|
+
{
|
|
809
|
+
className: "border border-gray-300 p-2",
|
|
810
|
+
sx: { minWidth: 430, width: 430 },
|
|
811
|
+
children: /* @__PURE__ */ a(
|
|
812
|
+
Z,
|
|
813
|
+
{
|
|
814
|
+
options: s.roles ? (n = s.roles) == null ? void 0 : n.map(
|
|
815
|
+
(h) => x.find((b) => b.id === h)
|
|
816
|
+
) : [],
|
|
817
|
+
name: `escalationLevels[${t}].roles`,
|
|
818
|
+
control: m,
|
|
819
|
+
onChange: (h, b) => ue(b, t),
|
|
820
|
+
value: (p = s.escalationLevels[t].roles) == null ? void 0 : p.map(
|
|
821
|
+
(h) => x.find((b) => b.id === h)
|
|
822
|
+
),
|
|
823
|
+
errors: d,
|
|
824
|
+
getOptionLabel: (h) => h == null ? void 0 : h.name,
|
|
825
|
+
dataTestId: `managenotification-customautocomplete-performer-${e.counter}`
|
|
826
|
+
}
|
|
827
|
+
)
|
|
828
|
+
}
|
|
829
|
+
),
|
|
830
|
+
/* @__PURE__ */ a(y, { sx: { minWidth: 130, width: 130 }, children: t > 0 && /* @__PURE__ */ a(
|
|
831
|
+
Me,
|
|
832
|
+
{
|
|
833
|
+
icon: Se,
|
|
834
|
+
onClick: () => he(
|
|
835
|
+
e.id ? e.id : e.counter
|
|
836
|
+
),
|
|
837
|
+
className: "text-[14px] text-[var(--color-error)]",
|
|
838
|
+
"data-testid": `managenotification-delete-action-${e.counter}`
|
|
839
|
+
}
|
|
840
|
+
) })
|
|
841
|
+
]
|
|
842
|
+
},
|
|
843
|
+
e.counter ? e.counter : e.id
|
|
844
|
+
);
|
|
845
|
+
}) })
|
|
846
|
+
]
|
|
847
|
+
}
|
|
848
|
+
)
|
|
849
|
+
}
|
|
850
|
+
)
|
|
851
|
+
] })
|
|
852
|
+
]
|
|
853
|
+
}
|
|
854
|
+
),
|
|
855
|
+
s.notificationType === "MO" && /* @__PURE__ */ o(l, { children: [
|
|
856
|
+
/* @__PURE__ */ o(c, { variant: "body2", children: [
|
|
857
|
+
r("Role"),
|
|
858
|
+
/* @__PURE__ */ a("span", { className: "text-red-500 ml-1", children: "*" })
|
|
859
|
+
] }),
|
|
860
|
+
/* @__PURE__ */ a(
|
|
861
|
+
N,
|
|
862
|
+
{
|
|
863
|
+
control: m,
|
|
864
|
+
options: x,
|
|
865
|
+
name: "roleId",
|
|
866
|
+
id: "roleId",
|
|
867
|
+
displayName: "name",
|
|
868
|
+
value: D("roleId") || "",
|
|
869
|
+
optionValue: "id",
|
|
870
|
+
errors: d,
|
|
871
|
+
dataTestId: "managenotification-dropdown-role"
|
|
872
|
+
}
|
|
873
|
+
)
|
|
874
|
+
] })
|
|
875
|
+
] }),
|
|
876
|
+
/* @__PURE__ */ o(
|
|
877
|
+
Ae,
|
|
878
|
+
{
|
|
879
|
+
direction: "row",
|
|
880
|
+
spacing: 2,
|
|
881
|
+
justifyContent: "flex-end",
|
|
882
|
+
mt: 2,
|
|
883
|
+
mb: 1.5,
|
|
884
|
+
p: 2,
|
|
885
|
+
children: [
|
|
886
|
+
/* @__PURE__ */ a(
|
|
887
|
+
L,
|
|
888
|
+
{
|
|
889
|
+
variant: "contained",
|
|
890
|
+
color: "secondary",
|
|
891
|
+
size: "small",
|
|
892
|
+
onClick: () => {
|
|
893
|
+
A("button_click", {
|
|
894
|
+
button_name: "managenotification-close-button",
|
|
895
|
+
button_type: "cancel",
|
|
896
|
+
button_id: "managenotification-close-button"
|
|
897
|
+
}), W();
|
|
898
|
+
},
|
|
899
|
+
"data-testid": "managenotification-close-button",
|
|
900
|
+
children: /* @__PURE__ */ a(c, { variant: "caption", children: r("Close") })
|
|
901
|
+
}
|
|
902
|
+
),
|
|
903
|
+
/* @__PURE__ */ a(
|
|
904
|
+
L,
|
|
905
|
+
{
|
|
906
|
+
variant: "contained",
|
|
907
|
+
color: "primary",
|
|
908
|
+
size: "small",
|
|
909
|
+
onClick: le(be),
|
|
910
|
+
type: "submit",
|
|
911
|
+
"data-testid": "managenotification-submit-button",
|
|
912
|
+
children: f ? `${r("Update")}` : `${r("Add")}`
|
|
913
|
+
}
|
|
914
|
+
)
|
|
915
|
+
]
|
|
916
|
+
}
|
|
917
|
+
)
|
|
918
|
+
]
|
|
919
|
+
}
|
|
920
|
+
) })
|
|
921
|
+
}
|
|
922
|
+
);
|
|
923
|
+
}
|
|
924
|
+
De.propTypes = {
|
|
925
|
+
open: T.any,
|
|
926
|
+
handleClose: T.func,
|
|
927
|
+
data: T.any,
|
|
928
|
+
roleData: T.any,
|
|
929
|
+
setNotifications: T.any
|
|
930
|
+
};
|
|
931
|
+
export {
|
|
932
|
+
De as default
|
|
933
|
+
};
|
|
934
|
+
//# sourceMappingURL=ManageNotification-C5MhV77Q.js.map
|