@realtek/core-theme-live 0.0.416 → 0.0.418
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +945 -878
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist-lib/index.js
CHANGED
|
@@ -53541,40 +53541,83 @@ function rz(e) {
|
|
|
53541
53541
|
})]
|
|
53542
53542
|
});
|
|
53543
53543
|
}
|
|
53544
|
-
|
|
53545
|
-
|
|
53546
|
-
|
|
53547
|
-
|
|
53544
|
+
var iz = 3;
|
|
53545
|
+
function az({ field: e, options: t, onSearch: n, searchLoading: r = !1, value: i, onChange: a, popupContext: o }) {
|
|
53546
|
+
let s = QR(t), c = e.optionLayout, l = new Map(s.map((e) => [String(e?.value ?? ""), e])), u = e.multiSelect || e.multiple || e.mode === "multiple" ? "multiple" : e.mode, d = u === "multiple" || u === "tags", f = e.searchMinLength ?? iz, [p, m] = L(""), h = ra(null), g = ra(!1);
|
|
53547
|
+
async function _(t, n) {
|
|
53548
|
+
let r = Array.isArray(t) ? Array.isArray(n) ? n : t.map((e) => l.get(String(e ?? ""))).filter(Boolean) : n ?? l.get(String(t ?? ""));
|
|
53548
53549
|
(typeof e.onSelectGuard != "function" || await e.onSelectGuard({
|
|
53549
53550
|
value: t,
|
|
53550
53551
|
option: r,
|
|
53551
53552
|
field: e,
|
|
53552
|
-
popupContext:
|
|
53553
|
+
popupContext: o,
|
|
53553
53554
|
confirm: Sa.confirm
|
|
53554
|
-
}) !== !1) &&
|
|
53555
|
+
}) !== !1) && a?.(t);
|
|
53555
53556
|
}
|
|
53556
|
-
|
|
53557
|
-
|
|
53557
|
+
function v(e) {
|
|
53558
|
+
m(e), g.current = !1, n?.(e);
|
|
53559
|
+
}
|
|
53560
|
+
function y(e) {
|
|
53561
|
+
e.key === "Enter" && r && n && !d && p.trim() && (g.current = !0, e.preventDefault());
|
|
53562
|
+
}
|
|
53563
|
+
F(() => {
|
|
53564
|
+
if (r || !g.current) return;
|
|
53565
|
+
g.current = !1;
|
|
53566
|
+
let e = s.find((e) => e && !e.disabled);
|
|
53567
|
+
e && Promise.resolve(_(e.value, e)).finally(() => h.current?.blur());
|
|
53568
|
+
}, [r]);
|
|
53569
|
+
let b = !!n && p.trim().length > 0 && p.trim().length < f, x = /* @__PURE__ */ X("div", {
|
|
53570
|
+
className: "dynamic-popup__search-status",
|
|
53571
|
+
role: "status",
|
|
53572
|
+
"aria-live": "polite",
|
|
53573
|
+
style: {
|
|
53574
|
+
display: "flex",
|
|
53575
|
+
alignItems: "center",
|
|
53576
|
+
gap: 8,
|
|
53577
|
+
padding: "10px 12px",
|
|
53578
|
+
color: "#8c8c8c"
|
|
53579
|
+
},
|
|
53580
|
+
children: [/* @__PURE__ */ Y(Ma, { size: "small" }), /* @__PURE__ */ Y("span", { children: p.trim().length >= f ? `Searching "${p.trim()}"…` : "Loading…" })]
|
|
53581
|
+
}), S = e.notFoundContent ?? null;
|
|
53582
|
+
return n && r ? S = x : n && S === null && p.trim().length >= f && (S = /* @__PURE__ */ Y("div", {
|
|
53583
|
+
style: {
|
|
53584
|
+
padding: "10px 12px",
|
|
53585
|
+
color: "#8c8c8c"
|
|
53586
|
+
},
|
|
53587
|
+
children: "No matches found"
|
|
53588
|
+
})), /* @__PURE__ */ Y(H, {
|
|
53589
|
+
ref: h,
|
|
53590
|
+
mode: u,
|
|
53558
53591
|
showSearch: !0,
|
|
53559
53592
|
filterOption: !1,
|
|
53560
|
-
notFoundContent:
|
|
53561
|
-
|
|
53562
|
-
|
|
53563
|
-
|
|
53593
|
+
notFoundContent: S,
|
|
53594
|
+
loading: !!n && r,
|
|
53595
|
+
value: i,
|
|
53596
|
+
onChange: _,
|
|
53597
|
+
options: s,
|
|
53564
53598
|
placeholder: e.placeholder,
|
|
53565
|
-
onSearch: n,
|
|
53566
|
-
|
|
53567
|
-
|
|
53568
|
-
|
|
53599
|
+
onSearch: n ? v : void 0,
|
|
53600
|
+
onKeyDown: y,
|
|
53601
|
+
popupRender: n ? (e) => /* @__PURE__ */ X(J, { children: [b && !r ? /* @__PURE__ */ Y("div", {
|
|
53602
|
+
style: {
|
|
53603
|
+
padding: "6px 12px",
|
|
53604
|
+
fontSize: 12,
|
|
53605
|
+
color: "#8c8c8c"
|
|
53606
|
+
},
|
|
53607
|
+
children: `Type at least ${f} characters to search — showing recent`
|
|
53608
|
+
}) : null, r ? x : e] }) : void 0,
|
|
53609
|
+
className: `dynamic-popup__field-select${c ? " dynamic-popup__field-select--rich" : ""}`,
|
|
53610
|
+
popupClassName: c ? "dynamic-popup__option-dropdown" : void 0,
|
|
53611
|
+
listHeight: c ? 340 : void 0,
|
|
53569
53612
|
optionLabelProp: "label",
|
|
53570
|
-
optionRender:
|
|
53613
|
+
optionRender: c ? (e) => /* @__PURE__ */ Y(qR, {
|
|
53571
53614
|
option: e?.data ?? e,
|
|
53572
|
-
layout:
|
|
53615
|
+
layout: c
|
|
53573
53616
|
}) : void 0,
|
|
53574
53617
|
prefix: /* @__PURE__ */ Y(ho, {})
|
|
53575
53618
|
});
|
|
53576
53619
|
}
|
|
53577
|
-
function
|
|
53620
|
+
function oz({ field: e, mentionOpts: t, onMentionSearch: n, value: r, onChange: i }) {
|
|
53578
53621
|
let a = Number(e.maxLength) > 0 ? Number(e.maxLength) : void 0, o = String(r ?? "").length;
|
|
53579
53622
|
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(ba, {
|
|
53580
53623
|
value: r,
|
|
@@ -53601,7 +53644,7 @@ function az({ field: e, mentionOpts: t, onMentionSearch: n, value: r, onChange:
|
|
|
53601
53644
|
]
|
|
53602
53645
|
}) : null] });
|
|
53603
53646
|
}
|
|
53604
|
-
function
|
|
53647
|
+
function sz({ field: e = {}, value: t = {}, onChange: n }) {
|
|
53605
53648
|
let r = t.period ?? "Hourly", i = t.isRange ?? !1;
|
|
53606
53649
|
function a(e) {
|
|
53607
53650
|
n?.({
|
|
@@ -53686,7 +53729,7 @@ function oz({ field: e = {}, value: t = {}, onChange: n }) {
|
|
|
53686
53729
|
})
|
|
53687
53730
|
] });
|
|
53688
53731
|
}
|
|
53689
|
-
function
|
|
53732
|
+
function cz({ field: e, value: t, onChange: n }) {
|
|
53690
53733
|
return /* @__PURE__ */ Y(fa, {
|
|
53691
53734
|
value: t,
|
|
53692
53735
|
onChange: n,
|
|
@@ -53695,14 +53738,14 @@ function sz({ field: e, value: t, onChange: n }) {
|
|
|
53695
53738
|
format: "YYYY-MM-DD"
|
|
53696
53739
|
});
|
|
53697
53740
|
}
|
|
53698
|
-
function
|
|
53741
|
+
function lz({ field: e, checked: t, onChange: n }) {
|
|
53699
53742
|
return /* @__PURE__ */ Y(ua, {
|
|
53700
53743
|
checked: t,
|
|
53701
53744
|
onChange: n,
|
|
53702
53745
|
children: e.checkboxLabel
|
|
53703
53746
|
});
|
|
53704
53747
|
}
|
|
53705
|
-
function
|
|
53748
|
+
function uz({ field: e, value: t, onChange: n }) {
|
|
53706
53749
|
return /* @__PURE__ */ Y(va, {
|
|
53707
53750
|
value: t,
|
|
53708
53751
|
onChange: n,
|
|
@@ -53712,45 +53755,45 @@ function lz({ field: e, value: t, onChange: n }) {
|
|
|
53712
53755
|
style: { width: "100%" }
|
|
53713
53756
|
});
|
|
53714
53757
|
}
|
|
53715
|
-
function
|
|
53758
|
+
function dz({ options: e, value: t, onChange: n }) {
|
|
53716
53759
|
return /* @__PURE__ */ Y(Da.Group, {
|
|
53717
53760
|
value: t,
|
|
53718
53761
|
onChange: n,
|
|
53719
53762
|
options: e
|
|
53720
53763
|
});
|
|
53721
53764
|
}
|
|
53722
|
-
var
|
|
53765
|
+
var fz = {
|
|
53723
53766
|
input: $R,
|
|
53724
53767
|
text: $R,
|
|
53725
53768
|
textarea: ez,
|
|
53726
53769
|
select: tz,
|
|
53727
53770
|
"multi-select": nz,
|
|
53728
|
-
"search-select":
|
|
53729
|
-
"mention-textarea":
|
|
53730
|
-
"candidate-rate":
|
|
53731
|
-
"priority-checkbox":
|
|
53732
|
-
"date-picker":
|
|
53733
|
-
number:
|
|
53734
|
-
radio:
|
|
53771
|
+
"search-select": az,
|
|
53772
|
+
"mention-textarea": oz,
|
|
53773
|
+
"candidate-rate": sz,
|
|
53774
|
+
"priority-checkbox": lz,
|
|
53775
|
+
"date-picker": cz,
|
|
53776
|
+
number: uz,
|
|
53777
|
+
radio: dz
|
|
53735
53778
|
};
|
|
53736
|
-
function
|
|
53779
|
+
function pz(e) {
|
|
53737
53780
|
return e === "priority-checkbox" ? { valuePropName: "checked" } : {};
|
|
53738
53781
|
}
|
|
53739
53782
|
//#endregion
|
|
53740
53783
|
//#region src/components/popups/dynamic/PopupFields.jsx
|
|
53741
|
-
var
|
|
53784
|
+
var mz = /* @__PURE__ */ new Set([
|
|
53742
53785
|
"input",
|
|
53743
53786
|
"text",
|
|
53744
53787
|
"textarea",
|
|
53745
53788
|
"mention-textarea"
|
|
53746
53789
|
]);
|
|
53747
|
-
function
|
|
53748
|
-
let [
|
|
53790
|
+
function hz({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupContext: i, extraData: a, removedIds: o, setRemovedIds: s, onRemoveAssigned: c, showAlreadyAssigned: l, onValuesChange: u, getSearchHandler: d, searchLoading: f = {}, getMentionSearchHandler: p, mentionOptions: m }) {
|
|
53791
|
+
let [h, g] = L([]), _ = (a?.recruitersData ?? []).filter((e) => {
|
|
53749
53792
|
let t = String(e?.user_id ?? e?.id ?? e?.userId ?? "");
|
|
53750
53793
|
return t && !o.includes(t);
|
|
53751
|
-
}),
|
|
53794
|
+
}), v = l && a, y = new Set(l ? _.map((e) => String(e?.user_id ?? e?.id ?? e?.userId ?? "").trim()).filter(Boolean) : []), b = (e) => y.size === 0 || !Array.isArray(e) ? e : e.map((e) => {
|
|
53752
53795
|
let t = String((e && typeof e == "object" ? e.value ?? e.id : e) ?? "").trim();
|
|
53753
|
-
return !
|
|
53796
|
+
return !y.has(t) || !e || typeof e != "object" ? e : {
|
|
53754
53797
|
...e,
|
|
53755
53798
|
disabled: !0,
|
|
53756
53799
|
assigned: !0,
|
|
@@ -53758,7 +53801,7 @@ function mz({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupCont
|
|
|
53758
53801
|
title: e.title ?? "Already assigned to this job"
|
|
53759
53802
|
};
|
|
53760
53803
|
});
|
|
53761
|
-
return !t.length && !
|
|
53804
|
+
return !t.length && !v ? null : /* @__PURE__ */ X(J, { children: [v && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("div", {
|
|
53762
53805
|
className: "dynamic-popup__already-assigned",
|
|
53763
53806
|
children: [/* @__PURE__ */ Y(P, {
|
|
53764
53807
|
variant: "caption",
|
|
@@ -53771,17 +53814,17 @@ function mz({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupCont
|
|
|
53771
53814
|
flexWrap: "wrap",
|
|
53772
53815
|
gap: 6
|
|
53773
53816
|
},
|
|
53774
|
-
children:
|
|
53817
|
+
children: _.length === 0 ? /* @__PURE__ */ Y(P, {
|
|
53775
53818
|
variant: "caption",
|
|
53776
53819
|
color: "secondary",
|
|
53777
53820
|
children: "No one is currently assigned to this job."
|
|
53778
|
-
}) :
|
|
53779
|
-
let t = String(e?.user_id ?? e?.id ?? e?.userId ?? ""), n = e?.name ?? e?.user_name ?? e?.userName ?? e?.email ?? "Assigned user", r =
|
|
53821
|
+
}) : _.map((e) => {
|
|
53822
|
+
let t = String(e?.user_id ?? e?.id ?? e?.userId ?? ""), n = e?.name ?? e?.user_name ?? e?.userName ?? e?.email ?? "Assigned user", r = h.includes(t);
|
|
53780
53823
|
return /* @__PURE__ */ X(G, {
|
|
53781
53824
|
closable: !r,
|
|
53782
53825
|
onClose: async (n) => {
|
|
53783
53826
|
if (n.preventDefault(), !(!t || r)) {
|
|
53784
|
-
|
|
53827
|
+
g((e) => Array.from(/* @__PURE__ */ new Set([...e, t])));
|
|
53785
53828
|
try {
|
|
53786
53829
|
typeof c == "function" && await c({
|
|
53787
53830
|
id: t,
|
|
@@ -53790,7 +53833,7 @@ function mz({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupCont
|
|
|
53790
53833
|
} catch (e) {
|
|
53791
53834
|
q.error(e?.message ?? "Failed to unassign user");
|
|
53792
53835
|
} finally {
|
|
53793
|
-
|
|
53836
|
+
g((e) => e.filter((e) => e !== t));
|
|
53794
53837
|
}
|
|
53795
53838
|
}
|
|
53796
53839
|
},
|
|
@@ -53806,15 +53849,15 @@ function mz({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupCont
|
|
|
53806
53849
|
layout: "vertical",
|
|
53807
53850
|
initialValues: n,
|
|
53808
53851
|
onValuesChange: (e, t) => u(t),
|
|
53809
|
-
children:
|
|
53810
|
-
let t =
|
|
53852
|
+
children: gz(t).map((e) => _z(e, (e) => {
|
|
53853
|
+
let t = b(r[e.name] ?? RR(e, i)), n = d(e), a = p(e), o = m[e.name] ?? [], s = pz(e.type), c = fz[e.type], l = [];
|
|
53811
53854
|
return e.required && l.push({
|
|
53812
53855
|
required: !0,
|
|
53813
53856
|
message: `${e.label || "This field"} is required`
|
|
53814
53857
|
}), typeof e.validator == "function" && l.push({ validator: (t, n) => {
|
|
53815
53858
|
let r = e.validator(n, i);
|
|
53816
53859
|
return r ? Promise.reject(Error(r)) : Promise.resolve();
|
|
53817
|
-
} }),
|
|
53860
|
+
} }), mz.has(e.type) && l.push(Ti({
|
|
53818
53861
|
label: e.label,
|
|
53819
53862
|
field: e.name,
|
|
53820
53863
|
type: e.type
|
|
@@ -53827,6 +53870,7 @@ function mz({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupCont
|
|
|
53827
53870
|
field: e,
|
|
53828
53871
|
options: t,
|
|
53829
53872
|
onSearch: n,
|
|
53873
|
+
searchLoading: !!f[e.name],
|
|
53830
53874
|
mentionOpts: o,
|
|
53831
53875
|
onMentionSearch: a,
|
|
53832
53876
|
popupContext: i
|
|
@@ -53835,7 +53879,7 @@ function mz({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupCont
|
|
|
53835
53879
|
}))
|
|
53836
53880
|
})] });
|
|
53837
53881
|
}
|
|
53838
|
-
function
|
|
53882
|
+
function gz(e) {
|
|
53839
53883
|
let t = [];
|
|
53840
53884
|
for (let n of e) {
|
|
53841
53885
|
let e = t[t.length - 1];
|
|
@@ -53846,7 +53890,7 @@ function hz(e) {
|
|
|
53846
53890
|
}
|
|
53847
53891
|
return t.map((e) => e.fields);
|
|
53848
53892
|
}
|
|
53849
|
-
function
|
|
53893
|
+
function _z(e, t) {
|
|
53850
53894
|
return e.length === 1 ? t(e[0]) : /* @__PURE__ */ Y("div", {
|
|
53851
53895
|
style: {
|
|
53852
53896
|
display: "flex",
|
|
@@ -53864,7 +53908,7 @@ function gz(e, t) {
|
|
|
53864
53908
|
}
|
|
53865
53909
|
//#endregion
|
|
53866
53910
|
//#region src/components/popups/dynamic/hooks/usePopupOptions.js
|
|
53867
|
-
function
|
|
53911
|
+
function vz(e) {
|
|
53868
53912
|
return [
|
|
53869
53913
|
"select",
|
|
53870
53914
|
"multi-select",
|
|
@@ -53872,15 +53916,15 @@ function _z(e) {
|
|
|
53872
53916
|
"radio"
|
|
53873
53917
|
].includes(e?.type) && e?.dataSource === "master" && e?.masterName;
|
|
53874
53918
|
}
|
|
53875
|
-
function
|
|
53919
|
+
function yz(e) {
|
|
53876
53920
|
let t = e?.data ?? e;
|
|
53877
53921
|
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 : [];
|
|
53878
53922
|
}
|
|
53879
|
-
function
|
|
53923
|
+
function bz(e) {
|
|
53880
53924
|
let t = String(e?.masterName ?? "").trim().toLowerCase();
|
|
53881
53925
|
return t === "clientsubmissions" || t === "clientsubmissionstatus";
|
|
53882
53926
|
}
|
|
53883
|
-
function
|
|
53927
|
+
function xz(e) {
|
|
53884
53928
|
if (e == null) return null;
|
|
53885
53929
|
if (typeof e == "string") {
|
|
53886
53930
|
let t = e.trim();
|
|
@@ -53910,36 +53954,36 @@ function bz(e) {
|
|
|
53910
53954
|
}
|
|
53911
53955
|
};
|
|
53912
53956
|
}
|
|
53913
|
-
function
|
|
53914
|
-
return
|
|
53957
|
+
function Sz(e, t) {
|
|
53958
|
+
return bz(t) ? xz(e) : LR(e, t);
|
|
53915
53959
|
}
|
|
53916
|
-
function
|
|
53960
|
+
function Cz(e) {
|
|
53917
53961
|
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;
|
|
53918
53962
|
return {
|
|
53919
53963
|
id: n,
|
|
53920
53964
|
text: String(r ?? e?.clientSubmissionStatusText ?? e?.clientStatus ?? e?.clientStatusText ?? e?.["clientSubmissionStatus.clientSubmissionStatusText"] ?? "").trim()
|
|
53921
53965
|
};
|
|
53922
53966
|
}
|
|
53923
|
-
function
|
|
53967
|
+
function wz(e) {
|
|
53924
53968
|
let t = Number(e?.id ?? 0) || 0, n = String(e?.text ?? "").trim();
|
|
53925
53969
|
return n && n.toLowerCase() === "not submitted" ? !0 : t <= 0 && !n;
|
|
53926
53970
|
}
|
|
53927
|
-
function
|
|
53971
|
+
function Tz(e) {
|
|
53928
53972
|
return Number(e?._raw?.id ?? e?._raw?.uniqueId ?? 0) || 0;
|
|
53929
53973
|
}
|
|
53930
|
-
function
|
|
53974
|
+
function Ez(e) {
|
|
53931
53975
|
let t = e?._raw?.allowedNextStatusIds;
|
|
53932
53976
|
return Array.isArray(t) ? t.map(Number).filter((e) => Number.isInteger(e) && e > 0) : [];
|
|
53933
53977
|
}
|
|
53934
|
-
function
|
|
53978
|
+
function Dz(e) {
|
|
53935
53979
|
let t = e?.data ?? e;
|
|
53936
53980
|
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;
|
|
53937
53981
|
}
|
|
53938
|
-
function
|
|
53939
|
-
return (Array.isArray(e?.selectedRecords) ? e.selectedRecords.filter(Boolean) : []).some((e) => !Cz(
|
|
53982
|
+
function Oz(e) {
|
|
53983
|
+
return (Array.isArray(e?.selectedRecords) ? e.selectedRecords.filter(Boolean) : []).some((e) => !wz(Cz(e))) ? !0 : !wz(Cz(e ?? {}));
|
|
53940
53984
|
}
|
|
53941
|
-
async function
|
|
53942
|
-
if (
|
|
53985
|
+
async function kz(e, t) {
|
|
53986
|
+
if (Oz(e)) return e;
|
|
53943
53987
|
let n = e?.selectedIds?.[0] ?? e?.selectedRecords?.[0]?._id ?? e?.selectedRecords?.[0]?.id;
|
|
53944
53988
|
if (!n) return e;
|
|
53945
53989
|
let r = String(e?.moduleName ?? "submissions").trim() || "submissions", i = new URLSearchParams({
|
|
@@ -53948,7 +53992,7 @@ async function Oz(e, t) {
|
|
|
53948
53992
|
});
|
|
53949
53993
|
t && i.set("app_id", t);
|
|
53950
53994
|
try {
|
|
53951
|
-
let n =
|
|
53995
|
+
let n = Dz(await x(k, `/module-data-detail?${i.toString()}`, { headers: t ? { "X-App-Id": t } : void 0 }));
|
|
53952
53996
|
if (!n) return e;
|
|
53953
53997
|
let r = Array.isArray(e?.selectedRecords) ? e.selectedRecords : [];
|
|
53954
53998
|
return {
|
|
@@ -53962,7 +54006,7 @@ async function Oz(e, t) {
|
|
|
53962
54006
|
return console.warn("[DynamicPopup] Could not load selected submission detail for client status transition:", t), e;
|
|
53963
54007
|
}
|
|
53964
54008
|
}
|
|
53965
|
-
function
|
|
54009
|
+
function Az(e, t) {
|
|
53966
54010
|
if (!Array.isArray(e) || !e.length) return [];
|
|
53967
54011
|
if (!e.some((e) => e?._raw?.isInitialStatus === !0 || e?._raw?.isTerminalStatus === !0 || Array.isArray(e?._raw?.allowedNextStatusIds))) return e;
|
|
53968
54012
|
let n = Array.isArray(t?.selectedRecords) ? t.selectedRecords.filter(Boolean) : [], r = {
|
|
@@ -53976,20 +54020,20 @@ function kz(e, t) {
|
|
|
53976
54020
|
"clientSubmissionStatus.clientSubmissionStatusText": t?.["clientSubmissionStatus.clientSubmissionStatusText"]
|
|
53977
54021
|
}, i = n.length ? n : [r];
|
|
53978
54022
|
return e.filter((t) => i.every((n) => {
|
|
53979
|
-
let i =
|
|
53980
|
-
if (
|
|
53981
|
-
let e =
|
|
53982
|
-
|
|
54023
|
+
let i = Cz(n);
|
|
54024
|
+
if (wz(i)) {
|
|
54025
|
+
let e = Cz(r);
|
|
54026
|
+
wz(e) || (i = e);
|
|
53983
54027
|
}
|
|
53984
|
-
if (
|
|
54028
|
+
if (wz(i)) return t?._raw?.isInitialStatus === !0;
|
|
53985
54029
|
let a = e.find((e) => {
|
|
53986
|
-
let t =
|
|
54030
|
+
let t = Tz(e), n = String(e?.label ?? "").trim();
|
|
53987
54031
|
return i.id > 0 && t === i.id || i.text && n.toLowerCase() === i.text.toLowerCase();
|
|
53988
54032
|
});
|
|
53989
|
-
return !a || a?._raw?.isTerminalStatus === !0 ? !1 :
|
|
54033
|
+
return !a || a?._raw?.isTerminalStatus === !0 ? !1 : Ez(a).includes(Tz(t));
|
|
53990
54034
|
}));
|
|
53991
54035
|
}
|
|
53992
|
-
function
|
|
54036
|
+
function jz({ open: e, config: t, api: n, fields: r, popupContext: i, formValues: a }) {
|
|
53993
54037
|
let [o, s] = L({}), [c, l] = L(null);
|
|
53994
54038
|
return F(() => {
|
|
53995
54039
|
e || (s({}), l(null));
|
|
@@ -54014,7 +54058,7 @@ function Az({ open: e, config: t, api: n, fields: r, popupContext: i, formValues
|
|
|
54014
54058
|
i
|
|
54015
54059
|
]), F(() => {
|
|
54016
54060
|
if (!e || !t) return;
|
|
54017
|
-
let n = r.filter(
|
|
54061
|
+
let n = r.filter(vz);
|
|
54018
54062
|
if (!n.length) return;
|
|
54019
54063
|
let a = new AbortController();
|
|
54020
54064
|
return n.forEach((e) => {
|
|
@@ -54025,9 +54069,9 @@ function Az({ open: e, config: t, api: n, fields: r, popupContext: i, formValues
|
|
|
54025
54069
|
}), n = String(u ?? "").trim();
|
|
54026
54070
|
n && t.set("app_id", n), x(k, `/masters/dropdown?${t.toString()}`, { headers: n ? { "X-App-Id": n } : void 0 }).then(async (t) => {
|
|
54027
54071
|
if (a.signal.aborted) return;
|
|
54028
|
-
let r =
|
|
54029
|
-
if (
|
|
54030
|
-
let c =
|
|
54072
|
+
let r = yz(t).map((t) => Sz(t, e)).filter(Boolean), o = i;
|
|
54073
|
+
if (bz(e) && (o = await kz(i, n)), a.signal.aborted) return;
|
|
54074
|
+
let c = bz(e) ? Az(r, o) : r;
|
|
54031
54075
|
s((t) => ({
|
|
54032
54076
|
...t,
|
|
54033
54077
|
[e.name]: c
|
|
@@ -54085,61 +54129,81 @@ function Az({ open: e, config: t, api: n, fields: r, popupContext: i, formValues
|
|
|
54085
54129
|
}
|
|
54086
54130
|
//#endregion
|
|
54087
54131
|
//#region src/components/popups/dynamic/hooks/usePopupSearch.js
|
|
54088
|
-
var
|
|
54089
|
-
function
|
|
54090
|
-
let [
|
|
54091
|
-
|
|
54092
|
-
|
|
54093
|
-
|
|
54094
|
-
|
|
54095
|
-
|
|
54096
|
-
|
|
54097
|
-
|
|
54098
|
-
|
|
54099
|
-
|
|
54100
|
-
|
|
54101
|
-
|
|
54132
|
+
var Mz = 400, Nz = 3, Pz = Object.freeze({});
|
|
54133
|
+
function Fz({ api: e, open: t, fields: n = [], popupContext: r, setDynamicOptions: i, getFieldValue: a }) {
|
|
54134
|
+
let [o, s] = L({}), [c, l] = L({}), u = $i((e, t) => {
|
|
54135
|
+
l((n) => !!n[e] === t ? n : {
|
|
54136
|
+
...n,
|
|
54137
|
+
[e]: t
|
|
54138
|
+
});
|
|
54139
|
+
}, []), d = ra({}), f = ra({}), p = ra({}), m = ra({}), h = ra({}), g = $i((t, n) => {
|
|
54140
|
+
let o = e.searchOptions ?? e.searchFetcher;
|
|
54141
|
+
if (typeof o != "function") return;
|
|
54142
|
+
f.current[t.name]?.abort();
|
|
54143
|
+
let s = new AbortController();
|
|
54144
|
+
return f.current[t.name] = s, m.current[t.name] = n, h.current[t.name] = !0, u(t.name, !0), Promise.resolve(o(t, n, r)).then((e) => {
|
|
54145
|
+
if (s.signal.aborted) return;
|
|
54146
|
+
let n = (Array.isArray(e) ? e : e?.items ?? e?.list ?? []).map((e) => LR(e, t)), o = t.initialOptionKey ? r[t.initialOptionKey] : null, c = Array.isArray(o) ? o : o ? [o] : [], l = new Set(n.map((e) => e.value)), d = c.filter((e) => !l.has(e.value)), f = a?.(t.name), p = new Set((Array.isArray(f) ? f : [f]).filter((e) => e != null && e !== "").map(String));
|
|
54147
|
+
i((e) => {
|
|
54148
|
+
let r = p.size ? (e[t.name] ?? []).filter((e) => p.has(String(e?.value)) && !l.has(e?.value) && !d.some((t) => t.value === e?.value)) : [];
|
|
54149
|
+
return {
|
|
54150
|
+
...e,
|
|
54151
|
+
[t.name]: [
|
|
54152
|
+
...d,
|
|
54153
|
+
...n,
|
|
54154
|
+
...r
|
|
54155
|
+
]
|
|
54156
|
+
};
|
|
54157
|
+
}), h.current[t.name] = !1, u(t.name, !1);
|
|
54102
54158
|
}).catch((e) => {
|
|
54103
|
-
|
|
54104
|
-
}),
|
|
54159
|
+
s.signal.aborted || (h.current[t.name] = !1, u(t.name, !1), console.error(`[DynamicPopup] Search failed for field "${t.name}":`, e));
|
|
54160
|
+
}), s;
|
|
54105
54161
|
}, [
|
|
54106
54162
|
e,
|
|
54107
54163
|
r,
|
|
54108
|
-
i
|
|
54109
|
-
|
|
54110
|
-
|
|
54111
|
-
|
|
54164
|
+
i,
|
|
54165
|
+
a,
|
|
54166
|
+
u
|
|
54167
|
+
]), _ = n.filter((e) => (e.searchFetchKey || e.searchFetcher) && e.preloadOptions !== !1), v = _.map((e) => e.name).join("|"), y = ra({
|
|
54168
|
+
runSearch: g,
|
|
54169
|
+
preloadFields: _
|
|
54112
54170
|
});
|
|
54113
54171
|
F(() => {
|
|
54114
|
-
|
|
54115
|
-
runSearch:
|
|
54116
|
-
preloadFields:
|
|
54172
|
+
y.current = {
|
|
54173
|
+
runSearch: g,
|
|
54174
|
+
preloadFields: _
|
|
54117
54175
|
};
|
|
54118
54176
|
}), F(() => {
|
|
54119
|
-
if (!t || !
|
|
54120
|
-
let { runSearch: e, preloadFields: n } =
|
|
54121
|
-
return () =>
|
|
54122
|
-
|
|
54123
|
-
|
|
54177
|
+
if (!t || !v) return;
|
|
54178
|
+
let { runSearch: e, preloadFields: n } = y.current, r = n.map((t) => e(t, "")).filter(Boolean);
|
|
54179
|
+
return () => {
|
|
54180
|
+
r.forEach((e) => e.abort()), l({});
|
|
54181
|
+
};
|
|
54182
|
+
}, [t, v]);
|
|
54183
|
+
function b(t) {
|
|
54124
54184
|
if (!t.searchFetchKey && !t.searchFetcher || typeof (e.searchOptions ?? e.searchFetcher) != "function") return;
|
|
54125
|
-
let n = t.searchMinLength ??
|
|
54185
|
+
let n = t.searchMinLength ?? Nz;
|
|
54126
54186
|
return (e) => {
|
|
54127
|
-
clearTimeout(
|
|
54128
|
-
let r = e.length < n ? "" :
|
|
54129
|
-
|
|
54130
|
-
u(t,
|
|
54131
|
-
|
|
54187
|
+
clearTimeout(d.current[t.name]);
|
|
54188
|
+
let r = String(e ?? "").trim(), i = r.length < n ? "" : r;
|
|
54189
|
+
if (i === "" && m.current[t.name] === "") {
|
|
54190
|
+
u(t.name, !!h.current[t.name]);
|
|
54191
|
+
return;
|
|
54192
|
+
}
|
|
54193
|
+
u(t.name, !0), d.current[t.name] = setTimeout(() => {
|
|
54194
|
+
g(t, i);
|
|
54195
|
+
}, Mz);
|
|
54132
54196
|
};
|
|
54133
54197
|
}
|
|
54134
|
-
function
|
|
54198
|
+
function x(t) {
|
|
54135
54199
|
let n = e.getMentionOptions ?? e.mentionFetcher;
|
|
54136
54200
|
if (typeof n == "function") return (e) => {
|
|
54137
|
-
|
|
54201
|
+
p.current[t.name]?.abort();
|
|
54138
54202
|
let i = new AbortController();
|
|
54139
|
-
|
|
54203
|
+
p.current[t.name] = i, Promise.resolve(n(t, e, r)).then((e) => {
|
|
54140
54204
|
if (i.signal.aborted) return;
|
|
54141
54205
|
let n = Array.isArray(e) ? e : e?.items ?? e?.list ?? [];
|
|
54142
|
-
|
|
54206
|
+
s((e) => ({
|
|
54143
54207
|
...e,
|
|
54144
54208
|
[t.name]: n.map((e) => ({
|
|
54145
54209
|
value: e.user_name ?? e.userName ?? e.username ?? String(e),
|
|
@@ -54152,14 +54216,15 @@ function Nz({ api: e, open: t, fields: n = [], popupContext: r, setDynamicOption
|
|
|
54152
54216
|
};
|
|
54153
54217
|
}
|
|
54154
54218
|
return {
|
|
54155
|
-
mentionOptions:
|
|
54156
|
-
|
|
54157
|
-
|
|
54219
|
+
mentionOptions: o,
|
|
54220
|
+
searchLoading: t ? c : Pz,
|
|
54221
|
+
getSearchHandler: b,
|
|
54222
|
+
getMentionSearchHandler: x
|
|
54158
54223
|
};
|
|
54159
54224
|
}
|
|
54160
54225
|
//#endregion
|
|
54161
54226
|
//#region src/components/popups/dynamic/hooks/usePopupSubmit.js
|
|
54162
|
-
function
|
|
54227
|
+
function Iz({ 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 }) {
|
|
54163
54228
|
let [f, p] = L(!1), [m, h] = L(null);
|
|
54164
54229
|
async function g(e) {
|
|
54165
54230
|
let t = {
|
|
@@ -54234,10 +54299,10 @@ function Pz({ form: e, config: t, api: n, popupContext: r, resolvedIds: i, dynam
|
|
|
54234
54299
|
}
|
|
54235
54300
|
//#endregion
|
|
54236
54301
|
//#region src/components/popups/dynamic/DynamicPopup.jsx
|
|
54237
|
-
function
|
|
54302
|
+
function Lz(e) {
|
|
54238
54303
|
return !!(e.multiSelect || e.multiple || e.mode === "multiple");
|
|
54239
54304
|
}
|
|
54240
|
-
function
|
|
54305
|
+
function Rz({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i, api: a = {} }) {
|
|
54241
54306
|
let [o] = B.useForm(), [s, c] = L({}), [l, u] = L([]), d = B.useWatch([], o, { preserve: !0 }) ?? {}, f = I(() => zR(n), [n]), { selectedIds: p = [], selectedRecords: m = [], moduleName: h = "" } = f, g = I(() => p.map((e, t) => {
|
|
54242
54307
|
let n = m[t];
|
|
54243
54308
|
return n?.id ?? n?._id ?? e;
|
|
@@ -54247,25 +54312,26 @@ function Iz({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
54247
54312
|
if (t.initialOptionKey) {
|
|
54248
54313
|
let n = f[t.initialOptionKey], r = Array.isArray(n) ? n : n ? [n] : [];
|
|
54249
54314
|
if (!r.length) return;
|
|
54250
|
-
e[t.name] =
|
|
54315
|
+
e[t.name] = Lz(t) ? r.map((e) => e.value) : r[0].value;
|
|
54251
54316
|
return;
|
|
54252
54317
|
}
|
|
54253
54318
|
let n = f[t.initialValueKey];
|
|
54254
54319
|
!t.initialValueKey || n === void 0 || (e[t.name] = t.type === "date-picker" ? Us(n) : n);
|
|
54255
54320
|
}), e;
|
|
54256
|
-
}, [_, f]), { dynamicOptions: y, setDynamicOptions: b, extraData: x } =
|
|
54321
|
+
}, [_, f]), { dynamicOptions: y, setDynamicOptions: b, extraData: x } = jz({
|
|
54257
54322
|
open: e,
|
|
54258
54323
|
config: t,
|
|
54259
54324
|
api: a,
|
|
54260
54325
|
fields: _,
|
|
54261
54326
|
popupContext: f,
|
|
54262
54327
|
formValues: s
|
|
54263
|
-
}), { mentionOptions: S,
|
|
54328
|
+
}), { mentionOptions: S, searchLoading: C, getSearchHandler: w, getMentionSearchHandler: T } = Fz({
|
|
54264
54329
|
api: a,
|
|
54265
54330
|
open: e,
|
|
54266
54331
|
fields: _,
|
|
54267
54332
|
popupContext: f,
|
|
54268
|
-
setDynamicOptions: b
|
|
54333
|
+
setDynamicOptions: b,
|
|
54334
|
+
getFieldValue: $i((e) => o.getFieldValue(e), [o])
|
|
54269
54335
|
});
|
|
54270
54336
|
F(() => {
|
|
54271
54337
|
if (!e) return;
|
|
@@ -54283,16 +54349,16 @@ function Iz({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
54283
54349
|
_,
|
|
54284
54350
|
f
|
|
54285
54351
|
]);
|
|
54286
|
-
function
|
|
54352
|
+
function E(e) {
|
|
54287
54353
|
typeof r == "function" && r(e);
|
|
54288
54354
|
}
|
|
54289
|
-
let
|
|
54355
|
+
let D = _.filter((e) => e.required), O = D.every((e) => {
|
|
54290
54356
|
let t = d[e.name];
|
|
54291
54357
|
return !(t == null || t === "" || Array.isArray(t) && t.length === 0 || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0);
|
|
54292
|
-
}),
|
|
54358
|
+
}), k = (f.removedIds ?? []).length, A = l.length > k, j = D.some((e) => {
|
|
54293
54359
|
let t = d[e.name];
|
|
54294
54360
|
return !(t == null || t === "" || Array.isArray(t) && t.length === 0);
|
|
54295
|
-
}), { handleOk:
|
|
54361
|
+
}), { handleOk: ee, confirming: te, deleteError: M, resetSubmitState: N } = Iz({
|
|
54296
54362
|
form: o,
|
|
54297
54363
|
config: t,
|
|
54298
54364
|
api: a,
|
|
@@ -54301,73 +54367,73 @@ function Iz({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
54301
54367
|
dynamicOptions: y,
|
|
54302
54368
|
extraData: x,
|
|
54303
54369
|
removedIds: l,
|
|
54304
|
-
removalOnlySubmit: !!t?.allowRemovalOnlySubmit &&
|
|
54370
|
+
removalOnlySubmit: !!t?.allowRemovalOnlySubmit && A && !j,
|
|
54305
54371
|
fields: _,
|
|
54306
|
-
onClose:
|
|
54372
|
+
onClose: E,
|
|
54307
54373
|
onSubmit: i
|
|
54308
54374
|
});
|
|
54309
54375
|
F(() => {
|
|
54310
|
-
e && (o.resetFields(), c(v ?? {}), u(f.removedIds ?? []),
|
|
54376
|
+
e && (o.resetFields(), c(v ?? {}), u(f.removedIds ?? []), N());
|
|
54311
54377
|
}, [e, v]);
|
|
54312
|
-
let
|
|
54378
|
+
let ne = !!t?.autoSubmitWhenNoFields && _.length === 0;
|
|
54313
54379
|
F(() => {
|
|
54314
|
-
!e || !
|
|
54315
|
-
}, [e,
|
|
54316
|
-
let
|
|
54317
|
-
if (!t || !e ||
|
|
54318
|
-
let
|
|
54319
|
-
return
|
|
54380
|
+
!e || !ne || ee();
|
|
54381
|
+
}, [e, ne]);
|
|
54382
|
+
let re = p.length, ie = String(h).replace(/s$/i, ""), ae = re === 1 ? ie : h, oe = m[0] ?? {}, se = t?.getTitleText ? t.getTitleText(re, ae, oe, f) : t?.title, ce = re === 1 ? oe.jobTitle ?? oe.title ?? oe.name ?? oe.fullName ?? oe.candidateName ?? null : null, le = t?.getBodyText ? t.getBodyText(re, ie, ae, ce, f) : t?.bodyText ?? null, ue = typeof t?.getNote == "function" ? t.getNote(f) : t?.note, de = t?.disabledUntilFilled && !O && !A;
|
|
54383
|
+
if (!t || !e || ne) return null;
|
|
54384
|
+
let fe = t.component;
|
|
54385
|
+
return fe ? /* @__PURE__ */ Y(Sa, {
|
|
54320
54386
|
open: e,
|
|
54321
54387
|
title: t.title || t.getTitleText ? /* @__PURE__ */ Y(OR, {
|
|
54322
|
-
titleText:
|
|
54388
|
+
titleText: se,
|
|
54323
54389
|
titleIcon: t.titleIcon
|
|
54324
54390
|
}) : null,
|
|
54325
54391
|
footer: null,
|
|
54326
54392
|
width: t.width ?? 760,
|
|
54327
54393
|
centered: !0,
|
|
54328
54394
|
maskClosable: !1,
|
|
54329
|
-
onCancel: () =>
|
|
54395
|
+
onCancel: () => E(),
|
|
54330
54396
|
className: `dynamic-popup${t.className ? ` ${t.className}` : ""}`,
|
|
54331
|
-
children: /* @__PURE__ */ Y(
|
|
54397
|
+
children: /* @__PURE__ */ Y(fe, {
|
|
54332
54398
|
context: f,
|
|
54333
54399
|
selectedIds: g,
|
|
54334
54400
|
selectedRecords: m,
|
|
54335
54401
|
moduleName: h,
|
|
54336
|
-
onClose:
|
|
54402
|
+
onClose: E
|
|
54337
54403
|
})
|
|
54338
54404
|
}) : /* @__PURE__ */ X(Sa, {
|
|
54339
54405
|
open: e,
|
|
54340
54406
|
title: /* @__PURE__ */ Y(OR, {
|
|
54341
|
-
titleText:
|
|
54407
|
+
titleText: se,
|
|
54342
54408
|
titleIcon: t.titleIcon
|
|
54343
54409
|
}),
|
|
54344
54410
|
okText: t.okText || "OK",
|
|
54345
54411
|
cancelText: t.cancelText ?? "Cancel",
|
|
54346
|
-
onOk:
|
|
54347
|
-
onCancel: () =>
|
|
54412
|
+
onOk: ee,
|
|
54413
|
+
onCancel: () => E(),
|
|
54348
54414
|
okButtonProps: {
|
|
54349
54415
|
danger: t.okButtonDanger,
|
|
54350
|
-
disabled:
|
|
54351
|
-
loading:
|
|
54416
|
+
disabled: de,
|
|
54417
|
+
loading: te
|
|
54352
54418
|
},
|
|
54353
|
-
cancelButtonProps: { disabled:
|
|
54354
|
-
closable: !
|
|
54419
|
+
cancelButtonProps: { disabled: te },
|
|
54420
|
+
closable: !te,
|
|
54355
54421
|
maskClosable: !1,
|
|
54356
54422
|
width: t.width ?? 480,
|
|
54357
54423
|
centered: !0,
|
|
54358
54424
|
className: `dynamic-popup${t.className ? ` ${t.className}` : ""}`,
|
|
54359
54425
|
children: [
|
|
54360
54426
|
/* @__PURE__ */ Y(kR, {
|
|
54361
|
-
note:
|
|
54427
|
+
note: ue,
|
|
54362
54428
|
description: t.description,
|
|
54363
54429
|
showSelectedCount: t.showSelectedCount,
|
|
54364
|
-
count:
|
|
54365
|
-
itemLabel:
|
|
54366
|
-
bodyText:
|
|
54367
|
-
deleteError:
|
|
54430
|
+
count: re,
|
|
54431
|
+
itemLabel: ae,
|
|
54432
|
+
bodyText: le,
|
|
54433
|
+
deleteError: M
|
|
54368
54434
|
}),
|
|
54369
54435
|
/* @__PURE__ */ Y(AR, { footerNote: t.footerNote }),
|
|
54370
|
-
/* @__PURE__ */ Y(
|
|
54436
|
+
/* @__PURE__ */ Y(hz, {
|
|
54371
54437
|
form: o,
|
|
54372
54438
|
fields: _,
|
|
54373
54439
|
initialValues: v,
|
|
@@ -54379,8 +54445,9 @@ function Iz({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
54379
54445
|
onRemoveAssigned: a.removeAssignedUser ? (e) => a.removeAssignedUser(e, f) : void 0,
|
|
54380
54446
|
showAlreadyAssigned: t.showAlreadyAssigned,
|
|
54381
54447
|
onValuesChange: c,
|
|
54382
|
-
getSearchHandler:
|
|
54383
|
-
|
|
54448
|
+
getSearchHandler: w,
|
|
54449
|
+
searchLoading: C,
|
|
54450
|
+
getMentionSearchHandler: T,
|
|
54384
54451
|
mentionOptions: S
|
|
54385
54452
|
})
|
|
54386
54453
|
]
|
|
@@ -54388,7 +54455,7 @@ function Iz({ open: e = !0, config: t, context: n = {}, onClose: r, onSubmit: i,
|
|
|
54388
54455
|
}
|
|
54389
54456
|
//#endregion
|
|
54390
54457
|
//#region src/components/popups/definitions/delete/config.js
|
|
54391
|
-
var
|
|
54458
|
+
var zz = {
|
|
54392
54459
|
mode: "delete",
|
|
54393
54460
|
getTitleText: (e, t) => `Delete ${e > 0 ? `${e} ` : ""}${t}`,
|
|
54394
54461
|
titleIcon: "delete",
|
|
@@ -54398,19 +54465,19 @@ var Lz = {
|
|
|
54398
54465
|
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}?`,
|
|
54399
54466
|
footerNote: "This action cannot be undone.",
|
|
54400
54467
|
fields: []
|
|
54401
|
-
},
|
|
54468
|
+
}, Bz = { deleteItems: async (e, t) => {
|
|
54402
54469
|
await Pc(t.moduleName, e);
|
|
54403
|
-
} },
|
|
54404
|
-
async function
|
|
54405
|
-
return e ? (
|
|
54470
|
+
} }, Vz = /* @__PURE__ */ new Map();
|
|
54471
|
+
async function Hz(e) {
|
|
54472
|
+
return e ? (Vz.has(e) || Vz.set(e, qi({ module: e }).catch((t) => (Vz.delete(e), console.warn(`[in-progress gate] could not read ${e} form groups:`, t), []))), Vz.get(e)) : [];
|
|
54406
54473
|
}
|
|
54407
|
-
function
|
|
54474
|
+
function Uz(e = [], t) {
|
|
54408
54475
|
return e.some((e) => {
|
|
54409
54476
|
let n = Ee(e, t);
|
|
54410
54477
|
return n && n.severity !== "allow";
|
|
54411
54478
|
});
|
|
54412
54479
|
}
|
|
54413
|
-
async function
|
|
54480
|
+
async function Wz({ targetModule: e, sourceModule: t, recordId: n, region: r } = {}) {
|
|
54414
54481
|
let i = {
|
|
54415
54482
|
severity: "allow",
|
|
54416
54483
|
message: "",
|
|
@@ -54419,8 +54486,8 @@ async function Hz({ targetModule: e, sourceModule: t, recordId: n, region: r } =
|
|
|
54419
54486
|
if (!e || !t || !n) return i;
|
|
54420
54487
|
let a = r ?? Vr().region;
|
|
54421
54488
|
try {
|
|
54422
|
-
let r = await
|
|
54423
|
-
if (!
|
|
54489
|
+
let r = await Hz(e);
|
|
54490
|
+
if (!Uz(r, a)) return i;
|
|
54424
54491
|
let o = await qi({
|
|
54425
54492
|
module: t,
|
|
54426
54493
|
id: n
|
|
@@ -54436,13 +54503,13 @@ async function Hz({ targetModule: e, sourceModule: t, recordId: n, region: r } =
|
|
|
54436
54503
|
}
|
|
54437
54504
|
//#endregion
|
|
54438
54505
|
//#region src/components/popups/definitions/quick-submit/api.js
|
|
54439
|
-
var
|
|
54506
|
+
var Gz = "Already submitted", Kz = "submissions", qz = "candidates", Jz = 864e5, Yz = 90, Xz = "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.", Zz = [
|
|
54440
54507
|
"createdAt",
|
|
54441
54508
|
"createdDate",
|
|
54442
54509
|
"dateCreated",
|
|
54443
54510
|
"created_on",
|
|
54444
54511
|
"createdOn"
|
|
54445
|
-
],
|
|
54512
|
+
], Qz = [
|
|
54446
54513
|
"updatedAt",
|
|
54447
54514
|
"updatedDate",
|
|
54448
54515
|
"lastUpdatedAt",
|
|
@@ -54450,7 +54517,7 @@ var Uz = "Already submitted", Wz = "submissions", Gz = "candidates", Kz = 864e5,
|
|
|
54450
54517
|
"modifiedAt",
|
|
54451
54518
|
"modifiedDate"
|
|
54452
54519
|
];
|
|
54453
|
-
function
|
|
54520
|
+
function $z(e, t) {
|
|
54454
54521
|
for (let n of t) {
|
|
54455
54522
|
let t = e?.[n];
|
|
54456
54523
|
if (!t) continue;
|
|
@@ -54459,27 +54526,27 @@ function Zz(e, t) {
|
|
|
54459
54526
|
}
|
|
54460
54527
|
return null;
|
|
54461
54528
|
}
|
|
54462
|
-
function
|
|
54463
|
-
return
|
|
54529
|
+
function eB(e) {
|
|
54530
|
+
return $z(e, Zz);
|
|
54464
54531
|
}
|
|
54465
|
-
function
|
|
54466
|
-
return
|
|
54532
|
+
function tB(e) {
|
|
54533
|
+
return $z(e, Qz);
|
|
54467
54534
|
}
|
|
54468
|
-
function
|
|
54535
|
+
function nB(e) {
|
|
54469
54536
|
if (!(e instanceof Date) || Number.isNaN(e.getTime())) return null;
|
|
54470
54537
|
let t = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime();
|
|
54471
|
-
return Math.max(0, Math.floor((t(/* @__PURE__ */ new Date()) - t(e)) /
|
|
54538
|
+
return Math.max(0, Math.floor((t(/* @__PURE__ */ new Date()) - t(e)) / Jz));
|
|
54472
54539
|
}
|
|
54473
|
-
function
|
|
54540
|
+
function rB(e) {
|
|
54474
54541
|
return e === null ? "" : e <= 14 ? "green" : e <= 89 ? "yellow" : "red";
|
|
54475
54542
|
}
|
|
54476
|
-
function
|
|
54543
|
+
function iB(e, t = Yz) {
|
|
54477
54544
|
if (!e) return !1;
|
|
54478
|
-
let n = Date.now() - t *
|
|
54545
|
+
let n = Date.now() - t * Jz, r = eB(e), i = tB(e), a = r && r.getTime() >= n, o = i && i.getTime() >= n;
|
|
54479
54546
|
return !a && !o;
|
|
54480
54547
|
}
|
|
54481
|
-
function
|
|
54482
|
-
let t =
|
|
54548
|
+
function aB(e) {
|
|
54549
|
+
let t = eB(e);
|
|
54483
54550
|
if (!t) return {
|
|
54484
54551
|
createdAgo: "",
|
|
54485
54552
|
createdAgoTone: ""
|
|
@@ -54487,38 +54554,38 @@ function rB(e) {
|
|
|
54487
54554
|
let n = PR(t);
|
|
54488
54555
|
return n ? {
|
|
54489
54556
|
createdAgo: n,
|
|
54490
|
-
createdAgoTone:
|
|
54557
|
+
createdAgoTone: rB(nB(t))
|
|
54491
54558
|
} : {
|
|
54492
54559
|
createdAgo: "",
|
|
54493
54560
|
createdAgoTone: ""
|
|
54494
54561
|
};
|
|
54495
54562
|
}
|
|
54496
|
-
function
|
|
54563
|
+
function oB(e) {
|
|
54497
54564
|
return {
|
|
54498
54565
|
...e,
|
|
54499
|
-
...
|
|
54500
|
-
isStaleCandidate:
|
|
54566
|
+
...aB(e),
|
|
54567
|
+
isStaleCandidate: iB(e)
|
|
54501
54568
|
};
|
|
54502
54569
|
}
|
|
54503
|
-
function
|
|
54570
|
+
function sB(e) {
|
|
54504
54571
|
return String(e?.applicantId ?? e?._id ?? e?.id ?? "");
|
|
54505
54572
|
}
|
|
54506
|
-
var
|
|
54507
|
-
async function
|
|
54508
|
-
return
|
|
54573
|
+
var cB = null;
|
|
54574
|
+
async function lB() {
|
|
54575
|
+
return cB ||= zr(qz).then((e) => e?.strategies?.duplicateCheck?.editRoute ?? "").catch(() => ""), cB;
|
|
54509
54576
|
}
|
|
54510
|
-
async function
|
|
54511
|
-
let t =
|
|
54577
|
+
async function uB(e) {
|
|
54578
|
+
let t = sB(e);
|
|
54512
54579
|
if (!t) return "";
|
|
54513
|
-
let n = await
|
|
54580
|
+
let n = await lB();
|
|
54514
54581
|
return n ? n.replace(/:(_?id)\b/g, encodeURIComponent(t)) : "";
|
|
54515
54582
|
}
|
|
54516
|
-
async function
|
|
54517
|
-
let r = e?._raw ?? e ?? {}, i =
|
|
54583
|
+
async function dB({ option: e, popupContext: t, confirm: n }) {
|
|
54584
|
+
let r = e?._raw ?? e ?? {}, i = sB(r);
|
|
54518
54585
|
if (i) {
|
|
54519
|
-
let e = await
|
|
54520
|
-
targetModule:
|
|
54521
|
-
sourceModule:
|
|
54586
|
+
let e = await Wz({
|
|
54587
|
+
targetModule: Kz,
|
|
54588
|
+
sourceModule: qz,
|
|
54522
54589
|
recordId: i
|
|
54523
54590
|
});
|
|
54524
54591
|
if (e.severity === "block") return new Promise((t) => {
|
|
@@ -54532,34 +54599,34 @@ async function lB({ option: e, popupContext: t, confirm: n }) {
|
|
|
54532
54599
|
});
|
|
54533
54600
|
});
|
|
54534
54601
|
}
|
|
54535
|
-
if (!
|
|
54602
|
+
if (!iB(r)) return !0;
|
|
54536
54603
|
let a = t?.navigate;
|
|
54537
54604
|
return !a || !i ? !1 : new Promise((e) => {
|
|
54538
54605
|
n({
|
|
54539
54606
|
title: "Candidate update required",
|
|
54540
|
-
content:
|
|
54607
|
+
content: Xz,
|
|
54541
54608
|
okText: "OK",
|
|
54542
54609
|
cancelText: "Cancel",
|
|
54543
54610
|
onOk: async () => {
|
|
54544
|
-
let t = await
|
|
54611
|
+
let t = await uB(r);
|
|
54545
54612
|
t && a(t), e(!1);
|
|
54546
54613
|
},
|
|
54547
54614
|
onCancel: () => e(!1)
|
|
54548
54615
|
});
|
|
54549
54616
|
});
|
|
54550
54617
|
}
|
|
54551
|
-
function
|
|
54618
|
+
function fB(e, t, n) {
|
|
54552
54619
|
return {
|
|
54553
54620
|
...e,
|
|
54554
|
-
label: `${e.label} - ${
|
|
54621
|
+
label: `${e.label} - ${Gz}`,
|
|
54555
54622
|
disabled: !0,
|
|
54556
|
-
title: `${
|
|
54623
|
+
title: `${Gz}${t ? ` (submission ${t})` : ""}`,
|
|
54557
54624
|
alreadySubmitted: !0,
|
|
54558
54625
|
existingSubmissionId: t || "",
|
|
54559
54626
|
...n ? { submittedAt: n } : {}
|
|
54560
54627
|
};
|
|
54561
54628
|
}
|
|
54562
|
-
var
|
|
54629
|
+
var pB = {
|
|
54563
54630
|
searchOptions: async (e, t, n) => {
|
|
54564
54631
|
if (e.searchFetchKey === "quickSubmitJobList") {
|
|
54565
54632
|
let e = n.selectedRecords?.[0] ?? {}, r = e.id ?? e._id ?? n.selectedIds?.[0], i, a = !0;
|
|
@@ -54582,7 +54649,7 @@ var dB = {
|
|
|
54582
54649
|
_raw: e
|
|
54583
54650
|
}));
|
|
54584
54651
|
if (a) return o.map((e) => {
|
|
54585
|
-
if (e._raw?.isSubmitted || e._raw?.alreadySubmitted) return
|
|
54652
|
+
if (e._raw?.isSubmitted || e._raw?.alreadySubmitted) return fB(e, e._raw?.jobSubmissionId || "", e._raw?.submittedAt || "");
|
|
54586
54653
|
if (e._raw?.disable) {
|
|
54587
54654
|
let t = String(e._raw?.message ?? "").trim();
|
|
54588
54655
|
return {
|
|
@@ -54600,7 +54667,7 @@ var dB = {
|
|
|
54600
54667
|
}).catch(() => /* @__PURE__ */ new Map());
|
|
54601
54668
|
return o.map((e) => {
|
|
54602
54669
|
let t = s.get(String(e.value));
|
|
54603
|
-
return t ?
|
|
54670
|
+
return t ? fB(e, t.submissionId, t.submittedAt) : e;
|
|
54604
54671
|
});
|
|
54605
54672
|
}
|
|
54606
54673
|
if (e.searchFetchKey === "quickSubmitCandidates") {
|
|
@@ -54619,17 +54686,17 @@ var dB = {
|
|
|
54619
54686
|
});
|
|
54620
54687
|
i = Array.isArray(e) ? e : [], a = await cl({
|
|
54621
54688
|
jobId: r,
|
|
54622
|
-
applicantIds: i.map(
|
|
54689
|
+
applicantIds: i.map(sB)
|
|
54623
54690
|
}).catch(() => /* @__PURE__ */ new Map());
|
|
54624
54691
|
}
|
|
54625
|
-
return i.map((e) =>
|
|
54626
|
-
let t = a.get(
|
|
54692
|
+
return i.map((e) => oB(e)).map((e) => {
|
|
54693
|
+
let t = a.get(sB(e));
|
|
54627
54694
|
if (!(t || e?.isSubmitted === !0 || e?.alreadySubmitted === !0)) return e;
|
|
54628
54695
|
let n = t?.submissionId || e?.jobSubmissionId || "", r = t?.submittedAt || e?.submittedAt || "";
|
|
54629
54696
|
return {
|
|
54630
54697
|
...e,
|
|
54631
54698
|
disabled: !0,
|
|
54632
|
-
optionNote:
|
|
54699
|
+
optionNote: Gz,
|
|
54633
54700
|
isSubmitted: !0,
|
|
54634
54701
|
alreadySubmitted: !0,
|
|
54635
54702
|
existingSubmissionId: n,
|
|
@@ -54642,12 +54709,12 @@ var dB = {
|
|
|
54642
54709
|
submit: async (e, t, n) => {
|
|
54643
54710
|
let { navigate: r, selectedRecords: i = [], selectedIds: a = [], moduleName: o } = t, s = i[0] ?? {}, c, l;
|
|
54644
54711
|
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 ?? "");
|
|
54645
|
-
let u = n?.dynamicOptions?.candidate?.find((e) =>
|
|
54712
|
+
let u = n?.dynamicOptions?.candidate?.find((e) => sB(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;
|
|
54646
54713
|
if (!c || !l) throw Error("Select both a job and a candidate to quick submit.");
|
|
54647
|
-
if (
|
|
54648
|
-
let p = await
|
|
54649
|
-
targetModule:
|
|
54650
|
-
sourceModule:
|
|
54714
|
+
if (iB(u?._raw)) throw Error(Xz);
|
|
54715
|
+
let p = await Wz({
|
|
54716
|
+
targetModule: Kz,
|
|
54717
|
+
sourceModule: qz,
|
|
54651
54718
|
recordId: l
|
|
54652
54719
|
});
|
|
54653
54720
|
if (p.severity === "block") throw Error(p.message);
|
|
@@ -54672,7 +54739,7 @@ var dB = {
|
|
|
54672
54739
|
}).catch(() => []));
|
|
54673
54740
|
return r(`/submission-create/${c}?${g.toString()}`, { state: { relevantSkillsToken: v } }), { navigated: !0 };
|
|
54674
54741
|
}
|
|
54675
|
-
},
|
|
54742
|
+
}, mB = {
|
|
54676
54743
|
title: "Submit",
|
|
54677
54744
|
okText: "Submit",
|
|
54678
54745
|
width: 640,
|
|
@@ -54729,9 +54796,9 @@ var dB = {
|
|
|
54729
54796
|
type: "relative"
|
|
54730
54797
|
}]
|
|
54731
54798
|
},
|
|
54732
|
-
onSelectGuard:
|
|
54799
|
+
onSelectGuard: dB
|
|
54733
54800
|
}]
|
|
54734
|
-
},
|
|
54801
|
+
}, hB = {
|
|
54735
54802
|
title: "Add Notes & Share",
|
|
54736
54803
|
okText: "Save & Share",
|
|
54737
54804
|
width: 480,
|
|
@@ -54745,9 +54812,9 @@ var dB = {
|
|
|
54745
54812
|
placeholder: "Add your notes on the job. Use '@' to mention someone.",
|
|
54746
54813
|
mentionFetchKey: "mentionUsers"
|
|
54747
54814
|
}]
|
|
54748
|
-
},
|
|
54749
|
-
async function
|
|
54750
|
-
return
|
|
54815
|
+
}, gB = (e) => e?.data ?? e;
|
|
54816
|
+
async function _B({ relatedId: e, notes: t, title: n, notesFor: r }) {
|
|
54817
|
+
return gB(await hd(k, "/notes", {
|
|
54751
54818
|
method: "POST",
|
|
54752
54819
|
body: JSON.stringify({
|
|
54753
54820
|
relatedId: e,
|
|
@@ -54759,18 +54826,18 @@ async function hB({ relatedId: e, notes: t, title: n, notesFor: r }) {
|
|
|
54759
54826
|
}
|
|
54760
54827
|
//#endregion
|
|
54761
54828
|
//#region src/components/popups/definitions/add-notes/api.js
|
|
54762
|
-
var
|
|
54829
|
+
var vB = {
|
|
54763
54830
|
getMentionOptions: async (e, t) => Ic(t),
|
|
54764
54831
|
submit: async (e, t) => {
|
|
54765
54832
|
let n = Array.isArray(t.selectedIds) ? t.selectedIds[0] : t.selectedIds;
|
|
54766
54833
|
if (!n) throw Error("Please select a record before adding a note.");
|
|
54767
|
-
await
|
|
54834
|
+
await _B({
|
|
54768
54835
|
relatedId: String(n),
|
|
54769
54836
|
notes: e.notes,
|
|
54770
54837
|
notesFor: t.moduleName
|
|
54771
54838
|
});
|
|
54772
54839
|
}
|
|
54773
|
-
},
|
|
54840
|
+
}, yB = {
|
|
54774
54841
|
name: "jobId",
|
|
54775
54842
|
label: "Job Title / ID",
|
|
54776
54843
|
type: "search-select",
|
|
@@ -54781,7 +54848,7 @@ var gB = {
|
|
|
54781
54848
|
valueKey: "_id",
|
|
54782
54849
|
labelTemplate: "{jobReferenceId} - {jobTitle} — {jobRecruitmentStatus}",
|
|
54783
54850
|
initialOptionKey: "jobOption"
|
|
54784
|
-
},
|
|
54851
|
+
}, bB = {
|
|
54785
54852
|
name: "hiringStage",
|
|
54786
54853
|
label: "Hiring stage",
|
|
54787
54854
|
type: "select",
|
|
@@ -54795,22 +54862,22 @@ var gB = {
|
|
|
54795
54862
|
value: "pipeline"
|
|
54796
54863
|
}],
|
|
54797
54864
|
initialValueKey: "hiringStage"
|
|
54798
|
-
},
|
|
54865
|
+
}, xB = {
|
|
54799
54866
|
title: "Tag to Jobs",
|
|
54800
54867
|
okText: "Tag",
|
|
54801
54868
|
width: 480,
|
|
54802
54869
|
disabledUntilFilled: !0,
|
|
54803
54870
|
autoSubmitWhenNoFields: !0,
|
|
54804
|
-
getFields: (e) => e.jobId && e.hiringStage ? [] : [
|
|
54805
|
-
},
|
|
54806
|
-
function
|
|
54871
|
+
getFields: (e) => e.jobId && e.hiringStage ? [] : [yB, bB]
|
|
54872
|
+
}, SB = (e) => e?.data ?? e;
|
|
54873
|
+
function CB(e) {
|
|
54807
54874
|
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;
|
|
54808
54875
|
}
|
|
54809
|
-
function
|
|
54810
|
-
return e ? Array.isArray(e.data) ? e.data.map(
|
|
54876
|
+
function wB(e) {
|
|
54877
|
+
return e ? Array.isArray(e.data) ? e.data.map(CB) : e.stage && Array.isArray(e.stage.data) ? e.stage.data.map(CB) : Array.isArray(e) ? e.map(CB) : [] : [];
|
|
54811
54878
|
}
|
|
54812
|
-
async function
|
|
54813
|
-
let n = await x(k, `/workflow/list/all?page=${e}&limit=${t}`), r =
|
|
54879
|
+
async function TB(e = 1, t = 10) {
|
|
54880
|
+
let n = await x(k, `/workflow/list/all?page=${e}&limit=${t}`), r = SB(n), i = Array.isArray(r) ? r : r?.data ?? [];
|
|
54814
54881
|
return {
|
|
54815
54882
|
items: i,
|
|
54816
54883
|
total: Number(n?.total ?? r?.total) || i.length,
|
|
@@ -54818,11 +54885,11 @@ async function CB(e = 1, t = 10) {
|
|
|
54818
54885
|
limit: t
|
|
54819
54886
|
};
|
|
54820
54887
|
}
|
|
54821
|
-
async function
|
|
54822
|
-
let n =
|
|
54888
|
+
async function EB(e, t) {
|
|
54889
|
+
let n = SB(await x(k, `/workflow/${e}/stage/${t}`));
|
|
54823
54890
|
return Array.isArray(n) ? { data: n } : n;
|
|
54824
54891
|
}
|
|
54825
|
-
async function
|
|
54892
|
+
async function DB(e, t) {
|
|
54826
54893
|
if (!e || !t) return null;
|
|
54827
54894
|
try {
|
|
54828
54895
|
let n = new URLSearchParams({
|
|
@@ -54836,7 +54903,7 @@ async function TB(e, t) {
|
|
|
54836
54903
|
values: [String(t)],
|
|
54837
54904
|
operator: "and"
|
|
54838
54905
|
}])
|
|
54839
|
-
}), r =
|
|
54906
|
+
}), r = SB(await x(k, `/module-data-list?${n}`));
|
|
54840
54907
|
if (Array.isArray(r)) return r[0] ?? null;
|
|
54841
54908
|
if (r?.data && Array.isArray(r.data)) return r.data[0] ?? null;
|
|
54842
54909
|
let i = r?.rows ?? r?.records ?? r?.items ?? r?.list;
|
|
@@ -54845,15 +54912,15 @@ async function TB(e, t) {
|
|
|
54845
54912
|
return console.error(`[getModuleRecordById] failed: ${e}/${t}`, n), null;
|
|
54846
54913
|
}
|
|
54847
54914
|
}
|
|
54848
|
-
async function
|
|
54849
|
-
return
|
|
54915
|
+
async function OB(e) {
|
|
54916
|
+
return SB(await x(s, "/source/workflow-instance", {
|
|
54850
54917
|
method: "POST",
|
|
54851
54918
|
body: JSON.stringify(e)
|
|
54852
54919
|
}));
|
|
54853
54920
|
}
|
|
54854
54921
|
//#endregion
|
|
54855
54922
|
//#region src/components/popups/definitions/tag-to-job/api.js
|
|
54856
|
-
var
|
|
54923
|
+
var kB = {
|
|
54857
54924
|
pipeline: "pipeline",
|
|
54858
54925
|
goodfited: "goodfited",
|
|
54859
54926
|
contacted: "contacted",
|
|
@@ -54862,40 +54929,40 @@ var DB = {
|
|
|
54862
54929
|
interviewinprogress: "interviewInprogress",
|
|
54863
54930
|
selected: "selected"
|
|
54864
54931
|
};
|
|
54865
|
-
function
|
|
54932
|
+
function AB(e, ...t) {
|
|
54866
54933
|
for (let n of t) {
|
|
54867
54934
|
let t = String(n).split(".").reduce((e, t) => e?.[t], e);
|
|
54868
54935
|
if (t != null && t !== "") return t;
|
|
54869
54936
|
}
|
|
54870
54937
|
}
|
|
54871
|
-
function
|
|
54938
|
+
function jB(e) {
|
|
54872
54939
|
let t = String(e ?? "").trim();
|
|
54873
|
-
return t ?
|
|
54940
|
+
return t ? kB[t.toLowerCase()] ?? t : "";
|
|
54874
54941
|
}
|
|
54875
|
-
function
|
|
54876
|
-
let n =
|
|
54942
|
+
function MB(e, t) {
|
|
54943
|
+
let n = AB(e, "candidateId", "candidate_id", "applicantId", "applicantID", "applicantReferenceId", "applicantRefrenceId", "_id", "id") ?? t;
|
|
54877
54944
|
if (!n) return null;
|
|
54878
|
-
let r = (
|
|
54945
|
+
let r = (AB(e, "candidateName", "candidate_name", "fullName", "name") ?? [AB(e, "firstName", "first_name"), AB(e, "lastName", "last_name")].filter(Boolean).join(" ")) || void 0, i = {
|
|
54879
54946
|
candidateId: String(n),
|
|
54880
54947
|
candidateName: r,
|
|
54881
|
-
phone:
|
|
54882
|
-
source:
|
|
54883
|
-
submittedAt:
|
|
54884
|
-
remarks:
|
|
54885
|
-
assignedRecruiter:
|
|
54886
|
-
screeningStatus:
|
|
54887
|
-
screeningScore:
|
|
54888
|
-
assignedDate:
|
|
54948
|
+
phone: AB(e, "phone", "phoneNumber", "phone_number", "mobile", "mobileNumber", "mobile_number"),
|
|
54949
|
+
source: AB(e, "source", "sourceType", "candidateSource", "profileSource"),
|
|
54950
|
+
submittedAt: AB(e, "submittedAt", "lastSubmittedAt", "updatedAt"),
|
|
54951
|
+
remarks: AB(e, "remarks", "comment", "comments", "notes"),
|
|
54952
|
+
assignedRecruiter: AB(e, "assignedRecruiter", "recruiterName", "ownerName", "assignedToName"),
|
|
54953
|
+
screeningStatus: AB(e, "screeningStatus", "screening.status", "screeningResult"),
|
|
54954
|
+
screeningScore: AB(e, "screeningScore", "screening.score", "score"),
|
|
54955
|
+
assignedDate: AB(e, "assignedDate", "assignedAt", "createdAt")
|
|
54889
54956
|
};
|
|
54890
54957
|
return Object.fromEntries(Object.entries(i).filter(([, e]) => e != null && e !== ""));
|
|
54891
54958
|
}
|
|
54892
|
-
var
|
|
54959
|
+
var NB = {
|
|
54893
54960
|
searchOptions: async (e, t) => e.searchFetchKey === "tagToJobJobList" ? Fc(t) : [],
|
|
54894
54961
|
submit: async (e, t) => {
|
|
54895
|
-
let n = e.jobId ?? t.jobId, r = Array.isArray(n) ? n : [n].filter(Boolean), i =
|
|
54962
|
+
let n = e.jobId ?? t.jobId, r = Array.isArray(n) ? n : [n].filter(Boolean), i = jB(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);
|
|
54896
54963
|
for (let e of r) for (let t = 0; t < s; t += 1) {
|
|
54897
|
-
let n = a[t] ? String(a[t]) : "", r =
|
|
54898
|
-
await
|
|
54964
|
+
let n = a[t] ? String(a[t]) : "", r = MB(o[t] ?? {}, n);
|
|
54965
|
+
await OB({
|
|
54899
54966
|
jobId: e,
|
|
54900
54967
|
module: "jobs",
|
|
54901
54968
|
currentStage: i,
|
|
@@ -54910,7 +54977,7 @@ var jB = {
|
|
|
54910
54977
|
});
|
|
54911
54978
|
if (c?.status === !1) throw Error(c?.error || "Could not update hiring stage");
|
|
54912
54979
|
}
|
|
54913
|
-
},
|
|
54980
|
+
}, PB = {
|
|
54914
54981
|
title: "Change Status",
|
|
54915
54982
|
okText: "Apply",
|
|
54916
54983
|
width: 420,
|
|
@@ -54948,18 +55015,18 @@ var jB = {
|
|
|
54948
55015
|
};
|
|
54949
55016
|
//#endregion
|
|
54950
55017
|
//#region src/components/popups/definitions/change-status/api.js
|
|
54951
|
-
function
|
|
55018
|
+
function FB(e, t) {
|
|
54952
55019
|
let n = String(e ?? "").trim().toLowerCase();
|
|
54953
55020
|
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;
|
|
54954
55021
|
}
|
|
54955
|
-
var
|
|
54956
|
-
let r =
|
|
55022
|
+
var IB = { submit: async (e, t, n) => {
|
|
55023
|
+
let r = FB(e.status, n?.dynamicOptions), i = r?._raw ?? {}, a = {
|
|
54957
55024
|
clientSubmissionStatusText: String(i.name ?? r?.label ?? e.status ?? "").trim(),
|
|
54958
55025
|
clientSubmissionStatusId: Number(i.id ?? i.uniqueId ?? 0) || 0,
|
|
54959
55026
|
clientSubmissionStatusType: String(i.type ?? "").trim()
|
|
54960
55027
|
};
|
|
54961
55028
|
await Nc(t.moduleName, t.selectedIds, a);
|
|
54962
|
-
} },
|
|
55029
|
+
} }, LB = {
|
|
54963
55030
|
getTitleText: (e) => `Remove ${e > 1 ? `${e} Candidates` : "Candidate"} from Shortlist`,
|
|
54964
55031
|
titleIcon: "delete",
|
|
54965
55032
|
okText: "Remove",
|
|
@@ -54968,12 +55035,12 @@ var PB = { submit: async (e, t, n) => {
|
|
|
54968
55035
|
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?",
|
|
54969
55036
|
footerNote: "The candidate will be moved back to the pipeline.",
|
|
54970
55037
|
fields: []
|
|
54971
|
-
},
|
|
55038
|
+
}, RB = { onOk: async (e) => {
|
|
54972
55039
|
await ll({
|
|
54973
55040
|
jobId: e.jobId ?? e.selectedIds[0],
|
|
54974
55041
|
candidateIds: e.selectedIds
|
|
54975
55042
|
});
|
|
54976
|
-
} },
|
|
55043
|
+
} }, zB = {
|
|
54977
55044
|
title: "Add to Groups",
|
|
54978
55045
|
description: "Select a group to add the selected candidate(s) to",
|
|
54979
55046
|
okText: "Add to Group",
|
|
@@ -54987,7 +55054,7 @@ var PB = { submit: async (e, t, n) => {
|
|
|
54987
55054
|
placeholder: "Select a group",
|
|
54988
55055
|
fetchOptionsKey: "candidateGroups"
|
|
54989
55056
|
}]
|
|
54990
|
-
},
|
|
55057
|
+
}, BB = {
|
|
54991
55058
|
getOptions: async (e) => e.fetchOptionsKey === "candidateGroups" ? Vc() : [],
|
|
54992
55059
|
submit: async (e, t, { dynamicOptions: n }) => {
|
|
54993
55060
|
let r = (n.groupId ?? []).find((t) => String(t.value) === String(e.groupId));
|
|
@@ -54997,7 +55064,7 @@ var PB = { submit: async (e, t, n) => {
|
|
|
54997
55064
|
groupName: r?.label ?? ""
|
|
54998
55065
|
});
|
|
54999
55066
|
}
|
|
55000
|
-
},
|
|
55067
|
+
}, VB = [
|
|
55001
55068
|
{
|
|
55002
55069
|
title: "Name",
|
|
55003
55070
|
key: "name",
|
|
@@ -55016,7 +55083,7 @@ var PB = { submit: async (e, t, n) => {
|
|
|
55016
55083
|
render: (e) => e || "-"
|
|
55017
55084
|
}
|
|
55018
55085
|
];
|
|
55019
|
-
function
|
|
55086
|
+
function HB({ selectedIds: e, onClose: t }) {
|
|
55020
55087
|
let n = e?.[0], [r, i] = L(!0), [a, o] = L(!1), [s, c] = L({
|
|
55021
55088
|
assignedUsers: [],
|
|
55022
55089
|
totalSubmissions: 0,
|
|
@@ -55080,7 +55147,7 @@ function BB({ selectedIds: e, onClose: t }) {
|
|
|
55080
55147
|
children: "Team Members Allocated"
|
|
55081
55148
|
}),
|
|
55082
55149
|
/* @__PURE__ */ Y(Fa, {
|
|
55083
|
-
columns:
|
|
55150
|
+
columns: VB,
|
|
55084
55151
|
dataSource: m,
|
|
55085
55152
|
pagination: !1,
|
|
55086
55153
|
rowKey: (e) => e.user_id ?? `${e.first_name}-${e.last_name}`,
|
|
@@ -55129,25 +55196,25 @@ function BB({ selectedIds: e, onClose: t }) {
|
|
|
55129
55196
|
})]
|
|
55130
55197
|
});
|
|
55131
55198
|
}
|
|
55132
|
-
|
|
55199
|
+
HB.propTypes = {
|
|
55133
55200
|
selectedIds: Z.array,
|
|
55134
55201
|
onClose: Z.func
|
|
55135
55202
|
};
|
|
55136
55203
|
//#endregion
|
|
55137
55204
|
//#region src/components/popups/definitions/self-assign/config.js
|
|
55138
|
-
var
|
|
55205
|
+
var UB = {
|
|
55139
55206
|
title: "Self Assign",
|
|
55140
55207
|
width: 480,
|
|
55141
55208
|
className: "self-assign-modal",
|
|
55142
|
-
component:
|
|
55143
|
-
},
|
|
55209
|
+
component: HB
|
|
55210
|
+
}, WB = { submit: async () => {} };
|
|
55144
55211
|
//#endregion
|
|
55145
55212
|
//#region src/components/popups/definitions/others-assign/config.js
|
|
55146
|
-
function
|
|
55213
|
+
function GB(e = {}) {
|
|
55147
55214
|
let t = Array.isArray(e.jobPayDetails) ? e.jobPayDetails[e.jobPayDetails.length - 1] : e.jobPayDetails ?? e.clientBudget ?? {}, n = Number(t.clientBudgetEnd), r = Number(t.clientBudgetStart);
|
|
55148
55215
|
return Number.isFinite(n) && n > 0 ? n : Number.isFinite(r) && r > 0 ? r : null;
|
|
55149
55216
|
}
|
|
55150
|
-
var
|
|
55217
|
+
var KB = {
|
|
55151
55218
|
getTitleText: (e, t, n) => {
|
|
55152
55219
|
let r = n?.jobTitle || n?.title || "";
|
|
55153
55220
|
return r ? `Assign - ${r}` : "Assign";
|
|
@@ -55157,7 +55224,7 @@ var WB = {
|
|
|
55157
55224
|
disabledUntilFilled: !0,
|
|
55158
55225
|
showAlreadyAssigned: !0,
|
|
55159
55226
|
allowRemovalOnlySubmit: !0,
|
|
55160
|
-
getFields: (e) => (
|
|
55227
|
+
getFields: (e) => (GB(e?.selectedRecords?.[0] ?? {}), [{
|
|
55161
55228
|
name: "assignToUserId",
|
|
55162
55229
|
label: "Assign to",
|
|
55163
55230
|
type: "multi-select",
|
|
@@ -55165,7 +55232,7 @@ var WB = {
|
|
|
55165
55232
|
placeholder: "Select recruiter(s)",
|
|
55166
55233
|
fetchOptionsKey: "assignToUsers"
|
|
55167
55234
|
}])
|
|
55168
|
-
},
|
|
55235
|
+
}, qB = {
|
|
55169
55236
|
getOptions: async (e, t, n) => e.fetchOptionsKey === "assignToUsers" ? Kc(n?.selectedIds?.[0]) : [],
|
|
55170
55237
|
loadExtraData: async (e) => Jc(e.selectedIds[0]),
|
|
55171
55238
|
removeAssignedUser: async ({ id: e }, t) => Yc({
|
|
@@ -55180,7 +55247,7 @@ var WB = {
|
|
|
55180
55247
|
existingRecruiters: r?.recruitersData
|
|
55181
55248
|
});
|
|
55182
55249
|
}
|
|
55183
|
-
},
|
|
55250
|
+
}, JB = {
|
|
55184
55251
|
title: "Add Sticky Notes",
|
|
55185
55252
|
getTitleText: (e, t, n, r) => r.editingNoteId ? "Edit Sticky Notes" : "Add Sticky Notes",
|
|
55186
55253
|
okText: "Save",
|
|
@@ -55212,7 +55279,7 @@ var WB = {
|
|
|
55212
55279
|
initialValueKey: "editingComments"
|
|
55213
55280
|
}
|
|
55214
55281
|
]
|
|
55215
|
-
},
|
|
55282
|
+
}, YB = {
|
|
55216
55283
|
getMentionOptions: async (e, t) => Ic(t),
|
|
55217
55284
|
submit: async (e, t) => {
|
|
55218
55285
|
let n = e.targetDate ? e.targetDate.toISOString() : "";
|
|
@@ -55228,7 +55295,7 @@ var WB = {
|
|
|
55228
55295
|
notes: e.comments
|
|
55229
55296
|
}), window.dispatchEvent(new Event("sticky-notes:refresh"));
|
|
55230
55297
|
}
|
|
55231
|
-
},
|
|
55298
|
+
}, XB = {
|
|
55232
55299
|
title: "Move to Onboarding",
|
|
55233
55300
|
bodyText: "Are you sure you want to move this candidate to onboarding?",
|
|
55234
55301
|
okText: "Yes",
|
|
@@ -55241,7 +55308,7 @@ var WB = {
|
|
|
55241
55308
|
type: "priority-checkbox",
|
|
55242
55309
|
checkboxLabel: "Send Onboarding Email"
|
|
55243
55310
|
}]
|
|
55244
|
-
},
|
|
55311
|
+
}, ZB = { submit: async (e, t) => {
|
|
55245
55312
|
await el({
|
|
55246
55313
|
submissionId: t.selectedRecords?.[0]?.submissionId,
|
|
55247
55314
|
isMail: e.sendOnboardingEmail
|
|
@@ -55249,39 +55316,39 @@ var WB = {
|
|
|
55249
55316
|
} };
|
|
55250
55317
|
//#endregion
|
|
55251
55318
|
//#region src/components/popups/definitions/approve-rate/config.js
|
|
55252
|
-
function
|
|
55319
|
+
function QB(e) {
|
|
55253
55320
|
return Array.isArray(e) ? e[e.length - 1] ?? {} : e && typeof e == "object" ? e : {};
|
|
55254
55321
|
}
|
|
55255
|
-
var
|
|
55322
|
+
var $B = {
|
|
55256
55323
|
USD: "$",
|
|
55257
55324
|
INR: "₹",
|
|
55258
55325
|
EUR: "€",
|
|
55259
55326
|
GBP: "£"
|
|
55260
55327
|
};
|
|
55261
|
-
function
|
|
55262
|
-
let r =
|
|
55328
|
+
function eV(e, t, n) {
|
|
55329
|
+
let r = QB(e?.[t])[n];
|
|
55263
55330
|
if (r != null && r !== "") return r;
|
|
55264
55331
|
let i = e?.[`${t}.${n}`];
|
|
55265
55332
|
return i != null && i !== "" ? i : void 0;
|
|
55266
55333
|
}
|
|
55267
|
-
function
|
|
55268
|
-
let t = e.selectedRecords?.[0] ?? {}, n =
|
|
55334
|
+
function tV(e) {
|
|
55335
|
+
let t = e.selectedRecords?.[0] ?? {}, n = eV(t, "candidateRate", "candidateAcceptedRate") ?? eV(t, "candidateBudget", "candidateBudgetStart");
|
|
55269
55336
|
if (n === void 0 || Number(n) === 0) return null;
|
|
55270
|
-
let r =
|
|
55337
|
+
let r = eV(t, "candidateRate", "candidateAcceptedCurrency") ?? eV(t, "candidateBudget", "candidateBudgetCurrency");
|
|
55271
55338
|
return {
|
|
55272
55339
|
amount: n,
|
|
55273
|
-
symbol:
|
|
55274
|
-
unit:
|
|
55340
|
+
symbol: eV(t, "candidateRate", "candidateAcceptedCurrencySymbol") ?? eV(t, "candidateBudget", "candidateBudgetCurrencySymbol") ?? $B[String(r ?? "").toUpperCase()] ?? (r || "$"),
|
|
55341
|
+
unit: eV(t, "candidateRate", "candidateAcceptedPayUnit") ?? eV(t, "candidateBudget", "candidateBudgetUnit") ?? ""
|
|
55275
55342
|
};
|
|
55276
55343
|
}
|
|
55277
|
-
var
|
|
55344
|
+
var nV = {
|
|
55278
55345
|
title: "Approve Rate",
|
|
55279
55346
|
okText: "Approve",
|
|
55280
55347
|
width: 520,
|
|
55281
55348
|
className: "medium-modal",
|
|
55282
55349
|
successMessage: "Rate approved",
|
|
55283
55350
|
getBodyText: (e, t, n, r, i) => {
|
|
55284
|
-
let a =
|
|
55351
|
+
let a = tV(i);
|
|
55285
55352
|
return `Candidate Rate: ${a ? `${a.symbol}${a.amount}${a.unit ? `/${a.unit}` : ""}` : "-"}`;
|
|
55286
55353
|
},
|
|
55287
55354
|
fields: [
|
|
@@ -55295,7 +55362,7 @@ var eV = {
|
|
|
55295
55362
|
inlineRow: "proposedRate",
|
|
55296
55363
|
validator: (e, t) => {
|
|
55297
55364
|
if (e == null || e === "") return;
|
|
55298
|
-
let n =
|
|
55365
|
+
let n = tV(t);
|
|
55299
55366
|
if (n && Number(e) <= Number(n.amount)) return "Proposed rate must be greater than Candidate Rate";
|
|
55300
55367
|
}
|
|
55301
55368
|
},
|
|
@@ -55363,7 +55430,7 @@ var eV = {
|
|
|
55363
55430
|
}]
|
|
55364
55431
|
}
|
|
55365
55432
|
]
|
|
55366
|
-
},
|
|
55433
|
+
}, rV = { submit: async (e, t) => {
|
|
55367
55434
|
let n = t.selectedIds[0];
|
|
55368
55435
|
if (await tl(n, {
|
|
55369
55436
|
candidateProposedRate: e.candidateProposedRate,
|
|
@@ -55379,7 +55446,7 @@ var eV = {
|
|
|
55379
55446
|
} };
|
|
55380
55447
|
//#endregion
|
|
55381
55448
|
//#region src/services/mailApproveApi.js
|
|
55382
|
-
async function
|
|
55449
|
+
async function iV(e, t = {}) {
|
|
55383
55450
|
let n = E();
|
|
55384
55451
|
if (!n) {
|
|
55385
55452
|
let e = /* @__PURE__ */ Error("Authentication required");
|
|
@@ -55399,8 +55466,8 @@ async function nV(e, t = {}) {
|
|
|
55399
55466
|
}
|
|
55400
55467
|
return i.json();
|
|
55401
55468
|
}
|
|
55402
|
-
async function
|
|
55403
|
-
let t = await
|
|
55469
|
+
async function aV(e) {
|
|
55470
|
+
let t = await iV(`/mail-form?${new URLSearchParams({
|
|
55404
55471
|
submissionId: e,
|
|
55405
55472
|
submissionType: "manager"
|
|
55406
55473
|
}).toString()}`);
|
|
@@ -55408,15 +55475,15 @@ async function rV(e) {
|
|
|
55408
55475
|
}
|
|
55409
55476
|
//#endregion
|
|
55410
55477
|
//#region src/components/popups/definitions/manager-approve/managerApproveIdentity.js
|
|
55411
|
-
function
|
|
55478
|
+
function oV(...e) {
|
|
55412
55479
|
return e.map((e) => e == null ? "" : String(e).trim()).find(Boolean) ?? "";
|
|
55413
55480
|
}
|
|
55414
|
-
var
|
|
55415
|
-
function
|
|
55416
|
-
let r =
|
|
55417
|
-
return
|
|
55481
|
+
var sV = (e, t) => !!e && e.toLowerCase() === oV(t).toLowerCase();
|
|
55482
|
+
function cV(e, t, n) {
|
|
55483
|
+
let r = oV(t.submittedBy);
|
|
55484
|
+
return oV(sV(r, n) || sV(r, e.submitSource) || sV(r, e.supplierName) || sV(r, e.source) || sV(r, e.candidateSource) ? "" : r, e.recruitingUserName, e.recruitingUserEmail, e.signatureEmail);
|
|
55418
55485
|
}
|
|
55419
|
-
function
|
|
55486
|
+
function lV(e, t = {}) {
|
|
55420
55487
|
let n = qD(e, t.employerName);
|
|
55421
55488
|
return {
|
|
55422
55489
|
client: t.clientName ?? e.clientName,
|
|
@@ -55425,7 +55492,7 @@ function sV(e, t = {}) {
|
|
|
55425
55492
|
name: t.candidateName || [e.firstName, e.lastName].filter(Boolean).join(" ") || e.candidateFullName,
|
|
55426
55493
|
location: t.jobLocation ?? e.city ?? e.currentLocation ?? e.jobLocation,
|
|
55427
55494
|
vendor: n,
|
|
55428
|
-
submittedBy:
|
|
55495
|
+
submittedBy: cV(e, t, n),
|
|
55429
55496
|
submittedAt: t.createdAt ?? e.createdAt,
|
|
55430
55497
|
email: t.email ?? e.email,
|
|
55431
55498
|
employerLocation: t.employerLocation,
|
|
@@ -55434,29 +55501,29 @@ function sV(e, t = {}) {
|
|
|
55434
55501
|
}
|
|
55435
55502
|
//#endregion
|
|
55436
55503
|
//#region src/components/popups/definitions/manager-approve/ManagerApproveBody.jsx
|
|
55437
|
-
function
|
|
55504
|
+
function uV(e) {
|
|
55438
55505
|
return Array.isArray(e) ? e[e.length - 1] : e;
|
|
55439
55506
|
}
|
|
55440
|
-
function
|
|
55441
|
-
let t =
|
|
55507
|
+
function dV(e = {}) {
|
|
55508
|
+
let t = uV(e?.proposedRate)?.candidateProposedRate ?? e?.candidateProposedRate ?? e?.proposedRateValue, n = Number(t);
|
|
55442
55509
|
return Number.isFinite(n) ? n : 0;
|
|
55443
55510
|
}
|
|
55444
|
-
function
|
|
55445
|
-
let n =
|
|
55511
|
+
function fV(e, t = {}) {
|
|
55512
|
+
let n = uV((e?.record?.job ?? e?.job ?? t?.job ?? {})?.jobPayDetails) ?? {}, r = e?.record?.submission ?? t ?? {}, i = uV(r?.clientBudget) ?? r?.clientBudget ?? {}, a = n?.clientBudgetEnd ?? n?.clientBudgetStart ?? i?.clientBudgetEnd ?? i?.clientBudgetStart, o = Number(a);
|
|
55446
55513
|
return Number.isFinite(o) ? o : 0;
|
|
55447
55514
|
}
|
|
55448
|
-
function
|
|
55515
|
+
function pV(e = {}) {
|
|
55449
55516
|
let t = String(e?.currencyRaw ?? "").trim().toUpperCase(), n = String(e?.currency ?? "").trim();
|
|
55450
55517
|
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;
|
|
55451
55518
|
}
|
|
55452
|
-
function
|
|
55519
|
+
function mV(e = {}) {
|
|
55453
55520
|
return String(e?.rateUnit ?? "hr").trim().replace(/^\/+/, "") || "hr";
|
|
55454
55521
|
}
|
|
55455
|
-
function
|
|
55522
|
+
function hV(e, t = {}) {
|
|
55456
55523
|
let n = Number(e);
|
|
55457
|
-
return Number.isFinite(n) ? `${
|
|
55524
|
+
return Number.isFinite(n) ? `${pV(t)}${n}/${mV(t)}` : "";
|
|
55458
55525
|
}
|
|
55459
|
-
function
|
|
55526
|
+
function gV(e, t, n) {
|
|
55460
55527
|
if (n == null || n === "") return String(e ?? "");
|
|
55461
55528
|
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");
|
|
55462
55529
|
r = r.replace(o, (e, t, n, r) => (a = !0, `${t}${i}${r}`));
|
|
@@ -55467,23 +55534,23 @@ function mV(e, t, n) {
|
|
|
55467
55534
|
}
|
|
55468
55535
|
return r;
|
|
55469
55536
|
}
|
|
55470
|
-
function
|
|
55471
|
-
let a = Number(n?.proposedRate), o = Number.isFinite(a) ? a :
|
|
55537
|
+
function _V(e, t, n, r, i) {
|
|
55538
|
+
let a = Number(n?.proposedRate), o = Number.isFinite(a) ? a : dV(t), s = Number(n?.clientJobRate), c = Number.isFinite(s) && s > 0 ? s : fV(r, i), l = {
|
|
55472
55539
|
proposedRate: o,
|
|
55473
55540
|
jobBillRate: c
|
|
55474
55541
|
}, u = String(e ?? "").replace(/{{\.?((?:proposedRate)|(?:jobBillRate))}}/g, (e, t) => {
|
|
55475
55542
|
let n = l[t];
|
|
55476
55543
|
return n == null ? e : String(n);
|
|
55477
55544
|
});
|
|
55478
|
-
return u =
|
|
55545
|
+
return u = gV(u, "(?:Proposed\\s*Rate|Pay\\s*Rate)", hV(o, n)), u = gV(u, "(?:Job\\s*)?Bill\\s*Rate", hV(c, n)), u;
|
|
55479
55546
|
}
|
|
55480
|
-
function
|
|
55547
|
+
function vV(e) {
|
|
55481
55548
|
let t = e?.$oid ?? e?._id?.$oid ?? e?._id ?? e?.id?.$oid ?? e?.id ?? e;
|
|
55482
55549
|
if (t == null || typeof t == "object") return "";
|
|
55483
55550
|
let n = String(t).trim();
|
|
55484
55551
|
return /^[a-f\d]{24}$/i.test(n) ? n : "";
|
|
55485
55552
|
}
|
|
55486
|
-
function
|
|
55553
|
+
function yV(...e) {
|
|
55487
55554
|
for (let t of e) {
|
|
55488
55555
|
let e = [
|
|
55489
55556
|
t?.jobId,
|
|
@@ -55506,12 +55573,12 @@ function _V(...e) {
|
|
|
55506
55573
|
t?.submission?.recordMeta?.jobId,
|
|
55507
55574
|
t?.submission?.recordMeta?.JobId,
|
|
55508
55575
|
t?.submission?.recordMeta?.job_id
|
|
55509
|
-
].map(
|
|
55576
|
+
].map(vV).find(Boolean);
|
|
55510
55577
|
if (e) return e;
|
|
55511
55578
|
}
|
|
55512
55579
|
return "";
|
|
55513
55580
|
}
|
|
55514
|
-
function
|
|
55581
|
+
function bV(e) {
|
|
55515
55582
|
if (!e?.referralId) return {};
|
|
55516
55583
|
let t = Number(e.referralRate ?? e.referalRate ?? 0) || 0, n = String(e.referralType ?? e.referalType ?? "RECURRING").trim() || "RECURRING", r = e.referralId ?? e.referalId;
|
|
55517
55584
|
return {
|
|
@@ -55537,10 +55604,10 @@ function vV(e) {
|
|
|
55537
55604
|
}
|
|
55538
55605
|
};
|
|
55539
55606
|
}
|
|
55540
|
-
function
|
|
55607
|
+
function xV(e = "") {
|
|
55541
55608
|
return String(e ?? "").replace(/map\[[^\]]*(?:resume|document|attachment|file)[^\]]*\]/gi, "").replace(/<p>\s*<\/p>/gi, "").replace(/(?:<br\s*\/?>\s*){3,}/gi, "<br><br>").trim();
|
|
55542
55609
|
}
|
|
55543
|
-
function
|
|
55610
|
+
function SV(...e) {
|
|
55544
55611
|
for (let t of e) {
|
|
55545
55612
|
let e = [
|
|
55546
55613
|
t?.candidateId,
|
|
@@ -55551,12 +55618,12 @@ function bV(...e) {
|
|
|
55551
55618
|
t?.submission?.applicantId,
|
|
55552
55619
|
t?.recordMeta?.candidateId,
|
|
55553
55620
|
t?.recordMeta?.applicantId
|
|
55554
|
-
].map(
|
|
55621
|
+
].map(vV).find(Boolean);
|
|
55555
55622
|
if (e) return e;
|
|
55556
55623
|
}
|
|
55557
55624
|
return "";
|
|
55558
55625
|
}
|
|
55559
|
-
async function
|
|
55626
|
+
async function CV(e) {
|
|
55560
55627
|
let t = e?.fileUrl ?? e?.downloadUrl ?? e?.url;
|
|
55561
55628
|
if (!t) return null;
|
|
55562
55629
|
let n = await fetch(t);
|
|
@@ -55564,34 +55631,34 @@ async function xV(e) {
|
|
|
55564
55631
|
let r = await n.blob(), i = e?.fileName ?? e?.uploadedFileName ?? e?.originalName ?? e?.uniqueName ?? "resume";
|
|
55565
55632
|
return new File([r], i, { type: e?.contentType || r.type || "application/octet-stream" });
|
|
55566
55633
|
}
|
|
55567
|
-
async function
|
|
55634
|
+
async function wV(e, t, n) {
|
|
55568
55635
|
let r = [], i = await nt("submissions", e, "resume").catch(() => ({ data: [] }));
|
|
55569
55636
|
r.push(...i?.data ?? []);
|
|
55570
|
-
let a =
|
|
55637
|
+
let a = SV(t?.record?.submission, n, t?.record);
|
|
55571
55638
|
if (!a) {
|
|
55572
55639
|
let t = await x(k, `/module/list?module=submissions&id=${encodeURIComponent(e)}`).catch(() => ({})), n = t?.data ?? t ?? {};
|
|
55573
|
-
a =
|
|
55640
|
+
a = SV((Array.isArray(n?.data) ? n.data : Array.isArray(n) ? n : [])[0]);
|
|
55574
55641
|
}
|
|
55575
55642
|
if (a) {
|
|
55576
55643
|
let e = await nt("candidates", a, "resume").catch(() => ({ data: [] }));
|
|
55577
55644
|
r.push(...e?.data ?? []);
|
|
55578
55645
|
}
|
|
55579
|
-
let o = (await Promise.all(r.map(
|
|
55646
|
+
let o = (await Promise.all(r.map(CV))).filter(Boolean), s = /* @__PURE__ */ new Set();
|
|
55580
55647
|
return o.filter((e) => {
|
|
55581
55648
|
let t = `${e.name}:${e.size}:${e.type}`;
|
|
55582
55649
|
return !s.has(t) && (s.add(t), !0);
|
|
55583
55650
|
});
|
|
55584
55651
|
}
|
|
55585
|
-
function
|
|
55652
|
+
function TV(e = {}) {
|
|
55586
55653
|
return {
|
|
55587
55654
|
to: (e.to ?? e.To ?? []).map((e) => e.email ?? e.Email ?? e).filter(Boolean).join(", "),
|
|
55588
55655
|
cc: (e.cc ?? e.Cc ?? []).map((e) => e.email ?? e.Email ?? e).filter(Boolean).join(", "),
|
|
55589
55656
|
bcc: (e.bcc ?? e.Bcc ?? []).map((e) => e.email ?? e.Email ?? e).filter(Boolean).join(", "),
|
|
55590
55657
|
subject: e.subject ?? e.Subject ?? "",
|
|
55591
|
-
contents:
|
|
55658
|
+
contents: xV(e.content?.value ?? e.Content?.Value ?? e.contents ?? e.body ?? "")
|
|
55592
55659
|
};
|
|
55593
55660
|
}
|
|
55594
|
-
function
|
|
55661
|
+
function EV({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onClose: i }) {
|
|
55595
55662
|
let a = n?.[0] ?? {}, o = t?.[0] ?? TD(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, A] = L({
|
|
55596
55663
|
to: "",
|
|
55597
55664
|
cc: "",
|
|
@@ -55630,13 +55697,13 @@ function wV({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
|
|
|
55630
55697
|
if (h === "mail") {
|
|
55631
55698
|
m(!1), w(!0), E(!0);
|
|
55632
55699
|
try {
|
|
55633
|
-
let [e, t] = await Promise.all([
|
|
55700
|
+
let [e, t] = await Promise.all([aV(o).then(TV), wV(o, s, a).catch((e) => (console.warn("Unable to resolve resume attachment:", e), []))]), n = s?.record?.submission ?? a;
|
|
55634
55701
|
A({
|
|
55635
|
-
to:
|
|
55636
|
-
cc:
|
|
55637
|
-
bcc:
|
|
55638
|
-
subject:
|
|
55639
|
-
contents:
|
|
55702
|
+
to: _V(e.to, n, _, s, a),
|
|
55703
|
+
cc: _V(e.cc, n, _, s, a),
|
|
55704
|
+
bcc: _V(e.bcc, n, _, s, a),
|
|
55705
|
+
subject: _V(e.subject, n, _, s, a),
|
|
55706
|
+
contents: _V(e.contents, n, _, s, a),
|
|
55640
55707
|
attachments: t,
|
|
55641
55708
|
showCc: !!e.cc,
|
|
55642
55709
|
showBcc: !!e.bcc
|
|
@@ -55655,7 +55722,7 @@ function wV({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
|
|
|
55655
55722
|
candidateProposedRateCurrency: _.currencyRaw ?? _.currency,
|
|
55656
55723
|
candidateProposedRateUnit: _.rateUnit,
|
|
55657
55724
|
submitVia: "VMS",
|
|
55658
|
-
...
|
|
55725
|
+
...bV(y)
|
|
55659
55726
|
}), q.success("Submission approved"), m(!1), v(null), b(null), i?.({ success: !0 });
|
|
55660
55727
|
} catch (e) {
|
|
55661
55728
|
q.error(e?.message ?? "Unable to approve submission");
|
|
@@ -55677,9 +55744,9 @@ function wV({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
|
|
|
55677
55744
|
await tl(o, {
|
|
55678
55745
|
...e,
|
|
55679
55746
|
submitVia: "VMS",
|
|
55680
|
-
...
|
|
55747
|
+
...bV(y)
|
|
55681
55748
|
});
|
|
55682
|
-
let t =
|
|
55749
|
+
let t = yV(s?.record, a);
|
|
55683
55750
|
if (!t) q.warning("Submission approved, but job details were not available to send mail");
|
|
55684
55751
|
else try {
|
|
55685
55752
|
await sd({
|
|
@@ -55733,7 +55800,7 @@ function wV({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
|
|
|
55733
55800
|
type: $E,
|
|
55734
55801
|
record: s.record,
|
|
55735
55802
|
lookups: s.lookups,
|
|
55736
|
-
identity:
|
|
55803
|
+
identity: lV(a, s.display),
|
|
55737
55804
|
referralOptions: d,
|
|
55738
55805
|
currentUserId: typeof localStorage < "u" ? localStorage.getItem("userId") ?? void 0 : void 0,
|
|
55739
55806
|
actions: re,
|
|
@@ -55822,7 +55889,7 @@ function wV({ context: e, selectedIds: t, selectedRecords: n, moduleName: r, onC
|
|
|
55822
55889
|
})
|
|
55823
55890
|
] });
|
|
55824
55891
|
}
|
|
55825
|
-
|
|
55892
|
+
EV.propTypes = {
|
|
55826
55893
|
context: Z.object,
|
|
55827
55894
|
selectedIds: Z.array,
|
|
55828
55895
|
selectedRecords: Z.array,
|
|
@@ -55831,29 +55898,29 @@ wV.propTypes = {
|
|
|
55831
55898
|
};
|
|
55832
55899
|
//#endregion
|
|
55833
55900
|
//#region src/components/popups/definitions/manager-approve/config.js
|
|
55834
|
-
var
|
|
55901
|
+
var DV = {
|
|
55835
55902
|
title: "Manager Approve",
|
|
55836
55903
|
width: 780,
|
|
55837
55904
|
className: "fa-modal manager-approve-modal",
|
|
55838
|
-
component:
|
|
55839
|
-
},
|
|
55905
|
+
component: EV
|
|
55906
|
+
}, OV = { submit: async () => {} };
|
|
55840
55907
|
//#endregion
|
|
55841
55908
|
//#region src/components/popups/definitions/manager-reapprove/ManagerReapproveBody.jsx
|
|
55842
|
-
function
|
|
55909
|
+
function kV(e) {
|
|
55843
55910
|
let t = Array.isArray(e) ? e : [];
|
|
55844
55911
|
for (let e = t.length - 1; e >= 0; --e) if (String(t[e]?.activityType ?? "").trim().toLowerCase() === "cfo rejected") return t[e];
|
|
55845
55912
|
return null;
|
|
55846
55913
|
}
|
|
55847
|
-
function
|
|
55914
|
+
function AV(e) {
|
|
55848
55915
|
return String(e ?? "").toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase());
|
|
55849
55916
|
}
|
|
55850
|
-
function
|
|
55917
|
+
function jV({ selectedIds: e, selectedRecords: t, onClose: n }) {
|
|
55851
55918
|
let r = t?.[0] ?? {}, i = e?.[0] ?? TD(r), [a, o] = L(null), [s, c] = L(""), [l, u] = L(!0);
|
|
55852
55919
|
F(() => {
|
|
55853
55920
|
let e = !1;
|
|
55854
55921
|
return u(!0), Promise.all([yO(i, r), re("submission", i).catch(() => [])]).then(([t, n]) => {
|
|
55855
55922
|
if (e) return;
|
|
55856
|
-
let i =
|
|
55923
|
+
let i = kV(n);
|
|
55857
55924
|
c(TD(t?.meta?.workforceEngagementId ?? r?.onboarding?.workforceEngagementId ?? r?.workforceEngagementId));
|
|
55858
55925
|
let a = t?.meta?.rejectReasonComments || i?.activityComments || "";
|
|
55859
55926
|
o({
|
|
@@ -55862,7 +55929,7 @@ function kV({ selectedIds: e, selectedRecords: t, onClose: n }) {
|
|
|
55862
55929
|
...t.record,
|
|
55863
55930
|
submission: {
|
|
55864
55931
|
...t.record.submission,
|
|
55865
|
-
cfoRejectionReason: a ?
|
|
55932
|
+
cfoRejectionReason: a ? AV(a) : "",
|
|
55866
55933
|
cfoRejectedAt: t?.meta?.rejectedAt ?? i?.activityTime ?? null
|
|
55867
55934
|
}
|
|
55868
55935
|
}
|
|
@@ -55910,26 +55977,26 @@ function kV({ selectedIds: e, selectedRecords: t, onClose: n }) {
|
|
|
55910
55977
|
type: rD,
|
|
55911
55978
|
record: a.record,
|
|
55912
55979
|
lookups: a.lookups,
|
|
55913
|
-
identity:
|
|
55980
|
+
identity: lV(r, a.display),
|
|
55914
55981
|
currentUserId: typeof localStorage < "u" ? localStorage.getItem("userId") ?? void 0 : void 0,
|
|
55915
55982
|
actions: d,
|
|
55916
55983
|
onClose: () => n?.(),
|
|
55917
55984
|
variant: "popup"
|
|
55918
55985
|
});
|
|
55919
55986
|
}
|
|
55920
|
-
|
|
55987
|
+
jV.propTypes = {
|
|
55921
55988
|
selectedIds: Z.array,
|
|
55922
55989
|
selectedRecords: Z.array,
|
|
55923
55990
|
onClose: Z.func
|
|
55924
55991
|
};
|
|
55925
55992
|
//#endregion
|
|
55926
55993
|
//#region src/components/popups/definitions/manager-reapprove/config.js
|
|
55927
|
-
var
|
|
55994
|
+
var MV = {
|
|
55928
55995
|
title: "Re-Approve",
|
|
55929
55996
|
width: 780,
|
|
55930
55997
|
className: "fa-modal manager-approve-modal",
|
|
55931
|
-
component:
|
|
55932
|
-
},
|
|
55998
|
+
component: jV
|
|
55999
|
+
}, NV = { submit: async () => {} }, PV = [
|
|
55933
56000
|
{
|
|
55934
56001
|
id: 1,
|
|
55935
56002
|
name: "Re-Submission"
|
|
@@ -55942,7 +56009,7 @@ var AV = {
|
|
|
55942
56009
|
id: 3,
|
|
55943
56010
|
name: "Incomplete candidate details - (Re-Submission)"
|
|
55944
56011
|
}
|
|
55945
|
-
],
|
|
56012
|
+
], FV = {
|
|
55946
56013
|
title: "Reject",
|
|
55947
56014
|
okText: "Reject",
|
|
55948
56015
|
okButtonDanger: !0,
|
|
@@ -55954,7 +56021,7 @@ var AV = {
|
|
|
55954
56021
|
type: "select",
|
|
55955
56022
|
required: !0,
|
|
55956
56023
|
placeholder: "Select rejection reasons",
|
|
55957
|
-
defaultOptions:
|
|
56024
|
+
defaultOptions: PV.map((e) => ({
|
|
55958
56025
|
label: e.name,
|
|
55959
56026
|
value: e.id
|
|
55960
56027
|
}))
|
|
@@ -55965,88 +56032,88 @@ var AV = {
|
|
|
55965
56032
|
required: !0,
|
|
55966
56033
|
rows: 4
|
|
55967
56034
|
}]
|
|
55968
|
-
},
|
|
55969
|
-
let n =
|
|
56035
|
+
}, IV = { submit: async (e, t) => {
|
|
56036
|
+
let n = PV.find((t) => String(t.id) === String(e.rejectReason));
|
|
55970
56037
|
await il({
|
|
55971
56038
|
submissionId: t.selectedIds[0],
|
|
55972
56039
|
rejectReasonId: e.rejectReason,
|
|
55973
56040
|
rejectReason: n?.name ?? "",
|
|
55974
56041
|
rejectReasonComments: e.rejectReasonComments
|
|
55975
56042
|
});
|
|
55976
|
-
} },
|
|
55977
|
-
delete:
|
|
55978
|
-
"quick-submit":
|
|
55979
|
-
"add-notes":
|
|
55980
|
-
"tag-to-job":
|
|
55981
|
-
"change-status": MB,
|
|
55982
|
-
"remove-from-shortlist": FB,
|
|
55983
|
-
"add-to-groups": LB,
|
|
55984
|
-
"self-assign": VB,
|
|
55985
|
-
"others-assign": WB,
|
|
55986
|
-
"sticky-notes": KB,
|
|
55987
|
-
"move-to-onboarding": JB,
|
|
55988
|
-
"approve-rate": eV,
|
|
55989
|
-
"manager-approve": TV,
|
|
55990
|
-
"manager-reapprove": AV,
|
|
55991
|
-
reject: NV
|
|
55992
|
-
}, IV = {
|
|
55993
|
-
delete: Rz,
|
|
55994
|
-
"quick-submit": dB,
|
|
55995
|
-
"add-notes": gB,
|
|
55996
|
-
"tag-to-job": jB,
|
|
56043
|
+
} }, LV = {
|
|
56044
|
+
delete: zz,
|
|
56045
|
+
"quick-submit": mB,
|
|
56046
|
+
"add-notes": hB,
|
|
56047
|
+
"tag-to-job": xB,
|
|
55997
56048
|
"change-status": PB,
|
|
55998
|
-
"remove-from-shortlist":
|
|
55999
|
-
"add-to-groups":
|
|
56000
|
-
"self-assign":
|
|
56001
|
-
"others-assign":
|
|
56002
|
-
"sticky-notes":
|
|
56003
|
-
"move-to-onboarding":
|
|
56004
|
-
"approve-rate":
|
|
56005
|
-
"manager-approve":
|
|
56006
|
-
"manager-reapprove":
|
|
56007
|
-
reject:
|
|
56049
|
+
"remove-from-shortlist": LB,
|
|
56050
|
+
"add-to-groups": zB,
|
|
56051
|
+
"self-assign": UB,
|
|
56052
|
+
"others-assign": KB,
|
|
56053
|
+
"sticky-notes": JB,
|
|
56054
|
+
"move-to-onboarding": XB,
|
|
56055
|
+
"approve-rate": nV,
|
|
56056
|
+
"manager-approve": DV,
|
|
56057
|
+
"manager-reapprove": MV,
|
|
56058
|
+
reject: FV
|
|
56059
|
+
}, RV = {
|
|
56060
|
+
delete: Bz,
|
|
56061
|
+
"quick-submit": pB,
|
|
56062
|
+
"add-notes": vB,
|
|
56063
|
+
"tag-to-job": NB,
|
|
56064
|
+
"change-status": IB,
|
|
56065
|
+
"remove-from-shortlist": RB,
|
|
56066
|
+
"add-to-groups": BB,
|
|
56067
|
+
"self-assign": WB,
|
|
56068
|
+
"others-assign": qB,
|
|
56069
|
+
"sticky-notes": YB,
|
|
56070
|
+
"move-to-onboarding": ZB,
|
|
56071
|
+
"approve-rate": rV,
|
|
56072
|
+
"manager-approve": OV,
|
|
56073
|
+
"manager-reapprove": NV,
|
|
56074
|
+
reject: IV
|
|
56008
56075
|
};
|
|
56009
56076
|
//#endregion
|
|
56010
56077
|
//#region src/components/popups/AddBatchCandidatePopup.jsx
|
|
56011
|
-
function
|
|
56078
|
+
function zV(e) {
|
|
56012
56079
|
let t = e?.data ?? e;
|
|
56013
56080
|
return Array.isArray(t) ? t : t?.data ?? t?.rows ?? t?.records ?? t?.items ?? t?.list ?? [];
|
|
56014
56081
|
}
|
|
56015
|
-
function
|
|
56082
|
+
function BV(e, ...t) {
|
|
56016
56083
|
for (let n of t) {
|
|
56017
56084
|
let t = String(n).split(".").reduce((e, t) => e?.[t], e);
|
|
56018
56085
|
if (t != null && t !== "") return t;
|
|
56019
56086
|
}
|
|
56020
56087
|
return "";
|
|
56021
56088
|
}
|
|
56022
|
-
function
|
|
56023
|
-
let t = String(
|
|
56089
|
+
function VV(e) {
|
|
56090
|
+
let t = String(BV(e, "isDeleted", "deleted")).toLowerCase(), n = String(BV(e, "assignmentStatus", "status")).toLowerCase();
|
|
56024
56091
|
return t !== "true" && t !== "1" && ![
|
|
56025
56092
|
"removed",
|
|
56026
56093
|
"inactive",
|
|
56027
56094
|
"deleted"
|
|
56028
56095
|
].includes(n);
|
|
56029
56096
|
}
|
|
56030
|
-
function BV(e) {
|
|
56031
|
-
let t = RV(e, "candidateName", "candidate_name", "fullName", "name");
|
|
56032
|
-
return t ? String(t) : [RV(e, "firstName", "first_name"), RV(e, "lastName", "last_name")].filter(Boolean).join(" ") || "Unnamed candidate";
|
|
56033
|
-
}
|
|
56034
|
-
function VV(e) {
|
|
56035
|
-
return String(RV(e, "candidateId", "candidate_id", "candidate._id", "candidate.id"));
|
|
56036
|
-
}
|
|
56037
56097
|
function HV(e) {
|
|
56038
|
-
|
|
56098
|
+
let t = BV(e, "candidateName", "candidate_name", "fullName", "name");
|
|
56099
|
+
return t ? String(t) : [BV(e, "firstName", "first_name"), BV(e, "lastName", "last_name")].filter(Boolean).join(" ") || "Unnamed candidate";
|
|
56039
56100
|
}
|
|
56040
56101
|
function UV(e) {
|
|
56041
|
-
return String(
|
|
56102
|
+
return String(BV(e, "candidateId", "candidate_id", "candidate._id", "candidate.id"));
|
|
56042
56103
|
}
|
|
56043
|
-
function WV(
|
|
56104
|
+
function WV(e) {
|
|
56105
|
+
return String(BV(e, "workforceEngagementId", "engagementId", "_id", "id"));
|
|
56106
|
+
}
|
|
56107
|
+
function GV(e) {
|
|
56108
|
+
return String(BV(e, "batchName", "name", "title", "batch_name"));
|
|
56109
|
+
}
|
|
56110
|
+
function KV({ open: e = !0, context: t = {}, onClose: n }) {
|
|
56044
56111
|
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 ?? "");
|
|
56045
56112
|
F(() => {
|
|
56046
56113
|
if (!e) return;
|
|
56047
56114
|
let t = !1;
|
|
56048
56115
|
return Promise.resolve().then(() => (t || u(!0), Promise.all([ce("onboarding", 200, 0), ce("batchCandidates", 1e3, 0).catch(() => [])]))).then(([e, n]) => {
|
|
56049
|
-
t || (i(
|
|
56116
|
+
t || (i(zV(e)), g(new Map(zV(n).filter(VV).map((e) => [String(BV(e, "candidateId", "candidate_id")), e]).filter(([e]) => e))));
|
|
56050
56117
|
}).catch((e) => {
|
|
56051
56118
|
t || m(e.message || "Unable to load onboarding candidates");
|
|
56052
56119
|
}).finally(() => {
|
|
@@ -56058,9 +56125,9 @@ function WV({ open: e = !0, context: t = {}, onClose: n }) {
|
|
|
56058
56125
|
let v = I(() => {
|
|
56059
56126
|
let e = s.trim().toLowerCase();
|
|
56060
56127
|
return e ? r.filter((t) => [
|
|
56061
|
-
|
|
56062
|
-
|
|
56063
|
-
|
|
56128
|
+
HV(t),
|
|
56129
|
+
BV(t, "email", "candidateEmail", "candidate_email"),
|
|
56130
|
+
BV(t, "status", "onboardingStatus", "onboarding_status")
|
|
56064
56131
|
].some((t) => String(t).toLowerCase().includes(e))) : r;
|
|
56065
56132
|
}, [r, s]);
|
|
56066
56133
|
async function y() {
|
|
@@ -56068,26 +56135,26 @@ function WV({ open: e = !0, context: t = {}, onClose: n }) {
|
|
|
56068
56135
|
m("Select a batch before adding candidates");
|
|
56069
56136
|
return;
|
|
56070
56137
|
}
|
|
56071
|
-
let e = r.filter((e) => a.includes(
|
|
56138
|
+
let e = r.filter((e) => a.includes(WV(e)));
|
|
56072
56139
|
if (!e.length) return;
|
|
56073
56140
|
let i = e.map((e) => ({
|
|
56074
56141
|
record: e,
|
|
56075
|
-
assignment: h.get(
|
|
56142
|
+
assignment: h.get(UV(e))
|
|
56076
56143
|
})).filter((e) => e.assignment);
|
|
56077
56144
|
if (i.length) {
|
|
56078
|
-
let e = i.map(({ record: e }) =>
|
|
56145
|
+
let e = i.map(({ record: e }) => HV(e)).join(", ");
|
|
56079
56146
|
m(`${e} ${i.length === 1 ? "is" : "are"} already added to a batch. Each candidate can be added to only one batch.`);
|
|
56080
56147
|
return;
|
|
56081
56148
|
}
|
|
56082
56149
|
f(!0), m("");
|
|
56083
56150
|
try {
|
|
56084
|
-
let { userId: r } = w(), i =
|
|
56151
|
+
let { userId: r } = w(), i = GV(t.selectedRecords?.[0]) || GV(t);
|
|
56085
56152
|
await Promise.all(e.map((e) => Lt("batchCandidates", {
|
|
56086
56153
|
schemaVersion: 1,
|
|
56087
56154
|
batchId: _,
|
|
56088
56155
|
batchName: i,
|
|
56089
|
-
candidateId:
|
|
56090
|
-
workforceEngagementId:
|
|
56156
|
+
candidateId: UV(e),
|
|
56157
|
+
workforceEngagementId: WV(e),
|
|
56091
56158
|
source: "ONBOARDING",
|
|
56092
56159
|
assignmentStatus: "ASSIGNED",
|
|
56093
56160
|
assignedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -56130,22 +56197,22 @@ function WV({ open: e = !0, context: t = {}, onClose: n }) {
|
|
|
56130
56197
|
style: { marginBottom: 12 }
|
|
56131
56198
|
}),
|
|
56132
56199
|
/* @__PURE__ */ Y(Fa, {
|
|
56133
|
-
rowKey: (e) =>
|
|
56200
|
+
rowKey: (e) => WV(e),
|
|
56134
56201
|
columns: [
|
|
56135
56202
|
{
|
|
56136
56203
|
title: "Candidate",
|
|
56137
56204
|
key: "candidate",
|
|
56138
|
-
render: (e, t) =>
|
|
56205
|
+
render: (e, t) => HV(t)
|
|
56139
56206
|
},
|
|
56140
56207
|
{
|
|
56141
56208
|
title: "Email",
|
|
56142
56209
|
key: "email",
|
|
56143
|
-
render: (e, t) =>
|
|
56210
|
+
render: (e, t) => BV(t, "email", "candidateEmail", "candidate_email") || "—"
|
|
56144
56211
|
},
|
|
56145
56212
|
{
|
|
56146
56213
|
title: "Onboarding status",
|
|
56147
56214
|
key: "status",
|
|
56148
|
-
render: (e, t) =>
|
|
56215
|
+
render: (e, t) => BV(t, "status", "onboardingStatus", "onboarding_status") || "—"
|
|
56149
56216
|
}
|
|
56150
56217
|
],
|
|
56151
56218
|
dataSource: v,
|
|
@@ -56159,9 +56226,9 @@ function WV({ open: e = !0, context: t = {}, onClose: n }) {
|
|
|
56159
56226
|
selectedRowKeys: a,
|
|
56160
56227
|
onChange: o,
|
|
56161
56228
|
getCheckboxProps: (e) => {
|
|
56162
|
-
let t = h.get(
|
|
56229
|
+
let t = h.get(UV(e));
|
|
56163
56230
|
return {
|
|
56164
|
-
disabled: !
|
|
56231
|
+
disabled: !UV(e) || !WV(e) || !!t,
|
|
56165
56232
|
title: t ? "Candidate is already added to a batch" : void 0
|
|
56166
56233
|
};
|
|
56167
56234
|
}
|
|
@@ -56173,7 +56240,7 @@ function WV({ open: e = !0, context: t = {}, onClose: n }) {
|
|
|
56173
56240
|
}
|
|
56174
56241
|
//#endregion
|
|
56175
56242
|
//#region src/components/popups/dynamic/DynamicPopupRoute.jsx
|
|
56176
|
-
var
|
|
56243
|
+
var qV = {
|
|
56177
56244
|
text: "input",
|
|
56178
56245
|
string: "input",
|
|
56179
56246
|
textarea: "textarea",
|
|
@@ -56182,30 +56249,30 @@ var GV = {
|
|
|
56182
56249
|
multiselect: "multi-select",
|
|
56183
56250
|
lookup: "search-select"
|
|
56184
56251
|
};
|
|
56185
|
-
function
|
|
56252
|
+
function JV(e) {
|
|
56186
56253
|
if (!e) return null;
|
|
56187
56254
|
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) => ({
|
|
56188
56255
|
...e,
|
|
56189
56256
|
name: e.name ?? e.field,
|
|
56190
56257
|
label: e.label ?? e.field,
|
|
56191
|
-
type:
|
|
56258
|
+
type: qV[String(e.type ?? "text").toLowerCase()] ?? e.type ?? "input",
|
|
56192
56259
|
required: e.required ?? e.req === 1,
|
|
56193
56260
|
options: (e.options ?? []).map((e) => ({
|
|
56194
56261
|
label: e.label ?? e.name ?? e.value,
|
|
56195
56262
|
value: e.value ?? e.id ?? e.label
|
|
56196
56263
|
}))
|
|
56197
|
-
}))), n =
|
|
56264
|
+
}))), n = YV(e.successNavigate);
|
|
56198
56265
|
return {
|
|
56199
56266
|
title: e.label,
|
|
56200
56267
|
fields: t,
|
|
56201
56268
|
...n ? { successNavigate: n } : {}
|
|
56202
56269
|
};
|
|
56203
56270
|
}
|
|
56204
|
-
function
|
|
56271
|
+
function YV(e) {
|
|
56205
56272
|
let t = String(e ?? "").trim();
|
|
56206
56273
|
return !t || !t.startsWith("/") || t.startsWith("//") || /^[a-z][a-z0-9+.-]*:/i.test(t) ? null : t;
|
|
56207
56274
|
}
|
|
56208
|
-
function
|
|
56275
|
+
function XV(e, t = []) {
|
|
56209
56276
|
if (!e || !Array.isArray(t) || !t.length) return e;
|
|
56210
56277
|
let n = new Map(t.filter((e) => e?.name).map((e) => [String(e.name), e]));
|
|
56211
56278
|
return n.size ? {
|
|
@@ -56221,12 +56288,12 @@ function JV(e, t = []) {
|
|
|
56221
56288
|
})
|
|
56222
56289
|
} : e;
|
|
56223
56290
|
}
|
|
56224
|
-
function
|
|
56291
|
+
function ZV({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
56225
56292
|
let n = I(() => ({
|
|
56226
|
-
...
|
|
56293
|
+
...RV,
|
|
56227
56294
|
...e
|
|
56228
56295
|
}), [e]), r = I(() => {
|
|
56229
|
-
let e = { ...
|
|
56296
|
+
let e = { ...LV };
|
|
56230
56297
|
return Object.entries(t).forEach(([t, n]) => {
|
|
56231
56298
|
e[t] = {
|
|
56232
56299
|
...e[t] ?? {},
|
|
@@ -56244,7 +56311,7 @@ function YV({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
|
56244
56311
|
return qe(o.moduleName, "popup", i).then((n) => {
|
|
56245
56312
|
e || c({
|
|
56246
56313
|
key: t,
|
|
56247
|
-
config:
|
|
56314
|
+
config: JV(n[0])
|
|
56248
56315
|
});
|
|
56249
56316
|
}).catch(() => {
|
|
56250
56317
|
e || c({
|
|
@@ -56257,7 +56324,7 @@ function YV({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
|
56257
56324
|
}, [i, o.moduleName]);
|
|
56258
56325
|
let l = I(() => {
|
|
56259
56326
|
let e = r[i], t = `${o.moduleName}:${i}`, n = s.key === t ? s.config : null;
|
|
56260
|
-
return
|
|
56327
|
+
return XV(n ? {
|
|
56261
56328
|
...e,
|
|
56262
56329
|
...n
|
|
56263
56330
|
} : e, o.popupAction?.popupFieldOverrides);
|
|
@@ -56316,11 +56383,11 @@ function YV({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
|
56316
56383
|
}
|
|
56317
56384
|
a(-1);
|
|
56318
56385
|
};
|
|
56319
|
-
return i === "add-batch-candidate" ? /* @__PURE__ */ Y(
|
|
56386
|
+
return i === "add-batch-candidate" ? /* @__PURE__ */ Y(KV, {
|
|
56320
56387
|
open: !0,
|
|
56321
56388
|
context: u,
|
|
56322
56389
|
onClose: f
|
|
56323
|
-
}) : /* @__PURE__ */ Y(
|
|
56390
|
+
}) : /* @__PURE__ */ Y(Rz, {
|
|
56324
56391
|
open: !0,
|
|
56325
56392
|
config: l,
|
|
56326
56393
|
context: u,
|
|
@@ -56333,7 +56400,7 @@ function YV({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
|
56333
56400
|
}
|
|
56334
56401
|
//#endregion
|
|
56335
56402
|
//#region src/components/popups/definitions/vendor-share/config.js
|
|
56336
|
-
var
|
|
56403
|
+
var QV = {
|
|
56337
56404
|
title: "Vendor Share",
|
|
56338
56405
|
maxVendorSelect: 1e3,
|
|
56339
56406
|
defaultTab: "myVendor",
|
|
@@ -56367,7 +56434,7 @@ var XV = {
|
|
|
56367
56434
|
key: "updatedOn"
|
|
56368
56435
|
}
|
|
56369
56436
|
]
|
|
56370
|
-
},
|
|
56437
|
+
}, $V = {
|
|
56371
56438
|
getVendorList: ({ jobId: e, limit: t, offset: n, type: r }) => nd({
|
|
56372
56439
|
jobId: e,
|
|
56373
56440
|
limit: t,
|
|
@@ -56384,11 +56451,11 @@ var XV = {
|
|
|
56384
56451
|
subject: i,
|
|
56385
56452
|
contents: a
|
|
56386
56453
|
})
|
|
56387
|
-
},
|
|
56454
|
+
}, eH = QV.vendorColumns.map((e) => ({
|
|
56388
56455
|
...e,
|
|
56389
56456
|
render: (e) => e || "-"
|
|
56390
56457
|
}));
|
|
56391
|
-
function
|
|
56458
|
+
function tH() {
|
|
56392
56459
|
let e = Zs(), t = Xs(), { 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({
|
|
56393
56460
|
to: i.join(", "),
|
|
56394
56461
|
cc: "",
|
|
@@ -56397,13 +56464,13 @@ function $V() {
|
|
|
56397
56464
|
contents: "",
|
|
56398
56465
|
showCc: !1,
|
|
56399
56466
|
showBcc: !1
|
|
56400
|
-
}), [f, p] = L(!l), [m, h] = L(
|
|
56467
|
+
}), [f, p] = L(!l), [m, h] = L(QV.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(QV.defaultPageSize), [A, j] = L(!1), [ee, te] = L([]);
|
|
56401
56468
|
F(() => {
|
|
56402
56469
|
if (!l) return;
|
|
56403
56470
|
let e = !1;
|
|
56404
56471
|
j(!0);
|
|
56405
56472
|
let t = g ? 100 : O, n = g ? 0 : (E - 1) * O;
|
|
56406
|
-
return
|
|
56473
|
+
return $V.getVendorList({
|
|
56407
56474
|
jobId: l,
|
|
56408
56475
|
limit: t,
|
|
56409
56476
|
offset: n,
|
|
@@ -56426,7 +56493,7 @@ function $V() {
|
|
|
56426
56493
|
O,
|
|
56427
56494
|
g
|
|
56428
56495
|
]), F(() => {
|
|
56429
|
-
l &&
|
|
56496
|
+
l && $V.getMailDetails(l).then((e) => d((t) => ({
|
|
56430
56497
|
...t,
|
|
56431
56498
|
subject: e.subject || t.subject,
|
|
56432
56499
|
contents: e.contents || t.contents,
|
|
@@ -56451,7 +56518,7 @@ function $V() {
|
|
|
56451
56518
|
e(-1);
|
|
56452
56519
|
}
|
|
56453
56520
|
function oe() {
|
|
56454
|
-
re &&
|
|
56521
|
+
re && $V.submit({
|
|
56455
56522
|
jobId: l,
|
|
56456
56523
|
toMail: hL(N.to),
|
|
56457
56524
|
ccMail: hL(N.cc),
|
|
@@ -56532,7 +56599,7 @@ function $V() {
|
|
|
56532
56599
|
]
|
|
56533
56600
|
}), /* @__PURE__ */ Y("div", {
|
|
56534
56601
|
className: "vendor-share__vendor-tabs",
|
|
56535
|
-
children:
|
|
56602
|
+
children: QV.vendorTabs.map((e) => /* @__PURE__ */ X("span", {
|
|
56536
56603
|
className: `vendor-share__vendor-tab${m === e.key ? " vendor-share__vendor-tab--active" : ""}`,
|
|
56537
56604
|
onClick: () => {
|
|
56538
56605
|
h(e.key), D(1), te([]);
|
|
@@ -56550,7 +56617,7 @@ function $V() {
|
|
|
56550
56617
|
className: "vendor-share__vendor-table-wrapper",
|
|
56551
56618
|
children: /* @__PURE__ */ Y(Fa, {
|
|
56552
56619
|
rowKey: (e) => e.vendorId,
|
|
56553
|
-
columns:
|
|
56620
|
+
columns: eH,
|
|
56554
56621
|
dataSource: se,
|
|
56555
56622
|
loading: A,
|
|
56556
56623
|
pagination: !1,
|
|
@@ -56558,7 +56625,7 @@ function $V() {
|
|
|
56558
56625
|
rowSelection: {
|
|
56559
56626
|
selectedRowKeys: ee,
|
|
56560
56627
|
onChange: (e) => {
|
|
56561
|
-
e.length >
|
|
56628
|
+
e.length > QV.maxVendorSelect || te(e);
|
|
56562
56629
|
}
|
|
56563
56630
|
},
|
|
56564
56631
|
scroll: { y: "calc(100vh - 340px)" }
|
|
@@ -56592,7 +56659,7 @@ function $V() {
|
|
|
56592
56659
|
children: [
|
|
56593
56660
|
ee.length,
|
|
56594
56661
|
" / ",
|
|
56595
|
-
|
|
56662
|
+
QV.maxVendorSelect,
|
|
56596
56663
|
" Vendors selected"
|
|
56597
56664
|
]
|
|
56598
56665
|
}) : null
|
|
@@ -56603,7 +56670,7 @@ function $V() {
|
|
|
56603
56670
|
}
|
|
56604
56671
|
//#endregion
|
|
56605
56672
|
//#region src/components/form/validation.js
|
|
56606
|
-
var
|
|
56673
|
+
var nH = {
|
|
56607
56674
|
EMAIL: /^[a-zA-Z0-9._%+-]+@[a-zA-Z][a-zA-Z-]*\.[a-zA-Z]{2,}$/,
|
|
56608
56675
|
PHONE: /^[0-9]{10}$/,
|
|
56609
56676
|
PASSWORD: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,
|
|
@@ -56620,7 +56687,7 @@ var eH = {
|
|
|
56620
56687
|
FULL_NAME: /^[A-Z][a-zA-Z]*(?: [A-Z][a-zA-Z]*)*$/,
|
|
56621
56688
|
NO_SPACES: /^\S+$/,
|
|
56622
56689
|
STARTS_WITH_CAPITAL: /^[A-Z].*$/
|
|
56623
|
-
},
|
|
56690
|
+
}, rH = {
|
|
56624
56691
|
SINGLE_FILE_COUNT: 1,
|
|
56625
56692
|
MULTI_FILE_COUNT: 5,
|
|
56626
56693
|
MAX_FILE_SIZE: 2,
|
|
@@ -56629,7 +56696,7 @@ var eH = {
|
|
|
56629
56696
|
"image/png",
|
|
56630
56697
|
"application/pdf"
|
|
56631
56698
|
]
|
|
56632
|
-
},
|
|
56699
|
+
}, iH = {
|
|
56633
56700
|
REQUIRED: (e) => "Mandatory Field",
|
|
56634
56701
|
INVALID_EMAIL: "Please enter a valid email address.",
|
|
56635
56702
|
INVALID_PHONE: "Phone number must contain exactly 10 digits.",
|
|
@@ -56649,16 +56716,16 @@ var eH = {
|
|
|
56649
56716
|
NO_SPACES_ALLOWED: "Spaces are not allowed.",
|
|
56650
56717
|
MUST_START_WITH_CAPITAL: "First letter must be capital.",
|
|
56651
56718
|
INVALID_FILE_TYPE: "Only JPG, PNG and PDF files are allowed.",
|
|
56652
|
-
INVALID_FILE_SIZE: `File upload must be ${
|
|
56719
|
+
INVALID_FILE_SIZE: `File upload must be ${rH.MAX_FILE_SIZE} MB below.`,
|
|
56653
56720
|
INVALID_FILE_TYPE: "Only JPG, PNG and PDF files are allowed.",
|
|
56654
56721
|
SINGLE_FILE_ONLY: "Only one file can be uploaded."
|
|
56655
|
-
},
|
|
56722
|
+
}, aH = {
|
|
56656
56723
|
FIRST_NAME_MIN: 3,
|
|
56657
56724
|
FIRST_NAME_MAX: 30
|
|
56658
|
-
},
|
|
56725
|
+
}, oH = {
|
|
56659
56726
|
REMARKS_MIN: 10,
|
|
56660
56727
|
REMARKS_MAX: 250
|
|
56661
|
-
},
|
|
56728
|
+
}, sH = {
|
|
56662
56729
|
removeSpaces: (e = "") => e.replace(/\s/g, ""),
|
|
56663
56730
|
capitalizeFirstLetter: (e = "") => e.charAt(0).toUpperCase() + e.slice(1),
|
|
56664
56731
|
capitalizeWords: (e = "") => e.replace(/\b\w/g, (e) => e.toUpperCase()),
|
|
@@ -56670,132 +56737,132 @@ var eH = {
|
|
|
56670
56737
|
let t = e.replace(/\D/g, "");
|
|
56671
56738
|
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)}`;
|
|
56672
56739
|
}
|
|
56673
|
-
},
|
|
56740
|
+
}, cH = {
|
|
56674
56741
|
required: (e = "Field") => ({
|
|
56675
56742
|
required: !0,
|
|
56676
|
-
message:
|
|
56743
|
+
message: iH.REQUIRED(e)
|
|
56677
56744
|
}),
|
|
56678
56745
|
email: () => ({
|
|
56679
|
-
pattern:
|
|
56680
|
-
message:
|
|
56746
|
+
pattern: nH.EMAIL,
|
|
56747
|
+
message: iH.INVALID_EMAIL
|
|
56681
56748
|
}),
|
|
56682
56749
|
phone: () => ({
|
|
56683
|
-
pattern:
|
|
56684
|
-
message:
|
|
56750
|
+
pattern: nH.PHONE,
|
|
56751
|
+
message: iH.INVALID_PHONE
|
|
56685
56752
|
}),
|
|
56686
56753
|
password: () => ({
|
|
56687
|
-
pattern:
|
|
56688
|
-
message:
|
|
56754
|
+
pattern: nH.PASSWORD,
|
|
56755
|
+
message: iH.INVALID_PASSWORD
|
|
56689
56756
|
}),
|
|
56690
56757
|
alphabets: () => ({
|
|
56691
|
-
pattern:
|
|
56692
|
-
message:
|
|
56758
|
+
pattern: nH.ALPHABETS,
|
|
56759
|
+
message: iH.INVALID_ALPHABETS
|
|
56693
56760
|
}),
|
|
56694
56761
|
alphanumeric: () => ({
|
|
56695
|
-
pattern:
|
|
56696
|
-
message:
|
|
56762
|
+
pattern: nH.ALPHANUMERIC,
|
|
56763
|
+
message: iH.INVALID_ALPHANUMERIC
|
|
56697
56764
|
}),
|
|
56698
56765
|
number: () => ({
|
|
56699
|
-
pattern:
|
|
56700
|
-
message:
|
|
56766
|
+
pattern: nH.NUMBER,
|
|
56767
|
+
message: iH.INVALID_NUMBER
|
|
56701
56768
|
}),
|
|
56702
56769
|
url: () => ({
|
|
56703
|
-
pattern:
|
|
56704
|
-
message:
|
|
56770
|
+
pattern: nH.URL,
|
|
56771
|
+
message: iH.INVALID_URL
|
|
56705
56772
|
}),
|
|
56706
56773
|
candidateId: (e = "ID") => ({
|
|
56707
|
-
pattern:
|
|
56708
|
-
message:
|
|
56774
|
+
pattern: nH.CANDIDATE_ID,
|
|
56775
|
+
message: iH.INVALID_CANDIDATE_ID(e)
|
|
56709
56776
|
}),
|
|
56710
56777
|
remarks: () => ({
|
|
56711
|
-
pattern:
|
|
56712
|
-
message:
|
|
56713
|
-
REMARKS_MIN: `Remarks must be at least ${
|
|
56714
|
-
REMARKS_MAX: `Remarks must not exceed ${
|
|
56778
|
+
pattern: nH.REMARKS,
|
|
56779
|
+
message: iH.INVALID_REMARKS,
|
|
56780
|
+
REMARKS_MIN: `Remarks must be at least ${oH.REMARKS_MIN} characters.`,
|
|
56781
|
+
REMARKS_MAX: `Remarks must not exceed ${oH.REMARKS_MAX} characters.`
|
|
56715
56782
|
}),
|
|
56716
56783
|
designation: () => ({
|
|
56717
|
-
pattern:
|
|
56718
|
-
message:
|
|
56784
|
+
pattern: nH.DESIGNATION,
|
|
56785
|
+
message: iH.INVALID_DESIGNATION
|
|
56719
56786
|
}),
|
|
56720
56787
|
dob: (e = !0) => ({ validator: (t, n) => {
|
|
56721
56788
|
if (!n) return e ? Promise.reject(/* @__PURE__ */ Error("Date of Birth is required.")) : Promise.resolve();
|
|
56722
|
-
if (!
|
|
56789
|
+
if (!nH.DOB.test(n)) return Promise.reject(Error(iH.INVALID_DOB));
|
|
56723
56790
|
let r = Us(n, "MM/DD/YYYY", !0);
|
|
56724
|
-
if (!r.isValid()) return Promise.reject(Error(
|
|
56791
|
+
if (!r.isValid()) return Promise.reject(Error(iH.INVALID_DOB));
|
|
56725
56792
|
let i = Us().endOf("day");
|
|
56726
56793
|
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();
|
|
56727
56794
|
} }),
|
|
56728
56795
|
linkedin: () => ({
|
|
56729
|
-
pattern:
|
|
56730
|
-
message:
|
|
56796
|
+
pattern: nH.LINKEDIN,
|
|
56797
|
+
message: iH.INVALID_LINKEDIN
|
|
56731
56798
|
}),
|
|
56732
56799
|
companyName: () => ({
|
|
56733
|
-
pattern:
|
|
56734
|
-
message:
|
|
56800
|
+
pattern: nH.COMPANY_NAME,
|
|
56801
|
+
message: iH.INVALID_COMPANY_NAME
|
|
56735
56802
|
}),
|
|
56736
56803
|
firstName: () => ({
|
|
56737
|
-
pattern:
|
|
56738
|
-
message:
|
|
56739
|
-
FIRST_NAME_MIN: `First Name must be at least ${
|
|
56740
|
-
FIRST_NAME_MAX: `First Name must not exceed ${
|
|
56804
|
+
pattern: nH.FIRST_NAME,
|
|
56805
|
+
message: iH.INVALID_FIRST_NAME,
|
|
56806
|
+
FIRST_NAME_MIN: `First Name must be at least ${aH.FIRST_NAME_MIN} characters.`,
|
|
56807
|
+
FIRST_NAME_MAX: `First Name must not exceed ${aH.FIRST_NAME_MAX} characters.`
|
|
56741
56808
|
}),
|
|
56742
56809
|
firstNameMinLength: () => ({
|
|
56743
|
-
min:
|
|
56744
|
-
message:
|
|
56810
|
+
min: aH.FIRST_NAME_MIN,
|
|
56811
|
+
message: iH.FIRST_NAME_MIN
|
|
56745
56812
|
}),
|
|
56746
56813
|
firstNameMaxLength: () => ({
|
|
56747
|
-
max:
|
|
56748
|
-
message:
|
|
56814
|
+
max: aH.FIRST_NAME_MAX,
|
|
56815
|
+
message: iH.FIRST_NAME_MAX
|
|
56749
56816
|
}),
|
|
56750
56817
|
remarksMinLength: () => ({
|
|
56751
|
-
min:
|
|
56752
|
-
message:
|
|
56818
|
+
min: oH.REMARKS_MIN,
|
|
56819
|
+
message: iH.REMARKS_MIN
|
|
56753
56820
|
}),
|
|
56754
56821
|
remarksMaxLength: () => ({
|
|
56755
|
-
max:
|
|
56756
|
-
message:
|
|
56822
|
+
max: oH.REMARKS_MAX,
|
|
56823
|
+
message: iH.REMARKS_MAX
|
|
56757
56824
|
}),
|
|
56758
56825
|
fullName: () => ({
|
|
56759
|
-
pattern:
|
|
56760
|
-
message:
|
|
56826
|
+
pattern: nH.FULL_NAME,
|
|
56827
|
+
message: iH.INVALID_FULL_NAME
|
|
56761
56828
|
}),
|
|
56762
56829
|
noSpaces: () => ({
|
|
56763
|
-
pattern:
|
|
56764
|
-
message:
|
|
56830
|
+
pattern: nH.NO_SPACES,
|
|
56831
|
+
message: iH.NO_SPACES_ALLOWED
|
|
56765
56832
|
}),
|
|
56766
56833
|
startsWithCapital: () => ({
|
|
56767
|
-
pattern:
|
|
56768
|
-
message:
|
|
56834
|
+
pattern: nH.STARTS_WITH_CAPITAL,
|
|
56835
|
+
message: iH.MUST_START_WITH_CAPITAL
|
|
56769
56836
|
}),
|
|
56770
56837
|
fileUpload: () => ({ validator: (e, t) => {
|
|
56771
56838
|
if (!t || t.length === 0) return Promise.resolve();
|
|
56772
56839
|
for (let e of t) {
|
|
56773
56840
|
let t = e.originFileObj || e;
|
|
56774
|
-
if (!(t.size / 1024 / 1024 <=
|
|
56775
|
-
if (!
|
|
56841
|
+
if (!(t.size / 1024 / 1024 <= rH.MAX_FILE_SIZE)) return q.error(iH.INVALID_FILE_SIZE), Promise.reject(Error(iH.INVALID_FILE_SIZE));
|
|
56842
|
+
if (!rH.ALLOWED_FILE_TYPES.includes(t.type)) return Promise.reject(Error(iH.INVALID_FILE_TYPE));
|
|
56776
56843
|
}
|
|
56777
56844
|
return Promise.resolve();
|
|
56778
56845
|
} }),
|
|
56779
56846
|
singleFileUpload: () => ({ validator: (e, t) => {
|
|
56780
56847
|
if (!t || t.length === 0) return Promise.resolve();
|
|
56781
|
-
if (t.length >
|
|
56848
|
+
if (t.length > rH.SINGLE_FILE_COUNT) return Promise.reject(Error(iH.SINGLE_FILE_ONLY));
|
|
56782
56849
|
let n = t[0];
|
|
56783
|
-
return n.size / 1024 / 1024 <
|
|
56850
|
+
return n.size / 1024 / 1024 < rH.MAX_FILE_SIZE ? rH.ALLOWED_FILE_TYPES.includes(n.type) ? Promise.resolve() : Promise.reject(Error(iH.INVALID_FILE_TYPE)) : Promise.reject(Error(iH.INVALID_FILE_SIZE));
|
|
56784
56851
|
} }),
|
|
56785
56852
|
multiFileUpload: () => ({ validator: (e, t) => {
|
|
56786
56853
|
if (!t || t.length === 0) return Promise.resolve();
|
|
56787
|
-
if (t.length >
|
|
56854
|
+
if (t.length > rH.MULTI_FILE_COUNT) return Promise.reject(Error(iH.INVALID_FILE_COUNT));
|
|
56788
56855
|
for (let e of t) {
|
|
56789
|
-
if (!(e.size / 1024 / 1024 <
|
|
56790
|
-
if (!
|
|
56856
|
+
if (!(e.size / 1024 / 1024 < rH.MAX_FILE_SIZE)) return Promise.reject(Error(iH.INVALID_FILE_SIZE));
|
|
56857
|
+
if (!rH.ALLOWED_FILE_TYPES.includes(e.type)) return Promise.reject(Error(iH.INVALID_FILE_TYPE));
|
|
56791
56858
|
}
|
|
56792
56859
|
return Promise.resolve();
|
|
56793
56860
|
} })
|
|
56794
|
-
},
|
|
56861
|
+
}, lH = { beforeUpload: (e) => [
|
|
56795
56862
|
"image/jpeg",
|
|
56796
56863
|
"image/png",
|
|
56797
56864
|
"application/pdf"
|
|
56798
|
-
].includes(e.type) ? e.size / 1024 / 1024 <= 2 ? !1 : (q.error("File upload must be 2 MB below."), Ba.LIST_IGNORE) : (q.error("Only JPG, PNG and PDF files are allowed."), Ba.LIST_IGNORE) },
|
|
56865
|
+
].includes(e.type) ? e.size / 1024 / 1024 <= 2 ? !1 : (q.error("File upload must be 2 MB below."), Ba.LIST_IGNORE) : (q.error("Only JPG, PNG and PDF files are allowed."), Ba.LIST_IGNORE) }, uH = () => {
|
|
56799
56866
|
let [e] = B.useForm();
|
|
56800
56867
|
return /* @__PURE__ */ Y("div", {
|
|
56801
56868
|
style: { padding: 24 },
|
|
@@ -56815,7 +56882,7 @@ var eH = {
|
|
|
56815
56882
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
56816
56883
|
label: "Email",
|
|
56817
56884
|
name: "email",
|
|
56818
|
-
rules: [
|
|
56885
|
+
rules: [cH.required("Email"), cH.email()],
|
|
56819
56886
|
children: /* @__PURE__ */ Y(V, {})
|
|
56820
56887
|
})
|
|
56821
56888
|
}),
|
|
@@ -56824,12 +56891,12 @@ var eH = {
|
|
|
56824
56891
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
56825
56892
|
label: "Phone Number",
|
|
56826
56893
|
name: "phone",
|
|
56827
|
-
rules: [
|
|
56894
|
+
rules: [cH.required("Phone Number"), cH.phone()],
|
|
56828
56895
|
validateTrigger: ["onBlur", "onChange"],
|
|
56829
56896
|
children: /* @__PURE__ */ Y(V, {
|
|
56830
56897
|
maxLength: 10,
|
|
56831
56898
|
onChange: (t) => {
|
|
56832
|
-
e.setFieldsValue({ phone:
|
|
56899
|
+
e.setFieldsValue({ phone: sH.phoneFormatter(t.target.value) });
|
|
56833
56900
|
}
|
|
56834
56901
|
})
|
|
56835
56902
|
})
|
|
@@ -56839,7 +56906,7 @@ var eH = {
|
|
|
56839
56906
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
56840
56907
|
label: "Password",
|
|
56841
56908
|
name: "password",
|
|
56842
|
-
rules: [
|
|
56909
|
+
rules: [cH.required("Password"), cH.password()],
|
|
56843
56910
|
children: /* @__PURE__ */ Y(V.Password, {})
|
|
56844
56911
|
})
|
|
56845
56912
|
}),
|
|
@@ -56849,13 +56916,13 @@ var eH = {
|
|
|
56849
56916
|
label: "Full Name",
|
|
56850
56917
|
name: "fullName",
|
|
56851
56918
|
rules: [
|
|
56852
|
-
|
|
56853
|
-
|
|
56854
|
-
|
|
56855
|
-
|
|
56919
|
+
cH.required("Full Name"),
|
|
56920
|
+
cH.alphabets(),
|
|
56921
|
+
cH.firstNameMinLength(),
|
|
56922
|
+
cH.firstNameMaxLength()
|
|
56856
56923
|
],
|
|
56857
56924
|
children: /* @__PURE__ */ Y(V, { onChange: (t) => {
|
|
56858
|
-
e.setFieldsValue({ fullName:
|
|
56925
|
+
e.setFieldsValue({ fullName: sH.firstNameFormatter(t.target.value) });
|
|
56859
56926
|
} })
|
|
56860
56927
|
})
|
|
56861
56928
|
}),
|
|
@@ -56864,9 +56931,9 @@ var eH = {
|
|
|
56864
56931
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
56865
56932
|
label: "Username",
|
|
56866
56933
|
name: "username",
|
|
56867
|
-
rules: [
|
|
56934
|
+
rules: [cH.required("Username"), cH.alphanumeric()],
|
|
56868
56935
|
children: /* @__PURE__ */ Y(V, { onChange: (t) => {
|
|
56869
|
-
e.setFieldsValue({ username:
|
|
56936
|
+
e.setFieldsValue({ username: sH.removeExtraSpaces(t.target.value) });
|
|
56870
56937
|
} })
|
|
56871
56938
|
})
|
|
56872
56939
|
}),
|
|
@@ -56875,9 +56942,9 @@ var eH = {
|
|
|
56875
56942
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
56876
56943
|
label: "Website URL",
|
|
56877
56944
|
name: "website",
|
|
56878
|
-
rules: [
|
|
56945
|
+
rules: [cH.required("Website URL"), cH.url()],
|
|
56879
56946
|
children: /* @__PURE__ */ Y(V, { onChange: (t) => {
|
|
56880
|
-
e.setFieldsValue({ website:
|
|
56947
|
+
e.setFieldsValue({ website: sH.removeExtraSpaces(t.target.value) });
|
|
56881
56948
|
} })
|
|
56882
56949
|
})
|
|
56883
56950
|
}),
|
|
@@ -56886,9 +56953,9 @@ var eH = {
|
|
|
56886
56953
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
56887
56954
|
label: "MSP Req ID",
|
|
56888
56955
|
name: "mspreqID",
|
|
56889
|
-
rules: [
|
|
56956
|
+
rules: [cH.required("MSP Req ID"), cH.candidateId("MSP Req ID")],
|
|
56890
56957
|
children: /* @__PURE__ */ Y(V, { onChange: (t) => {
|
|
56891
|
-
e.setFieldsValue({ mspreqID:
|
|
56958
|
+
e.setFieldsValue({ mspreqID: sH.removeExtraSpaces(t.target.value) });
|
|
56892
56959
|
} })
|
|
56893
56960
|
})
|
|
56894
56961
|
}),
|
|
@@ -56897,9 +56964,9 @@ var eH = {
|
|
|
56897
56964
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
56898
56965
|
label: "Candidate ID",
|
|
56899
56966
|
name: "candidateId",
|
|
56900
|
-
rules: [
|
|
56967
|
+
rules: [cH.required("Candidate ID"), cH.candidateId("Candidate ID")],
|
|
56901
56968
|
children: /* @__PURE__ */ Y(V, { onChange: (t) => {
|
|
56902
|
-
e.setFieldsValue({ candidateId:
|
|
56969
|
+
e.setFieldsValue({ candidateId: sH.removeExtraSpaces(t.target.value) });
|
|
56903
56970
|
} })
|
|
56904
56971
|
})
|
|
56905
56972
|
}),
|
|
@@ -56909,10 +56976,10 @@ var eH = {
|
|
|
56909
56976
|
label: "Remarks",
|
|
56910
56977
|
name: "remarks",
|
|
56911
56978
|
rules: [
|
|
56912
|
-
|
|
56913
|
-
|
|
56914
|
-
|
|
56915
|
-
|
|
56979
|
+
cH.required("Remarks"),
|
|
56980
|
+
cH.remarks(),
|
|
56981
|
+
cH.remarksMinLength(),
|
|
56982
|
+
cH.remarksMaxLength()
|
|
56916
56983
|
],
|
|
56917
56984
|
children: /* @__PURE__ */ Y(V.TextArea, { rows: 4 })
|
|
56918
56985
|
})
|
|
@@ -56922,7 +56989,7 @@ var eH = {
|
|
|
56922
56989
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
56923
56990
|
label: "Designation",
|
|
56924
56991
|
name: "designation",
|
|
56925
|
-
rules: [
|
|
56992
|
+
rules: [cH.required("Designation"), cH.designation()],
|
|
56926
56993
|
children: /* @__PURE__ */ Y(V, {})
|
|
56927
56994
|
})
|
|
56928
56995
|
}),
|
|
@@ -56931,12 +56998,12 @@ var eH = {
|
|
|
56931
56998
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
56932
56999
|
label: "Date of Birth",
|
|
56933
57000
|
name: "dob",
|
|
56934
|
-
rules: [
|
|
57001
|
+
rules: [cH.dob()],
|
|
56935
57002
|
children: /* @__PURE__ */ Y(V, {
|
|
56936
57003
|
placeholder: "MM/DD/YYYY",
|
|
56937
57004
|
maxLength: 10,
|
|
56938
57005
|
onChange: (t) => {
|
|
56939
|
-
e.setFieldsValue({ dob:
|
|
57006
|
+
e.setFieldsValue({ dob: sH.dobFormatter(t.target.value) });
|
|
56940
57007
|
}
|
|
56941
57008
|
})
|
|
56942
57009
|
})
|
|
@@ -56946,7 +57013,7 @@ var eH = {
|
|
|
56946
57013
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
56947
57014
|
label: "Company Name",
|
|
56948
57015
|
name: "companyName",
|
|
56949
|
-
rules: [
|
|
57016
|
+
rules: [cH.required("Company Name"), cH.companyName()],
|
|
56950
57017
|
children: /* @__PURE__ */ Y(V, {})
|
|
56951
57018
|
})
|
|
56952
57019
|
}),
|
|
@@ -57035,7 +57102,7 @@ var eH = {
|
|
|
57035
57102
|
label: "Resume new",
|
|
57036
57103
|
name: "resume",
|
|
57037
57104
|
children: /* @__PURE__ */ Y(Ba, {
|
|
57038
|
-
beforeUpload:
|
|
57105
|
+
beforeUpload: lH.beforeUpload,
|
|
57039
57106
|
maxCount: 1,
|
|
57040
57107
|
children: /* @__PURE__ */ Y(R, { children: "Upload Resume" })
|
|
57041
57108
|
})
|
|
@@ -57048,10 +57115,10 @@ var eH = {
|
|
|
57048
57115
|
name: "documents",
|
|
57049
57116
|
valuePropName: "fileList",
|
|
57050
57117
|
getValueFromEvent: (e) => e?.fileList,
|
|
57051
|
-
rules: [
|
|
57118
|
+
rules: [cH.multiFileUpload()],
|
|
57052
57119
|
children: /* @__PURE__ */ Y(Ba, {
|
|
57053
57120
|
multiple: !0,
|
|
57054
|
-
beforeUpload:
|
|
57121
|
+
beforeUpload: lH.beforeUpload,
|
|
57055
57122
|
children: /* @__PURE__ */ Y(R, { children: "Upload Documents" })
|
|
57056
57123
|
})
|
|
57057
57124
|
})
|
|
@@ -57063,9 +57130,9 @@ var eH = {
|
|
|
57063
57130
|
name: "file",
|
|
57064
57131
|
valuePropName: "fileList",
|
|
57065
57132
|
getValueFromEvent: (e) => e?.fileList,
|
|
57066
|
-
rules: [
|
|
57133
|
+
rules: [cH.fileUpload()],
|
|
57067
57134
|
children: /* @__PURE__ */ Y(Ba, {
|
|
57068
|
-
beforeUpload:
|
|
57135
|
+
beforeUpload: lH.beforeUpload,
|
|
57069
57136
|
maxCount: 1,
|
|
57070
57137
|
children: /* @__PURE__ */ Y(R, { children: "Upload" })
|
|
57071
57138
|
})
|
|
@@ -57125,7 +57192,7 @@ var eH = {
|
|
|
57125
57192
|
};
|
|
57126
57193
|
//#endregion
|
|
57127
57194
|
//#region src/components/admin/RegionBanner.jsx
|
|
57128
|
-
function
|
|
57195
|
+
function dH({ region: e, onExit: t }) {
|
|
57129
57196
|
if (!e || e.isHome) return null;
|
|
57130
57197
|
let n = e.label?.trim() || e.key;
|
|
57131
57198
|
return /* @__PURE__ */ X("div", {
|
|
@@ -57194,25 +57261,25 @@ function lH({ region: e, onExit: t }) {
|
|
|
57194
57261
|
]
|
|
57195
57262
|
});
|
|
57196
57263
|
}
|
|
57197
|
-
|
|
57264
|
+
dH.propTypes = {
|
|
57198
57265
|
region: Z.shape({
|
|
57199
57266
|
key: Z.string,
|
|
57200
57267
|
label: Z.string,
|
|
57201
57268
|
isHome: Z.bool
|
|
57202
57269
|
}),
|
|
57203
57270
|
onExit: Z.func
|
|
57204
|
-
},
|
|
57271
|
+
}, dH.defaultProps = {
|
|
57205
57272
|
region: null,
|
|
57206
57273
|
onExit: void 0
|
|
57207
57274
|
};
|
|
57208
57275
|
//#endregion
|
|
57209
57276
|
//#region src/pages/admin/AdminPageWithShell.jsx
|
|
57210
|
-
function
|
|
57277
|
+
function fH(e) {
|
|
57211
57278
|
return /* @__PURE__ */ Y(Bk, { children: /* @__PURE__ */ Y(sL, { ...e }) });
|
|
57212
57279
|
}
|
|
57213
57280
|
//#endregion
|
|
57214
57281
|
//#region src/components/cards/StatsCards.jsx
|
|
57215
|
-
var { Text:
|
|
57282
|
+
var { Text: pH } = za, mH = [
|
|
57216
57283
|
{
|
|
57217
57284
|
label: "Total Jobs",
|
|
57218
57285
|
value: 1697,
|
|
@@ -57228,13 +57295,13 @@ var { Text: dH } = za, fH = [
|
|
|
57228
57295
|
value: 600,
|
|
57229
57296
|
icon: "user"
|
|
57230
57297
|
}
|
|
57231
|
-
],
|
|
57298
|
+
], hH = {
|
|
57232
57299
|
fileText: /* @__PURE__ */ Y(Io, {}),
|
|
57233
57300
|
checkCircle: /* @__PURE__ */ Y(io, {}),
|
|
57234
57301
|
user: /* @__PURE__ */ Y(Bs, {}),
|
|
57235
57302
|
filter: /* @__PURE__ */ Y(Ro, {})
|
|
57236
57303
|
};
|
|
57237
|
-
function
|
|
57304
|
+
function gH({ stats: e = mH }) {
|
|
57238
57305
|
return /* @__PURE__ */ Y(la, { children: /* @__PURE__ */ Y(ka, {
|
|
57239
57306
|
gutter: [12, 12],
|
|
57240
57307
|
children: e.map((e) => /* @__PURE__ */ Y(z, {
|
|
@@ -57247,7 +57314,7 @@ function mH({ stats: e = fH }) {
|
|
|
57247
57314
|
className: "stats-inner-card",
|
|
57248
57315
|
children: [/* @__PURE__ */ X(U, {
|
|
57249
57316
|
align: "center",
|
|
57250
|
-
children: [
|
|
57317
|
+
children: [hH[e.icon] ?? hH.fileText, /* @__PURE__ */ Y(pH, { children: e.label })]
|
|
57251
57318
|
}), /* @__PURE__ */ Y(Na, { value: e.value })]
|
|
57252
57319
|
})
|
|
57253
57320
|
}, e.label))
|
|
@@ -57255,21 +57322,21 @@ function mH({ stats: e = fH }) {
|
|
|
57255
57322
|
}
|
|
57256
57323
|
//#endregion
|
|
57257
57324
|
//#region src/pages/Modules/Admin/UsersSection.jsx
|
|
57258
|
-
var { Text:
|
|
57259
|
-
function
|
|
57325
|
+
var { Text: _H } = za;
|
|
57326
|
+
function vH(e) {
|
|
57260
57327
|
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 ?? "?"}`;
|
|
57261
57328
|
}
|
|
57262
|
-
function
|
|
57329
|
+
function yH(e) {
|
|
57263
57330
|
return {
|
|
57264
57331
|
...e,
|
|
57265
57332
|
key: e.USER_ID ?? e.user_id ?? e.userId ?? e.id ?? e._id,
|
|
57266
|
-
_name:
|
|
57333
|
+
_name: vH(e),
|
|
57267
57334
|
_email: e.email ?? e.EMAIL ?? e.user_email ?? "",
|
|
57268
57335
|
_role: e.role_name ?? e.roleName ?? e.ROLE_NAME ?? "",
|
|
57269
57336
|
_rawRef: e
|
|
57270
57337
|
};
|
|
57271
57338
|
}
|
|
57272
|
-
function
|
|
57339
|
+
function bH() {
|
|
57273
57340
|
let [e, t] = L([]), [n, r] = L(0), [i, a] = L(!1), [o, s] = L(1), [c, l] = L(10), [u, d] = L(""), f = $i(async ({ offset: e, limit: n, searchQuery: i } = {}) => {
|
|
57274
57341
|
a(!0);
|
|
57275
57342
|
try {
|
|
@@ -57277,7 +57344,7 @@ function vH() {
|
|
|
57277
57344
|
offset: e,
|
|
57278
57345
|
limit: n,
|
|
57279
57346
|
searchQuery: i ?? ""
|
|
57280
|
-
}), o = (a.users ?? []).map(
|
|
57347
|
+
}), o = (a.users ?? []).map(yH);
|
|
57281
57348
|
t(o), r(a.total ?? o.length);
|
|
57282
57349
|
} catch {
|
|
57283
57350
|
q.error("Failed to load users");
|
|
@@ -57310,7 +57377,7 @@ function vH() {
|
|
|
57310
57377
|
label: "Name",
|
|
57311
57378
|
value: "_name",
|
|
57312
57379
|
width: 220,
|
|
57313
|
-
render: (e, t) => /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(
|
|
57380
|
+
render: (e, t) => /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(_H, {
|
|
57314
57381
|
strong: !0,
|
|
57315
57382
|
style: { fontSize: 13 },
|
|
57316
57383
|
children: e
|
|
@@ -57342,7 +57409,7 @@ function vH() {
|
|
|
57342
57409
|
}
|
|
57343
57410
|
//#endregion
|
|
57344
57411
|
//#region src/pages/Modules/Admin/TeamsSection.jsx
|
|
57345
|
-
var { Text:
|
|
57412
|
+
var { Text: xH } = za, SH = [
|
|
57346
57413
|
{
|
|
57347
57414
|
key: "job",
|
|
57348
57415
|
label: "Jobs"
|
|
@@ -57355,7 +57422,7 @@ var { Text: yH } = za, bH = [
|
|
|
57355
57422
|
key: "submissions",
|
|
57356
57423
|
label: "Submissions"
|
|
57357
57424
|
}
|
|
57358
|
-
],
|
|
57425
|
+
], CH = [
|
|
57359
57426
|
{
|
|
57360
57427
|
key: "listView",
|
|
57361
57428
|
label: "List View"
|
|
@@ -57369,7 +57436,7 @@ var { Text: yH } = za, bH = [
|
|
|
57369
57436
|
label: "Form"
|
|
57370
57437
|
}
|
|
57371
57438
|
];
|
|
57372
|
-
function
|
|
57439
|
+
function wH({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
57373
57440
|
let i = ra(null), [a, o] = L(!1), [s, c] = L(!1);
|
|
57374
57441
|
function l(e) {
|
|
57375
57442
|
i.current = t, e.dataTransfer.effectAllowed = "move", c(!0);
|
|
@@ -57433,7 +57500,7 @@ function SH({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
|
57433
57500
|
]
|
|
57434
57501
|
});
|
|
57435
57502
|
}
|
|
57436
|
-
function
|
|
57503
|
+
function TH({ team: e, configType: t }) {
|
|
57437
57504
|
let [n, r] = L({}), [i, a] = L(!1), [o, s] = L({}), [c, l] = L("job");
|
|
57438
57505
|
F(() => {
|
|
57439
57506
|
e && (a(!0), $n(e, t).then(r).catch(() => q.error("Failed to load field config")).finally(() => a(!1)));
|
|
@@ -57484,7 +57551,7 @@ function CH({ team: e, configType: t }) {
|
|
|
57484
57551
|
size: "small",
|
|
57485
57552
|
activeKey: c,
|
|
57486
57553
|
onChange: l,
|
|
57487
|
-
items:
|
|
57554
|
+
items: SH.map((e) => ({
|
|
57488
57555
|
key: e.key,
|
|
57489
57556
|
label: e.label
|
|
57490
57557
|
}))
|
|
@@ -57513,7 +57580,7 @@ function CH({ team: e, configType: t }) {
|
|
|
57513
57580
|
children: [u.length === 0 && !i && /* @__PURE__ */ Y("div", {
|
|
57514
57581
|
className: "uss-empty",
|
|
57515
57582
|
children: "No fields found."
|
|
57516
|
-
}), u.map((e, t) => /* @__PURE__ */ Y(
|
|
57583
|
+
}), u.map((e, t) => /* @__PURE__ */ Y(wH, {
|
|
57517
57584
|
field: e,
|
|
57518
57585
|
index: t,
|
|
57519
57586
|
onToggle: f,
|
|
@@ -57527,13 +57594,13 @@ function CH({ team: e, configType: t }) {
|
|
|
57527
57594
|
size: "small",
|
|
57528
57595
|
loading: o[c],
|
|
57529
57596
|
onClick: m,
|
|
57530
|
-
children: ["Save ",
|
|
57597
|
+
children: ["Save ", SH.find((e) => e.key === c)?.label]
|
|
57531
57598
|
})
|
|
57532
57599
|
})
|
|
57533
57600
|
]
|
|
57534
57601
|
});
|
|
57535
57602
|
}
|
|
57536
|
-
function
|
|
57603
|
+
function EH() {
|
|
57537
57604
|
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 = $i(async () => {
|
|
57538
57605
|
p(!0);
|
|
57539
57606
|
try {
|
|
@@ -57680,13 +57747,13 @@ function wH() {
|
|
|
57680
57747
|
style: { marginBottom: 12 },
|
|
57681
57748
|
children: /* @__PURE__ */ Y("div", {
|
|
57682
57749
|
className: "uss-config-toggle",
|
|
57683
|
-
children:
|
|
57750
|
+
children: CH.map((e) => /* @__PURE__ */ Y("button", {
|
|
57684
57751
|
className: `uss-config-btn${o === e.key ? " active" : ""}`,
|
|
57685
57752
|
onClick: () => s(e.key),
|
|
57686
57753
|
children: e.label
|
|
57687
57754
|
}, e.key))
|
|
57688
57755
|
})
|
|
57689
|
-
}), e && /* @__PURE__ */ Y(
|
|
57756
|
+
}), e && /* @__PURE__ */ Y(TH, {
|
|
57690
57757
|
team: e,
|
|
57691
57758
|
configType: o
|
|
57692
57759
|
}, `${e?.teamId}-${o}`)]
|
|
@@ -57695,12 +57762,12 @@ function wH() {
|
|
|
57695
57762
|
}
|
|
57696
57763
|
//#endregion
|
|
57697
57764
|
//#region src/pages/Modules/Admin/components/RolePermPanel.jsx
|
|
57698
|
-
var
|
|
57765
|
+
var DH = [
|
|
57699
57766
|
"view",
|
|
57700
57767
|
"add",
|
|
57701
57768
|
"edit",
|
|
57702
57769
|
"delete"
|
|
57703
|
-
],
|
|
57770
|
+
], OH = {
|
|
57704
57771
|
view: "View",
|
|
57705
57772
|
add: "Add",
|
|
57706
57773
|
edit: "Edit",
|
|
@@ -57715,18 +57782,18 @@ var TH = [
|
|
|
57715
57782
|
reApprove: "ReApprove",
|
|
57716
57783
|
sendApprove: "Send Approve"
|
|
57717
57784
|
};
|
|
57718
|
-
function
|
|
57719
|
-
return
|
|
57785
|
+
function kH(e) {
|
|
57786
|
+
return OH[e] ?? e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
57720
57787
|
}
|
|
57721
|
-
function
|
|
57722
|
-
let t =
|
|
57788
|
+
function AH(e) {
|
|
57789
|
+
let t = DH.filter((t) => e.includes(t)), n = e.filter((e) => !DH.includes(e)).sort();
|
|
57723
57790
|
return [...t, ...n];
|
|
57724
57791
|
}
|
|
57725
|
-
function
|
|
57792
|
+
function jH(e) {
|
|
57726
57793
|
let t = /* @__PURE__ */ new Set();
|
|
57727
|
-
return Object.values(e).forEach(({ permissions: e }) => Object.keys(e ?? {}).forEach((e) => t.add(e))),
|
|
57794
|
+
return Object.values(e).forEach(({ permissions: e }) => Object.keys(e ?? {}).forEach((e) => t.add(e))), AH([...t]);
|
|
57728
57795
|
}
|
|
57729
|
-
function
|
|
57796
|
+
function MH(e) {
|
|
57730
57797
|
let t = 0, n = 0;
|
|
57731
57798
|
return Object.entries(e).forEach(([e, { permissions: r }]) => {
|
|
57732
57799
|
Object.entries(r ?? {}).forEach(([r, { value: i }]) => {
|
|
@@ -57737,7 +57804,7 @@ function AH(e) {
|
|
|
57737
57804
|
total: n
|
|
57738
57805
|
};
|
|
57739
57806
|
}
|
|
57740
|
-
function
|
|
57807
|
+
function NH(e = {}) {
|
|
57741
57808
|
if (!e || typeof e != "object") return e;
|
|
57742
57809
|
let t = Object.keys(e).find((e) => String(e).trim().toLowerCase() === "onboarding");
|
|
57743
57810
|
if (!t) return e;
|
|
@@ -57754,7 +57821,7 @@ function jH(e = {}) {
|
|
|
57754
57821
|
}
|
|
57755
57822
|
};
|
|
57756
57823
|
}
|
|
57757
|
-
function
|
|
57824
|
+
function PH({ value: e, onSave: t, className: n }) {
|
|
57758
57825
|
let [r, i] = L(!1), [a, o] = L(e);
|
|
57759
57826
|
F(() => {
|
|
57760
57827
|
o(e);
|
|
@@ -57783,7 +57850,7 @@ function MH({ value: e, onSave: t, className: n }) {
|
|
|
57783
57850
|
children: [e, /* @__PURE__ */ Y(Co, { className: "perm-name-edit-icon" })]
|
|
57784
57851
|
});
|
|
57785
57852
|
}
|
|
57786
|
-
function
|
|
57853
|
+
function FH({ entry: e, label: t, onToggle: n, onLabelSave: r }) {
|
|
57787
57854
|
let [i, a] = L(!1), [o, s] = L(t), c = e?.value === "1", l = !!e;
|
|
57788
57855
|
F(() => {
|
|
57789
57856
|
s(t);
|
|
@@ -57825,13 +57892,13 @@ function NH({ entry: e, label: t, onToggle: n, onLabelSave: r }) {
|
|
|
57825
57892
|
})
|
|
57826
57893
|
});
|
|
57827
57894
|
}
|
|
57828
|
-
function
|
|
57895
|
+
function IH({ menuName: e, menuData: t, permKeys: n, onChange: r, displayName: i, actionLabels: a, onModuleLabelSave: o, onActionLabelSave: s }) {
|
|
57829
57896
|
let c = t?.permissions ?? {}, l = n.filter((t) => QA(e, t)), u = l.filter((e) => c[e]?.value === "1").length, d = l.filter((e) => c[e]).length, f = d > 0 && u === d;
|
|
57830
57897
|
return /* @__PURE__ */ X("div", {
|
|
57831
57898
|
className: `perm-module-card${f ? " all-on" : u > 0 && !f ? " some-on" : ""}`,
|
|
57832
57899
|
children: [/* @__PURE__ */ X("div", {
|
|
57833
57900
|
className: "perm-module-card-header",
|
|
57834
|
-
children: [/* @__PURE__ */ Y(
|
|
57901
|
+
children: [/* @__PURE__ */ Y(PH, {
|
|
57835
57902
|
value: i,
|
|
57836
57903
|
onSave: (t) => o(e, t),
|
|
57837
57904
|
className: "perm-module-card-name"
|
|
@@ -57845,20 +57912,20 @@ function PH({ menuName: e, menuData: t, permKeys: n, onChange: r, displayName: i
|
|
|
57845
57912
|
})]
|
|
57846
57913
|
}), /* @__PURE__ */ Y("div", {
|
|
57847
57914
|
className: "perm-module-card-body",
|
|
57848
|
-
children: l.map((t) => /* @__PURE__ */ Y(
|
|
57915
|
+
children: l.map((t) => /* @__PURE__ */ Y(FH, {
|
|
57849
57916
|
entry: c[t],
|
|
57850
|
-
label: a[t] ??
|
|
57917
|
+
label: a[t] ?? kH(t),
|
|
57851
57918
|
onToggle: () => r(e, t),
|
|
57852
57919
|
onLabelSave: (e) => s(t, e)
|
|
57853
57920
|
}, t))
|
|
57854
57921
|
})]
|
|
57855
57922
|
});
|
|
57856
57923
|
}
|
|
57857
|
-
function
|
|
57924
|
+
function LH({ role: e, moduleLabels: t = {}, actionLabels: n = {}, onModuleLabelSave: r = () => {}, onActionLabelSave: i = () => {} }) {
|
|
57858
57925
|
let [a, o] = L({}), [s, c] = L({}), [l, u] = L(!1), [d, f] = L(!1), [p, m] = L(!1), h = zn(e);
|
|
57859
57926
|
F(() => {
|
|
57860
57927
|
h && (u(!0), m(!1), kr(h).then((e) => {
|
|
57861
|
-
let t =
|
|
57928
|
+
let t = NH(e);
|
|
57862
57929
|
o(t), c(t);
|
|
57863
57930
|
}).catch(() => q.error("Failed to load permissions")).finally(() => u(!1)));
|
|
57864
57931
|
}, [h]);
|
|
@@ -57896,7 +57963,7 @@ function FH({ role: e, moduleLabels: t = {}, actionLabels: n = {}, onModuleLabel
|
|
|
57896
57963
|
f(!1);
|
|
57897
57964
|
}
|
|
57898
57965
|
}
|
|
57899
|
-
let v = I(() => Object.keys(s).sort(), [s]), y = I(() =>
|
|
57966
|
+
let v = I(() => Object.keys(s).sort(), [s]), y = I(() => jH(s), [s]), { enabled: b, total: x } = I(() => MH(s), [s]);
|
|
57900
57967
|
return /* @__PURE__ */ X(Ma, {
|
|
57901
57968
|
spinning: l,
|
|
57902
57969
|
children: [
|
|
@@ -57947,7 +58014,7 @@ function FH({ role: e, moduleLabels: t = {}, actionLabels: n = {}, onModuleLabel
|
|
|
57947
58014
|
children: "No permission entries found for this role."
|
|
57948
58015
|
}) : /* @__PURE__ */ Y("div", {
|
|
57949
58016
|
className: "perm-cards-grid",
|
|
57950
|
-
children: v.map((e) => /* @__PURE__ */ Y(
|
|
58017
|
+
children: v.map((e) => /* @__PURE__ */ Y(IH, {
|
|
57951
58018
|
menuName: e,
|
|
57952
58019
|
menuData: s[e],
|
|
57953
58020
|
permKeys: y,
|
|
@@ -57963,7 +58030,7 @@ function FH({ role: e, moduleLabels: t = {}, actionLabels: n = {}, onModuleLabel
|
|
|
57963
58030
|
}
|
|
57964
58031
|
//#endregion
|
|
57965
58032
|
//#region src/pages/Modules/Admin/RolesSection.jsx
|
|
57966
|
-
var { Text:
|
|
58033
|
+
var { Text: RH } = za, zH = [
|
|
57967
58034
|
{
|
|
57968
58035
|
key: "listView",
|
|
57969
58036
|
label: "List View"
|
|
@@ -57981,38 +58048,38 @@ var { Text: IH } = za, LH = [
|
|
|
57981
58048
|
label: "Permissions"
|
|
57982
58049
|
}
|
|
57983
58050
|
];
|
|
57984
|
-
function
|
|
58051
|
+
function BH(e) {
|
|
57985
58052
|
return String(e || "").replace(/[-_]/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()).trim();
|
|
57986
58053
|
}
|
|
57987
|
-
function
|
|
58054
|
+
function VH(e) {
|
|
57988
58055
|
return String(e || "").trim().toLowerCase();
|
|
57989
58056
|
}
|
|
57990
|
-
function
|
|
58057
|
+
function HH(e) {
|
|
57991
58058
|
return e?.key || e?.collectionName || e?.value || "";
|
|
57992
58059
|
}
|
|
57993
|
-
function
|
|
58060
|
+
function UH(e = [], t = []) {
|
|
57994
58061
|
let n = [], r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
|
|
57995
58062
|
return e.forEach((e) => {
|
|
57996
|
-
let t =
|
|
58063
|
+
let t = HH(e);
|
|
57997
58064
|
if (!t) return;
|
|
57998
|
-
let o =
|
|
58065
|
+
let o = VH(e.key || t), s = VH(e.collectionName);
|
|
57999
58066
|
e.seeded && (i.add(o), s && i.add(s)), s && a.add(s), r.add(t), n.push({
|
|
58000
|
-
label: e.label ||
|
|
58067
|
+
label: e.label || BH(t),
|
|
58001
58068
|
value: t,
|
|
58002
58069
|
disabled: !!e.seeded
|
|
58003
58070
|
});
|
|
58004
58071
|
}), t.forEach((e) => {
|
|
58005
58072
|
let t = String(e || "").trim();
|
|
58006
58073
|
if (!t || r.has(t)) return;
|
|
58007
|
-
let o =
|
|
58074
|
+
let o = VH(t);
|
|
58008
58075
|
a.has(o) || i.has(o) || (r.add(t), n.push({
|
|
58009
|
-
label:
|
|
58076
|
+
label: BH(t),
|
|
58010
58077
|
value: t,
|
|
58011
58078
|
disabled: !1
|
|
58012
58079
|
}));
|
|
58013
58080
|
}), n;
|
|
58014
58081
|
}
|
|
58015
|
-
function
|
|
58082
|
+
function WH() {
|
|
58016
58083
|
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 = $i(async () => {
|
|
58017
58084
|
d(!0);
|
|
58018
58085
|
try {
|
|
@@ -58026,7 +58093,7 @@ function HH() {
|
|
|
58026
58093
|
}, []), C = $i(async () => {
|
|
58027
58094
|
_(!0);
|
|
58028
58095
|
try {
|
|
58029
|
-
let [e, t] = await Promise.all([gn(), qt()]), n =
|
|
58096
|
+
let [e, t] = await Promise.all([gn(), qt()]), n = UH(e.modules, t), r = new Set(n.filter((e) => !e.disabled).map((e) => e.value));
|
|
58030
58097
|
p(n), h((e) => e.filter((e) => r.has(e)));
|
|
58031
58098
|
} catch {
|
|
58032
58099
|
q.error("Failed to load seed status");
|
|
@@ -58092,7 +58159,7 @@ function HH() {
|
|
|
58092
58159
|
onClick: w,
|
|
58093
58160
|
children: "Seed Field Config"
|
|
58094
58161
|
})]
|
|
58095
|
-
}), /* @__PURE__ */ Y(
|
|
58162
|
+
}), /* @__PURE__ */ Y(RH, {
|
|
58096
58163
|
type: "secondary",
|
|
58097
58164
|
style: {
|
|
58098
58165
|
display: "block",
|
|
@@ -58172,13 +58239,13 @@ function HH() {
|
|
|
58172
58239
|
style: { marginBottom: 12 },
|
|
58173
58240
|
children: /* @__PURE__ */ Y("div", {
|
|
58174
58241
|
className: "uss-config-toggle",
|
|
58175
|
-
children:
|
|
58242
|
+
children: zH.map((e) => /* @__PURE__ */ Y("button", {
|
|
58176
58243
|
className: `uss-config-btn${i === e.key ? " active" : ""}`,
|
|
58177
58244
|
onClick: () => a(e.key),
|
|
58178
58245
|
children: e.label
|
|
58179
58246
|
}, e.key))
|
|
58180
58247
|
})
|
|
58181
|
-
}), e && (i === "permissions" ? /* @__PURE__ */ Y(
|
|
58248
|
+
}), e && (i === "permissions" ? /* @__PURE__ */ Y(LH, { role: e }, e?.roleId) : /* @__PURE__ */ Y(gj, {
|
|
58182
58249
|
role: e,
|
|
58183
58250
|
configType: i
|
|
58184
58251
|
}, `${e?.roleId}-${i}`))]
|
|
@@ -58187,20 +58254,20 @@ function HH() {
|
|
|
58187
58254
|
}
|
|
58188
58255
|
//#endregion
|
|
58189
58256
|
//#region src/pages/Modules/Admin/PermissionsPage.jsx
|
|
58190
|
-
var
|
|
58191
|
-
function
|
|
58257
|
+
var GH = "perm-module-labels", KH = "perm-action-labels";
|
|
58258
|
+
function qH(e) {
|
|
58192
58259
|
try {
|
|
58193
58260
|
return JSON.parse(localStorage.getItem(e) ?? "{}");
|
|
58194
58261
|
} catch {
|
|
58195
58262
|
return {};
|
|
58196
58263
|
}
|
|
58197
58264
|
}
|
|
58198
|
-
function
|
|
58265
|
+
function JH(e, t) {
|
|
58199
58266
|
try {
|
|
58200
58267
|
localStorage.setItem(e, JSON.stringify(t));
|
|
58201
58268
|
} catch {}
|
|
58202
58269
|
}
|
|
58203
|
-
function
|
|
58270
|
+
function YH({ label: e, onSave: t, onDelete: n, loading: r }) {
|
|
58204
58271
|
let [i, a] = L(!1), [o, s] = L(e);
|
|
58205
58272
|
function c() {
|
|
58206
58273
|
a(!1);
|
|
@@ -58251,7 +58318,7 @@ function qH({ label: e, onSave: t, onDelete: n, loading: r }) {
|
|
|
58251
58318
|
})]
|
|
58252
58319
|
});
|
|
58253
58320
|
}
|
|
58254
|
-
function
|
|
58321
|
+
function XH({ open: e, onClose: t }) {
|
|
58255
58322
|
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);
|
|
58256
58323
|
F(() => {
|
|
58257
58324
|
e && (S(), C());
|
|
@@ -58373,7 +58440,7 @@ function JH({ open: e, onClose: t }) {
|
|
|
58373
58440
|
className: "perm-empty",
|
|
58374
58441
|
style: { paddingTop: 24 },
|
|
58375
58442
|
children: "No modules found"
|
|
58376
|
-
}), i.map((e) => /* @__PURE__ */ Y(
|
|
58443
|
+
}), i.map((e) => /* @__PURE__ */ Y(YH, {
|
|
58377
58444
|
label: e.MENUNAME,
|
|
58378
58445
|
onSave: (t) => T(e.MENUID, t),
|
|
58379
58446
|
onDelete: () => E(e.MENUID)
|
|
@@ -58418,7 +58485,7 @@ function JH({ open: e, onClose: t }) {
|
|
|
58418
58485
|
className: "perm-empty",
|
|
58419
58486
|
style: { paddingTop: 24 },
|
|
58420
58487
|
children: "No actions found"
|
|
58421
|
-
}), f.map((e) => /* @__PURE__ */ Y(
|
|
58488
|
+
}), f.map((e) => /* @__PURE__ */ Y(YH, {
|
|
58422
58489
|
label: `${e.permissionName} (${e.permissionKey})`,
|
|
58423
58490
|
onSave: (t) => O(e.permissionId, t),
|
|
58424
58491
|
onDelete: () => k(e.permissionId)
|
|
@@ -58448,14 +58515,14 @@ function JH({ open: e, onClose: t }) {
|
|
|
58448
58515
|
})
|
|
58449
58516
|
});
|
|
58450
58517
|
}
|
|
58451
|
-
function
|
|
58452
|
-
let [e, t] = L([]), [n, r] = L(!1), [i, a] = L(null), [o, s] = L(""), [c, l] = L(!1), [u, d] = L(() => GH
|
|
58518
|
+
function ZH() {
|
|
58519
|
+
let [e, t] = L([]), [n, r] = L(!1), [i, a] = L(null), [o, s] = L(""), [c, l] = L(!1), [u, d] = L(() => qH(GH)), [f, p] = L(() => qH(KH)), m = $i((e, t) => {
|
|
58453
58520
|
d((n) => {
|
|
58454
58521
|
let r = {
|
|
58455
58522
|
...n,
|
|
58456
58523
|
[e]: t
|
|
58457
58524
|
};
|
|
58458
|
-
return
|
|
58525
|
+
return JH(GH, r), r;
|
|
58459
58526
|
});
|
|
58460
58527
|
}, []), h = $i((e, t) => {
|
|
58461
58528
|
p((n) => {
|
|
@@ -58463,11 +58530,11 @@ function YH() {
|
|
|
58463
58530
|
...n,
|
|
58464
58531
|
[e]: t
|
|
58465
58532
|
};
|
|
58466
|
-
return KH
|
|
58533
|
+
return JH(KH, r), r;
|
|
58467
58534
|
});
|
|
58468
58535
|
}, []);
|
|
58469
58536
|
function g() {
|
|
58470
|
-
d({}), p({}),
|
|
58537
|
+
d({}), p({}), JH(GH, {}), JH(KH, {}), q.success("Labels reset to defaults");
|
|
58471
58538
|
}
|
|
58472
58539
|
let _ = $i(async () => {
|
|
58473
58540
|
r(!0);
|
|
@@ -58551,7 +58618,7 @@ function YH() {
|
|
|
58551
58618
|
})]
|
|
58552
58619
|
}),
|
|
58553
58620
|
bodyStyle: { padding: "12px 16px" },
|
|
58554
|
-
children: i ? /* @__PURE__ */ Y(
|
|
58621
|
+
children: i ? /* @__PURE__ */ Y(LH, {
|
|
58555
58622
|
role: i,
|
|
58556
58623
|
moduleLabels: u,
|
|
58557
58624
|
actionLabels: f,
|
|
@@ -58562,7 +58629,7 @@ function YH() {
|
|
|
58562
58629
|
children: "Select a role from the left to manage its permissions."
|
|
58563
58630
|
})
|
|
58564
58631
|
}),
|
|
58565
|
-
/* @__PURE__ */ Y(
|
|
58632
|
+
/* @__PURE__ */ Y(XH, {
|
|
58566
58633
|
open: c,
|
|
58567
58634
|
onClose: () => l(!1)
|
|
58568
58635
|
})
|
|
@@ -58571,7 +58638,7 @@ function YH() {
|
|
|
58571
58638
|
}
|
|
58572
58639
|
//#endregion
|
|
58573
58640
|
//#region src/components/cards/OnboardingCard.jsx
|
|
58574
|
-
var { Title:
|
|
58641
|
+
var { Title: QH, Text: $H } = za, eU = [
|
|
58575
58642
|
{
|
|
58576
58643
|
label: "In Progress",
|
|
58577
58644
|
value: 107,
|
|
@@ -58597,10 +58664,10 @@ var { Title: XH, Text: ZH } = za, QH = [
|
|
|
58597
58664
|
color: "peach"
|
|
58598
58665
|
}
|
|
58599
58666
|
];
|
|
58600
|
-
function
|
|
58667
|
+
function tU({ items: e = eU }) {
|
|
58601
58668
|
return /* @__PURE__ */ Y(la, {
|
|
58602
58669
|
className: "onboarding-card",
|
|
58603
|
-
title: /* @__PURE__ */ Y(
|
|
58670
|
+
title: /* @__PURE__ */ Y(QH, {
|
|
58604
58671
|
level: 5,
|
|
58605
58672
|
children: "Onboarding"
|
|
58606
58673
|
}),
|
|
@@ -58619,7 +58686,7 @@ function $H({ items: e = QH }) {
|
|
|
58619
58686
|
children: /* @__PURE__ */ X("div", {
|
|
58620
58687
|
className: `onboarding-item ${e.color}`,
|
|
58621
58688
|
children: [
|
|
58622
|
-
/* @__PURE__ */ Y(
|
|
58689
|
+
/* @__PURE__ */ Y($H, {
|
|
58623
58690
|
className: "onboarding-item-label",
|
|
58624
58691
|
children: e.label
|
|
58625
58692
|
}),
|
|
@@ -58629,7 +58696,7 @@ function $H({ items: e = QH }) {
|
|
|
58629
58696
|
}),
|
|
58630
58697
|
/* @__PURE__ */ Y("div", {
|
|
58631
58698
|
className: "onboarding-item-footer",
|
|
58632
|
-
children: /* @__PURE__ */ Y(
|
|
58699
|
+
children: /* @__PURE__ */ Y($H, {
|
|
58633
58700
|
className: "onboarding-item-sub",
|
|
58634
58701
|
children: e.sub
|
|
58635
58702
|
})
|
|
@@ -58642,7 +58709,7 @@ function $H({ items: e = QH }) {
|
|
|
58642
58709
|
}
|
|
58643
58710
|
//#endregion
|
|
58644
58711
|
//#region src/pages/Modules/LegacyAdminPage.jsx
|
|
58645
|
-
var { Text:
|
|
58712
|
+
var { Text: nU, Title: rU } = za, iU = [
|
|
58646
58713
|
{
|
|
58647
58714
|
group: "Dashboard",
|
|
58648
58715
|
items: [{
|
|
@@ -58857,7 +58924,7 @@ var { Text: eU, Title: tU } = za, nU = [
|
|
|
58857
58924
|
}
|
|
58858
58925
|
]
|
|
58859
58926
|
}
|
|
58860
|
-
],
|
|
58927
|
+
], aU = [
|
|
58861
58928
|
{
|
|
58862
58929
|
label: "Sourced",
|
|
58863
58930
|
count: 312,
|
|
@@ -58888,7 +58955,7 @@ var { Text: eU, Title: tU } = za, nU = [
|
|
|
58888
58955
|
color: "#E24B4A",
|
|
58889
58956
|
pct: 10
|
|
58890
58957
|
}
|
|
58891
|
-
],
|
|
58958
|
+
], oU = [
|
|
58892
58959
|
{
|
|
58893
58960
|
name: "Tcs",
|
|
58894
58961
|
jobs: 14,
|
|
@@ -58909,7 +58976,7 @@ var { Text: eU, Title: tU } = za, nU = [
|
|
|
58909
58976
|
jobs: 5,
|
|
58910
58977
|
candidates: 38
|
|
58911
58978
|
}
|
|
58912
|
-
],
|
|
58979
|
+
], sU = [
|
|
58913
58980
|
{
|
|
58914
58981
|
text: "New candidate Ravi Kumar added to Java Developer role",
|
|
58915
58982
|
time: "2 min ago",
|
|
@@ -58936,7 +59003,7 @@ var { Text: eU, Title: tU } = za, nU = [
|
|
|
58936
59003
|
color: "#E24B4A"
|
|
58937
59004
|
}
|
|
58938
59005
|
];
|
|
58939
|
-
function
|
|
59006
|
+
function cU() {
|
|
58940
59007
|
return /* @__PURE__ */ X("div", {
|
|
58941
59008
|
style: {
|
|
58942
59009
|
display: "flex",
|
|
@@ -58949,11 +59016,11 @@ function oU() {
|
|
|
58949
59016
|
title: "Admin Dashboard",
|
|
58950
59017
|
children: [
|
|
58951
59018
|
/* @__PURE__ */ Y("div", { className: "admin-accent-bar" }),
|
|
58952
|
-
/* @__PURE__ */ Y(
|
|
59019
|
+
/* @__PURE__ */ Y(rU, {
|
|
58953
59020
|
level: 5,
|
|
58954
59021
|
children: "Admin Dashboard"
|
|
58955
59022
|
}),
|
|
58956
|
-
/* @__PURE__ */ Y(
|
|
59023
|
+
/* @__PURE__ */ Y(nU, {
|
|
58957
59024
|
type: "secondary",
|
|
58958
59025
|
children: "Overview of jobs, candidates, onboarding and recent activity"
|
|
58959
59026
|
})
|
|
@@ -58961,7 +59028,7 @@ function oU() {
|
|
|
58961
59028
|
}),
|
|
58962
59029
|
/* @__PURE__ */ Y("div", {
|
|
58963
59030
|
className: "admin-dashboard-stats",
|
|
58964
|
-
children: /* @__PURE__ */ Y(
|
|
59031
|
+
children: /* @__PURE__ */ Y(gH, { stats: [
|
|
58965
59032
|
{
|
|
58966
59033
|
label: "Total Jobs",
|
|
58967
59034
|
value: 1697,
|
|
@@ -58991,18 +59058,18 @@ function oU() {
|
|
|
58991
59058
|
}),
|
|
58992
59059
|
/* @__PURE__ */ X("div", {
|
|
58993
59060
|
className: "admin-dashboard-mid-row",
|
|
58994
|
-
children: [/* @__PURE__ */ Y(
|
|
59061
|
+
children: [/* @__PURE__ */ Y(tU, {}), /* @__PURE__ */ X($A, {
|
|
58995
59062
|
icon: /* @__PURE__ */ Y(Ga, {}),
|
|
58996
59063
|
title: "Candidate Pipeline",
|
|
58997
59064
|
children: [
|
|
58998
|
-
/* @__PURE__ */ Y(
|
|
59065
|
+
/* @__PURE__ */ Y(nU, {
|
|
58999
59066
|
type: "secondary",
|
|
59000
59067
|
style: { fontSize: 12 },
|
|
59001
59068
|
children: "By stage (892 total)"
|
|
59002
59069
|
}),
|
|
59003
59070
|
/* @__PURE__ */ Y("div", {
|
|
59004
59071
|
className: "admin-pipeline-bar",
|
|
59005
|
-
children:
|
|
59072
|
+
children: aU.map((e) => /* @__PURE__ */ Y("div", {
|
|
59006
59073
|
className: "admin-pipeline-seg",
|
|
59007
59074
|
style: {
|
|
59008
59075
|
width: `${e.pct}%`,
|
|
@@ -59012,7 +59079,7 @@ function oU() {
|
|
|
59012
59079
|
}),
|
|
59013
59080
|
/* @__PURE__ */ Y("div", {
|
|
59014
59081
|
className: "admin-pipeline-legend",
|
|
59015
|
-
children:
|
|
59082
|
+
children: aU.map((e) => /* @__PURE__ */ X("div", {
|
|
59016
59083
|
className: "admin-pipeline-legend-item",
|
|
59017
59084
|
children: [
|
|
59018
59085
|
/* @__PURE__ */ Y("span", {
|
|
@@ -59026,7 +59093,7 @@ function oU() {
|
|
|
59026
59093
|
}, e.label))
|
|
59027
59094
|
}),
|
|
59028
59095
|
/* @__PURE__ */ Y("div", { className: "admin-divider" }),
|
|
59029
|
-
/* @__PURE__ */ Y(
|
|
59096
|
+
/* @__PURE__ */ Y(nU, {
|
|
59030
59097
|
strong: !0,
|
|
59031
59098
|
style: { fontSize: 12 },
|
|
59032
59099
|
children: "Submission status"
|
|
@@ -59037,7 +59104,7 @@ function oU() {
|
|
|
59037
59104
|
children: [
|
|
59038
59105
|
/* @__PURE__ */ X("div", {
|
|
59039
59106
|
className: "admin-sub-status-item",
|
|
59040
|
-
children: [/* @__PURE__ */ Y(
|
|
59107
|
+
children: [/* @__PURE__ */ Y(nU, {
|
|
59041
59108
|
style: { fontSize: 13 },
|
|
59042
59109
|
children: "Pending client review"
|
|
59043
59110
|
}), /* @__PURE__ */ Y("span", {
|
|
@@ -59047,7 +59114,7 @@ function oU() {
|
|
|
59047
59114
|
}),
|
|
59048
59115
|
/* @__PURE__ */ X("div", {
|
|
59049
59116
|
className: "admin-sub-status-item",
|
|
59050
|
-
children: [/* @__PURE__ */ Y(
|
|
59117
|
+
children: [/* @__PURE__ */ Y(nU, {
|
|
59051
59118
|
style: { fontSize: 13 },
|
|
59052
59119
|
children: "Client approved"
|
|
59053
59120
|
}), /* @__PURE__ */ Y("span", {
|
|
@@ -59057,7 +59124,7 @@ function oU() {
|
|
|
59057
59124
|
}),
|
|
59058
59125
|
/* @__PURE__ */ X("div", {
|
|
59059
59126
|
className: "admin-sub-status-item",
|
|
59060
|
-
children: [/* @__PURE__ */ Y(
|
|
59127
|
+
children: [/* @__PURE__ */ Y(nU, {
|
|
59061
59128
|
style: { fontSize: 13 },
|
|
59062
59129
|
children: "Rejected"
|
|
59063
59130
|
}), /* @__PURE__ */ Y("span", {
|
|
@@ -59080,7 +59147,7 @@ function oU() {
|
|
|
59080
59147
|
size: "small",
|
|
59081
59148
|
children: "View all"
|
|
59082
59149
|
}),
|
|
59083
|
-
children:
|
|
59150
|
+
children: oU.map((e) => /* @__PURE__ */ X("div", {
|
|
59084
59151
|
className: "admin-client-row",
|
|
59085
59152
|
children: [/* @__PURE__ */ X("div", {
|
|
59086
59153
|
className: "admin-client-left",
|
|
@@ -59108,7 +59175,7 @@ function oU() {
|
|
|
59108
59175
|
}), /* @__PURE__ */ Y($A, {
|
|
59109
59176
|
icon: /* @__PURE__ */ Y(Za, {}),
|
|
59110
59177
|
title: "Recent Activity",
|
|
59111
|
-
children:
|
|
59178
|
+
children: sU.map((e, t) => /* @__PURE__ */ X("div", {
|
|
59112
59179
|
className: "admin-activity-row",
|
|
59113
59180
|
children: [/* @__PURE__ */ Y("div", {
|
|
59114
59181
|
className: "admin-activity-dot",
|
|
@@ -59136,7 +59203,7 @@ function oU() {
|
|
|
59136
59203
|
children: [
|
|
59137
59204
|
/* @__PURE__ */ X(z, {
|
|
59138
59205
|
span: 8,
|
|
59139
|
-
children: [/* @__PURE__ */ Y(
|
|
59206
|
+
children: [/* @__PURE__ */ Y(nU, {
|
|
59140
59207
|
type: "secondary",
|
|
59141
59208
|
style: {
|
|
59142
59209
|
fontSize: 12,
|
|
@@ -59149,7 +59216,7 @@ function oU() {
|
|
|
59149
59216
|
["Templates", 2]
|
|
59150
59217
|
].map(([e, t]) => /* @__PURE__ */ X("div", {
|
|
59151
59218
|
className: "admin-cfg-overview-row",
|
|
59152
|
-
children: [/* @__PURE__ */ Y(
|
|
59219
|
+
children: [/* @__PURE__ */ Y(nU, {
|
|
59153
59220
|
style: { fontSize: 12 },
|
|
59154
59221
|
children: e
|
|
59155
59222
|
}), /* @__PURE__ */ X("span", {
|
|
@@ -59160,7 +59227,7 @@ function oU() {
|
|
|
59160
59227
|
}),
|
|
59161
59228
|
/* @__PURE__ */ X(z, {
|
|
59162
59229
|
span: 8,
|
|
59163
|
-
children: [/* @__PURE__ */ Y(
|
|
59230
|
+
children: [/* @__PURE__ */ Y(nU, {
|
|
59164
59231
|
type: "secondary",
|
|
59165
59232
|
style: {
|
|
59166
59233
|
fontSize: 12,
|
|
@@ -59173,7 +59240,7 @@ function oU() {
|
|
|
59173
59240
|
["Submissions", 2]
|
|
59174
59241
|
].map(([e, t]) => /* @__PURE__ */ X("div", {
|
|
59175
59242
|
className: "admin-cfg-overview-row",
|
|
59176
|
-
children: [/* @__PURE__ */ Y(
|
|
59243
|
+
children: [/* @__PURE__ */ Y(nU, {
|
|
59177
59244
|
style: { fontSize: 12 },
|
|
59178
59245
|
children: e
|
|
59179
59246
|
}), /* @__PURE__ */ X("span", {
|
|
@@ -59184,7 +59251,7 @@ function oU() {
|
|
|
59184
59251
|
}),
|
|
59185
59252
|
/* @__PURE__ */ X(z, {
|
|
59186
59253
|
span: 8,
|
|
59187
|
-
children: [/* @__PURE__ */ Y(
|
|
59254
|
+
children: [/* @__PURE__ */ Y(nU, {
|
|
59188
59255
|
type: "secondary",
|
|
59189
59256
|
style: {
|
|
59190
59257
|
fontSize: 12,
|
|
@@ -59197,10 +59264,10 @@ function oU() {
|
|
|
59197
59264
|
["Config Items", 19]
|
|
59198
59265
|
].map(([e, t]) => /* @__PURE__ */ X("div", {
|
|
59199
59266
|
className: "admin-cfg-overview-row",
|
|
59200
|
-
children: [/* @__PURE__ */ Y(
|
|
59267
|
+
children: [/* @__PURE__ */ Y(nU, {
|
|
59201
59268
|
style: { fontSize: 12 },
|
|
59202
59269
|
children: e
|
|
59203
|
-
}), /* @__PURE__ */ Y(
|
|
59270
|
+
}), /* @__PURE__ */ Y(nU, {
|
|
59204
59271
|
strong: !0,
|
|
59205
59272
|
style: { fontSize: 12 },
|
|
59206
59273
|
children: t
|
|
@@ -59213,7 +59280,7 @@ function oU() {
|
|
|
59213
59280
|
]
|
|
59214
59281
|
});
|
|
59215
59282
|
}
|
|
59216
|
-
function
|
|
59283
|
+
function lU({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r, setSearchText: i, allItems: a, handleNav: o }) {
|
|
59217
59284
|
return /* @__PURE__ */ X(ka, {
|
|
59218
59285
|
gutter: [16, 16],
|
|
59219
59286
|
children: [
|
|
@@ -59232,11 +59299,11 @@ function sU({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
59232
59299
|
}),
|
|
59233
59300
|
children: [
|
|
59234
59301
|
/* @__PURE__ */ Y("div", { className: "admin-accent-bar" }),
|
|
59235
|
-
/* @__PURE__ */ Y(
|
|
59302
|
+
/* @__PURE__ */ Y(rU, {
|
|
59236
59303
|
level: 5,
|
|
59237
59304
|
children: e?.heading
|
|
59238
59305
|
}),
|
|
59239
|
-
/* @__PURE__ */ Y(
|
|
59306
|
+
/* @__PURE__ */ Y(nU, {
|
|
59240
59307
|
type: "secondary",
|
|
59241
59308
|
children: e?.desc
|
|
59242
59309
|
})
|
|
@@ -59250,7 +59317,7 @@ function sU({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
59250
59317
|
children: /* @__PURE__ */ Y($A, {
|
|
59251
59318
|
icon: /* @__PURE__ */ Y(Ga, {}),
|
|
59252
59319
|
title: "Configuration Items",
|
|
59253
|
-
extra: /* @__PURE__ */ X(
|
|
59320
|
+
extra: /* @__PURE__ */ X(nU, {
|
|
59254
59321
|
type: "secondary",
|
|
59255
59322
|
children: [
|
|
59256
59323
|
n.length,
|
|
@@ -59317,7 +59384,7 @@ function sU({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
59317
59384
|
title: "Section Overview",
|
|
59318
59385
|
children: [/* @__PURE__ */ Y("div", {
|
|
59319
59386
|
className: "admin-overview-list",
|
|
59320
|
-
children:
|
|
59387
|
+
children: iU.filter((e) => e.group !== "Dashboard").map((e) => {
|
|
59321
59388
|
let n = e.group === t?.group;
|
|
59322
59389
|
return /* @__PURE__ */ X("div", {
|
|
59323
59390
|
className: `admin-overview-item${n ? " active" : ""}`,
|
|
@@ -59365,12 +59432,12 @@ function sU({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
59365
59432
|
]
|
|
59366
59433
|
});
|
|
59367
59434
|
}
|
|
59368
|
-
function
|
|
59369
|
-
let [e, t] = L("dashboard"), [n, r] = L(""), i = I(() =>
|
|
59435
|
+
function uU() {
|
|
59436
|
+
let [e, t] = L("dashboard"), [n, r] = L(""), i = I(() => iU.flatMap((e) => e.items), []), a = I(() => i.find((t) => t.id === e), [i, e]), o = I(() => iU.find((t) => t.items.some((t) => t.id === e)), [e]), s = I(() => {
|
|
59370
59437
|
if (!a?.cards) return [];
|
|
59371
59438
|
let e = n.trim().toLowerCase();
|
|
59372
59439
|
return e ? a.cards.filter((t) => t.label.toLowerCase().includes(e) || t.desc.toLowerCase().includes(e)) : a.cards;
|
|
59373
|
-
}, [a, n]), c = I(() =>
|
|
59440
|
+
}, [a, n]), c = I(() => iU.map((e) => ({
|
|
59374
59441
|
key: e.group,
|
|
59375
59442
|
type: "group",
|
|
59376
59443
|
label: e.group,
|
|
@@ -59419,7 +59486,7 @@ function cU() {
|
|
|
59419
59486
|
children: "Groups"
|
|
59420
59487
|
}), /* @__PURE__ */ Y("span", {
|
|
59421
59488
|
className: "admin-sidebar-pill-value",
|
|
59422
|
-
children:
|
|
59489
|
+
children: iU.length
|
|
59423
59490
|
})]
|
|
59424
59491
|
})
|
|
59425
59492
|
}), /* @__PURE__ */ Y(z, {
|
|
@@ -59449,7 +59516,7 @@ function cU() {
|
|
|
59449
59516
|
xs: 24,
|
|
59450
59517
|
lg: 18,
|
|
59451
59518
|
xl: 19,
|
|
59452
|
-
children: e === "dashboard" ? /* @__PURE__ */ Y(
|
|
59519
|
+
children: e === "dashboard" ? /* @__PURE__ */ Y(cU, {}) : a?.component === "form-groups" ? /* @__PURE__ */ Y(vN, {}) : a?.component === "detail-groups" ? /* @__PURE__ */ Y(QN, {}) : a?.component === "row-actions" ? /* @__PURE__ */ Y(HP, {}) : a?.component === "users" ? /* @__PURE__ */ Y(bH, {}) : a?.component === "teams" ? /* @__PURE__ */ Y(EH, {}) : a?.component === "roles" ? /* @__PURE__ */ Y(WH, {}) : a?.component === "permissions" ? /* @__PURE__ */ Y(ZH, {}) : a?.component === "templates" ? /* @__PURE__ */ Y(eF, {}) : a?.component === "ai-services" ? /* @__PURE__ */ Y(sF, {}) : a?.component === "bgc-integration" ? /* @__PURE__ */ Y(pF, {}) : /* @__PURE__ */ Y(lU, {
|
|
59453
59520
|
activeSection: a,
|
|
59454
59521
|
activeGroup: o,
|
|
59455
59522
|
filteredCards: s,
|
|
@@ -59464,8 +59531,8 @@ function cU() {
|
|
|
59464
59531
|
}
|
|
59465
59532
|
//#endregion
|
|
59466
59533
|
//#region src/pages/stickyNotesFullPage.jsx
|
|
59467
|
-
var { Title:
|
|
59468
|
-
function
|
|
59534
|
+
var { Title: dU } = za;
|
|
59535
|
+
function fU() {
|
|
59469
59536
|
let e = Zs(), { state: t } = Xs(), n = t?.moduleName || "stickyNotes", r = t?.title || "Sticky Notes", i = {
|
|
59470
59537
|
...t?.request,
|
|
59471
59538
|
params: {
|
|
@@ -59490,7 +59557,7 @@ function uU() {
|
|
|
59490
59557
|
}
|
|
59491
59558
|
//#endregion
|
|
59492
59559
|
//#region src/pages/BulkUpload/index.jsx
|
|
59493
|
-
var { Text:
|
|
59560
|
+
var { Text: pU, Title: mU } = za, hU = 10485760, gU = "/templates/test_cases_flow_template.base64.txt", _U = "test_cases_flow_template.xlsx", vU = "module | subModule | step_order | description | actions | key | value | expected | scenario", yU = {
|
|
59494
59561
|
idle: 0,
|
|
59495
59562
|
module_set: 1,
|
|
59496
59563
|
encoding: 1,
|
|
@@ -59499,7 +59566,7 @@ var { Text: dU, Title: fU } = za, pU = 10485760, mU = "/templates/test_cases_flo
|
|
|
59499
59566
|
inserting: 3,
|
|
59500
59567
|
done: 4,
|
|
59501
59568
|
error: 1
|
|
59502
|
-
},
|
|
59569
|
+
}, bU = [
|
|
59503
59570
|
{
|
|
59504
59571
|
label: "Home",
|
|
59505
59572
|
href: "/"
|
|
@@ -59513,31 +59580,31 @@ var { Text: dU, Title: fU } = za, pU = 10485760, mU = "/templates/test_cases_flo
|
|
|
59513
59580
|
href: "/bulk-upload"
|
|
59514
59581
|
}
|
|
59515
59582
|
];
|
|
59516
|
-
function
|
|
59583
|
+
function xU(e) {
|
|
59517
59584
|
return new Promise((t, n) => {
|
|
59518
59585
|
let r = new FileReader();
|
|
59519
59586
|
r.onload = () => t(String(r.result).split(",")[1]), r.onerror = n, r.readAsDataURL(e);
|
|
59520
59587
|
});
|
|
59521
59588
|
}
|
|
59522
|
-
function
|
|
59589
|
+
function SU(e) {
|
|
59523
59590
|
return e.filter((e) => e.row_status === "valid").map((e) => {
|
|
59524
59591
|
let t = { ...e };
|
|
59525
59592
|
return delete t.row_status, delete t.errors, t;
|
|
59526
59593
|
});
|
|
59527
59594
|
}
|
|
59528
|
-
function
|
|
59595
|
+
function CU(e) {
|
|
59529
59596
|
return e.flatMap((e) => (e.errors ?? []).map((t) => ({
|
|
59530
59597
|
id: e.id,
|
|
59531
59598
|
...t
|
|
59532
59599
|
})));
|
|
59533
59600
|
}
|
|
59534
|
-
function
|
|
59601
|
+
function wU({ errors: e }) {
|
|
59535
59602
|
return /* @__PURE__ */ Y("div", {
|
|
59536
59603
|
className: "bulk-tooltip-errors",
|
|
59537
59604
|
children: (e ?? []).map((e, t) => /* @__PURE__ */ Y("div", { children: e.message }, `${e.field}-${t}`))
|
|
59538
59605
|
});
|
|
59539
59606
|
}
|
|
59540
|
-
function
|
|
59607
|
+
function TU({ errors: e, expanded: t, onToggle: n, onSummaryClick: r }) {
|
|
59541
59608
|
return e.length === 0 ? null : /* @__PURE__ */ X("div", {
|
|
59542
59609
|
className: "bulk-error-banner",
|
|
59543
59610
|
children: [/* @__PURE__ */ X("div", {
|
|
@@ -59568,7 +59635,7 @@ function CU({ errors: e, expanded: t, onToggle: n, onSummaryClick: r }) {
|
|
|
59568
59635
|
})]
|
|
59569
59636
|
});
|
|
59570
59637
|
}
|
|
59571
|
-
function
|
|
59638
|
+
function EU({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, saving: a, firstInvalidRowId: o, firstInvalidRowRef: s }) {
|
|
59572
59639
|
let c = e.filter((e) => e.row_status === "invalid"), l = t === "errors" ? c : e, u = c.length > 0 || a;
|
|
59573
59640
|
return /* @__PURE__ */ X(J, { children: [
|
|
59574
59641
|
/* @__PURE__ */ X(ka, {
|
|
@@ -59584,7 +59651,7 @@ function wU({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
59584
59651
|
type: t === "errors" ? "primary" : "default",
|
|
59585
59652
|
onClick: () => n("errors"),
|
|
59586
59653
|
children: "Errors only"
|
|
59587
|
-
})] }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ X(
|
|
59654
|
+
})] }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ X(pU, {
|
|
59588
59655
|
type: "secondary",
|
|
59589
59656
|
children: [e.length, " row(s)"]
|
|
59590
59657
|
}) })]
|
|
@@ -59656,7 +59723,7 @@ function wU({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
59656
59723
|
children: "Valid"
|
|
59657
59724
|
}) }),
|
|
59658
59725
|
/* @__PURE__ */ Y("td", { children: n ? /* @__PURE__ */ Y(K, {
|
|
59659
|
-
title: /* @__PURE__ */ Y(
|
|
59726
|
+
title: /* @__PURE__ */ Y(wU, { errors: t }),
|
|
59660
59727
|
placement: "left",
|
|
59661
59728
|
children: /* @__PURE__ */ X("button", {
|
|
59662
59729
|
type: "button",
|
|
@@ -59693,11 +59760,11 @@ function wU({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
59693
59760
|
})
|
|
59694
59761
|
] });
|
|
59695
59762
|
}
|
|
59696
|
-
function
|
|
59763
|
+
function DU() {
|
|
59697
59764
|
let e = Zs(), t = I(() => y(), []), n = ra(null), r = ra(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) => ({
|
|
59698
59765
|
value: e.modulename,
|
|
59699
59766
|
label: e.modulename
|
|
59700
|
-
})), E =
|
|
59767
|
+
})), E = CU(m), D = c === "encoding" || c === "validating", O = !!o && !D, k = yU[c] ?? 0, A = m.find((e) => e.row_status === "invalid")?.id, j = $i(() => {
|
|
59701
59768
|
s(""), l("idle"), d(!1), p(null), h([]), _("all"), b(null), S(null), n.current && (n.current.value = "");
|
|
59702
59769
|
}, []);
|
|
59703
59770
|
F(() => {
|
|
@@ -59723,7 +59790,7 @@ function TU() {
|
|
|
59723
59790
|
l("module_set"), b({ message: "Invalid file type. Please upload an Excel .xlsx or CSV .csv file." });
|
|
59724
59791
|
return;
|
|
59725
59792
|
}
|
|
59726
|
-
if (e.size >
|
|
59793
|
+
if (e.size > hU) {
|
|
59727
59794
|
l("module_set"), b({ message: "File must be 10 MB or smaller." });
|
|
59728
59795
|
return;
|
|
59729
59796
|
}
|
|
@@ -59732,7 +59799,7 @@ function TU() {
|
|
|
59732
59799
|
size: e.size
|
|
59733
59800
|
}), l("encoding");
|
|
59734
59801
|
try {
|
|
59735
|
-
let r = await
|
|
59802
|
+
let r = await xU(e);
|
|
59736
59803
|
l("validating");
|
|
59737
59804
|
let i = await Qk({
|
|
59738
59805
|
filename: e.name,
|
|
@@ -59750,12 +59817,12 @@ function TU() {
|
|
|
59750
59817
|
}
|
|
59751
59818
|
}, M = async () => {
|
|
59752
59819
|
try {
|
|
59753
|
-
let e = await fetch(
|
|
59820
|
+
let e = await fetch(gU);
|
|
59754
59821
|
if (!e.ok) throw Error(`Template file not found (${e.status})`);
|
|
59755
59822
|
let t = (await e.text()).trim(), n = atob(t), r = new Uint8Array(n.length);
|
|
59756
59823
|
for (let e = 0; e < n.length; e += 1) r[e] = n.charCodeAt(e);
|
|
59757
59824
|
let i = new Blob([r], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
59758
|
-
o.href = a, o.download =
|
|
59825
|
+
o.href = a, o.download = _U, document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(a), q.success("Sample template downloaded.");
|
|
59759
59826
|
} catch (e) {
|
|
59760
59827
|
console.error(e), q.error("Unable to download sample template.");
|
|
59761
59828
|
}
|
|
@@ -59766,7 +59833,7 @@ function TU() {
|
|
|
59766
59833
|
project: t?.name ?? "",
|
|
59767
59834
|
module: o,
|
|
59768
59835
|
uploaded_by: localStorage.getItem("user_Email") ?? "",
|
|
59769
|
-
rows:
|
|
59836
|
+
rows: SU(m)
|
|
59770
59837
|
});
|
|
59771
59838
|
S(n), l("done"), q.success("Bulk upload saved. Redirecting to view test cases..."), window.setTimeout(() => e("/viewTestCase"), 900);
|
|
59772
59839
|
} catch (e) {
|
|
@@ -59793,7 +59860,7 @@ function TU() {
|
|
|
59793
59860
|
align: "middle",
|
|
59794
59861
|
justify: "space-between",
|
|
59795
59862
|
className: "breadcrumb-action-wrapper",
|
|
59796
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items:
|
|
59863
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items: bU }) }), t?.name && /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(pU, {
|
|
59797
59864
|
strong: !0,
|
|
59798
59865
|
children: t.name
|
|
59799
59866
|
}) })]
|
|
@@ -59802,16 +59869,16 @@ function TU() {
|
|
|
59802
59869
|
children: [
|
|
59803
59870
|
/* @__PURE__ */ X("div", {
|
|
59804
59871
|
className: "bulk-header",
|
|
59805
|
-
children: [/* @__PURE__ */ Y(
|
|
59872
|
+
children: [/* @__PURE__ */ Y(mU, {
|
|
59806
59873
|
level: 3,
|
|
59807
59874
|
children: "Bulk upload test cases"
|
|
59808
59875
|
}), /* @__PURE__ */ X(U, {
|
|
59809
59876
|
direction: "vertical",
|
|
59810
59877
|
size: 4,
|
|
59811
|
-
children: [/* @__PURE__ */ Y(
|
|
59878
|
+
children: [/* @__PURE__ */ Y(pU, {
|
|
59812
59879
|
type: "secondary",
|
|
59813
|
-
children:
|
|
59814
|
-
}), /* @__PURE__ */ Y(
|
|
59880
|
+
children: vU
|
|
59881
|
+
}), /* @__PURE__ */ Y(pU, {
|
|
59815
59882
|
type: "secondary",
|
|
59816
59883
|
children: "Use the sample template for the required columns. Uploaded rows are saved as Active by default."
|
|
59817
59884
|
})]
|
|
@@ -59909,7 +59976,7 @@ function TU() {
|
|
|
59909
59976
|
className: "v1-card zt-fall",
|
|
59910
59977
|
title: "3. Validation result",
|
|
59911
59978
|
children: [
|
|
59912
|
-
/* @__PURE__ */ Y(
|
|
59979
|
+
/* @__PURE__ */ Y(TU, {
|
|
59913
59980
|
errors: E,
|
|
59914
59981
|
expanded: C,
|
|
59915
59982
|
onToggle: () => w((e) => !e),
|
|
@@ -59921,7 +59988,7 @@ function TU() {
|
|
|
59921
59988
|
message: v.message,
|
|
59922
59989
|
className: "bulk-inline-alert"
|
|
59923
59990
|
}),
|
|
59924
|
-
/* @__PURE__ */ Y(
|
|
59991
|
+
/* @__PURE__ */ Y(EU, {
|
|
59925
59992
|
rows: m,
|
|
59926
59993
|
view: g,
|
|
59927
59994
|
onViewChange: _,
|
|
@@ -59944,17 +60011,17 @@ function TU() {
|
|
|
59944
60011
|
/* @__PURE__ */ Y(z, {
|
|
59945
60012
|
xs: 24,
|
|
59946
60013
|
md: 8,
|
|
59947
|
-
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(
|
|
60014
|
+
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(pU, { children: "Total" }), /* @__PURE__ */ Y("strong", { children: m.length })] })
|
|
59948
60015
|
}),
|
|
59949
60016
|
/* @__PURE__ */ Y(z, {
|
|
59950
60017
|
xs: 24,
|
|
59951
60018
|
md: 8,
|
|
59952
|
-
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(
|
|
60019
|
+
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(pU, { children: "Inserted" }), /* @__PURE__ */ Y("strong", { children: x.inserted ?? 0 })] })
|
|
59953
60020
|
}),
|
|
59954
60021
|
/* @__PURE__ */ Y(z, {
|
|
59955
60022
|
xs: 24,
|
|
59956
60023
|
md: 8,
|
|
59957
|
-
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(
|
|
60024
|
+
children: /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y(pU, { children: "Failed" }), /* @__PURE__ */ Y("strong", { children: x.failed ?? 0 })] })
|
|
59958
60025
|
})
|
|
59959
60026
|
]
|
|
59960
60027
|
}),
|
|
@@ -59978,7 +60045,7 @@ function TU() {
|
|
|
59978
60045
|
}
|
|
59979
60046
|
//#endregion
|
|
59980
60047
|
//#region src/services/dropdownValues/testPageValues.js
|
|
59981
|
-
var
|
|
60048
|
+
var OU = [
|
|
59982
60049
|
{
|
|
59983
60050
|
value: "navigate",
|
|
59984
60051
|
label: "Navigate"
|
|
@@ -60111,75 +60178,75 @@ var EU = [
|
|
|
60111
60178
|
value: "wait_for_text",
|
|
60112
60179
|
label: "Wait For Text"
|
|
60113
60180
|
}
|
|
60114
|
-
], { Text:
|
|
60181
|
+
], { Text: kU } = za, AU = [{
|
|
60115
60182
|
label: "Home",
|
|
60116
60183
|
href: "/"
|
|
60117
60184
|
}, {
|
|
60118
60185
|
label: "Test Cases",
|
|
60119
60186
|
href: "/test-cases"
|
|
60120
|
-
}],
|
|
60187
|
+
}], jU = {
|
|
60121
60188
|
tags: "regression",
|
|
60122
60189
|
active: 1
|
|
60123
|
-
},
|
|
60190
|
+
}, MU = { module: {
|
|
60124
60191
|
dbName: "Modules",
|
|
60125
60192
|
formField: "module",
|
|
60126
60193
|
label: "Module"
|
|
60127
60194
|
} };
|
|
60128
|
-
function
|
|
60195
|
+
function NU(e = []) {
|
|
60129
60196
|
return e.map((e) => ({
|
|
60130
60197
|
value: e,
|
|
60131
60198
|
label: e
|
|
60132
60199
|
}));
|
|
60133
60200
|
}
|
|
60134
|
-
function
|
|
60201
|
+
function PU(e = "") {
|
|
60135
60202
|
return String(e ?? "").trim();
|
|
60136
60203
|
}
|
|
60137
|
-
function
|
|
60138
|
-
return
|
|
60204
|
+
function FU(e = "") {
|
|
60205
|
+
return PU(e).toLowerCase();
|
|
60139
60206
|
}
|
|
60140
|
-
function
|
|
60207
|
+
function IU(e = []) {
|
|
60141
60208
|
let t = /* @__PURE__ */ new Map();
|
|
60142
60209
|
return e.forEach((e) => {
|
|
60143
|
-
let n =
|
|
60210
|
+
let n = PU(e?.flow), r = n.toLowerCase();
|
|
60144
60211
|
n && !t.has(r) && t.set(r, n);
|
|
60145
60212
|
}), Array.from(t.values()).map((e) => ({
|
|
60146
60213
|
value: e,
|
|
60147
60214
|
label: e
|
|
60148
60215
|
}));
|
|
60149
60216
|
}
|
|
60150
|
-
function
|
|
60151
|
-
let r =
|
|
60217
|
+
function LU(e = [], t, n) {
|
|
60218
|
+
let r = PU(t).toLowerCase(), i = PU(n).toLowerCase();
|
|
60152
60219
|
return e.reduce((e, t) => {
|
|
60153
|
-
let n =
|
|
60220
|
+
let n = PU(t?.module).toLowerCase(), a = PU(t?.flow).toLowerCase();
|
|
60154
60221
|
if (n !== r || a !== i) return e;
|
|
60155
60222
|
let o = Number(t?.step_order) || 0;
|
|
60156
60223
|
return Math.max(e, o);
|
|
60157
60224
|
}, 0) + 1;
|
|
60158
60225
|
}
|
|
60159
|
-
function
|
|
60226
|
+
function RU({ icon: e, title: t }) {
|
|
60160
60227
|
return /* @__PURE__ */ X(U, {
|
|
60161
60228
|
size: 10,
|
|
60162
60229
|
align: "center",
|
|
60163
60230
|
children: [/* @__PURE__ */ Y("div", {
|
|
60164
60231
|
className: "v1-section-icon-box",
|
|
60165
60232
|
children: e
|
|
60166
|
-
}), /* @__PURE__ */ Y(
|
|
60233
|
+
}), /* @__PURE__ */ Y(kU, {
|
|
60167
60234
|
strong: !0,
|
|
60168
60235
|
className: "v1-section-label",
|
|
60169
60236
|
children: t
|
|
60170
60237
|
})]
|
|
60171
60238
|
});
|
|
60172
60239
|
}
|
|
60173
|
-
function
|
|
60240
|
+
function zU() {
|
|
60174
60241
|
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({
|
|
60175
60242
|
open: !1,
|
|
60176
60243
|
typeKey: "module"
|
|
60177
|
-
}), [m, h] = L(!1), [g, _] = L(!1), [v, y] = L(!1), b = Zs(), x =
|
|
60244
|
+
}), [m, h] = L(!1), [g, _] = L(!1), [v, y] = L(!1), b = Zs(), x = MU[f.typeKey], S = I(() => NU(n), [n]), C = B.useWatch("module", e), w = B.useWatch("flow", e), T = !!PU(C), E = !!PU(w), D = !T, O = !T || !E, k = (e, t = []) => {
|
|
60178
60245
|
e === "module" && r(t);
|
|
60179
60246
|
}, A = async () => {
|
|
60180
60247
|
l(!0);
|
|
60181
60248
|
try {
|
|
60182
|
-
let e = await qk(
|
|
60249
|
+
let e = await qk(MU.module.dbName);
|
|
60183
60250
|
r(e?.items ?? []);
|
|
60184
60251
|
} catch (e) {
|
|
60185
60252
|
console.error("Unable to load testing options:", e), q.error("Unable to load testing options.");
|
|
@@ -60187,7 +60254,7 @@ function LU() {
|
|
|
60187
60254
|
l(!1);
|
|
60188
60255
|
}
|
|
60189
60256
|
}, j = $i(async (t) => {
|
|
60190
|
-
let n =
|
|
60257
|
+
let n = PU(t);
|
|
60191
60258
|
if (a([]), s([]), e.setFieldsValue({ step_order: void 0 }), n) {
|
|
60192
60259
|
d(!0);
|
|
60193
60260
|
try {
|
|
@@ -60196,7 +60263,7 @@ function LU() {
|
|
|
60196
60263
|
offset: 0,
|
|
60197
60264
|
module: n
|
|
60198
60265
|
}), t = Array.isArray(e?.items) ? e.items : [];
|
|
60199
|
-
a(t), s(
|
|
60266
|
+
a(t), s(IU(t));
|
|
60200
60267
|
} catch (e) {
|
|
60201
60268
|
console.error("Unable to load flows:", e), q.error("Unable to load flows.");
|
|
60202
60269
|
} finally {
|
|
@@ -60204,14 +60271,14 @@ function LU() {
|
|
|
60204
60271
|
}
|
|
60205
60272
|
}
|
|
60206
60273
|
}, [e]), ee = $i(async (t, n, r) => {
|
|
60207
|
-
let i =
|
|
60274
|
+
let i = PU(t), a = PU(n);
|
|
60208
60275
|
if (!i || !a) {
|
|
60209
60276
|
e.setFieldsValue({ step_order: void 0 });
|
|
60210
60277
|
return;
|
|
60211
60278
|
}
|
|
60212
60279
|
_(!0);
|
|
60213
60280
|
try {
|
|
60214
|
-
e.setFieldsValue({ step_order:
|
|
60281
|
+
e.setFieldsValue({ step_order: LU(r, i, a) });
|
|
60215
60282
|
} catch (e) {
|
|
60216
60283
|
console.error("Unable to load step order:", e), q.error("Unable to load step order.");
|
|
60217
60284
|
} finally {
|
|
@@ -60232,15 +60299,15 @@ function LU() {
|
|
|
60232
60299
|
]);
|
|
60233
60300
|
let te = async (t) => {
|
|
60234
60301
|
let n = {
|
|
60235
|
-
module:
|
|
60236
|
-
flow:
|
|
60302
|
+
module: PU(t.module),
|
|
60303
|
+
flow: PU(t.flow),
|
|
60237
60304
|
step_order: Number(t.step_order),
|
|
60238
|
-
description:
|
|
60239
|
-
keyword:
|
|
60240
|
-
target:
|
|
60241
|
-
value:
|
|
60242
|
-
expected:
|
|
60243
|
-
tags: t.tags ?
|
|
60305
|
+
description: PU(t.description),
|
|
60306
|
+
keyword: FU(t.keyword),
|
|
60307
|
+
target: PU(t.target),
|
|
60308
|
+
value: PU(t.value),
|
|
60309
|
+
expected: PU(t.expected),
|
|
60310
|
+
tags: t.tags ? PU(t.tags) : jU.tags,
|
|
60244
60311
|
active: Number(t.active)
|
|
60245
60312
|
};
|
|
60246
60313
|
y(!0);
|
|
@@ -60252,26 +60319,26 @@ function LU() {
|
|
|
60252
60319
|
y(!1);
|
|
60253
60320
|
}
|
|
60254
60321
|
}, M = (t, n) => {
|
|
60255
|
-
e.setFieldsValue({ [t]:
|
|
60322
|
+
e.setFieldsValue({ [t]: PU(n) });
|
|
60256
60323
|
}, N = (t) => {
|
|
60257
60324
|
e.setFieldsValue({
|
|
60258
|
-
module:
|
|
60325
|
+
module: PU(t),
|
|
60259
60326
|
flow: void 0,
|
|
60260
60327
|
step_order: void 0,
|
|
60261
60328
|
keyword: void 0,
|
|
60262
60329
|
description: void 0,
|
|
60263
60330
|
target: void 0,
|
|
60264
|
-
tags:
|
|
60331
|
+
tags: jU.tags,
|
|
60265
60332
|
value: void 0,
|
|
60266
60333
|
expected: void 0
|
|
60267
60334
|
});
|
|
60268
60335
|
}, ne = (t) => {
|
|
60269
60336
|
e.setFieldsValue({
|
|
60270
|
-
flow:
|
|
60337
|
+
flow: PU(t),
|
|
60271
60338
|
step_order: void 0
|
|
60272
60339
|
});
|
|
60273
60340
|
}, re = (e) => {
|
|
60274
|
-
let n =
|
|
60341
|
+
let n = MU[e];
|
|
60275
60342
|
p({
|
|
60276
60343
|
open: !0,
|
|
60277
60344
|
typeKey: e
|
|
@@ -60286,7 +60353,7 @@ function LU() {
|
|
|
60286
60353
|
})), t.resetFields();
|
|
60287
60354
|
}, ae = async () => {
|
|
60288
60355
|
try {
|
|
60289
|
-
let n =
|
|
60356
|
+
let n = PU((await t.validateFields()).name), r = await Jk({
|
|
60290
60357
|
name: n,
|
|
60291
60358
|
type: x.dbName
|
|
60292
60359
|
});
|
|
@@ -60304,7 +60371,7 @@ function LU() {
|
|
|
60304
60371
|
align: "middle",
|
|
60305
60372
|
justify: "space-between",
|
|
60306
60373
|
className: "breadcrumb-action-wrapper",
|
|
60307
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items:
|
|
60374
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items: AU }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(R, {
|
|
60308
60375
|
type: "link",
|
|
60309
60376
|
onClick: () => b("/zinnext-home"),
|
|
60310
60377
|
children: "View Table"
|
|
@@ -60319,7 +60386,7 @@ function LU() {
|
|
|
60319
60386
|
children: /* @__PURE__ */ X(U, {
|
|
60320
60387
|
align: "center",
|
|
60321
60388
|
size: 10,
|
|
60322
|
-
children: [/* @__PURE__ */ Y(ls, { className: "v1-outer-icon" }), /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(
|
|
60389
|
+
children: [/* @__PURE__ */ Y(ls, { className: "v1-outer-icon" }), /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(kU, {
|
|
60323
60390
|
strong: !0,
|
|
60324
60391
|
style: { fontSize: 16 },
|
|
60325
60392
|
children: "Add Test Case"
|
|
@@ -60335,16 +60402,16 @@ function LU() {
|
|
|
60335
60402
|
className: "v1-required-mark",
|
|
60336
60403
|
children: " *"
|
|
60337
60404
|
})] }),
|
|
60338
|
-
initialValues:
|
|
60405
|
+
initialValues: jU,
|
|
60339
60406
|
onFinish: te,
|
|
60340
60407
|
autoComplete: "off",
|
|
60341
60408
|
children: [/* @__PURE__ */ Y(la, {
|
|
60342
60409
|
className: "v1-card",
|
|
60343
|
-
title: /* @__PURE__ */ Y(
|
|
60410
|
+
title: /* @__PURE__ */ Y(RU, {
|
|
60344
60411
|
icon: /* @__PURE__ */ Y(Io, {}),
|
|
60345
60412
|
title: "Test Case Details"
|
|
60346
60413
|
}),
|
|
60347
|
-
extra: /* @__PURE__ */ Y(
|
|
60414
|
+
extra: /* @__PURE__ */ Y(kU, {
|
|
60348
60415
|
type: "secondary",
|
|
60349
60416
|
className: "v1-card-subtitle",
|
|
60350
60417
|
children: "Module, flow, step order and execution data"
|
|
@@ -60421,8 +60488,8 @@ function LU() {
|
|
|
60421
60488
|
disabled: O,
|
|
60422
60489
|
optionFilterProp: "label",
|
|
60423
60490
|
placeholder: "Select action",
|
|
60424
|
-
options:
|
|
60425
|
-
onChange: (t) => e.setFieldsValue({ keyword:
|
|
60491
|
+
options: OU,
|
|
60492
|
+
onChange: (t) => e.setFieldsValue({ keyword: FU(t) })
|
|
60426
60493
|
})
|
|
60427
60494
|
})
|
|
60428
60495
|
}),
|
|
@@ -60542,7 +60609,7 @@ function LU() {
|
|
|
60542
60609
|
maxLength: 100,
|
|
60543
60610
|
placeholder: `Enter ${x.label.toLowerCase()} name`,
|
|
60544
60611
|
onBlur: (e) => {
|
|
60545
|
-
t.setFieldsValue({ name:
|
|
60612
|
+
t.setFieldsValue({ name: PU(e.target.value) });
|
|
60546
60613
|
}
|
|
60547
60614
|
})
|
|
60548
60615
|
}), /* @__PURE__ */ Y(B.Item, {
|
|
@@ -60559,23 +60626,23 @@ function LU() {
|
|
|
60559
60626
|
}
|
|
60560
60627
|
//#endregion
|
|
60561
60628
|
//#region src/pages/TestingPage/ZinnextTestForm.jsx
|
|
60562
|
-
var { Text:
|
|
60629
|
+
var { Text: BU } = za, VU = [{
|
|
60563
60630
|
label: "Home",
|
|
60564
60631
|
href: "/"
|
|
60565
60632
|
}, {
|
|
60566
60633
|
label: "Test Cases",
|
|
60567
60634
|
href: "/addTestCase"
|
|
60568
60635
|
}];
|
|
60569
|
-
function
|
|
60636
|
+
function HU(e = "") {
|
|
60570
60637
|
return String(e ?? "").trim();
|
|
60571
60638
|
}
|
|
60572
|
-
function
|
|
60639
|
+
function UU(e = [], t) {
|
|
60573
60640
|
return e.map((e) => ({
|
|
60574
60641
|
value: e.id,
|
|
60575
60642
|
label: e[t]
|
|
60576
60643
|
}));
|
|
60577
60644
|
}
|
|
60578
|
-
var
|
|
60645
|
+
var WU = [
|
|
60579
60646
|
{
|
|
60580
60647
|
label: "Step",
|
|
60581
60648
|
value: "step_order",
|
|
@@ -60614,22 +60681,22 @@ var HU = [
|
|
|
60614
60681
|
children: "Negative"
|
|
60615
60682
|
})
|
|
60616
60683
|
}
|
|
60617
|
-
],
|
|
60684
|
+
], GU = {
|
|
60618
60685
|
key: !1,
|
|
60619
60686
|
value: !1,
|
|
60620
60687
|
expected: !1
|
|
60621
60688
|
};
|
|
60622
|
-
function
|
|
60623
|
-
return t ? e[t] ??
|
|
60689
|
+
function KU(e, t) {
|
|
60690
|
+
return t ? e[t] ?? GU : GU;
|
|
60624
60691
|
}
|
|
60625
|
-
function
|
|
60692
|
+
function qU(e, t) {
|
|
60626
60693
|
e.setFields(t.map((e) => ({
|
|
60627
60694
|
name: e,
|
|
60628
60695
|
errors: []
|
|
60629
60696
|
})));
|
|
60630
60697
|
}
|
|
60631
|
-
function
|
|
60632
|
-
let [e] = B.useForm(), t = Zs(), [n] = $s(), r = n.get("edit"), i = !!r, a = I(() => y(), []), [o, s] = L([]), [c, l] = L([]), [u, d] = L([]), [f, p] = L(
|
|
60698
|
+
function JU() {
|
|
60699
|
+
let [e] = B.useForm(), t = Zs(), [n] = $s(), r = n.get("edit"), i = !!r, a = I(() => y(), []), [o, s] = L([]), [c, l] = L([]), [u, d] = L([]), [f, p] = L(OU), [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), A = !!D, j = !!O, ee = I(() => KU(m, k), [m, k]), te = I(() => UU(o, "modulename"), [o]), M = I(() => UU(c, "submodulename"), [c]), N = I(() => o.find((e) => e.id === D)?.modulename ?? "", [o, D]), ne = I(() => c.find((e) => e.id === O)?.submodulename ?? "", [O, c]), re = $i(async () => {
|
|
60633
60700
|
try {
|
|
60634
60701
|
let e = await Yk();
|
|
60635
60702
|
Array.isArray(e?.options) && e.options.length > 0 && p(e.options), e?.rules && typeof e.rules == "object" && h(e.rules);
|
|
@@ -60775,10 +60842,10 @@ function KU() {
|
|
|
60775
60842
|
align: "middle",
|
|
60776
60843
|
justify: "space-between",
|
|
60777
60844
|
className: "breadcrumb-action-wrapper",
|
|
60778
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items:
|
|
60845
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items: VU }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ X(U, {
|
|
60779
60846
|
size: 6,
|
|
60780
60847
|
className: "zt-section-title",
|
|
60781
|
-
children: [/* @__PURE__ */ Y(us, {}), /* @__PURE__ */ Y(
|
|
60848
|
+
children: [/* @__PURE__ */ Y(us, {}), /* @__PURE__ */ Y(BU, {
|
|
60782
60849
|
strong: !0,
|
|
60783
60850
|
children: a.name
|
|
60784
60851
|
})]
|
|
@@ -60799,11 +60866,11 @@ function KU() {
|
|
|
60799
60866
|
product_parent_ID: Number(a?.id),
|
|
60800
60867
|
module_parent_ID: Number(n.module),
|
|
60801
60868
|
submodule_parent_ID: Number(n.submodule),
|
|
60802
|
-
description:
|
|
60803
|
-
actions:
|
|
60804
|
-
key:
|
|
60805
|
-
value:
|
|
60806
|
-
expected:
|
|
60869
|
+
description: HU(n.description),
|
|
60870
|
+
actions: HU(n.actions),
|
|
60871
|
+
key: HU(n.key),
|
|
60872
|
+
value: HU(n.value),
|
|
60873
|
+
expected: HU(n.expected),
|
|
60807
60874
|
scenario: +!!n.scenario,
|
|
60808
60875
|
active: +!!n.active
|
|
60809
60876
|
};
|
|
@@ -60869,7 +60936,7 @@ function KU() {
|
|
|
60869
60936
|
key: void 0,
|
|
60870
60937
|
value: void 0,
|
|
60871
60938
|
expected: void 0
|
|
60872
|
-
}),
|
|
60939
|
+
}), qU(e, [
|
|
60873
60940
|
"actions",
|
|
60874
60941
|
"key",
|
|
60875
60942
|
"value",
|
|
@@ -60900,7 +60967,7 @@ function KU() {
|
|
|
60900
60967
|
key: void 0,
|
|
60901
60968
|
value: void 0,
|
|
60902
60969
|
expected: void 0
|
|
60903
|
-
}),
|
|
60970
|
+
}), qU(e, [
|
|
60904
60971
|
"actions",
|
|
60905
60972
|
"key",
|
|
60906
60973
|
"value",
|
|
@@ -60954,7 +61021,7 @@ function KU() {
|
|
|
60954
61021
|
/* @__PURE__ */ Y("span", { children: "Step Details" })
|
|
60955
61022
|
]
|
|
60956
61023
|
}),
|
|
60957
|
-
extra: /* @__PURE__ */ X(
|
|
61024
|
+
extra: /* @__PURE__ */ X(BU, {
|
|
60958
61025
|
type: "secondary",
|
|
60959
61026
|
children: [
|
|
60960
61027
|
N,
|
|
@@ -60994,13 +61061,13 @@ function KU() {
|
|
|
60994
61061
|
placeholder: "Select action",
|
|
60995
61062
|
options: f,
|
|
60996
61063
|
onChange: (t) => {
|
|
60997
|
-
let n =
|
|
61064
|
+
let n = KU(m, t);
|
|
60998
61065
|
e.setFieldsValue({
|
|
60999
61066
|
actions: t,
|
|
61000
61067
|
key: n.key ? e.getFieldValue("key") : void 0,
|
|
61001
61068
|
value: n.value ? e.getFieldValue("value") : void 0,
|
|
61002
61069
|
expected: n.expected ? e.getFieldValue("expected") : void 0
|
|
61003
|
-
}),
|
|
61070
|
+
}), qU(e, [
|
|
61004
61071
|
"key",
|
|
61005
61072
|
"value",
|
|
61006
61073
|
"expected"
|
|
@@ -61109,7 +61176,7 @@ function KU() {
|
|
|
61109
61176
|
children: /* @__PURE__ */ Y(rw, {
|
|
61110
61177
|
listName: "Added Steps",
|
|
61111
61178
|
loading: x,
|
|
61112
|
-
fields:
|
|
61179
|
+
fields: WU,
|
|
61113
61180
|
dataSource: u,
|
|
61114
61181
|
current: 1,
|
|
61115
61182
|
pageSize: Math.max(u.length, 1),
|
|
@@ -61125,7 +61192,7 @@ function KU() {
|
|
|
61125
61192
|
}
|
|
61126
61193
|
//#endregion
|
|
61127
61194
|
//#region src/pages/TestingPage/ManageModules.jsx
|
|
61128
|
-
var { Text:
|
|
61195
|
+
var { Text: YU } = za, XU = [
|
|
61129
61196
|
{
|
|
61130
61197
|
label: "Home",
|
|
61131
61198
|
href: "/"
|
|
@@ -61139,7 +61206,7 @@ var { Text: qU } = za, JU = [
|
|
|
61139
61206
|
href: "/manageModules"
|
|
61140
61207
|
}
|
|
61141
61208
|
];
|
|
61142
|
-
function
|
|
61209
|
+
function ZU() {
|
|
61143
61210
|
let e = Zs(), 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 = $i(async (e) => {
|
|
61144
61211
|
if (!e) {
|
|
61145
61212
|
r([]);
|
|
@@ -61207,7 +61274,7 @@ function YU() {
|
|
|
61207
61274
|
align: "middle",
|
|
61208
61275
|
justify: "space-between",
|
|
61209
61276
|
className: "breadcrumb-action-wrapper",
|
|
61210
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items:
|
|
61277
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items: XU }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(R, {
|
|
61211
61278
|
type: "link",
|
|
61212
61279
|
onClick: () => e("/addTestCase"),
|
|
61213
61280
|
children: "Back to Form"
|
|
@@ -61227,7 +61294,7 @@ function YU() {
|
|
|
61227
61294
|
children: [
|
|
61228
61295
|
/* @__PURE__ */ Y(us, {}),
|
|
61229
61296
|
/* @__PURE__ */ Y("span", { children: "Project:" }),
|
|
61230
|
-
/* @__PURE__ */ Y(
|
|
61297
|
+
/* @__PURE__ */ Y(YU, {
|
|
61231
61298
|
strong: !0,
|
|
61232
61299
|
children: t.name
|
|
61233
61300
|
})
|
|
@@ -61303,7 +61370,7 @@ function YU() {
|
|
|
61303
61370
|
children: /* @__PURE__ */ X(U, {
|
|
61304
61371
|
direction: "vertical",
|
|
61305
61372
|
className: "zt-modal-stack",
|
|
61306
|
-
children: [/* @__PURE__ */ X(
|
|
61373
|
+
children: [/* @__PURE__ */ X(YU, {
|
|
61307
61374
|
type: "secondary",
|
|
61308
61375
|
children: ["Project: ", /* @__PURE__ */ Y("b", { children: t.name })]
|
|
61309
61376
|
}), /* @__PURE__ */ Y(V, {
|
|
@@ -61320,7 +61387,7 @@ function YU() {
|
|
|
61320
61387
|
}
|
|
61321
61388
|
//#endregion
|
|
61322
61389
|
//#region src/pages/TestingPage/ManageSubmodules.jsx
|
|
61323
|
-
var { Text:
|
|
61390
|
+
var { Text: QU } = za, $U = [
|
|
61324
61391
|
{
|
|
61325
61392
|
label: "Home",
|
|
61326
61393
|
href: "/"
|
|
@@ -61338,7 +61405,7 @@ var { Text: XU } = za, ZU = [
|
|
|
61338
61405
|
href: "/test-cases/zinnext/submodules"
|
|
61339
61406
|
}
|
|
61340
61407
|
];
|
|
61341
|
-
function
|
|
61408
|
+
function eW() {
|
|
61342
61409
|
let e = Zs(), [t] = $s(), 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 = $i(async (e, t) => {
|
|
61343
61410
|
if (!e || !t) {
|
|
61344
61411
|
a([]);
|
|
@@ -61408,7 +61475,7 @@ function QU() {
|
|
|
61408
61475
|
align: "middle",
|
|
61409
61476
|
justify: "space-between",
|
|
61410
61477
|
className: "breadcrumb-action-wrapper",
|
|
61411
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items:
|
|
61478
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items: $U }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(R, {
|
|
61412
61479
|
type: "link",
|
|
61413
61480
|
onClick: () => e("/manageModules"),
|
|
61414
61481
|
children: "Back to Modules"
|
|
@@ -61431,7 +61498,7 @@ function QU() {
|
|
|
61431
61498
|
children: [
|
|
61432
61499
|
/* @__PURE__ */ Y(us, {}),
|
|
61433
61500
|
/* @__PURE__ */ Y("span", { children: "Project:" }),
|
|
61434
|
-
/* @__PURE__ */ Y(
|
|
61501
|
+
/* @__PURE__ */ Y(QU, {
|
|
61435
61502
|
strong: !0,
|
|
61436
61503
|
children: n.name
|
|
61437
61504
|
})
|
|
@@ -61441,7 +61508,7 @@ function QU() {
|
|
|
61441
61508
|
children: [
|
|
61442
61509
|
/* @__PURE__ */ Y(Ga, {}),
|
|
61443
61510
|
/* @__PURE__ */ Y("span", { children: "Module:" }),
|
|
61444
|
-
/* @__PURE__ */ Y(
|
|
61511
|
+
/* @__PURE__ */ Y(QU, {
|
|
61445
61512
|
strong: !0,
|
|
61446
61513
|
children: r
|
|
61447
61514
|
})
|
|
@@ -61504,7 +61571,7 @@ function QU() {
|
|
|
61504
61571
|
children: /* @__PURE__ */ X(U, {
|
|
61505
61572
|
direction: "vertical",
|
|
61506
61573
|
className: "zt-modal-stack",
|
|
61507
|
-
children: [/* @__PURE__ */ X(
|
|
61574
|
+
children: [/* @__PURE__ */ X(QU, {
|
|
61508
61575
|
type: "secondary",
|
|
61509
61576
|
children: [
|
|
61510
61577
|
"Project: ",
|
|
@@ -61526,7 +61593,7 @@ function QU() {
|
|
|
61526
61593
|
}
|
|
61527
61594
|
//#endregion
|
|
61528
61595
|
//#region src/pages/TestingPage/ZinnextTableView.jsx
|
|
61529
|
-
var { Text:
|
|
61596
|
+
var { Text: tW } = za, nW = [
|
|
61530
61597
|
{
|
|
61531
61598
|
label: "Home",
|
|
61532
61599
|
href: "/"
|
|
@@ -61540,7 +61607,7 @@ var { Text: $U } = za, eW = [
|
|
|
61540
61607
|
href: "/viewTestCase"
|
|
61541
61608
|
}
|
|
61542
61609
|
];
|
|
61543
|
-
function
|
|
61610
|
+
function rW() {
|
|
61544
61611
|
let e = Zs(), [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 = $i(async (e = {}) => {
|
|
61545
61612
|
o(!0);
|
|
61546
61613
|
try {
|
|
@@ -61600,7 +61667,7 @@ function tW() {
|
|
|
61600
61667
|
align: "middle",
|
|
61601
61668
|
justify: "space-between",
|
|
61602
61669
|
className: "breadcrumb-action-wrapper",
|
|
61603
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items:
|
|
61670
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items: nW }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(R, {
|
|
61604
61671
|
type: "link",
|
|
61605
61672
|
onClick: () => e("/addTestCase"),
|
|
61606
61673
|
children: "Back to Form"
|
|
@@ -61614,7 +61681,7 @@ function tW() {
|
|
|
61614
61681
|
className: "zt-section-title",
|
|
61615
61682
|
children: [/* @__PURE__ */ Y(ks, {}), /* @__PURE__ */ Y("span", { children: "Test Flows" })]
|
|
61616
61683
|
}),
|
|
61617
|
-
extra: /* @__PURE__ */ X(
|
|
61684
|
+
extra: /* @__PURE__ */ X(tW, {
|
|
61618
61685
|
type: "secondary",
|
|
61619
61686
|
children: [r, " row(s)"]
|
|
61620
61687
|
}),
|
|
@@ -61768,17 +61835,17 @@ function tW() {
|
|
|
61768
61835
|
}
|
|
61769
61836
|
//#endregion
|
|
61770
61837
|
//#region src/pages/TestingPage/testHomePage.jsx
|
|
61771
|
-
var
|
|
61838
|
+
var iW = [{
|
|
61772
61839
|
label: "Home",
|
|
61773
61840
|
href: "/"
|
|
61774
61841
|
}, {
|
|
61775
61842
|
label: "Test Cases",
|
|
61776
61843
|
href: "/test-cases"
|
|
61777
61844
|
}];
|
|
61778
|
-
function
|
|
61845
|
+
function aW() {
|
|
61779
61846
|
return /* @__PURE__ */ X("main", {
|
|
61780
61847
|
className: "jobs-list-page",
|
|
61781
|
-
children: [/* @__PURE__ */ Y(ri, { items:
|
|
61848
|
+
children: [/* @__PURE__ */ Y(ri, { items: iW }), /* @__PURE__ */ Y(Bh, {
|
|
61782
61849
|
moduleName: "test-flows",
|
|
61783
61850
|
rowKey: "id"
|
|
61784
61851
|
})]
|
|
@@ -61786,85 +61853,85 @@ function rW() {
|
|
|
61786
61853
|
}
|
|
61787
61854
|
//#endregion
|
|
61788
61855
|
//#region src/pages/TestingPage/lms-test-form.jsx
|
|
61789
|
-
var { Text:
|
|
61856
|
+
var { Text: oW } = za, sW = [{
|
|
61790
61857
|
label: "Home",
|
|
61791
61858
|
href: "/"
|
|
61792
61859
|
}, {
|
|
61793
61860
|
label: "LMS Cases",
|
|
61794
61861
|
href: "/lms-cases"
|
|
61795
|
-
}],
|
|
61862
|
+
}], cW = {
|
|
61796
61863
|
tags: "regression",
|
|
61797
61864
|
active: 1
|
|
61798
|
-
},
|
|
61865
|
+
}, lW = { module: {
|
|
61799
61866
|
dbName: "Modules",
|
|
61800
61867
|
formField: "module",
|
|
61801
61868
|
label: "Module"
|
|
61802
|
-
} },
|
|
61869
|
+
} }, uW = {
|
|
61803
61870
|
key: !1,
|
|
61804
61871
|
value: !1,
|
|
61805
61872
|
expected: !1
|
|
61806
61873
|
};
|
|
61807
|
-
function
|
|
61808
|
-
return t ? e[t] ??
|
|
61874
|
+
function dW(e, t) {
|
|
61875
|
+
return t ? e[t] ?? uW : uW;
|
|
61809
61876
|
}
|
|
61810
|
-
function
|
|
61877
|
+
function fW(e, t) {
|
|
61811
61878
|
e.setFields(t.map((e) => ({
|
|
61812
61879
|
name: e,
|
|
61813
61880
|
errors: []
|
|
61814
61881
|
})));
|
|
61815
61882
|
}
|
|
61816
|
-
function
|
|
61883
|
+
function pW(e = []) {
|
|
61817
61884
|
return e.map((e) => ({
|
|
61818
61885
|
value: e,
|
|
61819
61886
|
label: e
|
|
61820
61887
|
}));
|
|
61821
61888
|
}
|
|
61822
|
-
function
|
|
61889
|
+
function mW(e = "") {
|
|
61823
61890
|
return String(e ?? "").trim();
|
|
61824
61891
|
}
|
|
61825
|
-
function
|
|
61892
|
+
function hW(e = []) {
|
|
61826
61893
|
let t = /* @__PURE__ */ new Map();
|
|
61827
61894
|
return e.forEach((e) => {
|
|
61828
|
-
let n =
|
|
61895
|
+
let n = mW(e?.flow), r = n.toLowerCase();
|
|
61829
61896
|
n && !t.has(r) && t.set(r, n);
|
|
61830
61897
|
}), Array.from(t.values()).map((e) => ({
|
|
61831
61898
|
value: e,
|
|
61832
61899
|
label: e
|
|
61833
61900
|
}));
|
|
61834
61901
|
}
|
|
61835
|
-
function
|
|
61836
|
-
let r =
|
|
61902
|
+
function gW(e = [], t, n) {
|
|
61903
|
+
let r = mW(t).toLowerCase(), i = mW(n).toLowerCase();
|
|
61837
61904
|
return e.reduce((e, t) => {
|
|
61838
|
-
let n =
|
|
61905
|
+
let n = mW(t?.module).toLowerCase(), a = mW(t?.flow).toLowerCase();
|
|
61839
61906
|
if (n !== r || a !== i) return e;
|
|
61840
61907
|
let o = Number(t?.step_order) || 0;
|
|
61841
61908
|
return Math.max(e, o);
|
|
61842
61909
|
}, 0) + 1;
|
|
61843
61910
|
}
|
|
61844
|
-
function
|
|
61911
|
+
function _W({ icon: e, title: t }) {
|
|
61845
61912
|
return /* @__PURE__ */ X(U, {
|
|
61846
61913
|
size: 10,
|
|
61847
61914
|
align: "center",
|
|
61848
61915
|
children: [/* @__PURE__ */ Y("div", {
|
|
61849
61916
|
className: "v1-section-icon-box",
|
|
61850
61917
|
children: e
|
|
61851
|
-
}), /* @__PURE__ */ Y(
|
|
61918
|
+
}), /* @__PURE__ */ Y(oW, {
|
|
61852
61919
|
strong: !0,
|
|
61853
61920
|
className: "v1-section-label",
|
|
61854
61921
|
children: t
|
|
61855
61922
|
})]
|
|
61856
61923
|
});
|
|
61857
61924
|
}
|
|
61858
|
-
function
|
|
61859
|
-
let [e] = B.useForm(), [t] = B.useForm(), [n, r] = L([]), [i, a] = L([]), [o, s] = L([]), [c, l] = L(
|
|
61925
|
+
function vW() {
|
|
61926
|
+
let [e] = B.useForm(), [t] = B.useForm(), [n, r] = L([]), [i, a] = L([]), [o, s] = L([]), [c, l] = L(OU), [u, d] = L({}), [f, p] = L(!1), [m, h] = L(!1), [g, _] = L({
|
|
61860
61927
|
open: !1,
|
|
61861
61928
|
typeKey: "module"
|
|
61862
|
-
}), [v, y] = L(!1), [b, x] = L(!1), [S, C] = L(!1), w = Zs(), T =
|
|
61929
|
+
}), [v, y] = L(!1), [b, x] = L(!1), [S, C] = L(!1), w = Zs(), T = lW[g.typeKey], E = I(() => pW(n), [n]), D = B.useWatch("module", e), O = B.useWatch("flow", e), k = B.useWatch("keyword", e), A = !!mW(D), j = !!mW(O), ee = !A, te = !A || !j, M = I(() => dW(u, k), [u, k]), N = (e, t = []) => {
|
|
61863
61930
|
e === "module" && r(t);
|
|
61864
61931
|
}, ne = async () => {
|
|
61865
61932
|
p(!0);
|
|
61866
61933
|
try {
|
|
61867
|
-
let e = await qk(
|
|
61934
|
+
let e = await qk(lW.module.dbName);
|
|
61868
61935
|
r(e?.items ?? []);
|
|
61869
61936
|
} catch (e) {
|
|
61870
61937
|
console.error("Unable to load testing options:", e), q.error("Unable to load testing options.");
|
|
@@ -61879,7 +61946,7 @@ function gW() {
|
|
|
61879
61946
|
console.error("Unable to load action field rules:", e), q.error("Unable to load action validation rules.");
|
|
61880
61947
|
}
|
|
61881
61948
|
}, ie = $i(async (t) => {
|
|
61882
|
-
let n =
|
|
61949
|
+
let n = mW(t);
|
|
61883
61950
|
if (a([]), s([]), e.setFieldsValue({ step_order: void 0 }), n) {
|
|
61884
61951
|
h(!0);
|
|
61885
61952
|
try {
|
|
@@ -61888,7 +61955,7 @@ function gW() {
|
|
|
61888
61955
|
offset: 0,
|
|
61889
61956
|
module: n
|
|
61890
61957
|
}), t = Array.isArray(e?.items) ? e.items : [];
|
|
61891
|
-
a(t), s(
|
|
61958
|
+
a(t), s(hW(t));
|
|
61892
61959
|
} catch (e) {
|
|
61893
61960
|
console.error("Unable to load flows:", e), q.error("Unable to load flows.");
|
|
61894
61961
|
} finally {
|
|
@@ -61896,14 +61963,14 @@ function gW() {
|
|
|
61896
61963
|
}
|
|
61897
61964
|
}
|
|
61898
61965
|
}, [e]), ae = $i(async (t, n, r) => {
|
|
61899
|
-
let i =
|
|
61966
|
+
let i = mW(t), a = mW(n);
|
|
61900
61967
|
if (!i || !a) {
|
|
61901
61968
|
e.setFieldsValue({ step_order: void 0 });
|
|
61902
61969
|
return;
|
|
61903
61970
|
}
|
|
61904
61971
|
x(!0);
|
|
61905
61972
|
try {
|
|
61906
|
-
e.setFieldsValue({ step_order:
|
|
61973
|
+
e.setFieldsValue({ step_order: gW(r, i, a) });
|
|
61907
61974
|
} catch (e) {
|
|
61908
61975
|
console.error("Unable to load step order:", e), q.error("Unable to load step order.");
|
|
61909
61976
|
} finally {
|
|
@@ -61926,15 +61993,15 @@ function gW() {
|
|
|
61926
61993
|
]);
|
|
61927
61994
|
let oe = async (t) => {
|
|
61928
61995
|
let n = {
|
|
61929
|
-
module:
|
|
61930
|
-
flow:
|
|
61996
|
+
module: mW(t.module),
|
|
61997
|
+
flow: mW(t.flow),
|
|
61931
61998
|
step_order: Number(t.step_order),
|
|
61932
|
-
description:
|
|
61933
|
-
keyword:
|
|
61934
|
-
target:
|
|
61935
|
-
value:
|
|
61936
|
-
expected:
|
|
61937
|
-
tags: t.tags ?
|
|
61999
|
+
description: mW(t.description),
|
|
62000
|
+
keyword: mW(t.keyword),
|
|
62001
|
+
target: mW(t.target),
|
|
62002
|
+
value: mW(t.value),
|
|
62003
|
+
expected: mW(t.expected),
|
|
62004
|
+
tags: t.tags ? mW(t.tags) : cW.tags,
|
|
61938
62005
|
active: Number(t.active)
|
|
61939
62006
|
};
|
|
61940
62007
|
C(!0);
|
|
@@ -61946,19 +62013,19 @@ function gW() {
|
|
|
61946
62013
|
C(!1);
|
|
61947
62014
|
}
|
|
61948
62015
|
}, se = (t, n) => {
|
|
61949
|
-
e.setFieldsValue({ [t]:
|
|
62016
|
+
e.setFieldsValue({ [t]: mW(n) });
|
|
61950
62017
|
}, ce = (t) => {
|
|
61951
62018
|
e.setFieldsValue({
|
|
61952
|
-
module:
|
|
62019
|
+
module: mW(t),
|
|
61953
62020
|
flow: void 0,
|
|
61954
62021
|
step_order: void 0,
|
|
61955
62022
|
keyword: void 0,
|
|
61956
62023
|
description: void 0,
|
|
61957
62024
|
target: void 0,
|
|
61958
|
-
tags:
|
|
62025
|
+
tags: cW.tags,
|
|
61959
62026
|
value: void 0,
|
|
61960
62027
|
expected: void 0
|
|
61961
|
-
}),
|
|
62028
|
+
}), fW(e, [
|
|
61962
62029
|
"keyword",
|
|
61963
62030
|
"target",
|
|
61964
62031
|
"value",
|
|
@@ -61966,32 +62033,32 @@ function gW() {
|
|
|
61966
62033
|
]);
|
|
61967
62034
|
}, le = (t) => {
|
|
61968
62035
|
e.setFieldsValue({
|
|
61969
|
-
flow:
|
|
62036
|
+
flow: mW(t),
|
|
61970
62037
|
step_order: void 0,
|
|
61971
62038
|
keyword: void 0,
|
|
61972
62039
|
target: void 0,
|
|
61973
62040
|
value: void 0,
|
|
61974
62041
|
expected: void 0
|
|
61975
|
-
}),
|
|
62042
|
+
}), fW(e, [
|
|
61976
62043
|
"keyword",
|
|
61977
62044
|
"target",
|
|
61978
62045
|
"value",
|
|
61979
62046
|
"expected"
|
|
61980
62047
|
]);
|
|
61981
62048
|
}, ue = (t) => {
|
|
61982
|
-
let n =
|
|
62049
|
+
let n = dW(u, t);
|
|
61983
62050
|
e.setFieldsValue({
|
|
61984
|
-
keyword:
|
|
62051
|
+
keyword: mW(t),
|
|
61985
62052
|
target: n.key ? e.getFieldValue("target") : void 0,
|
|
61986
62053
|
value: n.value ? e.getFieldValue("value") : void 0,
|
|
61987
62054
|
expected: n.expected ? e.getFieldValue("expected") : void 0
|
|
61988
|
-
}),
|
|
62055
|
+
}), fW(e, [
|
|
61989
62056
|
"target",
|
|
61990
62057
|
"value",
|
|
61991
62058
|
"expected"
|
|
61992
62059
|
]);
|
|
61993
62060
|
}, de = (e) => {
|
|
61994
|
-
let n =
|
|
62061
|
+
let n = lW[e];
|
|
61995
62062
|
_({
|
|
61996
62063
|
open: !0,
|
|
61997
62064
|
typeKey: e
|
|
@@ -62006,7 +62073,7 @@ function gW() {
|
|
|
62006
62073
|
})), t.resetFields();
|
|
62007
62074
|
}, pe = async () => {
|
|
62008
62075
|
try {
|
|
62009
|
-
let n =
|
|
62076
|
+
let n = mW((await t.validateFields()).name), r = await Jk({
|
|
62010
62077
|
name: n,
|
|
62011
62078
|
type: T.dbName
|
|
62012
62079
|
});
|
|
@@ -62024,7 +62091,7 @@ function gW() {
|
|
|
62024
62091
|
align: "middle",
|
|
62025
62092
|
justify: "space-between",
|
|
62026
62093
|
className: "breadcrumb-action-wrapper",
|
|
62027
|
-
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items:
|
|
62094
|
+
children: [/* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(ri, { items: sW }) }), /* @__PURE__ */ Y(z, { children: /* @__PURE__ */ Y(R, {
|
|
62028
62095
|
type: "link",
|
|
62029
62096
|
onClick: () => w("/lms-home"),
|
|
62030
62097
|
children: "View Table"
|
|
@@ -62039,7 +62106,7 @@ function gW() {
|
|
|
62039
62106
|
children: /* @__PURE__ */ X(U, {
|
|
62040
62107
|
align: "center",
|
|
62041
62108
|
size: 10,
|
|
62042
|
-
children: [/* @__PURE__ */ Y(ls, { className: "v1-outer-icon" }), /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(
|
|
62109
|
+
children: [/* @__PURE__ */ Y(ls, { className: "v1-outer-icon" }), /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(oW, {
|
|
62043
62110
|
strong: !0,
|
|
62044
62111
|
style: { fontSize: 16 },
|
|
62045
62112
|
children: "Add LMS Case"
|
|
@@ -62055,16 +62122,16 @@ function gW() {
|
|
|
62055
62122
|
className: "v1-required-mark",
|
|
62056
62123
|
children: " *"
|
|
62057
62124
|
})] }),
|
|
62058
|
-
initialValues:
|
|
62125
|
+
initialValues: cW,
|
|
62059
62126
|
onFinish: oe,
|
|
62060
62127
|
autoComplete: "off",
|
|
62061
62128
|
children: [/* @__PURE__ */ Y(la, {
|
|
62062
62129
|
className: "v1-card",
|
|
62063
|
-
title: /* @__PURE__ */ Y(
|
|
62130
|
+
title: /* @__PURE__ */ Y(_W, {
|
|
62064
62131
|
icon: /* @__PURE__ */ Y(Io, {}),
|
|
62065
62132
|
title: "LMS Case Details"
|
|
62066
62133
|
}),
|
|
62067
|
-
extra: /* @__PURE__ */ Y(
|
|
62134
|
+
extra: /* @__PURE__ */ Y(oW, {
|
|
62068
62135
|
type: "secondary",
|
|
62069
62136
|
className: "v1-card-subtitle",
|
|
62070
62137
|
children: "Module, flow, step order and execution data"
|
|
@@ -62274,7 +62341,7 @@ function gW() {
|
|
|
62274
62341
|
maxLength: 100,
|
|
62275
62342
|
placeholder: `Enter ${T.label.toLowerCase()} name`,
|
|
62276
62343
|
onBlur: (e) => {
|
|
62277
|
-
t.setFieldsValue({ name:
|
|
62344
|
+
t.setFieldsValue({ name: mW(e.target.value) });
|
|
62278
62345
|
}
|
|
62279
62346
|
})
|
|
62280
62347
|
}), /* @__PURE__ */ Y(B.Item, {
|
|
@@ -62291,17 +62358,17 @@ function gW() {
|
|
|
62291
62358
|
}
|
|
62292
62359
|
//#endregion
|
|
62293
62360
|
//#region src/pages/TestingPage/lmsHomePage.jsx
|
|
62294
|
-
var
|
|
62361
|
+
var yW = [{
|
|
62295
62362
|
label: "Home",
|
|
62296
62363
|
href: "/"
|
|
62297
62364
|
}, {
|
|
62298
62365
|
label: "LMS Cases",
|
|
62299
62366
|
href: "/lms-cases"
|
|
62300
62367
|
}];
|
|
62301
|
-
function
|
|
62368
|
+
function bW() {
|
|
62302
62369
|
return /* @__PURE__ */ X("main", {
|
|
62303
62370
|
className: "jobs-list-page",
|
|
62304
|
-
children: [/* @__PURE__ */ Y(ri, { items:
|
|
62371
|
+
children: [/* @__PURE__ */ Y(ri, { items: yW }), /* @__PURE__ */ Y(Bh, {
|
|
62305
62372
|
moduleName: "lms-flows",
|
|
62306
62373
|
rowKey: "id"
|
|
62307
62374
|
})]
|
|
@@ -62309,7 +62376,7 @@ function vW() {
|
|
|
62309
62376
|
}
|
|
62310
62377
|
//#endregion
|
|
62311
62378
|
//#region src/services/mergedListApi.js
|
|
62312
|
-
var
|
|
62379
|
+
var xW = [
|
|
62313
62380
|
"referenceId",
|
|
62314
62381
|
"ReferenceId",
|
|
62315
62382
|
"candidateId",
|
|
@@ -62320,7 +62387,7 @@ var yW = [
|
|
|
62320
62387
|
"Id",
|
|
62321
62388
|
"_id"
|
|
62322
62389
|
];
|
|
62323
|
-
function
|
|
62390
|
+
function SW(e = xW) {
|
|
62324
62391
|
return function(t) {
|
|
62325
62392
|
if (!t || typeof t != "object") return "";
|
|
62326
62393
|
for (let n of e) {
|
|
@@ -62330,7 +62397,7 @@ function bW(e = yW) {
|
|
|
62330
62397
|
return "";
|
|
62331
62398
|
};
|
|
62332
62399
|
}
|
|
62333
|
-
function
|
|
62400
|
+
function CW(e, t = xW) {
|
|
62334
62401
|
if (!e || typeof e != "object") return [];
|
|
62335
62402
|
let n = [];
|
|
62336
62403
|
for (let r of t) {
|
|
@@ -62339,18 +62406,18 @@ function xW(e, t = yW) {
|
|
|
62339
62406
|
}
|
|
62340
62407
|
return n;
|
|
62341
62408
|
}
|
|
62342
|
-
var
|
|
62343
|
-
function
|
|
62344
|
-
return typeof e == "function" ? e : typeof e == "string" ?
|
|
62409
|
+
var wW = SW();
|
|
62410
|
+
function TW(e) {
|
|
62411
|
+
return typeof e == "function" ? e : typeof e == "string" ? SW([e]) : Array.isArray(e) ? SW(e) : wW;
|
|
62345
62412
|
}
|
|
62346
|
-
function
|
|
62413
|
+
function EW(e, t, n) {
|
|
62347
62414
|
return !t || typeof t != "object" ? e : {
|
|
62348
62415
|
...t,
|
|
62349
62416
|
...e,
|
|
62350
62417
|
id: e?.id ?? t?.id ?? n
|
|
62351
62418
|
};
|
|
62352
62419
|
}
|
|
62353
|
-
function
|
|
62420
|
+
function DW(e, t, n = {}) {
|
|
62354
62421
|
return {
|
|
62355
62422
|
status: "success",
|
|
62356
62423
|
total: t,
|
|
@@ -62360,7 +62427,7 @@ function TW(e, t, n = {}) {
|
|
|
62360
62427
|
}
|
|
62361
62428
|
};
|
|
62362
62429
|
}
|
|
62363
|
-
var
|
|
62430
|
+
var OW = [
|
|
62364
62431
|
"fields",
|
|
62365
62432
|
"fieldConfig",
|
|
62366
62433
|
"tabs",
|
|
@@ -62369,17 +62436,17 @@ var EW = [
|
|
|
62369
62436
|
"actions",
|
|
62370
62437
|
"columnActions"
|
|
62371
62438
|
];
|
|
62372
|
-
function
|
|
62439
|
+
function kW(e) {
|
|
62373
62440
|
let t = e?.data ?? e, n = {};
|
|
62374
|
-
for (let r of
|
|
62441
|
+
for (let r of OW) {
|
|
62375
62442
|
let i = e?.[r] ?? t?.[r];
|
|
62376
62443
|
i == null || Array.isArray(i) && i.length === 0 || (n[r] = i);
|
|
62377
62444
|
}
|
|
62378
62445
|
return n;
|
|
62379
62446
|
}
|
|
62380
|
-
var
|
|
62381
|
-
function
|
|
62382
|
-
let r = (Array.isArray(n) ? n : [n]).map(
|
|
62447
|
+
var AW = (e) => String(e ?? "").replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
62448
|
+
function jW(e, t, n) {
|
|
62449
|
+
let r = (Array.isArray(n) ? n : [n]).map(AW).filter(Boolean), i = r.length ? e.findIndex((e) => r.includes(AW(e?.value)) || r.includes(AW(e?.label))) : -1;
|
|
62383
62450
|
if (i === -1) return [...e, ...t];
|
|
62384
62451
|
let a = Number(e[i]?.order), o = Number.isFinite(a) ? t.map((e, n) => e.order == null || e.order === "" ? {
|
|
62385
62452
|
...e,
|
|
@@ -62391,31 +62458,31 @@ function kW(e, t, n) {
|
|
|
62391
62458
|
...e.slice(i + 1)
|
|
62392
62459
|
];
|
|
62393
62460
|
}
|
|
62394
|
-
var
|
|
62461
|
+
var MW = (e, t) => $f(e, t).rows, NW = (e, t) => {
|
|
62395
62462
|
let { rows: n, total: r } = $f(e, t);
|
|
62396
62463
|
return {
|
|
62397
62464
|
rows: n,
|
|
62398
62465
|
total: r
|
|
62399
62466
|
};
|
|
62400
62467
|
};
|
|
62401
|
-
function
|
|
62468
|
+
function PW(e, t) {
|
|
62402
62469
|
return function(n, r, i, a = {}) {
|
|
62403
62470
|
return e(t ?? n, r, i, a);
|
|
62404
62471
|
};
|
|
62405
62472
|
}
|
|
62406
|
-
function
|
|
62473
|
+
function FW(e) {
|
|
62407
62474
|
return !e || typeof e != "object" || typeof (e.fetchByKeys ?? e.fetch ?? e.function) != "function" ? null : {
|
|
62408
62475
|
...e,
|
|
62409
62476
|
fetchByKeys: typeof e.fetchByKeys == "function" ? e.fetchByKeys : null,
|
|
62410
62477
|
fetch: typeof e.fetch == "function" ? e.fetch : null,
|
|
62411
62478
|
function: typeof e.function == "function" ? e.function : null,
|
|
62412
|
-
extractRows: typeof e.extractRows == "function" ? e.extractRows :
|
|
62413
|
-
mergeRow: typeof e.mergeRow == "function" ? e.mergeRow :
|
|
62479
|
+
extractRows: typeof e.extractRows == "function" ? e.extractRows : MW,
|
|
62480
|
+
mergeRow: typeof e.mergeRow == "function" ? e.mergeRow : EW,
|
|
62414
62481
|
fetchById: typeof e.fetchById == "function" ? e.fetchById : null
|
|
62415
62482
|
};
|
|
62416
62483
|
}
|
|
62417
|
-
function
|
|
62418
|
-
return !e && !t && !r ? [] : [
|
|
62484
|
+
function IW({ fetchSecondaryByKeys: e, fetchSecondary: t, extractSecondaryRows: n, fetchSecondaryById: r, secondaryKey: i, mergeRow: a, secondaryFetchLimit: o }) {
|
|
62485
|
+
return !e && !t && !r ? [] : [FW({
|
|
62419
62486
|
key: i,
|
|
62420
62487
|
fetchByKeys: e ? (t, n, r) => e(t, n, r) : null,
|
|
62421
62488
|
function: t ? ({ moduleName: e, options: n }) => t(e, o, 0, n) : null,
|
|
@@ -62424,21 +62491,21 @@ function PW({ fetchSecondaryByKeys: e, fetchSecondary: t, extractSecondaryRows:
|
|
|
62424
62491
|
mergeRow: a
|
|
62425
62492
|
})].filter(Boolean);
|
|
62426
62493
|
}
|
|
62427
|
-
function
|
|
62494
|
+
function LW(e) {
|
|
62428
62495
|
if (typeof e == "function") return (t) => {
|
|
62429
62496
|
let n = e(t);
|
|
62430
62497
|
return n == null || n === "" ? [] : [String(n)];
|
|
62431
62498
|
};
|
|
62432
|
-
let t = typeof e == "string" ? [e] : Array.isArray(e) && e.length ? e :
|
|
62433
|
-
return (e) =>
|
|
62499
|
+
let t = typeof e == "string" ? [e] : Array.isArray(e) && e.length ? e : xW;
|
|
62500
|
+
return (e) => CW(e, t);
|
|
62434
62501
|
}
|
|
62435
|
-
function
|
|
62502
|
+
function RW(e, t) {
|
|
62436
62503
|
let n = /* @__PURE__ */ new Map();
|
|
62437
62504
|
return e.forEach((e) => {
|
|
62438
62505
|
for (let r of t(e)) n.has(r) || n.set(r, e);
|
|
62439
62506
|
}), n;
|
|
62440
62507
|
}
|
|
62441
|
-
function
|
|
62508
|
+
function zW({ moduleName: e, limit: t, offset: n, options: r, keys: i, primaryResponse: a, primaryRows: o, pageRows: s, total: c, source: l }) {
|
|
62442
62509
|
return {
|
|
62443
62510
|
moduleName: e,
|
|
62444
62511
|
limit: t,
|
|
@@ -62452,7 +62519,7 @@ function LW({ moduleName: e, limit: t, offset: n, options: r, keys: i, primaryRe
|
|
|
62452
62519
|
source: l
|
|
62453
62520
|
};
|
|
62454
62521
|
}
|
|
62455
|
-
async function
|
|
62522
|
+
async function BW(e, t) {
|
|
62456
62523
|
if (typeof e.args == "function") {
|
|
62457
62524
|
let n = e.args(t);
|
|
62458
62525
|
return (e.fetch ?? e.function ?? e.fetchByKeys)(...Array.isArray(n) ? n : [n]);
|
|
@@ -62462,8 +62529,8 @@ async function RW(e, t) {
|
|
|
62462
62529
|
let n = e.fetch ?? e.function;
|
|
62463
62530
|
return typeof n == "function" ? n(t) : null;
|
|
62464
62531
|
}
|
|
62465
|
-
function
|
|
62466
|
-
let h = Array.isArray(r) && r.length ? r.map(
|
|
62532
|
+
function VW({ fetchPrimaryPage: e, extractPrimaryPage: t = NW, fetchSecondaryByKeys: n, joinSources: r = [], fetchPrimary: i, extractPrimaryRows: a = MW, fetchSecondary: o, extractSecondaryRows: s = MW, fetchSecondaryById: c, primaryKey: l, secondaryKey: u, mergeRow: d = EW, secondaryFetchLimit: f = 200, extraFields: p = [], extraFieldsAfter: m }) {
|
|
62533
|
+
let h = Array.isArray(r) && r.length ? r.map(FW).filter(Boolean) : IW({
|
|
62467
62534
|
fetchSecondaryByKeys: n,
|
|
62468
62535
|
fetchSecondary: o,
|
|
62469
62536
|
extractSecondaryRows: s,
|
|
@@ -62483,7 +62550,7 @@ function zW({ fetchPrimaryPage: e, extractPrimaryPage: t = jW, fetchSecondaryByK
|
|
|
62483
62550
|
}
|
|
62484
62551
|
async function v(e, t, n, r, i) {
|
|
62485
62552
|
if (!n) return e;
|
|
62486
|
-
let a = t.extractRows(n, r) ?? [], o =
|
|
62553
|
+
let a = t.extractRows(n, r) ?? [], o = TW(t.primaryKey ?? l), s = LW(t.key), c = RW(a, s);
|
|
62487
62554
|
return Promise.all(e.map(async (e) => {
|
|
62488
62555
|
let n = o(e), a = c.get(n) ?? (i() ? null : await _(t, s, r, n));
|
|
62489
62556
|
return t.mergeRow(e, a, n);
|
|
@@ -62498,21 +62565,21 @@ function zW({ fetchPrimaryPage: e, extractPrimaryPage: t = jW, fetchSecondaryByK
|
|
|
62498
62565
|
let r = {};
|
|
62499
62566
|
for (let e of n) {
|
|
62500
62567
|
if (!e) continue;
|
|
62501
|
-
let t =
|
|
62568
|
+
let t = kW(e);
|
|
62502
62569
|
for (let e of Object.keys(t)) r[e] ?? (r[e] = t[e]);
|
|
62503
62570
|
}
|
|
62504
|
-
return p.length && (r.fields =
|
|
62571
|
+
return p.length && (r.fields = jW(r.fields ?? [], p, m)), DW(e, t, r);
|
|
62505
62572
|
}
|
|
62506
62573
|
async function x({ moduleName: e, limit: t, offset: n, options: r, primaryResponse: i, primaryRows: a, pageRows: o, total: s }) {
|
|
62507
62574
|
return Promise.all(h.map(async (c) => {
|
|
62508
62575
|
try {
|
|
62509
|
-
let u =
|
|
62576
|
+
let u = TW(c.primaryKey ?? l), d = [...new Set(o.map(u).filter(Boolean))];
|
|
62510
62577
|
return c.fetchByKeys && d.length === 0 ? {
|
|
62511
62578
|
source: c,
|
|
62512
62579
|
response: null
|
|
62513
62580
|
} : {
|
|
62514
62581
|
source: c,
|
|
62515
|
-
response: await
|
|
62582
|
+
response: await BW(c, zW({
|
|
62516
62583
|
moduleName: e,
|
|
62517
62584
|
limit: t,
|
|
62518
62585
|
offset: n,
|
|
@@ -62566,25 +62633,25 @@ function zW({ fetchPrimaryPage: e, extractPrimaryPage: t = jW, fetchSecondaryByK
|
|
|
62566
62633
|
}
|
|
62567
62634
|
//#endregion
|
|
62568
62635
|
//#region src/services/workflowModuleListApi.js
|
|
62569
|
-
function
|
|
62570
|
-
return
|
|
62571
|
-
fetchPrimary: () =>
|
|
62572
|
-
extractPrimaryRows:
|
|
62636
|
+
function HW(e, t, n = {}) {
|
|
62637
|
+
return VW({
|
|
62638
|
+
fetchPrimary: () => EB(e, t),
|
|
62639
|
+
extractPrimaryRows: wB,
|
|
62573
62640
|
fetchSecondary: Cd,
|
|
62574
|
-
fetchSecondaryById:
|
|
62641
|
+
fetchSecondaryById: DB,
|
|
62575
62642
|
secondaryFetchLimit: n.moduleFetchLimit ?? 200
|
|
62576
62643
|
});
|
|
62577
62644
|
}
|
|
62578
|
-
function
|
|
62645
|
+
function UW(e) {
|
|
62579
62646
|
let t = String(e ?? "").trim().split(/[^a-zA-Z0-9]+/).filter(Boolean);
|
|
62580
62647
|
return t.length ? `${t.map((e, t) => t === 0 ? e.toLowerCase() : e[0].toUpperCase() + e.slice(1).toLowerCase()).join("")}Count` : "";
|
|
62581
62648
|
}
|
|
62582
|
-
function
|
|
62649
|
+
function WW(e) {
|
|
62583
62650
|
let t = Array.isArray(e?.stages) ? e.stages : [];
|
|
62584
62651
|
if (!t.length) return e;
|
|
62585
62652
|
let n = {};
|
|
62586
62653
|
for (let e of t) {
|
|
62587
|
-
let t =
|
|
62654
|
+
let t = UW(e?.stageName);
|
|
62588
62655
|
t && (n[t] = Number(e?.count) || 0);
|
|
62589
62656
|
}
|
|
62590
62657
|
return {
|
|
@@ -62592,19 +62659,19 @@ function HW(e) {
|
|
|
62592
62659
|
...e
|
|
62593
62660
|
};
|
|
62594
62661
|
}
|
|
62595
|
-
var
|
|
62662
|
+
var GW = (e) => {
|
|
62596
62663
|
let t = Number(e?.targetSubmission ?? e?.targetSubmissions);
|
|
62597
62664
|
return Number.isFinite(t) && t > 0 ? t : null;
|
|
62598
62665
|
};
|
|
62599
|
-
function
|
|
62666
|
+
function KW({ submittedCountField: e = "submittedCount", progressField: t = "targetSubmissionProgress" } = {}) {
|
|
62600
62667
|
return function(n, r, i) {
|
|
62601
|
-
let a =
|
|
62668
|
+
let a = EW(n, r, i), o = GW(a);
|
|
62602
62669
|
return o != null && (a[t] = `${Number(a?.[e]) || 0} of ${o}`), a;
|
|
62603
62670
|
};
|
|
62604
62671
|
}
|
|
62605
|
-
function
|
|
62606
|
-
let t =
|
|
62607
|
-
return
|
|
62672
|
+
function qW(e = {}) {
|
|
62673
|
+
let t = KW();
|
|
62674
|
+
return VW({
|
|
62608
62675
|
primaryKey: "_id",
|
|
62609
62676
|
extraFields: e.extraFields,
|
|
62610
62677
|
extraFieldsAfter: e.extraFieldsAfter,
|
|
@@ -62613,9 +62680,9 @@ function GW(e = {}) {
|
|
|
62613
62680
|
key: "entityId",
|
|
62614
62681
|
fetchByKeys: (e, t, n, r) => {
|
|
62615
62682
|
let i = Math.max(1, Number(r?.limit) || 10);
|
|
62616
|
-
return
|
|
62683
|
+
return TB(Math.floor((Number(r?.offset) || 0) / i) + 1, i);
|
|
62617
62684
|
},
|
|
62618
|
-
extractRows: (e) => (e?.items ?? []).map(
|
|
62685
|
+
extractRows: (e) => (e?.items ?? []).map(WW),
|
|
62619
62686
|
mergeRow: (e, n, r) => {
|
|
62620
62687
|
let i = t(e, n, r);
|
|
62621
62688
|
return n?._id && (i.workflowId = n._id), i;
|
|
@@ -62623,17 +62690,17 @@ function GW(e = {}) {
|
|
|
62623
62690
|
}]
|
|
62624
62691
|
});
|
|
62625
62692
|
}
|
|
62626
|
-
async function
|
|
62627
|
-
return $f(await
|
|
62693
|
+
async function JW(e, t = 10, n = 0, r = {}, i = {}) {
|
|
62694
|
+
return $f(await qW(i)(e, t, n, r), e);
|
|
62628
62695
|
}
|
|
62629
|
-
async function
|
|
62630
|
-
return $f(await
|
|
62696
|
+
async function YW(e, t, n, r = 10, i = 0, a = {}) {
|
|
62697
|
+
return $f(await HW(e, t)(n, r, i, a), n);
|
|
62631
62698
|
}
|
|
62632
62699
|
//#endregion
|
|
62633
62700
|
//#region src/index.js
|
|
62634
|
-
typeof window < "u" && (window.__CORE_THEME_BUILD__ = "2026-09-
|
|
62635
|
-
var
|
|
62701
|
+
typeof window < "u" && (window.__CORE_THEME_BUILD__ = "2026-09-21T10:13:56.912Z");
|
|
62702
|
+
var XW = fH, ZW = _A(uU), QW = _A(fU), $W = _A(DU), eG = _A(zU), tG = _A(JU), nG = _A(ZU), rG = _A(eW), iG = _A(rW), aG = _A(aW), oG = _A(vW), sG = _A(bW);
|
|
62636
62703
|
//#endregion
|
|
62637
|
-
export { D as ADMIN_API_URL, A as ADMIN_APP_ID, u as APP_ID, k as AUTH_URL, V_ as ActivityNotesCard, A_ as ActivityTab,
|
|
62704
|
+
export { D as ADMIN_API_URL, A as ADMIN_APP_ID, u as APP_ID, k as AUTH_URL, V_ as ActivityNotesCard, A_ as ActivityTab, KV as AddBatchCandidatePopup, p_ as AddFormV1, fH as AdminDashboard, sL as AdminDashboardContent, XW as AdminPage, m_ as AppAlert, Di as AppButton, Bk as AppShell, qE as ApprovalActionBar, H_ as AssigneeAvatars, Mk as AuthGuard, mx as BILLING_STATUS_FLOW, NT as BOOLEAN_API_KEYS, vw as BOOLEAN_PARSEABLE_API_KEYS, U_ as BULK_UPLOAD_DEFAULT_ACCEPT, W_ as BULK_UPLOAD_DEFAULT_MAX_SIZE_MB, ri as Breadcrumb, $W as BulkUploadPage, Q_ as BulkUploadPanel, o as CANDIDATES_URL, _D as CONTRACT_C2C, gD as CONTRACT_W2, n as CORE_URL, gy as CURRENCY_SYMBOLS, _c as CalendarCard, dL as CoreThemeAdminApp, uL as CoreThemeAdminRoutes, xl as CustomPagination, hE as DEFAULT_HOURS_POLICY, kT as DEFAULT_RESULTS_VIEW, gi as DETAIL_VIEW_MODE_OPTIONS, Vn as DETAIL_VIEW_MODE_VALUES, Xn as DETAIL_VIEW_POPUP_PATH, zE as DayLogModal, dv as DescriptionBlock, gS as DetailHeaderCard, CS as DetailViewPage, xR as DetailViewPopup, pb as DetailViewV1, Ui as DocumentViewer, Cu as DynamicCards, Rz as DynamicPopup, ZV as DynamicPopupRoute, xc as DynamicTabs, FC as EditFormV1, $w as FIELD_TYPE_REGISTRY, cD as FINANCE_APPROVAL_CONFIG, tD as FINANCE_TYPE_CFO, eD as FINANCE_TYPE_ONBOARDING_MANAGER, iD as FINANCE_TYPE_ONBOARDING_MANAGER_REAPPROVE, nD as FINANCE_TYPE_ONLY_FINANCE, $E as FINANCE_TYPE_SUBMISSION_MANAGER, rD as FINANCE_TYPE_SUBMISSION_MANAGER_REAPPROVE, kO as FileListCard, cO as FinanceApprovalPanel, Yx as FinanceAvatar, $x as FinanceBadge, YE as FinanceDayCell, Vx as FinanceDivider, Xx as FinanceEmployeeCell, Rx as FinanceEmptyState, Hx as FinanceEquation, Kx as FinanceHistoryTimeline, Lx as FinanceHoursGrid, Ix as FinanceKpiRow, Bx as FinanceLine, mE as FinanceListToolbar, eS as FinanceMarginBadge, Qx as FinanceMoneyCell, rS as FinanceRecordsTable, tS as FinanceRowChevron, zx as FinanceSection, Fx as FinanceStatusPill, Zx as FinanceTextCell, ZE as FinanceTimesheetAnalysis, Ux as FinanceWorkflowSteps, O as GATEWAY_URL, wI as GLOBAL_DEFAULT_FIELDS, gE as HOURS_MESSAGES, ak as Header, Ou as HierarchyUserFilter, s as JOBS_URL, ZW as LegacyAdminPage, Bh as ListView, sG as LmsHomePage, oG as LmsTestForm, Vk as Login, cR as MailPopup, nG as ManageModules, rG as ManageSubmodules, WC as ModuleRowActions, KE as NotesPanel, B_ as NotesTab, bT as OPEN_AS_OPTIONS, hx as PAYROLL_STATUS_FLOW, xI as PLATFORM_SCOPES, LV as POPUP_CONFIGS, i as PYOPS_URL, ZC as ParamCardView, rw as ParamListView, OE as PeriodBadgeTag, PI as PlatformSection, yR as PreviewPopup, gA as ProjectSelect, GE as ProofUploadPreview, HE as QuickLogBar, BE as QuickLogSelectionBar, OT as RESULTS_VIEW_OPTIONS, dH as RegionBanner, VE as RejectionReasonModal, r as SUBMISSIONS_URL, aE as SearchBuilderV1, Ok as Sidebar, sE as StatusBadge, DE as StatusBadgeTag, QW as StickyNotesFullPage, lE as StylishDynamicTabs, dE as TemplateEditor, eG as TestForm, aG as TestingHomePage, S_ as TimelineGroups, IE as TimesheetDayCell, nn as TipTapEditor, uH as UserForm, tH as VendorShareDrawer, Tp as ViewSummaryWidget, DR as WizardPopup, a as ZINNEXT_URL, iG as ZinnextTableView, tG as ZinnextTestForm, Ke as appNow, tr as applyIntegrationStatus, tl as approveSubmission, Y_ as buildAcceptAttr, RT as buildBooleanRequest, kx as buildCsv, Cx as buildDailyRows, PE as buildDayGradient, HD as buildRateHistoryEntries, Ex as buildWeeklyRollup, g as clearSelectedProject, Yr as colors, PD as computeFinance, SE as computeHoursPolicy, Dx as computeMarginBand, qn as conditionMatches, v as configureCoreTheme, Ur as configuredFieldLabel, qW as createAllWorkflowsListFetcher, VW as createMergedListFetcher, PW as createModuleListFetchAdapter, HW as createWorkflowStageListFetcher, _y as currencySymbol, uI as deactivateRegion, EW as defaultMergeRow, ye as deleteIntegrationConfig, Sx as deriveDayStats, wE as describeCapacity, Nx as downloadCsv, Or as evaluateShowIfWith, OD as findEmployerRow, ED as flattenGroups, Cy as formatAmount, dn as formatApp, sn as formatAppDateTime, J_ as formatFileSize, UD as formatFinanceMoney, ax as formatHours, wy as formatMoney, sx as formatPercent, Ty as formatRate, re as getActivity, JW as getAllWorkflowsModuleList, hn as getAppTimeZone, dx as getApprovalDate, Ne as getBgcIntegrationConfig, Qe as getBgcIntegrationSummary, gx as getBillingActionStates, aT as getBooleanEligibleTypes, d as getCurrentRoleName, Vr as getDetailDisplayDefaults, jx as getFieldLabel, tT as getFieldType, q_ as getFileExtension, pD as getFinanceApprovalConfig, vO as getFormGroupsRaw, TI as getGlobalAiServices, SI as getGlobalDefaults, Dt as getIntegrationConfig, te as getIntegrationConfigs, Un as getIntegrationSummary, _l as getModuleConfig, st as getModuleDataDetail, _x as getPayrollActionStates, yl as getPeriodBadgeConfig, _I as getRegionDetailDefaults, _T as getSearchPopup, y as getSelectedProject, E as getStoredToken, f as getStoredUser, p as getUserRoles, nl as getVMSApprove, Mx as getValueStyle, YW as getWorkflowStageModuleList, vx as getWorkflowSteps, fI as grantPlatformAccess, mI as hasPlatformAccess, ux as humanizeEvent, dg as i, Ax as indexFieldConfig, cx as initialsOf, Sw as insertTokenAtCursor, nT as isBooleanEligible, bw as isBooleanParsable, S as isTester, dI as listPlatformAccess, gI as listPlatformAudit, hI as listPlatformUsers, bI as listRegionRoles, yI as listRegionUsers, cI as listRegions, oi as loadDetailDefaults, h as logout, hD as marginIncludesReferral, ND as matchLocationTax, GS as n, AD as normalizeContract, Kr as normalizeDetailViewMode, $_ as r, yy as rateUnitLabel, xy as rateUnitShort, wT as readActionButtons, CE as reconcileHours, sI as regionPath, eT as registerFieldType, gT as registerSearchPopup, il as rejectSubmission, Nn as requiredWhenActive, Cr as requiredWhenRule, D_ as resolveActivityMeta, FD as resolveAndCompute, bE as resolveDayKind, MD as resolveFinanceInputs, wW as resolveMergeKey, wW as resolveMergedListKey, ST as resolveOpenAs, mD as resolveRejectionReason, MT as resolveResultsSearchPlaceholder, jT as resolveResultsView, yO as resolveSubmissionFinance, pI as revokePlatformAccess, jr as runDetailViewOpen, fe as saveBgcIntegrationConfig, EI as saveGlobalAiServices, CI as saveGlobalDefaults, Se as saveIntegrationConfig, lI as saveRegion, vI as saveRegionDetailDefaults, c as setSelectedProject, Qn as showIfConditions, UW as stageCountKey, Hk as t, dt as testIntegrationConnection, ee as toApp, Sy as toNumber, Gn as tzLabel, di as tzShortLabel, vT as unregisterSearchPopup, Rd as useDropdownFields, Ep as useDropdownValues, MO as useEditForm, zd as useFieldConfig, Bd as useFilterFields, Yd as useMenuPermission, LC as useModuleActions, bS as useRecordRefresh, jO as useTabRows, xw as validateBooleanQuery, X_ as validateBulkFile, t as withAdminAppId, _ as withAppId, _A as withAuthGuard };
|
|
62638
62705
|
|
|
62639
62706
|
//# sourceMappingURL=index.js.map
|