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