@realtek/core-theme 0.0.46 → 0.0.47
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-lib/index.cjs +1 -1
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +524 -524
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/style.css +1 -1
- package/package.json +1 -1
package/dist-lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e, { Fragment as t, useCallback as n, useEffect as r, useMemo as i, useRef as a, useState as o } from "react";
|
|
2
|
-
import { Alert as s, AutoComplete as c, Avatar as l, Badge as u, Breadcrumb as d, Button as f, Card as p, Checkbox as m, Col as h, Collapse as g, DatePicker as _, Divider as v, Drawer as y, Dropdown as b, Empty as x, Flex as S, Form as C, Input as w, InputNumber as T, Layout as E, Mentions as D, Menu as O, Modal as k, Pagination as A, Popconfirm as j, Popover as M, Progress as
|
|
3
|
-
import { AimOutlined as
|
|
2
|
+
import { Alert as s, AutoComplete as c, Avatar as l, Badge as u, Breadcrumb as d, Button as f, Card as p, Checkbox as m, Col as h, Collapse as g, DatePicker as _, Divider as v, Drawer as y, Dropdown as b, Empty as x, Flex as S, Form as C, Input as w, InputNumber as T, Layout as E, Mentions as D, Menu as O, Modal as k, Pagination as A, Popconfirm as j, Popover as M, Progress as ee, Radio as N, Result as P, Row as F, Select as I, Slider as te, Space as L, Spin as R, Statistic as z, Steps as ne, Switch as B, Table as re, Tabs as ie, Tag as V, TimePicker as ae, Tooltip as H, Typography as U, Upload as oe, message as W } from "antd";
|
|
3
|
+
import { AimOutlined as G, AlignLeftOutlined as se, AppstoreAddOutlined as ce, AppstoreOutlined as le, ArrowLeftOutlined as ue, BankOutlined as de, BarChartOutlined as fe, BellOutlined as pe, BgColorsOutlined as me, BoldOutlined as he, BuildOutlined as ge, CalendarOutlined as _e, CheckCircleOutlined as ve, CheckOutlined as ye, ClockCircleOutlined as be, CloseCircleOutlined as xe, CloseOutlined as Se, CloudDownloadOutlined as Ce, CloudUploadOutlined as we, CopyOutlined as Te, CrownOutlined as Ee, DashboardOutlined as De, DeleteOutlined as Oe, DollarOutlined as ke, DownOutlined as Ae, DownloadOutlined as je, EditOutlined as Me, EnvironmentOutlined as Ne, ExclamationCircleFilled as Pe, ExclamationCircleOutlined as Fe, EyeOutlined as Ie, FileExcelOutlined as Le, FileImageOutlined as Re, FileOutlined as ze, FilePdfOutlined as Be, FileTextOutlined as Ve, FileUnknownOutlined as He, FileWordOutlined as Ue, FilterOutlined as We, FontColorsOutlined as Ge, GlobalOutlined as Ke, HighlightOutlined as qe, HolderOutlined as Je, HomeOutlined as Ye, InfoCircleOutlined as Xe, ItalicOutlined as Ze, LaptopOutlined as Qe, LeftOutlined as $e, LikeOutlined as et, LinkOutlined as tt, LinkedinFilled as nt, LockOutlined as rt, LogoutOutlined as it, MailOutlined as at, MergeCellsOutlined as ot, MinusCircleOutlined as st, MoreOutlined as ct, NotificationOutlined as lt, OrderedListOutlined as ut, PaperClipOutlined as dt, PhoneOutlined as ft, PlusOutlined as pt, ProfileOutlined as mt, ProjectOutlined as ht, ReloadOutlined as gt, RightOutlined as _t, RobotOutlined as vt, SafetyCertificateOutlined as yt, SafetyOutlined as bt, SaveOutlined as xt, SearchOutlined as St, SettingOutlined as Ct, SnippetsOutlined as wt, SolutionOutlined as Tt, StarOutlined as Et, TableOutlined as Dt, TagsOutlined as Ot, TeamOutlined as kt, ThunderboltOutlined as At, ToolOutlined as jt, UnderlineOutlined as Mt, UnlockOutlined as Nt, UnorderedListOutlined as Pt, UpOutlined as Ft, UploadOutlined as It, UserOutlined as Lt, ZoomInOutlined as Rt, ZoomOutOutlined as zt } from "@ant-design/icons";
|
|
4
4
|
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
5
5
|
import { Link as Bt, Outlet as Vt, useLocation as Ht, useNavigate as Ut, useParams as Wt, useSearchParams as Gt } from "react-router-dom";
|
|
6
6
|
import Kt from "dayjs";
|
|
@@ -1645,7 +1645,7 @@ function li({ docs: e, initialIndex: t, onClose: i }) {
|
|
|
1645
1645
|
let n = await t.blob(), r = URL.createObjectURL(n), i = document.createElement("a");
|
|
1646
1646
|
i.href = r, i.download = e.name || "document", document.body.appendChild(i), i.click(), i.remove(), URL.revokeObjectURL(r);
|
|
1647
1647
|
} catch {
|
|
1648
|
-
|
|
1648
|
+
W.info("Opening file in a new tab…"), window.open(e.url, "_blank", "noopener,noreferrer");
|
|
1649
1649
|
}
|
|
1650
1650
|
}, []);
|
|
1651
1651
|
function v() {
|
|
@@ -4574,7 +4574,7 @@ function uc({ filterInputType: e, fieldType: t, disabled: n, loading: r, valueOp
|
|
|
4574
4574
|
})
|
|
4575
4575
|
}) : s === "radio" ? /* @__PURE__ */ q(R, {
|
|
4576
4576
|
spinning: r,
|
|
4577
|
-
children: /* @__PURE__ */ q(
|
|
4577
|
+
children: /* @__PURE__ */ q(N.Group, {
|
|
4578
4578
|
disabled: n,
|
|
4579
4579
|
options: i,
|
|
4580
4580
|
style: {
|
|
@@ -4675,7 +4675,7 @@ function mc({ moduleName: e, open: t = !1, filters: n = [], onClose: o, onApply:
|
|
|
4675
4675
|
filters: []
|
|
4676
4676
|
}), l?.(), o?.();
|
|
4677
4677
|
}
|
|
4678
|
-
function
|
|
4678
|
+
function ee() {
|
|
4679
4679
|
D.current = !0;
|
|
4680
4680
|
let t = (u.getFieldsValue().filters ?? []).map(({ locked: e, ...t }) => {
|
|
4681
4681
|
let n = h.find((e) => e.value === t.field), r = n?.label ?? t.field, i = n?.filterInputType, a = i === "datepicker" || n?.type === "date", o = i === "number-range" || !i && n?.type === "number", s = i === "text";
|
|
@@ -4723,7 +4723,7 @@ function mc({ moduleName: e, open: t = !1, filters: n = [], onClose: o, onApply:
|
|
|
4723
4723
|
filters: t
|
|
4724
4724
|
}), o?.();
|
|
4725
4725
|
}
|
|
4726
|
-
function
|
|
4726
|
+
function N(e, t) {
|
|
4727
4727
|
let n = u.getFieldValue("filters") ?? [];
|
|
4728
4728
|
u.setFieldValue("filters", n.map((t, n) => n === e ? {
|
|
4729
4729
|
...t,
|
|
@@ -4759,7 +4759,7 @@ function mc({ moduleName: e, open: t = !1, filters: n = [], onClose: o, onApply:
|
|
|
4759
4759
|
children: "Reset"
|
|
4760
4760
|
}), /* @__PURE__ */ q(nc, {
|
|
4761
4761
|
variant: "primary",
|
|
4762
|
-
onClick:
|
|
4762
|
+
onClick: ee,
|
|
4763
4763
|
children: "Apply"
|
|
4764
4764
|
})]
|
|
4765
4765
|
}),
|
|
@@ -4847,7 +4847,7 @@ function mc({ moduleName: e, open: t = !1, filters: n = [], onClose: o, onApply:
|
|
|
4847
4847
|
options: y,
|
|
4848
4848
|
optionFilterProp: "label",
|
|
4849
4849
|
loading: p,
|
|
4850
|
-
onChange: (e) =>
|
|
4850
|
+
onChange: (e) => N(t.name, e)
|
|
4851
4851
|
})
|
|
4852
4852
|
})
|
|
4853
4853
|
}), /* @__PURE__ */ q(C.Item, {
|
|
@@ -5449,21 +5449,21 @@ function wl({ filters: e, onRemove: t, onClearAll: n }) {
|
|
|
5449
5449
|
]
|
|
5450
5450
|
});
|
|
5451
5451
|
}
|
|
5452
|
-
function Tl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSource: a = [], className: s = "", initialPageSize: c = 10, onAction: l, onSummaryClick: d, rowKey: h, showSummaryButton: g = !1, summaryButtonLabel: _ = "View Summary", summaryRoute: v, tabs: y, tableClassName: C = "job-list-table", fields: T = yl, listName: E = "", loading: D = !1, total: O, current: k, pageSize: A, onPageChange: j, onPageSizeChange: M, onSearch:
|
|
5453
|
-
let z = Ut(), ne = Ht(), { canView: B, canAdd: ie, canEdit: V, canDelete: ae } = js(e), [U] = Gt(),
|
|
5454
|
-
current:
|
|
5452
|
+
function Tl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSource: a = [], className: s = "", initialPageSize: c = 10, onAction: l, onSummaryClick: d, rowKey: h, showSummaryButton: g = !1, summaryButtonLabel: _ = "View Summary", summaryRoute: v, tabs: y, tableClassName: C = "job-list-table", fields: T = yl, listName: E = "", loading: D = !1, total: O, current: k, pageSize: A, onPageChange: j, onPageSizeChange: M, onSearch: ee, showSearch: N = !0, showViewToggle: P = !1, activeView: F = "list", onViewChange: I, createAction: te }) {
|
|
5453
|
+
let z = Ut(), ne = Ht(), { canView: B, canAdd: ie, canEdit: V, canDelete: ae } = js(e), [U] = Gt(), oe = _l(U), [G, se] = o("all"), [ce, ue] = o(""), [de, fe] = o(""), [pe, me] = o(!1), [he, ge] = o([]), [_e, ve] = o([]), [ye, be] = o([]), [xe, Se] = o(0), [Ce, we] = o({
|
|
5454
|
+
current: oe,
|
|
5455
5455
|
pageSize: c
|
|
5456
5456
|
}), [Te, Ee] = o({
|
|
5457
5457
|
sort: "",
|
|
5458
5458
|
sortDir: ""
|
|
5459
|
-
}), [De, Oe] = o([]), [ke, je] = o(!1), [Me, Ne] = o([]), [Pe, Fe] = o(a), [Ie, Le] = o(a.length), [Re, ze] = o([]), [Be, Ve] = o([]), [He, Ue] = o(""), [Ge, Ke] = o(!1), [qe, Je] = o(null), [Ye, Xe] = o(null), [Ze, Qe] = o(!1), $e = !!(j || M ||
|
|
5459
|
+
}), [De, Oe] = o([]), [ke, je] = o(!1), [Me, Ne] = o([]), [Pe, Fe] = o(a), [Ie, Le] = o(a.length), [Re, ze] = o([]), [Be, Ve] = o([]), [He, Ue] = o(""), [Ge, Ke] = o(!1), [qe, Je] = o(null), [Ye, Xe] = o(null), [Ze, Qe] = o(!1), $e = !!(j || M || ee), et = $e ? a : Pe, tt = $e ? O ?? 0 : Ie, rt = i(() => fl(t), [t]);
|
|
5460
5460
|
console.log("Rows received by ListView:", a), console.log("Length:", a?.length);
|
|
5461
5461
|
let it = i(() => new Map(rt.map((e) => [e.key, e])), [rt]), at = i(() => rt.filter((e) => {
|
|
5462
5462
|
let t = e.permissionKey ?? (e.danger ? "delete" : e.key === "edit" ? "edit" : null);
|
|
5463
|
-
return t === "edit" && !V || t === "delete" && !ae ? !1 : e.allowedTabs ? e.allowedTabs.some((e) => il(e) === il(
|
|
5463
|
+
return t === "edit" && !V || t === "delete" && !ae ? !1 : e.allowedTabs ? e.allowedTabs.some((e) => il(e) === il(G)) : !0;
|
|
5464
5464
|
}), [
|
|
5465
5465
|
rt,
|
|
5466
|
-
|
|
5466
|
+
G,
|
|
5467
5467
|
V,
|
|
5468
5468
|
ae
|
|
5469
5469
|
]), ot = typeof e == "string" ? e.trim().length > 0 : !!e, st = ot ? `/${String(e).trim()}-create${te ? `?action=${encodeURIComponent(te)}` : ""}` : "";
|
|
@@ -5491,11 +5491,11 @@ function Tl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
|
|
|
5491
5491
|
lt(1, { replace: !0 });
|
|
5492
5492
|
}, { config: dt, loading: ft, error: mt } = Es(!$e && ot ? e : null);
|
|
5493
5493
|
r(() => {
|
|
5494
|
-
we((e) => e.current ===
|
|
5494
|
+
we((e) => e.current === oe ? e : {
|
|
5495
5495
|
...e,
|
|
5496
|
-
current:
|
|
5496
|
+
current: oe
|
|
5497
5497
|
});
|
|
5498
|
-
}, [
|
|
5498
|
+
}, [oe]), r(() => {
|
|
5499
5499
|
$e && we((e) => {
|
|
5500
5500
|
let t = gl(k ?? e.current), n = Number(A) > 0 ? Number(A) : e.pageSize;
|
|
5501
5501
|
return e.current === t && e.pageSize === n ? e : {
|
|
@@ -5512,11 +5512,11 @@ function Tl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
|
|
|
5512
5512
|
r(() => {
|
|
5513
5513
|
ht && (ve([]), be([]), Se((e) => e + 1));
|
|
5514
5514
|
}, [ht]);
|
|
5515
|
-
let gt = i(() => [...Array.isArray(y) ? y : [], ...Re].find((e, t) => String(al(e, t)) ===
|
|
5516
|
-
|
|
5515
|
+
let gt = i(() => [...Array.isArray(y) ? y : [], ...Re].find((e, t) => String(al(e, t)) === G), [
|
|
5516
|
+
G,
|
|
5517
5517
|
Re,
|
|
5518
5518
|
y
|
|
5519
|
-
]), _t = gt?.field ?? gt?.fieldName ?? gt?.filterField ?? gt?.dataIndex ?? He, vt = ol(
|
|
5519
|
+
]), _t = gt?.field ?? gt?.fieldName ?? gt?.filterField ?? gt?.dataIndex ?? He, vt = ol(G) ? "" : G, yt = !vt && !ol(G) && il(_t).length > 0, bt = de.trim().length >= 3, xt = he.some((e) => e.field), Ct = hl({
|
|
5520
5520
|
moduleName: e,
|
|
5521
5521
|
activeTabScope: vt,
|
|
5522
5522
|
pageSize: Ce.pageSize,
|
|
@@ -5547,7 +5547,7 @@ function Tl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
|
|
|
5547
5547
|
tabField: o
|
|
5548
5548
|
});
|
|
5549
5549
|
}).catch((e) => {
|
|
5550
|
-
t || (Fe([]), Le(0), ze([]), Ve([]), Ue(""), Je(e.message), ot &&
|
|
5550
|
+
t || (Fe([]), Le(0), ze([]), Ve([]), Ue(""), Je(e.message), ot && W.error("Invalid module name or data could not be loaded."));
|
|
5551
5551
|
}).finally(() => {
|
|
5552
5552
|
t || Ke(!1);
|
|
5553
5553
|
}), () => {
|
|
@@ -5590,10 +5590,10 @@ function Tl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
|
|
|
5590
5590
|
key: e.key,
|
|
5591
5591
|
label: e.label
|
|
5592
5592
|
})), [Tt]), Dt = Et.map((e) => e.key), Ot = De.filter((e) => Dt.includes(e)), kt = Ot.length ? Ot : Et.slice(0, 6).map((e) => e.key), At = Math.min(6, Et.length), jt = kt.length > 6, Mt = i(() => Tt.filter((e) => !e.cardHidden && (e.tableHidden || kt.includes(e.key))), [Tt, kt]), Nt = i(() => {
|
|
5593
|
-
let e = ce.toLowerCase(), t = et, n = yt ? t.filter((e) => sl(e,
|
|
5593
|
+
let e = ce.toLowerCase(), t = et, n = yt ? t.filter((e) => sl(e, G, gt, Tt, _t)) : t;
|
|
5594
5594
|
return !e || e.length < 3 ? n : n.filter((t) => Tt.some((n) => String(Cc(t, n.key)).toLowerCase().includes(e)));
|
|
5595
5595
|
}, [
|
|
5596
|
-
|
|
5596
|
+
G,
|
|
5597
5597
|
gt,
|
|
5598
5598
|
_t,
|
|
5599
5599
|
yt,
|
|
@@ -5623,11 +5623,11 @@ function Tl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
|
|
|
5623
5623
|
y
|
|
5624
5624
|
]);
|
|
5625
5625
|
r(() => {
|
|
5626
|
-
if (Vt.length && !Vt.some((e) => String(e?.key ?? e?.value ?? e?.id) ===
|
|
5626
|
+
if (Vt.length && !Vt.some((e) => String(e?.key ?? e?.value ?? e?.id) === G)) {
|
|
5627
5627
|
let e = Vt[0]?.key ?? Vt[0]?.value ?? Vt[0]?.id;
|
|
5628
5628
|
e && se(String(e));
|
|
5629
5629
|
}
|
|
5630
|
-
}, [
|
|
5630
|
+
}, [G, Vt]);
|
|
5631
5631
|
let Wt = (t) => {
|
|
5632
5632
|
z("/popup/preview", { state: {
|
|
5633
5633
|
background: ne,
|
|
@@ -5682,8 +5682,8 @@ function Tl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
|
|
|
5682
5682
|
kt
|
|
5683
5683
|
]), qt = (e, t, n) => {
|
|
5684
5684
|
let r = pl(n), i = r.field ?? r.columnKey ?? "", a = ll(r.order);
|
|
5685
|
-
if ($e && typeof
|
|
5686
|
-
|
|
5685
|
+
if ($e && typeof ee == "function") {
|
|
5686
|
+
ee(a ? String(i) : "", a);
|
|
5687
5687
|
return;
|
|
5688
5688
|
}
|
|
5689
5689
|
Ee({
|
|
@@ -5760,7 +5760,7 @@ function Tl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
|
|
|
5760
5760
|
}, [
|
|
5761
5761
|
Ce.current,
|
|
5762
5762
|
Ce.pageSize,
|
|
5763
|
-
|
|
5763
|
+
G
|
|
5764
5764
|
]);
|
|
5765
5765
|
let nn = (e) => {
|
|
5766
5766
|
Ne((t) => {
|
|
@@ -5797,7 +5797,7 @@ function Tl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
|
|
|
5797
5797
|
align: "center",
|
|
5798
5798
|
justify: "space-between",
|
|
5799
5799
|
children: [/* @__PURE__ */ q(Is, {
|
|
5800
|
-
activeKey:
|
|
5800
|
+
activeKey: G,
|
|
5801
5801
|
tabs: Vt,
|
|
5802
5802
|
onChange: (e) => {
|
|
5803
5803
|
se(e), ve([]), be([]), ut();
|
|
@@ -5839,7 +5839,7 @@ function Tl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
|
|
|
5839
5839
|
})
|
|
5840
5840
|
})
|
|
5841
5841
|
}),
|
|
5842
|
-
|
|
5842
|
+
P && /* @__PURE__ */ J(S, {
|
|
5843
5843
|
align: "center",
|
|
5844
5844
|
gap: 6,
|
|
5845
5845
|
children: [/* @__PURE__ */ q(H, {
|
|
@@ -6338,7 +6338,7 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6338
6338
|
open: !1,
|
|
6339
6339
|
docs: [],
|
|
6340
6340
|
index: 0
|
|
6341
|
-
}), [A, j] = o(null), M = a([]),
|
|
6341
|
+
}), [A, j] = o(null), M = a([]), ee = e.lookupFilterValueFrom ? Pl(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], P = C.useWatch(ee, t), F = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], te = C.useWatch(F, t), z = p || (e.disabledByField ? jl(te) : !1), ne = e.lookupFilterValueFrom && Object.prototype.hasOwnProperty.call(u, e.lookupFilterValueFrom) ? u[e.lookupFilterValueFrom] : P;
|
|
6342
6342
|
r(() => {
|
|
6343
6343
|
if (d === "location") {
|
|
6344
6344
|
let t = !1;
|
|
@@ -6428,7 +6428,7 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6428
6428
|
E,
|
|
6429
6429
|
i
|
|
6430
6430
|
]);
|
|
6431
|
-
let B = Nl(e.options ?? e.values ?? []), re = h ?? B, ie = (e.multiSelect ? "multiple" : e.mode ?? (jl(e.multiple) ? "multiple" : void 0)) ?? (io(e) === "array" ? "multiple" : void 0), V = ["select", "location"].includes(d), H = e.placeholder ?? `${V ? "Select" : "Enter"} ${String(e.label ?? "").toLowerCase()}`, U = Xl(e),
|
|
6431
|
+
let B = Nl(e.options ?? e.values ?? []), re = h ?? B, ie = (e.multiSelect ? "multiple" : e.mode ?? (jl(e.multiple) ? "multiple" : void 0)) ?? (io(e) === "array" ? "multiple" : void 0), V = ["select", "location"].includes(d), H = e.placeholder ?? `${V ? "Select" : "Enter"} ${String(e.label ?? "").toLowerCase()}`, U = Xl(e), G = (e) => {
|
|
6432
6432
|
l?.(e), setTimeout(() => {
|
|
6433
6433
|
t.validateFields([n]).catch(() => {});
|
|
6434
6434
|
}, 0);
|
|
@@ -6447,12 +6447,12 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6447
6447
|
let { cleaned: e, error: t } = To(n, se, "change");
|
|
6448
6448
|
j(t), n = e;
|
|
6449
6449
|
}
|
|
6450
|
-
|
|
6450
|
+
G(n);
|
|
6451
6451
|
},
|
|
6452
6452
|
...se && {
|
|
6453
6453
|
onBlur: (e) => {
|
|
6454
6454
|
let { cleaned: t, error: n } = To(e.target.value, se, "blur");
|
|
6455
|
-
j(n), t !== e.target.value &&
|
|
6455
|
+
j(n), t !== e.target.value && G(t);
|
|
6456
6456
|
},
|
|
6457
6457
|
onKeyPress: (e) => {
|
|
6458
6458
|
let t = wo(se.type);
|
|
@@ -6473,7 +6473,7 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6473
6473
|
disabled: z,
|
|
6474
6474
|
mode: "tags",
|
|
6475
6475
|
placeholder: H,
|
|
6476
|
-
onChange:
|
|
6476
|
+
onChange: G
|
|
6477
6477
|
});
|
|
6478
6478
|
if (d === "location") return /* @__PURE__ */ q(I, {
|
|
6479
6479
|
value: s,
|
|
@@ -6487,7 +6487,7 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6487
6487
|
notFoundContent: v ? /* @__PURE__ */ q(R, { size: "small" }) : void 0,
|
|
6488
6488
|
onSearch: x,
|
|
6489
6489
|
onFocus: () => x((e) => e),
|
|
6490
|
-
onChange:
|
|
6490
|
+
onChange: G
|
|
6491
6491
|
});
|
|
6492
6492
|
if (d === "select") {
|
|
6493
6493
|
let r = e.dataSource === "lookup", i = e.dataSource === "master", a = r || i;
|
|
@@ -6504,7 +6504,7 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6504
6504
|
notFoundContent: v ? /* @__PURE__ */ q(R, { size: "small" }) : void 0,
|
|
6505
6505
|
onSearch: r ? T : i ? D : void 0,
|
|
6506
6506
|
onChange: (r) => {
|
|
6507
|
-
if (
|
|
6507
|
+
if (G(r), e.autofillFrom && r != null && M.current.length > 0) {
|
|
6508
6508
|
let i = e.valueField ?? "_id", a = M.current.find((e) => Fl(e, i) === r || e._id === r || e.id === r);
|
|
6509
6509
|
a && (e.autofillFrom ?? []).forEach(({ optionKey: e, targetField: r }) => {
|
|
6510
6510
|
let i = Fl(a, e), o = Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), r] : [r];
|
|
@@ -6514,23 +6514,23 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6514
6514
|
}
|
|
6515
6515
|
});
|
|
6516
6516
|
}
|
|
6517
|
-
if (d === "radio") return /* @__PURE__ */ q(
|
|
6517
|
+
if (d === "radio") return /* @__PURE__ */ q(N.Group, {
|
|
6518
6518
|
value: s,
|
|
6519
6519
|
disabled: z,
|
|
6520
6520
|
options: re,
|
|
6521
|
-
onChange: (e) =>
|
|
6521
|
+
onChange: (e) => G(e.target.value)
|
|
6522
6522
|
});
|
|
6523
6523
|
if (d === "checkbox") return re.length > 0 ? /* @__PURE__ */ q(m.Group, {
|
|
6524
6524
|
value: s,
|
|
6525
6525
|
disabled: z,
|
|
6526
6526
|
options: re,
|
|
6527
|
-
onChange:
|
|
6527
|
+
onChange: G
|
|
6528
6528
|
}) : /* @__PURE__ */ q(m, {
|
|
6529
6529
|
checked: !!(c ?? s),
|
|
6530
6530
|
disabled: z,
|
|
6531
6531
|
onChange: (r) => {
|
|
6532
6532
|
let i = r.target.checked;
|
|
6533
|
-
if (
|
|
6533
|
+
if (G(i), e.linkedClearField && i) {
|
|
6534
6534
|
let r = Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.linkedClearField] : [e.linkedClearField];
|
|
6535
6535
|
t.setFieldValue(r, null);
|
|
6536
6536
|
}
|
|
@@ -6545,7 +6545,7 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6545
6545
|
let { error: t } = To(e, se, "change");
|
|
6546
6546
|
j(t);
|
|
6547
6547
|
}
|
|
6548
|
-
|
|
6548
|
+
G(e);
|
|
6549
6549
|
}
|
|
6550
6550
|
}), A && /* @__PURE__ */ q("div", {
|
|
6551
6551
|
className: "v1-input-validator-hint",
|
|
@@ -6567,14 +6567,14 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6567
6567
|
value: s ?? null,
|
|
6568
6568
|
disabledDate: Zl(e),
|
|
6569
6569
|
defaultPickerValue: Ql(e),
|
|
6570
|
-
onChange: (e) =>
|
|
6570
|
+
onChange: (e) => G(e)
|
|
6571
6571
|
});
|
|
6572
6572
|
if (d === "time") return /* @__PURE__ */ q(ae, {
|
|
6573
6573
|
disabled: z,
|
|
6574
6574
|
placeholder: H,
|
|
6575
6575
|
style: { width: "100%" },
|
|
6576
6576
|
value: s ?? null,
|
|
6577
|
-
onChange: (e) =>
|
|
6577
|
+
onChange: (e) => G(e)
|
|
6578
6578
|
});
|
|
6579
6579
|
if (d === "file") {
|
|
6580
6580
|
let t = e.validations ?? e.validation ?? e.rules ?? [], n = t.find((e) => (typeof e == "string" ? e : e?.type) === "fileType"), r = t.find((e) => (typeof e == "string" ? e : e?.type) === "fileSize"), i = t.find((e) => (typeof e == "string" ? e : e?.type) === "maxFiles"), a = n?.value ? n.value.split(",").map((e) => `.${e.trim().replace(/^\./, "")}`).join(",") : void 0, o = r ? Number(r?.value ?? 5) : void 0, c = i ? Number(i?.value ?? 1) : jl(e.multiple) ? e.maxCount ?? 5 : 1, l = Array.isArray(s) ? s : [], u = l.length < c, d = (e) => e ? e < 1024 * 1024 ? `${(e / 1024).toFixed(0)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB` : "", p = (e) => {
|
|
@@ -6592,7 +6592,7 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6592
6592
|
"webp"
|
|
6593
6593
|
].includes(t) ? /* @__PURE__ */ q(Re, { className: "v1-file-type-icon v1-file-icon-image" }) : /* @__PURE__ */ q(ze, { className: "v1-file-type-icon v1-file-icon-default" });
|
|
6594
6594
|
}, m = (e) => {
|
|
6595
|
-
|
|
6595
|
+
G(l.filter((t, n) => n !== e));
|
|
6596
6596
|
}, h = (e, t) => {
|
|
6597
6597
|
k({
|
|
6598
6598
|
open: !0,
|
|
@@ -6606,14 +6606,14 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6606
6606
|
index: t ?? 0
|
|
6607
6607
|
});
|
|
6608
6608
|
}, g = c > 1, _ = c - l.length, v = [a ? a.split(",").map((e) => e.replace(".", "").toUpperCase()).join(", ") : null, o ? `up to ${o} MB` : null].filter(Boolean).join(" "), y = g && l.length > 0 ? [v, `${_} of ${c} remaining`].filter(Boolean).join(" • ") : v, b = l.length > 0 ? `Add ${g ? "more files" : "file"}` : e.buttonLabel ?? `Upload ${e.label ?? "File"}`, x = (e) => {
|
|
6609
|
-
if (l.length >= c) return
|
|
6609
|
+
if (l.length >= c) return oe.LIST_IGNORE;
|
|
6610
6610
|
if (a) {
|
|
6611
6611
|
let t = (e.name.split(".").pop() ?? "").toLowerCase();
|
|
6612
|
-
if (!a.split(",").map((e) => e.replace(/^\./, "").toLowerCase()).includes(t)) return
|
|
6612
|
+
if (!a.split(",").map((e) => e.replace(/^\./, "").toLowerCase()).includes(t)) return W.error(n?.message ?? `Only ${n.value} files are allowed`), oe.LIST_IGNORE;
|
|
6613
6613
|
}
|
|
6614
|
-
return o !== void 0 && e.size / 1024 / 1024 > o ? (
|
|
6614
|
+
return o !== void 0 && e.size / 1024 / 1024 > o ? (W.error(r?.message ?? `File must be smaller than ${o} MB`), oe.LIST_IGNORE) : !1;
|
|
6615
6615
|
}, S = ({ fileList: e }) => {
|
|
6616
|
-
|
|
6616
|
+
G(e.slice(0, c));
|
|
6617
6617
|
}, C = {
|
|
6618
6618
|
accept: a,
|
|
6619
6619
|
fileList: l,
|
|
@@ -6672,7 +6672,7 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6672
6672
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J("div", {
|
|
6673
6673
|
className: "v1-file-upload-wrapper",
|
|
6674
6674
|
children: [
|
|
6675
|
-
u && /* @__PURE__ */ q(
|
|
6675
|
+
u && /* @__PURE__ */ q(oe, {
|
|
6676
6676
|
...C,
|
|
6677
6677
|
style: {
|
|
6678
6678
|
width: "100%",
|
|
@@ -6703,7 +6703,7 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6703
6703
|
className: "v1-file-grid",
|
|
6704
6704
|
children: w
|
|
6705
6705
|
}),
|
|
6706
|
-
u && l.length > 0 && /* @__PURE__ */ q(
|
|
6706
|
+
u && l.length > 0 && /* @__PURE__ */ q(oe, {
|
|
6707
6707
|
...C,
|
|
6708
6708
|
style: { display: "inline-block" },
|
|
6709
6709
|
children: /* @__PURE__ */ q(f, {
|
|
@@ -6722,7 +6722,7 @@ function nu({ field: e, form: t, name: n, moduleName: i, value: s, checked: c, o
|
|
|
6722
6722
|
children: [l.length > 0 && /* @__PURE__ */ q("div", {
|
|
6723
6723
|
className: "v1-file-rows-single",
|
|
6724
6724
|
children: w
|
|
6725
|
-
}), u && /* @__PURE__ */ q(
|
|
6725
|
+
}), u && /* @__PURE__ */ q(oe, {
|
|
6726
6726
|
accept: a,
|
|
6727
6727
|
fileList: l,
|
|
6728
6728
|
showUploadList: !1,
|
|
@@ -6808,18 +6808,18 @@ function ou({ group: e }) {
|
|
|
6808
6808
|
})]
|
|
6809
6809
|
});
|
|
6810
6810
|
}
|
|
6811
|
-
function su({ moduleName: e, action: t, clientId:
|
|
6812
|
-
let
|
|
6811
|
+
function su({ moduleName: e, action: t, clientId: a, region: c, requireClientScope: l = !1, formGroups: u, loading: d = !1, error: m = "", breadcrumbItems: g = [], formType: _ = "add", submitText: v, cancelPath: y = "/candidates", onSubmit: b, initialRecord: x = null, prefillFromUrl: S = !1, extraPayload: w = null, listViewProps: T = {} }) {
|
|
6812
|
+
let E = _ === "search", D = v ?? (E ? "Search" : "Create"), O = Ut(), k = Wt(), [A] = Gt(), [j] = C.useForm(), [M, ee] = o(!1), [N, P] = o({}), [te, z] = o([]), [ne, re] = o(!!e), [ie, V] = o(""), [ae, H] = o(""), [U, oe] = o(!1), [G, se] = o({
|
|
6813
6813
|
searched: !1,
|
|
6814
6814
|
rows: [],
|
|
6815
6815
|
total: 0,
|
|
6816
6816
|
fields: [],
|
|
6817
6817
|
loading: !1
|
|
6818
|
-
}), [
|
|
6818
|
+
}), [ce, le] = o({
|
|
6819
6819
|
current: 1,
|
|
6820
6820
|
pageSize: 10
|
|
6821
|
-
}), [
|
|
6822
|
-
for (let e of Ll(
|
|
6821
|
+
}), [ue, de] = o([]), [fe, pe] = o(a ?? ""), [me, he] = o(c ?? ""), [ge, _e] = o(null), [ve, ye] = o(!1), be = e ? te : u ?? Ol, xe = e ? ne : d, Se = e ? ie : m, Ce = a || fe, we = c || me, Te = i(() => Rl(be), [be]), { hasClientScope: Ee, clientGateMessage: De } = i(() => {
|
|
6822
|
+
for (let e of Ll(be)) for (let t of e.fields ?? []) if (jl(t.clientScope)) return {
|
|
6823
6823
|
hasClientScope: !0,
|
|
6824
6824
|
clientGateMessage: t.clientGateMessage || ""
|
|
6825
6825
|
};
|
|
@@ -6827,26 +6827,26 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
6827
6827
|
hasClientScope: !1,
|
|
6828
6828
|
clientGateMessage: ""
|
|
6829
6829
|
};
|
|
6830
|
-
}, [
|
|
6830
|
+
}, [be]), ke = l || Ee, je = ke && !Ce;
|
|
6831
6831
|
r(() => {
|
|
6832
|
-
|
|
6833
|
-
}, [
|
|
6832
|
+
ke && Di({ limit: 200 }).then(de).catch(() => de([]));
|
|
6833
|
+
}, [ke]), r(() => {
|
|
6834
6834
|
if (!e) return;
|
|
6835
6835
|
let n = !1;
|
|
6836
6836
|
async function r() {
|
|
6837
6837
|
try {
|
|
6838
|
-
|
|
6839
|
-
let r =
|
|
6838
|
+
re(!0), V("");
|
|
6839
|
+
let r = E ? await wa(e, "search", t) : await mi({
|
|
6840
6840
|
module: e,
|
|
6841
6841
|
action: t,
|
|
6842
|
-
clientId:
|
|
6843
|
-
region:
|
|
6842
|
+
clientId: Ce,
|
|
6843
|
+
region: we
|
|
6844
6844
|
});
|
|
6845
|
-
n || (
|
|
6845
|
+
n || (z(Ll(E ? r?.[0] : r)), E && H(r?.[0]?.label || ""));
|
|
6846
6846
|
} catch (t) {
|
|
6847
|
-
console.error(`Failed to fetch ${e} form groups:`, t), n ||
|
|
6847
|
+
console.error(`Failed to fetch ${e} form groups:`, t), n || V(t?.message || "Failed to fetch form groups");
|
|
6848
6848
|
} finally {
|
|
6849
|
-
n ||
|
|
6849
|
+
n || re(!1);
|
|
6850
6850
|
}
|
|
6851
6851
|
}
|
|
6852
6852
|
return r(), () => {
|
|
@@ -6855,13 +6855,13 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
6855
6855
|
}, [
|
|
6856
6856
|
e,
|
|
6857
6857
|
t,
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6858
|
+
E,
|
|
6859
|
+
Ce,
|
|
6860
|
+
we
|
|
6861
6861
|
]);
|
|
6862
|
-
let
|
|
6863
|
-
if (!
|
|
6864
|
-
let e =
|
|
6862
|
+
let Me = i(() => {
|
|
6863
|
+
if (!S) return null;
|
|
6864
|
+
let e = A.get("candidateId") || "", t = A.get("submissionId") || "", n = String(A.get("isFromSubmission")) === "true", r = k.jobId && k.jobId !== "_" ? k.jobId : A.get("jobId") || "", i = n && t ? {
|
|
6865
6865
|
module: "submissions",
|
|
6866
6866
|
id: t
|
|
6867
6867
|
} : e ? {
|
|
@@ -6873,46 +6873,46 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
6873
6873
|
linkage: Object.keys(a).length ? a : null
|
|
6874
6874
|
};
|
|
6875
6875
|
}, [
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6876
|
+
S,
|
|
6877
|
+
A,
|
|
6878
|
+
k
|
|
6879
6879
|
]);
|
|
6880
6880
|
r(() => {
|
|
6881
|
-
let e =
|
|
6881
|
+
let e = Me?.source;
|
|
6882
6882
|
if (!e) return;
|
|
6883
6883
|
let t = !1;
|
|
6884
6884
|
async function n() {
|
|
6885
6885
|
try {
|
|
6886
|
-
|
|
6886
|
+
ye(!0);
|
|
6887
6887
|
let n = await mi({
|
|
6888
6888
|
module: e.module,
|
|
6889
6889
|
id: e.id
|
|
6890
6890
|
});
|
|
6891
|
-
t ||
|
|
6891
|
+
t || _e(Ll(n));
|
|
6892
6892
|
} catch (e) {
|
|
6893
|
-
console.error("Failed to fetch prefill data:", e), t ||
|
|
6893
|
+
console.error("Failed to fetch prefill data:", e), t || _e([]);
|
|
6894
6894
|
} finally {
|
|
6895
|
-
t ||
|
|
6895
|
+
t || ye(!1);
|
|
6896
6896
|
}
|
|
6897
6897
|
}
|
|
6898
6898
|
return n(), () => {
|
|
6899
6899
|
t = !0;
|
|
6900
6900
|
};
|
|
6901
|
-
}, [
|
|
6902
|
-
let
|
|
6903
|
-
if (!
|
|
6901
|
+
}, [Me]);
|
|
6902
|
+
let Ne = i(() => ge ? Object.fromEntries(ge.filter((e) => e.addRow && Array.isArray(e.rows) && e.rows.length > 0).map((e) => [e.payloadKey || e.name, e.rows])) : {}, [ge]), Pe = i(() => {
|
|
6903
|
+
if (!ge) return null;
|
|
6904
6904
|
let e = {};
|
|
6905
|
-
return
|
|
6905
|
+
return ge.forEach((t) => {
|
|
6906
6906
|
t.addRow || (t.fields ?? []).forEach((t) => {
|
|
6907
6907
|
!t.field || t.value === void 0 || t.value === null || (e[t.field] = t.value, t.payloadKey && t.payloadKey !== t.field && (e[t.payloadKey] = t.value));
|
|
6908
6908
|
});
|
|
6909
6909
|
}), Object.keys(e).length > 0 ? e : null;
|
|
6910
|
-
}, [
|
|
6910
|
+
}, [ge]);
|
|
6911
6911
|
r(() => {
|
|
6912
|
-
let e =
|
|
6913
|
-
if (!e ||
|
|
6912
|
+
let e = x ?? Pe;
|
|
6913
|
+
if (!e || xe || Te.length === 0) return;
|
|
6914
6914
|
let t = {};
|
|
6915
|
-
|
|
6915
|
+
Te.forEach((n) => {
|
|
6916
6916
|
if (n.toggleEnabled && n.toggleField) {
|
|
6917
6917
|
let r = zl(e, { field: n.toggleField });
|
|
6918
6918
|
r != null && (t[n.toggleField] = !!r);
|
|
@@ -6925,19 +6925,19 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
6925
6925
|
e.length > 0 && (t[n.field] = e);
|
|
6926
6926
|
} else t[n.field] = xo(n, r);
|
|
6927
6927
|
});
|
|
6928
|
-
}), Object.keys(t).length > 0 &&
|
|
6928
|
+
}), Object.keys(t).length > 0 && j.setFieldsValue(t);
|
|
6929
6929
|
}, [
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6930
|
+
x,
|
|
6931
|
+
Pe,
|
|
6932
|
+
xe,
|
|
6933
|
+
Te,
|
|
6934
|
+
j
|
|
6935
6935
|
]);
|
|
6936
|
-
let
|
|
6937
|
-
...
|
|
6938
|
-
...
|
|
6939
|
-
},
|
|
6940
|
-
let t =
|
|
6936
|
+
let Fe = l && Ce ? { clientId: Ce } : {}, Ie = Me?.linkage ?? {
|
|
6937
|
+
...Fe,
|
|
6938
|
+
...w ?? {}
|
|
6939
|
+
}, Le = !je && !xe && (!Me?.source || ge !== null && !ve), Re = (e) => {
|
|
6940
|
+
let t = Ne[e.payloadKey || e.name], n = Math.max(0, Number(e.minRows ?? 0) || 0);
|
|
6941
6941
|
if (!t || t.length === 0) {
|
|
6942
6942
|
let t = e.initialRows === void 0 ? n : Math.max(n, Math.max(0, Number(e.initialRows) || 0));
|
|
6943
6943
|
return Array.from({ length: t }, () => ({}));
|
|
@@ -6952,14 +6952,14 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
6952
6952
|
});
|
|
6953
6953
|
for (; r.length < n;) r.push({});
|
|
6954
6954
|
return r;
|
|
6955
|
-
},
|
|
6955
|
+
}, ze = (e) => P((t) => ({
|
|
6956
6956
|
...t,
|
|
6957
6957
|
[e]: !t[e]
|
|
6958
|
-
})),
|
|
6959
|
-
|
|
6960
|
-
},
|
|
6961
|
-
if (
|
|
6962
|
-
|
|
6958
|
+
})), Be = () => {
|
|
6959
|
+
j.resetFields(), P({});
|
|
6960
|
+
}, Ve = n(async (t) => {
|
|
6961
|
+
if (E) try {
|
|
6962
|
+
se((e) => ({
|
|
6963
6963
|
...e,
|
|
6964
6964
|
loading: !0,
|
|
6965
6965
|
searched: !0
|
|
@@ -6968,10 +6968,10 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
6968
6968
|
limit: 1e3,
|
|
6969
6969
|
offset: 0
|
|
6970
6970
|
});
|
|
6971
|
-
|
|
6971
|
+
le((e) => ({
|
|
6972
6972
|
...e,
|
|
6973
6973
|
current: 1
|
|
6974
|
-
})),
|
|
6974
|
+
})), se({
|
|
6975
6975
|
searched: !0,
|
|
6976
6976
|
rows: n.rows,
|
|
6977
6977
|
total: n.total,
|
|
@@ -6979,7 +6979,7 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
6979
6979
|
loading: !1
|
|
6980
6980
|
});
|
|
6981
6981
|
} catch (e) {
|
|
6982
|
-
console.error("Search failed:", e),
|
|
6982
|
+
console.error("Search failed:", e), W.error(e?.message || "Failed to search records"), se({
|
|
6983
6983
|
searched: !0,
|
|
6984
6984
|
rows: [],
|
|
6985
6985
|
total: 0,
|
|
@@ -6987,13 +6987,13 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
6987
6987
|
loading: !1
|
|
6988
6988
|
});
|
|
6989
6989
|
}
|
|
6990
|
-
}, [
|
|
6991
|
-
if (
|
|
6992
|
-
await
|
|
6990
|
+
}, [E, e]), He = async (t) => {
|
|
6991
|
+
if (E) {
|
|
6992
|
+
await Ve(t);
|
|
6993
6993
|
return;
|
|
6994
6994
|
}
|
|
6995
|
-
if (
|
|
6996
|
-
await
|
|
6995
|
+
if (b) {
|
|
6996
|
+
await b(t);
|
|
6997
6997
|
return;
|
|
6998
6998
|
}
|
|
6999
6999
|
if (!e) {
|
|
@@ -7001,39 +7001,39 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7001
7001
|
return;
|
|
7002
7002
|
}
|
|
7003
7003
|
try {
|
|
7004
|
-
|
|
7005
|
-
let n = await hi(e, tu(t,
|
|
7004
|
+
oe(!0);
|
|
7005
|
+
let n = await hi(e, tu(t, Te, Ie ?? {}));
|
|
7006
7006
|
if (n?.status === !1) {
|
|
7007
|
-
|
|
7007
|
+
W.error(n?.error || n?.message || n?.data || "Something went wrong");
|
|
7008
7008
|
return;
|
|
7009
7009
|
}
|
|
7010
|
-
let r = _o(t,
|
|
7010
|
+
let r = _o(t, Te, {
|
|
7011
7011
|
scope: "addRow",
|
|
7012
7012
|
indexed: !0
|
|
7013
7013
|
}), i = n?.id ?? n?.data?.id ?? n?.data?._id ?? n?._id;
|
|
7014
7014
|
if (r.length > 0 && i) try {
|
|
7015
7015
|
await Va(e, i, {
|
|
7016
|
-
...
|
|
7017
|
-
...vo(t,
|
|
7016
|
+
...Ie ?? {},
|
|
7017
|
+
...vo(t, Te)
|
|
7018
7018
|
}, r);
|
|
7019
7019
|
} catch (e) {
|
|
7020
|
-
console.error("Document file attach (post-create update) failed:", e),
|
|
7020
|
+
console.error("Document file attach (post-create update) failed:", e), W.warning("Record created, but attaching document files failed. Edit the record to re-upload.");
|
|
7021
7021
|
}
|
|
7022
|
-
|
|
7022
|
+
W.success(n?.message || n?.data || `${e} created successfully`), j.resetFields();
|
|
7023
7023
|
let a = eu(e);
|
|
7024
|
-
a === "jobs" ?
|
|
7024
|
+
a === "jobs" ? O("/jobs") : a === "candidates" ? O("/candidates") : a === "onboarding" ? O("/onboarding") : a === "submission" && O("/submissions");
|
|
7025
7025
|
} catch (t) {
|
|
7026
|
-
console.error(`Failed to create ${e}:`, t),
|
|
7026
|
+
console.error(`Failed to create ${e}:`, t), W.error(t?.data?.error || t?.data?.message || t?.message || "Failed to create record");
|
|
7027
7027
|
} finally {
|
|
7028
|
-
|
|
7028
|
+
oe(!1);
|
|
7029
7029
|
}
|
|
7030
|
-
},
|
|
7030
|
+
}, Ue = (e, t) => (e.validations ?? e.validation ?? e.rules ?? []).filter((e) => {
|
|
7031
7031
|
let t = typeof e == "string" ? e : e?.type;
|
|
7032
7032
|
return t === "dateAfterField" || t === "greaterThanField";
|
|
7033
7033
|
}).map((e) => {
|
|
7034
7034
|
let n = e.value ?? e.compareField ?? e.field;
|
|
7035
7035
|
return n ? Gl(t, n) : null;
|
|
7036
|
-
}).filter(Boolean),
|
|
7036
|
+
}).filter(Boolean), We = (e, t, n) => {
|
|
7037
7037
|
if (!e?.field) return !0;
|
|
7038
7038
|
let r = t(n == null ? [e.field] : [...Array.isArray(n) ? n : [n], e.field]);
|
|
7039
7039
|
switch (e.operator) {
|
|
@@ -7043,11 +7043,11 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7043
7043
|
case "falsy": return r == null || r === "" || r === !1;
|
|
7044
7044
|
default: return !0;
|
|
7045
7045
|
}
|
|
7046
|
-
}, [
|
|
7046
|
+
}, [Ge, Ke] = o({}), qe = (e) => String(e?.field ?? ""), Je = (t, n, r, i = {}) => {
|
|
7047
7047
|
let a = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : null, o = a ?? t.field, s = n === void 0 ? o : [n, ...a ?? [t.field]], c = r !== void 0 && n !== void 0 ? [r, ...Array.isArray(s) ? s : [s]] : s, l = t.type === "checkbox" && (t.options && t.options.length > 0 || t.dataSource && t.dataSource !== "static"), u = !l && t.type === "checkbox" ? "checked" : "value", d = i.inline || !l && t.type === "checkbox" ? "" : /* @__PURE__ */ q(iu, {
|
|
7048
7048
|
field: t,
|
|
7049
7049
|
label: t.label
|
|
7050
|
-
}), f =
|
|
7050
|
+
}), f = Ue(t, c), p = i.inline || t.type === "file" && jl(t.multiple) || t.type === "text-editor" ? 24 : t.col ?? 12, m = r !== void 0 && n !== void 0 ? [r, n] : null, g = n === void 0 && t.type !== "file" && t.defaultValue !== void 0 && t.defaultValue !== "" ? t.defaultValue : void 0, _ = /* @__PURE__ */ q(C.Item, {
|
|
7051
7051
|
label: d,
|
|
7052
7052
|
name: s,
|
|
7053
7053
|
extra: t.helpText ? /* @__PURE__ */ q(El, {
|
|
@@ -7056,7 +7056,7 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7056
7056
|
children: t.helpText
|
|
7057
7057
|
}) : void 0,
|
|
7058
7058
|
required: jl(t.req),
|
|
7059
|
-
rules: Jl(t,
|
|
7059
|
+
rules: Jl(t, j, c, E),
|
|
7060
7060
|
dependencies: f,
|
|
7061
7061
|
valuePropName: u,
|
|
7062
7062
|
initialValue: g,
|
|
@@ -7064,10 +7064,10 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7064
7064
|
validateTrigger: ["onBlur", "onChange"],
|
|
7065
7065
|
children: /* @__PURE__ */ q(nu, {
|
|
7066
7066
|
field: t,
|
|
7067
|
-
form:
|
|
7067
|
+
form: j,
|
|
7068
7068
|
name: c,
|
|
7069
7069
|
moduleName: e,
|
|
7070
|
-
scopeValues: { clientId:
|
|
7070
|
+
scopeValues: { clientId: Ce }
|
|
7071
7071
|
})
|
|
7072
7072
|
}), v = i.inline ? {
|
|
7073
7073
|
flex: `${Number(t.combineWidth) > 0 ? Number(t.combineWidth) : 1} 1 0`,
|
|
@@ -7076,7 +7076,7 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7076
7076
|
return t.showIf?.field ? /* @__PURE__ */ q(C.Item, {
|
|
7077
7077
|
shouldUpdate: !0,
|
|
7078
7078
|
noStyle: !0,
|
|
7079
|
-
children: ({ getFieldValue: e }) =>
|
|
7079
|
+
children: ({ getFieldValue: e }) => We(t.showIf, e, m) ? /* @__PURE__ */ q(h, {
|
|
7080
7080
|
xs: 24,
|
|
7081
7081
|
md: p,
|
|
7082
7082
|
style: v,
|
|
@@ -7090,19 +7090,19 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7090
7090
|
className: i.inline ? "v1-combine-cell" : void 0,
|
|
7091
7091
|
children: _
|
|
7092
7092
|
}, t.field);
|
|
7093
|
-
},
|
|
7093
|
+
}, Ye = (e, t, n) => {
|
|
7094
7094
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
7095
7095
|
return e.forEach((a) => {
|
|
7096
7096
|
let o = a.combineKey?.trim?.();
|
|
7097
7097
|
if (!o) {
|
|
7098
|
-
i.push(
|
|
7098
|
+
i.push(Je(a, t, n));
|
|
7099
7099
|
return;
|
|
7100
7100
|
}
|
|
7101
7101
|
let s = `${n ?? "root"}:${t ?? "root"}:${o}`;
|
|
7102
7102
|
if (r.has(s)) return;
|
|
7103
7103
|
let c = e.filter((e) => e.combineKey === o);
|
|
7104
7104
|
c.forEach((e) => r.add(`${n ?? "root"}:${t ?? "root"}:${e.combineKey}`));
|
|
7105
|
-
let l = c.find((e) => e.combineLabel)?.combineLabel ?? a.combineLabel ?? a.label, u = c.find((e) => e.combineToggleTarget)?.combineToggleTarget, d = c.find((e) => e.combineToggleLabel)?.combineToggleLabel ?? "Show range", f = s, p = c.some((e) => jl(e.combineWrap)), m = Number(c.find((e) => [12, 24].includes(Number(e.combineSpan)))?.combineSpan), g = u ? c.find((e) =>
|
|
7105
|
+
let l = c.find((e) => e.combineLabel)?.combineLabel ?? a.combineLabel ?? a.label, u = c.find((e) => e.combineToggleTarget)?.combineToggleTarget, d = c.find((e) => e.combineToggleLabel)?.combineToggleLabel ?? "Show range", f = s, p = c.some((e) => jl(e.combineWrap)), m = Number(c.find((e) => [12, 24].includes(Number(e.combineSpan)))?.combineSpan), g = u ? c.find((e) => qe(e) === u) : null, _ = g?.field?.includes?.(".") ? g.field.split(".") : [g?.field].filter(Boolean), v = g ? n !== void 0 && t !== void 0 ? [
|
|
7106
7106
|
n,
|
|
7107
7107
|
t,
|
|
7108
7108
|
..._
|
|
@@ -7119,20 +7119,20 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7119
7119
|
noStyle: !0,
|
|
7120
7120
|
shouldUpdate: !0,
|
|
7121
7121
|
children: ({ getFieldValue: e }) => {
|
|
7122
|
-
let r = v ? !Vl(e(v)) : !1, i =
|
|
7122
|
+
let r = v ? !Vl(e(v)) : !1, i = Ge[f] ?? r, a = u && !i ? c.filter((e) => qe(e) !== u) : c;
|
|
7123
7123
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(F, {
|
|
7124
7124
|
gutter: [8, 0],
|
|
7125
7125
|
align: "top",
|
|
7126
7126
|
wrap: p,
|
|
7127
7127
|
className: `v1-combine-row${p ? " v1-combine-row-wrap" : ""}`,
|
|
7128
|
-
children: a.map((e) =>
|
|
7128
|
+
children: a.map((e) => Je(e, t, n, { inline: !0 }))
|
|
7129
7129
|
}), u && /* @__PURE__ */ J("div", {
|
|
7130
7130
|
className: "v1-combine-range",
|
|
7131
7131
|
children: [/* @__PURE__ */ q(B, {
|
|
7132
7132
|
size: "small",
|
|
7133
7133
|
checked: i,
|
|
7134
7134
|
onChange: (e) => {
|
|
7135
|
-
!e && v && (
|
|
7135
|
+
!e && v && (j.setFieldValue(v, void 0), j.validateFields([v]).catch(() => {})), Ke((t) => ({
|
|
7136
7136
|
...t,
|
|
7137
7137
|
[f]: e
|
|
7138
7138
|
}));
|
|
@@ -7148,20 +7148,20 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7148
7148
|
})
|
|
7149
7149
|
}, s));
|
|
7150
7150
|
}), i;
|
|
7151
|
-
},
|
|
7152
|
-
if (
|
|
7153
|
-
let e =
|
|
7151
|
+
}, Xe = i(() => {
|
|
7152
|
+
if (G.fields?.length) return G.fields;
|
|
7153
|
+
let e = G.rows[0];
|
|
7154
7154
|
return e ? Object.keys(e).filter((t) => !t.startsWith("_") && typeof e[t] != "object").map((e) => ({
|
|
7155
7155
|
value: e,
|
|
7156
7156
|
field: e,
|
|
7157
7157
|
label: e.replace(/([A-Z])/g, " $1").replace(/^./, (e) => e.toUpperCase()),
|
|
7158
7158
|
isVisible: !0
|
|
7159
7159
|
})) : [];
|
|
7160
|
-
}, [
|
|
7161
|
-
return /* @__PURE__ */ J("main", { children: [
|
|
7160
|
+
}, [G.fields, G.rows]);
|
|
7161
|
+
return /* @__PURE__ */ J("main", { children: [g.length > 0 && /* @__PURE__ */ q(Vo, { items: g }), /* @__PURE__ */ J("div", {
|
|
7162
7162
|
className: "v1-edit-page",
|
|
7163
7163
|
children: [
|
|
7164
|
-
|
|
7164
|
+
ke && /* @__PURE__ */ q(p, {
|
|
7165
7165
|
className: "v1-card v1-edit-card v1-client-gate-card",
|
|
7166
7166
|
children: /* @__PURE__ */ J(L, {
|
|
7167
7167
|
direction: "vertical",
|
|
@@ -7172,9 +7172,9 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7172
7172
|
icon: /* @__PURE__ */ q(Lt, {}),
|
|
7173
7173
|
title: "Select Client"
|
|
7174
7174
|
}),
|
|
7175
|
-
|
|
7175
|
+
De && /* @__PURE__ */ q(El, {
|
|
7176
7176
|
type: "secondary",
|
|
7177
|
-
children:
|
|
7177
|
+
children: De
|
|
7178
7178
|
}),
|
|
7179
7179
|
/* @__PURE__ */ q(F, {
|
|
7180
7180
|
gutter: [16, 0],
|
|
@@ -7186,13 +7186,13 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7186
7186
|
allowClear: !0,
|
|
7187
7187
|
placeholder: "Select client",
|
|
7188
7188
|
style: { width: "100%" },
|
|
7189
|
-
value:
|
|
7189
|
+
value: Ce || void 0,
|
|
7190
7190
|
optionFilterProp: "label",
|
|
7191
|
-
options:
|
|
7191
|
+
options: ue.map((e) => ({
|
|
7192
7192
|
value: e._id ?? e.id,
|
|
7193
7193
|
label: e.clientName ?? e.name ?? e.clientRefrenceId ?? e._id
|
|
7194
7194
|
})).filter((e) => e.value),
|
|
7195
|
-
onChange: (e) =>
|
|
7195
|
+
onChange: (e) => pe(e ?? "")
|
|
7196
7196
|
})
|
|
7197
7197
|
})
|
|
7198
7198
|
})
|
|
@@ -7202,10 +7202,10 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7202
7202
|
/* @__PURE__ */ q("div", {
|
|
7203
7203
|
className: "v1-page-inner",
|
|
7204
7204
|
children: /* @__PURE__ */ q(R, {
|
|
7205
|
-
spinning: !
|
|
7205
|
+
spinning: !Le && !je,
|
|
7206
7206
|
description: "Loading form fields...",
|
|
7207
7207
|
children: /* @__PURE__ */ J(C, {
|
|
7208
|
-
form:
|
|
7208
|
+
form: j,
|
|
7209
7209
|
layout: "vertical",
|
|
7210
7210
|
colon: !1,
|
|
7211
7211
|
className: "v1-form",
|
|
@@ -7213,12 +7213,12 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7213
7213
|
className: "v1-required-mark",
|
|
7214
7214
|
children: " *"
|
|
7215
7215
|
})] }),
|
|
7216
|
-
onFinish:
|
|
7216
|
+
onFinish: He,
|
|
7217
7217
|
children: [
|
|
7218
|
-
|
|
7218
|
+
Le && Te.map((e, t) => {
|
|
7219
7219
|
let n = e.name ?? e.id ?? String(t), r = e.name ?? n, i = Math.max(0, Number(e.minRows ?? 0) || 0), a = e.addRow ? /* @__PURE__ */ q(C.List, {
|
|
7220
7220
|
name: r,
|
|
7221
|
-
initialValue:
|
|
7221
|
+
initialValue: Re(e),
|
|
7222
7222
|
rules: [{ validator: async (t, n = []) => {
|
|
7223
7223
|
if (i > 0 && n.length < i) throw Error(`Keep at least ${i} row${i > 1 ? "s" : ""}.`);
|
|
7224
7224
|
if (jl(e.requireOne) && n.some((e) => !Il(e))) throw Error("Fill at least one field in each added row.");
|
|
@@ -7248,7 +7248,7 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7248
7248
|
}), /* @__PURE__ */ q(F, {
|
|
7249
7249
|
gutter: [24, 0],
|
|
7250
7250
|
align: "top",
|
|
7251
|
-
children:
|
|
7251
|
+
children: Ye(e.fields, o, r)
|
|
7252
7252
|
})]
|
|
7253
7253
|
}, n)),
|
|
7254
7254
|
/* @__PURE__ */ q(C.ErrorList, { errors: o })
|
|
@@ -7256,13 +7256,13 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7256
7256
|
})
|
|
7257
7257
|
}) : /* @__PURE__ */ q(F, {
|
|
7258
7258
|
gutter: [24, 0],
|
|
7259
|
-
children:
|
|
7259
|
+
children: Ye(e.fields)
|
|
7260
7260
|
});
|
|
7261
7261
|
return /* @__PURE__ */ q(p, {
|
|
7262
7262
|
className: "v1-card v1-edit-card",
|
|
7263
7263
|
title: /* @__PURE__ */ q(ru, {
|
|
7264
7264
|
icon: kl[t % kl.length],
|
|
7265
|
-
title:
|
|
7265
|
+
title: E ? ae || e.label : e.label ?? e.name ?? "Details"
|
|
7266
7266
|
}),
|
|
7267
7267
|
extra: /* @__PURE__ */ J(L, {
|
|
7268
7268
|
size: 8,
|
|
@@ -7276,7 +7276,7 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7276
7276
|
size: "small",
|
|
7277
7277
|
icon: N[n] ? /* @__PURE__ */ q(Ae, {}) : /* @__PURE__ */ q(Ft, {}),
|
|
7278
7278
|
onClick: (e) => {
|
|
7279
|
-
e.stopPropagation(),
|
|
7279
|
+
e.stopPropagation(), ze(n);
|
|
7280
7280
|
}
|
|
7281
7281
|
})
|
|
7282
7282
|
]
|
|
@@ -7294,31 +7294,31 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7294
7294
|
})
|
|
7295
7295
|
}, n);
|
|
7296
7296
|
}),
|
|
7297
|
-
|
|
7297
|
+
Le && !Se && Te.length === 0 && /* @__PURE__ */ q(s, {
|
|
7298
7298
|
type: "info",
|
|
7299
7299
|
showIcon: !0,
|
|
7300
|
-
message:
|
|
7300
|
+
message: E ? "No search configuration found." : "No form fields are configured."
|
|
7301
7301
|
}),
|
|
7302
|
-
|
|
7302
|
+
Le && E && /* @__PURE__ */ q("div", {
|
|
7303
7303
|
className: "v1-search-form-actions",
|
|
7304
7304
|
children: /* @__PURE__ */ J(L, {
|
|
7305
7305
|
size: 12,
|
|
7306
7306
|
children: [
|
|
7307
7307
|
/* @__PURE__ */ q(f, {
|
|
7308
|
-
onClick:
|
|
7309
|
-
disabled: !
|
|
7308
|
+
onClick: Be,
|
|
7309
|
+
disabled: !Te.length,
|
|
7310
7310
|
children: "Reset"
|
|
7311
7311
|
}),
|
|
7312
7312
|
/* @__PURE__ */ q(f, {
|
|
7313
|
-
onClick: () =>
|
|
7313
|
+
onClick: () => O(y),
|
|
7314
7314
|
children: "Back"
|
|
7315
7315
|
}),
|
|
7316
7316
|
/* @__PURE__ */ q(f, {
|
|
7317
7317
|
type: "primary",
|
|
7318
7318
|
htmlType: "submit",
|
|
7319
|
-
disabled:
|
|
7320
|
-
loading:
|
|
7321
|
-
children:
|
|
7319
|
+
disabled: U || !Te.length,
|
|
7320
|
+
loading: U,
|
|
7321
|
+
children: D
|
|
7322
7322
|
})
|
|
7323
7323
|
]
|
|
7324
7324
|
})
|
|
@@ -7327,7 +7327,7 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7327
7327
|
})
|
|
7328
7328
|
})
|
|
7329
7329
|
}),
|
|
7330
|
-
!
|
|
7330
|
+
!E && /* @__PURE__ */ J("div", {
|
|
7331
7331
|
className: "v1-footer",
|
|
7332
7332
|
children: [/* @__PURE__ */ q(El, {
|
|
7333
7333
|
type: "secondary",
|
|
@@ -7335,36 +7335,36 @@ function su({ moduleName: e, action: t, clientId: n, region: a, requireClientSco
|
|
|
7335
7335
|
}), /* @__PURE__ */ J(L, {
|
|
7336
7336
|
size: 12,
|
|
7337
7337
|
children: [/* @__PURE__ */ q(f, {
|
|
7338
|
-
onClick: () =>
|
|
7338
|
+
onClick: () => O(y),
|
|
7339
7339
|
children: "Cancel"
|
|
7340
7340
|
}), /* @__PURE__ */ q(f, {
|
|
7341
7341
|
type: "primary",
|
|
7342
|
-
onClick: () =>
|
|
7343
|
-
disabled: !
|
|
7344
|
-
loading:
|
|
7345
|
-
children:
|
|
7342
|
+
onClick: () => j.submit(),
|
|
7343
|
+
disabled: !Le || U || !Te.length,
|
|
7344
|
+
loading: U,
|
|
7345
|
+
children: D
|
|
7346
7346
|
})]
|
|
7347
7347
|
})]
|
|
7348
7348
|
}),
|
|
7349
|
-
|
|
7349
|
+
E && G.searched && /* @__PURE__ */ q(Tl, {
|
|
7350
7350
|
moduleName: e || "candidates",
|
|
7351
7351
|
breadcrumbItems: [],
|
|
7352
|
-
dataSource:
|
|
7353
|
-
fields:
|
|
7354
|
-
total:
|
|
7355
|
-
loading:
|
|
7356
|
-
current:
|
|
7357
|
-
pageSize:
|
|
7358
|
-
onPageChange: (e, t) =>
|
|
7352
|
+
dataSource: G.rows,
|
|
7353
|
+
fields: Xe,
|
|
7354
|
+
total: G.total,
|
|
7355
|
+
loading: G.loading,
|
|
7356
|
+
current: ce.current,
|
|
7357
|
+
pageSize: ce.pageSize,
|
|
7358
|
+
onPageChange: (e, t) => le({
|
|
7359
7359
|
current: e,
|
|
7360
7360
|
pageSize: t
|
|
7361
7361
|
}),
|
|
7362
|
-
onPageSizeChange: (e) =>
|
|
7362
|
+
onPageSizeChange: (e) => le({
|
|
7363
7363
|
current: 1,
|
|
7364
7364
|
pageSize: e
|
|
7365
7365
|
}),
|
|
7366
7366
|
showSearch: !1,
|
|
7367
|
-
...
|
|
7367
|
+
...T
|
|
7368
7368
|
})
|
|
7369
7369
|
]
|
|
7370
7370
|
})] });
|
|
@@ -7480,16 +7480,16 @@ function bu({ jobId: e, sections: t = [], meta: n = [], rawDescription: r = "",
|
|
|
7480
7480
|
}
|
|
7481
7481
|
async function b() {
|
|
7482
7482
|
if (!u.trim()) {
|
|
7483
|
-
|
|
7483
|
+
W.warning("Please enter a job description");
|
|
7484
7484
|
return;
|
|
7485
7485
|
}
|
|
7486
7486
|
m(!0);
|
|
7487
7487
|
try {
|
|
7488
7488
|
await _u(e, u.trim());
|
|
7489
7489
|
let t = await gu(e);
|
|
7490
|
-
i?.(t), l(!1), d(""),
|
|
7490
|
+
i?.(t), l(!1), d(""), W.success("Description updated successfully");
|
|
7491
7491
|
} catch {
|
|
7492
|
-
|
|
7492
|
+
W.error("Failed to update description");
|
|
7493
7493
|
} finally {
|
|
7494
7494
|
m(!1);
|
|
7495
7495
|
}
|
|
@@ -8215,7 +8215,7 @@ function kd(e, t) {
|
|
|
8215
8215
|
});
|
|
8216
8216
|
}
|
|
8217
8217
|
function Ad({ listName: e = "List", fields: t = [], actions: n = [], dataSource: r = [], loading: s = !1, total: c, current: l, pageSize: u, onPageChange: d, onPageSizeChange: h, onSearch: g, rowSelection: _ = !0, className: v = "", tableClassName: y = "job-list-table", activeView: x = "list", onViewChange: C }) {
|
|
8218
|
-
let T = Ut(), E = Ht(), [D, O] = o("all"), [k, A] = o(""), [j, M] = o([]), [
|
|
8218
|
+
let T = Ut(), E = Ht(), [D, O] = o("all"), [k, A] = o(""), [j, M] = o([]), [ee, N] = o([]), [P, F] = o({
|
|
8219
8219
|
current: 1,
|
|
8220
8220
|
pageSize: 10
|
|
8221
8221
|
}), [I, te] = o([]), [L, z] = o(!1), ne = a(null), B = n.filter((e) => !e.maxSelect || j.length <= e.maxSelect).map((e) => ({
|
|
@@ -8227,18 +8227,18 @@ function Ad({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
8227
8227
|
!e.route || j.length === 0 || T(e.route, { state: {
|
|
8228
8228
|
background: E,
|
|
8229
8229
|
selectedIds: j,
|
|
8230
|
-
selectedRecords:
|
|
8230
|
+
selectedRecords: ee,
|
|
8231
8231
|
...e.popupState ?? {}
|
|
8232
8232
|
} });
|
|
8233
8233
|
}
|
|
8234
8234
|
})), V = typeof l == "number" && typeof u == "number", ae = V ? {
|
|
8235
8235
|
current: l,
|
|
8236
8236
|
pageSize: u
|
|
8237
|
-
} :
|
|
8237
|
+
} : P, U = i(() => t.map((e) => ({
|
|
8238
8238
|
...e,
|
|
8239
8239
|
key: Dd(e),
|
|
8240
8240
|
label: Ed(e)
|
|
8241
|
-
})).filter((e) => e.key && e.label && !e.tableHidden), [t]),
|
|
8241
|
+
})).filter((e) => e.key && e.label && !e.tableHidden), [t]), oe = I.length ? I : U.map((e) => e.key), W = i(() => {
|
|
8242
8242
|
if (g) return r;
|
|
8243
8243
|
let e = k.toLowerCase();
|
|
8244
8244
|
return !e || e.length < 3 ? r : r.filter((t) => U.some((n) => String(Od(t, n.key)).toLowerCase().includes(e)));
|
|
@@ -8247,16 +8247,16 @@ function Ad({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
8247
8247
|
U,
|
|
8248
8248
|
g,
|
|
8249
8249
|
k
|
|
8250
|
-
]),
|
|
8251
|
-
if (V) return
|
|
8250
|
+
]), G = typeof c == "number" ? c : k.trim() ? W.length : r.length, se = i(() => {
|
|
8251
|
+
if (V) return W;
|
|
8252
8252
|
let e = (ae.current - 1) * ae.pageSize;
|
|
8253
|
-
return
|
|
8253
|
+
return W.slice(e, e + ae.pageSize);
|
|
8254
8254
|
}, [
|
|
8255
8255
|
ae.current,
|
|
8256
8256
|
ae.pageSize,
|
|
8257
|
-
|
|
8257
|
+
W,
|
|
8258
8258
|
V
|
|
8259
|
-
]), ce = i(() => U.filter((e) =>
|
|
8259
|
+
]), ce = i(() => U.filter((e) => oe.includes(e.key)).map((e) => ({
|
|
8260
8260
|
title: e.label,
|
|
8261
8261
|
dataIndex: e.key,
|
|
8262
8262
|
key: e.key,
|
|
@@ -8269,7 +8269,7 @@ function Ad({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
8269
8269
|
className: "job-cell-primary",
|
|
8270
8270
|
children: Od(n, e.key)
|
|
8271
8271
|
})
|
|
8272
|
-
})), [U,
|
|
8272
|
+
})), [U, oe]), ue = oe.length === U.length, de = oe.length > 0 && !ue, fe = (e, t) => {
|
|
8273
8273
|
te((n) => {
|
|
8274
8274
|
let r = n.length ? n : U.map((e) => e.key);
|
|
8275
8275
|
return t ? r.includes(e) ? r : [...r, e] : r.filter((t) => t !== e);
|
|
@@ -8285,7 +8285,7 @@ function Ad({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
8285
8285
|
},
|
|
8286
8286
|
children: "Select All"
|
|
8287
8287
|
}), U.map((e) => /* @__PURE__ */ q(m, {
|
|
8288
|
-
checked:
|
|
8288
|
+
checked: oe.includes(e.key),
|
|
8289
8289
|
onChange: (t) => fe(e.key, t.target.checked),
|
|
8290
8290
|
children: e.label
|
|
8291
8291
|
}, e.key))]
|
|
@@ -8300,11 +8300,11 @@ function Ad({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
8300
8300
|
activeKey: D,
|
|
8301
8301
|
items: [{
|
|
8302
8302
|
key: "all",
|
|
8303
|
-
label: kd(e,
|
|
8303
|
+
label: kd(e, G)
|
|
8304
8304
|
}],
|
|
8305
8305
|
onChange: (e) => {
|
|
8306
8306
|
O(e), F({
|
|
8307
|
-
...
|
|
8307
|
+
...P,
|
|
8308
8308
|
current: 1
|
|
8309
8309
|
});
|
|
8310
8310
|
}
|
|
@@ -8321,7 +8321,7 @@ function Ad({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
8321
8321
|
A(t), g ? (clearTimeout(ne.current), ne.current = setTimeout(() => {
|
|
8322
8322
|
g(t), d?.(1);
|
|
8323
8323
|
}, 350)) : V ? d?.(1) : F({
|
|
8324
|
-
...
|
|
8324
|
+
...P,
|
|
8325
8325
|
current: 1
|
|
8326
8326
|
});
|
|
8327
8327
|
},
|
|
@@ -8407,7 +8407,7 @@ function Ad({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
8407
8407
|
type: "checkbox",
|
|
8408
8408
|
selectedRowKeys: j,
|
|
8409
8409
|
onChange: (e, t) => {
|
|
8410
|
-
M(e),
|
|
8410
|
+
M(e), N(t);
|
|
8411
8411
|
}
|
|
8412
8412
|
} : void 0,
|
|
8413
8413
|
columns: ce,
|
|
@@ -8424,7 +8424,7 @@ function Ad({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
|
|
|
8424
8424
|
/* @__PURE__ */ q(Ms, {
|
|
8425
8425
|
current: ae.current,
|
|
8426
8426
|
pageSize: ae.pageSize,
|
|
8427
|
-
total:
|
|
8427
|
+
total: G,
|
|
8428
8428
|
onChange: (e) => {
|
|
8429
8429
|
V ? d?.(e) : F((t) => ({
|
|
8430
8430
|
...t,
|
|
@@ -8631,10 +8631,10 @@ function Ld({ listName: e = "List", moduleName: t = "", actions: n = [], fields:
|
|
|
8631
8631
|
}), [D, O] = o([]), [k, A] = o([]), j = typeof l == "number" && typeof u == "number", M = j ? {
|
|
8632
8632
|
current: l,
|
|
8633
8633
|
pageSize: u
|
|
8634
|
-
} : T,
|
|
8634
|
+
} : T, ee = (e) => {
|
|
8635
8635
|
let t = e.id ?? e._id;
|
|
8636
8636
|
O((e) => e.includes(t) ? e.filter((e) => e !== t) : [...e, t]), A((n) => n.some((e) => (e.id ?? e._id) === t) ? n.filter((e) => (e.id ?? e._id) !== t) : [...n, e]);
|
|
8637
|
-
},
|
|
8637
|
+
}, N = n.filter((e) => !e.maxSelect || D.length <= e.maxSelect).map((e) => ({
|
|
8638
8638
|
key: e.key ?? e.name,
|
|
8639
8639
|
label: e.label ?? e.name,
|
|
8640
8640
|
danger: e.danger ?? !1,
|
|
@@ -8648,16 +8648,16 @@ function Ld({ listName: e = "List", moduleName: t = "", actions: n = [], fields:
|
|
|
8648
8648
|
...e.popupState ?? {}
|
|
8649
8649
|
} });
|
|
8650
8650
|
}
|
|
8651
|
-
})),
|
|
8651
|
+
})), P = i(() => r.map((e) => ({
|
|
8652
8652
|
...e,
|
|
8653
8653
|
key: Nd(e),
|
|
8654
8654
|
label: Md(e)
|
|
8655
8655
|
})).filter((e) => e.key && e.label), [r]), F = typeof c == "number" ? c : a.length, I = i(() => {
|
|
8656
8656
|
let e = x.toLowerCase();
|
|
8657
|
-
return !e || e.length < 3 ? a : a.filter((t) =>
|
|
8657
|
+
return !e || e.length < 3 ? a : a.filter((t) => P.some((n) => String(Pd(t, n.key)).toLowerCase().includes(e)));
|
|
8658
8658
|
}, [
|
|
8659
8659
|
a,
|
|
8660
|
-
|
|
8660
|
+
P,
|
|
8661
8661
|
x
|
|
8662
8662
|
]), te = i(() => {
|
|
8663
8663
|
if (j) return I;
|
|
@@ -8688,7 +8688,7 @@ function Ld({ listName: e = "List", moduleName: t = "", actions: n = [], fields:
|
|
|
8688
8688
|
children: F
|
|
8689
8689
|
}),
|
|
8690
8690
|
D.length > 0 && n.length > 0 && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(b, {
|
|
8691
|
-
menu: { items:
|
|
8691
|
+
menu: { items: N },
|
|
8692
8692
|
trigger: ["click"],
|
|
8693
8693
|
children: /* @__PURE__ */ J(f, {
|
|
8694
8694
|
type: "text",
|
|
@@ -8754,9 +8754,9 @@ function Ld({ listName: e = "List", moduleName: t = "", actions: n = [], fields:
|
|
|
8754
8754
|
className: "param-card-view__grid",
|
|
8755
8755
|
children: te.map((e, t) => /* @__PURE__ */ q(Id, {
|
|
8756
8756
|
record: e,
|
|
8757
|
-
fields:
|
|
8757
|
+
fields: P,
|
|
8758
8758
|
selected: D.includes(e.id ?? e._id),
|
|
8759
|
-
onSelect: () =>
|
|
8759
|
+
onSelect: () => ee(e)
|
|
8760
8760
|
}, e.id ?? e.key ?? t))
|
|
8761
8761
|
}) : !s && /* @__PURE__ */ q("div", {
|
|
8762
8762
|
className: "param-card-view__empty",
|
|
@@ -8982,7 +8982,7 @@ function qd({ icon: e, title: t }) {
|
|
|
8982
8982
|
});
|
|
8983
8983
|
}
|
|
8984
8984
|
function Jd({ jobId: e, onActionComplete: t, onDescriptionSaved: n }) {
|
|
8985
|
-
let [i] = C.useForm(), [a, s] = o(!1), [c, l] = o([]), [u, d] = o(0), [f, g] = o(1), [_, v] = o(null), [b, S] = o(!1), [T, E] = o(!1), [D, O] = o([0, 30]), [k, A] = o(["All", "Internal"]), [j, M] = o("list"), [
|
|
8985
|
+
let [i] = C.useForm(), [a, s] = o(!1), [c, l] = o([]), [u, d] = o(0), [f, g] = o(1), [_, v] = o(null), [b, S] = o(!1), [T, E] = o(!1), [D, O] = o([0, 30]), [k, A] = o(["All", "Internal"]), [j, M] = o("list"), [ee, N] = o(10), [P, z] = o(!1), [ne, B] = o(!1), [re, ie] = o(""), [V, ae] = o(!1), [H, U] = o(""), [oe, G] = o(!1);
|
|
8986
8986
|
r(() => {
|
|
8987
8987
|
ie("");
|
|
8988
8988
|
}, [e]);
|
|
@@ -9020,10 +9020,10 @@ function Jd({ jobId: e, onActionComplete: t, onDescriptionSaved: n }) {
|
|
|
9020
9020
|
ae(!1), U("");
|
|
9021
9021
|
}, de = async () => {
|
|
9022
9022
|
if (!H.trim()) {
|
|
9023
|
-
|
|
9023
|
+
W.warning("Please enter a job description");
|
|
9024
9024
|
return;
|
|
9025
9025
|
}
|
|
9026
|
-
|
|
9026
|
+
G(!0);
|
|
9027
9027
|
try {
|
|
9028
9028
|
await _u(e, H.trim()), ie(""), ae(!1), U(""), B(!0);
|
|
9029
9029
|
let t = await hs({
|
|
@@ -9040,16 +9040,16 @@ function Jd({ jobId: e, onActionComplete: t, onDescriptionSaved: n }) {
|
|
|
9040
9040
|
}
|
|
9041
9041
|
if (i) break;
|
|
9042
9042
|
}
|
|
9043
|
-
ie(i),
|
|
9043
|
+
ie(i), W.success("Description updated and parsed successfully"), n?.();
|
|
9044
9044
|
} catch {
|
|
9045
|
-
|
|
9045
|
+
W.error("Failed to update description");
|
|
9046
9046
|
} finally {
|
|
9047
|
-
|
|
9047
|
+
G(!1), B(!1);
|
|
9048
9048
|
}
|
|
9049
9049
|
}, fe = () => {
|
|
9050
9050
|
let e = k.filter((e) => e !== "All");
|
|
9051
9051
|
return e.length ? e.map((e) => e.toLowerCase()) : ["internal"];
|
|
9052
|
-
}, pe = (t, n = 0, r =
|
|
9052
|
+
}, pe = (t, n = 0, r = ee) => {
|
|
9053
9053
|
let i = fe();
|
|
9054
9054
|
return {
|
|
9055
9055
|
tenantId: localStorage.getItem("tenantId") || "",
|
|
@@ -9078,19 +9078,19 @@ function Jd({ jobId: e, onActionComplete: t, onDescriptionSaved: n }) {
|
|
|
9078
9078
|
offset: n,
|
|
9079
9079
|
limit: r
|
|
9080
9080
|
};
|
|
9081
|
-
}, me = async (e, t = 1, n =
|
|
9081
|
+
}, me = async (e, t = 1, n = ee) => {
|
|
9082
9082
|
let r = (t - 1) * n;
|
|
9083
9083
|
s(!0);
|
|
9084
9084
|
try {
|
|
9085
9085
|
let i = await vs(pe(e, r, n), r, n), a = i?.data?.data ?? i?.data?.applicant ?? [], o = i?.data?.count?.searchCount ?? i?.data?.count?.total ?? 0;
|
|
9086
9086
|
l(a.map(Kd)), d(o), g(t), v(e), S(!0), E(!0);
|
|
9087
9087
|
} catch (e) {
|
|
9088
|
-
console.error("Candidate search failed:", e),
|
|
9088
|
+
console.error("Candidate search failed:", e), W.error("Failed to search candidates. Please try again."), l([]), d(0), S(!0);
|
|
9089
9089
|
} finally {
|
|
9090
9090
|
s(!1);
|
|
9091
9091
|
}
|
|
9092
9092
|
}, he = (e) => me(e, 1), ge = (e, t) => {
|
|
9093
|
-
_ && (t && t !==
|
|
9093
|
+
_ && (t && t !== ee && N(t), me(_, e, t ?? ee));
|
|
9094
9094
|
}, _e = () => {
|
|
9095
9095
|
i.resetFields(), l([]), d(0), g(1), v(null), S(!1), E(!1), O([0, 30]), A(["All", "Internal"]);
|
|
9096
9096
|
}, ve = (e, t) => {
|
|
@@ -9322,7 +9322,7 @@ function Jd({ jobId: e, onActionComplete: t, onDescriptionSaved: n }) {
|
|
|
9322
9322
|
loading: a,
|
|
9323
9323
|
total: u,
|
|
9324
9324
|
current: f,
|
|
9325
|
-
pageSize:
|
|
9325
|
+
pageSize: ee,
|
|
9326
9326
|
onPageChange: ge,
|
|
9327
9327
|
onPageSizeChange: (e) => ge(1, e),
|
|
9328
9328
|
className: "sourcing-results-list",
|
|
@@ -9338,7 +9338,7 @@ function Jd({ jobId: e, onActionComplete: t, onDescriptionSaved: n }) {
|
|
|
9338
9338
|
loading: a,
|
|
9339
9339
|
total: u,
|
|
9340
9340
|
current: f,
|
|
9341
|
-
pageSize:
|
|
9341
|
+
pageSize: ee,
|
|
9342
9342
|
onPageChange: ge,
|
|
9343
9343
|
onPageSizeChange: (e) => ge(1, e),
|
|
9344
9344
|
className: "sourcing-results-list",
|
|
@@ -9356,7 +9356,7 @@ function Jd({ jobId: e, onActionComplete: t, onDescriptionSaved: n }) {
|
|
|
9356
9356
|
}),
|
|
9357
9357
|
placement: "right",
|
|
9358
9358
|
width: Math.min(860, window.innerWidth * .85),
|
|
9359
|
-
open:
|
|
9359
|
+
open: P,
|
|
9360
9360
|
onClose: () => {
|
|
9361
9361
|
z(!1), ae(!1), U("");
|
|
9362
9362
|
},
|
|
@@ -9420,7 +9420,7 @@ function Jd({ jobId: e, onActionComplete: t, onDescriptionSaved: n }) {
|
|
|
9420
9420
|
children: [/* @__PURE__ */ q(nc, {
|
|
9421
9421
|
variant: "primary",
|
|
9422
9422
|
size: "small",
|
|
9423
|
-
loading:
|
|
9423
|
+
loading: oe,
|
|
9424
9424
|
onClick: de,
|
|
9425
9425
|
children: "Save & Parse"
|
|
9426
9426
|
}), /* @__PURE__ */ q(nc, {
|
|
@@ -9632,20 +9632,20 @@ function tf({ jobId: e, onCountChange: t }) {
|
|
|
9632
9632
|
r(() => {
|
|
9633
9633
|
g(1), j(1, _);
|
|
9634
9634
|
}, [e]);
|
|
9635
|
-
let M = ef.filter((e) => E.includes(e.key)),
|
|
9635
|
+
let M = ef.filter((e) => E.includes(e.key)), ee = E.length === ef.length, N = E.length > 0 && !ee, P = (e, t) => {
|
|
9636
9636
|
D((n) => t ? n.includes(e) ? n : [...n, e] : n.length <= Qd ? n : n.filter((t) => t !== e));
|
|
9637
9637
|
}, F = /* @__PURE__ */ J("div", {
|
|
9638
9638
|
className: "column-visibility-menu",
|
|
9639
9639
|
onClick: (e) => e.stopPropagation(),
|
|
9640
9640
|
children: [/* @__PURE__ */ q(m, {
|
|
9641
|
-
checked:
|
|
9642
|
-
indeterminate:
|
|
9641
|
+
checked: ee,
|
|
9642
|
+
indeterminate: N,
|
|
9643
9643
|
onChange: (e) => D(e.target.checked ? ef.map((e) => e.key) : ef.slice(0, Qd).map((e) => e.key)),
|
|
9644
9644
|
children: "Select All"
|
|
9645
9645
|
}), ef.map((e) => /* @__PURE__ */ q(m, {
|
|
9646
9646
|
checked: E.includes(e.key),
|
|
9647
9647
|
disabled: E.includes(e.key) && E.length <= Qd,
|
|
9648
|
-
onChange: (t) =>
|
|
9648
|
+
onChange: (t) => P(e.key, t.target.checked),
|
|
9649
9649
|
children: e.label
|
|
9650
9650
|
}, e.key))]
|
|
9651
9651
|
});
|
|
@@ -9936,20 +9936,20 @@ function lf({ jobId: e, onCountChange: t }) {
|
|
|
9936
9936
|
r(() => {
|
|
9937
9937
|
g(1), j(1, _);
|
|
9938
9938
|
}, [e]);
|
|
9939
|
-
let M = cf.filter((e) => E.includes(e.key)),
|
|
9939
|
+
let M = cf.filter((e) => E.includes(e.key)), ee = E.length === cf.length, N = E.length > 0 && !ee, P = (e, t) => {
|
|
9940
9940
|
D((n) => t ? n.includes(e) ? n : [...n, e] : n.length <= of ? n : n.filter((t) => t !== e));
|
|
9941
9941
|
}, F = /* @__PURE__ */ J("div", {
|
|
9942
9942
|
className: "column-visibility-menu",
|
|
9943
9943
|
onClick: (e) => e.stopPropagation(),
|
|
9944
9944
|
children: [/* @__PURE__ */ q(m, {
|
|
9945
|
-
checked:
|
|
9946
|
-
indeterminate:
|
|
9945
|
+
checked: ee,
|
|
9946
|
+
indeterminate: N,
|
|
9947
9947
|
onChange: (e) => D(e.target.checked ? cf.map((e) => e.key) : cf.slice(0, of).map((e) => e.key)),
|
|
9948
9948
|
children: "Select All"
|
|
9949
9949
|
}), cf.map((e) => /* @__PURE__ */ q(m, {
|
|
9950
9950
|
checked: E.includes(e.key),
|
|
9951
9951
|
disabled: E.includes(e.key) && E.length <= of,
|
|
9952
|
-
onChange: (t) =>
|
|
9952
|
+
onChange: (t) => P(e.key, t.target.checked),
|
|
9953
9953
|
children: e.label
|
|
9954
9954
|
}, e.key))]
|
|
9955
9955
|
});
|
|
@@ -10264,20 +10264,20 @@ function yf({ jobId: e, onCountChange: t }) {
|
|
|
10264
10264
|
l,
|
|
10265
10265
|
d,
|
|
10266
10266
|
g
|
|
10267
|
-
]), M = vf.filter((e) => T.includes(e.key)),
|
|
10267
|
+
]), M = vf.filter((e) => T.includes(e.key)), ee = T.length === vf.length, N = T.length > 0 && !ee, P = (e, t) => {
|
|
10268
10268
|
E((n) => t ? n.includes(e) ? n : [...n, e] : n.length <= pf ? n : n.filter((t) => t !== e));
|
|
10269
10269
|
}, F = /* @__PURE__ */ J("div", {
|
|
10270
10270
|
className: "column-visibility-menu",
|
|
10271
10271
|
onClick: (e) => e.stopPropagation(),
|
|
10272
10272
|
children: [/* @__PURE__ */ q(m, {
|
|
10273
|
-
checked:
|
|
10274
|
-
indeterminate:
|
|
10273
|
+
checked: ee,
|
|
10274
|
+
indeterminate: N,
|
|
10275
10275
|
onChange: (e) => E(e.target.checked ? vf.map((e) => e.key) : vf.slice(0, pf).map((e) => e.key)),
|
|
10276
10276
|
children: "Select All"
|
|
10277
10277
|
}), vf.map((e) => /* @__PURE__ */ q(m, {
|
|
10278
10278
|
checked: T.includes(e.key),
|
|
10279
10279
|
disabled: T.includes(e.key) && T.length <= pf,
|
|
10280
|
-
onChange: (t) =>
|
|
10280
|
+
onChange: (t) => P(e.key, t.target.checked),
|
|
10281
10281
|
children: e.label
|
|
10282
10282
|
}, e.key))]
|
|
10283
10283
|
});
|
|
@@ -10779,7 +10779,7 @@ function Gf({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: a })
|
|
|
10779
10779
|
_(!1), y("");
|
|
10780
10780
|
}, O = async () => {
|
|
10781
10781
|
if (!v.trim()) {
|
|
10782
|
-
|
|
10782
|
+
W.warning("Please enter a job description");
|
|
10783
10783
|
return;
|
|
10784
10784
|
}
|
|
10785
10785
|
S(!0);
|
|
@@ -10790,9 +10790,9 @@ function Gf({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: a })
|
|
|
10790
10790
|
id: t,
|
|
10791
10791
|
view: "detail"
|
|
10792
10792
|
});
|
|
10793
|
-
l(Array.isArray(n) ? n : []),
|
|
10793
|
+
l(Array.isArray(n) ? n : []), W.success("Description updated and parsed successfully"), a?.();
|
|
10794
10794
|
} catch {
|
|
10795
|
-
|
|
10795
|
+
W.error("Failed to update description");
|
|
10796
10796
|
} finally {
|
|
10797
10797
|
S(!1), d(!1);
|
|
10798
10798
|
}
|
|
@@ -11083,9 +11083,9 @@ function rp({ notes: e, users: t = [], onAddNote: n }) {
|
|
|
11083
11083
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
11084
11084
|
author: "You",
|
|
11085
11085
|
notes: t
|
|
11086
|
-
}, ...e]), r.resetFields(),
|
|
11086
|
+
}, ...e]), r.resetFields(), W.success("Notes added successfully");
|
|
11087
11087
|
} catch {
|
|
11088
|
-
|
|
11088
|
+
W.error("Something went wrong, please try again.");
|
|
11089
11089
|
} finally {
|
|
11090
11090
|
u(!1);
|
|
11091
11091
|
}
|
|
@@ -11771,7 +11771,7 @@ var Fp = {
|
|
|
11771
11771
|
experience: /* @__PURE__ */ q(be, {}),
|
|
11772
11772
|
employment: /* @__PURE__ */ q(Qe, {}),
|
|
11773
11773
|
rate: /* @__PURE__ */ q(ke, {}),
|
|
11774
|
-
source: /* @__PURE__ */ q(
|
|
11774
|
+
source: /* @__PURE__ */ q(G, {}),
|
|
11775
11775
|
resume: /* @__PURE__ */ q(Ve, {}),
|
|
11776
11776
|
edit: /* @__PURE__ */ q(Me, {}),
|
|
11777
11777
|
approve: /* @__PURE__ */ q(ve, {}),
|
|
@@ -11819,18 +11819,18 @@ function Bp({ moduleName: e, id: t, customConfigName: n, onAction: a, onTabChang
|
|
|
11819
11819
|
r(() => {
|
|
11820
11820
|
C && c && c(C);
|
|
11821
11821
|
}, [C]);
|
|
11822
|
-
let { eyebrow: w, title: T = "-", status: E, titleIds: D = [], meta: O = [], ids: k = [], stats: A = [], timestamp: j, tabs: M = [], primaryActions:
|
|
11822
|
+
let { eyebrow: w, title: T = "-", status: E, titleIds: D = [], meta: O = [], ids: k = [], stats: A = [], timestamp: j, tabs: M = [], primaryActions: ee = [], moreActions: N = [] } = C ?? {}, { canAdd: P, canEdit: F, canDelete: I } = js(e);
|
|
11823
11823
|
function te(e) {
|
|
11824
11824
|
let t = e.permissionKey ?? (e.danger ? "delete" : null);
|
|
11825
|
-
return !(t === "add" && !
|
|
11825
|
+
return !(t === "add" && !P || t === "edit" && !F || t === "delete" && !I);
|
|
11826
11826
|
}
|
|
11827
|
-
let L =
|
|
11827
|
+
let L = N.filter(te), [R, z] = o(u), ne = M.some((e) => e.key === R) ? R : M[0]?.key, B = ee.filter((e) => !e.hideOnTabs?.includes(ne));
|
|
11828
11828
|
if (!C) return null;
|
|
11829
11829
|
let re = (n) => {
|
|
11830
11830
|
let r = [...B, ...L].find((e) => e.key === n);
|
|
11831
11831
|
if (r?.openDocument) {
|
|
11832
11832
|
let e = zp(h, r.openDocument);
|
|
11833
|
-
e.length ? (x(e), v(!0)) :
|
|
11833
|
+
e.length ? (x(e), v(!0)) : W.warning(`No ${(r.label || "document").toLowerCase()} available`);
|
|
11834
11834
|
return;
|
|
11835
11835
|
}
|
|
11836
11836
|
if (r?.route) {
|
|
@@ -12414,7 +12414,7 @@ function Dm({ field: e, form: t, name: n, value: i, checked: s, fileList: c, mod
|
|
|
12414
12414
|
open: !1,
|
|
12415
12415
|
docs: [],
|
|
12416
12416
|
index: 0
|
|
12417
|
-
}), [j, M] = o(null),
|
|
12417
|
+
}), [j, M] = o(null), ee = a([]), P = e.lookupFilterValueFrom ? sm(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], F = C.useWatch(P, t), te = e.lookupFilterValueFrom && Object.prototype.hasOwnProperty.call(d, e.lookupFilterValueFrom) ? d[e.lookupFilterValueFrom] : F, z = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], ne = C.useWatch(z, t), B = h || (e.disabledByField ? $p(ne) : !1);
|
|
12418
12418
|
r(() => {
|
|
12419
12419
|
if (p === "location") {
|
|
12420
12420
|
let t = !1;
|
|
@@ -12476,7 +12476,7 @@ function Dm({ field: e, form: t, name: n, value: i, checked: s, fileList: c, mod
|
|
|
12476
12476
|
})) : [];
|
|
12477
12477
|
}
|
|
12478
12478
|
}
|
|
12479
|
-
n || (
|
|
12479
|
+
n || (ee.current = Array.isArray(r) ? r : [], v(om(ee.current)));
|
|
12480
12480
|
} catch (t) {
|
|
12481
12481
|
console.error(`[EditFormV1] Failed to fetch options for "${e.field}":`, t), n || v([]);
|
|
12482
12482
|
} finally {
|
|
@@ -12504,7 +12504,7 @@ function Dm({ field: e, form: t, name: n, value: i, checked: s, fileList: c, mod
|
|
|
12504
12504
|
D,
|
|
12505
12505
|
l
|
|
12506
12506
|
]);
|
|
12507
|
-
let re = om([e.options, e.values].find((e) => Array.isArray(e) && e.length > 0) ?? Jp(e)), ie = g ?? re, V = (e.multiSelect ? "multiple" : e.mode ?? ($p(e.multiple) ? "multiple" : void 0)) ?? (io(e) === "array" ? "multiple" : void 0), H = ["select", "location"].includes(p), U = e.placeholder ?? `${H ? "Select" : "Enter"} ${String(e.label ?? "").toLowerCase()}`,
|
|
12507
|
+
let re = om([e.options, e.values].find((e) => Array.isArray(e) && e.length > 0) ?? Jp(e)), ie = g ?? re, V = (e.multiSelect ? "multiple" : e.mode ?? ($p(e.multiple) ? "multiple" : void 0)) ?? (io(e) === "array" ? "multiple" : void 0), H = ["select", "location"].includes(p), U = e.placeholder ?? `${H ? "Select" : "Enter"} ${String(e.label ?? "").toLowerCase()}`, G = Cm(e), se = () => {
|
|
12508
12508
|
setTimeout(() => {
|
|
12509
12509
|
t.validateFields([n]).catch(() => {});
|
|
12510
12510
|
});
|
|
@@ -12514,7 +12514,7 @@ function Dm({ field: e, form: t, name: n, value: i, checked: s, fileList: c, mod
|
|
|
12514
12514
|
...e.validator,
|
|
12515
12515
|
title: e.validator.title || e.label || "Field"
|
|
12516
12516
|
} : null, ue = {
|
|
12517
|
-
...
|
|
12517
|
+
...G,
|
|
12518
12518
|
value: i,
|
|
12519
12519
|
disabled: B,
|
|
12520
12520
|
placeholder: U,
|
|
@@ -12542,7 +12542,7 @@ function Dm({ field: e, form: t, name: n, value: i, checked: s, fileList: c, mod
|
|
|
12542
12542
|
M(t), setTimeout(() => M((e) => e === t ? null : e), 1800);
|
|
12543
12543
|
}
|
|
12544
12544
|
},
|
|
12545
|
-
maxLength: le.maxLength ??
|
|
12545
|
+
maxLength: le.maxLength ?? G.maxLength
|
|
12546
12546
|
}
|
|
12547
12547
|
};
|
|
12548
12548
|
if (p === "tagify") return /* @__PURE__ */ q(I, {
|
|
@@ -12582,8 +12582,8 @@ function Dm({ field: e, form: t, name: n, value: i, checked: s, fileList: c, mod
|
|
|
12582
12582
|
notFoundContent: y ? /* @__PURE__ */ q(R, { size: "small" }) : void 0,
|
|
12583
12583
|
onSearch: r ? E : a ? O : void 0,
|
|
12584
12584
|
onChange: (r) => {
|
|
12585
|
-
if (ce(r), e.autofillFrom && r != null &&
|
|
12586
|
-
let i = e.valueField ?? "_id", a =
|
|
12585
|
+
if (ce(r), e.autofillFrom && r != null && ee.current.length > 0) {
|
|
12586
|
+
let i = e.valueField ?? "_id", a = ee.current.find((e) => cm(e, i) === r || e._id === r || e.id === r);
|
|
12587
12587
|
a && (e.autofillFrom ?? []).forEach(({ optionKey: e, targetField: r }) => {
|
|
12588
12588
|
let i = cm(a, e), o = Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), r] : [r];
|
|
12589
12589
|
t.setFieldValue(o, i ?? null);
|
|
@@ -12592,7 +12592,7 @@ function Dm({ field: e, form: t, name: n, value: i, checked: s, fileList: c, mod
|
|
|
12592
12592
|
}
|
|
12593
12593
|
});
|
|
12594
12594
|
}
|
|
12595
|
-
if (p === "radio") return /* @__PURE__ */ q(
|
|
12595
|
+
if (p === "radio") return /* @__PURE__ */ q(N.Group, {
|
|
12596
12596
|
value: i,
|
|
12597
12597
|
disabled: B,
|
|
12598
12598
|
options: ie,
|
|
@@ -12684,12 +12684,12 @@ function Dm({ field: e, form: t, name: n, value: i, checked: s, fileList: c, mod
|
|
|
12684
12684
|
index: t ?? 0
|
|
12685
12685
|
});
|
|
12686
12686
|
}, g = c > 1, _ = c - l.length, v = [o ? o.split(",").map((e) => e.replace(".", "").toUpperCase()).join(", ") : null, s ? `up to ${s} MB` : null].filter(Boolean).join(" "), y = g && l.length > 0 ? [v, `${_} of ${c} remaining`].filter(Boolean).join(" • ") : v, b = l.length > 0 ? `Add ${g ? "more files" : "file"}` : e.buttonLabel ?? `Upload ${e.label ?? "File"}`, x = (e) => {
|
|
12687
|
-
if (l.length >= c) return
|
|
12687
|
+
if (l.length >= c) return oe.LIST_IGNORE;
|
|
12688
12688
|
if (o) {
|
|
12689
12689
|
let t = (e.name.split(".").pop() ?? "").toLowerCase();
|
|
12690
|
-
if (!o.split(",").map((e) => e.replace(/^\./, "").toLowerCase()).includes(t)) return
|
|
12690
|
+
if (!o.split(",").map((e) => e.replace(/^\./, "").toLowerCase()).includes(t)) return W.error(n?.message ?? `Only ${n.value} files are allowed`), oe.LIST_IGNORE;
|
|
12691
12691
|
}
|
|
12692
|
-
return s !== void 0 && e.size / 1024 / 1024 > s ? (
|
|
12692
|
+
return s !== void 0 && e.size / 1024 / 1024 > s ? (W.error(r?.message ?? `File must be smaller than ${s} MB`), oe.LIST_IGNORE) : !1;
|
|
12693
12693
|
}, S = ({ fileList: e }) => {
|
|
12694
12694
|
ce(e.slice(0, c));
|
|
12695
12695
|
}, C = {
|
|
@@ -12750,7 +12750,7 @@ function Dm({ field: e, form: t, name: n, value: i, checked: s, fileList: c, mod
|
|
|
12750
12750
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J("div", {
|
|
12751
12751
|
className: "v1-file-upload-wrapper",
|
|
12752
12752
|
children: [
|
|
12753
|
-
u && /* @__PURE__ */ q(
|
|
12753
|
+
u && /* @__PURE__ */ q(oe, {
|
|
12754
12754
|
...C,
|
|
12755
12755
|
style: {
|
|
12756
12756
|
width: "100%",
|
|
@@ -12781,7 +12781,7 @@ function Dm({ field: e, form: t, name: n, value: i, checked: s, fileList: c, mod
|
|
|
12781
12781
|
className: "v1-file-grid",
|
|
12782
12782
|
children: w
|
|
12783
12783
|
}),
|
|
12784
|
-
u && l.length > 0 && /* @__PURE__ */ q(
|
|
12784
|
+
u && l.length > 0 && /* @__PURE__ */ q(oe, {
|
|
12785
12785
|
...C,
|
|
12786
12786
|
style: { display: "inline-block" },
|
|
12787
12787
|
children: /* @__PURE__ */ q(f, {
|
|
@@ -12800,7 +12800,7 @@ function Dm({ field: e, form: t, name: n, value: i, checked: s, fileList: c, mod
|
|
|
12800
12800
|
children: [l.length > 0 && /* @__PURE__ */ q("div", {
|
|
12801
12801
|
className: "v1-file-rows-single",
|
|
12802
12802
|
children: w
|
|
12803
|
-
}), u && /* @__PURE__ */ q(
|
|
12803
|
+
}), u && /* @__PURE__ */ q(oe, {
|
|
12804
12804
|
accept: o,
|
|
12805
12805
|
fileList: l,
|
|
12806
12806
|
showUploadList: !1,
|
|
@@ -12853,12 +12853,12 @@ function Om({ icon: e, title: t }) {
|
|
|
12853
12853
|
});
|
|
12854
12854
|
}
|
|
12855
12855
|
function km({ moduleName: e, recordId: t, clientId: n, region: a, breadcrumbItems: c = [], submitText: l = "Save Changes", cancelPath: u, onSuccess: d, fieldNameMap: m = {}, onFileUpload: g = null }) {
|
|
12856
|
-
let _ = Ut(), [v] = C.useForm(), [y, b] = o({}), [x, S] = o([]), [w, T] = o(!1), [E, D] = o(""), [O, k] = o(!1), [A, j] = o(""), M = i(() => pm(x), [x]),
|
|
12856
|
+
let _ = Ut(), [v] = C.useForm(), [y, b] = o({}), [x, S] = o([]), [w, T] = o(!1), [E, D] = o(""), [O, k] = o(!1), [A, j] = o(""), M = i(() => pm(x), [x]), ee = i(() => {
|
|
12857
12857
|
let e = {};
|
|
12858
12858
|
return M.forEach((t) => {
|
|
12859
12859
|
t.addRow && (e[t.name] = gm(t));
|
|
12860
12860
|
}), e;
|
|
12861
|
-
}, [M]),
|
|
12861
|
+
}, [M]), N = {
|
|
12862
12862
|
jobs: {
|
|
12863
12863
|
list: "Jobs",
|
|
12864
12864
|
path: "/jobs",
|
|
@@ -12874,8 +12874,8 @@ function km({ moduleName: e, recordId: t, clientId: n, region: a, breadcrumbItem
|
|
|
12874
12874
|
path: "/submissions",
|
|
12875
12875
|
edit: "Edit Submission"
|
|
12876
12876
|
}
|
|
12877
|
-
},
|
|
12878
|
-
let t =
|
|
12877
|
+
}, P = c.length > 0 ? c : (() => {
|
|
12878
|
+
let t = N[am(e)];
|
|
12879
12879
|
return t ? [
|
|
12880
12880
|
{
|
|
12881
12881
|
label: "Home",
|
|
@@ -12975,9 +12975,9 @@ function km({ moduleName: e, recordId: t, clientId: n, region: a, breadcrumbItem
|
|
|
12975
12975
|
}
|
|
12976
12976
|
}
|
|
12977
12977
|
}
|
|
12978
|
-
await Va(e, t, te(n), g?.useLegacyUpload ? [] : r),
|
|
12978
|
+
await Va(e, t, te(n), g?.useLegacyUpload ? [] : r), W.success(`${e} updated successfully`), d ? d() : _(u || -1);
|
|
12979
12979
|
} catch (t) {
|
|
12980
|
-
console.error(`Failed to update ${e}:`, t), j(t?.message || "Failed to save changes"),
|
|
12980
|
+
console.error(`Failed to update ${e}:`, t), j(t?.message || "Failed to save changes"), W.error(t?.message || "Failed to save changes");
|
|
12981
12981
|
} finally {
|
|
12982
12982
|
k(!1);
|
|
12983
12983
|
}
|
|
@@ -13110,7 +13110,7 @@ function km({ moduleName: e, recordId: t, clientId: n, region: a, breadcrumbItem
|
|
|
13110
13110
|
}, s));
|
|
13111
13111
|
}), i;
|
|
13112
13112
|
};
|
|
13113
|
-
return /* @__PURE__ */ J("main", { children: [
|
|
13113
|
+
return /* @__PURE__ */ J("main", { children: [P.length > 0 && /* @__PURE__ */ q(Vo, { items: P }), /* @__PURE__ */ J("div", {
|
|
13114
13114
|
className: "v1-edit-page",
|
|
13115
13115
|
children: [/* @__PURE__ */ q("div", {
|
|
13116
13116
|
className: "v1-page-inner",
|
|
@@ -13144,7 +13144,7 @@ function km({ moduleName: e, recordId: t, clientId: n, region: a, breadcrumbItem
|
|
|
13144
13144
|
children: [M.map((e, t) => {
|
|
13145
13145
|
let n = e.name ?? e.id ?? String(t), r = e.name ?? n, i = Math.max(0, Number(e.minRows ?? 0) || 0), a = e.addRow ? /* @__PURE__ */ q(C.List, {
|
|
13146
13146
|
name: r,
|
|
13147
|
-
initialValue:
|
|
13147
|
+
initialValue: ee[e.name] ?? [],
|
|
13148
13148
|
rules: [{ validator: async (t, n = []) => {
|
|
13149
13149
|
if (i > 0 && n.length < i) throw Error(`Keep at least ${i} row${i > 1 ? "s" : ""}.`);
|
|
13150
13150
|
if ($p(e.requireOne) && n.some((e) => !nm(e))) throw Error("Fill at least one field in each added row.");
|
|
@@ -13402,9 +13402,9 @@ function Fm({ moduleName: e, recordId: t, cancelPath: n, onSuccess: i, fieldName
|
|
|
13402
13402
|
await Promise.all(i.map((e) => s(n.field, e.originFileObj, t)));
|
|
13403
13403
|
}
|
|
13404
13404
|
}
|
|
13405
|
-
await Va(e, t, x(r, a)),
|
|
13405
|
+
await Va(e, t, x(r, a)), W.success(`${e} updated successfully`), i ? i() : c(n || -1);
|
|
13406
13406
|
} catch (e) {
|
|
13407
|
-
b(e?.message || "Failed to save changes"),
|
|
13407
|
+
b(e?.message || "Failed to save changes"), W.error(e?.message || "Failed to save changes");
|
|
13408
13408
|
} finally {
|
|
13409
13409
|
v(!1);
|
|
13410
13410
|
}
|
|
@@ -13732,7 +13732,7 @@ function gh({ children: e, title: t = ph, message: n = mh, loginPath: i = "/logi
|
|
|
13732
13732
|
className: "ct-auth-guard",
|
|
13733
13733
|
children: /* @__PURE__ */ q("div", {
|
|
13734
13734
|
className: "ct-auth-guard__card",
|
|
13735
|
-
children: /* @__PURE__ */ q(
|
|
13735
|
+
children: /* @__PURE__ */ q(P, {
|
|
13736
13736
|
status: "403",
|
|
13737
13737
|
icon: /* @__PURE__ */ q(rt, { className: "ct-auth-guard__icon" }),
|
|
13738
13738
|
title: t,
|
|
@@ -15519,14 +15519,14 @@ function Ug({ form: e, config: t, api: n, popupContext: r, resolvedIds: i, dynam
|
|
|
15519
15519
|
if (t.mode === "delete" && typeof n.deleteItems == "function") {
|
|
15520
15520
|
p(!0), h(null), Promise.resolve(n.deleteItems(i, r)).then(() => u()).catch((e) => {
|
|
15521
15521
|
let t = e?.message || "Delete failed. Please try again.";
|
|
15522
|
-
h(t), p(!1),
|
|
15522
|
+
h(t), p(!1), W.error(t);
|
|
15523
15523
|
});
|
|
15524
15524
|
return;
|
|
15525
15525
|
}
|
|
15526
15526
|
if (typeof n.onOk == "function") {
|
|
15527
15527
|
p(!0), Promise.resolve(n.onOk(r)).then(() => u()).catch((e) => {
|
|
15528
15528
|
let t = e?.message || "Failed. Please try again.";
|
|
15529
|
-
|
|
15529
|
+
W.error(t), p(!1);
|
|
15530
15530
|
});
|
|
15531
15531
|
return;
|
|
15532
15532
|
}
|
|
@@ -15537,9 +15537,9 @@ function Ug({ form: e, config: t, api: n, popupContext: r, resolvedIds: i, dynam
|
|
|
15537
15537
|
p(!0);
|
|
15538
15538
|
try {
|
|
15539
15539
|
if ((await g(e))?.navigated) return;
|
|
15540
|
-
|
|
15540
|
+
W.success(t.successMessage || "Saved successfully"), u();
|
|
15541
15541
|
} catch (e) {
|
|
15542
|
-
|
|
15542
|
+
W.error(e?.message || "Failed. Please try again.");
|
|
15543
15543
|
} finally {
|
|
15544
15544
|
p(!1);
|
|
15545
15545
|
}
|
|
@@ -15582,7 +15582,7 @@ function Wg({ open: e = !0, config: t, context: n = {}, onClose: a, onSubmit: s,
|
|
|
15582
15582
|
function O() {
|
|
15583
15583
|
typeof a == "function" && a();
|
|
15584
15584
|
}
|
|
15585
|
-
let { handleOk: A, confirming: j, deleteError: M, resetSubmitState:
|
|
15585
|
+
let { handleOk: A, confirming: j, deleteError: M, resetSubmitState: ee } = Ug({
|
|
15586
15586
|
form: l,
|
|
15587
15587
|
config: t,
|
|
15588
15588
|
api: c,
|
|
@@ -15596,9 +15596,9 @@ function Wg({ open: e = !0, config: t, context: n = {}, onClose: a, onSubmit: s,
|
|
|
15596
15596
|
onSubmit: s
|
|
15597
15597
|
});
|
|
15598
15598
|
r(() => {
|
|
15599
|
-
e && (l.resetFields(), d({}), p(m.removedIds ?? []),
|
|
15599
|
+
e && (l.resetFields(), d({}), p(m.removedIds ?? []), ee());
|
|
15600
15600
|
}, [e]);
|
|
15601
|
-
let
|
|
15601
|
+
let N = h.length, P = String(_).replace(/s$/i, ""), F = N === 1 ? P : _, I = g[0] ?? {}, te = t?.getTitleText ? t.getTitleText(N, F, I, m) : t?.title, L = N === 1 ? I.jobTitle ?? I.title ?? I.name ?? I.fullName ?? I.candidateName ?? null : null, R = t?.getBodyText ? t.getBodyText(N, P, F, L, m) : t?.bodyText ?? null, z = typeof t?.getNote == "function" ? t.getNote(m) : t?.note, ne = y.filter((e) => e.required).every((e) => {
|
|
15602
15602
|
let t = u[e.name];
|
|
15603
15603
|
return !(t == null || t === "" || Array.isArray(t) && t.length === 0 || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0);
|
|
15604
15604
|
}), B = t?.disabledUntilFilled && !ne;
|
|
@@ -15628,7 +15628,7 @@ function Wg({ open: e = !0, config: t, context: n = {}, onClose: a, onSubmit: s,
|
|
|
15628
15628
|
note: z,
|
|
15629
15629
|
description: t.description,
|
|
15630
15630
|
showSelectedCount: t.showSelectedCount,
|
|
15631
|
-
count:
|
|
15631
|
+
count: N,
|
|
15632
15632
|
itemLabel: F,
|
|
15633
15633
|
bodyText: R,
|
|
15634
15634
|
deleteError: M
|
|
@@ -16315,7 +16315,7 @@ var V_ = I_.vendorColumns.map((e) => ({
|
|
|
16315
16315
|
render: (e) => e || "-"
|
|
16316
16316
|
}));
|
|
16317
16317
|
function H_() {
|
|
16318
|
-
let e = Ut(), { selectedIds: t = [], selectedRecords: n = [], recipients: s = [], subject: c = "", onSend: l } = Ht().state ?? {}, u = t[0] ?? n[0]?._id ?? n[0]?.id, [d, p] = o(s.join(", ")), [m, h] = o(""), [g, _] = o(""), [b, x] = o(!1), [S, C] = o(!1), [T, E] = o(c), D = a(null), [O, k] = o(I_.defaultTab), [A, j] = o(""), [M,
|
|
16318
|
+
let e = Ut(), { selectedIds: t = [], selectedRecords: n = [], recipients: s = [], subject: c = "", onSend: l } = Ht().state ?? {}, u = t[0] ?? n[0]?._id ?? n[0]?.id, [d, p] = o(s.join(", ")), [m, h] = o(""), [g, _] = o(""), [b, x] = o(!1), [S, C] = o(!1), [T, E] = o(c), D = a(null), [O, k] = o(I_.defaultTab), [A, j] = o(""), [M, ee] = o([]), [N, P] = o(0), [F, te] = o(0), [L, R] = o(0), [z, ne] = o(1), [B, ie] = o(I_.defaultPageSize), [V, ae] = o(!1), [U, oe] = o([]);
|
|
16319
16319
|
r(() => {
|
|
16320
16320
|
if (!u) return;
|
|
16321
16321
|
let e = !1;
|
|
@@ -16329,9 +16329,9 @@ function H_() {
|
|
|
16329
16329
|
}).then((t) => {
|
|
16330
16330
|
if (e) return;
|
|
16331
16331
|
let n = t?.data?.vendorList ?? t?.data ?? [], r = t?.data?.myVendorCount ?? 0, i = t?.data?.allVendorCount ?? 0;
|
|
16332
|
-
|
|
16332
|
+
ee(Array.isArray(n) ? n : []), P(r), te(i), R(O === "myVendor" ? r : i);
|
|
16333
16333
|
}).catch(() => {
|
|
16334
|
-
e || (
|
|
16334
|
+
e || (ee([]), R(0));
|
|
16335
16335
|
}).finally(() => {
|
|
16336
16336
|
e || ae(!1);
|
|
16337
16337
|
}), () => {
|
|
@@ -16351,12 +16351,12 @@ function H_() {
|
|
|
16351
16351
|
let e = U.map((e) => M.find((t) => t.vendorId === e)?.vendorEmail ?? "").filter(Boolean);
|
|
16352
16352
|
e.length > 0 ? (_(e.join(", ")), C(!0)) : _("");
|
|
16353
16353
|
}, [U, M]);
|
|
16354
|
-
let
|
|
16354
|
+
let G = (d.trim() || g.trim()) && T.trim(), se = (e) => e === "myVendor" ? N : F;
|
|
16355
16355
|
function ce() {
|
|
16356
16356
|
e(-1);
|
|
16357
16357
|
}
|
|
16358
16358
|
function le() {
|
|
16359
|
-
if (!
|
|
16359
|
+
if (!G) return;
|
|
16360
16360
|
let n = D.current?.innerHTML ?? "";
|
|
16361
16361
|
L_.submit({
|
|
16362
16362
|
jobId: u,
|
|
@@ -16366,16 +16366,16 @@ function H_() {
|
|
|
16366
16366
|
subject: T,
|
|
16367
16367
|
contents: n
|
|
16368
16368
|
}).then((r) => {
|
|
16369
|
-
r?.status === !0 ? (
|
|
16369
|
+
r?.status === !0 ? (W.success(r?.data || "Mail sent successfully."), typeof l == "function" && l({
|
|
16370
16370
|
to: d,
|
|
16371
16371
|
cc: m,
|
|
16372
16372
|
bcc: g,
|
|
16373
16373
|
subject: T,
|
|
16374
16374
|
message: n,
|
|
16375
16375
|
selectedIds: t
|
|
16376
|
-
}), e(-1)) :
|
|
16376
|
+
}), e(-1)) : W.error(r?.message || r?.data || "Failed to send mail. Please try again.");
|
|
16377
16377
|
}).catch((e) => {
|
|
16378
|
-
|
|
16378
|
+
W.error(e?.message || "Failed to send mail. Please try again.");
|
|
16379
16379
|
});
|
|
16380
16380
|
}
|
|
16381
16381
|
let ue = i(() => {
|
|
@@ -16397,7 +16397,7 @@ function H_() {
|
|
|
16397
16397
|
children: "Cancel"
|
|
16398
16398
|
}), /* @__PURE__ */ q(f, {
|
|
16399
16399
|
type: "primary",
|
|
16400
|
-
disabled: !
|
|
16400
|
+
disabled: !G,
|
|
16401
16401
|
onClick: le,
|
|
16402
16402
|
children: "Send"
|
|
16403
16403
|
})]
|
|
@@ -16445,7 +16445,7 @@ function H_() {
|
|
|
16445
16445
|
children: I_.vendorTabs.map((e) => /* @__PURE__ */ J("span", {
|
|
16446
16446
|
className: `vendor-share__vendor-tab${O === e.key ? " vendor-share__vendor-tab--active" : ""}`,
|
|
16447
16447
|
onClick: () => {
|
|
16448
|
-
k(e.key), ne(1),
|
|
16448
|
+
k(e.key), ne(1), oe([]);
|
|
16449
16449
|
},
|
|
16450
16450
|
children: [
|
|
16451
16451
|
e.label,
|
|
@@ -16468,7 +16468,7 @@ function H_() {
|
|
|
16468
16468
|
rowSelection: {
|
|
16469
16469
|
selectedRowKeys: U,
|
|
16470
16470
|
onChange: (e) => {
|
|
16471
|
-
e.length > I_.maxVendorSelect ||
|
|
16471
|
+
e.length > I_.maxVendorSelect || oe(e);
|
|
16472
16472
|
}
|
|
16473
16473
|
},
|
|
16474
16474
|
scroll: { y: "calc(100vh - 340px)" }
|
|
@@ -16806,7 +16806,7 @@ var U_ = {
|
|
|
16806
16806
|
if (!t || t.length === 0) return Promise.resolve();
|
|
16807
16807
|
for (let e of t) {
|
|
16808
16808
|
let t = e.originFileObj || e;
|
|
16809
|
-
if (!(t.size / 1024 / 1024 <= W_.MAX_FILE_SIZE)) return
|
|
16809
|
+
if (!(t.size / 1024 / 1024 <= W_.MAX_FILE_SIZE)) return W.error(G_.INVALID_FILE_SIZE), Promise.reject(Error(G_.INVALID_FILE_SIZE));
|
|
16810
16810
|
if (!W_.ALLOWED_FILE_TYPES.includes(t.type)) return Promise.reject(Error(G_.INVALID_FILE_TYPE));
|
|
16811
16811
|
}
|
|
16812
16812
|
return Promise.resolve();
|
|
@@ -16830,7 +16830,7 @@ var U_ = {
|
|
|
16830
16830
|
"image/jpeg",
|
|
16831
16831
|
"image/png",
|
|
16832
16832
|
"application/pdf"
|
|
16833
|
-
].includes(e.type) ? e.size / 1024 / 1024 <= 2 ? !1 : (
|
|
16833
|
+
].includes(e.type) ? e.size / 1024 / 1024 <= 2 ? !1 : (W.error("File upload must be 2 MB below."), oe.LIST_IGNORE) : (W.error("Only JPG, PNG and PDF files are allowed."), oe.LIST_IGNORE) }, Z_ = () => {
|
|
16834
16834
|
let [e] = C.useForm();
|
|
16835
16835
|
return /* @__PURE__ */ q("div", {
|
|
16836
16836
|
style: { padding: 24 },
|
|
@@ -17069,7 +17069,7 @@ var U_ = {
|
|
|
17069
17069
|
children: /* @__PURE__ */ q(C.Item, {
|
|
17070
17070
|
label: "Resume new",
|
|
17071
17071
|
name: "resume",
|
|
17072
|
-
children: /* @__PURE__ */ q(
|
|
17072
|
+
children: /* @__PURE__ */ q(oe, {
|
|
17073
17073
|
beforeUpload: X_.beforeUpload,
|
|
17074
17074
|
maxCount: 1,
|
|
17075
17075
|
children: /* @__PURE__ */ q(f, { children: "Upload Resume" })
|
|
@@ -17084,7 +17084,7 @@ var U_ = {
|
|
|
17084
17084
|
valuePropName: "fileList",
|
|
17085
17085
|
getValueFromEvent: (e) => e?.fileList,
|
|
17086
17086
|
rules: [Y_.multiFileUpload()],
|
|
17087
|
-
children: /* @__PURE__ */ q(
|
|
17087
|
+
children: /* @__PURE__ */ q(oe, {
|
|
17088
17088
|
multiple: !0,
|
|
17089
17089
|
beforeUpload: X_.beforeUpload,
|
|
17090
17090
|
children: /* @__PURE__ */ q(f, { children: "Upload Documents" })
|
|
@@ -17099,7 +17099,7 @@ var U_ = {
|
|
|
17099
17099
|
valuePropName: "fileList",
|
|
17100
17100
|
getValueFromEvent: (e) => e?.fileList,
|
|
17101
17101
|
rules: [Y_.fileUpload()],
|
|
17102
|
-
children: /* @__PURE__ */ q(
|
|
17102
|
+
children: /* @__PURE__ */ q(oe, {
|
|
17103
17103
|
beforeUpload: X_.beforeUpload,
|
|
17104
17104
|
maxCount: 1,
|
|
17105
17105
|
children: /* @__PURE__ */ q(f, { children: "Upload" })
|
|
@@ -17208,7 +17208,7 @@ function iv({ open: e, scope: t, action: n, title: i, description: c, confirmLab
|
|
|
17208
17208
|
y(!0), C("");
|
|
17209
17209
|
try {
|
|
17210
17210
|
let e = await Mi(t, n);
|
|
17211
|
-
_(e?.data?.email || e?.email || "the registered approver"),
|
|
17211
|
+
_(e?.data?.email || e?.email || "the registered approver"), W.success("OTP sent");
|
|
17212
17212
|
} catch (e) {
|
|
17213
17213
|
C(e?.message || "Could not send the OTP");
|
|
17214
17214
|
} finally {
|
|
@@ -17227,7 +17227,7 @@ function iv({ open: e, scope: t, action: n, title: i, description: c, confirmLab
|
|
|
17227
17227
|
x(!0), C("");
|
|
17228
17228
|
try {
|
|
17229
17229
|
let e = await Ni(t, n, m.trim());
|
|
17230
|
-
|
|
17230
|
+
W.success(e?.data?.message || e?.message || "Done"), p?.(e);
|
|
17231
17231
|
} catch (e) {
|
|
17232
17232
|
C(e?.message || "Verification failed — check the code and try again");
|
|
17233
17233
|
} finally {
|
|
@@ -19160,7 +19160,7 @@ function Tv({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
19160
19160
|
searchLabel: `${e.label} ${e.value}`.toLowerCase()
|
|
19161
19161
|
}));
|
|
19162
19162
|
}
|
|
19163
|
-
async function
|
|
19163
|
+
async function ee() {
|
|
19164
19164
|
try {
|
|
19165
19165
|
let e = await d.validateFields();
|
|
19166
19166
|
m(!0);
|
|
@@ -19172,15 +19172,15 @@ function Tv({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
19172
19172
|
order: Number(e.order ?? 0),
|
|
19173
19173
|
fields: Sv(e.fields ?? [])
|
|
19174
19174
|
};
|
|
19175
|
-
e.addRow && e.minRows !== void 0 && e.minRows !== "" && (n.minRows = Number(e.minRows)), e.addRow && e.initialRows !== void 0 && e.initialRows !== "" && (n.initialRows = Number(e.initialRows)), e.addRow && e.requireOne && (n.requireOne = !0), e.infoEnabled && e.infoText && (n.infoEnabled = !0, n.infoText = e.infoText), e.toggleEnabled && e.toggleField && (n.toggleEnabled = !0, n.toggleLabel = e.toggleLabel || "Toggle", n.toggleField = e.toggleField), u ? (await u(n, t),
|
|
19175
|
+
e.addRow && e.minRows !== void 0 && e.minRows !== "" && (n.minRows = Number(e.minRows)), e.addRow && e.initialRows !== void 0 && e.initialRows !== "" && (n.initialRows = Number(e.initialRows)), e.addRow && e.requireOne && (n.requireOne = !0), e.infoEnabled && e.infoText && (n.infoEnabled = !0, n.infoText = e.infoText), e.toggleEnabled && e.toggleField && (n.toggleEnabled = !0, n.toggleLabel = e.toggleLabel || "Toggle", n.toggleField = e.toggleField), u ? (await u(n, t), W.success(t ? "Group updated" : "Group created")) : t ? (await Ai(t.id, n), W.success("Group updated")) : (await ki(n), W.success("Group created")), l();
|
|
19176
19176
|
} catch (e) {
|
|
19177
19177
|
if (e?.errorFields) return;
|
|
19178
|
-
|
|
19178
|
+
W.error(e.message || "Could not save group");
|
|
19179
19179
|
} finally {
|
|
19180
19180
|
m(!1);
|
|
19181
19181
|
}
|
|
19182
19182
|
}
|
|
19183
|
-
let
|
|
19183
|
+
let N = M(d.getFieldValue("module") ?? n);
|
|
19184
19184
|
return /* @__PURE__ */ q(k, {
|
|
19185
19185
|
open: e,
|
|
19186
19186
|
onCancel: c,
|
|
@@ -19201,7 +19201,7 @@ function Tv({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
19201
19201
|
}), /* @__PURE__ */ q(f, {
|
|
19202
19202
|
type: "primary",
|
|
19203
19203
|
loading: p,
|
|
19204
|
-
onClick:
|
|
19204
|
+
onClick: ee,
|
|
19205
19205
|
icon: q(t ? Me : pt, {}),
|
|
19206
19206
|
children: t ? "Update Group" : "Create Group"
|
|
19207
19207
|
})]
|
|
@@ -19386,9 +19386,9 @@ function Tv({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
19386
19386
|
children: "Fields"
|
|
19387
19387
|
}),
|
|
19388
19388
|
y && /* @__PURE__ */ q(R, { size: "small" }),
|
|
19389
|
-
!y &&
|
|
19389
|
+
!y && N.length > 0 && /* @__PURE__ */ J("span", {
|
|
19390
19390
|
className: "fg-fields-hint",
|
|
19391
|
-
children: [
|
|
19391
|
+
children: [N.length, " fields available"]
|
|
19392
19392
|
})
|
|
19393
19393
|
]
|
|
19394
19394
|
}),
|
|
@@ -19401,7 +19401,7 @@ function Tv({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
19401
19401
|
remove: n,
|
|
19402
19402
|
move: r,
|
|
19403
19403
|
absBase: [],
|
|
19404
|
-
moduleFieldOptions:
|
|
19404
|
+
moduleFieldOptions: N,
|
|
19405
19405
|
fieldsLoading: y,
|
|
19406
19406
|
dragIndexRef: E,
|
|
19407
19407
|
dragOverIndex: x,
|
|
@@ -19741,10 +19741,10 @@ function Dv({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s
|
|
|
19741
19741
|
t ? (await Ea(t.id, {
|
|
19742
19742
|
...t,
|
|
19743
19743
|
...n
|
|
19744
|
-
}),
|
|
19744
|
+
}), W.success("Custom form updated")) : (await Ta(n), W.success("Custom form created")), s();
|
|
19745
19745
|
} catch (e) {
|
|
19746
19746
|
if (e?.errorFields) return;
|
|
19747
|
-
|
|
19747
|
+
W.error(e.message || "Could not save custom form");
|
|
19748
19748
|
} finally {
|
|
19749
19749
|
u(!1);
|
|
19750
19750
|
}
|
|
@@ -20146,16 +20146,16 @@ function Dv({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s
|
|
|
20146
20146
|
function Ov({ moduleOptions: e }) {
|
|
20147
20147
|
let [t, n] = o([]), [i, a] = o(!1), [s, c] = o(!1), [l, d] = o(null);
|
|
20148
20148
|
function p() {
|
|
20149
|
-
a(!0), wa().then((e) => n(e)).catch((e) =>
|
|
20149
|
+
a(!0), wa().then((e) => n(e)).catch((e) => W.error(e.message || "Could not load custom forms")).finally(() => a(!1));
|
|
20150
20150
|
}
|
|
20151
20151
|
r(() => {
|
|
20152
20152
|
p();
|
|
20153
20153
|
}, []);
|
|
20154
20154
|
async function m(e) {
|
|
20155
20155
|
try {
|
|
20156
|
-
await Da(e.id),
|
|
20156
|
+
await Da(e.id), W.success("Custom form deleted"), p();
|
|
20157
20157
|
} catch (e) {
|
|
20158
|
-
|
|
20158
|
+
W.error(e.message || "Could not delete custom form");
|
|
20159
20159
|
}
|
|
20160
20160
|
}
|
|
20161
20161
|
return /* @__PURE__ */ J("div", { children: [
|
|
@@ -20290,7 +20290,7 @@ function kv() {
|
|
|
20290
20290
|
Si().then((e) => {
|
|
20291
20291
|
t(e);
|
|
20292
20292
|
let n = _v(e);
|
|
20293
|
-
c(vv(n)),
|
|
20293
|
+
c(vv(n)), ee("all", n);
|
|
20294
20294
|
}).catch(() => t([])).finally(() => i(!1));
|
|
20295
20295
|
}, []), r(() => {
|
|
20296
20296
|
Di({ limit: 200 }).then(C).catch(() => C([]));
|
|
@@ -20304,7 +20304,7 @@ function kv() {
|
|
|
20304
20304
|
}
|
|
20305
20305
|
}));
|
|
20306
20306
|
}
|
|
20307
|
-
function
|
|
20307
|
+
function ee(e, t) {
|
|
20308
20308
|
(t ?? A).find((t) => t.key === e) && (M(e, {
|
|
20309
20309
|
loading: !0,
|
|
20310
20310
|
error: ""
|
|
@@ -20316,11 +20316,11 @@ function kv() {
|
|
|
20316
20316
|
loading: !1
|
|
20317
20317
|
})));
|
|
20318
20318
|
}
|
|
20319
|
-
function
|
|
20320
|
-
|
|
20319
|
+
function N(e) {
|
|
20320
|
+
ee(e, null);
|
|
20321
20321
|
}
|
|
20322
|
-
function
|
|
20323
|
-
d(e),
|
|
20322
|
+
function P(e) {
|
|
20323
|
+
d(e), N(e);
|
|
20324
20324
|
}
|
|
20325
20325
|
function F() {
|
|
20326
20326
|
g(null), m(!0);
|
|
@@ -20332,13 +20332,13 @@ function kv() {
|
|
|
20332
20332
|
m(!1), g(null);
|
|
20333
20333
|
}
|
|
20334
20334
|
async function ne() {
|
|
20335
|
-
z(),
|
|
20335
|
+
z(), N(l), l !== "all" && N("all");
|
|
20336
20336
|
}
|
|
20337
20337
|
async function B(e) {
|
|
20338
20338
|
try {
|
|
20339
|
-
await ji(e),
|
|
20339
|
+
await ji(e), W.success("Group deleted"), N(l), l !== "all" && N("all");
|
|
20340
20340
|
} catch (e) {
|
|
20341
|
-
|
|
20341
|
+
W.error(e.message || "Could not delete group");
|
|
20342
20342
|
}
|
|
20343
20343
|
}
|
|
20344
20344
|
function re(e) {
|
|
@@ -20364,9 +20364,9 @@ function kv() {
|
|
|
20364
20364
|
return e === "jobs" ? w : {};
|
|
20365
20365
|
}
|
|
20366
20366
|
function U(e) {
|
|
20367
|
-
k(JSON.parse(JSON.stringify(e))),
|
|
20367
|
+
k(JSON.parse(JSON.stringify(e))), W.success(`Copied settings from ${e.label || e.name}`);
|
|
20368
20368
|
}
|
|
20369
|
-
async function
|
|
20369
|
+
async function oe(e) {
|
|
20370
20370
|
if (O) try {
|
|
20371
20371
|
let t = {
|
|
20372
20372
|
...e,
|
|
@@ -20374,13 +20374,13 @@ function kv() {
|
|
|
20374
20374
|
payloadKey: O.payloadKey ?? e.payloadKey,
|
|
20375
20375
|
fields: JSON.parse(JSON.stringify(O.fields ?? []))
|
|
20376
20376
|
};
|
|
20377
|
-
await Ai(e.id, t, ae(e.module || l)),
|
|
20377
|
+
await Ai(e.id, t, ae(e.module || l)), W.success(`Pasted settings into ${e.label || e.name}`), N(l), l !== "all" && N("all");
|
|
20378
20378
|
} catch (e) {
|
|
20379
|
-
|
|
20379
|
+
W.error(e.message || "Could not paste settings");
|
|
20380
20380
|
}
|
|
20381
20381
|
}
|
|
20382
|
-
function
|
|
20383
|
-
v(null), c(vv(A)),
|
|
20382
|
+
function G() {
|
|
20383
|
+
v(null), c(vv(A)), N(l), l !== "all" && N("all");
|
|
20384
20384
|
}
|
|
20385
20385
|
let se = A.map(({ key: e, label: t, color: n }) => {
|
|
20386
20386
|
let r = a[e] ?? {
|
|
@@ -20435,7 +20435,7 @@ function kv() {
|
|
|
20435
20435
|
onEdit: te,
|
|
20436
20436
|
onDelete: B,
|
|
20437
20437
|
onCopy: U,
|
|
20438
|
-
onPaste:
|
|
20438
|
+
onPaste: oe,
|
|
20439
20439
|
canPaste: !!O
|
|
20440
20440
|
})
|
|
20441
20441
|
})
|
|
@@ -20476,7 +20476,7 @@ function kv() {
|
|
|
20476
20476
|
/* @__PURE__ */ q(f, {
|
|
20477
20477
|
size: "small",
|
|
20478
20478
|
icon: /* @__PURE__ */ q(gt, {}),
|
|
20479
|
-
onClick: () =>
|
|
20479
|
+
onClick: () => N(l),
|
|
20480
20480
|
children: "Reload"
|
|
20481
20481
|
}),
|
|
20482
20482
|
/* @__PURE__ */ q(f, {
|
|
@@ -20493,7 +20493,7 @@ function kv() {
|
|
|
20493
20493
|
spinning: n,
|
|
20494
20494
|
children: /* @__PURE__ */ q(ie, {
|
|
20495
20495
|
activeKey: l,
|
|
20496
|
-
onChange:
|
|
20496
|
+
onChange: P,
|
|
20497
20497
|
items: se,
|
|
20498
20498
|
size: "middle",
|
|
20499
20499
|
className: "fg-tabs"
|
|
@@ -20523,7 +20523,7 @@ function kv() {
|
|
|
20523
20523
|
clientId: w.clientId,
|
|
20524
20524
|
region: w.region,
|
|
20525
20525
|
cancelPath: "/jobs",
|
|
20526
|
-
onSubmit: async () =>
|
|
20526
|
+
onSubmit: async () => W.info("Preview only. No record was created."),
|
|
20527
20527
|
breadcrumbItems: [
|
|
20528
20528
|
{ label: "Admin" },
|
|
20529
20529
|
{ label: "Form Groups" },
|
|
@@ -20619,7 +20619,7 @@ function kv() {
|
|
|
20619
20619
|
confirmLabel: _?.confirmLabel,
|
|
20620
20620
|
danger: _?.danger,
|
|
20621
20621
|
onCancel: () => v(null),
|
|
20622
|
-
onVerified:
|
|
20622
|
+
onVerified: G
|
|
20623
20623
|
})
|
|
20624
20624
|
]
|
|
20625
20625
|
});
|
|
@@ -21207,9 +21207,9 @@ function Uv({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
21207
21207
|
type: "primary",
|
|
21208
21208
|
icon: /* @__PURE__ */ q(xt, {}),
|
|
21209
21209
|
onClick: () => {
|
|
21210
|
-
if (!s.key?.trim()) return
|
|
21211
|
-
if (!/^[a-z0-9_]+$/.test(s.key)) return
|
|
21212
|
-
if (!(s.fields ?? []).length) return
|
|
21210
|
+
if (!s.key?.trim()) return W.error("A merge key is required");
|
|
21211
|
+
if (!/^[a-z0-9_]+$/.test(s.key)) return W.error("Key: lowercase letters, numbers, underscores only");
|
|
21212
|
+
if (!(s.fields ?? []).length) return W.error("Pick at least one source field");
|
|
21213
21213
|
let { mapRows: e, ...t } = s;
|
|
21214
21214
|
a({
|
|
21215
21215
|
...t,
|
|
@@ -21520,7 +21520,7 @@ function Uv({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
21520
21520
|
}
|
|
21521
21521
|
function Wv({ open: e, module: t, onClose: n }) {
|
|
21522
21522
|
let [r, i] = o(""), [a, c] = o([]), [l, u] = o(!1), [d, p] = o(""), m = async () => {
|
|
21523
|
-
if (!r.trim()) return
|
|
21523
|
+
if (!r.trim()) return W.warning("Enter a record _id to preview");
|
|
21524
21524
|
u(!0), p("");
|
|
21525
21525
|
try {
|
|
21526
21526
|
let [e] = await Promise.all([Bi(t, r.trim()), Du()]);
|
|
@@ -21650,9 +21650,9 @@ function Kv({ open: e, onClose: t }) {
|
|
|
21650
21650
|
separator: n.separator ?? "",
|
|
21651
21651
|
documentNameOrder: Array.isArray(n.documentNameOrder) ? n.documentNameOrder : []
|
|
21652
21652
|
};
|
|
21653
|
-
await zi(e), Eu(e),
|
|
21653
|
+
await zi(e), Eu(e), W.success("Display defaults saved"), t();
|
|
21654
21654
|
} catch (e) {
|
|
21655
|
-
|
|
21655
|
+
W.error(e?.message || "Could not save defaults");
|
|
21656
21656
|
} finally {
|
|
21657
21657
|
s(!1);
|
|
21658
21658
|
}
|
|
@@ -21803,7 +21803,7 @@ function Kv({ open: e, onClose: t }) {
|
|
|
21803
21803
|
});
|
|
21804
21804
|
}
|
|
21805
21805
|
function qv() {
|
|
21806
|
-
let [e, t] = o([]), [n, a] = o(!0), [c, l] = o(""), [d, p] = o([]), [m, h] = o([]), [g, _] = o([]), [v, y] = o({}), [b, S] = o([]), [C, w] = o(!1), [T, E] = o(""), [D, O] = o(!1), [k, A] = o(null), [j, M] = o(null), [
|
|
21806
|
+
let [e, t] = o([]), [n, a] = o(!0), [c, l] = o(""), [d, p] = o([]), [m, h] = o([]), [g, _] = o([]), [v, y] = o({}), [b, S] = o([]), [C, w] = o(!1), [T, E] = o(""), [D, O] = o(!1), [k, A] = o(null), [j, M] = o(null), [ee, N] = o(!1), [P, F] = o(!1), [I, te] = o(null), [z, ne] = o(0);
|
|
21807
21807
|
function ae(e) {
|
|
21808
21808
|
te(Av[e]);
|
|
21809
21809
|
}
|
|
@@ -21839,11 +21839,11 @@ function qv() {
|
|
|
21839
21839
|
e = !0;
|
|
21840
21840
|
};
|
|
21841
21841
|
}, [c, z]);
|
|
21842
|
-
let
|
|
21842
|
+
let oe = i(() => m.map((e) => ({
|
|
21843
21843
|
value: e.key,
|
|
21844
21844
|
label: `${e.label} (${e.key})`
|
|
21845
21845
|
})), [m]);
|
|
21846
|
-
async function
|
|
21846
|
+
async function G() {
|
|
21847
21847
|
O(!0);
|
|
21848
21848
|
try {
|
|
21849
21849
|
let e = Object.entries(v).map(([e, t]) => Fv(e, t)).filter(Boolean), { nextGroups: t, changed: n } = Rv(d, v);
|
|
@@ -21854,9 +21854,9 @@ function qv() {
|
|
|
21854
21854
|
}), n.length && (p(t), h(Pv(t)), _(t.map((e) => ({
|
|
21855
21855
|
value: e.name,
|
|
21856
21856
|
label: e.label ?? e.name
|
|
21857
|
-
})))),
|
|
21857
|
+
})))), W.success("Detail view configuration saved");
|
|
21858
21858
|
} catch (e) {
|
|
21859
|
-
|
|
21859
|
+
W.error(e?.message || "Could not save configuration");
|
|
21860
21860
|
} finally {
|
|
21861
21861
|
O(!1);
|
|
21862
21862
|
}
|
|
@@ -22181,7 +22181,7 @@ function qv() {
|
|
|
22181
22181
|
size: "small",
|
|
22182
22182
|
icon: /* @__PURE__ */ q(Ie, {}),
|
|
22183
22183
|
disabled: !c,
|
|
22184
|
-
onClick: () =>
|
|
22184
|
+
onClick: () => N(!0),
|
|
22185
22185
|
children: "Preview"
|
|
22186
22186
|
}),
|
|
22187
22187
|
/* @__PURE__ */ q(f, {
|
|
@@ -22190,7 +22190,7 @@ function qv() {
|
|
|
22190
22190
|
icon: /* @__PURE__ */ q(xt, {}),
|
|
22191
22191
|
loading: D,
|
|
22192
22192
|
disabled: !c,
|
|
22193
|
-
onClick:
|
|
22193
|
+
onClick: G,
|
|
22194
22194
|
children: "Save Configuration"
|
|
22195
22195
|
})
|
|
22196
22196
|
]
|
|
@@ -22306,19 +22306,19 @@ function qv() {
|
|
|
22306
22306
|
/* @__PURE__ */ q(Uv, {
|
|
22307
22307
|
open: !!j,
|
|
22308
22308
|
merge: j?.merge,
|
|
22309
|
-
fieldOptions:
|
|
22309
|
+
fieldOptions: oe,
|
|
22310
22310
|
groupOptions: g,
|
|
22311
22311
|
onClose: () => M(null),
|
|
22312
22312
|
onSave: le
|
|
22313
22313
|
}, j ? `merge-${j.index ?? "new"}` : "merge-closed"),
|
|
22314
22314
|
/* @__PURE__ */ q(Kv, {
|
|
22315
|
-
open:
|
|
22315
|
+
open: P,
|
|
22316
22316
|
onClose: () => F(!1)
|
|
22317
22317
|
}),
|
|
22318
22318
|
/* @__PURE__ */ q(Wv, {
|
|
22319
|
-
open:
|
|
22319
|
+
open: ee,
|
|
22320
22320
|
module: c,
|
|
22321
|
-
onClose: () =>
|
|
22321
|
+
onClose: () => N(!1)
|
|
22322
22322
|
}),
|
|
22323
22323
|
/* @__PURE__ */ q(iv, {
|
|
22324
22324
|
open: !!I,
|
|
@@ -22526,7 +22526,7 @@ function ty({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
|
22526
22526
|
});
|
|
22527
22527
|
}
|
|
22528
22528
|
function ny() {
|
|
22529
|
-
let [e, t] = o([]), [i, a] = o([]), [c, l] = o("job"), [u, d] = o(0), [p, m] = o([]), [h, g] = o(null), [_, v] = o([]), [y, b] = o(!1), [x, S] = o(!1), [C, w] = o(!1), [T, E] = o(!1), [D, O] = o(null), [k, A] = o(!1), [M,
|
|
22529
|
+
let [e, t] = o([]), [i, a] = o([]), [c, l] = o("job"), [u, d] = o(0), [p, m] = o([]), [h, g] = o(null), [_, v] = o([]), [y, b] = o(!1), [x, S] = o(!1), [C, w] = o(!1), [T, E] = o(!1), [D, O] = o(null), [k, A] = o(!1), [M, ee] = o(null);
|
|
22530
22530
|
r(() => {
|
|
22531
22531
|
Promise.all([Si(), Ui()]).then(([e, { roles: n }]) => {
|
|
22532
22532
|
let r = Array.isArray(e) ? e.map((e) => e.module ?? e.key ?? e.value ?? e) : [];
|
|
@@ -22535,7 +22535,7 @@ function ny() {
|
|
|
22535
22535
|
t(Yv);
|
|
22536
22536
|
});
|
|
22537
22537
|
}, []);
|
|
22538
|
-
let
|
|
22538
|
+
let N = n(async () => {
|
|
22539
22539
|
S(!0), O(null);
|
|
22540
22540
|
try {
|
|
22541
22541
|
let e = await ka(c);
|
|
@@ -22549,26 +22549,26 @@ function ny() {
|
|
|
22549
22549
|
}
|
|
22550
22550
|
}, [c, u]);
|
|
22551
22551
|
r(() => {
|
|
22552
|
-
|
|
22553
|
-
}, [
|
|
22552
|
+
N();
|
|
22553
|
+
}, [N]), r(() => {
|
|
22554
22554
|
let e = p.find((e) => e.roleId === u);
|
|
22555
22555
|
g(e ?? null), v(e ? e.rowActions ?? [] : []), b(!1);
|
|
22556
22556
|
}, [u, p]);
|
|
22557
|
-
let
|
|
22557
|
+
let P = async () => {
|
|
22558
22558
|
w(!0);
|
|
22559
22559
|
try {
|
|
22560
|
-
if (h) await ja(h.id ?? h._id, _),
|
|
22560
|
+
if (h) await ja(h.id ?? h._id, _), W.success("Config saved");
|
|
22561
22561
|
else {
|
|
22562
22562
|
let e = await Aa({
|
|
22563
22563
|
module: c,
|
|
22564
22564
|
roleId: u,
|
|
22565
22565
|
rowActions: _
|
|
22566
22566
|
}), t = e?.data ?? e;
|
|
22567
|
-
g(t), m((e) => [...e, t]),
|
|
22567
|
+
g(t), m((e) => [...e, t]), W.success("Config created");
|
|
22568
22568
|
}
|
|
22569
22569
|
b(!1);
|
|
22570
22570
|
} catch (e) {
|
|
22571
|
-
|
|
22571
|
+
W.error(e.message);
|
|
22572
22572
|
} finally {
|
|
22573
22573
|
w(!1);
|
|
22574
22574
|
}
|
|
@@ -22576,22 +22576,22 @@ function ny() {
|
|
|
22576
22576
|
E(!0);
|
|
22577
22577
|
try {
|
|
22578
22578
|
let e = await Na(), t = e?.data?.seeded ?? e?.seeded ?? 0;
|
|
22579
|
-
|
|
22579
|
+
W.success(`Seeded ${t} new config(s)`), await N();
|
|
22580
22580
|
} catch (e) {
|
|
22581
|
-
|
|
22581
|
+
W.error(e.message);
|
|
22582
22582
|
} finally {
|
|
22583
22583
|
E(!1);
|
|
22584
22584
|
}
|
|
22585
22585
|
}, te = async () => {
|
|
22586
22586
|
if (h) try {
|
|
22587
|
-
await Ma(h.id ?? h._id),
|
|
22587
|
+
await Ma(h.id ?? h._id), W.success("Config deleted"), await N();
|
|
22588
22588
|
} catch (e) {
|
|
22589
|
-
|
|
22589
|
+
W.error(e.message);
|
|
22590
22590
|
}
|
|
22591
22591
|
}, z = () => {
|
|
22592
|
-
|
|
22592
|
+
ee(null), A(!0);
|
|
22593
22593
|
}, ne = (e) => {
|
|
22594
|
-
|
|
22594
|
+
ee(e), A(!0);
|
|
22595
22595
|
}, B = (e) => {
|
|
22596
22596
|
v(M ? (t) => t.map((t) => t.key === M.key ? {
|
|
22597
22597
|
...t,
|
|
@@ -22608,7 +22608,7 @@ function ny() {
|
|
|
22608
22608
|
let r = [...n], i = e + t;
|
|
22609
22609
|
return i < 0 || i >= r.length ? n : ([r[e], r[i]] = [r[i], r[e]], r);
|
|
22610
22610
|
}), b(!0);
|
|
22611
|
-
},
|
|
22611
|
+
}, oe = [{
|
|
22612
22612
|
value: 0,
|
|
22613
22613
|
label: "All Roles (default)"
|
|
22614
22614
|
}, ...i.map((e) => ({
|
|
@@ -22685,13 +22685,13 @@ function ny() {
|
|
|
22685
22685
|
style: { width: 220 },
|
|
22686
22686
|
value: u,
|
|
22687
22687
|
onChange: (e) => d(e),
|
|
22688
|
-
options:
|
|
22688
|
+
options: oe
|
|
22689
22689
|
})] }),
|
|
22690
22690
|
/* @__PURE__ */ q("div", {
|
|
22691
22691
|
style: { paddingTop: 20 },
|
|
22692
22692
|
children: /* @__PURE__ */ q(f, {
|
|
22693
22693
|
icon: /* @__PURE__ */ q(gt, {}),
|
|
22694
|
-
onClick:
|
|
22694
|
+
onClick: N,
|
|
22695
22695
|
loading: x,
|
|
22696
22696
|
children: "Reload"
|
|
22697
22697
|
})
|
|
@@ -22740,7 +22740,7 @@ function ny() {
|
|
|
22740
22740
|
icon: /* @__PURE__ */ q(xt, {}),
|
|
22741
22741
|
loading: C,
|
|
22742
22742
|
disabled: !y,
|
|
22743
|
-
onClick:
|
|
22743
|
+
onClick: P,
|
|
22744
22744
|
children: "Save Config"
|
|
22745
22745
|
})
|
|
22746
22746
|
] }),
|
|
@@ -23029,7 +23029,7 @@ function gy() {
|
|
|
23029
23029
|
function M() {
|
|
23030
23030
|
p(null), h(py()), u(!0);
|
|
23031
23031
|
}
|
|
23032
|
-
function
|
|
23032
|
+
function ee(e) {
|
|
23033
23033
|
p(e), h({
|
|
23034
23034
|
name: e.name ?? "",
|
|
23035
23035
|
description: e.description ?? "",
|
|
@@ -23038,7 +23038,7 @@ function gy() {
|
|
|
23038
23038
|
isActive: e.isActive ?? !0
|
|
23039
23039
|
}), u(!0);
|
|
23040
23040
|
}
|
|
23041
|
-
async function
|
|
23041
|
+
async function N() {
|
|
23042
23042
|
if (m.name.trim()) {
|
|
23043
23043
|
_(!0);
|
|
23044
23044
|
try {
|
|
@@ -23051,7 +23051,7 @@ function gy() {
|
|
|
23051
23051
|
}
|
|
23052
23052
|
}
|
|
23053
23053
|
}
|
|
23054
|
-
async function
|
|
23054
|
+
async function P(t) {
|
|
23055
23055
|
await Ra(t.id), O(e);
|
|
23056
23056
|
}
|
|
23057
23057
|
async function F() {
|
|
@@ -23210,11 +23210,11 @@ function gy() {
|
|
|
23210
23210
|
icon: /* @__PURE__ */ q(Me, {}),
|
|
23211
23211
|
size: "small",
|
|
23212
23212
|
type: "text",
|
|
23213
|
-
onClick: () =>
|
|
23213
|
+
onClick: () => ee(t)
|
|
23214
23214
|
})
|
|
23215
23215
|
}), /* @__PURE__ */ q(j, {
|
|
23216
23216
|
title: "Delete this rule?",
|
|
23217
|
-
onConfirm: () =>
|
|
23217
|
+
onConfirm: () => P(t),
|
|
23218
23218
|
children: /* @__PURE__ */ q(H, {
|
|
23219
23219
|
title: "Delete",
|
|
23220
23220
|
children: /* @__PURE__ */ q(f, {
|
|
@@ -23247,7 +23247,7 @@ function gy() {
|
|
|
23247
23247
|
}), /* @__PURE__ */ q(f, {
|
|
23248
23248
|
type: "primary",
|
|
23249
23249
|
loading: g,
|
|
23250
|
-
onClick:
|
|
23250
|
+
onClick: N,
|
|
23251
23251
|
children: "Save Rule"
|
|
23252
23252
|
})]
|
|
23253
23253
|
}),
|
|
@@ -23662,12 +23662,12 @@ function Ey({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
23662
23662
|
};
|
|
23663
23663
|
});
|
|
23664
23664
|
if (t.length === 0) {
|
|
23665
|
-
|
|
23665
|
+
W.info("No values found for this field");
|
|
23666
23666
|
return;
|
|
23667
23667
|
}
|
|
23668
23668
|
h({ valueStyles: t });
|
|
23669
23669
|
} catch {
|
|
23670
|
-
|
|
23670
|
+
W.error("Could not detect values");
|
|
23671
23671
|
} finally {
|
|
23672
23672
|
x(!1);
|
|
23673
23673
|
}
|
|
@@ -23684,7 +23684,7 @@ function Ey({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
23684
23684
|
iconPath: n?.iconPath ?? n?.path ?? ""
|
|
23685
23685
|
});
|
|
23686
23686
|
} catch {
|
|
23687
|
-
|
|
23687
|
+
W.error("Icon upload failed");
|
|
23688
23688
|
} finally {
|
|
23689
23689
|
y((t) => ({
|
|
23690
23690
|
...t,
|
|
@@ -23693,7 +23693,7 @@ function Ey({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
23693
23693
|
}
|
|
23694
23694
|
return !1;
|
|
23695
23695
|
}
|
|
23696
|
-
let A = e.renderType ?? "", j = !!e.commonStyle, M = e.commonStyle ?? {},
|
|
23696
|
+
let A = e.renderType ?? "", j = !!e.commonStyle, M = e.commonStyle ?? {}, ee = e.valueStyles ?? [], P = e.renderConfig ?? {};
|
|
23697
23697
|
return /* @__PURE__ */ J(K, { children: [
|
|
23698
23698
|
/* @__PURE__ */ J("div", {
|
|
23699
23699
|
className: "uss-detail-section",
|
|
@@ -23718,15 +23718,15 @@ function Ey({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
23718
23718
|
A === "badge" && /* @__PURE__ */ J("div", {
|
|
23719
23719
|
className: "uss-badge-config",
|
|
23720
23720
|
children: [
|
|
23721
|
-
/* @__PURE__ */ J(
|
|
23721
|
+
/* @__PURE__ */ J(N.Group, {
|
|
23722
23722
|
size: "small",
|
|
23723
23723
|
value: j ? "common" : "perValue",
|
|
23724
23724
|
onChange: (e) => S(e.target.value),
|
|
23725
23725
|
style: { marginBottom: 8 },
|
|
23726
|
-
children: [/* @__PURE__ */ q(
|
|
23726
|
+
children: [/* @__PURE__ */ q(N, {
|
|
23727
23727
|
value: "perValue",
|
|
23728
23728
|
children: "Per value"
|
|
23729
|
-
}), /* @__PURE__ */ q(
|
|
23729
|
+
}), /* @__PURE__ */ q(N, {
|
|
23730
23730
|
value: "common",
|
|
23731
23731
|
children: "Same for all"
|
|
23732
23732
|
})]
|
|
@@ -23852,12 +23852,12 @@ function Ey({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
23852
23852
|
})]
|
|
23853
23853
|
})]
|
|
23854
23854
|
}),
|
|
23855
|
-
|
|
23855
|
+
ee.length === 0 && /* @__PURE__ */ q(_y, {
|
|
23856
23856
|
type: "secondary",
|
|
23857
23857
|
style: { fontSize: 12 },
|
|
23858
23858
|
children: "Click \"Auto-detect values\" to populate from live data, or \"Add\" to map manually."
|
|
23859
23859
|
}),
|
|
23860
|
-
|
|
23860
|
+
ee.map((e, t) => /* @__PURE__ */ J("div", {
|
|
23861
23861
|
style: {
|
|
23862
23862
|
display: "grid",
|
|
23863
23863
|
gridTemplateColumns: "1fr 1fr 62px 62px 54px 26px",
|
|
@@ -23977,13 +23977,13 @@ function Ey({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
23977
23977
|
allowClear: !0,
|
|
23978
23978
|
style: { width: "100%" },
|
|
23979
23979
|
placeholder: "e.g. recruiterName",
|
|
23980
|
-
value:
|
|
23980
|
+
value: P.labelField || void 0,
|
|
23981
23981
|
options: r.length > 0 ? r.map((e) => ({
|
|
23982
23982
|
value: e,
|
|
23983
23983
|
label: e
|
|
23984
23984
|
})) : [],
|
|
23985
23985
|
onChange: (e) => h({ renderConfig: {
|
|
23986
|
-
...
|
|
23986
|
+
...P,
|
|
23987
23987
|
labelField: e ?? ""
|
|
23988
23988
|
} })
|
|
23989
23989
|
})] }),
|
|
@@ -24001,13 +24001,13 @@ function Ey({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
24001
24001
|
allowClear: !0,
|
|
24002
24002
|
style: { width: "100%" },
|
|
24003
24003
|
placeholder: "color",
|
|
24004
|
-
value:
|
|
24004
|
+
value: P.colorField || void 0,
|
|
24005
24005
|
options: r.length > 0 ? r.map((e) => ({
|
|
24006
24006
|
value: e,
|
|
24007
24007
|
label: e
|
|
24008
24008
|
})) : [],
|
|
24009
24009
|
onChange: (e) => h({ renderConfig: {
|
|
24010
|
-
...
|
|
24010
|
+
...P,
|
|
24011
24011
|
colorField: e ?? ""
|
|
24012
24012
|
} })
|
|
24013
24013
|
})] }),
|
|
@@ -24024,9 +24024,9 @@ function Ey({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
24024
24024
|
type: "number",
|
|
24025
24025
|
min: 1,
|
|
24026
24026
|
max: 10,
|
|
24027
|
-
value:
|
|
24027
|
+
value: P.maxVisible || 3,
|
|
24028
24028
|
onChange: (e) => h({ renderConfig: {
|
|
24029
|
-
...
|
|
24029
|
+
...P,
|
|
24030
24030
|
maxVisible: Number(e.target.value) || 3
|
|
24031
24031
|
} })
|
|
24032
24032
|
})] })
|
|
@@ -24252,7 +24252,7 @@ function Ey({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
24252
24252
|
}), (e.actionButtons ?? []).map((e, t) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
|
|
24253
24253
|
className: "uss-action-btn-row",
|
|
24254
24254
|
children: [
|
|
24255
|
-
/* @__PURE__ */ q(
|
|
24255
|
+
/* @__PURE__ */ q(oe, {
|
|
24256
24256
|
showUploadList: !1,
|
|
24257
24257
|
beforeUpload: (e) => (k(t, e), !1),
|
|
24258
24258
|
accept: "image/*",
|
|
@@ -24282,14 +24282,14 @@ function Ey({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
24282
24282
|
placeholder: "Tooltip (e.g. Edit)",
|
|
24283
24283
|
style: { width: 110 }
|
|
24284
24284
|
}),
|
|
24285
|
-
/* @__PURE__ */ J(
|
|
24285
|
+
/* @__PURE__ */ J(N.Group, {
|
|
24286
24286
|
size: "small",
|
|
24287
24287
|
value: e.type ?? "page",
|
|
24288
24288
|
onChange: (e) => u(t, { type: e.target.value }),
|
|
24289
|
-
children: [/* @__PURE__ */ q(
|
|
24289
|
+
children: [/* @__PURE__ */ q(N, {
|
|
24290
24290
|
value: "page",
|
|
24291
24291
|
children: "Page"
|
|
24292
|
-
}), /* @__PURE__ */ q(
|
|
24292
|
+
}), /* @__PURE__ */ q(N, {
|
|
24293
24293
|
value: "popup",
|
|
24294
24294
|
children: "Popup"
|
|
24295
24295
|
})]
|
|
@@ -24579,7 +24579,7 @@ function jy({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onRe
|
|
|
24579
24579
|
let t = g.trim();
|
|
24580
24580
|
t && t !== e.fieldName ? j({ fieldName: t }) : _(e.fieldName);
|
|
24581
24581
|
}
|
|
24582
|
-
async function
|
|
24582
|
+
async function ee(t) {
|
|
24583
24583
|
j({ lookup: {
|
|
24584
24584
|
...e.lookup,
|
|
24585
24585
|
collection: t,
|
|
@@ -24588,7 +24588,7 @@ function jy({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onRe
|
|
|
24588
24588
|
projectFields: []
|
|
24589
24589
|
} }), y(await l(t));
|
|
24590
24590
|
}
|
|
24591
|
-
async function
|
|
24591
|
+
async function N(t, n) {
|
|
24592
24592
|
if (j({ lookup: {
|
|
24593
24593
|
...e.lookup,
|
|
24594
24594
|
...n
|
|
@@ -24598,7 +24598,7 @@ function jy({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onRe
|
|
|
24598
24598
|
x([]);
|
|
24599
24599
|
}
|
|
24600
24600
|
}
|
|
24601
|
-
function
|
|
24601
|
+
function P(t) {
|
|
24602
24602
|
let n = e.secondaryFields ?? [];
|
|
24603
24603
|
!t || n.includes(t) || j({ secondaryFields: [...n, t] });
|
|
24604
24604
|
}
|
|
@@ -24702,9 +24702,9 @@ function jy({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onRe
|
|
|
24702
24702
|
collections: c,
|
|
24703
24703
|
collFields: v,
|
|
24704
24704
|
subfields: b,
|
|
24705
|
-
onCollectionChange:
|
|
24706
|
-
onLookupFieldChange:
|
|
24707
|
-
addSecondaryField:
|
|
24705
|
+
onCollectionChange: ee,
|
|
24706
|
+
onLookupFieldChange: N,
|
|
24707
|
+
addSecondaryField: P,
|
|
24708
24708
|
removeSecondaryField: F,
|
|
24709
24709
|
addActionButton: I,
|
|
24710
24710
|
updateActionButton: te,
|
|
@@ -24718,8 +24718,8 @@ function jy({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onRe
|
|
|
24718
24718
|
configType: n,
|
|
24719
24719
|
collections: c,
|
|
24720
24720
|
collFields: v,
|
|
24721
|
-
onCollectionChange:
|
|
24722
|
-
onLookupFieldChange:
|
|
24721
|
+
onCollectionChange: ee,
|
|
24722
|
+
onLookupFieldChange: N
|
|
24723
24723
|
})
|
|
24724
24724
|
})] });
|
|
24725
24725
|
}
|
|
@@ -24932,7 +24932,7 @@ function Vy({ user: e }) {
|
|
|
24932
24932
|
return;
|
|
24933
24933
|
}
|
|
24934
24934
|
s(!0), d(!1), xa(p).then((e) => n(e ?? {})).catch((e) => {
|
|
24935
|
-
console.error("[UserPermPanel] getUserPermissions error:", e),
|
|
24935
|
+
console.error("[UserPermPanel] getUserPermissions error:", e), W.error("Failed to load permissions");
|
|
24936
24936
|
}).finally(() => s(!1));
|
|
24937
24937
|
}, [p]);
|
|
24938
24938
|
let h = i(() => Object.entries(t).filter(([, e]) => e && typeof e.permissions == "object" && Object.keys(e.permissions).length > 0), [t]);
|
|
@@ -25027,9 +25027,9 @@ function Vy({ user: e }) {
|
|
|
25027
25027
|
async function y() {
|
|
25028
25028
|
l(!0);
|
|
25029
25029
|
try {
|
|
25030
|
-
await Sa(p, t), d(!1),
|
|
25030
|
+
await Sa(p, t), d(!1), W.success("Permissions saved");
|
|
25031
25031
|
} catch {
|
|
25032
|
-
|
|
25032
|
+
W.error("Save failed");
|
|
25033
25033
|
} finally {
|
|
25034
25034
|
l(!1);
|
|
25035
25035
|
}
|
|
@@ -25101,12 +25101,12 @@ function Vy({ user: e }) {
|
|
|
25101
25101
|
children: [/* @__PURE__ */ q("div", {
|
|
25102
25102
|
className: "uperm-scope-title",
|
|
25103
25103
|
children: s.title
|
|
25104
|
-
}), s.control === "radio" ? /* @__PURE__ */ q(
|
|
25104
|
+
}), s.control === "radio" ? /* @__PURE__ */ q(N.Group, {
|
|
25105
25105
|
className: "uperm-scope-row",
|
|
25106
25106
|
value: l,
|
|
25107
25107
|
disabled: !c,
|
|
25108
25108
|
onChange: (t) => _(e, t.target.value, !0),
|
|
25109
|
-
children: o.map((e) => /* @__PURE__ */ q(
|
|
25109
|
+
children: o.map((e) => /* @__PURE__ */ q(N, {
|
|
25110
25110
|
className: "uperm-scope-option",
|
|
25111
25111
|
value: e,
|
|
25112
25112
|
children: Ny[e] ?? Fy(e)
|
|
@@ -25135,7 +25135,7 @@ function Hy({ user: e, configType: t }) {
|
|
|
25135
25135
|
r(() => {
|
|
25136
25136
|
e && (c(!0), Promise.all([aa(e, t), ca()]).then(([e, t]) => {
|
|
25137
25137
|
i(e), h(t);
|
|
25138
|
-
}).catch(() =>
|
|
25138
|
+
}).catch(() => W.error("Failed to load field config")).finally(() => c(!1)));
|
|
25139
25139
|
}, [e, t]);
|
|
25140
25140
|
let v = n[d] ?? [];
|
|
25141
25141
|
function y(e, t) {
|
|
@@ -25175,9 +25175,9 @@ function Hy({ user: e, configType: t }) {
|
|
|
25175
25175
|
[n]: !0
|
|
25176
25176
|
}));
|
|
25177
25177
|
try {
|
|
25178
|
-
await oa(e, n, v, t),
|
|
25178
|
+
await oa(e, n, v, t), W.success("Saved");
|
|
25179
25179
|
} catch {
|
|
25180
|
-
|
|
25180
|
+
W.error("Save failed");
|
|
25181
25181
|
} finally {
|
|
25182
25182
|
u((e) => ({
|
|
25183
25183
|
...e,
|
|
@@ -25251,7 +25251,7 @@ function Uy() {
|
|
|
25251
25251
|
}), i = (r.users ?? []).map(Cy);
|
|
25252
25252
|
u(i), p(r.total ?? i.length);
|
|
25253
25253
|
} catch {
|
|
25254
|
-
|
|
25254
|
+
W.error("Failed to load users");
|
|
25255
25255
|
} finally {
|
|
25256
25256
|
h(!1);
|
|
25257
25257
|
}
|
|
@@ -25466,7 +25466,7 @@ function qy({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
|
25466
25466
|
function Jy({ team: e, configType: t }) {
|
|
25467
25467
|
let [n, i] = o({}), [a, s] = o(!1), [c, l] = o({}), [u, d] = o("job");
|
|
25468
25468
|
r(() => {
|
|
25469
|
-
e && (s(!0), Xi(e, t).then(i).catch(() =>
|
|
25469
|
+
e && (s(!0), Xi(e, t).then(i).catch(() => W.error("Failed to load field config")).finally(() => s(!1)));
|
|
25470
25470
|
}, [e, t]);
|
|
25471
25471
|
let p = n[u] ?? [];
|
|
25472
25472
|
function m(e, t) {
|
|
@@ -25497,9 +25497,9 @@ function Jy({ team: e, configType: t }) {
|
|
|
25497
25497
|
[n]: !0
|
|
25498
25498
|
}));
|
|
25499
25499
|
try {
|
|
25500
|
-
await $i(e, n, p, t),
|
|
25500
|
+
await $i(e, n, p, t), W.success("Saved");
|
|
25501
25501
|
} catch {
|
|
25502
|
-
|
|
25502
|
+
W.error("Save failed");
|
|
25503
25503
|
} finally {
|
|
25504
25504
|
l((e) => ({
|
|
25505
25505
|
...e,
|
|
@@ -25570,7 +25570,7 @@ function Yy() {
|
|
|
25570
25570
|
let e = await Ki();
|
|
25571
25571
|
p(e.teams), h(e.total);
|
|
25572
25572
|
} catch {
|
|
25573
|
-
|
|
25573
|
+
W.error("Failed to load teams");
|
|
25574
25574
|
} finally {
|
|
25575
25575
|
_(!1);
|
|
25576
25576
|
}
|
|
@@ -25586,7 +25586,7 @@ function Yy() {
|
|
|
25586
25586
|
}
|
|
25587
25587
|
async function E() {
|
|
25588
25588
|
if (!v.trim()) {
|
|
25589
|
-
|
|
25589
|
+
W.warning("Team name is required");
|
|
25590
25590
|
return;
|
|
25591
25591
|
}
|
|
25592
25592
|
x(!0);
|
|
@@ -25595,9 +25595,9 @@ function Yy() {
|
|
|
25595
25595
|
teamName: v.trim(),
|
|
25596
25596
|
managerId: e.managerId,
|
|
25597
25597
|
memberIds: e.memberIds
|
|
25598
|
-
}),
|
|
25598
|
+
}), W.success("Team updated"), c(!1), S();
|
|
25599
25599
|
} catch {
|
|
25600
|
-
|
|
25600
|
+
W.error("Failed to update team");
|
|
25601
25601
|
} finally {
|
|
25602
25602
|
x(!1);
|
|
25603
25603
|
}
|
|
@@ -25819,7 +25819,7 @@ function Qy({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
|
25819
25819
|
function $y({ role: e, configType: t }) {
|
|
25820
25820
|
let [n, i] = o({}), [a, s] = o(!1), [c, l] = o({}), [u, d] = o("job");
|
|
25821
25821
|
r(() => {
|
|
25822
|
-
e && (s(!0), Yi(e, t).then(i).catch(() =>
|
|
25822
|
+
e && (s(!0), Yi(e, t).then(i).catch(() => W.error("Failed to load field config")).finally(() => s(!1)));
|
|
25823
25823
|
}, [e, t]);
|
|
25824
25824
|
let p = n[u] ?? [];
|
|
25825
25825
|
function m(e, t) {
|
|
@@ -25850,9 +25850,9 @@ function $y({ role: e, configType: t }) {
|
|
|
25850
25850
|
[n]: !0
|
|
25851
25851
|
}));
|
|
25852
25852
|
try {
|
|
25853
|
-
await Qi(e, n, p, t),
|
|
25853
|
+
await Qi(e, n, p, t), W.success("Saved");
|
|
25854
25854
|
} catch {
|
|
25855
|
-
|
|
25855
|
+
W.error("Save failed");
|
|
25856
25856
|
} finally {
|
|
25857
25857
|
l((e) => ({
|
|
25858
25858
|
...e,
|
|
@@ -25923,7 +25923,7 @@ function eb() {
|
|
|
25923
25923
|
let e = await Ui();
|
|
25924
25924
|
u(e.roles), p(e.total);
|
|
25925
25925
|
} catch {
|
|
25926
|
-
|
|
25926
|
+
W.error("Failed to load roles");
|
|
25927
25927
|
} finally {
|
|
25928
25928
|
h(!1);
|
|
25929
25929
|
}
|
|
@@ -26231,7 +26231,7 @@ function hb({ open: e, onClose: t }) {
|
|
|
26231
26231
|
try {
|
|
26232
26232
|
s(await da());
|
|
26233
26233
|
} catch {
|
|
26234
|
-
|
|
26234
|
+
W.error("Failed to load modules");
|
|
26235
26235
|
} finally {
|
|
26236
26236
|
l(!1);
|
|
26237
26237
|
}
|
|
@@ -26241,7 +26241,7 @@ function hb({ open: e, onClose: t }) {
|
|
|
26241
26241
|
try {
|
|
26242
26242
|
g(await ha());
|
|
26243
26243
|
} catch {
|
|
26244
|
-
|
|
26244
|
+
W.error("Failed to load actions");
|
|
26245
26245
|
} finally {
|
|
26246
26246
|
v(!1);
|
|
26247
26247
|
}
|
|
@@ -26249,15 +26249,15 @@ function hb({ open: e, onClose: t }) {
|
|
|
26249
26249
|
async function O() {
|
|
26250
26250
|
let e = u.trim();
|
|
26251
26251
|
if (!e) {
|
|
26252
|
-
|
|
26252
|
+
W.warning("Enter a module name");
|
|
26253
26253
|
return;
|
|
26254
26254
|
}
|
|
26255
26255
|
m(!0);
|
|
26256
26256
|
try {
|
|
26257
26257
|
let t = await fa({ menuName: e });
|
|
26258
|
-
s((e) => [...e, t]), d(""),
|
|
26258
|
+
s((e) => [...e, t]), d(""), W.success("Module added");
|
|
26259
26259
|
} catch {
|
|
26260
|
-
|
|
26260
|
+
W.error("Failed to add module");
|
|
26261
26261
|
} finally {
|
|
26262
26262
|
m(!1);
|
|
26263
26263
|
}
|
|
@@ -26269,20 +26269,20 @@ function hb({ open: e, onClose: t }) {
|
|
|
26269
26269
|
MENUNAME: t
|
|
26270
26270
|
} : n));
|
|
26271
26271
|
} catch {
|
|
26272
|
-
|
|
26272
|
+
W.error("Failed to update module");
|
|
26273
26273
|
}
|
|
26274
26274
|
}
|
|
26275
26275
|
async function j(e) {
|
|
26276
26276
|
try {
|
|
26277
|
-
await ma(e), s((t) => t.filter((t) => t.MENUID !== e)),
|
|
26277
|
+
await ma(e), s((t) => t.filter((t) => t.MENUID !== e)), W.success("Module deleted");
|
|
26278
26278
|
} catch {
|
|
26279
|
-
|
|
26279
|
+
W.error("Failed to delete module");
|
|
26280
26280
|
}
|
|
26281
26281
|
}
|
|
26282
26282
|
async function M() {
|
|
26283
26283
|
let e = y.trim(), t = x.trim().toLowerCase().replace(/\s+/g, "_");
|
|
26284
26284
|
if (!e || !t) {
|
|
26285
|
-
|
|
26285
|
+
W.warning("Enter both name and key");
|
|
26286
26286
|
return;
|
|
26287
26287
|
}
|
|
26288
26288
|
T(!0);
|
|
@@ -26291,31 +26291,31 @@ function hb({ open: e, onClose: t }) {
|
|
|
26291
26291
|
permissionName: e,
|
|
26292
26292
|
permissionKey: t
|
|
26293
26293
|
});
|
|
26294
|
-
g((e) => [...e, n]), b(""), S(""),
|
|
26294
|
+
g((e) => [...e, n]), b(""), S(""), W.success("Action added");
|
|
26295
26295
|
} catch (e) {
|
|
26296
|
-
|
|
26296
|
+
W.error(e?.message?.includes("409") || e?.status === 409 ? "Permission key already exists" : "Failed to add action");
|
|
26297
26297
|
} finally {
|
|
26298
26298
|
T(!1);
|
|
26299
26299
|
}
|
|
26300
26300
|
}
|
|
26301
|
-
async function
|
|
26301
|
+
async function ee(e, t) {
|
|
26302
26302
|
try {
|
|
26303
26303
|
await _a(e, { permissionName: t }), g((n) => n.map((n) => n.permissionId === e ? {
|
|
26304
26304
|
...n,
|
|
26305
26305
|
permissionName: t
|
|
26306
26306
|
} : n));
|
|
26307
26307
|
} catch {
|
|
26308
|
-
|
|
26308
|
+
W.error("Failed to update action");
|
|
26309
26309
|
}
|
|
26310
26310
|
}
|
|
26311
|
-
async function
|
|
26311
|
+
async function N(e) {
|
|
26312
26312
|
try {
|
|
26313
|
-
await va(e), g((t) => t.filter((t) => t.permissionId !== e)),
|
|
26313
|
+
await va(e), g((t) => t.filter((t) => t.permissionId !== e)), W.success("Action deleted");
|
|
26314
26314
|
} catch {
|
|
26315
|
-
|
|
26315
|
+
W.error("Failed to delete action");
|
|
26316
26316
|
}
|
|
26317
26317
|
}
|
|
26318
|
-
let
|
|
26318
|
+
let P = [{
|
|
26319
26319
|
key: "modules",
|
|
26320
26320
|
label: "Modules",
|
|
26321
26321
|
children: /* @__PURE__ */ J(R, {
|
|
@@ -26390,8 +26390,8 @@ function hb({ open: e, onClose: t }) {
|
|
|
26390
26390
|
children: "No actions found"
|
|
26391
26391
|
}), h.map((e) => /* @__PURE__ */ q(mb, {
|
|
26392
26392
|
label: `${e.permissionName} (${e.permissionKey})`,
|
|
26393
|
-
onSave: (t) =>
|
|
26394
|
-
onDelete: () =>
|
|
26393
|
+
onSave: (t) => ee(e.permissionId, t),
|
|
26394
|
+
onDelete: () => N(e.permissionId)
|
|
26395
26395
|
}, e.permissionId))]
|
|
26396
26396
|
})]
|
|
26397
26397
|
})
|
|
@@ -26414,7 +26414,7 @@ function hb({ open: e, onClose: t }) {
|
|
|
26414
26414
|
activeKey: n,
|
|
26415
26415
|
onChange: i,
|
|
26416
26416
|
size: "small",
|
|
26417
|
-
items:
|
|
26417
|
+
items: P
|
|
26418
26418
|
})
|
|
26419
26419
|
});
|
|
26420
26420
|
}
|
|
@@ -26423,7 +26423,7 @@ function gb({ role: e, moduleLabels: t, actionLabels: n, onModuleLabelSave: a, o
|
|
|
26423
26423
|
r(() => {
|
|
26424
26424
|
y && (m(!0), v(!1), ya(y).then((e) => {
|
|
26425
26425
|
l(e), d(e);
|
|
26426
|
-
}).catch(() =>
|
|
26426
|
+
}).catch(() => W.error("Failed to load permissions")).finally(() => m(!1)));
|
|
26427
26427
|
}, [y]);
|
|
26428
26428
|
function b(e, t) {
|
|
26429
26429
|
v(!0), d((n) => {
|
|
@@ -26452,9 +26452,9 @@ function gb({ role: e, moduleLabels: t, actionLabels: n, onModuleLabelSave: a, o
|
|
|
26452
26452
|
async function x() {
|
|
26453
26453
|
g(!0);
|
|
26454
26454
|
try {
|
|
26455
|
-
await ba(y, u), l(u), v(!1),
|
|
26455
|
+
await ba(y, u), l(u), v(!1), W.success("Permissions saved");
|
|
26456
26456
|
} catch {
|
|
26457
|
-
|
|
26457
|
+
W.error("Save failed");
|
|
26458
26458
|
} finally {
|
|
26459
26459
|
g(!1);
|
|
26460
26460
|
}
|
|
@@ -26543,7 +26543,7 @@ function _b() {
|
|
|
26543
26543
|
});
|
|
26544
26544
|
}, []);
|
|
26545
26545
|
function x() {
|
|
26546
|
-
g({}), v({}), ub(sb, {}), ub(cb, {}),
|
|
26546
|
+
g({}), v({}), ub(sb, {}), ub(cb, {}), W.success("Labels reset to defaults");
|
|
26547
26547
|
}
|
|
26548
26548
|
let S = n(async () => {
|
|
26549
26549
|
s(!0);
|
|
@@ -26551,7 +26551,7 @@ function _b() {
|
|
|
26551
26551
|
let { roles: e } = await Ui();
|
|
26552
26552
|
t(e), e.length > 0 && l(e[0]);
|
|
26553
26553
|
} catch {
|
|
26554
|
-
|
|
26554
|
+
W.error("Failed to load roles");
|
|
26555
26555
|
} finally {
|
|
26556
26556
|
s(!1);
|
|
26557
26557
|
}
|
|
@@ -27807,10 +27807,10 @@ function Yb({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
27807
27807
|
] });
|
|
27808
27808
|
}
|
|
27809
27809
|
function Xb() {
|
|
27810
|
-
let e = Ut(), t = i(() => Nn(), []), c = a(null), l = a(null), [u, d] = o([]), [m, g] = o(""), [_, v] = o("idle"), [y, b] = o(!1), [x, S] = o(null), [C, w] = o([]), [T, E] = o("all"), [D, O] = o(null), [k, A] = o(null), [j, M] = o(!1),
|
|
27810
|
+
let e = Ut(), t = i(() => Nn(), []), c = a(null), l = a(null), [u, d] = o([]), [m, g] = o(""), [_, v] = o("idle"), [y, b] = o(!1), [x, S] = o(null), [C, w] = o([]), [T, E] = o("all"), [D, O] = o(null), [k, A] = o(null), [j, M] = o(!1), N = u.map((e) => ({
|
|
27811
27811
|
value: e.modulename,
|
|
27812
27812
|
label: e.modulename
|
|
27813
|
-
})),
|
|
27813
|
+
})), P = Kb(C), te = _ === "encoding" || _ === "validating", R = !!m && !te, z = Hb[_] ?? 0, ne = C.find((e) => e.row_status === "invalid")?.id, B = n(() => {
|
|
27814
27814
|
g(""), v("idle"), b(!1), S(null), w([]), E("all"), O(null), A(null), c.current && (c.current.value = "");
|
|
27815
27815
|
}, []);
|
|
27816
27816
|
r(() => {
|
|
@@ -27821,7 +27821,7 @@ function Xb() {
|
|
|
27821
27821
|
activeOnly: !0
|
|
27822
27822
|
}))?.items ?? []);
|
|
27823
27823
|
} catch (e) {
|
|
27824
|
-
console.error(e),
|
|
27824
|
+
console.error(e), W.error("Unable to load modules.");
|
|
27825
27825
|
}
|
|
27826
27826
|
}
|
|
27827
27827
|
e();
|
|
@@ -27865,9 +27865,9 @@ function Xb() {
|
|
|
27865
27865
|
let t = (await e.text()).trim(), n = atob(t), r = new Uint8Array(n.length);
|
|
27866
27866
|
for (let e = 0; e < n.length; e += 1) r[e] = n.charCodeAt(e);
|
|
27867
27867
|
let i = new Blob([r], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
27868
|
-
o.href = a, o.download = Bb, document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(a),
|
|
27868
|
+
o.href = a, o.download = Bb, document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(a), W.success("Sample template downloaded.");
|
|
27869
27869
|
} catch (e) {
|
|
27870
|
-
console.error(e),
|
|
27870
|
+
console.error(e), W.error("Unable to download sample template.");
|
|
27871
27871
|
}
|
|
27872
27872
|
}, ae = async () => {
|
|
27873
27873
|
v("inserting"), O(null);
|
|
@@ -27877,7 +27877,7 @@ function Xb() {
|
|
|
27877
27877
|
module: m,
|
|
27878
27878
|
uploaded_by: localStorage.getItem("user_Email") ?? "",
|
|
27879
27879
|
rows: Gb(C)
|
|
27880
|
-
})), v("done"),
|
|
27880
|
+
})), v("done"), W.success("Bulk upload saved. Redirecting to view test cases..."), window.setTimeout(() => e("/viewTestCase"), 900);
|
|
27881
27881
|
} catch (e) {
|
|
27882
27882
|
console.error(e), O(e.payload ?? {
|
|
27883
27883
|
code: "NETWORK_ERROR",
|
|
@@ -27951,7 +27951,7 @@ function Xb() {
|
|
|
27951
27951
|
optionFilterProp: "label",
|
|
27952
27952
|
className: "bulk-module-select",
|
|
27953
27953
|
placeholder: "Choose a module",
|
|
27954
|
-
options:
|
|
27954
|
+
options: N,
|
|
27955
27955
|
value: m || void 0,
|
|
27956
27956
|
onChange: re
|
|
27957
27957
|
})
|
|
@@ -28001,7 +28001,7 @@ function Xb() {
|
|
|
28001
28001
|
accept: ".xlsx,.csv",
|
|
28002
28002
|
onChange: (e) => ie(e.target.files?.[0])
|
|
28003
28003
|
}),
|
|
28004
|
-
te && /* @__PURE__ */ q(
|
|
28004
|
+
te && /* @__PURE__ */ q(ee, {
|
|
28005
28005
|
percent: _ === "encoding" ? 45 : 82,
|
|
28006
28006
|
showInfo: !1,
|
|
28007
28007
|
size: "small"
|
|
@@ -28019,7 +28019,7 @@ function Xb() {
|
|
|
28019
28019
|
title: "3. Validation result",
|
|
28020
28020
|
children: [
|
|
28021
28021
|
/* @__PURE__ */ q(Jb, {
|
|
28022
|
-
errors:
|
|
28022
|
+
errors: P,
|
|
28023
28023
|
expanded: j,
|
|
28024
28024
|
onToggle: () => M((e) => !e),
|
|
28025
28025
|
onSummaryClick: H
|
|
@@ -28283,14 +28283,14 @@ function cx() {
|
|
|
28283
28283
|
let [e] = C.useForm(), [t] = C.useForm(), [a, s] = o([]), [l, u] = o([]), [d, m] = o([]), [g, _] = o(!1), [v, y] = o(!1), [b, x] = o({
|
|
28284
28284
|
open: !1,
|
|
28285
28285
|
typeKey: "module"
|
|
28286
|
-
}), [S, T] = o(!1), [E, D] = o(!1), [O, A] = o(!1), j = Ut(), M = tx[b.typeKey],
|
|
28286
|
+
}), [S, T] = o(!1), [E, D] = o(!1), [O, A] = o(!1), j = Ut(), M = tx[b.typeKey], ee = i(() => nx(a), [a]), N = C.useWatch("module", e), P = C.useWatch("flow", e), te = !!rx(N), R = !!rx(P), z = !te, ne = !te || !R, B = (e, t = []) => {
|
|
28287
28287
|
e === "module" && s(t);
|
|
28288
28288
|
}, re = async () => {
|
|
28289
28289
|
_(!0);
|
|
28290
28290
|
try {
|
|
28291
28291
|
s((await wh(tx.module.dbName))?.items ?? []);
|
|
28292
28292
|
} catch (e) {
|
|
28293
|
-
console.error("Unable to load testing options:", e),
|
|
28293
|
+
console.error("Unable to load testing options:", e), W.error("Unable to load testing options.");
|
|
28294
28294
|
} finally {
|
|
28295
28295
|
_(!1);
|
|
28296
28296
|
}
|
|
@@ -28306,7 +28306,7 @@ function cx() {
|
|
|
28306
28306
|
}), t = Array.isArray(e?.items) ? e.items : [];
|
|
28307
28307
|
u(t), m(ax(t));
|
|
28308
28308
|
} catch (e) {
|
|
28309
|
-
console.error("Unable to load flows:", e),
|
|
28309
|
+
console.error("Unable to load flows:", e), W.error("Unable to load flows.");
|
|
28310
28310
|
} finally {
|
|
28311
28311
|
y(!1);
|
|
28312
28312
|
}
|
|
@@ -28321,7 +28321,7 @@ function cx() {
|
|
|
28321
28321
|
try {
|
|
28322
28322
|
e.setFieldsValue({ step_order: ox(r, i, a) });
|
|
28323
28323
|
} catch (e) {
|
|
28324
|
-
console.error("Unable to load step order:", e),
|
|
28324
|
+
console.error("Unable to load step order:", e), W.error("Unable to load step order.");
|
|
28325
28325
|
} finally {
|
|
28326
28326
|
D(!1);
|
|
28327
28327
|
}
|
|
@@ -28329,14 +28329,14 @@ function cx() {
|
|
|
28329
28329
|
r(() => {
|
|
28330
28330
|
Promise.resolve().then(re);
|
|
28331
28331
|
}, []), r(() => {
|
|
28332
|
-
Promise.resolve().then(() => ie(
|
|
28333
|
-
}, [ie,
|
|
28334
|
-
Promise.resolve().then(() => V(
|
|
28332
|
+
Promise.resolve().then(() => ie(N));
|
|
28333
|
+
}, [ie, N]), r(() => {
|
|
28334
|
+
Promise.resolve().then(() => V(N, P, l));
|
|
28335
28335
|
}, [
|
|
28336
28336
|
l,
|
|
28337
28337
|
V,
|
|
28338
|
-
|
|
28339
|
-
|
|
28338
|
+
P,
|
|
28339
|
+
N
|
|
28340
28340
|
]);
|
|
28341
28341
|
let ae = async (t) => {
|
|
28342
28342
|
let n = {
|
|
@@ -28353,9 +28353,9 @@ function cx() {
|
|
|
28353
28353
|
};
|
|
28354
28354
|
A(!0);
|
|
28355
28355
|
try {
|
|
28356
|
-
await Dh(n),
|
|
28356
|
+
await Dh(n), W.success("Test case details saved successfully."), e.resetFields(), u([]), m([]);
|
|
28357
28357
|
} catch (e) {
|
|
28358
|
-
console.error("Unable to save test case:", e),
|
|
28358
|
+
console.error("Unable to save test case:", e), W.error("Unable to save test case.");
|
|
28359
28359
|
} finally {
|
|
28360
28360
|
A(!1);
|
|
28361
28361
|
}
|
|
@@ -28373,12 +28373,12 @@ function cx() {
|
|
|
28373
28373
|
value: void 0,
|
|
28374
28374
|
expected: void 0
|
|
28375
28375
|
});
|
|
28376
|
-
},
|
|
28376
|
+
}, oe = (t) => {
|
|
28377
28377
|
e.setFieldsValue({
|
|
28378
28378
|
flow: rx(t),
|
|
28379
28379
|
step_order: void 0
|
|
28380
28380
|
});
|
|
28381
|
-
},
|
|
28381
|
+
}, G = (e) => {
|
|
28382
28382
|
let n = tx[e];
|
|
28383
28383
|
x({
|
|
28384
28384
|
open: !0,
|
|
@@ -28398,10 +28398,10 @@ function cx() {
|
|
|
28398
28398
|
name: n,
|
|
28399
28399
|
type: M.dbName
|
|
28400
28400
|
});
|
|
28401
|
-
B(b.typeKey, r?.items ?? []), e.setFieldsValue({ [M.formField]: n }),
|
|
28401
|
+
B(b.typeKey, r?.items ?? []), e.setFieldsValue({ [M.formField]: n }), W.success(`${M.label} added successfully.`), se();
|
|
28402
28402
|
} catch (e) {
|
|
28403
28403
|
if (e?.errorFields) return;
|
|
28404
|
-
console.error("Unable to save testing option:", e),
|
|
28404
|
+
console.error("Unable to save testing option:", e), W.error(`Unable to add ${M.label.toLowerCase()}.`);
|
|
28405
28405
|
} finally {
|
|
28406
28406
|
T(!1);
|
|
28407
28407
|
}
|
|
@@ -28475,14 +28475,14 @@ function cx() {
|
|
|
28475
28475
|
loading: g,
|
|
28476
28476
|
optionFilterProp: "label",
|
|
28477
28477
|
placeholder: "Select module",
|
|
28478
|
-
options:
|
|
28478
|
+
options: ee,
|
|
28479
28479
|
onChange: U
|
|
28480
28480
|
})
|
|
28481
28481
|
}), /* @__PURE__ */ q(f, {
|
|
28482
28482
|
"aria-label": "Add module",
|
|
28483
28483
|
icon: /* @__PURE__ */ q(pt, {}),
|
|
28484
28484
|
style: { marginTop: 30 },
|
|
28485
|
-
onClick: () =>
|
|
28485
|
+
onClick: () => G("module")
|
|
28486
28486
|
})]
|
|
28487
28487
|
})
|
|
28488
28488
|
}),
|
|
@@ -28498,7 +28498,7 @@ function cx() {
|
|
|
28498
28498
|
disabled: z,
|
|
28499
28499
|
options: d,
|
|
28500
28500
|
placeholder: v ? "Loading flows" : "Enter flow",
|
|
28501
|
-
onChange:
|
|
28501
|
+
onChange: oe,
|
|
28502
28502
|
filterOption: (e, t) => t?.value?.toLowerCase().includes(e.toLowerCase())
|
|
28503
28503
|
})
|
|
28504
28504
|
})
|
|
@@ -28737,14 +28737,14 @@ function gx(e, t) {
|
|
|
28737
28737
|
})));
|
|
28738
28738
|
}
|
|
28739
28739
|
function _x() {
|
|
28740
|
-
let [e] = C.useForm(), t = Ut(), [a] = Gt(), s = a.get("edit"), c = !!s, l = i(() => Nn(), []), [u, d] = o([]), [m, g] = o([]), [_, v] = o([]), [y, b] = o(Zb), [x, S] = o({}), [T, E] = o(!1), [D, O] = o(!1), [k, A] = o(!1), [j, M] = o(!1), [
|
|
28740
|
+
let [e] = C.useForm(), t = Ut(), [a] = Gt(), s = a.get("edit"), c = !!s, l = i(() => Nn(), []), [u, d] = o([]), [m, g] = o([]), [_, v] = o([]), [y, b] = o(Zb), [x, S] = o({}), [T, E] = o(!1), [D, O] = o(!1), [k, A] = o(!1), [j, M] = o(!1), [ee, N] = o(!1), P = C.useWatch("module", e), te = C.useWatch("submodule", e), R = C.useWatch("actions", e), z = !!P, ne = !!te, re = i(() => hx(x, R), [x, R]), ie = i(() => fx(u, "modulename"), [u]), ae = i(() => fx(m, "submodulename"), [m]), H = i(() => u.find((e) => e.id === P)?.modulename ?? "", [u, P]), U = i(() => m.find((e) => e.id === te)?.submodulename ?? "", [te, m]), oe = n(async () => {
|
|
28741
28741
|
try {
|
|
28742
28742
|
let e = await Eh();
|
|
28743
28743
|
Array.isArray(e?.options) && e.options.length > 0 && b(e.options), e?.rules && typeof e.rules == "object" && S(e.rules);
|
|
28744
28744
|
} catch (e) {
|
|
28745
|
-
console.error("Unable to load action field rules:", e),
|
|
28745
|
+
console.error("Unable to load action field rules:", e), W.error("Unable to load action validation rules.");
|
|
28746
28746
|
}
|
|
28747
|
-
}, []),
|
|
28747
|
+
}, []), G = n(async (e) => {
|
|
28748
28748
|
if (!e) {
|
|
28749
28749
|
d([]);
|
|
28750
28750
|
return;
|
|
@@ -28756,7 +28756,7 @@ function _x() {
|
|
|
28756
28756
|
activeOnly: !0
|
|
28757
28757
|
}))?.items ?? []);
|
|
28758
28758
|
} catch (e) {
|
|
28759
|
-
console.error("Unable to load modules:", e),
|
|
28759
|
+
console.error("Unable to load modules:", e), W.error("Unable to load modules.");
|
|
28760
28760
|
} finally {
|
|
28761
28761
|
E(!1);
|
|
28762
28762
|
}
|
|
@@ -28773,7 +28773,7 @@ function _x() {
|
|
|
28773
28773
|
activeOnly: !0
|
|
28774
28774
|
}))?.items ?? []);
|
|
28775
28775
|
} catch (e) {
|
|
28776
|
-
console.error("Unable to load submodules:", e),
|
|
28776
|
+
console.error("Unable to load submodules:", e), W.error("Unable to load submodules.");
|
|
28777
28777
|
} finally {
|
|
28778
28778
|
O(!1);
|
|
28779
28779
|
}
|
|
@@ -28797,34 +28797,34 @@ function _x() {
|
|
|
28797
28797
|
})]);
|
|
28798
28798
|
v(a?.items ?? []), e.setFieldsValue({ step_order: o?.step_order ?? 1 });
|
|
28799
28799
|
} catch (e) {
|
|
28800
|
-
console.error("Unable to load flows:", e),
|
|
28800
|
+
console.error("Unable to load flows:", e), W.error("Unable to load flows.");
|
|
28801
28801
|
} finally {
|
|
28802
28802
|
A(!1);
|
|
28803
28803
|
}
|
|
28804
28804
|
}, [e]), le = n(async (e = "") => {
|
|
28805
|
-
if (!(!l?.id || !
|
|
28805
|
+
if (!(!l?.id || !P || !te)) {
|
|
28806
28806
|
A(!0);
|
|
28807
28807
|
try {
|
|
28808
28808
|
v((await Bh({
|
|
28809
28809
|
product_parent_ID: l.id,
|
|
28810
|
-
module_parent_ID:
|
|
28810
|
+
module_parent_ID: P,
|
|
28811
28811
|
submodule_parent_ID: te,
|
|
28812
28812
|
actions: e,
|
|
28813
28813
|
limit: 1e3
|
|
28814
28814
|
}))?.items ?? []);
|
|
28815
28815
|
} catch (e) {
|
|
28816
|
-
console.error("Unable to load action flows:", e),
|
|
28816
|
+
console.error("Unable to load action flows:", e), W.error("Unable to load action steps.");
|
|
28817
28817
|
} finally {
|
|
28818
28818
|
A(!1);
|
|
28819
28819
|
}
|
|
28820
28820
|
}
|
|
28821
28821
|
}, [
|
|
28822
28822
|
l?.id,
|
|
28823
|
-
|
|
28823
|
+
P,
|
|
28824
28824
|
te
|
|
28825
28825
|
]), ue = n(async () => {
|
|
28826
28826
|
if (!(!s || !l?.name)) {
|
|
28827
|
-
|
|
28827
|
+
N(!0);
|
|
28828
28828
|
try {
|
|
28829
28829
|
let t = await Hh(s);
|
|
28830
28830
|
await se(l.name, t.module), v((await Bh({
|
|
@@ -28845,9 +28845,9 @@ function _x() {
|
|
|
28845
28845
|
active: Number(t.active) !== 0
|
|
28846
28846
|
});
|
|
28847
28847
|
} catch (e) {
|
|
28848
|
-
console.error("Unable to load test flow:", e),
|
|
28848
|
+
console.error("Unable to load test flow:", e), W.error("Unable to load test flow for edit."), t("/viewTestCase");
|
|
28849
28849
|
} finally {
|
|
28850
|
-
|
|
28850
|
+
N(!1);
|
|
28851
28851
|
}
|
|
28852
28852
|
}
|
|
28853
28853
|
}, [
|
|
@@ -28863,13 +28863,13 @@ function _x() {
|
|
|
28863
28863
|
return;
|
|
28864
28864
|
}
|
|
28865
28865
|
Promise.resolve().then(async () => {
|
|
28866
|
-
await
|
|
28866
|
+
await oe(), await G(l.name), s && await ue();
|
|
28867
28867
|
});
|
|
28868
28868
|
}, [
|
|
28869
28869
|
l,
|
|
28870
28870
|
t,
|
|
28871
|
-
W,
|
|
28872
28871
|
oe,
|
|
28872
|
+
G,
|
|
28873
28873
|
s,
|
|
28874
28874
|
ue
|
|
28875
28875
|
]), l ? /* @__PURE__ */ J("main", {
|
|
@@ -28916,10 +28916,10 @@ function _x() {
|
|
|
28916
28916
|
await Wh(s, {
|
|
28917
28917
|
...r,
|
|
28918
28918
|
step_order: Number(n.step_order)
|
|
28919
|
-
}),
|
|
28919
|
+
}), W.success("Test case updated successfully."), t("/viewTestCase");
|
|
28920
28920
|
return;
|
|
28921
28921
|
}
|
|
28922
|
-
await Vh(r),
|
|
28922
|
+
await Vh(r), W.success(`Step saved (#${n.step_order}).`), e.setFieldsValue({
|
|
28923
28923
|
actions: void 0,
|
|
28924
28924
|
key: void 0,
|
|
28925
28925
|
value: void 0,
|
|
@@ -28927,13 +28927,13 @@ function _x() {
|
|
|
28927
28927
|
description: void 0
|
|
28928
28928
|
}), await ce(r.product_parent_ID, r.module_parent_ID, r.submodule_parent_ID);
|
|
28929
28929
|
} catch (e) {
|
|
28930
|
-
console.error("Unable to save test case:", e),
|
|
28930
|
+
console.error("Unable to save test case:", e), W.error(c ? "Unable to update test case." : "Unable to save step.");
|
|
28931
28931
|
} finally {
|
|
28932
28932
|
M(!1);
|
|
28933
28933
|
}
|
|
28934
28934
|
},
|
|
28935
28935
|
autoComplete: "off",
|
|
28936
|
-
disabled:
|
|
28936
|
+
disabled: ee,
|
|
28937
28937
|
children: [
|
|
28938
28938
|
/* @__PURE__ */ q(p, {
|
|
28939
28939
|
className: "v1-card zt-fall",
|
|
@@ -29008,7 +29008,7 @@ function _x() {
|
|
|
29008
29008
|
"key",
|
|
29009
29009
|
"value",
|
|
29010
29010
|
"expected"
|
|
29011
|
-
]), ce(l?.id,
|
|
29011
|
+
]), ce(l?.id, P, t);
|
|
29012
29012
|
}
|
|
29013
29013
|
})
|
|
29014
29014
|
})
|
|
@@ -29196,11 +29196,11 @@ function _x() {
|
|
|
29196
29196
|
}), /* @__PURE__ */ q(f, {
|
|
29197
29197
|
type: "primary",
|
|
29198
29198
|
htmlType: "submit",
|
|
29199
|
-
loading: j ||
|
|
29199
|
+
loading: j || ee,
|
|
29200
29200
|
children: c ? "Update Test Case" : "Save & Continue"
|
|
29201
29201
|
})]
|
|
29202
29202
|
})]
|
|
29203
|
-
}, `${
|
|
29203
|
+
}, `${P}-${te}`),
|
|
29204
29204
|
ne && /* @__PURE__ */ q(p, {
|
|
29205
29205
|
className: "v1-card zt-fall",
|
|
29206
29206
|
title: /* @__PURE__ */ J(L, {
|
|
@@ -29258,7 +29258,7 @@ function bx() {
|
|
|
29258
29258
|
r[t] = (r[t] ?? 0) + 1;
|
|
29259
29259
|
}), l(r);
|
|
29260
29260
|
} catch (e) {
|
|
29261
|
-
console.error(e),
|
|
29261
|
+
console.error(e), W.error("Unable to load modules.");
|
|
29262
29262
|
} finally {
|
|
29263
29263
|
d(!1);
|
|
29264
29264
|
}
|
|
@@ -29279,14 +29279,14 @@ function bx() {
|
|
|
29279
29279
|
await Ih(e.id, +!!t), s((n) => n.map((n) => n.id === e.id ? {
|
|
29280
29280
|
...n,
|
|
29281
29281
|
active: +!!t
|
|
29282
|
-
} : n)),
|
|
29282
|
+
} : n)), W.success(`Module ${t ? "activated" : "deactivated"}.`);
|
|
29283
29283
|
} catch (e) {
|
|
29284
|
-
console.error(e),
|
|
29284
|
+
console.error(e), W.error("Unable to update module status.");
|
|
29285
29285
|
}
|
|
29286
29286
|
}, O = async () => {
|
|
29287
29287
|
let e = _.trim();
|
|
29288
29288
|
if (!e) {
|
|
29289
|
-
|
|
29289
|
+
W.warning("Enter a module name.");
|
|
29290
29290
|
return;
|
|
29291
29291
|
}
|
|
29292
29292
|
b(!0);
|
|
@@ -29294,9 +29294,9 @@ function bx() {
|
|
|
29294
29294
|
await Fh({
|
|
29295
29295
|
project: t.name,
|
|
29296
29296
|
modulename: e
|
|
29297
|
-
}),
|
|
29297
|
+
}), W.success("Module added."), g(!1), v(""), S(1), E(t.name);
|
|
29298
29298
|
} catch (e) {
|
|
29299
|
-
console.error(e),
|
|
29299
|
+
console.error(e), W.error("Unable to add module (maybe it already exists).");
|
|
29300
29300
|
} finally {
|
|
29301
29301
|
b(!1);
|
|
29302
29302
|
}
|
|
@@ -29454,7 +29454,7 @@ function Cx() {
|
|
|
29454
29454
|
module: t
|
|
29455
29455
|
}))?.items ?? []);
|
|
29456
29456
|
} catch (e) {
|
|
29457
|
-
console.error(e),
|
|
29457
|
+
console.error(e), W.error("Unable to load submodules.");
|
|
29458
29458
|
} finally {
|
|
29459
29459
|
d(!1);
|
|
29460
29460
|
}
|
|
@@ -29480,14 +29480,14 @@ function Cx() {
|
|
|
29480
29480
|
await zh(e.id, +!!t), l((n) => n.map((n) => n.id === e.id ? {
|
|
29481
29481
|
...n,
|
|
29482
29482
|
active: +!!t
|
|
29483
|
-
} : n)),
|
|
29483
|
+
} : n)), W.success(`Submodule ${t ? "activated" : "deactivated"}.`);
|
|
29484
29484
|
} catch (e) {
|
|
29485
|
-
console.error(e),
|
|
29485
|
+
console.error(e), W.error("Unable to update submodule status.");
|
|
29486
29486
|
}
|
|
29487
29487
|
}, O = async () => {
|
|
29488
29488
|
let e = _.trim();
|
|
29489
29489
|
if (!e) {
|
|
29490
|
-
|
|
29490
|
+
W.warning("Enter a submodule name.");
|
|
29491
29491
|
return;
|
|
29492
29492
|
}
|
|
29493
29493
|
b(!0);
|
|
@@ -29496,9 +29496,9 @@ function Cx() {
|
|
|
29496
29496
|
project: a.name,
|
|
29497
29497
|
modulename: s,
|
|
29498
29498
|
submodulename: e
|
|
29499
|
-
}),
|
|
29499
|
+
}), W.success("Submodule added."), g(!1), v(""), S(1), E(a.name, s);
|
|
29500
29500
|
} catch (e) {
|
|
29501
|
-
console.error(e),
|
|
29501
|
+
console.error(e), W.error("Unable to add submodule (maybe it already exists).");
|
|
29502
29502
|
} finally {
|
|
29503
29503
|
b(!1);
|
|
29504
29504
|
}
|
|
@@ -29654,7 +29654,7 @@ function Ex() {
|
|
|
29654
29654
|
});
|
|
29655
29655
|
a(t?.items ?? []), c(t?.total ?? 0);
|
|
29656
29656
|
} catch (e) {
|
|
29657
|
-
console.error(e),
|
|
29657
|
+
console.error(e), W.error("Unable to load test flows.");
|
|
29658
29658
|
} finally {
|
|
29659
29659
|
u(!1);
|
|
29660
29660
|
}
|
|
@@ -29677,11 +29677,11 @@ function Ex() {
|
|
|
29677
29677
|
async onOk() {
|
|
29678
29678
|
S(e.id);
|
|
29679
29679
|
try {
|
|
29680
|
-
await Gh(e.id),
|
|
29680
|
+
await Gh(e.id), W.success("Test case deleted successfully.");
|
|
29681
29681
|
let n = t.length === 1 && _ > 1 ? _ - 1 : _;
|
|
29682
29682
|
v(n), await C({ page: n });
|
|
29683
29683
|
} catch (e) {
|
|
29684
|
-
throw console.error("Unable to delete test flow:", e),
|
|
29684
|
+
throw console.error("Unable to delete test flow:", e), W.error("Unable to delete test case."), e;
|
|
29685
29685
|
} finally {
|
|
29686
29686
|
S(null);
|
|
29687
29687
|
}
|
|
@@ -29961,23 +29961,23 @@ function Vx() {
|
|
|
29961
29961
|
let [e] = C.useForm(), [t] = C.useForm(), [a, s] = o([]), [l, u] = o([]), [d, m] = o([]), [g, _] = o(Zb), [v, y] = o({}), [b, x] = o(!1), [S, T] = o(!1), [E, D] = o({
|
|
29962
29962
|
open: !1,
|
|
29963
29963
|
typeKey: "module"
|
|
29964
|
-
}), [O, A] = o(!1), [j, M] = o(!1), [
|
|
29964
|
+
}), [O, A] = o(!1), [j, M] = o(!1), [ee, N] = o(!1), P = Ut(), te = Mx[E.typeKey], R = i(() => Ix(a), [a]), z = C.useWatch("module", e), ne = C.useWatch("flow", e), B = C.useWatch("keyword", e), re = !!Lx(z), ie = !!Lx(ne), V = !re, ae = !re || !ie, H = i(() => Px(v, B), [v, B]), U = (e, t = []) => {
|
|
29965
29965
|
e === "module" && s(t);
|
|
29966
|
-
},
|
|
29966
|
+
}, oe = async () => {
|
|
29967
29967
|
x(!0);
|
|
29968
29968
|
try {
|
|
29969
29969
|
s((await wh(Mx.module.dbName))?.items ?? []);
|
|
29970
29970
|
} catch (e) {
|
|
29971
|
-
console.error("Unable to load testing options:", e),
|
|
29971
|
+
console.error("Unable to load testing options:", e), W.error("Unable to load testing options.");
|
|
29972
29972
|
} finally {
|
|
29973
29973
|
x(!1);
|
|
29974
29974
|
}
|
|
29975
|
-
},
|
|
29975
|
+
}, G = async () => {
|
|
29976
29976
|
try {
|
|
29977
29977
|
let e = await Eh();
|
|
29978
29978
|
Array.isArray(e?.options) && e.options.length > 0 && _(e.options), e?.rules && typeof e.rules == "object" && y(e.rules);
|
|
29979
29979
|
} catch (e) {
|
|
29980
|
-
console.error("Unable to load action field rules:", e),
|
|
29980
|
+
console.error("Unable to load action field rules:", e), W.error("Unable to load action validation rules.");
|
|
29981
29981
|
}
|
|
29982
29982
|
}, se = n(async (t) => {
|
|
29983
29983
|
let n = Lx(t);
|
|
@@ -29991,7 +29991,7 @@ function Vx() {
|
|
|
29991
29991
|
}), t = Array.isArray(e?.items) ? e.items : [];
|
|
29992
29992
|
u(t), m(Rx(t));
|
|
29993
29993
|
} catch (e) {
|
|
29994
|
-
console.error("Unable to load flows:", e),
|
|
29994
|
+
console.error("Unable to load flows:", e), W.error("Unable to load flows.");
|
|
29995
29995
|
} finally {
|
|
29996
29996
|
T(!1);
|
|
29997
29997
|
}
|
|
@@ -30006,14 +30006,14 @@ function Vx() {
|
|
|
30006
30006
|
try {
|
|
30007
30007
|
e.setFieldsValue({ step_order: zx(r, i, a) });
|
|
30008
30008
|
} catch (e) {
|
|
30009
|
-
console.error("Unable to load step order:", e),
|
|
30009
|
+
console.error("Unable to load step order:", e), W.error("Unable to load step order.");
|
|
30010
30010
|
} finally {
|
|
30011
30011
|
M(!1);
|
|
30012
30012
|
}
|
|
30013
30013
|
}, [e]);
|
|
30014
30014
|
r(() => {
|
|
30015
30015
|
Promise.resolve().then(async () => {
|
|
30016
|
-
await Promise.all([
|
|
30016
|
+
await Promise.all([oe(), G()]);
|
|
30017
30017
|
});
|
|
30018
30018
|
}, []), r(() => {
|
|
30019
30019
|
Promise.resolve().then(() => se(z));
|
|
@@ -30038,13 +30038,13 @@ function Vx() {
|
|
|
30038
30038
|
tags: t.tags ? Lx(t.tags) : jx.tags,
|
|
30039
30039
|
active: Number(t.active)
|
|
30040
30040
|
};
|
|
30041
|
-
|
|
30041
|
+
N(!0);
|
|
30042
30042
|
try {
|
|
30043
|
-
await jh(n),
|
|
30043
|
+
await jh(n), W.success("LMS case details saved successfully."), e.resetFields(), u([]), m([]);
|
|
30044
30044
|
} catch (e) {
|
|
30045
|
-
console.error("Unable to save LMS case:", e),
|
|
30045
|
+
console.error("Unable to save LMS case:", e), W.error("Unable to save LMS case.");
|
|
30046
30046
|
} finally {
|
|
30047
|
-
|
|
30047
|
+
N(!1);
|
|
30048
30048
|
}
|
|
30049
30049
|
}, ue = (t, n) => {
|
|
30050
30050
|
e.setFieldsValue({ [t]: Lx(n) });
|
|
@@ -30111,10 +30111,10 @@ function Vx() {
|
|
|
30111
30111
|
name: n,
|
|
30112
30112
|
type: te.dbName
|
|
30113
30113
|
});
|
|
30114
|
-
U(E.typeKey, r?.items ?? []), e.setFieldsValue({ [te.formField]: n }),
|
|
30114
|
+
U(E.typeKey, r?.items ?? []), e.setFieldsValue({ [te.formField]: n }), W.success(`${te.label} added successfully.`), he();
|
|
30115
30115
|
} catch (e) {
|
|
30116
30116
|
if (e?.errorFields) return;
|
|
30117
|
-
console.error("Unable to save testing option:", e),
|
|
30117
|
+
console.error("Unable to save testing option:", e), W.error(`Unable to add ${te.label.toLowerCase()}.`);
|
|
30118
30118
|
} finally {
|
|
30119
30119
|
A(!1);
|
|
30120
30120
|
}
|
|
@@ -30127,7 +30127,7 @@ function Vx() {
|
|
|
30127
30127
|
className: "breadcrumb-action-wrapper",
|
|
30128
30128
|
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(Vo, { items: Ax }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(f, {
|
|
30129
30129
|
type: "link",
|
|
30130
|
-
onClick: () =>
|
|
30130
|
+
onClick: () => P("/lms-home"),
|
|
30131
30131
|
children: "View Table"
|
|
30132
30132
|
}) })]
|
|
30133
30133
|
}), /* @__PURE__ */ q("div", {
|
|
@@ -30338,7 +30338,7 @@ function Vx() {
|
|
|
30338
30338
|
children: /* @__PURE__ */ q(C.Item, { children: /* @__PURE__ */ J(L, { children: [/* @__PURE__ */ q(f, {
|
|
30339
30339
|
type: "primary",
|
|
30340
30340
|
htmlType: "submit",
|
|
30341
|
-
loading:
|
|
30341
|
+
loading: ee,
|
|
30342
30342
|
disabled: ae,
|
|
30343
30343
|
children: "Submit"
|
|
30344
30344
|
}), /* @__PURE__ */ q(f, {
|