@argusoft/medplat-core 1.0.0
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-sgIhYR30.js +1238 -0
- package/dist/AccessRights-sgIhYR30.js.map +1 -0
- package/dist/AddEditQueryBuilder-BaZxS2Cm.js +289 -0
- package/dist/AddEditQueryBuilder-BaZxS2Cm.js.map +1 -0
- package/dist/AddEditQueryBuilder.css +1 -0
- package/dist/AddFeatures-BxXCC6ex.js +212 -0
- package/dist/AddFeatures-BxXCC6ex.js.map +1 -0
- package/dist/AddLabelModal-DE3ploGD.js +734 -0
- package/dist/AddLabelModal-DE3ploGD.js.map +1 -0
- package/dist/AddMenuConfiguration-QWfpcnuP.js +2237 -0
- package/dist/AddMenuConfiguration-QWfpcnuP.js.map +1 -0
- package/dist/AddMenuConfiguration.css +1 -0
- package/dist/AddRoleDrawer-ZK1eejxI.js +453 -0
- package/dist/AddRoleDrawer-ZK1eejxI.js.map +1 -0
- package/dist/AppModal-BgZyfrd-.js +428 -0
- package/dist/AppModal-BgZyfrd-.js.map +1 -0
- package/dist/ChangePasswordModal-MV7g8tkA.js +176 -0
- package/dist/ChangePasswordModal-MV7g8tkA.js.map +1 -0
- package/dist/ConditionConfig-BqWe0NKO.js +395 -0
- package/dist/ConditionConfig-BqWe0NKO.js.map +1 -0
- package/dist/ConditionConfig.css +1 -0
- package/dist/EntityManagement-D-x6Qzal.js +50 -0
- package/dist/EntityManagement-D-x6Qzal.js.map +1 -0
- package/dist/EventConfigurations-jGCJ4LqP.js +384 -0
- package/dist/EventConfigurations-jGCJ4LqP.js.map +1 -0
- package/dist/EventConfigurations.css +1 -0
- package/dist/EventsExceptionModal-BF6E1Np7.js +200 -0
- package/dist/EventsExceptionModal-BF6E1Np7.js.map +1 -0
- package/dist/EventsSkeleton-BN7_0IGs.js +74 -0
- package/dist/EventsSkeleton-BN7_0IGs.js.map +1 -0
- package/dist/FeatureMenu-BYSRoNm0.js +249 -0
- package/dist/FeatureMenu-BYSRoNm0.js.map +1 -0
- package/dist/Features-CKMmuqcs.js +11 -0
- package/dist/Features-CKMmuqcs.js.map +1 -0
- package/dist/FlywayQuery-Cx2sly6g.js +169 -0
- package/dist/FlywayQuery-Cx2sly6g.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-CdCgDaAl.js +5299 -0
- package/dist/ImmunizationConfigurationBase-CdCgDaAl.js.map +1 -0
- package/dist/ImmunizationConfigurationBase.css +1 -0
- package/dist/ImmunizationConfigurationsList-CQnxWa09.js +335 -0
- package/dist/ImmunizationConfigurationsList-CQnxWa09.js.map +1 -0
- package/dist/ImmunizationSkeleton-D2tdv5k-.js +186 -0
- package/dist/ImmunizationSkeleton-D2tdv5k-.js.map +1 -0
- package/dist/LanguagesModal-rk6IGQwY.js +394 -0
- package/dist/LanguagesModal-rk6IGQwY.js.map +1 -0
- package/dist/ManageDynamicFeature-CeeqiS3K.js +4189 -0
- package/dist/ManageDynamicFeature-CeeqiS3K.js.map +1 -0
- package/dist/ManageEventConfiguration-BRXh51fc.js +1017 -0
- package/dist/ManageEventConfiguration-BRXh51fc.js.map +1 -0
- package/dist/ManageEventConfiguration.css +1 -0
- package/dist/ManageNotification-B4prX-9Z.js +6819 -0
- package/dist/ManageNotification-B4prX-9Z.js.map +1 -0
- package/dist/ManageRole-ByqBmjuc.js +699 -0
- package/dist/ManageRole-ByqBmjuc.js.map +1 -0
- package/dist/ManageTranslation-BTxvSYKb.js +616 -0
- package/dist/ManageTranslation-BTxvSYKb.js.map +1 -0
- package/dist/ManageTranslation.css +1 -0
- package/dist/ManageUser-PHiTNyF8.js +2160 -0
- package/dist/ManageUser-PHiTNyF8.js.map +1 -0
- package/dist/ManageUser.css +1 -0
- package/dist/MobileMenuManagement-DmQU5TTo.js +108 -0
- package/dist/MobileMenuManagement-DmQU5TTo.js.map +1 -0
- package/dist/MobileTypeEventConfigModal-BCp-SF4-.js +783 -0
- package/dist/MobileTypeEventConfigModal-BCp-SF4-.js.map +1 -0
- package/dist/NewServerManagement-5YcAtF-g.js +1002 -0
- package/dist/NewServerManagement-5YcAtF-g.js.map +1 -0
- package/dist/NotificationFlywayQuery-BY8Zzml_.js +244 -0
- package/dist/NotificationFlywayQuery-BY8Zzml_.js.map +1 -0
- package/dist/NotificationList-BkpOrCpM.js +400 -0
- package/dist/NotificationList-BkpOrCpM.js.map +1 -0
- package/dist/OtherTypeEventConfigModal-DPB8IYzj.js +2001 -0
- package/dist/OtherTypeEventConfigModal-DPB8IYzj.js.map +1 -0
- package/dist/QueryBuilder-Cus_mRwZ.js +378 -0
- package/dist/QueryBuilder-Cus_mRwZ.js.map +1 -0
- package/dist/QueryBuilder.css +1 -0
- package/dist/QueryManagement-DXA73N2j.js +671 -0
- package/dist/QueryManagement-DXA73N2j.js.map +1 -0
- package/dist/QueryManagement.css +1 -0
- package/dist/RoleManagement-CLaEJ90J.js +410 -0
- package/dist/RoleManagement-CLaEJ90J.js.map +1 -0
- package/dist/ServerSyncModal-uNjGCQJz.js +869 -0
- package/dist/ServerSyncModal-uNjGCQJz.js.map +1 -0
- package/dist/ShowFlywayQuery-DMsAbtOW.js +130 -0
- package/dist/ShowFlywayQuery-DMsAbtOW.js.map +1 -0
- package/dist/ShowFlywayQuery-DVRCd384.js +259 -0
- package/dist/ShowFlywayQuery-DVRCd384.js.map +1 -0
- package/dist/ShowQueryHistory-BDN0tzHg.js +190 -0
- package/dist/ShowQueryHistory-BDN0tzHg.js.map +1 -0
- package/dist/SubMenu-BHcSNSUF.js +187 -0
- package/dist/SubMenu-BHcSNSUF.js.map +1 -0
- package/dist/TableDetails-DzREeJkm.js +1508 -0
- package/dist/TableDetails-DzREeJkm.js.map +1 -0
- package/dist/TableList-B9hr05Hs.js +428 -0
- package/dist/TableList-B9hr05Hs.js.map +1 -0
- package/dist/TypeConfiguration-BYM8PjV9.js +117 -0
- package/dist/TypeConfiguration-BYM8PjV9.js.map +1 -0
- package/dist/UserList-BxB1tCwM.js +13042 -0
- package/dist/UserList-BxB1tCwM.js.map +1 -0
- package/dist/UserList.css +1 -0
- package/dist/UserListSkeleton-cglK2SaU.js +184 -0
- package/dist/UserListSkeleton-cglK2SaU.js.map +1 -0
- package/dist/WidgetList-BSApErov.js +188 -0
- package/dist/WidgetList-BSApErov.js.map +1 -0
- package/dist/_commonjsHelpers-BItOPCY9.js +29 -0
- package/dist/_commonjsHelpers-BItOPCY9.js.map +1 -0
- package/dist/i18next-CTOWN_jH.js +1394 -0
- package/dist/i18next-CTOWN_jH.js.map +1 -0
- package/dist/index.js +481 -0
- package/dist/index.js.map +1 -0
- package/dist/manageImmunization-B4swS745.js +1204 -0
- package/dist/manageImmunization-B4swS745.js.map +1 -0
- package/dist/manageImmunization.css +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,783 @@
|
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as k, useState as z, useEffect as U } from "react";
|
|
3
|
+
import S from "prop-types";
|
|
4
|
+
import { useForm as re, Controller as C } from "react-hook-form";
|
|
5
|
+
import { yupResolver as oe } from "@hookform/resolvers/yup";
|
|
6
|
+
import u from "@mui/material/Grid2";
|
|
7
|
+
import * as F from "yup";
|
|
8
|
+
import { Modal as le, Typography as O, IconButton as _, Box as c, FormControl as g, Select as de, MenuItem as J, Button as I, TableContainer as se, Paper as me, Table as ce, TableHead as fe, TableRow as R, TableCell as h, TableBody as ue, TextField as B, Stack as be } from "@mui/material";
|
|
9
|
+
import w from "@/views/custom-components/CustomTextField";
|
|
10
|
+
import { retrieveAllNotifications as he } from "@/common/services/GlobalApis";
|
|
11
|
+
import { showToast as pe } from "@/common/toaster/toaster";
|
|
12
|
+
import "./ManageEventConfiguration-BRXh51fc.js";
|
|
13
|
+
import ye from "@/hooks/useTrackEvent";
|
|
14
|
+
import { useTranslateProvider as ge } from "@/common/languageTranslator/TranslationContext";
|
|
15
|
+
import { faXmark as ve, faTrash as De } from "@fortawesome/free-solid-svg-icons";
|
|
16
|
+
import { FontAwesomeIcon as Y } from "@fortawesome/react-fontawesome";
|
|
17
|
+
const Fe = ({
|
|
18
|
+
open: G,
|
|
19
|
+
handleClose: H,
|
|
20
|
+
handleClick: X,
|
|
21
|
+
type: l
|
|
22
|
+
}) => {
|
|
23
|
+
var j;
|
|
24
|
+
const x = k(null), q = k(!1), K = ye(), [v, Q] = z([]), [r, L] = z(null), [p, A] = z(
|
|
25
|
+
[]
|
|
26
|
+
), [W, P] = z(0), { translate: i } = ge(), Z = (t) => {
|
|
27
|
+
p && p.forEach((a, o) => {
|
|
28
|
+
f(`notificationCode${o}`, ""), f(`numberOfDaysAddedForOnDate${o}`, 0), f(`numberOfDaysAddedForExpiryDate${o}`, 0), f(`numberOfDaysAddedForDueDate${o}`, 0);
|
|
29
|
+
}), A((a) => {
|
|
30
|
+
const o = a.filter((m, s) => s !== t);
|
|
31
|
+
return o.forEach((m, s) => {
|
|
32
|
+
f(`notificationCode${s}`, m.notificationCode), f(
|
|
33
|
+
`numberOfDaysAddedForOnDate${s}`,
|
|
34
|
+
m.numberOfDaysAddedForOnDate
|
|
35
|
+
), f(
|
|
36
|
+
`numberOfDaysAddedForExpiryDate${s}`,
|
|
37
|
+
m.numberOfDaysAddedForExpiryDate
|
|
38
|
+
), f(
|
|
39
|
+
`numberOfDaysAddedForDueDate${s}`,
|
|
40
|
+
m.numberOfDaysAddedForDueDate
|
|
41
|
+
);
|
|
42
|
+
}), o;
|
|
43
|
+
});
|
|
44
|
+
}, $ = (t, a, o) => {
|
|
45
|
+
const m = [...p];
|
|
46
|
+
m[t][a] = o, A(m);
|
|
47
|
+
}, ee = F.object().shape({
|
|
48
|
+
mobileNotificationType: F.string().required("Select notification type"),
|
|
49
|
+
baseDateFieldName: F.string().required("Enter base date field"),
|
|
50
|
+
familyFieldName: F.string().test(
|
|
51
|
+
"is-required",
|
|
52
|
+
"family name is required",
|
|
53
|
+
function(t) {
|
|
54
|
+
return (r == null ? void 0 : r.notificationFor) === "FAMILY" || (r == null ? void 0 : r.notificationFor) === "MEMBER" ? !!t : !0;
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
memberFieldName: F.string().test(
|
|
58
|
+
"is-required",
|
|
59
|
+
"member name is required",
|
|
60
|
+
function(t) {
|
|
61
|
+
return (r == null ? void 0 : r.notificationFor) === "MEMBER" ? !!t : !0;
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
userFieldName: F.string().test(
|
|
65
|
+
"is-required",
|
|
66
|
+
"user name is required",
|
|
67
|
+
function(t) {
|
|
68
|
+
return (r == null ? void 0 : r.notificationFor) === "USER" ? !!t : !0;
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
}), {
|
|
72
|
+
control: y,
|
|
73
|
+
handleSubmit: ae,
|
|
74
|
+
reset: E,
|
|
75
|
+
setValue: f,
|
|
76
|
+
setError: N,
|
|
77
|
+
clearErrors: T,
|
|
78
|
+
getValues: V,
|
|
79
|
+
formState: { errors: d }
|
|
80
|
+
} = re({
|
|
81
|
+
defaultValues: {},
|
|
82
|
+
resolver: oe(ee),
|
|
83
|
+
mode: "onChange"
|
|
84
|
+
});
|
|
85
|
+
U(() => {
|
|
86
|
+
var t;
|
|
87
|
+
l && v.length > 0 && ((t = Object.keys(l)) == null || t.forEach((a) => {
|
|
88
|
+
var o;
|
|
89
|
+
if (a === "index" && f(a, l[a]), a === "mobileNotificationType") {
|
|
90
|
+
const m = v.filter(
|
|
91
|
+
(s) => s.id === parseInt(l[a])
|
|
92
|
+
);
|
|
93
|
+
L(...m);
|
|
94
|
+
}
|
|
95
|
+
a === "mobileNotificationConfigs" && l[a] ? (A(l[a] || []), P((o = l[a]) == null ? void 0 : o.length)) : l[a] && f(a, l[a]);
|
|
96
|
+
}));
|
|
97
|
+
}, [l, v]), U(() => {
|
|
98
|
+
te();
|
|
99
|
+
}, []);
|
|
100
|
+
const M = () => {
|
|
101
|
+
K("conversion_event", {
|
|
102
|
+
form: x.current,
|
|
103
|
+
form_name: "Add Mobile Type Configuration",
|
|
104
|
+
submit: q.current
|
|
105
|
+
}), H();
|
|
106
|
+
}, te = async () => {
|
|
107
|
+
try {
|
|
108
|
+
const t = await he(!0);
|
|
109
|
+
Q(t == null ? void 0 : t.data);
|
|
110
|
+
} catch {
|
|
111
|
+
pe({ message: "Error in retrieving notification", type: "error" });
|
|
112
|
+
}
|
|
113
|
+
}, ie = () => {
|
|
114
|
+
let t = !0;
|
|
115
|
+
p == null || p.forEach((a, o) => {
|
|
116
|
+
if (a.notificationCode === "") {
|
|
117
|
+
t = !1;
|
|
118
|
+
const m = `notificationCode${o}`;
|
|
119
|
+
N(m, {
|
|
120
|
+
type: "manual",
|
|
121
|
+
message: "Enter # of days to add"
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}), t && (P((a) => a + 1), A([
|
|
125
|
+
...p,
|
|
126
|
+
{
|
|
127
|
+
notificationCode: "",
|
|
128
|
+
numberOfDaysAddedForOnDate: 0,
|
|
129
|
+
numberOfDaysAddedForDueDate: 0,
|
|
130
|
+
numberOfDaysAddedForExpiryDate: 0
|
|
131
|
+
}
|
|
132
|
+
]));
|
|
133
|
+
}, ne = (t) => {
|
|
134
|
+
t = JSON.parse(JSON.stringify(t));
|
|
135
|
+
for (let a = 0; a < W; a++)
|
|
136
|
+
delete t[`notificationCode${a}`], delete t[`numberOfDaysAddedForOnDate${a}`], delete t[`numberOfDaysAddedForExpiryDate${a}`], delete t[`numberOfDaysAddedForDueDate${a}`];
|
|
137
|
+
t.mobileNotificationConfigs = p, t.type = l == null ? void 0 : l.type, X(t), q.current = !0, M(), E();
|
|
138
|
+
};
|
|
139
|
+
return /* @__PURE__ */ e(
|
|
140
|
+
le,
|
|
141
|
+
{
|
|
142
|
+
"data-testid": "mobiletypeeventconfigmodal-modal",
|
|
143
|
+
open: G,
|
|
144
|
+
className: "flex items-center justify-center",
|
|
145
|
+
onClose: () => {
|
|
146
|
+
M(), E();
|
|
147
|
+
},
|
|
148
|
+
sx: {
|
|
149
|
+
"& .MuiBackdrop-root": {
|
|
150
|
+
backgroundColor: "rgba(0, 0, 0, 0.1)"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
children: /* @__PURE__ */ n(
|
|
154
|
+
u,
|
|
155
|
+
{
|
|
156
|
+
container: !0,
|
|
157
|
+
className: "w-[90%] md:w-[80%] shadow-md flex flex-col",
|
|
158
|
+
sx: {
|
|
159
|
+
// 1. Theme-aware background
|
|
160
|
+
backgroundColor: (t) => t.palette.background.paper,
|
|
161
|
+
// 2. Dynamic Border/Shadow for Dark Mode
|
|
162
|
+
border: (t) => t.palette.mode === "dark" ? `1px solid ${t.palette.divider}` : "none",
|
|
163
|
+
// 3. GitHub-style shadow (Soft in light, Deep in dark)
|
|
164
|
+
boxShadow: (t) => t.palette.mode === "dark" ? "0 8px 24px rgba(0,0,0,0.4)" : t.shadows[2],
|
|
165
|
+
// Standard MUI shadow for light mode
|
|
166
|
+
borderRadius: "12px",
|
|
167
|
+
// Matches your MuiCard configuration
|
|
168
|
+
transition: "all 0.3s ease-in-out"
|
|
169
|
+
// Keeps children inside the rounded corners
|
|
170
|
+
},
|
|
171
|
+
children: [
|
|
172
|
+
/* @__PURE__ */ n(
|
|
173
|
+
u,
|
|
174
|
+
{
|
|
175
|
+
className: "manageeventconfiguration-modal-header p-2.5 px-5 flex border-b",
|
|
176
|
+
"data-testid": "mobiletypeeventconfigmodal-header",
|
|
177
|
+
children: [
|
|
178
|
+
/* @__PURE__ */ n(O, { variant: "body1", className: "font-medium text-lg text-customBlue", children: [
|
|
179
|
+
i("Add"),
|
|
180
|
+
" ",
|
|
181
|
+
i(l == null ? void 0 : l.type),
|
|
182
|
+
" ",
|
|
183
|
+
i("Configuration")
|
|
184
|
+
] }),
|
|
185
|
+
/* @__PURE__ */ e(
|
|
186
|
+
_,
|
|
187
|
+
{
|
|
188
|
+
size: "small",
|
|
189
|
+
onClick: () => {
|
|
190
|
+
M(), E();
|
|
191
|
+
},
|
|
192
|
+
"data-testid": "mobiletypeeventconfigmodal-close-button",
|
|
193
|
+
children: /* @__PURE__ */ e(Y, { icon: ve })
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
),
|
|
199
|
+
/* @__PURE__ */ n(
|
|
200
|
+
"form",
|
|
201
|
+
{
|
|
202
|
+
onSubmit: ae(ne),
|
|
203
|
+
className: "w-full",
|
|
204
|
+
"data-testid": "mobiletypeeventconfigmodal-form",
|
|
205
|
+
ref: x,
|
|
206
|
+
children: [
|
|
207
|
+
/* @__PURE__ */ n(
|
|
208
|
+
u,
|
|
209
|
+
{
|
|
210
|
+
container: !0,
|
|
211
|
+
className: "px-[40px] max-h-[60vh] overflow-y-auto w-full",
|
|
212
|
+
children: [
|
|
213
|
+
/* @__PURE__ */ n(
|
|
214
|
+
u,
|
|
215
|
+
{
|
|
216
|
+
container: !0,
|
|
217
|
+
spacing: 2,
|
|
218
|
+
className: "w-full flex flex-col md:flex-row items-start",
|
|
219
|
+
children: [
|
|
220
|
+
/* @__PURE__ */ e(
|
|
221
|
+
u,
|
|
222
|
+
{
|
|
223
|
+
item: !0,
|
|
224
|
+
className: "border-b border-gray-300 p-2.5 flex flex-col items-start w-full ",
|
|
225
|
+
size: { sm: 12 },
|
|
226
|
+
"data-testid": "mobiletypeeventconfigmodal-implicit-params",
|
|
227
|
+
children: /* @__PURE__ */ n(c, { className: "whitespace-normal w-full break-words", children: [
|
|
228
|
+
/* @__PURE__ */ e("strong", { children: i("Available Implicit Parameters") }),
|
|
229
|
+
":",
|
|
230
|
+
" ",
|
|
231
|
+
l == null ? void 0 : l.implicitParam
|
|
232
|
+
] })
|
|
233
|
+
}
|
|
234
|
+
),
|
|
235
|
+
/* @__PURE__ */ e(u, { item: !0, className: "w-[90%] sm:w-1/4", children: /* @__PURE__ */ n(
|
|
236
|
+
g,
|
|
237
|
+
{
|
|
238
|
+
variant: "outlined",
|
|
239
|
+
className: "w-full",
|
|
240
|
+
"data-testid": "mobiletypeeventconfigmodal-notification-type",
|
|
241
|
+
children: [
|
|
242
|
+
/* @__PURE__ */ n("div", { children: [
|
|
243
|
+
i("Notification"),
|
|
244
|
+
" ",
|
|
245
|
+
i("Type")
|
|
246
|
+
] }),
|
|
247
|
+
/* @__PURE__ */ n(c, { className: "w-full", children: [
|
|
248
|
+
/* @__PURE__ */ e(
|
|
249
|
+
C,
|
|
250
|
+
{
|
|
251
|
+
name: "mobileNotificationType",
|
|
252
|
+
control: y,
|
|
253
|
+
defaultValue: "",
|
|
254
|
+
render: ({ field: t }) => /* @__PURE__ */ n(
|
|
255
|
+
de,
|
|
256
|
+
{
|
|
257
|
+
...t,
|
|
258
|
+
size: "small",
|
|
259
|
+
error: !!d.mobileNotificationType,
|
|
260
|
+
onChange: (a) => {
|
|
261
|
+
t.onChange(a.target.value);
|
|
262
|
+
const o = v.filter(
|
|
263
|
+
(m) => m.id === a.target.value
|
|
264
|
+
);
|
|
265
|
+
L(...o);
|
|
266
|
+
},
|
|
267
|
+
className: "w-full",
|
|
268
|
+
"data-testid": "mobiletypeeventconfigmodal-notification-select",
|
|
269
|
+
children: [
|
|
270
|
+
/* @__PURE__ */ e(J, { value: "", children: /* @__PURE__ */ e(O, { variant: "body2", children: i("None") }) }),
|
|
271
|
+
v == null ? void 0 : v.map((a, o) => /* @__PURE__ */ e(J, { value: a.id, children: /* @__PURE__ */ e(O, { variant: "body2", children: a.notificationName }) }, o + 1))
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
)
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
(d == null ? void 0 : d.mobileNotificationType) && /* @__PURE__ */ e(
|
|
278
|
+
"p",
|
|
279
|
+
{
|
|
280
|
+
className: "error-helper",
|
|
281
|
+
"data-testid": "mobiletypeeventconfigmodal-notification-error",
|
|
282
|
+
children: (j = d == null ? void 0 : d.mobileNotificationType) == null ? void 0 : j.message
|
|
283
|
+
}
|
|
284
|
+
)
|
|
285
|
+
] })
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
) }),
|
|
289
|
+
/* @__PURE__ */ e(u, { item: !0, sm: 4, size: { sm: 4 }, children: /* @__PURE__ */ n(
|
|
290
|
+
g,
|
|
291
|
+
{
|
|
292
|
+
variant: "outlined",
|
|
293
|
+
className: " w-full",
|
|
294
|
+
"data-testid": "mobiletypeeventconfigmodal-base-date-field",
|
|
295
|
+
children: [
|
|
296
|
+
/* @__PURE__ */ n("div", { children: [
|
|
297
|
+
i("Base"),
|
|
298
|
+
" ",
|
|
299
|
+
i("Date"),
|
|
300
|
+
" ",
|
|
301
|
+
i("Field"),
|
|
302
|
+
" ",
|
|
303
|
+
i("Name"),
|
|
304
|
+
/* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
|
|
305
|
+
] }),
|
|
306
|
+
/* @__PURE__ */ e(c, { className: " w-full", children: /* @__PURE__ */ e(
|
|
307
|
+
w,
|
|
308
|
+
{
|
|
309
|
+
control: y,
|
|
310
|
+
id: "baseDateFieldName",
|
|
311
|
+
name: "baseDateFieldName",
|
|
312
|
+
errors: d,
|
|
313
|
+
label: "",
|
|
314
|
+
size: "small",
|
|
315
|
+
dataTestId: "mobiletypeeventconfigmodal-base-date-input"
|
|
316
|
+
}
|
|
317
|
+
) })
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
) }),
|
|
321
|
+
/* @__PURE__ */ e(u, { item: !0, sm: 4, size: { sm: 4 }, children: /* @__PURE__ */ n(
|
|
322
|
+
g,
|
|
323
|
+
{
|
|
324
|
+
variant: "outlined",
|
|
325
|
+
className: " w-full",
|
|
326
|
+
"data-testid": "mobiletypeeventconfigmodal-ref-code-field",
|
|
327
|
+
children: [
|
|
328
|
+
/* @__PURE__ */ n("div", { children: [
|
|
329
|
+
i("Ref"),
|
|
330
|
+
" ",
|
|
331
|
+
i("Code"),
|
|
332
|
+
" ",
|
|
333
|
+
i("Field"),
|
|
334
|
+
" ",
|
|
335
|
+
i("Name")
|
|
336
|
+
] }),
|
|
337
|
+
/* @__PURE__ */ e(c, { className: " w-full", children: /* @__PURE__ */ e(
|
|
338
|
+
w,
|
|
339
|
+
{
|
|
340
|
+
control: y,
|
|
341
|
+
id: "refCode",
|
|
342
|
+
name: "refCode",
|
|
343
|
+
errors: d,
|
|
344
|
+
label: "",
|
|
345
|
+
size: "small",
|
|
346
|
+
dataTestId: "mobiletypeeventconfigmodal-ref-code-input"
|
|
347
|
+
}
|
|
348
|
+
) })
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
) }),
|
|
352
|
+
(r == null ? void 0 : r.notificationFor) === "USER" && /* @__PURE__ */ e(u, { item: !0, size: { xs: 4 }, children: /* @__PURE__ */ n(
|
|
353
|
+
g,
|
|
354
|
+
{
|
|
355
|
+
variant: "outlined",
|
|
356
|
+
className: " w-full",
|
|
357
|
+
"data-testid": "mobiletypeeventconfigmodal-user-field",
|
|
358
|
+
children: [
|
|
359
|
+
/* @__PURE__ */ n("div", { children: [
|
|
360
|
+
i("User"),
|
|
361
|
+
" ",
|
|
362
|
+
i("Field"),
|
|
363
|
+
" ",
|
|
364
|
+
i("Name"),
|
|
365
|
+
/* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
|
|
366
|
+
] }),
|
|
367
|
+
/* @__PURE__ */ e(c, { className: " w-full", children: /* @__PURE__ */ e(
|
|
368
|
+
w,
|
|
369
|
+
{
|
|
370
|
+
control: y,
|
|
371
|
+
id: "userFieldName",
|
|
372
|
+
name: "userFieldName",
|
|
373
|
+
errors: d,
|
|
374
|
+
label: "",
|
|
375
|
+
size: "small",
|
|
376
|
+
dataTestId: "mobiletypeeventconfigmodal-user-input"
|
|
377
|
+
}
|
|
378
|
+
) })
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
) }),
|
|
382
|
+
(r == null ? void 0 : r.notificationFor) === "MEMBER" && /* @__PURE__ */ e(u, { item: !0, size: { sm: 4 }, children: /* @__PURE__ */ n(
|
|
383
|
+
g,
|
|
384
|
+
{
|
|
385
|
+
variant: "outlined",
|
|
386
|
+
className: " w-full",
|
|
387
|
+
"data-testid": "mobiletypeeventconfigmodal-member-field",
|
|
388
|
+
children: [
|
|
389
|
+
/* @__PURE__ */ n("div", { children: [
|
|
390
|
+
i("Member"),
|
|
391
|
+
" ",
|
|
392
|
+
i("Field"),
|
|
393
|
+
" ",
|
|
394
|
+
i("Name"),
|
|
395
|
+
/* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
|
|
396
|
+
] }),
|
|
397
|
+
/* @__PURE__ */ e(c, { className: " w-full", children: /* @__PURE__ */ e(
|
|
398
|
+
w,
|
|
399
|
+
{
|
|
400
|
+
control: y,
|
|
401
|
+
id: "memberFieldName",
|
|
402
|
+
name: "memberFieldName",
|
|
403
|
+
errors: d,
|
|
404
|
+
label: "",
|
|
405
|
+
size: "small",
|
|
406
|
+
dataTestId: "mobiletypeeventconfigmodal-member-input"
|
|
407
|
+
}
|
|
408
|
+
) })
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
) }),
|
|
412
|
+
((r == null ? void 0 : r.notificationFor) === "FAMILY" || (r == null ? void 0 : r.notificationFor) === "MEMBER") && /* @__PURE__ */ e(u, { item: !0, sm: 4, size: { sm: 4 }, children: /* @__PURE__ */ n(
|
|
413
|
+
g,
|
|
414
|
+
{
|
|
415
|
+
variant: "outlined",
|
|
416
|
+
className: " w-full",
|
|
417
|
+
"data-testid": "mobiletypeeventconfigmodal-family-field",
|
|
418
|
+
children: [
|
|
419
|
+
/* @__PURE__ */ n("div", { children: [
|
|
420
|
+
i("Family"),
|
|
421
|
+
" ",
|
|
422
|
+
i("Field"),
|
|
423
|
+
" ",
|
|
424
|
+
i("Name"),
|
|
425
|
+
/* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
|
|
426
|
+
] }),
|
|
427
|
+
/* @__PURE__ */ e(c, { className: " w-full", children: /* @__PURE__ */ e(
|
|
428
|
+
w,
|
|
429
|
+
{
|
|
430
|
+
control: y,
|
|
431
|
+
id: "familyFieldName",
|
|
432
|
+
name: "familyFieldName",
|
|
433
|
+
errors: d,
|
|
434
|
+
label: "",
|
|
435
|
+
size: "small",
|
|
436
|
+
dataTestId: "mobiletypeeventconfigmodal-family-input"
|
|
437
|
+
}
|
|
438
|
+
) })
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
) })
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
),
|
|
445
|
+
/* @__PURE__ */ n(u, { container: !0, className: "mt-2.5 w-full", children: [
|
|
446
|
+
/* @__PURE__ */ e(u, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ n(
|
|
447
|
+
I,
|
|
448
|
+
{
|
|
449
|
+
variant: "contained",
|
|
450
|
+
onClick: ie,
|
|
451
|
+
"data-testid": "mobiletypeeventconfigmodal-add-configuration",
|
|
452
|
+
children: [
|
|
453
|
+
i("Add"),
|
|
454
|
+
" ",
|
|
455
|
+
i("Configuration")
|
|
456
|
+
]
|
|
457
|
+
}
|
|
458
|
+
) }),
|
|
459
|
+
/* @__PURE__ */ e(u, { size: { xs: 12 }, children: /* @__PURE__ */ e(
|
|
460
|
+
se,
|
|
461
|
+
{
|
|
462
|
+
component: me,
|
|
463
|
+
className: "m-2.5 w-full mobile-type-event-config-table-container",
|
|
464
|
+
"data-testid": "mobiletypeeventconfigmodal-table",
|
|
465
|
+
children: /* @__PURE__ */ n(
|
|
466
|
+
ce,
|
|
467
|
+
{
|
|
468
|
+
size: "small",
|
|
469
|
+
className: "mobile-type-event-config-table",
|
|
470
|
+
"aria-label": "mobile notification configuration table",
|
|
471
|
+
children: [
|
|
472
|
+
/* @__PURE__ */ e(fe, { children: /* @__PURE__ */ n(R, { children: [
|
|
473
|
+
/* @__PURE__ */ e(h, { children: i("Code") }),
|
|
474
|
+
/* @__PURE__ */ n(h, { children: [
|
|
475
|
+
i("Added"),
|
|
476
|
+
" ",
|
|
477
|
+
i("Days"),
|
|
478
|
+
" ",
|
|
479
|
+
i("For"),
|
|
480
|
+
" ",
|
|
481
|
+
i("Schedule")
|
|
482
|
+
] }),
|
|
483
|
+
/* @__PURE__ */ n(h, { children: [
|
|
484
|
+
i("Added"),
|
|
485
|
+
" ",
|
|
486
|
+
i("Days"),
|
|
487
|
+
" ",
|
|
488
|
+
i("For"),
|
|
489
|
+
" ",
|
|
490
|
+
i("Due")
|
|
491
|
+
] }),
|
|
492
|
+
/* @__PURE__ */ n(h, { children: [
|
|
493
|
+
i("Added"),
|
|
494
|
+
" ",
|
|
495
|
+
i("Days"),
|
|
496
|
+
" ",
|
|
497
|
+
i("For"),
|
|
498
|
+
" ",
|
|
499
|
+
i("Expiry")
|
|
500
|
+
] }),
|
|
501
|
+
/* @__PURE__ */ e(h, { children: i("Actions") })
|
|
502
|
+
] }) }),
|
|
503
|
+
/* @__PURE__ */ e(ue, { children: p.length > 0 ? p.map((t, a) => {
|
|
504
|
+
var o, m;
|
|
505
|
+
return /* @__PURE__ */ n(R, { children: [
|
|
506
|
+
/* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(
|
|
507
|
+
g,
|
|
508
|
+
{
|
|
509
|
+
variant: "outlined",
|
|
510
|
+
className: " w-full",
|
|
511
|
+
children: /* @__PURE__ */ n(c, { className: " w-full", children: [
|
|
512
|
+
/* @__PURE__ */ e(
|
|
513
|
+
C,
|
|
514
|
+
{
|
|
515
|
+
control: y,
|
|
516
|
+
name: `notificationCode${a}`,
|
|
517
|
+
defaultValue: t.notificationCode,
|
|
518
|
+
render: ({ field: s }) => /* @__PURE__ */ e(
|
|
519
|
+
B,
|
|
520
|
+
{
|
|
521
|
+
required: !0,
|
|
522
|
+
variant: "outlined",
|
|
523
|
+
size: "small",
|
|
524
|
+
...s,
|
|
525
|
+
error: !!d[`notificationCode${a}`],
|
|
526
|
+
onChange: (b) => {
|
|
527
|
+
f(
|
|
528
|
+
`notificationCode${a}`,
|
|
529
|
+
b.target.value
|
|
530
|
+
), $(
|
|
531
|
+
a,
|
|
532
|
+
"notificationCode",
|
|
533
|
+
b.target.value
|
|
534
|
+
);
|
|
535
|
+
const D = `notificationCode${a}`;
|
|
536
|
+
V(D) === "" ? N(D, {
|
|
537
|
+
type: "manual",
|
|
538
|
+
message: "Enter # of days to add"
|
|
539
|
+
}) : T(D);
|
|
540
|
+
},
|
|
541
|
+
placeholder: "Enter # of days to add",
|
|
542
|
+
onBlur: () => {
|
|
543
|
+
s.value === "" ? N(
|
|
544
|
+
`notificationCode${a}`,
|
|
545
|
+
{
|
|
546
|
+
type: "manual",
|
|
547
|
+
message: "Enter # of days to add"
|
|
548
|
+
}
|
|
549
|
+
) : T(
|
|
550
|
+
`notificationCode${a}`
|
|
551
|
+
);
|
|
552
|
+
},
|
|
553
|
+
"data-testid": `mobiletypeeventconfigmodal-notification-code-input-${a}`
|
|
554
|
+
}
|
|
555
|
+
)
|
|
556
|
+
}
|
|
557
|
+
),
|
|
558
|
+
d[`notificationCode${a}`] && /* @__PURE__ */ e(
|
|
559
|
+
"p",
|
|
560
|
+
{
|
|
561
|
+
className: "error-helper-table",
|
|
562
|
+
"data-testid": `mobiletypeeventconfigmodal-notification-code-error-${a}`,
|
|
563
|
+
children: (o = d[`notificationCode${a}`]) == null ? void 0 : o.message
|
|
564
|
+
}
|
|
565
|
+
)
|
|
566
|
+
] })
|
|
567
|
+
}
|
|
568
|
+
) }) }),
|
|
569
|
+
/* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(
|
|
570
|
+
g,
|
|
571
|
+
{
|
|
572
|
+
variant: "outlined",
|
|
573
|
+
className: " w-full",
|
|
574
|
+
children: /* @__PURE__ */ n(c, { className: " w-full", children: [
|
|
575
|
+
/* @__PURE__ */ e(
|
|
576
|
+
C,
|
|
577
|
+
{
|
|
578
|
+
control: y,
|
|
579
|
+
name: `numberOfDaysAddedForOnDate${a}`,
|
|
580
|
+
defaultValue: t.numberOfDaysAddedForOnDate,
|
|
581
|
+
render: ({ field: s }) => /* @__PURE__ */ e(
|
|
582
|
+
B,
|
|
583
|
+
{
|
|
584
|
+
required: !0,
|
|
585
|
+
type: "number",
|
|
586
|
+
variant: "outlined",
|
|
587
|
+
size: "small",
|
|
588
|
+
...s,
|
|
589
|
+
error: !!d[`numberOfDaysAddedForOnDate${a}`],
|
|
590
|
+
onChange: (b) => {
|
|
591
|
+
f(
|
|
592
|
+
`numberOfDaysAddedForOnDate${a}`,
|
|
593
|
+
b.target.value
|
|
594
|
+
), $(
|
|
595
|
+
a,
|
|
596
|
+
"numberOfDaysAddedForOnDate",
|
|
597
|
+
Number(b.target.value)
|
|
598
|
+
);
|
|
599
|
+
const D = `numberOfDaysAddedForOnDate${a}`;
|
|
600
|
+
V(D) === "" ? N(D, {
|
|
601
|
+
type: "manual",
|
|
602
|
+
message: "Enter # of days to add"
|
|
603
|
+
}) : T(D);
|
|
604
|
+
},
|
|
605
|
+
placeholder: "Enter # of days to add",
|
|
606
|
+
onBlur: () => {
|
|
607
|
+
s.value === "" ? N(
|
|
608
|
+
`numberOfDaysAddedForOnDate${a}`,
|
|
609
|
+
{
|
|
610
|
+
type: "manual",
|
|
611
|
+
message: "Enter # of days to add"
|
|
612
|
+
}
|
|
613
|
+
) : T(
|
|
614
|
+
`numberOfDaysAddedForOnDate${a}`
|
|
615
|
+
);
|
|
616
|
+
},
|
|
617
|
+
"data-testid": `mobiletypeeventconfigmodal-on-date-input-${a}`
|
|
618
|
+
}
|
|
619
|
+
)
|
|
620
|
+
}
|
|
621
|
+
),
|
|
622
|
+
d[`numberOfDaysAddedForOnDate${a}`] && /* @__PURE__ */ e(
|
|
623
|
+
"p",
|
|
624
|
+
{
|
|
625
|
+
className: "error-helper-table",
|
|
626
|
+
"data-testid": `mobiletypeeventconfigmodal-on-date-error-${a}`,
|
|
627
|
+
children: (m = d[`numberOfDaysAddedForOnDate${a}`]) == null ? void 0 : m.message
|
|
628
|
+
}
|
|
629
|
+
)
|
|
630
|
+
] })
|
|
631
|
+
}
|
|
632
|
+
) }) }),
|
|
633
|
+
/* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(
|
|
634
|
+
g,
|
|
635
|
+
{
|
|
636
|
+
variant: "outlined",
|
|
637
|
+
className: " w-full",
|
|
638
|
+
children: /* @__PURE__ */ e(c, { className: " w-full", children: /* @__PURE__ */ e(
|
|
639
|
+
C,
|
|
640
|
+
{
|
|
641
|
+
control: y,
|
|
642
|
+
name: `numberOfDaysAddedForDueDate${a}`,
|
|
643
|
+
defaultValue: t.numberOfDaysAddedForDueDate,
|
|
644
|
+
render: ({ field: s }) => /* @__PURE__ */ e(
|
|
645
|
+
B,
|
|
646
|
+
{
|
|
647
|
+
variant: "outlined",
|
|
648
|
+
size: "small",
|
|
649
|
+
type: "number",
|
|
650
|
+
...s,
|
|
651
|
+
onChange: (b) => {
|
|
652
|
+
f(
|
|
653
|
+
`numberOfDaysAddedForDueDate${a}`,
|
|
654
|
+
b.target.value
|
|
655
|
+
), $(
|
|
656
|
+
a,
|
|
657
|
+
"numberOfDaysAddedForDueDate",
|
|
658
|
+
Number(b.target.value)
|
|
659
|
+
);
|
|
660
|
+
},
|
|
661
|
+
"data-testid": `mobiletypeeventconfigmodal-due-date-input-${a}`
|
|
662
|
+
}
|
|
663
|
+
)
|
|
664
|
+
}
|
|
665
|
+
) })
|
|
666
|
+
}
|
|
667
|
+
) }) }),
|
|
668
|
+
/* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(
|
|
669
|
+
g,
|
|
670
|
+
{
|
|
671
|
+
variant: "outlined",
|
|
672
|
+
className: " w-full",
|
|
673
|
+
children: /* @__PURE__ */ e(c, { className: " w-full", children: /* @__PURE__ */ e(
|
|
674
|
+
C,
|
|
675
|
+
{
|
|
676
|
+
control: y,
|
|
677
|
+
name: `numberOfDaysAddedForExpiryDate${a}`,
|
|
678
|
+
defaultValue: t.numberOfDaysAddedForExpiryDate,
|
|
679
|
+
render: ({ field: s }) => /* @__PURE__ */ e(
|
|
680
|
+
B,
|
|
681
|
+
{
|
|
682
|
+
variant: "outlined",
|
|
683
|
+
type: "number",
|
|
684
|
+
size: "small",
|
|
685
|
+
...s,
|
|
686
|
+
onChange: (b) => {
|
|
687
|
+
f(
|
|
688
|
+
`numberOfDaysAddedForExpiryDate${a}`,
|
|
689
|
+
b.target.value
|
|
690
|
+
), $(
|
|
691
|
+
a,
|
|
692
|
+
"numberOfDaysAddedForExpiryDate",
|
|
693
|
+
Number(b.target.value)
|
|
694
|
+
);
|
|
695
|
+
},
|
|
696
|
+
"data-testid": `mobiletypeeventconfigmodal-expiry-date-input-${a}`
|
|
697
|
+
}
|
|
698
|
+
)
|
|
699
|
+
}
|
|
700
|
+
) })
|
|
701
|
+
}
|
|
702
|
+
) }) }),
|
|
703
|
+
/* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(
|
|
704
|
+
_,
|
|
705
|
+
{
|
|
706
|
+
color: "error",
|
|
707
|
+
onClick: () => Z(a),
|
|
708
|
+
"data-testid": `mobiletypeeventconfigmodal-delete-button-${a}`,
|
|
709
|
+
children: /* @__PURE__ */ e(Y, { icon: De })
|
|
710
|
+
}
|
|
711
|
+
) })
|
|
712
|
+
] }, a + 1);
|
|
713
|
+
}) : /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(h, { colSpan: 5, children: /* @__PURE__ */ e(
|
|
714
|
+
O,
|
|
715
|
+
{
|
|
716
|
+
align: "center",
|
|
717
|
+
"data-testid": "mobiletypeeventconfigmodal-no-config",
|
|
718
|
+
children: "No Mobile Configuration added"
|
|
719
|
+
}
|
|
720
|
+
) }) }) })
|
|
721
|
+
]
|
|
722
|
+
}
|
|
723
|
+
)
|
|
724
|
+
}
|
|
725
|
+
) })
|
|
726
|
+
] })
|
|
727
|
+
]
|
|
728
|
+
}
|
|
729
|
+
),
|
|
730
|
+
/* @__PURE__ */ n(
|
|
731
|
+
be,
|
|
732
|
+
{
|
|
733
|
+
direction: "row",
|
|
734
|
+
className: "mr-5",
|
|
735
|
+
spacing: 2,
|
|
736
|
+
justifyContent: "flex-end",
|
|
737
|
+
mt: 1,
|
|
738
|
+
mb: 1,
|
|
739
|
+
children: [
|
|
740
|
+
/* @__PURE__ */ e(
|
|
741
|
+
I,
|
|
742
|
+
{
|
|
743
|
+
variant: "contained",
|
|
744
|
+
color: "secondary",
|
|
745
|
+
onClick: () => {
|
|
746
|
+
M(), E();
|
|
747
|
+
},
|
|
748
|
+
"data-testid": "mobiletypeeventconfigmodal-close-button",
|
|
749
|
+
children: /* @__PURE__ */ e(O, { variant: "body2", children: i("Cancel") })
|
|
750
|
+
}
|
|
751
|
+
),
|
|
752
|
+
/* @__PURE__ */ e(
|
|
753
|
+
I,
|
|
754
|
+
{
|
|
755
|
+
type: "submit",
|
|
756
|
+
variant: "contained",
|
|
757
|
+
color: "primary",
|
|
758
|
+
"data-testid": "mobiletypeeventconfigmodal-submit-button",
|
|
759
|
+
children: i("Submit")
|
|
760
|
+
}
|
|
761
|
+
)
|
|
762
|
+
]
|
|
763
|
+
}
|
|
764
|
+
)
|
|
765
|
+
]
|
|
766
|
+
}
|
|
767
|
+
)
|
|
768
|
+
]
|
|
769
|
+
}
|
|
770
|
+
)
|
|
771
|
+
}
|
|
772
|
+
);
|
|
773
|
+
};
|
|
774
|
+
Fe.propTypes = {
|
|
775
|
+
open: S.any,
|
|
776
|
+
handleClose: S.any,
|
|
777
|
+
handleClick: S.any,
|
|
778
|
+
type: S.any
|
|
779
|
+
};
|
|
780
|
+
export {
|
|
781
|
+
Fe as default
|
|
782
|
+
};
|
|
783
|
+
//# sourceMappingURL=MobileTypeEventConfigModal-BCp-SF4-.js.map
|