@argusoft/medplat-core 1.0.30 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AccessRights-xrday-L1.js → AccessRights-DUgY6ewy.js} +151 -143
- package/dist/AccessRights-DUgY6ewy.js.map +1 -0
- package/dist/AddMenuConfiguration-c6ZKiN0i.js +8898 -0
- package/dist/AddMenuConfiguration-c6ZKiN0i.js.map +1 -0
- package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js → BrandsPage-DMw2vT0u-BVhvhc6J.js} +14 -14
- package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js.map → BrandsPage-DMw2vT0u-BVhvhc6J.js.map} +1 -1
- package/dist/{CategoriesPage-BsS5IQh3-B03lWRY5.js → CategoriesPage-D3ihx9Gi-CT58g0ry.js} +112 -105
- package/dist/CategoriesPage-D3ihx9Gi-CT58g0ry.js.map +1 -0
- package/dist/{ChangePasswordModalCore-BPsJquTS.js → ChangePasswordModalCore-lQ9GamH1.js} +3 -3
- package/dist/{ChangePasswordModalCore-BPsJquTS.js.map → ChangePasswordModalCore-lQ9GamH1.js.map} +1 -1
- package/dist/ConditionConfig-BQBmBHaM.js +408 -0
- package/dist/ConditionConfig-BQBmBHaM.js.map +1 -0
- package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js → DashboardPage-asr2XDRu-uOOlX9Vq.js} +29 -29
- package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js.map → DashboardPage-asr2XDRu-uOOlX9Vq.js.map} +1 -1
- package/dist/EventConfig-BY2cgGyx.js +27 -0
- package/dist/{EventConfig-BmLemzX3.js.map → EventConfig-BY2cgGyx.js.map} +1 -1
- package/dist/EventConfigurations-CUPEN5BV.js +544 -0
- package/dist/EventConfigurations-CUPEN5BV.js.map +1 -0
- package/dist/EventConfigurations.css +1 -1
- package/dist/EventsExceptionModal-BX-ArkBE.js +188 -0
- package/dist/EventsExceptionModal-BX-ArkBE.js.map +1 -0
- package/dist/EventsUi-D6O9S7BK.js +258 -0
- package/dist/EventsUi-D6O9S7BK.js.map +1 -0
- package/dist/{FacilityPicker-BiZeupmP-CyPHmj6b.js → FacilityPicker-DYl_PDyt-Cbwo2tAY.js} +10 -10
- package/dist/{FacilityPicker-BiZeupmP-CyPHmj6b.js.map → FacilityPicker-DYl_PDyt-Cbwo2tAY.js.map} +1 -1
- package/dist/{FeatureMenu-DYJmDt7q.js → FeatureMenu-CHsBbw3W.js} +9 -5
- package/dist/FeatureMenu-CHsBbw3W.js.map +1 -0
- package/dist/{FhirServerList-DuTwnngN.js → FhirServerList-iXBPkRVF.js} +11 -11
- package/dist/{FhirServerList-DuTwnngN.js.map → FhirServerList-iXBPkRVF.js.map} +1 -1
- package/dist/{GrantPermissionModal-BDN66Atn.js → GrantPermissionModal-D7iNZd0M.js} +54 -51
- package/dist/GrantPermissionModal-D7iNZd0M.js.map +1 -0
- package/dist/{ImmunizationConfigurationBase-Di1KO3oW.js → ImmunizationConfigurationBase-aUtx0JEe.js} +3440 -3060
- package/dist/ImmunizationConfigurationBase-aUtx0JEe.js.map +1 -0
- package/dist/{InventoryPage-C_AxSy7A-QLvlL4rE.js → InventoryPage-DOotGZrj-CoPjOJEI.js} +10 -10
- package/dist/{InventoryPage-C_AxSy7A-QLvlL4rE.js.map → InventoryPage-DOotGZrj-CoPjOJEI.js.map} +1 -1
- package/dist/ManageEventConfiguration-DqW3krT6.js +1216 -0
- package/dist/ManageEventConfiguration-DqW3krT6.js.map +1 -0
- package/dist/ManageEventConfiguration.css +1 -1
- package/dist/{ManageUser-DCFkUMV9.js → ManageUser-DZltBina.js} +134 -134
- package/dist/{ManageUser-DCFkUMV9.js.map → ManageUser-DZltBina.js.map} +1 -1
- package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js → MemberProfileCard-D5CgkTdJ-D2NgDJl3.js} +25 -25
- package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js.map → MemberProfileCard-D5CgkTdJ-D2NgDJl3.js.map} +1 -1
- package/dist/MobileAnalytics-BLOionG_.js +17301 -0
- package/dist/MobileAnalytics-BLOionG_.js.map +1 -0
- package/dist/MobileMenuManagement-68Wijb0X.js +220 -0
- package/dist/MobileMenuManagement-68Wijb0X.js.map +1 -0
- package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js +752 -0
- package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js.map +1 -0
- package/dist/OtherTypeEventConfigModal-stNmuSv_.js +1812 -0
- package/dist/OtherTypeEventConfigModal-stNmuSv_.js.map +1 -0
- package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js → PaymentCreatePage-DfvSZ-kB-CckogYoe.js} +14 -14
- package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js.map → PaymentCreatePage-DfvSZ-kB-CckogYoe.js.map} +1 -1
- package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js → PaymentsPage-DMNjYWAJ-ChO9IXmk.js} +24 -24
- package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js.map → PaymentsPage-DMNjYWAJ-ChO9IXmk.js.map} +1 -1
- package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js → PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js} +2 -2
- package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js.map → PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js.map} +1 -1
- package/dist/{PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js → PickupCreatePage-B4O_-vE5-DoOo9nJO.js} +64 -64
- package/dist/{PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js.map → PickupCreatePage-B4O_-vE5-DoOo9nJO.js.map} +1 -1
- package/dist/{PickupsPage-Ctpghavs-CUp4uIZq.js → PickupsPage-D7zyioJB-bHKnARYw.js} +29 -29
- package/dist/PickupsPage-D7zyioJB-bHKnARYw.js.map +1 -0
- package/dist/{PmGuard-b10TGXEi-G3N0G_Wg.js → PmGuard-BZE-y4In-D_pUm5MP.js} +25 -25
- package/dist/{PmGuard-b10TGXEi-G3N0G_Wg.js.map → PmGuard-BZE-y4In-D_pUm5MP.js.map} +1 -1
- package/dist/{ProductEditPage-C1thoKHu-URQaZ6st.js → ProductEditPage-BVlVUCtD-BR-tJ5Wb.js} +475 -472
- package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js.map +1 -0
- package/dist/{ProductsPage-CupVmOD4-D45a_hf-.js → ProductsPage-DvNHIeZt-BoOOJJtk.js} +36 -35
- package/dist/ProductsPage-DvNHIeZt-BoOOJJtk.js.map +1 -0
- package/dist/{PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js → PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js} +214 -187
- package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js.map +1 -0
- package/dist/{PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js → PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js} +80 -80
- package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map +1 -0
- package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js → PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js} +29 -29
- package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js.map → PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js.map} +1 -1
- package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js → PurchasesPage-DgL5T6BY-DePUuE9l.js} +31 -31
- package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js.map → PurchasesPage-DgL5T6BY-DePUuE9l.js.map} +1 -1
- package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js → SaleCreatePage-CZnIOydv-DKBw-qp7.js} +15 -15
- package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js.map → SaleCreatePage-CZnIOydv-DKBw-qp7.js.map} +1 -1
- package/dist/{SalesPage-D18DCseD-BxktGDRQ.js → SalesPage-DPIRrC_O-M8rqnK7z.js} +62 -62
- package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js.map +1 -0
- package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js +676 -0
- package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js.map +1 -0
- package/dist/{ShowFlywayQuery-D1y_4A1u.js → ShowFlywayQuery-DIOUdYfG.js} +26 -19
- package/dist/{ShowFlywayQuery-D1y_4A1u.js.map → ShowFlywayQuery-DIOUdYfG.js.map} +1 -1
- package/dist/{StorageUnitsPage-7EqwuMOI-BwUso1Th.js → StorageUnitsPage-BDRkdCjW-UF64rf7q.js} +195 -188
- package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map +1 -0
- package/dist/{SubMenu-eEDhZUvh.js → SubMenu-BdMTYtC1.js} +5 -3
- package/dist/SubMenu-BdMTYtC1.js.map +1 -0
- package/dist/{TransactionsPage-DrH53pVS-BkhIGB6C.js → TransactionsPage-CqWTMNU8-Df6eGFDW.js} +48 -48
- package/dist/{TransactionsPage-DrH53pVS-BkhIGB6C.js.map → TransactionsPage-CqWTMNU8-Df6eGFDW.js.map} +1 -1
- package/dist/{TransferCreatePage-CuvoMrYH-DTTfHjz-.js → TransferCreatePage-DF7FZaTJ-CL79V3aR.js} +8 -8
- package/dist/{TransferCreatePage-CuvoMrYH-DTTfHjz-.js.map → TransferCreatePage-DF7FZaTJ-CL79V3aR.js.map} +1 -1
- package/dist/{TransfersPage-Cf701t8s-BBbN7cBf.js → TransfersPage-CGrRFaBF-cTwBUv0o.js} +69 -69
- package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js.map +1 -0
- package/dist/TypeConfiguration-JbRCN6GR.js +114 -0
- package/dist/TypeConfiguration-JbRCN6GR.js.map +1 -0
- package/dist/{UserList-DgPxsnj2.js → UserList-L41Xw0Q6.js} +2 -2
- package/dist/{UserList-DgPxsnj2.js.map → UserList-L41Xw0Q6.js.map} +1 -1
- package/dist/Users-CsJ08Kjm.js +40 -0
- package/dist/{Users-Bpc4Sazd.js.map → Users-CsJ08Kjm.js.map} +1 -1
- package/dist/{VialsPage-8oAc1yFv-Cl3FUXBJ.js → VialsPage-rvvXjgZG-Oqo1v6kQ.js} +35 -35
- package/dist/{VialsPage-8oAc1yFv-Cl3FUXBJ.js.map → VialsPage-rvvXjgZG-Oqo1v6kQ.js.map} +1 -1
- package/dist/{constants-ClZJY2x1-MkSWn6TZ.js → constants-DpXnLsAB-D6lN5cjK.js} +58 -47
- package/dist/constants-DpXnLsAB-D6lN5cjK.js.map +1 -0
- package/dist/{dashboardLayoutUtils-D1xCAxp3.js → dashboardLayoutUtils-CJivzaU1.js} +95 -92
- package/dist/dashboardLayoutUtils-CJivzaU1.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.lib-ETRQOzvE.js +894 -0
- package/dist/index.lib-ETRQOzvE.js.map +1 -0
- package/dist/listValueStore-BFQtDYIR-Bj0yX145.js +36 -0
- package/dist/listValueStore-BFQtDYIR-Bj0yX145.js.map +1 -0
- package/package.json +1 -1
- package/dist/AccessRights-xrday-L1.js.map +0 -1
- package/dist/AddMenuConfiguration-e5BVXhmw.js +0 -8547
- package/dist/AddMenuConfiguration-e5BVXhmw.js.map +0 -1
- package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js.map +0 -1
- package/dist/ConditionConfig-Ddz9halE.js +0 -395
- package/dist/ConditionConfig-Ddz9halE.js.map +0 -1
- package/dist/ConditionConfig.css +0 -1
- package/dist/EventConfig-BmLemzX3.js +0 -26
- package/dist/EventConfigurations-Bzh1qWXU.js +0 -450
- package/dist/EventConfigurations-Bzh1qWXU.js.map +0 -1
- package/dist/EventsExceptionModal-B2SRrnB1.js +0 -200
- package/dist/EventsExceptionModal-B2SRrnB1.js.map +0 -1
- package/dist/EventsSkeleton-BIcPks4T.js +0 -61
- package/dist/EventsSkeleton-BIcPks4T.js.map +0 -1
- package/dist/FeatureMenu-DYJmDt7q.js.map +0 -1
- package/dist/GrantPermissionModal-BDN66Atn.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-Di1KO3oW.js.map +0 -1
- package/dist/ManageEventConfiguration-CoYcpjR9.js +0 -1085
- package/dist/ManageEventConfiguration-CoYcpjR9.js.map +0 -1
- package/dist/MobileAnalytics-pQoE8cG1.js +0 -16888
- package/dist/MobileAnalytics-pQoE8cG1.js.map +0 -1
- package/dist/MobileMenuManagement-Cf8IZlla.js +0 -108
- package/dist/MobileMenuManagement-Cf8IZlla.js.map +0 -1
- package/dist/MobileTypeEventConfigModal-BeveaX0C.js +0 -783
- package/dist/MobileTypeEventConfigModal-BeveaX0C.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-CM6VkdmY.js +0 -2046
- package/dist/OtherTypeEventConfigModal-CM6VkdmY.js.map +0 -1
- package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js.map +0 -1
- package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js.map +0 -1
- package/dist/ProductsPage-CupVmOD4-D45a_hf-.js.map +0 -1
- package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js.map +0 -1
- package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js.map +0 -1
- package/dist/SalesPage-D18DCseD-BxktGDRQ.js.map +0 -1
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js +0 -747
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js.map +0 -1
- package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map +0 -1
- package/dist/SubMenu-eEDhZUvh.js.map +0 -1
- package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js.map +0 -1
- package/dist/TypeConfiguration-3O6ABrK-.js +0 -117
- package/dist/TypeConfiguration-3O6ABrK-.js.map +0 -1
- package/dist/Users-Bpc4Sazd.js +0 -41
- package/dist/constants-ClZJY2x1-MkSWn6TZ.js.map +0 -1
- package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +0 -1
- package/dist/index.lib-Dn8PMkeD.js +0 -862
- package/dist/index.lib-Dn8PMkeD.js.map +0 -1
|
@@ -0,0 +1,1216 @@
|
|
|
1
|
+
import { jsxs as l, Fragment as bt, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { b as Ct, c as Tt, d as xt, u as Et, s as It } from "./EventConfig-BY2cgGyx.js";
|
|
3
|
+
import { retrieveAllNotifications as Rt, getReportsList as Mt } from "@/common/services/GlobalApis";
|
|
4
|
+
import { showToast as L } from "@/common/toaster/toaster";
|
|
5
|
+
import Dt from "@/views/custom-components/CustomTextArea";
|
|
6
|
+
import P from "@/views/custom-components/CustomTextField";
|
|
7
|
+
import { yupResolver as qt } from "@hookform/resolvers/yup";
|
|
8
|
+
import F from "@/views/custom-components/CustomDropdown";
|
|
9
|
+
import Nt from "@/views/custom-components/PostgresEditor";
|
|
10
|
+
import { Box as h, Paper as re, Typography as R, Divider as we, Button as Y, Tooltip as V, IconButton as K, Chip as Oe, Collapse as St } from "@mui/material";
|
|
11
|
+
import v from "@mui/material/Grid2";
|
|
12
|
+
import { useRef as ze, useState as g, useEffect as Ae, useMemo as J, Suspense as _e, lazy as le } from "react";
|
|
13
|
+
import { useForm as wt } from "react-hook-form";
|
|
14
|
+
import { useNavigate as Ot } from "react-router";
|
|
15
|
+
import { useParams as zt } from "react-router-dom";
|
|
16
|
+
import * as M from "yup";
|
|
17
|
+
import { useTranslateProvider as At } from "@/common/languageTranslator/TranslationContext";
|
|
18
|
+
import _t from "@/hooks/useTrackEvent";
|
|
19
|
+
import { useDebounceFn as kt } from "@/hooks/useDebounceFn";
|
|
20
|
+
import { E as Wt, T as $t, d as Lt, e as se, F as C, f as G, b as Pt, I as Ft, l as Yt, A as Ut, i as Bt } from "./EventsUi-D6O9S7BK.js";
|
|
21
|
+
import D from "@/common/fontAwesomeIcons/FontAwesomeIcons";
|
|
22
|
+
import jt from "@/views/custom-components/CustomConfirmationModal";
|
|
23
|
+
import './ManageEventConfiguration.css';const Ht = le(() => import("./ConditionConfig-BQBmBHaM.js")), Qt = le(
|
|
24
|
+
() => import("./MobileTypeEventConfigModal-CMcj7Ozp.js")
|
|
25
|
+
), Vt = le(
|
|
26
|
+
() => import("./OtherTypeEventConfigModal-stNmuSv_.js")
|
|
27
|
+
);
|
|
28
|
+
function vn() {
|
|
29
|
+
var qe, Ne;
|
|
30
|
+
const { translate: i } = At(), de = ze(null), ce = ze(!1), { id: A } = zt(), ue = Ot(), [_, ke] = g(null), [me, We] = g(null), [fe, $e] = g({}), [u, I] = g(
|
|
31
|
+
[]
|
|
32
|
+
), [pe, Le] = g(null), [X, Pe] = g(null), [Fe, ge] = g(null), [Ye, Ue] = g(null), [q, k] = g(null), [Be, he] = g(null), [je, He] = g(null), [N, S] = g(null), [ye, Qe] = g(!1), [ve, be] = g(!1), [Ce, Z] = g(!1), [U, w] = g([]), [Ve, B] = g(!1), [Ke, Je] = g([]), [ee, j] = g({}), [W, te] = g({}), [H, ne] = g(null), Te = () => Qe(!ye), Ge = M.object().shape({
|
|
33
|
+
name: M.string().required("Enter Name"),
|
|
34
|
+
eventType: M.string().required("Select Event Type"),
|
|
35
|
+
recursionInterval: M.number().typeError("Recursion Interval must be a number").when([], {
|
|
36
|
+
is: () => y === "RECURSION",
|
|
37
|
+
then: (e) => e.required("Recursion Interval is required").moreThan(0, "Recursion Interval must be greater than or equal to 1").lessThan(1441, "Recursion Interval must be less than or equal to 1440"),
|
|
38
|
+
otherwise: (e) => e.notRequired()
|
|
39
|
+
}),
|
|
40
|
+
trigerWhen: M.string().test(
|
|
41
|
+
"is-required",
|
|
42
|
+
"trigerWhen is required",
|
|
43
|
+
function(e) {
|
|
44
|
+
return y === "TIMMER_BASED" ? !!e : !0;
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
day: M.string().test("is-required", "day is required", function(e) {
|
|
48
|
+
return y === "TIMMER_BASED" && (T === "AFTER" || T === "MONTHLY") ? !!e : !0;
|
|
49
|
+
}),
|
|
50
|
+
hour: M.string().test(
|
|
51
|
+
"is-required",
|
|
52
|
+
"hour is required",
|
|
53
|
+
function(e) {
|
|
54
|
+
return y === "TIMMER_BASED" && (T === "AFTER" || T === "MONTHLY" || T === "DAILY") ? !!e : !0;
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
minute: M.string().notRequired()
|
|
58
|
+
}), {
|
|
59
|
+
control: x,
|
|
60
|
+
handleSubmit: Xe,
|
|
61
|
+
setValue: ie,
|
|
62
|
+
watch: xe,
|
|
63
|
+
formState: { errors: E, isSubmitting: Ze }
|
|
64
|
+
} = wt({
|
|
65
|
+
defaultValues: {
|
|
66
|
+
name: "",
|
|
67
|
+
description: "",
|
|
68
|
+
eventType: "",
|
|
69
|
+
recursionInterval: 0,
|
|
70
|
+
minute: 0
|
|
71
|
+
},
|
|
72
|
+
resolver: qt(Ge),
|
|
73
|
+
mode: "onChange"
|
|
74
|
+
}), y = xe("eventType");
|
|
75
|
+
let T = xe("trigerWhen");
|
|
76
|
+
Ae(() => {
|
|
77
|
+
let e = de.current;
|
|
78
|
+
return () => {
|
|
79
|
+
ae("conversion_event", {
|
|
80
|
+
form: e,
|
|
81
|
+
form_name: "Manage Event Configuration",
|
|
82
|
+
submit: ce.current
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
}, []);
|
|
86
|
+
const et = async (e) => {
|
|
87
|
+
try {
|
|
88
|
+
if (u.length > 0) {
|
|
89
|
+
if (u.some(
|
|
90
|
+
(o) => !o.query
|
|
91
|
+
)) {
|
|
92
|
+
const o = {};
|
|
93
|
+
u.forEach((c, f) => {
|
|
94
|
+
c.query || (o[f] = "Query Required");
|
|
95
|
+
}), j(o), L({
|
|
96
|
+
message: "Every configuration needs a query before you can save.",
|
|
97
|
+
type: "warn"
|
|
98
|
+
});
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
e.minute = Number(e.minute || 0), e.notificationConfigDetails = u;
|
|
102
|
+
const a = y === "TIMMER_BASED", d = y === "FORM_SUBMITTED", p = y === "MANUAL", r = y === "RECURSION";
|
|
103
|
+
a || (delete e.trigerWhen, delete e.day, delete e.hour, delete e.minute), d || delete e.formTypeId, !d && !p && (delete e.eventTypeDetailCode, delete e.eventTypeDetailId), r ? (delete e.formTypeId, e.trigerWhen = "RECURSION") : delete e.recursionInterval;
|
|
104
|
+
const m = ["AFTER", "MONTHLY", "WEEKLY"], b = ["AFTER", "MONTHLY", "DAILY", "WEEKLY"];
|
|
105
|
+
m.includes(T) || delete e.day, b.includes(T) || (delete e.day, delete e.hour), T === "IMMEDIATELY" && (delete e.day, delete e.hour, delete e.minute);
|
|
106
|
+
const s = u.map((o) => {
|
|
107
|
+
var c;
|
|
108
|
+
return {
|
|
109
|
+
...o,
|
|
110
|
+
conditions: (c = o.conditions) == null ? void 0 : c.map((f) => ({
|
|
111
|
+
...f,
|
|
112
|
+
notificaitonConfigsType: f.notificaitonConfigsType ? f.notificaitonConfigsType.map((O) => ({
|
|
113
|
+
...O,
|
|
114
|
+
queryCode: O.queryCode === "" ? null : O.queryCode
|
|
115
|
+
})) : f.notificaitonConfigsType
|
|
116
|
+
}))
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
e.notificationConfigDetails = s, A ? await Et(e) : await It(e), ae("button_click", {
|
|
120
|
+
button_name: "manageeventconfiguration-save-button",
|
|
121
|
+
button_type: "submit",
|
|
122
|
+
button_id: "manageeventconfiguration-save-button"
|
|
123
|
+
}), L({
|
|
124
|
+
message: A ? "Event updated successfully" : "Event created successfully",
|
|
125
|
+
type: "success"
|
|
126
|
+
}), ce.current = !0, ue("/ui/medplat/notification/all");
|
|
127
|
+
} else
|
|
128
|
+
L({
|
|
129
|
+
message: "Add at least one configuration before saving.",
|
|
130
|
+
type: "warn"
|
|
131
|
+
});
|
|
132
|
+
} catch {
|
|
133
|
+
L({
|
|
134
|
+
message: "Could not save this event. Please try again.",
|
|
135
|
+
type: "error"
|
|
136
|
+
}), B((n) => !n);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
Ae(() => {
|
|
140
|
+
tt();
|
|
141
|
+
}, []);
|
|
142
|
+
const tt = async () => {
|
|
143
|
+
var e, n, a, d;
|
|
144
|
+
try {
|
|
145
|
+
B((o) => !o);
|
|
146
|
+
const p = await Ct({ is_active: !0 });
|
|
147
|
+
ke(p == null ? void 0 : p.data);
|
|
148
|
+
const r = await Tt();
|
|
149
|
+
We(r == null ? void 0 : r.data);
|
|
150
|
+
const m = await Rt(!0);
|
|
151
|
+
let b = {};
|
|
152
|
+
(e = m == null ? void 0 : m.data) == null || e.forEach((o) => {
|
|
153
|
+
b[o == null ? void 0 : o.id] = o == null ? void 0 : o.notificationName;
|
|
154
|
+
}), $e(b);
|
|
155
|
+
const { data: s } = await Mt();
|
|
156
|
+
if (Je(s || []), A) {
|
|
157
|
+
const o = await xt(A);
|
|
158
|
+
(a = (n = o == null ? void 0 : o.data) == null ? void 0 : n.notificationConfigDetails) == null || a.forEach((f) => {
|
|
159
|
+
Ee(f);
|
|
160
|
+
});
|
|
161
|
+
let c = o == null ? void 0 : o.data;
|
|
162
|
+
(d = Object.keys(c)) == null || d.forEach((f) => {
|
|
163
|
+
c[f] !== void 0 && c[f] !== null && ie(f, c[f]);
|
|
164
|
+
}), I((c == null ? void 0 : c.notificationConfigDetails) || []);
|
|
165
|
+
}
|
|
166
|
+
B((o) => !o);
|
|
167
|
+
} catch (p) {
|
|
168
|
+
L({
|
|
169
|
+
message: "Could not load this event. Please try again.",
|
|
170
|
+
type: `Error:${p == null ? void 0 : p.message}`
|
|
171
|
+
}), B((r) => !r);
|
|
172
|
+
}
|
|
173
|
+
}, Ee = (e) => {
|
|
174
|
+
e.implicitParam = ["#resourceId#"];
|
|
175
|
+
const n = [
|
|
176
|
+
"from",
|
|
177
|
+
"where",
|
|
178
|
+
"group",
|
|
179
|
+
"having",
|
|
180
|
+
"order",
|
|
181
|
+
"limit",
|
|
182
|
+
"offset",
|
|
183
|
+
"union",
|
|
184
|
+
"intersect",
|
|
185
|
+
"except",
|
|
186
|
+
"window",
|
|
187
|
+
"fetch",
|
|
188
|
+
"into",
|
|
189
|
+
"returning"
|
|
190
|
+
];
|
|
191
|
+
if (e != null && e.query) {
|
|
192
|
+
let a = "", d = null;
|
|
193
|
+
for (let s = 0; s < e.query.length; s++) {
|
|
194
|
+
const o = e.query[s], c = e.query[s + 1];
|
|
195
|
+
if (d)
|
|
196
|
+
a += o, o === d && (d = null);
|
|
197
|
+
else if (o === "'" || o === '"')
|
|
198
|
+
d = o, a += o;
|
|
199
|
+
else if (o === "-" && c === "-") {
|
|
200
|
+
for (; s < e.query.length && e.query[s] !== `
|
|
201
|
+
`; )
|
|
202
|
+
s++;
|
|
203
|
+
a += `
|
|
204
|
+
`;
|
|
205
|
+
} else if (o === "/" && c === "*") {
|
|
206
|
+
for (s += 2; s < e.query.length && !(e.query[s] === "*" && e.query[s + 1] === "/"); )
|
|
207
|
+
s++;
|
|
208
|
+
s++, a += " ";
|
|
209
|
+
} else
|
|
210
|
+
a += o;
|
|
211
|
+
}
|
|
212
|
+
let p = 0;
|
|
213
|
+
d = null;
|
|
214
|
+
let r = -1, m = -1;
|
|
215
|
+
const b = [];
|
|
216
|
+
for (let s = 0; s < a.length; s++) {
|
|
217
|
+
const o = a[s];
|
|
218
|
+
if (d)
|
|
219
|
+
o === d && (d = null);
|
|
220
|
+
else if (o === "'" || o === '"')
|
|
221
|
+
d = o;
|
|
222
|
+
else if (o === "(")
|
|
223
|
+
p++;
|
|
224
|
+
else if (o === ")")
|
|
225
|
+
p--;
|
|
226
|
+
else if (p === 0) {
|
|
227
|
+
if (o === ";" && r >= 0) {
|
|
228
|
+
m = s;
|
|
229
|
+
break;
|
|
230
|
+
} else if (o === "," && r >= 0)
|
|
231
|
+
b.push(s);
|
|
232
|
+
else if (/[a-z_]/i.test(o) && !/[\w.]/.test(a[s - 1] || "")) {
|
|
233
|
+
const c = (a.slice(s).match(/^[a-z_]+/i) || [""])[0];
|
|
234
|
+
if (r < 0)
|
|
235
|
+
c.toLowerCase() === "select" && (r = s + c.length), s += c.length - 1;
|
|
236
|
+
else if (n.includes(c.toLowerCase())) {
|
|
237
|
+
m = s;
|
|
238
|
+
break;
|
|
239
|
+
} else
|
|
240
|
+
s += c.length - 1;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (r >= 0) {
|
|
245
|
+
m < 0 && (m = a.length);
|
|
246
|
+
const s = [];
|
|
247
|
+
let o = r;
|
|
248
|
+
b.filter((c) => c < m).forEach((c) => {
|
|
249
|
+
s.push(a.substring(o, c)), o = c + 1;
|
|
250
|
+
}), s.push(a.substring(o, m)), s.forEach((c) => {
|
|
251
|
+
const f = c.replace(/^\s*(distinct\s+on\s*\([\s\S]*?\)|distinct|all)\s+/i, "").trim();
|
|
252
|
+
if (f && f !== "*" && !f.endsWith(".*")) {
|
|
253
|
+
let O = 0, Q = null, oe = -1;
|
|
254
|
+
for (let $ = 0; $ < f.length; $++) {
|
|
255
|
+
const z = f[$];
|
|
256
|
+
Q ? z === Q && (Q = null) : z === "'" || z === '"' ? Q = z : z === "(" ? O++ : z === ")" ? O-- : O === 0 && /\s/.test(z) && /^as\s/i.test(f.substring($ + 1)) && (oe = $ + 1);
|
|
257
|
+
}
|
|
258
|
+
const Se = (oe >= 0 ? f.substring(oe + 3).trim() : f.replace(/\s+/g, " ").trim()).replace(/^"|"$/g, "");
|
|
259
|
+
/^[a-z_][\w$]*(\.[a-z_][\w$]*)*$/i.test(Se) && e.implicitParam.push("#" + Se + "#");
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}, nt = (e) => {
|
|
265
|
+
const n = u == null ? void 0 : u.filter(
|
|
266
|
+
(a, d) => d !== e
|
|
267
|
+
);
|
|
268
|
+
I(n), j({}), te({});
|
|
269
|
+
}, it = (e, n) => {
|
|
270
|
+
const a = [...u], d = a[e].conditions.filter((p, r) => r !== n);
|
|
271
|
+
a[e].conditions = d, I(a);
|
|
272
|
+
}, Ie = async (e, n, a, d) => {
|
|
273
|
+
Pe(e), Le(n), a ? (ge(a), he(!0), k(JSON.parse(JSON.stringify(a))), w((a == null ? void 0 : a.notificaitonConfigsType) || []), Ue(d)) : (ge({}), k({}), w([]), he(!1)), S({}), Te();
|
|
274
|
+
}, at = (e, n) => {
|
|
275
|
+
const a = [...u];
|
|
276
|
+
a[e].query = n, I(a), j((d) => {
|
|
277
|
+
const p = { ...d };
|
|
278
|
+
return n ? delete p[e] : p[e] = "Query Required", p;
|
|
279
|
+
});
|
|
280
|
+
}, ot = kt((e) => {
|
|
281
|
+
I((n) => {
|
|
282
|
+
const a = [...n];
|
|
283
|
+
return a[e] && Ee(a[e]), a;
|
|
284
|
+
});
|
|
285
|
+
}, 400), Re = async () => {
|
|
286
|
+
const e = {};
|
|
287
|
+
if (u.forEach((n, a) => {
|
|
288
|
+
n.query || (e[a] = "Query Required");
|
|
289
|
+
}), Object.keys(e).length > 0) {
|
|
290
|
+
j(e);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
I([
|
|
294
|
+
...u,
|
|
295
|
+
{ query: "", conditions: [], queryParam: null }
|
|
296
|
+
]), te({});
|
|
297
|
+
}, Me = async (e, n) => {
|
|
298
|
+
e ? (e.index = n, He(e), S({
|
|
299
|
+
...JSON.parse(JSON.stringify(e)),
|
|
300
|
+
implicitParam: X.implicitParam
|
|
301
|
+
}), be(!0)) : (S({ ...N, implicitParam: X.implicitParam }), be(!1)), rt();
|
|
302
|
+
}, rt = () => {
|
|
303
|
+
Z((e) => !e);
|
|
304
|
+
}, De = (e) => {
|
|
305
|
+
if (ve) {
|
|
306
|
+
const n = U.map((a, d) => d === e.index ? { ...a, ...e } : a);
|
|
307
|
+
w(n);
|
|
308
|
+
} else
|
|
309
|
+
w([...U, e]);
|
|
310
|
+
dt(e);
|
|
311
|
+
}, st = (e) => {
|
|
312
|
+
w(
|
|
313
|
+
(n) => n.filter((a, d) => d !== e)
|
|
314
|
+
);
|
|
315
|
+
}, lt = (e) => {
|
|
316
|
+
Me(U[e], e);
|
|
317
|
+
}, dt = (e) => {
|
|
318
|
+
let n = { ...q };
|
|
319
|
+
q.notificaitonConfigsType || (n.notificaitonConfigsType = []), ve ? n.notificaitonConfigsType[je.index] = e : n.notificaitonConfigsType.push(e), k(n), S({});
|
|
320
|
+
}, ae = _t(), ct = (e) => {
|
|
321
|
+
if (Be) {
|
|
322
|
+
const n = [...u];
|
|
323
|
+
k({ ...q, ...e });
|
|
324
|
+
let a = { ...q, ...e };
|
|
325
|
+
n[pe].conditions[Ye] = a, I(n), w([]);
|
|
326
|
+
} else {
|
|
327
|
+
const n = [...u];
|
|
328
|
+
k({ ...q, ...e });
|
|
329
|
+
let a = { ...q, ...e };
|
|
330
|
+
n[pe].conditions.push(a), I(n), w([]);
|
|
331
|
+
}
|
|
332
|
+
}, ut = (e) => {
|
|
333
|
+
S({ ...N, ...e });
|
|
334
|
+
}, mt = J(
|
|
335
|
+
() => Wt.map((e) => ({
|
|
336
|
+
value: e.value,
|
|
337
|
+
label: i(e.label)
|
|
338
|
+
})),
|
|
339
|
+
[i]
|
|
340
|
+
), ft = J(
|
|
341
|
+
() => $t.map((e) => ({
|
|
342
|
+
value: e.value,
|
|
343
|
+
label: i(e.label)
|
|
344
|
+
})),
|
|
345
|
+
[i]
|
|
346
|
+
), pt = J(
|
|
347
|
+
() => (_ || []).map((e) => ({ value: e.id, label: e.name })),
|
|
348
|
+
[_]
|
|
349
|
+
), gt = J(
|
|
350
|
+
() => Object.entries(me || {}).map(([e, n]) => ({ value: e, label: n })),
|
|
351
|
+
[me]
|
|
352
|
+
), ht = y === "TIMMER_BASED" && ["AFTER", "MONTHLY", "WEEKLY"].includes(T), yt = y === "TIMMER_BASED" && ["AFTER", "MONTHLY", "DAILY", "WEEKLY"].includes(T), vt = y === "TIMMER_BASED" && T && T !== "IMMEDIATELY";
|
|
353
|
+
return /* @__PURE__ */ l(bt, { children: [
|
|
354
|
+
/* @__PURE__ */ t(
|
|
355
|
+
h,
|
|
356
|
+
{
|
|
357
|
+
component: "form",
|
|
358
|
+
ref: de,
|
|
359
|
+
onSubmit: Xe(et),
|
|
360
|
+
"data-testid": "manageeventconfiguration-form",
|
|
361
|
+
sx: { display: "block", pb: 2 },
|
|
362
|
+
children: /* @__PURE__ */ l(Lt, { isLoading: Ve, children: [
|
|
363
|
+
/* @__PURE__ */ t(
|
|
364
|
+
re,
|
|
365
|
+
{
|
|
366
|
+
elevation: 0,
|
|
367
|
+
sx: {
|
|
368
|
+
p: { xs: 2.5, md: 3 },
|
|
369
|
+
mt: 2,
|
|
370
|
+
mb: 3,
|
|
371
|
+
border: "1px solid",
|
|
372
|
+
borderColor: "divider",
|
|
373
|
+
borderRadius: (e) => `${e.shape.cardRadius}px`,
|
|
374
|
+
backgroundColor: "background.paper"
|
|
375
|
+
},
|
|
376
|
+
children: /* @__PURE__ */ l(h, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: [
|
|
377
|
+
/* @__PURE__ */ t(
|
|
378
|
+
h,
|
|
379
|
+
{
|
|
380
|
+
sx: {
|
|
381
|
+
display: "flex",
|
|
382
|
+
justifyContent: "space-between",
|
|
383
|
+
alignItems: "flex-start",
|
|
384
|
+
flexWrap: "wrap",
|
|
385
|
+
gap: 2
|
|
386
|
+
},
|
|
387
|
+
"data-testid": "manageeventconfiguration-cardheader-subheader",
|
|
388
|
+
children: /* @__PURE__ */ l(h, { sx: { minWidth: { xs: "100%", lg: "50%" } }, children: [
|
|
389
|
+
/* @__PURE__ */ t(
|
|
390
|
+
R,
|
|
391
|
+
{
|
|
392
|
+
variant: "h5",
|
|
393
|
+
component: "h1",
|
|
394
|
+
sx: { fontWeight: 800, color: "text.primary", mb: 0.5 },
|
|
395
|
+
children: i(A ? "Update event" : "New event")
|
|
396
|
+
}
|
|
397
|
+
),
|
|
398
|
+
/* @__PURE__ */ t(R, { variant: "body2", color: "text.secondary", children: i(
|
|
399
|
+
"Name the event, choose what triggers it, then add the queries and conditions that decide what happens."
|
|
400
|
+
) })
|
|
401
|
+
] })
|
|
402
|
+
}
|
|
403
|
+
),
|
|
404
|
+
/* @__PURE__ */ l(h, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
405
|
+
/* @__PURE__ */ t(se, { children: i("Event details") }),
|
|
406
|
+
/* @__PURE__ */ l(v, { container: !0, spacing: 2, alignItems: "flex-start", children: [
|
|
407
|
+
/* @__PURE__ */ l(
|
|
408
|
+
v,
|
|
409
|
+
{
|
|
410
|
+
size: { xs: 12, md: 6 },
|
|
411
|
+
"data-testid": "manageeventconfiguration-name-field",
|
|
412
|
+
children: [
|
|
413
|
+
/* @__PURE__ */ t(C, { required: !0, children: i("Name") }),
|
|
414
|
+
/* @__PURE__ */ t(
|
|
415
|
+
P,
|
|
416
|
+
{
|
|
417
|
+
control: x,
|
|
418
|
+
id: "name",
|
|
419
|
+
name: "name",
|
|
420
|
+
errors: E,
|
|
421
|
+
label: "",
|
|
422
|
+
size: "small",
|
|
423
|
+
dataTestId: "manageeventconfiguration-name-textfield"
|
|
424
|
+
}
|
|
425
|
+
)
|
|
426
|
+
]
|
|
427
|
+
}
|
|
428
|
+
),
|
|
429
|
+
/* @__PURE__ */ l(
|
|
430
|
+
v,
|
|
431
|
+
{
|
|
432
|
+
size: { xs: 12, md: 6 },
|
|
433
|
+
"data-testid": "manageeventconfiguration-description-field",
|
|
434
|
+
children: [
|
|
435
|
+
/* @__PURE__ */ t(C, { children: i("Description") }),
|
|
436
|
+
/* @__PURE__ */ t(
|
|
437
|
+
Dt,
|
|
438
|
+
{
|
|
439
|
+
control: x,
|
|
440
|
+
id: "description",
|
|
441
|
+
name: "description",
|
|
442
|
+
errors: E,
|
|
443
|
+
label: "",
|
|
444
|
+
minRows: 2,
|
|
445
|
+
"data-testid": "manageeventconfiguration-description-textarea"
|
|
446
|
+
}
|
|
447
|
+
),
|
|
448
|
+
/* @__PURE__ */ t(G, { children: i("What this event is for, in one line") })
|
|
449
|
+
]
|
|
450
|
+
}
|
|
451
|
+
)
|
|
452
|
+
] })
|
|
453
|
+
] }),
|
|
454
|
+
/* @__PURE__ */ t(we, {}),
|
|
455
|
+
/* @__PURE__ */ l(h, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
456
|
+
/* @__PURE__ */ t(
|
|
457
|
+
se,
|
|
458
|
+
{
|
|
459
|
+
hint: i("What makes this event run"),
|
|
460
|
+
children: i("Trigger")
|
|
461
|
+
}
|
|
462
|
+
),
|
|
463
|
+
/* @__PURE__ */ l(v, { container: !0, spacing: 2, alignItems: "flex-start", children: [
|
|
464
|
+
/* @__PURE__ */ l(
|
|
465
|
+
v,
|
|
466
|
+
{
|
|
467
|
+
size: { xs: 12, md: 6 },
|
|
468
|
+
"data-testid": "manageeventconfiguration-eventtype-field",
|
|
469
|
+
children: [
|
|
470
|
+
/* @__PURE__ */ t(C, { required: !0, children: i("Event Type") }),
|
|
471
|
+
/* @__PURE__ */ t(
|
|
472
|
+
F,
|
|
473
|
+
{
|
|
474
|
+
control: x,
|
|
475
|
+
name: "eventType",
|
|
476
|
+
options: mt,
|
|
477
|
+
displayName: "label",
|
|
478
|
+
optionValue: "value",
|
|
479
|
+
errors: E,
|
|
480
|
+
dataTestId: "manageeventconfiguration-eventtype-select"
|
|
481
|
+
}
|
|
482
|
+
)
|
|
483
|
+
]
|
|
484
|
+
}
|
|
485
|
+
),
|
|
486
|
+
y === "FORM_SUBMITTED" && /* @__PURE__ */ l(
|
|
487
|
+
v,
|
|
488
|
+
{
|
|
489
|
+
size: { xs: 12, md: 6 },
|
|
490
|
+
"data-testid": "manageeventconfiguration-formtype-field",
|
|
491
|
+
children: [
|
|
492
|
+
/* @__PURE__ */ t(C, { children: i("Form Type") }),
|
|
493
|
+
/* @__PURE__ */ t(
|
|
494
|
+
F,
|
|
495
|
+
{
|
|
496
|
+
control: x,
|
|
497
|
+
name: "formTypeId",
|
|
498
|
+
options: pt,
|
|
499
|
+
displayName: "label",
|
|
500
|
+
optionValue: "value",
|
|
501
|
+
errors: E,
|
|
502
|
+
isSortedOptions: !0,
|
|
503
|
+
onChange: (e) => {
|
|
504
|
+
const n = _ == null ? void 0 : _.find(
|
|
505
|
+
(a) => {
|
|
506
|
+
var d;
|
|
507
|
+
return a.id === ((d = e == null ? void 0 : e.target) == null ? void 0 : d.value);
|
|
508
|
+
}
|
|
509
|
+
);
|
|
510
|
+
ie("eventTypeDetailCode", n == null ? void 0 : n.code), ie(
|
|
511
|
+
"eventTypeDetailId",
|
|
512
|
+
(n == null ? void 0 : n.detaiId) || null
|
|
513
|
+
);
|
|
514
|
+
},
|
|
515
|
+
dataTestId: "manageeventconfiguration-formtype-select"
|
|
516
|
+
}
|
|
517
|
+
)
|
|
518
|
+
]
|
|
519
|
+
}
|
|
520
|
+
),
|
|
521
|
+
y === "TIMMER_BASED" && /* @__PURE__ */ l(
|
|
522
|
+
v,
|
|
523
|
+
{
|
|
524
|
+
size: { xs: 12, md: 6 },
|
|
525
|
+
"data-testid": "manageeventconfiguration-triggerwhen-field",
|
|
526
|
+
children: [
|
|
527
|
+
/* @__PURE__ */ t(C, { required: !0, children: i("Trigger When") }),
|
|
528
|
+
/* @__PURE__ */ t(
|
|
529
|
+
F,
|
|
530
|
+
{
|
|
531
|
+
control: x,
|
|
532
|
+
name: "trigerWhen",
|
|
533
|
+
options: ft,
|
|
534
|
+
displayName: "label",
|
|
535
|
+
optionValue: "value",
|
|
536
|
+
errors: E,
|
|
537
|
+
dataTestId: "manageeventconfiguration-triggerwhen-select"
|
|
538
|
+
}
|
|
539
|
+
)
|
|
540
|
+
]
|
|
541
|
+
}
|
|
542
|
+
),
|
|
543
|
+
ht && /* @__PURE__ */ l(
|
|
544
|
+
v,
|
|
545
|
+
{
|
|
546
|
+
size: { xs: 12, md: 6 },
|
|
547
|
+
"data-testid": "manageeventconfiguration-day-field",
|
|
548
|
+
children: [
|
|
549
|
+
/* @__PURE__ */ t(C, { required: !0, children: i("Day") }),
|
|
550
|
+
/* @__PURE__ */ t(
|
|
551
|
+
P,
|
|
552
|
+
{
|
|
553
|
+
control: x,
|
|
554
|
+
id: "day",
|
|
555
|
+
name: "day",
|
|
556
|
+
errors: E,
|
|
557
|
+
type: "number",
|
|
558
|
+
label: "",
|
|
559
|
+
size: "small",
|
|
560
|
+
dataTestId: "manageeventconfiguration-day-textfield"
|
|
561
|
+
}
|
|
562
|
+
)
|
|
563
|
+
]
|
|
564
|
+
}
|
|
565
|
+
),
|
|
566
|
+
yt && /* @__PURE__ */ l(
|
|
567
|
+
v,
|
|
568
|
+
{
|
|
569
|
+
size: { xs: 12, md: 6 },
|
|
570
|
+
"data-testid": "manageeventconfiguration-hour-field",
|
|
571
|
+
children: [
|
|
572
|
+
/* @__PURE__ */ t(C, { required: !0, children: i("Hour") }),
|
|
573
|
+
/* @__PURE__ */ t(
|
|
574
|
+
P,
|
|
575
|
+
{
|
|
576
|
+
control: x,
|
|
577
|
+
id: "hour",
|
|
578
|
+
name: "hour",
|
|
579
|
+
type: "number",
|
|
580
|
+
errors: E,
|
|
581
|
+
label: "",
|
|
582
|
+
size: "small",
|
|
583
|
+
dataTestId: "manageeventconfiguration-hour-textfield"
|
|
584
|
+
}
|
|
585
|
+
)
|
|
586
|
+
]
|
|
587
|
+
}
|
|
588
|
+
),
|
|
589
|
+
vt && /* @__PURE__ */ l(
|
|
590
|
+
v,
|
|
591
|
+
{
|
|
592
|
+
size: { xs: 12, md: 6 },
|
|
593
|
+
"data-testid": "manageeventconfiguration-minute-field",
|
|
594
|
+
children: [
|
|
595
|
+
/* @__PURE__ */ t(C, { children: i("Minute") }),
|
|
596
|
+
/* @__PURE__ */ t(
|
|
597
|
+
P,
|
|
598
|
+
{
|
|
599
|
+
control: x,
|
|
600
|
+
id: "minute",
|
|
601
|
+
name: "minute",
|
|
602
|
+
errors: E,
|
|
603
|
+
type: "number",
|
|
604
|
+
label: "",
|
|
605
|
+
size: "small",
|
|
606
|
+
dataTestId: "manageeventconfiguration-minute-textfield"
|
|
607
|
+
}
|
|
608
|
+
)
|
|
609
|
+
]
|
|
610
|
+
}
|
|
611
|
+
),
|
|
612
|
+
y === "RECURSION" && /* @__PURE__ */ l(v, { size: { xs: 12, md: 6 }, children: [
|
|
613
|
+
/* @__PURE__ */ t(C, { required: !0, children: i("Recursion Interval (in Minutes)") }),
|
|
614
|
+
/* @__PURE__ */ t(
|
|
615
|
+
P,
|
|
616
|
+
{
|
|
617
|
+
type: "number",
|
|
618
|
+
control: x,
|
|
619
|
+
id: "recursionInterval",
|
|
620
|
+
name: "recursionInterval",
|
|
621
|
+
errors: E,
|
|
622
|
+
label: "",
|
|
623
|
+
size: "small",
|
|
624
|
+
dataTestId: "manageeventconfiguration-recursionInterval-textfield"
|
|
625
|
+
}
|
|
626
|
+
),
|
|
627
|
+
/* @__PURE__ */ t(G, { children: i("Between 1 and 1440 minutes") })
|
|
628
|
+
] }),
|
|
629
|
+
(y === "TIMMER_BASED" || y === "RECURSION") && /* @__PURE__ */ l(v, { size: { xs: 12, md: 6 }, children: [
|
|
630
|
+
/* @__PURE__ */ t(C, { children: i("Reports") }),
|
|
631
|
+
/* @__PURE__ */ t(
|
|
632
|
+
F,
|
|
633
|
+
{
|
|
634
|
+
id: "reportUUID",
|
|
635
|
+
name: "reportUUID",
|
|
636
|
+
displayName: "name",
|
|
637
|
+
optionValue: "uuid",
|
|
638
|
+
multiple: !0,
|
|
639
|
+
control: x,
|
|
640
|
+
options: Ke,
|
|
641
|
+
errors: E
|
|
642
|
+
}
|
|
643
|
+
),
|
|
644
|
+
/* @__PURE__ */ t(G, { children: i("Reports refreshed after each run") })
|
|
645
|
+
] }),
|
|
646
|
+
y === "MANUAL" && /* @__PURE__ */ l(
|
|
647
|
+
v,
|
|
648
|
+
{
|
|
649
|
+
size: { xs: 12, md: 6 },
|
|
650
|
+
"data-testid": "manageeventconfiguration-event-field",
|
|
651
|
+
children: [
|
|
652
|
+
/* @__PURE__ */ t(C, { children: i("Event") }),
|
|
653
|
+
/* @__PURE__ */ t(
|
|
654
|
+
F,
|
|
655
|
+
{
|
|
656
|
+
control: x,
|
|
657
|
+
name: "eventTypeDetailCode",
|
|
658
|
+
options: gt,
|
|
659
|
+
displayName: "label",
|
|
660
|
+
optionValue: "value",
|
|
661
|
+
errors: E,
|
|
662
|
+
dataTestId: "manageeventconfiguration-eventtype-detail-select"
|
|
663
|
+
}
|
|
664
|
+
)
|
|
665
|
+
]
|
|
666
|
+
}
|
|
667
|
+
)
|
|
668
|
+
] })
|
|
669
|
+
] }),
|
|
670
|
+
/* @__PURE__ */ t(we, {}),
|
|
671
|
+
/* @__PURE__ */ l(h, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
672
|
+
/* @__PURE__ */ l(
|
|
673
|
+
h,
|
|
674
|
+
{
|
|
675
|
+
sx: {
|
|
676
|
+
display: "flex",
|
|
677
|
+
justifyContent: "space-between",
|
|
678
|
+
alignItems: "flex-start",
|
|
679
|
+
flexWrap: "wrap",
|
|
680
|
+
gap: 2
|
|
681
|
+
},
|
|
682
|
+
children: [
|
|
683
|
+
/* @__PURE__ */ t(
|
|
684
|
+
se,
|
|
685
|
+
{
|
|
686
|
+
hint: i(
|
|
687
|
+
"Each configuration runs a query, then acts on the rows it returns."
|
|
688
|
+
),
|
|
689
|
+
children: i("Configurations")
|
|
690
|
+
}
|
|
691
|
+
),
|
|
692
|
+
/* @__PURE__ */ t(
|
|
693
|
+
Y,
|
|
694
|
+
{
|
|
695
|
+
size: "small",
|
|
696
|
+
variant: "outlined",
|
|
697
|
+
startIcon: /* @__PURE__ */ t(D, { iconName: "faPlus" }),
|
|
698
|
+
onClick: Re,
|
|
699
|
+
"data-testid": "manageeventconfiguration-add-button",
|
|
700
|
+
children: i("Add configuration")
|
|
701
|
+
}
|
|
702
|
+
)
|
|
703
|
+
]
|
|
704
|
+
}
|
|
705
|
+
),
|
|
706
|
+
/* @__PURE__ */ l(
|
|
707
|
+
h,
|
|
708
|
+
{
|
|
709
|
+
sx: { display: "flex", flexDirection: "column", gap: 2 },
|
|
710
|
+
"data-testid": "manageeventconfiguration-table-container",
|
|
711
|
+
children: [
|
|
712
|
+
(u == null ? void 0 : u.length) === 0 && /* @__PURE__ */ t(
|
|
713
|
+
Pt,
|
|
714
|
+
{
|
|
715
|
+
icon: "faDatabase",
|
|
716
|
+
title: i("No configurations yet"),
|
|
717
|
+
body: i(
|
|
718
|
+
"Add a configuration to write the query this event runs and the actions it triggers."
|
|
719
|
+
),
|
|
720
|
+
action: /* @__PURE__ */ t(
|
|
721
|
+
Y,
|
|
722
|
+
{
|
|
723
|
+
size: "small",
|
|
724
|
+
variant: "contained",
|
|
725
|
+
startIcon: /* @__PURE__ */ t(D, { iconName: "faPlus" }),
|
|
726
|
+
onClick: Re,
|
|
727
|
+
children: i("Add configuration")
|
|
728
|
+
}
|
|
729
|
+
),
|
|
730
|
+
dataTestId: "manageeventconfiguration-no-configurations"
|
|
731
|
+
}
|
|
732
|
+
),
|
|
733
|
+
u == null ? void 0 : u.map((e, n) => {
|
|
734
|
+
var a, d, p;
|
|
735
|
+
return /* @__PURE__ */ l(
|
|
736
|
+
re,
|
|
737
|
+
{
|
|
738
|
+
elevation: 0,
|
|
739
|
+
variant: "outlined",
|
|
740
|
+
sx: {
|
|
741
|
+
p: 2,
|
|
742
|
+
borderRadius: (r) => `${r.shape.cardRadius}px`,
|
|
743
|
+
display: "flex",
|
|
744
|
+
flexDirection: "column",
|
|
745
|
+
gap: 2
|
|
746
|
+
},
|
|
747
|
+
"data-testid": `manageeventconfiguration-table-row-${n}`,
|
|
748
|
+
children: [
|
|
749
|
+
/* @__PURE__ */ l(
|
|
750
|
+
h,
|
|
751
|
+
{
|
|
752
|
+
sx: {
|
|
753
|
+
display: "flex",
|
|
754
|
+
justifyContent: "space-between",
|
|
755
|
+
alignItems: "center",
|
|
756
|
+
gap: 2,
|
|
757
|
+
flexWrap: "wrap"
|
|
758
|
+
},
|
|
759
|
+
children: [
|
|
760
|
+
/* @__PURE__ */ l(
|
|
761
|
+
h,
|
|
762
|
+
{
|
|
763
|
+
sx: {
|
|
764
|
+
display: "flex",
|
|
765
|
+
alignItems: "center",
|
|
766
|
+
gap: 1,
|
|
767
|
+
flexWrap: "wrap"
|
|
768
|
+
},
|
|
769
|
+
children: [
|
|
770
|
+
/* @__PURE__ */ t(
|
|
771
|
+
V,
|
|
772
|
+
{
|
|
773
|
+
title: W[n] ? i("Expand") : i("Collapse"),
|
|
774
|
+
children: /* @__PURE__ */ t(
|
|
775
|
+
K,
|
|
776
|
+
{
|
|
777
|
+
size: "small",
|
|
778
|
+
onClick: () => te((r) => ({
|
|
779
|
+
...r,
|
|
780
|
+
[n]: !r[n]
|
|
781
|
+
})),
|
|
782
|
+
"aria-expanded": !W[n],
|
|
783
|
+
"aria-label": W[n] ? i("Expand") : i("Collapse"),
|
|
784
|
+
"data-testid": `manageeventconfiguration-table-row-${n}-collapse`,
|
|
785
|
+
children: /* @__PURE__ */ t(
|
|
786
|
+
D,
|
|
787
|
+
{
|
|
788
|
+
iconName: W[n] ? "faChevronRight" : "faChevronDown",
|
|
789
|
+
size: "sm"
|
|
790
|
+
}
|
|
791
|
+
)
|
|
792
|
+
}
|
|
793
|
+
)
|
|
794
|
+
}
|
|
795
|
+
),
|
|
796
|
+
/* @__PURE__ */ l(
|
|
797
|
+
R,
|
|
798
|
+
{
|
|
799
|
+
variant: "subtitle2",
|
|
800
|
+
sx: { fontWeight: 700 },
|
|
801
|
+
children: [
|
|
802
|
+
i("Configuration"),
|
|
803
|
+
" ",
|
|
804
|
+
n + 1
|
|
805
|
+
]
|
|
806
|
+
}
|
|
807
|
+
),
|
|
808
|
+
!(e != null && e.query) && /* @__PURE__ */ t(
|
|
809
|
+
Oe,
|
|
810
|
+
{
|
|
811
|
+
size: "small",
|
|
812
|
+
color: "warning",
|
|
813
|
+
variant: "outlined",
|
|
814
|
+
label: i("Query missing")
|
|
815
|
+
}
|
|
816
|
+
),
|
|
817
|
+
/* @__PURE__ */ l(R, { variant: "caption", color: "text.secondary", children: [
|
|
818
|
+
((a = e == null ? void 0 : e.conditions) == null ? void 0 : a.length) || 0,
|
|
819
|
+
" ",
|
|
820
|
+
i("conditions"),
|
|
821
|
+
" · ",
|
|
822
|
+
((e == null ? void 0 : e.conditions) || []).reduce(
|
|
823
|
+
(r, m) => {
|
|
824
|
+
var b;
|
|
825
|
+
return r + (((b = m == null ? void 0 : m.notificaitonConfigsType) == null ? void 0 : b.length) || 0);
|
|
826
|
+
},
|
|
827
|
+
0
|
|
828
|
+
),
|
|
829
|
+
" ",
|
|
830
|
+
i("actions")
|
|
831
|
+
] })
|
|
832
|
+
]
|
|
833
|
+
}
|
|
834
|
+
),
|
|
835
|
+
/* @__PURE__ */ t(
|
|
836
|
+
h,
|
|
837
|
+
{
|
|
838
|
+
"data-testid": `manageeventconfiguration-table-row-${n}-action`,
|
|
839
|
+
children: /* @__PURE__ */ t(V, { title: i("Delete configuration"), children: /* @__PURE__ */ t(
|
|
840
|
+
K,
|
|
841
|
+
{
|
|
842
|
+
size: "small",
|
|
843
|
+
color: "error",
|
|
844
|
+
onClick: () => ne(n),
|
|
845
|
+
"aria-label": i("Delete configuration"),
|
|
846
|
+
"data-testid": `manageeventconfiguration-table-row-${n}-action-delete`,
|
|
847
|
+
children: /* @__PURE__ */ t(D, { iconName: "faTrash" })
|
|
848
|
+
}
|
|
849
|
+
) })
|
|
850
|
+
}
|
|
851
|
+
)
|
|
852
|
+
]
|
|
853
|
+
}
|
|
854
|
+
),
|
|
855
|
+
/* @__PURE__ */ t(
|
|
856
|
+
St,
|
|
857
|
+
{
|
|
858
|
+
in: !W[n],
|
|
859
|
+
unmountOnExit: !1,
|
|
860
|
+
children: /* @__PURE__ */ l(v, { container: !0, spacing: 2, alignItems: "stretch", children: [
|
|
861
|
+
/* @__PURE__ */ l(
|
|
862
|
+
v,
|
|
863
|
+
{
|
|
864
|
+
size: { xs: 12, lg: 6.5 },
|
|
865
|
+
sx: { display: "flex", flexDirection: "column", gap: 1 },
|
|
866
|
+
"data-testid": `manageeventconfiguration-table-row-${n}-query`,
|
|
867
|
+
children: [
|
|
868
|
+
/* @__PURE__ */ t(C, { required: !0, children: /* @__PURE__ */ t("span", { "data-testid": "manageeventconfiguration-table-header-query", children: i("Query") }) }),
|
|
869
|
+
/* @__PURE__ */ t(
|
|
870
|
+
h,
|
|
871
|
+
{
|
|
872
|
+
sx: {
|
|
873
|
+
overflow: "hidden",
|
|
874
|
+
borderRadius: (r) => `${r.shape.borderRadius}px`,
|
|
875
|
+
border: "1px solid",
|
|
876
|
+
borderColor: ee[n] ? "error.main" : "divider"
|
|
877
|
+
},
|
|
878
|
+
"data-testid": `manageeventconfiguration-table-row-${n}-query-textarea`,
|
|
879
|
+
children: /* @__PURE__ */ t(
|
|
880
|
+
Nt,
|
|
881
|
+
{
|
|
882
|
+
height: "30vh",
|
|
883
|
+
autoFocus: !1,
|
|
884
|
+
defaultValue: e.query || "",
|
|
885
|
+
onChange: (r) => {
|
|
886
|
+
at(n, r), ot(n);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
)
|
|
890
|
+
}
|
|
891
|
+
),
|
|
892
|
+
ee[n] && /* @__PURE__ */ t(
|
|
893
|
+
R,
|
|
894
|
+
{
|
|
895
|
+
variant: "caption",
|
|
896
|
+
color: "error",
|
|
897
|
+
"data-testid": "custom-error-message",
|
|
898
|
+
children: i(ee[n])
|
|
899
|
+
}
|
|
900
|
+
),
|
|
901
|
+
/* @__PURE__ */ t(G, { children: i(
|
|
902
|
+
"Every column this query selects becomes a placeholder the conditions can use."
|
|
903
|
+
) }),
|
|
904
|
+
/* @__PURE__ */ t(
|
|
905
|
+
Ft,
|
|
906
|
+
{
|
|
907
|
+
params: e == null ? void 0 : e.implicitParam,
|
|
908
|
+
translate: i
|
|
909
|
+
}
|
|
910
|
+
)
|
|
911
|
+
]
|
|
912
|
+
}
|
|
913
|
+
),
|
|
914
|
+
/* @__PURE__ */ l(
|
|
915
|
+
v,
|
|
916
|
+
{
|
|
917
|
+
size: { xs: 12, lg: 5.5 },
|
|
918
|
+
sx: { display: "flex", flexDirection: "column", gap: 1 },
|
|
919
|
+
"data-testid": `manageeventconfiguration-table-row-${n}-condition`,
|
|
920
|
+
children: [
|
|
921
|
+
/* @__PURE__ */ l(
|
|
922
|
+
h,
|
|
923
|
+
{
|
|
924
|
+
sx: {
|
|
925
|
+
display: "flex",
|
|
926
|
+
justifyContent: "space-between",
|
|
927
|
+
alignItems: "center",
|
|
928
|
+
gap: 2
|
|
929
|
+
},
|
|
930
|
+
children: [
|
|
931
|
+
/* @__PURE__ */ t(C, { children: /* @__PURE__ */ t("span", { "data-testid": "manageeventconfiguration-table-header-condition", children: i("Condition") }) }),
|
|
932
|
+
/* @__PURE__ */ t(
|
|
933
|
+
Y,
|
|
934
|
+
{
|
|
935
|
+
size: "small",
|
|
936
|
+
variant: "text",
|
|
937
|
+
startIcon: /* @__PURE__ */ t(D, { iconName: "faPlus", size: "sm" }),
|
|
938
|
+
onClick: () => Ie(e, n),
|
|
939
|
+
"data-testid": ((d = e == null ? void 0 : e.conditions) == null ? void 0 : d.length) > 0 ? `manageeventconfiguration-table-row-${n}-condition-add` : `manageeventconfiguration-table-row-${n}-condition-add-empty`,
|
|
940
|
+
children: i("Add condition")
|
|
941
|
+
}
|
|
942
|
+
)
|
|
943
|
+
]
|
|
944
|
+
}
|
|
945
|
+
),
|
|
946
|
+
((p = e == null ? void 0 : e.conditions) == null ? void 0 : p.length) > 0 ? /* @__PURE__ */ t(
|
|
947
|
+
h,
|
|
948
|
+
{
|
|
949
|
+
sx: {
|
|
950
|
+
display: "flex",
|
|
951
|
+
flexDirection: "column",
|
|
952
|
+
flex: "1 1 auto",
|
|
953
|
+
maxHeight: "30vh",
|
|
954
|
+
overflowY: "auto",
|
|
955
|
+
border: "1px solid",
|
|
956
|
+
borderColor: "divider",
|
|
957
|
+
borderRadius: (r) => `${r.shape.borderRadius}px`
|
|
958
|
+
},
|
|
959
|
+
children: e.conditions.map((r, m) => {
|
|
960
|
+
var b;
|
|
961
|
+
return /* @__PURE__ */ l(
|
|
962
|
+
h,
|
|
963
|
+
{
|
|
964
|
+
sx: {
|
|
965
|
+
display: "flex",
|
|
966
|
+
alignItems: "center",
|
|
967
|
+
justifyContent: "space-between",
|
|
968
|
+
gap: 1,
|
|
969
|
+
px: 1.5,
|
|
970
|
+
py: 1,
|
|
971
|
+
borderTop: m === 0 ? "none" : "1px solid",
|
|
972
|
+
borderColor: "divider"
|
|
973
|
+
},
|
|
974
|
+
"data-testid": "manageeventconfiguration-condition-rows",
|
|
975
|
+
children: [
|
|
976
|
+
/* @__PURE__ */ l(h, { sx: { minWidth: 0 }, children: [
|
|
977
|
+
/* @__PURE__ */ t(
|
|
978
|
+
R,
|
|
979
|
+
{
|
|
980
|
+
variant: "body2",
|
|
981
|
+
sx: {
|
|
982
|
+
fontFamily: r != null && r.condition ? "monospace" : "inherit",
|
|
983
|
+
wordBreak: "break-word"
|
|
984
|
+
},
|
|
985
|
+
children: (r == null ? void 0 : r.condition) || i("Always runs")
|
|
986
|
+
}
|
|
987
|
+
),
|
|
988
|
+
((b = r == null ? void 0 : r.notificaitonConfigsType) == null ? void 0 : b.length) > 0 ? /* @__PURE__ */ t(
|
|
989
|
+
h,
|
|
990
|
+
{
|
|
991
|
+
sx: {
|
|
992
|
+
display: "flex",
|
|
993
|
+
flexWrap: "wrap",
|
|
994
|
+
gap: 0.5,
|
|
995
|
+
mt: 0.5
|
|
996
|
+
},
|
|
997
|
+
children: r.notificaitonConfigsType.map(
|
|
998
|
+
(s, o) => /* @__PURE__ */ t(
|
|
999
|
+
Oe,
|
|
1000
|
+
{
|
|
1001
|
+
size: "small",
|
|
1002
|
+
variant: "outlined",
|
|
1003
|
+
icon: /* @__PURE__ */ t(
|
|
1004
|
+
D,
|
|
1005
|
+
{
|
|
1006
|
+
iconName: Bt(s == null ? void 0 : s.type),
|
|
1007
|
+
size: "sm"
|
|
1008
|
+
}
|
|
1009
|
+
),
|
|
1010
|
+
label: i(
|
|
1011
|
+
Yt(Ut, s == null ? void 0 : s.type)
|
|
1012
|
+
)
|
|
1013
|
+
},
|
|
1014
|
+
o + 1
|
|
1015
|
+
)
|
|
1016
|
+
)
|
|
1017
|
+
}
|
|
1018
|
+
) : /* @__PURE__ */ t(
|
|
1019
|
+
R,
|
|
1020
|
+
{
|
|
1021
|
+
variant: "caption",
|
|
1022
|
+
color: "warning.main",
|
|
1023
|
+
children: i("No actions")
|
|
1024
|
+
}
|
|
1025
|
+
)
|
|
1026
|
+
] }),
|
|
1027
|
+
/* @__PURE__ */ l(h, { sx: { display: "flex", gap: 0.5, flexShrink: 0 }, children: [
|
|
1028
|
+
/* @__PURE__ */ t(V, { title: i("Edit condition"), children: /* @__PURE__ */ t(
|
|
1029
|
+
K,
|
|
1030
|
+
{
|
|
1031
|
+
size: "small",
|
|
1032
|
+
"aria-label": i("Edit condition"),
|
|
1033
|
+
onClick: () => Ie(
|
|
1034
|
+
e,
|
|
1035
|
+
n,
|
|
1036
|
+
r,
|
|
1037
|
+
m
|
|
1038
|
+
),
|
|
1039
|
+
"data-testid": `manageeventconfiguration-table-row-${n}-condition-edit-${m}`,
|
|
1040
|
+
children: /* @__PURE__ */ t(D, { iconName: "faPen", size: "sm" })
|
|
1041
|
+
}
|
|
1042
|
+
) }),
|
|
1043
|
+
/* @__PURE__ */ t(V, { title: i("Delete condition"), children: /* @__PURE__ */ t(
|
|
1044
|
+
K,
|
|
1045
|
+
{
|
|
1046
|
+
size: "small",
|
|
1047
|
+
color: "error",
|
|
1048
|
+
"aria-label": i("Delete condition"),
|
|
1049
|
+
onClick: () => it(n, m),
|
|
1050
|
+
"data-testid": `manageeventconfiguration-table-row-${n}-condition-delete-${m}`,
|
|
1051
|
+
children: /* @__PURE__ */ t(D, { iconName: "faTrash", size: "sm" })
|
|
1052
|
+
}
|
|
1053
|
+
) })
|
|
1054
|
+
] })
|
|
1055
|
+
]
|
|
1056
|
+
},
|
|
1057
|
+
m + 1
|
|
1058
|
+
);
|
|
1059
|
+
})
|
|
1060
|
+
}
|
|
1061
|
+
) : /* @__PURE__ */ t(
|
|
1062
|
+
h,
|
|
1063
|
+
{
|
|
1064
|
+
sx: {
|
|
1065
|
+
flex: "1 1 auto",
|
|
1066
|
+
display: "flex",
|
|
1067
|
+
alignItems: "center",
|
|
1068
|
+
justifyContent: "center",
|
|
1069
|
+
textAlign: "center",
|
|
1070
|
+
px: 2,
|
|
1071
|
+
py: 3,
|
|
1072
|
+
border: "1px dashed",
|
|
1073
|
+
borderColor: "divider",
|
|
1074
|
+
borderRadius: (r) => `${r.shape.borderRadius}px`
|
|
1075
|
+
},
|
|
1076
|
+
children: /* @__PURE__ */ t(R, { variant: "body2", color: "text.secondary", children: i(
|
|
1077
|
+
"No conditions yet. Without one, this configuration does nothing."
|
|
1078
|
+
) })
|
|
1079
|
+
}
|
|
1080
|
+
)
|
|
1081
|
+
]
|
|
1082
|
+
}
|
|
1083
|
+
)
|
|
1084
|
+
] })
|
|
1085
|
+
}
|
|
1086
|
+
)
|
|
1087
|
+
]
|
|
1088
|
+
},
|
|
1089
|
+
n + 1
|
|
1090
|
+
);
|
|
1091
|
+
})
|
|
1092
|
+
]
|
|
1093
|
+
}
|
|
1094
|
+
)
|
|
1095
|
+
] })
|
|
1096
|
+
] })
|
|
1097
|
+
}
|
|
1098
|
+
),
|
|
1099
|
+
/* @__PURE__ */ l(
|
|
1100
|
+
re,
|
|
1101
|
+
{
|
|
1102
|
+
elevation: 0,
|
|
1103
|
+
sx: {
|
|
1104
|
+
position: "sticky",
|
|
1105
|
+
bottom: 0,
|
|
1106
|
+
zIndex: 2,
|
|
1107
|
+
display: "flex",
|
|
1108
|
+
justifyContent: "flex-end",
|
|
1109
|
+
gap: 1.5,
|
|
1110
|
+
p: 2,
|
|
1111
|
+
border: "1px solid",
|
|
1112
|
+
borderColor: "divider",
|
|
1113
|
+
borderRadius: (e) => `${e.shape.cardRadius}px`,
|
|
1114
|
+
backgroundColor: "background.paper"
|
|
1115
|
+
},
|
|
1116
|
+
"data-testid": "manageeventconfiguration-cardactions",
|
|
1117
|
+
children: [
|
|
1118
|
+
/* @__PURE__ */ t(
|
|
1119
|
+
Y,
|
|
1120
|
+
{
|
|
1121
|
+
variant: "outlined",
|
|
1122
|
+
color: "inherit",
|
|
1123
|
+
type: "button",
|
|
1124
|
+
size: "small",
|
|
1125
|
+
onClick: () => {
|
|
1126
|
+
ae("button_click", {
|
|
1127
|
+
button_name: "manageeventconfiguration-back-button",
|
|
1128
|
+
button_type: "cancel",
|
|
1129
|
+
button_id: "manageeventconfiguration-back-button"
|
|
1130
|
+
}), ue("/ui/medplat/notification/all");
|
|
1131
|
+
},
|
|
1132
|
+
"data-testid": "manageeventconfiguration-back-button",
|
|
1133
|
+
children: i("Cancel")
|
|
1134
|
+
}
|
|
1135
|
+
),
|
|
1136
|
+
/* @__PURE__ */ t(
|
|
1137
|
+
Y,
|
|
1138
|
+
{
|
|
1139
|
+
size: "small",
|
|
1140
|
+
variant: "contained",
|
|
1141
|
+
type: "submit",
|
|
1142
|
+
color: "primary",
|
|
1143
|
+
disabled: Ze,
|
|
1144
|
+
"data-testid": "manageeventconfiguration-save-button",
|
|
1145
|
+
children: i(`${A ? "Update" : "Save"}`)
|
|
1146
|
+
}
|
|
1147
|
+
)
|
|
1148
|
+
]
|
|
1149
|
+
}
|
|
1150
|
+
)
|
|
1151
|
+
] })
|
|
1152
|
+
}
|
|
1153
|
+
),
|
|
1154
|
+
/* @__PURE__ */ t(
|
|
1155
|
+
jt,
|
|
1156
|
+
{
|
|
1157
|
+
open: H !== null,
|
|
1158
|
+
handleClose: () => ne(null),
|
|
1159
|
+
handleClick: () => {
|
|
1160
|
+
nt(H), ne(null);
|
|
1161
|
+
},
|
|
1162
|
+
title: i("Delete this configuration?"),
|
|
1163
|
+
description: `${i("Configuration")} ${(H ?? 0) + 1}, its query and ${((Ne = (qe = u == null ? void 0 : u[H]) == null ? void 0 : qe.conditions) == null ? void 0 : Ne.length) || 0} ${i(
|
|
1164
|
+
"conditions will be removed. This cannot be undone."
|
|
1165
|
+
)}`,
|
|
1166
|
+
dataTestId: "manageeventconfiguration-delete-configuration-confirmation"
|
|
1167
|
+
}
|
|
1168
|
+
),
|
|
1169
|
+
/* @__PURE__ */ t(_e, { children: /* @__PURE__ */ t(
|
|
1170
|
+
Ht,
|
|
1171
|
+
{
|
|
1172
|
+
selectedConfig: X,
|
|
1173
|
+
notificationtypeMap: fe,
|
|
1174
|
+
selectedCondition: Fe,
|
|
1175
|
+
newCondition: q,
|
|
1176
|
+
handleTypeConfigurationDelete: st,
|
|
1177
|
+
handleTypeConfigurationEdit: lt,
|
|
1178
|
+
addTypeConfig: Me,
|
|
1179
|
+
setNewConditionData: ct,
|
|
1180
|
+
typeConfigurationData: U,
|
|
1181
|
+
setNewTypeData: ut,
|
|
1182
|
+
overlayOpen: ye,
|
|
1183
|
+
handleOverlayState: Te,
|
|
1184
|
+
"data-testid": "manageeventconfiguration-conditionconfig"
|
|
1185
|
+
}
|
|
1186
|
+
) }),
|
|
1187
|
+
/* @__PURE__ */ t(_e, { children: (N == null ? void 0 : N.type) === "MOBILE" ? /* @__PURE__ */ t(
|
|
1188
|
+
Qt,
|
|
1189
|
+
{
|
|
1190
|
+
type: N,
|
|
1191
|
+
open: Ce,
|
|
1192
|
+
notificationtypeMap: fe,
|
|
1193
|
+
handleClick: De,
|
|
1194
|
+
handleClose: () => {
|
|
1195
|
+
Z((e) => !e), S({});
|
|
1196
|
+
},
|
|
1197
|
+
"data-testid": "manageeventconfiguration-mobiletypeeventconfigmodal"
|
|
1198
|
+
}
|
|
1199
|
+
) : /* @__PURE__ */ t(
|
|
1200
|
+
Vt,
|
|
1201
|
+
{
|
|
1202
|
+
type: N,
|
|
1203
|
+
open: Ce,
|
|
1204
|
+
handleClick: De,
|
|
1205
|
+
handleClose: () => {
|
|
1206
|
+
Z((e) => !e), S({});
|
|
1207
|
+
},
|
|
1208
|
+
"data-testid": "manageeventconfiguration-othertypeeventconfigmodal"
|
|
1209
|
+
}
|
|
1210
|
+
) })
|
|
1211
|
+
] });
|
|
1212
|
+
}
|
|
1213
|
+
export {
|
|
1214
|
+
vn as default
|
|
1215
|
+
};
|
|
1216
|
+
//# sourceMappingURL=ManageEventConfiguration-DqW3krT6.js.map
|