@argusoft/medplat-core 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/index-D6bNg8bx.js +66 -0
  2. package/dist/index-D6bNg8bx.js.map +1 -0
  3. package/dist/index.css +1 -1
  4. package/dist/index.js +99455 -445
  5. package/dist/index.js.map +1 -1
  6. package/package.json +4 -1
  7. package/dist/AccessRights-sgIhYR30.js +0 -1238
  8. package/dist/AccessRights-sgIhYR30.js.map +0 -1
  9. package/dist/AddEditQueryBuilder-BaZxS2Cm.js +0 -289
  10. package/dist/AddEditQueryBuilder-BaZxS2Cm.js.map +0 -1
  11. package/dist/AddEditQueryBuilder.css +0 -1
  12. package/dist/AddFeatures-DLbjDGei.js +0 -212
  13. package/dist/AddFeatures-DLbjDGei.js.map +0 -1
  14. package/dist/AddLabelModal-DE3ploGD.js +0 -734
  15. package/dist/AddLabelModal-DE3ploGD.js.map +0 -1
  16. package/dist/AddMenuConfiguration-QWfpcnuP.js +0 -2237
  17. package/dist/AddMenuConfiguration-QWfpcnuP.js.map +0 -1
  18. package/dist/AddMenuConfiguration.css +0 -1
  19. package/dist/AddRoleDrawer-ZK1eejxI.js +0 -453
  20. package/dist/AddRoleDrawer-ZK1eejxI.js.map +0 -1
  21. package/dist/AppModal-BgZyfrd-.js +0 -428
  22. package/dist/AppModal-BgZyfrd-.js.map +0 -1
  23. package/dist/ChangePasswordModal-MV7g8tkA.js +0 -176
  24. package/dist/ChangePasswordModal-MV7g8tkA.js.map +0 -1
  25. package/dist/ConditionConfig-GDCXIg3C.js +0 -395
  26. package/dist/ConditionConfig-GDCXIg3C.js.map +0 -1
  27. package/dist/ConditionConfig.css +0 -1
  28. package/dist/EntityManagement-D-x6Qzal.js +0 -50
  29. package/dist/EntityManagement-D-x6Qzal.js.map +0 -1
  30. package/dist/EventConfigurations-jGCJ4LqP.js +0 -384
  31. package/dist/EventConfigurations-jGCJ4LqP.js.map +0 -1
  32. package/dist/EventConfigurations.css +0 -1
  33. package/dist/EventsExceptionModal-BF6E1Np7.js +0 -200
  34. package/dist/EventsExceptionModal-BF6E1Np7.js.map +0 -1
  35. package/dist/EventsSkeleton-BN7_0IGs.js +0 -74
  36. package/dist/EventsSkeleton-BN7_0IGs.js.map +0 -1
  37. package/dist/FeatureMenu-BYSRoNm0.js +0 -249
  38. package/dist/FeatureMenu-BYSRoNm0.js.map +0 -1
  39. package/dist/Features-CKMmuqcs.js +0 -11
  40. package/dist/Features-CKMmuqcs.js.map +0 -1
  41. package/dist/FlywayQuery-Cx2sly6g.js +0 -169
  42. package/dist/FlywayQuery-Cx2sly6g.js.map +0 -1
  43. package/dist/ImmunizationConfigurationBase-DZ8EqXlF.js +0 -5166
  44. package/dist/ImmunizationConfigurationBase-DZ8EqXlF.js.map +0 -1
  45. package/dist/ImmunizationConfigurationBase.css +0 -1
  46. package/dist/ImmunizationConfigurationsList-CQnxWa09.js +0 -335
  47. package/dist/ImmunizationConfigurationsList-CQnxWa09.js.map +0 -1
  48. package/dist/ImmunizationSkeleton-D2tdv5k-.js +0 -186
  49. package/dist/ImmunizationSkeleton-D2tdv5k-.js.map +0 -1
  50. package/dist/LanguagesModal-rk6IGQwY.js +0 -394
  51. package/dist/LanguagesModal-rk6IGQwY.js.map +0 -1
  52. package/dist/ManageDynamicFeature-BKkCnQvF.js +0 -4189
  53. package/dist/ManageDynamicFeature-BKkCnQvF.js.map +0 -1
  54. package/dist/ManageEventConfiguration-BJxS2Su0.js +0 -1017
  55. package/dist/ManageEventConfiguration-BJxS2Su0.js.map +0 -1
  56. package/dist/ManageEventConfiguration.css +0 -1
  57. package/dist/ManageNotification-B4prX-9Z.js +0 -6819
  58. package/dist/ManageNotification-B4prX-9Z.js.map +0 -1
  59. package/dist/ManageRole-BjIIXAlK.js +0 -728
  60. package/dist/ManageRole-BjIIXAlK.js.map +0 -1
  61. package/dist/ManageTranslation-BTxvSYKb.js +0 -616
  62. package/dist/ManageTranslation-BTxvSYKb.js.map +0 -1
  63. package/dist/ManageTranslation.css +0 -1
  64. package/dist/ManageUser-PHiTNyF8.js +0 -2160
  65. package/dist/ManageUser-PHiTNyF8.js.map +0 -1
  66. package/dist/ManageUser.css +0 -1
  67. package/dist/MobileMenuManagement-DmQU5TTo.js +0 -108
  68. package/dist/MobileMenuManagement-DmQU5TTo.js.map +0 -1
  69. package/dist/MobileTypeEventConfigModal-ChhO_A4f.js +0 -783
  70. package/dist/MobileTypeEventConfigModal-ChhO_A4f.js.map +0 -1
  71. package/dist/NewServerManagement-5YcAtF-g.js +0 -1002
  72. package/dist/NewServerManagement-5YcAtF-g.js.map +0 -1
  73. package/dist/NotificationFlywayQuery-BY8Zzml_.js +0 -244
  74. package/dist/NotificationFlywayQuery-BY8Zzml_.js.map +0 -1
  75. package/dist/NotificationList-BkpOrCpM.js +0 -400
  76. package/dist/NotificationList-BkpOrCpM.js.map +0 -1
  77. package/dist/OtherTypeEventConfigModal-ZnCGWm9v.js +0 -1953
  78. package/dist/OtherTypeEventConfigModal-ZnCGWm9v.js.map +0 -1
  79. package/dist/QueryBuilder-Cus_mRwZ.js +0 -378
  80. package/dist/QueryBuilder-Cus_mRwZ.js.map +0 -1
  81. package/dist/QueryBuilder.css +0 -1
  82. package/dist/QueryManagement-DXA73N2j.js +0 -671
  83. package/dist/QueryManagement-DXA73N2j.js.map +0 -1
  84. package/dist/QueryManagement.css +0 -1
  85. package/dist/RoleManagement-v5Nyp1vr.js +0 -416
  86. package/dist/RoleManagement-v5Nyp1vr.js.map +0 -1
  87. package/dist/ServerSyncModal-uNjGCQJz.js +0 -869
  88. package/dist/ServerSyncModal-uNjGCQJz.js.map +0 -1
  89. package/dist/ShowFlywayQuery-DMsAbtOW.js +0 -130
  90. package/dist/ShowFlywayQuery-DMsAbtOW.js.map +0 -1
  91. package/dist/ShowFlywayQuery-DVRCd384.js +0 -259
  92. package/dist/ShowFlywayQuery-DVRCd384.js.map +0 -1
  93. package/dist/ShowQueryHistory-BDN0tzHg.js +0 -190
  94. package/dist/ShowQueryHistory-BDN0tzHg.js.map +0 -1
  95. package/dist/SubMenu-BHcSNSUF.js +0 -187
  96. package/dist/SubMenu-BHcSNSUF.js.map +0 -1
  97. package/dist/TableDetails-DzREeJkm.js +0 -1508
  98. package/dist/TableDetails-DzREeJkm.js.map +0 -1
  99. package/dist/TableList-B9hr05Hs.js +0 -428
  100. package/dist/TableList-B9hr05Hs.js.map +0 -1
  101. package/dist/TypeConfiguration-C-lk8Szs.js +0 -117
  102. package/dist/TypeConfiguration-C-lk8Szs.js.map +0 -1
  103. package/dist/UserList-BxB1tCwM.js +0 -13042
  104. package/dist/UserList-BxB1tCwM.js.map +0 -1
  105. package/dist/UserList.css +0 -1
  106. package/dist/UserListSkeleton-cglK2SaU.js +0 -184
  107. package/dist/UserListSkeleton-cglK2SaU.js.map +0 -1
  108. package/dist/WidgetList-BSApErov.js +0 -188
  109. package/dist/WidgetList-BSApErov.js.map +0 -1
  110. package/dist/_commonjsHelpers-BItOPCY9.js +0 -29
  111. package/dist/_commonjsHelpers-BItOPCY9.js.map +0 -1
  112. package/dist/i18next-CTOWN_jH.js +0 -1394
  113. package/dist/i18next-CTOWN_jH.js.map +0 -1
  114. package/dist/manageImmunization-B4swS745.js +0 -1204
  115. package/dist/manageImmunization-B4swS745.js.map +0 -1
  116. package/dist/manageImmunization.css +0 -1
