@argusoft/medplat-form-engine 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccessRights-sgIhYR30-DWNCTLI6.js +1238 -0
- package/dist/AccessRights-sgIhYR30-DWNCTLI6.js.map +1 -0
- package/dist/AddEditQueryBuilder-BaZxS2Cm-emLM3Oli.js +289 -0
- package/dist/AddEditQueryBuilder-BaZxS2Cm-emLM3Oli.js.map +1 -0
- package/dist/AddEditQueryBuilder-BaZxS2Cm.css +1 -0
- package/dist/AddFeatures-BxXCC6ex-1VYoA24R.js +212 -0
- package/dist/AddFeatures-BxXCC6ex-1VYoA24R.js.map +1 -0
- package/dist/AddLabelModal-DE3ploGD-DWF1SOUp.js +734 -0
- package/dist/AddLabelModal-DE3ploGD-DWF1SOUp.js.map +1 -0
- package/dist/AddMenuConfiguration-QWfpcnuP-TAM2c68S.js +5389 -0
- package/dist/AddMenuConfiguration-QWfpcnuP-TAM2c68S.js.map +1 -0
- package/dist/AddMenuConfiguration-QWfpcnuP.css +1 -0
- package/dist/AddRoleDrawer-ZK1eejxI-ldfhQqA_.js +453 -0
- package/dist/AddRoleDrawer-ZK1eejxI-ldfhQqA_.js.map +1 -0
- package/dist/AppModal-BgZyfrd--CNvWjWhL.js +428 -0
- package/dist/AppModal-BgZyfrd--CNvWjWhL.js.map +1 -0
- package/dist/ChangePasswordModal-MV7g8tkA-BDA1Pw0i.js +176 -0
- package/dist/ChangePasswordModal-MV7g8tkA-BDA1Pw0i.js.map +1 -0
- package/dist/ConditionConfig-GDCXIg3C-XbR1fp6h.js +395 -0
- package/dist/ConditionConfig-GDCXIg3C-XbR1fp6h.js.map +1 -0
- package/dist/ConditionConfig-GDCXIg3C.css +1 -0
- package/dist/EntityManagement-D-x6Qzal-BE01iKNR.js +50 -0
- package/dist/EntityManagement-D-x6Qzal-BE01iKNR.js.map +1 -0
- package/dist/EventConfigurations-jGCJ4LqP-B_ftXinp.js +384 -0
- package/dist/EventConfigurations-jGCJ4LqP-B_ftXinp.js.map +1 -0
- package/dist/EventConfigurations-jGCJ4LqP.css +1 -0
- package/dist/EventsExceptionModal-BF6E1Np7-DHT7pQsx.js +200 -0
- package/dist/EventsExceptionModal-BF6E1Np7-DHT7pQsx.js.map +1 -0
- package/dist/EventsSkeleton-BN7_0IGs-BAnd1Vug.js +74 -0
- package/dist/EventsSkeleton-BN7_0IGs-BAnd1Vug.js.map +1 -0
- package/dist/FeatureMenu-BYSRoNm0-D2Ak-EDd.js +249 -0
- package/dist/FeatureMenu-BYSRoNm0-D2Ak-EDd.js.map +1 -0
- package/dist/Features-CKMmuqcs-ClXAzWGV.js +11 -0
- package/dist/Features-CKMmuqcs-ClXAzWGV.js.map +1 -0
- package/dist/FlywayQuery-Cx2sly6g-B1LLSyLE.js +169 -0
- package/dist/FlywayQuery-Cx2sly6g-B1LLSyLE.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-DZ8EqXlF-CSPs9x_q.js +5162 -0
- package/dist/ImmunizationConfigurationBase-DZ8EqXlF-CSPs9x_q.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-DZ8EqXlF.css +1 -0
- package/dist/ImmunizationConfigurationsList-CQnxWa09-DIujYt0W.js +335 -0
- package/dist/ImmunizationConfigurationsList-CQnxWa09-DIujYt0W.js.map +1 -0
- package/dist/ImmunizationSkeleton-D2tdv5k--B7SY-gnr.js +186 -0
- package/dist/ImmunizationSkeleton-D2tdv5k--B7SY-gnr.js.map +1 -0
- package/dist/LanguagesModal-rk6IGQwY-Cxw9xctN.js +394 -0
- package/dist/LanguagesModal-rk6IGQwY-Cxw9xctN.js.map +1 -0
- package/dist/ManageDynamicFeature-CeeqiS3K-D2Se68tC.js +4189 -0
- package/dist/ManageDynamicFeature-CeeqiS3K-D2Se68tC.js.map +1 -0
- package/dist/ManageEventConfiguration-BJxS2Su0-yd2dUxgz.js +1017 -0
- package/dist/ManageEventConfiguration-BJxS2Su0-yd2dUxgz.js.map +1 -0
- package/dist/ManageEventConfiguration-BJxS2Su0.css +1 -0
- package/dist/ManageNotification-B4prX-9Z-B4mRuGir.js +6819 -0
- package/dist/ManageNotification-B4prX-9Z-B4mRuGir.js.map +1 -0
- package/dist/ManageRole-ByqBmjuc-CApL3DJy.js +699 -0
- package/dist/ManageRole-ByqBmjuc-CApL3DJy.js.map +1 -0
- package/dist/ManageTranslation-BTxvSYKb-CwT975cy.js +616 -0
- package/dist/ManageTranslation-BTxvSYKb-CwT975cy.js.map +1 -0
- package/dist/ManageTranslation-BTxvSYKb.css +1 -0
- package/dist/ManageUser-PHiTNyF8-Bddmh2CC.js +2160 -0
- package/dist/ManageUser-PHiTNyF8-Bddmh2CC.js.map +1 -0
- package/dist/ManageUser-PHiTNyF8.css +1 -0
- package/dist/{MedplatFormWrapper-YzMB3zpp.js → MedplatFormWrapper-DbdQUpEu.js} +13624 -13168
- package/dist/MedplatFormWrapper-DbdQUpEu.js.map +1 -0
- package/dist/MobileMenuManagement-DmQU5TTo-D7n_NP0X.js +108 -0
- package/dist/MobileMenuManagement-DmQU5TTo-D7n_NP0X.js.map +1 -0
- package/dist/MobileTypeEventConfigModal-ChhO_A4f-Wd3d3SEP.js +782 -0
- package/dist/MobileTypeEventConfigModal-ChhO_A4f-Wd3d3SEP.js.map +1 -0
- package/dist/NewServerManagement-5YcAtF-g-DHV6PFTR.js +1002 -0
- package/dist/NewServerManagement-5YcAtF-g-DHV6PFTR.js.map +1 -0
- package/dist/NotificationFlywayQuery-BY8Zzml_-C7G-28dx.js +244 -0
- package/dist/NotificationFlywayQuery-BY8Zzml_-C7G-28dx.js.map +1 -0
- package/dist/NotificationList-BkpOrCpM-B-vKDGd_.js +400 -0
- package/dist/NotificationList-BkpOrCpM-B-vKDGd_.js.map +1 -0
- package/dist/OtherTypeEventConfigModal-ZnCGWm9v-tpC-SI0P.js +1952 -0
- package/dist/OtherTypeEventConfigModal-ZnCGWm9v-tpC-SI0P.js.map +1 -0
- package/dist/QueryBuilder-Cus_mRwZ-DLXSM32i.js +378 -0
- package/dist/QueryBuilder-Cus_mRwZ-DLXSM32i.js.map +1 -0
- package/dist/QueryBuilder-Cus_mRwZ.css +1 -0
- package/dist/QueryManagement-DXA73N2j-Wlk7hKP3.js +671 -0
- package/dist/QueryManagement-DXA73N2j-Wlk7hKP3.js.map +1 -0
- package/dist/QueryManagement-DXA73N2j.css +1 -0
- package/dist/RoleManagement-CLaEJ90J-BW0tG5t9.js +410 -0
- package/dist/RoleManagement-CLaEJ90J-BW0tG5t9.js.map +1 -0
- package/dist/ServerSyncModal-uNjGCQJz--PJ3F3xg.js +869 -0
- package/dist/ServerSyncModal-uNjGCQJz--PJ3F3xg.js.map +1 -0
- package/dist/ShowFlywayQuery-DMsAbtOW-TT9XXzUi.js +130 -0
- package/dist/ShowFlywayQuery-DMsAbtOW-TT9XXzUi.js.map +1 -0
- package/dist/ShowFlywayQuery-DVRCd384-BypXcNWX.js +259 -0
- package/dist/ShowFlywayQuery-DVRCd384-BypXcNWX.js.map +1 -0
- package/dist/ShowQueryHistory-BDN0tzHg-17BxK88Z.js +190 -0
- package/dist/ShowQueryHistory-BDN0tzHg-17BxK88Z.js.map +1 -0
- package/dist/SubMenu-BHcSNSUF-d-_yEXeN.js +187 -0
- package/dist/SubMenu-BHcSNSUF-d-_yEXeN.js.map +1 -0
- package/dist/TableDetails-DzREeJkm-B-WEBbQz.js +1508 -0
- package/dist/TableDetails-DzREeJkm-B-WEBbQz.js.map +1 -0
- package/dist/TableList-B9hr05Hs-BIsMbnIV.js +428 -0
- package/dist/TableList-B9hr05Hs-BIsMbnIV.js.map +1 -0
- package/dist/TypeConfiguration-C-lk8Szs-DKu6I5Im.js +116 -0
- package/dist/TypeConfiguration-C-lk8Szs-DKu6I5Im.js.map +1 -0
- package/dist/UserList-BxB1tCwM-7YIwwGQ9.js +13039 -0
- package/dist/UserList-BxB1tCwM-7YIwwGQ9.js.map +1 -0
- package/dist/UserList-BxB1tCwM.css +1 -0
- package/dist/UserListSkeleton-cglK2SaU-B_Tj5gUp.js +184 -0
- package/dist/UserListSkeleton-cglK2SaU-B_Tj5gUp.js.map +1 -0
- package/dist/WidgetList-BSApErov-CBYLh0Oh.js +188 -0
- package/dist/WidgetList-BSApErov-CBYLh0Oh.js.map +1 -0
- package/dist/_commonjsHelpers-BItOPCY9-B9tZyK9c.js +29 -0
- package/dist/_commonjsHelpers-BItOPCY9-B9tZyK9c.js.map +1 -0
- package/dist/i18next-CTOWN_jH-BKKbdDel.js +1389 -0
- package/dist/i18next-CTOWN_jH-BKKbdDel.js.map +1 -0
- package/dist/index-B4r0wjBD.js +563 -0
- package/dist/index-B4r0wjBD.js.map +1 -0
- package/dist/{index-CBsXn92s.js → index-CdFr9tGu.js} +107 -107
- package/dist/{index-CBsXn92s.js.map → index-CdFr9tGu.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/manageImmunization-B4swS745-JldexHrO.js +1204 -0
- package/dist/manageImmunization-B4swS745-JldexHrO.js.map +1 -0
- package/dist/manageImmunization-B4swS745.css +1 -0
- package/package.json +1 -1
- package/dist/MedplatFormWrapper-YzMB3zpp.js.map +0 -1
|
@@ -0,0 +1,869 @@
|
|
|
1
|
+
import { jsx as r, jsxs as s, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { execute as Ue } from "@/common/services/GlobalApis";
|
|
3
|
+
import { showToast as C } from "@/common/toaster/toaster";
|
|
4
|
+
import { Modal as Oe, Backdrop as K, Fade as ze, Typography as q, IconButton as Q, CircularProgress as Ne, Tabs as Z, Tab as W, Divider as j, Chip as I, FormControl as U, FormLabel as O, Autocomplete as Y, TextField as A, Tooltip as Le, OutlinedInput as Ae, InputAdornment as Ee, FormHelperText as Fe, Alert as Te, Checkbox as ke, Accordion as Me, AccordionSummary as Re, AccordionDetails as qe, Button as ee } from "@mui/material";
|
|
5
|
+
import c from "@mui/material/Grid2";
|
|
6
|
+
import { Box as h } from "@mui/system";
|
|
7
|
+
import { D as S } from "./i18next-CTOWN_jH-BKKbdDel.js";
|
|
8
|
+
import z from "prop-types";
|
|
9
|
+
import We, { useState as g, useEffect as je } from "react";
|
|
10
|
+
import { useForm as Ye, useFieldArray as $e, Controller as N } from "react-hook-form";
|
|
11
|
+
import { api as re } from "@/common/interceptors/AxiosInterceptor";
|
|
12
|
+
import { getSecurityUserList as Pe, syncMenuConfigFormsWithServer as Ve, downloadFeature as Be } from "@/common/services/SyncWithServer";
|
|
13
|
+
import { FormConfiguratorService as _e } from "@/common/services/FormConfiguratorService";
|
|
14
|
+
import { FontAwesomeIcon as x } from "@fortawesome/react-fontawesome";
|
|
15
|
+
import { faXmark as He, faCircleInfo as Ge, faEyeSlash as Je, faEye as Xe, faChevronDown as Ke, faArrowsRotate as Qe, faDownload as Ze } from "@fortawesome/free-solid-svg-icons";
|
|
16
|
+
import er from "@/common/services/util/GeneralUtil";
|
|
17
|
+
import rr from "@/views/custom-components/InfoBadge";
|
|
18
|
+
import oe from "@/views/custom-components/AlertPlaceholder";
|
|
19
|
+
import or from "@/views/custom-components/PostgresEditor";
|
|
20
|
+
function tr({
|
|
21
|
+
id: $,
|
|
22
|
+
navigationState: P,
|
|
23
|
+
selectedFeature: V,
|
|
24
|
+
openServerSyncModal: E,
|
|
25
|
+
openModalFunc: B
|
|
26
|
+
}) {
|
|
27
|
+
const [m, te] = g(), [ne, ie] = g([]), [F, le] = g(), [T, ae] = g(), [k, se] = g(!1), [w, M] = g(-1), [de, v] = g(!1), [L, _] = g({}), [f, H] = g([]), [u, ce] = g("SYNC"), y = Ye({
|
|
28
|
+
defaultValues: {
|
|
29
|
+
serverName: "",
|
|
30
|
+
formCode: [],
|
|
31
|
+
formDetails: [],
|
|
32
|
+
userName: "",
|
|
33
|
+
password: "",
|
|
34
|
+
requestMessage: ""
|
|
35
|
+
},
|
|
36
|
+
mode: "onChange"
|
|
37
|
+
}), { fields: b, remove: ue, append: me, replace: G } = $e({
|
|
38
|
+
control: y.control,
|
|
39
|
+
name: "formDetails"
|
|
40
|
+
}), fe = (o, t) => {
|
|
41
|
+
_({});
|
|
42
|
+
const e = [...b];
|
|
43
|
+
e.forEach((n) => {
|
|
44
|
+
const l = m.find(
|
|
45
|
+
(i) => i.formCode === n.formCode
|
|
46
|
+
);
|
|
47
|
+
n.migrationList = l.migrationListAll, n.migrationListAll = l.migrationListAll;
|
|
48
|
+
}), G(e), ce(t);
|
|
49
|
+
};
|
|
50
|
+
je(() => {
|
|
51
|
+
(async () => {
|
|
52
|
+
try {
|
|
53
|
+
await pe(), await ge(), await ve();
|
|
54
|
+
} catch (o) {
|
|
55
|
+
C({
|
|
56
|
+
message: o,
|
|
57
|
+
type: "error"
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
})();
|
|
61
|
+
}, [E]);
|
|
62
|
+
const pe = async () => {
|
|
63
|
+
try {
|
|
64
|
+
const o = (await _e.getAllLinkedFormsByMenuConfigId($)).data;
|
|
65
|
+
o && (ie(o), te(() => {
|
|
66
|
+
const t = o, e = /* @__PURE__ */ new Map();
|
|
67
|
+
return t.forEach((n) => {
|
|
68
|
+
e.has(n.formCode) || e.set(n.formCode, {
|
|
69
|
+
sourceFormCode: n.sourceFormCode,
|
|
70
|
+
formName: n.formName,
|
|
71
|
+
formCode: n.formCode,
|
|
72
|
+
versions: JSON.parse(n.versions).filter(
|
|
73
|
+
(l) => l.version !== "DRAFT"
|
|
74
|
+
),
|
|
75
|
+
formUUID: n.uuid,
|
|
76
|
+
builderType: n.builderType,
|
|
77
|
+
migrationList: n.migrationList,
|
|
78
|
+
migrationListAll: n.migrationList
|
|
79
|
+
});
|
|
80
|
+
}), Array.from(e.values());
|
|
81
|
+
}));
|
|
82
|
+
} catch (o) {
|
|
83
|
+
C({
|
|
84
|
+
message: o,
|
|
85
|
+
type: "error"
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}, he = async (o) => {
|
|
89
|
+
if (o && m) {
|
|
90
|
+
const t = m.map((e) => e.formUUID);
|
|
91
|
+
try {
|
|
92
|
+
const e = await re.get(
|
|
93
|
+
"sync/migrationUUIDsByListOfFormMasterUUIDSource",
|
|
94
|
+
{
|
|
95
|
+
params: {
|
|
96
|
+
formMasterUUIDs: t,
|
|
97
|
+
serverCode: o.code
|
|
98
|
+
},
|
|
99
|
+
paramsSerializer: {
|
|
100
|
+
serialize: (n) => Object.entries(n).map(
|
|
101
|
+
([l, i]) => Array.isArray(i) ? i.map((d) => `${l}=${encodeURIComponent(d)}`).join("&") : `${l}=${encodeURIComponent(i)}`
|
|
102
|
+
).join("&")
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
H([...e.data]);
|
|
107
|
+
} catch (e) {
|
|
108
|
+
console.error("Error fetching UUIDs:", e);
|
|
109
|
+
}
|
|
110
|
+
} else
|
|
111
|
+
H([]);
|
|
112
|
+
}, ge = async () => {
|
|
113
|
+
try {
|
|
114
|
+
const o = (await Ue({
|
|
115
|
+
code: "fetch_server_details"
|
|
116
|
+
})).data;
|
|
117
|
+
o.result && le(o.result);
|
|
118
|
+
} catch (o) {
|
|
119
|
+
C({
|
|
120
|
+
message: o,
|
|
121
|
+
type: "error"
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}, ve = async () => {
|
|
125
|
+
try {
|
|
126
|
+
const o = (await Pe()).data;
|
|
127
|
+
o && ae(() => {
|
|
128
|
+
let t = o.split(","), e = [];
|
|
129
|
+
return t.forEach((n) => {
|
|
130
|
+
e.push({
|
|
131
|
+
id: n,
|
|
132
|
+
label: n
|
|
133
|
+
});
|
|
134
|
+
}), e;
|
|
135
|
+
});
|
|
136
|
+
} catch (o) {
|
|
137
|
+
C({
|
|
138
|
+
message: o,
|
|
139
|
+
type: "error"
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}, ye = () => {
|
|
143
|
+
let o = y.getValues("formCode") || [];
|
|
144
|
+
if (o.length > 0) {
|
|
145
|
+
M(o[0]);
|
|
146
|
+
let t = o.map((i) => {
|
|
147
|
+
var d;
|
|
148
|
+
let a = m == null ? void 0 : m.find((p) => p.formCode === i);
|
|
149
|
+
return a ? {
|
|
150
|
+
formName: a.formName,
|
|
151
|
+
formCode: a.formCode,
|
|
152
|
+
formUUID: a.formUUID,
|
|
153
|
+
migrationList: (d = a.migrationList) == null ? void 0 : d.filter(
|
|
154
|
+
(p) => !f.includes(p.uuid)
|
|
155
|
+
),
|
|
156
|
+
migrationListAll: a.migrationList
|
|
157
|
+
} : null;
|
|
158
|
+
}).filter(Boolean), e = b.map((i) => i.formCode), n = t.filter(
|
|
159
|
+
(i) => !e.includes(i.formCode)
|
|
160
|
+
), l = e.filter(
|
|
161
|
+
(i) => !o.includes(i)
|
|
162
|
+
);
|
|
163
|
+
n.forEach((i) => {
|
|
164
|
+
const d = (m == null ? void 0 : m.find(
|
|
165
|
+
(a) => a.formCode === i.formCode
|
|
166
|
+
)).versions.reduce(
|
|
167
|
+
(a, p) => parseInt(p.version) > parseInt(a.version) ? p : a
|
|
168
|
+
);
|
|
169
|
+
me({
|
|
170
|
+
formName: i.formName,
|
|
171
|
+
formCode: i.formCode,
|
|
172
|
+
migrationList: i.migrationList,
|
|
173
|
+
migrationListAll: i.migrationList,
|
|
174
|
+
version: d.version,
|
|
175
|
+
formUUID: i.formUUID,
|
|
176
|
+
builderType: i.builderType
|
|
177
|
+
});
|
|
178
|
+
}), l.forEach((i) => {
|
|
179
|
+
let d = b.findIndex((a) => a.formCode === i);
|
|
180
|
+
d !== -1 && ue(d);
|
|
181
|
+
});
|
|
182
|
+
} else
|
|
183
|
+
M(-1), G([]);
|
|
184
|
+
}, Ce = () => se((o) => !o), Se = () => {
|
|
185
|
+
B(!1);
|
|
186
|
+
}, J = async (o, t, e) => {
|
|
187
|
+
try {
|
|
188
|
+
return await er.getEncodedData(o, t, e);
|
|
189
|
+
} catch (n) {
|
|
190
|
+
return console.error(n), null;
|
|
191
|
+
}
|
|
192
|
+
}, be = (o, t) => Object.entries(o).filter(([e]) => !t.includes(e)).sort(([, e], [, n]) => e.createdOn - n.createdOn).map(([e]) => e), xe = async (o) => {
|
|
193
|
+
try {
|
|
194
|
+
v(!0);
|
|
195
|
+
const t = await re.get("/login/get-key-and-iv", {
|
|
196
|
+
withCredentials: !0
|
|
197
|
+
}), e = await J(
|
|
198
|
+
t.data.key,
|
|
199
|
+
t.data.initVector,
|
|
200
|
+
o.userName
|
|
201
|
+
), n = await J(
|
|
202
|
+
t.data.key,
|
|
203
|
+
t.data.initVector,
|
|
204
|
+
o.password
|
|
205
|
+
), l = o.formDetails.map((a) => {
|
|
206
|
+
let p = be(
|
|
207
|
+
L[a.formCode] || {},
|
|
208
|
+
f || []
|
|
209
|
+
);
|
|
210
|
+
return {
|
|
211
|
+
formMasterUUID: a.formUUID,
|
|
212
|
+
version: a.version,
|
|
213
|
+
migrationUUIDList: p,
|
|
214
|
+
builderType: a.builderType
|
|
215
|
+
};
|
|
216
|
+
}), i = [];
|
|
217
|
+
ne.forEach((a) => {
|
|
218
|
+
a.sourceFormCode != a.formCode && i.push({ [a.sourceFormCode]: a.formCode });
|
|
219
|
+
});
|
|
220
|
+
const d = {
|
|
221
|
+
menuConfigId: $,
|
|
222
|
+
navigationState: P,
|
|
223
|
+
formConfigsData: l,
|
|
224
|
+
routeGraphMap: i,
|
|
225
|
+
transactionRequestData: {
|
|
226
|
+
serverCode: o.serverName,
|
|
227
|
+
requestMessage: o.requestMessage,
|
|
228
|
+
featureType: "FORM_CONFIGURATOR",
|
|
229
|
+
featureReferenceType: "FEATURE",
|
|
230
|
+
featureReferenceId: P
|
|
231
|
+
},
|
|
232
|
+
authRequestData: {
|
|
233
|
+
userName: e,
|
|
234
|
+
password: n,
|
|
235
|
+
grantType: "password",
|
|
236
|
+
clientId: "imtecho-ui"
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
if (u === "SYNC")
|
|
240
|
+
try {
|
|
241
|
+
v(!0);
|
|
242
|
+
const a = await Ve(d);
|
|
243
|
+
v(!1), a.data.isSuccess ? (C({
|
|
244
|
+
type: "success",
|
|
245
|
+
message: "Synced to server successfully."
|
|
246
|
+
}), B(!1)) : (C({
|
|
247
|
+
type: "error",
|
|
248
|
+
message: "Issue in syncing with server."
|
|
249
|
+
}), console.error("error", a.data.error));
|
|
250
|
+
} catch (a) {
|
|
251
|
+
v(!1), C({
|
|
252
|
+
type: "error",
|
|
253
|
+
message: "Sync failed: Unauthorized access"
|
|
254
|
+
}), console.error("error", a);
|
|
255
|
+
}
|
|
256
|
+
if (u === "DOWNLOAD")
|
|
257
|
+
try {
|
|
258
|
+
v(!0);
|
|
259
|
+
const a = await Be(d), p = `V${Date.now()}__${d.navigationState}__feature.json`, Ie = new Blob([a.data], { type: "application/json" }), X = window.URL.createObjectURL(Ie), D = document.createElement("a");
|
|
260
|
+
D.href = X, D.setAttribute("download", p), document.body.appendChild(D), D.click(), D.remove(), window.URL.revokeObjectURL(X), v(!1);
|
|
261
|
+
} catch (a) {
|
|
262
|
+
v(!1), C({
|
|
263
|
+
type: "error",
|
|
264
|
+
message: "Download failed"
|
|
265
|
+
}), console.error("error", a);
|
|
266
|
+
}
|
|
267
|
+
v(!1);
|
|
268
|
+
} catch (t) {
|
|
269
|
+
v(!1), console.error("error", t);
|
|
270
|
+
}
|
|
271
|
+
}, we = (o, t, e) => {
|
|
272
|
+
let n = { ...L };
|
|
273
|
+
o.target.checked ? (Object.prototype.hasOwnProperty.call(
|
|
274
|
+
n,
|
|
275
|
+
t
|
|
276
|
+
) || (n[t] = {}), n[t][e.uuid] = e) : delete n[t][e.uuid], _({ ...n });
|
|
277
|
+
}, De = (o) => {
|
|
278
|
+
const t = new Date(o), e = String(t.getDate()).padStart(2, "0"), n = String(t.getMonth() + 1).padStart(2, "0"), l = t.getFullYear();
|
|
279
|
+
let i = t.getHours();
|
|
280
|
+
const d = String(t.getMinutes()).padStart(2, "0");
|
|
281
|
+
return i = String(i).padStart(2, "0"), `${e}/${n}/${l} ${i}:${d}`;
|
|
282
|
+
};
|
|
283
|
+
return /* @__PURE__ */ r(
|
|
284
|
+
Oe,
|
|
285
|
+
{
|
|
286
|
+
open: E,
|
|
287
|
+
slots: { backdrop: K },
|
|
288
|
+
slotProps: {
|
|
289
|
+
backdrop: {
|
|
290
|
+
timeout: 500
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
PaperProps: {
|
|
294
|
+
style: {
|
|
295
|
+
borderRadius: "8px"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
children: /* @__PURE__ */ r(ze, { in: E, children: /* @__PURE__ */ s(
|
|
299
|
+
h,
|
|
300
|
+
{
|
|
301
|
+
sx: {
|
|
302
|
+
position: "absolute",
|
|
303
|
+
top: "50%",
|
|
304
|
+
left: "50%",
|
|
305
|
+
padding: "10px 25px",
|
|
306
|
+
transform: "translate(-50%, -50%)",
|
|
307
|
+
width: "80%",
|
|
308
|
+
maxHeight: "90%",
|
|
309
|
+
scrollbarWidth: "none",
|
|
310
|
+
overflowY: "scroll",
|
|
311
|
+
bgcolor: "background.paper",
|
|
312
|
+
borderRadius: "12px",
|
|
313
|
+
boxShadow: 12,
|
|
314
|
+
transition: "all 0.5s ease !important"
|
|
315
|
+
},
|
|
316
|
+
children: [
|
|
317
|
+
/* @__PURE__ */ s(
|
|
318
|
+
h,
|
|
319
|
+
{
|
|
320
|
+
sx: {
|
|
321
|
+
display: "flex",
|
|
322
|
+
justifyContent: "space-between",
|
|
323
|
+
alignItems: "center"
|
|
324
|
+
},
|
|
325
|
+
children: [
|
|
326
|
+
/* @__PURE__ */ s(q, { variant: "h6", className: "text-customBlue", children: [
|
|
327
|
+
S("Sync"),
|
|
328
|
+
" ",
|
|
329
|
+
V == null ? void 0 : V.name
|
|
330
|
+
] }),
|
|
331
|
+
/* @__PURE__ */ r(Q, { onClick: Se, children: /* @__PURE__ */ r(x, { icon: He }) })
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
),
|
|
335
|
+
/* @__PURE__ */ s("form", { noValidate: !0, onSubmit: y.handleSubmit(xe), children: [
|
|
336
|
+
/* @__PURE__ */ s(h, { sx: { my: 2 }, children: [
|
|
337
|
+
/* @__PURE__ */ r(
|
|
338
|
+
K,
|
|
339
|
+
{
|
|
340
|
+
sx: (o) => ({
|
|
341
|
+
color: "#fff",
|
|
342
|
+
zIndex: o.zIndex.drawer + 1
|
|
343
|
+
}),
|
|
344
|
+
open: de,
|
|
345
|
+
children: /* @__PURE__ */ s(
|
|
346
|
+
h,
|
|
347
|
+
{
|
|
348
|
+
sx: {
|
|
349
|
+
backgroundColor: "white",
|
|
350
|
+
p: 3,
|
|
351
|
+
color: "black",
|
|
352
|
+
display: "flex",
|
|
353
|
+
justifyContent: "space-between",
|
|
354
|
+
alignItems: "center",
|
|
355
|
+
borderRadius: "10px"
|
|
356
|
+
},
|
|
357
|
+
children: [
|
|
358
|
+
/* @__PURE__ */ r(Ne, { color: "inherit" }),
|
|
359
|
+
/* @__PURE__ */ r(q, { sx: { ml: 2 }, children: "Syncing feature, it may take some time, please wait..." })
|
|
360
|
+
]
|
|
361
|
+
}
|
|
362
|
+
)
|
|
363
|
+
}
|
|
364
|
+
),
|
|
365
|
+
/* @__PURE__ */ s(c, { container: !0, spacing: 2, children: [
|
|
366
|
+
/* @__PURE__ */ s(c, { size: 5, container: !0, children: [
|
|
367
|
+
/* @__PURE__ */ r(c, { size: 12, children: /* @__PURE__ */ s(
|
|
368
|
+
Z,
|
|
369
|
+
{
|
|
370
|
+
value: u,
|
|
371
|
+
onChange: fe,
|
|
372
|
+
variant: "fullWidth",
|
|
373
|
+
children: [
|
|
374
|
+
/* @__PURE__ */ r(W, { label: "SYNC", value: "SYNC" }),
|
|
375
|
+
/* @__PURE__ */ r(W, { label: "DOWNLOAD", value: "DOWNLOAD" })
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
) }),
|
|
379
|
+
["SYNC"].includes(u) && /* @__PURE__ */ s(R, { children: [
|
|
380
|
+
/* @__PURE__ */ r(c, { size: 12, children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(I, { label: "Server and form details", size: "small" }) }) }),
|
|
381
|
+
/* @__PURE__ */ r(c, { size: 12, children: /* @__PURE__ */ s(U, { fullWidth: !0, children: [
|
|
382
|
+
/* @__PURE__ */ r(O, { required: !0, children: "Select server" }),
|
|
383
|
+
/* @__PURE__ */ r(
|
|
384
|
+
N,
|
|
385
|
+
{
|
|
386
|
+
name: "serverName",
|
|
387
|
+
control: y.control,
|
|
388
|
+
rules: {
|
|
389
|
+
required: {
|
|
390
|
+
value: !0,
|
|
391
|
+
message: "Select server"
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
render: ({
|
|
395
|
+
field: { onChange: o, value: t },
|
|
396
|
+
fieldState: { error: e }
|
|
397
|
+
}) => {
|
|
398
|
+
const n = F == null ? void 0 : F.filter(
|
|
399
|
+
(l) => t == null ? void 0 : t.includes(l.code)
|
|
400
|
+
);
|
|
401
|
+
return /* @__PURE__ */ r(
|
|
402
|
+
Y,
|
|
403
|
+
{
|
|
404
|
+
fullWidth: !0,
|
|
405
|
+
size: "small",
|
|
406
|
+
options: F || [],
|
|
407
|
+
getOptionLabel: (l) => l.serverDetails || "",
|
|
408
|
+
value: n,
|
|
409
|
+
getOptionDisabled: (l) => t == null ? void 0 : t.includes(l.code),
|
|
410
|
+
onChange: (l, i) => {
|
|
411
|
+
const d = i == null ? void 0 : i.code;
|
|
412
|
+
o(d), he(i);
|
|
413
|
+
},
|
|
414
|
+
renderInput: (l) => /* @__PURE__ */ r(
|
|
415
|
+
A,
|
|
416
|
+
{
|
|
417
|
+
...l,
|
|
418
|
+
placeholder: "Select server",
|
|
419
|
+
variant: "outlined",
|
|
420
|
+
error: e,
|
|
421
|
+
helperText: e == null ? void 0 : e.message
|
|
422
|
+
}
|
|
423
|
+
)
|
|
424
|
+
}
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
)
|
|
429
|
+
] }) })
|
|
430
|
+
] }),
|
|
431
|
+
["DOWNLOAD", "SYNC"].includes(u) && /* @__PURE__ */ r(R, { children: /* @__PURE__ */ r(c, { size: 12, children: /* @__PURE__ */ s(U, { fullWidth: !0, children: [
|
|
432
|
+
/* @__PURE__ */ s(O, { required: !0, children: [
|
|
433
|
+
S("Select"),
|
|
434
|
+
" ",
|
|
435
|
+
S("forms")
|
|
436
|
+
] }),
|
|
437
|
+
/* @__PURE__ */ r(
|
|
438
|
+
N,
|
|
439
|
+
{
|
|
440
|
+
name: "formCode",
|
|
441
|
+
rules: {
|
|
442
|
+
required: {
|
|
443
|
+
value: !0,
|
|
444
|
+
message: "Select server"
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
control: y.control,
|
|
448
|
+
render: ({
|
|
449
|
+
field: { onChange: o, value: t },
|
|
450
|
+
fieldState: { error: e }
|
|
451
|
+
}) => {
|
|
452
|
+
const n = m == null ? void 0 : m.filter(
|
|
453
|
+
(l) => t == null ? void 0 : t.includes(l.formCode)
|
|
454
|
+
);
|
|
455
|
+
return /* @__PURE__ */ r(
|
|
456
|
+
Y,
|
|
457
|
+
{
|
|
458
|
+
multiple: !0,
|
|
459
|
+
size: "small",
|
|
460
|
+
options: m || [],
|
|
461
|
+
disableCloseOnSelect: !0,
|
|
462
|
+
getOptionLabel: (l) => l.formName || "",
|
|
463
|
+
value: n,
|
|
464
|
+
getOptionDisabled: (l) => t == null ? void 0 : t.includes(l.formCode),
|
|
465
|
+
onChange: (l, i) => {
|
|
466
|
+
const d = i.map(
|
|
467
|
+
(a) => a.formCode
|
|
468
|
+
);
|
|
469
|
+
o(d), ye();
|
|
470
|
+
},
|
|
471
|
+
renderInput: (l) => /* @__PURE__ */ r(
|
|
472
|
+
A,
|
|
473
|
+
{
|
|
474
|
+
...l,
|
|
475
|
+
placeholder: "Select all forms to sync",
|
|
476
|
+
variant: "outlined",
|
|
477
|
+
error: e,
|
|
478
|
+
helperText: e == null ? void 0 : e.message
|
|
479
|
+
}
|
|
480
|
+
)
|
|
481
|
+
}
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
)
|
|
486
|
+
] }) }) }),
|
|
487
|
+
["SYNC"].includes(u) && /* @__PURE__ */ s(R, { children: [
|
|
488
|
+
/* @__PURE__ */ r(c, { size: 12, children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(
|
|
489
|
+
I,
|
|
490
|
+
{
|
|
491
|
+
label: /* @__PURE__ */ s(h, { children: [
|
|
492
|
+
/* @__PURE__ */ r(h, { component: "span", sx: { mr: 0.5 }, children: "User authentication details" }),
|
|
493
|
+
/* @__PURE__ */ r(Le, { title: "Only selected users can perform the sync operation", children: /* @__PURE__ */ r(x, { icon: Ge }) })
|
|
494
|
+
] }),
|
|
495
|
+
size: "small"
|
|
496
|
+
}
|
|
497
|
+
) }) }),
|
|
498
|
+
/* @__PURE__ */ r(c, { size: 12, children: /* @__PURE__ */ s(U, { variant: "outlined", fullWidth: !0, children: [
|
|
499
|
+
/* @__PURE__ */ s(O, { required: !0, children: [
|
|
500
|
+
S("Select"),
|
|
501
|
+
" ",
|
|
502
|
+
S("user")
|
|
503
|
+
] }),
|
|
504
|
+
/* @__PURE__ */ r(
|
|
505
|
+
N,
|
|
506
|
+
{
|
|
507
|
+
name: "userName",
|
|
508
|
+
rules: {
|
|
509
|
+
required: {
|
|
510
|
+
value: !0,
|
|
511
|
+
message: "Select username"
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
control: y.control,
|
|
515
|
+
render: ({
|
|
516
|
+
field: { onChange: o, value: t },
|
|
517
|
+
fieldState: { error: e }
|
|
518
|
+
}) => /* @__PURE__ */ r(
|
|
519
|
+
Y,
|
|
520
|
+
{
|
|
521
|
+
size: "small",
|
|
522
|
+
options: T || [],
|
|
523
|
+
getOptionLabel: (n) => (n == null ? void 0 : n.label) || "",
|
|
524
|
+
value: (T == null ? void 0 : T.find(
|
|
525
|
+
(n) => n.id === t
|
|
526
|
+
)) || null,
|
|
527
|
+
onChange: (n, l) => {
|
|
528
|
+
o(l ? l.id : null);
|
|
529
|
+
},
|
|
530
|
+
renderInput: (n) => /* @__PURE__ */ r(
|
|
531
|
+
A,
|
|
532
|
+
{
|
|
533
|
+
...n,
|
|
534
|
+
placeholder: "Select user",
|
|
535
|
+
variant: "outlined",
|
|
536
|
+
error: e,
|
|
537
|
+
helperText: e == null ? void 0 : e.message
|
|
538
|
+
}
|
|
539
|
+
)
|
|
540
|
+
}
|
|
541
|
+
)
|
|
542
|
+
}
|
|
543
|
+
)
|
|
544
|
+
] }) }),
|
|
545
|
+
/* @__PURE__ */ r(c, { size: 12, children: /* @__PURE__ */ s(U, { fullWidth: !0, children: [
|
|
546
|
+
/* @__PURE__ */ r(
|
|
547
|
+
O,
|
|
548
|
+
{
|
|
549
|
+
required: !0,
|
|
550
|
+
color: "text.primary",
|
|
551
|
+
sx: { mb: 0.5 },
|
|
552
|
+
children: S("Password")
|
|
553
|
+
}
|
|
554
|
+
),
|
|
555
|
+
/* @__PURE__ */ r(
|
|
556
|
+
N,
|
|
557
|
+
{
|
|
558
|
+
name: "password",
|
|
559
|
+
rules: {
|
|
560
|
+
required: {
|
|
561
|
+
value: !0,
|
|
562
|
+
message: "Enter password"
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
control: y.control,
|
|
566
|
+
errors: y.formState.errors,
|
|
567
|
+
defaultValue: "",
|
|
568
|
+
render: ({
|
|
569
|
+
field: { onChange: o, value: t },
|
|
570
|
+
fieldState: { error: e }
|
|
571
|
+
}) => /* @__PURE__ */ s(h, { sx: { mb: 1 }, children: [
|
|
572
|
+
/* @__PURE__ */ r(
|
|
573
|
+
Ae,
|
|
574
|
+
{
|
|
575
|
+
fullWidth: !0,
|
|
576
|
+
type: k ? "text" : "password",
|
|
577
|
+
value: t,
|
|
578
|
+
size: "small",
|
|
579
|
+
placeholder: "Enter password",
|
|
580
|
+
onChange: o,
|
|
581
|
+
error: e,
|
|
582
|
+
endAdornment: /* @__PURE__ */ r(Ee, { position: "end", children: /* @__PURE__ */ r(
|
|
583
|
+
Q,
|
|
584
|
+
{
|
|
585
|
+
"aria-label": k ? "hide the password" : "display the password",
|
|
586
|
+
onClick: Ce,
|
|
587
|
+
onMouseDown: (n) => n.preventDefault(),
|
|
588
|
+
onMouseUp: (n) => n.preventDefault(),
|
|
589
|
+
edge: "end",
|
|
590
|
+
children: k ? /* @__PURE__ */ r(
|
|
591
|
+
x,
|
|
592
|
+
{
|
|
593
|
+
icon: Je,
|
|
594
|
+
size: "xs"
|
|
595
|
+
}
|
|
596
|
+
) : /* @__PURE__ */ r(
|
|
597
|
+
x,
|
|
598
|
+
{
|
|
599
|
+
icon: Xe,
|
|
600
|
+
size: "xs"
|
|
601
|
+
}
|
|
602
|
+
)
|
|
603
|
+
}
|
|
604
|
+
) })
|
|
605
|
+
}
|
|
606
|
+
),
|
|
607
|
+
e && /* @__PURE__ */ r(Fe, { error: e, children: e == null ? void 0 : e.message })
|
|
608
|
+
] })
|
|
609
|
+
}
|
|
610
|
+
)
|
|
611
|
+
] }) }),
|
|
612
|
+
/* @__PURE__ */ r(c, { size: 12, children: /* @__PURE__ */ s(U, { fullWidth: !0, children: [
|
|
613
|
+
/* @__PURE__ */ s(O, { required: !0, children: [
|
|
614
|
+
S("Request"),
|
|
615
|
+
" ",
|
|
616
|
+
S("message")
|
|
617
|
+
] }),
|
|
618
|
+
/* @__PURE__ */ r(
|
|
619
|
+
N,
|
|
620
|
+
{
|
|
621
|
+
name: "requestMessage",
|
|
622
|
+
rules: {
|
|
623
|
+
required: {
|
|
624
|
+
value: !0,
|
|
625
|
+
message: "Enter request message"
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
control: y.control,
|
|
629
|
+
render: ({ field: o, fieldState: { error: t } }) => /* @__PURE__ */ r(
|
|
630
|
+
A,
|
|
631
|
+
{
|
|
632
|
+
multiline: !0,
|
|
633
|
+
rows: 4,
|
|
634
|
+
size: "small",
|
|
635
|
+
placeholder: "Enter request message",
|
|
636
|
+
...o,
|
|
637
|
+
error: t,
|
|
638
|
+
helperText: t == null ? void 0 : t.message
|
|
639
|
+
}
|
|
640
|
+
)
|
|
641
|
+
}
|
|
642
|
+
)
|
|
643
|
+
] }) })
|
|
644
|
+
] })
|
|
645
|
+
] }),
|
|
646
|
+
/* @__PURE__ */ r(c, { size: 7, children: /* @__PURE__ */ r(h, { children: b.length > 0 ? /* @__PURE__ */ s(We.Fragment, { children: [
|
|
647
|
+
/* @__PURE__ */ r(Te, { sx: { mt: 1 }, severity: "info", children: "Please select the migration corresponding to the respective form for synchronization" }),
|
|
648
|
+
/* @__PURE__ */ r(
|
|
649
|
+
Z,
|
|
650
|
+
{
|
|
651
|
+
value: w,
|
|
652
|
+
onChange: (o, t) => {
|
|
653
|
+
M(t);
|
|
654
|
+
},
|
|
655
|
+
children: b == null ? void 0 : b.map((o) => /* @__PURE__ */ r(
|
|
656
|
+
W,
|
|
657
|
+
{
|
|
658
|
+
value: o.formCode,
|
|
659
|
+
label: /* @__PURE__ */ r(
|
|
660
|
+
rr,
|
|
661
|
+
{
|
|
662
|
+
label: o.formCode,
|
|
663
|
+
value: `V${o.version}`,
|
|
664
|
+
color: "info.main",
|
|
665
|
+
tooltipValue: `Version ${o.version} of ${o.formName} will be synced`,
|
|
666
|
+
showTooltip: !0,
|
|
667
|
+
valueSize: 30,
|
|
668
|
+
fontSize: "0.8rem"
|
|
669
|
+
}
|
|
670
|
+
)
|
|
671
|
+
},
|
|
672
|
+
o.formUUID
|
|
673
|
+
))
|
|
674
|
+
}
|
|
675
|
+
),
|
|
676
|
+
/* @__PURE__ */ r(j, { sx: { mb: 1 } }),
|
|
677
|
+
w != -1 && (() => {
|
|
678
|
+
var o;
|
|
679
|
+
const t = b.find(
|
|
680
|
+
(e) => e.formCode === w
|
|
681
|
+
);
|
|
682
|
+
return /* @__PURE__ */ s(
|
|
683
|
+
c,
|
|
684
|
+
{
|
|
685
|
+
spacing: 2,
|
|
686
|
+
container: !0,
|
|
687
|
+
sx: { maxHeight: "50vh", overflowY: "scroll" },
|
|
688
|
+
children: [
|
|
689
|
+
(t == null ? void 0 : t.migrationList.length) === 0 && /* @__PURE__ */ r(c, { size: 12, children: /* @__PURE__ */ s(oe, { height: "250px", children: [
|
|
690
|
+
"No migration queries present for (",
|
|
691
|
+
t.formName,
|
|
692
|
+
")"
|
|
693
|
+
] }) }),
|
|
694
|
+
(o = t == null ? void 0 : t.migrationList) == null ? void 0 : o.map(
|
|
695
|
+
(e) => {
|
|
696
|
+
var n, l;
|
|
697
|
+
return /* @__PURE__ */ s(
|
|
698
|
+
c,
|
|
699
|
+
{
|
|
700
|
+
size: 12,
|
|
701
|
+
container: !0,
|
|
702
|
+
children: [
|
|
703
|
+
/* @__PURE__ */ r(c, { size: 1, children: /* @__PURE__ */ r(
|
|
704
|
+
ke,
|
|
705
|
+
{
|
|
706
|
+
value: ((n = Object.keys(
|
|
707
|
+
L[w] || {}
|
|
708
|
+
)) == null ? void 0 : n.includes(e.uuid)) && (!(f != null && f.includes(
|
|
709
|
+
e.uuid
|
|
710
|
+
)) || u == "DOWNLOAD"),
|
|
711
|
+
checked: ((l = Object.keys(
|
|
712
|
+
L[w] || {}
|
|
713
|
+
)) == null ? void 0 : l.includes(e.uuid)) && (!(f != null && f.includes(
|
|
714
|
+
e.uuid
|
|
715
|
+
)) || u == "DOWNLOAD"),
|
|
716
|
+
disabled: (f == null ? void 0 : f.includes(
|
|
717
|
+
e.uuid
|
|
718
|
+
)) && u === "SYNC",
|
|
719
|
+
sx: {
|
|
720
|
+
"& .MuiSvgIcon-root": {
|
|
721
|
+
fontSize: 32
|
|
722
|
+
},
|
|
723
|
+
mr: 1
|
|
724
|
+
},
|
|
725
|
+
onChange: (i) => {
|
|
726
|
+
we(
|
|
727
|
+
i,
|
|
728
|
+
w,
|
|
729
|
+
e
|
|
730
|
+
);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
) }),
|
|
734
|
+
/* @__PURE__ */ r(c, { size: 11, children: /* @__PURE__ */ s(
|
|
735
|
+
Me,
|
|
736
|
+
{
|
|
737
|
+
slotProps: {
|
|
738
|
+
transition: { unmountOnExit: !0 }
|
|
739
|
+
},
|
|
740
|
+
children: [
|
|
741
|
+
/* @__PURE__ */ r(
|
|
742
|
+
Re,
|
|
743
|
+
{
|
|
744
|
+
expandIcon: /* @__PURE__ */ r(
|
|
745
|
+
x,
|
|
746
|
+
{
|
|
747
|
+
icon: Ke
|
|
748
|
+
}
|
|
749
|
+
),
|
|
750
|
+
"aria-controls": "panel1-content",
|
|
751
|
+
id: "panel1-header",
|
|
752
|
+
sx: {
|
|
753
|
+
backgroundColor: "background.default"
|
|
754
|
+
},
|
|
755
|
+
children: /* @__PURE__ */ s(q, { component: "span", children: [
|
|
756
|
+
"Created on :",
|
|
757
|
+
" ",
|
|
758
|
+
De(e.createdOn),
|
|
759
|
+
/* @__PURE__ */ r(
|
|
760
|
+
I,
|
|
761
|
+
{
|
|
762
|
+
sx: { ml: 2 },
|
|
763
|
+
size: "small",
|
|
764
|
+
color: e.isExecuted ? "success" : "warning",
|
|
765
|
+
label: e.isExecuted ? "Executed" : "Not Executed"
|
|
766
|
+
}
|
|
767
|
+
),
|
|
768
|
+
e.isExecuted && e.isError && /* @__PURE__ */ r(
|
|
769
|
+
I,
|
|
770
|
+
{
|
|
771
|
+
sx: { ml: 2 },
|
|
772
|
+
size: "small",
|
|
773
|
+
color: "error",
|
|
774
|
+
label: "Error"
|
|
775
|
+
}
|
|
776
|
+
),
|
|
777
|
+
(f == null ? void 0 : f.includes(
|
|
778
|
+
e.uuid
|
|
779
|
+
)) && u === "SYNC" && /* @__PURE__ */ r(
|
|
780
|
+
I,
|
|
781
|
+
{
|
|
782
|
+
sx: { ml: 2 },
|
|
783
|
+
size: "small",
|
|
784
|
+
color: "info",
|
|
785
|
+
label: "Synced"
|
|
786
|
+
}
|
|
787
|
+
)
|
|
788
|
+
] })
|
|
789
|
+
}
|
|
790
|
+
),
|
|
791
|
+
/* @__PURE__ */ r(qe, { children: /* @__PURE__ */ r(
|
|
792
|
+
or,
|
|
793
|
+
{
|
|
794
|
+
mode: "READ_ONLY",
|
|
795
|
+
defaultValue: e == null ? void 0 : e.query
|
|
796
|
+
}
|
|
797
|
+
) })
|
|
798
|
+
]
|
|
799
|
+
}
|
|
800
|
+
) })
|
|
801
|
+
]
|
|
802
|
+
},
|
|
803
|
+
e.uuid
|
|
804
|
+
);
|
|
805
|
+
}
|
|
806
|
+
)
|
|
807
|
+
]
|
|
808
|
+
},
|
|
809
|
+
t.formCode
|
|
810
|
+
);
|
|
811
|
+
})()
|
|
812
|
+
] }) : /* @__PURE__ */ r(h, { sx: { mt: 1 }, children: /* @__PURE__ */ r(oe, { height: "250px", children: "Please select forms to sync" }) }) }) })
|
|
813
|
+
] })
|
|
814
|
+
] }),
|
|
815
|
+
/* @__PURE__ */ s(
|
|
816
|
+
h,
|
|
817
|
+
{
|
|
818
|
+
sx: {
|
|
819
|
+
my: 1,
|
|
820
|
+
display: "flex",
|
|
821
|
+
justifyContent: "end",
|
|
822
|
+
alignItems: "center"
|
|
823
|
+
},
|
|
824
|
+
children: [
|
|
825
|
+
["SYNC"].includes(u) && /* @__PURE__ */ r(
|
|
826
|
+
ee,
|
|
827
|
+
{
|
|
828
|
+
type: "submit",
|
|
829
|
+
startIcon: /* @__PURE__ */ r(x, { size: "lg", icon: Qe }),
|
|
830
|
+
color: "success",
|
|
831
|
+
size: "small",
|
|
832
|
+
variant: "contained",
|
|
833
|
+
sx: { mr: 1 },
|
|
834
|
+
children: "Start Syncing"
|
|
835
|
+
}
|
|
836
|
+
),
|
|
837
|
+
["DOWNLOAD"].includes(u) && /* @__PURE__ */ r(
|
|
838
|
+
ee,
|
|
839
|
+
{
|
|
840
|
+
type: "submit",
|
|
841
|
+
startIcon: /* @__PURE__ */ r(x, { size: "lg", icon: Ze }),
|
|
842
|
+
color: "success",
|
|
843
|
+
size: "small",
|
|
844
|
+
variant: "contained",
|
|
845
|
+
sx: { mr: 1 },
|
|
846
|
+
children: "Download Config"
|
|
847
|
+
}
|
|
848
|
+
)
|
|
849
|
+
]
|
|
850
|
+
}
|
|
851
|
+
)
|
|
852
|
+
] })
|
|
853
|
+
]
|
|
854
|
+
}
|
|
855
|
+
) })
|
|
856
|
+
}
|
|
857
|
+
);
|
|
858
|
+
}
|
|
859
|
+
tr.propTypes = {
|
|
860
|
+
id: z.any,
|
|
861
|
+
selectedFeature: z.any,
|
|
862
|
+
navigationState: z.any,
|
|
863
|
+
openServerSyncModal: z.any,
|
|
864
|
+
openModalFunc: z.any
|
|
865
|
+
};
|
|
866
|
+
export {
|
|
867
|
+
tr as default
|
|
868
|
+
};
|
|
869
|
+
//# sourceMappingURL=ServerSyncModal-uNjGCQJz--PJ3F3xg.js.map
|