@realtek/core-theme-live 0.0.438 → 0.0.439
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 +2 -2
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +812 -777
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist-lib/index.js
CHANGED
|
@@ -488,7 +488,7 @@ async function Uc(e, t, n) {
|
|
|
488
488
|
body: JSON.stringify({
|
|
489
489
|
module: e,
|
|
490
490
|
ids: t,
|
|
491
|
-
updates: { status: n }
|
|
491
|
+
updates: n && typeof n == "object" && Object.prototype.hasOwnProperty.call(n, "status") ? n : { status: n }
|
|
492
492
|
})
|
|
493
493
|
}));
|
|
494
494
|
}
|
|
@@ -49170,7 +49170,8 @@ function kI({ open: e, record: t, onClose: n, onSaved: r }) {
|
|
|
49170
49170
|
...a ? {
|
|
49171
49171
|
isInitialStatus: e.isInitialStatus === !0,
|
|
49172
49172
|
isTerminalStatus: r,
|
|
49173
|
-
allowedNextStatusIds: i
|
|
49173
|
+
allowedNextStatusIds: i,
|
|
49174
|
+
submissionIdFieldName: String(e.submissionIdFieldName ?? "").trim()
|
|
49174
49175
|
} : {},
|
|
49175
49176
|
isdeleted: e.isdeleted === !0
|
|
49176
49177
|
};
|
|
@@ -49393,6 +49394,15 @@ function kI({ open: e, record: t, onClose: n, onSaved: r }) {
|
|
|
49393
49394
|
})
|
|
49394
49395
|
});
|
|
49395
49396
|
}
|
|
49397
|
+
}),
|
|
49398
|
+
/* @__PURE__ */ Y(B.Item, {
|
|
49399
|
+
name: [t, "submissionIdFieldName"],
|
|
49400
|
+
label: "Submission ID Field",
|
|
49401
|
+
tooltip: "When this status needs a client submission id, enter the submissions collection field name to save it into, for example clientSubmissionId.",
|
|
49402
|
+
children: /* @__PURE__ */ Y(V, {
|
|
49403
|
+
placeholder: "clientSubmissionId",
|
|
49404
|
+
style: { width: 180 }
|
|
49405
|
+
})
|
|
49396
49406
|
})
|
|
49397
49407
|
] }),
|
|
49398
49408
|
/* @__PURE__ */ Y(K, {
|
|
@@ -49416,7 +49426,8 @@ function kI({ open: e, record: t, onClose: n, onSaved: r }) {
|
|
|
49416
49426
|
...u ? {
|
|
49417
49427
|
isInitialStatus: !1,
|
|
49418
49428
|
isTerminalStatus: !1,
|
|
49419
|
-
allowedNextStatusIds: []
|
|
49429
|
+
allowedNextStatusIds: [],
|
|
49430
|
+
submissionIdFieldName: ""
|
|
49420
49431
|
} : {}
|
|
49421
49432
|
}),
|
|
49422
49433
|
children: "Add feed value"
|
|
@@ -54649,7 +54660,9 @@ function Yz({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupCont
|
|
|
54649
54660
|
title: e.title ?? "Already assigned to this job"
|
|
54650
54661
|
};
|
|
54651
54662
|
});
|
|
54652
|
-
|
|
54663
|
+
if (!t.length && !v) return null;
|
|
54664
|
+
let x = e?.getFieldsValue?.(!0) ?? {}, S = t.filter((e) => Xz(e, x, i));
|
|
54665
|
+
return /* @__PURE__ */ X(J, { children: [v && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("div", {
|
|
54653
54666
|
className: "dynamic-popup__already-assigned",
|
|
54654
54667
|
children: [/* @__PURE__ */ Y(xi, {
|
|
54655
54668
|
variant: "caption",
|
|
@@ -54692,12 +54705,12 @@ function Yz({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupCont
|
|
|
54692
54705
|
}, t || n);
|
|
54693
54706
|
})
|
|
54694
54707
|
})]
|
|
54695
|
-
}), /* @__PURE__ */ Y(Ca, { style: { margin: "12px 0" } })] }),
|
|
54708
|
+
}), /* @__PURE__ */ Y(Ca, { style: { margin: "12px 0" } })] }), S.length > 0 && /* @__PURE__ */ Y(B, {
|
|
54696
54709
|
form: e,
|
|
54697
54710
|
layout: "vertical",
|
|
54698
54711
|
initialValues: n,
|
|
54699
54712
|
onValuesChange: (e, t) => u(t),
|
|
54700
|
-
children:
|
|
54713
|
+
children: Qz(S).map((e) => $z(e, (e) => {
|
|
54701
54714
|
let t = b(r[e.name] ?? vz(e, i)), n = d(e), a = p(e), o = m[e.name] ?? [], s = qz(e.type), c = Kz[e.type], l = [];
|
|
54702
54715
|
return e.required && l.push({
|
|
54703
54716
|
required: !0,
|
|
@@ -54727,7 +54740,17 @@ function Yz({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupCont
|
|
|
54727
54740
|
}))
|
|
54728
54741
|
})] });
|
|
54729
54742
|
}
|
|
54730
|
-
function Xz(e) {
|
|
54743
|
+
function Xz(e, t, n) {
|
|
54744
|
+
let r = e.showWhen ?? e.visibleWhen;
|
|
54745
|
+
if (!r) return !0;
|
|
54746
|
+
if (typeof r == "function") return !!r(t, n);
|
|
54747
|
+
let i = t?.[r.field];
|
|
54748
|
+
return (Array.isArray(r.in) ? r.in : Array.isArray(r.equals) ? r.equals : [r.equals]).some((e) => Zz(i, e));
|
|
54749
|
+
}
|
|
54750
|
+
function Zz(e, t) {
|
|
54751
|
+
return e === t || String(e ?? "").trim().toLowerCase() === String(t ?? "").trim().toLowerCase();
|
|
54752
|
+
}
|
|
54753
|
+
function Qz(e) {
|
|
54731
54754
|
let t = [];
|
|
54732
54755
|
for (let n of e) {
|
|
54733
54756
|
let e = t[t.length - 1];
|
|
@@ -54738,7 +54761,7 @@ function Xz(e) {
|
|
|
54738
54761
|
}
|
|
54739
54762
|
return t.map((e) => e.fields);
|
|
54740
54763
|
}
|
|
54741
|
-
function
|
|
54764
|
+
function $z(e, t) {
|
|
54742
54765
|
return e.length === 1 ? t(e[0]) : /* @__PURE__ */ Y("div", {
|
|
54743
54766
|
style: {
|
|
54744
54767
|
display: "flex",
|
|
@@ -54756,7 +54779,7 @@ function Zz(e, t) {
|
|
|
54756
54779
|
}
|
|
54757
54780
|
//#endregion
|
|
54758
54781
|
//#region src/components/popups/dynamic/hooks/usePopupOptions.js
|
|
54759
|
-
function
|
|
54782
|
+
function eB(e) {
|
|
54760
54783
|
return [
|
|
54761
54784
|
"select",
|
|
54762
54785
|
"multi-select",
|
|
@@ -54764,15 +54787,15 @@ function Qz(e) {
|
|
|
54764
54787
|
"radio"
|
|
54765
54788
|
].includes(e?.type) && e?.dataSource === "master" && e?.masterName;
|
|
54766
54789
|
}
|
|
54767
|
-
function
|
|
54790
|
+
function tB(e) {
|
|
54768
54791
|
let t = e?.data ?? e;
|
|
54769
54792
|
return Array.isArray(t) ? t : Array.isArray(t?.data) ? t.data : Array.isArray(t?.items) ? t.items : Array.isArray(t?.rows) ? t.rows : Array.isArray(t?.records) ? t.records : [];
|
|
54770
54793
|
}
|
|
54771
|
-
function
|
|
54794
|
+
function nB(e) {
|
|
54772
54795
|
let t = String(e?.masterName ?? "").trim().toLowerCase();
|
|
54773
54796
|
return t === "clientsubmissions" || t === "clientsubmissionstatus";
|
|
54774
54797
|
}
|
|
54775
|
-
function
|
|
54798
|
+
function rB(e) {
|
|
54776
54799
|
if (e == null) return null;
|
|
54777
54800
|
if (typeof e == "string") {
|
|
54778
54801
|
let t = e.trim();
|
|
@@ -54802,36 +54825,36 @@ function tB(e) {
|
|
|
54802
54825
|
}
|
|
54803
54826
|
};
|
|
54804
54827
|
}
|
|
54805
|
-
function
|
|
54806
|
-
return
|
|
54828
|
+
function iB(e, t) {
|
|
54829
|
+
return nB(t) ? rB(e) : _z(e, t);
|
|
54807
54830
|
}
|
|
54808
|
-
function
|
|
54831
|
+
function aB(e) {
|
|
54809
54832
|
let t = e?.clientSubmissionStatus, n = Number((t && typeof t == "object" ? t?.clientSubmissionStatusId ?? t?.id ?? t?.uniqueId : void 0) ?? e?.clientSubmissionStatusId ?? e?.clientStatusId ?? e?.["clientSubmissionStatus.clientSubmissionStatusId"] ?? 0) || 0, r = t && typeof t == "object" ? t?.clientSubmissionStatusText ?? t?.name ?? t?.text ?? t?.label : t;
|
|
54810
54833
|
return {
|
|
54811
54834
|
id: n,
|
|
54812
54835
|
text: String(r ?? e?.clientSubmissionStatusText ?? e?.clientStatus ?? e?.clientStatusText ?? e?.["clientSubmissionStatus.clientSubmissionStatusText"] ?? "").trim()
|
|
54813
54836
|
};
|
|
54814
54837
|
}
|
|
54815
|
-
function
|
|
54838
|
+
function oB(e) {
|
|
54816
54839
|
let t = Number(e?.id ?? 0) || 0, n = String(e?.text ?? "").trim();
|
|
54817
54840
|
return n && n.toLowerCase() === "not submitted" ? !0 : t <= 0 && !n;
|
|
54818
54841
|
}
|
|
54819
|
-
function
|
|
54842
|
+
function sB(e) {
|
|
54820
54843
|
return Number(e?._raw?.id ?? e?._raw?.uniqueId ?? 0) || 0;
|
|
54821
54844
|
}
|
|
54822
|
-
function
|
|
54845
|
+
function cB(e) {
|
|
54823
54846
|
let t = e?._raw?.allowedNextStatusIds;
|
|
54824
54847
|
return Array.isArray(t) ? t.map(Number).filter((e) => Number.isInteger(e) && e > 0) : [];
|
|
54825
54848
|
}
|
|
54826
|
-
function
|
|
54849
|
+
function lB(e) {
|
|
54827
54850
|
let t = e?.data ?? e;
|
|
54828
54851
|
return t ? Array.isArray(t) ? t[0] ?? null : t?.record && typeof t.record == "object" ? t.record : t?.data && typeof t.data == "object" && !Array.isArray(t.data) ? t.data : typeof t == "object" ? t : null : null;
|
|
54829
54852
|
}
|
|
54830
|
-
function
|
|
54831
|
-
return (Array.isArray(e?.selectedRecords) ? e.selectedRecords.filter(Boolean) : []).some((e) => !
|
|
54853
|
+
function uB(e) {
|
|
54854
|
+
return (Array.isArray(e?.selectedRecords) ? e.selectedRecords.filter(Boolean) : []).some((e) => !oB(aB(e))) ? !0 : !oB(aB(e ?? {}));
|
|
54832
54855
|
}
|
|
54833
|
-
async function
|
|
54834
|
-
if (
|
|
54856
|
+
async function dB(e, t) {
|
|
54857
|
+
if (uB(e)) return e;
|
|
54835
54858
|
let n = e?.selectedIds?.[0] ?? e?.selectedRecords?.[0]?._id ?? e?.selectedRecords?.[0]?.id;
|
|
54836
54859
|
if (!n) return e;
|
|
54837
54860
|
let r = String(e?.moduleName ?? "submissions").trim() || "submissions", i = new URLSearchParams({
|
|
@@ -54840,7 +54863,7 @@ async function lB(e, t) {
|
|
|
54840
54863
|
});
|
|
54841
54864
|
t && i.set("app_id", t);
|
|
54842
54865
|
try {
|
|
54843
|
-
let n =
|
|
54866
|
+
let n = lB(await x(k, `/module-data-detail?${i.toString()}`, { headers: t ? { "X-App-Id": t } : void 0 }));
|
|
54844
54867
|
if (!n) return e;
|
|
54845
54868
|
let r = Array.isArray(e?.selectedRecords) ? e.selectedRecords : [];
|
|
54846
54869
|
return {
|
|
@@ -54854,7 +54877,7 @@ async function lB(e, t) {
|
|
|
54854
54877
|
return console.warn("[DynamicPopup] Could not load selected submission detail for client status transition:", t), e;
|
|
54855
54878
|
}
|
|
54856
54879
|
}
|
|
54857
|
-
function
|
|
54880
|
+
function fB(e, t) {
|
|
54858
54881
|
if (!Array.isArray(e) || !e.length) return [];
|
|
54859
54882
|
if (!e.some((e) => e?._raw?.isInitialStatus === !0 || e?._raw?.isTerminalStatus === !0 || Array.isArray(e?._raw?.allowedNextStatusIds))) return e;
|
|
54860
54883
|
let n = Array.isArray(t?.selectedRecords) ? t.selectedRecords.filter(Boolean) : [], r = {
|
|
@@ -54868,20 +54891,20 @@ function uB(e, t) {
|
|
|
54868
54891
|
"clientSubmissionStatus.clientSubmissionStatusText": t?.["clientSubmissionStatus.clientSubmissionStatusText"]
|
|
54869
54892
|
}, i = n.length ? n : [r];
|
|
54870
54893
|
return e.filter((t) => i.every((n) => {
|
|
54871
|
-
let i =
|
|
54872
|
-
if (
|
|
54873
|
-
let e =
|
|
54874
|
-
|
|
54894
|
+
let i = aB(n);
|
|
54895
|
+
if (oB(i)) {
|
|
54896
|
+
let e = aB(r);
|
|
54897
|
+
oB(e) || (i = e);
|
|
54875
54898
|
}
|
|
54876
|
-
if (
|
|
54899
|
+
if (oB(i)) return t?._raw?.isInitialStatus === !0;
|
|
54877
54900
|
let a = e.find((e) => {
|
|
54878
|
-
let t =
|
|
54901
|
+
let t = sB(e), n = String(e?.label ?? "").trim();
|
|
54879
54902
|
return i.id > 0 && t === i.id || i.text && n.toLowerCase() === i.text.toLowerCase();
|
|
54880
54903
|
});
|
|
54881
|
-
return !a || a?._raw?.isTerminalStatus === !0 ? !1 :
|
|
54904
|
+
return !a || a?._raw?.isTerminalStatus === !0 ? !1 : cB(a).includes(sB(t));
|
|
54882
54905
|
}));
|
|
54883
54906
|
}
|
|
54884
|
-
function
|
|
54907
|
+
function pB({ open: e, config: t, api: n, fields: r, popupContext: i, formValues: a }) {
|
|
54885
54908
|
let [o, s] = L({}), [c, l] = L(null);
|
|
54886
54909
|
return F(() => {
|
|
54887
54910
|
e || (s({}), l(null));
|
|
@@ -54906,7 +54929,7 @@ function dB({ open: e, config: t, api: n, fields: r, popupContext: i, formValues
|
|
|
54906
54929
|
i
|
|
54907
54930
|
]), F(() => {
|
|
54908
54931
|
if (!e || !t) return;
|
|
54909
|
-
let n = r.filter(
|
|
54932
|
+
let n = r.filter(eB);
|
|
54910
54933
|
if (!n.length) return;
|
|
54911
54934
|
let a = new AbortController();
|
|
54912
54935
|
return n.forEach((e) => {
|
|
@@ -54917,9 +54940,9 @@ function dB({ open: e, config: t, api: n, fields: r, popupContext: i, formValues
|
|
|
54917
54940
|
}), n = String(u ?? "").trim();
|
|
54918
54941
|
n && t.set("app_id", n), x(k, `/masters/dropdown?${t.toString()}`, { headers: n ? { "X-App-Id": n } : void 0 }).then(async (t) => {
|
|
54919
54942
|
if (a.signal.aborted) return;
|
|
54920
|
-
let r =
|
|
54921
|
-
if (
|
|
54922
|
-
let c =
|
|
54943
|
+
let r = tB(t).map((t) => iB(t, e)).filter(Boolean), o = i;
|
|
54944
|
+
if (nB(e) && (o = await dB(i, n)), a.signal.aborted) return;
|
|
54945
|
+
let c = nB(e) ? fB(r, o) : r;
|
|
54923
54946
|
s((t) => ({
|
|
54924
54947
|
...t,
|
|
54925
54948
|
[e.name]: c
|
|
@@ -54977,8 +55000,8 @@ function dB({ open: e, config: t, api: n, fields: r, popupContext: i, formValues
|
|
|
54977
55000
|
}
|
|
54978
55001
|
//#endregion
|
|
54979
55002
|
//#region src/components/popups/dynamic/hooks/usePopupSearch.js
|
|
54980
|
-
var
|
|
54981
|
-
function
|
|
55003
|
+
var mB = 400, hB = 3, gB = Object.freeze({});
|
|
55004
|
+
function _B({ api: e, open: t, fields: n = [], popupContext: r, setDynamicOptions: i, getFieldValue: a }) {
|
|
54982
55005
|
let [o, s] = L({}), [c, l] = L({}), u = la((e, t) => {
|
|
54983
55006
|
l((n) => !!n[e] === t ? n : {
|
|
54984
55007
|
...n,
|
|
@@ -55030,7 +55053,7 @@ function hB({ api: e, open: t, fields: n = [], popupContext: r, setDynamicOption
|
|
|
55030
55053
|
}, [t, v]);
|
|
55031
55054
|
function b(t) {
|
|
55032
55055
|
if (!t.searchFetchKey && !t.searchFetcher || typeof (e.searchOptions ?? e.searchFetcher) != "function") return;
|
|
55033
|
-
let n = t.searchMinLength ??
|
|
55056
|
+
let n = t.searchMinLength ?? hB;
|
|
55034
55057
|
return (e) => {
|
|
55035
55058
|
clearTimeout(d.current[t.name]);
|
|
55036
55059
|
let r = String(e ?? "").trim(), i = r.length < n ? "" : r;
|
|
@@ -55040,7 +55063,7 @@ function hB({ api: e, open: t, fields: n = [], popupContext: r, setDynamicOption
|
|
|
55040
55063
|
}
|
|
55041
55064
|
u(t.name, !0), d.current[t.name] = setTimeout(() => {
|
|
55042
55065
|
g(t, i);
|
|
55043
|
-
},
|
|
55066
|
+
}, mB);
|
|
55044
55067
|
};
|
|
55045
55068
|
}
|
|
55046
55069
|
function x(t) {
|
|
@@ -55065,14 +55088,14 @@ function hB({ api: e, open: t, fields: n = [], popupContext: r, setDynamicOption
|
|
|
55065
55088
|
}
|
|
55066
55089
|
return {
|
|
55067
55090
|
mentionOptions: o,
|
|
55068
|
-
searchLoading: t ? c :
|
|
55091
|
+
searchLoading: t ? c : gB,
|
|
55069
55092
|
getSearchHandler: b,
|
|
55070
55093
|
getMentionSearchHandler: x
|
|
55071
55094
|
};
|
|
55072
55095
|
}
|
|
55073
55096
|
//#endregion
|
|
55074
55097
|
//#region src/components/popups/dynamic/hooks/usePopupSubmit.js
|
|
55075
|
-
function
|
|
55098
|
+
function vB({ form: e, config: t, api: n, popupContext: r, resolvedIds: i, dynamicOptions: a, extraData: o, removedIds: s, removalOnlySubmit: c = !1, fields: l, onClose: u, onSubmit: d }) {
|
|
55076
55099
|
let [f, p] = L(!1), [m, h] = L(null);
|
|
55077
55100
|
async function g(e) {
|
|
55078
55101
|
let t = {
|
|
@@ -55147,10 +55170,10 @@ function gB({ form: e, config: t, api: n, popupContext: r, resolvedIds: i, dynam
|
|
|
55147
55170
|
}
|
|
55148
55171
|
//#endregion
|
|
55149
55172
|
//#region src/components/popups/dynamic/DynamicPopup.jsx
|
|
55150
|
-
function
|
|
55173
|
+
function yB(e) {
|
|
55151
55174
|
return !!(e.multiSelect || e.multiple || e.mode === "multiple");
|
|
55152
55175
|
}
|
|
55153
|
-
function
|
|
55176
|
+
function bB({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i, api: a = {} }) {
|
|
55154
55177
|
let [o] = B.useForm(), [s, c] = L({}), [l, u] = L([]), d = B.useWatch([], o, { preserve: !0 }) ?? {}, f = I(() => yz(n), [n]), { selectedIds: p = [], selectedRecords: m = [], moduleName: h = "" } = f, g = I(() => p.map((e, t) => {
|
|
55155
55178
|
let n = m[t];
|
|
55156
55179
|
return n?.id ?? n?._id ?? e;
|
|
@@ -55160,20 +55183,20 @@ function vB({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
55160
55183
|
if (t.initialOptionKey) {
|
|
55161
55184
|
let n = f[t.initialOptionKey], r = Array.isArray(n) ? n : n ? [n] : [];
|
|
55162
55185
|
if (!r.length) return;
|
|
55163
|
-
e[t.name] =
|
|
55186
|
+
e[t.name] = yB(t) ? r.map((e) => e.value) : r[0].value;
|
|
55164
55187
|
return;
|
|
55165
55188
|
}
|
|
55166
55189
|
let n = f[t.initialValueKey];
|
|
55167
55190
|
!t.initialValueKey || n === void 0 || (e[t.name] = t.type === "date-picker" ? $s(n) : n);
|
|
55168
55191
|
}), e;
|
|
55169
|
-
}, [_, f]), { dynamicOptions: y, setDynamicOptions: b, extraData: x } =
|
|
55192
|
+
}, [_, f]), { dynamicOptions: y, setDynamicOptions: b, extraData: x } = pB({
|
|
55170
55193
|
open: e,
|
|
55171
55194
|
config: t,
|
|
55172
55195
|
api: a,
|
|
55173
55196
|
fields: _,
|
|
55174
55197
|
popupContext: f,
|
|
55175
55198
|
formValues: s
|
|
55176
|
-
}), { mentionOptions: S, searchLoading: C, getSearchHandler: w, getMentionSearchHandler: T } =
|
|
55199
|
+
}), { mentionOptions: S, searchLoading: C, getSearchHandler: w, getMentionSearchHandler: T } = _B({
|
|
55177
55200
|
api: a,
|
|
55178
55201
|
open: e,
|
|
55179
55202
|
fields: _,
|
|
@@ -55206,7 +55229,7 @@ function vB({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
55206
55229
|
}), k = (f.removedIds ?? []).length, ee = l.length > k, A = D.some((e) => {
|
|
55207
55230
|
let t = d[e.name];
|
|
55208
55231
|
return !(t == null || t === "" || Array.isArray(t) && t.length === 0);
|
|
55209
|
-
}), { handleOk: j, confirming: te, deleteError: M, resetSubmitState: ne } =
|
|
55232
|
+
}), { handleOk: j, confirming: te, deleteError: M, resetSubmitState: ne } = vB({
|
|
55210
55233
|
form: o,
|
|
55211
55234
|
config: t,
|
|
55212
55235
|
api: a,
|
|
@@ -55303,7 +55326,7 @@ function vB({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
55303
55326
|
}
|
|
55304
55327
|
//#endregion
|
|
55305
55328
|
//#region src/components/popups/definitions/delete/config.js
|
|
55306
|
-
var
|
|
55329
|
+
var xB = {
|
|
55307
55330
|
mode: "delete",
|
|
55308
55331
|
getTitleText: (e, t) => `Delete ${e > 0 ? `${e} ` : ""}${t}`,
|
|
55309
55332
|
titleIcon: "delete",
|
|
@@ -55313,19 +55336,19 @@ var yB = {
|
|
|
55313
55336
|
getBodyText: (e, t, n, r) => r ? `Are you sure you want to delete the ${r} ${t}?` : e > 1 ? `Are you sure you want to delete ${e} selected ${n}?` : `Are you sure you want to delete this ${t}?`,
|
|
55314
55337
|
footerNote: "This action cannot be undone.",
|
|
55315
55338
|
fields: []
|
|
55316
|
-
},
|
|
55339
|
+
}, SB = { deleteItems: async (e, t) => {
|
|
55317
55340
|
await Wc(t.moduleName, e);
|
|
55318
|
-
} },
|
|
55319
|
-
async function
|
|
55320
|
-
return e ? (
|
|
55341
|
+
} }, CB = /* @__PURE__ */ new Map();
|
|
55342
|
+
async function wB(e) {
|
|
55343
|
+
return e ? (CB.has(e) || CB.set(e, ra({ module: e }).catch((t) => (CB.delete(e), console.warn(`[in-progress gate] could not read ${e} form groups:`, t), []))), CB.get(e)) : [];
|
|
55321
55344
|
}
|
|
55322
|
-
function
|
|
55345
|
+
function TB(e = [], t) {
|
|
55323
55346
|
return e.some((e) => {
|
|
55324
55347
|
let n = Ee(e, t);
|
|
55325
55348
|
return n && n.severity !== "allow";
|
|
55326
55349
|
});
|
|
55327
55350
|
}
|
|
55328
|
-
async function
|
|
55351
|
+
async function EB({ targetModule: e, sourceModule: t, recordId: n, region: r } = {}) {
|
|
55329
55352
|
let i = {
|
|
55330
55353
|
severity: "allow",
|
|
55331
55354
|
message: "",
|
|
@@ -55334,8 +55357,8 @@ async function wB({ targetModule: e, sourceModule: t, recordId: n, region: r } =
|
|
|
55334
55357
|
if (!e || !t || !n) return i;
|
|
55335
55358
|
let a = r ?? cr().region;
|
|
55336
55359
|
try {
|
|
55337
|
-
let r = await
|
|
55338
|
-
if (!
|
|
55360
|
+
let r = await wB(e);
|
|
55361
|
+
if (!TB(r, a)) return i;
|
|
55339
55362
|
let o = await ra({
|
|
55340
55363
|
module: t,
|
|
55341
55364
|
id: n
|
|
@@ -55351,13 +55374,13 @@ async function wB({ targetModule: e, sourceModule: t, recordId: n, region: r } =
|
|
|
55351
55374
|
}
|
|
55352
55375
|
//#endregion
|
|
55353
55376
|
//#region src/components/popups/definitions/quick-submit/api.js
|
|
55354
|
-
var
|
|
55377
|
+
var DB = "Already submitted", OB = "submissions", kB = "candidates", AB = 864e5, jB = 90, MB = "This candidate was created or last updated more than 90 days ago. Only candidates created or updated within the last 90 days can be selected. Please update this candidate first.", NB = [
|
|
55355
55378
|
"createdAt",
|
|
55356
55379
|
"createdDate",
|
|
55357
55380
|
"dateCreated",
|
|
55358
55381
|
"created_on",
|
|
55359
55382
|
"createdOn"
|
|
55360
|
-
],
|
|
55383
|
+
], PB = [
|
|
55361
55384
|
"updatedAt",
|
|
55362
55385
|
"updatedDate",
|
|
55363
55386
|
"lastUpdatedAt",
|
|
@@ -55365,7 +55388,7 @@ var TB = "Already submitted", EB = "submissions", DB = "candidates", OB = 864e5,
|
|
|
55365
55388
|
"modifiedAt",
|
|
55366
55389
|
"modifiedDate"
|
|
55367
55390
|
];
|
|
55368
|
-
function
|
|
55391
|
+
function FB(e, t) {
|
|
55369
55392
|
for (let n of t) {
|
|
55370
55393
|
let t = e?.[n];
|
|
55371
55394
|
if (!t) continue;
|
|
@@ -55374,32 +55397,32 @@ function NB(e, t) {
|
|
|
55374
55397
|
}
|
|
55375
55398
|
return null;
|
|
55376
55399
|
}
|
|
55377
|
-
function
|
|
55378
|
-
return
|
|
55400
|
+
function IB(e) {
|
|
55401
|
+
return FB(e, NB);
|
|
55379
55402
|
}
|
|
55380
|
-
function
|
|
55381
|
-
return
|
|
55403
|
+
function LB(e) {
|
|
55404
|
+
return FB(e, PB);
|
|
55382
55405
|
}
|
|
55383
|
-
function
|
|
55406
|
+
function RB(e) {
|
|
55384
55407
|
if (!(e instanceof Date) || Number.isNaN(e.getTime())) return null;
|
|
55385
55408
|
let t = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime();
|
|
55386
|
-
return Math.max(0, Math.floor((t(/* @__PURE__ */ new Date()) - t(e)) /
|
|
55409
|
+
return Math.max(0, Math.floor((t(/* @__PURE__ */ new Date()) - t(e)) / AB));
|
|
55387
55410
|
}
|
|
55388
|
-
function
|
|
55411
|
+
function zB(e) {
|
|
55389
55412
|
return e === null ? "" : e <= 14 ? "green" : e <= 89 ? "yellow" : "red";
|
|
55390
55413
|
}
|
|
55391
|
-
function
|
|
55414
|
+
function BB(e, t = jB) {
|
|
55392
55415
|
if (!e) return !1;
|
|
55393
|
-
let n = Date.now() - t *
|
|
55416
|
+
let n = Date.now() - t * AB, r = IB(e), i = LB(e), a = r && r.getTime() >= n, o = i && i.getTime() >= n;
|
|
55394
55417
|
return !a && !o;
|
|
55395
55418
|
}
|
|
55396
|
-
var
|
|
55397
|
-
function
|
|
55398
|
-
let t =
|
|
55399
|
-
return r && !Number.isNaN(r.getTime()) && (!t || r.getTime() - t.getTime() >
|
|
55419
|
+
var VB = 6e4;
|
|
55420
|
+
function HB(e) {
|
|
55421
|
+
let t = IB(e), n = PB.map((t) => e?.[t]).find((e) => pz(e)), r = n ? new Date(n?.$date ?? n) : null;
|
|
55422
|
+
return r && !Number.isNaN(r.getTime()) && (!t || r.getTime() - t.getTime() > VB) ? r : t;
|
|
55400
55423
|
}
|
|
55401
|
-
function
|
|
55402
|
-
let t =
|
|
55424
|
+
function UB(e) {
|
|
55425
|
+
let t = HB(e);
|
|
55403
55426
|
if (!t || !pz(t)) return {
|
|
55404
55427
|
createdAgo: "",
|
|
55405
55428
|
createdAgoTone: ""
|
|
@@ -55407,13 +55430,13 @@ function VB(e) {
|
|
|
55407
55430
|
let n = mz(t);
|
|
55408
55431
|
return n ? {
|
|
55409
55432
|
createdAgo: n,
|
|
55410
|
-
createdAgoTone:
|
|
55433
|
+
createdAgoTone: zB(RB(t))
|
|
55411
55434
|
} : {
|
|
55412
55435
|
createdAgo: "",
|
|
55413
55436
|
createdAgoTone: ""
|
|
55414
55437
|
};
|
|
55415
55438
|
}
|
|
55416
|
-
function
|
|
55439
|
+
function WB(e) {
|
|
55417
55440
|
for (let t of [
|
|
55418
55441
|
"applicantRefrenceId",
|
|
55419
55442
|
"applicantReferanceId",
|
|
@@ -55424,33 +55447,33 @@ function HB(e) {
|
|
|
55424
55447
|
}
|
|
55425
55448
|
return "";
|
|
55426
55449
|
}
|
|
55427
|
-
function
|
|
55450
|
+
function GB(e) {
|
|
55428
55451
|
return {
|
|
55429
55452
|
...e,
|
|
55430
|
-
applicantRefrenceId:
|
|
55431
|
-
...
|
|
55432
|
-
isStaleCandidate:
|
|
55453
|
+
applicantRefrenceId: WB(e),
|
|
55454
|
+
...UB(e),
|
|
55455
|
+
isStaleCandidate: BB(e)
|
|
55433
55456
|
};
|
|
55434
55457
|
}
|
|
55435
|
-
function
|
|
55458
|
+
function KB(e) {
|
|
55436
55459
|
return String(e?.applicantId ?? e?._id ?? e?.id ?? "");
|
|
55437
55460
|
}
|
|
55438
|
-
var
|
|
55439
|
-
async function
|
|
55440
|
-
return
|
|
55461
|
+
var qB = null;
|
|
55462
|
+
async function JB() {
|
|
55463
|
+
return qB ||= or(kB).then((e) => e?.strategies?.duplicateCheck?.editRoute ?? "").catch(() => ""), qB;
|
|
55441
55464
|
}
|
|
55442
|
-
async function
|
|
55443
|
-
let t =
|
|
55465
|
+
async function YB(e) {
|
|
55466
|
+
let t = KB(e);
|
|
55444
55467
|
if (!t) return "";
|
|
55445
|
-
let n = await
|
|
55468
|
+
let n = await JB();
|
|
55446
55469
|
return n ? n.replace(/:(_?id)\b/g, encodeURIComponent(t)) : "";
|
|
55447
55470
|
}
|
|
55448
|
-
async function
|
|
55449
|
-
let r = e?._raw ?? e ?? {}, i =
|
|
55471
|
+
async function XB({ option: e, popupContext: t, confirm: n }) {
|
|
55472
|
+
let r = e?._raw ?? e ?? {}, i = KB(r);
|
|
55450
55473
|
if (i) {
|
|
55451
|
-
let e = await
|
|
55452
|
-
targetModule:
|
|
55453
|
-
sourceModule:
|
|
55474
|
+
let e = await EB({
|
|
55475
|
+
targetModule: OB,
|
|
55476
|
+
sourceModule: kB,
|
|
55454
55477
|
recordId: i
|
|
55455
55478
|
});
|
|
55456
55479
|
if (e.severity === "block") return new Promise((t) => {
|
|
@@ -55464,34 +55487,34 @@ async function JB({ option: e, popupContext: t, confirm: n }) {
|
|
|
55464
55487
|
});
|
|
55465
55488
|
});
|
|
55466
55489
|
}
|
|
55467
|
-
if (!
|
|
55490
|
+
if (!BB(r)) return !0;
|
|
55468
55491
|
let a = t?.navigate;
|
|
55469
55492
|
return !a || !i ? !1 : new Promise((e) => {
|
|
55470
55493
|
n({
|
|
55471
55494
|
title: "Candidate update required",
|
|
55472
|
-
content:
|
|
55495
|
+
content: MB,
|
|
55473
55496
|
okText: "OK",
|
|
55474
55497
|
cancelText: "Cancel",
|
|
55475
55498
|
onOk: async () => {
|
|
55476
|
-
let t = await
|
|
55499
|
+
let t = await YB(r);
|
|
55477
55500
|
t && a(t), e(!1);
|
|
55478
55501
|
},
|
|
55479
55502
|
onCancel: () => e(!1)
|
|
55480
55503
|
});
|
|
55481
55504
|
});
|
|
55482
55505
|
}
|
|
55483
|
-
function
|
|
55506
|
+
function ZB(e, t, n) {
|
|
55484
55507
|
return {
|
|
55485
55508
|
...e,
|
|
55486
|
-
label: `${e.label} - ${
|
|
55509
|
+
label: `${e.label} - ${DB}`,
|
|
55487
55510
|
disabled: !0,
|
|
55488
|
-
title: `${
|
|
55511
|
+
title: `${DB}${t ? ` (submission ${t})` : ""}`,
|
|
55489
55512
|
alreadySubmitted: !0,
|
|
55490
55513
|
existingSubmissionId: t || "",
|
|
55491
55514
|
...n ? { submittedAt: n } : {}
|
|
55492
55515
|
};
|
|
55493
55516
|
}
|
|
55494
|
-
var
|
|
55517
|
+
var QB = {
|
|
55495
55518
|
searchOptions: async (e, t, n) => {
|
|
55496
55519
|
if (e.searchFetchKey === "quickSubmitJobList") {
|
|
55497
55520
|
let e = n.selectedRecords?.[0] ?? {}, r = e.id ?? e._id ?? n.selectedIds?.[0], i, a = !0;
|
|
@@ -55514,7 +55537,7 @@ var XB = {
|
|
|
55514
55537
|
_raw: e
|
|
55515
55538
|
}));
|
|
55516
55539
|
if (a) return o.map((e) => {
|
|
55517
|
-
if (e._raw?.isSubmitted || e._raw?.alreadySubmitted) return
|
|
55540
|
+
if (e._raw?.isSubmitted || e._raw?.alreadySubmitted) return ZB(e, e._raw?.jobSubmissionId || "", e._raw?.submittedAt || "");
|
|
55518
55541
|
if (e._raw?.disable) {
|
|
55519
55542
|
let t = String(e._raw?.message ?? "").trim();
|
|
55520
55543
|
return {
|
|
@@ -55532,7 +55555,7 @@ var XB = {
|
|
|
55532
55555
|
}).catch(() => /* @__PURE__ */ new Map());
|
|
55533
55556
|
return o.map((e) => {
|
|
55534
55557
|
let t = s.get(String(e.value));
|
|
55535
|
-
return t ?
|
|
55558
|
+
return t ? ZB(e, t.submissionId, t.submittedAt) : e;
|
|
55536
55559
|
});
|
|
55537
55560
|
}
|
|
55538
55561
|
if (e.searchFetchKey === "quickSubmitCandidates") {
|
|
@@ -55551,17 +55574,17 @@ var XB = {
|
|
|
55551
55574
|
});
|
|
55552
55575
|
i = Array.isArray(e) ? e : [], a = await vl({
|
|
55553
55576
|
jobId: r,
|
|
55554
|
-
applicantIds: i.map(
|
|
55577
|
+
applicantIds: i.map(KB)
|
|
55555
55578
|
}).catch(() => /* @__PURE__ */ new Map());
|
|
55556
55579
|
}
|
|
55557
|
-
return i.map((e) =>
|
|
55558
|
-
let t = a.get(
|
|
55580
|
+
return i.map((e) => GB(e)).map((e) => {
|
|
55581
|
+
let t = a.get(KB(e));
|
|
55559
55582
|
if (!(t || e?.isSubmitted === !0 || e?.alreadySubmitted === !0)) return e;
|
|
55560
55583
|
let n = t?.submissionId || e?.jobSubmissionId || "", r = t?.submittedAt || e?.submittedAt || "";
|
|
55561
55584
|
return {
|
|
55562
55585
|
...e,
|
|
55563
55586
|
disabled: !0,
|
|
55564
|
-
optionNote:
|
|
55587
|
+
optionNote: DB,
|
|
55565
55588
|
isSubmitted: !0,
|
|
55566
55589
|
alreadySubmitted: !0,
|
|
55567
55590
|
existingSubmissionId: n,
|
|
@@ -55574,12 +55597,12 @@ var XB = {
|
|
|
55574
55597
|
submit: async (e, t, n) => {
|
|
55575
55598
|
let { navigate: r, selectedRecords: i = [], selectedIds: a = [], moduleName: o } = t, s = i[0] ?? {}, c, l;
|
|
55576
55599
|
t.jobId ? (c = t.jobId, l = s.id ?? s._id ?? a[0] ?? "") : o === "candidate" ? (c = e.jobId ?? "", l = s.id ?? s._id ?? a[0] ?? "") : (c = s.jobId ?? s.id ?? s._id ?? a[0] ?? "", l = e.candidate ?? "");
|
|
55577
|
-
let u = n?.dynamicOptions?.candidate?.find((e) =>
|
|
55600
|
+
let u = n?.dynamicOptions?.candidate?.find((e) => KB(e?._raw) === String(l)), d = n?.dynamicOptions?.jobId?.find((e) => String(e?.value) === String(c)), f = u?._raw?.isSubmitted || u?._raw?.alreadySubmitted || d?.alreadySubmitted || d?._raw?.isSubmitted || d?._raw?.alreadySubmitted;
|
|
55578
55601
|
if (!c || !l) throw Error("Select both a job and a candidate to quick submit.");
|
|
55579
|
-
if (
|
|
55580
|
-
let p = await
|
|
55581
|
-
targetModule:
|
|
55582
|
-
sourceModule:
|
|
55602
|
+
if (BB(u?._raw)) throw Error(MB);
|
|
55603
|
+
let p = await EB({
|
|
55604
|
+
targetModule: OB,
|
|
55605
|
+
sourceModule: kB,
|
|
55583
55606
|
recordId: l
|
|
55584
55607
|
});
|
|
55585
55608
|
if (p.severity === "block") throw Error(p.message);
|
|
@@ -55604,7 +55627,7 @@ var XB = {
|
|
|
55604
55627
|
}).catch(() => []));
|
|
55605
55628
|
return r(`/submission-create/${c}?${g.toString()}`, { state: { relevantSkillsToken: v } }), { navigated: !0 };
|
|
55606
55629
|
}
|
|
55607
|
-
},
|
|
55630
|
+
}, $B = {
|
|
55608
55631
|
title: "Submit",
|
|
55609
55632
|
okText: "Submit",
|
|
55610
55633
|
width: 640,
|
|
@@ -55662,9 +55685,9 @@ var XB = {
|
|
|
55662
55685
|
emptyText: "Not updated"
|
|
55663
55686
|
}]
|
|
55664
55687
|
},
|
|
55665
|
-
onSelectGuard:
|
|
55688
|
+
onSelectGuard: XB
|
|
55666
55689
|
}]
|
|
55667
|
-
},
|
|
55690
|
+
}, eV = {
|
|
55668
55691
|
title: "Add Notes & Share",
|
|
55669
55692
|
okText: "Save & Share",
|
|
55670
55693
|
width: 480,
|
|
@@ -55678,9 +55701,9 @@ var XB = {
|
|
|
55678
55701
|
placeholder: "Add your notes on the job. Use '@' to mention someone.",
|
|
55679
55702
|
mentionFetchKey: "mentionUsers"
|
|
55680
55703
|
}]
|
|
55681
|
-
},
|
|
55682
|
-
async function
|
|
55683
|
-
return
|
|
55704
|
+
}, tV = (e) => e?.data ?? e;
|
|
55705
|
+
async function nV({ relatedId: e, notes: t, title: n, notesFor: r }) {
|
|
55706
|
+
return tV(await Td(k, "/notes", {
|
|
55684
55707
|
method: "POST",
|
|
55685
55708
|
body: JSON.stringify({
|
|
55686
55709
|
relatedId: e,
|
|
@@ -55692,18 +55715,18 @@ async function eV({ relatedId: e, notes: t, title: n, notesFor: r }) {
|
|
|
55692
55715
|
}
|
|
55693
55716
|
//#endregion
|
|
55694
55717
|
//#region src/components/popups/definitions/add-notes/api.js
|
|
55695
|
-
var
|
|
55718
|
+
var rV = {
|
|
55696
55719
|
getMentionOptions: async (e, t) => Kc(t),
|
|
55697
55720
|
submit: async (e, t) => {
|
|
55698
55721
|
let n = Array.isArray(t.selectedIds) ? t.selectedIds[0] : t.selectedIds;
|
|
55699
55722
|
if (!n) throw Error("Please select a record before adding a note.");
|
|
55700
|
-
await
|
|
55723
|
+
await nV({
|
|
55701
55724
|
relatedId: String(n),
|
|
55702
55725
|
notes: e.notes,
|
|
55703
55726
|
notesFor: t.moduleName
|
|
55704
55727
|
});
|
|
55705
55728
|
}
|
|
55706
|
-
},
|
|
55729
|
+
}, iV = {
|
|
55707
55730
|
name: "jobId",
|
|
55708
55731
|
label: "Job Title / ID",
|
|
55709
55732
|
type: "search-select",
|
|
@@ -55714,7 +55737,7 @@ var tV = {
|
|
|
55714
55737
|
valueKey: "_id",
|
|
55715
55738
|
labelTemplate: "{jobReferenceId} - {jobTitle} — {jobRecruitmentStatus}",
|
|
55716
55739
|
initialOptionKey: "jobOption"
|
|
55717
|
-
},
|
|
55740
|
+
}, aV = {
|
|
55718
55741
|
name: "hiringStage",
|
|
55719
55742
|
label: "Hiring stage",
|
|
55720
55743
|
type: "select",
|
|
@@ -55728,22 +55751,22 @@ var tV = {
|
|
|
55728
55751
|
value: "pipeline"
|
|
55729
55752
|
}],
|
|
55730
55753
|
initialValueKey: "hiringStage"
|
|
55731
|
-
},
|
|
55754
|
+
}, oV = {
|
|
55732
55755
|
title: "Tag to Jobs",
|
|
55733
55756
|
okText: "Tag",
|
|
55734
55757
|
width: 480,
|
|
55735
55758
|
disabledUntilFilled: !0,
|
|
55736
55759
|
autoSubmitWhenNoFields: !0,
|
|
55737
|
-
getFields: (e) => e.jobId && e.hiringStage ? [] : [
|
|
55738
|
-
},
|
|
55739
|
-
function
|
|
55760
|
+
getFields: (e) => e.jobId && e.hiringStage ? [] : [iV, aV]
|
|
55761
|
+
}, sV = (e) => e?.data ?? e;
|
|
55762
|
+
function cV(e) {
|
|
55740
55763
|
return Array.isArray(e) && e.every((e) => e && typeof e == "object" && "Key" in e) ? e.reduce((e, { Key: t, Value: n }) => (e[t] = n, e), {}) : e;
|
|
55741
55764
|
}
|
|
55742
|
-
function
|
|
55743
|
-
return e ? Array.isArray(e.data) ? e.data.map(
|
|
55765
|
+
function lV(e) {
|
|
55766
|
+
return e ? Array.isArray(e.data) ? e.data.map(cV) : e.stage && Array.isArray(e.stage.data) ? e.stage.data.map(cV) : Array.isArray(e) ? e.map(cV) : [] : [];
|
|
55744
55767
|
}
|
|
55745
|
-
async function
|
|
55746
|
-
let n = await x(k, `/workflow/list/all?page=${e}&limit=${t}`), r =
|
|
55768
|
+
async function uV(e = 1, t = 10) {
|
|
55769
|
+
let n = await x(k, `/workflow/list/all?page=${e}&limit=${t}`), r = sV(n), i = Array.isArray(r) ? r : r?.data ?? [];
|
|
55747
55770
|
return {
|
|
55748
55771
|
items: i,
|
|
55749
55772
|
total: Number(n?.total ?? r?.total) || i.length,
|
|
@@ -55751,11 +55774,11 @@ async function cV(e = 1, t = 10) {
|
|
|
55751
55774
|
limit: t
|
|
55752
55775
|
};
|
|
55753
55776
|
}
|
|
55754
|
-
async function
|
|
55755
|
-
let n =
|
|
55777
|
+
async function dV(e, t) {
|
|
55778
|
+
let n = sV(await x(k, `/workflow/${e}/stage/${t}`));
|
|
55756
55779
|
return Array.isArray(n) ? { data: n } : n;
|
|
55757
55780
|
}
|
|
55758
|
-
async function
|
|
55781
|
+
async function fV(e, t) {
|
|
55759
55782
|
if (!e || !t) return null;
|
|
55760
55783
|
try {
|
|
55761
55784
|
let n = new URLSearchParams({
|
|
@@ -55769,7 +55792,7 @@ async function uV(e, t) {
|
|
|
55769
55792
|
values: [String(t)],
|
|
55770
55793
|
operator: "and"
|
|
55771
55794
|
}])
|
|
55772
|
-
}), r =
|
|
55795
|
+
}), r = sV(await x(k, `/module-data-list?${n}`));
|
|
55773
55796
|
if (Array.isArray(r)) return r[0] ?? null;
|
|
55774
55797
|
if (r?.data && Array.isArray(r.data)) return r.data[0] ?? null;
|
|
55775
55798
|
let i = r?.rows ?? r?.records ?? r?.items ?? r?.list;
|
|
@@ -55778,15 +55801,15 @@ async function uV(e, t) {
|
|
|
55778
55801
|
return console.error(`[getModuleRecordById] failed: ${e}/${t}`, n), null;
|
|
55779
55802
|
}
|
|
55780
55803
|
}
|
|
55781
|
-
async function
|
|
55782
|
-
return
|
|
55804
|
+
async function pV(e) {
|
|
55805
|
+
return sV(await x(s, "/source/workflow-instance", {
|
|
55783
55806
|
method: "POST",
|
|
55784
55807
|
body: JSON.stringify(e)
|
|
55785
55808
|
}));
|
|
55786
55809
|
}
|
|
55787
55810
|
//#endregion
|
|
55788
55811
|
//#region src/components/popups/definitions/tag-to-job/api.js
|
|
55789
|
-
var
|
|
55812
|
+
var mV = {
|
|
55790
55813
|
pipeline: "pipeline",
|
|
55791
55814
|
goodfited: "goodfited",
|
|
55792
55815
|
contacted: "contacted",
|
|
@@ -55795,40 +55818,40 @@ var fV = {
|
|
|
55795
55818
|
interviewinprogress: "interviewInprogress",
|
|
55796
55819
|
selected: "selected"
|
|
55797
55820
|
};
|
|
55798
|
-
function
|
|
55821
|
+
function hV(e, ...t) {
|
|
55799
55822
|
for (let n of t) {
|
|
55800
55823
|
let t = String(n).split(".").reduce((e, t) => e?.[t], e);
|
|
55801
55824
|
if (t != null && t !== "") return t;
|
|
55802
55825
|
}
|
|
55803
55826
|
}
|
|
55804
|
-
function
|
|
55827
|
+
function gV(e) {
|
|
55805
55828
|
let t = String(e ?? "").trim();
|
|
55806
|
-
return t ?
|
|
55829
|
+
return t ? mV[t.toLowerCase()] ?? t : "";
|
|
55807
55830
|
}
|
|
55808
|
-
function
|
|
55809
|
-
let n =
|
|
55831
|
+
function _V(e, t) {
|
|
55832
|
+
let n = hV(e, "candidateId", "candidate_id", "applicantId", "applicantID", "applicantReferenceId", "applicantRefrenceId", "_id", "id") ?? t;
|
|
55810
55833
|
if (!n) return null;
|
|
55811
|
-
let r = (
|
|
55834
|
+
let r = (hV(e, "candidateName", "candidate_name", "fullName", "name") ?? [hV(e, "firstName", "first_name"), hV(e, "lastName", "last_name")].filter(Boolean).join(" ")) || void 0, i = {
|
|
55812
55835
|
candidateId: String(n),
|
|
55813
55836
|
candidateName: r,
|
|
55814
|
-
phone:
|
|
55815
|
-
source:
|
|
55816
|
-
submittedAt:
|
|
55817
|
-
remarks:
|
|
55818
|
-
assignedRecruiter:
|
|
55819
|
-
screeningStatus:
|
|
55820
|
-
screeningScore:
|
|
55821
|
-
assignedDate:
|
|
55837
|
+
phone: hV(e, "phone", "phoneNumber", "phone_number", "mobile", "mobileNumber", "mobile_number"),
|
|
55838
|
+
source: hV(e, "source", "sourceType", "candidateSource", "profileSource"),
|
|
55839
|
+
submittedAt: hV(e, "submittedAt", "lastSubmittedAt", "updatedAt"),
|
|
55840
|
+
remarks: hV(e, "remarks", "comment", "comments", "notes"),
|
|
55841
|
+
assignedRecruiter: hV(e, "assignedRecruiter", "recruiterName", "ownerName", "assignedToName"),
|
|
55842
|
+
screeningStatus: hV(e, "screeningStatus", "screening.status", "screeningResult"),
|
|
55843
|
+
screeningScore: hV(e, "screeningScore", "screening.score", "score"),
|
|
55844
|
+
assignedDate: hV(e, "assignedDate", "assignedAt", "createdAt")
|
|
55822
55845
|
};
|
|
55823
55846
|
return Object.fromEntries(Object.entries(i).filter(([, e]) => e != null && e !== ""));
|
|
55824
55847
|
}
|
|
55825
|
-
var
|
|
55848
|
+
var vV = {
|
|
55826
55849
|
searchOptions: async (e, t) => e.searchFetchKey === "tagToJobJobList" ? Gc(t) : [],
|
|
55827
55850
|
submit: async (e, t) => {
|
|
55828
|
-
let n = e.jobId ?? t.jobId, r = Array.isArray(n) ? n : [n].filter(Boolean), i =
|
|
55851
|
+
let n = e.jobId ?? t.jobId, r = Array.isArray(n) ? n : [n].filter(Boolean), i = gV(e.hiringStage ?? t.hiringStage), a = Array.isArray(t.selectedIds) ? t.selectedIds : [], o = Array.isArray(t.selectedRecords) ? t.selectedRecords : [], s = Math.max(a.length, o.length, 1);
|
|
55829
55852
|
for (let e of r) for (let t = 0; t < s; t += 1) {
|
|
55830
|
-
let n = a[t] ? String(a[t]) : "", r =
|
|
55831
|
-
await
|
|
55853
|
+
let n = a[t] ? String(a[t]) : "", r = _V(o[t] ?? {}, n);
|
|
55854
|
+
await pV({
|
|
55832
55855
|
jobId: e,
|
|
55833
55856
|
module: "jobs",
|
|
55834
55857
|
currentStage: i,
|
|
@@ -55843,7 +55866,7 @@ var gV = {
|
|
|
55843
55866
|
});
|
|
55844
55867
|
if (c?.status === !1) throw Error(c?.error || "Could not update hiring stage");
|
|
55845
55868
|
}
|
|
55846
|
-
},
|
|
55869
|
+
}, yV = {
|
|
55847
55870
|
title: "Change Status",
|
|
55848
55871
|
okText: "Apply",
|
|
55849
55872
|
width: 420,
|
|
@@ -55877,22 +55900,34 @@ var gV = {
|
|
|
55877
55900
|
value: "closed"
|
|
55878
55901
|
}
|
|
55879
55902
|
]
|
|
55903
|
+
}, {
|
|
55904
|
+
name: "clientSubmissionId",
|
|
55905
|
+
label: "Client Submission ID",
|
|
55906
|
+
type: "input",
|
|
55907
|
+
required: !0,
|
|
55908
|
+
placeholder: "Enter client submission ID",
|
|
55909
|
+
maxLength: 100,
|
|
55910
|
+
showWhen: {
|
|
55911
|
+
field: "status",
|
|
55912
|
+
equals: "Submitted to Client"
|
|
55913
|
+
}
|
|
55880
55914
|
}]
|
|
55881
55915
|
};
|
|
55882
55916
|
//#endregion
|
|
55883
55917
|
//#region src/components/popups/definitions/change-status/api.js
|
|
55884
|
-
function
|
|
55918
|
+
function bV(e, t) {
|
|
55885
55919
|
let n = String(e ?? "").trim().toLowerCase();
|
|
55886
55920
|
return (Array.isArray(t?.status) ? t.status : []).find((e) => String(e?.value ?? "").trim().toLowerCase() === n || String(e?.label ?? "").trim().toLowerCase() === n || String(e?._raw?.name ?? "").trim().toLowerCase() === n) ?? null;
|
|
55887
55921
|
}
|
|
55888
|
-
var
|
|
55889
|
-
let r =
|
|
55922
|
+
var xV = { submit: async (e, t, n) => {
|
|
55923
|
+
let r = bV(e.status, n?.dynamicOptions), i = r?._raw ?? {}, a = {
|
|
55890
55924
|
clientSubmissionStatusText: String(i.name ?? r?.label ?? e.status ?? "").trim(),
|
|
55891
55925
|
clientSubmissionStatusId: Number(i.id ?? i.uniqueId ?? 0) || 0,
|
|
55892
|
-
clientSubmissionStatusType: String(i.type ?? "").trim()
|
|
55893
|
-
|
|
55894
|
-
|
|
55895
|
-
|
|
55926
|
+
clientSubmissionStatusType: String(i.type ?? "").trim(),
|
|
55927
|
+
submissionIdFieldName: String(i.submissionIdFieldName ?? "").trim()
|
|
55928
|
+
}, o = { status: a }, s = a.submissionIdFieldName || "clientSubmissionId", c = !!a.submissionIdFieldName || String(a.clientSubmissionStatusText ?? "").trim().toLowerCase() === "submitted to client", l = String(e.clientSubmissionId ?? "").trim();
|
|
55929
|
+
c && l && (o[s] = l), await Uc(t.moduleName, t.selectedIds, o);
|
|
55930
|
+
} }, SV = {
|
|
55896
55931
|
getTitleText: (e) => `Remove ${e > 1 ? `${e} Candidates` : "Candidate"} from Shortlist`,
|
|
55897
55932
|
titleIcon: "delete",
|
|
55898
55933
|
okText: "Remove",
|
|
@@ -55901,12 +55936,12 @@ var yV = { submit: async (e, t, n) => {
|
|
|
55901
55936
|
getBodyText: (e) => e > 1 ? `Are you sure you want to remove ${e} selected candidates from the shortlist?` : "Are you sure you want to remove this candidate from the shortlist?",
|
|
55902
55937
|
footerNote: "The candidate will be moved back to the pipeline.",
|
|
55903
55938
|
fields: []
|
|
55904
|
-
},
|
|
55939
|
+
}, CV = { onOk: async (e) => {
|
|
55905
55940
|
await yl({
|
|
55906
55941
|
jobId: e.jobId ?? e.selectedIds[0],
|
|
55907
55942
|
candidateIds: e.selectedIds
|
|
55908
55943
|
});
|
|
55909
|
-
} },
|
|
55944
|
+
} }, wV = {
|
|
55910
55945
|
title: "Add to Groups",
|
|
55911
55946
|
description: "Select a group to add the selected candidate(s) to",
|
|
55912
55947
|
okText: "Add to Group",
|
|
@@ -55920,7 +55955,7 @@ var yV = { submit: async (e, t, n) => {
|
|
|
55920
55955
|
placeholder: "Select a group",
|
|
55921
55956
|
fetchOptionsKey: "candidateGroups"
|
|
55922
55957
|
}]
|
|
55923
|
-
},
|
|
55958
|
+
}, TV = {
|
|
55924
55959
|
getOptions: async (e) => e.fetchOptionsKey === "candidateGroups" ? Zc() : [],
|
|
55925
55960
|
submit: async (e, t, { dynamicOptions: n }) => {
|
|
55926
55961
|
let r = (n.groupId ?? []).find((t) => String(t.value) === String(e.groupId));
|
|
@@ -55930,7 +55965,7 @@ var yV = { submit: async (e, t, n) => {
|
|
|
55930
55965
|
groupName: r?.label ?? ""
|
|
55931
55966
|
});
|
|
55932
55967
|
}
|
|
55933
|
-
},
|
|
55968
|
+
}, EV = [
|
|
55934
55969
|
{
|
|
55935
55970
|
title: "Name",
|
|
55936
55971
|
key: "name",
|
|
@@ -55949,7 +55984,7 @@ var yV = { submit: async (e, t, n) => {
|
|
|
55949
55984
|
render: (e) => e || "-"
|
|
55950
55985
|
}
|
|
55951
55986
|
];
|
|
55952
|
-
function
|
|
55987
|
+
function DV({ selectedIds: e, onClose: t }) {
|
|
55953
55988
|
let n = e?.[0], [r, i] = L(!0), [a, o] = L(!1), [s, c] = L({
|
|
55954
55989
|
assignedUsers: [],
|
|
55955
55990
|
totalSubmissions: 0,
|
|
@@ -56013,7 +56048,7 @@ function TV({ selectedIds: e, onClose: t }) {
|
|
|
56013
56048
|
children: "Team Members Allocated"
|
|
56014
56049
|
}),
|
|
56015
56050
|
/* @__PURE__ */ Y(Ga, {
|
|
56016
|
-
columns:
|
|
56051
|
+
columns: EV,
|
|
56017
56052
|
dataSource: m,
|
|
56018
56053
|
pagination: !1,
|
|
56019
56054
|
rowKey: (e) => e.user_id ?? `${e.first_name}-${e.last_name}`,
|
|
@@ -56062,25 +56097,25 @@ function TV({ selectedIds: e, onClose: t }) {
|
|
|
56062
56097
|
})]
|
|
56063
56098
|
});
|
|
56064
56099
|
}
|
|
56065
|
-
|
|
56100
|
+
DV.propTypes = {
|
|
56066
56101
|
selectedIds: Z.array,
|
|
56067
56102
|
onClose: Z.func
|
|
56068
56103
|
};
|
|
56069
56104
|
//#endregion
|
|
56070
56105
|
//#region src/components/popups/definitions/self-assign/config.js
|
|
56071
|
-
var
|
|
56106
|
+
var OV = {
|
|
56072
56107
|
title: "Self Assign",
|
|
56073
56108
|
width: 480,
|
|
56074
56109
|
className: "self-assign-modal",
|
|
56075
|
-
component:
|
|
56076
|
-
},
|
|
56110
|
+
component: DV
|
|
56111
|
+
}, kV = { submit: async () => {} };
|
|
56077
56112
|
//#endregion
|
|
56078
56113
|
//#region src/components/popups/definitions/others-assign/config.js
|
|
56079
|
-
function
|
|
56114
|
+
function AV(e = {}) {
|
|
56080
56115
|
let t = Array.isArray(e.jobPayDetails) ? e.jobPayDetails[e.jobPayDetails.length - 1] : e.jobPayDetails ?? e.clientBudget ?? {}, n = Number(t.clientBudgetEnd), r = Number(t.clientBudgetStart);
|
|
56081
56116
|
return Number.isFinite(n) && n > 0 ? n : Number.isFinite(r) && r > 0 ? r : null;
|
|
56082
56117
|
}
|
|
56083
|
-
var
|
|
56118
|
+
var jV = {
|
|
56084
56119
|
getTitleText: (e, t, n) => {
|
|
56085
56120
|
let r = n?.jobTitle || n?.title || "";
|
|
56086
56121
|
return r ? `Assign - ${r}` : "Assign";
|
|
@@ -56090,7 +56125,7 @@ var kV = {
|
|
|
56090
56125
|
disabledUntilFilled: !0,
|
|
56091
56126
|
showAlreadyAssigned: !0,
|
|
56092
56127
|
allowRemovalOnlySubmit: !0,
|
|
56093
|
-
getFields: (e) => (
|
|
56128
|
+
getFields: (e) => (AV(e?.selectedRecords?.[0] ?? {}), [{
|
|
56094
56129
|
name: "assignToUserId",
|
|
56095
56130
|
label: "Assign to",
|
|
56096
56131
|
type: "multi-select",
|
|
@@ -56098,7 +56133,7 @@ var kV = {
|
|
|
56098
56133
|
placeholder: "Select recruiter(s)",
|
|
56099
56134
|
fetchOptionsKey: "assignToUsers"
|
|
56100
56135
|
}])
|
|
56101
|
-
},
|
|
56136
|
+
}, MV = {
|
|
56102
56137
|
getOptions: async (e, t, n) => e.fetchOptionsKey === "assignToUsers" ? nl(n?.selectedIds?.[0]) : [],
|
|
56103
56138
|
loadExtraData: async (e) => il(e.selectedIds[0]),
|
|
56104
56139
|
removeAssignedUser: async ({ id: e }, t) => al({
|
|
@@ -56113,7 +56148,7 @@ var kV = {
|
|
|
56113
56148
|
existingRecruiters: r?.recruitersData
|
|
56114
56149
|
});
|
|
56115
56150
|
}
|
|
56116
|
-
},
|
|
56151
|
+
}, NV = {
|
|
56117
56152
|
title: "Add Sticky Notes",
|
|
56118
56153
|
getTitleText: (e, t, n, r) => r.editingNoteId ? "Edit Sticky Notes" : "Add Sticky Notes",
|
|
56119
56154
|
okText: "Save",
|
|
@@ -56145,7 +56180,7 @@ var kV = {
|
|
|
56145
56180
|
initialValueKey: "editingComments"
|
|
56146
56181
|
}
|
|
56147
56182
|
]
|
|
56148
|
-
},
|
|
56183
|
+
}, PV = {
|
|
56149
56184
|
getMentionOptions: async (e, t) => Kc(t),
|
|
56150
56185
|
submit: async (e, t) => {
|
|
56151
56186
|
let n = e.targetDate ? e.targetDate.toISOString() : "";
|
|
@@ -56161,7 +56196,7 @@ var kV = {
|
|
|
56161
56196
|
notes: e.comments
|
|
56162
56197
|
}), window.dispatchEvent(new Event("sticky-notes:refresh"));
|
|
56163
56198
|
}
|
|
56164
|
-
},
|
|
56199
|
+
}, FV = {
|
|
56165
56200
|
title: "Move to Onboarding",
|
|
56166
56201
|
bodyText: "Are you sure you want to move this candidate to onboarding?",
|
|
56167
56202
|
okText: "Yes",
|
|
@@ -56174,7 +56209,7 @@ var kV = {
|
|
|
56174
56209
|
type: "priority-checkbox",
|
|
56175
56210
|
checkboxLabel: "Send Onboarding Email"
|
|
56176
56211
|
}]
|
|
56177
|
-
},
|
|
56212
|
+
}, IV = { submit: async (e, t) => {
|
|
56178
56213
|
await ul({
|
|
56179
56214
|
submissionId: t.selectedRecords?.[0]?.submissionId,
|
|
56180
56215
|
isMail: e.sendOnboardingEmail
|
|
@@ -56182,39 +56217,39 @@ var kV = {
|
|
|
56182
56217
|
} };
|
|
56183
56218
|
//#endregion
|
|
56184
56219
|
//#region src/components/popups/definitions/approve-rate/config.js
|
|
56185
|
-
function
|
|
56220
|
+
function LV(e) {
|
|
56186
56221
|
return Array.isArray(e) ? e[e.length - 1] ?? {} : e && typeof e == "object" ? e : {};
|
|
56187
56222
|
}
|
|
56188
|
-
var
|
|
56223
|
+
var RV = {
|
|
56189
56224
|
USD: "$",
|
|
56190
56225
|
INR: "₹",
|
|
56191
56226
|
EUR: "€",
|
|
56192
56227
|
GBP: "£"
|
|
56193
56228
|
};
|
|
56194
|
-
function
|
|
56195
|
-
let r =
|
|
56229
|
+
function zV(e, t, n) {
|
|
56230
|
+
let r = LV(e?.[t])[n];
|
|
56196
56231
|
if (r != null && r !== "") return r;
|
|
56197
56232
|
let i = e?.[`${t}.${n}`];
|
|
56198
56233
|
return i != null && i !== "" ? i : void 0;
|
|
56199
56234
|
}
|
|
56200
|
-
function
|
|
56201
|
-
let t = e.selectedRecords?.[0] ?? {}, n =
|
|
56235
|
+
function BV(e) {
|
|
56236
|
+
let t = e.selectedRecords?.[0] ?? {}, n = zV(t, "candidateRate", "candidateAcceptedRate") ?? zV(t, "candidateBudget", "candidateBudgetStart");
|
|
56202
56237
|
if (n === void 0 || Number(n) === 0) return null;
|
|
56203
|
-
let r =
|
|
56238
|
+
let r = zV(t, "candidateRate", "candidateAcceptedCurrency") ?? zV(t, "candidateBudget", "candidateBudgetCurrency");
|
|
56204
56239
|
return {
|
|
56205
56240
|
amount: n,
|
|
56206
|
-
symbol:
|
|
56207
|
-
unit:
|
|
56241
|
+
symbol: zV(t, "candidateRate", "candidateAcceptedCurrencySymbol") ?? zV(t, "candidateBudget", "candidateBudgetCurrencySymbol") ?? RV[String(r ?? "").toUpperCase()] ?? (r || "$"),
|
|
56242
|
+
unit: zV(t, "candidateRate", "candidateAcceptedPayUnit") ?? zV(t, "candidateBudget", "candidateBudgetUnit") ?? ""
|
|
56208
56243
|
};
|
|
56209
56244
|
}
|
|
56210
|
-
var
|
|
56245
|
+
var VV = {
|
|
56211
56246
|
title: "Approve Rate",
|
|
56212
56247
|
okText: "Approve",
|
|
56213
56248
|
width: 520,
|
|
56214
56249
|
className: "medium-modal",
|
|
56215
56250
|
successMessage: "Rate approved",
|
|
56216
56251
|
getBodyText: (e, t, n, r, i) => {
|
|
56217
|
-
let a =
|
|
56252
|
+
let a = BV(i);
|
|
56218
56253
|
return `Candidate Rate: ${a ? `${a.symbol}${a.amount}${a.unit ? `/${a.unit}` : ""}` : "-"}`;
|
|
56219
56254
|
},
|
|
56220
56255
|
fields: [
|
|
@@ -56228,7 +56263,7 @@ var zV = {
|
|
|
56228
56263
|
inlineRow: "proposedRate",
|
|
56229
56264
|
validator: (e, t) => {
|
|
56230
56265
|
if (e == null || e === "") return;
|
|
56231
|
-
let n =
|
|
56266
|
+
let n = BV(t);
|
|
56232
56267
|
if (n && Number(e) <= Number(n.amount)) return "Proposed rate must be greater than Candidate Rate";
|
|
56233
56268
|
}
|
|
56234
56269
|
},
|
|
@@ -56296,7 +56331,7 @@ var zV = {
|
|
|
56296
56331
|
}]
|
|
56297
56332
|
}
|
|
56298
56333
|
]
|
|
56299
|
-
},
|
|
56334
|
+
}, HV = { submit: async (e, t) => {
|
|
56300
56335
|
let n = t.selectedIds[0];
|
|
56301
56336
|
if (await dl(n, {
|
|
56302
56337
|
candidateProposedRate: e.candidateProposedRate,
|
|
@@ -56312,7 +56347,7 @@ var zV = {
|
|
|
56312
56347
|
} };
|
|
56313
56348
|
//#endregion
|
|
56314
56349
|
//#region src/services/mailApproveApi.js
|
|
56315
|
-
async function
|
|
56350
|
+
async function UV(e, t = {}) {
|
|
56316
56351
|
let n = E();
|
|
56317
56352
|
if (!n) {
|
|
56318
56353
|
let e = /* @__PURE__ */ Error("Authentication required");
|
|
@@ -56332,8 +56367,8 @@ async function VV(e, t = {}) {
|
|
|
56332
56367
|
}
|
|
56333
56368
|
return i.json();
|
|
56334
56369
|
}
|
|
56335
|
-
async function
|
|
56336
|
-
let t = await
|
|
56370
|
+
async function WV(e) {
|
|
56371
|
+
let t = await UV(`/mail-form?${new URLSearchParams({
|
|
56337
56372
|
submissionId: e,
|
|
56338
56373
|
submissionType: "manager"
|
|
56339
56374
|
}).toString()}`);
|
|
@@ -56341,15 +56376,15 @@ async function HV(e) {
|
|
|
56341
56376
|
}
|
|
56342
56377
|
//#endregion
|
|
56343
56378
|
//#region src/components/popups/definitions/manager-approve/managerApproveIdentity.js
|
|
56344
|
-
function
|
|
56379
|
+
function GV(...e) {
|
|
56345
56380
|
return e.map((e) => e == null ? "" : String(e).trim()).find(Boolean) ?? "";
|
|
56346
56381
|
}
|
|
56347
|
-
var
|
|
56348
|
-
function
|
|
56349
|
-
let r =
|
|
56350
|
-
return
|
|
56382
|
+
var KV = (e, t) => !!e && e.toLowerCase() === GV(t).toLowerCase();
|
|
56383
|
+
function qV(e, t, n) {
|
|
56384
|
+
let r = GV(t.submittedBy);
|
|
56385
|
+
return GV(KV(r, n) || KV(r, e.submitSource) || KV(r, e.supplierName) || KV(r, e.source) || KV(r, e.candidateSource) ? "" : r, e.recruitingUserName, e.recruitingUserEmail, e.signatureEmail);
|
|
56351
56386
|
}
|
|
56352
|
-
function
|
|
56387
|
+
function JV(e, t = {}) {
|
|
56353
56388
|
let n = vO(e, t.employerName);
|
|
56354
56389
|
return {
|
|
56355
56390
|
client: t.clientName ?? e.clientName,
|
|
@@ -56358,7 +56393,7 @@ function KV(e, t = {}) {
|
|
|
56358
56393
|
name: t.candidateName || [e.firstName, e.lastName].filter(Boolean).join(" ") || e.candidateFullName,
|
|
56359
56394
|
location: t.jobLocation ?? e.city ?? e.currentLocation ?? e.jobLocation,
|
|
56360
56395
|
vendor: n,
|
|
56361
|
-
submittedBy:
|
|
56396
|
+
submittedBy: qV(e, t, n),
|
|
56362
56397
|
submittedAt: t.createdAt ?? e.createdAt,
|
|
56363
56398
|
email: t.email ?? e.email,
|
|
56364
56399
|
employerLocation: t.employerLocation,
|
|
@@ -56367,29 +56402,29 @@ function KV(e, t = {}) {
|
|
|
56367
56402
|
}
|
|
56368
56403
|
//#endregion
|
|
56369
56404
|
//#region src/components/popups/definitions/manager-approve/ManagerApproveBody.jsx
|
|
56370
|
-
function
|
|
56405
|
+
function YV(e) {
|
|
56371
56406
|
return Array.isArray(e) ? e[e.length - 1] : e;
|
|
56372
56407
|
}
|
|
56373
|
-
function
|
|
56374
|
-
let t =
|
|
56408
|
+
function XV(e = {}) {
|
|
56409
|
+
let t = YV(e?.proposedRate)?.candidateProposedRate ?? e?.candidateProposedRate ?? e?.proposedRateValue, n = Number(t);
|
|
56375
56410
|
return Number.isFinite(n) ? n : 0;
|
|
56376
56411
|
}
|
|
56377
|
-
function
|
|
56378
|
-
let n =
|
|
56412
|
+
function ZV(e, t = {}) {
|
|
56413
|
+
let n = YV((e?.record?.job ?? e?.job ?? t?.job ?? {})?.jobPayDetails) ?? {}, r = e?.record?.submission ?? t ?? {}, i = YV(r?.clientBudget) ?? r?.clientBudget ?? {}, a = n?.clientBudgetEnd ?? n?.clientBudgetStart ?? i?.clientBudgetEnd ?? i?.clientBudgetStart, o = Number(a);
|
|
56379
56414
|
return Number.isFinite(o) ? o : 0;
|
|
56380
56415
|
}
|
|
56381
|
-
function
|
|
56416
|
+
function QV(e = {}) {
|
|
56382
56417
|
let t = String(e?.currencyRaw ?? "").trim().toUpperCase(), n = String(e?.currency ?? "").trim();
|
|
56383
56418
|
return n && !/^[A-Z]{3}$/i.test(n) ? n : t === "USD" || n.toUpperCase() === "USD" ? "$" : t === "INR" || n.toUpperCase() === "INR" ? "₹" : t === "EUR" || n.toUpperCase() === "EUR" ? "€" : t === "GBP" || n.toUpperCase() === "GBP" ? "£" : n || t;
|
|
56384
56419
|
}
|
|
56385
|
-
function
|
|
56420
|
+
function $V(e = {}) {
|
|
56386
56421
|
return String(e?.rateUnit ?? "hr").trim().replace(/^\/+/, "") || "hr";
|
|
56387
56422
|
}
|
|
56388
|
-
function
|
|
56423
|
+
function eH(e, t = {}) {
|
|
56389
56424
|
let n = Number(e);
|
|
56390
|
-
return Number.isFinite(n) ? `${
|
|
56425
|
+
return Number.isFinite(n) ? `${QV(t)}${n}/${$V(t)}` : "";
|
|
56391
56426
|
}
|
|
56392
|
-
function
|
|
56427
|
+
function tH(e, t, n) {
|
|
56393
56428
|
if (n == null || n === "") return String(e ?? "");
|
|
56394
56429
|
let r = String(e ?? ""), i = String(n), a = !1, o = RegExp(`(<(?:td|th)[^>]*>[\\s\\S]*?${t}[\\s\\S]*?</(?:td|th)>\\s*<(?:td|th)[^>]*>)([\\s\\S]*?)(</(?:td|th)>)`, "gi");
|
|
56395
56430
|
r = r.replace(o, (e, t, n, r) => (a = !0, `${t}${i}${r}`));
|
|
@@ -56400,23 +56435,23 @@ function $V(e, t, n) {
|
|
|
56400
56435
|
}
|
|
56401
56436
|
return r;
|
|
56402
56437
|
}
|
|
56403
|
-
function
|
|
56404
|
-
let a = Number(n?.proposedRate), o = Number.isFinite(a) ? a :
|
|
56438
|
+
function nH(e, t, n, r, i) {
|
|
56439
|
+
let a = Number(n?.proposedRate), o = Number.isFinite(a) ? a : XV(t), s = Number(n?.clientJobRate), c = Number.isFinite(s) && s > 0 ? s : ZV(r, i), l = {
|
|
56405
56440
|
proposedRate: o,
|
|
56406
56441
|
jobBillRate: c
|
|
56407
56442
|
}, u = String(e ?? "").replace(/{{\.?((?:proposedRate)|(?:jobBillRate))}}/g, (e, t) => {
|
|
56408
56443
|
let n = l[t];
|
|
56409
56444
|
return n == null ? e : String(n);
|
|
56410
56445
|
});
|
|
56411
|
-
return u =
|
|
56446
|
+
return u = tH(u, "(?:Proposed\\s*Rate|Pay\\s*Rate)", eH(o, n)), u = tH(u, "(?:Job\\s*)?Bill\\s*Rate", eH(c, n)), u;
|
|
56412
56447
|
}
|
|
56413
|
-
function
|
|
56448
|
+
function rH(e) {
|
|
56414
56449
|
let t = e?.$oid ?? e?._id?.$oid ?? e?._id ?? e?.id?.$oid ?? e?.id ?? e;
|
|
56415
56450
|
if (t == null || typeof t == "object") return "";
|
|
56416
56451
|
let n = String(t).trim();
|
|
56417
56452
|
return /^[a-f\d]{24}$/i.test(n) ? n : "";
|
|
56418
56453
|
}
|
|
56419
|
-
function
|
|
56454
|
+
function iH(...e) {
|
|
56420
56455
|
for (let t of e) {
|
|
56421
56456
|
let e = [
|
|
56422
56457
|
t?.jobId,
|
|
@@ -56439,12 +56474,12 @@ function nH(...e) {
|
|
|
56439
56474
|
t?.submission?.recordMeta?.jobId,
|
|
56440
56475
|
t?.submission?.recordMeta?.JobId,
|
|
56441
56476
|
t?.submission?.recordMeta?.job_id
|
|
56442
|
-
].map(
|
|
56477
|
+
].map(rH).find(Boolean);
|
|
56443
56478
|
if (e) return e;
|
|
56444
56479
|
}
|
|
56445
56480
|
return "";
|
|
56446
56481
|
}
|
|
56447
|
-
function
|
|
56482
|
+
function aH(e) {
|
|
56448
56483
|
if (!e?.referralId) return {};
|
|
56449
56484
|
let t = Number(e.referralRate ?? e.referalRate ?? 0) || 0, n = String(e.referralType ?? e.referalType ?? "RECURRING").trim() || "RECURRING", r = e.referralId ?? e.referalId;
|
|
56450
56485
|
return {
|
|
@@ -56470,10 +56505,10 @@ function rH(e) {
|
|
|
56470
56505
|
}
|
|
56471
56506
|
};
|
|
56472
56507
|
}
|
|
56473
|
-
function
|
|
56508
|
+
function oH(e = "") {
|
|
56474
56509
|
return String(e ?? "").replace(/map\[[^\]]*(?:resume|document|attachment|file)[^\]]*\]/gi, "").replace(/<p>\s*<\/p>/gi, "").replace(/(?:<br\s*\/?>\s*){3,}/gi, "<br><br>").trim();
|
|
56475
56510
|
}
|
|
56476
|
-
function
|
|
56511
|
+
function sH(...e) {
|
|
56477
56512
|
for (let t of e) {
|
|
56478
56513
|
let e = [
|
|
56479
56514
|
t?.candidateId,
|
|
@@ -56484,12 +56519,12 @@ function aH(...e) {
|
|
|
56484
56519
|
t?.submission?.applicantId,
|
|
56485
56520
|
t?.recordMeta?.candidateId,
|
|
56486
56521
|
t?.recordMeta?.applicantId
|
|
56487
|
-
].map(
|
|
56522
|
+
].map(rH).find(Boolean);
|
|
56488
56523
|
if (e) return e;
|
|
56489
56524
|
}
|
|
56490
56525
|
return "";
|
|
56491
56526
|
}
|
|
56492
|
-
async function
|
|
56527
|
+
async function cH(e) {
|
|
56493
56528
|
let t = e?.fileUrl ?? e?.downloadUrl ?? e?.url;
|
|
56494
56529
|
if (!t) return null;
|
|
56495
56530
|
let n = await fetch(t);
|
|
@@ -56497,34 +56532,34 @@ async function oH(e) {
|
|
|
56497
56532
|
let r = await n.blob(), i = e?.fileName ?? e?.uploadedFileName ?? e?.originalName ?? e?.uniqueName ?? "resume";
|
|
56498
56533
|
return new File([r], i, { type: e?.contentType || r.type || "application/octet-stream" });
|
|
56499
56534
|
}
|
|
56500
|
-
async function
|
|
56535
|
+
async function lH(e, t, n) {
|
|
56501
56536
|
let r = [], i = await ii("submissions", e, "resume").catch(() => ({ data: [] }));
|
|
56502
56537
|
r.push(...i?.data ?? []);
|
|
56503
|
-
let a =
|
|
56538
|
+
let a = sH(t?.record?.submission, n, t?.record);
|
|
56504
56539
|
if (!a) {
|
|
56505
56540
|
let t = await x(k, `/module/list?module=submissions&id=${encodeURIComponent(e)}`).catch(() => ({})), n = t?.data ?? t ?? {};
|
|
56506
|
-
a =
|
|
56541
|
+
a = sH((Array.isArray(n?.data) ? n.data : Array.isArray(n) ? n : [])[0]);
|
|
56507
56542
|
}
|
|
56508
56543
|
if (a) {
|
|
56509
56544
|
let e = await ii("candidates", a, "resume").catch(() => ({ data: [] }));
|
|
56510
56545
|
r.push(...e?.data ?? []);
|
|
56511
56546
|
}
|
|
56512
|
-
let o = (await Promise.all(r.map(
|
|
56547
|
+
let o = (await Promise.all(r.map(cH))).filter(Boolean), s = /* @__PURE__ */ new Set();
|
|
56513
56548
|
return o.filter((e) => {
|
|
56514
56549
|
let t = `${e.name}:${e.size}:${e.type}`;
|
|
56515
56550
|
return !s.has(t) && (s.add(t), !0);
|
|
56516
56551
|
});
|
|
56517
56552
|
}
|
|
56518
|
-
function
|
|
56553
|
+
function uH(e = {}) {
|
|
56519
56554
|
return {
|
|
56520
56555
|
to: (e.to ?? e.To ?? []).map((e) => e.email ?? e.Email ?? e).filter(Boolean).join(", "),
|
|
56521
56556
|
cc: (e.cc ?? e.Cc ?? []).map((e) => e.email ?? e.Email ?? e).filter(Boolean).join(", "),
|
|
56522
56557
|
bcc: (e.bcc ?? e.Bcc ?? []).map((e) => e.email ?? e.Email ?? e).filter(Boolean).join(", "),
|
|
56523
56558
|
subject: e.subject ?? e.Subject ?? "",
|
|
56524
|
-
contents:
|
|
56559
|
+
contents: oH(e.content?.value ?? e.Content?.Value ?? e.contents ?? e.body ?? "")
|
|
56525
56560
|
};
|
|
56526
56561
|
}
|
|
56527
|
-
function
|
|
56562
|
+
function dH({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onClose: i }) {
|
|
56528
56563
|
let a = n?.[0] ?? {}, o = t?.[0] ?? XD(a), [s, c] = L(null), [l, u] = L(!0), [d, f] = L([]), [p, m] = L(!1), [h, g] = L("vms"), [_, v] = L(null), [y, b] = L(null), [x, S] = L(!1), [C, w] = L(!1), [T, E] = L(!1), [D, O] = L(!1), [k, ee] = L({
|
|
56529
56564
|
to: "",
|
|
56530
56565
|
cc: "",
|
|
@@ -56563,13 +56598,13 @@ function lH({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
|
|
|
56563
56598
|
if (h === "mail") {
|
|
56564
56599
|
m(!1), w(!0), E(!0);
|
|
56565
56600
|
try {
|
|
56566
|
-
let [e, t] = await Promise.all([
|
|
56601
|
+
let [e, t] = await Promise.all([WV(o).then(uH), lH(o, s, a).catch((e) => (console.warn("Unable to resolve resume attachment:", e), []))]), n = s?.record?.submission ?? a;
|
|
56567
56602
|
ee({
|
|
56568
|
-
to:
|
|
56569
|
-
cc:
|
|
56570
|
-
bcc:
|
|
56571
|
-
subject:
|
|
56572
|
-
contents:
|
|
56603
|
+
to: nH(e.to, n, _, s, a),
|
|
56604
|
+
cc: nH(e.cc, n, _, s, a),
|
|
56605
|
+
bcc: nH(e.bcc, n, _, s, a),
|
|
56606
|
+
subject: nH(e.subject, n, _, s, a),
|
|
56607
|
+
contents: nH(e.contents, n, _, s, a),
|
|
56573
56608
|
attachments: t,
|
|
56574
56609
|
showCc: !!e.cc,
|
|
56575
56610
|
showBcc: !!e.bcc
|
|
@@ -56588,7 +56623,7 @@ function lH({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
|
|
|
56588
56623
|
candidateProposedRateCurrency: _.currencyRaw ?? _.currency,
|
|
56589
56624
|
candidateProposedRateUnit: _.rateUnit,
|
|
56590
56625
|
submitVia: "VMS",
|
|
56591
|
-
...
|
|
56626
|
+
...aH(y)
|
|
56592
56627
|
}), q.success("Submission approved"), m(!1), v(null), b(null), i?.({ success: !0 });
|
|
56593
56628
|
} catch (e) {
|
|
56594
56629
|
q.error(e?.message ?? "Unable to approve submission");
|
|
@@ -56610,9 +56645,9 @@ function lH({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
|
|
|
56610
56645
|
await dl(o, {
|
|
56611
56646
|
...e,
|
|
56612
56647
|
submitVia: "VMS",
|
|
56613
|
-
...
|
|
56648
|
+
...aH(y)
|
|
56614
56649
|
});
|
|
56615
|
-
let t =
|
|
56650
|
+
let t = iH(s?.record, a);
|
|
56616
56651
|
if (!t) q.warning("Submission approved, but job details were not available to send mail");
|
|
56617
56652
|
else try {
|
|
56618
56653
|
await _d({
|
|
@@ -56666,7 +56701,7 @@ function lH({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
|
|
|
56666
56701
|
type: wD,
|
|
56667
56702
|
record: s.record,
|
|
56668
56703
|
lookups: s.lookups,
|
|
56669
|
-
identity:
|
|
56704
|
+
identity: JV(a, s.display),
|
|
56670
56705
|
referralOptions: d,
|
|
56671
56706
|
currentUserId: typeof localStorage < "u" ? localStorage.getItem("userId") ?? void 0 : void 0,
|
|
56672
56707
|
actions: ie,
|
|
@@ -56755,7 +56790,7 @@ function lH({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
|
|
|
56755
56790
|
})
|
|
56756
56791
|
] });
|
|
56757
56792
|
}
|
|
56758
|
-
|
|
56793
|
+
dH.propTypes = {
|
|
56759
56794
|
context: Z.object,
|
|
56760
56795
|
selectedIds: Z.array,
|
|
56761
56796
|
selectedRecords: Z.array,
|
|
@@ -56764,29 +56799,29 @@ lH.propTypes = {
|
|
|
56764
56799
|
};
|
|
56765
56800
|
//#endregion
|
|
56766
56801
|
//#region src/components/popups/definitions/manager-approve/config.js
|
|
56767
|
-
var
|
|
56802
|
+
var fH = {
|
|
56768
56803
|
title: "Manager Approve",
|
|
56769
56804
|
width: 780,
|
|
56770
56805
|
className: "fa-modal manager-approve-modal",
|
|
56771
|
-
component:
|
|
56772
|
-
},
|
|
56806
|
+
component: dH
|
|
56807
|
+
}, pH = { submit: async () => {} };
|
|
56773
56808
|
//#endregion
|
|
56774
56809
|
//#region src/components/popups/definitions/manager-reapprove/ManagerReapproveBody.jsx
|
|
56775
|
-
function
|
|
56810
|
+
function mH(e) {
|
|
56776
56811
|
let t = Array.isArray(e) ? e : [];
|
|
56777
56812
|
for (let e = t.length - 1; e >= 0; --e) if (String(t[e]?.activityType ?? "").trim().toLowerCase() === "cfo rejected") return t[e];
|
|
56778
56813
|
return null;
|
|
56779
56814
|
}
|
|
56780
|
-
function
|
|
56815
|
+
function hH(e) {
|
|
56781
56816
|
return String(e ?? "").toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase());
|
|
56782
56817
|
}
|
|
56783
|
-
function
|
|
56818
|
+
function gH({ selectedIds: e, selectedRecords: t, onClose: n }) {
|
|
56784
56819
|
let r = t?.[0] ?? {}, i = e?.[0] ?? XD(r), [a, o] = L(null), [s, c] = L(""), [l, u] = L(!0);
|
|
56785
56820
|
F(() => {
|
|
56786
56821
|
let e = !1;
|
|
56787
56822
|
return u(!0), Promise.all([WO(i, r), le("submission", i).catch(() => [])]).then(([t, n]) => {
|
|
56788
56823
|
if (e) return;
|
|
56789
|
-
let i =
|
|
56824
|
+
let i = mH(n);
|
|
56790
56825
|
c(XD(t?.meta?.workforceEngagementId ?? r?.onboarding?.workforceEngagementId ?? r?.workforceEngagementId));
|
|
56791
56826
|
let a = t?.meta?.rejectReasonComments || i?.activityComments || "";
|
|
56792
56827
|
o({
|
|
@@ -56795,7 +56830,7 @@ function mH({ selectedIds: e, selectedRecords: t, onClose: n }) {
|
|
|
56795
56830
|
...t.record,
|
|
56796
56831
|
submission: {
|
|
56797
56832
|
...t.record.submission,
|
|
56798
|
-
cfoRejectionReason: a ?
|
|
56833
|
+
cfoRejectionReason: a ? hH(a) : "",
|
|
56799
56834
|
cfoRejectedAt: t?.meta?.rejectedAt ?? i?.activityTime ?? null
|
|
56800
56835
|
}
|
|
56801
56836
|
}
|
|
@@ -56843,26 +56878,26 @@ function mH({ selectedIds: e, selectedRecords: t, onClose: n }) {
|
|
|
56843
56878
|
type: OD,
|
|
56844
56879
|
record: a.record,
|
|
56845
56880
|
lookups: a.lookups,
|
|
56846
|
-
identity:
|
|
56881
|
+
identity: JV(r, a.display),
|
|
56847
56882
|
currentUserId: typeof localStorage < "u" ? localStorage.getItem("userId") ?? void 0 : void 0,
|
|
56848
56883
|
actions: d,
|
|
56849
56884
|
onClose: () => n?.(),
|
|
56850
56885
|
variant: "popup"
|
|
56851
56886
|
});
|
|
56852
56887
|
}
|
|
56853
|
-
|
|
56888
|
+
gH.propTypes = {
|
|
56854
56889
|
selectedIds: Z.array,
|
|
56855
56890
|
selectedRecords: Z.array,
|
|
56856
56891
|
onClose: Z.func
|
|
56857
56892
|
};
|
|
56858
56893
|
//#endregion
|
|
56859
56894
|
//#region src/components/popups/definitions/manager-reapprove/config.js
|
|
56860
|
-
var
|
|
56895
|
+
var _H = {
|
|
56861
56896
|
title: "Re-Approve",
|
|
56862
56897
|
width: 780,
|
|
56863
56898
|
className: "fa-modal manager-approve-modal",
|
|
56864
|
-
component:
|
|
56865
|
-
},
|
|
56899
|
+
component: gH
|
|
56900
|
+
}, vH = { submit: async () => {} }, yH = [
|
|
56866
56901
|
{
|
|
56867
56902
|
id: 1,
|
|
56868
56903
|
name: "Re-Submission"
|
|
@@ -56875,7 +56910,7 @@ var hH = {
|
|
|
56875
56910
|
id: 3,
|
|
56876
56911
|
name: "Incomplete candidate details - (Re-Submission)"
|
|
56877
56912
|
}
|
|
56878
|
-
],
|
|
56913
|
+
], bH = {
|
|
56879
56914
|
title: "Reject",
|
|
56880
56915
|
okText: "Reject",
|
|
56881
56916
|
okButtonDanger: !0,
|
|
@@ -56887,7 +56922,7 @@ var hH = {
|
|
|
56887
56922
|
type: "select",
|
|
56888
56923
|
required: !0,
|
|
56889
56924
|
placeholder: "Select rejection reasons",
|
|
56890
|
-
defaultOptions:
|
|
56925
|
+
defaultOptions: yH.map((e) => ({
|
|
56891
56926
|
label: e.name,
|
|
56892
56927
|
value: e.id
|
|
56893
56928
|
}))
|
|
@@ -56898,88 +56933,88 @@ var hH = {
|
|
|
56898
56933
|
required: !0,
|
|
56899
56934
|
rows: 4
|
|
56900
56935
|
}]
|
|
56901
|
-
},
|
|
56902
|
-
let n =
|
|
56936
|
+
}, xH = { submit: async (e, t) => {
|
|
56937
|
+
let n = yH.find((t) => String(t.id) === String(e.rejectReason));
|
|
56903
56938
|
await ml({
|
|
56904
56939
|
submissionId: t.selectedIds[0],
|
|
56905
56940
|
rejectReasonId: e.rejectReason,
|
|
56906
56941
|
rejectReason: n?.name ?? "",
|
|
56907
56942
|
rejectReasonComments: e.rejectReasonComments
|
|
56908
56943
|
});
|
|
56909
|
-
} },
|
|
56910
|
-
delete:
|
|
56911
|
-
"quick-submit":
|
|
56912
|
-
"add-notes":
|
|
56913
|
-
"tag-to-job":
|
|
56914
|
-
"change-status": _V,
|
|
56915
|
-
"remove-from-shortlist": bV,
|
|
56916
|
-
"add-to-groups": SV,
|
|
56917
|
-
"self-assign": EV,
|
|
56918
|
-
"others-assign": kV,
|
|
56919
|
-
"sticky-notes": jV,
|
|
56920
|
-
"move-to-onboarding": NV,
|
|
56921
|
-
"approve-rate": zV,
|
|
56922
|
-
"manager-approve": uH,
|
|
56923
|
-
"manager-reapprove": hH,
|
|
56924
|
-
reject: vH
|
|
56925
|
-
}, xH = {
|
|
56926
|
-
delete: bB,
|
|
56927
|
-
"quick-submit": XB,
|
|
56928
|
-
"add-notes": tV,
|
|
56929
|
-
"tag-to-job": gV,
|
|
56944
|
+
} }, SH = {
|
|
56945
|
+
delete: xB,
|
|
56946
|
+
"quick-submit": $B,
|
|
56947
|
+
"add-notes": eV,
|
|
56948
|
+
"tag-to-job": oV,
|
|
56930
56949
|
"change-status": yV,
|
|
56931
|
-
"remove-from-shortlist":
|
|
56932
|
-
"add-to-groups":
|
|
56933
|
-
"self-assign":
|
|
56934
|
-
"others-assign":
|
|
56935
|
-
"sticky-notes":
|
|
56936
|
-
"move-to-onboarding":
|
|
56937
|
-
"approve-rate":
|
|
56938
|
-
"manager-approve":
|
|
56939
|
-
"manager-reapprove":
|
|
56940
|
-
reject:
|
|
56950
|
+
"remove-from-shortlist": SV,
|
|
56951
|
+
"add-to-groups": wV,
|
|
56952
|
+
"self-assign": OV,
|
|
56953
|
+
"others-assign": jV,
|
|
56954
|
+
"sticky-notes": NV,
|
|
56955
|
+
"move-to-onboarding": FV,
|
|
56956
|
+
"approve-rate": VV,
|
|
56957
|
+
"manager-approve": fH,
|
|
56958
|
+
"manager-reapprove": _H,
|
|
56959
|
+
reject: bH
|
|
56960
|
+
}, CH = {
|
|
56961
|
+
delete: SB,
|
|
56962
|
+
"quick-submit": QB,
|
|
56963
|
+
"add-notes": rV,
|
|
56964
|
+
"tag-to-job": vV,
|
|
56965
|
+
"change-status": xV,
|
|
56966
|
+
"remove-from-shortlist": CV,
|
|
56967
|
+
"add-to-groups": TV,
|
|
56968
|
+
"self-assign": kV,
|
|
56969
|
+
"others-assign": MV,
|
|
56970
|
+
"sticky-notes": PV,
|
|
56971
|
+
"move-to-onboarding": IV,
|
|
56972
|
+
"approve-rate": HV,
|
|
56973
|
+
"manager-approve": pH,
|
|
56974
|
+
"manager-reapprove": vH,
|
|
56975
|
+
reject: xH
|
|
56941
56976
|
};
|
|
56942
56977
|
//#endregion
|
|
56943
56978
|
//#region src/components/popups/AddBatchCandidatePopup.jsx
|
|
56944
|
-
function
|
|
56979
|
+
function wH(e) {
|
|
56945
56980
|
let t = e?.data ?? e;
|
|
56946
56981
|
return Array.isArray(t) ? t : t?.data ?? t?.rows ?? t?.records ?? t?.items ?? t?.list ?? [];
|
|
56947
56982
|
}
|
|
56948
|
-
function
|
|
56983
|
+
function TH(e, ...t) {
|
|
56949
56984
|
for (let n of t) {
|
|
56950
56985
|
let t = String(n).split(".").reduce((e, t) => e?.[t], e);
|
|
56951
56986
|
if (t != null && t !== "") return t;
|
|
56952
56987
|
}
|
|
56953
56988
|
return "";
|
|
56954
56989
|
}
|
|
56955
|
-
function
|
|
56956
|
-
let t = String(
|
|
56990
|
+
function EH(e) {
|
|
56991
|
+
let t = String(TH(e, "isDeleted", "deleted")).toLowerCase(), n = String(TH(e, "assignmentStatus", "status")).toLowerCase();
|
|
56957
56992
|
return t !== "true" && t !== "1" && ![
|
|
56958
56993
|
"removed",
|
|
56959
56994
|
"inactive",
|
|
56960
56995
|
"deleted"
|
|
56961
56996
|
].includes(n);
|
|
56962
56997
|
}
|
|
56963
|
-
function TH(e) {
|
|
56964
|
-
let t = CH(e, "candidateName", "candidate_name", "fullName", "name");
|
|
56965
|
-
return t ? String(t) : [CH(e, "firstName", "first_name"), CH(e, "lastName", "last_name")].filter(Boolean).join(" ") || "Unnamed candidate";
|
|
56966
|
-
}
|
|
56967
|
-
function EH(e) {
|
|
56968
|
-
return String(CH(e, "candidateId", "candidate_id", "candidate._id", "candidate.id"));
|
|
56969
|
-
}
|
|
56970
56998
|
function DH(e) {
|
|
56971
|
-
|
|
56999
|
+
let t = TH(e, "candidateName", "candidate_name", "fullName", "name");
|
|
57000
|
+
return t ? String(t) : [TH(e, "firstName", "first_name"), TH(e, "lastName", "last_name")].filter(Boolean).join(" ") || "Unnamed candidate";
|
|
56972
57001
|
}
|
|
56973
57002
|
function OH(e) {
|
|
56974
|
-
return String(
|
|
57003
|
+
return String(TH(e, "candidateId", "candidate_id", "candidate._id", "candidate.id"));
|
|
57004
|
+
}
|
|
57005
|
+
function kH(e) {
|
|
57006
|
+
return String(TH(e, "workforceEngagementId", "engagementId", "_id", "id"));
|
|
57007
|
+
}
|
|
57008
|
+
function AH(e) {
|
|
57009
|
+
return String(TH(e, "batchName", "name", "title", "batch_name"));
|
|
56975
57010
|
}
|
|
56976
|
-
function
|
|
57011
|
+
function jH({ open: e = !0, context: t = {}, onClose: n }) {
|
|
56977
57012
|
let [r, i] = L([]), [a, o] = L([]), [s, c] = L(""), [l, u] = L(!0), [d, f] = L(!1), [p, m] = L(""), [h, g] = L(/* @__PURE__ */ new Map()), _ = String(t.selectedIds?.[0] ?? t.selectedRecords?.[0]?._id ?? t.selectedRecords?.[0]?.id ?? t.batchId ?? "");
|
|
56978
57013
|
F(() => {
|
|
56979
57014
|
if (!e) return;
|
|
56980
57015
|
let t = !1;
|
|
56981
57016
|
return Promise.resolve().then(() => (t || u(!0), Promise.all([dn("onboarding", 200, 0), dn("batchCandidates", 1e3, 0).catch(() => [])]))).then(([e, n]) => {
|
|
56982
|
-
t || (i(
|
|
57017
|
+
t || (i(wH(e)), g(new Map(wH(n).filter(EH).map((e) => [String(TH(e, "candidateId", "candidate_id")), e]).filter(([e]) => e))));
|
|
56983
57018
|
}).catch((e) => {
|
|
56984
57019
|
t || m(e.message || "Unable to load onboarding candidates");
|
|
56985
57020
|
}).finally(() => {
|
|
@@ -56991,9 +57026,9 @@ function kH({ open: e = !0, context: t = {}, onClose: n }) {
|
|
|
56991
57026
|
let v = I(() => {
|
|
56992
57027
|
let e = s.trim().toLowerCase();
|
|
56993
57028
|
return e ? r.filter((t) => [
|
|
56994
|
-
|
|
56995
|
-
|
|
56996
|
-
|
|
57029
|
+
DH(t),
|
|
57030
|
+
TH(t, "email", "candidateEmail", "candidate_email"),
|
|
57031
|
+
TH(t, "status", "onboardingStatus", "onboarding_status")
|
|
56997
57032
|
].some((t) => String(t).toLowerCase().includes(e))) : r;
|
|
56998
57033
|
}, [r, s]);
|
|
56999
57034
|
async function y() {
|
|
@@ -57001,26 +57036,26 @@ function kH({ open: e = !0, context: t = {}, onClose: n }) {
|
|
|
57001
57036
|
m("Select a batch before adding candidates");
|
|
57002
57037
|
return;
|
|
57003
57038
|
}
|
|
57004
|
-
let e = r.filter((e) => a.includes(
|
|
57039
|
+
let e = r.filter((e) => a.includes(kH(e)));
|
|
57005
57040
|
if (!e.length) return;
|
|
57006
57041
|
let i = e.map((e) => ({
|
|
57007
57042
|
record: e,
|
|
57008
|
-
assignment: h.get(
|
|
57043
|
+
assignment: h.get(OH(e))
|
|
57009
57044
|
})).filter((e) => e.assignment);
|
|
57010
57045
|
if (i.length) {
|
|
57011
|
-
let e = i.map(({ record: e }) =>
|
|
57046
|
+
let e = i.map(({ record: e }) => DH(e)).join(", ");
|
|
57012
57047
|
m(`${e} ${i.length === 1 ? "is" : "are"} already added to a batch. Each candidate can be added to only one batch.`);
|
|
57013
57048
|
return;
|
|
57014
57049
|
}
|
|
57015
57050
|
f(!0), m("");
|
|
57016
57051
|
try {
|
|
57017
|
-
let { userId: r } = w(), i =
|
|
57052
|
+
let { userId: r } = w(), i = AH(t.selectedRecords?.[0]) || AH(t);
|
|
57018
57053
|
await Promise.all(e.map((e) => ut("batchCandidates", {
|
|
57019
57054
|
schemaVersion: 1,
|
|
57020
57055
|
batchId: _,
|
|
57021
57056
|
batchName: i,
|
|
57022
|
-
candidateId:
|
|
57023
|
-
workforceEngagementId:
|
|
57057
|
+
candidateId: OH(e),
|
|
57058
|
+
workforceEngagementId: kH(e),
|
|
57024
57059
|
source: "ONBOARDING",
|
|
57025
57060
|
assignmentStatus: "ASSIGNED",
|
|
57026
57061
|
assignedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -57063,22 +57098,22 @@ function kH({ open: e = !0, context: t = {}, onClose: n }) {
|
|
|
57063
57098
|
style: { marginBottom: 12 }
|
|
57064
57099
|
}),
|
|
57065
57100
|
/* @__PURE__ */ Y(Ga, {
|
|
57066
|
-
rowKey: (e) =>
|
|
57101
|
+
rowKey: (e) => kH(e),
|
|
57067
57102
|
columns: [
|
|
57068
57103
|
{
|
|
57069
57104
|
title: "Candidate",
|
|
57070
57105
|
key: "candidate",
|
|
57071
|
-
render: (e, t) =>
|
|
57106
|
+
render: (e, t) => DH(t)
|
|
57072
57107
|
},
|
|
57073
57108
|
{
|
|
57074
57109
|
title: "Email",
|
|
57075
57110
|
key: "email",
|
|
57076
|
-
render: (e, t) =>
|
|
57111
|
+
render: (e, t) => TH(t, "email", "candidateEmail", "candidate_email") || "—"
|
|
57077
57112
|
},
|
|
57078
57113
|
{
|
|
57079
57114
|
title: "Onboarding status",
|
|
57080
57115
|
key: "status",
|
|
57081
|
-
render: (e, t) =>
|
|
57116
|
+
render: (e, t) => TH(t, "status", "onboardingStatus", "onboarding_status") || "—"
|
|
57082
57117
|
}
|
|
57083
57118
|
],
|
|
57084
57119
|
dataSource: v,
|
|
@@ -57092,9 +57127,9 @@ function kH({ open: e = !0, context: t = {}, onClose: n }) {
|
|
|
57092
57127
|
selectedRowKeys: a,
|
|
57093
57128
|
onChange: o,
|
|
57094
57129
|
getCheckboxProps: (e) => {
|
|
57095
|
-
let t = h.get(
|
|
57130
|
+
let t = h.get(OH(e));
|
|
57096
57131
|
return {
|
|
57097
|
-
disabled: !
|
|
57132
|
+
disabled: !OH(e) || !kH(e) || !!t,
|
|
57098
57133
|
title: t ? "Candidate is already added to a batch" : void 0
|
|
57099
57134
|
};
|
|
57100
57135
|
}
|
|
@@ -57106,7 +57141,7 @@ function kH({ open: e = !0, context: t = {}, onClose: n }) {
|
|
|
57106
57141
|
}
|
|
57107
57142
|
//#endregion
|
|
57108
57143
|
//#region src/components/popups/dynamic/DynamicPopupRoute.jsx
|
|
57109
|
-
var
|
|
57144
|
+
var MH = {
|
|
57110
57145
|
text: "input",
|
|
57111
57146
|
string: "input",
|
|
57112
57147
|
textarea: "textarea",
|
|
@@ -57115,30 +57150,30 @@ var AH = {
|
|
|
57115
57150
|
multiselect: "multi-select",
|
|
57116
57151
|
lookup: "search-select"
|
|
57117
57152
|
};
|
|
57118
|
-
function
|
|
57153
|
+
function NH(e) {
|
|
57119
57154
|
if (!e) return null;
|
|
57120
57155
|
let t = [...e.groups ?? []].sort((e, t) => Number(e.order ?? 0) - Number(t.order ?? 0)).flatMap((e) => [...e.fields ?? []].filter((e) => e.show !== 0 && e.show !== !1).sort((e, t) => Number(e.order ?? 0) - Number(t.order ?? 0)).map((e) => ({
|
|
57121
57156
|
...e,
|
|
57122
57157
|
name: e.name ?? e.field,
|
|
57123
57158
|
label: e.label ?? e.field,
|
|
57124
|
-
type:
|
|
57159
|
+
type: MH[String(e.type ?? "text").toLowerCase()] ?? e.type ?? "input",
|
|
57125
57160
|
required: e.required ?? e.req === 1,
|
|
57126
57161
|
options: (e.options ?? []).map((e) => ({
|
|
57127
57162
|
label: e.label ?? e.name ?? e.value,
|
|
57128
57163
|
value: e.value ?? e.id ?? e.label
|
|
57129
57164
|
}))
|
|
57130
|
-
}))), n =
|
|
57165
|
+
}))), n = PH(e.successNavigate);
|
|
57131
57166
|
return {
|
|
57132
57167
|
title: e.label,
|
|
57133
57168
|
fields: t,
|
|
57134
57169
|
...n ? { successNavigate: n } : {}
|
|
57135
57170
|
};
|
|
57136
57171
|
}
|
|
57137
|
-
function
|
|
57172
|
+
function PH(e) {
|
|
57138
57173
|
let t = String(e ?? "").trim();
|
|
57139
57174
|
return !t || !t.startsWith("/") || t.startsWith("//") || /^[a-z][a-z0-9+.-]*:/i.test(t) ? null : t;
|
|
57140
57175
|
}
|
|
57141
|
-
function
|
|
57176
|
+
function FH(e, t = []) {
|
|
57142
57177
|
if (!e || !Array.isArray(t) || !t.length) return e;
|
|
57143
57178
|
let n = new Map(t.filter((e) => e?.name).map((e) => [String(e.name), e]));
|
|
57144
57179
|
return n.size ? {
|
|
@@ -57154,12 +57189,12 @@ function NH(e, t = []) {
|
|
|
57154
57189
|
})
|
|
57155
57190
|
} : e;
|
|
57156
57191
|
}
|
|
57157
|
-
function
|
|
57192
|
+
function IH({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
57158
57193
|
let n = I(() => ({
|
|
57159
|
-
...
|
|
57194
|
+
...CH,
|
|
57160
57195
|
...e
|
|
57161
57196
|
}), [e]), r = I(() => {
|
|
57162
|
-
let e = { ...
|
|
57197
|
+
let e = { ...SH };
|
|
57163
57198
|
return Object.entries(t).forEach(([t, n]) => {
|
|
57164
57199
|
e[t] = {
|
|
57165
57200
|
...e[t] ?? {},
|
|
@@ -57177,7 +57212,7 @@ function PH({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
|
57177
57212
|
return gr(o.moduleName, "popup", i).then((n) => {
|
|
57178
57213
|
e || c({
|
|
57179
57214
|
key: t,
|
|
57180
|
-
config:
|
|
57215
|
+
config: NH(n[0])
|
|
57181
57216
|
});
|
|
57182
57217
|
}).catch(() => {
|
|
57183
57218
|
e || c({
|
|
@@ -57190,7 +57225,7 @@ function PH({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
|
57190
57225
|
}, [i, o.moduleName]);
|
|
57191
57226
|
let l = I(() => {
|
|
57192
57227
|
let e = r[i], t = `${o.moduleName}:${i}`, n = s.key === t ? s.config : null;
|
|
57193
|
-
return
|
|
57228
|
+
return FH(n ? {
|
|
57194
57229
|
...e,
|
|
57195
57230
|
...n
|
|
57196
57231
|
} : e, o.popupAction?.popupFieldOverrides);
|
|
@@ -57249,11 +57284,11 @@ function PH({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
|
57249
57284
|
}
|
|
57250
57285
|
a(-1);
|
|
57251
57286
|
};
|
|
57252
|
-
return i === "add-batch-candidate" ? /* @__PURE__ */ Y(
|
|
57287
|
+
return i === "add-batch-candidate" ? /* @__PURE__ */ Y(jH, {
|
|
57253
57288
|
open: !0,
|
|
57254
57289
|
context: u,
|
|
57255
57290
|
onClose: f
|
|
57256
|
-
}) : /* @__PURE__ */ Y(
|
|
57291
|
+
}) : /* @__PURE__ */ Y(bB, {
|
|
57257
57292
|
open: !0,
|
|
57258
57293
|
config: l,
|
|
57259
57294
|
context: u,
|
|
@@ -57266,7 +57301,7 @@ function PH({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
|
57266
57301
|
}
|
|
57267
57302
|
//#endregion
|
|
57268
57303
|
//#region src/components/popups/definitions/vendor-share/config.js
|
|
57269
|
-
var
|
|
57304
|
+
var LH = {
|
|
57270
57305
|
title: "Vendor Share",
|
|
57271
57306
|
maxVendorSelect: 1e3,
|
|
57272
57307
|
defaultTab: "myVendor",
|
|
@@ -57300,7 +57335,7 @@ var FH = {
|
|
|
57300
57335
|
key: "updatedOn"
|
|
57301
57336
|
}
|
|
57302
57337
|
]
|
|
57303
|
-
},
|
|
57338
|
+
}, RH = {
|
|
57304
57339
|
getVendorList: ({ jobId: e, limit: t, offset: n, type: r }) => fd({
|
|
57305
57340
|
jobId: e,
|
|
57306
57341
|
limit: t,
|
|
@@ -57317,11 +57352,11 @@ var FH = {
|
|
|
57317
57352
|
subject: i,
|
|
57318
57353
|
contents: a
|
|
57319
57354
|
})
|
|
57320
|
-
},
|
|
57355
|
+
}, zH = LH.vendorColumns.map((e) => ({
|
|
57321
57356
|
...e,
|
|
57322
57357
|
render: (e) => e || "-"
|
|
57323
57358
|
}));
|
|
57324
|
-
function
|
|
57359
|
+
function BH() {
|
|
57325
57360
|
let e = sc(), t = oc(), { selectedIds: n = [], selectedRecords: r = [], recipients: i = [], subject: a = "", onSend: o, moduleName: s = "", popupAction: c = {} } = t.state ?? {}, l = n[0] ?? r[0]?._id ?? r[0]?.id, [u, d] = L({
|
|
57326
57361
|
to: i.join(", "),
|
|
57327
57362
|
cc: "",
|
|
@@ -57330,13 +57365,13 @@ function RH() {
|
|
|
57330
57365
|
contents: "",
|
|
57331
57366
|
showCc: !1,
|
|
57332
57367
|
showBcc: !1
|
|
57333
|
-
}), [f, p] = L(!l), [m, h] = L(
|
|
57368
|
+
}), [f, p] = L(!l), [m, h] = L(LH.defaultTab), [g, _] = L(""), [v, y] = L([]), [b, x] = L(0), [S, C] = L(0), [w, T] = L(0), [E, D] = L(1), [O, k] = L(LH.defaultPageSize), [ee, A] = L(!1), [j, te] = L([]);
|
|
57334
57369
|
F(() => {
|
|
57335
57370
|
if (!l) return;
|
|
57336
57371
|
let e = !1;
|
|
57337
57372
|
A(!0);
|
|
57338
57373
|
let t = g ? 100 : O, n = g ? 0 : (E - 1) * O;
|
|
57339
|
-
return
|
|
57374
|
+
return RH.getVendorList({
|
|
57340
57375
|
jobId: l,
|
|
57341
57376
|
limit: t,
|
|
57342
57377
|
offset: n,
|
|
@@ -57359,7 +57394,7 @@ function RH() {
|
|
|
57359
57394
|
O,
|
|
57360
57395
|
g
|
|
57361
57396
|
]), F(() => {
|
|
57362
|
-
l &&
|
|
57397
|
+
l && RH.getMailDetails(l).then((e) => d((t) => ({
|
|
57363
57398
|
...t,
|
|
57364
57399
|
subject: e.subject || t.subject,
|
|
57365
57400
|
contents: e.contents || t.contents,
|
|
@@ -57384,7 +57419,7 @@ function RH() {
|
|
|
57384
57419
|
e(-1);
|
|
57385
57420
|
}
|
|
57386
57421
|
function oe() {
|
|
57387
|
-
ie &&
|
|
57422
|
+
ie && RH.submit({
|
|
57388
57423
|
jobId: l,
|
|
57389
57424
|
toMail: KL(ne.to),
|
|
57390
57425
|
ccMail: KL(ne.cc),
|
|
@@ -57465,7 +57500,7 @@ function RH() {
|
|
|
57465
57500
|
]
|
|
57466
57501
|
}), /* @__PURE__ */ Y("div", {
|
|
57467
57502
|
className: "vendor-share__vendor-tabs",
|
|
57468
|
-
children:
|
|
57503
|
+
children: LH.vendorTabs.map((e) => /* @__PURE__ */ X("span", {
|
|
57469
57504
|
className: `vendor-share__vendor-tab${m === e.key ? " vendor-share__vendor-tab--active" : ""}`,
|
|
57470
57505
|
onClick: () => {
|
|
57471
57506
|
h(e.key), D(1), te([]);
|
|
@@ -57483,7 +57518,7 @@ function RH() {
|
|
|
57483
57518
|
className: "vendor-share__vendor-table-wrapper",
|
|
57484
57519
|
children: /* @__PURE__ */ Y(Ga, {
|
|
57485
57520
|
rowKey: (e) => e.vendorId,
|
|
57486
|
-
columns:
|
|
57521
|
+
columns: zH,
|
|
57487
57522
|
dataSource: se,
|
|
57488
57523
|
loading: ee,
|
|
57489
57524
|
pagination: !1,
|
|
@@ -57491,7 +57526,7 @@ function RH() {
|
|
|
57491
57526
|
rowSelection: {
|
|
57492
57527
|
selectedRowKeys: j,
|
|
57493
57528
|
onChange: (e) => {
|
|
57494
|
-
e.length >
|
|
57529
|
+
e.length > LH.maxVendorSelect || te(e);
|
|
57495
57530
|
}
|
|
57496
57531
|
},
|
|
57497
57532
|
scroll: { y: "calc(100vh - 340px)" }
|
|
@@ -57525,7 +57560,7 @@ function RH() {
|
|
|
57525
57560
|
children: [
|
|
57526
57561
|
j.length,
|
|
57527
57562
|
" / ",
|
|
57528
|
-
|
|
57563
|
+
LH.maxVendorSelect,
|
|
57529
57564
|
" Vendors selected"
|
|
57530
57565
|
]
|
|
57531
57566
|
}) : null
|
|
@@ -57536,7 +57571,7 @@ function RH() {
|
|
|
57536
57571
|
}
|
|
57537
57572
|
//#endregion
|
|
57538
57573
|
//#region src/components/form/validation.js
|
|
57539
|
-
var
|
|
57574
|
+
var VH = {
|
|
57540
57575
|
EMAIL: /^[a-zA-Z0-9._%+-]+@[a-zA-Z][a-zA-Z-]*\.[a-zA-Z]{2,}$/,
|
|
57541
57576
|
PHONE: /^[0-9]{10}$/,
|
|
57542
57577
|
PASSWORD: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,
|
|
@@ -57553,7 +57588,7 @@ var zH = {
|
|
|
57553
57588
|
FULL_NAME: /^[A-Z][a-zA-Z]*(?: [A-Z][a-zA-Z]*)*$/,
|
|
57554
57589
|
NO_SPACES: /^\S+$/,
|
|
57555
57590
|
STARTS_WITH_CAPITAL: /^[A-Z].*$/
|
|
57556
|
-
},
|
|
57591
|
+
}, HH = {
|
|
57557
57592
|
SINGLE_FILE_COUNT: 1,
|
|
57558
57593
|
MULTI_FILE_COUNT: 5,
|
|
57559
57594
|
MAX_FILE_SIZE: 2,
|
|
@@ -57562,7 +57597,7 @@ var zH = {
|
|
|
57562
57597
|
"image/png",
|
|
57563
57598
|
"application/pdf"
|
|
57564
57599
|
]
|
|
57565
|
-
},
|
|
57600
|
+
}, UH = {
|
|
57566
57601
|
REQUIRED: (e) => "Mandatory Field",
|
|
57567
57602
|
INVALID_EMAIL: "Please enter a valid email address.",
|
|
57568
57603
|
INVALID_PHONE: "Phone number must contain exactly 10 digits.",
|
|
@@ -57582,16 +57617,16 @@ var zH = {
|
|
|
57582
57617
|
NO_SPACES_ALLOWED: "Spaces are not allowed.",
|
|
57583
57618
|
MUST_START_WITH_CAPITAL: "First letter must be capital.",
|
|
57584
57619
|
INVALID_FILE_TYPE: "Only JPG, PNG and PDF files are allowed.",
|
|
57585
|
-
INVALID_FILE_SIZE: `File upload must be ${
|
|
57620
|
+
INVALID_FILE_SIZE: `File upload must be ${HH.MAX_FILE_SIZE} MB below.`,
|
|
57586
57621
|
INVALID_FILE_TYPE: "Only JPG, PNG and PDF files are allowed.",
|
|
57587
57622
|
SINGLE_FILE_ONLY: "Only one file can be uploaded."
|
|
57588
|
-
},
|
|
57623
|
+
}, WH = {
|
|
57589
57624
|
FIRST_NAME_MIN: 3,
|
|
57590
57625
|
FIRST_NAME_MAX: 30
|
|
57591
|
-
},
|
|
57626
|
+
}, GH = {
|
|
57592
57627
|
REMARKS_MIN: 10,
|
|
57593
57628
|
REMARKS_MAX: 250
|
|
57594
|
-
},
|
|
57629
|
+
}, KH = {
|
|
57595
57630
|
removeSpaces: (e = "") => e.replace(/\s/g, ""),
|
|
57596
57631
|
capitalizeFirstLetter: (e = "") => e.charAt(0).toUpperCase() + e.slice(1),
|
|
57597
57632
|
capitalizeWords: (e = "") => e.replace(/\b\w/g, (e) => e.toUpperCase()),
|
|
@@ -57603,132 +57638,132 @@ var zH = {
|
|
|
57603
57638
|
let t = e.replace(/\D/g, "");
|
|
57604
57639
|
return t.length <= 2 ? t : t.length <= 4 ? `${t.slice(0, 2)}/${t.slice(2)}` : `${t.slice(0, 2)}/${t.slice(2, 4)}/${t.slice(4, 8)}`;
|
|
57605
57640
|
}
|
|
57606
|
-
},
|
|
57641
|
+
}, qH = {
|
|
57607
57642
|
required: (e = "Field") => ({
|
|
57608
57643
|
required: !0,
|
|
57609
|
-
message:
|
|
57644
|
+
message: UH.REQUIRED(e)
|
|
57610
57645
|
}),
|
|
57611
57646
|
email: () => ({
|
|
57612
|
-
pattern:
|
|
57613
|
-
message:
|
|
57647
|
+
pattern: VH.EMAIL,
|
|
57648
|
+
message: UH.INVALID_EMAIL
|
|
57614
57649
|
}),
|
|
57615
57650
|
phone: () => ({
|
|
57616
|
-
pattern:
|
|
57617
|
-
message:
|
|
57651
|
+
pattern: VH.PHONE,
|
|
57652
|
+
message: UH.INVALID_PHONE
|
|
57618
57653
|
}),
|
|
57619
57654
|
password: () => ({
|
|
57620
|
-
pattern:
|
|
57621
|
-
message:
|
|
57655
|
+
pattern: VH.PASSWORD,
|
|
57656
|
+
message: UH.INVALID_PASSWORD
|
|
57622
57657
|
}),
|
|
57623
57658
|
alphabets: () => ({
|
|
57624
|
-
pattern:
|
|
57625
|
-
message:
|
|
57659
|
+
pattern: VH.ALPHABETS,
|
|
57660
|
+
message: UH.INVALID_ALPHABETS
|
|
57626
57661
|
}),
|
|
57627
57662
|
alphanumeric: () => ({
|
|
57628
|
-
pattern:
|
|
57629
|
-
message:
|
|
57663
|
+
pattern: VH.ALPHANUMERIC,
|
|
57664
|
+
message: UH.INVALID_ALPHANUMERIC
|
|
57630
57665
|
}),
|
|
57631
57666
|
number: () => ({
|
|
57632
|
-
pattern:
|
|
57633
|
-
message:
|
|
57667
|
+
pattern: VH.NUMBER,
|
|
57668
|
+
message: UH.INVALID_NUMBER
|
|
57634
57669
|
}),
|
|
57635
57670
|
url: () => ({
|
|
57636
|
-
pattern:
|
|
57637
|
-
message:
|
|
57671
|
+
pattern: VH.URL,
|
|
57672
|
+
message: UH.INVALID_URL
|
|
57638
57673
|
}),
|
|
57639
57674
|
candidateId: (e = "ID") => ({
|
|
57640
|
-
pattern:
|
|
57641
|
-
message:
|
|
57675
|
+
pattern: VH.CANDIDATE_ID,
|
|
57676
|
+
message: UH.INVALID_CANDIDATE_ID(e)
|
|
57642
57677
|
}),
|
|
57643
57678
|
remarks: () => ({
|
|
57644
|
-
pattern:
|
|
57645
|
-
message:
|
|
57646
|
-
REMARKS_MIN: `Remarks must be at least ${
|
|
57647
|
-
REMARKS_MAX: `Remarks must not exceed ${
|
|
57679
|
+
pattern: VH.REMARKS,
|
|
57680
|
+
message: UH.INVALID_REMARKS,
|
|
57681
|
+
REMARKS_MIN: `Remarks must be at least ${GH.REMARKS_MIN} characters.`,
|
|
57682
|
+
REMARKS_MAX: `Remarks must not exceed ${GH.REMARKS_MAX} characters.`
|
|
57648
57683
|
}),
|
|
57649
57684
|
designation: () => ({
|
|
57650
|
-
pattern:
|
|
57651
|
-
message:
|
|
57685
|
+
pattern: VH.DESIGNATION,
|
|
57686
|
+
message: UH.INVALID_DESIGNATION
|
|
57652
57687
|
}),
|
|
57653
57688
|
dob: (e = !0) => ({ validator: (t, n) => {
|
|
57654
57689
|
if (!n) return e ? Promise.reject(/* @__PURE__ */ Error("Date of Birth is required.")) : Promise.resolve();
|
|
57655
|
-
if (!
|
|
57690
|
+
if (!VH.DOB.test(n)) return Promise.reject(Error(UH.INVALID_DOB));
|
|
57656
57691
|
let r = $s(n, "MM/DD/YYYY", !0);
|
|
57657
|
-
if (!r.isValid()) return Promise.reject(Error(
|
|
57692
|
+
if (!r.isValid()) return Promise.reject(Error(UH.INVALID_DOB));
|
|
57658
57693
|
let i = $s().endOf("day");
|
|
57659
57694
|
return r.isAfter(i) ? Promise.reject(/* @__PURE__ */ Error("Date of Birth cannot be a future date.")) : i.diff(r, "year") < 21 ? Promise.reject(/* @__PURE__ */ Error("Age must be at least 21 years.")) : Promise.resolve();
|
|
57660
57695
|
} }),
|
|
57661
57696
|
linkedin: () => ({
|
|
57662
|
-
pattern:
|
|
57663
|
-
message:
|
|
57697
|
+
pattern: VH.LINKEDIN,
|
|
57698
|
+
message: UH.INVALID_LINKEDIN
|
|
57664
57699
|
}),
|
|
57665
57700
|
companyName: () => ({
|
|
57666
|
-
pattern:
|
|
57667
|
-
message:
|
|
57701
|
+
pattern: VH.COMPANY_NAME,
|
|
57702
|
+
message: UH.INVALID_COMPANY_NAME
|
|
57668
57703
|
}),
|
|
57669
57704
|
firstName: () => ({
|
|
57670
|
-
pattern:
|
|
57671
|
-
message:
|
|
57672
|
-
FIRST_NAME_MIN: `First Name must be at least ${
|
|
57673
|
-
FIRST_NAME_MAX: `First Name must not exceed ${
|
|
57705
|
+
pattern: VH.FIRST_NAME,
|
|
57706
|
+
message: UH.INVALID_FIRST_NAME,
|
|
57707
|
+
FIRST_NAME_MIN: `First Name must be at least ${WH.FIRST_NAME_MIN} characters.`,
|
|
57708
|
+
FIRST_NAME_MAX: `First Name must not exceed ${WH.FIRST_NAME_MAX} characters.`
|
|
57674
57709
|
}),
|
|
57675
57710
|
firstNameMinLength: () => ({
|
|
57676
|
-
min:
|
|
57677
|
-
message:
|
|
57711
|
+
min: WH.FIRST_NAME_MIN,
|
|
57712
|
+
message: UH.FIRST_NAME_MIN
|
|
57678
57713
|
}),
|
|
57679
57714
|
firstNameMaxLength: () => ({
|
|
57680
|
-
max:
|
|
57681
|
-
message:
|
|
57715
|
+
max: WH.FIRST_NAME_MAX,
|
|
57716
|
+
message: UH.FIRST_NAME_MAX
|
|
57682
57717
|
}),
|
|
57683
57718
|
remarksMinLength: () => ({
|
|
57684
|
-
min:
|
|
57685
|
-
message:
|
|
57719
|
+
min: GH.REMARKS_MIN,
|
|
57720
|
+
message: UH.REMARKS_MIN
|
|
57686
57721
|
}),
|
|
57687
57722
|
remarksMaxLength: () => ({
|
|
57688
|
-
max:
|
|
57689
|
-
message:
|
|
57723
|
+
max: GH.REMARKS_MAX,
|
|
57724
|
+
message: UH.REMARKS_MAX
|
|
57690
57725
|
}),
|
|
57691
57726
|
fullName: () => ({
|
|
57692
|
-
pattern:
|
|
57693
|
-
message:
|
|
57727
|
+
pattern: VH.FULL_NAME,
|
|
57728
|
+
message: UH.INVALID_FULL_NAME
|
|
57694
57729
|
}),
|
|
57695
57730
|
noSpaces: () => ({
|
|
57696
|
-
pattern:
|
|
57697
|
-
message:
|
|
57731
|
+
pattern: VH.NO_SPACES,
|
|
57732
|
+
message: UH.NO_SPACES_ALLOWED
|
|
57698
57733
|
}),
|
|
57699
57734
|
startsWithCapital: () => ({
|
|
57700
|
-
pattern:
|
|
57701
|
-
message:
|
|
57735
|
+
pattern: VH.STARTS_WITH_CAPITAL,
|
|
57736
|
+
message: UH.MUST_START_WITH_CAPITAL
|
|
57702
57737
|
}),
|
|
57703
57738
|
fileUpload: () => ({ validator: (e, t) => {
|
|
57704
57739
|
if (!t || t.length === 0) return Promise.resolve();
|
|
57705
57740
|
for (let e of t) {
|
|
57706
57741
|
let t = e.originFileObj || e;
|
|
57707
|
-
if (!(t.size / 1024 / 1024 <=
|
|
57708
|
-
if (!
|
|
57742
|
+
if (!(t.size / 1024 / 1024 <= HH.MAX_FILE_SIZE)) return q.error(UH.INVALID_FILE_SIZE), Promise.reject(Error(UH.INVALID_FILE_SIZE));
|
|
57743
|
+
if (!HH.ALLOWED_FILE_TYPES.includes(t.type)) return Promise.reject(Error(UH.INVALID_FILE_TYPE));
|
|
57709
57744
|
}
|
|
57710
57745
|
return Promise.resolve();
|
|
57711
57746
|
} }),
|
|
57712
57747
|
singleFileUpload: () => ({ validator: (e, t) => {
|
|
57713
57748
|
if (!t || t.length === 0) return Promise.resolve();
|
|
57714
|
-
if (t.length >
|
|
57749
|
+
if (t.length > HH.SINGLE_FILE_COUNT) return Promise.reject(Error(UH.SINGLE_FILE_ONLY));
|
|
57715
57750
|
let n = t[0];
|
|
57716
|
-
return n.size / 1024 / 1024 <
|
|
57751
|
+
return n.size / 1024 / 1024 < HH.MAX_FILE_SIZE ? HH.ALLOWED_FILE_TYPES.includes(n.type) ? Promise.resolve() : Promise.reject(Error(UH.INVALID_FILE_TYPE)) : Promise.reject(Error(UH.INVALID_FILE_SIZE));
|
|
57717
57752
|
} }),
|
|
57718
57753
|
multiFileUpload: () => ({ validator: (e, t) => {
|
|
57719
57754
|
if (!t || t.length === 0) return Promise.resolve();
|
|
57720
|
-
if (t.length >
|
|
57755
|
+
if (t.length > HH.MULTI_FILE_COUNT) return Promise.reject(Error(UH.INVALID_FILE_COUNT));
|
|
57721
57756
|
for (let e of t) {
|
|
57722
|
-
if (!(e.size / 1024 / 1024 <
|
|
57723
|
-
if (!
|
|
57757
|
+
if (!(e.size / 1024 / 1024 < HH.MAX_FILE_SIZE)) return Promise.reject(Error(UH.INVALID_FILE_SIZE));
|
|
57758
|
+
if (!HH.ALLOWED_FILE_TYPES.includes(e.type)) return Promise.reject(Error(UH.INVALID_FILE_TYPE));
|
|
57724
57759
|
}
|
|
57725
57760
|
return Promise.resolve();
|
|
57726
57761
|
} })
|
|
57727
|
-
},
|
|
57762
|
+
}, JH = { beforeUpload: (e) => [
|
|
57728
57763
|
"image/jpeg",
|
|
57729
57764
|
"image/png",
|
|
57730
57765
|
"application/pdf"
|
|
57731
|
-
].includes(e.type) ? e.size / 1024 / 1024 <= 2 ? !1 : (q.error("File upload must be 2 MB below."), Xa.LIST_IGNORE) : (q.error("Only JPG, PNG and PDF files are allowed."), Xa.LIST_IGNORE) },
|
|
57766
|
+
].includes(e.type) ? e.size / 1024 / 1024 <= 2 ? !1 : (q.error("File upload must be 2 MB below."), Xa.LIST_IGNORE) : (q.error("Only JPG, PNG and PDF files are allowed."), Xa.LIST_IGNORE) }, YH = () => {
|
|
57732
57767
|
let [e] = B.useForm();
|
|
57733
57768
|
return /* @__PURE__ */ Y("div", {
|
|
57734
57769
|
style: { padding: 24 },
|
|
@@ -57748,7 +57783,7 @@ var zH = {
|
|
|
57748
57783
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
57749
57784
|
label: "Email",
|
|
57750
57785
|
name: "email",
|
|
57751
|
-
rules: [
|
|
57786
|
+
rules: [qH.required("Email"), qH.email()],
|
|
57752
57787
|
children: /* @__PURE__ */ Y(V, {})
|
|
57753
57788
|
})
|
|
57754
57789
|
}),
|
|
@@ -57757,12 +57792,12 @@ var zH = {
|
|
|
57757
57792
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
57758
57793
|
label: "Phone Number",
|
|
57759
57794
|
name: "phone",
|
|
57760
|
-
rules: [
|
|
57795
|
+
rules: [qH.required("Phone Number"), qH.phone()],
|
|
57761
57796
|
validateTrigger: ["onBlur", "onChange"],
|
|
57762
57797
|
children: /* @__PURE__ */ Y(V, {
|
|
57763
57798
|
maxLength: 10,
|
|
57764
57799
|
onChange: (t) => {
|
|
57765
|
-
e.setFieldsValue({ phone:
|
|
57800
|
+
e.setFieldsValue({ phone: KH.phoneFormatter(t.target.value) });
|
|
57766
57801
|
}
|
|
57767
57802
|
})
|
|
57768
57803
|
})
|
|
@@ -57772,7 +57807,7 @@ var zH = {
|
|
|
57772
57807
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
57773
57808
|
label: "Password",
|
|
57774
57809
|
name: "password",
|
|
57775
|
-
rules: [
|
|
57810
|
+
rules: [qH.required("Password"), qH.password()],
|
|
57776
57811
|
children: /* @__PURE__ */ Y(V.Password, {})
|
|
57777
57812
|
})
|
|
57778
57813
|
}),
|
|
@@ -57782,13 +57817,13 @@ var zH = {
|
|
|
57782
57817
|
label: "Full Name",
|
|
57783
57818
|
name: "fullName",
|
|
57784
57819
|
rules: [
|
|
57785
|
-
|
|
57786
|
-
|
|
57787
|
-
|
|
57788
|
-
|
|
57820
|
+
qH.required("Full Name"),
|
|
57821
|
+
qH.alphabets(),
|
|
57822
|
+
qH.firstNameMinLength(),
|
|
57823
|
+
qH.firstNameMaxLength()
|
|
57789
57824
|
],
|
|
57790
57825
|
children: /* @__PURE__ */ Y(V, { onChange: (t) => {
|
|
57791
|
-
e.setFieldsValue({ fullName:
|
|
57826
|
+
e.setFieldsValue({ fullName: KH.firstNameFormatter(t.target.value) });
|
|
57792
57827
|
} })
|
|
57793
57828
|
})
|
|
57794
57829
|
}),
|
|
@@ -57797,9 +57832,9 @@ var zH = {
|
|
|
57797
57832
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
57798
57833
|
label: "Username",
|
|
57799
57834
|
name: "username",
|
|
57800
|
-
rules: [
|
|
57835
|
+
rules: [qH.required("Username"), qH.alphanumeric()],
|
|
57801
57836
|
children: /* @__PURE__ */ Y(V, { onChange: (t) => {
|
|
57802
|
-
e.setFieldsValue({ username:
|
|
57837
|
+
e.setFieldsValue({ username: KH.removeExtraSpaces(t.target.value) });
|
|
57803
57838
|
} })
|
|
57804
57839
|
})
|
|
57805
57840
|
}),
|
|
@@ -57808,9 +57843,9 @@ var zH = {
|
|
|
57808
57843
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
57809
57844
|
label: "Website URL",
|
|
57810
57845
|
name: "website",
|
|
57811
|
-
rules: [
|
|
57846
|
+
rules: [qH.required("Website URL"), qH.url()],
|
|
57812
57847
|
children: /* @__PURE__ */ Y(V, { onChange: (t) => {
|
|
57813
|
-
e.setFieldsValue({ website:
|
|
57848
|
+
e.setFieldsValue({ website: KH.removeExtraSpaces(t.target.value) });
|
|
57814
57849
|
} })
|
|
57815
57850
|
})
|
|
57816
57851
|
}),
|
|
@@ -57819,9 +57854,9 @@ var zH = {
|
|
|
57819
57854
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
57820
57855
|
label: "MSP Req ID",
|
|
57821
57856
|
name: "mspreqID",
|
|
57822
|
-
rules: [
|
|
57857
|
+
rules: [qH.required("MSP Req ID"), qH.candidateId("MSP Req ID")],
|
|
57823
57858
|
children: /* @__PURE__ */ Y(V, { onChange: (t) => {
|
|
57824
|
-
e.setFieldsValue({ mspreqID:
|
|
57859
|
+
e.setFieldsValue({ mspreqID: KH.removeExtraSpaces(t.target.value) });
|
|
57825
57860
|
} })
|
|
57826
57861
|
})
|
|
57827
57862
|
}),
|
|
@@ -57830,9 +57865,9 @@ var zH = {
|
|
|
57830
57865
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
57831
57866
|
label: "Candidate ID",
|
|
57832
57867
|
name: "candidateId",
|
|
57833
|
-
rules: [
|
|
57868
|
+
rules: [qH.required("Candidate ID"), qH.candidateId("Candidate ID")],
|
|
57834
57869
|
children: /* @__PURE__ */ Y(V, { onChange: (t) => {
|
|
57835
|
-
e.setFieldsValue({ candidateId:
|
|
57870
|
+
e.setFieldsValue({ candidateId: KH.removeExtraSpaces(t.target.value) });
|
|
57836
57871
|
} })
|
|
57837
57872
|
})
|
|
57838
57873
|
}),
|
|
@@ -57842,10 +57877,10 @@ var zH = {
|
|
|
57842
57877
|
label: "Remarks",
|
|
57843
57878
|
name: "remarks",
|
|
57844
57879
|
rules: [
|
|
57845
|
-
|
|
57846
|
-
|
|
57847
|
-
|
|
57848
|
-
|
|
57880
|
+
qH.required("Remarks"),
|
|
57881
|
+
qH.remarks(),
|
|
57882
|
+
qH.remarksMinLength(),
|
|
57883
|
+
qH.remarksMaxLength()
|
|
57849
57884
|
],
|
|
57850
57885
|
children: /* @__PURE__ */ Y(V.TextArea, { rows: 4 })
|
|
57851
57886
|
})
|
|
@@ -57855,7 +57890,7 @@ var zH = {
|
|
|
57855
57890
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
57856
57891
|
label: "Designation",
|
|
57857
57892
|
name: "designation",
|
|
57858
|
-
rules: [
|
|
57893
|
+
rules: [qH.required("Designation"), qH.designation()],
|
|
57859
57894
|
children: /* @__PURE__ */ Y(V, {})
|
|
57860
57895
|
})
|
|
57861
57896
|
}),
|
|
@@ -57864,12 +57899,12 @@ var zH = {
|
|
|
57864
57899
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
57865
57900
|
label: "Date of Birth",
|
|
57866
57901
|
name: "dob",
|
|
57867
|
-
rules: [
|
|
57902
|
+
rules: [qH.dob()],
|
|
57868
57903
|
children: /* @__PURE__ */ Y(V, {
|
|
57869
57904
|
placeholder: "MM/DD/YYYY",
|
|
57870
57905
|
maxLength: 10,
|
|
57871
57906
|
onChange: (t) => {
|
|
57872
|
-
e.setFieldsValue({ dob:
|
|
57907
|
+
e.setFieldsValue({ dob: KH.dobFormatter(t.target.value) });
|
|
57873
57908
|
}
|
|
57874
57909
|
})
|
|
57875
57910
|
})
|
|
@@ -57879,7 +57914,7 @@ var zH = {
|
|
|
57879
57914
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
57880
57915
|
label: "Company Name",
|
|
57881
57916
|
name: "companyName",
|
|
57882
|
-
rules: [
|
|
57917
|
+
rules: [qH.required("Company Name"), qH.companyName()],
|
|
57883
57918
|
children: /* @__PURE__ */ Y(V, {})
|
|
57884
57919
|
})
|
|
57885
57920
|
}),
|
|
@@ -57968,7 +58003,7 @@ var zH = {
|
|
|
57968
58003
|
label: "Resume new",
|
|
57969
58004
|
name: "resume",
|
|
57970
58005
|
children: /* @__PURE__ */ Y(Xa, {
|
|
57971
|
-
beforeUpload:
|
|
58006
|
+
beforeUpload: JH.beforeUpload,
|
|
57972
58007
|
maxCount: 1,
|
|
57973
58008
|
children: /* @__PURE__ */ Y(R, { children: "Upload Resume" })
|
|
57974
58009
|
})
|
|
@@ -57981,10 +58016,10 @@ var zH = {
|
|
|
57981
58016
|
name: "documents",
|
|
57982
58017
|
valuePropName: "fileList",
|
|
57983
58018
|
getValueFromEvent: (e) => e?.fileList,
|
|
57984
|
-
rules: [
|
|
58019
|
+
rules: [qH.multiFileUpload()],
|
|
57985
58020
|
children: /* @__PURE__ */ Y(Xa, {
|
|
57986
58021
|
multiple: !0,
|
|
57987
|
-
beforeUpload:
|
|
58022
|
+
beforeUpload: JH.beforeUpload,
|
|
57988
58023
|
children: /* @__PURE__ */ Y(R, { children: "Upload Documents" })
|
|
57989
58024
|
})
|
|
57990
58025
|
})
|
|
@@ -57996,9 +58031,9 @@ var zH = {
|
|
|
57996
58031
|
name: "file",
|
|
57997
58032
|
valuePropName: "fileList",
|
|
57998
58033
|
getValueFromEvent: (e) => e?.fileList,
|
|
57999
|
-
rules: [
|
|
58034
|
+
rules: [qH.fileUpload()],
|
|
58000
58035
|
children: /* @__PURE__ */ Y(Xa, {
|
|
58001
|
-
beforeUpload:
|
|
58036
|
+
beforeUpload: JH.beforeUpload,
|
|
58002
58037
|
maxCount: 1,
|
|
58003
58038
|
children: /* @__PURE__ */ Y(R, { children: "Upload" })
|
|
58004
58039
|
})
|
|
@@ -58058,7 +58093,7 @@ var zH = {
|
|
|
58058
58093
|
};
|
|
58059
58094
|
//#endregion
|
|
58060
58095
|
//#region src/components/admin/RegionBanner.jsx
|
|
58061
|
-
function
|
|
58096
|
+
function XH({ region: e, onExit: t }) {
|
|
58062
58097
|
if (!e || e.isHome) return null;
|
|
58063
58098
|
let n = e.label?.trim() || e.key;
|
|
58064
58099
|
return /* @__PURE__ */ X("div", {
|
|
@@ -58127,25 +58162,25 @@ function JH({ region: e, onExit: t }) {
|
|
|
58127
58162
|
]
|
|
58128
58163
|
});
|
|
58129
58164
|
}
|
|
58130
|
-
|
|
58165
|
+
XH.propTypes = {
|
|
58131
58166
|
region: Z.shape({
|
|
58132
58167
|
key: Z.string,
|
|
58133
58168
|
label: Z.string,
|
|
58134
58169
|
isHome: Z.bool
|
|
58135
58170
|
}),
|
|
58136
58171
|
onExit: Z.func
|
|
58137
|
-
},
|
|
58172
|
+
}, XH.defaultProps = {
|
|
58138
58173
|
region: null,
|
|
58139
58174
|
onExit: void 0
|
|
58140
58175
|
};
|
|
58141
58176
|
//#endregion
|
|
58142
58177
|
//#region src/pages/admin/AdminPageWithShell.jsx
|
|
58143
|
-
function
|
|
58178
|
+
function ZH(e) {
|
|
58144
58179
|
return /* @__PURE__ */ Y(dA, { children: /* @__PURE__ */ Y(RL, { ...e }) });
|
|
58145
58180
|
}
|
|
58146
58181
|
//#endregion
|
|
58147
58182
|
//#region src/components/cards/StatsCards.jsx
|
|
58148
|
-
var { Text:
|
|
58183
|
+
var { Text: QH } = Ya, $H = [
|
|
58149
58184
|
{
|
|
58150
58185
|
label: "Total Jobs",
|
|
58151
58186
|
value: 1697,
|
|
@@ -58161,13 +58196,13 @@ var { Text: XH } = Ya, ZH = [
|
|
|
58161
58196
|
value: 600,
|
|
58162
58197
|
icon: "user"
|
|
58163
58198
|
}
|
|
58164
|
-
],
|
|
58199
|
+
], eU = {
|
|
58165
58200
|
fileText: /* @__PURE__ */ Y(Ko, {}),
|
|
58166
58201
|
checkCircle: /* @__PURE__ */ Y(ho, {}),
|
|
58167
58202
|
user: /* @__PURE__ */ Y(Xs, {}),
|
|
58168
58203
|
filter: /* @__PURE__ */ Y(Jo, {})
|
|
58169
58204
|
};
|
|
58170
|
-
function
|
|
58205
|
+
function tU({ stats: e = $H }) {
|
|
58171
58206
|
return /* @__PURE__ */ Y(ya, { children: /* @__PURE__ */ Y(za, {
|
|
58172
58207
|
gutter: [12, 12],
|
|
58173
58208
|
children: e.map((e) => /* @__PURE__ */ Y(z, {
|
|
@@ -58180,7 +58215,7 @@ function $H({ stats: e = ZH }) {
|
|
|
58180
58215
|
className: "stats-inner-card",
|
|
58181
58216
|
children: [/* @__PURE__ */ X(U, {
|
|
58182
58217
|
align: "center",
|
|
58183
|
-
children: [
|
|
58218
|
+
children: [eU[e.icon] ?? eU.fileText, /* @__PURE__ */ Y(QH, { children: e.label })]
|
|
58184
58219
|
}), /* @__PURE__ */ Y(Ua, { value: e.value })]
|
|
58185
58220
|
})
|
|
58186
58221
|
}, e.label))
|
|
@@ -58188,21 +58223,21 @@ function $H({ stats: e = ZH }) {
|
|
|
58188
58223
|
}
|
|
58189
58224
|
//#endregion
|
|
58190
58225
|
//#region src/pages/Modules/Admin/UsersSection.jsx
|
|
58191
|
-
var { Text:
|
|
58192
|
-
function
|
|
58226
|
+
var { Text: nU } = Ya;
|
|
58227
|
+
function rU(e) {
|
|
58193
58228
|
return e?.USER_NAME ?? e?.user_name ?? e?.username ?? e?.name ?? e?.full_name ?? e?.fullName ?? e?.email ?? `User ${e?.USER_ID ?? e?.user_id ?? "?"}`;
|
|
58194
58229
|
}
|
|
58195
|
-
function
|
|
58230
|
+
function iU(e) {
|
|
58196
58231
|
return {
|
|
58197
58232
|
...e,
|
|
58198
58233
|
key: e.USER_ID ?? e.user_id ?? e.userId ?? e.id ?? e._id,
|
|
58199
|
-
_name:
|
|
58234
|
+
_name: rU(e),
|
|
58200
58235
|
_email: e.email ?? e.EMAIL ?? e.user_email ?? "",
|
|
58201
58236
|
_role: e.role_name ?? e.roleName ?? e.ROLE_NAME ?? "",
|
|
58202
58237
|
_rawRef: e
|
|
58203
58238
|
};
|
|
58204
58239
|
}
|
|
58205
|
-
function
|
|
58240
|
+
function aU() {
|
|
58206
58241
|
let [e, t] = L([]), [n, r] = L(0), [i, a] = L(!1), [o, s] = L(1), [c, l] = L(10), [u, d] = L(""), f = la(async ({ offset: e, limit: n, searchQuery: i } = {}) => {
|
|
58207
58242
|
a(!0);
|
|
58208
58243
|
try {
|
|
@@ -58210,7 +58245,7 @@ function rU() {
|
|
|
58210
58245
|
offset: e,
|
|
58211
58246
|
limit: n,
|
|
58212
58247
|
searchQuery: i ?? ""
|
|
58213
|
-
}), o = (a.users ?? []).map(
|
|
58248
|
+
}), o = (a.users ?? []).map(iU);
|
|
58214
58249
|
t(o), r(a.total ?? o.length);
|
|
58215
58250
|
} catch {
|
|
58216
58251
|
q.error("Failed to load users");
|
|
@@ -58243,7 +58278,7 @@ function rU() {
|
|
|
58243
58278
|
label: "Name",
|
|
58244
58279
|
value: "_name",
|
|
58245
58280
|
width: 220,
|
|
58246
|
-
render: (e, t) => /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(
|
|
58281
|
+
render: (e, t) => /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(nU, {
|
|
58247
58282
|
strong: !0,
|
|
58248
58283
|
style: { fontSize: 13 },
|
|
58249
58284
|
children: e
|
|
@@ -58275,7 +58310,7 @@ function rU() {
|
|
|
58275
58310
|
}
|
|
58276
58311
|
//#endregion
|
|
58277
58312
|
//#region src/pages/Modules/Admin/TeamsSection.jsx
|
|
58278
|
-
var { Text:
|
|
58313
|
+
var { Text: oU } = Ya, sU = [
|
|
58279
58314
|
{
|
|
58280
58315
|
key: "job",
|
|
58281
58316
|
label: "Jobs"
|
|
@@ -58288,7 +58323,7 @@ var { Text: iU } = Ya, aU = [
|
|
|
58288
58323
|
key: "submissions",
|
|
58289
58324
|
label: "Submissions"
|
|
58290
58325
|
}
|
|
58291
|
-
],
|
|
58326
|
+
], cU = [
|
|
58292
58327
|
{
|
|
58293
58328
|
key: "listView",
|
|
58294
58329
|
label: "List View"
|
|
@@ -58302,7 +58337,7 @@ var { Text: iU } = Ya, aU = [
|
|
|
58302
58337
|
label: "Form"
|
|
58303
58338
|
}
|
|
58304
58339
|
];
|
|
58305
|
-
function
|
|
58340
|
+
function lU({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
58306
58341
|
let i = pa(null), [a, o] = L(!1), [s, c] = L(!1);
|
|
58307
58342
|
function l(e) {
|
|
58308
58343
|
i.current = t, e.dataTransfer.effectAllowed = "move", c(!0);
|
|
@@ -58366,7 +58401,7 @@ function sU({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
|
58366
58401
|
]
|
|
58367
58402
|
});
|
|
58368
58403
|
}
|
|
58369
|
-
function
|
|
58404
|
+
function uU({ team: e, configType: t }) {
|
|
58370
58405
|
let [n, r] = L({}), [i, a] = L(!1), [o, s] = L({}), [c, l] = L("job");
|
|
58371
58406
|
F(() => {
|
|
58372
58407
|
e && (a(!0), Ce(e, t).then(r).catch(() => q.error("Failed to load field config")).finally(() => a(!1)));
|
|
@@ -58417,7 +58452,7 @@ function cU({ team: e, configType: t }) {
|
|
|
58417
58452
|
size: "small",
|
|
58418
58453
|
activeKey: c,
|
|
58419
58454
|
onChange: l,
|
|
58420
|
-
items:
|
|
58455
|
+
items: sU.map((e) => ({
|
|
58421
58456
|
key: e.key,
|
|
58422
58457
|
label: e.label
|
|
58423
58458
|
}))
|
|
@@ -58446,7 +58481,7 @@ function cU({ team: e, configType: t }) {
|
|
|
58446
58481
|
children: [u.length === 0 && !i && /* @__PURE__ */ Y("div", {
|
|
58447
58482
|
className: "uss-empty",
|
|
58448
58483
|
children: "No fields found."
|
|
58449
|
-
}), u.map((e, t) => /* @__PURE__ */ Y(
|
|
58484
|
+
}), u.map((e, t) => /* @__PURE__ */ Y(lU, {
|
|
58450
58485
|
field: e,
|
|
58451
58486
|
index: t,
|
|
58452
58487
|
onToggle: f,
|
|
@@ -58460,13 +58495,13 @@ function cU({ team: e, configType: t }) {
|
|
|
58460
58495
|
size: "small",
|
|
58461
58496
|
loading: o[c],
|
|
58462
58497
|
onClick: m,
|
|
58463
|
-
children: ["Save ",
|
|
58498
|
+
children: ["Save ", sU.find((e) => e.key === c)?.label]
|
|
58464
58499
|
})
|
|
58465
58500
|
})
|
|
58466
58501
|
]
|
|
58467
58502
|
});
|
|
58468
58503
|
}
|
|
58469
|
-
function
|
|
58504
|
+
function dU() {
|
|
58470
58505
|
let [e, t] = L(null), [n, r] = L(!1), [i, a] = L(!1), [o, s] = L("listView"), [c, l] = L([]), [u, d] = L(0), [f, p] = L(!1), [m, h] = L(""), [g, _] = L(!1), v = la(async () => {
|
|
58471
58506
|
p(!0);
|
|
58472
58507
|
try {
|
|
@@ -58613,13 +58648,13 @@ function lU() {
|
|
|
58613
58648
|
style: { marginBottom: 12 },
|
|
58614
58649
|
children: /* @__PURE__ */ Y("div", {
|
|
58615
58650
|
className: "uss-config-toggle",
|
|
58616
|
-
children:
|
|
58651
|
+
children: cU.map((e) => /* @__PURE__ */ Y("button", {
|
|
58617
58652
|
className: `uss-config-btn${o === e.key ? " active" : ""}`,
|
|
58618
58653
|
onClick: () => s(e.key),
|
|
58619
58654
|
children: e.label
|
|
58620
58655
|
}, e.key))
|
|
58621
58656
|
})
|
|
58622
|
-
}), e && /* @__PURE__ */ Y(
|
|
58657
|
+
}), e && /* @__PURE__ */ Y(uU, {
|
|
58623
58658
|
team: e,
|
|
58624
58659
|
configType: o
|
|
58625
58660
|
}, `${e?.teamId}-${o}`)]
|
|
@@ -58628,12 +58663,12 @@ function lU() {
|
|
|
58628
58663
|
}
|
|
58629
58664
|
//#endregion
|
|
58630
58665
|
//#region src/pages/Modules/Admin/components/RolePermPanel.jsx
|
|
58631
|
-
var
|
|
58666
|
+
var fU = [
|
|
58632
58667
|
"view",
|
|
58633
58668
|
"add",
|
|
58634
58669
|
"edit",
|
|
58635
58670
|
"delete"
|
|
58636
|
-
],
|
|
58671
|
+
], pU = {
|
|
58637
58672
|
view: "View",
|
|
58638
58673
|
add: "Add",
|
|
58639
58674
|
edit: "Edit",
|
|
@@ -58648,18 +58683,18 @@ var uU = [
|
|
|
58648
58683
|
reApprove: "ReApprove",
|
|
58649
58684
|
sendApprove: "Send Approve"
|
|
58650
58685
|
};
|
|
58651
|
-
function
|
|
58652
|
-
return
|
|
58686
|
+
function mU(e) {
|
|
58687
|
+
return pU[e] ?? e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
58653
58688
|
}
|
|
58654
|
-
function
|
|
58655
|
-
let t =
|
|
58689
|
+
function hU(e) {
|
|
58690
|
+
let t = fU.filter((t) => e.includes(t)), n = e.filter((e) => !fU.includes(e)).sort();
|
|
58656
58691
|
return [...t, ...n];
|
|
58657
58692
|
}
|
|
58658
|
-
function
|
|
58693
|
+
function gU(e) {
|
|
58659
58694
|
let t = /* @__PURE__ */ new Set();
|
|
58660
|
-
return Object.values(e).forEach(({ permissions: e }) => Object.keys(e ?? {}).forEach((e) => t.add(e))),
|
|
58695
|
+
return Object.values(e).forEach(({ permissions: e }) => Object.keys(e ?? {}).forEach((e) => t.add(e))), hU([...t]);
|
|
58661
58696
|
}
|
|
58662
|
-
function
|
|
58697
|
+
function _U(e) {
|
|
58663
58698
|
let t = 0, n = 0;
|
|
58664
58699
|
return Object.entries(e).forEach(([e, { permissions: r }]) => {
|
|
58665
58700
|
Object.entries(r ?? {}).forEach(([r, { value: i }]) => {
|
|
@@ -58670,7 +58705,7 @@ function hU(e) {
|
|
|
58670
58705
|
total: n
|
|
58671
58706
|
};
|
|
58672
58707
|
}
|
|
58673
|
-
function
|
|
58708
|
+
function vU(e = {}) {
|
|
58674
58709
|
if (!e || typeof e != "object") return e;
|
|
58675
58710
|
let t = Object.keys(e).find((e) => String(e).trim().toLowerCase() === "onboarding");
|
|
58676
58711
|
if (!t) return e;
|
|
@@ -58687,7 +58722,7 @@ function gU(e = {}) {
|
|
|
58687
58722
|
}
|
|
58688
58723
|
};
|
|
58689
58724
|
}
|
|
58690
|
-
function
|
|
58725
|
+
function yU({ value: e, onSave: t, className: n }) {
|
|
58691
58726
|
let [r, i] = L(!1), [a, o] = L(e);
|
|
58692
58727
|
F(() => {
|
|
58693
58728
|
o(e);
|
|
@@ -58716,7 +58751,7 @@ function _U({ value: e, onSave: t, className: n }) {
|
|
|
58716
58751
|
children: [e, /* @__PURE__ */ Y(No, { className: "perm-name-edit-icon" })]
|
|
58717
58752
|
});
|
|
58718
58753
|
}
|
|
58719
|
-
function
|
|
58754
|
+
function bU({ entry: e, label: t, onToggle: n, onLabelSave: r }) {
|
|
58720
58755
|
let [i, a] = L(!1), [o, s] = L(t), c = e?.value === "1", l = !!e;
|
|
58721
58756
|
F(() => {
|
|
58722
58757
|
s(t);
|
|
@@ -58758,13 +58793,13 @@ function vU({ entry: e, label: t, onToggle: n, onLabelSave: r }) {
|
|
|
58758
58793
|
})
|
|
58759
58794
|
});
|
|
58760
58795
|
}
|
|
58761
|
-
function
|
|
58796
|
+
function xU({ menuName: e, menuData: t, permKeys: n, onChange: r, displayName: i, actionLabels: a, onModuleLabelSave: o, onActionLabelSave: s }) {
|
|
58762
58797
|
let c = t?.permissions ?? {}, l = n.filter((t) => Cj(e, t)), u = l.filter((e) => c[e]?.value === "1").length, d = l.filter((e) => c[e]).length, f = d > 0 && u === d;
|
|
58763
58798
|
return /* @__PURE__ */ X("div", {
|
|
58764
58799
|
className: `perm-module-card${f ? " all-on" : u > 0 && !f ? " some-on" : ""}`,
|
|
58765
58800
|
children: [/* @__PURE__ */ X("div", {
|
|
58766
58801
|
className: "perm-module-card-header",
|
|
58767
|
-
children: [/* @__PURE__ */ Y(
|
|
58802
|
+
children: [/* @__PURE__ */ Y(yU, {
|
|
58768
58803
|
value: i,
|
|
58769
58804
|
onSave: (t) => o(e, t),
|
|
58770
58805
|
className: "perm-module-card-name"
|
|
@@ -58778,20 +58813,20 @@ function yU({ menuName: e, menuData: t, permKeys: n, onChange: r, displayName: i
|
|
|
58778
58813
|
})]
|
|
58779
58814
|
}), /* @__PURE__ */ Y("div", {
|
|
58780
58815
|
className: "perm-module-card-body",
|
|
58781
|
-
children: l.map((t) => /* @__PURE__ */ Y(
|
|
58816
|
+
children: l.map((t) => /* @__PURE__ */ Y(bU, {
|
|
58782
58817
|
entry: c[t],
|
|
58783
|
-
label: a[t] ??
|
|
58818
|
+
label: a[t] ?? mU(t),
|
|
58784
58819
|
onToggle: () => r(e, t),
|
|
58785
58820
|
onLabelSave: (e) => s(t, e)
|
|
58786
58821
|
}, t))
|
|
58787
58822
|
})]
|
|
58788
58823
|
});
|
|
58789
58824
|
}
|
|
58790
|
-
function
|
|
58825
|
+
function SU({ role: e, moduleLabels: t = {}, actionLabels: n = {}, onModuleLabelSave: r = () => {}, onActionLabelSave: i = () => {} }) {
|
|
58791
58826
|
let [a, o] = L({}), [s, c] = L({}), [l, u] = L(!1), [d, f] = L(!1), [p, m] = L(!1), h = zi(e);
|
|
58792
58827
|
F(() => {
|
|
58793
58828
|
h && (u(!0), m(!1), Pi(h).then((e) => {
|
|
58794
|
-
let t =
|
|
58829
|
+
let t = vU(e);
|
|
58795
58830
|
o(t), c(t);
|
|
58796
58831
|
}).catch(() => q.error("Failed to load permissions")).finally(() => u(!1)));
|
|
58797
58832
|
}, [h]);
|
|
@@ -58829,7 +58864,7 @@ function bU({ role: e, moduleLabels: t = {}, actionLabels: n = {}, onModuleLabel
|
|
|
58829
58864
|
f(!1);
|
|
58830
58865
|
}
|
|
58831
58866
|
}
|
|
58832
|
-
let v = I(() => Object.keys(s).sort(), [s]), y = I(() =>
|
|
58867
|
+
let v = I(() => Object.keys(s).sort(), [s]), y = I(() => gU(s), [s]), { enabled: b, total: x } = I(() => _U(s), [s]);
|
|
58833
58868
|
return /* @__PURE__ */ X(Ha, {
|
|
58834
58869
|
spinning: l,
|
|
58835
58870
|
children: [
|
|
@@ -58880,7 +58915,7 @@ function bU({ role: e, moduleLabels: t = {}, actionLabels: n = {}, onModuleLabel
|
|
|
58880
58915
|
children: "No permission entries found for this role."
|
|
58881
58916
|
}) : /* @__PURE__ */ Y("div", {
|
|
58882
58917
|
className: "perm-cards-grid",
|
|
58883
|
-
children: v.map((e) => /* @__PURE__ */ Y(
|
|
58918
|
+
children: v.map((e) => /* @__PURE__ */ Y(xU, {
|
|
58884
58919
|
menuName: e,
|
|
58885
58920
|
menuData: s[e],
|
|
58886
58921
|
permKeys: y,
|
|
@@ -58896,7 +58931,7 @@ function bU({ role: e, moduleLabels: t = {}, actionLabels: n = {}, onModuleLabel
|
|
|
58896
58931
|
}
|
|
58897
58932
|
//#endregion
|
|
58898
58933
|
//#region src/pages/Modules/Admin/RolesSection.jsx
|
|
58899
|
-
var { Text:
|
|
58934
|
+
var { Text: CU } = Ya, wU = [
|
|
58900
58935
|
{
|
|
58901
58936
|
key: "listView",
|
|
58902
58937
|
label: "List View"
|
|
@@ -58914,38 +58949,38 @@ var { Text: xU } = Ya, SU = [
|
|
|
58914
58949
|
label: "Permissions"
|
|
58915
58950
|
}
|
|
58916
58951
|
];
|
|
58917
|
-
function
|
|
58952
|
+
function TU(e) {
|
|
58918
58953
|
return String(e || "").replace(/[-_]/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()).trim();
|
|
58919
58954
|
}
|
|
58920
|
-
function
|
|
58955
|
+
function EU(e) {
|
|
58921
58956
|
return String(e || "").trim().toLowerCase();
|
|
58922
58957
|
}
|
|
58923
|
-
function
|
|
58958
|
+
function DU(e) {
|
|
58924
58959
|
return e?.key || e?.collectionName || e?.value || "";
|
|
58925
58960
|
}
|
|
58926
|
-
function
|
|
58961
|
+
function OU(e = [], t = []) {
|
|
58927
58962
|
let n = [], r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
|
|
58928
58963
|
return e.forEach((e) => {
|
|
58929
|
-
let t =
|
|
58964
|
+
let t = DU(e);
|
|
58930
58965
|
if (!t) return;
|
|
58931
|
-
let o =
|
|
58966
|
+
let o = EU(e.key || t), s = EU(e.collectionName);
|
|
58932
58967
|
e.seeded && (i.add(o), s && i.add(s)), s && a.add(s), r.add(t), n.push({
|
|
58933
|
-
label: e.label ||
|
|
58968
|
+
label: e.label || TU(t),
|
|
58934
58969
|
value: t,
|
|
58935
58970
|
disabled: !!e.seeded
|
|
58936
58971
|
});
|
|
58937
58972
|
}), t.forEach((e) => {
|
|
58938
58973
|
let t = String(e || "").trim();
|
|
58939
58974
|
if (!t || r.has(t)) return;
|
|
58940
|
-
let o =
|
|
58975
|
+
let o = EU(t);
|
|
58941
58976
|
a.has(o) || i.has(o) || (r.add(t), n.push({
|
|
58942
|
-
label:
|
|
58977
|
+
label: TU(t),
|
|
58943
58978
|
value: t,
|
|
58944
58979
|
disabled: !1
|
|
58945
58980
|
}));
|
|
58946
58981
|
}), n;
|
|
58947
58982
|
}
|
|
58948
|
-
function
|
|
58983
|
+
function kU() {
|
|
58949
58984
|
let [e, t] = L(null), [n, r] = L(!1), [i, a] = L("listView"), [o, s] = L([]), [c, l] = L(0), [u, d] = L(!1), [f, p] = L([]), [m, h] = L([]), [g, _] = L(!1), [v, y] = L(!1), b = I(() => f.filter((e) => !e.disabled), [f]), x = !g && b.length === 0, S = la(async () => {
|
|
58950
58985
|
d(!0);
|
|
58951
58986
|
try {
|
|
@@ -58959,7 +58994,7 @@ function DU() {
|
|
|
58959
58994
|
}, []), C = la(async () => {
|
|
58960
58995
|
_(!0);
|
|
58961
58996
|
try {
|
|
58962
|
-
let [e, t] = await Promise.all([pi(), M()]), n =
|
|
58997
|
+
let [e, t] = await Promise.all([pi(), M()]), n = OU(e.modules, t), r = new Set(n.filter((e) => !e.disabled).map((e) => e.value));
|
|
58963
58998
|
p(n), h((e) => e.filter((e) => r.has(e)));
|
|
58964
58999
|
} catch {
|
|
58965
59000
|
q.error("Failed to load seed status");
|
|
@@ -59025,7 +59060,7 @@ function DU() {
|
|
|
59025
59060
|
onClick: w,
|
|
59026
59061
|
children: "Seed Field Config"
|
|
59027
59062
|
})]
|
|
59028
|
-
}), /* @__PURE__ */ Y(
|
|
59063
|
+
}), /* @__PURE__ */ Y(CU, {
|
|
59029
59064
|
type: "secondary",
|
|
59030
59065
|
style: {
|
|
59031
59066
|
display: "block",
|
|
@@ -59105,13 +59140,13 @@ function DU() {
|
|
|
59105
59140
|
style: { marginBottom: 12 },
|
|
59106
59141
|
children: /* @__PURE__ */ Y("div", {
|
|
59107
59142
|
className: "uss-config-toggle",
|
|
59108
|
-
children:
|
|
59143
|
+
children: wU.map((e) => /* @__PURE__ */ Y("button", {
|
|
59109
59144
|
className: `uss-config-btn${i === e.key ? " active" : ""}`,
|
|
59110
59145
|
onClick: () => a(e.key),
|
|
59111
59146
|
children: e.label
|
|
59112
59147
|
}, e.key))
|
|
59113
59148
|
})
|
|
59114
|
-
}), e && (i === "permissions" ? /* @__PURE__ */ Y(
|
|
59149
|
+
}), e && (i === "permissions" ? /* @__PURE__ */ Y(SU, { role: e }, e?.roleId) : /* @__PURE__ */ Y(Vj, {
|
|
59115
59150
|
role: e,
|
|
59116
59151
|
configType: i
|
|
59117
59152
|
}, `${e?.roleId}-${i}`))]
|
|
@@ -59120,20 +59155,20 @@ function DU() {
|
|
|
59120
59155
|
}
|
|
59121
59156
|
//#endregion
|
|
59122
59157
|
//#region src/pages/Modules/Admin/PermissionsPage.jsx
|
|
59123
|
-
var
|
|
59124
|
-
function
|
|
59158
|
+
var AU = "perm-module-labels", jU = "perm-action-labels";
|
|
59159
|
+
function MU(e) {
|
|
59125
59160
|
try {
|
|
59126
59161
|
return JSON.parse(localStorage.getItem(e) ?? "{}");
|
|
59127
59162
|
} catch {
|
|
59128
59163
|
return {};
|
|
59129
59164
|
}
|
|
59130
59165
|
}
|
|
59131
|
-
function
|
|
59166
|
+
function NU(e, t) {
|
|
59132
59167
|
try {
|
|
59133
59168
|
localStorage.setItem(e, JSON.stringify(t));
|
|
59134
59169
|
} catch {}
|
|
59135
59170
|
}
|
|
59136
|
-
function
|
|
59171
|
+
function PU({ label: e, onSave: t, onDelete: n, loading: r }) {
|
|
59137
59172
|
let [i, a] = L(!1), [o, s] = L(e);
|
|
59138
59173
|
function c() {
|
|
59139
59174
|
a(!1);
|
|
@@ -59184,7 +59219,7 @@ function MU({ label: e, onSave: t, onDelete: n, loading: r }) {
|
|
|
59184
59219
|
})]
|
|
59185
59220
|
});
|
|
59186
59221
|
}
|
|
59187
|
-
function
|
|
59222
|
+
function FU({ open: e, onClose: t }) {
|
|
59188
59223
|
let [n, r] = L("modules"), [i, a] = L([]), [o, s] = L(!1), [c, l] = L(""), [u, d] = L(!1), [f, p] = L([]), [m, h] = L(!1), [g, _] = L(""), [v, y] = L(""), [b, x] = L(!1);
|
|
59189
59224
|
F(() => {
|
|
59190
59225
|
e && (S(), C());
|
|
@@ -59306,7 +59341,7 @@ function NU({ open: e, onClose: t }) {
|
|
|
59306
59341
|
className: "perm-empty",
|
|
59307
59342
|
style: { paddingTop: 24 },
|
|
59308
59343
|
children: "No modules found"
|
|
59309
|
-
}), i.map((e) => /* @__PURE__ */ Y(
|
|
59344
|
+
}), i.map((e) => /* @__PURE__ */ Y(PU, {
|
|
59310
59345
|
label: e.MENUNAME,
|
|
59311
59346
|
onSave: (t) => T(e.MENUID, t),
|
|
59312
59347
|
onDelete: () => E(e.MENUID)
|
|
@@ -59351,7 +59386,7 @@ function NU({ open: e, onClose: t }) {
|
|
|
59351
59386
|
className: "perm-empty",
|
|
59352
59387
|
style: { paddingTop: 24 },
|
|
59353
59388
|
children: "No actions found"
|
|
59354
|
-
}), f.map((e) => /* @__PURE__ */ Y(
|
|
59389
|
+
}), f.map((e) => /* @__PURE__ */ Y(PU, {
|
|
59355
59390
|
label: `${e.permissionName} (${e.permissionKey})`,
|
|
59356
59391
|
onSave: (t) => O(e.permissionId, t),
|
|
59357
59392
|
onDelete: () => k(e.permissionId)
|
|
@@ -59381,14 +59416,14 @@ function NU({ open: e, onClose: t }) {
|
|
|
59381
59416
|
})
|
|
59382
59417
|
});
|
|
59383
59418
|
}
|
|
59384
|
-
function
|
|
59385
|
-
let [e, t] = L([]), [n, r] = L(!1), [i, a] = L(null), [o, s] = L(""), [c, l] = L(!1), [u, d] = L(() => AU
|
|
59419
|
+
function IU() {
|
|
59420
|
+
let [e, t] = L([]), [n, r] = L(!1), [i, a] = L(null), [o, s] = L(""), [c, l] = L(!1), [u, d] = L(() => MU(AU)), [f, p] = L(() => MU(jU)), m = la((e, t) => {
|
|
59386
59421
|
d((n) => {
|
|
59387
59422
|
let r = {
|
|
59388
59423
|
...n,
|
|
59389
59424
|
[e]: t
|
|
59390
59425
|
};
|
|
59391
|
-
return
|
|
59426
|
+
return NU(AU, r), r;
|
|
59392
59427
|
});
|
|
59393
59428
|
}, []), h = la((e, t) => {
|
|
59394
59429
|
p((n) => {
|
|
@@ -59396,11 +59431,11 @@ function PU() {
|
|
|
59396
59431
|
...n,
|
|
59397
59432
|
[e]: t
|
|
59398
59433
|
};
|
|
59399
|
-
return jU
|
|
59434
|
+
return NU(jU, r), r;
|
|
59400
59435
|
});
|
|
59401
59436
|
}, []);
|
|
59402
59437
|
function g() {
|
|
59403
|
-
d({}), p({}),
|
|
59438
|
+
d({}), p({}), NU(AU, {}), NU(jU, {}), q.success("Labels reset to defaults");
|
|
59404
59439
|
}
|
|
59405
59440
|
let _ = la(async () => {
|
|
59406
59441
|
r(!0);
|
|
@@ -59484,7 +59519,7 @@ function PU() {
|
|
|
59484
59519
|
})]
|
|
59485
59520
|
}),
|
|
59486
59521
|
bodyStyle: { padding: "12px 16px" },
|
|
59487
|
-
children: i ? /* @__PURE__ */ Y(
|
|
59522
|
+
children: i ? /* @__PURE__ */ Y(SU, {
|
|
59488
59523
|
role: i,
|
|
59489
59524
|
moduleLabels: u,
|
|
59490
59525
|
actionLabels: f,
|
|
@@ -59495,7 +59530,7 @@ function PU() {
|
|
|
59495
59530
|
children: "Select a role from the left to manage its permissions."
|
|
59496
59531
|
})
|
|
59497
59532
|
}),
|
|
59498
|
-
/* @__PURE__ */ Y(
|
|
59533
|
+
/* @__PURE__ */ Y(FU, {
|
|
59499
59534
|
open: c,
|
|
59500
59535
|
onClose: () => l(!1)
|
|
59501
59536
|
})
|
|
@@ -59504,7 +59539,7 @@ function PU() {
|
|
|
59504
59539
|
}
|
|
59505
59540
|
//#endregion
|
|
59506
59541
|
//#region src/components/cards/OnboardingCard.jsx
|
|
59507
|
-
var { Title:
|
|
59542
|
+
var { Title: LU, Text: RU } = Ya, zU = [
|
|
59508
59543
|
{
|
|
59509
59544
|
label: "In Progress",
|
|
59510
59545
|
value: 107,
|
|
@@ -59530,10 +59565,10 @@ var { Title: FU, Text: IU } = Ya, LU = [
|
|
|
59530
59565
|
color: "peach"
|
|
59531
59566
|
}
|
|
59532
59567
|
];
|
|
59533
|
-
function
|
|
59568
|
+
function BU({ items: e = zU }) {
|
|
59534
59569
|
return /* @__PURE__ */ Y(ya, {
|
|
59535
59570
|
className: "onboarding-card",
|
|
59536
|
-
title: /* @__PURE__ */ Y(
|
|
59571
|
+
title: /* @__PURE__ */ Y(LU, {
|
|
59537
59572
|
level: 5,
|
|
59538
59573
|
children: "Onboarding"
|
|
59539
59574
|
}),
|
|
@@ -59552,7 +59587,7 @@ function RU({ items: e = LU }) {
|
|
|
59552
59587
|
children: /* @__PURE__ */ X("div", {
|
|
59553
59588
|
className: `onboarding-item ${e.color}`,
|
|
59554
59589
|
children: [
|
|
59555
|
-
/* @__PURE__ */ Y(
|
|
59590
|
+
/* @__PURE__ */ Y(RU, {
|
|
59556
59591
|
className: "onboarding-item-label",
|
|
59557
59592
|
children: e.label
|
|
59558
59593
|
}),
|
|
@@ -59562,7 +59597,7 @@ function RU({ items: e = LU }) {
|
|
|
59562
59597
|
}),
|
|
59563
59598
|
/* @__PURE__ */ Y("div", {
|
|
59564
59599
|
className: "onboarding-item-footer",
|
|
59565
|
-
children: /* @__PURE__ */ Y(
|
|
59600
|
+
children: /* @__PURE__ */ Y(RU, {
|
|
59566
59601
|
className: "onboarding-item-sub",
|
|
59567
59602
|
children: e.sub
|
|
59568
59603
|
})
|
|
@@ -59575,7 +59610,7 @@ function RU({ items: e = LU }) {
|
|
|
59575
59610
|
}
|
|
59576
59611
|
//#endregion
|
|
59577
59612
|
//#region src/pages/Modules/LegacyAdminPage.jsx
|
|
59578
|
-
var { Text:
|
|
59613
|
+
var { Text: VU, Title: HU } = Ya, UU = [
|
|
59579
59614
|
{
|
|
59580
59615
|
group: "Dashboard",
|
|
59581
59616
|
items: [{
|
|
@@ -59790,7 +59825,7 @@ var { Text: zU, Title: BU } = Ya, VU = [
|
|
|
59790
59825
|
}
|
|
59791
59826
|
]
|
|
59792
59827
|
}
|
|
59793
|
-
],
|
|
59828
|
+
], WU = [
|
|
59794
59829
|
{
|
|
59795
59830
|
label: "Sourced",
|
|
59796
59831
|
count: 312,
|
|
@@ -59821,7 +59856,7 @@ var { Text: zU, Title: BU } = Ya, VU = [
|
|
|
59821
59856
|
color: "#E24B4A",
|
|
59822
59857
|
pct: 10
|
|
59823
59858
|
}
|
|
59824
|
-
],
|
|
59859
|
+
], GU = [
|
|
59825
59860
|
{
|
|
59826
59861
|
name: "Tcs",
|
|
59827
59862
|
jobs: 14,
|
|
@@ -59842,7 +59877,7 @@ var { Text: zU, Title: BU } = Ya, VU = [
|
|
|
59842
59877
|
jobs: 5,
|
|
59843
59878
|
candidates: 38
|
|
59844
59879
|
}
|
|
59845
|
-
],
|
|
59880
|
+
], KU = [
|
|
59846
59881
|
{
|
|
59847
59882
|
text: "New candidate Ravi Kumar added to Java Developer role",
|
|
59848
59883
|
time: "2 min ago",
|
|
@@ -59869,7 +59904,7 @@ var { Text: zU, Title: BU } = Ya, VU = [
|
|
|
59869
59904
|
color: "#E24B4A"
|
|
59870
59905
|
}
|
|
59871
59906
|
];
|
|
59872
|
-
function
|
|
59907
|
+
function qU() {
|
|
59873
59908
|
return /* @__PURE__ */ X("div", {
|
|
59874
59909
|
style: {
|
|
59875
59910
|
display: "flex",
|
|
@@ -59882,11 +59917,11 @@ function GU() {
|
|
|
59882
59917
|
title: "Admin Dashboard",
|
|
59883
59918
|
children: [
|
|
59884
59919
|
/* @__PURE__ */ Y("div", { className: "admin-accent-bar" }),
|
|
59885
|
-
/* @__PURE__ */ Y(
|
|
59920
|
+
/* @__PURE__ */ Y(HU, {
|
|
59886
59921
|
level: 5,
|
|
59887
59922
|
children: "Admin Dashboard"
|
|
59888
59923
|
}),
|
|
59889
|
-
/* @__PURE__ */ Y(
|
|
59924
|
+
/* @__PURE__ */ Y(VU, {
|
|
59890
59925
|
type: "secondary",
|
|
59891
59926
|
children: "Overview of jobs, candidates, onboarding and recent activity"
|
|
59892
59927
|
})
|
|
@@ -59894,7 +59929,7 @@ function GU() {
|
|
|
59894
59929
|
}),
|
|
59895
59930
|
/* @__PURE__ */ Y("div", {
|
|
59896
59931
|
className: "admin-dashboard-stats",
|
|
59897
|
-
children: /* @__PURE__ */ Y(
|
|
59932
|
+
children: /* @__PURE__ */ Y(tU, { stats: [
|
|
59898
59933
|
{
|
|
59899
59934
|
label: "Total Jobs",
|
|
59900
59935
|
value: 1697,
|
|
@@ -59924,18 +59959,18 @@ function GU() {
|
|
|
59924
59959
|
}),
|
|
59925
59960
|
/* @__PURE__ */ X("div", {
|
|
59926
59961
|
className: "admin-dashboard-mid-row",
|
|
59927
|
-
children: [/* @__PURE__ */ Y(
|
|
59962
|
+
children: [/* @__PURE__ */ Y(BU, {}), /* @__PURE__ */ X(wj, {
|
|
59928
59963
|
icon: /* @__PURE__ */ Y(to, {}),
|
|
59929
59964
|
title: "Candidate Pipeline",
|
|
59930
59965
|
children: [
|
|
59931
|
-
/* @__PURE__ */ Y(
|
|
59966
|
+
/* @__PURE__ */ Y(VU, {
|
|
59932
59967
|
type: "secondary",
|
|
59933
59968
|
style: { fontSize: 12 },
|
|
59934
59969
|
children: "By stage (892 total)"
|
|
59935
59970
|
}),
|
|
59936
59971
|
/* @__PURE__ */ Y("div", {
|
|
59937
59972
|
className: "admin-pipeline-bar",
|
|
59938
|
-
children:
|
|
59973
|
+
children: WU.map((e) => /* @__PURE__ */ Y("div", {
|
|
59939
59974
|
className: "admin-pipeline-seg",
|
|
59940
59975
|
style: {
|
|
59941
59976
|
width: `${e.pct}%`,
|
|
@@ -59945,7 +59980,7 @@ function GU() {
|
|
|
59945
59980
|
}),
|
|
59946
59981
|
/* @__PURE__ */ Y("div", {
|
|
59947
59982
|
className: "admin-pipeline-legend",
|
|
59948
|
-
children:
|
|
59983
|
+
children: WU.map((e) => /* @__PURE__ */ X("div", {
|
|
59949
59984
|
className: "admin-pipeline-legend-item",
|
|
59950
59985
|
children: [
|
|
59951
59986
|
/* @__PURE__ */ Y("span", {
|
|
@@ -59959,7 +59994,7 @@ function GU() {
|
|
|
59959
59994
|
}, e.label))
|
|
59960
59995
|
}),
|
|
59961
59996
|
/* @__PURE__ */ Y("div", { className: "admin-divider" }),
|
|
59962
|
-
/* @__PURE__ */ Y(
|
|
59997
|
+
/* @__PURE__ */ Y(VU, {
|
|
59963
59998
|
strong: !0,
|
|
59964
59999
|
style: { fontSize: 12 },
|
|
59965
60000
|
children: "Submission status"
|
|
@@ -59970,7 +60005,7 @@ function GU() {
|
|
|
59970
60005
|
children: [
|
|
59971
60006
|
/* @__PURE__ */ X("div", {
|
|
59972
60007
|
className: "admin-sub-status-item",
|
|
59973
|
-
children: [/* @__PURE__ */ Y(
|
|
60008
|
+
children: [/* @__PURE__ */ Y(VU, {
|
|
59974
60009
|
style: { fontSize: 13 },
|
|
59975
60010
|
children: "Pending client review"
|
|
59976
60011
|
}), /* @__PURE__ */ Y("span", {
|
|
@@ -59980,7 +60015,7 @@ function GU() {
|
|
|
59980
60015
|
}),
|
|
59981
60016
|
/* @__PURE__ */ X("div", {
|
|
59982
60017
|
className: "admin-sub-status-item",
|
|
59983
|
-
children: [/* @__PURE__ */ Y(
|
|
60018
|
+
children: [/* @__PURE__ */ Y(VU, {
|
|
59984
60019
|
style: { fontSize: 13 },
|
|
59985
60020
|
children: "Client approved"
|
|
59986
60021
|
}), /* @__PURE__ */ Y("span", {
|
|
@@ -59990,7 +60025,7 @@ function GU() {
|
|
|
59990
60025
|
}),
|
|
59991
60026
|
/* @__PURE__ */ X("div", {
|
|
59992
60027
|
className: "admin-sub-status-item",
|
|
59993
|
-
children: [/* @__PURE__ */ Y(
|
|
60028
|
+
children: [/* @__PURE__ */ Y(VU, {
|
|
59994
60029
|
style: { fontSize: 13 },
|
|
59995
60030
|
children: "Rejected"
|
|
59996
60031
|
}), /* @__PURE__ */ Y("span", {
|
|
@@ -60013,7 +60048,7 @@ function GU() {
|
|
|
60013
60048
|
size: "small",
|
|
60014
60049
|
children: "View all"
|
|
60015
60050
|
}),
|
|
60016
|
-
children:
|
|
60051
|
+
children: GU.map((e) => /* @__PURE__ */ X("div", {
|
|
60017
60052
|
className: "admin-client-row",
|
|
60018
60053
|
children: [/* @__PURE__ */ X("div", {
|
|
60019
60054
|
className: "admin-client-left",
|
|
@@ -60041,7 +60076,7 @@ function GU() {
|
|
|
60041
60076
|
}), /* @__PURE__ */ Y(wj, {
|
|
60042
60077
|
icon: /* @__PURE__ */ Y(so, {}),
|
|
60043
60078
|
title: "Recent Activity",
|
|
60044
|
-
children:
|
|
60079
|
+
children: KU.map((e, t) => /* @__PURE__ */ X("div", {
|
|
60045
60080
|
className: "admin-activity-row",
|
|
60046
60081
|
children: [/* @__PURE__ */ Y("div", {
|
|
60047
60082
|
className: "admin-activity-dot",
|
|
@@ -60069,7 +60104,7 @@ function GU() {
|
|
|
60069
60104
|
children: [
|
|
60070
60105
|
/* @__PURE__ */ X(z, {
|
|
60071
60106
|
span: 8,
|
|
60072
|
-
children: [/* @__PURE__ */ Y(
|
|
60107
|
+
children: [/* @__PURE__ */ Y(VU, {
|
|
60073
60108
|
type: "secondary",
|
|
60074
60109
|
style: {
|
|
60075
60110
|
fontSize: 12,
|
|
@@ -60082,7 +60117,7 @@ function GU() {
|
|
|
60082
60117
|
["Templates", 2]
|
|
60083
60118
|
].map(([e, t]) => /* @__PURE__ */ X("div", {
|
|
60084
60119
|
className: "admin-cfg-overview-row",
|
|
60085
|
-
children: [/* @__PURE__ */ Y(
|
|
60120
|
+
children: [/* @__PURE__ */ Y(VU, {
|
|
60086
60121
|
style: { fontSize: 12 },
|
|
60087
60122
|
children: e
|
|
60088
60123
|
}), /* @__PURE__ */ X("span", {
|
|
@@ -60093,7 +60128,7 @@ function GU() {
|
|
|
60093
60128
|
}),
|
|
60094
60129
|
/* @__PURE__ */ X(z, {
|
|
60095
60130
|
span: 8,
|
|
60096
|
-
children: [/* @__PURE__ */ Y(
|
|
60131
|
+
children: [/* @__PURE__ */ Y(VU, {
|
|
60097
60132
|
type: "secondary",
|
|
60098
60133
|
style: {
|
|
60099
60134
|
fontSize: 12,
|
|
@@ -60106,7 +60141,7 @@ function GU() {
|
|
|
60106
60141
|
["Submissions", 2]
|
|
60107
60142
|
].map(([e, t]) => /* @__PURE__ */ X("div", {
|
|
60108
60143
|
className: "admin-cfg-overview-row",
|
|
60109
|
-
children: [/* @__PURE__ */ Y(
|
|
60144
|
+
children: [/* @__PURE__ */ Y(VU, {
|
|
60110
60145
|
style: { fontSize: 12 },
|
|
60111
60146
|
children: e
|
|
60112
60147
|
}), /* @__PURE__ */ X("span", {
|
|
@@ -60117,7 +60152,7 @@ function GU() {
|
|
|
60117
60152
|
}),
|
|
60118
60153
|
/* @__PURE__ */ X(z, {
|
|
60119
60154
|
span: 8,
|
|
60120
|
-
children: [/* @__PURE__ */ Y(
|
|
60155
|
+
children: [/* @__PURE__ */ Y(VU, {
|
|
60121
60156
|
type: "secondary",
|
|
60122
60157
|
style: {
|
|
60123
60158
|
fontSize: 12,
|
|
@@ -60130,10 +60165,10 @@ function GU() {
|
|
|
60130
60165
|
["Config Items", 19]
|
|
60131
60166
|
].map(([e, t]) => /* @__PURE__ */ X("div", {
|
|
60132
60167
|
className: "admin-cfg-overview-row",
|
|
60133
|
-
children: [/* @__PURE__ */ Y(
|
|
60168
|
+
children: [/* @__PURE__ */ Y(VU, {
|
|
60134
60169
|
style: { fontSize: 12 },
|
|
60135
60170
|
children: e
|
|
60136
|
-
}), /* @__PURE__ */ Y(
|
|
60171
|
+
}), /* @__PURE__ */ Y(VU, {
|
|
60137
60172
|
strong: !0,
|
|
60138
60173
|
style: { fontSize: 12 },
|
|
60139
60174
|
children: t
|
|
@@ -60146,7 +60181,7 @@ function GU() {
|
|
|
60146
60181
|
]
|
|
60147
60182
|
});
|
|
60148
60183
|
}
|
|
60149
|
-
function
|
|
60184
|
+
function JU({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r, setSearchText: i, allItems: a, handleNav: o }) {
|
|
60150
60185
|
return /* @__PURE__ */ X(za, {
|
|
60151
60186
|
gutter: [16, 16],
|
|
60152
60187
|
children: [
|
|
@@ -60165,11 +60200,11 @@ function KU({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
60165
60200
|
}),
|
|
60166
60201
|
children: [
|
|
60167
60202
|
/* @__PURE__ */ Y("div", { className: "admin-accent-bar" }),
|
|
60168
|
-
/* @__PURE__ */ Y(
|
|
60203
|
+
/* @__PURE__ */ Y(HU, {
|
|
60169
60204
|
level: 5,
|
|
60170
60205
|
children: e?.heading
|
|
60171
60206
|
}),
|
|
60172
|
-
/* @__PURE__ */ Y(
|
|
60207
|
+
/* @__PURE__ */ Y(VU, {
|
|
60173
60208
|
type: "secondary",
|
|
60174
60209
|
children: e?.desc
|
|
60175
60210
|
})
|
|
@@ -60183,7 +60218,7 @@ function KU({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
60183
60218
|
children: /* @__PURE__ */ Y(wj, {
|
|
60184
60219
|
icon: /* @__PURE__ */ Y(to, {}),
|
|
60185
60220
|
title: "Configuration Items",
|
|
60186
|
-
extra: /* @__PURE__ */ X(
|
|
60221
|
+
extra: /* @__PURE__ */ X(VU, {
|
|
60187
60222
|
type: "secondary",
|
|
60188
60223
|
children: [
|
|
60189
60224
|
n.length,
|
|
@@ -60250,7 +60285,7 @@ function KU({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
60250
60285
|
title: "Section Overview",
|
|
60251
60286
|
children: [/* @__PURE__ */ Y("div", {
|
|
60252
60287
|
className: "admin-overview-list",
|
|
60253
|
-
children:
|
|
60288
|
+
children: UU.filter((e) => e.group !== "Dashboard").map((e) => {
|
|
60254
60289
|
let n = e.group === t?.group;
|
|
60255
60290
|
return /* @__PURE__ */ X("div", {
|
|
60256
60291
|
className: `admin-overview-item${n ? " active" : ""}`,
|
|
@@ -60298,12 +60333,12 @@ function KU({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
60298
60333
|
]
|
|
60299
60334
|
});
|
|
60300
60335
|
}
|
|
60301
|
-
function
|
|
60302
|
-
let [e, t] = L("dashboard"), [n, r] = L(""), i = I(() =>
|
|
60336
|
+
function YU() {
|
|
60337
|
+
let [e, t] = L("dashboard"), [n, r] = L(""), i = I(() => UU.flatMap((e) => e.items), []), a = I(() => i.find((t) => t.id === e), [i, e]), o = I(() => UU.find((t) => t.items.some((t) => t.id === e)), [e]), s = I(() => {
|
|
60303
60338
|
if (!a?.cards) return [];
|
|
60304
60339
|
let e = n.trim().toLowerCase();
|
|
60305
60340
|
return e ? a.cards.filter((t) => t.label.toLowerCase().includes(e) || t.desc.toLowerCase().includes(e)) : a.cards;
|
|
60306
|
-
}, [a, n]), c = I(() =>
|
|
60341
|
+
}, [a, n]), c = I(() => UU.map((e) => ({
|
|
60307
60342
|
key: e.group,
|
|
60308
60343
|
type: "group",
|
|
60309
60344
|
label: e.group,
|
|
@@ -60352,7 +60387,7 @@ function qU() {
|
|
|
60352
60387
|
children: "Groups"
|
|
60353
60388
|
}), /* @__PURE__ */ Y("span", {
|
|
60354
60389
|
className: "admin-sidebar-pill-value",
|
|
60355
|
-
children:
|
|
60390
|
+
children: UU.length
|
|
60356
60391
|
})]
|
|
60357
60392
|
})
|
|
60358
60393
|
}), /* @__PURE__ */ Y(z, {
|
|
@@ -60382,7 +60417,7 @@ function qU() {
|
|
|
60382
60417
|
xs: 24,
|
|
60383
60418
|
lg: 18,
|
|
60384
60419
|
xl: 19,
|
|
60385
|
-
children: e === "dashboard" ? /* @__PURE__ */ Y(
|
|
60420
|
+
children: e === "dashboard" ? /* @__PURE__ */ Y(qU, {}) : a?.component === "form-groups" ? /* @__PURE__ */ Y(qN, {}) : a?.component === "detail-groups" ? /* @__PURE__ */ Y(kP, {}) : a?.component === "row-actions" ? /* @__PURE__ */ Y(yF, {}) : a?.component === "users" ? /* @__PURE__ */ Y(aU, {}) : a?.component === "teams" ? /* @__PURE__ */ Y(dU, {}) : a?.component === "roles" ? /* @__PURE__ */ Y(kU, {}) : a?.component === "permissions" ? /* @__PURE__ */ Y(IU, {}) : a?.component === "templates" ? /* @__PURE__ */ Y(jF, {}) : a?.component === "ai-services" ? /* @__PURE__ */ Y(RF, {}) : a?.component === "bgc-integration" ? /* @__PURE__ */ Y(WF, {}) : /* @__PURE__ */ Y(JU, {
|
|
60386
60421
|
activeSection: a,
|
|
60387
60422
|
activeGroup: o,
|
|
60388
60423
|
filteredCards: s,
|
|
@@ -60397,8 +60432,8 @@ function qU() {
|
|
|
60397
60432
|
}
|
|
60398
60433
|
//#endregion
|
|
60399
60434
|
//#region src/pages/stickyNotesFullPage.jsx
|
|
60400
|
-
var { Title:
|
|
60401
|
-
function
|
|
60435
|
+
var { Title: XU } = Ya;
|
|
60436
|
+
function ZU() {
|
|
60402
60437
|
let e = sc(), { state: t } = oc(), n = t?.moduleName || "stickyNotes", r = t?.title || "Sticky Notes", i = {
|
|
60403
60438
|
...t?.request,
|
|
60404
60439
|
params: {
|
|
@@ -60423,7 +60458,7 @@ function YU() {
|
|
|
60423
60458
|
}
|
|
60424
60459
|
//#endregion
|
|
60425
60460
|
//#region src/pages/BulkUpload/index.jsx
|
|
60426
|
-
var { Text:
|
|
60461
|
+
var { Text: QU, Title: $U } = Ya, eW = 10485760, tW = "/templates/test_cases_flow_template.base64.txt", nW = "test_cases_flow_template.xlsx", rW = "module | subModule | step_order | description | actions | key | value | expected | scenario", iW = {
|
|
60427
60462
|
idle: 0,
|
|
60428
60463
|
module_set: 1,
|
|
60429
60464
|
encoding: 1,
|
|
@@ -60432,7 +60467,7 @@ var { Text: XU, Title: ZU } = Ya, QU = 10485760, $U = "/templates/test_cases_flo
|
|
|
60432
60467
|
inserting: 3,
|
|
60433
60468
|
done: 4,
|
|
60434
60469
|
error: 1
|
|
60435
|
-
},
|
|
60470
|
+
}, aW = [
|
|
60436
60471
|
{
|
|
60437
60472
|
label: "Home",
|
|
60438
60473
|
href: "/"
|
|
@@ -60446,31 +60481,31 @@ var { Text: XU, Title: ZU } = Ya, QU = 10485760, $U = "/templates/test_cases_flo
|
|
|
60446
60481
|
href: "/bulk-upload"
|
|
60447
60482
|
}
|
|
60448
60483
|
];
|
|
60449
|
-
function
|
|
60484
|
+
function oW(e) {
|
|
60450
60485
|
return new Promise((t, n) => {
|
|
60451
60486
|
let r = new FileReader();
|
|
60452
60487
|
r.onload = () => t(String(r.result).split(",")[1]), r.onerror = n, r.readAsDataURL(e);
|
|
60453
60488
|
});
|
|
60454
60489
|
}
|
|
60455
|
-
function
|
|
60490
|
+
function sW(e) {
|
|
60456
60491
|
return e.filter((e) => e.row_status === "valid").map((e) => {
|
|
60457
60492
|
let t = { ...e };
|
|
60458
60493
|
return delete t.row_status, delete t.errors, t;
|
|
60459
60494
|
});
|
|
60460
60495
|
}
|
|
60461
|
-
function
|
|
60496
|
+
function cW(e) {
|
|
60462
60497
|
return e.flatMap((e) => (e.errors ?? []).map((t) => ({
|
|
60463
60498
|
id: e.id,
|
|
60464
60499
|
...t
|
|
60465
60500
|
})));
|
|
60466
60501
|
}
|
|
60467
|
-
function
|
|
60502
|
+
function lW({ errors: e }) {
|
|
60468
60503
|
return /* @__PURE__ */ Y("div", {
|
|
60469
60504
|
className: "bulk-tooltip-errors",
|
|
60470
60505
|
children: (e ?? []).map((e, t) => /* @__PURE__ */ Y("div", { children: e.message }, `${e.field}-${t}`))
|
|
60471
60506
|
});
|
|
60472
60507
|
}
|
|
60473
|
-
function
|
|
60508
|
+
function uW({ errors: e, expanded: t, onToggle: n, onSummaryClick: r }) {
|
|
60474
60509
|
return e.length === 0 ? null : /* @__PURE__ */ X("div", {
|
|
60475
60510
|
className: "bulk-error-banner",
|
|
60476
60511
|
children: [/* @__PURE__ */ X("div", {
|
|
@@ -60501,7 +60536,7 @@ function cW({ errors: e, expanded: t, onToggle: n, onSummaryClick: r }) {
|
|
|
60501
60536
|
})]
|
|
60502
60537
|
});
|
|
60503
60538
|
}
|
|
60504
|
-
function
|
|
60539
|
+
function dW({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, saving: a, firstInvalidRowId: o, firstInvalidRowRef: s }) {
|
|
60505
60540
|
let c = e.filter((e) => e.row_status === "invalid"), l = t === "errors" ? c : e, u = c.length > 0 || a;
|
|
60506
60541
|
return /* @__PURE__ */ X(J, { children: [
|
|
60507
60542
|
/* @__PURE__ */ X(za, {
|
|
@@ -60517,7 +60552,7 @@ function lW({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
60517
60552
|
type: t === "errors" ? "primary" : "default",
|
|
60518
60553
|
onClick: () => n("errors"),
|
|
60519
60554
|
children: "Errors only"
|
|
60520
|
-
})] }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ X(
|
|
60555
|
+
})] }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ X(QU, {
|
|
60521
60556
|
type: "secondary",
|
|
60522
60557
|
children: [e.length, " row(s)"]
|
|
60523
60558
|
}) })]
|
|
@@ -60589,7 +60624,7 @@ function lW({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
60589
60624
|
children: "Valid"
|
|
60590
60625
|
}) }),
|
|
60591
60626
|
/* @__PURE__ */ Y("td", { children: n ? /* @__PURE__ */ Y(K, {
|
|
60592
|
-
title: /* @__PURE__ */ Y(
|
|
60627
|
+
title: /* @__PURE__ */ Y(lW, { errors: t }),
|
|
60593
60628
|
placement: "left",
|
|
60594
60629
|
children: /* @__PURE__ */ X("button", {
|
|
60595
60630
|
type: "button",
|
|
@@ -60626,11 +60661,11 @@ function lW({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
60626
60661
|
})
|
|
60627
60662
|
] });
|
|
60628
60663
|
}
|
|
60629
|
-
function
|
|
60664
|
+
function fW() {
|
|
60630
60665
|
let e = sc(), t = I(() => y(), []), n = pa(null), r = pa(null), [i, a] = L([]), [o, s] = L(""), [c, l] = L("idle"), [u, d] = L(!1), [f, p] = L(null), [m, h] = L([]), [g, _] = L("all"), [v, b] = L(null), [x, S] = L(null), [C, w] = L(!1), T = i.map((e) => ({
|
|
60631
60666
|
value: e.modulename,
|
|
60632
60667
|
label: e.modulename
|
|
60633
|
-
})), E =
|
|
60668
|
+
})), E = cW(m), D = c === "encoding" || c === "validating", O = !!o && !D, k = iW[c] ?? 0, ee = m.find((e) => e.row_status === "invalid")?.id, A = la(() => {
|
|
60634
60669
|
s(""), l("idle"), d(!1), p(null), h([]), _("all"), b(null), S(null), n.current && (n.current.value = "");
|
|
60635
60670
|
}, []);
|
|
60636
60671
|
F(() => {
|
|
@@ -60656,7 +60691,7 @@ function uW() {
|
|
|
60656
60691
|
l("module_set"), b({ message: "Invalid file type. Please upload an Excel .xlsx or CSV .csv file." });
|
|
60657
60692
|
return;
|
|
60658
60693
|
}
|
|
60659
|
-
if (e.size >
|
|
60694
|
+
if (e.size > eW) {
|
|
60660
60695
|
l("module_set"), b({ message: "File must be 10 MB or smaller." });
|
|
60661
60696
|
return;
|
|
60662
60697
|
}
|
|
@@ -60665,7 +60700,7 @@ function uW() {
|
|
|
60665
60700
|
size: e.size
|
|
60666
60701
|
}), l("encoding");
|
|
60667
60702
|
try {
|
|
60668
|
-
let r = await
|
|
60703
|
+
let r = await oW(e);
|
|
60669
60704
|
l("validating");
|
|
60670
60705
|
let i = await CA({
|
|
60671
60706
|
filename: e.name,
|
|
@@ -60683,12 +60718,12 @@ function uW() {
|
|
|
60683
60718
|
}
|
|
60684
60719
|
}, M = async () => {
|
|
60685
60720
|
try {
|
|
60686
|
-
let e = await fetch(
|
|
60721
|
+
let e = await fetch(tW);
|
|
60687
60722
|
if (!e.ok) throw Error(`Template file not found (${e.status})`);
|
|
60688
60723
|
let t = (await e.text()).trim(), n = atob(t), r = new Uint8Array(n.length);
|
|
60689
60724
|
for (let e = 0; e < n.length; e += 1) r[e] = n.charCodeAt(e);
|
|
60690
60725
|
let i = new Blob([r], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
60691
|
-
o.href = a, o.download =
|
|
60726
|
+
o.href = a, o.download = nW, document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(a), q.success("Sample template downloaded.");
|
|
60692
60727
|
} catch (e) {
|
|
60693
60728
|
console.error(e), q.error("Unable to download sample template.");
|
|
60694
60729
|
}
|
|
@@ -60699,7 +60734,7 @@ function uW() {
|
|
|
60699
60734
|
project: t?.name ?? "",
|
|
60700
60735
|
module: o,
|
|
60701
60736
|
uploaded_by: localStorage.getItem("user_Email") ?? "",
|
|
60702
|
-
rows:
|
|
60737
|
+
rows: sW(m)
|
|
60703
60738
|
});
|
|
60704
60739
|
S(n), l("done"), q.success("Bulk upload saved. Redirecting to view test cases..."), window.setTimeout(() => e("/viewTestCase"), 900);
|
|
60705
60740
|
} catch (e) {
|
|
@@ -60726,7 +60761,7 @@ function uW() {
|
|
|
60726
60761
|
align: "middle",
|
|
60727
60762
|
justify: "space-between",
|
|
60728
60763
|
className: "breadcrumb-action-wrapper",
|
|
60729
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items:
|
|
60764
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items: aW }) }), t?.name && /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(QU, {
|
|
60730
60765
|
strong: !0,
|
|
60731
60766
|
children: t.name
|
|
60732
60767
|
}) })]
|
|
@@ -60735,16 +60770,16 @@ function uW() {
|
|
|
60735
60770
|
children: [
|
|
60736
60771
|
/* @__PURE__ */ X("div", {
|
|
60737
60772
|
className: "bulk-header",
|
|
60738
|
-
children: [/* @__PURE__ */ Y(
|
|
60773
|
+
children: [/* @__PURE__ */ Y($U, {
|
|
60739
60774
|
level: 3,
|
|
60740
60775
|
children: "Bulk upload test cases"
|
|
60741
60776
|
}), /* @__PURE__ */ X(U, {
|
|
60742
60777
|
direction: "vertical",
|
|
60743
60778
|
size: 4,
|
|
60744
|
-
children: [/* @__PURE__ */ Y(
|
|
60779
|
+
children: [/* @__PURE__ */ Y(QU, {
|
|
60745
60780
|
type: "secondary",
|
|
60746
|
-
children:
|
|
60747
|
-
}), /* @__PURE__ */ Y(
|
|
60781
|
+
children: rW
|
|
60782
|
+
}), /* @__PURE__ */ Y(QU, {
|
|
60748
60783
|
type: "secondary",
|
|
60749
60784
|
children: "Use the sample template for the required columns. Uploaded rows are saved as Active by default."
|
|
60750
60785
|
})]
|
|
@@ -60842,7 +60877,7 @@ function uW() {
|
|
|
60842
60877
|
className: "v1-card zt-fall",
|
|
60843
60878
|
title: "3. Validation result",
|
|
60844
60879
|
children: [
|
|
60845
|
-
/* @__PURE__ */ Y(
|
|
60880
|
+
/* @__PURE__ */ Y(uW, {
|
|
60846
60881
|
errors: E,
|
|
60847
60882
|
expanded: C,
|
|
60848
60883
|
onToggle: () => w((e) => !e),
|
|
@@ -60854,7 +60889,7 @@ function uW() {
|
|
|
60854
60889
|
message: v.message,
|
|
60855
60890
|
className: "bulk-inline-alert"
|
|
60856
60891
|
}),
|
|
60857
|
-
/* @__PURE__ */ Y(
|
|
60892
|
+
/* @__PURE__ */ Y(dW, {
|
|
60858
60893
|
rows: m,
|
|
60859
60894
|
view: g,
|
|
60860
60895
|
onViewChange: _,
|
|
@@ -60877,17 +60912,17 @@ function uW() {
|
|
|
60877
60912
|
/* @__PURE__ */ Y(z, {
|
|
60878
60913
|
xs: 24,
|
|
60879
60914
|
md: 8,
|
|
60880
|
-
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(
|
|
60915
|
+
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(QU, { children: "Total" }), /* @__PURE__ */ Y("strong", { children: m.length })] })
|
|
60881
60916
|
}),
|
|
60882
60917
|
/* @__PURE__ */ Y(z, {
|
|
60883
60918
|
xs: 24,
|
|
60884
60919
|
md: 8,
|
|
60885
|
-
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(
|
|
60920
|
+
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(QU, { children: "Inserted" }), /* @__PURE__ */ Y("strong", { children: x.inserted ?? 0 })] })
|
|
60886
60921
|
}),
|
|
60887
60922
|
/* @__PURE__ */ Y(z, {
|
|
60888
60923
|
xs: 24,
|
|
60889
60924
|
md: 8,
|
|
60890
|
-
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(
|
|
60925
|
+
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(QU, { children: "Failed" }), /* @__PURE__ */ Y("strong", { children: x.failed ?? 0 })] })
|
|
60891
60926
|
})
|
|
60892
60927
|
]
|
|
60893
60928
|
}),
|
|
@@ -60911,7 +60946,7 @@ function uW() {
|
|
|
60911
60946
|
}
|
|
60912
60947
|
//#endregion
|
|
60913
60948
|
//#region src/services/dropdownValues/testPageValues.js
|
|
60914
|
-
var
|
|
60949
|
+
var pW = [
|
|
60915
60950
|
{
|
|
60916
60951
|
value: "navigate",
|
|
60917
60952
|
label: "Navigate"
|
|
@@ -61044,75 +61079,75 @@ var dW = [
|
|
|
61044
61079
|
value: "wait_for_text",
|
|
61045
61080
|
label: "Wait For Text"
|
|
61046
61081
|
}
|
|
61047
|
-
], { Text:
|
|
61082
|
+
], { Text: mW } = Ya, hW = [{
|
|
61048
61083
|
label: "Home",
|
|
61049
61084
|
href: "/"
|
|
61050
61085
|
}, {
|
|
61051
61086
|
label: "Test Cases",
|
|
61052
61087
|
href: "/test-cases"
|
|
61053
|
-
}],
|
|
61088
|
+
}], gW = {
|
|
61054
61089
|
tags: "regression",
|
|
61055
61090
|
active: 1
|
|
61056
|
-
},
|
|
61091
|
+
}, _W = { module: {
|
|
61057
61092
|
dbName: "Modules",
|
|
61058
61093
|
formField: "module",
|
|
61059
61094
|
label: "Module"
|
|
61060
61095
|
} };
|
|
61061
|
-
function
|
|
61096
|
+
function vW(e = []) {
|
|
61062
61097
|
return e.map((e) => ({
|
|
61063
61098
|
value: e,
|
|
61064
61099
|
label: e
|
|
61065
61100
|
}));
|
|
61066
61101
|
}
|
|
61067
|
-
function
|
|
61102
|
+
function yW(e = "") {
|
|
61068
61103
|
return String(e ?? "").trim();
|
|
61069
61104
|
}
|
|
61070
|
-
function
|
|
61071
|
-
return
|
|
61105
|
+
function bW(e = "") {
|
|
61106
|
+
return yW(e).toLowerCase();
|
|
61072
61107
|
}
|
|
61073
|
-
function
|
|
61108
|
+
function xW(e = []) {
|
|
61074
61109
|
let t = /* @__PURE__ */ new Map();
|
|
61075
61110
|
return e.forEach((e) => {
|
|
61076
|
-
let n =
|
|
61111
|
+
let n = yW(e?.flow), r = n.toLowerCase();
|
|
61077
61112
|
n && !t.has(r) && t.set(r, n);
|
|
61078
61113
|
}), Array.from(t.values()).map((e) => ({
|
|
61079
61114
|
value: e,
|
|
61080
61115
|
label: e
|
|
61081
61116
|
}));
|
|
61082
61117
|
}
|
|
61083
|
-
function
|
|
61084
|
-
let r =
|
|
61118
|
+
function SW(e = [], t, n) {
|
|
61119
|
+
let r = yW(t).toLowerCase(), i = yW(n).toLowerCase();
|
|
61085
61120
|
return e.reduce((e, t) => {
|
|
61086
|
-
let n =
|
|
61121
|
+
let n = yW(t?.module).toLowerCase(), a = yW(t?.flow).toLowerCase();
|
|
61087
61122
|
if (n !== r || a !== i) return e;
|
|
61088
61123
|
let o = Number(t?.step_order) || 0;
|
|
61089
61124
|
return Math.max(e, o);
|
|
61090
61125
|
}, 0) + 1;
|
|
61091
61126
|
}
|
|
61092
|
-
function
|
|
61127
|
+
function CW({ icon: e, title: t }) {
|
|
61093
61128
|
return /* @__PURE__ */ X(U, {
|
|
61094
61129
|
size: 10,
|
|
61095
61130
|
align: "center",
|
|
61096
61131
|
children: [/* @__PURE__ */ Y("div", {
|
|
61097
61132
|
className: "v1-section-icon-box",
|
|
61098
61133
|
children: e
|
|
61099
|
-
}), /* @__PURE__ */ Y(
|
|
61134
|
+
}), /* @__PURE__ */ Y(mW, {
|
|
61100
61135
|
strong: !0,
|
|
61101
61136
|
className: "v1-section-label",
|
|
61102
61137
|
children: t
|
|
61103
61138
|
})]
|
|
61104
61139
|
});
|
|
61105
61140
|
}
|
|
61106
|
-
function
|
|
61141
|
+
function wW() {
|
|
61107
61142
|
let [e] = B.useForm(), [t] = B.useForm(), [n, r] = L([]), [i, a] = L([]), [o, s] = L([]), [c, l] = L(!1), [u, d] = L(!1), [f, p] = L({
|
|
61108
61143
|
open: !1,
|
|
61109
61144
|
typeKey: "module"
|
|
61110
|
-
}), [m, h] = L(!1), [g, _] = L(!1), [v, y] = L(!1), b = sc(), x =
|
|
61145
|
+
}), [m, h] = L(!1), [g, _] = L(!1), [v, y] = L(!1), b = sc(), x = _W[f.typeKey], S = I(() => vW(n), [n]), C = B.useWatch("module", e), w = B.useWatch("flow", e), T = !!yW(C), E = !!yW(w), D = !T, O = !T || !E, k = (e, t = []) => {
|
|
61111
61146
|
e === "module" && r(t);
|
|
61112
61147
|
}, ee = async () => {
|
|
61113
61148
|
l(!0);
|
|
61114
61149
|
try {
|
|
61115
|
-
let e = await vA(
|
|
61150
|
+
let e = await vA(_W.module.dbName);
|
|
61116
61151
|
r(e?.items ?? []);
|
|
61117
61152
|
} catch (e) {
|
|
61118
61153
|
console.error("Unable to load testing options:", e), q.error("Unable to load testing options.");
|
|
@@ -61120,7 +61155,7 @@ function SW() {
|
|
|
61120
61155
|
l(!1);
|
|
61121
61156
|
}
|
|
61122
61157
|
}, A = la(async (t) => {
|
|
61123
|
-
let n =
|
|
61158
|
+
let n = yW(t);
|
|
61124
61159
|
if (a([]), s([]), e.setFieldsValue({ step_order: void 0 }), n) {
|
|
61125
61160
|
d(!0);
|
|
61126
61161
|
try {
|
|
@@ -61129,7 +61164,7 @@ function SW() {
|
|
|
61129
61164
|
offset: 0,
|
|
61130
61165
|
module: n
|
|
61131
61166
|
}), t = Array.isArray(e?.items) ? e.items : [];
|
|
61132
|
-
a(t), s(
|
|
61167
|
+
a(t), s(xW(t));
|
|
61133
61168
|
} catch (e) {
|
|
61134
61169
|
console.error("Unable to load flows:", e), q.error("Unable to load flows.");
|
|
61135
61170
|
} finally {
|
|
@@ -61137,14 +61172,14 @@ function SW() {
|
|
|
61137
61172
|
}
|
|
61138
61173
|
}
|
|
61139
61174
|
}, [e]), j = la(async (t, n, r) => {
|
|
61140
|
-
let i =
|
|
61175
|
+
let i = yW(t), a = yW(n);
|
|
61141
61176
|
if (!i || !a) {
|
|
61142
61177
|
e.setFieldsValue({ step_order: void 0 });
|
|
61143
61178
|
return;
|
|
61144
61179
|
}
|
|
61145
61180
|
_(!0);
|
|
61146
61181
|
try {
|
|
61147
|
-
e.setFieldsValue({ step_order:
|
|
61182
|
+
e.setFieldsValue({ step_order: SW(r, i, a) });
|
|
61148
61183
|
} catch (e) {
|
|
61149
61184
|
console.error("Unable to load step order:", e), q.error("Unable to load step order.");
|
|
61150
61185
|
} finally {
|
|
@@ -61165,15 +61200,15 @@ function SW() {
|
|
|
61165
61200
|
]);
|
|
61166
61201
|
let te = async (t) => {
|
|
61167
61202
|
let n = {
|
|
61168
|
-
module:
|
|
61169
|
-
flow:
|
|
61203
|
+
module: yW(t.module),
|
|
61204
|
+
flow: yW(t.flow),
|
|
61170
61205
|
step_order: Number(t.step_order),
|
|
61171
|
-
description:
|
|
61172
|
-
keyword:
|
|
61173
|
-
target:
|
|
61174
|
-
value:
|
|
61175
|
-
expected:
|
|
61176
|
-
tags: t.tags ?
|
|
61206
|
+
description: yW(t.description),
|
|
61207
|
+
keyword: bW(t.keyword),
|
|
61208
|
+
target: yW(t.target),
|
|
61209
|
+
value: yW(t.value),
|
|
61210
|
+
expected: yW(t.expected),
|
|
61211
|
+
tags: t.tags ? yW(t.tags) : gW.tags,
|
|
61177
61212
|
active: Number(t.active)
|
|
61178
61213
|
};
|
|
61179
61214
|
y(!0);
|
|
@@ -61185,26 +61220,26 @@ function SW() {
|
|
|
61185
61220
|
y(!1);
|
|
61186
61221
|
}
|
|
61187
61222
|
}, M = (t, n) => {
|
|
61188
|
-
e.setFieldsValue({ [t]:
|
|
61223
|
+
e.setFieldsValue({ [t]: yW(n) });
|
|
61189
61224
|
}, ne = (t) => {
|
|
61190
61225
|
e.setFieldsValue({
|
|
61191
|
-
module:
|
|
61226
|
+
module: yW(t),
|
|
61192
61227
|
flow: void 0,
|
|
61193
61228
|
step_order: void 0,
|
|
61194
61229
|
keyword: void 0,
|
|
61195
61230
|
description: void 0,
|
|
61196
61231
|
target: void 0,
|
|
61197
|
-
tags:
|
|
61232
|
+
tags: gW.tags,
|
|
61198
61233
|
value: void 0,
|
|
61199
61234
|
expected: void 0
|
|
61200
61235
|
});
|
|
61201
61236
|
}, re = (t) => {
|
|
61202
61237
|
e.setFieldsValue({
|
|
61203
|
-
flow:
|
|
61238
|
+
flow: yW(t),
|
|
61204
61239
|
step_order: void 0
|
|
61205
61240
|
});
|
|
61206
61241
|
}, ie = (e) => {
|
|
61207
|
-
let n =
|
|
61242
|
+
let n = _W[e];
|
|
61208
61243
|
p({
|
|
61209
61244
|
open: !0,
|
|
61210
61245
|
typeKey: e
|
|
@@ -61219,7 +61254,7 @@ function SW() {
|
|
|
61219
61254
|
})), t.resetFields();
|
|
61220
61255
|
}, ae = async () => {
|
|
61221
61256
|
try {
|
|
61222
|
-
let n =
|
|
61257
|
+
let n = yW((await t.validateFields()).name), r = await yA({
|
|
61223
61258
|
name: n,
|
|
61224
61259
|
type: x.dbName
|
|
61225
61260
|
});
|
|
@@ -61237,7 +61272,7 @@ function SW() {
|
|
|
61237
61272
|
align: "middle",
|
|
61238
61273
|
justify: "space-between",
|
|
61239
61274
|
className: "breadcrumb-action-wrapper",
|
|
61240
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items:
|
|
61275
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items: hW }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(R, {
|
|
61241
61276
|
type: "link",
|
|
61242
61277
|
onClick: () => b("/zinnext-home"),
|
|
61243
61278
|
children: "View Table"
|
|
@@ -61252,7 +61287,7 @@ function SW() {
|
|
|
61252
61287
|
children: /* @__PURE__ */ X(U, {
|
|
61253
61288
|
align: "center",
|
|
61254
61289
|
size: 10,
|
|
61255
|
-
children: [/* @__PURE__ */ Y(ys, { className: "v1-outer-icon" }), /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(
|
|
61290
|
+
children: [/* @__PURE__ */ Y(ys, { className: "v1-outer-icon" }), /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(mW, {
|
|
61256
61291
|
strong: !0,
|
|
61257
61292
|
style: { fontSize: 16 },
|
|
61258
61293
|
children: "Add Test Case"
|
|
@@ -61268,16 +61303,16 @@ function SW() {
|
|
|
61268
61303
|
className: "v1-required-mark",
|
|
61269
61304
|
children: " *"
|
|
61270
61305
|
})] }),
|
|
61271
|
-
initialValues:
|
|
61306
|
+
initialValues: gW,
|
|
61272
61307
|
onFinish: te,
|
|
61273
61308
|
autoComplete: "off",
|
|
61274
61309
|
children: [/* @__PURE__ */ Y(ya, {
|
|
61275
61310
|
className: "v1-card",
|
|
61276
|
-
title: /* @__PURE__ */ Y(
|
|
61311
|
+
title: /* @__PURE__ */ Y(CW, {
|
|
61277
61312
|
icon: /* @__PURE__ */ Y(Ko, {}),
|
|
61278
61313
|
title: "Test Case Details"
|
|
61279
61314
|
}),
|
|
61280
|
-
extra: /* @__PURE__ */ Y(
|
|
61315
|
+
extra: /* @__PURE__ */ Y(mW, {
|
|
61281
61316
|
type: "secondary",
|
|
61282
61317
|
className: "v1-card-subtitle",
|
|
61283
61318
|
children: "Module, flow, step order and execution data"
|
|
@@ -61354,8 +61389,8 @@ function SW() {
|
|
|
61354
61389
|
disabled: O,
|
|
61355
61390
|
optionFilterProp: "label",
|
|
61356
61391
|
placeholder: "Select action",
|
|
61357
|
-
options:
|
|
61358
|
-
onChange: (t) => e.setFieldsValue({ keyword:
|
|
61392
|
+
options: pW,
|
|
61393
|
+
onChange: (t) => e.setFieldsValue({ keyword: bW(t) })
|
|
61359
61394
|
})
|
|
61360
61395
|
})
|
|
61361
61396
|
}),
|
|
@@ -61475,7 +61510,7 @@ function SW() {
|
|
|
61475
61510
|
maxLength: 100,
|
|
61476
61511
|
placeholder: `Enter ${x.label.toLowerCase()} name`,
|
|
61477
61512
|
onBlur: (e) => {
|
|
61478
|
-
t.setFieldsValue({ name:
|
|
61513
|
+
t.setFieldsValue({ name: yW(e.target.value) });
|
|
61479
61514
|
}
|
|
61480
61515
|
})
|
|
61481
61516
|
}), /* @__PURE__ */ Y(B.Item, {
|
|
@@ -61492,23 +61527,23 @@ function SW() {
|
|
|
61492
61527
|
}
|
|
61493
61528
|
//#endregion
|
|
61494
61529
|
//#region src/pages/TestingPage/ZinnextTestForm.jsx
|
|
61495
|
-
var { Text:
|
|
61530
|
+
var { Text: TW } = Ya, EW = [{
|
|
61496
61531
|
label: "Home",
|
|
61497
61532
|
href: "/"
|
|
61498
61533
|
}, {
|
|
61499
61534
|
label: "Test Cases",
|
|
61500
61535
|
href: "/addTestCase"
|
|
61501
61536
|
}];
|
|
61502
|
-
function
|
|
61537
|
+
function DW(e = "") {
|
|
61503
61538
|
return String(e ?? "").trim();
|
|
61504
61539
|
}
|
|
61505
|
-
function
|
|
61540
|
+
function OW(e = [], t) {
|
|
61506
61541
|
return e.map((e) => ({
|
|
61507
61542
|
value: e.id,
|
|
61508
61543
|
label: e[t]
|
|
61509
61544
|
}));
|
|
61510
61545
|
}
|
|
61511
|
-
var
|
|
61546
|
+
var kW = [
|
|
61512
61547
|
{
|
|
61513
61548
|
label: "Step",
|
|
61514
61549
|
value: "step_order",
|
|
@@ -61547,22 +61582,22 @@ var DW = [
|
|
|
61547
61582
|
children: "Negative"
|
|
61548
61583
|
})
|
|
61549
61584
|
}
|
|
61550
|
-
],
|
|
61585
|
+
], AW = {
|
|
61551
61586
|
key: !1,
|
|
61552
61587
|
value: !1,
|
|
61553
61588
|
expected: !1
|
|
61554
61589
|
};
|
|
61555
|
-
function
|
|
61556
|
-
return t ? e[t] ??
|
|
61590
|
+
function jW(e, t) {
|
|
61591
|
+
return t ? e[t] ?? AW : AW;
|
|
61557
61592
|
}
|
|
61558
|
-
function
|
|
61593
|
+
function MW(e, t) {
|
|
61559
61594
|
e.setFields(t.map((e) => ({
|
|
61560
61595
|
name: e,
|
|
61561
61596
|
errors: []
|
|
61562
61597
|
})));
|
|
61563
61598
|
}
|
|
61564
|
-
function
|
|
61565
|
-
let [e] = B.useForm(), t = sc(), [n] = lc(), r = n.get("edit"), i = !!r, a = I(() => y(), []), [o, s] = L([]), [c, l] = L([]), [u, d] = L([]), [f, p] = L(
|
|
61599
|
+
function NW() {
|
|
61600
|
+
let [e] = B.useForm(), t = sc(), [n] = lc(), r = n.get("edit"), i = !!r, a = I(() => y(), []), [o, s] = L([]), [c, l] = L([]), [u, d] = L([]), [f, p] = L(pW), [m, h] = L({}), [g, _] = L(!1), [v, b] = L(!1), [x, S] = L(!1), [C, w] = L(!1), [T, E] = L(!1), D = B.useWatch("module", e), O = B.useWatch("submodule", e), k = B.useWatch("actions", e), ee = !!D, A = !!O, j = I(() => jW(m, k), [m, k]), te = I(() => OW(o, "modulename"), [o]), M = I(() => OW(c, "submodulename"), [c]), ne = I(() => o.find((e) => e.id === D)?.modulename ?? "", [o, D]), re = I(() => c.find((e) => e.id === O)?.submodulename ?? "", [O, c]), ie = la(async () => {
|
|
61566
61601
|
try {
|
|
61567
61602
|
let e = await bA();
|
|
61568
61603
|
Array.isArray(e?.options) && e.options.length > 0 && p(e.options), e?.rules && typeof e.rules == "object" && h(e.rules);
|
|
@@ -61708,10 +61743,10 @@ function jW() {
|
|
|
61708
61743
|
align: "middle",
|
|
61709
61744
|
justify: "space-between",
|
|
61710
61745
|
className: "breadcrumb-action-wrapper",
|
|
61711
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items:
|
|
61746
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items: EW }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ X(U, {
|
|
61712
61747
|
size: 6,
|
|
61713
61748
|
className: "zt-section-title",
|
|
61714
|
-
children: [/* @__PURE__ */ Y(bs, {}), /* @__PURE__ */ Y(
|
|
61749
|
+
children: [/* @__PURE__ */ Y(bs, {}), /* @__PURE__ */ Y(TW, {
|
|
61715
61750
|
strong: !0,
|
|
61716
61751
|
children: a.name
|
|
61717
61752
|
})]
|
|
@@ -61732,11 +61767,11 @@ function jW() {
|
|
|
61732
61767
|
product_parent_ID: Number(a?.id),
|
|
61733
61768
|
module_parent_ID: Number(n.module),
|
|
61734
61769
|
submodule_parent_ID: Number(n.submodule),
|
|
61735
|
-
description:
|
|
61736
|
-
actions:
|
|
61737
|
-
key:
|
|
61738
|
-
value:
|
|
61739
|
-
expected:
|
|
61770
|
+
description: DW(n.description),
|
|
61771
|
+
actions: DW(n.actions),
|
|
61772
|
+
key: DW(n.key),
|
|
61773
|
+
value: DW(n.value),
|
|
61774
|
+
expected: DW(n.expected),
|
|
61740
61775
|
scenario: +!!n.scenario,
|
|
61741
61776
|
active: +!!n.active
|
|
61742
61777
|
};
|
|
@@ -61802,7 +61837,7 @@ function jW() {
|
|
|
61802
61837
|
key: void 0,
|
|
61803
61838
|
value: void 0,
|
|
61804
61839
|
expected: void 0
|
|
61805
|
-
}),
|
|
61840
|
+
}), MW(e, [
|
|
61806
61841
|
"actions",
|
|
61807
61842
|
"key",
|
|
61808
61843
|
"value",
|
|
@@ -61833,7 +61868,7 @@ function jW() {
|
|
|
61833
61868
|
key: void 0,
|
|
61834
61869
|
value: void 0,
|
|
61835
61870
|
expected: void 0
|
|
61836
|
-
}),
|
|
61871
|
+
}), MW(e, [
|
|
61837
61872
|
"actions",
|
|
61838
61873
|
"key",
|
|
61839
61874
|
"value",
|
|
@@ -61887,7 +61922,7 @@ function jW() {
|
|
|
61887
61922
|
/* @__PURE__ */ Y("span", { children: "Step Details" })
|
|
61888
61923
|
]
|
|
61889
61924
|
}),
|
|
61890
|
-
extra: /* @__PURE__ */ X(
|
|
61925
|
+
extra: /* @__PURE__ */ X(TW, {
|
|
61891
61926
|
type: "secondary",
|
|
61892
61927
|
children: [
|
|
61893
61928
|
ne,
|
|
@@ -61927,13 +61962,13 @@ function jW() {
|
|
|
61927
61962
|
placeholder: "Select action",
|
|
61928
61963
|
options: f,
|
|
61929
61964
|
onChange: (t) => {
|
|
61930
|
-
let n =
|
|
61965
|
+
let n = jW(m, t);
|
|
61931
61966
|
e.setFieldsValue({
|
|
61932
61967
|
actions: t,
|
|
61933
61968
|
key: n.key ? e.getFieldValue("key") : void 0,
|
|
61934
61969
|
value: n.value ? e.getFieldValue("value") : void 0,
|
|
61935
61970
|
expected: n.expected ? e.getFieldValue("expected") : void 0
|
|
61936
|
-
}),
|
|
61971
|
+
}), MW(e, [
|
|
61937
61972
|
"key",
|
|
61938
61973
|
"value",
|
|
61939
61974
|
"expected"
|
|
@@ -62042,7 +62077,7 @@ function jW() {
|
|
|
62042
62077
|
children: /* @__PURE__ */ Y(Ow, {
|
|
62043
62078
|
listName: "Added Steps",
|
|
62044
62079
|
loading: x,
|
|
62045
|
-
fields:
|
|
62080
|
+
fields: kW,
|
|
62046
62081
|
dataSource: u,
|
|
62047
62082
|
current: 1,
|
|
62048
62083
|
pageSize: Math.max(u.length, 1),
|
|
@@ -62058,7 +62093,7 @@ function jW() {
|
|
|
62058
62093
|
}
|
|
62059
62094
|
//#endregion
|
|
62060
62095
|
//#region src/pages/TestingPage/ManageModules.jsx
|
|
62061
|
-
var { Text:
|
|
62096
|
+
var { Text: PW } = Ya, FW = [
|
|
62062
62097
|
{
|
|
62063
62098
|
label: "Home",
|
|
62064
62099
|
href: "/"
|
|
@@ -62072,7 +62107,7 @@ var { Text: MW } = Ya, NW = [
|
|
|
62072
62107
|
href: "/manageModules"
|
|
62073
62108
|
}
|
|
62074
62109
|
];
|
|
62075
|
-
function
|
|
62110
|
+
function IW() {
|
|
62076
62111
|
let e = sc(), t = I(() => y(), []), [n, r] = L([]), [i, a] = L({}), [o, s] = L(!1), [c, l] = L(!1), [u, d] = L(""), [f, p] = L(!1), [m, h] = L(1), [g, _] = L(10), v = la(async (e) => {
|
|
62077
62112
|
if (!e) {
|
|
62078
62113
|
r([]);
|
|
@@ -62140,7 +62175,7 @@ function PW() {
|
|
|
62140
62175
|
align: "middle",
|
|
62141
62176
|
justify: "space-between",
|
|
62142
62177
|
className: "breadcrumb-action-wrapper",
|
|
62143
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items:
|
|
62178
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items: FW }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(R, {
|
|
62144
62179
|
type: "link",
|
|
62145
62180
|
onClick: () => e("/addTestCase"),
|
|
62146
62181
|
children: "Back to Form"
|
|
@@ -62160,7 +62195,7 @@ function PW() {
|
|
|
62160
62195
|
children: [
|
|
62161
62196
|
/* @__PURE__ */ Y(bs, {}),
|
|
62162
62197
|
/* @__PURE__ */ Y("span", { children: "Project:" }),
|
|
62163
|
-
/* @__PURE__ */ Y(
|
|
62198
|
+
/* @__PURE__ */ Y(PW, {
|
|
62164
62199
|
strong: !0,
|
|
62165
62200
|
children: t.name
|
|
62166
62201
|
})
|
|
@@ -62236,7 +62271,7 @@ function PW() {
|
|
|
62236
62271
|
children: /* @__PURE__ */ X(U, {
|
|
62237
62272
|
direction: "vertical",
|
|
62238
62273
|
className: "zt-modal-stack",
|
|
62239
|
-
children: [/* @__PURE__ */ X(
|
|
62274
|
+
children: [/* @__PURE__ */ X(PW, {
|
|
62240
62275
|
type: "secondary",
|
|
62241
62276
|
children: ["Project: ", /* @__PURE__ */ Y("b", { children: t.name })]
|
|
62242
62277
|
}), /* @__PURE__ */ Y(V, {
|
|
@@ -62253,7 +62288,7 @@ function PW() {
|
|
|
62253
62288
|
}
|
|
62254
62289
|
//#endregion
|
|
62255
62290
|
//#region src/pages/TestingPage/ManageSubmodules.jsx
|
|
62256
|
-
var { Text:
|
|
62291
|
+
var { Text: LW } = Ya, RW = [
|
|
62257
62292
|
{
|
|
62258
62293
|
label: "Home",
|
|
62259
62294
|
href: "/"
|
|
@@ -62271,7 +62306,7 @@ var { Text: FW } = Ya, IW = [
|
|
|
62271
62306
|
href: "/test-cases/zinnext/submodules"
|
|
62272
62307
|
}
|
|
62273
62308
|
];
|
|
62274
|
-
function
|
|
62309
|
+
function zW() {
|
|
62275
62310
|
let e = sc(), [t] = lc(), n = I(() => y(), []), r = t.get("module") ?? "", [i, a] = L([]), [o, s] = L(!1), [c, l] = L(!1), [u, d] = L(""), [f, p] = L(!1), [m, h] = L(1), [g, _] = L(10), v = la(async (e, t) => {
|
|
62276
62311
|
if (!e || !t) {
|
|
62277
62312
|
a([]);
|
|
@@ -62341,7 +62376,7 @@ function LW() {
|
|
|
62341
62376
|
align: "middle",
|
|
62342
62377
|
justify: "space-between",
|
|
62343
62378
|
className: "breadcrumb-action-wrapper",
|
|
62344
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items:
|
|
62379
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items: RW }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(R, {
|
|
62345
62380
|
type: "link",
|
|
62346
62381
|
onClick: () => e("/manageModules"),
|
|
62347
62382
|
children: "Back to Modules"
|
|
@@ -62364,7 +62399,7 @@ function LW() {
|
|
|
62364
62399
|
children: [
|
|
62365
62400
|
/* @__PURE__ */ Y(bs, {}),
|
|
62366
62401
|
/* @__PURE__ */ Y("span", { children: "Project:" }),
|
|
62367
|
-
/* @__PURE__ */ Y(
|
|
62402
|
+
/* @__PURE__ */ Y(LW, {
|
|
62368
62403
|
strong: !0,
|
|
62369
62404
|
children: n.name
|
|
62370
62405
|
})
|
|
@@ -62374,7 +62409,7 @@ function LW() {
|
|
|
62374
62409
|
children: [
|
|
62375
62410
|
/* @__PURE__ */ Y(to, {}),
|
|
62376
62411
|
/* @__PURE__ */ Y("span", { children: "Module:" }),
|
|
62377
|
-
/* @__PURE__ */ Y(
|
|
62412
|
+
/* @__PURE__ */ Y(LW, {
|
|
62378
62413
|
strong: !0,
|
|
62379
62414
|
children: r
|
|
62380
62415
|
})
|
|
@@ -62437,7 +62472,7 @@ function LW() {
|
|
|
62437
62472
|
children: /* @__PURE__ */ X(U, {
|
|
62438
62473
|
direction: "vertical",
|
|
62439
62474
|
className: "zt-modal-stack",
|
|
62440
|
-
children: [/* @__PURE__ */ X(
|
|
62475
|
+
children: [/* @__PURE__ */ X(LW, {
|
|
62441
62476
|
type: "secondary",
|
|
62442
62477
|
children: [
|
|
62443
62478
|
"Project: ",
|
|
@@ -62459,7 +62494,7 @@ function LW() {
|
|
|
62459
62494
|
}
|
|
62460
62495
|
//#endregion
|
|
62461
62496
|
//#region src/pages/TestingPage/ZinnextTableView.jsx
|
|
62462
|
-
var { Text:
|
|
62497
|
+
var { Text: BW } = Ya, VW = [
|
|
62463
62498
|
{
|
|
62464
62499
|
label: "Home",
|
|
62465
62500
|
href: "/"
|
|
@@ -62473,7 +62508,7 @@ var { Text: RW } = Ya, zW = [
|
|
|
62473
62508
|
href: "/viewTestCase"
|
|
62474
62509
|
}
|
|
62475
62510
|
];
|
|
62476
|
-
function
|
|
62511
|
+
function HW() {
|
|
62477
62512
|
let e = sc(), [t, n] = L([]), [r, i] = L(0), [a, o] = L(!1), s = I(() => y(), []), [c, l] = L(""), [u, d] = L(1), [f, p] = L(20), [m, h] = L(null), g = la(async (e = {}) => {
|
|
62478
62513
|
o(!0);
|
|
62479
62514
|
try {
|
|
@@ -62533,7 +62568,7 @@ function BW() {
|
|
|
62533
62568
|
align: "middle",
|
|
62534
62569
|
justify: "space-between",
|
|
62535
62570
|
className: "breadcrumb-action-wrapper",
|
|
62536
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items:
|
|
62571
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items: VW }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(R, {
|
|
62537
62572
|
type: "link",
|
|
62538
62573
|
onClick: () => e("/addTestCase"),
|
|
62539
62574
|
children: "Back to Form"
|
|
@@ -62547,7 +62582,7 @@ function BW() {
|
|
|
62547
62582
|
className: "zt-section-title",
|
|
62548
62583
|
children: [/* @__PURE__ */ Y(zs, {}), /* @__PURE__ */ Y("span", { children: "Test Flows" })]
|
|
62549
62584
|
}),
|
|
62550
|
-
extra: /* @__PURE__ */ X(
|
|
62585
|
+
extra: /* @__PURE__ */ X(BW, {
|
|
62551
62586
|
type: "secondary",
|
|
62552
62587
|
children: [r, " row(s)"]
|
|
62553
62588
|
}),
|
|
@@ -62701,17 +62736,17 @@ function BW() {
|
|
|
62701
62736
|
}
|
|
62702
62737
|
//#endregion
|
|
62703
62738
|
//#region src/pages/TestingPage/testHomePage.jsx
|
|
62704
|
-
var
|
|
62739
|
+
var UW = [{
|
|
62705
62740
|
label: "Home",
|
|
62706
62741
|
href: "/"
|
|
62707
62742
|
}, {
|
|
62708
62743
|
label: "Test Cases",
|
|
62709
62744
|
href: "/test-cases"
|
|
62710
62745
|
}];
|
|
62711
|
-
function
|
|
62746
|
+
function WW() {
|
|
62712
62747
|
return /* @__PURE__ */ X("main", {
|
|
62713
62748
|
className: "jobs-list-page",
|
|
62714
|
-
children: [/* @__PURE__ */ Y(fi, { items:
|
|
62749
|
+
children: [/* @__PURE__ */ Y(fi, { items: UW }), /* @__PURE__ */ Y(og, {
|
|
62715
62750
|
moduleName: "test-flows",
|
|
62716
62751
|
rowKey: "id"
|
|
62717
62752
|
})]
|
|
@@ -62719,85 +62754,85 @@ function HW() {
|
|
|
62719
62754
|
}
|
|
62720
62755
|
//#endregion
|
|
62721
62756
|
//#region src/pages/TestingPage/lms-test-form.jsx
|
|
62722
|
-
var { Text:
|
|
62757
|
+
var { Text: GW } = Ya, KW = [{
|
|
62723
62758
|
label: "Home",
|
|
62724
62759
|
href: "/"
|
|
62725
62760
|
}, {
|
|
62726
62761
|
label: "LMS Cases",
|
|
62727
62762
|
href: "/lms-cases"
|
|
62728
|
-
}],
|
|
62763
|
+
}], qW = {
|
|
62729
62764
|
tags: "regression",
|
|
62730
62765
|
active: 1
|
|
62731
|
-
},
|
|
62766
|
+
}, JW = { module: {
|
|
62732
62767
|
dbName: "Modules",
|
|
62733
62768
|
formField: "module",
|
|
62734
62769
|
label: "Module"
|
|
62735
|
-
} },
|
|
62770
|
+
} }, YW = {
|
|
62736
62771
|
key: !1,
|
|
62737
62772
|
value: !1,
|
|
62738
62773
|
expected: !1
|
|
62739
62774
|
};
|
|
62740
|
-
function
|
|
62741
|
-
return t ? e[t] ??
|
|
62775
|
+
function XW(e, t) {
|
|
62776
|
+
return t ? e[t] ?? YW : YW;
|
|
62742
62777
|
}
|
|
62743
|
-
function
|
|
62778
|
+
function ZW(e, t) {
|
|
62744
62779
|
e.setFields(t.map((e) => ({
|
|
62745
62780
|
name: e,
|
|
62746
62781
|
errors: []
|
|
62747
62782
|
})));
|
|
62748
62783
|
}
|
|
62749
|
-
function
|
|
62784
|
+
function QW(e = []) {
|
|
62750
62785
|
return e.map((e) => ({
|
|
62751
62786
|
value: e,
|
|
62752
62787
|
label: e
|
|
62753
62788
|
}));
|
|
62754
62789
|
}
|
|
62755
|
-
function
|
|
62790
|
+
function $W(e = "") {
|
|
62756
62791
|
return String(e ?? "").trim();
|
|
62757
62792
|
}
|
|
62758
|
-
function
|
|
62793
|
+
function eG(e = []) {
|
|
62759
62794
|
let t = /* @__PURE__ */ new Map();
|
|
62760
62795
|
return e.forEach((e) => {
|
|
62761
|
-
let n =
|
|
62796
|
+
let n = $W(e?.flow), r = n.toLowerCase();
|
|
62762
62797
|
n && !t.has(r) && t.set(r, n);
|
|
62763
62798
|
}), Array.from(t.values()).map((e) => ({
|
|
62764
62799
|
value: e,
|
|
62765
62800
|
label: e
|
|
62766
62801
|
}));
|
|
62767
62802
|
}
|
|
62768
|
-
function
|
|
62769
|
-
let r =
|
|
62803
|
+
function tG(e = [], t, n) {
|
|
62804
|
+
let r = $W(t).toLowerCase(), i = $W(n).toLowerCase();
|
|
62770
62805
|
return e.reduce((e, t) => {
|
|
62771
|
-
let n =
|
|
62806
|
+
let n = $W(t?.module).toLowerCase(), a = $W(t?.flow).toLowerCase();
|
|
62772
62807
|
if (n !== r || a !== i) return e;
|
|
62773
62808
|
let o = Number(t?.step_order) || 0;
|
|
62774
62809
|
return Math.max(e, o);
|
|
62775
62810
|
}, 0) + 1;
|
|
62776
62811
|
}
|
|
62777
|
-
function
|
|
62812
|
+
function nG({ icon: e, title: t }) {
|
|
62778
62813
|
return /* @__PURE__ */ X(U, {
|
|
62779
62814
|
size: 10,
|
|
62780
62815
|
align: "center",
|
|
62781
62816
|
children: [/* @__PURE__ */ Y("div", {
|
|
62782
62817
|
className: "v1-section-icon-box",
|
|
62783
62818
|
children: e
|
|
62784
|
-
}), /* @__PURE__ */ Y(
|
|
62819
|
+
}), /* @__PURE__ */ Y(GW, {
|
|
62785
62820
|
strong: !0,
|
|
62786
62821
|
className: "v1-section-label",
|
|
62787
62822
|
children: t
|
|
62788
62823
|
})]
|
|
62789
62824
|
});
|
|
62790
62825
|
}
|
|
62791
|
-
function
|
|
62792
|
-
let [e] = B.useForm(), [t] = B.useForm(), [n, r] = L([]), [i, a] = L([]), [o, s] = L([]), [c, l] = L(
|
|
62826
|
+
function rG() {
|
|
62827
|
+
let [e] = B.useForm(), [t] = B.useForm(), [n, r] = L([]), [i, a] = L([]), [o, s] = L([]), [c, l] = L(pW), [u, d] = L({}), [f, p] = L(!1), [m, h] = L(!1), [g, _] = L({
|
|
62793
62828
|
open: !1,
|
|
62794
62829
|
typeKey: "module"
|
|
62795
|
-
}), [v, y] = L(!1), [b, x] = L(!1), [S, C] = L(!1), w = sc(), T =
|
|
62830
|
+
}), [v, y] = L(!1), [b, x] = L(!1), [S, C] = L(!1), w = sc(), T = JW[g.typeKey], E = I(() => QW(n), [n]), D = B.useWatch("module", e), O = B.useWatch("flow", e), k = B.useWatch("keyword", e), ee = !!$W(D), A = !!$W(O), j = !ee, te = !ee || !A, M = I(() => XW(u, k), [u, k]), ne = (e, t = []) => {
|
|
62796
62831
|
e === "module" && r(t);
|
|
62797
62832
|
}, re = async () => {
|
|
62798
62833
|
p(!0);
|
|
62799
62834
|
try {
|
|
62800
|
-
let e = await vA(
|
|
62835
|
+
let e = await vA(JW.module.dbName);
|
|
62801
62836
|
r(e?.items ?? []);
|
|
62802
62837
|
} catch (e) {
|
|
62803
62838
|
console.error("Unable to load testing options:", e), q.error("Unable to load testing options.");
|
|
@@ -62812,7 +62847,7 @@ function tG() {
|
|
|
62812
62847
|
console.error("Unable to load action field rules:", e), q.error("Unable to load action validation rules.");
|
|
62813
62848
|
}
|
|
62814
62849
|
}, N = la(async (t) => {
|
|
62815
|
-
let n =
|
|
62850
|
+
let n = $W(t);
|
|
62816
62851
|
if (a([]), s([]), e.setFieldsValue({ step_order: void 0 }), n) {
|
|
62817
62852
|
h(!0);
|
|
62818
62853
|
try {
|
|
@@ -62821,7 +62856,7 @@ function tG() {
|
|
|
62821
62856
|
offset: 0,
|
|
62822
62857
|
module: n
|
|
62823
62858
|
}), t = Array.isArray(e?.items) ? e.items : [];
|
|
62824
|
-
a(t), s(
|
|
62859
|
+
a(t), s(eG(t));
|
|
62825
62860
|
} catch (e) {
|
|
62826
62861
|
console.error("Unable to load flows:", e), q.error("Unable to load flows.");
|
|
62827
62862
|
} finally {
|
|
@@ -62829,14 +62864,14 @@ function tG() {
|
|
|
62829
62864
|
}
|
|
62830
62865
|
}
|
|
62831
62866
|
}, [e]), ae = la(async (t, n, r) => {
|
|
62832
|
-
let i =
|
|
62867
|
+
let i = $W(t), a = $W(n);
|
|
62833
62868
|
if (!i || !a) {
|
|
62834
62869
|
e.setFieldsValue({ step_order: void 0 });
|
|
62835
62870
|
return;
|
|
62836
62871
|
}
|
|
62837
62872
|
x(!0);
|
|
62838
62873
|
try {
|
|
62839
|
-
e.setFieldsValue({ step_order:
|
|
62874
|
+
e.setFieldsValue({ step_order: tG(r, i, a) });
|
|
62840
62875
|
} catch (e) {
|
|
62841
62876
|
console.error("Unable to load step order:", e), q.error("Unable to load step order.");
|
|
62842
62877
|
} finally {
|
|
@@ -62859,15 +62894,15 @@ function tG() {
|
|
|
62859
62894
|
]);
|
|
62860
62895
|
let oe = async (t) => {
|
|
62861
62896
|
let n = {
|
|
62862
|
-
module:
|
|
62863
|
-
flow:
|
|
62897
|
+
module: $W(t.module),
|
|
62898
|
+
flow: $W(t.flow),
|
|
62864
62899
|
step_order: Number(t.step_order),
|
|
62865
|
-
description:
|
|
62866
|
-
keyword:
|
|
62867
|
-
target:
|
|
62868
|
-
value:
|
|
62869
|
-
expected:
|
|
62870
|
-
tags: t.tags ?
|
|
62900
|
+
description: $W(t.description),
|
|
62901
|
+
keyword: $W(t.keyword),
|
|
62902
|
+
target: $W(t.target),
|
|
62903
|
+
value: $W(t.value),
|
|
62904
|
+
expected: $W(t.expected),
|
|
62905
|
+
tags: t.tags ? $W(t.tags) : qW.tags,
|
|
62871
62906
|
active: Number(t.active)
|
|
62872
62907
|
};
|
|
62873
62908
|
C(!0);
|
|
@@ -62879,19 +62914,19 @@ function tG() {
|
|
|
62879
62914
|
C(!1);
|
|
62880
62915
|
}
|
|
62881
62916
|
}, se = (t, n) => {
|
|
62882
|
-
e.setFieldsValue({ [t]:
|
|
62917
|
+
e.setFieldsValue({ [t]: $W(n) });
|
|
62883
62918
|
}, ce = (t) => {
|
|
62884
62919
|
e.setFieldsValue({
|
|
62885
|
-
module:
|
|
62920
|
+
module: $W(t),
|
|
62886
62921
|
flow: void 0,
|
|
62887
62922
|
step_order: void 0,
|
|
62888
62923
|
keyword: void 0,
|
|
62889
62924
|
description: void 0,
|
|
62890
62925
|
target: void 0,
|
|
62891
|
-
tags:
|
|
62926
|
+
tags: qW.tags,
|
|
62892
62927
|
value: void 0,
|
|
62893
62928
|
expected: void 0
|
|
62894
|
-
}),
|
|
62929
|
+
}), ZW(e, [
|
|
62895
62930
|
"keyword",
|
|
62896
62931
|
"target",
|
|
62897
62932
|
"value",
|
|
@@ -62899,32 +62934,32 @@ function tG() {
|
|
|
62899
62934
|
]);
|
|
62900
62935
|
}, le = (t) => {
|
|
62901
62936
|
e.setFieldsValue({
|
|
62902
|
-
flow:
|
|
62937
|
+
flow: $W(t),
|
|
62903
62938
|
step_order: void 0,
|
|
62904
62939
|
keyword: void 0,
|
|
62905
62940
|
target: void 0,
|
|
62906
62941
|
value: void 0,
|
|
62907
62942
|
expected: void 0
|
|
62908
|
-
}),
|
|
62943
|
+
}), ZW(e, [
|
|
62909
62944
|
"keyword",
|
|
62910
62945
|
"target",
|
|
62911
62946
|
"value",
|
|
62912
62947
|
"expected"
|
|
62913
62948
|
]);
|
|
62914
62949
|
}, ue = (t) => {
|
|
62915
|
-
let n =
|
|
62950
|
+
let n = XW(u, t);
|
|
62916
62951
|
e.setFieldsValue({
|
|
62917
|
-
keyword:
|
|
62952
|
+
keyword: $W(t),
|
|
62918
62953
|
target: n.key ? e.getFieldValue("target") : void 0,
|
|
62919
62954
|
value: n.value ? e.getFieldValue("value") : void 0,
|
|
62920
62955
|
expected: n.expected ? e.getFieldValue("expected") : void 0
|
|
62921
|
-
}),
|
|
62956
|
+
}), ZW(e, [
|
|
62922
62957
|
"target",
|
|
62923
62958
|
"value",
|
|
62924
62959
|
"expected"
|
|
62925
62960
|
]);
|
|
62926
62961
|
}, de = (e) => {
|
|
62927
|
-
let n =
|
|
62962
|
+
let n = JW[e];
|
|
62928
62963
|
_({
|
|
62929
62964
|
open: !0,
|
|
62930
62965
|
typeKey: e
|
|
@@ -62939,7 +62974,7 @@ function tG() {
|
|
|
62939
62974
|
})), t.resetFields();
|
|
62940
62975
|
}, pe = async () => {
|
|
62941
62976
|
try {
|
|
62942
|
-
let n =
|
|
62977
|
+
let n = $W((await t.validateFields()).name), r = await yA({
|
|
62943
62978
|
name: n,
|
|
62944
62979
|
type: T.dbName
|
|
62945
62980
|
});
|
|
@@ -62957,7 +62992,7 @@ function tG() {
|
|
|
62957
62992
|
align: "middle",
|
|
62958
62993
|
justify: "space-between",
|
|
62959
62994
|
className: "breadcrumb-action-wrapper",
|
|
62960
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items:
|
|
62995
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(fi, { items: KW }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(R, {
|
|
62961
62996
|
type: "link",
|
|
62962
62997
|
onClick: () => w("/lms-home"),
|
|
62963
62998
|
children: "View Table"
|
|
@@ -62972,7 +63007,7 @@ function tG() {
|
|
|
62972
63007
|
children: /* @__PURE__ */ X(U, {
|
|
62973
63008
|
align: "center",
|
|
62974
63009
|
size: 10,
|
|
62975
|
-
children: [/* @__PURE__ */ Y(ys, { className: "v1-outer-icon" }), /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(
|
|
63010
|
+
children: [/* @__PURE__ */ Y(ys, { className: "v1-outer-icon" }), /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(GW, {
|
|
62976
63011
|
strong: !0,
|
|
62977
63012
|
style: { fontSize: 16 },
|
|
62978
63013
|
children: "Add LMS Case"
|
|
@@ -62988,16 +63023,16 @@ function tG() {
|
|
|
62988
63023
|
className: "v1-required-mark",
|
|
62989
63024
|
children: " *"
|
|
62990
63025
|
})] }),
|
|
62991
|
-
initialValues:
|
|
63026
|
+
initialValues: qW,
|
|
62992
63027
|
onFinish: oe,
|
|
62993
63028
|
autoComplete: "off",
|
|
62994
63029
|
children: [/* @__PURE__ */ Y(ya, {
|
|
62995
63030
|
className: "v1-card",
|
|
62996
|
-
title: /* @__PURE__ */ Y(
|
|
63031
|
+
title: /* @__PURE__ */ Y(nG, {
|
|
62997
63032
|
icon: /* @__PURE__ */ Y(Ko, {}),
|
|
62998
63033
|
title: "LMS Case Details"
|
|
62999
63034
|
}),
|
|
63000
|
-
extra: /* @__PURE__ */ Y(
|
|
63035
|
+
extra: /* @__PURE__ */ Y(GW, {
|
|
63001
63036
|
type: "secondary",
|
|
63002
63037
|
className: "v1-card-subtitle",
|
|
63003
63038
|
children: "Module, flow, step order and execution data"
|
|
@@ -63207,7 +63242,7 @@ function tG() {
|
|
|
63207
63242
|
maxLength: 100,
|
|
63208
63243
|
placeholder: `Enter ${T.label.toLowerCase()} name`,
|
|
63209
63244
|
onBlur: (e) => {
|
|
63210
|
-
t.setFieldsValue({ name:
|
|
63245
|
+
t.setFieldsValue({ name: $W(e.target.value) });
|
|
63211
63246
|
}
|
|
63212
63247
|
})
|
|
63213
63248
|
}), /* @__PURE__ */ Y(B.Item, {
|
|
@@ -63224,17 +63259,17 @@ function tG() {
|
|
|
63224
63259
|
}
|
|
63225
63260
|
//#endregion
|
|
63226
63261
|
//#region src/pages/TestingPage/lmsHomePage.jsx
|
|
63227
|
-
var
|
|
63262
|
+
var iG = [{
|
|
63228
63263
|
label: "Home",
|
|
63229
63264
|
href: "/"
|
|
63230
63265
|
}, {
|
|
63231
63266
|
label: "LMS Cases",
|
|
63232
63267
|
href: "/lms-cases"
|
|
63233
63268
|
}];
|
|
63234
|
-
function
|
|
63269
|
+
function aG() {
|
|
63235
63270
|
return /* @__PURE__ */ X("main", {
|
|
63236
63271
|
className: "jobs-list-page",
|
|
63237
|
-
children: [/* @__PURE__ */ Y(fi, { items:
|
|
63272
|
+
children: [/* @__PURE__ */ Y(fi, { items: iG }), /* @__PURE__ */ Y(og, {
|
|
63238
63273
|
moduleName: "lms-flows",
|
|
63239
63274
|
rowKey: "id"
|
|
63240
63275
|
})]
|
|
@@ -63242,7 +63277,7 @@ function rG() {
|
|
|
63242
63277
|
}
|
|
63243
63278
|
//#endregion
|
|
63244
63279
|
//#region src/services/mergedListApi.js
|
|
63245
|
-
var
|
|
63280
|
+
var oG = [
|
|
63246
63281
|
"referenceId",
|
|
63247
63282
|
"ReferenceId",
|
|
63248
63283
|
"candidateId",
|
|
@@ -63253,7 +63288,7 @@ var iG = [
|
|
|
63253
63288
|
"Id",
|
|
63254
63289
|
"_id"
|
|
63255
63290
|
];
|
|
63256
|
-
function
|
|
63291
|
+
function sG(e = oG) {
|
|
63257
63292
|
return function(t) {
|
|
63258
63293
|
if (!t || typeof t != "object") return "";
|
|
63259
63294
|
for (let n of e) {
|
|
@@ -63263,7 +63298,7 @@ function aG(e = iG) {
|
|
|
63263
63298
|
return "";
|
|
63264
63299
|
};
|
|
63265
63300
|
}
|
|
63266
|
-
function
|
|
63301
|
+
function cG(e, t = oG) {
|
|
63267
63302
|
if (!e || typeof e != "object") return [];
|
|
63268
63303
|
let n = [];
|
|
63269
63304
|
for (let r of t) {
|
|
@@ -63272,18 +63307,18 @@ function oG(e, t = iG) {
|
|
|
63272
63307
|
}
|
|
63273
63308
|
return n;
|
|
63274
63309
|
}
|
|
63275
|
-
var
|
|
63276
|
-
function
|
|
63277
|
-
return typeof e == "function" ? e : typeof e == "string" ?
|
|
63310
|
+
var lG = sG();
|
|
63311
|
+
function uG(e) {
|
|
63312
|
+
return typeof e == "function" ? e : typeof e == "string" ? sG([e]) : Array.isArray(e) ? sG(e) : lG;
|
|
63278
63313
|
}
|
|
63279
|
-
function
|
|
63314
|
+
function dG(e, t, n) {
|
|
63280
63315
|
return !t || typeof t != "object" ? e : {
|
|
63281
63316
|
...t,
|
|
63282
63317
|
...e,
|
|
63283
63318
|
id: e?.id ?? t?.id ?? n
|
|
63284
63319
|
};
|
|
63285
63320
|
}
|
|
63286
|
-
function
|
|
63321
|
+
function fG(e, t, n = {}) {
|
|
63287
63322
|
return {
|
|
63288
63323
|
status: "success",
|
|
63289
63324
|
total: t,
|
|
@@ -63293,7 +63328,7 @@ function uG(e, t, n = {}) {
|
|
|
63293
63328
|
}
|
|
63294
63329
|
};
|
|
63295
63330
|
}
|
|
63296
|
-
var
|
|
63331
|
+
var pG = [
|
|
63297
63332
|
"fields",
|
|
63298
63333
|
"fieldConfig",
|
|
63299
63334
|
"tabs",
|
|
@@ -63302,17 +63337,17 @@ var dG = [
|
|
|
63302
63337
|
"actions",
|
|
63303
63338
|
"columnActions"
|
|
63304
63339
|
];
|
|
63305
|
-
function
|
|
63340
|
+
function mG(e) {
|
|
63306
63341
|
let t = e?.data ?? e, n = {};
|
|
63307
|
-
for (let r of
|
|
63342
|
+
for (let r of pG) {
|
|
63308
63343
|
let i = e?.[r] ?? t?.[r];
|
|
63309
63344
|
i == null || Array.isArray(i) && i.length === 0 || (n[r] = i);
|
|
63310
63345
|
}
|
|
63311
63346
|
return n;
|
|
63312
63347
|
}
|
|
63313
|
-
var
|
|
63314
|
-
function
|
|
63315
|
-
let r = (Array.isArray(n) ? n : [n]).map(
|
|
63348
|
+
var hG = (e) => String(e ?? "").replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
63349
|
+
function gG(e, t, n) {
|
|
63350
|
+
let r = (Array.isArray(n) ? n : [n]).map(hG).filter(Boolean), i = r.length ? e.findIndex((e) => r.includes(hG(e?.value)) || r.includes(hG(e?.label))) : -1;
|
|
63316
63351
|
if (i === -1) return [...e, ...t];
|
|
63317
63352
|
let a = Number(e[i]?.order), o = Number.isFinite(a) ? t.map((e, n) => e.order == null || e.order === "" ? {
|
|
63318
63353
|
...e,
|
|
@@ -63324,31 +63359,31 @@ function mG(e, t, n) {
|
|
|
63324
63359
|
...e.slice(i + 1)
|
|
63325
63360
|
];
|
|
63326
63361
|
}
|
|
63327
|
-
var
|
|
63362
|
+
var _G = (e, t) => lp(e, t).rows, vG = (e, t) => {
|
|
63328
63363
|
let { rows: n, total: r } = lp(e, t);
|
|
63329
63364
|
return {
|
|
63330
63365
|
rows: n,
|
|
63331
63366
|
total: r
|
|
63332
63367
|
};
|
|
63333
63368
|
};
|
|
63334
|
-
function
|
|
63369
|
+
function yG(e, t) {
|
|
63335
63370
|
return function(n, r, i, a = {}) {
|
|
63336
63371
|
return e(t ?? n, r, i, a);
|
|
63337
63372
|
};
|
|
63338
63373
|
}
|
|
63339
|
-
function
|
|
63374
|
+
function bG(e) {
|
|
63340
63375
|
return !e || typeof e != "object" || typeof (e.fetchByKeys ?? e.fetch ?? e.function) != "function" ? null : {
|
|
63341
63376
|
...e,
|
|
63342
63377
|
fetchByKeys: typeof e.fetchByKeys == "function" ? e.fetchByKeys : null,
|
|
63343
63378
|
fetch: typeof e.fetch == "function" ? e.fetch : null,
|
|
63344
63379
|
function: typeof e.function == "function" ? e.function : null,
|
|
63345
|
-
extractRows: typeof e.extractRows == "function" ? e.extractRows :
|
|
63346
|
-
mergeRow: typeof e.mergeRow == "function" ? e.mergeRow :
|
|
63380
|
+
extractRows: typeof e.extractRows == "function" ? e.extractRows : _G,
|
|
63381
|
+
mergeRow: typeof e.mergeRow == "function" ? e.mergeRow : dG,
|
|
63347
63382
|
fetchById: typeof e.fetchById == "function" ? e.fetchById : null
|
|
63348
63383
|
};
|
|
63349
63384
|
}
|
|
63350
|
-
function
|
|
63351
|
-
return !e && !t && !r ? [] : [
|
|
63385
|
+
function xG({ fetchSecondaryByKeys: e, fetchSecondary: t, extractSecondaryRows: n, fetchSecondaryById: r, secondaryKey: i, mergeRow: a, secondaryFetchLimit: o }) {
|
|
63386
|
+
return !e && !t && !r ? [] : [bG({
|
|
63352
63387
|
key: i,
|
|
63353
63388
|
fetchByKeys: e ? (t, n, r) => e(t, n, r) : null,
|
|
63354
63389
|
function: t ? ({ moduleName: e, options: n }) => t(e, o, 0, n) : null,
|
|
@@ -63357,21 +63392,21 @@ function yG({ fetchSecondaryByKeys: e, fetchSecondary: t, extractSecondaryRows:
|
|
|
63357
63392
|
mergeRow: a
|
|
63358
63393
|
})].filter(Boolean);
|
|
63359
63394
|
}
|
|
63360
|
-
function
|
|
63395
|
+
function SG(e) {
|
|
63361
63396
|
if (typeof e == "function") return (t) => {
|
|
63362
63397
|
let n = e(t);
|
|
63363
63398
|
return n == null || n === "" ? [] : [String(n)];
|
|
63364
63399
|
};
|
|
63365
|
-
let t = typeof e == "string" ? [e] : Array.isArray(e) && e.length ? e :
|
|
63366
|
-
return (e) =>
|
|
63400
|
+
let t = typeof e == "string" ? [e] : Array.isArray(e) && e.length ? e : oG;
|
|
63401
|
+
return (e) => cG(e, t);
|
|
63367
63402
|
}
|
|
63368
|
-
function
|
|
63403
|
+
function CG(e, t) {
|
|
63369
63404
|
let n = /* @__PURE__ */ new Map();
|
|
63370
63405
|
return e.forEach((e) => {
|
|
63371
63406
|
for (let r of t(e)) n.has(r) || n.set(r, e);
|
|
63372
63407
|
}), n;
|
|
63373
63408
|
}
|
|
63374
|
-
function
|
|
63409
|
+
function wG({ moduleName: e, limit: t, offset: n, options: r, keys: i, primaryResponse: a, primaryRows: o, pageRows: s, total: c, source: l }) {
|
|
63375
63410
|
return {
|
|
63376
63411
|
moduleName: e,
|
|
63377
63412
|
limit: t,
|
|
@@ -63385,7 +63420,7 @@ function SG({ moduleName: e, limit: t, offset: n, options: r, keys: i, primaryRe
|
|
|
63385
63420
|
source: l
|
|
63386
63421
|
};
|
|
63387
63422
|
}
|
|
63388
|
-
async function
|
|
63423
|
+
async function TG(e, t) {
|
|
63389
63424
|
if (typeof e.args == "function") {
|
|
63390
63425
|
let n = e.args(t);
|
|
63391
63426
|
return (e.fetch ?? e.function ?? e.fetchByKeys)(...Array.isArray(n) ? n : [n]);
|
|
@@ -63395,8 +63430,8 @@ async function CG(e, t) {
|
|
|
63395
63430
|
let n = e.fetch ?? e.function;
|
|
63396
63431
|
return typeof n == "function" ? n(t) : null;
|
|
63397
63432
|
}
|
|
63398
|
-
function
|
|
63399
|
-
let h = Array.isArray(r) && r.length ? r.map(
|
|
63433
|
+
function EG({ fetchPrimaryPage: e, extractPrimaryPage: t = vG, fetchSecondaryByKeys: n, joinSources: r = [], fetchPrimary: i, extractPrimaryRows: a = _G, fetchSecondary: o, extractSecondaryRows: s = _G, fetchSecondaryById: c, primaryKey: l, secondaryKey: u, mergeRow: d = dG, secondaryFetchLimit: f = 200, extraFields: p = [], extraFieldsAfter: m }) {
|
|
63434
|
+
let h = Array.isArray(r) && r.length ? r.map(bG).filter(Boolean) : xG({
|
|
63400
63435
|
fetchSecondaryByKeys: n,
|
|
63401
63436
|
fetchSecondary: o,
|
|
63402
63437
|
extractSecondaryRows: s,
|
|
@@ -63416,7 +63451,7 @@ function wG({ fetchPrimaryPage: e, extractPrimaryPage: t = gG, fetchSecondaryByK
|
|
|
63416
63451
|
}
|
|
63417
63452
|
async function v(e, t, n, r, i) {
|
|
63418
63453
|
if (!n) return e;
|
|
63419
|
-
let a = t.extractRows(n, r) ?? [], o =
|
|
63454
|
+
let a = t.extractRows(n, r) ?? [], o = uG(t.primaryKey ?? l), s = SG(t.key), c = CG(a, s);
|
|
63420
63455
|
return Promise.all(e.map(async (e) => {
|
|
63421
63456
|
let n = o(e), a = c.get(n) ?? (i() ? null : await _(t, s, r, n));
|
|
63422
63457
|
return t.mergeRow(e, a, n);
|
|
@@ -63431,21 +63466,21 @@ function wG({ fetchPrimaryPage: e, extractPrimaryPage: t = gG, fetchSecondaryByK
|
|
|
63431
63466
|
let r = {};
|
|
63432
63467
|
for (let e of n) {
|
|
63433
63468
|
if (!e) continue;
|
|
63434
|
-
let t =
|
|
63469
|
+
let t = mG(e);
|
|
63435
63470
|
for (let e of Object.keys(t)) r[e] ?? (r[e] = t[e]);
|
|
63436
63471
|
}
|
|
63437
|
-
return p.length && (r.fields =
|
|
63472
|
+
return p.length && (r.fields = gG(r.fields ?? [], p, m)), fG(e, t, r);
|
|
63438
63473
|
}
|
|
63439
63474
|
async function x({ moduleName: e, limit: t, offset: n, options: r, primaryResponse: i, primaryRows: a, pageRows: o, total: s }) {
|
|
63440
63475
|
return Promise.all(h.map(async (c) => {
|
|
63441
63476
|
try {
|
|
63442
|
-
let u =
|
|
63477
|
+
let u = uG(c.primaryKey ?? l), d = [...new Set(o.map(u).filter(Boolean))];
|
|
63443
63478
|
return c.fetchByKeys && d.length === 0 ? {
|
|
63444
63479
|
source: c,
|
|
63445
63480
|
response: null
|
|
63446
63481
|
} : {
|
|
63447
63482
|
source: c,
|
|
63448
|
-
response: await
|
|
63483
|
+
response: await TG(c, wG({
|
|
63449
63484
|
moduleName: e,
|
|
63450
63485
|
limit: t,
|
|
63451
63486
|
offset: n,
|
|
@@ -63499,25 +63534,25 @@ function wG({ fetchPrimaryPage: e, extractPrimaryPage: t = gG, fetchSecondaryByK
|
|
|
63499
63534
|
}
|
|
63500
63535
|
//#endregion
|
|
63501
63536
|
//#region src/services/workflowModuleListApi.js
|
|
63502
|
-
function
|
|
63503
|
-
return
|
|
63504
|
-
fetchPrimary: () =>
|
|
63505
|
-
extractPrimaryRows:
|
|
63537
|
+
function DG(e, t, n = {}) {
|
|
63538
|
+
return EG({
|
|
63539
|
+
fetchPrimary: () => dV(e, t),
|
|
63540
|
+
extractPrimaryRows: lV,
|
|
63506
63541
|
fetchSecondary: Nd,
|
|
63507
|
-
fetchSecondaryById:
|
|
63542
|
+
fetchSecondaryById: fV,
|
|
63508
63543
|
secondaryFetchLimit: n.moduleFetchLimit ?? 200
|
|
63509
63544
|
});
|
|
63510
63545
|
}
|
|
63511
|
-
function
|
|
63546
|
+
function OG(e) {
|
|
63512
63547
|
let t = String(e ?? "").trim().split(/[^a-zA-Z0-9]+/).filter(Boolean);
|
|
63513
63548
|
return t.length ? `${t.map((e, t) => t === 0 ? e.toLowerCase() : e[0].toUpperCase() + e.slice(1).toLowerCase()).join("")}Count` : "";
|
|
63514
63549
|
}
|
|
63515
|
-
function
|
|
63550
|
+
function kG(e) {
|
|
63516
63551
|
let t = Array.isArray(e?.stages) ? e.stages : [];
|
|
63517
63552
|
if (!t.length) return e;
|
|
63518
63553
|
let n = {};
|
|
63519
63554
|
for (let e of t) {
|
|
63520
|
-
let t =
|
|
63555
|
+
let t = OG(e?.stageName);
|
|
63521
63556
|
t && (n[t] = Number(e?.count) || 0);
|
|
63522
63557
|
}
|
|
63523
63558
|
return {
|
|
@@ -63525,19 +63560,19 @@ function DG(e) {
|
|
|
63525
63560
|
...e
|
|
63526
63561
|
};
|
|
63527
63562
|
}
|
|
63528
|
-
var
|
|
63563
|
+
var AG = (e) => {
|
|
63529
63564
|
let t = Number(e?.targetSubmission ?? e?.targetSubmissions);
|
|
63530
63565
|
return Number.isFinite(t) && t > 0 ? t : null;
|
|
63531
63566
|
};
|
|
63532
|
-
function
|
|
63567
|
+
function jG({ submittedCountField: e = "submittedCount", progressField: t = "targetSubmissionProgress" } = {}) {
|
|
63533
63568
|
return function(n, r, i) {
|
|
63534
|
-
let a =
|
|
63569
|
+
let a = dG(n, r, i), o = AG(a);
|
|
63535
63570
|
return o != null && (a[t] = `${Number(a?.[e]) || 0} of ${o}`), a;
|
|
63536
63571
|
};
|
|
63537
63572
|
}
|
|
63538
|
-
function
|
|
63539
|
-
let t =
|
|
63540
|
-
return
|
|
63573
|
+
function MG(e = {}) {
|
|
63574
|
+
let t = jG();
|
|
63575
|
+
return EG({
|
|
63541
63576
|
primaryKey: "_id",
|
|
63542
63577
|
extraFields: e.extraFields,
|
|
63543
63578
|
extraFieldsAfter: e.extraFieldsAfter,
|
|
@@ -63546,9 +63581,9 @@ function AG(e = {}) {
|
|
|
63546
63581
|
key: "entityId",
|
|
63547
63582
|
fetchByKeys: (e, t, n, r) => {
|
|
63548
63583
|
let i = Math.max(1, Number(r?.limit) || 10);
|
|
63549
|
-
return
|
|
63584
|
+
return uV(Math.floor((Number(r?.offset) || 0) / i) + 1, i);
|
|
63550
63585
|
},
|
|
63551
|
-
extractRows: (e) => (e?.items ?? []).map(
|
|
63586
|
+
extractRows: (e) => (e?.items ?? []).map(kG),
|
|
63552
63587
|
mergeRow: (e, n, r) => {
|
|
63553
63588
|
let i = t(e, n, r);
|
|
63554
63589
|
return n?._id && (i.workflowId = n._id), i;
|
|
@@ -63556,17 +63591,17 @@ function AG(e = {}) {
|
|
|
63556
63591
|
}]
|
|
63557
63592
|
});
|
|
63558
63593
|
}
|
|
63559
|
-
async function
|
|
63560
|
-
return lp(await
|
|
63594
|
+
async function NG(e, t = 10, n = 0, r = {}, i = {}) {
|
|
63595
|
+
return lp(await MG(i)(e, t, n, r), e);
|
|
63561
63596
|
}
|
|
63562
|
-
async function
|
|
63563
|
-
return lp(await
|
|
63597
|
+
async function PG(e, t, n, r = 10, i = 0, a = {}) {
|
|
63598
|
+
return lp(await DG(e, t)(n, r, i, a), n);
|
|
63564
63599
|
}
|
|
63565
63600
|
//#endregion
|
|
63566
63601
|
//#region src/index.js
|
|
63567
|
-
typeof window < "u" && (window.__CORE_THEME_BUILD__ = "2026-09-
|
|
63568
|
-
var
|
|
63602
|
+
typeof window < "u" && (window.__CORE_THEME_BUILD__ = "2026-09-25T09:47:04.107Z");
|
|
63603
|
+
var FG = ZH, IG = HA(YU), LG = HA(ZU), RG = HA(fW), zG = HA(wW), BG = HA(NW), VG = HA(IW), HG = HA(zW), UG = HA(HW), WG = HA(WW), GG = HA(rG), KG = HA(aG);
|
|
63569
63604
|
//#endregion
|
|
63570
|
-
export { D as ADMIN_API_URL, ee as ADMIN_APP_ID, u as APP_ID, k as AUTH_URL, lv as ActivityNotesCard, Q_ as ActivityTab,
|
|
63605
|
+
export { D as ADMIN_API_URL, ee as ADMIN_APP_ID, u as APP_ID, k as AUTH_URL, lv as ActivityNotesCard, Q_ as ActivityTab, jH as AddBatchCandidatePopup, F_ as AddFormV1, ZH as AdminDashboard, RL as AdminDashboardContent, FG as AdminPage, I_ as AppAlert, xt as AppButton, dA as AppShell, vD as ApprovalActionBar, uv as AssigneeAvatars, rA as AuthGuard, zx as BILLING_STATUS_FLOW, iE as BOOLEAN_API_KEYS, Uw as BOOLEAN_PARSEABLE_API_KEYS, dv as BULK_UPLOAD_DEFAULT_ACCEPT, fv as BULK_UPLOAD_DEFAULT_MAX_SIZE_MB, fi as Breadcrumb, RG as BulkUploadPage, bv as BulkUploadPanel, o as CANDIDATES_URL, HD as CONTRACT_C2C, VD as CONTRACT_W2, n as CORE_URL, Vy as CURRENCY_SYMBOLS, Dc as CalendarCard, HL as CoreThemeAdminApp, VL as CoreThemeAdminRoutes, jl as CustomPagination, BE as DEFAULT_HOURS_POLICY, eE as DEFAULT_RESULTS_VIEW, Ln as DETAIL_VIEW_MODE_OPTIONS, Vi as DETAIL_VIEW_MODE_VALUES, Bt as DETAIL_VIEW_POPUP_PATH, uD as DayLogModal, Nv as DescriptionBlock, VS as DetailHeaderCard, JS as DetailViewPage, tz as DetailViewPopup, Rb as DetailViewV1, $i as DocumentViewer, Nu as DynamicCards, bB as DynamicPopup, IH as DynamicPopupRoute, jc as DynamicTabs, ow as EditFormV1, wT as FIELD_TYPE_REGISTRY, ND as FINANCE_APPROVAL_CONFIG, ED as FINANCE_TYPE_CFO, TD as FINANCE_TYPE_ONBOARDING_MANAGER, kD as FINANCE_TYPE_ONBOARDING_MANAGER_REAPPROVE, DD as FINANCE_TYPE_ONLY_FINANCE, wD as FINANCE_TYPE_SUBMISSION_MANAGER, OD as FINANCE_TYPE_SUBMISSION_MANAGER_REAPPROVE, ek as FileListCard, NO as FinanceApprovalPanel, bS as FinanceAvatar, wS as FinanceBadge, bD as FinanceDayCell, fS as FinanceDivider, xS as FinanceEmployeeCell, lS as FinanceEmptyState, pS as FinanceEquation, _S as FinanceHistoryTimeline, cS as FinanceHoursGrid, sS as FinanceKpiRow, dS as FinanceLine, zE as FinanceListToolbar, TS as FinanceMarginBadge, CS as FinanceMoneyCell, OS as FinanceRecordsTable, ES as FinanceRowChevron, uS as FinanceSection, oS as FinanceStatusPill, SS as FinanceTextCell, SD as FinanceTimesheetAnalysis, mS as FinanceWorkflowSteps, O as GATEWAY_URL, tL as GLOBAL_DEFAULT_FIELDS, VE as HOURS_MESSAGES, Ak as Header, Ru as HierarchyUserFilter, s as JOBS_URL, IG as LegacyAdminPage, og as ListView, KG as LmsHomePage, GG as LmsTestForm, fA as Login, HR as MailPopup, VG as ManageModules, HG as ManageSubmodules, hw as ModuleRowActions, _D as NotesPanel, cv as NotesTab, GT as OPEN_AS_OPTIONS, Bx as PAYROLL_STATUS_FLOW, QI as PLATFORM_SCOPES, SH as POPUP_CONFIGS, i as PYOPS_URL, Sw as ParamCardView, Ow as ParamListView, $E as PeriodBadgeTag, dL as PlatformSection, $R as PreviewPopup, VA as ProjectSelect, gD as ProofUploadPreview, pD as QuickLogBar, dD as QuickLogSelectionBar, $T as RESULTS_VIEW_OPTIONS, XH as RegionBanner, fD as RejectionReasonModal, r as SUBMISSIONS_URL, AE as SearchBuilderV1, $k as Sidebar, ME as StatusBadge, QE as StatusBadgeTag, LG as StickyNotesFullPage, PE as StylishDynamicTabs, IE as TemplateEditor, zG as TestForm, WG as TestingHomePage, W_ as TimelineGroups, sD as TimesheetDayCell, Qn as TipTapEditor, YH as UserForm, BH as VendorShareDrawer, Fp as ViewSummaryWidget, sz as WizardPopup, a as ZINNEXT_URL, UG as ZinnextTableView, BG as ZinnextTestForm, vr as appNow, P as applyIntegrationStatus, dl as approveSubmission, _v as buildAcceptAttr, lE as buildBooleanRequest, eS as buildCsv, Jx as buildDailyRows, aD as buildDayGradient, pO as buildRateHistoryEntries, Zx as buildWeeklyRollup, g as clearSelectedProject, ui as colors, aO as computeFinance, qE as computeHoursPolicy, Qx as computeMarginBand, er as conditionMatches, v as configureCoreTheme, Zr as configuredFieldLabel, MG as createAllWorkflowsListFetcher, EG as createMergedListFetcher, yG as createModuleListFetchAdapter, DG as createWorkflowStageListFetcher, Hy as currencySymbol, VI as deactivateRegion, dG as defaultMergeRow, at as deleteIntegrationConfig, qx as deriveDayStats, YE as describeCapacity, iS as downloadCsv, Fr as evaluateShowIfWith, $D as findEmployerRow, ZD as flattenGroups, Jy as formatAmount, Mn as formatApp, Yr as formatAppDateTime, gv as formatFileSize, mO as formatFinanceMoney, Ax as formatHours, Yy as formatMoney, Mx as formatPercent, Xy as formatRate, le as getActivity, NG as getAllWorkflowsModuleList, hi as getAppTimeZone, Ix as getApprovalDate, yi as getBgcIntegrationConfig, Hr as getBgcIntegrationSummary, Vx as getBillingActionStates, AT as getBooleanEligibleTypes, d as getCurrentRoleName, cr as getDetailDisplayDefaults, nS as getFieldLabel, ET as getFieldType, hv as getFileExtension, RD as getFinanceApprovalConfig, UO as getFormGroupsRaw, nL as getGlobalAiServices, $I as getGlobalDefaults, Bn as getIntegrationConfig, jr as getIntegrationConfigs, wi as getIntegrationSummary, Dl as getModuleConfig, Re as getModuleDataDetail, Hx as getPayrollActionStates, kl as getPeriodBadgeConfig, JI as getRegionDetailDefaults, HT as getSearchPopup, y as getSelectedProject, E as getStoredToken, f as getStoredUser, p as getUserRoles, fl as getVMSApprove, rS as getValueStyle, PG as getWorkflowStageModuleList, Ux as getWorkflowSteps, UI as grantPlatformAccess, GI as hasPlatformAccess, Fx as humanizeEvent, jg as i, tS as indexFieldConfig, Nx as initialsOf, qw as insertTokenAtCursor, DT as isBooleanEligible, Gw as isBooleanParsable, S as isTester, HI as listPlatformAccess, qI as listPlatformAudit, KI as listPlatformUsers, ZI as listRegionRoles, XI as listRegionUsers, zI as listRegions, Dn as loadDetailDefaults, h as logout, BD as marginIncludesReferral, iO as matchLocationTax, gC as n, tO as normalizeContract, he as normalizeDetailViewMode, xv as r, Wy as rateUnitLabel, Ky as rateUnitShort, YT as readActionButtons, JE as reconcileHours, RI as regionPath, TT as registerFieldType, VT as registerSearchPopup, ml as rejectSubmission, zn as requiredWhenActive, Ar as requiredWhenRule, Y_ as resolveActivityMeta, oO as resolveAndCompute, GE as resolveDayKind, rO as resolveFinanceInputs, lG as resolveMergeKey, lG as resolveMergedListKey, qT as resolveOpenAs, zD as resolveRejectionReason, rE as resolveResultsSearchPlaceholder, nE as resolveResultsView, WO as resolveSubmissionFinance, WI as revokePlatformAccess, Ii as runDetailViewOpen, pt as saveBgcIntegrationConfig, rL as saveGlobalAiServices, eL as saveGlobalDefaults, He as saveIntegrationConfig, BI as saveRegion, YI as saveRegionDetailDefaults, c as setSelectedProject, ar as showIfConditions, OG as stageCountKey, pA as t, Jt as testIntegrationConnection, Nr as toApp, qy as toNumber, Ei as tzLabel, qn as tzShortLabel, UT as unregisterSearchPopup, Jd as useDropdownFields, Ip as useDropdownValues, rk as useEditForm, Yd as useFieldConfig, Xd as useFilterFields, of as useMenuPermission, cw as useModuleActions, GS as useRecordRefresh, nk as useTabRows, Kw as validateBooleanQuery, vv as validateBulkFile, t as withAdminAppId, _ as withAppId, HA as withAuthGuard };
|
|
63571
63606
|
|
|
63572
63607
|
//# sourceMappingURL=index.js.map
|