@@ -1,1204 +0,0 @@
1
- import { jsx as e, jsxs as l, Fragment as Qe } from "react/jsx-runtime";
2
- import { useState as w, useEffect as pe, Suspense as We, lazy as Ye } from "react";
3
- import { Card as He, CardHeader as Z, Box as _, Typography as m, CardContent as Ze, FormControl as fe, Select as he, MenuItem as B, Chip as D, Button as M, Divider as K, Tooltip as Ke, IconButton as Xe, Autocomplete as ea, TextField as aa } from "@mui/material";
4
- import { showToast as E } from "@/common/toaster/toaster";
5
- import { execute as L } from "@/common/services/GlobalApis";
6
- import u from "@mui/material/Grid2";
7
- import { useParams as sa, useNavigate as ra } from "react-router";
8
- import { useForm as la, useFieldArray as be, FormProvider as na, Controller as X, get as j } from "react-hook-form";
9
- import ta from "@/views/custom-components/CustomCheckBox";
10
- import { yupResolver as ia } from "@hookform/resolvers/yup";
11
- import { useTranslateProvider as oa } from "@/common/languageTranslator/TranslationContext";
12
- import ca from "@/views/custom-components/CustomAutoComplete";
13
- import * as b from "yup";
14
- import k from "@/views/custom-components/CustomTextField";
15
- import { u as da, M as ma } from "./ImmunizationSkeleton-D2tdv5k-.js";
16
- import { faTrash as ge, faInfoCircle as ua } from "@fortawesome/free-solid-svg-icons";
17
- import { useSelector as pa } from "react-redux";
18
- import { validateAOI as fa } from "@/common/services/Users";
19
- import { FontAwesomeIcon as ee } from "@fortawesome/react-fontawesome";
20
- import './manageImmunization.css';const ha = Ye(
21
- () => import("@/views/feature-components/LocationDirective/LocationDirectiveV2")
22
- ), Fa = () => {
23
- var de;
24
- const { id: R } = sa(), { translate: o } = oa(), { user: P } = pa((a) => a.Authenticate), G = ra(), { t: ye } = da(), [A, ve] = w("days"), [U, xe] = w([]), [F, Ne] = w("days"), [O, we] = w("days"), [Ce, _e] = w("Add Immunization"), [ke, Ie] = w([]), ze = o("Requirement"), De = o("Min Gap (In Days)"), qe = o("Max Gap (In Days)"), Se = o("Message"), [Re, Ae] = w([]), Le = o("Select Vaccines"), [q, ae] = w({});
25
- let Fe = 10;
26
- const [C, V] = w([]), [se, Q] = w(!1), [re, Te] = w([]), I = (a, s) => {
27
- const n = Ee();
28
- if (s === "fromDate") {
29
- const c = n == null ? void 0 : n.fromDate, d = JSON.parse(JSON.stringify(A)), f = z(c, d, a);
30
- v("fromDate", parseFloat(f.toFixed(1))), ve(a);
31
- }
32
- if (s === "toDate") {
33
- const c = n == null ? void 0 : n.toDate, d = JSON.parse(JSON.stringify(F)), f = z(c, d, a);
34
- v("toDate", parseFloat(f.toFixed(2))), Ne(a);
35
- }
36
- if (s === "gapRange") {
37
- const c = n == null ? void 0 : n.gapRange, d = JSON.parse(JSON.stringify(O)), f = z(c, d, a);
38
- v("gapRange", parseFloat(f.toFixed(2))), we(a);
39
- }
40
- }, z = (a, s, n) => {
41
- if (!a)
42
- return 0;
43
- let c;
44
- switch (s) {
45
- case "months":
46
- c = a * 30;
47
- break;
48
- case "years":
49
- c = a * 365;
50
- break;
51
- default:
52
- c = Math.round(a);
53
- }
54
- let d;
55
- switch (n) {
56
- case "months":
57
- d = c / 30;
58
- break;
59
- case "years":
60
- d = c / 365;
61
- break;
62
- default:
63
- d = Math.round(c);
64
- }
65
- return d;
66
- }, Oe = async (a) => {
67
- var s, n, c;
68
- try {
69
- const f = {
70
- dependencies: ((s = a == null ? void 0 : a.dependencies) == null ? void 0 : s.map(
71
- ({ min_gap_days: N, max_gap_days: y, required: r, vaccine: S, ...T }) => ({
72
- ...T,
73
- vaccine: S.map((h) => h.code),
74
- ...r !== "false" && { min_gap_days: N, max_gap_days: y },
75
- required: r
76
- })
77
- )) || []
78
- }, i = (a.filters || []).map((N) => ({
79
- filterName: N.filterName,
80
- queryCode: N.queryCode
81
- })), t = {
82
- ...(a == null ? void 0 : a.isRecursive) && {
83
- gapRange: a == null ? void 0 : a.gapRange,
84
- maxDoses: a.maxDoses
85
- }
86
- }, x = {
87
- code: a == null ? void 0 : a.code,
88
- name: a == null ? void 0 : a.name,
89
- isrecursive: a == null ? void 0 : a.isRecursive,
90
- fromAgeDays: parseInt(
91
- z(a == null ? void 0 : a.fromDate, A, "days")
92
- ),
93
- toAgeDays: parseInt(z(a == null ? void 0 : a.toDate, F, "days")),
94
- validations: JSON.stringify(f),
95
- filters: JSON.stringify(i),
96
- basedate: a == null ? void 0 : a.basedate,
97
- recursiveobject: JSON.stringify(t),
98
- locations: C ? JSON.stringify(C) : null,
99
- active: !0
100
- };
101
- R ? (await L({
102
- code: "update_immunization",
103
- parameters: { ...x, id: parseInt(R) }
104
- }), E({
105
- message: "Immunization Updated Successfully!",
106
- type: "success"
107
- }), G(-1)) : ((c = (n = (await L({
108
- code: "check_existing_code",
109
- parameters: { code: a == null ? void 0 : a.code }
110
- })).data) == null ? void 0 : n.result) == null ? void 0 : c.length) > 0 ? E({ message: "Code Already Exist", type: "error" }) : (await L({ code: "add_immunization", parameters: x }), E({
111
- message: "Immunization Added Successfully",
112
- type: "success"
113
- }), G(-1));
114
- } catch (d) {
115
- console.error(d), E({ message: "Error in adding Immunization", type: "error" });
116
- }
117
- }, $e = b.object().shape({
118
- code: b.string().required("Code is required"),
119
- // Code is required
120
- name: b.string().required("Name is required"),
121
- // Name is required
122
- basedate: b.string().required("Base date (name) is required"),
123
- // Basedate is required
124
- fromDate: b.number().transform(
125
- (a, s) => s === "" ? void 0 : a
126
- ).nullable().min(0, "From date must be 0 or a positive number"),
127
- toDate: b.number().transform(
128
- (a, s) => s === "" ? void 0 : a
129
- ).nullable().min(0, "To date must be 0 or a positive number").when("fromDate", (a, s) => s.test(
130
- "check-to-date",
131
- "To date must be greater than From date",
132
- (n) => n === 0 ? !0 : !(z(a, A, "days") !== void 0 && a > 0 && z(n, F, "days") <= z(a, A, "days"))
133
- )),
134
- gapRange: b.number().transform(
135
- (a, s) => s === "" ? void 0 : a
136
- ).nullable().min(0, "Must be 0 or a positive number").test(
137
- "is-less-than-6-months",
138
- "Gap range must be less than 6 months",
139
- function(a) {
140
- return a == null ? !0 : z(a, O, "days") < 182;
141
- }
142
- ),
143
- maxDoses: b.number().transform(
144
- (a, s) => s === "" ? void 0 : a
145
- ).nullable().min(0, "Must be 0 or a positive number"),
146
- dependencies: b.array().of(
147
- b.object().shape({
148
- vaccine: b.array().min(1, "At least one vaccine is required").required("Vaccine is required"),
149
- required: b.string().required("Please Select a vaccine"),
150
- min_gap_days: b.number().min(0, "No negative number").transform(
151
- (a, s) => s === "" ? void 0 : a
152
- ).nullable(),
153
- max_gap_days: b.number().min(0, "No negative number").transform(
154
- (a, s) => s === "" ? void 0 : a
155
- ).nullable().when("min_gap_days", (a, s) => s.test(
156
- "check-to-date",
157
- "Max days must be greater",
158
- (n) => n === 0 ? !0 : !(a > 0 && n <= a)
159
- )),
160
- message: b.string().nullable()
161
- })
162
- ),
163
- filters: b.array().of(
164
- b.object().shape({
165
- filterName: b.string().required("Filter name is required"),
166
- queryCode: b.string().required("Please select a query")
167
- })
168
- )
169
- }), le = la({
170
- defaultValues: {
171
- code: "",
172
- name: "",
173
- basedate: "",
174
- fromDate: 0,
175
- toDate: 0,
176
- isRecursive: !1,
177
- gapRange: 0,
178
- maxDoses: 0,
179
- dependencies: [],
180
- filters: []
181
- },
182
- resolver: ia($e),
183
- mode: "onChange"
184
- }), {
185
- control: g,
186
- handleSubmit: Me,
187
- setValue: v,
188
- getValues: Ee,
189
- clearErrors: je,
190
- watch: W,
191
- formState: { errors: p }
192
- } = le, { fields: ne, append: te, remove: Je } = be({
193
- control: g,
194
- name: "dependencies"
195
- }), {
196
- fields: ie,
197
- append: oe,
198
- remove: Be
199
- } = be({
200
- control: g,
201
- name: "filters"
202
- }), $ = W("dependencies"), Y = W("isRecursive"), ce = W("name");
203
- pe(() => {
204
- if (!R) {
205
- const a = ce.replace(/\s+/g, "_").toUpperCase();
206
- v("code", a);
207
- }
208
- }, [ce, R]), pe(() => {
209
- Pe();
210
- }, []);
211
- const Pe = async () => {
212
- var a, s, n, c, d;
213
- try {
214
- Q((y) => !y);
215
- const f = await L({
216
- code: "imt_member_date_column"
217
- });
218
- xe((a = f == null ? void 0 : f.data) == null ? void 0 : a.result);
219
- const i = await L({
220
- code: "get_code_immunization",
221
- parameters: {}
222
- });
223
- let t = (s = i == null ? void 0 : i.data) == null ? void 0 : s.result;
224
- Ie(t);
225
- const x = await L({
226
- code: "GET_MANAGE_IMMUNIZATION_FILTER_QUERIES",
227
- parameters: {}
228
- }), N = Object.values(
229
- (((n = x == null ? void 0 : x.data) == null ? void 0 : n.result) || []).reduce((y, r) => (y[r.queryCode] = r, y), {})
230
- );
231
- if (Te(N), R) {
232
- _e("Edit Immunization");
233
- const y = await L({
234
- code: "get_immunization_by_id",
235
- parameters: {
236
- id: parseInt(R)
237
- }
238
- }), r = (c = y == null ? void 0 : y.data) == null ? void 0 : c.result[0];
239
- if (v("code", r == null ? void 0 : r.code), v("name", r == null ? void 0 : r.name), v("basedate", r == null ? void 0 : r.base_date), v("fromDate", r == null ? void 0 : r.from_age_days), v("toDate", r == null ? void 0 : r.to_age_days), v("isRecursive", r == null ? void 0 : r.is_recursive), V(r != null && r.locations ? JSON.parse(r == null ? void 0 : r.locations) : []), r.is_recursive) {
240
- const h = JSON.parse(r == null ? void 0 : r.recursive_object);
241
- v("gapRange", h == null ? void 0 : h.gapRange), v("maxDoses", h == null ? void 0 : h.maxDoses);
242
- }
243
- const S = JSON.parse(r == null ? void 0 : r.validations);
244
- S && ((d = S == null ? void 0 : S.dependencies) == null || d.forEach((h) => {
245
- const J = ((h == null ? void 0 : h.vaccine) || []).map((ue) => {
246
- const H = t.find((Ve) => Ve.code === ue);
247
- return {
248
- code: ue,
249
- name: (H == null ? void 0 : H.name) || "Unknown"
250
- // Fallback to 'Unknown' if no match is found
251
- };
252
- });
253
- h.vaccine = J, te(h);
254
- }));
255
- const T = r != null && r.filters ? JSON.parse(r.filters) : [];
256
- T && T.length > 0 && T.forEach((h) => {
257
- oe({
258
- filterName: h.filterName || "",
259
- queryCode: h.queryCode || ""
260
- });
261
- });
262
- }
263
- Q((y) => !y);
264
- } catch (f) {
265
- console.error(f), Q((i) => !i);
266
- }
267
- }, Ge = async () => {
268
- var a, s, n, c, d;
269
- try {
270
- const f = (s = (a = q == null ? void 0 : q.finalSelected) == null ? void 0 : a.optionSelected) == null ? void 0 : s.id, i = q.finalSelected.level, { id: t } = q.finalSelected.optionSelected;
271
- let x = !1, N = [], y = {
272
- ids: C.map((r) => r.locationId),
273
- idArr: C.map((r) => r.locationIdArr)
274
- };
275
- for (let r = 1; r <= i; r++)
276
- (c = y.ids) != null && c.includes(
277
- (n = q[`level${r}`]) == null ? void 0 : n.id
278
- ) ? x = !0 : N.push((d = q[`level${r}`]) == null ? void 0 : d.id);
279
- if (x)
280
- E({
281
- message: "Please select different parent location!",
282
- type: "info"
283
- });
284
- else {
285
- const { data: r } = await fa({
286
- roleId: P == null ? void 0 : P.roleId,
287
- toBeAdded: t
288
- });
289
- V((S) => {
290
- var h;
291
- return [
292
- ...S.filter(
293
- (me) => {
294
- var J;
295
- return !((J = me.locationIdArr) != null && J.includes(f));
296
- }
297
- ),
298
- {
299
- locationId: f,
300
- locationIdArr: N,
301
- locationList: (h = r == null ? void 0 : r.message) == null ? void 0 : h.replaceAll(",", " => ")
302
- }
303
- ];
304
- }), ae({
305
- finalSelected: null,
306
- optionsList: []
307
- });
308
- }
309
- } catch (f) {
310
- console.error(f);
311
- }
312
- }, Ue = (a) => {
313
- V((s) => s.filter((n) => n.locationId !== a));
314
- };
315
- return /* @__PURE__ */ e(na, { ...le, children: /* @__PURE__ */ e(
316
- He,
317
- {
318
- className: "mt-6 mr-3 mb-3",
319
- elevation: 5,
320
- component: "form",
321
- onSubmit: Me(Oe),
322
- noValidate: !0,
323
- children: /* @__PURE__ */ l(ma, { isLoading: se, children: [
324
- /* @__PURE__ */ e(u, { item: !0, container: !0, direction: "row", children: /* @__PURE__ */ e(u, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ e(
325
- Z,
326
- {
327
- className: "p-2.5 px-5 flex border-b",
328
- subheader: /* @__PURE__ */ e(
329
- _,
330
- {
331
- display: "flex",
332
- alignItems: "center",
333
- justifyContent: "space-between",
334
- children: /* @__PURE__ */ e(
335
- m,
336
- {
337
- variant: "body2",
338
- className: "font-bold text-lg text-customBlue",
339
- "data-testid": "form-header",
340
- children: ye(Ce)
341
- }
342
- )
343
- }
344
- ),
345
- slotProps: {
346
- subheader: { className: "subheader-style" }
347
- }
348
- }
349
- ) }) }),
350
- /* @__PURE__ */ l(Ze, { children: [
351
- /* @__PURE__ */ l(u, { container: !0, spacing: 2, children: [
352
- /* @__PURE__ */ e(u, { className: "w-full", children: /* @__PURE__ */ l(
353
- u,
354
- {
355
- container: !0,
356
- spacing: 2,
357
- className: "flex flex-col justify-between w-full",
358
- children: [
359
- /* @__PURE__ */ l("div", { className: "flex md:flex-row flex-col space-x-10 w-[100%]", children: [
360
- /* @__PURE__ */ l("div", { className: "flex flex-col space-y-2 w-full md:w-1/2", children: [
361
- /* @__PURE__ */ l(u, { className: "mb-3 mr-[5rem] w-full", children: [
362
- /* @__PURE__ */ l(
363
- m,
364
- {
365
- variant: "caption",
366
- className: "p-3 pl-0 text-base",
367
- children: [
368
- o("Immunization Name"),
369
- /* @__PURE__ */ e("span", { className: "text-red-500 ml-1", children: "*" })
370
- ]
371
- }
372
- ),
373
- /* @__PURE__ */ e(
374
- k,
375
- {
376
- control: g,
377
- id: "name",
378
- name: "name",
379
- className: "w-full",
380
- errors: p,
381
- label: "",
382
- size: "small"
383
- }
384
- )
385
- ] }),
386
- /* @__PURE__ */ l(u, { className: "mb-3 mr-[5rem] w-full", children: [
387
- /* @__PURE__ */ l(
388
- m,
389
- {
390
- variant: "caption",
391
- className: "p-3 pl-0 text-base",
392
- children: [
393
- o("Immunization Code"),
394
- /* @__PURE__ */ e("span", { className: "text-red-500 ml-1", children: "*" })
395
- ]
396
- }
397
- ),
398
- /* @__PURE__ */ e(
399
- k,
400
- {
401
- control: g,
402
- id: "code",
403
- name: "code",
404
- className: "w-full",
405
- errors: p,
406
- label: "",
407
- size: "small",
408
- disabled: !!R
409
- }
410
- )
411
- ] }),
412
- /* @__PURE__ */ l(u, { className: "mb-3 mr-[5rem] w-full", children: [
413
- /* @__PURE__ */ e("div", { className: "flex gap-2 items-center", children: /* @__PURE__ */ l(
414
- m,
415
- {
416
- variant: "caption",
417
- className: "p-3 pl-0 text-base",
418
- children: [
419
- o("Base Date"),
420
- /* @__PURE__ */ e("span", { className: "text-red-500 ml-1", children: "*" })
421
- ]
422
- }
423
- ) }),
424
- /* @__PURE__ */ e(_, { className: "w-full", children: /* @__PURE__ */ l(fe, { fullWidth: !0, children: [
425
- /* @__PURE__ */ e(
426
- X,
427
- {
428
- className: "w-full",
429
- name: "basedate",
430
- control: g,
431
- defaultValue: "",
432
- render: ({ field: a }) => /* @__PURE__ */ e(
433
- he,
434
- {
435
- ...a,
436
- className: "w-full",
437
- sx: {
438
- height: 38
439
- },
440
- error: p.basedate,
441
- "data-testid": "mobiletypeeventconfigmodal-notification-select",
442
- children: U == null ? void 0 : U.map((s, n) => /* @__PURE__ */ e(
443
- B,
444
- {
445
- value: s.column_name,
446
- children: /* @__PURE__ */ e(m, { variant: "body2", children: s.column_name })
447
- },
448
- n + 1
449
- ))
450
- }
451
- )
452
- }
453
- ),
454
- (p == null ? void 0 : p.basedate) && /* @__PURE__ */ e("p", { className: "error-helper-text-immunization", children: (de = p == null ? void 0 : p.basedate) == null ? void 0 : de.message })
455
- ] }) })
456
- ] }),
457
- /* @__PURE__ */ l(u, { className: "mb-3 mr-[5rem] w-full", children: [
458
- /* @__PURE__ */ l("div", { className: "flex flex-col md:flex-row md:items-center gap-2 w-full", children: [
459
- /* @__PURE__ */ e(
460
- m,
461
- {
462
- variant: "caption",
463
- className: "text-base md:whitespace-nowrap",
464
- children: o("Eligible From ")
465
- }
466
- ),
467
- /* @__PURE__ */ l(u, { className: "flex gap-2 flex-wrap", children: [
468
- /* @__PURE__ */ e(
469
- D,
470
- {
471
- size: "small",
472
- label: "Days",
473
- clickable: !0,
474
- color: A === "days" ? "primary" : "default",
475
- onClick: () => I("days", "fromDate")
476
- }
477
- ),
478
- /* @__PURE__ */ e(
479
- D,
480
- {
481
- size: "small",
482
- label: "Months",
483
- clickable: !0,
484
- color: A === "months" ? "primary" : "default",
485
- onClick: () => I("months", "fromDate")
486
- }
487
- ),
488
- /* @__PURE__ */ e(
489
- D,
490
- {
491
- size: "small",
492
- label: "Years",
493
- clickable: !0,
494
- color: A === "years" ? "primary" : "default",
495
- onClick: () => I("years", "fromDate")
496
- }
497
- )
498
- ] })
499
- ] }),
500
- /* @__PURE__ */ e(
501
- k,
502
- {
503
- control: g,
504
- id: "fromDate",
505
- name: "fromDate",
506
- type: "number",
507
- errors: p,
508
- label: "",
509
- size: "small"
510
- }
511
- )
512
- ] }),
513
- /* @__PURE__ */ l(u, { className: "mb-3 mr-[5rem] w-full", children: [
514
- /* @__PURE__ */ l("div", { className: "flex flex-col md:flex-row md:items-center gap-2 w-full", children: [
515
- /* @__PURE__ */ e(
516
- m,
517
- {
518
- variant: "caption",
519
- className: "text-base md:whitespace-nowrap",
520
- children: o("Eligible To")
521
- }
522
- ),
523
- /* @__PURE__ */ l("div", { className: "flex gap-2 flex-wrap", children: [
524
- /* @__PURE__ */ e(
525
- D,
526
- {
527
- size: "small",
528
- label: "Days",
529
- clickable: !0,
530
- color: F === "days" ? "primary" : "default",
531
- onClick: () => I("days", "toDate")
532
- }
533
- ),
534
- /* @__PURE__ */ e(
535
- D,
536
- {
537
- size: "small",
538
- label: "Months",
539
- clickable: !0,
540
- color: F === "months" ? "primary" : "default",
541
- onClick: () => I("months", "toDate")
542
- }
543
- ),
544
- /* @__PURE__ */ e(
545
- D,
546
- {
547
- size: "small",
548
- label: "Years",
549
- clickable: !0,
550
- color: F === "years" ? "primary" : "default",
551
- onClick: () => I("years", "toDate")
552
- }
553
- )
554
- ] })
555
- ] }),
556
- /* @__PURE__ */ e(
557
- k,
558
- {
559
- control: g,
560
- id: "toDate",
561
- name: "toDate",
562
- type: "number",
563
- errors: p,
564
- label: "",
565
- size: "small"
566
- }
567
- )
568
- ] })
569
- ] }),
570
- /* @__PURE__ */ l(u, { className: "w-full md:w-1/2", children: [
571
- /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(
572
- ha,
573
- {
574
- selectedLocation: q,
575
- setSelectedLocation: ae,
576
- locations: Re,
577
- setLocations: Ae,
578
- fetchUptoLevel: Fe,
579
- templateType: "inline",
580
- fetchAccordingToUserAoi: !0,
581
- demographicFilterRequired: !1,
582
- requiredUptoLevel: 1,
583
- childForm: !0,
584
- disabled: se
585
- }
586
- ) }),
587
- /* @__PURE__ */ e(
588
- M,
589
- {
590
- variant: "contained",
591
- color: "primary",
592
- size: "small",
593
- onClick: Ge,
594
- className: "mt-[1rem]",
595
- children: o("Add Location")
596
- }
597
- ),
598
- /* @__PURE__ */ l("div", { className: "w-full mt-8 p-6 bg-background2 border border-gray-300 rounded-2xl shadow-lg", children: [
599
- /* @__PURE__ */ e("h2", { className: "text-xl font-semibold mb-4 text-customBlue", children: "📍 Selected Locations" }),
600
- /* @__PURE__ */ l("ul", { className: "", children: [
601
- C == null ? void 0 : C.map((a) => /* @__PURE__ */ l("li", { children: [
602
- /* @__PURE__ */ e("span", { className: "text-xl leading-none", children: "• " }),
603
- /* @__PURE__ */ e("span", { children: a != null && a.locationList ? a == null ? void 0 : a.locationList : "" }),
604
- /* @__PURE__ */ e(
605
- "button",
606
- {
607
- onClick: () => Ue(a == null ? void 0 : a.locationId),
608
- className: "mx-3 cursor-pointer text-red-500 hover:text-red-700 font-bold text-xl",
609
- children: "×"
610
- }
611
- )
612
- ] }, a == null ? void 0 : a.locationId)),
613
- (C == null ? void 0 : C.length) === 0 && /* @__PURE__ */ e("li", { className: "text-gray-400 italic text-center", children: "No locations selected." })
614
- ] })
615
- ] })
616
- ] })
617
- ] }),
618
- /* @__PURE__ */ l(u, { className: "flex flex-col md:flex-row space-x-10 w-full", children: [
619
- /* @__PURE__ */ e(u, { className: "mb-3 mt-8", children: /* @__PURE__ */ e(
620
- ta,
621
- {
622
- name: "isRecursive",
623
- sx: { "& .MuiSvgIcon-root": { fontSize: 20 } },
624
- label: o("Repeats"),
625
- control: g,
626
- labelSizeInRem: "1rem",
627
- checked: !!Y
628
- }
629
- ) }),
630
- Y && /* @__PURE__ */ l(u, { className: "mb-3", children: [
631
- /* @__PURE__ */ l("div", { className: "flex flex-col md:flex-row md:items-center gap-2 w-full", children: [
632
- /* @__PURE__ */ e(
633
- m,
634
- {
635
- variant: "caption",
636
- className: "text-base md:whitespace-nowrap",
637
- children: o("Interval")
638
- }
639
- ),
640
- /* @__PURE__ */ l("div", { className: "flex gap-2 flex-wrap", children: [
641
- /* @__PURE__ */ e(
642
- D,
643
- {
644
- size: "small",
645
- label: "Days",
646
- clickable: !0,
647
- color: O === "days" ? "primary" : "default",
648
- onClick: () => I("days", "gapRange")
649
- }
650
- ),
651
- /* @__PURE__ */ e(
652
- D,
653
- {
654
- size: "small",
655
- label: "Months",
656
- clickable: !0,
657
- color: O === "months" ? "primary" : "default",
658
- onClick: () => I("months", "gapRange")
659
- }
660
- ),
661
- /* @__PURE__ */ e(
662
- D,
663
- {
664
- size: "small",
665
- label: "Years",
666
- clickable: !0,
667
- color: O === "years" ? "primary" : "default",
668
- onClick: () => I("years", "gapRange")
669
- }
670
- )
671
- ] })
672
- ] }),
673
- /* @__PURE__ */ e(
674
- k,
675
- {
676
- control: g,
677
- id: "gapRange",
678
- name: "gapRange",
679
- type: "number",
680
- className: "w-full",
681
- errors: p,
682
- label: "",
683
- size: "small"
684
- }
685
- )
686
- ] }),
687
- Y && /* @__PURE__ */ l(u, { className: "mb-3", children: [
688
- /* @__PURE__ */ e("div", { className: "flex flex-col md:flex-row md:items-center gap-2 w-full", children: /* @__PURE__ */ l(
689
- m,
690
- {
691
- variant: "caption",
692
- className: " pl-0 text-base",
693
- children: [
694
- o("Max Doses"),
695
- /* @__PURE__ */ e("span", { className: "text-red-500 ml-1", children: "*" })
696
- ]
697
- }
698
- ) }),
699
- /* @__PURE__ */ e(
700
- k,
701
- {
702
- control: g,
703
- id: "maxDoses",
704
- name: "maxDoses",
705
- type: "number",
706
- className: "w-full",
707
- errors: p,
708
- label: "",
709
- size: "small"
710
- }
711
- )
712
- ] })
713
- ] }),
714
- /* @__PURE__ */ l(u, { size: { xs: 12 }, className: "mb-3", children: [
715
- /* @__PURE__ */ e(K, {}),
716
- /* @__PURE__ */ l(_, { className: "flex flex-row items-center justify-between", children: [
717
- /* @__PURE__ */ e(
718
- Z,
719
- {
720
- subheader: /* @__PURE__ */ e(
721
- _,
722
- {
723
- display: "flex",
724
- alignItems: "center",
725
- justifyContent: "space-between",
726
- children: /* @__PURE__ */ e(
727
- m,
728
- {
729
- variant: "body2",
730
- className: "font-bold text-lg text-customBlue",
731
- "data-testid": "form-header",
732
- children: o("Add Validations")
733
- }
734
- )
735
- }
736
- ),
737
- slotProps: {
738
- subheader: {
739
- variant: "p",
740
- sx: { fontWeight: "bold" }
741
- }
742
- }
743
- }
744
- ),
745
- /* @__PURE__ */ e(
746
- M,
747
- {
748
- variant: "contained",
749
- size: "small",
750
- className: "mr-2",
751
- onClick: () => te({
752
- vaccine: [],
753
- min_gap_days: 0,
754
- max_gap_days: 0,
755
- message: "",
756
- required: ""
757
- }),
758
- children: o("Add")
759
- }
760
- )
761
- ] }),
762
- ne.map((a, s) => {
763
- var n, c, d, f, i;
764
- return /* @__PURE__ */ e(
765
- _,
766
- {
767
- sx: {
768
- display: "flex",
769
- justifyContent: "space-between",
770
- mb: 2,
771
- alignItems: "flex-start",
772
- border: "1px solid var(--color-gray3)",
773
- backgroundColor: "var(--color-background)",
774
- padding: 2,
775
- borderRadius: 2,
776
- position: "relative",
777
- marginLeft: "15px"
778
- },
779
- children: /* @__PURE__ */ e("div", { className: "w-full", children: /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-4 items-center w-full", children: [
780
- /* @__PURE__ */ l("div", { className: "w-full md:w-[20%]", children: [
781
- /* @__PURE__ */ e(
782
- m,
783
- {
784
- variant: "caption",
785
- className: "pb-1 text-base block",
786
- children: Le
787
- }
788
- ),
789
- /* @__PURE__ */ e(
790
- ca,
791
- {
792
- name: `dependencies.${s}.vaccine`,
793
- options: ke,
794
- checkEquality: "code",
795
- className: "w-full",
796
- errors: p,
797
- getOptionLabel: (t) => t.name,
798
- control: g,
799
- value: (c = (n = $[s]) == null ? void 0 : n.vaccine) == null ? void 0 : c.map(
800
- (t) => t || []
801
- )
802
- }
803
- )
804
- ] }),
805
- /* @__PURE__ */ l("div", { className: "w-full md:w-[20%]", children: [
806
- /* @__PURE__ */ e(
807
- m,
808
- {
809
- variant: "caption",
810
- className: "pb-1 text-base block",
811
- children: ze
812
- }
813
- ),
814
- /* @__PURE__ */ e(fe, { fullWidth: !0, children: /* @__PURE__ */ e(
815
- X,
816
- {
817
- name: `dependencies.${s}.required`,
818
- control: g,
819
- defaultValue: "",
820
- render: ({ field: t }) => /* @__PURE__ */ l(
821
- he,
822
- {
823
- ...t,
824
- className: "w-full",
825
- sx: { height: 38 },
826
- error: j(
827
- p,
828
- `dependencies.${s}.required`
829
- ),
830
- onChange: (x) => {
831
- var N, y;
832
- t.onChange(x.target.value), x.target.value === "false" ? (v(
833
- `dependencies.${s}.min_gap_days`,
834
- 0
835
- ), v(
836
- `dependencies.${s}.max_gap_days`,
837
- 0
838
- ), je([
839
- `dependencies.${s}.min_gap_days`,
840
- `dependencies.${s}.max_gap_days`
841
- ])) : (v(
842
- `dependencies.${s}.min_gap_days`,
843
- ((N = $[s]) == null ? void 0 : N.min_gap_days) || 0
844
- ), v(
845
- `dependencies.${s}.max_gap_days`,
846
- ((y = $[s]) == null ? void 0 : y.max_gap_days) || 0
847
- ));
848
- },
849
- children: [
850
- /* @__PURE__ */ e(B, { value: "true", children: /* @__PURE__ */ e(m, { variant: "body2", children: o("Should be given") }) }),
851
- /* @__PURE__ */ e(B, { value: "false", children: /* @__PURE__ */ e(m, { variant: "body2", children: o("Should not be given") }) }),
852
- /* @__PURE__ */ e(B, { value: "Optional", children: /* @__PURE__ */ e(m, { variant: "body2", children: o("Optional") }) })
853
- ]
854
- }
855
- )
856
- }
857
- ) })
858
- ] }),
859
- ((d = $[s]) == null ? void 0 : d.required) !== "false" && /* @__PURE__ */ l("div", { className: "w-full md:w-[15%]", children: [
860
- /* @__PURE__ */ e(
861
- m,
862
- {
863
- variant: "caption",
864
- className: "pb-1 text-base block",
865
- children: De
866
- }
867
- ),
868
- /* @__PURE__ */ e(
869
- k,
870
- {
871
- control: g,
872
- id: `dependencies.${s}.min_gap_days`,
873
- name: `dependencies.${s}.min_gap_days`,
874
- type: "number",
875
- errors: p,
876
- label: "",
877
- size: "small"
878
- }
879
- )
880
- ] }),
881
- ((f = $[s]) == null ? void 0 : f.required) !== "false" && /* @__PURE__ */ l("div", { className: "w-full md:w-[15%]", children: [
882
- /* @__PURE__ */ e(
883
- m,
884
- {
885
- variant: "caption",
886
- className: "pb-1 text-base block",
887
- children: qe
888
- }
889
- ),
890
- /* @__PURE__ */ e(
891
- k,
892
- {
893
- control: g,
894
- id: `dependencies.${s}.max_gap_days`,
895
- name: `dependencies.${s}.max_gap_days`,
896
- type: "number",
897
- errors: p,
898
- label: "",
899
- size: "small"
900
- }
901
- )
902
- ] }),
903
- /* @__PURE__ */ l(u, { className: "w-full md:w-[24%]", children: [
904
- /* @__PURE__ */ e(
905
- m,
906
- {
907
- variant: "caption",
908
- className: "pb-1 text-base block",
909
- children: Se
910
- }
911
- ),
912
- /* @__PURE__ */ e(
913
- k,
914
- {
915
- control: g,
916
- id: `dependencies.${s}.message`,
917
- name: `dependencies.${s}.message`,
918
- errors: p,
919
- label: "",
920
- size: "small"
921
- }
922
- ),
923
- j(
924
- p,
925
- `dependencies.${s}.vaccine`
926
- ) && /* @__PURE__ */ e(m, { variant: "caption", color: "error", children: (i = j(
927
- p,
928
- `dependencies.${s}.vaccine`
929
- )) == null ? void 0 : i.message })
930
- ] }),
931
- /* @__PURE__ */ e(u, { className: "mt-8", children: /* @__PURE__ */ e(
932
- ee,
933
- {
934
- icon: ge,
935
- color: "red",
936
- className: "cursor-pointer p-1 text-xl",
937
- onClick: () => Je(s)
938
- }
939
- ) })
940
- ] }) })
941
- },
942
- a.id
943
- );
944
- }),
945
- ne.length === 0 && /* @__PURE__ */ e(
946
- _,
947
- {
948
- sx: {
949
- padding: 3,
950
- marginLeft: "15px",
951
- marginTop: 2,
952
- textAlign: "center",
953
- color: "text.secondary",
954
- backgroundColor: "var(--color-background)",
955
- borderRadius: 2,
956
- border: "1px dashed var(--color-gray3)"
957
- },
958
- children: /* @__PURE__ */ e(m, { variant: "body2", color: "text.secondary", children: o("No dependencies added yet.") })
959
- }
960
- )
961
- ] }),
962
- /* @__PURE__ */ l(u, { size: { xs: 12 }, className: "mb-3", children: [
963
- /* @__PURE__ */ e(K, {}),
964
- /* @__PURE__ */ l(_, { className: "flex flex-row items-center justify-between", children: [
965
- /* @__PURE__ */ e(
966
- Z,
967
- {
968
- subheader: /* @__PURE__ */ l(
969
- _,
970
- {
971
- display: "flex",
972
- alignItems: "center",
973
- justifyContent: "space-between",
974
- children: [
975
- /* @__PURE__ */ e(
976
- m,
977
- {
978
- variant: "body2",
979
- className: "font-bold text-lg text-customBlue",
980
- "data-testid": "form-header",
981
- children: o("Add Filters")
982
- }
983
- ),
984
- /* @__PURE__ */ e(
985
- Ke,
986
- {
987
- arrow: !0,
988
- title: /* @__PURE__ */ l(Qe, { children: [
989
- "Queries with ",
990
- /* @__PURE__ */ e("b", { children: "params" }),
991
- " ",
992
- /* @__PURE__ */ e("i", { children: "{{member_id}}" }),
993
- " are shown here.",
994
- /* @__PURE__ */ e("br", {}),
995
- "The query must return a single boolean column named ",
996
- /* @__PURE__ */ e("code", { children: "filter_passed" }),
997
- ", e.g.",
998
- " ",
999
- /* @__PURE__ */ e("code", { children: "{ filter_passed: true }" }),
1000
- "."
1001
- ] }),
1002
- children: /* @__PURE__ */ e(Xe, { size: "small", color: "info", children: /* @__PURE__ */ e(ee, { icon: ua }) })
1003
- }
1004
- )
1005
- ]
1006
- }
1007
- ),
1008
- slotProps: {
1009
- subheader: {
1010
- variant: "p",
1011
- sx: { fontWeight: "bold" }
1012
- }
1013
- }
1014
- }
1015
- ),
1016
- /* @__PURE__ */ e(
1017
- M,
1018
- {
1019
- variant: "contained",
1020
- size: "small",
1021
- onClick: () => oe({
1022
- filterName: "",
1023
- queryCode: ""
1024
- }),
1025
- children: o("Add")
1026
- }
1027
- )
1028
- ] }),
1029
- ie.map((a, s) => /* @__PURE__ */ e(
1030
- _,
1031
- {
1032
- sx: {
1033
- display: "flex",
1034
- justifyContent: "space-between",
1035
- mb: 2,
1036
- alignItems: "flex-start",
1037
- border: "1px solid var(--color-gray3)",
1038
- backgroundColor: "var(--color-background)",
1039
- padding: 2,
1040
- borderRadius: 2,
1041
- position: "relative",
1042
- marginLeft: "15px"
1043
- },
1044
- children: /* @__PURE__ */ e("div", { className: "w-full", children: /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-4 items-center w-full", children: [
1045
- /* @__PURE__ */ l("div", { className: "w-full md:w-[45%]", children: [
1046
- /* @__PURE__ */ e(
1047
- m,
1048
- {
1049
- variant: "caption",
1050
- className: "pb-1 text-base block",
1051
- children: o("Filter Name")
1052
- }
1053
- ),
1054
- /* @__PURE__ */ e(
1055
- k,
1056
- {
1057
- control: g,
1058
- name: `filters.${s}.filterName`,
1059
- errors: p,
1060
- label: "",
1061
- size: "small"
1062
- }
1063
- )
1064
- ] }),
1065
- /* @__PURE__ */ l("div", { className: "w-full md:w-[50%]", children: [
1066
- /* @__PURE__ */ e(
1067
- m,
1068
- {
1069
- variant: "caption",
1070
- className: "pb-1 text-base block",
1071
- children: o("Query")
1072
- }
1073
- ),
1074
- /* @__PURE__ */ e(
1075
- X,
1076
- {
1077
- name: `filters.${s}.queryCode`,
1078
- control: g,
1079
- render: ({ field: n }) => {
1080
- const [c, d] = w(""), f = re.find(
1081
- (i) => i.queryCode === n.value
1082
- ) || null;
1083
- return /* @__PURE__ */ e(
1084
- ea,
1085
- {
1086
- options: re,
1087
- getOptionLabel: (i) => i.queryCode || "",
1088
- isOptionEqualToValue: (i, t) => (i == null ? void 0 : i.queryCode) === t,
1089
- value: f,
1090
- inputValue: c,
1091
- onInputChange: (i, t) => {
1092
- d(t);
1093
- },
1094
- onChange: (i, t) => {
1095
- n.onChange(
1096
- (t == null ? void 0 : t.queryCode) || ""
1097
- ), d(
1098
- (t == null ? void 0 : t.queryCode) || ""
1099
- );
1100
- },
1101
- filterOptions: (i, { inputValue: t }) => i.filter(
1102
- (x) => x.queryCode.toLowerCase().includes(
1103
- t.toLowerCase()
1104
- )
1105
- ),
1106
- renderOption: (i, t) => /* @__PURE__ */ e("li", { ...i, children: t.queryCode }),
1107
- renderInput: (i) => {
1108
- var t;
1109
- return /* @__PURE__ */ e(
1110
- aa,
1111
- {
1112
- ...i,
1113
- size: "small",
1114
- error: !!j(
1115
- p,
1116
- `filters.${s}.queryCode`
1117
- ),
1118
- helperText: (t = j(
1119
- p,
1120
- `filters.${s}.queryCode`
1121
- )) == null ? void 0 : t.message
1122
- }
1123
- );
1124
- }
1125
- }
1126
- );
1127
- }
1128
- }
1129
- )
1130
- ] }),
1131
- /* @__PURE__ */ e(u, { className: "mt-8", children: /* @__PURE__ */ e(
1132
- ee,
1133
- {
1134
- icon: ge,
1135
- color: "red",
1136
- className: "cursor-pointer p-1 text-xl",
1137
- onClick: () => Be(s)
1138
- }
1139
- ) })
1140
- ] }) })
1141
- },
1142
- a.id
1143
- )),
1144
- ie.length === 0 && /* @__PURE__ */ e(
1145
- _,
1146
- {
1147
- sx: {
1148
- padding: 3,
1149
- marginLeft: "15px",
1150
- marginTop: 2,
1151
- textAlign: "center",
1152
- color: "text.secondary",
1153
- backgroundColor: "var(--color-background)",
1154
- borderRadius: 2,
1155
- border: "1px dashed var(--color-gray3)"
1156
- },
1157
- children: /* @__PURE__ */ e(m, { variant: "body2", color: "text.secondary", children: o("No filters added yet.") })
1158
- }
1159
- )
1160
- ] })
1161
- ]
1162
- }
1163
- ) }),
1164
- /* @__PURE__ */ l(u, { size: { xs: 12 }, className: "mb-3", children: [
1165
- /* @__PURE__ */ e(K, { variant: "middle", className: "h-[0.625rem]" }),
1166
- /* @__PURE__ */ e(u, { container: !0, spacing: 2 })
1167
- ] })
1168
- ] }),
1169
- /* @__PURE__ */ l(u, { item: !0, container: !0, size: { xs: 12 }, justifyContent: "flex-end", children: [
1170
- /* @__PURE__ */ e(
1171
- M,
1172
- {
1173
- variant: "contained",
1174
- color: "secondary",
1175
- size: "small",
1176
- onClick: () => {
1177
- G("/ui/medplat/manage/immunizationConfiguratorList");
1178
- },
1179
- "data-testid": "manageImmunization-close-button",
1180
- children: /* @__PURE__ */ e(m, { variant: "caption", children: o("Back") })
1181
- }
1182
- ),
1183
- /* @__PURE__ */ e(
1184
- M,
1185
- {
1186
- className: "ml-2 mr-4",
1187
- size: "small",
1188
- variant: "contained",
1189
- color: "primary",
1190
- type: "submit",
1191
- "data-testid": "submit-button",
1192
- children: o("Submit")
1193
- }
1194
- )
1195
- ] })
1196
- ] })
1197
- ] })
1198
- }
1199
- ) });
1200
- };
1201
- export {
1202
- Fa as default
1203
- };
1204
- //# sourceMappingURL=manageImmunization-B4swS745.js.map