@realtek/core-theme 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/index.cjs +2 -2
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +751 -730
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist-lib/index.js
CHANGED
|
@@ -4705,38 +4705,44 @@ async function bc({ module: e, id: t, view: n } = {}) {
|
|
|
4705
4705
|
if (!a.ok) throw Error(`API ${a.status}: ${a.statusText}`);
|
|
4706
4706
|
return yc(await a.json());
|
|
4707
4707
|
}
|
|
4708
|
-
async function xc(e
|
|
4708
|
+
async function xc({ searchQuery: e, candidateId: t }) {
|
|
4709
|
+
let n = localStorage.getItem("tenantId") || "93c782a4aa626175e5d11afa", r = localStorage.getItem("businessId") || "83c782a4aa626175e5d11afa", i = localStorage.getItem("businessUnitId") || "63b57588fd768a839dbc0f63", a = Number(localStorage.getItem("userId")) || 1;
|
|
4710
|
+
return cc(on, "/joblist", {
|
|
4711
|
+
method: "POST",
|
|
4712
|
+
body: JSON.stringify({
|
|
4713
|
+
tenantId: n,
|
|
4714
|
+
businessId: r,
|
|
4715
|
+
businessUnitId: i,
|
|
4716
|
+
searchQuery: e,
|
|
4717
|
+
userId: a,
|
|
4718
|
+
candidateId: Array.isArray(t) ? t : [t]
|
|
4719
|
+
})
|
|
4720
|
+
});
|
|
4721
|
+
}
|
|
4722
|
+
async function Sc(e = "") {
|
|
4709
4723
|
return lc(on, `/users/any${e ? `?search=${encodeURIComponent(e)}` : ""}`);
|
|
4710
4724
|
}
|
|
4711
|
-
async function
|
|
4725
|
+
async function Cc(e, t = 0, n = 10) {
|
|
4712
4726
|
return await cc(on, `/source/hiring-candidate-list?offset=${t}&limit=${n}`, {
|
|
4713
4727
|
method: "POST",
|
|
4714
4728
|
body: JSON.stringify(e)
|
|
4715
4729
|
});
|
|
4716
4730
|
}
|
|
4717
|
-
async function
|
|
4731
|
+
async function wc({ jobId: e, offset: t = 0, limit: n = 1, searchValue: r = "" }) {
|
|
4718
4732
|
return (await cc(on, `/source/hiring-candidate-list/pipeline?hiringType=pipeline&jobId=${e}&limit=${n}&offset=${t}&searchValue=${encodeURIComponent(r)}`))?.data?.count ?? 0;
|
|
4719
4733
|
}
|
|
4720
|
-
async function
|
|
4734
|
+
async function Tc({ jobId: e, offset: t = 0, limit: n = 1, searchQuery: r = "" }) {
|
|
4721
4735
|
return (await cc(on, `/source/hiring-candidate-list/pipeline?hiringType=shortlisted&jobId=${e}&limit=${n}&offset=${t}&searchQuery=${encodeURIComponent(r)}`))?.data?.count ?? 0;
|
|
4722
4736
|
}
|
|
4723
|
-
async function
|
|
4737
|
+
async function Ec(e) {
|
|
4724
4738
|
return (await cc(an, `/job-submissions?jobId=${e}`))?.data ?? [];
|
|
4725
4739
|
}
|
|
4726
|
-
async function
|
|
4740
|
+
async function Dc({ jobId: e, offset: t = 0, limit: n = 50, searchValue: r = "" }) {
|
|
4727
4741
|
return await cc(on, `/source/hiring-candidate-list/pipeline?hiringType=pipeline&jobId=${e}&limit=${n}&offset=${t}&searchValue=${encodeURIComponent(r)}`);
|
|
4728
4742
|
}
|
|
4729
|
-
async function
|
|
4743
|
+
async function Oc({ jobId: e, offset: t = 0, limit: n = 50, searchQuery: r = "" }) {
|
|
4730
4744
|
return await cc(on, `/source/hiring-candidate-list/pipeline?hiringType=shortlisted&jobId=${e}&limit=${n}&offset=${t}&searchQuery=${encodeURIComponent(r)}`);
|
|
4731
4745
|
}
|
|
4732
|
-
async function Oc({ _id: e, tenantId: t, businessId: n, businessUnitId: r }) {
|
|
4733
|
-
return lc(sn, `/detailed-view?${new URLSearchParams({
|
|
4734
|
-
_id: e,
|
|
4735
|
-
tenantId: t,
|
|
4736
|
-
businessId: n,
|
|
4737
|
-
businessUnitId: r
|
|
4738
|
-
}).toString()}`);
|
|
4739
|
-
}
|
|
4740
4746
|
//#endregion
|
|
4741
4747
|
//#region src/components/detail/DescriptionBlock.jsx
|
|
4742
4748
|
var { Text: kc } = U, Ac = 2, jc = /* @__PURE__ */ "overview.summary.role summary.job summary.role overview.job description.description.about the role.about the job.job title.role.responsibilities.roles responsibilities.roles and responsibilities.roles & responsibilities.key responsibilities.requirements.required skills.preferred skills.technical skills.key skills.skills.competencies.nice to have.good to have.qualifications.required qualifications.preferred qualifications.education.experience.benefits".split("."), Mc = new Set(jc), Nc = /(education|qualification)/i, Pc = /(skill|competenc)/i, Fc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Ic = (e) => e.replace(/\w[^\s/]*/g, (e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()), Lc = (e) => [...new Set(e)];
|
|
@@ -5793,7 +5799,7 @@ function vl({ jobId: e, onActionComplete: t, onDescriptionSaved: n }) {
|
|
|
5793
5799
|
let r = (t - 1) * n;
|
|
5794
5800
|
s(!0);
|
|
5795
5801
|
try {
|
|
5796
|
-
let i = await
|
|
5802
|
+
let i = await Cc(pe(e, r, n), r, n), a = i?.data?.data ?? i?.data?.applicant ?? [], o = i?.data?.count?.searchCount ?? i?.data?.count?.total ?? 0;
|
|
5797
5803
|
l(a.map(gl)), d(o), g(t), v(e), S(!0), E(!0);
|
|
5798
5804
|
} catch (e) {
|
|
5799
5805
|
console.error("Candidate search failed:", e), G.error("Failed to search candidates. Please try again."), l([]), d(0), S(!0);
|
|
@@ -6330,7 +6336,7 @@ function Tl({ jobId: e, onCountChange: t }) {
|
|
|
6330
6336
|
if (e) {
|
|
6331
6337
|
s(!0);
|
|
6332
6338
|
try {
|
|
6333
|
-
let i = await
|
|
6339
|
+
let i = await Dc({
|
|
6334
6340
|
jobId: e,
|
|
6335
6341
|
offset: (n - 1) * r,
|
|
6336
6342
|
limit: r
|
|
@@ -6634,7 +6640,7 @@ function Ml({ jobId: e, onCountChange: t }) {
|
|
|
6634
6640
|
if (e) {
|
|
6635
6641
|
s(!0);
|
|
6636
6642
|
try {
|
|
6637
|
-
let i = await
|
|
6643
|
+
let i = await Oc({
|
|
6638
6644
|
jobId: e,
|
|
6639
6645
|
offset: (n - 1) * r,
|
|
6640
6646
|
limit: r
|
|
@@ -6959,7 +6965,7 @@ function Hl({ jobId: e, onCountChange: t }) {
|
|
|
6959
6965
|
if (e) {
|
|
6960
6966
|
c(!0);
|
|
6961
6967
|
try {
|
|
6962
|
-
let n = await
|
|
6968
|
+
let n = await Ec(e), r = Array.isArray(n) ? n : [];
|
|
6963
6969
|
u(r), t?.(r.length);
|
|
6964
6970
|
} finally {
|
|
6965
6971
|
c(!1);
|
|
@@ -7079,7 +7085,7 @@ function Ul({ jobId: e, onDescriptionSaved: t }) {
|
|
|
7079
7085
|
let t = new URLSearchParams(n);
|
|
7080
7086
|
t.set("subTab", e), i(t, { replace: !0 });
|
|
7081
7087
|
}, [c, l] = o(null), [u, d] = o(null), [f, p] = o(null), m = () => {
|
|
7082
|
-
e && (
|
|
7088
|
+
e && (wc({ jobId: e }).then(l).catch(() => {}), Tc({ jobId: e }).then(d).catch(() => {}), Ec(e).then((e) => p(Array.isArray(e) ? e.length : 0)).catch(() => {}));
|
|
7083
7089
|
};
|
|
7084
7090
|
return r(() => {
|
|
7085
7091
|
m();
|
|
@@ -8189,7 +8195,7 @@ function Gu({ notes: e, users: t = [], onAddNote: n }) {
|
|
|
8189
8195
|
filterOption: !1,
|
|
8190
8196
|
onSearch: (e) => {
|
|
8191
8197
|
clearTimeout(g.current), h(!0), g.current = setTimeout(() => {
|
|
8192
|
-
|
|
8198
|
+
Sc(e).then((e) => {
|
|
8193
8199
|
p((Array.isArray(e) ? e : e?.items ?? e?.list ?? e?.data ?? []).map(Hu));
|
|
8194
8200
|
}).catch(() => p([])).finally(() => h(!1));
|
|
8195
8201
|
}, 300);
|
|
@@ -14134,7 +14140,8 @@ function tg({ form: e, config: t, api: n, popupContext: r, resolvedIds: i, dynam
|
|
|
14134
14140
|
e.validateFields().then(async (e) => {
|
|
14135
14141
|
p(!0);
|
|
14136
14142
|
try {
|
|
14137
|
-
await g(e)
|
|
14143
|
+
if ((await g(e))?.navigated) return;
|
|
14144
|
+
G.success(t.successMessage || "Saved successfully"), u();
|
|
14138
14145
|
} catch (e) {
|
|
14139
14146
|
G.error(e?.message || "Failed. Please try again.");
|
|
14140
14147
|
} finally {
|
|
@@ -14321,19 +14328,10 @@ async function fg(e) {
|
|
|
14321
14328
|
})
|
|
14322
14329
|
}));
|
|
14323
14330
|
}
|
|
14324
|
-
async function pg(e
|
|
14325
|
-
return og(await Z(sn, "/quicksubmit/list", {
|
|
14326
|
-
method: "POST",
|
|
14327
|
-
body: JSON.stringify({
|
|
14328
|
-
jobId: e,
|
|
14329
|
-
search: t
|
|
14330
|
-
})
|
|
14331
|
-
}));
|
|
14332
|
-
}
|
|
14333
|
-
async function mg(e = "") {
|
|
14331
|
+
async function pg(e = "") {
|
|
14334
14332
|
return Fn(on, `/users/any${e ? `?search=${encodeURIComponent(e)}` : ""}`);
|
|
14335
14333
|
}
|
|
14336
|
-
async function
|
|
14334
|
+
async function mg({ relatedIds: e, module: t, title: n, targetDate: r, notes: i, mentionedUsers: a = [] }) {
|
|
14337
14335
|
return Z(on, "/notes", {
|
|
14338
14336
|
method: "POST",
|
|
14339
14337
|
body: JSON.stringify({
|
|
@@ -14353,7 +14351,7 @@ async function hg({ relatedIds: e, module: t, title: n, targetDate: r, notes: i,
|
|
|
14353
14351
|
})
|
|
14354
14352
|
});
|
|
14355
14353
|
}
|
|
14356
|
-
async function
|
|
14354
|
+
async function hg({ jobId: e, candidateIds: t, hiringStage: n }) {
|
|
14357
14355
|
return Z(on, "/source/hiringStgUpdate", {
|
|
14358
14356
|
method: "PUT",
|
|
14359
14357
|
body: JSON.stringify({
|
|
@@ -14369,10 +14367,10 @@ async function gg({ jobId: e, candidateIds: t, hiringStage: n }) {
|
|
|
14369
14367
|
})
|
|
14370
14368
|
});
|
|
14371
14369
|
}
|
|
14372
|
-
async function
|
|
14370
|
+
async function gg() {
|
|
14373
14371
|
return og(await Z(X, "/masters/dropdown?masterName=candidateGroups&offset=0&limit=50"));
|
|
14374
14372
|
}
|
|
14375
|
-
async function
|
|
14373
|
+
async function _g({ candidateIds: e, groupId: t, groupName: n }) {
|
|
14376
14374
|
return og(await Z(sn, "/actions/update-group", {
|
|
14377
14375
|
method: "PUT",
|
|
14378
14376
|
body: JSON.stringify({
|
|
@@ -14382,7 +14380,7 @@ async function vg({ candidateIds: e, groupId: t, groupName: n }) {
|
|
|
14382
14380
|
})
|
|
14383
14381
|
}));
|
|
14384
14382
|
}
|
|
14385
|
-
async function
|
|
14383
|
+
async function vg({ jobIds: e, rate: t, priority: n }) {
|
|
14386
14384
|
return Z(on, "/assign?type=self", {
|
|
14387
14385
|
method: "PUT",
|
|
14388
14386
|
body: JSON.stringify({
|
|
@@ -14397,7 +14395,7 @@ async function yg({ jobIds: e, rate: t, priority: n }) {
|
|
|
14397
14395
|
})
|
|
14398
14396
|
});
|
|
14399
14397
|
}
|
|
14400
|
-
async function
|
|
14398
|
+
async function yg() {
|
|
14401
14399
|
let e = await Fn(on, "/users/manager");
|
|
14402
14400
|
return (Array.isArray(e) ? e : e ? [e] : []).map((e) => ({
|
|
14403
14401
|
...e,
|
|
@@ -14405,10 +14403,10 @@ async function bg() {
|
|
|
14405
14403
|
value: String(e.userId ?? e.id ?? e._id ?? "")
|
|
14406
14404
|
}));
|
|
14407
14405
|
}
|
|
14408
|
-
async function
|
|
14406
|
+
async function bg(e) {
|
|
14409
14407
|
return e ? Fn(on, `/self-assign?jobId=${encodeURIComponent(e)}`) : null;
|
|
14410
14408
|
}
|
|
14411
|
-
async function
|
|
14409
|
+
async function xg({ jobIds: e, userId: t, rate: n, priority: r, removedIds: i, existingRecruiters: a }) {
|
|
14412
14410
|
let o = (a ?? []).filter((e) => {
|
|
14413
14411
|
let t = String(e?.user_id ?? e?.id ?? e?.userId ?? "");
|
|
14414
14412
|
return t && !(i ?? []).includes(t);
|
|
@@ -14427,7 +14425,7 @@ async function Sg({ jobIds: e, userId: t, rate: n, priority: r, removedIds: i, e
|
|
|
14427
14425
|
})
|
|
14428
14426
|
});
|
|
14429
14427
|
}
|
|
14430
|
-
async function
|
|
14428
|
+
async function Sg({ jobId: e, candidateIds: t }) {
|
|
14431
14429
|
return Z(on, "/source/hiringStgUpdate", {
|
|
14432
14430
|
method: "PUT",
|
|
14433
14431
|
body: JSON.stringify({
|
|
@@ -14445,9 +14443,9 @@ async function Cg({ jobId: e, candidateIds: t }) {
|
|
|
14445
14443
|
}
|
|
14446
14444
|
//#endregion
|
|
14447
14445
|
//#region src/components/popups/definitions/delete/api.js
|
|
14448
|
-
var
|
|
14446
|
+
var Cg = { deleteItems: async (e, t) => {
|
|
14449
14447
|
await dg(t.moduleName, e);
|
|
14450
|
-
} },
|
|
14448
|
+
} }, wg = {
|
|
14451
14449
|
title: "Quick Submit",
|
|
14452
14450
|
okText: "Submit",
|
|
14453
14451
|
width: 480,
|
|
@@ -14473,27 +14471,46 @@ var wg = { deleteItems: async (e, t) => {
|
|
|
14473
14471
|
}]
|
|
14474
14472
|
};
|
|
14475
14473
|
//#endregion
|
|
14476
|
-
//#region src/
|
|
14477
|
-
function
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
}
|
|
14484
|
-
|
|
14485
|
-
return t.moduleName === "candidate" ? t.selectedIds ?? [] : e.candidate ? [e.candidate] : [];
|
|
14474
|
+
//#region src/services/candidatesApi.js
|
|
14475
|
+
async function Tg({ isFromSubmission: e, jobId: t, submissionId: n, search: r = "" } = {}) {
|
|
14476
|
+
let i = { search: r };
|
|
14477
|
+
e ? i.submissionId = n : i.jobId = t;
|
|
14478
|
+
let a = await Z(sn, "/quicksubmit/list", {
|
|
14479
|
+
method: "POST",
|
|
14480
|
+
body: JSON.stringify(i)
|
|
14481
|
+
});
|
|
14482
|
+
return a.data ?? a;
|
|
14486
14483
|
}
|
|
14487
|
-
|
|
14488
|
-
|
|
14484
|
+
//#endregion
|
|
14485
|
+
//#region src/components/popups/definitions/quick-submit/api.js
|
|
14486
|
+
var Eg = {
|
|
14487
|
+
searchOptions: async (e, t, n) => {
|
|
14488
|
+
if (e.searchFetchKey === "quickSubmitJobList") {
|
|
14489
|
+
let e = n.selectedRecords?.[0] ?? {}, r = await xc({
|
|
14490
|
+
searchQuery: t,
|
|
14491
|
+
candidateId: e.id ?? e._id ?? n.selectedIds?.[0]
|
|
14492
|
+
});
|
|
14493
|
+
return (Array.isArray(r?.data) ? r.data : []).map((e) => ({
|
|
14494
|
+
label: [e.jobRefId, e.jobTitle].filter(Boolean).join(" - ") || String(e._id ?? ""),
|
|
14495
|
+
value: e._id ?? ""
|
|
14496
|
+
}));
|
|
14497
|
+
}
|
|
14498
|
+
if (e.searchFetchKey === "quickSubmitCandidates") {
|
|
14499
|
+
let e = n.selectedRecords?.[0] ?? {}, r = n.jobId ?? e.jobId ?? e.id ?? e._id ?? n.selectedIds?.[0];
|
|
14500
|
+
return Tg({
|
|
14501
|
+
isFromSubmission: n.isFromSubmission,
|
|
14502
|
+
jobId: r,
|
|
14503
|
+
submissionId: n.submissionId,
|
|
14504
|
+
search: t
|
|
14505
|
+
});
|
|
14506
|
+
}
|
|
14507
|
+
return [];
|
|
14508
|
+
},
|
|
14489
14509
|
submit: async (e, t) => {
|
|
14490
|
-
let n =
|
|
14491
|
-
|
|
14492
|
-
_id: e,
|
|
14493
|
-
...n
|
|
14494
|
-
})));
|
|
14510
|
+
let { navigate: n, selectedRecords: r = [], selectedIds: i = [], moduleName: a, isFromSubmission: o = !1 } = t, s = r[0] ?? {};
|
|
14511
|
+
return n(a === "candidate" ? `/submission-create/${e.jobId ?? ""}?candidateId=${s.id ?? s._id ?? i[0] ?? ""}&isFromSubmission=${o}` : `/submission-create/${t.jobId ?? s.jobId ?? s.id ?? s._id ?? i[0] ?? ""}?candidateId=${e.candidate ?? ""}&isFromSubmission=${o}`), { navigated: !0 };
|
|
14495
14512
|
}
|
|
14496
|
-
},
|
|
14513
|
+
}, Dg = {
|
|
14497
14514
|
title: "Add Notes & Share",
|
|
14498
14515
|
okText: "Save & Share",
|
|
14499
14516
|
width: 480,
|
|
@@ -14505,9 +14522,9 @@ var Og = {
|
|
|
14505
14522
|
placeholder: "Add your notes on the job. Use '@' to mention someone.",
|
|
14506
14523
|
mentionFetchKey: "mentionUsers"
|
|
14507
14524
|
}]
|
|
14508
|
-
},
|
|
14509
|
-
async function
|
|
14510
|
-
return
|
|
14525
|
+
}, Og = (e) => e?.data ?? e;
|
|
14526
|
+
async function kg({ relatedId: e, notes: t, title: n, notesFor: r }) {
|
|
14527
|
+
return Og(await cc(X, "/notes", {
|
|
14511
14528
|
method: "POST",
|
|
14512
14529
|
body: JSON.stringify({
|
|
14513
14530
|
relatedId: e,
|
|
@@ -14519,16 +14536,18 @@ async function jg({ relatedId: e, notes: t, title: n, notesFor: r }) {
|
|
|
14519
14536
|
}
|
|
14520
14537
|
//#endregion
|
|
14521
14538
|
//#region src/components/popups/definitions/add-notes/api.js
|
|
14522
|
-
var
|
|
14523
|
-
getMentionOptions: async (e, t) =>
|
|
14539
|
+
var Ag = {
|
|
14540
|
+
getMentionOptions: async (e, t) => pg(t),
|
|
14524
14541
|
submit: async (e, t) => {
|
|
14525
|
-
|
|
14526
|
-
|
|
14542
|
+
let n = Array.isArray(t.selectedIds) ? t.selectedIds[0] : t.selectedIds;
|
|
14543
|
+
if (!n) throw Error("Please select a record before adding a note.");
|
|
14544
|
+
await kg({
|
|
14545
|
+
relatedId: String(n),
|
|
14527
14546
|
notes: e.notes,
|
|
14528
14547
|
notesFor: t.moduleName
|
|
14529
14548
|
});
|
|
14530
14549
|
}
|
|
14531
|
-
},
|
|
14550
|
+
}, jg = {
|
|
14532
14551
|
title: "Tag to Job",
|
|
14533
14552
|
okText: "Tag",
|
|
14534
14553
|
width: 480,
|
|
@@ -14553,16 +14572,16 @@ var Mg = {
|
|
|
14553
14572
|
value: "Pipeline"
|
|
14554
14573
|
}]
|
|
14555
14574
|
}]
|
|
14556
|
-
},
|
|
14575
|
+
}, Mg = {
|
|
14557
14576
|
searchOptions: async (e, t) => e.searchFetchKey === "tagToJobJobList" ? fg(t) : [],
|
|
14558
14577
|
submit: async (e, t) => {
|
|
14559
|
-
await
|
|
14578
|
+
await hg({
|
|
14560
14579
|
jobId: e.jobId,
|
|
14561
14580
|
candidateIds: t.selectedIds,
|
|
14562
14581
|
hiringStage: e.hiringStage
|
|
14563
14582
|
});
|
|
14564
14583
|
}
|
|
14565
|
-
},
|
|
14584
|
+
}, Ng = {
|
|
14566
14585
|
title: "Change Status",
|
|
14567
14586
|
okText: "Apply",
|
|
14568
14587
|
width: 420,
|
|
@@ -14594,9 +14613,9 @@ var Mg = {
|
|
|
14594
14613
|
}
|
|
14595
14614
|
]
|
|
14596
14615
|
}]
|
|
14597
|
-
},
|
|
14616
|
+
}, Pg = { submit: async (e, t) => {
|
|
14598
14617
|
await sg(t.moduleName, t.selectedIds, e.status);
|
|
14599
|
-
} },
|
|
14618
|
+
} }, Fg = {
|
|
14600
14619
|
getTitleText: (e) => `Remove ${e > 1 ? `${e} Candidates` : "Candidate"} from Shortlist`,
|
|
14601
14620
|
titleIcon: "delete",
|
|
14602
14621
|
okText: "Remove",
|
|
@@ -14605,12 +14624,12 @@ var Mg = {
|
|
|
14605
14624
|
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?",
|
|
14606
14625
|
footerNote: "The candidate will be moved back to the pipeline.",
|
|
14607
14626
|
fields: []
|
|
14608
|
-
},
|
|
14609
|
-
await
|
|
14627
|
+
}, Ig = { onOk: async (e) => {
|
|
14628
|
+
await Sg({
|
|
14610
14629
|
jobId: e.jobId ?? e.selectedIds[0],
|
|
14611
14630
|
candidateIds: e.selectedIds
|
|
14612
14631
|
});
|
|
14613
|
-
} },
|
|
14632
|
+
} }, Lg = {
|
|
14614
14633
|
title: "Add to Groups",
|
|
14615
14634
|
description: "Select a group to add the selected candidate(s) to",
|
|
14616
14635
|
okText: "Add to Group",
|
|
@@ -14624,26 +14643,26 @@ var Mg = {
|
|
|
14624
14643
|
placeholder: "Select a group",
|
|
14625
14644
|
fetchOptionsKey: "candidateGroups"
|
|
14626
14645
|
}]
|
|
14627
|
-
},
|
|
14628
|
-
getOptions: async (e) => e.fetchOptionsKey === "candidateGroups" ?
|
|
14646
|
+
}, Rg = {
|
|
14647
|
+
getOptions: async (e) => e.fetchOptionsKey === "candidateGroups" ? gg() : [],
|
|
14629
14648
|
submit: async (e, t, { dynamicOptions: n }) => {
|
|
14630
14649
|
let r = (n.groupId ?? []).find((t) => String(t.value) === String(e.groupId));
|
|
14631
|
-
await
|
|
14650
|
+
await _g({
|
|
14632
14651
|
candidateIds: t.selectedIds,
|
|
14633
14652
|
groupId: e.groupId,
|
|
14634
14653
|
groupName: r?.label ?? ""
|
|
14635
14654
|
});
|
|
14636
14655
|
}
|
|
14637
|
-
},
|
|
14656
|
+
}, zg = {
|
|
14638
14657
|
title: "Self Assign",
|
|
14639
14658
|
okText: "Yes",
|
|
14640
14659
|
cancelText: "No",
|
|
14641
14660
|
width: 420,
|
|
14642
14661
|
bodyText: "Are you sure you want to assign this job?",
|
|
14643
14662
|
fields: []
|
|
14644
|
-
},
|
|
14645
|
-
await
|
|
14646
|
-
} },
|
|
14663
|
+
}, Bg = { onOk: async (e) => {
|
|
14664
|
+
await vg({ jobIds: e.selectedIds });
|
|
14665
|
+
} }, Vg = {
|
|
14647
14666
|
getTitleText: (e, t, n) => {
|
|
14648
14667
|
let r = n?.jobTitle || n?.title || "";
|
|
14649
14668
|
return r ? `Assign - ${r}` : "Assign";
|
|
@@ -14673,11 +14692,11 @@ var Mg = {
|
|
|
14673
14692
|
checkboxLabel: "Mark as High"
|
|
14674
14693
|
}
|
|
14675
14694
|
]
|
|
14676
|
-
},
|
|
14677
|
-
getOptions: async (e) => e.fetchOptionsKey === "assignToUsers" ?
|
|
14678
|
-
loadExtraData: async (e) =>
|
|
14695
|
+
}, Hg = {
|
|
14696
|
+
getOptions: async (e) => e.fetchOptionsKey === "assignToUsers" ? yg() : [],
|
|
14697
|
+
loadExtraData: async (e) => bg(e.selectedIds[0]),
|
|
14679
14698
|
submit: async (e, t, { removedIds: n, extraData: r }) => {
|
|
14680
|
-
await
|
|
14699
|
+
await xg({
|
|
14681
14700
|
jobIds: t.selectedIds,
|
|
14682
14701
|
userId: e.assignToUserId,
|
|
14683
14702
|
rate: e.candidateRate,
|
|
@@ -14686,7 +14705,7 @@ var Mg = {
|
|
|
14686
14705
|
existingRecruiters: r?.recruitersData
|
|
14687
14706
|
});
|
|
14688
14707
|
}
|
|
14689
|
-
},
|
|
14708
|
+
}, Ug = {
|
|
14690
14709
|
title: "Add Sticky Notes",
|
|
14691
14710
|
okText: "Save",
|
|
14692
14711
|
width: 480,
|
|
@@ -14714,11 +14733,11 @@ var Mg = {
|
|
|
14714
14733
|
mentionFetchKey: "mentionUsers"
|
|
14715
14734
|
}
|
|
14716
14735
|
]
|
|
14717
|
-
},
|
|
14718
|
-
getMentionOptions: async (e, t) =>
|
|
14736
|
+
}, Wg = {
|
|
14737
|
+
getMentionOptions: async (e, t) => pg(t),
|
|
14719
14738
|
submit: async (e, t) => {
|
|
14720
14739
|
let n = (e.comments?.match(/@([\w.]+)/g) ?? []).map((e) => e.slice(1));
|
|
14721
|
-
await
|
|
14740
|
+
await mg({
|
|
14722
14741
|
relatedIds: t.selectedIds,
|
|
14723
14742
|
module: t.moduleName,
|
|
14724
14743
|
title: e.heading,
|
|
@@ -14727,37 +14746,37 @@ var Mg = {
|
|
|
14727
14746
|
mentionedUsers: n
|
|
14728
14747
|
});
|
|
14729
14748
|
}
|
|
14730
|
-
},
|
|
14749
|
+
}, Gg = {
|
|
14731
14750
|
delete: rg,
|
|
14732
|
-
"quick-submit":
|
|
14733
|
-
"add-notes":
|
|
14734
|
-
"tag-to-job":
|
|
14735
|
-
"change-status":
|
|
14736
|
-
"remove-from-shortlist":
|
|
14737
|
-
"add-to-groups":
|
|
14738
|
-
"self-assign":
|
|
14739
|
-
"others-assign":
|
|
14740
|
-
"sticky-notes":
|
|
14741
|
-
},
|
|
14742
|
-
delete:
|
|
14743
|
-
"quick-submit":
|
|
14744
|
-
"add-notes":
|
|
14745
|
-
"tag-to-job":
|
|
14746
|
-
"change-status":
|
|
14747
|
-
"remove-from-shortlist":
|
|
14748
|
-
"add-to-groups":
|
|
14749
|
-
"self-assign":
|
|
14750
|
-
"others-assign":
|
|
14751
|
-
"sticky-notes":
|
|
14751
|
+
"quick-submit": wg,
|
|
14752
|
+
"add-notes": Dg,
|
|
14753
|
+
"tag-to-job": jg,
|
|
14754
|
+
"change-status": Ng,
|
|
14755
|
+
"remove-from-shortlist": Fg,
|
|
14756
|
+
"add-to-groups": Lg,
|
|
14757
|
+
"self-assign": zg,
|
|
14758
|
+
"others-assign": Vg,
|
|
14759
|
+
"sticky-notes": Ug
|
|
14760
|
+
}, Kg = {
|
|
14761
|
+
delete: Cg,
|
|
14762
|
+
"quick-submit": Eg,
|
|
14763
|
+
"add-notes": Ag,
|
|
14764
|
+
"tag-to-job": Mg,
|
|
14765
|
+
"change-status": Pg,
|
|
14766
|
+
"remove-from-shortlist": Ig,
|
|
14767
|
+
"add-to-groups": Rg,
|
|
14768
|
+
"self-assign": Bg,
|
|
14769
|
+
"others-assign": Hg,
|
|
14770
|
+
"sticky-notes": Wg
|
|
14752
14771
|
};
|
|
14753
14772
|
//#endregion
|
|
14754
14773
|
//#region src/components/popups/dynamic/DynamicPopupRoute.jsx
|
|
14755
|
-
function
|
|
14774
|
+
function qg({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
14756
14775
|
let n = {
|
|
14757
|
-
...
|
|
14776
|
+
...Kg,
|
|
14758
14777
|
...e
|
|
14759
14778
|
}, r = {
|
|
14760
|
-
...
|
|
14779
|
+
...Gg,
|
|
14761
14780
|
...t
|
|
14762
14781
|
}, { popupKey: a } = Ht(), o = Vt(), { state: s = {} } = Bt(), c = r[a];
|
|
14763
14782
|
return /* @__PURE__ */ q(ng, {
|
|
@@ -14767,8 +14786,10 @@ function Yg({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
|
14767
14786
|
selectedIds: s.selectedIds ?? [],
|
|
14768
14787
|
selectedRecords: s.selectedRecords ?? [],
|
|
14769
14788
|
moduleName: s.moduleName ?? "",
|
|
14789
|
+
navigate: o,
|
|
14770
14790
|
...s.popupContext ?? {}
|
|
14771
14791
|
}), [
|
|
14792
|
+
o,
|
|
14772
14793
|
s.selectedIds,
|
|
14773
14794
|
s.selectedRecords,
|
|
14774
14795
|
s.moduleName,
|
|
@@ -14780,7 +14801,7 @@ function Yg({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
|
14780
14801
|
}
|
|
14781
14802
|
//#endregion
|
|
14782
14803
|
//#region src/components/popups/definitions/vendor-share/config.js
|
|
14783
|
-
var
|
|
14804
|
+
var Jg = {
|
|
14784
14805
|
title: "Vendor Share",
|
|
14785
14806
|
maxVendorSelect: 1e3,
|
|
14786
14807
|
defaultTab: "myVendor",
|
|
@@ -14814,7 +14835,7 @@ var Xg = {
|
|
|
14814
14835
|
key: "updatedOn"
|
|
14815
14836
|
}
|
|
14816
14837
|
]
|
|
14817
|
-
},
|
|
14838
|
+
}, Yg = {
|
|
14818
14839
|
getVendorList: ({ jobId: e, limit: t, offset: n, type: r }) => nc({
|
|
14819
14840
|
jobId: e,
|
|
14820
14841
|
limit: t,
|
|
@@ -14831,7 +14852,7 @@ var Xg = {
|
|
|
14831
14852
|
subject: i,
|
|
14832
14853
|
contents: a
|
|
14833
14854
|
})
|
|
14834
|
-
},
|
|
14855
|
+
}, Xg = [
|
|
14835
14856
|
{
|
|
14836
14857
|
icon: /* @__PURE__ */ q(he, {}),
|
|
14837
14858
|
title: "Bold"
|
|
@@ -14872,7 +14893,7 @@ var Xg = {
|
|
|
14872
14893
|
icon: /* @__PURE__ */ q(ut, {}),
|
|
14873
14894
|
title: "Attachment"
|
|
14874
14895
|
}
|
|
14875
|
-
],
|
|
14896
|
+
], Zg = [
|
|
14876
14897
|
{
|
|
14877
14898
|
value: "normal",
|
|
14878
14899
|
label: "Normal"
|
|
@@ -14890,21 +14911,21 @@ var Xg = {
|
|
|
14890
14911
|
label: "Heading 3"
|
|
14891
14912
|
}
|
|
14892
14913
|
];
|
|
14893
|
-
function
|
|
14914
|
+
function Qg(e) {
|
|
14894
14915
|
return e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
14895
14916
|
}
|
|
14896
|
-
var
|
|
14917
|
+
var $g = Jg.vendorColumns.map((e) => ({
|
|
14897
14918
|
...e,
|
|
14898
14919
|
render: (e) => e || "-"
|
|
14899
14920
|
}));
|
|
14900
|
-
function
|
|
14901
|
-
let e = Vt(), { selectedIds: t = [], selectedRecords: n = [], recipients: s = [], subject: c = "", onSend: l } = Bt().state ?? {}, u = t[0] ?? n[0]?._id ?? n[0]?.id, [d, p] = o(s.join(", ")), [m, h] = o(""), [g, _] = o(""), [b, x] = o(!1), [S, C] = o(!1), [T, E] = o(c), D = a(null), [O, k] = o(
|
|
14921
|
+
function e_() {
|
|
14922
|
+
let e = Vt(), { selectedIds: t = [], selectedRecords: n = [], recipients: s = [], subject: c = "", onSend: l } = Bt().state ?? {}, u = t[0] ?? n[0]?._id ?? n[0]?.id, [d, p] = o(s.join(", ")), [m, h] = o(""), [g, _] = o(""), [b, x] = o(!1), [S, C] = o(!1), [T, E] = o(c), D = a(null), [O, k] = o(Jg.defaultTab), [A, j] = o(""), [M, ee] = o([]), [N, P] = o(0), [F, L] = o(0), [R, z] = o(0), [te, ne] = o(1), [B, ie] = o(Jg.defaultPageSize), [V, ae] = o(!1), [U, W] = o([]);
|
|
14902
14923
|
r(() => {
|
|
14903
14924
|
if (!u) return;
|
|
14904
14925
|
let e = !1;
|
|
14905
14926
|
ae(!0);
|
|
14906
14927
|
let t = A ? 100 : B, n = A ? 0 : (te - 1) * B;
|
|
14907
|
-
return
|
|
14928
|
+
return Yg.getVendorList({
|
|
14908
14929
|
jobId: u,
|
|
14909
14930
|
limit: t,
|
|
14910
14931
|
offset: n,
|
|
@@ -14927,7 +14948,7 @@ function n_() {
|
|
|
14927
14948
|
B,
|
|
14928
14949
|
A
|
|
14929
14950
|
]), r(() => {
|
|
14930
|
-
u &&
|
|
14951
|
+
u && Yg.getMailDetails(u).then((e) => {
|
|
14931
14952
|
e.subject && E(e.subject), e.contents && D.current && (D.current.innerHTML = e.contents);
|
|
14932
14953
|
}).catch(() => {});
|
|
14933
14954
|
}, [u]), r(() => {
|
|
@@ -14941,11 +14962,11 @@ function n_() {
|
|
|
14941
14962
|
function le() {
|
|
14942
14963
|
if (!oe) return;
|
|
14943
14964
|
let n = D.current?.innerHTML ?? "";
|
|
14944
|
-
|
|
14965
|
+
Yg.submit({
|
|
14945
14966
|
jobId: u,
|
|
14946
|
-
toMail:
|
|
14947
|
-
ccMail:
|
|
14948
|
-
bccMail:
|
|
14967
|
+
toMail: Qg(d),
|
|
14968
|
+
ccMail: Qg(m),
|
|
14969
|
+
bccMail: Qg(g),
|
|
14949
14970
|
subject: T,
|
|
14950
14971
|
contents: n
|
|
14951
14972
|
}).then((r) => {
|
|
@@ -15025,7 +15046,7 @@ function n_() {
|
|
|
15025
15046
|
]
|
|
15026
15047
|
}), /* @__PURE__ */ q("div", {
|
|
15027
15048
|
className: "vendor-share__vendor-tabs",
|
|
15028
|
-
children:
|
|
15049
|
+
children: Jg.vendorTabs.map((e) => /* @__PURE__ */ J("span", {
|
|
15029
15050
|
className: `vendor-share__vendor-tab${O === e.key ? " vendor-share__vendor-tab--active" : ""}`,
|
|
15030
15051
|
onClick: () => {
|
|
15031
15052
|
k(e.key), ne(1), W([]);
|
|
@@ -15043,7 +15064,7 @@ function n_() {
|
|
|
15043
15064
|
className: "vendor-share__vendor-table-wrapper",
|
|
15044
15065
|
children: /* @__PURE__ */ q(re, {
|
|
15045
15066
|
rowKey: (e) => e.vendorId,
|
|
15046
|
-
columns:
|
|
15067
|
+
columns: $g,
|
|
15047
15068
|
dataSource: ue,
|
|
15048
15069
|
loading: V,
|
|
15049
15070
|
pagination: !1,
|
|
@@ -15051,7 +15072,7 @@ function n_() {
|
|
|
15051
15072
|
rowSelection: {
|
|
15052
15073
|
selectedRowKeys: U,
|
|
15053
15074
|
onChange: (e) => {
|
|
15054
|
-
e.length >
|
|
15075
|
+
e.length > Jg.maxVendorSelect || W(e);
|
|
15055
15076
|
}
|
|
15056
15077
|
},
|
|
15057
15078
|
scroll: { y: "calc(100vh - 340px)" }
|
|
@@ -15152,7 +15173,7 @@ function n_() {
|
|
|
15152
15173
|
children: [
|
|
15153
15174
|
U.length,
|
|
15154
15175
|
" / ",
|
|
15155
|
-
|
|
15176
|
+
Jg.maxVendorSelect,
|
|
15156
15177
|
" Vendors selected"
|
|
15157
15178
|
]
|
|
15158
15179
|
}),
|
|
@@ -15193,9 +15214,9 @@ function n_() {
|
|
|
15193
15214
|
defaultValue: "normal",
|
|
15194
15215
|
variant: "borderless",
|
|
15195
15216
|
className: "mail-popup__toolbar-style-select",
|
|
15196
|
-
options:
|
|
15217
|
+
options: Zg,
|
|
15197
15218
|
popupMatchSelectWidth: !1
|
|
15198
|
-
}),
|
|
15219
|
+
}), Xg.map(({ icon: e, title: t }) => /* @__PURE__ */ q(H, {
|
|
15199
15220
|
title: t,
|
|
15200
15221
|
mouseEnterDelay: .5,
|
|
15201
15222
|
children: /* @__PURE__ */ q(f, {
|
|
@@ -15221,7 +15242,7 @@ function n_() {
|
|
|
15221
15242
|
}
|
|
15222
15243
|
//#endregion
|
|
15223
15244
|
//#region src/components/form/validation.js
|
|
15224
|
-
var
|
|
15245
|
+
var t_ = {
|
|
15225
15246
|
EMAIL: /^[a-zA-Z0-9._%+-]+@[a-zA-Z][a-zA-Z-]*\.[a-zA-Z]{2,}$/,
|
|
15226
15247
|
PHONE: /^[0-9]{10}$/,
|
|
15227
15248
|
PASSWORD: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,
|
|
@@ -15238,7 +15259,7 @@ var r_ = {
|
|
|
15238
15259
|
FULL_NAME: /^[A-Z][a-zA-Z]*(?: [A-Z][a-zA-Z]*)*$/,
|
|
15239
15260
|
NO_SPACES: /^\S+$/,
|
|
15240
15261
|
STARTS_WITH_CAPITAL: /^[A-Z].*$/
|
|
15241
|
-
},
|
|
15262
|
+
}, n_ = {
|
|
15242
15263
|
SINGLE_FILE_COUNT: 1,
|
|
15243
15264
|
MULTI_FILE_COUNT: 5,
|
|
15244
15265
|
MAX_FILE_SIZE: 2,
|
|
@@ -15247,7 +15268,7 @@ var r_ = {
|
|
|
15247
15268
|
"image/png",
|
|
15248
15269
|
"application/pdf"
|
|
15249
15270
|
]
|
|
15250
|
-
},
|
|
15271
|
+
}, r_ = {
|
|
15251
15272
|
REQUIRED: (e) => "Mandatory Field",
|
|
15252
15273
|
INVALID_EMAIL: "Please enter a valid email address.",
|
|
15253
15274
|
INVALID_PHONE: "Phone number must contain exactly 10 digits.",
|
|
@@ -15267,16 +15288,16 @@ var r_ = {
|
|
|
15267
15288
|
NO_SPACES_ALLOWED: "Spaces are not allowed.",
|
|
15268
15289
|
MUST_START_WITH_CAPITAL: "First letter must be capital.",
|
|
15269
15290
|
INVALID_FILE_TYPE: "Only JPG, PNG and PDF files are allowed.",
|
|
15270
|
-
INVALID_FILE_SIZE: `File upload must be ${
|
|
15291
|
+
INVALID_FILE_SIZE: `File upload must be ${n_.MAX_FILE_SIZE} MB below.`,
|
|
15271
15292
|
INVALID_FILE_TYPE: "Only JPG, PNG and PDF files are allowed.",
|
|
15272
15293
|
SINGLE_FILE_ONLY: "Only one file can be uploaded."
|
|
15273
|
-
},
|
|
15294
|
+
}, i_ = {
|
|
15274
15295
|
FIRST_NAME_MIN: 3,
|
|
15275
15296
|
FIRST_NAME_MAX: 30
|
|
15276
|
-
},
|
|
15297
|
+
}, a_ = {
|
|
15277
15298
|
REMARKS_MIN: 10,
|
|
15278
15299
|
REMARKS_MAX: 250
|
|
15279
|
-
},
|
|
15300
|
+
}, o_ = {
|
|
15280
15301
|
removeSpaces: (e = "") => e.replace(/\s/g, ""),
|
|
15281
15302
|
capitalizeFirstLetter: (e = "") => e.charAt(0).toUpperCase() + e.slice(1),
|
|
15282
15303
|
capitalizeWords: (e = "") => e.replace(/\b\w/g, (e) => e.toUpperCase()),
|
|
@@ -15288,132 +15309,132 @@ var r_ = {
|
|
|
15288
15309
|
let t = e.replace(/\D/g, "");
|
|
15289
15310
|
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)}`;
|
|
15290
15311
|
}
|
|
15291
|
-
},
|
|
15312
|
+
}, s_ = {
|
|
15292
15313
|
required: (e = "Field") => ({
|
|
15293
15314
|
required: !0,
|
|
15294
|
-
message:
|
|
15315
|
+
message: r_.REQUIRED(e)
|
|
15295
15316
|
}),
|
|
15296
15317
|
email: () => ({
|
|
15297
|
-
pattern:
|
|
15298
|
-
message:
|
|
15318
|
+
pattern: t_.EMAIL,
|
|
15319
|
+
message: r_.INVALID_EMAIL
|
|
15299
15320
|
}),
|
|
15300
15321
|
phone: () => ({
|
|
15301
|
-
pattern:
|
|
15302
|
-
message:
|
|
15322
|
+
pattern: t_.PHONE,
|
|
15323
|
+
message: r_.INVALID_PHONE
|
|
15303
15324
|
}),
|
|
15304
15325
|
password: () => ({
|
|
15305
|
-
pattern:
|
|
15306
|
-
message:
|
|
15326
|
+
pattern: t_.PASSWORD,
|
|
15327
|
+
message: r_.INVALID_PASSWORD
|
|
15307
15328
|
}),
|
|
15308
15329
|
alphabets: () => ({
|
|
15309
|
-
pattern:
|
|
15310
|
-
message:
|
|
15330
|
+
pattern: t_.ALPHABETS,
|
|
15331
|
+
message: r_.INVALID_ALPHABETS
|
|
15311
15332
|
}),
|
|
15312
15333
|
alphanumeric: () => ({
|
|
15313
|
-
pattern:
|
|
15314
|
-
message:
|
|
15334
|
+
pattern: t_.ALPHANUMERIC,
|
|
15335
|
+
message: r_.INVALID_ALPHANUMERIC
|
|
15315
15336
|
}),
|
|
15316
15337
|
number: () => ({
|
|
15317
|
-
pattern:
|
|
15318
|
-
message:
|
|
15338
|
+
pattern: t_.NUMBER,
|
|
15339
|
+
message: r_.INVALID_NUMBER
|
|
15319
15340
|
}),
|
|
15320
15341
|
url: () => ({
|
|
15321
|
-
pattern:
|
|
15322
|
-
message:
|
|
15342
|
+
pattern: t_.URL,
|
|
15343
|
+
message: r_.INVALID_URL
|
|
15323
15344
|
}),
|
|
15324
15345
|
candidateId: (e = "ID") => ({
|
|
15325
|
-
pattern:
|
|
15326
|
-
message:
|
|
15346
|
+
pattern: t_.CANDIDATE_ID,
|
|
15347
|
+
message: r_.INVALID_CANDIDATE_ID(e)
|
|
15327
15348
|
}),
|
|
15328
15349
|
remarks: () => ({
|
|
15329
|
-
pattern:
|
|
15330
|
-
message:
|
|
15331
|
-
REMARKS_MIN: `Remarks must be at least ${
|
|
15332
|
-
REMARKS_MAX: `Remarks must not exceed ${
|
|
15350
|
+
pattern: t_.REMARKS,
|
|
15351
|
+
message: r_.INVALID_REMARKS,
|
|
15352
|
+
REMARKS_MIN: `Remarks must be at least ${a_.REMARKS_MIN} characters.`,
|
|
15353
|
+
REMARKS_MAX: `Remarks must not exceed ${a_.REMARKS_MAX} characters.`
|
|
15333
15354
|
}),
|
|
15334
15355
|
designation: () => ({
|
|
15335
|
-
pattern:
|
|
15336
|
-
message:
|
|
15356
|
+
pattern: t_.DESIGNATION,
|
|
15357
|
+
message: r_.INVALID_DESIGNATION
|
|
15337
15358
|
}),
|
|
15338
15359
|
dob: (e = !0) => ({ validator: (t, n) => {
|
|
15339
15360
|
if (!n) return e ? Promise.reject(/* @__PURE__ */ Error("Date of Birth is required.")) : Promise.resolve();
|
|
15340
|
-
if (!
|
|
15361
|
+
if (!t_.DOB.test(n)) return Promise.reject(Error(r_.INVALID_DOB));
|
|
15341
15362
|
let r = Wt(n, "MM/DD/YYYY", !0);
|
|
15342
|
-
if (!r.isValid()) return Promise.reject(Error(
|
|
15363
|
+
if (!r.isValid()) return Promise.reject(Error(r_.INVALID_DOB));
|
|
15343
15364
|
let i = Wt().endOf("day");
|
|
15344
15365
|
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();
|
|
15345
15366
|
} }),
|
|
15346
15367
|
linkedin: () => ({
|
|
15347
|
-
pattern:
|
|
15348
|
-
message:
|
|
15368
|
+
pattern: t_.LINKEDIN,
|
|
15369
|
+
message: r_.INVALID_LINKEDIN
|
|
15349
15370
|
}),
|
|
15350
15371
|
companyName: () => ({
|
|
15351
|
-
pattern:
|
|
15352
|
-
message:
|
|
15372
|
+
pattern: t_.COMPANY_NAME,
|
|
15373
|
+
message: r_.INVALID_COMPANY_NAME
|
|
15353
15374
|
}),
|
|
15354
15375
|
firstName: () => ({
|
|
15355
|
-
pattern:
|
|
15356
|
-
message:
|
|
15357
|
-
FIRST_NAME_MIN: `First Name must be at least ${
|
|
15358
|
-
FIRST_NAME_MAX: `First Name must not exceed ${
|
|
15376
|
+
pattern: t_.FIRST_NAME,
|
|
15377
|
+
message: r_.INVALID_FIRST_NAME,
|
|
15378
|
+
FIRST_NAME_MIN: `First Name must be at least ${i_.FIRST_NAME_MIN} characters.`,
|
|
15379
|
+
FIRST_NAME_MAX: `First Name must not exceed ${i_.FIRST_NAME_MAX} characters.`
|
|
15359
15380
|
}),
|
|
15360
15381
|
firstNameMinLength: () => ({
|
|
15361
|
-
min:
|
|
15362
|
-
message:
|
|
15382
|
+
min: i_.FIRST_NAME_MIN,
|
|
15383
|
+
message: r_.FIRST_NAME_MIN
|
|
15363
15384
|
}),
|
|
15364
15385
|
firstNameMaxLength: () => ({
|
|
15365
|
-
max:
|
|
15366
|
-
message:
|
|
15386
|
+
max: i_.FIRST_NAME_MAX,
|
|
15387
|
+
message: r_.FIRST_NAME_MAX
|
|
15367
15388
|
}),
|
|
15368
15389
|
remarksMinLength: () => ({
|
|
15369
|
-
min:
|
|
15370
|
-
message:
|
|
15390
|
+
min: a_.REMARKS_MIN,
|
|
15391
|
+
message: r_.REMARKS_MIN
|
|
15371
15392
|
}),
|
|
15372
15393
|
remarksMaxLength: () => ({
|
|
15373
|
-
max:
|
|
15374
|
-
message:
|
|
15394
|
+
max: a_.REMARKS_MAX,
|
|
15395
|
+
message: r_.REMARKS_MAX
|
|
15375
15396
|
}),
|
|
15376
15397
|
fullName: () => ({
|
|
15377
|
-
pattern:
|
|
15378
|
-
message:
|
|
15398
|
+
pattern: t_.FULL_NAME,
|
|
15399
|
+
message: r_.INVALID_FULL_NAME
|
|
15379
15400
|
}),
|
|
15380
15401
|
noSpaces: () => ({
|
|
15381
|
-
pattern:
|
|
15382
|
-
message:
|
|
15402
|
+
pattern: t_.NO_SPACES,
|
|
15403
|
+
message: r_.NO_SPACES_ALLOWED
|
|
15383
15404
|
}),
|
|
15384
15405
|
startsWithCapital: () => ({
|
|
15385
|
-
pattern:
|
|
15386
|
-
message:
|
|
15406
|
+
pattern: t_.STARTS_WITH_CAPITAL,
|
|
15407
|
+
message: r_.MUST_START_WITH_CAPITAL
|
|
15387
15408
|
}),
|
|
15388
15409
|
fileUpload: () => ({ validator: (e, t) => {
|
|
15389
15410
|
if (!t || t.length === 0) return Promise.resolve();
|
|
15390
15411
|
for (let e of t) {
|
|
15391
15412
|
let t = e.originFileObj || e;
|
|
15392
|
-
if (!(t.size / 1024 / 1024 <=
|
|
15393
|
-
if (!
|
|
15413
|
+
if (!(t.size / 1024 / 1024 <= n_.MAX_FILE_SIZE)) return G.error(r_.INVALID_FILE_SIZE), Promise.reject(Error(r_.INVALID_FILE_SIZE));
|
|
15414
|
+
if (!n_.ALLOWED_FILE_TYPES.includes(t.type)) return Promise.reject(Error(r_.INVALID_FILE_TYPE));
|
|
15394
15415
|
}
|
|
15395
15416
|
return Promise.resolve();
|
|
15396
15417
|
} }),
|
|
15397
15418
|
singleFileUpload: () => ({ validator: (e, t) => {
|
|
15398
15419
|
if (!t || t.length === 0) return Promise.resolve();
|
|
15399
|
-
if (t.length >
|
|
15420
|
+
if (t.length > n_.SINGLE_FILE_COUNT) return Promise.reject(Error(r_.SINGLE_FILE_ONLY));
|
|
15400
15421
|
let n = t[0];
|
|
15401
|
-
return n.size / 1024 / 1024 <
|
|
15422
|
+
return n.size / 1024 / 1024 < n_.MAX_FILE_SIZE ? n_.ALLOWED_FILE_TYPES.includes(n.type) ? Promise.resolve() : Promise.reject(Error(r_.INVALID_FILE_TYPE)) : Promise.reject(Error(r_.INVALID_FILE_SIZE));
|
|
15402
15423
|
} }),
|
|
15403
15424
|
multiFileUpload: () => ({ validator: (e, t) => {
|
|
15404
15425
|
if (!t || t.length === 0) return Promise.resolve();
|
|
15405
|
-
if (t.length >
|
|
15426
|
+
if (t.length > n_.MULTI_FILE_COUNT) return Promise.reject(Error(r_.INVALID_FILE_COUNT));
|
|
15406
15427
|
for (let e of t) {
|
|
15407
|
-
if (!(e.size / 1024 / 1024 <
|
|
15408
|
-
if (!
|
|
15428
|
+
if (!(e.size / 1024 / 1024 < n_.MAX_FILE_SIZE)) return Promise.reject(Error(r_.INVALID_FILE_SIZE));
|
|
15429
|
+
if (!n_.ALLOWED_FILE_TYPES.includes(e.type)) return Promise.reject(Error(r_.INVALID_FILE_TYPE));
|
|
15409
15430
|
}
|
|
15410
15431
|
return Promise.resolve();
|
|
15411
15432
|
} })
|
|
15412
|
-
},
|
|
15433
|
+
}, c_ = { beforeUpload: (e) => [
|
|
15413
15434
|
"image/jpeg",
|
|
15414
15435
|
"image/png",
|
|
15415
15436
|
"application/pdf"
|
|
15416
|
-
].includes(e.type) ? e.size / 1024 / 1024 <= 2 ? !1 : (G.error("File upload must be 2 MB below."), W.LIST_IGNORE) : (G.error("Only JPG, PNG and PDF files are allowed."), W.LIST_IGNORE) },
|
|
15437
|
+
].includes(e.type) ? e.size / 1024 / 1024 <= 2 ? !1 : (G.error("File upload must be 2 MB below."), W.LIST_IGNORE) : (G.error("Only JPG, PNG and PDF files are allowed."), W.LIST_IGNORE) }, l_ = () => {
|
|
15417
15438
|
let [e] = C.useForm();
|
|
15418
15439
|
return /* @__PURE__ */ q("div", {
|
|
15419
15440
|
style: { padding: 24 },
|
|
@@ -15433,7 +15454,7 @@ var r_ = {
|
|
|
15433
15454
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15434
15455
|
label: "Email",
|
|
15435
15456
|
name: "email",
|
|
15436
|
-
rules: [
|
|
15457
|
+
rules: [s_.required("Email"), s_.email()],
|
|
15437
15458
|
children: /* @__PURE__ */ q(w, {})
|
|
15438
15459
|
})
|
|
15439
15460
|
}),
|
|
@@ -15442,12 +15463,12 @@ var r_ = {
|
|
|
15442
15463
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15443
15464
|
label: "Phone Number",
|
|
15444
15465
|
name: "phone",
|
|
15445
|
-
rules: [
|
|
15466
|
+
rules: [s_.required("Phone Number"), s_.phone()],
|
|
15446
15467
|
validateTrigger: ["onBlur", "onChange"],
|
|
15447
15468
|
children: /* @__PURE__ */ q(w, {
|
|
15448
15469
|
maxLength: 10,
|
|
15449
15470
|
onChange: (t) => {
|
|
15450
|
-
e.setFieldsValue({ phone:
|
|
15471
|
+
e.setFieldsValue({ phone: o_.phoneFormatter(t.target.value) });
|
|
15451
15472
|
}
|
|
15452
15473
|
})
|
|
15453
15474
|
})
|
|
@@ -15457,7 +15478,7 @@ var r_ = {
|
|
|
15457
15478
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15458
15479
|
label: "Password",
|
|
15459
15480
|
name: "password",
|
|
15460
|
-
rules: [
|
|
15481
|
+
rules: [s_.required("Password"), s_.password()],
|
|
15461
15482
|
children: /* @__PURE__ */ q(w.Password, {})
|
|
15462
15483
|
})
|
|
15463
15484
|
}),
|
|
@@ -15467,13 +15488,13 @@ var r_ = {
|
|
|
15467
15488
|
label: "Full Name",
|
|
15468
15489
|
name: "fullName",
|
|
15469
15490
|
rules: [
|
|
15470
|
-
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15491
|
+
s_.required("Full Name"),
|
|
15492
|
+
s_.alphabets(),
|
|
15493
|
+
s_.firstNameMinLength(),
|
|
15494
|
+
s_.firstNameMaxLength()
|
|
15474
15495
|
],
|
|
15475
15496
|
children: /* @__PURE__ */ q(w, { onChange: (t) => {
|
|
15476
|
-
e.setFieldsValue({ fullName:
|
|
15497
|
+
e.setFieldsValue({ fullName: o_.firstNameFormatter(t.target.value) });
|
|
15477
15498
|
} })
|
|
15478
15499
|
})
|
|
15479
15500
|
}),
|
|
@@ -15482,9 +15503,9 @@ var r_ = {
|
|
|
15482
15503
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15483
15504
|
label: "Username",
|
|
15484
15505
|
name: "username",
|
|
15485
|
-
rules: [
|
|
15506
|
+
rules: [s_.required("Username"), s_.alphanumeric()],
|
|
15486
15507
|
children: /* @__PURE__ */ q(w, { onChange: (t) => {
|
|
15487
|
-
e.setFieldsValue({ username:
|
|
15508
|
+
e.setFieldsValue({ username: o_.removeExtraSpaces(t.target.value) });
|
|
15488
15509
|
} })
|
|
15489
15510
|
})
|
|
15490
15511
|
}),
|
|
@@ -15493,9 +15514,9 @@ var r_ = {
|
|
|
15493
15514
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15494
15515
|
label: "Website URL",
|
|
15495
15516
|
name: "website",
|
|
15496
|
-
rules: [
|
|
15517
|
+
rules: [s_.required("Website URL"), s_.url()],
|
|
15497
15518
|
children: /* @__PURE__ */ q(w, { onChange: (t) => {
|
|
15498
|
-
e.setFieldsValue({ website:
|
|
15519
|
+
e.setFieldsValue({ website: o_.removeExtraSpaces(t.target.value) });
|
|
15499
15520
|
} })
|
|
15500
15521
|
})
|
|
15501
15522
|
}),
|
|
@@ -15504,9 +15525,9 @@ var r_ = {
|
|
|
15504
15525
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15505
15526
|
label: "MSP Req ID",
|
|
15506
15527
|
name: "mspreqID",
|
|
15507
|
-
rules: [
|
|
15528
|
+
rules: [s_.required("MSP Req ID"), s_.candidateId("MSP Req ID")],
|
|
15508
15529
|
children: /* @__PURE__ */ q(w, { onChange: (t) => {
|
|
15509
|
-
e.setFieldsValue({ mspreqID:
|
|
15530
|
+
e.setFieldsValue({ mspreqID: o_.removeExtraSpaces(t.target.value) });
|
|
15510
15531
|
} })
|
|
15511
15532
|
})
|
|
15512
15533
|
}),
|
|
@@ -15515,9 +15536,9 @@ var r_ = {
|
|
|
15515
15536
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15516
15537
|
label: "Candidate ID",
|
|
15517
15538
|
name: "candidateId",
|
|
15518
|
-
rules: [
|
|
15539
|
+
rules: [s_.required("Candidate ID"), s_.candidateId("Candidate ID")],
|
|
15519
15540
|
children: /* @__PURE__ */ q(w, { onChange: (t) => {
|
|
15520
|
-
e.setFieldsValue({ candidateId:
|
|
15541
|
+
e.setFieldsValue({ candidateId: o_.removeExtraSpaces(t.target.value) });
|
|
15521
15542
|
} })
|
|
15522
15543
|
})
|
|
15523
15544
|
}),
|
|
@@ -15527,10 +15548,10 @@ var r_ = {
|
|
|
15527
15548
|
label: "Remarks",
|
|
15528
15549
|
name: "remarks",
|
|
15529
15550
|
rules: [
|
|
15530
|
-
|
|
15531
|
-
|
|
15532
|
-
|
|
15533
|
-
|
|
15551
|
+
s_.required("Remarks"),
|
|
15552
|
+
s_.remarks(),
|
|
15553
|
+
s_.remarksMinLength(),
|
|
15554
|
+
s_.remarksMaxLength()
|
|
15534
15555
|
],
|
|
15535
15556
|
children: /* @__PURE__ */ q(w.TextArea, { rows: 4 })
|
|
15536
15557
|
})
|
|
@@ -15540,7 +15561,7 @@ var r_ = {
|
|
|
15540
15561
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15541
15562
|
label: "Designation",
|
|
15542
15563
|
name: "designation",
|
|
15543
|
-
rules: [
|
|
15564
|
+
rules: [s_.required("Designation"), s_.designation()],
|
|
15544
15565
|
children: /* @__PURE__ */ q(w, {})
|
|
15545
15566
|
})
|
|
15546
15567
|
}),
|
|
@@ -15549,12 +15570,12 @@ var r_ = {
|
|
|
15549
15570
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15550
15571
|
label: "Date of Birth",
|
|
15551
15572
|
name: "dob",
|
|
15552
|
-
rules: [
|
|
15573
|
+
rules: [s_.dob()],
|
|
15553
15574
|
children: /* @__PURE__ */ q(w, {
|
|
15554
15575
|
placeholder: "MM/DD/YYYY",
|
|
15555
15576
|
maxLength: 10,
|
|
15556
15577
|
onChange: (t) => {
|
|
15557
|
-
e.setFieldsValue({ dob:
|
|
15578
|
+
e.setFieldsValue({ dob: o_.dobFormatter(t.target.value) });
|
|
15558
15579
|
}
|
|
15559
15580
|
})
|
|
15560
15581
|
})
|
|
@@ -15564,7 +15585,7 @@ var r_ = {
|
|
|
15564
15585
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15565
15586
|
label: "Company Name",
|
|
15566
15587
|
name: "companyName",
|
|
15567
|
-
rules: [
|
|
15588
|
+
rules: [s_.required("Company Name"), s_.companyName()],
|
|
15568
15589
|
children: /* @__PURE__ */ q(w, {})
|
|
15569
15590
|
})
|
|
15570
15591
|
}),
|
|
@@ -15653,7 +15674,7 @@ var r_ = {
|
|
|
15653
15674
|
label: "Resume new",
|
|
15654
15675
|
name: "resume",
|
|
15655
15676
|
children: /* @__PURE__ */ q(W, {
|
|
15656
|
-
beforeUpload:
|
|
15677
|
+
beforeUpload: c_.beforeUpload,
|
|
15657
15678
|
maxCount: 1,
|
|
15658
15679
|
children: /* @__PURE__ */ q(f, { children: "Upload Resume" })
|
|
15659
15680
|
})
|
|
@@ -15666,10 +15687,10 @@ var r_ = {
|
|
|
15666
15687
|
name: "documents",
|
|
15667
15688
|
valuePropName: "fileList",
|
|
15668
15689
|
getValueFromEvent: (e) => e?.fileList,
|
|
15669
|
-
rules: [
|
|
15690
|
+
rules: [s_.multiFileUpload()],
|
|
15670
15691
|
children: /* @__PURE__ */ q(W, {
|
|
15671
15692
|
multiple: !0,
|
|
15672
|
-
beforeUpload:
|
|
15693
|
+
beforeUpload: c_.beforeUpload,
|
|
15673
15694
|
children: /* @__PURE__ */ q(f, { children: "Upload Documents" })
|
|
15674
15695
|
})
|
|
15675
15696
|
})
|
|
@@ -15681,9 +15702,9 @@ var r_ = {
|
|
|
15681
15702
|
name: "file",
|
|
15682
15703
|
valuePropName: "fileList",
|
|
15683
15704
|
getValueFromEvent: (e) => e?.fileList,
|
|
15684
|
-
rules: [
|
|
15705
|
+
rules: [s_.fileUpload()],
|
|
15685
15706
|
children: /* @__PURE__ */ q(W, {
|
|
15686
|
-
beforeUpload:
|
|
15707
|
+
beforeUpload: c_.beforeUpload,
|
|
15687
15708
|
maxCount: 1,
|
|
15688
15709
|
children: /* @__PURE__ */ q(f, { children: "Upload" })
|
|
15689
15710
|
})
|
|
@@ -15740,7 +15761,7 @@ var r_ = {
|
|
|
15740
15761
|
]
|
|
15741
15762
|
})
|
|
15742
15763
|
});
|
|
15743
|
-
}, { Text:
|
|
15764
|
+
}, { Text: u_ } = U, d_ = [
|
|
15744
15765
|
{
|
|
15745
15766
|
label: "Total Jobs",
|
|
15746
15767
|
value: 1697,
|
|
@@ -15756,13 +15777,13 @@ var r_ = {
|
|
|
15756
15777
|
value: 600,
|
|
15757
15778
|
icon: "user"
|
|
15758
15779
|
}
|
|
15759
|
-
],
|
|
15780
|
+
], f_ = {
|
|
15760
15781
|
fileText: /* @__PURE__ */ q(Be, {}),
|
|
15761
15782
|
checkCircle: /* @__PURE__ */ q(ye, {}),
|
|
15762
15783
|
user: /* @__PURE__ */ q(Ft, {}),
|
|
15763
15784
|
filter: /* @__PURE__ */ q(Ue, {})
|
|
15764
15785
|
};
|
|
15765
|
-
function
|
|
15786
|
+
function p_({ stats: e = d_ }) {
|
|
15766
15787
|
return /* @__PURE__ */ q(p, { children: /* @__PURE__ */ q(F, {
|
|
15767
15788
|
gutter: [12, 12],
|
|
15768
15789
|
children: e.map((e) => /* @__PURE__ */ q(h, {
|
|
@@ -15775,7 +15796,7 @@ function h_({ stats: e = p_ }) {
|
|
|
15775
15796
|
className: "stats-inner-card",
|
|
15776
15797
|
children: [/* @__PURE__ */ J(R, {
|
|
15777
15798
|
align: "center",
|
|
15778
|
-
children: [
|
|
15799
|
+
children: [f_[e.icon] ?? f_.fileText, /* @__PURE__ */ q(u_, { children: e.label })]
|
|
15779
15800
|
}), /* @__PURE__ */ q(te, { value: e.value })]
|
|
15780
15801
|
})
|
|
15781
15802
|
}, e.label))
|
|
@@ -15783,14 +15804,14 @@ function h_({ stats: e = p_ }) {
|
|
|
15783
15804
|
}
|
|
15784
15805
|
//#endregion
|
|
15785
15806
|
//#region src/pages/Modules/Admin/FormGroupsSection.jsx
|
|
15786
|
-
var { Text:
|
|
15807
|
+
var { Text: m_ } = U, h_ = [
|
|
15787
15808
|
"#0053a5",
|
|
15788
15809
|
"#52c41a",
|
|
15789
15810
|
"#722ed1",
|
|
15790
15811
|
"#fa8c16",
|
|
15791
15812
|
"#eb2f96",
|
|
15792
15813
|
"#13c2c2"
|
|
15793
|
-
],
|
|
15814
|
+
], g_ = [
|
|
15794
15815
|
{
|
|
15795
15816
|
label: "Text",
|
|
15796
15817
|
value: "text"
|
|
@@ -15835,7 +15856,7 @@ var { Text: g_ } = U, __ = [
|
|
|
15835
15856
|
label: "File",
|
|
15836
15857
|
value: "file"
|
|
15837
15858
|
}
|
|
15838
|
-
],
|
|
15859
|
+
], __ = [
|
|
15839
15860
|
{
|
|
15840
15861
|
label: "Static (define options here)",
|
|
15841
15862
|
value: "static"
|
|
@@ -15856,7 +15877,7 @@ var { Text: g_ } = U, __ = [
|
|
|
15856
15877
|
label: "Group value",
|
|
15857
15878
|
value: "group"
|
|
15858
15879
|
}
|
|
15859
|
-
],
|
|
15880
|
+
], v_ = [
|
|
15860
15881
|
{
|
|
15861
15882
|
label: "Required",
|
|
15862
15883
|
value: "required",
|
|
@@ -15951,7 +15972,7 @@ var { Text: g_ } = U, __ = [
|
|
|
15951
15972
|
placeholder: "e.g. 18",
|
|
15952
15973
|
messageOptional: !0
|
|
15953
15974
|
}
|
|
15954
|
-
],
|
|
15975
|
+
], y_ = [
|
|
15955
15976
|
{
|
|
15956
15977
|
label: "Equals (=)",
|
|
15957
15978
|
value: "eq"
|
|
@@ -15968,7 +15989,7 @@ var { Text: g_ } = U, __ = [
|
|
|
15968
15989
|
label: "Is empty",
|
|
15969
15990
|
value: "falsy"
|
|
15970
15991
|
}
|
|
15971
|
-
],
|
|
15992
|
+
], b_ = [
|
|
15972
15993
|
{
|
|
15973
15994
|
label: "Auto (infer from field)",
|
|
15974
15995
|
value: "auto"
|
|
@@ -15997,7 +16018,7 @@ var { Text: g_ } = U, __ = [
|
|
|
15997
16018
|
label: "Date (ISO)",
|
|
15998
16019
|
value: "date"
|
|
15999
16020
|
}
|
|
16000
|
-
],
|
|
16021
|
+
], x_ = [
|
|
16001
16022
|
{
|
|
16002
16023
|
label: "(none)",
|
|
16003
16024
|
value: ""
|
|
@@ -16014,7 +16035,7 @@ var { Text: g_ } = U, __ = [
|
|
|
16014
16035
|
label: "Boolean",
|
|
16015
16036
|
value: "boolean"
|
|
16016
16037
|
}
|
|
16017
|
-
],
|
|
16038
|
+
], S_ = [
|
|
16018
16039
|
{
|
|
16019
16040
|
label: "Auto (value as-is)",
|
|
16020
16041
|
value: "auto"
|
|
@@ -16039,7 +16060,7 @@ var { Text: g_ } = U, __ = [
|
|
|
16039
16060
|
label: "Skip (never send)",
|
|
16040
16061
|
value: "skip"
|
|
16041
16062
|
}
|
|
16042
|
-
],
|
|
16063
|
+
], C_ = {
|
|
16043
16064
|
required: "red",
|
|
16044
16065
|
min: "orange",
|
|
16045
16066
|
max: "gold",
|
|
@@ -16055,10 +16076,10 @@ var { Text: g_ } = U, __ = [
|
|
|
16055
16076
|
noFutureDate: "magenta",
|
|
16056
16077
|
minAge: "green"
|
|
16057
16078
|
};
|
|
16058
|
-
function
|
|
16059
|
-
return
|
|
16079
|
+
function w_(e) {
|
|
16080
|
+
return v_.find((t) => t.value === e) ?? { hasValue: !1 };
|
|
16060
16081
|
}
|
|
16061
|
-
function
|
|
16082
|
+
function T_(e) {
|
|
16062
16083
|
return [{
|
|
16063
16084
|
key: "all",
|
|
16064
16085
|
label: "All",
|
|
@@ -16066,17 +16087,17 @@ function D_(e) {
|
|
|
16066
16087
|
}, ...e.map((e, t) => ({
|
|
16067
16088
|
key: e.key,
|
|
16068
16089
|
label: e.label,
|
|
16069
|
-
color:
|
|
16090
|
+
color: h_[t % h_.length]
|
|
16070
16091
|
}))];
|
|
16071
16092
|
}
|
|
16072
|
-
function
|
|
16093
|
+
function E_(e) {
|
|
16073
16094
|
return Object.fromEntries(e.map(({ key: e }) => [e, {
|
|
16074
16095
|
groups: [],
|
|
16075
16096
|
loading: !1,
|
|
16076
16097
|
error: ""
|
|
16077
16098
|
}]));
|
|
16078
16099
|
}
|
|
16079
|
-
function
|
|
16100
|
+
function D_(e) {
|
|
16080
16101
|
if (e == null) return;
|
|
16081
16102
|
if (typeof e == "object") return e;
|
|
16082
16103
|
let t = String(e).trim();
|
|
@@ -16087,7 +16108,7 @@ function k_(e) {
|
|
|
16087
16108
|
return;
|
|
16088
16109
|
}
|
|
16089
16110
|
}
|
|
16090
|
-
function
|
|
16111
|
+
function O_(e) {
|
|
16091
16112
|
if (e == null) return "";
|
|
16092
16113
|
if (typeof e == "string") return e;
|
|
16093
16114
|
try {
|
|
@@ -16096,17 +16117,17 @@ function A_(e) {
|
|
|
16096
16117
|
return "";
|
|
16097
16118
|
}
|
|
16098
16119
|
}
|
|
16099
|
-
function
|
|
16120
|
+
function k_(e, t) {
|
|
16100
16121
|
t.payloadKey && (e.payloadKey = t.payloadKey), t.prefillFrom && (e.prefillFrom = t.prefillFrom), t.dataType && t.dataType !== "auto" && (e.dataType = t.dataType), t.elementType && (e.elementType = t.elementType), t.payloadMode && t.payloadMode !== "auto" && (e.payloadMode = t.payloadMode), t.valueKey && (e.valueKey = t.valueKey), t.displayKey && (e.displayKey = t.displayKey), t.defaultValue !== void 0 && t.defaultValue !== "" && (e.defaultValue = t.defaultValue), t.richValue && (e.richValue = !0), t.omitEmpty && (e.omitEmpty = !0);
|
|
16101
|
-
let n =
|
|
16122
|
+
let n = D_(t.payloadTemplate);
|
|
16102
16123
|
n && (e.payloadTemplate = n);
|
|
16103
|
-
let r =
|
|
16124
|
+
let r = D_(t.transformRule);
|
|
16104
16125
|
return r && (e.transformRule = r), e;
|
|
16105
16126
|
}
|
|
16106
|
-
function
|
|
16127
|
+
function A_(e = []) {
|
|
16107
16128
|
return e.map((e) => {
|
|
16108
16129
|
let t = (e.validations ?? []).filter((e) => e?.type).map((e) => {
|
|
16109
|
-
let t =
|
|
16130
|
+
let t = w_(e.type), n = {
|
|
16110
16131
|
type: e.type,
|
|
16111
16132
|
message: e.message ?? ""
|
|
16112
16133
|
};
|
|
@@ -16121,7 +16142,7 @@ function M_(e = []) {
|
|
|
16121
16142
|
formatter: e.formatter ?? "",
|
|
16122
16143
|
validations: t
|
|
16123
16144
|
};
|
|
16124
|
-
if (
|
|
16145
|
+
if (k_(n, e), e.type === "file" && (n.multiple = e.multiple ?? !1, n.maxCount = n.multiple ? Number(e.maxCount ?? 5) : 1, e.fileKey && (n.fileKey = e.fileKey)), e.showIf?.field) {
|
|
16125
16146
|
n.showIf = {
|
|
16126
16147
|
field: e.showIf.field,
|
|
16127
16148
|
operator: e.showIf.operator ?? "eq"
|
|
@@ -16140,7 +16161,7 @@ function M_(e = []) {
|
|
|
16140
16161
|
return n;
|
|
16141
16162
|
});
|
|
16142
16163
|
}
|
|
16143
|
-
function
|
|
16164
|
+
function j_(e) {
|
|
16144
16165
|
return {
|
|
16145
16166
|
...e,
|
|
16146
16167
|
show: e.show === 1,
|
|
@@ -16169,8 +16190,8 @@ function N_(e) {
|
|
|
16169
16190
|
defaultValue: e.defaultValue ?? "",
|
|
16170
16191
|
richValue: e.richValue ?? !1,
|
|
16171
16192
|
omitEmpty: e.omitEmpty ?? !1,
|
|
16172
|
-
payloadTemplate:
|
|
16173
|
-
transformRule:
|
|
16193
|
+
payloadTemplate: O_(e.payloadTemplate),
|
|
16194
|
+
transformRule: O_(e.transformRule),
|
|
16174
16195
|
showIf: e.showIf?.field ? {
|
|
16175
16196
|
field: e.showIf.field,
|
|
16176
16197
|
operator: e.showIf.operator ?? "eq",
|
|
@@ -16187,7 +16208,7 @@ function N_(e) {
|
|
|
16187
16208
|
}))
|
|
16188
16209
|
};
|
|
16189
16210
|
}
|
|
16190
|
-
function
|
|
16211
|
+
function M_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, moduleFieldOptions: o, fieldsLoading: s, dragIndexRef: l, dragOverIndex: u, setDragOverIndex: d, onFieldKeySelect: p }) {
|
|
16191
16212
|
let m = [...a, "fields"];
|
|
16192
16213
|
return /* @__PURE__ */ J(K, { children: [t.map(({ key: e, name: t, ...n }, a) => {
|
|
16193
16214
|
let s = [...m, t];
|
|
@@ -16267,7 +16288,7 @@ function P_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16267
16288
|
initialValue: "text",
|
|
16268
16289
|
children: /* @__PURE__ */ q(I, {
|
|
16269
16290
|
size: "small",
|
|
16270
|
-
options:
|
|
16291
|
+
options: g_
|
|
16271
16292
|
})
|
|
16272
16293
|
}),
|
|
16273
16294
|
/* @__PURE__ */ q(C.Item, {
|
|
@@ -16374,7 +16395,7 @@ function P_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16374
16395
|
children: /* @__PURE__ */ q(I, {
|
|
16375
16396
|
size: "small",
|
|
16376
16397
|
style: { width: 190 },
|
|
16377
|
-
options:
|
|
16398
|
+
options: __
|
|
16378
16399
|
})
|
|
16379
16400
|
}),
|
|
16380
16401
|
n === "select" && /* @__PURE__ */ q(C.Item, {
|
|
@@ -16644,7 +16665,7 @@ function P_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16644
16665
|
children: /* @__PURE__ */ q(I, {
|
|
16645
16666
|
size: "small",
|
|
16646
16667
|
style: { width: 130 },
|
|
16647
|
-
options:
|
|
16668
|
+
options: y_,
|
|
16648
16669
|
getPopupContainer: () => document.body
|
|
16649
16670
|
})
|
|
16650
16671
|
}), i && /* @__PURE__ */ q(C.Item, {
|
|
@@ -16732,7 +16753,7 @@ function P_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16732
16753
|
children: /* @__PURE__ */ q(I, {
|
|
16733
16754
|
size: "small",
|
|
16734
16755
|
style: { width: 170 },
|
|
16735
|
-
options:
|
|
16756
|
+
options: b_,
|
|
16736
16757
|
getPopupContainer: () => document.body
|
|
16737
16758
|
})
|
|
16738
16759
|
}),
|
|
@@ -16743,7 +16764,7 @@ function P_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16743
16764
|
children: /* @__PURE__ */ q(I, {
|
|
16744
16765
|
size: "small",
|
|
16745
16766
|
style: { width: 130 },
|
|
16746
|
-
options:
|
|
16767
|
+
options: x_,
|
|
16747
16768
|
getPopupContainer: () => document.body
|
|
16748
16769
|
})
|
|
16749
16770
|
}),
|
|
@@ -16755,7 +16776,7 @@ function P_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16755
16776
|
children: /* @__PURE__ */ q(I, {
|
|
16756
16777
|
size: "small",
|
|
16757
16778
|
style: { width: 210 },
|
|
16758
|
-
options:
|
|
16779
|
+
options: S_,
|
|
16759
16780
|
getPopupContainer: () => document.body
|
|
16760
16781
|
})
|
|
16761
16782
|
}),
|
|
@@ -16884,7 +16905,7 @@ function P_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16884
16905
|
shouldUpdate: !0,
|
|
16885
16906
|
style: { marginBottom: 6 },
|
|
16886
16907
|
children: ({ getFieldValue: e }) => {
|
|
16887
|
-
let i =
|
|
16908
|
+
let i = w_(e([
|
|
16888
16909
|
...m,
|
|
16889
16910
|
t,
|
|
16890
16911
|
"validations",
|
|
@@ -16907,7 +16928,7 @@ function P_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16907
16928
|
style: { width: 148 },
|
|
16908
16929
|
listHeight: 400,
|
|
16909
16930
|
getPopupContainer: () => document.body,
|
|
16910
|
-
options:
|
|
16931
|
+
options: v_.map((e) => ({
|
|
16911
16932
|
label: e.label,
|
|
16912
16933
|
value: e.value
|
|
16913
16934
|
}))
|
|
@@ -16992,7 +17013,7 @@ function P_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16992
17013
|
children: "Add Field"
|
|
16993
17014
|
})] });
|
|
16994
17015
|
}
|
|
16995
|
-
function
|
|
17016
|
+
function N_({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allGroupsByModule: s, onClose: c, onSaved: l, onSaveGroup: u }) {
|
|
16996
17017
|
let [d] = C.useForm(), [p, m] = o(!1), [h, g] = o(n), [_, v] = o({}), [b, x] = o(!1), [S, T] = o(null), E = a({}), D = a(null);
|
|
16997
17018
|
async function O(e) {
|
|
16998
17019
|
if (!(!e || E.current[e])) {
|
|
@@ -17019,7 +17040,7 @@ function F_({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
17019
17040
|
label: t.label,
|
|
17020
17041
|
addRow: t.addRow ?? !1,
|
|
17021
17042
|
order: t.order ?? 0,
|
|
17022
|
-
fields: (t.fields ?? []).map(
|
|
17043
|
+
fields: (t.fields ?? []).map(j_)
|
|
17023
17044
|
}) : (d.resetFields(), d.setFieldsValue({
|
|
17024
17045
|
module: r,
|
|
17025
17046
|
addRow: !1,
|
|
@@ -17086,7 +17107,7 @@ function F_({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
17086
17107
|
label: e.label,
|
|
17087
17108
|
addRow: e.addRow ?? !1,
|
|
17088
17109
|
order: Number(e.order ?? 0),
|
|
17089
|
-
fields:
|
|
17110
|
+
fields: A_(e.fields ?? [])
|
|
17090
17111
|
};
|
|
17091
17112
|
u ? await u(n, t) : t ? (await $a(t.id, n), G.success("Group updated")) : (await Qa(n), G.success("Group created")), l();
|
|
17092
17113
|
} catch (e) {
|
|
@@ -17209,7 +17230,7 @@ function F_({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
17209
17230
|
}),
|
|
17210
17231
|
/* @__PURE__ */ q(C.List, {
|
|
17211
17232
|
name: "fields",
|
|
17212
|
-
children: (e, { add: t, remove: n, move: r }) =>
|
|
17233
|
+
children: (e, { add: t, remove: n, move: r }) => M_({
|
|
17213
17234
|
form: d,
|
|
17214
17235
|
fieldItems: e,
|
|
17215
17236
|
add: t,
|
|
@@ -17228,13 +17249,13 @@ function F_({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
17228
17249
|
})
|
|
17229
17250
|
});
|
|
17230
17251
|
}
|
|
17231
|
-
function
|
|
17252
|
+
function P_({ groups: e, onEdit: t, onDelete: n }) {
|
|
17232
17253
|
let r = [
|
|
17233
17254
|
{
|
|
17234
17255
|
title: "Label",
|
|
17235
17256
|
dataIndex: "label",
|
|
17236
17257
|
key: "label",
|
|
17237
|
-
render: (e) => /* @__PURE__ */ q(
|
|
17258
|
+
render: (e) => /* @__PURE__ */ q(m_, {
|
|
17238
17259
|
strong: !0,
|
|
17239
17260
|
style: { color: "var(--color-text-heading)" },
|
|
17240
17261
|
children: e
|
|
@@ -17336,7 +17357,7 @@ function I_({ groups: e, onEdit: t, onDelete: n }) {
|
|
|
17336
17357
|
style: { padding: "24px 0" }
|
|
17337
17358
|
}) },
|
|
17338
17359
|
expandable: {
|
|
17339
|
-
expandedRowRender: (e) => (e.fields ?? []).length === 0 ? /* @__PURE__ */ q(
|
|
17360
|
+
expandedRowRender: (e) => (e.fields ?? []).length === 0 ? /* @__PURE__ */ q(m_, {
|
|
17340
17361
|
type: "secondary",
|
|
17341
17362
|
style: { fontSize: 12 },
|
|
17342
17363
|
children: "No fields in this group."
|
|
@@ -17424,7 +17445,7 @@ function I_({ groups: e, onEdit: t, onDelete: n }) {
|
|
|
17424
17445
|
} }), (e.validations ?? []).map((e, t) => /* @__PURE__ */ q(H, {
|
|
17425
17446
|
title: `${e.value !== void 0 && e.value !== "" ? `Value: ${e.value} — ` : ""}${e.message}`,
|
|
17426
17447
|
children: /* @__PURE__ */ J(V, {
|
|
17427
|
-
color:
|
|
17448
|
+
color: C_[e.type] ?? "default",
|
|
17428
17449
|
style: {
|
|
17429
17450
|
cursor: "default",
|
|
17430
17451
|
fontFamily: "monospace",
|
|
@@ -17442,7 +17463,7 @@ function I_({ groups: e, onEdit: t, onDelete: n }) {
|
|
|
17442
17463
|
}
|
|
17443
17464
|
});
|
|
17444
17465
|
}
|
|
17445
|
-
function
|
|
17466
|
+
function F_({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s }) {
|
|
17446
17467
|
let [c] = C.useForm(), [l, u] = o(!1), [d, p] = o(""), [m, h] = o({}), [g, _] = o(!1), [v, b] = o(null), x = a({}), S = a(null);
|
|
17447
17468
|
async function T(e) {
|
|
17448
17469
|
if (!(!e || x.current[e])) {
|
|
@@ -17471,7 +17492,7 @@ function L_({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s
|
|
|
17471
17492
|
label: t.label,
|
|
17472
17493
|
groups: (t.groups ?? []).map((e) => ({
|
|
17473
17494
|
...e,
|
|
17474
|
-
fields: (e.fields ?? []).map(
|
|
17495
|
+
fields: (e.fields ?? []).map(j_)
|
|
17475
17496
|
}))
|
|
17476
17497
|
}), T(e);
|
|
17477
17498
|
} else c.resetFields(), c.setFieldsValue({ groups: [] }), p("");
|
|
@@ -17506,7 +17527,7 @@ function L_({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s
|
|
|
17506
17527
|
name: e.name,
|
|
17507
17528
|
addRow: e.addRow ?? !1,
|
|
17508
17529
|
order: Number(e.order ?? 0),
|
|
17509
|
-
fields:
|
|
17530
|
+
fields: A_(e.fields ?? [])
|
|
17510
17531
|
}))
|
|
17511
17532
|
};
|
|
17512
17533
|
t ? (await Yo(t.id, {
|
|
@@ -17719,7 +17740,7 @@ function L_({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s
|
|
|
17719
17740
|
}),
|
|
17720
17741
|
/* @__PURE__ */ q(C.List, {
|
|
17721
17742
|
name: [t, "fields"],
|
|
17722
|
-
children: (e, { add: n, remove: r, move: i }) =>
|
|
17743
|
+
children: (e, { add: n, remove: r, move: i }) => M_({
|
|
17723
17744
|
form: c,
|
|
17724
17745
|
fieldItems: e,
|
|
17725
17746
|
add: n,
|
|
@@ -17774,7 +17795,7 @@ function L_({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s
|
|
|
17774
17795
|
})
|
|
17775
17796
|
});
|
|
17776
17797
|
}
|
|
17777
|
-
function
|
|
17798
|
+
function I_({ moduleOptions: e }) {
|
|
17778
17799
|
let [t, n] = o([]), [i, a] = o(!1), [s, c] = o(!1), [l, d] = o(null);
|
|
17779
17800
|
function p() {
|
|
17780
17801
|
a(!0), qo().then((e) => n(e)).catch((e) => G.error(e.message || "Could not load custom forms")).finally(() => a(!1));
|
|
@@ -17831,7 +17852,7 @@ function R_({ moduleOptions: e }) {
|
|
|
17831
17852
|
title: "Label",
|
|
17832
17853
|
dataIndex: "label",
|
|
17833
17854
|
key: "label",
|
|
17834
|
-
render: (e) => /* @__PURE__ */ q(
|
|
17855
|
+
render: (e) => /* @__PURE__ */ q(m_, {
|
|
17835
17856
|
strong: !0,
|
|
17836
17857
|
style: { color: "var(--color-text-heading)" },
|
|
17837
17858
|
children: e
|
|
@@ -17896,7 +17917,7 @@ function R_({ moduleOptions: e }) {
|
|
|
17896
17917
|
}) }
|
|
17897
17918
|
})
|
|
17898
17919
|
}),
|
|
17899
|
-
/* @__PURE__ */ q(
|
|
17920
|
+
/* @__PURE__ */ q(F_, {
|
|
17900
17921
|
open: s,
|
|
17901
17922
|
editingForm: l,
|
|
17902
17923
|
moduleOptions: e,
|
|
@@ -17909,16 +17930,16 @@ function R_({ moduleOptions: e }) {
|
|
|
17909
17930
|
})
|
|
17910
17931
|
] });
|
|
17911
17932
|
}
|
|
17912
|
-
function
|
|
17913
|
-
let [e, t] = o([]), [n, i] = o(!0), [a, c] = o({}), [l, d] = o("all"), [p, m] = o(!1), [h, g] = o(null), [_, v] = o(!1), [y, b] = o("module"), x =
|
|
17933
|
+
function L_() {
|
|
17934
|
+
let [e, t] = o([]), [n, i] = o(!0), [a, c] = o({}), [l, d] = o("all"), [p, m] = o(!1), [h, g] = o(null), [_, v] = o(!1), [y, b] = o("module"), x = T_(e), S = e.map((e) => ({
|
|
17914
17935
|
value: e.key,
|
|
17915
17936
|
label: e.label
|
|
17916
17937
|
}));
|
|
17917
17938
|
r(() => {
|
|
17918
17939
|
Ja().then((e) => {
|
|
17919
17940
|
t(e);
|
|
17920
|
-
let n =
|
|
17921
|
-
c(
|
|
17941
|
+
let n = T_(e);
|
|
17942
|
+
c(E_(n)), w("all", n);
|
|
17922
17943
|
}).catch(() => t([])).finally(() => i(!1));
|
|
17923
17944
|
}, []);
|
|
17924
17945
|
function C(e, t) {
|
|
@@ -17971,7 +17992,7 @@ function z_() {
|
|
|
17971
17992
|
v(!0);
|
|
17972
17993
|
try {
|
|
17973
17994
|
let e = (await to())?.data?.seeded ?? [];
|
|
17974
|
-
G.success(e.length ? `Seeded: ${e.join(", ")}` : "All modules already seeded"), c(
|
|
17995
|
+
G.success(e.length ? `Seeded: ${e.join(", ")}` : "All modules already seeded"), c(E_(x)), T(l), l !== "all" && T("all");
|
|
17975
17996
|
} catch (e) {
|
|
17976
17997
|
G.error(e.message || "Could not seed groups");
|
|
17977
17998
|
} finally {
|
|
@@ -18034,7 +18055,7 @@ function z_() {
|
|
|
18034
18055
|
}),
|
|
18035
18056
|
/* @__PURE__ */ q(z, {
|
|
18036
18057
|
spinning: r.loading,
|
|
18037
|
-
children: /* @__PURE__ */ q(
|
|
18058
|
+
children: /* @__PURE__ */ q(P_, {
|
|
18038
18059
|
groups: i,
|
|
18039
18060
|
onEdit: O,
|
|
18040
18061
|
onDelete: j
|
|
@@ -18047,7 +18068,7 @@ function z_() {
|
|
|
18047
18068
|
size: "middle",
|
|
18048
18069
|
className: "fg-tabs"
|
|
18049
18070
|
})
|
|
18050
|
-
}) }), /* @__PURE__ */ q(
|
|
18071
|
+
}) }), /* @__PURE__ */ q(N_, {
|
|
18051
18072
|
open: p,
|
|
18052
18073
|
editingGroup: h,
|
|
18053
18074
|
defaultModule: l === "all" ? S[0]?.value ?? "" : l,
|
|
@@ -18059,7 +18080,7 @@ function z_() {
|
|
|
18059
18080
|
}, {
|
|
18060
18081
|
key: "custom",
|
|
18061
18082
|
label: "Custom Form",
|
|
18062
|
-
children: /* @__PURE__ */ q(Ks, { children: /* @__PURE__ */ q(
|
|
18083
|
+
children: /* @__PURE__ */ q(Ks, { children: /* @__PURE__ */ q(I_, { moduleOptions: S }) })
|
|
18063
18084
|
}];
|
|
18064
18085
|
return /* @__PURE__ */ J("div", {
|
|
18065
18086
|
className: "fg-section",
|
|
@@ -18085,7 +18106,7 @@ function z_() {
|
|
|
18085
18106
|
children: "New Group"
|
|
18086
18107
|
})]
|
|
18087
18108
|
}) : null,
|
|
18088
|
-
children: [/* @__PURE__ */ q("div", { className: "admin-accent-bar" }), /* @__PURE__ */ J(
|
|
18109
|
+
children: [/* @__PURE__ */ q("div", { className: "admin-accent-bar" }), /* @__PURE__ */ J(m_, {
|
|
18089
18110
|
type: "secondary",
|
|
18090
18111
|
style: { fontSize: 13 },
|
|
18091
18112
|
children: [
|
|
@@ -18115,7 +18136,7 @@ function z_() {
|
|
|
18115
18136
|
}
|
|
18116
18137
|
//#endregion
|
|
18117
18138
|
//#region src/pages/Modules/Admin/DetailGroupsSection.jsx
|
|
18118
|
-
var { Text: $ } = U,
|
|
18139
|
+
var { Text: $ } = U, R_ = [
|
|
18119
18140
|
{
|
|
18120
18141
|
label: "Default",
|
|
18121
18142
|
value: "default"
|
|
@@ -18128,8 +18149,8 @@ var { Text: $ } = U, B_ = [
|
|
|
18128
18149
|
label: "Off (raw text)",
|
|
18129
18150
|
value: "off"
|
|
18130
18151
|
}
|
|
18131
|
-
],
|
|
18132
|
-
function
|
|
18152
|
+
], z_ = (e) => e === !0 ? "on" : e === !1 ? "off" : "default", B_ = (e) => e === "on" ? !0 : e === "off" ? !1 : void 0;
|
|
18153
|
+
function V_(e) {
|
|
18133
18154
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
18134
18155
|
for (let r of e ?? []) for (let e of r.fields ?? []) !e.field || t.has(e.field) || (t.add(e.field), n.push({
|
|
18135
18156
|
key: e.field,
|
|
@@ -18139,7 +18160,7 @@ function U_(e) {
|
|
|
18139
18160
|
}));
|
|
18140
18161
|
return n;
|
|
18141
18162
|
}
|
|
18142
|
-
function
|
|
18163
|
+
function H_(e, t) {
|
|
18143
18164
|
if (!t) return null;
|
|
18144
18165
|
let n = { field: e };
|
|
18145
18166
|
t.label && (n.label = t.label), t.prefix && (n.prefix = t.prefix), t.suffix && (n.suffix = t.suffix), t.color && (n.color = t.color), (t.capitalize === !0 || t.capitalize === !1) && (n.capitalize = t.capitalize), t.hidden && (n.hidden = !0);
|
|
@@ -18149,7 +18170,7 @@ function W_(e, t) {
|
|
|
18149
18170
|
for (let [e, n] of Object.entries(t.renderOptions ?? {})) n !== void 0 && n !== "" && n !== !1 && (i[e] = n);
|
|
18150
18171
|
return Object.keys(i).length && (n.renderOptions = i), t.lookupCollection && (n.lookupCollection = t.lookupCollection, n.displayField = t.displayField || "", t.displayField2 && (n.displayField2 = t.displayField2), n.valueField = t.valueField || "_id"), Object.keys(n).length > 1 ? n : null;
|
|
18151
18172
|
}
|
|
18152
|
-
function
|
|
18173
|
+
function U_(e) {
|
|
18153
18174
|
return (e ?? []).filter((e) => e.key && (e.fields ?? []).length).map((e) => {
|
|
18154
18175
|
let t = {
|
|
18155
18176
|
key: e.key,
|
|
@@ -18159,7 +18180,7 @@ function G_(e) {
|
|
|
18159
18180
|
return e.template && (t.template = e.template), e.valueMaps && Object.keys(e.valueMaps).length && (t.valueMaps = e.valueMaps), e.separator && (t.separator = e.separator), e.prefix && (t.prefix = e.prefix), e.suffix && (t.suffix = e.suffix), e.color && (t.color = e.color), (e.capitalize === !0 || e.capitalize === !1) && (t.capitalize = e.capitalize), e.group && (t.group = e.group), e.hideSources === !1 && (t.hideSources = !1), t;
|
|
18160
18181
|
});
|
|
18161
18182
|
}
|
|
18162
|
-
function
|
|
18183
|
+
function W_({ value: e, onChange: t }) {
|
|
18163
18184
|
return /* @__PURE__ */ J(R.Compact, {
|
|
18164
18185
|
style: { width: "100%" },
|
|
18165
18186
|
children: [/* @__PURE__ */ q(w, {
|
|
@@ -18184,7 +18205,7 @@ function K_({ value: e, onChange: t }) {
|
|
|
18184
18205
|
})]
|
|
18185
18206
|
});
|
|
18186
18207
|
}
|
|
18187
|
-
function
|
|
18208
|
+
function G_({ open: e, fieldMeta: t, value: n, onClose: i, onSave: a }) {
|
|
18188
18209
|
let [s, l] = o(() => ({ ...n ?? {} })), [u, d] = o([]), [p, m] = o([]);
|
|
18189
18210
|
r(() => {
|
|
18190
18211
|
if (!e) return;
|
|
@@ -18319,7 +18340,7 @@ function q_({ open: e, fieldMeta: t, value: n, onClose: i, onSave: a }) {
|
|
|
18319
18340
|
type: "secondary",
|
|
18320
18341
|
style: { fontSize: 12 },
|
|
18321
18342
|
children: "Colour"
|
|
18322
|
-
}), /* @__PURE__ */ q(
|
|
18343
|
+
}), /* @__PURE__ */ q(W_, {
|
|
18323
18344
|
value: s.color,
|
|
18324
18345
|
onChange: (e) => h("color", e)
|
|
18325
18346
|
})]
|
|
@@ -18332,9 +18353,9 @@ function q_({ open: e, fieldMeta: t, value: n, onClose: i, onSave: a }) {
|
|
|
18332
18353
|
}), /* @__PURE__ */ q(I, {
|
|
18333
18354
|
size: "small",
|
|
18334
18355
|
style: { width: "100%" },
|
|
18335
|
-
options:
|
|
18336
|
-
value:
|
|
18337
|
-
onChange: (e) => h("capitalize",
|
|
18356
|
+
options: R_,
|
|
18357
|
+
value: z_(s.capitalize),
|
|
18358
|
+
onChange: (e) => h("capitalize", B_(e))
|
|
18338
18359
|
})]
|
|
18339
18360
|
})]
|
|
18340
18361
|
}),
|
|
@@ -18576,7 +18597,7 @@ function q_({ open: e, fieldMeta: t, value: n, onClose: i, onSave: a }) {
|
|
|
18576
18597
|
})]
|
|
18577
18598
|
});
|
|
18578
18599
|
}
|
|
18579
|
-
function
|
|
18600
|
+
function K_(e) {
|
|
18580
18601
|
let t = [];
|
|
18581
18602
|
return Object.entries(e ?? {}).forEach(([e, n]) => {
|
|
18582
18603
|
Object.entries(n ?? {}).forEach(([n, r]) => t.push({
|
|
@@ -18586,7 +18607,7 @@ function J_(e) {
|
|
|
18586
18607
|
}));
|
|
18587
18608
|
}), t;
|
|
18588
18609
|
}
|
|
18589
|
-
function
|
|
18610
|
+
function q_(e) {
|
|
18590
18611
|
let t = {};
|
|
18591
18612
|
for (let n of e ?? []) !n.field || !n.from || (t[n.field] = {
|
|
18592
18613
|
...t[n.field] ?? {},
|
|
@@ -18594,7 +18615,7 @@ function Y_(e) {
|
|
|
18594
18615
|
});
|
|
18595
18616
|
return t;
|
|
18596
18617
|
}
|
|
18597
|
-
function
|
|
18618
|
+
function J_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, onSave: a }) {
|
|
18598
18619
|
let [s, c] = o(() => ({
|
|
18599
18620
|
key: "",
|
|
18600
18621
|
label: "",
|
|
@@ -18608,7 +18629,7 @@ function X_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
18608
18629
|
group: "",
|
|
18609
18630
|
hideSources: !0,
|
|
18610
18631
|
...t ?? {},
|
|
18611
|
-
mapRows:
|
|
18632
|
+
mapRows: K_(t?.valueMaps)
|
|
18612
18633
|
})), l = (e, t) => c((n) => ({
|
|
18613
18634
|
...n,
|
|
18614
18635
|
[e]: t
|
|
@@ -18656,7 +18677,7 @@ function X_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
18656
18677
|
let { mapRows: e, ...t } = s;
|
|
18657
18678
|
a({
|
|
18658
18679
|
...t,
|
|
18659
|
-
valueMaps:
|
|
18680
|
+
valueMaps: q_(e)
|
|
18660
18681
|
});
|
|
18661
18682
|
},
|
|
18662
18683
|
children: "Apply"
|
|
@@ -18922,7 +18943,7 @@ function X_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
18922
18943
|
type: "secondary",
|
|
18923
18944
|
style: { fontSize: 12 },
|
|
18924
18945
|
children: "Colour"
|
|
18925
|
-
}), /* @__PURE__ */ q(
|
|
18946
|
+
}), /* @__PURE__ */ q(W_, {
|
|
18926
18947
|
value: s.color,
|
|
18927
18948
|
onChange: (e) => l("color", e)
|
|
18928
18949
|
})]
|
|
@@ -18935,9 +18956,9 @@ function X_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
18935
18956
|
}), /* @__PURE__ */ q(I, {
|
|
18936
18957
|
size: "small",
|
|
18937
18958
|
style: { width: "100%" },
|
|
18938
|
-
options:
|
|
18939
|
-
value:
|
|
18940
|
-
onChange: (e) => l("capitalize",
|
|
18959
|
+
options: R_,
|
|
18960
|
+
value: z_(s.capitalize),
|
|
18961
|
+
onChange: (e) => l("capitalize", B_(e))
|
|
18941
18962
|
})]
|
|
18942
18963
|
})]
|
|
18943
18964
|
}),
|
|
@@ -18961,7 +18982,7 @@ function X_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
18961
18982
|
})
|
|
18962
18983
|
});
|
|
18963
18984
|
}
|
|
18964
|
-
function
|
|
18985
|
+
function Y_({ open: e, module: t, onClose: n }) {
|
|
18965
18986
|
let [r, i] = o(""), [a, c] = o([]), [l, u] = o(!1), [d, p] = o(""), m = async () => {
|
|
18966
18987
|
if (!r.trim()) return G.warning("Enter a record _id to preview");
|
|
18967
18988
|
u(!0), p("");
|
|
@@ -19051,7 +19072,7 @@ function Z_({ open: e, module: t, onClose: n }) {
|
|
|
19051
19072
|
]
|
|
19052
19073
|
});
|
|
19053
19074
|
}
|
|
19054
|
-
function
|
|
19075
|
+
function X_(e) {
|
|
19055
19076
|
let t = {};
|
|
19056
19077
|
return [
|
|
19057
19078
|
"s3BaseUrl",
|
|
@@ -19064,7 +19085,7 @@ function Q_(e) {
|
|
|
19064
19085
|
e?.[n] !== void 0 && e?.[n] !== "" && (t[n] = e[n]);
|
|
19065
19086
|
}), Array.isArray(e?.documentNameOrder) && e.documentNameOrder.length && (t.documentNameOrder = e.documentNameOrder), t;
|
|
19066
19087
|
}
|
|
19067
|
-
function
|
|
19088
|
+
function Z_({ open: e, onClose: t }) {
|
|
19068
19089
|
let [n, i] = o(() => ({ ...ds() })), [a, s] = o(!1);
|
|
19069
19090
|
r(() => {
|
|
19070
19091
|
if (!e) return;
|
|
@@ -19072,7 +19093,7 @@ function $_({ open: e, onClose: t }) {
|
|
|
19072
19093
|
return oo().then((e) => {
|
|
19073
19094
|
t || i((t) => ({
|
|
19074
19095
|
...t,
|
|
19075
|
-
...
|
|
19096
|
+
...X_(e)
|
|
19076
19097
|
}));
|
|
19077
19098
|
}).catch(() => {}), () => {
|
|
19078
19099
|
t = !0;
|
|
@@ -19245,7 +19266,7 @@ function $_({ open: e, onClose: t }) {
|
|
|
19245
19266
|
})]
|
|
19246
19267
|
});
|
|
19247
19268
|
}
|
|
19248
|
-
function
|
|
19269
|
+
function Q_() {
|
|
19249
19270
|
let [e, t] = o([]), [n, a] = o(!0), [c, l] = o(""), [d, p] = o([]), [m, h] = o([]), [g, _] = o([]), [v, y] = o({}), [b, S] = o([]), [C, w] = o(!1), [T, E] = o(""), [D, O] = o(!1), [k, A] = o(null), [j, M] = o(null), [ee, N] = o(!1), [P, F] = o(!1);
|
|
19250
19271
|
r(() => {
|
|
19251
19272
|
Ja().then((e) => {
|
|
@@ -19259,7 +19280,7 @@ function ev() {
|
|
|
19259
19280
|
try {
|
|
19260
19281
|
let [t, n] = await Promise.all([Xa(c), ro(c)]);
|
|
19261
19282
|
if (e) return;
|
|
19262
|
-
p(t ?? []), h(
|
|
19283
|
+
p(t ?? []), h(V_(t)), _((t ?? []).map((e) => ({
|
|
19263
19284
|
value: e.name,
|
|
19264
19285
|
label: e.label ?? e.name
|
|
19265
19286
|
})));
|
|
@@ -19285,8 +19306,8 @@ function ev() {
|
|
|
19285
19306
|
try {
|
|
19286
19307
|
await io({
|
|
19287
19308
|
module: c,
|
|
19288
|
-
fields: Object.entries(v).map(([e, t]) =>
|
|
19289
|
-
merges:
|
|
19309
|
+
fields: Object.entries(v).map(([e, t]) => H_(e, t)).filter(Boolean),
|
|
19310
|
+
merges: U_(b)
|
|
19290
19311
|
}), G.success("Detail view configuration saved");
|
|
19291
19312
|
} catch (e) {
|
|
19292
19313
|
G.error(e?.message || "Could not save configuration");
|
|
@@ -19701,14 +19722,14 @@ function ev() {
|
|
|
19701
19722
|
})
|
|
19702
19723
|
]
|
|
19703
19724
|
}) }),
|
|
19704
|
-
/* @__PURE__ */ q(
|
|
19725
|
+
/* @__PURE__ */ q(G_, {
|
|
19705
19726
|
open: !!k,
|
|
19706
19727
|
fieldMeta: k,
|
|
19707
19728
|
value: k ? v[k.key] : null,
|
|
19708
19729
|
onClose: () => A(null),
|
|
19709
19730
|
onSave: te
|
|
19710
19731
|
}, k?.key ?? "field-closed"),
|
|
19711
|
-
/* @__PURE__ */ q(
|
|
19732
|
+
/* @__PURE__ */ q(J_, {
|
|
19712
19733
|
open: !!j,
|
|
19713
19734
|
merge: j?.merge,
|
|
19714
19735
|
fieldOptions: I,
|
|
@@ -19716,11 +19737,11 @@ function ev() {
|
|
|
19716
19737
|
onClose: () => M(null),
|
|
19717
19738
|
onSave: ae
|
|
19718
19739
|
}, j ? `merge-${j.index ?? "new"}` : "merge-closed"),
|
|
19719
|
-
/* @__PURE__ */ q(
|
|
19740
|
+
/* @__PURE__ */ q(Z_, {
|
|
19720
19741
|
open: P,
|
|
19721
19742
|
onClose: () => F(!1)
|
|
19722
19743
|
}),
|
|
19723
|
-
/* @__PURE__ */ q(
|
|
19744
|
+
/* @__PURE__ */ q(Y_, {
|
|
19724
19745
|
open: ee,
|
|
19725
19746
|
module: c,
|
|
19726
19747
|
onClose: () => N(!1)
|
|
@@ -19730,13 +19751,13 @@ function ev() {
|
|
|
19730
19751
|
}
|
|
19731
19752
|
//#endregion
|
|
19732
19753
|
//#region src/pages/Modules/Admin/RowActionsSection.jsx
|
|
19733
|
-
var { Text:
|
|
19754
|
+
var { Text: $_ } = U, ev = [
|
|
19734
19755
|
"job",
|
|
19735
19756
|
"candidate",
|
|
19736
19757
|
"onboarding",
|
|
19737
19758
|
"submission",
|
|
19738
19759
|
"vendor"
|
|
19739
|
-
],
|
|
19760
|
+
], tv = [
|
|
19740
19761
|
{
|
|
19741
19762
|
value: "delete",
|
|
19742
19763
|
label: "delete (trash)"
|
|
@@ -19769,7 +19790,7 @@ var { Text: tv } = U, nv = [
|
|
|
19769
19790
|
value: "userSwitch",
|
|
19770
19791
|
label: "userSwitch (switch user)"
|
|
19771
19792
|
}
|
|
19772
|
-
],
|
|
19793
|
+
], nv = [
|
|
19773
19794
|
{
|
|
19774
19795
|
value: "navigate",
|
|
19775
19796
|
label: "Navigate (open page)"
|
|
@@ -19786,12 +19807,12 @@ var { Text: tv } = U, nv = [
|
|
|
19786
19807
|
value: "copy",
|
|
19787
19808
|
label: "Copy (clipboard)"
|
|
19788
19809
|
}
|
|
19789
|
-
],
|
|
19810
|
+
], rv = [
|
|
19790
19811
|
"GET",
|
|
19791
19812
|
"POST",
|
|
19792
19813
|
"PUT",
|
|
19793
19814
|
"DELETE"
|
|
19794
|
-
],
|
|
19815
|
+
], iv = {
|
|
19795
19816
|
key: "",
|
|
19796
19817
|
label: "",
|
|
19797
19818
|
icon: "",
|
|
@@ -19804,13 +19825,13 @@ var { Text: tv } = U, nv = [
|
|
|
19804
19825
|
danger: !1,
|
|
19805
19826
|
showInList: !0
|
|
19806
19827
|
};
|
|
19807
|
-
function
|
|
19828
|
+
function av() {
|
|
19808
19829
|
return `action_${Date.now()}`;
|
|
19809
19830
|
}
|
|
19810
|
-
function
|
|
19831
|
+
function ov({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
19811
19832
|
let [a] = C.useForm(), [s, c] = o("navigate");
|
|
19812
19833
|
return r(() => {
|
|
19813
|
-
e && (a.setFieldsValue(t ??
|
|
19834
|
+
e && (a.setFieldsValue(t ?? iv), c(t?.actionType ?? "navigate"));
|
|
19814
19835
|
}, [
|
|
19815
19836
|
e,
|
|
19816
19837
|
t,
|
|
@@ -19832,7 +19853,7 @@ function cv({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
|
19832
19853
|
children: /* @__PURE__ */ J(C, {
|
|
19833
19854
|
form: a,
|
|
19834
19855
|
layout: "vertical",
|
|
19835
|
-
initialValues:
|
|
19856
|
+
initialValues: iv,
|
|
19836
19857
|
children: [
|
|
19837
19858
|
/* @__PURE__ */ q(C.Item, {
|
|
19838
19859
|
name: "key",
|
|
@@ -19860,7 +19881,7 @@ function cv({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
|
19860
19881
|
message: "Icon is required"
|
|
19861
19882
|
}],
|
|
19862
19883
|
children: /* @__PURE__ */ q(I, {
|
|
19863
|
-
options:
|
|
19884
|
+
options: tv,
|
|
19864
19885
|
placeholder: "Select icon"
|
|
19865
19886
|
})
|
|
19866
19887
|
}),
|
|
@@ -19869,7 +19890,7 @@ function cv({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
|
19869
19890
|
label: "Action Type",
|
|
19870
19891
|
rules: [{ required: !0 }],
|
|
19871
19892
|
children: /* @__PURE__ */ q(I, {
|
|
19872
|
-
options:
|
|
19893
|
+
options: nv,
|
|
19873
19894
|
onChange: (e) => c(e)
|
|
19874
19895
|
})
|
|
19875
19896
|
}),
|
|
@@ -19881,7 +19902,7 @@ function cv({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
|
19881
19902
|
s === "api" && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(C.Item, {
|
|
19882
19903
|
name: "apiMethod",
|
|
19883
19904
|
label: "API Method",
|
|
19884
|
-
children: /* @__PURE__ */ q(I, { options:
|
|
19905
|
+
children: /* @__PURE__ */ q(I, { options: rv.map((e) => ({
|
|
19885
19906
|
value: e,
|
|
19886
19907
|
label: e
|
|
19887
19908
|
})) })
|
|
@@ -19919,14 +19940,14 @@ function cv({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
|
19919
19940
|
})
|
|
19920
19941
|
});
|
|
19921
19942
|
}
|
|
19922
|
-
function
|
|
19943
|
+
function sv() {
|
|
19923
19944
|
let [e, t] = o([]), [i, a] = o([]), [c, l] = o("job"), [u, d] = o(0), [p, m] = o([]), [h, g] = o(null), [_, v] = o([]), [y, b] = o(!1), [x, S] = o(!1), [C, w] = o(!1), [T, E] = o(!1), [D, O] = o(null), [k, A] = o(!1), [M, ee] = o(null);
|
|
19924
19945
|
r(() => {
|
|
19925
19946
|
Promise.all([Ja(), fo()]).then(([e, { roles: n }]) => {
|
|
19926
19947
|
let r = Array.isArray(e) ? e.map((e) => e.module ?? e.key ?? e.value ?? e) : [];
|
|
19927
|
-
t([...new Set([...
|
|
19948
|
+
t([...new Set([...ev, ...r.filter(Boolean)])]), a(n ?? []);
|
|
19928
19949
|
}).catch(() => {
|
|
19929
|
-
t(
|
|
19950
|
+
t(ev);
|
|
19930
19951
|
});
|
|
19931
19952
|
}, []);
|
|
19932
19953
|
let N = n(async () => {
|
|
@@ -19991,9 +20012,9 @@ function lv() {
|
|
|
19991
20012
|
...t,
|
|
19992
20013
|
...e
|
|
19993
20014
|
} : t) : (t) => [...t, {
|
|
19994
|
-
...
|
|
20015
|
+
...iv,
|
|
19995
20016
|
...e,
|
|
19996
|
-
_localKey:
|
|
20017
|
+
_localKey: av()
|
|
19997
20018
|
}]), b(!0), A(!1);
|
|
19998
20019
|
}, ie = (e) => {
|
|
19999
20020
|
v((t) => t.filter((t) => t.key !== e)), b(!0);
|
|
@@ -20025,7 +20046,7 @@ function lv() {
|
|
|
20025
20046
|
level: 5,
|
|
20026
20047
|
children: "Row Actions"
|
|
20027
20048
|
}),
|
|
20028
|
-
/* @__PURE__ */ q(
|
|
20049
|
+
/* @__PURE__ */ q($_, {
|
|
20029
20050
|
type: "secondary",
|
|
20030
20051
|
children: "Configure which action buttons appear in each module's list view, and control per-row visibility via permission keys. Configs are per module + role combination."
|
|
20031
20052
|
})
|
|
@@ -20050,7 +20071,7 @@ function lv() {
|
|
|
20050
20071
|
wrap: !0,
|
|
20051
20072
|
size: 12,
|
|
20052
20073
|
children: [
|
|
20053
|
-
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
20074
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q($_, {
|
|
20054
20075
|
type: "secondary",
|
|
20055
20076
|
style: {
|
|
20056
20077
|
display: "block",
|
|
@@ -20067,7 +20088,7 @@ function lv() {
|
|
|
20067
20088
|
label: e
|
|
20068
20089
|
}))
|
|
20069
20090
|
})] }),
|
|
20070
|
-
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
20091
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q($_, {
|
|
20071
20092
|
type: "secondary",
|
|
20072
20093
|
style: {
|
|
20073
20094
|
display: "block",
|
|
@@ -20169,7 +20190,7 @@ function lv() {
|
|
|
20169
20190
|
title: "Key",
|
|
20170
20191
|
dataIndex: "key",
|
|
20171
20192
|
key: "key",
|
|
20172
|
-
render: (e) => /* @__PURE__ */ q(
|
|
20193
|
+
render: (e) => /* @__PURE__ */ q($_, {
|
|
20173
20194
|
code: !0,
|
|
20174
20195
|
children: e
|
|
20175
20196
|
})
|
|
@@ -20198,11 +20219,11 @@ function lv() {
|
|
|
20198
20219
|
title: "Permission Key",
|
|
20199
20220
|
dataIndex: "permissionKey",
|
|
20200
20221
|
key: "permissionKey",
|
|
20201
|
-
render: (e) => e ? /* @__PURE__ */ q(
|
|
20222
|
+
render: (e) => e ? /* @__PURE__ */ q($_, {
|
|
20202
20223
|
type: "secondary",
|
|
20203
20224
|
code: !0,
|
|
20204
20225
|
children: e
|
|
20205
|
-
}) : /* @__PURE__ */ q(
|
|
20226
|
+
}) : /* @__PURE__ */ q($_, {
|
|
20206
20227
|
type: "secondary",
|
|
20207
20228
|
children: "—"
|
|
20208
20229
|
})
|
|
@@ -20262,7 +20283,7 @@ function lv() {
|
|
|
20262
20283
|
})
|
|
20263
20284
|
})
|
|
20264
20285
|
}),
|
|
20265
|
-
/* @__PURE__ */ q(
|
|
20286
|
+
/* @__PURE__ */ q(ov, {
|
|
20266
20287
|
open: k,
|
|
20267
20288
|
initial: M,
|
|
20268
20289
|
onClose: () => A(!1),
|
|
@@ -20273,7 +20294,7 @@ function lv() {
|
|
|
20273
20294
|
}
|
|
20274
20295
|
//#endregion
|
|
20275
20296
|
//#region src/pages/Modules/Admin/ModuleActionRulesSection.jsx
|
|
20276
|
-
var { Text:
|
|
20297
|
+
var { Text: cv, Title: lv } = U, uv = [
|
|
20277
20298
|
{
|
|
20278
20299
|
value: "job",
|
|
20279
20300
|
label: "Job"
|
|
@@ -20286,7 +20307,7 @@ var { Text: uv, Title: dv } = U, fv = [
|
|
|
20286
20307
|
value: "submissions",
|
|
20287
20308
|
label: "Submissions"
|
|
20288
20309
|
}
|
|
20289
|
-
],
|
|
20310
|
+
], dv = [
|
|
20290
20311
|
{
|
|
20291
20312
|
value: "eq",
|
|
20292
20313
|
label: "equals"
|
|
@@ -20315,17 +20336,17 @@ var { Text: uv, Title: dv } = U, fv = [
|
|
|
20315
20336
|
value: "scope",
|
|
20316
20337
|
label: "view scope"
|
|
20317
20338
|
}
|
|
20318
|
-
],
|
|
20339
|
+
], fv = [{
|
|
20319
20340
|
value: "myJobs",
|
|
20320
20341
|
label: "My Jobs"
|
|
20321
20342
|
}, {
|
|
20322
20343
|
value: "allJobs",
|
|
20323
20344
|
label: "All Jobs"
|
|
20324
|
-
}],
|
|
20345
|
+
}], pv = [
|
|
20325
20346
|
"eq",
|
|
20326
20347
|
"ne",
|
|
20327
20348
|
"contains"
|
|
20328
|
-
],
|
|
20349
|
+
], mv = "scope", hv = "fieldEq", gv = [
|
|
20329
20350
|
{
|
|
20330
20351
|
name: "Fulfilled jobs — block sourcing",
|
|
20331
20352
|
description: "When a job status is fulfilled and has no recruiters, hide source & quick-submit buttons.",
|
|
@@ -20373,26 +20394,26 @@ var { Text: uv, Title: dv } = U, fv = [
|
|
|
20373
20394
|
blockedActions: ["sourceCandidates", "quickSubmit"],
|
|
20374
20395
|
isActive: !0
|
|
20375
20396
|
}
|
|
20376
|
-
],
|
|
20397
|
+
], _v = () => ({
|
|
20377
20398
|
field: "",
|
|
20378
20399
|
operator: "eq",
|
|
20379
20400
|
value: "",
|
|
20380
20401
|
compareField: ""
|
|
20381
|
-
}),
|
|
20402
|
+
}), vv = () => ({
|
|
20382
20403
|
name: "",
|
|
20383
20404
|
description: "",
|
|
20384
|
-
conditions: [
|
|
20405
|
+
conditions: [_v()],
|
|
20385
20406
|
blockedActions: [],
|
|
20386
20407
|
isActive: !0
|
|
20387
20408
|
});
|
|
20388
|
-
function
|
|
20389
|
-
return
|
|
20409
|
+
function yv(e) {
|
|
20410
|
+
return dv.find((t) => t.value === e)?.label ?? e;
|
|
20390
20411
|
}
|
|
20391
|
-
function
|
|
20392
|
-
return e.operator ===
|
|
20412
|
+
function bv(e) {
|
|
20413
|
+
return e.operator === mv ? `scope = ${e.value}` : e.operator === hv ? `${e.field} = field:${e.compareField}` : ["isEmpty", "notEmpty"].includes(e.operator) ? `${e.field} ${yv(e.operator)}` : `${e.field} ${yv(e.operator)} "${e.value}"`;
|
|
20393
20414
|
}
|
|
20394
|
-
function
|
|
20395
|
-
let [e, t] = o("job"), [n, i] = o([]), [a, c] = o(!1), [l, u] = o(!1), [d, p] = o(null), [m, h] = o(
|
|
20415
|
+
function xv() {
|
|
20416
|
+
let [e, t] = o("job"), [n, i] = o([]), [a, c] = o(!1), [l, u] = o(!1), [d, p] = o(null), [m, h] = o(vv()), [g, _] = o(!1), [b, x] = o(!1), [S, T] = o([]), [E, D] = o([]);
|
|
20396
20417
|
function O(e) {
|
|
20397
20418
|
c(!0), is(e).then((e) => i(Array.isArray(e) ? e : [])).catch(() => i([])).finally(() => c(!1));
|
|
20398
20419
|
}
|
|
@@ -20421,13 +20442,13 @@ function Cv() {
|
|
|
20421
20442
|
O(e), k(e), A(e);
|
|
20422
20443
|
}, [e]);
|
|
20423
20444
|
function M() {
|
|
20424
|
-
p(null), h(
|
|
20445
|
+
p(null), h(vv()), u(!0);
|
|
20425
20446
|
}
|
|
20426
20447
|
function ee(e) {
|
|
20427
20448
|
p(e), h({
|
|
20428
20449
|
name: e.name ?? "",
|
|
20429
20450
|
description: e.description ?? "",
|
|
20430
|
-
conditions: e.conditions?.length ? e.conditions.map((e) => ({ ...e })) : [
|
|
20451
|
+
conditions: e.conditions?.length ? e.conditions.map((e) => ({ ...e })) : [_v()],
|
|
20431
20452
|
blockedActions: e.blockedActions ?? [],
|
|
20432
20453
|
isActive: e.isActive ?? !0
|
|
20433
20454
|
}), u(!0);
|
|
@@ -20451,7 +20472,7 @@ function Cv() {
|
|
|
20451
20472
|
async function F() {
|
|
20452
20473
|
x(!0);
|
|
20453
20474
|
try {
|
|
20454
|
-
for (let t of
|
|
20475
|
+
for (let t of gv) await as({
|
|
20455
20476
|
...t,
|
|
20456
20477
|
module: e
|
|
20457
20478
|
});
|
|
@@ -20472,7 +20493,7 @@ function Cv() {
|
|
|
20472
20493
|
function z() {
|
|
20473
20494
|
h((e) => ({
|
|
20474
20495
|
...e,
|
|
20475
|
-
conditions: [...e.conditions,
|
|
20496
|
+
conditions: [...e.conditions, _v()]
|
|
20476
20497
|
}));
|
|
20477
20498
|
}
|
|
20478
20499
|
function te(e) {
|
|
@@ -20493,13 +20514,13 @@ function Cv() {
|
|
|
20493
20514
|
flexWrap: "wrap"
|
|
20494
20515
|
},
|
|
20495
20516
|
children: [
|
|
20496
|
-
/* @__PURE__ */ q(
|
|
20517
|
+
/* @__PURE__ */ q(lv, {
|
|
20497
20518
|
level: 5,
|
|
20498
20519
|
style: { margin: 0 },
|
|
20499
20520
|
children: "Action Rules"
|
|
20500
20521
|
}),
|
|
20501
20522
|
/* @__PURE__ */ q(I, {
|
|
20502
|
-
options:
|
|
20523
|
+
options: uv,
|
|
20503
20524
|
value: e,
|
|
20504
20525
|
onChange: t,
|
|
20505
20526
|
style: { width: 160 }
|
|
@@ -20547,10 +20568,10 @@ function Cv() {
|
|
|
20547
20568
|
dataIndex: "name",
|
|
20548
20569
|
key: "name",
|
|
20549
20570
|
width: 200,
|
|
20550
|
-
render: (e, t) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
20571
|
+
render: (e, t) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(cv, {
|
|
20551
20572
|
strong: !0,
|
|
20552
20573
|
children: e
|
|
20553
|
-
}), t.description ? /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(
|
|
20574
|
+
}), t.description ? /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(cv, {
|
|
20554
20575
|
type: "secondary",
|
|
20555
20576
|
style: { fontSize: 11 },
|
|
20556
20577
|
children: t.description
|
|
@@ -20568,7 +20589,7 @@ function Cv() {
|
|
|
20568
20589
|
fontSize: 11,
|
|
20569
20590
|
margin: 0
|
|
20570
20591
|
},
|
|
20571
|
-
children:
|
|
20592
|
+
children: bv(e)
|
|
20572
20593
|
}, t))
|
|
20573
20594
|
})
|
|
20574
20595
|
},
|
|
@@ -20686,7 +20707,7 @@ function Cv() {
|
|
|
20686
20707
|
orientation: "left",
|
|
20687
20708
|
orientationMargin: 0,
|
|
20688
20709
|
style: { fontSize: 13 },
|
|
20689
|
-
children: ["Conditions ", /* @__PURE__ */ q(
|
|
20710
|
+
children: ["Conditions ", /* @__PURE__ */ q(cv, {
|
|
20690
20711
|
type: "secondary",
|
|
20691
20712
|
style: { fontSize: 12 },
|
|
20692
20713
|
children: "(ALL must match for the rule to fire)"
|
|
@@ -20715,7 +20736,7 @@ function Cv() {
|
|
|
20715
20736
|
minWidth: 140
|
|
20716
20737
|
},
|
|
20717
20738
|
children: /* @__PURE__ */ q(I, {
|
|
20718
|
-
options:
|
|
20739
|
+
options: dv,
|
|
20719
20740
|
value: e.operator,
|
|
20720
20741
|
style: { width: 140 },
|
|
20721
20742
|
onChange: (e) => L(t, {
|
|
@@ -20725,7 +20746,7 @@ function Cv() {
|
|
|
20725
20746
|
})
|
|
20726
20747
|
})
|
|
20727
20748
|
}),
|
|
20728
|
-
e.operator !==
|
|
20749
|
+
e.operator !== mv && /* @__PURE__ */ J(C.Item, {
|
|
20729
20750
|
label: "Record Field",
|
|
20730
20751
|
style: {
|
|
20731
20752
|
marginBottom: 0,
|
|
@@ -20743,7 +20764,7 @@ function Cv() {
|
|
|
20743
20764
|
placeholder: "Select or type field name",
|
|
20744
20765
|
onChange: (e) => L(t, { field: e[e.length - 1] ?? "" }),
|
|
20745
20766
|
filterOption: (e, t) => (t?.label ?? t?.value ?? "").toLowerCase().includes(e.toLowerCase())
|
|
20746
|
-
}), /* @__PURE__ */ J(
|
|
20767
|
+
}), /* @__PURE__ */ J(cv, {
|
|
20747
20768
|
type: "secondary",
|
|
20748
20769
|
style: { fontSize: 11 },
|
|
20749
20770
|
children: [
|
|
@@ -20755,7 +20776,7 @@ function Cv() {
|
|
|
20755
20776
|
]
|
|
20756
20777
|
})]
|
|
20757
20778
|
}),
|
|
20758
|
-
|
|
20779
|
+
pv.includes(e.operator) && /* @__PURE__ */ q(C.Item, {
|
|
20759
20780
|
label: "Value",
|
|
20760
20781
|
style: {
|
|
20761
20782
|
marginBottom: 0,
|
|
@@ -20768,25 +20789,25 @@ function Cv() {
|
|
|
20768
20789
|
onChange: (e) => L(t, { value: e.target.value })
|
|
20769
20790
|
})
|
|
20770
20791
|
}),
|
|
20771
|
-
e.operator ===
|
|
20792
|
+
e.operator === mv && /* @__PURE__ */ J(C.Item, {
|
|
20772
20793
|
label: "Scope Value",
|
|
20773
20794
|
style: {
|
|
20774
20795
|
marginBottom: 0,
|
|
20775
20796
|
minWidth: 140
|
|
20776
20797
|
},
|
|
20777
20798
|
children: [/* @__PURE__ */ q(I, {
|
|
20778
|
-
options:
|
|
20799
|
+
options: fv,
|
|
20779
20800
|
value: e.value || void 0,
|
|
20780
20801
|
style: { width: 150 },
|
|
20781
20802
|
placeholder: "Select scope",
|
|
20782
20803
|
onChange: (e) => L(t, { value: e })
|
|
20783
|
-
}), /* @__PURE__ */ q(
|
|
20804
|
+
}), /* @__PURE__ */ q(cv, {
|
|
20784
20805
|
type: "secondary",
|
|
20785
20806
|
style: { fontSize: 11 },
|
|
20786
20807
|
children: "Current view tab (myJobs / allJobs)"
|
|
20787
20808
|
})]
|
|
20788
20809
|
}),
|
|
20789
|
-
e.operator ===
|
|
20810
|
+
e.operator === hv && /* @__PURE__ */ J(C.Item, {
|
|
20790
20811
|
label: "Compare To Field",
|
|
20791
20812
|
style: {
|
|
20792
20813
|
marginBottom: 0,
|
|
@@ -20803,7 +20824,7 @@ function Cv() {
|
|
|
20803
20824
|
placeholder: "Select or type field",
|
|
20804
20825
|
onChange: (e) => L(t, { compareField: e[e.length - 1] ?? "" }),
|
|
20805
20826
|
filterOption: (e, t) => (t?.label ?? t?.value ?? "").toLowerCase().includes(e.toLowerCase())
|
|
20806
|
-
}), /* @__PURE__ */ J(
|
|
20827
|
+
}), /* @__PURE__ */ J(cv, {
|
|
20807
20828
|
type: "secondary",
|
|
20808
20829
|
style: { fontSize: 11 },
|
|
20809
20830
|
children: ["e.g. ", /* @__PURE__ */ q("code", { children: "submissionCount" })]
|
|
@@ -20823,12 +20844,12 @@ function Cv() {
|
|
|
20823
20844
|
]
|
|
20824
20845
|
}), /* @__PURE__ */ q("div", {
|
|
20825
20846
|
style: { marginTop: 6 },
|
|
20826
|
-
children: /* @__PURE__ */ J(
|
|
20847
|
+
children: /* @__PURE__ */ J(cv, {
|
|
20827
20848
|
type: "secondary",
|
|
20828
20849
|
style: { fontSize: 11 },
|
|
20829
20850
|
children: ["Preview: ", /* @__PURE__ */ q("code", {
|
|
20830
20851
|
style: { color: "#1677ff" },
|
|
20831
|
-
children:
|
|
20852
|
+
children: bv(e)
|
|
20832
20853
|
})]
|
|
20833
20854
|
})
|
|
20834
20855
|
})]
|
|
@@ -20843,7 +20864,7 @@ function Cv() {
|
|
|
20843
20864
|
orientation: "left",
|
|
20844
20865
|
orientationMargin: 0,
|
|
20845
20866
|
style: { fontSize: 13 },
|
|
20846
|
-
children: ["Blocked Row Actions", /* @__PURE__ */ q(
|
|
20867
|
+
children: ["Blocked Row Actions", /* @__PURE__ */ q(cv, {
|
|
20847
20868
|
type: "secondary",
|
|
20848
20869
|
style: {
|
|
20849
20870
|
fontSize: 12,
|
|
@@ -20863,7 +20884,7 @@ function Cv() {
|
|
|
20863
20884
|
blockedActions: e
|
|
20864
20885
|
})),
|
|
20865
20886
|
filterOption: (e, t) => (t?.value ?? "").toLowerCase().includes(e.toLowerCase())
|
|
20866
|
-
}), /* @__PURE__ */ J(
|
|
20887
|
+
}), /* @__PURE__ */ J(cv, {
|
|
20867
20888
|
type: "secondary",
|
|
20868
20889
|
style: { fontSize: 11 },
|
|
20869
20890
|
children: [
|
|
@@ -20893,7 +20914,7 @@ function Cv() {
|
|
|
20893
20914
|
}
|
|
20894
20915
|
//#endregion
|
|
20895
20916
|
//#region src/pages/Modules/Admin/UsersSection.jsx
|
|
20896
|
-
var { Text:
|
|
20917
|
+
var { Text: Sv } = U, { Option: Cv } = I, wv = [
|
|
20897
20918
|
{
|
|
20898
20919
|
key: "job",
|
|
20899
20920
|
label: "Jobs"
|
|
@@ -20906,7 +20927,7 @@ var { Text: wv } = U, { Option: Tv } = I, Ev = [
|
|
|
20906
20927
|
key: "submissions",
|
|
20907
20928
|
label: "Submissions"
|
|
20908
20929
|
}
|
|
20909
|
-
],
|
|
20930
|
+
], Tv = [
|
|
20910
20931
|
{
|
|
20911
20932
|
key: "listView",
|
|
20912
20933
|
label: "List View"
|
|
@@ -20923,7 +20944,7 @@ var { Text: wv } = U, { Option: Tv } = I, Ev = [
|
|
|
20923
20944
|
key: "permissions",
|
|
20924
20945
|
label: "Permissions"
|
|
20925
20946
|
}
|
|
20926
|
-
],
|
|
20947
|
+
], Ev = [
|
|
20927
20948
|
{
|
|
20928
20949
|
key: "",
|
|
20929
20950
|
label: "Text",
|
|
@@ -20951,20 +20972,20 @@ var { Text: wv } = U, { Option: Tv } = I, Ev = [
|
|
|
20951
20972
|
icon: /* @__PURE__ */ q(et, { style: { fontSize: 16 } })
|
|
20952
20973
|
}
|
|
20953
20974
|
];
|
|
20954
|
-
function
|
|
20975
|
+
function Dv(e) {
|
|
20955
20976
|
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 ?? "?"}`;
|
|
20956
20977
|
}
|
|
20957
|
-
function
|
|
20978
|
+
function Ov(e) {
|
|
20958
20979
|
return {
|
|
20959
20980
|
...e,
|
|
20960
20981
|
key: e.USER_ID ?? e.user_id ?? e.userId ?? e.id ?? e._id,
|
|
20961
|
-
_name:
|
|
20982
|
+
_name: Dv(e),
|
|
20962
20983
|
_email: e.email ?? e.EMAIL ?? e.user_email ?? "",
|
|
20963
20984
|
_role: e.role_name ?? e.roleName ?? e.ROLE_NAME ?? "",
|
|
20964
20985
|
_rawRef: e
|
|
20965
20986
|
};
|
|
20966
20987
|
}
|
|
20967
|
-
var
|
|
20988
|
+
var kv = [
|
|
20968
20989
|
{
|
|
20969
20990
|
color: "#52c41a",
|
|
20970
20991
|
bg: "#f6ffed"
|
|
@@ -20997,12 +21018,12 @@ var jv = [
|
|
|
20997
21018
|
color: "#faad14",
|
|
20998
21019
|
bg: "#fffbe6"
|
|
20999
21020
|
}
|
|
21000
|
-
],
|
|
21021
|
+
], Av = {
|
|
21001
21022
|
job: "jobs",
|
|
21002
21023
|
candidate: "candidates",
|
|
21003
21024
|
submissions: "submissions"
|
|
21004
21025
|
};
|
|
21005
|
-
function
|
|
21026
|
+
function jv({ field: e, collections: t, collFields: n, subfields: r, onCollectionChange: i, onLookupFieldChange: a, addSecondaryField: s, removeSecondaryField: c, addActionButton: l, updateActionButton: u, removeActionButton: d, moduleKey: p, fieldKey: m, update: h }) {
|
|
21006
21027
|
let [g, _] = o(""), [v, y] = o({}), [b, x] = o(!1);
|
|
21007
21028
|
function S(e) {
|
|
21008
21029
|
h(e === "common" ? {
|
|
@@ -21046,13 +21067,13 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21046
21067
|
async function O() {
|
|
21047
21068
|
x(!0);
|
|
21048
21069
|
try {
|
|
21049
|
-
let e = await vc(
|
|
21070
|
+
let e = await vc(Av[p] ?? p, m, "", 50, 0), t = (Array.isArray(e) ? e : e?.data ?? []).map((e, t) => {
|
|
21050
21071
|
let n = typeof e == "object" ? e.value ?? e.label ?? "" : String(e), r = typeof e == "object" ? e.label ?? e.value ?? "" : String(e);
|
|
21051
21072
|
return {
|
|
21052
21073
|
value: String(n),
|
|
21053
21074
|
label: String(r),
|
|
21054
21075
|
variant: "badge",
|
|
21055
|
-
...
|
|
21076
|
+
...kv[t % kv.length]
|
|
21056
21077
|
};
|
|
21057
21078
|
});
|
|
21058
21079
|
if (t.length === 0) {
|
|
@@ -21098,7 +21119,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21098
21119
|
}),
|
|
21099
21120
|
/* @__PURE__ */ q("div", {
|
|
21100
21121
|
className: "uss-detail-row",
|
|
21101
|
-
children:
|
|
21122
|
+
children: Ev.map((e) => /* @__PURE__ */ J("button", {
|
|
21102
21123
|
className: `uss-render-type-btn${A === e.key ? " active" : ""}`,
|
|
21103
21124
|
onClick: () => h({
|
|
21104
21125
|
renderType: e.key,
|
|
@@ -21152,7 +21173,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21152
21173
|
padding: 0
|
|
21153
21174
|
},
|
|
21154
21175
|
onChange: (e) => C({ color: e.target.value })
|
|
21155
|
-
}), /* @__PURE__ */ q(
|
|
21176
|
+
}), /* @__PURE__ */ q(Sv, {
|
|
21156
21177
|
style: { fontSize: 10 },
|
|
21157
21178
|
children: "Text"
|
|
21158
21179
|
})]
|
|
@@ -21177,7 +21198,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21177
21198
|
padding: 0
|
|
21178
21199
|
},
|
|
21179
21200
|
onChange: (e) => C({ bg: e.target.value })
|
|
21180
|
-
}), /* @__PURE__ */ q(
|
|
21201
|
+
}), /* @__PURE__ */ q(Sv, {
|
|
21181
21202
|
style: { fontSize: 10 },
|
|
21182
21203
|
children: "BG"
|
|
21183
21204
|
})]
|
|
@@ -21224,7 +21245,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21224
21245
|
alignItems: "center",
|
|
21225
21246
|
marginBottom: 6
|
|
21226
21247
|
},
|
|
21227
|
-
children: [/* @__PURE__ */ q(
|
|
21248
|
+
children: [/* @__PURE__ */ q(Sv, {
|
|
21228
21249
|
style: {
|
|
21229
21250
|
fontSize: 11,
|
|
21230
21251
|
color: "#555",
|
|
@@ -21246,7 +21267,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21246
21267
|
})]
|
|
21247
21268
|
})]
|
|
21248
21269
|
}),
|
|
21249
|
-
ee.length === 0 && /* @__PURE__ */ q(
|
|
21270
|
+
ee.length === 0 && /* @__PURE__ */ q(Sv, {
|
|
21250
21271
|
type: "secondary",
|
|
21251
21272
|
style: { fontSize: 12 },
|
|
21252
21273
|
children: "Click \"Auto-detect values\" to populate from live data, or \"Add\" to map manually."
|
|
@@ -21291,7 +21312,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21291
21312
|
padding: 0
|
|
21292
21313
|
},
|
|
21293
21314
|
onChange: (e) => E(t, { color: e.target.value })
|
|
21294
|
-
}), /* @__PURE__ */ q(
|
|
21315
|
+
}), /* @__PURE__ */ q(Sv, {
|
|
21295
21316
|
style: { fontSize: 10 },
|
|
21296
21317
|
children: "Text"
|
|
21297
21318
|
})]
|
|
@@ -21316,7 +21337,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21316
21337
|
padding: 0
|
|
21317
21338
|
},
|
|
21318
21339
|
onChange: (e) => E(t, { bg: e.target.value })
|
|
21319
|
-
}), /* @__PURE__ */ q(
|
|
21340
|
+
}), /* @__PURE__ */ q(Sv, {
|
|
21320
21341
|
style: { fontSize: 10 },
|
|
21321
21342
|
children: "BG"
|
|
21322
21343
|
})]
|
|
@@ -21357,7 +21378,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21357
21378
|
marginTop: 8
|
|
21358
21379
|
},
|
|
21359
21380
|
children: [
|
|
21360
|
-
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
21381
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Sv, {
|
|
21361
21382
|
style: {
|
|
21362
21383
|
fontSize: 11,
|
|
21363
21384
|
color: "#555",
|
|
@@ -21381,7 +21402,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21381
21402
|
labelField: e ?? ""
|
|
21382
21403
|
} })
|
|
21383
21404
|
})] }),
|
|
21384
|
-
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
21405
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Sv, {
|
|
21385
21406
|
style: {
|
|
21386
21407
|
fontSize: 11,
|
|
21387
21408
|
color: "#555",
|
|
@@ -21405,7 +21426,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21405
21426
|
colorField: e ?? ""
|
|
21406
21427
|
} })
|
|
21407
21428
|
})] }),
|
|
21408
|
-
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
21429
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Sv, {
|
|
21409
21430
|
style: {
|
|
21410
21431
|
fontSize: 11,
|
|
21411
21432
|
color: "#555",
|
|
@@ -21467,10 +21488,10 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21467
21488
|
value: e.linkType ?? "internal",
|
|
21468
21489
|
onChange: (e) => h({ linkType: e }),
|
|
21469
21490
|
style: { width: 120 },
|
|
21470
|
-
children: [/* @__PURE__ */ q(
|
|
21491
|
+
children: [/* @__PURE__ */ q(Cv, {
|
|
21471
21492
|
value: "internal",
|
|
21472
21493
|
children: "internal"
|
|
21473
|
-
}), /* @__PURE__ */ q(
|
|
21494
|
+
}), /* @__PURE__ */ q(Cv, {
|
|
21474
21495
|
value: "external",
|
|
21475
21496
|
children: "external"
|
|
21476
21497
|
})]
|
|
@@ -21479,10 +21500,10 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21479
21500
|
value: e.linkTarget ?? "_self",
|
|
21480
21501
|
onChange: (e) => h({ linkTarget: e }),
|
|
21481
21502
|
style: { width: 100 },
|
|
21482
|
-
children: [/* @__PURE__ */ q(
|
|
21503
|
+
children: [/* @__PURE__ */ q(Cv, {
|
|
21483
21504
|
value: "_self",
|
|
21484
21505
|
children: "_self"
|
|
21485
|
-
}), /* @__PURE__ */ q(
|
|
21506
|
+
}), /* @__PURE__ */ q(Cv, {
|
|
21486
21507
|
value: "_blank",
|
|
21487
21508
|
children: "_blank"
|
|
21488
21509
|
})]
|
|
@@ -21536,7 +21557,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21536
21557
|
alignItems: "center",
|
|
21537
21558
|
gap: 8
|
|
21538
21559
|
},
|
|
21539
|
-
children: [/* @__PURE__ */ q(
|
|
21560
|
+
children: [/* @__PURE__ */ q(Sv, {
|
|
21540
21561
|
style: {
|
|
21541
21562
|
fontSize: 11,
|
|
21542
21563
|
color: "var(--color-text-muted)"
|
|
@@ -21581,7 +21602,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21581
21602
|
showSearch: !0,
|
|
21582
21603
|
placeholder: "Select collection",
|
|
21583
21604
|
style: { flex: 1 },
|
|
21584
|
-
children: t.map((e) => /* @__PURE__ */ q(
|
|
21605
|
+
children: t.map((e) => /* @__PURE__ */ q(Cv, {
|
|
21585
21606
|
value: e,
|
|
21586
21607
|
children: e
|
|
21587
21608
|
}, e))
|
|
@@ -21597,7 +21618,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21597
21618
|
onChange: (t) => a(e.fieldKey, { valueField: t }),
|
|
21598
21619
|
placeholder: "ID field",
|
|
21599
21620
|
style: { flex: 1 },
|
|
21600
|
-
children: n.map((e) => /* @__PURE__ */ q(
|
|
21621
|
+
children: n.map((e) => /* @__PURE__ */ q(Cv, {
|
|
21601
21622
|
value: e,
|
|
21602
21623
|
children: e
|
|
21603
21624
|
}, e))
|
|
@@ -21613,7 +21634,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21613
21634
|
onChange: (t) => a(e.fieldKey, { displayField: t }),
|
|
21614
21635
|
placeholder: "Label field",
|
|
21615
21636
|
style: { flex: 1 },
|
|
21616
|
-
children: [...n, ...r].map((e) => /* @__PURE__ */ q(
|
|
21637
|
+
children: [...n, ...r].map((e) => /* @__PURE__ */ q(Cv, {
|
|
21617
21638
|
value: e,
|
|
21618
21639
|
children: e
|
|
21619
21640
|
}, e))
|
|
@@ -21711,7 +21732,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21711
21732
|
gap: 8,
|
|
21712
21733
|
paddingLeft: 36
|
|
21713
21734
|
},
|
|
21714
|
-
children: [/* @__PURE__ */ q(
|
|
21735
|
+
children: [/* @__PURE__ */ q(Sv, {
|
|
21715
21736
|
style: {
|
|
21716
21737
|
fontSize: 11,
|
|
21717
21738
|
color: "#999",
|
|
@@ -21736,7 +21757,7 @@ function Nv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21736
21757
|
})
|
|
21737
21758
|
] });
|
|
21738
21759
|
}
|
|
21739
|
-
var
|
|
21760
|
+
var Mv = [
|
|
21740
21761
|
{
|
|
21741
21762
|
label: "Module data (distinct)",
|
|
21742
21763
|
value: "module"
|
|
@@ -21749,11 +21770,11 @@ var Pv = [
|
|
|
21749
21770
|
label: "Group value",
|
|
21750
21771
|
value: "group"
|
|
21751
21772
|
}
|
|
21752
|
-
],
|
|
21773
|
+
], Nv = [
|
|
21753
21774
|
"select",
|
|
21754
21775
|
"radio",
|
|
21755
21776
|
"checkbox"
|
|
21756
|
-
],
|
|
21777
|
+
], Pv = [
|
|
21757
21778
|
{
|
|
21758
21779
|
label: "Dropdown",
|
|
21759
21780
|
value: "dropdown"
|
|
@@ -21775,8 +21796,8 @@ var Pv = [
|
|
|
21775
21796
|
value: "number-range"
|
|
21776
21797
|
}
|
|
21777
21798
|
];
|
|
21778
|
-
function
|
|
21779
|
-
let s =
|
|
21799
|
+
function Fv({ field: e, update: t, configType: n, collections: r, collFields: i, onCollectionChange: a, onLookupFieldChange: o }) {
|
|
21800
|
+
let s = Nv.includes(e.type), c = !!e.lookup;
|
|
21780
21801
|
function l(e) {
|
|
21781
21802
|
t({ lookup: e ? {
|
|
21782
21803
|
collection: "",
|
|
@@ -21798,7 +21819,7 @@ function Lv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21798
21819
|
alignItems: "center",
|
|
21799
21820
|
gap: 8
|
|
21800
21821
|
},
|
|
21801
|
-
children: [/* @__PURE__ */ q(
|
|
21822
|
+
children: [/* @__PURE__ */ q(Sv, {
|
|
21802
21823
|
style: { fontSize: 12 },
|
|
21803
21824
|
children: "Editable"
|
|
21804
21825
|
}), /* @__PURE__ */ q(B, {
|
|
@@ -21813,7 +21834,7 @@ function Lv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21813
21834
|
alignItems: "center",
|
|
21814
21835
|
gap: 8
|
|
21815
21836
|
},
|
|
21816
|
-
children: [/* @__PURE__ */ q(
|
|
21837
|
+
children: [/* @__PURE__ */ q(Sv, {
|
|
21817
21838
|
style: { fontSize: 12 },
|
|
21818
21839
|
children: "Mandatory"
|
|
21819
21840
|
}), /* @__PURE__ */ q(B, {
|
|
@@ -21828,14 +21849,14 @@ function Lv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21828
21849
|
alignItems: "center",
|
|
21829
21850
|
gap: 8
|
|
21830
21851
|
},
|
|
21831
|
-
children: [/* @__PURE__ */ q(
|
|
21852
|
+
children: [/* @__PURE__ */ q(Sv, {
|
|
21832
21853
|
style: { fontSize: 12 },
|
|
21833
21854
|
children: "Value Input"
|
|
21834
21855
|
}), /* @__PURE__ */ q(I, {
|
|
21835
21856
|
size: "small",
|
|
21836
21857
|
value: e.filterInputType ?? "dropdown",
|
|
21837
21858
|
onChange: (e) => t({ filterInputType: e }),
|
|
21838
|
-
options:
|
|
21859
|
+
options: Pv,
|
|
21839
21860
|
style: { width: 140 }
|
|
21840
21861
|
})]
|
|
21841
21862
|
}),
|
|
@@ -21845,7 +21866,7 @@ function Lv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21845
21866
|
alignItems: "center",
|
|
21846
21867
|
gap: 8
|
|
21847
21868
|
},
|
|
21848
|
-
children: [/* @__PURE__ */ q(
|
|
21869
|
+
children: [/* @__PURE__ */ q(Sv, {
|
|
21849
21870
|
style: { fontSize: 12 },
|
|
21850
21871
|
children: "Default"
|
|
21851
21872
|
}), /* @__PURE__ */ q(B, {
|
|
@@ -21860,7 +21881,7 @@ function Lv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21860
21881
|
alignItems: "center",
|
|
21861
21882
|
gap: 8
|
|
21862
21883
|
},
|
|
21863
|
-
children: [/* @__PURE__ */ q(
|
|
21884
|
+
children: [/* @__PURE__ */ q(Sv, {
|
|
21864
21885
|
style: { fontSize: 12 },
|
|
21865
21886
|
children: "Lookup"
|
|
21866
21887
|
}), /* @__PURE__ */ q(B, {
|
|
@@ -21912,7 +21933,7 @@ function Lv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21912
21933
|
alignItems: "center",
|
|
21913
21934
|
gap: 8
|
|
21914
21935
|
},
|
|
21915
|
-
children: [/* @__PURE__ */ q(
|
|
21936
|
+
children: [/* @__PURE__ */ q(Sv, {
|
|
21916
21937
|
style: { fontSize: 12 },
|
|
21917
21938
|
children: "Source"
|
|
21918
21939
|
}), /* @__PURE__ */ q(I, {
|
|
@@ -21922,7 +21943,7 @@ function Lv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21922
21943
|
dataSource: e,
|
|
21923
21944
|
groupName: ""
|
|
21924
21945
|
}),
|
|
21925
|
-
options:
|
|
21946
|
+
options: Mv,
|
|
21926
21947
|
style: { width: 170 }
|
|
21927
21948
|
})]
|
|
21928
21949
|
}), (e.dataSource ?? "module") === "group" && /* @__PURE__ */ J("div", {
|
|
@@ -21931,7 +21952,7 @@ function Lv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21931
21952
|
alignItems: "center",
|
|
21932
21953
|
gap: 8
|
|
21933
21954
|
},
|
|
21934
|
-
children: [/* @__PURE__ */ q(
|
|
21955
|
+
children: [/* @__PURE__ */ q(Sv, {
|
|
21935
21956
|
style: { fontSize: 12 },
|
|
21936
21957
|
children: "Group Name"
|
|
21937
21958
|
}), /* @__PURE__ */ q(w, {
|
|
@@ -21945,7 +21966,7 @@ function Lv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21945
21966
|
]
|
|
21946
21967
|
});
|
|
21947
21968
|
}
|
|
21948
|
-
function
|
|
21969
|
+
function Iv({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onReorder: s, collections: c, onFetchCollFields: l, dragFromRef: u }) {
|
|
21949
21970
|
let [d, p] = o(!1), [m, h] = o(!1), [g, _] = o(e.fieldName), [v, y] = o([]), [b, x] = o([]), [S, C] = o(!1), [w, T] = o(!1);
|
|
21950
21971
|
r(() => {
|
|
21951
21972
|
_(e.fieldName);
|
|
@@ -22091,7 +22112,7 @@ function Rv({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onRe
|
|
|
22091
22112
|
]
|
|
22092
22113
|
}), d && /* @__PURE__ */ q("div", {
|
|
22093
22114
|
className: "uss-detail-panel",
|
|
22094
|
-
children: n === "listView" ? /* @__PURE__ */ q(
|
|
22115
|
+
children: n === "listView" ? /* @__PURE__ */ q(jv, {
|
|
22095
22116
|
field: e,
|
|
22096
22117
|
collections: c,
|
|
22097
22118
|
collFields: v,
|
|
@@ -22106,7 +22127,7 @@ function Rv({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onRe
|
|
|
22106
22127
|
moduleKey: i,
|
|
22107
22128
|
fieldKey: e.fieldKey,
|
|
22108
22129
|
update: j
|
|
22109
|
-
}) : /* @__PURE__ */ q(
|
|
22130
|
+
}) : /* @__PURE__ */ q(Fv, {
|
|
22110
22131
|
field: e,
|
|
22111
22132
|
update: j,
|
|
22112
22133
|
configType: n,
|
|
@@ -22117,7 +22138,7 @@ function Rv({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onRe
|
|
|
22117
22138
|
})
|
|
22118
22139
|
})] });
|
|
22119
22140
|
}
|
|
22120
|
-
var
|
|
22141
|
+
var Lv = {
|
|
22121
22142
|
jobs: {
|
|
22122
22143
|
title: "Jobs",
|
|
22123
22144
|
description: "Manage and configure job postings.",
|
|
@@ -22254,7 +22275,7 @@ var zv = {
|
|
|
22254
22275
|
"delete"
|
|
22255
22276
|
]
|
|
22256
22277
|
}
|
|
22257
|
-
},
|
|
22278
|
+
}, Rv = {
|
|
22258
22279
|
view: "View",
|
|
22259
22280
|
add: "Add",
|
|
22260
22281
|
edit: "Edit",
|
|
@@ -22269,7 +22290,7 @@ var zv = {
|
|
|
22269
22290
|
candidate_all: "All Candidates",
|
|
22270
22291
|
my_jobs: "My Jobs",
|
|
22271
22292
|
all_jobs: "All Jobs"
|
|
22272
|
-
},
|
|
22293
|
+
}, zv = {
|
|
22273
22294
|
candidates: {
|
|
22274
22295
|
title: "Candidate View Access",
|
|
22275
22296
|
keys: ["candidate_self", "candidate_all"],
|
|
@@ -22286,13 +22307,13 @@ var zv = {
|
|
|
22286
22307
|
control: "mixed"
|
|
22287
22308
|
}
|
|
22288
22309
|
};
|
|
22289
|
-
function
|
|
22310
|
+
function Bv(e) {
|
|
22290
22311
|
return String(e || "").replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()).trim();
|
|
22291
22312
|
}
|
|
22292
|
-
function
|
|
22293
|
-
return
|
|
22294
|
-
title:
|
|
22295
|
-
description: `Manage ${
|
|
22313
|
+
function Vv(e) {
|
|
22314
|
+
return Lv[e] ?? {
|
|
22315
|
+
title: Bv(e),
|
|
22316
|
+
description: `Manage ${Bv(e).toLowerCase()} permissions.`,
|
|
22296
22317
|
Icon: le,
|
|
22297
22318
|
order: [
|
|
22298
22319
|
"view",
|
|
@@ -22302,23 +22323,23 @@ function Uv(e) {
|
|
|
22302
22323
|
]
|
|
22303
22324
|
};
|
|
22304
22325
|
}
|
|
22305
|
-
function
|
|
22306
|
-
let n = Object.keys(t?.permissions ?? {}), r =
|
|
22326
|
+
function Hv(e, t) {
|
|
22327
|
+
let n = Object.keys(t?.permissions ?? {}), r = Vv(e).order;
|
|
22307
22328
|
return [...r.filter((e) => n.includes(e)), ...n.filter((e) => !r.includes(e))];
|
|
22308
22329
|
}
|
|
22309
|
-
function
|
|
22310
|
-
let n =
|
|
22330
|
+
function Uv(e, t) {
|
|
22331
|
+
let n = zv[e];
|
|
22311
22332
|
return n ? n.keys.filter((e) => !!t?.permissions?.[e]) : [];
|
|
22312
22333
|
}
|
|
22313
|
-
function
|
|
22314
|
-
let n =
|
|
22315
|
-
return
|
|
22334
|
+
function Wv(e, t) {
|
|
22335
|
+
let n = Uv(e, t);
|
|
22336
|
+
return Hv(e, t).filter((e) => !n.includes(e));
|
|
22316
22337
|
}
|
|
22317
|
-
function
|
|
22318
|
-
let n =
|
|
22338
|
+
function Gv(e, t) {
|
|
22339
|
+
let n = Hv(e, t);
|
|
22319
22340
|
return e === "candidates" ? n.filter((e) => e !== "candidate_self") : e === "jobs" || e === "job" ? n.filter((e) => e !== "my_jobs") : n;
|
|
22320
22341
|
}
|
|
22321
|
-
function
|
|
22342
|
+
function Kv({ user: e }) {
|
|
22322
22343
|
let [t, n] = o({}), [a, s] = o(!1), [c, l] = o(!1), [u, d] = o(!1), p = wo(e);
|
|
22323
22344
|
r(() => {
|
|
22324
22345
|
if (!p) {
|
|
@@ -22337,7 +22358,7 @@ function Jv({ user: e }) {
|
|
|
22337
22358
|
...a[t],
|
|
22338
22359
|
value: r ? "1" : "0"
|
|
22339
22360
|
};
|
|
22340
|
-
let o =
|
|
22361
|
+
let o = Uv(e, i);
|
|
22341
22362
|
return t === "view" && (e === "jobs" || e === "job") && r && o.forEach((e) => {
|
|
22342
22363
|
a[e] = {
|
|
22343
22364
|
...a[e],
|
|
@@ -22362,7 +22383,7 @@ function Jv({ user: e }) {
|
|
|
22362
22383
|
}
|
|
22363
22384
|
function _(e, t, r) {
|
|
22364
22385
|
d(!0), n((n) => {
|
|
22365
|
-
let i = n[e] ?? {}, a = { ...i.permissions ?? {} }, o =
|
|
22386
|
+
let i = n[e] ?? {}, a = { ...i.permissions ?? {} }, o = Uv(e, i);
|
|
22366
22387
|
if (e === "candidates") o.forEach((e) => {
|
|
22367
22388
|
a[e] = {
|
|
22368
22389
|
...a[e],
|
|
@@ -22456,7 +22477,7 @@ function Jv({ user: e }) {
|
|
|
22456
22477
|
}) : /* @__PURE__ */ q("div", {
|
|
22457
22478
|
className: "uperm-list",
|
|
22458
22479
|
children: h.map(([e, t]) => {
|
|
22459
|
-
let n =
|
|
22480
|
+
let n = Vv(e), { Icon: r } = n, i = Wv(e, t), a = Gv(e, t), o = Uv(e, t), s = zv[e], c = t.permissions?.view?.value === "1", l = o.find((e) => t.permissions[e]?.value === "1"), u = a.every((e) => t.permissions[e]?.value === "1");
|
|
22460
22481
|
return /* @__PURE__ */ J("section", {
|
|
22461
22482
|
className: "uperm-card",
|
|
22462
22483
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -22487,7 +22508,7 @@ function Jv({ user: e }) {
|
|
|
22487
22508
|
children: [/* @__PURE__ */ q(m, {
|
|
22488
22509
|
checked: t.permissions[n]?.value === "1",
|
|
22489
22510
|
onChange: (t) => g(e, n, t.target.checked)
|
|
22490
|
-
}), /* @__PURE__ */ q("span", { children:
|
|
22511
|
+
}), /* @__PURE__ */ q("span", { children: Rv[n] ?? Bv(n) })]
|
|
22491
22512
|
}, n))
|
|
22492
22513
|
}),
|
|
22493
22514
|
o.length > 0 && /* @__PURE__ */ J("div", {
|
|
@@ -22503,7 +22524,7 @@ function Jv({ user: e }) {
|
|
|
22503
22524
|
children: o.map((e) => /* @__PURE__ */ q(N, {
|
|
22504
22525
|
className: "uperm-scope-option",
|
|
22505
22526
|
value: e,
|
|
22506
|
-
children:
|
|
22527
|
+
children: Rv[e] ?? Bv(e)
|
|
22507
22528
|
}, e))
|
|
22508
22529
|
}) : /* @__PURE__ */ q("div", {
|
|
22509
22530
|
className: "uperm-scope-row",
|
|
@@ -22513,7 +22534,7 @@ function Jv({ user: e }) {
|
|
|
22513
22534
|
checked: t.permissions[n]?.value === "1",
|
|
22514
22535
|
disabled: !c || n === "my_jobs",
|
|
22515
22536
|
onChange: (t) => _(e, n, t.target.checked)
|
|
22516
|
-
}), /* @__PURE__ */ q("span", { children:
|
|
22537
|
+
}), /* @__PURE__ */ q("span", { children: Rv[n] ?? Bv(n) })]
|
|
22517
22538
|
}, n))
|
|
22518
22539
|
})]
|
|
22519
22540
|
})
|
|
@@ -22524,7 +22545,7 @@ function Jv({ user: e }) {
|
|
|
22524
22545
|
})]
|
|
22525
22546
|
});
|
|
22526
22547
|
}
|
|
22527
|
-
function
|
|
22548
|
+
function qv({ user: e, configType: t }) {
|
|
22528
22549
|
let [n, i] = o({}), [s, c] = o(!1), [l, u] = o({}), [d, p] = o("job"), [m, h] = o([]), g = a({}), _ = a(null);
|
|
22529
22550
|
r(() => {
|
|
22530
22551
|
e && (c(!0), Promise.all([Oo(e, t), jo()]).then(([e, t]) => {
|
|
@@ -22586,7 +22607,7 @@ function Yv({ user: e, configType: t }) {
|
|
|
22586
22607
|
size: "small",
|
|
22587
22608
|
activeKey: d,
|
|
22588
22609
|
onChange: p,
|
|
22589
|
-
items:
|
|
22610
|
+
items: wv.map((e) => ({
|
|
22590
22611
|
key: e.key,
|
|
22591
22612
|
label: e.label
|
|
22592
22613
|
}))
|
|
@@ -22609,7 +22630,7 @@ function Yv({ user: e, configType: t }) {
|
|
|
22609
22630
|
children: [v.length === 0 && !s && /* @__PURE__ */ q("div", {
|
|
22610
22631
|
className: "uss-empty",
|
|
22611
22632
|
children: "No fields found."
|
|
22612
|
-
}), v.map((e, n) => /* @__PURE__ */ q(
|
|
22633
|
+
}), v.map((e, n) => /* @__PURE__ */ q(Iv, {
|
|
22613
22634
|
field: e,
|
|
22614
22635
|
index: n,
|
|
22615
22636
|
configType: t,
|
|
@@ -22628,13 +22649,13 @@ function Yv({ user: e, configType: t }) {
|
|
|
22628
22649
|
size: "small",
|
|
22629
22650
|
loading: l[d],
|
|
22630
22651
|
onClick: C,
|
|
22631
|
-
children: ["Save ",
|
|
22652
|
+
children: ["Save ", wv.find((e) => e.key === d)?.label]
|
|
22632
22653
|
})
|
|
22633
22654
|
})
|
|
22634
22655
|
]
|
|
22635
22656
|
});
|
|
22636
22657
|
}
|
|
22637
|
-
function
|
|
22658
|
+
function Jv() {
|
|
22638
22659
|
let [e, t] = o(null), [i, a] = o(!1), [s, c] = o("listView"), [l, u] = o([]), [d, p] = o(0), [m, h] = o(!1), [g, _] = o(1), [v, y] = o(10), [b, x] = o(""), S = n(async ({ offset: e, limit: t, searchQuery: n } = {}) => {
|
|
22639
22660
|
h(!0);
|
|
22640
22661
|
try {
|
|
@@ -22642,7 +22663,7 @@ function Xv() {
|
|
|
22642
22663
|
offset: e,
|
|
22643
22664
|
limit: t,
|
|
22644
22665
|
searchQuery: n ?? ""
|
|
22645
|
-
}), i = (r.users ?? []).map(
|
|
22666
|
+
}), i = (r.users ?? []).map(Ov);
|
|
22646
22667
|
u(i), p(r.total ?? i.length);
|
|
22647
22668
|
} catch {
|
|
22648
22669
|
G.error("Failed to load users");
|
|
@@ -22673,7 +22694,7 @@ function Xv() {
|
|
|
22673
22694
|
label: "Name",
|
|
22674
22695
|
value: "_name",
|
|
22675
22696
|
width: 220,
|
|
22676
|
-
render: (e, t) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
22697
|
+
render: (e, t) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Sv, {
|
|
22677
22698
|
strong: !0,
|
|
22678
22699
|
style: { fontSize: 13 },
|
|
22679
22700
|
children: e
|
|
@@ -22711,7 +22732,7 @@ function Xv() {
|
|
|
22711
22732
|
})]
|
|
22712
22733
|
})
|
|
22713
22734
|
}
|
|
22714
|
-
], T = e ?
|
|
22735
|
+
], T = e ? Dv(e) : "";
|
|
22715
22736
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Ks, {
|
|
22716
22737
|
icon: /* @__PURE__ */ q(Dt, {}),
|
|
22717
22738
|
title: "Users",
|
|
@@ -22752,13 +22773,13 @@ function Xv() {
|
|
|
22752
22773
|
style: { marginBottom: 12 },
|
|
22753
22774
|
children: /* @__PURE__ */ q("div", {
|
|
22754
22775
|
className: "uss-config-toggle",
|
|
22755
|
-
children:
|
|
22776
|
+
children: Tv.map((e) => /* @__PURE__ */ q("button", {
|
|
22756
22777
|
className: `uss-config-btn${s === e.key ? " active" : ""}`,
|
|
22757
22778
|
onClick: () => c(e.key),
|
|
22758
22779
|
children: e.label
|
|
22759
22780
|
}, e.key))
|
|
22760
22781
|
})
|
|
22761
|
-
}), e && s === "permissions" ? /* @__PURE__ */ q(
|
|
22782
|
+
}), e && s === "permissions" ? /* @__PURE__ */ q(Kv, { user: e }, String(wo(e) ?? "")) : e && /* @__PURE__ */ q(qv, {
|
|
22762
22783
|
user: e,
|
|
22763
22784
|
configType: s
|
|
22764
22785
|
}, `${String(wo(e) ?? "")}-${s}`)]
|
|
@@ -22766,7 +22787,7 @@ function Xv() {
|
|
|
22766
22787
|
}
|
|
22767
22788
|
//#endregion
|
|
22768
22789
|
//#region src/pages/Modules/Admin/TeamsSection.jsx
|
|
22769
|
-
var { Text:
|
|
22790
|
+
var { Text: Yv } = U, Xv = [
|
|
22770
22791
|
{
|
|
22771
22792
|
key: "job",
|
|
22772
22793
|
label: "Jobs"
|
|
@@ -22779,7 +22800,7 @@ var { Text: Zv } = U, Qv = [
|
|
|
22779
22800
|
key: "submissions",
|
|
22780
22801
|
label: "Submissions"
|
|
22781
22802
|
}
|
|
22782
|
-
],
|
|
22803
|
+
], Zv = [
|
|
22783
22804
|
{
|
|
22784
22805
|
key: "listView",
|
|
22785
22806
|
label: "List View"
|
|
@@ -22793,7 +22814,7 @@ var { Text: Zv } = U, Qv = [
|
|
|
22793
22814
|
label: "Form"
|
|
22794
22815
|
}
|
|
22795
22816
|
];
|
|
22796
|
-
function
|
|
22817
|
+
function Qv({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
22797
22818
|
let i = a(null), [s, c] = o(!1), [l, u] = o(!1);
|
|
22798
22819
|
function d(e) {
|
|
22799
22820
|
i.current = t, e.dataTransfer.effectAllowed = "move", u(!0);
|
|
@@ -22857,7 +22878,7 @@ function ey({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
|
22857
22878
|
]
|
|
22858
22879
|
});
|
|
22859
22880
|
}
|
|
22860
|
-
function
|
|
22881
|
+
function $v({ team: e, configType: t }) {
|
|
22861
22882
|
let [n, i] = o({}), [a, s] = o(!1), [c, l] = o({}), [u, d] = o("job");
|
|
22862
22883
|
r(() => {
|
|
22863
22884
|
e && (s(!0), yo(e, t).then(i).catch(() => G.error("Failed to load field config")).finally(() => s(!1)));
|
|
@@ -22908,7 +22929,7 @@ function ty({ team: e, configType: t }) {
|
|
|
22908
22929
|
size: "small",
|
|
22909
22930
|
activeKey: u,
|
|
22910
22931
|
onChange: d,
|
|
22911
|
-
items:
|
|
22932
|
+
items: Xv.map((e) => ({
|
|
22912
22933
|
key: e.key,
|
|
22913
22934
|
label: e.label
|
|
22914
22935
|
}))
|
|
@@ -22937,7 +22958,7 @@ function ty({ team: e, configType: t }) {
|
|
|
22937
22958
|
children: [p.length === 0 && !a && /* @__PURE__ */ q("div", {
|
|
22938
22959
|
className: "uss-empty",
|
|
22939
22960
|
children: "No fields found."
|
|
22940
|
-
}), p.map((e, t) => /* @__PURE__ */ q(
|
|
22961
|
+
}), p.map((e, t) => /* @__PURE__ */ q(Qv, {
|
|
22941
22962
|
field: e,
|
|
22942
22963
|
index: t,
|
|
22943
22964
|
onToggle: h,
|
|
@@ -22951,13 +22972,13 @@ function ty({ team: e, configType: t }) {
|
|
|
22951
22972
|
size: "small",
|
|
22952
22973
|
loading: c[u],
|
|
22953
22974
|
onClick: _,
|
|
22954
|
-
children: ["Save ",
|
|
22975
|
+
children: ["Save ", Xv.find((e) => e.key === u)?.label]
|
|
22955
22976
|
})
|
|
22956
22977
|
})
|
|
22957
22978
|
]
|
|
22958
22979
|
});
|
|
22959
22980
|
}
|
|
22960
|
-
function
|
|
22981
|
+
function ey() {
|
|
22961
22982
|
let [e, t] = o(null), [i, a] = o(!1), [s, c] = o(!1), [l, u] = o("listView"), [d, p] = o([]), [m, h] = o(0), [g, _] = o(!1), [v, y] = o(""), [b, x] = o(!1), S = n(async () => {
|
|
22962
22983
|
_(!0);
|
|
22963
22984
|
try {
|
|
@@ -23104,13 +23125,13 @@ function ny() {
|
|
|
23104
23125
|
style: { marginBottom: 12 },
|
|
23105
23126
|
children: /* @__PURE__ */ q("div", {
|
|
23106
23127
|
className: "uss-config-toggle",
|
|
23107
|
-
children:
|
|
23128
|
+
children: Zv.map((e) => /* @__PURE__ */ q("button", {
|
|
23108
23129
|
className: `uss-config-btn${l === e.key ? " active" : ""}`,
|
|
23109
23130
|
onClick: () => u(e.key),
|
|
23110
23131
|
children: e.label
|
|
23111
23132
|
}, e.key))
|
|
23112
23133
|
})
|
|
23113
|
-
}), e && /* @__PURE__ */ q(
|
|
23134
|
+
}), e && /* @__PURE__ */ q($v, {
|
|
23114
23135
|
team: e,
|
|
23115
23136
|
configType: l
|
|
23116
23137
|
}, `${e?.teamId}-${l}`)]
|
|
@@ -23119,7 +23140,7 @@ function ny() {
|
|
|
23119
23140
|
}
|
|
23120
23141
|
//#endregion
|
|
23121
23142
|
//#region src/pages/Modules/Admin/RolesSection.jsx
|
|
23122
|
-
var
|
|
23143
|
+
var ty = [
|
|
23123
23144
|
{
|
|
23124
23145
|
key: "job",
|
|
23125
23146
|
label: "Jobs"
|
|
@@ -23132,7 +23153,7 @@ var ry = [
|
|
|
23132
23153
|
key: "submissions",
|
|
23133
23154
|
label: "Submissions"
|
|
23134
23155
|
}
|
|
23135
|
-
],
|
|
23156
|
+
], ny = [
|
|
23136
23157
|
{
|
|
23137
23158
|
key: "listView",
|
|
23138
23159
|
label: "List View"
|
|
@@ -23146,7 +23167,7 @@ var ry = [
|
|
|
23146
23167
|
label: "Form"
|
|
23147
23168
|
}
|
|
23148
23169
|
];
|
|
23149
|
-
function
|
|
23170
|
+
function ry({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
23150
23171
|
let i = useRef(null), [a, s] = o(!1), [c, l] = o(!1);
|
|
23151
23172
|
function u(e) {
|
|
23152
23173
|
i.current = t, e.dataTransfer.effectAllowed = "move", l(!0);
|
|
@@ -23210,7 +23231,7 @@ function ay({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
|
23210
23231
|
]
|
|
23211
23232
|
});
|
|
23212
23233
|
}
|
|
23213
|
-
function
|
|
23234
|
+
function iy({ role: e, configType: t }) {
|
|
23214
23235
|
let [n, i] = o({}), [a, s] = o(!1), [c, l] = o({}), [u, d] = o("job");
|
|
23215
23236
|
r(() => {
|
|
23216
23237
|
e && (s(!0), vo(e, t).then(i).catch(() => G.error("Failed to load field config")).finally(() => s(!1)));
|
|
@@ -23261,7 +23282,7 @@ function oy({ role: e, configType: t }) {
|
|
|
23261
23282
|
size: "small",
|
|
23262
23283
|
activeKey: u,
|
|
23263
23284
|
onChange: d,
|
|
23264
|
-
items:
|
|
23285
|
+
items: ty.map((e) => ({
|
|
23265
23286
|
key: e.key,
|
|
23266
23287
|
label: e.label
|
|
23267
23288
|
}))
|
|
@@ -23290,7 +23311,7 @@ function oy({ role: e, configType: t }) {
|
|
|
23290
23311
|
children: [p.length === 0 && !a && /* @__PURE__ */ q("div", {
|
|
23291
23312
|
className: "uss-empty",
|
|
23292
23313
|
children: "No fields found for this module."
|
|
23293
|
-
}), p.map((e, t) => /* @__PURE__ */ q(
|
|
23314
|
+
}), p.map((e, t) => /* @__PURE__ */ q(ry, {
|
|
23294
23315
|
field: e,
|
|
23295
23316
|
index: t,
|
|
23296
23317
|
onToggle: h,
|
|
@@ -23304,13 +23325,13 @@ function oy({ role: e, configType: t }) {
|
|
|
23304
23325
|
size: "small",
|
|
23305
23326
|
loading: c[u],
|
|
23306
23327
|
onClick: _,
|
|
23307
|
-
children: ["Save ",
|
|
23328
|
+
children: ["Save ", ty.find((e) => e.key === u)?.label]
|
|
23308
23329
|
})
|
|
23309
23330
|
})
|
|
23310
23331
|
]
|
|
23311
23332
|
});
|
|
23312
23333
|
}
|
|
23313
|
-
function
|
|
23334
|
+
function ay() {
|
|
23314
23335
|
let [e, t] = o(null), [i, a] = o(!1), [s, c] = o("listView"), [l, u] = o([]), [d, p] = o(0), [m, h] = o(!1), g = n(async () => {
|
|
23315
23336
|
h(!0);
|
|
23316
23337
|
try {
|
|
@@ -23397,13 +23418,13 @@ function sy() {
|
|
|
23397
23418
|
style: { marginBottom: 12 },
|
|
23398
23419
|
children: /* @__PURE__ */ q("div", {
|
|
23399
23420
|
className: "uss-config-toggle",
|
|
23400
|
-
children:
|
|
23421
|
+
children: ny.map((e) => /* @__PURE__ */ q("button", {
|
|
23401
23422
|
className: `uss-config-btn${s === e.key ? " active" : ""}`,
|
|
23402
23423
|
onClick: () => c(e.key),
|
|
23403
23424
|
children: e.label
|
|
23404
23425
|
}, e.key))
|
|
23405
23426
|
})
|
|
23406
|
-
}), e && /* @__PURE__ */ q(
|
|
23427
|
+
}), e && /* @__PURE__ */ q(iy, {
|
|
23407
23428
|
role: e,
|
|
23408
23429
|
configType: s
|
|
23409
23430
|
}, `${e?.roleId}-${s}`)]
|
|
@@ -23411,12 +23432,12 @@ function sy() {
|
|
|
23411
23432
|
}
|
|
23412
23433
|
//#endregion
|
|
23413
23434
|
//#region src/pages/Modules/Admin/PermissionsPage.jsx
|
|
23414
|
-
var
|
|
23435
|
+
var oy = [
|
|
23415
23436
|
"view",
|
|
23416
23437
|
"add",
|
|
23417
23438
|
"edit",
|
|
23418
23439
|
"delete"
|
|
23419
|
-
],
|
|
23440
|
+
], sy = {
|
|
23420
23441
|
view: "View",
|
|
23421
23442
|
add: "Add",
|
|
23422
23443
|
edit: "Edit",
|
|
@@ -23428,18 +23449,18 @@ var cy = [
|
|
|
23428
23449
|
my_jobs: "My Jobs",
|
|
23429
23450
|
all_jobs: "All Jobs"
|
|
23430
23451
|
};
|
|
23431
|
-
function
|
|
23432
|
-
return
|
|
23452
|
+
function cy(e) {
|
|
23453
|
+
return sy[e] ?? e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
23433
23454
|
}
|
|
23434
|
-
function
|
|
23435
|
-
let t =
|
|
23455
|
+
function ly(e) {
|
|
23456
|
+
let t = oy.filter((t) => e.includes(t)), n = e.filter((e) => !oy.includes(e)).sort();
|
|
23436
23457
|
return [...t, ...n];
|
|
23437
23458
|
}
|
|
23438
|
-
function
|
|
23459
|
+
function uy(e) {
|
|
23439
23460
|
let t = /* @__PURE__ */ new Set();
|
|
23440
|
-
return Object.values(e).forEach(({ permissions: e }) => Object.keys(e ?? {}).forEach((e) => t.add(e))),
|
|
23461
|
+
return Object.values(e).forEach(({ permissions: e }) => Object.keys(e ?? {}).forEach((e) => t.add(e))), ly([...t]);
|
|
23441
23462
|
}
|
|
23442
|
-
function
|
|
23463
|
+
function dy(e) {
|
|
23443
23464
|
let t = 0, n = 0;
|
|
23444
23465
|
return Object.values(e).forEach(({ permissions: e }) => {
|
|
23445
23466
|
Object.values(e ?? {}).forEach(({ value: e }) => {
|
|
@@ -23450,20 +23471,20 @@ function py(e) {
|
|
|
23450
23471
|
total: n
|
|
23451
23472
|
};
|
|
23452
23473
|
}
|
|
23453
|
-
var
|
|
23454
|
-
function
|
|
23474
|
+
var fy = "perm-module-labels", py = "perm-action-labels";
|
|
23475
|
+
function my(e) {
|
|
23455
23476
|
try {
|
|
23456
23477
|
return JSON.parse(localStorage.getItem(e) ?? "{}");
|
|
23457
23478
|
} catch {
|
|
23458
23479
|
return {};
|
|
23459
23480
|
}
|
|
23460
23481
|
}
|
|
23461
|
-
function
|
|
23482
|
+
function hy(e, t) {
|
|
23462
23483
|
try {
|
|
23463
23484
|
localStorage.setItem(e, JSON.stringify(t));
|
|
23464
23485
|
} catch {}
|
|
23465
23486
|
}
|
|
23466
|
-
function
|
|
23487
|
+
function gy({ value: e, onSave: t, className: n }) {
|
|
23467
23488
|
let [i, a] = o(!1), [s, c] = o(e);
|
|
23468
23489
|
r(() => {
|
|
23469
23490
|
c(e);
|
|
@@ -23492,7 +23513,7 @@ function vy({ value: e, onSave: t, className: n }) {
|
|
|
23492
23513
|
children: [e, /* @__PURE__ */ q(je, { className: "perm-name-edit-icon" })]
|
|
23493
23514
|
});
|
|
23494
23515
|
}
|
|
23495
|
-
function
|
|
23516
|
+
function _y({ permKey: e, entry: t, label: n, onToggle: i, onLabelSave: a }) {
|
|
23496
23517
|
let [s, c] = o(!1), [l, u] = o(n), d = t?.value === "1", f = !!t;
|
|
23497
23518
|
r(() => {
|
|
23498
23519
|
u(n);
|
|
@@ -23534,13 +23555,13 @@ function yy({ permKey: e, entry: t, label: n, onToggle: i, onLabelSave: a }) {
|
|
|
23534
23555
|
})
|
|
23535
23556
|
});
|
|
23536
23557
|
}
|
|
23537
|
-
function
|
|
23558
|
+
function vy({ menuName: e, menuData: t, permKeys: n, onChange: r, displayName: i, actionLabels: a, onModuleLabelSave: o, onActionLabelSave: s }) {
|
|
23538
23559
|
let c = t?.permissions ?? {}, l = Object.values(c).filter((e) => e?.value === "1").length, u = Object.keys(c).length, d = u > 0 && l === u;
|
|
23539
23560
|
return /* @__PURE__ */ J("div", {
|
|
23540
23561
|
className: `perm-module-card${d ? " all-on" : l > 0 && !d ? " some-on" : ""}`,
|
|
23541
23562
|
children: [/* @__PURE__ */ J("div", {
|
|
23542
23563
|
className: "perm-module-card-header",
|
|
23543
|
-
children: [/* @__PURE__ */ q(
|
|
23564
|
+
children: [/* @__PURE__ */ q(gy, {
|
|
23544
23565
|
value: i,
|
|
23545
23566
|
onSave: (t) => o(e, t),
|
|
23546
23567
|
className: "perm-module-card-name"
|
|
@@ -23554,17 +23575,17 @@ function by({ menuName: e, menuData: t, permKeys: n, onChange: r, displayName: i
|
|
|
23554
23575
|
})]
|
|
23555
23576
|
}), /* @__PURE__ */ q("div", {
|
|
23556
23577
|
className: "perm-module-card-body",
|
|
23557
|
-
children: n.map((t) => /* @__PURE__ */ q(
|
|
23578
|
+
children: n.map((t) => /* @__PURE__ */ q(_y, {
|
|
23558
23579
|
permKey: t,
|
|
23559
23580
|
entry: c[t],
|
|
23560
|
-
label: a[t] ??
|
|
23581
|
+
label: a[t] ?? cy(t),
|
|
23561
23582
|
onToggle: () => r(e, t),
|
|
23562
23583
|
onLabelSave: (e) => s(t, e)
|
|
23563
23584
|
}, t))
|
|
23564
23585
|
})]
|
|
23565
23586
|
});
|
|
23566
23587
|
}
|
|
23567
|
-
function
|
|
23588
|
+
function yy({ label: e, onSave: t, onDelete: n, loading: r }) {
|
|
23568
23589
|
let [i, a] = o(!1), [s, c] = o(e);
|
|
23569
23590
|
function l() {
|
|
23570
23591
|
a(!1);
|
|
@@ -23615,7 +23636,7 @@ function xy({ label: e, onSave: t, onDelete: n, loading: r }) {
|
|
|
23615
23636
|
})]
|
|
23616
23637
|
});
|
|
23617
23638
|
}
|
|
23618
|
-
function
|
|
23639
|
+
function by({ open: e, onClose: t }) {
|
|
23619
23640
|
let [n, i] = o("modules"), [a, s] = o([]), [c, l] = o(!1), [u, d] = o(""), [p, m] = o(!1), [h, g] = o([]), [_, v] = o(!1), [y, b] = o(""), [x, S] = o(""), [C, T] = o(!1);
|
|
23620
23641
|
r(() => {
|
|
23621
23642
|
e && (E(), D());
|
|
@@ -23737,7 +23758,7 @@ function Sy({ open: e, onClose: t }) {
|
|
|
23737
23758
|
className: "perm-empty",
|
|
23738
23759
|
style: { paddingTop: 24 },
|
|
23739
23760
|
children: "No modules found"
|
|
23740
|
-
}), a.map((e) => /* @__PURE__ */ q(
|
|
23761
|
+
}), a.map((e) => /* @__PURE__ */ q(yy, {
|
|
23741
23762
|
label: e.MENUNAME,
|
|
23742
23763
|
onSave: (t) => A(e.MENUID, t),
|
|
23743
23764
|
onDelete: () => j(e.MENUID)
|
|
@@ -23782,7 +23803,7 @@ function Sy({ open: e, onClose: t }) {
|
|
|
23782
23803
|
className: "perm-empty",
|
|
23783
23804
|
style: { paddingTop: 24 },
|
|
23784
23805
|
children: "No actions found"
|
|
23785
|
-
}), h.map((e) => /* @__PURE__ */ q(
|
|
23806
|
+
}), h.map((e) => /* @__PURE__ */ q(yy, {
|
|
23786
23807
|
label: `${e.permissionName} (${e.permissionKey})`,
|
|
23787
23808
|
onSave: (t) => ee(e.permissionId, t),
|
|
23788
23809
|
onDelete: () => N(e.permissionId)
|
|
@@ -23812,7 +23833,7 @@ function Sy({ open: e, onClose: t }) {
|
|
|
23812
23833
|
})
|
|
23813
23834
|
});
|
|
23814
23835
|
}
|
|
23815
|
-
function
|
|
23836
|
+
function xy({ role: e, moduleLabels: t, actionLabels: n, onModuleLabelSave: a, onActionLabelSave: s }) {
|
|
23816
23837
|
let [c, l] = o({}), [u, d] = o({}), [p, m] = o(!1), [h, g] = o(!1), [_, v] = o(!1), y = uo(e);
|
|
23817
23838
|
r(() => {
|
|
23818
23839
|
y && (m(!0), v(!1), Ho(y).then((e) => {
|
|
@@ -23853,7 +23874,7 @@ function Cy({ role: e, moduleLabels: t, actionLabels: n, onModuleLabelSave: a, o
|
|
|
23853
23874
|
g(!1);
|
|
23854
23875
|
}
|
|
23855
23876
|
}
|
|
23856
|
-
let S = i(() => Object.keys(u).sort(), [u]), C = i(() =>
|
|
23877
|
+
let S = i(() => Object.keys(u).sort(), [u]), C = i(() => uy(u), [u]), { enabled: w, total: T } = i(() => dy(u), [u]);
|
|
23857
23878
|
return /* @__PURE__ */ J(z, {
|
|
23858
23879
|
spinning: p,
|
|
23859
23880
|
children: [
|
|
@@ -23904,7 +23925,7 @@ function Cy({ role: e, moduleLabels: t, actionLabels: n, onModuleLabelSave: a, o
|
|
|
23904
23925
|
children: "No permission entries found for this role."
|
|
23905
23926
|
}) : /* @__PURE__ */ q("div", {
|
|
23906
23927
|
className: "perm-cards-grid",
|
|
23907
|
-
children: S.map((e) => /* @__PURE__ */ q(
|
|
23928
|
+
children: S.map((e) => /* @__PURE__ */ q(vy, {
|
|
23908
23929
|
menuName: e,
|
|
23909
23930
|
menuData: u[e],
|
|
23910
23931
|
permKeys: C,
|
|
@@ -23918,14 +23939,14 @@ function Cy({ role: e, moduleLabels: t, actionLabels: n, onModuleLabelSave: a, o
|
|
|
23918
23939
|
]
|
|
23919
23940
|
});
|
|
23920
23941
|
}
|
|
23921
|
-
function
|
|
23922
|
-
let [e, t] = o([]), [a, s] = o(!1), [c, l] = o(null), [u, d] = o(""), [p, m] = o(!1), [h, g] = o(() =>
|
|
23942
|
+
function Sy() {
|
|
23943
|
+
let [e, t] = o([]), [a, s] = o(!1), [c, l] = o(null), [u, d] = o(""), [p, m] = o(!1), [h, g] = o(() => my(fy)), [_, v] = o(() => my(py)), y = n((e, t) => {
|
|
23923
23944
|
g((n) => {
|
|
23924
23945
|
let r = {
|
|
23925
23946
|
...n,
|
|
23926
23947
|
[e]: t
|
|
23927
23948
|
};
|
|
23928
|
-
return
|
|
23949
|
+
return hy(fy, r), r;
|
|
23929
23950
|
});
|
|
23930
23951
|
}, []), b = n((e, t) => {
|
|
23931
23952
|
v((n) => {
|
|
@@ -23933,11 +23954,11 @@ function wy() {
|
|
|
23933
23954
|
...n,
|
|
23934
23955
|
[e]: t
|
|
23935
23956
|
};
|
|
23936
|
-
return
|
|
23957
|
+
return hy(py, r), r;
|
|
23937
23958
|
});
|
|
23938
23959
|
}, []);
|
|
23939
23960
|
function x() {
|
|
23940
|
-
g({}), v({}),
|
|
23961
|
+
g({}), v({}), hy(fy, {}), hy(py, {}), G.success("Labels reset to defaults");
|
|
23941
23962
|
}
|
|
23942
23963
|
let S = n(async () => {
|
|
23943
23964
|
s(!0);
|
|
@@ -24021,7 +24042,7 @@ function wy() {
|
|
|
24021
24042
|
})]
|
|
24022
24043
|
}),
|
|
24023
24044
|
bodyStyle: { padding: "12px 16px" },
|
|
24024
|
-
children: c ? /* @__PURE__ */ q(
|
|
24045
|
+
children: c ? /* @__PURE__ */ q(xy, {
|
|
24025
24046
|
role: c,
|
|
24026
24047
|
moduleLabels: h,
|
|
24027
24048
|
actionLabels: _,
|
|
@@ -24032,7 +24053,7 @@ function wy() {
|
|
|
24032
24053
|
children: "Select a role from the left to manage its permissions."
|
|
24033
24054
|
})
|
|
24034
24055
|
}),
|
|
24035
|
-
/* @__PURE__ */ q(
|
|
24056
|
+
/* @__PURE__ */ q(by, {
|
|
24036
24057
|
open: p,
|
|
24037
24058
|
onClose: () => m(!1)
|
|
24038
24059
|
})
|
|
@@ -24041,7 +24062,7 @@ function wy() {
|
|
|
24041
24062
|
}
|
|
24042
24063
|
//#endregion
|
|
24043
24064
|
//#region src/components/cards/OnboardingCard.jsx
|
|
24044
|
-
var { Title:
|
|
24065
|
+
var { Title: Cy, Text: wy } = U, Ty = [
|
|
24045
24066
|
{
|
|
24046
24067
|
label: "In Progress",
|
|
24047
24068
|
value: 107,
|
|
@@ -24067,10 +24088,10 @@ var { Title: Ty, Text: Ey } = U, Dy = [
|
|
|
24067
24088
|
color: "peach"
|
|
24068
24089
|
}
|
|
24069
24090
|
];
|
|
24070
|
-
function
|
|
24091
|
+
function Ey({ items: e = Ty }) {
|
|
24071
24092
|
return /* @__PURE__ */ q(p, {
|
|
24072
24093
|
className: "onboarding-card",
|
|
24073
|
-
title: /* @__PURE__ */ q(
|
|
24094
|
+
title: /* @__PURE__ */ q(Cy, {
|
|
24074
24095
|
level: 5,
|
|
24075
24096
|
children: "Onboarding"
|
|
24076
24097
|
}),
|
|
@@ -24089,7 +24110,7 @@ function Oy({ items: e = Dy }) {
|
|
|
24089
24110
|
children: /* @__PURE__ */ J("div", {
|
|
24090
24111
|
className: `onboarding-item ${e.color}`,
|
|
24091
24112
|
children: [
|
|
24092
|
-
/* @__PURE__ */ q(
|
|
24113
|
+
/* @__PURE__ */ q(wy, {
|
|
24093
24114
|
className: "onboarding-item-label",
|
|
24094
24115
|
children: e.label
|
|
24095
24116
|
}),
|
|
@@ -24099,7 +24120,7 @@ function Oy({ items: e = Dy }) {
|
|
|
24099
24120
|
}),
|
|
24100
24121
|
/* @__PURE__ */ q("div", {
|
|
24101
24122
|
className: "onboarding-item-footer",
|
|
24102
|
-
children: /* @__PURE__ */ q(
|
|
24123
|
+
children: /* @__PURE__ */ q(wy, {
|
|
24103
24124
|
className: "onboarding-item-sub",
|
|
24104
24125
|
children: e.sub
|
|
24105
24126
|
})
|
|
@@ -24112,7 +24133,7 @@ function Oy({ items: e = Dy }) {
|
|
|
24112
24133
|
}
|
|
24113
24134
|
//#endregion
|
|
24114
24135
|
//#region src/pages/Modules/AdminPage.jsx
|
|
24115
|
-
var { Text:
|
|
24136
|
+
var { Text: Dy, Title: Oy } = U, ky = [
|
|
24116
24137
|
{
|
|
24117
24138
|
group: "Dashboard",
|
|
24118
24139
|
items: [{
|
|
@@ -24327,7 +24348,7 @@ var { Text: ky, Title: Ay } = U, jy = [
|
|
|
24327
24348
|
}
|
|
24328
24349
|
]
|
|
24329
24350
|
}
|
|
24330
|
-
],
|
|
24351
|
+
], Ay = [
|
|
24331
24352
|
{
|
|
24332
24353
|
label: "Sourced",
|
|
24333
24354
|
count: 312,
|
|
@@ -24358,7 +24379,7 @@ var { Text: ky, Title: Ay } = U, jy = [
|
|
|
24358
24379
|
color: "#E24B4A",
|
|
24359
24380
|
pct: 10
|
|
24360
24381
|
}
|
|
24361
|
-
],
|
|
24382
|
+
], jy = [
|
|
24362
24383
|
{
|
|
24363
24384
|
name: "Tcs",
|
|
24364
24385
|
jobs: 14,
|
|
@@ -24379,7 +24400,7 @@ var { Text: ky, Title: Ay } = U, jy = [
|
|
|
24379
24400
|
jobs: 5,
|
|
24380
24401
|
candidates: 38
|
|
24381
24402
|
}
|
|
24382
|
-
],
|
|
24403
|
+
], My = [
|
|
24383
24404
|
{
|
|
24384
24405
|
text: "New candidate Ravi Kumar added to Java Developer role",
|
|
24385
24406
|
time: "2 min ago",
|
|
@@ -24406,7 +24427,7 @@ var { Text: ky, Title: Ay } = U, jy = [
|
|
|
24406
24427
|
color: "#E24B4A"
|
|
24407
24428
|
}
|
|
24408
24429
|
];
|
|
24409
|
-
function
|
|
24430
|
+
function Ny() {
|
|
24410
24431
|
return /* @__PURE__ */ J("div", {
|
|
24411
24432
|
style: {
|
|
24412
24433
|
display: "flex",
|
|
@@ -24419,11 +24440,11 @@ function Fy() {
|
|
|
24419
24440
|
title: "Admin Dashboard",
|
|
24420
24441
|
children: [
|
|
24421
24442
|
/* @__PURE__ */ q("div", { className: "admin-accent-bar" }),
|
|
24422
|
-
/* @__PURE__ */ q(
|
|
24443
|
+
/* @__PURE__ */ q(Oy, {
|
|
24423
24444
|
level: 5,
|
|
24424
24445
|
children: "Admin Dashboard"
|
|
24425
24446
|
}),
|
|
24426
|
-
/* @__PURE__ */ q(
|
|
24447
|
+
/* @__PURE__ */ q(Dy, {
|
|
24427
24448
|
type: "secondary",
|
|
24428
24449
|
children: "Overview of jobs, candidates, onboarding and recent activity"
|
|
24429
24450
|
})
|
|
@@ -24431,7 +24452,7 @@ function Fy() {
|
|
|
24431
24452
|
}),
|
|
24432
24453
|
/* @__PURE__ */ q("div", {
|
|
24433
24454
|
className: "admin-dashboard-stats",
|
|
24434
|
-
children: /* @__PURE__ */ q(
|
|
24455
|
+
children: /* @__PURE__ */ q(p_, { stats: [
|
|
24435
24456
|
{
|
|
24436
24457
|
label: "Total Jobs",
|
|
24437
24458
|
value: 1697,
|
|
@@ -24461,18 +24482,18 @@ function Fy() {
|
|
|
24461
24482
|
}),
|
|
24462
24483
|
/* @__PURE__ */ J("div", {
|
|
24463
24484
|
className: "admin-dashboard-mid-row",
|
|
24464
|
-
children: [/* @__PURE__ */ q(
|
|
24485
|
+
children: [/* @__PURE__ */ q(Ey, {}), /* @__PURE__ */ J(Ks, {
|
|
24465
24486
|
icon: /* @__PURE__ */ q(le, {}),
|
|
24466
24487
|
title: "Candidate Pipeline",
|
|
24467
24488
|
children: [
|
|
24468
|
-
/* @__PURE__ */ q(
|
|
24489
|
+
/* @__PURE__ */ q(Dy, {
|
|
24469
24490
|
type: "secondary",
|
|
24470
24491
|
style: { fontSize: 12 },
|
|
24471
24492
|
children: "By stage (892 total)"
|
|
24472
24493
|
}),
|
|
24473
24494
|
/* @__PURE__ */ q("div", {
|
|
24474
24495
|
className: "admin-pipeline-bar",
|
|
24475
|
-
children:
|
|
24496
|
+
children: Ay.map((e) => /* @__PURE__ */ q("div", {
|
|
24476
24497
|
className: "admin-pipeline-seg",
|
|
24477
24498
|
style: {
|
|
24478
24499
|
width: `${e.pct}%`,
|
|
@@ -24482,7 +24503,7 @@ function Fy() {
|
|
|
24482
24503
|
}),
|
|
24483
24504
|
/* @__PURE__ */ q("div", {
|
|
24484
24505
|
className: "admin-pipeline-legend",
|
|
24485
|
-
children:
|
|
24506
|
+
children: Ay.map((e) => /* @__PURE__ */ J("div", {
|
|
24486
24507
|
className: "admin-pipeline-legend-item",
|
|
24487
24508
|
children: [
|
|
24488
24509
|
/* @__PURE__ */ q("span", {
|
|
@@ -24496,7 +24517,7 @@ function Fy() {
|
|
|
24496
24517
|
}, e.label))
|
|
24497
24518
|
}),
|
|
24498
24519
|
/* @__PURE__ */ q("div", { className: "admin-divider" }),
|
|
24499
|
-
/* @__PURE__ */ q(
|
|
24520
|
+
/* @__PURE__ */ q(Dy, {
|
|
24500
24521
|
strong: !0,
|
|
24501
24522
|
style: { fontSize: 12 },
|
|
24502
24523
|
children: "Submission status"
|
|
@@ -24507,7 +24528,7 @@ function Fy() {
|
|
|
24507
24528
|
children: [
|
|
24508
24529
|
/* @__PURE__ */ J("div", {
|
|
24509
24530
|
className: "admin-sub-status-item",
|
|
24510
|
-
children: [/* @__PURE__ */ q(
|
|
24531
|
+
children: [/* @__PURE__ */ q(Dy, {
|
|
24511
24532
|
style: { fontSize: 13 },
|
|
24512
24533
|
children: "Pending client review"
|
|
24513
24534
|
}), /* @__PURE__ */ q("span", {
|
|
@@ -24517,7 +24538,7 @@ function Fy() {
|
|
|
24517
24538
|
}),
|
|
24518
24539
|
/* @__PURE__ */ J("div", {
|
|
24519
24540
|
className: "admin-sub-status-item",
|
|
24520
|
-
children: [/* @__PURE__ */ q(
|
|
24541
|
+
children: [/* @__PURE__ */ q(Dy, {
|
|
24521
24542
|
style: { fontSize: 13 },
|
|
24522
24543
|
children: "Client approved"
|
|
24523
24544
|
}), /* @__PURE__ */ q("span", {
|
|
@@ -24527,7 +24548,7 @@ function Fy() {
|
|
|
24527
24548
|
}),
|
|
24528
24549
|
/* @__PURE__ */ J("div", {
|
|
24529
24550
|
className: "admin-sub-status-item",
|
|
24530
|
-
children: [/* @__PURE__ */ q(
|
|
24551
|
+
children: [/* @__PURE__ */ q(Dy, {
|
|
24531
24552
|
style: { fontSize: 13 },
|
|
24532
24553
|
children: "Rejected"
|
|
24533
24554
|
}), /* @__PURE__ */ q("span", {
|
|
@@ -24550,7 +24571,7 @@ function Fy() {
|
|
|
24550
24571
|
size: "small",
|
|
24551
24572
|
children: "View all"
|
|
24552
24573
|
}),
|
|
24553
|
-
children:
|
|
24574
|
+
children: jy.map((e) => /* @__PURE__ */ J("div", {
|
|
24554
24575
|
className: "admin-client-row",
|
|
24555
24576
|
children: [/* @__PURE__ */ J("div", {
|
|
24556
24577
|
className: "admin-client-left",
|
|
@@ -24578,7 +24599,7 @@ function Fy() {
|
|
|
24578
24599
|
}), /* @__PURE__ */ q(Ks, {
|
|
24579
24600
|
icon: /* @__PURE__ */ q(pe, {}),
|
|
24580
24601
|
title: "Recent Activity",
|
|
24581
|
-
children:
|
|
24602
|
+
children: My.map((e, t) => /* @__PURE__ */ J("div", {
|
|
24582
24603
|
className: "admin-activity-row",
|
|
24583
24604
|
children: [/* @__PURE__ */ q("div", {
|
|
24584
24605
|
className: "admin-activity-dot",
|
|
@@ -24606,7 +24627,7 @@ function Fy() {
|
|
|
24606
24627
|
children: [
|
|
24607
24628
|
/* @__PURE__ */ J(h, {
|
|
24608
24629
|
span: 8,
|
|
24609
|
-
children: [/* @__PURE__ */ q(
|
|
24630
|
+
children: [/* @__PURE__ */ q(Dy, {
|
|
24610
24631
|
type: "secondary",
|
|
24611
24632
|
style: {
|
|
24612
24633
|
fontSize: 12,
|
|
@@ -24619,7 +24640,7 @@ function Fy() {
|
|
|
24619
24640
|
["Templates", 2]
|
|
24620
24641
|
].map(([e, t]) => /* @__PURE__ */ J("div", {
|
|
24621
24642
|
className: "admin-cfg-overview-row",
|
|
24622
|
-
children: [/* @__PURE__ */ q(
|
|
24643
|
+
children: [/* @__PURE__ */ q(Dy, {
|
|
24623
24644
|
style: { fontSize: 12 },
|
|
24624
24645
|
children: e
|
|
24625
24646
|
}), /* @__PURE__ */ J("span", {
|
|
@@ -24630,7 +24651,7 @@ function Fy() {
|
|
|
24630
24651
|
}),
|
|
24631
24652
|
/* @__PURE__ */ J(h, {
|
|
24632
24653
|
span: 8,
|
|
24633
|
-
children: [/* @__PURE__ */ q(
|
|
24654
|
+
children: [/* @__PURE__ */ q(Dy, {
|
|
24634
24655
|
type: "secondary",
|
|
24635
24656
|
style: {
|
|
24636
24657
|
fontSize: 12,
|
|
@@ -24643,7 +24664,7 @@ function Fy() {
|
|
|
24643
24664
|
["Submissions", 2]
|
|
24644
24665
|
].map(([e, t]) => /* @__PURE__ */ J("div", {
|
|
24645
24666
|
className: "admin-cfg-overview-row",
|
|
24646
|
-
children: [/* @__PURE__ */ q(
|
|
24667
|
+
children: [/* @__PURE__ */ q(Dy, {
|
|
24647
24668
|
style: { fontSize: 12 },
|
|
24648
24669
|
children: e
|
|
24649
24670
|
}), /* @__PURE__ */ J("span", {
|
|
@@ -24654,7 +24675,7 @@ function Fy() {
|
|
|
24654
24675
|
}),
|
|
24655
24676
|
/* @__PURE__ */ J(h, {
|
|
24656
24677
|
span: 8,
|
|
24657
|
-
children: [/* @__PURE__ */ q(
|
|
24678
|
+
children: [/* @__PURE__ */ q(Dy, {
|
|
24658
24679
|
type: "secondary",
|
|
24659
24680
|
style: {
|
|
24660
24681
|
fontSize: 12,
|
|
@@ -24667,10 +24688,10 @@ function Fy() {
|
|
|
24667
24688
|
["Config Items", 19]
|
|
24668
24689
|
].map(([e, t]) => /* @__PURE__ */ J("div", {
|
|
24669
24690
|
className: "admin-cfg-overview-row",
|
|
24670
|
-
children: [/* @__PURE__ */ q(
|
|
24691
|
+
children: [/* @__PURE__ */ q(Dy, {
|
|
24671
24692
|
style: { fontSize: 12 },
|
|
24672
24693
|
children: e
|
|
24673
|
-
}), /* @__PURE__ */ q(
|
|
24694
|
+
}), /* @__PURE__ */ q(Dy, {
|
|
24674
24695
|
strong: !0,
|
|
24675
24696
|
style: { fontSize: 12 },
|
|
24676
24697
|
children: t
|
|
@@ -24683,7 +24704,7 @@ function Fy() {
|
|
|
24683
24704
|
]
|
|
24684
24705
|
});
|
|
24685
24706
|
}
|
|
24686
|
-
function
|
|
24707
|
+
function Py({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r, setSearchText: i, allItems: a, handleNav: o }) {
|
|
24687
24708
|
return /* @__PURE__ */ J(F, {
|
|
24688
24709
|
gutter: [16, 16],
|
|
24689
24710
|
children: [
|
|
@@ -24702,11 +24723,11 @@ function Iy({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
24702
24723
|
}),
|
|
24703
24724
|
children: [
|
|
24704
24725
|
/* @__PURE__ */ q("div", { className: "admin-accent-bar" }),
|
|
24705
|
-
/* @__PURE__ */ q(
|
|
24726
|
+
/* @__PURE__ */ q(Oy, {
|
|
24706
24727
|
level: 5,
|
|
24707
24728
|
children: e?.heading
|
|
24708
24729
|
}),
|
|
24709
|
-
/* @__PURE__ */ q(
|
|
24730
|
+
/* @__PURE__ */ q(Dy, {
|
|
24710
24731
|
type: "secondary",
|
|
24711
24732
|
children: e?.desc
|
|
24712
24733
|
})
|
|
@@ -24720,7 +24741,7 @@ function Iy({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
24720
24741
|
children: /* @__PURE__ */ q(Ks, {
|
|
24721
24742
|
icon: /* @__PURE__ */ q(le, {}),
|
|
24722
24743
|
title: "Configuration Items",
|
|
24723
|
-
extra: /* @__PURE__ */ J(
|
|
24744
|
+
extra: /* @__PURE__ */ J(Dy, {
|
|
24724
24745
|
type: "secondary",
|
|
24725
24746
|
children: [
|
|
24726
24747
|
n.length,
|
|
@@ -24787,7 +24808,7 @@ function Iy({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
24787
24808
|
title: "Section Overview",
|
|
24788
24809
|
children: [/* @__PURE__ */ q("div", {
|
|
24789
24810
|
className: "admin-overview-list",
|
|
24790
|
-
children:
|
|
24811
|
+
children: ky.filter((e) => e.group !== "Dashboard").map((e) => {
|
|
24791
24812
|
let n = e.group === t?.group;
|
|
24792
24813
|
return /* @__PURE__ */ J("div", {
|
|
24793
24814
|
className: `admin-overview-item${n ? " active" : ""}`,
|
|
@@ -24835,12 +24856,12 @@ function Iy({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
24835
24856
|
]
|
|
24836
24857
|
});
|
|
24837
24858
|
}
|
|
24838
|
-
function
|
|
24839
|
-
let [e, t] = o("dashboard"), [n, r] = o(""), a = i(() =>
|
|
24859
|
+
function Fy() {
|
|
24860
|
+
let [e, t] = o("dashboard"), [n, r] = o(""), a = i(() => ky.flatMap((e) => e.items), []), s = i(() => a.find((t) => t.id === e), [a, e]), c = i(() => ky.find((t) => t.items.some((t) => t.id === e)), [e]), l = i(() => {
|
|
24840
24861
|
if (!s?.cards) return [];
|
|
24841
24862
|
let e = n.trim().toLowerCase();
|
|
24842
24863
|
return e ? s.cards.filter((t) => t.label.toLowerCase().includes(e) || t.desc.toLowerCase().includes(e)) : s.cards;
|
|
24843
|
-
}, [s, n]), u = i(() =>
|
|
24864
|
+
}, [s, n]), u = i(() => ky.map((e) => ({
|
|
24844
24865
|
key: e.group,
|
|
24845
24866
|
type: "group",
|
|
24846
24867
|
label: e.group,
|
|
@@ -24889,7 +24910,7 @@ function Ly() {
|
|
|
24889
24910
|
children: "Groups"
|
|
24890
24911
|
}), /* @__PURE__ */ q("span", {
|
|
24891
24912
|
className: "admin-sidebar-pill-value",
|
|
24892
|
-
children:
|
|
24913
|
+
children: ky.length
|
|
24893
24914
|
})]
|
|
24894
24915
|
})
|
|
24895
24916
|
}), /* @__PURE__ */ q(h, {
|
|
@@ -24919,7 +24940,7 @@ function Ly() {
|
|
|
24919
24940
|
xs: 24,
|
|
24920
24941
|
lg: 18,
|
|
24921
24942
|
xl: 19,
|
|
24922
|
-
children: e === "dashboard" ? /* @__PURE__ */ q(
|
|
24943
|
+
children: e === "dashboard" ? /* @__PURE__ */ q(Ny, {}) : s?.component === "form-groups" ? /* @__PURE__ */ q(L_, {}) : s?.component === "detail-groups" ? /* @__PURE__ */ q(Q_, {}) : s?.component === "row-actions" ? /* @__PURE__ */ q(sv, {}) : s?.component === "action-rules" ? /* @__PURE__ */ q(xv, {}) : s?.component === "users" ? /* @__PURE__ */ q(Jv, {}) : s?.component === "teams" ? /* @__PURE__ */ q(ey, {}) : s?.component === "roles" ? /* @__PURE__ */ q(ay, {}) : s?.component === "permissions" ? /* @__PURE__ */ q(Sy, {}) : /* @__PURE__ */ q(Py, {
|
|
24923
24944
|
activeSection: s,
|
|
24924
24945
|
activeGroup: c,
|
|
24925
24946
|
filteredCards: l,
|
|
@@ -24934,14 +24955,14 @@ function Ly() {
|
|
|
24934
24955
|
}
|
|
24935
24956
|
//#endregion
|
|
24936
24957
|
//#region src/pages/Modules/Jobs/JobsListPage.jsx
|
|
24937
|
-
var
|
|
24958
|
+
var Iy = [{
|
|
24938
24959
|
label: "Home",
|
|
24939
24960
|
href: "/dashboard"
|
|
24940
24961
|
}, { label: "Jobs" }];
|
|
24941
|
-
function
|
|
24962
|
+
function Ly() {
|
|
24942
24963
|
return /* @__PURE__ */ q(Vp, {
|
|
24943
24964
|
moduleName: "job",
|
|
24944
|
-
breadcrumbItems:
|
|
24965
|
+
breadcrumbItems: Iy,
|
|
24945
24966
|
actions: [{
|
|
24946
24967
|
name: "Add Notes & Share",
|
|
24947
24968
|
route: "/popup/add-notes",
|
|
@@ -24951,7 +24972,7 @@ function zy() {
|
|
|
24951
24972
|
}
|
|
24952
24973
|
//#endregion
|
|
24953
24974
|
//#region src/pages/Modules/Jobs/JobDetailPage.jsx
|
|
24954
|
-
function
|
|
24975
|
+
function Ry() {
|
|
24955
24976
|
let [e, t] = o(null);
|
|
24956
24977
|
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(qi, { items: [
|
|
24957
24978
|
{
|
|
@@ -24971,8 +24992,8 @@ function By() {
|
|
|
24971
24992
|
}
|
|
24972
24993
|
//#endregion
|
|
24973
24994
|
//#region src/pages/stickyNotesFullPage.jsx
|
|
24974
|
-
var { Title:
|
|
24975
|
-
function
|
|
24995
|
+
var { Title: zy } = U;
|
|
24996
|
+
function By() {
|
|
24976
24997
|
let e = Vt(), { state: t } = Bt(), n = t?.moduleName || "stickyNotes", r = t?.title || "Sticky Notes", i = {
|
|
24977
24998
|
...t?.request,
|
|
24978
24999
|
params: {
|
|
@@ -24997,7 +25018,7 @@ function Hy() {
|
|
|
24997
25018
|
}
|
|
24998
25019
|
//#endregion
|
|
24999
25020
|
//#region src/pages/BulkUpload/index.jsx
|
|
25000
|
-
var { Text:
|
|
25021
|
+
var { Text: Vy, Title: Hy } = U, Uy = 10 * 1024 * 1024, Wy = "/templates/test_cases_flow_template.base64.txt", Gy = "test_cases_flow_template.xlsx", Ky = "module | subModule | step_order | description | actions | key | value | expected | scenario", qy = {
|
|
25001
25022
|
idle: 0,
|
|
25002
25023
|
module_set: 1,
|
|
25003
25024
|
encoding: 1,
|
|
@@ -25006,7 +25027,7 @@ var { Text: Uy, Title: Wy } = U, Gy = 10 * 1024 * 1024, Ky = "/templates/test_ca
|
|
|
25006
25027
|
inserting: 3,
|
|
25007
25028
|
done: 4,
|
|
25008
25029
|
error: 1
|
|
25009
|
-
},
|
|
25030
|
+
}, Jy = [
|
|
25010
25031
|
{
|
|
25011
25032
|
label: "Home",
|
|
25012
25033
|
href: "/"
|
|
@@ -25020,31 +25041,31 @@ var { Text: Uy, Title: Wy } = U, Gy = 10 * 1024 * 1024, Ky = "/templates/test_ca
|
|
|
25020
25041
|
href: "/bulk-upload"
|
|
25021
25042
|
}
|
|
25022
25043
|
];
|
|
25023
|
-
function
|
|
25044
|
+
function Yy(e) {
|
|
25024
25045
|
return new Promise((t, n) => {
|
|
25025
25046
|
let r = new FileReader();
|
|
25026
25047
|
r.onload = () => t(String(r.result).split(",")[1]), r.onerror = n, r.readAsDataURL(e);
|
|
25027
25048
|
});
|
|
25028
25049
|
}
|
|
25029
|
-
function
|
|
25050
|
+
function Xy(e) {
|
|
25030
25051
|
return e.filter((e) => e.row_status === "valid").map((e) => {
|
|
25031
25052
|
let t = { ...e };
|
|
25032
25053
|
return delete t.row_status, delete t.errors, t;
|
|
25033
25054
|
});
|
|
25034
25055
|
}
|
|
25035
|
-
function
|
|
25056
|
+
function Zy(e) {
|
|
25036
25057
|
return e.flatMap((e) => (e.errors ?? []).map((t) => ({
|
|
25037
25058
|
id: e.id,
|
|
25038
25059
|
...t
|
|
25039
25060
|
})));
|
|
25040
25061
|
}
|
|
25041
|
-
function
|
|
25062
|
+
function Qy({ errors: e }) {
|
|
25042
25063
|
return /* @__PURE__ */ q("div", {
|
|
25043
25064
|
className: "bulk-tooltip-errors",
|
|
25044
25065
|
children: (e ?? []).map((e, t) => /* @__PURE__ */ q("div", { children: e.message }, `${e.field}-${t}`))
|
|
25045
25066
|
});
|
|
25046
25067
|
}
|
|
25047
|
-
function
|
|
25068
|
+
function $y({ errors: e, expanded: t, onToggle: n, onSummaryClick: r }) {
|
|
25048
25069
|
return e.length === 0 ? null : /* @__PURE__ */ J("div", {
|
|
25049
25070
|
className: "bulk-error-banner",
|
|
25050
25071
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -25075,7 +25096,7 @@ function tb({ errors: e, expanded: t, onToggle: n, onSummaryClick: r }) {
|
|
|
25075
25096
|
})]
|
|
25076
25097
|
});
|
|
25077
25098
|
}
|
|
25078
|
-
function
|
|
25099
|
+
function eb({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, saving: a, firstInvalidRowId: o, firstInvalidRowRef: s }) {
|
|
25079
25100
|
let c = e.filter((e) => e.row_status === "invalid"), l = t === "errors" ? c : e, d = c.length > 0 || a;
|
|
25080
25101
|
return /* @__PURE__ */ J(K, { children: [
|
|
25081
25102
|
/* @__PURE__ */ J(F, {
|
|
@@ -25091,7 +25112,7 @@ function nb({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
25091
25112
|
type: t === "errors" ? "primary" : "default",
|
|
25092
25113
|
onClick: () => n("errors"),
|
|
25093
25114
|
children: "Errors only"
|
|
25094
|
-
})] }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ J(
|
|
25115
|
+
})] }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ J(Vy, {
|
|
25095
25116
|
type: "secondary",
|
|
25096
25117
|
children: [e.length, " row(s)"]
|
|
25097
25118
|
}) })]
|
|
@@ -25163,7 +25184,7 @@ function nb({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
25163
25184
|
children: "Valid"
|
|
25164
25185
|
}) }),
|
|
25165
25186
|
/* @__PURE__ */ q("td", { children: n ? /* @__PURE__ */ q(H, {
|
|
25166
|
-
title: /* @__PURE__ */ q(
|
|
25187
|
+
title: /* @__PURE__ */ q(Qy, { errors: t }),
|
|
25167
25188
|
placement: "left",
|
|
25168
25189
|
children: /* @__PURE__ */ J("button", {
|
|
25169
25190
|
type: "button",
|
|
@@ -25200,11 +25221,11 @@ function nb({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
25200
25221
|
})
|
|
25201
25222
|
] });
|
|
25202
25223
|
}
|
|
25203
|
-
function
|
|
25224
|
+
function tb() {
|
|
25204
25225
|
let e = Vt(), t = i(() => An(), []), c = a(null), l = a(null), [u, d] = o([]), [m, g] = o(""), [_, v] = o("idle"), [y, b] = o(!1), [x, S] = o(null), [C, w] = o([]), [T, E] = o("all"), [D, O] = o(null), [k, A] = o(null), [j, M] = o(!1), N = u.map((e) => ({
|
|
25205
25226
|
value: e.modulename,
|
|
25206
25227
|
label: e.modulename
|
|
25207
|
-
})), P =
|
|
25228
|
+
})), P = Zy(C), L = _ === "encoding" || _ === "validating", z = !!m && !L, te = qy[_] ?? 0, ne = C.find((e) => e.row_status === "invalid")?.id, B = n(() => {
|
|
25208
25229
|
g(""), v("idle"), b(!1), S(null), w([]), E("all"), O(null), A(null), c.current && (c.current.value = "");
|
|
25209
25230
|
}, []);
|
|
25210
25231
|
r(() => {
|
|
@@ -25229,7 +25250,7 @@ function rb() {
|
|
|
25229
25250
|
v("module_set"), O({ message: "Invalid file type. Please upload an Excel .xlsx or CSV .csv file." });
|
|
25230
25251
|
return;
|
|
25231
25252
|
}
|
|
25232
|
-
if (e.size >
|
|
25253
|
+
if (e.size > Uy) {
|
|
25233
25254
|
v("module_set"), O({ message: "File must be 10 MB or smaller." });
|
|
25234
25255
|
return;
|
|
25235
25256
|
}
|
|
@@ -25238,7 +25259,7 @@ function rb() {
|
|
|
25238
25259
|
size: e.size
|
|
25239
25260
|
}), v("encoding");
|
|
25240
25261
|
try {
|
|
25241
|
-
let r = await
|
|
25262
|
+
let r = await Yy(e);
|
|
25242
25263
|
v("validating"), w((await Vm({
|
|
25243
25264
|
filename: e.name,
|
|
25244
25265
|
project: t?.name ?? "",
|
|
@@ -25254,12 +25275,12 @@ function rb() {
|
|
|
25254
25275
|
}
|
|
25255
25276
|
}, V = async () => {
|
|
25256
25277
|
try {
|
|
25257
|
-
let e = await fetch(
|
|
25278
|
+
let e = await fetch(Wy);
|
|
25258
25279
|
if (!e.ok) throw Error(`Template file not found (${e.status})`);
|
|
25259
25280
|
let t = (await e.text()).trim(), n = atob(t), r = new Uint8Array(n.length);
|
|
25260
25281
|
for (let e = 0; e < n.length; e += 1) r[e] = n.charCodeAt(e);
|
|
25261
25282
|
let i = new Blob([r], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
25262
|
-
o.href = a, o.download =
|
|
25283
|
+
o.href = a, o.download = Gy, document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(a), G.success("Sample template downloaded.");
|
|
25263
25284
|
} catch (e) {
|
|
25264
25285
|
console.error(e), G.error("Unable to download sample template.");
|
|
25265
25286
|
}
|
|
@@ -25270,7 +25291,7 @@ function rb() {
|
|
|
25270
25291
|
project: t?.name ?? "",
|
|
25271
25292
|
module: m,
|
|
25272
25293
|
uploaded_by: localStorage.getItem("user_Email") ?? "",
|
|
25273
|
-
rows:
|
|
25294
|
+
rows: Xy(C)
|
|
25274
25295
|
})), v("done"), G.success("Bulk upload saved. Redirecting to view test cases..."), window.setTimeout(() => e("/viewTestCase"), 900);
|
|
25275
25296
|
} catch (e) {
|
|
25276
25297
|
console.error(e), O(e.payload ?? {
|
|
@@ -25296,7 +25317,7 @@ function rb() {
|
|
|
25296
25317
|
align: "middle",
|
|
25297
25318
|
justify: "space-between",
|
|
25298
25319
|
className: "breadcrumb-action-wrapper",
|
|
25299
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
25320
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: Jy }) }), t?.name && /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(Vy, {
|
|
25300
25321
|
strong: !0,
|
|
25301
25322
|
children: t.name
|
|
25302
25323
|
}) })]
|
|
@@ -25305,16 +25326,16 @@ function rb() {
|
|
|
25305
25326
|
children: [
|
|
25306
25327
|
/* @__PURE__ */ J("div", {
|
|
25307
25328
|
className: "bulk-header",
|
|
25308
|
-
children: [/* @__PURE__ */ q(
|
|
25329
|
+
children: [/* @__PURE__ */ q(Hy, {
|
|
25309
25330
|
level: 3,
|
|
25310
25331
|
children: "Bulk upload test cases"
|
|
25311
25332
|
}), /* @__PURE__ */ J(R, {
|
|
25312
25333
|
direction: "vertical",
|
|
25313
25334
|
size: 4,
|
|
25314
|
-
children: [/* @__PURE__ */ q(
|
|
25335
|
+
children: [/* @__PURE__ */ q(Vy, {
|
|
25315
25336
|
type: "secondary",
|
|
25316
|
-
children:
|
|
25317
|
-
}), /* @__PURE__ */ q(
|
|
25337
|
+
children: Ky
|
|
25338
|
+
}), /* @__PURE__ */ q(Vy, {
|
|
25318
25339
|
type: "secondary",
|
|
25319
25340
|
children: "Use the sample template for the required columns. Uploaded rows are saved as Active by default."
|
|
25320
25341
|
})]
|
|
@@ -25412,7 +25433,7 @@ function rb() {
|
|
|
25412
25433
|
className: "v1-card zt-fall",
|
|
25413
25434
|
title: "3. Validation result",
|
|
25414
25435
|
children: [
|
|
25415
|
-
/* @__PURE__ */ q(
|
|
25436
|
+
/* @__PURE__ */ q($y, {
|
|
25416
25437
|
errors: P,
|
|
25417
25438
|
expanded: j,
|
|
25418
25439
|
onToggle: () => M((e) => !e),
|
|
@@ -25424,7 +25445,7 @@ function rb() {
|
|
|
25424
25445
|
message: D.message,
|
|
25425
25446
|
className: "bulk-inline-alert"
|
|
25426
25447
|
}),
|
|
25427
|
-
/* @__PURE__ */ q(
|
|
25448
|
+
/* @__PURE__ */ q(eb, {
|
|
25428
25449
|
rows: C,
|
|
25429
25450
|
view: T,
|
|
25430
25451
|
onViewChange: E,
|
|
@@ -25447,17 +25468,17 @@ function rb() {
|
|
|
25447
25468
|
/* @__PURE__ */ q(h, {
|
|
25448
25469
|
xs: 24,
|
|
25449
25470
|
md: 8,
|
|
25450
|
-
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
25471
|
+
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Vy, { children: "Total" }), /* @__PURE__ */ q("strong", { children: C.length })] })
|
|
25451
25472
|
}),
|
|
25452
25473
|
/* @__PURE__ */ q(h, {
|
|
25453
25474
|
xs: 24,
|
|
25454
25475
|
md: 8,
|
|
25455
|
-
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
25476
|
+
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Vy, { children: "Inserted" }), /* @__PURE__ */ q("strong", { children: k.inserted ?? 0 })] })
|
|
25456
25477
|
}),
|
|
25457
25478
|
/* @__PURE__ */ q(h, {
|
|
25458
25479
|
xs: 24,
|
|
25459
25480
|
md: 8,
|
|
25460
|
-
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
25481
|
+
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Vy, { children: "Failed" }), /* @__PURE__ */ q("strong", { children: k.failed ?? 0 })] })
|
|
25461
25482
|
})
|
|
25462
25483
|
]
|
|
25463
25484
|
}),
|
|
@@ -25481,7 +25502,7 @@ function rb() {
|
|
|
25481
25502
|
}
|
|
25482
25503
|
//#endregion
|
|
25483
25504
|
//#region src/services/dropdownValues/testPageValues.js
|
|
25484
|
-
var
|
|
25505
|
+
var nb = [
|
|
25485
25506
|
{
|
|
25486
25507
|
value: "navigate",
|
|
25487
25508
|
label: "Navigate"
|
|
@@ -25614,82 +25635,82 @@ var ib = [
|
|
|
25614
25635
|
value: "wait_for_text",
|
|
25615
25636
|
label: "Wait For Text"
|
|
25616
25637
|
}
|
|
25617
|
-
], { Text:
|
|
25638
|
+
], { Text: rb } = U, ib = [{
|
|
25618
25639
|
label: "Home",
|
|
25619
25640
|
href: "/"
|
|
25620
25641
|
}, {
|
|
25621
25642
|
label: "Test Cases",
|
|
25622
25643
|
href: "/test-cases"
|
|
25623
|
-
}],
|
|
25644
|
+
}], ab = {
|
|
25624
25645
|
tags: "regression",
|
|
25625
25646
|
active: 1
|
|
25626
|
-
},
|
|
25647
|
+
}, ob = { module: {
|
|
25627
25648
|
dbName: "Modules",
|
|
25628
25649
|
formField: "module",
|
|
25629
25650
|
label: "Module"
|
|
25630
25651
|
} };
|
|
25631
|
-
function
|
|
25652
|
+
function sb(e = []) {
|
|
25632
25653
|
return e.map((e) => ({
|
|
25633
25654
|
value: e,
|
|
25634
25655
|
label: e
|
|
25635
25656
|
}));
|
|
25636
25657
|
}
|
|
25637
|
-
function
|
|
25658
|
+
function cb(e = "") {
|
|
25638
25659
|
return String(e ?? "").trim();
|
|
25639
25660
|
}
|
|
25640
|
-
function
|
|
25641
|
-
return
|
|
25661
|
+
function lb(e = "") {
|
|
25662
|
+
return cb(e).toLowerCase();
|
|
25642
25663
|
}
|
|
25643
|
-
function
|
|
25664
|
+
function ub(e = []) {
|
|
25644
25665
|
let t = /* @__PURE__ */ new Map();
|
|
25645
25666
|
return e.forEach((e) => {
|
|
25646
|
-
let n =
|
|
25667
|
+
let n = cb(e?.flow), r = n.toLowerCase();
|
|
25647
25668
|
n && !t.has(r) && t.set(r, n);
|
|
25648
25669
|
}), Array.from(t.values()).map((e) => ({
|
|
25649
25670
|
value: e,
|
|
25650
25671
|
label: e
|
|
25651
25672
|
}));
|
|
25652
25673
|
}
|
|
25653
|
-
function
|
|
25654
|
-
let r =
|
|
25674
|
+
function db(e = [], t, n) {
|
|
25675
|
+
let r = cb(t).toLowerCase(), i = cb(n).toLowerCase();
|
|
25655
25676
|
return e.reduce((e, t) => {
|
|
25656
|
-
let n =
|
|
25677
|
+
let n = cb(t?.module).toLowerCase(), a = cb(t?.flow).toLowerCase();
|
|
25657
25678
|
if (n !== r || a !== i) return e;
|
|
25658
25679
|
let o = Number(t?.step_order) || 0;
|
|
25659
25680
|
return Math.max(e, o);
|
|
25660
25681
|
}, 0) + 1;
|
|
25661
25682
|
}
|
|
25662
|
-
function
|
|
25683
|
+
function fb({ icon: e, title: t }) {
|
|
25663
25684
|
return /* @__PURE__ */ J(R, {
|
|
25664
25685
|
size: 10,
|
|
25665
25686
|
align: "center",
|
|
25666
25687
|
children: [/* @__PURE__ */ q("div", {
|
|
25667
25688
|
className: "v1-section-icon-box",
|
|
25668
25689
|
children: e
|
|
25669
|
-
}), /* @__PURE__ */ q(
|
|
25690
|
+
}), /* @__PURE__ */ q(rb, {
|
|
25670
25691
|
strong: !0,
|
|
25671
25692
|
className: "v1-section-label",
|
|
25672
25693
|
children: t
|
|
25673
25694
|
})]
|
|
25674
25695
|
});
|
|
25675
25696
|
}
|
|
25676
|
-
function
|
|
25697
|
+
function pb() {
|
|
25677
25698
|
let [e] = C.useForm(), [t] = C.useForm(), [a, s] = o([]), [l, u] = o([]), [d, m] = o([]), [g, _] = o(!1), [v, y] = o(!1), [b, x] = o({
|
|
25678
25699
|
open: !1,
|
|
25679
25700
|
typeKey: "module"
|
|
25680
|
-
}), [S, T] = o(!1), [E, D] = o(!1), [O, A] = o(!1), j = Vt(), M =
|
|
25701
|
+
}), [S, T] = o(!1), [E, D] = o(!1), [O, A] = o(!1), j = Vt(), M = ob[b.typeKey], ee = i(() => sb(a), [a]), N = C.useWatch("module", e), P = C.useWatch("flow", e), L = !!cb(N), z = !!cb(P), te = !L, ne = !L || !z, B = (e, t = []) => {
|
|
25681
25702
|
e === "module" && s(t);
|
|
25682
25703
|
}, re = async () => {
|
|
25683
25704
|
_(!0);
|
|
25684
25705
|
try {
|
|
25685
|
-
s((await Im(
|
|
25706
|
+
s((await Im(ob.module.dbName))?.items ?? []);
|
|
25686
25707
|
} catch (e) {
|
|
25687
25708
|
console.error("Unable to load testing options:", e), G.error("Unable to load testing options.");
|
|
25688
25709
|
} finally {
|
|
25689
25710
|
_(!1);
|
|
25690
25711
|
}
|
|
25691
25712
|
}, ie = n(async (t) => {
|
|
25692
|
-
let n =
|
|
25713
|
+
let n = cb(t);
|
|
25693
25714
|
if (u([]), m([]), e.setFieldsValue({ step_order: void 0 }), n) {
|
|
25694
25715
|
y(!0);
|
|
25695
25716
|
try {
|
|
@@ -25698,7 +25719,7 @@ function hb() {
|
|
|
25698
25719
|
offset: 0,
|
|
25699
25720
|
module: n
|
|
25700
25721
|
}), t = Array.isArray(e?.items) ? e.items : [];
|
|
25701
|
-
u(t), m(
|
|
25722
|
+
u(t), m(ub(t));
|
|
25702
25723
|
} catch (e) {
|
|
25703
25724
|
console.error("Unable to load flows:", e), G.error("Unable to load flows.");
|
|
25704
25725
|
} finally {
|
|
@@ -25706,14 +25727,14 @@ function hb() {
|
|
|
25706
25727
|
}
|
|
25707
25728
|
}
|
|
25708
25729
|
}, [e]), V = n(async (t, n, r) => {
|
|
25709
|
-
let i =
|
|
25730
|
+
let i = cb(t), a = cb(n);
|
|
25710
25731
|
if (!i || !a) {
|
|
25711
25732
|
e.setFieldsValue({ step_order: void 0 });
|
|
25712
25733
|
return;
|
|
25713
25734
|
}
|
|
25714
25735
|
D(!0);
|
|
25715
25736
|
try {
|
|
25716
|
-
e.setFieldsValue({ step_order:
|
|
25737
|
+
e.setFieldsValue({ step_order: db(r, i, a) });
|
|
25717
25738
|
} catch (e) {
|
|
25718
25739
|
console.error("Unable to load step order:", e), G.error("Unable to load step order.");
|
|
25719
25740
|
} finally {
|
|
@@ -25734,15 +25755,15 @@ function hb() {
|
|
|
25734
25755
|
]);
|
|
25735
25756
|
let ae = async (t) => {
|
|
25736
25757
|
let n = {
|
|
25737
|
-
module:
|
|
25738
|
-
flow:
|
|
25758
|
+
module: cb(t.module),
|
|
25759
|
+
flow: cb(t.flow),
|
|
25739
25760
|
step_order: Number(t.step_order),
|
|
25740
|
-
description:
|
|
25741
|
-
keyword:
|
|
25742
|
-
target:
|
|
25743
|
-
value:
|
|
25744
|
-
expected:
|
|
25745
|
-
tags: t.tags ?
|
|
25761
|
+
description: cb(t.description),
|
|
25762
|
+
keyword: lb(t.keyword),
|
|
25763
|
+
target: cb(t.target),
|
|
25764
|
+
value: cb(t.value),
|
|
25765
|
+
expected: cb(t.expected),
|
|
25766
|
+
tags: t.tags ? cb(t.tags) : ab.tags,
|
|
25746
25767
|
active: Number(t.active)
|
|
25747
25768
|
};
|
|
25748
25769
|
A(!0);
|
|
@@ -25754,26 +25775,26 @@ function hb() {
|
|
|
25754
25775
|
A(!1);
|
|
25755
25776
|
}
|
|
25756
25777
|
}, H = (t, n) => {
|
|
25757
|
-
e.setFieldsValue({ [t]:
|
|
25778
|
+
e.setFieldsValue({ [t]: cb(n) });
|
|
25758
25779
|
}, U = (t) => {
|
|
25759
25780
|
e.setFieldsValue({
|
|
25760
|
-
module:
|
|
25781
|
+
module: cb(t),
|
|
25761
25782
|
flow: void 0,
|
|
25762
25783
|
step_order: void 0,
|
|
25763
25784
|
keyword: void 0,
|
|
25764
25785
|
description: void 0,
|
|
25765
25786
|
target: void 0,
|
|
25766
|
-
tags:
|
|
25787
|
+
tags: ab.tags,
|
|
25767
25788
|
value: void 0,
|
|
25768
25789
|
expected: void 0
|
|
25769
25790
|
});
|
|
25770
25791
|
}, W = (t) => {
|
|
25771
25792
|
e.setFieldsValue({
|
|
25772
|
-
flow:
|
|
25793
|
+
flow: cb(t),
|
|
25773
25794
|
step_order: void 0
|
|
25774
25795
|
});
|
|
25775
25796
|
}, oe = (e) => {
|
|
25776
|
-
let n =
|
|
25797
|
+
let n = ob[e];
|
|
25777
25798
|
x({
|
|
25778
25799
|
open: !0,
|
|
25779
25800
|
typeKey: e
|
|
@@ -25788,7 +25809,7 @@ function hb() {
|
|
|
25788
25809
|
})), t.resetFields();
|
|
25789
25810
|
}, ce = async () => {
|
|
25790
25811
|
try {
|
|
25791
|
-
let n =
|
|
25812
|
+
let n = cb((await t.validateFields()).name), r = await Lm({
|
|
25792
25813
|
name: n,
|
|
25793
25814
|
type: M.dbName
|
|
25794
25815
|
});
|
|
@@ -25806,7 +25827,7 @@ function hb() {
|
|
|
25806
25827
|
align: "middle",
|
|
25807
25828
|
justify: "space-between",
|
|
25808
25829
|
className: "breadcrumb-action-wrapper",
|
|
25809
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
25830
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: ib }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(f, {
|
|
25810
25831
|
type: "link",
|
|
25811
25832
|
onClick: () => j("/zinnext-home"),
|
|
25812
25833
|
children: "View Table"
|
|
@@ -25821,7 +25842,7 @@ function hb() {
|
|
|
25821
25842
|
children: /* @__PURE__ */ J(R, {
|
|
25822
25843
|
align: "center",
|
|
25823
25844
|
size: 10,
|
|
25824
|
-
children: [/* @__PURE__ */ q(pt, { className: "v1-outer-icon" }), /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(
|
|
25845
|
+
children: [/* @__PURE__ */ q(pt, { className: "v1-outer-icon" }), /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(rb, {
|
|
25825
25846
|
strong: !0,
|
|
25826
25847
|
style: { fontSize: 16 },
|
|
25827
25848
|
children: "Add Test Case"
|
|
@@ -25837,16 +25858,16 @@ function hb() {
|
|
|
25837
25858
|
className: "v1-required-mark",
|
|
25838
25859
|
children: " *"
|
|
25839
25860
|
})] }),
|
|
25840
|
-
initialValues:
|
|
25861
|
+
initialValues: ab,
|
|
25841
25862
|
onFinish: ae,
|
|
25842
25863
|
autoComplete: "off",
|
|
25843
25864
|
children: [/* @__PURE__ */ q(p, {
|
|
25844
25865
|
className: "v1-card",
|
|
25845
|
-
title: /* @__PURE__ */ q(
|
|
25866
|
+
title: /* @__PURE__ */ q(fb, {
|
|
25846
25867
|
icon: /* @__PURE__ */ q(Be, {}),
|
|
25847
25868
|
title: "Test Case Details"
|
|
25848
25869
|
}),
|
|
25849
|
-
extra: /* @__PURE__ */ q(
|
|
25870
|
+
extra: /* @__PURE__ */ q(rb, {
|
|
25850
25871
|
type: "secondary",
|
|
25851
25872
|
className: "v1-card-subtitle",
|
|
25852
25873
|
children: "Module, flow, step order and execution data"
|
|
@@ -25923,8 +25944,8 @@ function hb() {
|
|
|
25923
25944
|
disabled: ne,
|
|
25924
25945
|
optionFilterProp: "label",
|
|
25925
25946
|
placeholder: "Select action",
|
|
25926
|
-
options:
|
|
25927
|
-
onChange: (t) => e.setFieldsValue({ keyword:
|
|
25947
|
+
options: nb,
|
|
25948
|
+
onChange: (t) => e.setFieldsValue({ keyword: lb(t) })
|
|
25928
25949
|
})
|
|
25929
25950
|
})
|
|
25930
25951
|
}),
|
|
@@ -26044,7 +26065,7 @@ function hb() {
|
|
|
26044
26065
|
maxLength: 100,
|
|
26045
26066
|
placeholder: `Enter ${M.label.toLowerCase()} name`,
|
|
26046
26067
|
onBlur: (e) => {
|
|
26047
|
-
t.setFieldsValue({ name:
|
|
26068
|
+
t.setFieldsValue({ name: cb(e.target.value) });
|
|
26048
26069
|
}
|
|
26049
26070
|
})
|
|
26050
26071
|
}), /* @__PURE__ */ q(C.Item, {
|
|
@@ -26061,23 +26082,23 @@ function hb() {
|
|
|
26061
26082
|
}
|
|
26062
26083
|
//#endregion
|
|
26063
26084
|
//#region src/pages/TestingPage/ZinnextTestForm.jsx
|
|
26064
|
-
var { Text:
|
|
26085
|
+
var { Text: mb } = U, hb = [{
|
|
26065
26086
|
label: "Home",
|
|
26066
26087
|
href: "/"
|
|
26067
26088
|
}, {
|
|
26068
26089
|
label: "Test Cases",
|
|
26069
26090
|
href: "/addTestCase"
|
|
26070
26091
|
}];
|
|
26071
|
-
function
|
|
26092
|
+
function gb(e = "") {
|
|
26072
26093
|
return String(e ?? "").trim();
|
|
26073
26094
|
}
|
|
26074
|
-
function
|
|
26095
|
+
function _b(e = [], t) {
|
|
26075
26096
|
return e.map((e) => ({
|
|
26076
26097
|
value: e.id,
|
|
26077
26098
|
label: e[t]
|
|
26078
26099
|
}));
|
|
26079
26100
|
}
|
|
26080
|
-
var
|
|
26101
|
+
var vb = [
|
|
26081
26102
|
{
|
|
26082
26103
|
label: "Step",
|
|
26083
26104
|
value: "step_order",
|
|
@@ -26116,22 +26137,22 @@ var bb = [
|
|
|
26116
26137
|
children: "Negative"
|
|
26117
26138
|
})
|
|
26118
26139
|
}
|
|
26119
|
-
],
|
|
26140
|
+
], yb = {
|
|
26120
26141
|
key: !1,
|
|
26121
26142
|
value: !1,
|
|
26122
26143
|
expected: !1
|
|
26123
26144
|
};
|
|
26124
|
-
function
|
|
26125
|
-
return t ? e[t] ??
|
|
26145
|
+
function bb(e, t) {
|
|
26146
|
+
return t ? e[t] ?? yb : yb;
|
|
26126
26147
|
}
|
|
26127
|
-
function
|
|
26148
|
+
function xb(e, t) {
|
|
26128
26149
|
e.setFields(t.map((e) => ({
|
|
26129
26150
|
name: e,
|
|
26130
26151
|
errors: []
|
|
26131
26152
|
})));
|
|
26132
26153
|
}
|
|
26133
|
-
function
|
|
26134
|
-
let [e] = C.useForm(), t = Vt(), [a] = Ut(), s = a.get("edit"), c = !!s, l = i(() => An(), []), [u, d] = o([]), [m, g] = o([]), [_, v] = o([]), [y, b] = o(
|
|
26154
|
+
function Sb() {
|
|
26155
|
+
let [e] = C.useForm(), t = Vt(), [a] = Ut(), s = a.get("edit"), c = !!s, l = i(() => An(), []), [u, d] = o([]), [m, g] = o([]), [_, v] = o([]), [y, b] = o(nb), [x, S] = o({}), [T, E] = o(!1), [D, O] = o(!1), [k, A] = o(!1), [j, M] = o(!1), [ee, N] = o(!1), P = C.useWatch("module", e), L = C.useWatch("submodule", e), z = C.useWatch("actions", e), te = !!P, ne = !!L, re = i(() => bb(x, z), [x, z]), ie = i(() => _b(u, "modulename"), [u]), ae = i(() => _b(m, "submodulename"), [m]), H = i(() => u.find((e) => e.id === P)?.modulename ?? "", [u, P]), U = i(() => m.find((e) => e.id === L)?.submodulename ?? "", [L, m]), W = n(async () => {
|
|
26135
26156
|
try {
|
|
26136
26157
|
let e = await Rm();
|
|
26137
26158
|
Array.isArray(e?.options) && e.options.length > 0 && b(e.options), e?.rules && typeof e.rules == "object" && S(e.rules);
|
|
@@ -26272,10 +26293,10 @@ function wb() {
|
|
|
26272
26293
|
align: "middle",
|
|
26273
26294
|
justify: "space-between",
|
|
26274
26295
|
className: "breadcrumb-action-wrapper",
|
|
26275
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
26296
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: hb }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ J(R, {
|
|
26276
26297
|
size: 6,
|
|
26277
26298
|
className: "zt-section-title",
|
|
26278
|
-
children: [/* @__PURE__ */ q(mt, {}), /* @__PURE__ */ q(
|
|
26299
|
+
children: [/* @__PURE__ */ q(mt, {}), /* @__PURE__ */ q(mb, {
|
|
26279
26300
|
strong: !0,
|
|
26280
26301
|
children: l.name
|
|
26281
26302
|
})]
|
|
@@ -26296,11 +26317,11 @@ function wb() {
|
|
|
26296
26317
|
product_parent_ID: Number(l?.id),
|
|
26297
26318
|
module_parent_ID: Number(n.module),
|
|
26298
26319
|
submodule_parent_ID: Number(n.submodule),
|
|
26299
|
-
description:
|
|
26300
|
-
actions:
|
|
26301
|
-
key:
|
|
26302
|
-
value:
|
|
26303
|
-
expected:
|
|
26320
|
+
description: gb(n.description),
|
|
26321
|
+
actions: gb(n.actions),
|
|
26322
|
+
key: gb(n.key),
|
|
26323
|
+
value: gb(n.value),
|
|
26324
|
+
expected: gb(n.expected),
|
|
26304
26325
|
scenario: +!!n.scenario,
|
|
26305
26326
|
active: +!!n.active
|
|
26306
26327
|
};
|
|
@@ -26366,7 +26387,7 @@ function wb() {
|
|
|
26366
26387
|
key: void 0,
|
|
26367
26388
|
value: void 0,
|
|
26368
26389
|
expected: void 0
|
|
26369
|
-
}),
|
|
26390
|
+
}), xb(e, [
|
|
26370
26391
|
"actions",
|
|
26371
26392
|
"key",
|
|
26372
26393
|
"value",
|
|
@@ -26397,7 +26418,7 @@ function wb() {
|
|
|
26397
26418
|
key: void 0,
|
|
26398
26419
|
value: void 0,
|
|
26399
26420
|
expected: void 0
|
|
26400
|
-
}),
|
|
26421
|
+
}), xb(e, [
|
|
26401
26422
|
"actions",
|
|
26402
26423
|
"key",
|
|
26403
26424
|
"value",
|
|
@@ -26451,7 +26472,7 @@ function wb() {
|
|
|
26451
26472
|
/* @__PURE__ */ q("span", { children: "Step Details" })
|
|
26452
26473
|
]
|
|
26453
26474
|
}),
|
|
26454
|
-
extra: /* @__PURE__ */ J(
|
|
26475
|
+
extra: /* @__PURE__ */ J(mb, {
|
|
26455
26476
|
type: "secondary",
|
|
26456
26477
|
children: [
|
|
26457
26478
|
H,
|
|
@@ -26491,13 +26512,13 @@ function wb() {
|
|
|
26491
26512
|
placeholder: "Select action",
|
|
26492
26513
|
options: y,
|
|
26493
26514
|
onChange: (t) => {
|
|
26494
|
-
let n =
|
|
26515
|
+
let n = bb(x, t);
|
|
26495
26516
|
e.setFieldsValue({
|
|
26496
26517
|
actions: t,
|
|
26497
26518
|
key: n.key ? e.getFieldValue("key") : void 0,
|
|
26498
26519
|
value: n.value ? e.getFieldValue("value") : void 0,
|
|
26499
26520
|
expected: n.expected ? e.getFieldValue("expected") : void 0
|
|
26500
|
-
}),
|
|
26521
|
+
}), xb(e, [
|
|
26501
26522
|
"key",
|
|
26502
26523
|
"value",
|
|
26503
26524
|
"expected"
|
|
@@ -26606,7 +26627,7 @@ function wb() {
|
|
|
26606
26627
|
children: /* @__PURE__ */ q(el, {
|
|
26607
26628
|
listName: "Added Steps",
|
|
26608
26629
|
loading: k,
|
|
26609
|
-
fields:
|
|
26630
|
+
fields: vb,
|
|
26610
26631
|
dataSource: _,
|
|
26611
26632
|
current: 1,
|
|
26612
26633
|
pageSize: Math.max(_.length, 1),
|
|
@@ -26622,7 +26643,7 @@ function wb() {
|
|
|
26622
26643
|
}
|
|
26623
26644
|
//#endregion
|
|
26624
26645
|
//#region src/pages/TestingPage/ManageModules.jsx
|
|
26625
|
-
var { Text:
|
|
26646
|
+
var { Text: Cb } = U, wb = [
|
|
26626
26647
|
{
|
|
26627
26648
|
label: "Home",
|
|
26628
26649
|
href: "/"
|
|
@@ -26636,7 +26657,7 @@ var { Text: Tb } = U, Eb = [
|
|
|
26636
26657
|
href: "/manageModules"
|
|
26637
26658
|
}
|
|
26638
26659
|
];
|
|
26639
|
-
function
|
|
26660
|
+
function Tb() {
|
|
26640
26661
|
let e = Vt(), t = i(() => An(), []), [a, s] = o([]), [c, l] = o({}), [u, d] = o(!1), [m, g] = o(!1), [_, v] = o(""), [y, b] = o(!1), [x, S] = o(1), [C, T] = o(10), E = n(async (e) => {
|
|
26641
26662
|
if (!e) {
|
|
26642
26663
|
s([]);
|
|
@@ -26704,7 +26725,7 @@ function Db() {
|
|
|
26704
26725
|
align: "middle",
|
|
26705
26726
|
justify: "space-between",
|
|
26706
26727
|
className: "breadcrumb-action-wrapper",
|
|
26707
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
26728
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: wb }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(f, {
|
|
26708
26729
|
type: "link",
|
|
26709
26730
|
onClick: () => e("/addTestCase"),
|
|
26710
26731
|
children: "Back to Form"
|
|
@@ -26724,7 +26745,7 @@ function Db() {
|
|
|
26724
26745
|
children: [
|
|
26725
26746
|
/* @__PURE__ */ q(mt, {}),
|
|
26726
26747
|
/* @__PURE__ */ q("span", { children: "Project:" }),
|
|
26727
|
-
/* @__PURE__ */ q(
|
|
26748
|
+
/* @__PURE__ */ q(Cb, {
|
|
26728
26749
|
strong: !0,
|
|
26729
26750
|
children: t.name
|
|
26730
26751
|
})
|
|
@@ -26800,7 +26821,7 @@ function Db() {
|
|
|
26800
26821
|
children: /* @__PURE__ */ J(R, {
|
|
26801
26822
|
direction: "vertical",
|
|
26802
26823
|
className: "zt-modal-stack",
|
|
26803
|
-
children: [/* @__PURE__ */ J(
|
|
26824
|
+
children: [/* @__PURE__ */ J(Cb, {
|
|
26804
26825
|
type: "secondary",
|
|
26805
26826
|
children: ["Project: ", /* @__PURE__ */ q("b", { children: t.name })]
|
|
26806
26827
|
}), /* @__PURE__ */ q(w, {
|
|
@@ -26817,7 +26838,7 @@ function Db() {
|
|
|
26817
26838
|
}
|
|
26818
26839
|
//#endregion
|
|
26819
26840
|
//#region src/pages/TestingPage/ManageSubmodules.jsx
|
|
26820
|
-
var { Text:
|
|
26841
|
+
var { Text: Eb } = U, Db = [
|
|
26821
26842
|
{
|
|
26822
26843
|
label: "Home",
|
|
26823
26844
|
href: "/"
|
|
@@ -26835,7 +26856,7 @@ var { Text: Ob } = U, kb = [
|
|
|
26835
26856
|
href: "/test-cases/zinnext/submodules"
|
|
26836
26857
|
}
|
|
26837
26858
|
];
|
|
26838
|
-
function
|
|
26859
|
+
function Ob() {
|
|
26839
26860
|
let e = Vt(), [t] = Ut(), a = i(() => An(), []), s = t.get("module") ?? "", [c, l] = o([]), [u, d] = o(!1), [m, g] = o(!1), [_, v] = o(""), [y, b] = o(!1), [x, S] = o(1), [C, T] = o(10), E = n(async (e, t) => {
|
|
26840
26861
|
if (!e || !t) {
|
|
26841
26862
|
l([]);
|
|
@@ -26904,7 +26925,7 @@ function Ab() {
|
|
|
26904
26925
|
align: "middle",
|
|
26905
26926
|
justify: "space-between",
|
|
26906
26927
|
className: "breadcrumb-action-wrapper",
|
|
26907
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
26928
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: Db }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(f, {
|
|
26908
26929
|
type: "link",
|
|
26909
26930
|
onClick: () => e("/manageModules"),
|
|
26910
26931
|
children: "Back to Modules"
|
|
@@ -26927,7 +26948,7 @@ function Ab() {
|
|
|
26927
26948
|
children: [
|
|
26928
26949
|
/* @__PURE__ */ q(mt, {}),
|
|
26929
26950
|
/* @__PURE__ */ q("span", { children: "Project:" }),
|
|
26930
|
-
/* @__PURE__ */ q(
|
|
26951
|
+
/* @__PURE__ */ q(Eb, {
|
|
26931
26952
|
strong: !0,
|
|
26932
26953
|
children: a.name
|
|
26933
26954
|
})
|
|
@@ -26937,7 +26958,7 @@ function Ab() {
|
|
|
26937
26958
|
children: [
|
|
26938
26959
|
/* @__PURE__ */ q(le, {}),
|
|
26939
26960
|
/* @__PURE__ */ q("span", { children: "Module:" }),
|
|
26940
|
-
/* @__PURE__ */ q(
|
|
26961
|
+
/* @__PURE__ */ q(Eb, {
|
|
26941
26962
|
strong: !0,
|
|
26942
26963
|
children: s
|
|
26943
26964
|
})
|
|
@@ -27000,7 +27021,7 @@ function Ab() {
|
|
|
27000
27021
|
children: /* @__PURE__ */ J(R, {
|
|
27001
27022
|
direction: "vertical",
|
|
27002
27023
|
className: "zt-modal-stack",
|
|
27003
|
-
children: [/* @__PURE__ */ J(
|
|
27024
|
+
children: [/* @__PURE__ */ J(Eb, {
|
|
27004
27025
|
type: "secondary",
|
|
27005
27026
|
children: [
|
|
27006
27027
|
"Project: ",
|
|
@@ -27022,7 +27043,7 @@ function Ab() {
|
|
|
27022
27043
|
}
|
|
27023
27044
|
//#endregion
|
|
27024
27045
|
//#region src/pages/TestingPage/ZinnextTableView.jsx
|
|
27025
|
-
var { Text:
|
|
27046
|
+
var { Text: kb } = U, Ab = [
|
|
27026
27047
|
{
|
|
27027
27048
|
label: "Home",
|
|
27028
27049
|
href: "/"
|
|
@@ -27036,7 +27057,7 @@ var { Text: jb } = U, Mb = [
|
|
|
27036
27057
|
href: "/viewTestCase"
|
|
27037
27058
|
}
|
|
27038
27059
|
];
|
|
27039
|
-
function
|
|
27060
|
+
function jb() {
|
|
27040
27061
|
let e = Vt(), [t, a] = o([]), [s, c] = o(0), [l, u] = o(!1), d = i(() => An(), []), [m, g] = o(""), [_, v] = o(1), [y, b] = o(20), [x, S] = o(null), C = n(async (e = {}) => {
|
|
27041
27062
|
u(!0);
|
|
27042
27063
|
try {
|
|
@@ -27096,7 +27117,7 @@ function Nb() {
|
|
|
27096
27117
|
align: "middle",
|
|
27097
27118
|
justify: "space-between",
|
|
27098
27119
|
className: "breadcrumb-action-wrapper",
|
|
27099
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
27120
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: Ab }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(f, {
|
|
27100
27121
|
type: "link",
|
|
27101
27122
|
onClick: () => e("/addTestCase"),
|
|
27102
27123
|
children: "Back to Form"
|
|
@@ -27110,7 +27131,7 @@ function Nb() {
|
|
|
27110
27131
|
className: "zt-section-title",
|
|
27111
27132
|
children: [/* @__PURE__ */ q(Tt, {}), /* @__PURE__ */ q("span", { children: "Test Flows" })]
|
|
27112
27133
|
}),
|
|
27113
|
-
extra: /* @__PURE__ */ J(
|
|
27134
|
+
extra: /* @__PURE__ */ J(kb, {
|
|
27114
27135
|
type: "secondary",
|
|
27115
27136
|
children: [s, " row(s)"]
|
|
27116
27137
|
}),
|
|
@@ -27264,17 +27285,17 @@ function Nb() {
|
|
|
27264
27285
|
}
|
|
27265
27286
|
//#endregion
|
|
27266
27287
|
//#region src/pages/TestingPage/testHomePage.jsx
|
|
27267
|
-
var
|
|
27288
|
+
var Mb = [{
|
|
27268
27289
|
label: "Home",
|
|
27269
27290
|
href: "/"
|
|
27270
27291
|
}, {
|
|
27271
27292
|
label: "Test Cases",
|
|
27272
27293
|
href: "/test-cases"
|
|
27273
27294
|
}];
|
|
27274
|
-
function
|
|
27295
|
+
function Nb() {
|
|
27275
27296
|
return /* @__PURE__ */ J("main", {
|
|
27276
27297
|
className: "jobs-list-page",
|
|
27277
|
-
children: [/* @__PURE__ */ q(qi, { items:
|
|
27298
|
+
children: [/* @__PURE__ */ q(qi, { items: Mb }), /* @__PURE__ */ q(Vp, {
|
|
27278
27299
|
moduleName: "test-flows",
|
|
27279
27300
|
rowKey: "id"
|
|
27280
27301
|
})]
|
|
@@ -27282,85 +27303,85 @@ function Fb() {
|
|
|
27282
27303
|
}
|
|
27283
27304
|
//#endregion
|
|
27284
27305
|
//#region src/pages/TestingPage/lms-test-form.jsx
|
|
27285
|
-
var { Text:
|
|
27306
|
+
var { Text: Pb } = U, Fb = [{
|
|
27286
27307
|
label: "Home",
|
|
27287
27308
|
href: "/"
|
|
27288
27309
|
}, {
|
|
27289
27310
|
label: "LMS Cases",
|
|
27290
27311
|
href: "/lms-cases"
|
|
27291
|
-
}],
|
|
27312
|
+
}], Ib = {
|
|
27292
27313
|
tags: "regression",
|
|
27293
27314
|
active: 1
|
|
27294
|
-
},
|
|
27315
|
+
}, Lb = { module: {
|
|
27295
27316
|
dbName: "Modules",
|
|
27296
27317
|
formField: "module",
|
|
27297
27318
|
label: "Module"
|
|
27298
|
-
} },
|
|
27319
|
+
} }, Rb = {
|
|
27299
27320
|
key: !1,
|
|
27300
27321
|
value: !1,
|
|
27301
27322
|
expected: !1
|
|
27302
27323
|
};
|
|
27303
|
-
function
|
|
27304
|
-
return t ? e[t] ??
|
|
27324
|
+
function zb(e, t) {
|
|
27325
|
+
return t ? e[t] ?? Rb : Rb;
|
|
27305
27326
|
}
|
|
27306
|
-
function
|
|
27327
|
+
function Bb(e, t) {
|
|
27307
27328
|
e.setFields(t.map((e) => ({
|
|
27308
27329
|
name: e,
|
|
27309
27330
|
errors: []
|
|
27310
27331
|
})));
|
|
27311
27332
|
}
|
|
27312
|
-
function
|
|
27333
|
+
function Vb(e = []) {
|
|
27313
27334
|
return e.map((e) => ({
|
|
27314
27335
|
value: e,
|
|
27315
27336
|
label: e
|
|
27316
27337
|
}));
|
|
27317
27338
|
}
|
|
27318
|
-
function
|
|
27339
|
+
function Hb(e = "") {
|
|
27319
27340
|
return String(e ?? "").trim();
|
|
27320
27341
|
}
|
|
27321
|
-
function
|
|
27342
|
+
function Ub(e = []) {
|
|
27322
27343
|
let t = /* @__PURE__ */ new Map();
|
|
27323
27344
|
return e.forEach((e) => {
|
|
27324
|
-
let n =
|
|
27345
|
+
let n = Hb(e?.flow), r = n.toLowerCase();
|
|
27325
27346
|
n && !t.has(r) && t.set(r, n);
|
|
27326
27347
|
}), Array.from(t.values()).map((e) => ({
|
|
27327
27348
|
value: e,
|
|
27328
27349
|
label: e
|
|
27329
27350
|
}));
|
|
27330
27351
|
}
|
|
27331
|
-
function
|
|
27332
|
-
let r =
|
|
27352
|
+
function Wb(e = [], t, n) {
|
|
27353
|
+
let r = Hb(t).toLowerCase(), i = Hb(n).toLowerCase();
|
|
27333
27354
|
return e.reduce((e, t) => {
|
|
27334
|
-
let n =
|
|
27355
|
+
let n = Hb(t?.module).toLowerCase(), a = Hb(t?.flow).toLowerCase();
|
|
27335
27356
|
if (n !== r || a !== i) return e;
|
|
27336
27357
|
let o = Number(t?.step_order) || 0;
|
|
27337
27358
|
return Math.max(e, o);
|
|
27338
27359
|
}, 0) + 1;
|
|
27339
27360
|
}
|
|
27340
|
-
function
|
|
27361
|
+
function Gb({ icon: e, title: t }) {
|
|
27341
27362
|
return /* @__PURE__ */ J(R, {
|
|
27342
27363
|
size: 10,
|
|
27343
27364
|
align: "center",
|
|
27344
27365
|
children: [/* @__PURE__ */ q("div", {
|
|
27345
27366
|
className: "v1-section-icon-box",
|
|
27346
27367
|
children: e
|
|
27347
|
-
}), /* @__PURE__ */ q(
|
|
27368
|
+
}), /* @__PURE__ */ q(Pb, {
|
|
27348
27369
|
strong: !0,
|
|
27349
27370
|
className: "v1-section-label",
|
|
27350
27371
|
children: t
|
|
27351
27372
|
})]
|
|
27352
27373
|
});
|
|
27353
27374
|
}
|
|
27354
|
-
function
|
|
27355
|
-
let [e] = C.useForm(), [t] = C.useForm(), [a, s] = o([]), [l, u] = o([]), [d, m] = o([]), [g, _] = o(
|
|
27375
|
+
function Kb() {
|
|
27376
|
+
let [e] = C.useForm(), [t] = C.useForm(), [a, s] = o([]), [l, u] = o([]), [d, m] = o([]), [g, _] = o(nb), [v, y] = o({}), [b, x] = o(!1), [S, T] = o(!1), [E, D] = o({
|
|
27356
27377
|
open: !1,
|
|
27357
27378
|
typeKey: "module"
|
|
27358
|
-
}), [O, A] = o(!1), [j, M] = o(!1), [ee, N] = o(!1), P = Vt(), L =
|
|
27379
|
+
}), [O, A] = o(!1), [j, M] = o(!1), [ee, N] = o(!1), P = Vt(), L = Lb[E.typeKey], z = i(() => Vb(a), [a]), te = C.useWatch("module", e), ne = C.useWatch("flow", e), B = C.useWatch("keyword", e), re = !!Hb(te), ie = !!Hb(ne), V = !re, ae = !re || !ie, H = i(() => zb(v, B), [v, B]), U = (e, t = []) => {
|
|
27359
27380
|
e === "module" && s(t);
|
|
27360
27381
|
}, W = async () => {
|
|
27361
27382
|
x(!0);
|
|
27362
27383
|
try {
|
|
27363
|
-
s((await Im(
|
|
27384
|
+
s((await Im(Lb.module.dbName))?.items ?? []);
|
|
27364
27385
|
} catch (e) {
|
|
27365
27386
|
console.error("Unable to load testing options:", e), G.error("Unable to load testing options.");
|
|
27366
27387
|
} finally {
|
|
@@ -27374,7 +27395,7 @@ function Jb() {
|
|
|
27374
27395
|
console.error("Unable to load action field rules:", e), G.error("Unable to load action validation rules.");
|
|
27375
27396
|
}
|
|
27376
27397
|
}, se = n(async (t) => {
|
|
27377
|
-
let n =
|
|
27398
|
+
let n = Hb(t);
|
|
27378
27399
|
if (u([]), m([]), e.setFieldsValue({ step_order: void 0 }), n) {
|
|
27379
27400
|
T(!0);
|
|
27380
27401
|
try {
|
|
@@ -27383,7 +27404,7 @@ function Jb() {
|
|
|
27383
27404
|
offset: 0,
|
|
27384
27405
|
module: n
|
|
27385
27406
|
}), t = Array.isArray(e?.items) ? e.items : [];
|
|
27386
|
-
u(t), m(
|
|
27407
|
+
u(t), m(Ub(t));
|
|
27387
27408
|
} catch (e) {
|
|
27388
27409
|
console.error("Unable to load flows:", e), G.error("Unable to load flows.");
|
|
27389
27410
|
} finally {
|
|
@@ -27391,14 +27412,14 @@ function Jb() {
|
|
|
27391
27412
|
}
|
|
27392
27413
|
}
|
|
27393
27414
|
}, [e]), ce = n(async (t, n, r) => {
|
|
27394
|
-
let i =
|
|
27415
|
+
let i = Hb(t), a = Hb(n);
|
|
27395
27416
|
if (!i || !a) {
|
|
27396
27417
|
e.setFieldsValue({ step_order: void 0 });
|
|
27397
27418
|
return;
|
|
27398
27419
|
}
|
|
27399
27420
|
M(!0);
|
|
27400
27421
|
try {
|
|
27401
|
-
e.setFieldsValue({ step_order:
|
|
27422
|
+
e.setFieldsValue({ step_order: Wb(r, i, a) });
|
|
27402
27423
|
} catch (e) {
|
|
27403
27424
|
console.error("Unable to load step order:", e), G.error("Unable to load step order.");
|
|
27404
27425
|
} finally {
|
|
@@ -27421,15 +27442,15 @@ function Jb() {
|
|
|
27421
27442
|
]);
|
|
27422
27443
|
let le = async (t) => {
|
|
27423
27444
|
let n = {
|
|
27424
|
-
module:
|
|
27425
|
-
flow:
|
|
27445
|
+
module: Hb(t.module),
|
|
27446
|
+
flow: Hb(t.flow),
|
|
27426
27447
|
step_order: Number(t.step_order),
|
|
27427
|
-
description:
|
|
27428
|
-
keyword:
|
|
27429
|
-
target:
|
|
27430
|
-
value:
|
|
27431
|
-
expected:
|
|
27432
|
-
tags: t.tags ?
|
|
27448
|
+
description: Hb(t.description),
|
|
27449
|
+
keyword: Hb(t.keyword),
|
|
27450
|
+
target: Hb(t.target),
|
|
27451
|
+
value: Hb(t.value),
|
|
27452
|
+
expected: Hb(t.expected),
|
|
27453
|
+
tags: t.tags ? Hb(t.tags) : Ib.tags,
|
|
27433
27454
|
active: Number(t.active)
|
|
27434
27455
|
};
|
|
27435
27456
|
N(!0);
|
|
@@ -27441,19 +27462,19 @@ function Jb() {
|
|
|
27441
27462
|
N(!1);
|
|
27442
27463
|
}
|
|
27443
27464
|
}, ue = (t, n) => {
|
|
27444
|
-
e.setFieldsValue({ [t]:
|
|
27465
|
+
e.setFieldsValue({ [t]: Hb(n) });
|
|
27445
27466
|
}, de = (t) => {
|
|
27446
27467
|
e.setFieldsValue({
|
|
27447
|
-
module:
|
|
27468
|
+
module: Hb(t),
|
|
27448
27469
|
flow: void 0,
|
|
27449
27470
|
step_order: void 0,
|
|
27450
27471
|
keyword: void 0,
|
|
27451
27472
|
description: void 0,
|
|
27452
27473
|
target: void 0,
|
|
27453
|
-
tags:
|
|
27474
|
+
tags: Ib.tags,
|
|
27454
27475
|
value: void 0,
|
|
27455
27476
|
expected: void 0
|
|
27456
|
-
}),
|
|
27477
|
+
}), Bb(e, [
|
|
27457
27478
|
"keyword",
|
|
27458
27479
|
"target",
|
|
27459
27480
|
"value",
|
|
@@ -27461,32 +27482,32 @@ function Jb() {
|
|
|
27461
27482
|
]);
|
|
27462
27483
|
}, fe = (t) => {
|
|
27463
27484
|
e.setFieldsValue({
|
|
27464
|
-
flow:
|
|
27485
|
+
flow: Hb(t),
|
|
27465
27486
|
step_order: void 0,
|
|
27466
27487
|
keyword: void 0,
|
|
27467
27488
|
target: void 0,
|
|
27468
27489
|
value: void 0,
|
|
27469
27490
|
expected: void 0
|
|
27470
|
-
}),
|
|
27491
|
+
}), Bb(e, [
|
|
27471
27492
|
"keyword",
|
|
27472
27493
|
"target",
|
|
27473
27494
|
"value",
|
|
27474
27495
|
"expected"
|
|
27475
27496
|
]);
|
|
27476
27497
|
}, pe = (t) => {
|
|
27477
|
-
let n =
|
|
27498
|
+
let n = zb(v, t);
|
|
27478
27499
|
e.setFieldsValue({
|
|
27479
|
-
keyword:
|
|
27500
|
+
keyword: Hb(t),
|
|
27480
27501
|
target: n.key ? e.getFieldValue("target") : void 0,
|
|
27481
27502
|
value: n.value ? e.getFieldValue("value") : void 0,
|
|
27482
27503
|
expected: n.expected ? e.getFieldValue("expected") : void 0
|
|
27483
|
-
}),
|
|
27504
|
+
}), Bb(e, [
|
|
27484
27505
|
"target",
|
|
27485
27506
|
"value",
|
|
27486
27507
|
"expected"
|
|
27487
27508
|
]);
|
|
27488
27509
|
}, me = (e) => {
|
|
27489
|
-
let n =
|
|
27510
|
+
let n = Lb[e];
|
|
27490
27511
|
D({
|
|
27491
27512
|
open: !0,
|
|
27492
27513
|
typeKey: e
|
|
@@ -27501,7 +27522,7 @@ function Jb() {
|
|
|
27501
27522
|
})), t.resetFields();
|
|
27502
27523
|
}, ge = async () => {
|
|
27503
27524
|
try {
|
|
27504
|
-
let n =
|
|
27525
|
+
let n = Hb((await t.validateFields()).name), r = await Lm({
|
|
27505
27526
|
name: n,
|
|
27506
27527
|
type: L.dbName
|
|
27507
27528
|
});
|
|
@@ -27519,7 +27540,7 @@ function Jb() {
|
|
|
27519
27540
|
align: "middle",
|
|
27520
27541
|
justify: "space-between",
|
|
27521
27542
|
className: "breadcrumb-action-wrapper",
|
|
27522
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
27543
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: Fb }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(f, {
|
|
27523
27544
|
type: "link",
|
|
27524
27545
|
onClick: () => P("/lms-home"),
|
|
27525
27546
|
children: "View Table"
|
|
@@ -27534,7 +27555,7 @@ function Jb() {
|
|
|
27534
27555
|
children: /* @__PURE__ */ J(R, {
|
|
27535
27556
|
align: "center",
|
|
27536
27557
|
size: 10,
|
|
27537
|
-
children: [/* @__PURE__ */ q(pt, { className: "v1-outer-icon" }), /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(
|
|
27558
|
+
children: [/* @__PURE__ */ q(pt, { className: "v1-outer-icon" }), /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(Pb, {
|
|
27538
27559
|
strong: !0,
|
|
27539
27560
|
style: { fontSize: 16 },
|
|
27540
27561
|
children: "Add LMS Case"
|
|
@@ -27550,16 +27571,16 @@ function Jb() {
|
|
|
27550
27571
|
className: "v1-required-mark",
|
|
27551
27572
|
children: " *"
|
|
27552
27573
|
})] }),
|
|
27553
|
-
initialValues:
|
|
27574
|
+
initialValues: Ib,
|
|
27554
27575
|
onFinish: le,
|
|
27555
27576
|
autoComplete: "off",
|
|
27556
27577
|
children: [/* @__PURE__ */ q(p, {
|
|
27557
27578
|
className: "v1-card",
|
|
27558
|
-
title: /* @__PURE__ */ q(
|
|
27579
|
+
title: /* @__PURE__ */ q(Gb, {
|
|
27559
27580
|
icon: /* @__PURE__ */ q(Be, {}),
|
|
27560
27581
|
title: "LMS Case Details"
|
|
27561
27582
|
}),
|
|
27562
|
-
extra: /* @__PURE__ */ q(
|
|
27583
|
+
extra: /* @__PURE__ */ q(Pb, {
|
|
27563
27584
|
type: "secondary",
|
|
27564
27585
|
className: "v1-card-subtitle",
|
|
27565
27586
|
children: "Module, flow, step order and execution data"
|
|
@@ -27769,7 +27790,7 @@ function Jb() {
|
|
|
27769
27790
|
maxLength: 100,
|
|
27770
27791
|
placeholder: `Enter ${L.label.toLowerCase()} name`,
|
|
27771
27792
|
onBlur: (e) => {
|
|
27772
|
-
t.setFieldsValue({ name:
|
|
27793
|
+
t.setFieldsValue({ name: Hb(e.target.value) });
|
|
27773
27794
|
}
|
|
27774
27795
|
})
|
|
27775
27796
|
}), /* @__PURE__ */ q(C.Item, {
|
|
@@ -27786,17 +27807,17 @@ function Jb() {
|
|
|
27786
27807
|
}
|
|
27787
27808
|
//#endregion
|
|
27788
27809
|
//#region src/pages/TestingPage/lmsHomePage.jsx
|
|
27789
|
-
var
|
|
27810
|
+
var qb = [{
|
|
27790
27811
|
label: "Home",
|
|
27791
27812
|
href: "/"
|
|
27792
27813
|
}, {
|
|
27793
27814
|
label: "LMS Cases",
|
|
27794
27815
|
href: "/lms-cases"
|
|
27795
27816
|
}];
|
|
27796
|
-
function
|
|
27817
|
+
function Jb() {
|
|
27797
27818
|
return /* @__PURE__ */ J("main", {
|
|
27798
27819
|
className: "jobs-list-page",
|
|
27799
|
-
children: [/* @__PURE__ */ q(qi, { items:
|
|
27820
|
+
children: [/* @__PURE__ */ q(qi, { items: qb }), /* @__PURE__ */ q(Vp, {
|
|
27800
27821
|
moduleName: "lms-flows",
|
|
27801
27822
|
rowKey: "id"
|
|
27802
27823
|
})]
|
|
@@ -27804,8 +27825,8 @@ function Xb() {
|
|
|
27804
27825
|
}
|
|
27805
27826
|
//#endregion
|
|
27806
27827
|
//#region src/index.js
|
|
27807
|
-
var
|
|
27828
|
+
var Yb = oh(Fy), Xb = oh(Ly), Zb = oh(Ry), Qb = oh(By), $b = oh(tb), ex = oh(pb), tx = oh(Sb), nx = oh(Tb), rx = oh(Ob), ix = oh(jb), ax = oh(Nb), ox = oh(Kb), sx = oh(Jb);
|
|
27808
27829
|
//#endregion
|
|
27809
|
-
export { X as AUTH_URL, Sa as AddFormV1,
|
|
27830
|
+
export { X as AUTH_URL, Sa as AddFormV1, Yb as AdminPage, Ca as AppAlert, wa as AppButton, Am as AppShell, Ta as AssigneeAvatars, Om as AuthGuard, qi as Breadcrumb, $b as BulkUploadPage, sn as CANDIDATES_URL, Zn as CalendarCard, Ea as CustomPagination, La as DescriptionBlock, Od as DetailHeaderCard, Pd as DetailViewPage, ku as DetailViewV1, au as DocumentViewer, Hr as DynamicCards, ng as DynamicPopup, qg as DynamicPopupRoute, Nu as DynamicTabs, af as EditFormV1, gm as Header, on as JOBS_URL, Zb as JobModuleDetailPage, Xb as JobsListPage, Vp as ListView, sx as LmsHomePage, ox as LmsTestForm, jm as Login, lh as MailPopup, nx as ManageModules, rx as ManageSubmodules, Gg as POPUP_CONFIGS, sl as ParamCardView, el as ParamListView, Sh as PreviewPopup, ah as ProjectSelect, an as SUBMISSIONS_URL, wm as Sidebar, Qb as StickyNotesFullPage, Gs as StylishDynamicTabs, Kp as TemplateEditor, ex as TestForm, ax as TestingHomePage, Gr as TipTapEditor, l_ as UserForm, e_ as VendorShareDrawer, Of as ViewSummaryWidget, Oh as WizardPopup, ix as ZinnextTableView, tx as ZinnextTestForm, jn as clearSelectedProject, Mi as colors, ln as configureCoreTheme, En as getCurrentRoleName, rr as getModuleConfig, An as getSelectedProject, wn as getStoredToken, Dn as getUserRoles, On as isTester, Tn as logout, kn as setSelectedProject, sf as useDropdownFields, kf as useDropdownValues, qp as useEditForm, cf as useFieldConfig, lf as useFilterFields, Va as useMenuPermission, oh as withAuthGuard };
|
|
27810
27831
|
|
|
27811
27832
|
//# sourceMappingURL=index.js.map
|