@argusoft/medplat-core 1.0.22 → 1.0.24
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/AddMenuConfiguration-m3R8FDhj.js +5570 -0
- package/dist/AddMenuConfiguration-m3R8FDhj.js.map +1 -0
- package/dist/AddMenuConfiguration.css +1 -1
- package/dist/{ChangePasswordModalCore-DotONnMz.js → ChangePasswordModalCore-Czu7OZe6.js} +957 -954
- package/dist/ChangePasswordModalCore-Czu7OZe6.js.map +1 -0
- package/dist/{ConditionConfig-C3rF2wXU.js → ConditionConfig-BECSbvY2.js} +2 -2
- package/dist/{ConditionConfig-C3rF2wXU.js.map → ConditionConfig-BECSbvY2.js.map} +1 -1
- package/dist/{EntityManagement-D4nG7wUX.js → EntityManagement-GaYsBTvf.js} +2 -2
- package/dist/{EntityManagement-D4nG7wUX.js.map → EntityManagement-GaYsBTvf.js.map} +1 -1
- package/dist/FhirRawResourceList-ZZFd7gTX.js +550 -0
- package/dist/FhirRawResourceList-ZZFd7gTX.js.map +1 -0
- package/dist/FhirServerList-Dkq7Kbes.js +116 -0
- package/dist/FhirServerList-Dkq7Kbes.js.map +1 -0
- package/dist/FhirServerProfile-CUOwC6Wb.js +253 -0
- package/dist/FhirServerProfile-CUOwC6Wb.js.map +1 -0
- package/dist/FhirServerWizard-Db6Hm4bQ.js +161 -0
- package/dist/FhirServerWizard-Db6Hm4bQ.js.map +1 -0
- package/dist/{ImmunizationConfigurationBase-CTBoSuSz.js → ImmunizationConfigurationBase-BevKZx_l.js} +386 -302
- package/dist/ImmunizationConfigurationBase-BevKZx_l.js.map +1 -0
- package/dist/{ManageEventConfiguration-BntUc_YI.js → ManageEventConfiguration-CBi2KMB1.js} +4 -4
- package/dist/{ManageEventConfiguration-BntUc_YI.js.map → ManageEventConfiguration-CBi2KMB1.js.map} +1 -1
- package/dist/{ManageUser-Ca1BsI1u.js → ManageUser-BnEPFSPT.js} +219 -219
- package/dist/{ManageUser-Ca1BsI1u.js.map → ManageUser-BnEPFSPT.js.map} +1 -1
- package/dist/{MobileMenuManagement-CV6QCeos.js → MobileMenuManagement-CVAKyKDa.js} +33 -32
- package/dist/MobileMenuManagement-CVAKyKDa.js.map +1 -0
- package/dist/{MobileTypeEventConfigModal-BNjZ8pnq.js → MobileTypeEventConfigModal-C34AN-IJ.js} +2 -2
- package/dist/{MobileTypeEventConfigModal-BNjZ8pnq.js.map → MobileTypeEventConfigModal-C34AN-IJ.js.map} +1 -1
- package/dist/{OtherTypeEventConfigModal-DiVhWDpG.js → OtherTypeEventConfigModal-BYjMFl0-.js} +93 -93
- package/dist/OtherTypeEventConfigModal-BYjMFl0-.js.map +1 -0
- package/dist/ServerFormFields-SLghoZ2z.js +136 -0
- package/dist/ServerFormFields-SLghoZ2z.js.map +1 -0
- package/dist/SyncDialog-BRGpHOE4.js +130 -0
- package/dist/SyncDialog-BRGpHOE4.js.map +1 -0
- package/dist/{TableList-HGbEN4bv.js → TableList-D6jnIbnz.js} +227 -244
- package/dist/TableList-D6jnIbnz.js.map +1 -0
- package/dist/{TypeConfiguration-CupQxH9Y.js → TypeConfiguration-Bs5WkIa2.js} +2 -2
- package/dist/{TypeConfiguration-CupQxH9Y.js.map → TypeConfiguration-Bs5WkIa2.js.map} +1 -1
- package/dist/dashboardLayoutUtils-Bt5HA96J.js +265 -0
- package/dist/dashboardLayoutUtils-Bt5HA96J.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +191 -135
- package/dist/index.js.map +1 -1
- package/dist/permissions-DEWACxJN.js +308 -0
- package/dist/permissions-DEWACxJN.js.map +1 -0
- package/package.json +1 -1
- package/dist/AddMenuConfiguration-DsnY0Rws.js +0 -2237
- package/dist/AddMenuConfiguration-DsnY0Rws.js.map +0 -1
- package/dist/ChangePasswordModalCore-DotONnMz.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-CTBoSuSz.js.map +0 -1
- package/dist/MobileMenuManagement-CV6QCeos.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-DiVhWDpG.js.map +0 -1
- package/dist/TableList-HGbEN4bv.js.map +0 -1
|
@@ -1,48 +1,49 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { api as
|
|
3
|
-
import { showToast as
|
|
4
|
-
import { Typography as w, TextField as k, Button as
|
|
2
|
+
import { api as T } from "@/common/interceptors/AxiosInterceptor";
|
|
3
|
+
import { showToast as A } from "@/common/toaster/toaster";
|
|
4
|
+
import { Typography as w, TextField as k, Button as F, TableContainer as R, Paper as j, Table as E, TableHead as P, TableRow as m, TableCell as a, TableBody as I, IconButton as W } from "@mui/material";
|
|
5
5
|
import h from "@mui/material/Grid2";
|
|
6
6
|
import { Box as q } from "@mui/system";
|
|
7
7
|
import { useState as g, useEffect as B } from "react";
|
|
8
8
|
import { useNavigate as z } from "react-router";
|
|
9
9
|
import D from "@/common/fontAwesomeIcons/FontAwesomeIcons";
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
import { c as J } from "./dashboardLayoutUtils-Bt5HA96J.js";
|
|
11
|
+
const O = "/mobilemenu/v2", H = {
|
|
12
|
+
getMobileMenuList: () => T.get(O + "/list")
|
|
12
13
|
};
|
|
13
|
-
function
|
|
14
|
-
const [M, x] = g([]), [C, v] = g(""), [
|
|
14
|
+
function oe() {
|
|
15
|
+
const [M, x] = g([]), [C, v] = g(""), [d, p] = g([]), b = z(), N = (r, n, s) => {
|
|
15
16
|
const c = `addMenuConfiguration?${new URLSearchParams({ id: r }).toString()}`;
|
|
16
|
-
|
|
17
|
+
b(c, { state: { mobileMenuList: d[s], roleId: n } });
|
|
17
18
|
};
|
|
18
19
|
B(() => {
|
|
19
20
|
(async () => await S())();
|
|
20
21
|
}, []);
|
|
21
22
|
const S = async () => {
|
|
22
23
|
try {
|
|
23
|
-
const
|
|
24
|
+
const s = ((await H.getMobileMenuList()).data || []).map((l) => {
|
|
24
25
|
const c = JSON.parse(l.configJson);
|
|
25
|
-
let
|
|
26
|
-
Object.values(c).forEach((
|
|
26
|
+
let u = [];
|
|
27
|
+
Object.values(c).forEach((t) => {
|
|
27
28
|
let f = [];
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
y.menuName &&
|
|
29
|
+
t.features && Array.isArray(t.features) ? f = t.features : t.layout && Array.isArray(t.layout) && (u.push(...J(t.layout)), f = t.layout.flatMap((o) => o.type === "SECTION" && o.features && Array.isArray(o.features) ? o.features : [])), f.forEach((o) => {
|
|
30
|
+
o.menuName && !o.menus && u.push(o.menuName), o.menus && Array.isArray(o.menus) && o.menus.forEach((y) => {
|
|
31
|
+
y.menuName && u.push(y.menuName);
|
|
31
32
|
});
|
|
32
33
|
});
|
|
33
34
|
});
|
|
34
|
-
const
|
|
35
|
+
const L = [...new Set(u)].join(", ");
|
|
35
36
|
return {
|
|
36
37
|
id: l.id,
|
|
37
38
|
roleId: l.roleId,
|
|
38
39
|
name: l.roleName,
|
|
39
|
-
features:
|
|
40
|
+
features: L,
|
|
40
41
|
configJson: c
|
|
41
42
|
};
|
|
42
43
|
});
|
|
43
|
-
x(
|
|
44
|
+
x(s), p(s);
|
|
44
45
|
} catch (r) {
|
|
45
|
-
|
|
46
|
+
A({ message: r, type: "error" });
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
49
|
return /* @__PURE__ */ e(h, { children: /* @__PURE__ */ i(q, { sx: { p: 3, backgroundColor: "background.default" }, children: [
|
|
@@ -56,56 +57,56 @@ function ee() {
|
|
|
56
57
|
variant: "outlined",
|
|
57
58
|
value: C,
|
|
58
59
|
onChange: (r) => {
|
|
59
|
-
const
|
|
60
|
-
v(
|
|
60
|
+
const n = r.target.value.toLowerCase();
|
|
61
|
+
v(n), p(M.filter((s) => s.name.toLowerCase().includes(n)));
|
|
61
62
|
},
|
|
62
63
|
sx: { mb: 2, backgroundColor: "var(--color-background2)", borderRadius: 1 }
|
|
63
64
|
}
|
|
64
65
|
)
|
|
65
66
|
] }),
|
|
66
67
|
/* @__PURE__ */ e(h, { sx: { justifyContent: "center", alignItems: "center", mb: 2 }, children: /* @__PURE__ */ e(
|
|
67
|
-
|
|
68
|
+
F,
|
|
68
69
|
{
|
|
69
70
|
sx: { float: "right", mb: 2 },
|
|
70
71
|
size: "small",
|
|
71
72
|
variant: "contained",
|
|
72
73
|
color: "success",
|
|
73
74
|
onClick: () => {
|
|
74
|
-
|
|
75
|
+
b("addMenuConfiguration");
|
|
75
76
|
},
|
|
76
77
|
children: "Add configuration"
|
|
77
78
|
}
|
|
78
79
|
) }),
|
|
79
|
-
/* @__PURE__ */ e(
|
|
80
|
-
/* @__PURE__ */ e(
|
|
80
|
+
/* @__PURE__ */ e(R, { component: j, elevation: 1, sx: { borderRadius: 2, maxHeight: 700 }, children: /* @__PURE__ */ i(E, { children: [
|
|
81
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ i(m, { sx: { backgroundColor: "#f2f2f2" }, children: [
|
|
81
82
|
/* @__PURE__ */ e(a, { sx: { fontWeight: "bold" }, children: "Sr. No." }),
|
|
82
83
|
/* @__PURE__ */ e(a, { sx: { fontWeight: "bold" }, children: "Role Name" }),
|
|
83
84
|
/* @__PURE__ */ e(a, { sx: { fontWeight: "bold" }, children: "Features" }),
|
|
84
85
|
/* @__PURE__ */ e(a, { align: "center", sx: { fontWeight: "bold" }, children: "Actions" })
|
|
85
86
|
] }) }),
|
|
86
87
|
/* @__PURE__ */ i(I, { children: [
|
|
87
|
-
|
|
88
|
+
d.map((r, n) => /* @__PURE__ */ i(
|
|
88
89
|
m,
|
|
89
90
|
{
|
|
90
91
|
sx: {
|
|
91
|
-
backgroundColor:
|
|
92
|
+
backgroundColor: n % 2 === 0 ? "#fff" : "var(--color-gray4)",
|
|
92
93
|
"&:hover": { backgroundColor: "#e9f3ff" }
|
|
93
94
|
},
|
|
94
95
|
children: [
|
|
95
|
-
/* @__PURE__ */ e(a, { children:
|
|
96
|
+
/* @__PURE__ */ e(a, { children: n + 1 }),
|
|
96
97
|
/* @__PURE__ */ e(a, { children: r.name }),
|
|
97
98
|
/* @__PURE__ */ e(a, { children: r.features }),
|
|
98
|
-
/* @__PURE__ */ e(a, { align: "center", children: /* @__PURE__ */ e(W, { color: "primary", onClick: () => N(r.id, r.roleId,
|
|
99
|
+
/* @__PURE__ */ e(a, { align: "center", children: /* @__PURE__ */ e(W, { color: "primary", onClick: () => N(r.id, r.roleId, n), children: /* @__PURE__ */ e(D, { iconName: "faPen", size: "sm" }) }) })
|
|
99
100
|
]
|
|
100
101
|
},
|
|
101
|
-
|
|
102
|
+
n
|
|
102
103
|
)),
|
|
103
|
-
|
|
104
|
+
d.length === 0 && /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(a, { colSpan: 4, align: "center", sx: { py: 4, color: "gray" }, children: "No roles found." }) })
|
|
104
105
|
] })
|
|
105
106
|
] }) })
|
|
106
107
|
] }) });
|
|
107
108
|
}
|
|
108
109
|
export {
|
|
109
|
-
|
|
110
|
+
oe as default
|
|
110
111
|
};
|
|
111
|
-
//# sourceMappingURL=MobileMenuManagement-
|
|
112
|
+
//# sourceMappingURL=MobileMenuManagement-CVAKyKDa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobileMenuManagement-CVAKyKDa.js","sources":["../src/services/MobileMenuService.js","../src/views/MobileMenuManagement/MobileMenuManagement.jsx"],"sourcesContent":["import { api } from '@/common/interceptors/AxiosInterceptor';\n\nconst basePath = '/mobilemenu/v2';\n\nexport const MobileMenuService = {\n getMobileMenuList: () => api.get(basePath + '/list'),\n};\n","/**\n * @author Sanya Srivastava <ssrivastava@argusoft.com>\n * @date 2025-03-24 (Monday)\n */\n\nimport { MobileMenuService } from '../../services/MobileMenuService';\nimport { showToast } from '@/common/toaster/toaster';\nimport {\n Button,\n IconButton,\n Paper,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n TextField,\n Typography,\n} from '@mui/material';\nimport Grid from '@mui/material/Grid2';\nimport { Box } from '@mui/system';\nimport React, { useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router';\nimport FontAwesomeIcons from '@/common/fontAwesomeIcons/FontAwesomeIcons';\nimport { collectFeatureNamesFromLayout } from './dashboardLayoutUtils';\n\nexport default function MobileMenuManagement() {\n const [mobileMenuList, setMobileMenuList] = useState([]);\n const [searchText, setSearchText] = useState('');\n const [filteredList, setFilteredList] = useState([]);\n\n const navigate = useNavigate();\n\n const handleEdit = (id, roleId, index) => {\n const queryParams = new URLSearchParams({ id: id }).toString();\n const url = `addMenuConfiguration?${queryParams}`;\n navigate(url, { state: { mobileMenuList: filteredList[index], roleId: roleId } });\n };\n\n useEffect(() => {\n (async () => {\n await fetchMenuRelations();\n })();\n }, []);\n\n const fetchMenuRelations = async () => {\n try {\n const response = await MobileMenuService.getMobileMenuList();\n const menuData = response.data || [];\n const formattedData = menuData.map((item) => {\n const config = JSON.parse(item.configJson);\n let allFeatureNames = [];\n\n Object.values(config).forEach((tab) => {\n let topLevelItems = [];\n\n if (tab.features && Array.isArray(tab.features)) {\n topLevelItems = tab.features;\n } else if (tab.layout && Array.isArray(tab.layout)) {\n allFeatureNames.push(...collectFeatureNamesFromLayout(tab.layout));\n topLevelItems = tab.layout.flatMap((layoutItem) => {\n if (layoutItem.type === 'SECTION' && layoutItem.features && Array.isArray(layoutItem.features)) {\n return layoutItem.features;\n }\n return [];\n });\n }\n\n topLevelItems.forEach((item) => {\n if (item.menuName && !item.menus) {\n allFeatureNames.push(item.menuName);\n }\n\n if (item.menus && Array.isArray(item.menus)) {\n item.menus.forEach((menuItem) => {\n if (menuItem.menuName) {\n allFeatureNames.push(menuItem.menuName);\n }\n });\n }\n });\n });\n\n const uniqueNames = [...new Set(allFeatureNames)];\n const featureSummary = uniqueNames.join(', ');\n\n return {\n id: item.id,\n roleId: item.roleId,\n name: item.roleName,\n features: featureSummary,\n configJson: config,\n };\n });\n setMobileMenuList(formattedData);\n setFilteredList(formattedData);\n } catch (error) {\n showToast({ message: error, type: 'error' });\n }\n };\n\n const handleSearch = (e) => {\n const value = e.target.value.toLowerCase();\n setSearchText(value);\n setFilteredList(mobileMenuList.filter((item) => item.name.toLowerCase().includes(value)));\n };\n\n return (\n <Grid>\n <Box sx={{ p: 3, backgroundColor: 'background.default' }}>\n <Grid container sx={{ justifyContent: 'space-between', alignItems: 'center', mb: 2 }}>\n <Typography variant=\"h5\" sx={{ mb: 2, fontWeight: 'bold' }}>\n Mobile Menu Management\n </Typography>\n <TextField\n size=\"small\"\n placeholder=\"Search Role\"\n variant=\"outlined\"\n value={searchText}\n onChange={handleSearch}\n sx={{ mb: 2, backgroundColor: 'var(--color-background2)', borderRadius: 1 }}\n />\n </Grid>\n\n <Grid sx={{ justifyContent: 'center', alignItems: 'center', mb: 2 }}>\n <Button\n sx={{ float: 'right', mb: 2 }}\n size=\"small\"\n variant=\"contained\"\n color=\"success\"\n onClick={() => {\n navigate('addMenuConfiguration');\n }}\n >\n Add configuration\n </Button>\n </Grid>\n\n <TableContainer component={Paper} elevation={1} sx={{ borderRadius: 2, maxHeight: 700 }}>\n <Table>\n <TableHead>\n <TableRow sx={{ backgroundColor: '#f2f2f2' }}>\n <TableCell sx={{ fontWeight: 'bold' }}>Sr. No.</TableCell>\n <TableCell sx={{ fontWeight: 'bold' }}>Role Name</TableCell>\n <TableCell sx={{ fontWeight: 'bold' }}>Features</TableCell>\n <TableCell align=\"center\" sx={{ fontWeight: 'bold' }}>\n Actions\n </TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {filteredList.map((item, index) => (\n <TableRow\n key={index}\n sx={{\n backgroundColor: index % 2 === 0 ? '#fff' : 'var(--color-gray4)',\n '&:hover': { backgroundColor: '#e9f3ff' },\n }}\n >\n <TableCell>{index + 1}</TableCell>\n <TableCell>{item.name}</TableCell>\n <TableCell>{item.features}</TableCell>\n <TableCell align=\"center\">\n <IconButton color=\"primary\" onClick={() => handleEdit(item.id, item.roleId, index)}>\n <FontAwesomeIcons iconName=\"faPen\" size=\"sm\" />\n </IconButton>\n </TableCell>\n </TableRow>\n ))}\n {filteredList.length === 0 && (\n <TableRow>\n <TableCell colSpan={4} align=\"center\" sx={{ py: 4, color: 'gray' }}>\n No roles found.\n </TableCell>\n </TableRow>\n )}\n </TableBody>\n </Table>\n </TableContainer>\n </Box>\n </Grid>\n );\n}\n"],"names":["basePath","MobileMenuService","api","MobileMenuManagement","mobileMenuList","setMobileMenuList","useState","searchText","setSearchText","filteredList","setFilteredList","navigate","useNavigate","handleEdit","id","roleId","index","url","useEffect","fetchMenuRelations","formattedData","item","config","allFeatureNames","tab","topLevelItems","collectFeatureNamesFromLayout","layoutItem","menuItem","featureSummary","error","showToast","jsx","Grid","jsxs","Box","Typography","TextField","e","value","Button","TableContainer","Paper","Table","TableHead","TableRow","TableCell","TableBody","IconButton","FontAwesomeIcons"],"mappings":";;;;;;;;;;AAEA,MAAMA,IAAW,kBAEJC,IAAoB;AAAA,EAC/B,mBAAmB,MAAMC,EAAI,IAAIF,IAAW,OAAO;AACrD;ACqBA,SAAwBG,KAAuB;AAC7C,QAAM,CAACC,GAAgBC,CAAiB,IAAIC,EAAS,CAAA,CAAE,GACjD,CAACC,GAAYC,CAAa,IAAIF,EAAS,EAAE,GACzC,CAACG,GAAcC,CAAe,IAAIJ,EAAS,CAAA,CAAE,GAE7CK,IAAWC,EAAA,GAEXC,IAAa,CAACC,GAAIC,GAAQC,MAAU;AAExC,UAAMC,IAAM,wBADQ,IAAI,gBAAgB,EAAE,IAAAH,EAAA,CAAQ,EAAE,SAAA,CACL;AAC/C,IAAAH,EAASM,GAAK,EAAE,OAAO,EAAE,gBAAgBR,EAAaO,CAAK,GAAG,QAAAD,EAAA,GAAkB;AAAA,EAClF;AAEA,EAAAG,EAAU,MAAM;AACd,KAAC,YACC,MAAMC,EAAA;AAAA,EAEV,GAAG,CAAA,CAAE;AAEL,QAAMA,IAAqB,YAAY;AACrC,QAAI;AAGF,YAAMC,MAFW,MAAMnB,EAAkB,kBAAA,GACf,QAAQ,CAAA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S,IAAI,EAAE,IAAI,GAAG,OAAO,UAAU,6BAEpE,EAAA,CACF;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
package/dist/{MobileTypeEventConfigModal-BNjZ8pnq.js → MobileTypeEventConfigModal-C34AN-IJ.js}
RENAMED
|
@@ -9,7 +9,7 @@ import { Modal as le, Typography as O, IconButton as _, Box as c, FormControl as
|
|
|
9
9
|
import w from "@/views/custom-components/CustomTextField";
|
|
10
10
|
import { retrieveAllNotifications as he } from "@/common/services/GlobalApis";
|
|
11
11
|
import { showToast as pe } from "@/common/toaster/toaster";
|
|
12
|
-
import "./ManageEventConfiguration-
|
|
12
|
+
import "./ManageEventConfiguration-CBi2KMB1.js";
|
|
13
13
|
import ye from "@/hooks/useTrackEvent";
|
|
14
14
|
import { useTranslateProvider as ge } from "@/common/languageTranslator/TranslationContext";
|
|
15
15
|
import { faXmark as ve, faTrash as De } from "@fortawesome/free-solid-svg-icons";
|
|
@@ -780,4 +780,4 @@ Fe.propTypes = {
|
|
|
780
780
|
export {
|
|
781
781
|
Fe as default
|
|
782
782
|
};
|
|
783
|
-
//# sourceMappingURL=MobileTypeEventConfigModal-
|
|
783
|
+
//# sourceMappingURL=MobileTypeEventConfigModal-C34AN-IJ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileTypeEventConfigModal-BNjZ8pnq.js","sources":["../src/views/Events/MobileTypeEventConfigModal.jsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { useForm, Controller } from \"react-hook-form\";\nimport { yupResolver } from \"@hookform/resolvers/yup\";\nimport Grid from \"@mui/material/Grid2\";\nimport * as Yup from \"yup\";\nimport {\n Button,\n IconButton,\n Modal,\n Box,\n FormControl,\n MenuItem,\n Select,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n TextField,\n Typography,\n Paper,\n Stack,\n} from \"@mui/material\";\nimport CustomTextField from \"@/views/custom-components/CustomTextField\";\nimport { retrieveAllNotifications } from \"@/common/services/GlobalApis\";\nimport { showToast } from \"@/common/toaster/toaster\";\nimport \"./Styles/ManageEventConfiguration.scss\";\n// import { useTracking } from \"useranalytics/dist/index.es\";\\\n\nimport useTrackEvent from \"@/hooks/useTrackEvent\";\nimport { useTranslateProvider } from \"@/common/languageTranslator/TranslationContext\";\nimport { faTrash, faXmark } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n// Define the validation schema using Yup\n\n/**\n * Modal component for configuring mobile type event notifications.\n * @module MobileTypeEventConfigModal\n * @param {Object} props - The props for the component.\n * @param {boolean} props.open - Whether the modal is open or not.\n * @param {Function} props.handleClose - Function to close the modal.\n * @param {Function} props.handleClick - Function to handle submission of the modal form.\n * @param {Object} props.type - Configuration type object passed to the modal.\n *\n * @returns {JSX.Element} The rendered modal component.\n */\nconst MobileTypeEventConfigModal = ({\n open,\n handleClose,\n handleClick,\n type,\n}) => {\n const formRef = useRef(null);\n const submitRef = useRef(false);\n const trackEvent = useTrackEvent();\n const [notificationTypes, setNotificationTypes] = useState([]);\n const [mobileNotification, setMobileNotification] = useState(null);\n const [mobileNotificationConfigs, setMobileNotificationConfigs] = useState(\n [],\n );\n const [mobileConfigLength, setmobileConfigLength] = useState(0);\n const { translate } = useTranslateProvider();\n\n /**\n * @function handleDelete\n * Deletes a mobile notification configuration at the specified index.\n *\n * @param {number} index - The index of the configuration to delete.\n */\n const handleDeleteConfig = (index) => {\n if (mobileNotificationConfigs) {\n mobileNotificationConfigs.forEach((data, i) => {\n setValue(`notificationCode${i}`, \"\"); // or set it to a default value\n setValue(`numberOfDaysAddedForOnDate${i}`, 0);\n setValue(`numberOfDaysAddedForExpiryDate${i}`, 0);\n setValue(`numberOfDaysAddedForDueDate${i}`, 0);\n });\n }\n\n setMobileNotificationConfigs((prev) => {\n const newConfigs = prev.filter((_, i) => i !== index);\n\n // Reset form values after deleting\n newConfigs.forEach((data, i) => {\n setValue(`notificationCode${i}`, data.notificationCode); // or set it to a default value\n setValue(\n `numberOfDaysAddedForOnDate${i}`,\n data.numberOfDaysAddedForOnDate,\n );\n setValue(\n `numberOfDaysAddedForExpiryDate${i}`,\n data.numberOfDaysAddedForExpiryDate,\n );\n setValue(\n `numberOfDaysAddedForDueDate${i}`,\n data.numberOfDaysAddedForDueDate,\n );\n });\n\n return newConfigs;\n });\n };\n\n /**\n * Updates the specified field of a mobile notification configuration.\n * @function handleChange\n * @param {number} index - The index of the configuration to update.\n * @param {string} field - The field name to update.\n * @param {*} value - The new value to set for the specified field.\n */\n const handleChange = (index, field, value) => {\n const newConfigs = [...mobileNotificationConfigs];\n newConfigs[index][field] = value;\n setMobileNotificationConfigs(newConfigs);\n };\n\n const validationSchema = Yup.object().shape({\n mobileNotificationType: Yup.string().required(\"Select notification type\"),\n baseDateFieldName: Yup.string().required(\"Enter base date field\"),\n familyFieldName: Yup.string().test(\n \"is-required\",\n \"family name is required\",\n function (value) {\n if (\n mobileNotification?.notificationFor === \"FAMILY\" ||\n mobileNotification?.notificationFor === \"MEMBER\"\n ) {\n return !!value;\n }\n return true;\n },\n ),\n memberFieldName: Yup.string().test(\n \"is-required\",\n \"member name is required\",\n function (value) {\n if (mobileNotification?.notificationFor === \"MEMBER\") {\n return !!value;\n }\n return true;\n },\n ),\n userFieldName: Yup.string().test(\n \"is-required\",\n \"user name is required\",\n function (value) {\n if (mobileNotification?.notificationFor === \"USER\") {\n return !!value;\n }\n return true;\n },\n ),\n });\n\n const {\n control,\n handleSubmit,\n reset,\n setValue,\n setError,\n clearErrors,\n getValues,\n formState: { errors },\n } = useForm({\n defaultValues: {},\n resolver: yupResolver(validationSchema),\n mode: \"onChange\",\n });\n useEffect(() => {\n if (type && notificationTypes.length > 0) {\n Object.keys(type)?.forEach((key) => {\n if (key === \"index\") {\n setValue(key, type[key]);\n }\n if (key === \"mobileNotificationType\") {\n const notification = notificationTypes.filter(\n (data) => data.id === parseInt(type[key]),\n );\n setMobileNotification(...notification);\n }\n if (key === \"mobileNotificationConfigs\" && type[key]) {\n setMobileNotificationConfigs(type[key] || []);\n setmobileConfigLength(type[key]?.length);\n } else if (type[key]) {\n setValue(key, type[key]);\n }\n });\n }\n }, [type, notificationTypes]);\n\n useEffect(() => {\n loadInitialState();\n }, []);\n\n const close = () => {\n trackEvent(\"conversion_event\", {\n form: formRef.current,\n form_name: \"Add Mobile Type Configuration\",\n submit: submitRef.current,\n }); // Use the current ref value\n\n handleClose();\n };\n\n // useEffect(() => {\n // if (formRef.current) {\n // let form = formRef.current;\n\n // return () => {\n // };\n // }\n // }, [formRef.current]);\n\n /**\n * @async\n * @function loadInitialState\n * Loads the initial state by retrieving notification types.\n * If an error occurs during retrieval, a toast message is displayed.\n */\n const loadInitialState = async () => {\n try {\n const res = await retrieveAllNotifications(true);\n setNotificationTypes(res?.data);\n } catch {\n showToast({ message: \"Error in retrieving notification\", type: \"error\" });\n }\n };\n\n /**\n * @function addMobileNotification\n * Adds a new mobile notification configuration to the state.\n */\n const addMobileNotification = () => {\n let addconfig = true;\n mobileNotificationConfigs?.forEach((config, index) => {\n if (config.notificationCode === \"\") {\n addconfig = false;\n const fieldPath = `notificationCode${index}`;\n\n setError(fieldPath, {\n type: \"manual\",\n message: \"Enter # of days to add\",\n });\n }\n });\n if (addconfig) {\n setmobileConfigLength((prev) => prev + 1);\n setMobileNotificationConfigs([\n ...mobileNotificationConfigs,\n {\n notificationCode: \"\",\n numberOfDaysAddedForOnDate: 0,\n numberOfDaysAddedForDueDate: 0,\n numberOfDaysAddedForExpiryDate: 0,\n },\n ]);\n }\n };\n\n /**\n * @function onSubmit\n * Handles form submission and processes the input data.\n *\n * @param {Object} data - The form data submitted by the user.\n * @param {Array} mobileNotificationConfigs - An array of mobile notification configurations.\n * @param {Object} type - The selected type configuration.\n *\n * This function performs the following actions:\n * 1. Deletes specific properties from the submitted data object.\n * 2. Adds the mobile notification configurations to the data object.\n * 3. Sets the type property in the data object.\n * 4. Calls handleClick with the processed data.\n * 5. Closes the form and resets the form state.\n */\n\n const onSubmit = (data) => {\n data = JSON.parse(JSON.stringify(data));\n for (let i = 0; i < mobileConfigLength; i++) {\n delete data[`notificationCode${i}`];\n delete data[`numberOfDaysAddedForOnDate${i}`];\n delete data[`numberOfDaysAddedForExpiryDate${i}`];\n delete data[`numberOfDaysAddedForDueDate${i}`];\n }\n\n data.mobileNotificationConfigs = mobileNotificationConfigs;\n data.type = type?.type;\n handleClick(data);\n submitRef.current = true;\n close();\n reset();\n };\n\n return (\n <Modal\n data-testid=\"mobiletypeeventconfigmodal-modal\"\n open={open}\n className=\"flex items-center justify-center\"\n onClose={() => {\n close();\n reset();\n }}\n sx={{\n \"& .MuiBackdrop-root\": {\n backgroundColor: \"rgba(0, 0, 0, 0.1)\",\n },\n }}\n >\n <Grid\n container\n className=\"w-[90%] md:w-[80%] shadow-md flex flex-col\"\n sx={{\n // 1. Theme-aware background\n backgroundColor: (theme) => theme.palette.background.paper,\n\n // 2. Dynamic Border/Shadow for Dark Mode\n border: (theme) =>\n theme.palette.mode === \"dark\"\n ? `1px solid ${theme.palette.divider}`\n : \"none\",\n\n // 3. GitHub-style shadow (Soft in light, Deep in dark)\n boxShadow: (theme) =>\n theme.palette.mode === \"dark\"\n ? \"0 8px 24px rgba(0,0,0,0.4)\"\n : theme.shadows[2], // Standard MUI shadow for light mode\n\n borderRadius: \"12px\", // Matches your MuiCard configuration\n transition: \"all 0.3s ease-in-out\",\n // Keeps children inside the rounded corners\n }}\n >\n <Grid\n className=\"manageeventconfiguration-modal-header p-2.5 px-5 flex border-b\"\n data-testid=\"mobiletypeeventconfigmodal-header\"\n >\n <Typography variant=\"body1\" className=\"font-medium text-lg text-customBlue\">\n {translate(\"Add\")} {translate(type?.type)}{\" \"}\n {translate(\"Configuration\")}\n </Typography>\n <IconButton\n size=\"small\"\n onClick={() => {\n close();\n reset();\n }}\n data-testid=\"mobiletypeeventconfigmodal-close-button\"\n >\n <FontAwesomeIcon icon={faXmark} />\n </IconButton>\n </Grid>\n <form\n onSubmit={handleSubmit(onSubmit)}\n className=\"w-full\"\n data-testid=\"mobiletypeeventconfigmodal-form\"\n ref={formRef}\n >\n <Grid\n container\n className=\"px-[40px] max-h-[60vh] overflow-y-auto w-full\"\n >\n <Grid\n container\n spacing={2}\n className=\"w-full flex flex-col md:flex-row items-start\"\n >\n <Grid\n item\n className=\"border-b border-gray-300 p-2.5 flex flex-col items-start w-full \"\n size={{ sm: 12 }}\n data-testid=\"mobiletypeeventconfigmodal-implicit-params\"\n >\n <Box className=\"whitespace-normal w-full break-words\">\n <strong>{translate(\"Available Implicit Parameters\")}</strong>:{\" \"}\n {type?.implicitParam}\n </Box>\n </Grid>\n <Grid item className=\"w-[90%] sm:w-1/4\">\n <FormControl\n variant=\"outlined\"\n className=\"w-full\"\n data-testid=\"mobiletypeeventconfigmodal-notification-type\"\n >\n <div>\n {translate(\"Notification\")} {translate(\"Type\")}\n </div>\n <Box className=\"w-full\">\n <Controller\n name=\"mobileNotificationType\"\n control={control}\n defaultValue=\"\"\n render={({ field }) => (\n <Select\n {...field}\n size=\"small\"\n error={!!errors.mobileNotificationType}\n onChange={(e) => {\n field.onChange(e.target.value);\n const notification = notificationTypes.filter(\n (data) => data.id === e.target.value,\n );\n setMobileNotification(...notification);\n }}\n className=\"w-full\"\n data-testid=\"mobiletypeeventconfigmodal-notification-select\"\n >\n <MenuItem value=\"\">\n <Typography variant=\"body2\">\n {translate(\"None\")}\n </Typography>\n </MenuItem>\n {notificationTypes?.map((data, index) => (\n <MenuItem key={index + 1} value={data.id}>\n <Typography variant=\"body2\">\n {data.notificationName}\n </Typography>\n </MenuItem>\n ))}\n </Select>\n )}\n />\n {errors?.mobileNotificationType && (\n <p\n className=\"error-helper\"\n data-testid=\"mobiletypeeventconfigmodal-notification-error\"\n >\n {errors?.mobileNotificationType?.message}\n </p>\n )}\n </Box>\n </FormControl>\n </Grid>\n <Grid item sm={4} size={{ sm: 4 }}>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n data-testid=\"mobiletypeeventconfigmodal-base-date-field\"\n >\n <div>\n {translate(\"Base\")} {translate(\"Date\")} {translate(\"Field\")}{\" \"}\n {translate(\"Name\")}\n <span style={{ color: \"red\", marginLeft: 4 }}>*</span>\n </div>\n <Box className=\" w-full\">\n <CustomTextField\n control={control}\n id=\"baseDateFieldName\"\n name=\"baseDateFieldName\"\n errors={errors}\n label=\"\"\n size=\"small\"\n dataTestId=\"mobiletypeeventconfigmodal-base-date-input\"\n />\n </Box>\n </FormControl>\n </Grid>\n <Grid item sm={4} size={{ sm: 4 }}>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n data-testid=\"mobiletypeeventconfigmodal-ref-code-field\"\n >\n <div>\n {translate(\"Ref\")} {translate(\"Code\")} {translate(\"Field\")}{\" \"}\n {translate(\"Name\")}\n </div>\n <Box className=\" w-full\">\n <CustomTextField\n control={control}\n id=\"refCode\"\n name=\"refCode\"\n errors={errors}\n label=\"\"\n size=\"small\"\n dataTestId=\"mobiletypeeventconfigmodal-ref-code-input\"\n />\n </Box>\n </FormControl>\n </Grid>\n {mobileNotification?.notificationFor === \"USER\" && (\n <Grid item size={{ xs: 4 }}>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n data-testid=\"mobiletypeeventconfigmodal-user-field\"\n >\n <div>\n {translate(\"User\")} {translate(\"Field\")}{\" \"}\n {translate(\"Name\")}\n <span style={{ color: \"red\", marginLeft: 4 }}>*</span>\n </div>\n <Box className=\" w-full\">\n <CustomTextField\n control={control}\n id=\"userFieldName\"\n name=\"userFieldName\"\n errors={errors}\n label=\"\"\n size=\"small\"\n dataTestId=\"mobiletypeeventconfigmodal-user-input\"\n />\n </Box>\n </FormControl>\n </Grid>\n )}\n {mobileNotification?.notificationFor === \"MEMBER\" && (\n <Grid item size={{ sm: 4 }}>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n data-testid=\"mobiletypeeventconfigmodal-member-field\"\n >\n <div>\n {translate(\"Member\")} {translate(\"Field\")}{\" \"}\n {translate(\"Name\")}\n <span style={{ color: \"red\", marginLeft: 4 }}>*</span>\n </div>\n <Box className=\" w-full\">\n <CustomTextField\n control={control}\n id=\"memberFieldName\"\n name=\"memberFieldName\"\n errors={errors}\n label=\"\"\n size=\"small\"\n dataTestId=\"mobiletypeeventconfigmodal-member-input\"\n />\n </Box>\n </FormControl>\n </Grid>\n )}\n {(mobileNotification?.notificationFor === \"FAMILY\" ||\n mobileNotification?.notificationFor === \"MEMBER\") && (\n <Grid item sm={4} size={{ sm: 4 }}>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n data-testid=\"mobiletypeeventconfigmodal-family-field\"\n >\n <div>\n {translate(\"Family\")} {translate(\"Field\")}{\" \"}\n {translate(\"Name\")}\n <span style={{ color: \"red\", marginLeft: 4 }}>*</span>\n </div>\n <Box className=\" w-full\">\n <CustomTextField\n control={control}\n id=\"familyFieldName\"\n name=\"familyFieldName\"\n errors={errors}\n label=\"\"\n size=\"small\"\n dataTestId=\"mobiletypeeventconfigmodal-family-input\"\n />\n </Box>\n </FormControl>\n </Grid>\n )}\n </Grid>\n <Grid container className=\"mt-2.5 w-full\">\n <Grid item size={{ xs: 12 }}>\n <Button\n variant=\"contained\"\n onClick={addMobileNotification}\n data-testid=\"mobiletypeeventconfigmodal-add-configuration\"\n >\n {translate(\"Add\")} {translate(\"Configuration\")}\n </Button>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <TableContainer\n component={Paper}\n className=\"m-2.5 w-full mobile-type-event-config-table-container\"\n data-testid=\"mobiletypeeventconfigmodal-table\"\n >\n <Table\n size=\"small\"\n className=\"mobile-type-event-config-table\"\n aria-label=\"mobile notification configuration table\"\n >\n <TableHead>\n <TableRow>\n <TableCell>{translate(\"Code\")}</TableCell>\n <TableCell>\n {translate(\"Added\")} {translate(\"Days\")}{\" \"}\n {translate(\"For\")} {translate(\"Schedule\")}\n </TableCell>\n <TableCell>\n {translate(\"Added\")} {translate(\"Days\")}{\" \"}\n {translate(\"For\")} {translate(\"Due\")}\n </TableCell>\n <TableCell>\n {translate(\"Added\")} {translate(\"Days\")}{\" \"}\n {translate(\"For\")} {translate(\"Expiry\")}\n </TableCell>\n <TableCell>{translate(\"Actions\")}</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {mobileNotificationConfigs.length > 0 ? (\n mobileNotificationConfigs.map((config, index) => (\n <TableRow key={index + 1}>\n <TableCell>\n <Box>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n >\n <Box className=\" w-full\">\n <Controller\n control={control}\n name={`notificationCode${index}`}\n defaultValue={config.notificationCode}\n render={({ field }) => (\n <TextField\n required\n variant=\"outlined\"\n size=\"small\"\n {...field}\n error={Boolean(\n errors[`notificationCode${index}`],\n )}\n onChange={(e) => {\n setValue(\n `notificationCode${index}`,\n e.target.value,\n );\n handleChange(\n index,\n \"notificationCode\",\n e.target.value,\n );\n const fieldPath = `notificationCode${index}`;\n if (getValues(fieldPath) === \"\") {\n setError(fieldPath, {\n type: \"manual\",\n message:\n \"Enter # of days to add\",\n });\n } else {\n clearErrors(fieldPath);\n }\n }}\n placeholder=\"Enter # of days to add\"\n onBlur={() => {\n if (field.value === \"\") {\n setError(\n `notificationCode${index}`,\n {\n type: \"manual\",\n message:\n \"Enter # of days to add\",\n },\n );\n } else {\n clearErrors(\n `notificationCode${index}`,\n );\n }\n }}\n data-testid={`mobiletypeeventconfigmodal-notification-code-input-${index}`}\n />\n )}\n />\n {errors[`notificationCode${index}`] && (\n <p\n className=\"error-helper-table\"\n data-testid={`mobiletypeeventconfigmodal-notification-code-error-${index}`}\n >\n {\n errors[`notificationCode${index}`]\n ?.message\n }\n </p>\n )}\n </Box>\n </FormControl>\n </Box>\n </TableCell>\n <TableCell>\n <Box>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n >\n <Box className=\" w-full\">\n <Controller\n control={control}\n name={`numberOfDaysAddedForOnDate${index}`}\n defaultValue={\n config.numberOfDaysAddedForOnDate\n }\n render={({ field }) => (\n <TextField\n required\n type=\"number\"\n variant=\"outlined\"\n size=\"small\"\n {...field}\n error={Boolean(\n errors[\n `numberOfDaysAddedForOnDate${index}`\n ],\n )}\n onChange={(e) => {\n setValue(\n `numberOfDaysAddedForOnDate${index}`,\n e.target.value,\n );\n handleChange(\n index,\n \"numberOfDaysAddedForOnDate\",\n Number(e.target.value),\n );\n const fieldPath = `numberOfDaysAddedForOnDate${index}`;\n if (getValues(fieldPath) === \"\") {\n setError(fieldPath, {\n type: \"manual\",\n message:\n \"Enter # of days to add\",\n });\n } else {\n clearErrors(fieldPath);\n }\n }}\n placeholder=\"Enter # of days to add\"\n onBlur={() => {\n if (field.value === \"\") {\n setError(\n `numberOfDaysAddedForOnDate${index}`,\n {\n type: \"manual\",\n message:\n \"Enter # of days to add\",\n },\n );\n } else {\n clearErrors(\n `numberOfDaysAddedForOnDate${index}`,\n );\n }\n }}\n data-testid={`mobiletypeeventconfigmodal-on-date-input-${index}`}\n />\n )}\n />\n {errors[\n `numberOfDaysAddedForOnDate${index}`\n ] && (\n <p\n className=\"error-helper-table\"\n data-testid={`mobiletypeeventconfigmodal-on-date-error-${index}`}\n >\n {\n errors[\n `numberOfDaysAddedForOnDate${index}`\n ]?.message\n }\n </p>\n )}\n </Box>\n </FormControl>\n </Box>\n </TableCell>\n <TableCell>\n <Box>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n >\n <Box className=\" w-full\">\n <Controller\n control={control}\n name={`numberOfDaysAddedForDueDate${index}`}\n defaultValue={\n config.numberOfDaysAddedForDueDate\n }\n render={({ field }) => (\n <TextField\n variant=\"outlined\"\n size=\"small\"\n type=\"number\"\n {...field}\n onChange={(e) => {\n setValue(\n `numberOfDaysAddedForDueDate${index}`,\n e.target.value,\n );\n handleChange(\n index,\n \"numberOfDaysAddedForDueDate\",\n Number(e.target.value),\n );\n }}\n data-testid={`mobiletypeeventconfigmodal-due-date-input-${index}`}\n />\n )}\n />\n </Box>\n </FormControl>\n </Box>\n </TableCell>\n <TableCell>\n <Box>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n >\n <Box className=\" w-full\">\n <Controller\n control={control}\n name={`numberOfDaysAddedForExpiryDate${index}`}\n defaultValue={\n config.numberOfDaysAddedForExpiryDate\n }\n render={({ field }) => (\n <TextField\n variant=\"outlined\"\n type=\"number\"\n size=\"small\"\n {...field}\n onChange={(e) => {\n setValue(\n `numberOfDaysAddedForExpiryDate${index}`,\n e.target.value,\n );\n handleChange(\n index,\n \"numberOfDaysAddedForExpiryDate\",\n Number(e.target.value),\n );\n }}\n data-testid={`mobiletypeeventconfigmodal-expiry-date-input-${index}`}\n />\n )}\n />\n </Box>\n </FormControl>\n </Box>\n </TableCell>\n <TableCell>\n <IconButton\n color=\"error\"\n onClick={() => handleDeleteConfig(index)}\n data-testid={`mobiletypeeventconfigmodal-delete-button-${index}`}\n >\n <FontAwesomeIcon icon={faTrash} />\n </IconButton>\n </TableCell>\n </TableRow>\n ))\n ) : (\n <TableRow>\n <TableCell colSpan={5}>\n <Typography\n align=\"center\"\n data-testid=\"mobiletypeeventconfigmodal-no-config\"\n >\n No Mobile Configuration added\n </Typography>\n </TableCell>\n </TableRow>\n )}\n </TableBody>\n </Table>\n </TableContainer>\n </Grid>\n </Grid>\n </Grid>\n <Stack\n direction=\"row\"\n className=\"mr-5\"\n spacing={2}\n justifyContent=\"flex-end\"\n mt={1}\n mb={1}\n >\n <Button\n variant=\"contained\"\n color=\"secondary\"\n onClick={() => {\n close();\n reset();\n }}\n data-testid=\"mobiletypeeventconfigmodal-close-button\"\n >\n <Typography variant=\"body2\">{translate(\"Cancel\")}</Typography>\n </Button>\n <Button\n type=\"submit\"\n variant=\"contained\"\n color=\"primary\"\n data-testid=\"mobiletypeeventconfigmodal-submit-button\"\n >\n {translate(\"Submit\")}\n </Button>\n </Stack>\n </form>\n </Grid>\n </Modal>\n );\n};\n\nMobileTypeEventConfigModal.propTypes = {\n open: PropTypes.any,\n handleClose: PropTypes.any,\n handleClick: PropTypes.any,\n type: PropTypes.any,\n};\n\nexport default MobileTypeEventConfigModal;\n"],"names":["MobileTypeEventConfigModal","open","handleClose","handleClick","type","formRef","useRef","submitRef","trackEvent","useTrackEvent","notificationTypes","setNotificationTypes","useState","mobileNotification","setMobileNotification","mobileNotificationConfigs","setMobileNotificationConfigs","mobileConfigLength","setmobileConfigLength","translate","useTranslateProvider","handleDeleteConfig","index","data","i","setValue","prev","newConfigs","_","handleChange","field","value","validationSchema","Yup","control","handleSubmit","reset","setError","clearErrors","getValues","errors","useForm","yupResolver","useEffect","_a","key","notification","loadInitialState","close","res","retrieveAllNotifications","showToast","addMobileNotification","addconfig","config","fieldPath","onSubmit","jsx","Modal","jsxs","Grid","theme","Typography","IconButton","FontAwesomeIcon","faXmark","Box","FormControl","Controller","Select","e","MenuItem","CustomTextField","Button","TableContainer","Paper","Table","TableHead","TableRow","TableCell","TableBody","TextField","_b","faTrash","Stack","PropTypes"],"mappings":";;;;;;;;;;;;;;;;AAgDA,MAAMA,KAA6B,CAAC;AAAA,EAClC,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AACF,MAAM;;AACJ,QAAMC,IAAUC,EAAO,IAAI,GACrBC,IAAYD,EAAO,EAAK,GACxBE,IAAaC,GAAA,GACb,CAACC,GAAmBC,CAAoB,IAAIC,EAAS,CAAA,CAAE,GACvD,CAACC,GAAoBC,CAAqB,IAAIF,EAAS,IAAI,GAC3D,CAACG,GAA2BC,CAA4B,IAAIJ;AAAA,IAChE,CAAA;AAAA,EAAC,GAEG,CAACK,GAAoBC,CAAqB,IAAIN,EAAS,CAAC,GACxD,EAAE,WAAAO,EAAA,IAAcC,GAAA,GAQhBC,IAAqB,CAACC,MAAU;AACpC,IAAIP,KACFA,EAA0B,QAAQ,CAACQ,GAAMC,MAAM;AAC7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AAMA,EAAU;AAClB;"}
|
|
1
|
+
{"version":3,"file":"MobileTypeEventConfigModal-C34AN-IJ.js","sources":["../src/views/Events/MobileTypeEventConfigModal.jsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { useForm, Controller } from \"react-hook-form\";\nimport { yupResolver } from \"@hookform/resolvers/yup\";\nimport Grid from \"@mui/material/Grid2\";\nimport * as Yup from \"yup\";\nimport {\n Button,\n IconButton,\n Modal,\n Box,\n FormControl,\n MenuItem,\n Select,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n TextField,\n Typography,\n Paper,\n Stack,\n} from \"@mui/material\";\nimport CustomTextField from \"@/views/custom-components/CustomTextField\";\nimport { retrieveAllNotifications } from \"@/common/services/GlobalApis\";\nimport { showToast } from \"@/common/toaster/toaster\";\nimport \"./Styles/ManageEventConfiguration.scss\";\n// import { useTracking } from \"useranalytics/dist/index.es\";\\\n\nimport useTrackEvent from \"@/hooks/useTrackEvent\";\nimport { useTranslateProvider } from \"@/common/languageTranslator/TranslationContext\";\nimport { faTrash, faXmark } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n// Define the validation schema using Yup\n\n/**\n * Modal component for configuring mobile type event notifications.\n * @module MobileTypeEventConfigModal\n * @param {Object} props - The props for the component.\n * @param {boolean} props.open - Whether the modal is open or not.\n * @param {Function} props.handleClose - Function to close the modal.\n * @param {Function} props.handleClick - Function to handle submission of the modal form.\n * @param {Object} props.type - Configuration type object passed to the modal.\n *\n * @returns {JSX.Element} The rendered modal component.\n */\nconst MobileTypeEventConfigModal = ({\n open,\n handleClose,\n handleClick,\n type,\n}) => {\n const formRef = useRef(null);\n const submitRef = useRef(false);\n const trackEvent = useTrackEvent();\n const [notificationTypes, setNotificationTypes] = useState([]);\n const [mobileNotification, setMobileNotification] = useState(null);\n const [mobileNotificationConfigs, setMobileNotificationConfigs] = useState(\n [],\n );\n const [mobileConfigLength, setmobileConfigLength] = useState(0);\n const { translate } = useTranslateProvider();\n\n /**\n * @function handleDelete\n * Deletes a mobile notification configuration at the specified index.\n *\n * @param {number} index - The index of the configuration to delete.\n */\n const handleDeleteConfig = (index) => {\n if (mobileNotificationConfigs) {\n mobileNotificationConfigs.forEach((data, i) => {\n setValue(`notificationCode${i}`, \"\"); // or set it to a default value\n setValue(`numberOfDaysAddedForOnDate${i}`, 0);\n setValue(`numberOfDaysAddedForExpiryDate${i}`, 0);\n setValue(`numberOfDaysAddedForDueDate${i}`, 0);\n });\n }\n\n setMobileNotificationConfigs((prev) => {\n const newConfigs = prev.filter((_, i) => i !== index);\n\n // Reset form values after deleting\n newConfigs.forEach((data, i) => {\n setValue(`notificationCode${i}`, data.notificationCode); // or set it to a default value\n setValue(\n `numberOfDaysAddedForOnDate${i}`,\n data.numberOfDaysAddedForOnDate,\n );\n setValue(\n `numberOfDaysAddedForExpiryDate${i}`,\n data.numberOfDaysAddedForExpiryDate,\n );\n setValue(\n `numberOfDaysAddedForDueDate${i}`,\n data.numberOfDaysAddedForDueDate,\n );\n });\n\n return newConfigs;\n });\n };\n\n /**\n * Updates the specified field of a mobile notification configuration.\n * @function handleChange\n * @param {number} index - The index of the configuration to update.\n * @param {string} field - The field name to update.\n * @param {*} value - The new value to set for the specified field.\n */\n const handleChange = (index, field, value) => {\n const newConfigs = [...mobileNotificationConfigs];\n newConfigs[index][field] = value;\n setMobileNotificationConfigs(newConfigs);\n };\n\n const validationSchema = Yup.object().shape({\n mobileNotificationType: Yup.string().required(\"Select notification type\"),\n baseDateFieldName: Yup.string().required(\"Enter base date field\"),\n familyFieldName: Yup.string().test(\n \"is-required\",\n \"family name is required\",\n function (value) {\n if (\n mobileNotification?.notificationFor === \"FAMILY\" ||\n mobileNotification?.notificationFor === \"MEMBER\"\n ) {\n return !!value;\n }\n return true;\n },\n ),\n memberFieldName: Yup.string().test(\n \"is-required\",\n \"member name is required\",\n function (value) {\n if (mobileNotification?.notificationFor === \"MEMBER\") {\n return !!value;\n }\n return true;\n },\n ),\n userFieldName: Yup.string().test(\n \"is-required\",\n \"user name is required\",\n function (value) {\n if (mobileNotification?.notificationFor === \"USER\") {\n return !!value;\n }\n return true;\n },\n ),\n });\n\n const {\n control,\n handleSubmit,\n reset,\n setValue,\n setError,\n clearErrors,\n getValues,\n formState: { errors },\n } = useForm({\n defaultValues: {},\n resolver: yupResolver(validationSchema),\n mode: \"onChange\",\n });\n useEffect(() => {\n if (type && notificationTypes.length > 0) {\n Object.keys(type)?.forEach((key) => {\n if (key === \"index\") {\n setValue(key, type[key]);\n }\n if (key === \"mobileNotificationType\") {\n const notification = notificationTypes.filter(\n (data) => data.id === parseInt(type[key]),\n );\n setMobileNotification(...notification);\n }\n if (key === \"mobileNotificationConfigs\" && type[key]) {\n setMobileNotificationConfigs(type[key] || []);\n setmobileConfigLength(type[key]?.length);\n } else if (type[key]) {\n setValue(key, type[key]);\n }\n });\n }\n }, [type, notificationTypes]);\n\n useEffect(() => {\n loadInitialState();\n }, []);\n\n const close = () => {\n trackEvent(\"conversion_event\", {\n form: formRef.current,\n form_name: \"Add Mobile Type Configuration\",\n submit: submitRef.current,\n }); // Use the current ref value\n\n handleClose();\n };\n\n // useEffect(() => {\n // if (formRef.current) {\n // let form = formRef.current;\n\n // return () => {\n // };\n // }\n // }, [formRef.current]);\n\n /**\n * @async\n * @function loadInitialState\n * Loads the initial state by retrieving notification types.\n * If an error occurs during retrieval, a toast message is displayed.\n */\n const loadInitialState = async () => {\n try {\n const res = await retrieveAllNotifications(true);\n setNotificationTypes(res?.data);\n } catch {\n showToast({ message: \"Error in retrieving notification\", type: \"error\" });\n }\n };\n\n /**\n * @function addMobileNotification\n * Adds a new mobile notification configuration to the state.\n */\n const addMobileNotification = () => {\n let addconfig = true;\n mobileNotificationConfigs?.forEach((config, index) => {\n if (config.notificationCode === \"\") {\n addconfig = false;\n const fieldPath = `notificationCode${index}`;\n\n setError(fieldPath, {\n type: \"manual\",\n message: \"Enter # of days to add\",\n });\n }\n });\n if (addconfig) {\n setmobileConfigLength((prev) => prev + 1);\n setMobileNotificationConfigs([\n ...mobileNotificationConfigs,\n {\n notificationCode: \"\",\n numberOfDaysAddedForOnDate: 0,\n numberOfDaysAddedForDueDate: 0,\n numberOfDaysAddedForExpiryDate: 0,\n },\n ]);\n }\n };\n\n /**\n * @function onSubmit\n * Handles form submission and processes the input data.\n *\n * @param {Object} data - The form data submitted by the user.\n * @param {Array} mobileNotificationConfigs - An array of mobile notification configurations.\n * @param {Object} type - The selected type configuration.\n *\n * This function performs the following actions:\n * 1. Deletes specific properties from the submitted data object.\n * 2. Adds the mobile notification configurations to the data object.\n * 3. Sets the type property in the data object.\n * 4. Calls handleClick with the processed data.\n * 5. Closes the form and resets the form state.\n */\n\n const onSubmit = (data) => {\n data = JSON.parse(JSON.stringify(data));\n for (let i = 0; i < mobileConfigLength; i++) {\n delete data[`notificationCode${i}`];\n delete data[`numberOfDaysAddedForOnDate${i}`];\n delete data[`numberOfDaysAddedForExpiryDate${i}`];\n delete data[`numberOfDaysAddedForDueDate${i}`];\n }\n\n data.mobileNotificationConfigs = mobileNotificationConfigs;\n data.type = type?.type;\n handleClick(data);\n submitRef.current = true;\n close();\n reset();\n };\n\n return (\n <Modal\n data-testid=\"mobiletypeeventconfigmodal-modal\"\n open={open}\n className=\"flex items-center justify-center\"\n onClose={() => {\n close();\n reset();\n }}\n sx={{\n \"& .MuiBackdrop-root\": {\n backgroundColor: \"rgba(0, 0, 0, 0.1)\",\n },\n }}\n >\n <Grid\n container\n className=\"w-[90%] md:w-[80%] shadow-md flex flex-col\"\n sx={{\n // 1. Theme-aware background\n backgroundColor: (theme) => theme.palette.background.paper,\n\n // 2. Dynamic Border/Shadow for Dark Mode\n border: (theme) =>\n theme.palette.mode === \"dark\"\n ? `1px solid ${theme.palette.divider}`\n : \"none\",\n\n // 3. GitHub-style shadow (Soft in light, Deep in dark)\n boxShadow: (theme) =>\n theme.palette.mode === \"dark\"\n ? \"0 8px 24px rgba(0,0,0,0.4)\"\n : theme.shadows[2], // Standard MUI shadow for light mode\n\n borderRadius: \"12px\", // Matches your MuiCard configuration\n transition: \"all 0.3s ease-in-out\",\n // Keeps children inside the rounded corners\n }}\n >\n <Grid\n className=\"manageeventconfiguration-modal-header p-2.5 px-5 flex border-b\"\n data-testid=\"mobiletypeeventconfigmodal-header\"\n >\n <Typography variant=\"body1\" className=\"font-medium text-lg text-customBlue\">\n {translate(\"Add\")} {translate(type?.type)}{\" \"}\n {translate(\"Configuration\")}\n </Typography>\n <IconButton\n size=\"small\"\n onClick={() => {\n close();\n reset();\n }}\n data-testid=\"mobiletypeeventconfigmodal-close-button\"\n >\n <FontAwesomeIcon icon={faXmark} />\n </IconButton>\n </Grid>\n <form\n onSubmit={handleSubmit(onSubmit)}\n className=\"w-full\"\n data-testid=\"mobiletypeeventconfigmodal-form\"\n ref={formRef}\n >\n <Grid\n container\n className=\"px-[40px] max-h-[60vh] overflow-y-auto w-full\"\n >\n <Grid\n container\n spacing={2}\n className=\"w-full flex flex-col md:flex-row items-start\"\n >\n <Grid\n item\n className=\"border-b border-gray-300 p-2.5 flex flex-col items-start w-full \"\n size={{ sm: 12 }}\n data-testid=\"mobiletypeeventconfigmodal-implicit-params\"\n >\n <Box className=\"whitespace-normal w-full break-words\">\n <strong>{translate(\"Available Implicit Parameters\")}</strong>:{\" \"}\n {type?.implicitParam}\n </Box>\n </Grid>\n <Grid item className=\"w-[90%] sm:w-1/4\">\n <FormControl\n variant=\"outlined\"\n className=\"w-full\"\n data-testid=\"mobiletypeeventconfigmodal-notification-type\"\n >\n <div>\n {translate(\"Notification\")} {translate(\"Type\")}\n </div>\n <Box className=\"w-full\">\n <Controller\n name=\"mobileNotificationType\"\n control={control}\n defaultValue=\"\"\n render={({ field }) => (\n <Select\n {...field}\n size=\"small\"\n error={!!errors.mobileNotificationType}\n onChange={(e) => {\n field.onChange(e.target.value);\n const notification = notificationTypes.filter(\n (data) => data.id === e.target.value,\n );\n setMobileNotification(...notification);\n }}\n className=\"w-full\"\n data-testid=\"mobiletypeeventconfigmodal-notification-select\"\n >\n <MenuItem value=\"\">\n <Typography variant=\"body2\">\n {translate(\"None\")}\n </Typography>\n </MenuItem>\n {notificationTypes?.map((data, index) => (\n <MenuItem key={index + 1} value={data.id}>\n <Typography variant=\"body2\">\n {data.notificationName}\n </Typography>\n </MenuItem>\n ))}\n </Select>\n )}\n />\n {errors?.mobileNotificationType && (\n <p\n className=\"error-helper\"\n data-testid=\"mobiletypeeventconfigmodal-notification-error\"\n >\n {errors?.mobileNotificationType?.message}\n </p>\n )}\n </Box>\n </FormControl>\n </Grid>\n <Grid item sm={4} size={{ sm: 4 }}>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n data-testid=\"mobiletypeeventconfigmodal-base-date-field\"\n >\n <div>\n {translate(\"Base\")} {translate(\"Date\")} {translate(\"Field\")}{\" \"}\n {translate(\"Name\")}\n <span style={{ color: \"red\", marginLeft: 4 }}>*</span>\n </div>\n <Box className=\" w-full\">\n <CustomTextField\n control={control}\n id=\"baseDateFieldName\"\n name=\"baseDateFieldName\"\n errors={errors}\n label=\"\"\n size=\"small\"\n dataTestId=\"mobiletypeeventconfigmodal-base-date-input\"\n />\n </Box>\n </FormControl>\n </Grid>\n <Grid item sm={4} size={{ sm: 4 }}>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n data-testid=\"mobiletypeeventconfigmodal-ref-code-field\"\n >\n <div>\n {translate(\"Ref\")} {translate(\"Code\")} {translate(\"Field\")}{\" \"}\n {translate(\"Name\")}\n </div>\n <Box className=\" w-full\">\n <CustomTextField\n control={control}\n id=\"refCode\"\n name=\"refCode\"\n errors={errors}\n label=\"\"\n size=\"small\"\n dataTestId=\"mobiletypeeventconfigmodal-ref-code-input\"\n />\n </Box>\n </FormControl>\n </Grid>\n {mobileNotification?.notificationFor === \"USER\" && (\n <Grid item size={{ xs: 4 }}>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n data-testid=\"mobiletypeeventconfigmodal-user-field\"\n >\n <div>\n {translate(\"User\")} {translate(\"Field\")}{\" \"}\n {translate(\"Name\")}\n <span style={{ color: \"red\", marginLeft: 4 }}>*</span>\n </div>\n <Box className=\" w-full\">\n <CustomTextField\n control={control}\n id=\"userFieldName\"\n name=\"userFieldName\"\n errors={errors}\n label=\"\"\n size=\"small\"\n dataTestId=\"mobiletypeeventconfigmodal-user-input\"\n />\n </Box>\n </FormControl>\n </Grid>\n )}\n {mobileNotification?.notificationFor === \"MEMBER\" && (\n <Grid item size={{ sm: 4 }}>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n data-testid=\"mobiletypeeventconfigmodal-member-field\"\n >\n <div>\n {translate(\"Member\")} {translate(\"Field\")}{\" \"}\n {translate(\"Name\")}\n <span style={{ color: \"red\", marginLeft: 4 }}>*</span>\n </div>\n <Box className=\" w-full\">\n <CustomTextField\n control={control}\n id=\"memberFieldName\"\n name=\"memberFieldName\"\n errors={errors}\n label=\"\"\n size=\"small\"\n dataTestId=\"mobiletypeeventconfigmodal-member-input\"\n />\n </Box>\n </FormControl>\n </Grid>\n )}\n {(mobileNotification?.notificationFor === \"FAMILY\" ||\n mobileNotification?.notificationFor === \"MEMBER\") && (\n <Grid item sm={4} size={{ sm: 4 }}>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n data-testid=\"mobiletypeeventconfigmodal-family-field\"\n >\n <div>\n {translate(\"Family\")} {translate(\"Field\")}{\" \"}\n {translate(\"Name\")}\n <span style={{ color: \"red\", marginLeft: 4 }}>*</span>\n </div>\n <Box className=\" w-full\">\n <CustomTextField\n control={control}\n id=\"familyFieldName\"\n name=\"familyFieldName\"\n errors={errors}\n label=\"\"\n size=\"small\"\n dataTestId=\"mobiletypeeventconfigmodal-family-input\"\n />\n </Box>\n </FormControl>\n </Grid>\n )}\n </Grid>\n <Grid container className=\"mt-2.5 w-full\">\n <Grid item size={{ xs: 12 }}>\n <Button\n variant=\"contained\"\n onClick={addMobileNotification}\n data-testid=\"mobiletypeeventconfigmodal-add-configuration\"\n >\n {translate(\"Add\")} {translate(\"Configuration\")}\n </Button>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <TableContainer\n component={Paper}\n className=\"m-2.5 w-full mobile-type-event-config-table-container\"\n data-testid=\"mobiletypeeventconfigmodal-table\"\n >\n <Table\n size=\"small\"\n className=\"mobile-type-event-config-table\"\n aria-label=\"mobile notification configuration table\"\n >\n <TableHead>\n <TableRow>\n <TableCell>{translate(\"Code\")}</TableCell>\n <TableCell>\n {translate(\"Added\")} {translate(\"Days\")}{\" \"}\n {translate(\"For\")} {translate(\"Schedule\")}\n </TableCell>\n <TableCell>\n {translate(\"Added\")} {translate(\"Days\")}{\" \"}\n {translate(\"For\")} {translate(\"Due\")}\n </TableCell>\n <TableCell>\n {translate(\"Added\")} {translate(\"Days\")}{\" \"}\n {translate(\"For\")} {translate(\"Expiry\")}\n </TableCell>\n <TableCell>{translate(\"Actions\")}</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {mobileNotificationConfigs.length > 0 ? (\n mobileNotificationConfigs.map((config, index) => (\n <TableRow key={index + 1}>\n <TableCell>\n <Box>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n >\n <Box className=\" w-full\">\n <Controller\n control={control}\n name={`notificationCode${index}`}\n defaultValue={config.notificationCode}\n render={({ field }) => (\n <TextField\n required\n variant=\"outlined\"\n size=\"small\"\n {...field}\n error={Boolean(\n errors[`notificationCode${index}`],\n )}\n onChange={(e) => {\n setValue(\n `notificationCode${index}`,\n e.target.value,\n );\n handleChange(\n index,\n \"notificationCode\",\n e.target.value,\n );\n const fieldPath = `notificationCode${index}`;\n if (getValues(fieldPath) === \"\") {\n setError(fieldPath, {\n type: \"manual\",\n message:\n \"Enter # of days to add\",\n });\n } else {\n clearErrors(fieldPath);\n }\n }}\n placeholder=\"Enter # of days to add\"\n onBlur={() => {\n if (field.value === \"\") {\n setError(\n `notificationCode${index}`,\n {\n type: \"manual\",\n message:\n \"Enter # of days to add\",\n },\n );\n } else {\n clearErrors(\n `notificationCode${index}`,\n );\n }\n }}\n data-testid={`mobiletypeeventconfigmodal-notification-code-input-${index}`}\n />\n )}\n />\n {errors[`notificationCode${index}`] && (\n <p\n className=\"error-helper-table\"\n data-testid={`mobiletypeeventconfigmodal-notification-code-error-${index}`}\n >\n {\n errors[`notificationCode${index}`]\n ?.message\n }\n </p>\n )}\n </Box>\n </FormControl>\n </Box>\n </TableCell>\n <TableCell>\n <Box>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n >\n <Box className=\" w-full\">\n <Controller\n control={control}\n name={`numberOfDaysAddedForOnDate${index}`}\n defaultValue={\n config.numberOfDaysAddedForOnDate\n }\n render={({ field }) => (\n <TextField\n required\n type=\"number\"\n variant=\"outlined\"\n size=\"small\"\n {...field}\n error={Boolean(\n errors[\n `numberOfDaysAddedForOnDate${index}`\n ],\n )}\n onChange={(e) => {\n setValue(\n `numberOfDaysAddedForOnDate${index}`,\n e.target.value,\n );\n handleChange(\n index,\n \"numberOfDaysAddedForOnDate\",\n Number(e.target.value),\n );\n const fieldPath = `numberOfDaysAddedForOnDate${index}`;\n if (getValues(fieldPath) === \"\") {\n setError(fieldPath, {\n type: \"manual\",\n message:\n \"Enter # of days to add\",\n });\n } else {\n clearErrors(fieldPath);\n }\n }}\n placeholder=\"Enter # of days to add\"\n onBlur={() => {\n if (field.value === \"\") {\n setError(\n `numberOfDaysAddedForOnDate${index}`,\n {\n type: \"manual\",\n message:\n \"Enter # of days to add\",\n },\n );\n } else {\n clearErrors(\n `numberOfDaysAddedForOnDate${index}`,\n );\n }\n }}\n data-testid={`mobiletypeeventconfigmodal-on-date-input-${index}`}\n />\n )}\n />\n {errors[\n `numberOfDaysAddedForOnDate${index}`\n ] && (\n <p\n className=\"error-helper-table\"\n data-testid={`mobiletypeeventconfigmodal-on-date-error-${index}`}\n >\n {\n errors[\n `numberOfDaysAddedForOnDate${index}`\n ]?.message\n }\n </p>\n )}\n </Box>\n </FormControl>\n </Box>\n </TableCell>\n <TableCell>\n <Box>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n >\n <Box className=\" w-full\">\n <Controller\n control={control}\n name={`numberOfDaysAddedForDueDate${index}`}\n defaultValue={\n config.numberOfDaysAddedForDueDate\n }\n render={({ field }) => (\n <TextField\n variant=\"outlined\"\n size=\"small\"\n type=\"number\"\n {...field}\n onChange={(e) => {\n setValue(\n `numberOfDaysAddedForDueDate${index}`,\n e.target.value,\n );\n handleChange(\n index,\n \"numberOfDaysAddedForDueDate\",\n Number(e.target.value),\n );\n }}\n data-testid={`mobiletypeeventconfigmodal-due-date-input-${index}`}\n />\n )}\n />\n </Box>\n </FormControl>\n </Box>\n </TableCell>\n <TableCell>\n <Box>\n <FormControl\n variant=\"outlined\"\n className=\" w-full\"\n >\n <Box className=\" w-full\">\n <Controller\n control={control}\n name={`numberOfDaysAddedForExpiryDate${index}`}\n defaultValue={\n config.numberOfDaysAddedForExpiryDate\n }\n render={({ field }) => (\n <TextField\n variant=\"outlined\"\n type=\"number\"\n size=\"small\"\n {...field}\n onChange={(e) => {\n setValue(\n `numberOfDaysAddedForExpiryDate${index}`,\n e.target.value,\n );\n handleChange(\n index,\n \"numberOfDaysAddedForExpiryDate\",\n Number(e.target.value),\n );\n }}\n data-testid={`mobiletypeeventconfigmodal-expiry-date-input-${index}`}\n />\n )}\n />\n </Box>\n </FormControl>\n </Box>\n </TableCell>\n <TableCell>\n <IconButton\n color=\"error\"\n onClick={() => handleDeleteConfig(index)}\n data-testid={`mobiletypeeventconfigmodal-delete-button-${index}`}\n >\n <FontAwesomeIcon icon={faTrash} />\n </IconButton>\n </TableCell>\n </TableRow>\n ))\n ) : (\n <TableRow>\n <TableCell colSpan={5}>\n <Typography\n align=\"center\"\n data-testid=\"mobiletypeeventconfigmodal-no-config\"\n >\n No Mobile Configuration added\n </Typography>\n </TableCell>\n </TableRow>\n )}\n </TableBody>\n </Table>\n </TableContainer>\n </Grid>\n </Grid>\n </Grid>\n <Stack\n direction=\"row\"\n className=\"mr-5\"\n spacing={2}\n justifyContent=\"flex-end\"\n mt={1}\n mb={1}\n >\n <Button\n variant=\"contained\"\n color=\"secondary\"\n onClick={() => {\n close();\n reset();\n }}\n data-testid=\"mobiletypeeventconfigmodal-close-button\"\n >\n <Typography variant=\"body2\">{translate(\"Cancel\")}</Typography>\n </Button>\n <Button\n type=\"submit\"\n variant=\"contained\"\n color=\"primary\"\n data-testid=\"mobiletypeeventconfigmodal-submit-button\"\n >\n {translate(\"Submit\")}\n </Button>\n </Stack>\n </form>\n </Grid>\n </Modal>\n );\n};\n\nMobileTypeEventConfigModal.propTypes = {\n open: PropTypes.any,\n handleClose: PropTypes.any,\n handleClick: PropTypes.any,\n type: PropTypes.any,\n};\n\nexport default MobileTypeEventConfigModal;\n"],"names":["MobileTypeEventConfigModal","open","handleClose","handleClick","type","formRef","useRef","submitRef","trackEvent","useTrackEvent","notificationTypes","setNotificationTypes","useState","mobileNotification","setMobileNotification","mobileNotificationConfigs","setMobileNotificationConfigs","mobileConfigLength","setmobileConfigLength","translate","useTranslateProvider","handleDeleteConfig","index","data","i","setValue","prev","newConfigs","_","handleChange","field","value","validationSchema","Yup","control","handleSubmit","reset","setError","clearErrors","getValues","errors","useForm","yupResolver","useEffect","_a","key","notification","loadInitialState","close","res","retrieveAllNotifications","showToast","addMobileNotification","addconfig","config","fieldPath","onSubmit","jsx","Modal","jsxs","Grid","theme","Typography","IconButton","FontAwesomeIcon","faXmark","Box","FormControl","Controller","Select","e","MenuItem","CustomTextField","Button","TableContainer","Paper","Table","TableHead","TableRow","TableCell","TableBody","TextField","_b","faTrash","Stack","PropTypes"],"mappings":";;;;;;;;;;;;;;;;AAgDA,MAAMA,KAA6B,CAAC;AAAA,EAClC,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AACF,MAAM;;AACJ,QAAMC,IAAUC,EAAO,IA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