@realtek/core-theme 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +795 -723
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist-lib/index.js
CHANGED
|
@@ -13831,14 +13831,23 @@ function zh({ value: e = {}, onChange: t }) {
|
|
|
13831
13831
|
}), /* @__PURE__ */ q("span", { children: "Range" })]
|
|
13832
13832
|
})] });
|
|
13833
13833
|
}
|
|
13834
|
-
function Bh({ field: e,
|
|
13834
|
+
function Bh({ field: e, value: t, onChange: n }) {
|
|
13835
|
+
return /* @__PURE__ */ q(_, {
|
|
13836
|
+
value: t,
|
|
13837
|
+
onChange: n,
|
|
13838
|
+
placeholder: e.placeholder ?? "Select date",
|
|
13839
|
+
style: { width: "100%" },
|
|
13840
|
+
format: "YYYY-MM-DD"
|
|
13841
|
+
});
|
|
13842
|
+
}
|
|
13843
|
+
function Vh({ field: e, checked: t, onChange: n }) {
|
|
13835
13844
|
return /* @__PURE__ */ q(m, {
|
|
13836
13845
|
checked: t,
|
|
13837
13846
|
onChange: n,
|
|
13838
13847
|
children: e.checkboxLabel
|
|
13839
13848
|
});
|
|
13840
13849
|
}
|
|
13841
|
-
var
|
|
13850
|
+
var Hh = {
|
|
13842
13851
|
input: Nh,
|
|
13843
13852
|
text: Nh,
|
|
13844
13853
|
textarea: Ph,
|
|
@@ -13847,33 +13856,34 @@ var Vh = {
|
|
|
13847
13856
|
"search-select": Lh,
|
|
13848
13857
|
"mention-textarea": Rh,
|
|
13849
13858
|
"candidate-rate": zh,
|
|
13850
|
-
"priority-checkbox":
|
|
13859
|
+
"priority-checkbox": Vh,
|
|
13860
|
+
"date-picker": Bh
|
|
13851
13861
|
};
|
|
13852
|
-
function
|
|
13862
|
+
function Uh(e) {
|
|
13853
13863
|
return e === "priority-checkbox" ? { valuePropName: "checked" } : {};
|
|
13854
13864
|
}
|
|
13855
13865
|
//#endregion
|
|
13856
13866
|
//#region src/components/popups/dynamic/utils/popupUtils.js
|
|
13857
|
-
function
|
|
13867
|
+
function Wh(e, t) {
|
|
13858
13868
|
return e.replace(/\{(\w+)\}/g, (e, n) => t?.[n] ?? "").trim();
|
|
13859
13869
|
}
|
|
13860
|
-
function
|
|
13870
|
+
function Gh(e, t) {
|
|
13861
13871
|
if (typeof e == "string") return {
|
|
13862
13872
|
label: e,
|
|
13863
13873
|
value: e
|
|
13864
13874
|
};
|
|
13865
13875
|
if (e?.label !== void 0 && e?.value !== void 0 && !t?.labelTemplate && !t?.valueKey) return e;
|
|
13866
|
-
let { labelKey: n, valueKey: r, labelTemplate: i } = t ?? {}, a = (i ?
|
|
13876
|
+
let { labelKey: n, valueKey: r, labelTemplate: i } = t ?? {}, a = (i ? Wh(i, e) : null) || (n ? e?.[n] : null) || e?.name || e?.fullName || e?.candidateName || e?.title || e?.displayName || e?.text || e?.applicantReferenceId || e?.applicantRefrenceId || String(Object.values(e || {})[0] ?? ""), o = (r ? e?.[r] : null) ?? e?.id ?? e?._id ?? e?.applicantReferenceId ?? e?.applicantRefrenceId ?? String(Object.values(e || {})[0] ?? "");
|
|
13867
13877
|
return {
|
|
13868
13878
|
label: String(a),
|
|
13869
13879
|
value: String(o),
|
|
13870
13880
|
_raw: e
|
|
13871
13881
|
};
|
|
13872
13882
|
}
|
|
13873
|
-
function
|
|
13874
|
-
return (t?.[e.optionsKey] ?? e.defaultOptions ?? []).map((t) =>
|
|
13883
|
+
function Kh(e, t) {
|
|
13884
|
+
return (t?.[e.optionsKey] ?? e.defaultOptions ?? []).map((t) => Gh(t, e));
|
|
13875
13885
|
}
|
|
13876
|
-
function
|
|
13886
|
+
function qh(e = {}) {
|
|
13877
13887
|
return {
|
|
13878
13888
|
selectedIds: [],
|
|
13879
13889
|
selectedRecords: [],
|
|
@@ -13884,7 +13894,7 @@ function Kh(e = {}) {
|
|
|
13884
13894
|
}
|
|
13885
13895
|
//#endregion
|
|
13886
13896
|
//#region src/components/popups/dynamic/PopupFields.jsx
|
|
13887
|
-
function
|
|
13897
|
+
function Jh({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupContext: i, extraData: a, removedIds: o, setRemovedIds: s, showAlreadyAssigned: c, onValuesChange: l, getSearchHandler: u, getMentionSearchHandler: d, mentionOptions: f }) {
|
|
13888
13898
|
let p = c && a;
|
|
13889
13899
|
return !t.length && !p ? null : /* @__PURE__ */ J(K, { children: [p && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J("div", {
|
|
13890
13900
|
className: "dynamic-popup__already-assigned",
|
|
@@ -13919,7 +13929,7 @@ function qh({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupCont
|
|
|
13919
13929
|
initialValues: n,
|
|
13920
13930
|
onValuesChange: (e, t) => l(t),
|
|
13921
13931
|
children: t.map((e) => {
|
|
13922
|
-
let t = r[e.name] ??
|
|
13932
|
+
let t = r[e.name] ?? Kh(e, i), n = u(e), a = d(e), o = f[e.name] ?? [], s = Uh(e.type), c = Hh[e.type];
|
|
13923
13933
|
return /* @__PURE__ */ q(C.Item, {
|
|
13924
13934
|
name: e.name,
|
|
13925
13935
|
label: e.label,
|
|
@@ -13941,7 +13951,7 @@ function qh({ form: e, fields: t, initialValues: n, dynamicOptions: r, popupCont
|
|
|
13941
13951
|
}
|
|
13942
13952
|
//#endregion
|
|
13943
13953
|
//#region src/components/popups/dynamic/hooks/usePopupOptions.js
|
|
13944
|
-
function
|
|
13954
|
+
function Yh({ open: e, config: t, api: n, fields: i, popupContext: a, formValues: s }) {
|
|
13945
13955
|
let [c, l] = o({}), [u, d] = o(null);
|
|
13946
13956
|
return r(() => {
|
|
13947
13957
|
e || (l({}), d(null));
|
|
@@ -14008,14 +14018,14 @@ function Jh({ open: e, config: t, api: n, fields: i, popupContext: a, formValues
|
|
|
14008
14018
|
}
|
|
14009
14019
|
//#endregion
|
|
14010
14020
|
//#region src/components/popups/dynamic/hooks/usePopupSearch.js
|
|
14011
|
-
var
|
|
14012
|
-
function
|
|
14021
|
+
var Xh = 500, Zh = 3;
|
|
14022
|
+
function Qh({ api: e, popupContext: t, setDynamicOptions: n }) {
|
|
14013
14023
|
let [r, i] = o({}), s = a({}), c = a({}), l = a({});
|
|
14014
14024
|
function u(r) {
|
|
14015
14025
|
if (!r.searchFetchKey && !r.searchFetcher) return;
|
|
14016
14026
|
let i = e.searchOptions ?? e.searchFetcher;
|
|
14017
14027
|
if (typeof i == "function") return (e) => {
|
|
14018
|
-
if (clearTimeout(s.current[r.name]), e.length <
|
|
14028
|
+
if (clearTimeout(s.current[r.name]), e.length < Zh) {
|
|
14019
14029
|
n((e) => ({
|
|
14020
14030
|
...e,
|
|
14021
14031
|
[r.name]: []
|
|
@@ -14030,12 +14040,12 @@ function Zh({ api: e, popupContext: t, setDynamicOptions: n }) {
|
|
|
14030
14040
|
let t = Array.isArray(e) ? e : e?.items ?? e?.list ?? [];
|
|
14031
14041
|
n((e) => ({
|
|
14032
14042
|
...e,
|
|
14033
|
-
[r.name]: t.map((e) =>
|
|
14043
|
+
[r.name]: t.map((e) => Gh(e, r))
|
|
14034
14044
|
}));
|
|
14035
14045
|
}).catch((e) => {
|
|
14036
14046
|
a.signal.aborted || console.error(`[DynamicPopup] Search failed for field "${r.name}":`, e);
|
|
14037
14047
|
});
|
|
14038
|
-
},
|
|
14048
|
+
}, Xh);
|
|
14039
14049
|
};
|
|
14040
14050
|
}
|
|
14041
14051
|
function d(n) {
|
|
@@ -14066,7 +14076,7 @@ function Zh({ api: e, popupContext: t, setDynamicOptions: n }) {
|
|
|
14066
14076
|
}
|
|
14067
14077
|
//#endregion
|
|
14068
14078
|
//#region src/components/popups/dynamic/hooks/usePopupSubmit.js
|
|
14069
|
-
function
|
|
14079
|
+
function $h({ form: e, config: t, api: n, popupContext: r, resolvedIds: i, dynamicOptions: a, extraData: s, removedIds: c, fields: l, onClose: u, onSubmit: d }) {
|
|
14070
14080
|
let [f, p] = o(!1), [m, h] = o(null);
|
|
14071
14081
|
async function g(e) {
|
|
14072
14082
|
let t = {
|
|
@@ -14125,8 +14135,8 @@ function Qh({ form: e, config: t, api: n, popupContext: r, resolvedIds: i, dynam
|
|
|
14125
14135
|
}
|
|
14126
14136
|
//#endregion
|
|
14127
14137
|
//#region src/components/popups/dynamic/DynamicPopup.jsx
|
|
14128
|
-
function
|
|
14129
|
-
let [l] = C.useForm(), [u, d] = o({}), [f, p] = o([]), m = i(() =>
|
|
14138
|
+
function eg({ open: e = !0, config: t, context: n = {}, onClose: a, onSubmit: s, api: c = {} }) {
|
|
14139
|
+
let [l] = C.useForm(), [u, d] = o({}), [f, p] = o([]), m = i(() => qh(n), [n]), { selectedIds: h = [], selectedRecords: g = [], moduleName: _ = "" } = m, v = i(() => h.map((e, t) => {
|
|
14130
14140
|
let n = g[t];
|
|
14131
14141
|
return n?.id ?? n?._id ?? e;
|
|
14132
14142
|
}), [h, g]), y = i(() => t ? typeof t.getFields == "function" ? t.getFields(m) : t.fields ?? [] : [], [t, m]), b = i(() => {
|
|
@@ -14134,14 +14144,14 @@ function $h({ open: e = !0, config: t, context: n = {}, onClose: a, onSubmit: s,
|
|
|
14134
14144
|
return y.forEach((t) => {
|
|
14135
14145
|
t.initialValueKey && m[t.initialValueKey] !== void 0 && (e[t.name] = m[t.initialValueKey]);
|
|
14136
14146
|
}), e;
|
|
14137
|
-
}, [y, m]), { dynamicOptions: x, setDynamicOptions: S, extraData: w } =
|
|
14147
|
+
}, [y, m]), { dynamicOptions: x, setDynamicOptions: S, extraData: w } = Yh({
|
|
14138
14148
|
open: e,
|
|
14139
14149
|
config: t,
|
|
14140
14150
|
api: c,
|
|
14141
14151
|
fields: y,
|
|
14142
14152
|
popupContext: m,
|
|
14143
14153
|
formValues: u
|
|
14144
|
-
}), { mentionOptions: T, getSearchHandler: E, getMentionSearchHandler: D } =
|
|
14154
|
+
}), { mentionOptions: T, getSearchHandler: E, getMentionSearchHandler: D } = Qh({
|
|
14145
14155
|
api: c,
|
|
14146
14156
|
popupContext: m,
|
|
14147
14157
|
setDynamicOptions: S
|
|
@@ -14149,7 +14159,7 @@ function $h({ open: e = !0, config: t, context: n = {}, onClose: a, onSubmit: s,
|
|
|
14149
14159
|
function O() {
|
|
14150
14160
|
typeof a == "function" && a();
|
|
14151
14161
|
}
|
|
14152
|
-
let { handleOk: A, confirming: j, deleteError: M, resetSubmitState: ee } =
|
|
14162
|
+
let { handleOk: A, confirming: j, deleteError: M, resetSubmitState: ee } = $h({
|
|
14153
14163
|
form: l,
|
|
14154
14164
|
config: t,
|
|
14155
14165
|
api: c,
|
|
@@ -14201,7 +14211,7 @@ function $h({ open: e = !0, config: t, context: n = {}, onClose: a, onSubmit: s,
|
|
|
14201
14211
|
deleteError: M
|
|
14202
14212
|
}),
|
|
14203
14213
|
/* @__PURE__ */ q(kh, { footerNote: t.footerNote }),
|
|
14204
|
-
/* @__PURE__ */ q(
|
|
14214
|
+
/* @__PURE__ */ q(Jh, {
|
|
14205
14215
|
form: l,
|
|
14206
14216
|
fields: y,
|
|
14207
14217
|
initialValues: b,
|
|
@@ -14221,7 +14231,7 @@ function $h({ open: e = !0, config: t, context: n = {}, onClose: a, onSubmit: s,
|
|
|
14221
14231
|
}
|
|
14222
14232
|
//#endregion
|
|
14223
14233
|
//#region src/components/popups/definitions/delete/config.js
|
|
14224
|
-
var
|
|
14234
|
+
var tg = {
|
|
14225
14235
|
mode: "delete",
|
|
14226
14236
|
getTitleText: (e, t) => `Delete ${e > 0 ? `${e} ` : ""}${t}`,
|
|
14227
14237
|
titleIcon: "delete",
|
|
@@ -14234,19 +14244,19 @@ var eg = {
|
|
|
14234
14244
|
};
|
|
14235
14245
|
//#endregion
|
|
14236
14246
|
//#region src/services/popupApi.js
|
|
14237
|
-
function
|
|
14247
|
+
function ng() {
|
|
14238
14248
|
return {
|
|
14239
14249
|
tenantId: localStorage.getItem("tenantId") || "",
|
|
14240
14250
|
businessId: localStorage.getItem("businessId") || "",
|
|
14241
14251
|
businessUnitId: localStorage.getItem("businessUnitId") || ""
|
|
14242
14252
|
};
|
|
14243
14253
|
}
|
|
14244
|
-
function
|
|
14254
|
+
function rg() {
|
|
14245
14255
|
return Number(localStorage.getItem("userId")) || 0;
|
|
14246
14256
|
}
|
|
14247
|
-
var
|
|
14248
|
-
async function
|
|
14249
|
-
return
|
|
14257
|
+
var ig = (e) => e?.data ?? e;
|
|
14258
|
+
async function ag(e, t, n) {
|
|
14259
|
+
return ig(await Z(X, "/module-data-update", {
|
|
14250
14260
|
method: "PUT",
|
|
14251
14261
|
body: JSON.stringify({
|
|
14252
14262
|
module: e,
|
|
@@ -14255,21 +14265,21 @@ async function ig(e, t, n) {
|
|
|
14255
14265
|
})
|
|
14256
14266
|
}));
|
|
14257
14267
|
}
|
|
14258
|
-
async function
|
|
14268
|
+
async function og(e) {
|
|
14259
14269
|
return Z(on, "/delete", {
|
|
14260
14270
|
method: "POST",
|
|
14261
14271
|
body: JSON.stringify({
|
|
14262
14272
|
schemaVersion: 1,
|
|
14263
|
-
...
|
|
14273
|
+
...ng(),
|
|
14264
14274
|
jobId: e
|
|
14265
14275
|
})
|
|
14266
14276
|
});
|
|
14267
14277
|
}
|
|
14268
|
-
async function
|
|
14278
|
+
async function sg(e) {
|
|
14269
14279
|
let t = await Promise.all(e.map((e) => Z(sn, `/delete?_id=${encodeURIComponent(e)}`, { method: "PUT" })));
|
|
14270
14280
|
return t[t.length - 1] ?? {};
|
|
14271
14281
|
}
|
|
14272
|
-
async function
|
|
14282
|
+
async function cg(e, t) {
|
|
14273
14283
|
return Z(X, "/module-data-delete", {
|
|
14274
14284
|
method: "POST",
|
|
14275
14285
|
body: JSON.stringify({
|
|
@@ -14278,21 +14288,21 @@ async function sg(e, t) {
|
|
|
14278
14288
|
})
|
|
14279
14289
|
});
|
|
14280
14290
|
}
|
|
14281
|
-
function
|
|
14282
|
-
return e === "job" ?
|
|
14291
|
+
function lg(e, t) {
|
|
14292
|
+
return e === "job" ? og(t) : e === "candidate" || e === "candidates" ? sg(t) : cg(e, t);
|
|
14283
14293
|
}
|
|
14284
|
-
async function
|
|
14285
|
-
return
|
|
14294
|
+
async function ug(e) {
|
|
14295
|
+
return ig(await Z(on, "/joblist", {
|
|
14286
14296
|
method: "POST",
|
|
14287
14297
|
body: JSON.stringify({
|
|
14288
|
-
...
|
|
14298
|
+
...ng(),
|
|
14289
14299
|
searchQuery: e,
|
|
14290
|
-
userId:
|
|
14300
|
+
userId: rg()
|
|
14291
14301
|
})
|
|
14292
14302
|
}));
|
|
14293
14303
|
}
|
|
14294
|
-
async function
|
|
14295
|
-
return
|
|
14304
|
+
async function dg(e, t = "") {
|
|
14305
|
+
return ig(await Z(sn, "/quicksubmit/list", {
|
|
14296
14306
|
method: "POST",
|
|
14297
14307
|
body: JSON.stringify({
|
|
14298
14308
|
jobId: e,
|
|
@@ -14300,37 +14310,44 @@ async function ug(e, t = "") {
|
|
|
14300
14310
|
})
|
|
14301
14311
|
}));
|
|
14302
14312
|
}
|
|
14303
|
-
async function
|
|
14304
|
-
return
|
|
14313
|
+
async function fg({ jobId: e, candidateId: t }) {
|
|
14314
|
+
return ig(await Z(an, "/review", {
|
|
14305
14315
|
method: "POST",
|
|
14306
14316
|
body: JSON.stringify({
|
|
14307
|
-
...
|
|
14317
|
+
...ng(),
|
|
14308
14318
|
jobId: e,
|
|
14309
14319
|
candidateId: Array.isArray(t) ? t : [t]
|
|
14310
14320
|
})
|
|
14311
14321
|
}));
|
|
14312
14322
|
}
|
|
14313
|
-
async function
|
|
14323
|
+
async function pg(e = "") {
|
|
14314
14324
|
return Fn(on, `/users/any${e ? `?search=${encodeURIComponent(e)}` : ""}`);
|
|
14315
14325
|
}
|
|
14316
|
-
async function
|
|
14326
|
+
async function mg({ relatedIds: e, module: t, title: n, targetDate: r, notes: i, mentionedUsers: a = [] }) {
|
|
14317
14327
|
return Z(on, "/notes", {
|
|
14318
14328
|
method: "POST",
|
|
14319
14329
|
body: JSON.stringify({
|
|
14320
14330
|
schemaVersion: 1,
|
|
14321
|
-
...
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
|
|
14325
|
-
notesRelatedId: e
|
|
14331
|
+
...ng(),
|
|
14332
|
+
title: n,
|
|
14333
|
+
notes: i,
|
|
14334
|
+
notesFor: t,
|
|
14335
|
+
notesRelatedId: e,
|
|
14336
|
+
receiver: a,
|
|
14337
|
+
reminder: {
|
|
14338
|
+
type: "single",
|
|
14339
|
+
time: r ?? "",
|
|
14340
|
+
interval: ""
|
|
14341
|
+
},
|
|
14342
|
+
targetDate: r ?? ""
|
|
14326
14343
|
})
|
|
14327
14344
|
});
|
|
14328
14345
|
}
|
|
14329
|
-
async function
|
|
14346
|
+
async function hg({ jobId: e, candidateIds: t, hiringStage: n }) {
|
|
14330
14347
|
return Z(on, "/source/hiringStgUpdate", {
|
|
14331
14348
|
method: "PUT",
|
|
14332
14349
|
body: JSON.stringify({
|
|
14333
|
-
...
|
|
14350
|
+
...ng(),
|
|
14334
14351
|
multiJobId: Array.isArray(e) ? e : [e],
|
|
14335
14352
|
applicantId: Array.isArray(t) ? t : [t],
|
|
14336
14353
|
updateStatus: String(n ?? "").toLowerCase(),
|
|
@@ -14338,15 +14355,15 @@ async function mg({ jobId: e, candidateIds: t, hiringStage: n }) {
|
|
|
14338
14355
|
responseType: "responded",
|
|
14339
14356
|
hiriringStatusChangeType: "tagToJobs",
|
|
14340
14357
|
comments: "",
|
|
14341
|
-
userId:
|
|
14358
|
+
userId: rg()
|
|
14342
14359
|
})
|
|
14343
14360
|
});
|
|
14344
14361
|
}
|
|
14345
|
-
async function
|
|
14346
|
-
return
|
|
14362
|
+
async function gg() {
|
|
14363
|
+
return ig(await Z(X, "/masters/dropdown?masterName=candidateGroups&offset=0&limit=50"));
|
|
14347
14364
|
}
|
|
14348
|
-
async function
|
|
14349
|
-
return
|
|
14365
|
+
async function _g({ candidateIds: e, groupId: t, groupName: n }) {
|
|
14366
|
+
return ig(await Z(sn, "/actions/update-group", {
|
|
14350
14367
|
method: "PUT",
|
|
14351
14368
|
body: JSON.stringify({
|
|
14352
14369
|
candidateIds: e,
|
|
@@ -14355,14 +14372,14 @@ async function gg({ candidateIds: e, groupId: t, groupName: n }) {
|
|
|
14355
14372
|
})
|
|
14356
14373
|
}));
|
|
14357
14374
|
}
|
|
14358
|
-
async function
|
|
14375
|
+
async function vg({ jobIds: e, rate: t, priority: n }) {
|
|
14359
14376
|
return Z(on, "/assign?type=self", {
|
|
14360
14377
|
method: "PUT",
|
|
14361
14378
|
body: JSON.stringify({
|
|
14362
14379
|
multiJobId: Array.isArray(e) ? e : [e],
|
|
14363
|
-
userId:
|
|
14380
|
+
userId: rg(),
|
|
14364
14381
|
schemaVersion: 1,
|
|
14365
|
-
...
|
|
14382
|
+
...ng(),
|
|
14366
14383
|
jobPayDetails: t ?? {},
|
|
14367
14384
|
priority: n ?? !1,
|
|
14368
14385
|
priorityFrom: null,
|
|
@@ -14370,7 +14387,7 @@ async function _g({ jobIds: e, rate: t, priority: n }) {
|
|
|
14370
14387
|
})
|
|
14371
14388
|
});
|
|
14372
14389
|
}
|
|
14373
|
-
async function
|
|
14390
|
+
async function yg() {
|
|
14374
14391
|
let e = await Fn(on, "/users/manager");
|
|
14375
14392
|
return (Array.isArray(e) ? e : e ? [e] : []).map((e) => ({
|
|
14376
14393
|
...e,
|
|
@@ -14378,10 +14395,10 @@ async function vg() {
|
|
|
14378
14395
|
value: String(e.userId ?? e.id ?? e._id ?? "")
|
|
14379
14396
|
}));
|
|
14380
14397
|
}
|
|
14381
|
-
async function
|
|
14398
|
+
async function bg(e) {
|
|
14382
14399
|
return e ? Fn(on, `/self-assign?jobId=${encodeURIComponent(e)}`) : null;
|
|
14383
14400
|
}
|
|
14384
|
-
async function
|
|
14401
|
+
async function xg({ jobIds: e, userId: t, rate: n, priority: r, removedIds: i, existingRecruiters: a }) {
|
|
14385
14402
|
let o = (a ?? []).filter((e) => {
|
|
14386
14403
|
let t = String(e?.user_id ?? e?.id ?? e?.userId ?? "");
|
|
14387
14404
|
return t && !(i ?? []).includes(t);
|
|
@@ -14392,7 +14409,7 @@ async function bg({ jobIds: e, userId: t, rate: n, priority: r, removedIds: i, e
|
|
|
14392
14409
|
multiJobId: Array.isArray(e) ? e : [e],
|
|
14393
14410
|
userId: t,
|
|
14394
14411
|
schemaVersion: 1,
|
|
14395
|
-
...
|
|
14412
|
+
...ng(),
|
|
14396
14413
|
jobPayDetails: n ?? {},
|
|
14397
14414
|
priority: r ?? !1,
|
|
14398
14415
|
priorityFrom: null,
|
|
@@ -14400,11 +14417,11 @@ async function bg({ jobIds: e, userId: t, rate: n, priority: r, removedIds: i, e
|
|
|
14400
14417
|
})
|
|
14401
14418
|
});
|
|
14402
14419
|
}
|
|
14403
|
-
async function
|
|
14420
|
+
async function Sg({ jobId: e, candidateIds: t }) {
|
|
14404
14421
|
return Z(on, "/source/hiringStgUpdate", {
|
|
14405
14422
|
method: "PUT",
|
|
14406
14423
|
body: JSON.stringify({
|
|
14407
|
-
...
|
|
14424
|
+
...ng(),
|
|
14408
14425
|
multiJobId: Array.isArray(e) ? e : [e],
|
|
14409
14426
|
applicantId: Array.isArray(t) ? t : [t],
|
|
14410
14427
|
updateStatus: "pipeline",
|
|
@@ -14412,15 +14429,15 @@ async function xg({ jobId: e, candidateIds: t }) {
|
|
|
14412
14429
|
responseType: "responded",
|
|
14413
14430
|
hiriringStatusChangeType: "tagToJobs",
|
|
14414
14431
|
comments: "",
|
|
14415
|
-
userId:
|
|
14432
|
+
userId: rg()
|
|
14416
14433
|
})
|
|
14417
14434
|
});
|
|
14418
14435
|
}
|
|
14419
14436
|
//#endregion
|
|
14420
14437
|
//#region src/components/popups/definitions/delete/api.js
|
|
14421
|
-
var
|
|
14422
|
-
await
|
|
14423
|
-
} },
|
|
14438
|
+
var Cg = { deleteItems: async (e, t) => {
|
|
14439
|
+
await lg(t.moduleName, e);
|
|
14440
|
+
} }, wg = {
|
|
14424
14441
|
title: "Quick Submit",
|
|
14425
14442
|
okText: "Submit",
|
|
14426
14443
|
width: 480,
|
|
@@ -14444,18 +14461,18 @@ var Sg = { deleteItems: async (e, t) => {
|
|
|
14444
14461
|
labelTemplate: "{applicantRefrenceId} - {firstName} {lastName}",
|
|
14445
14462
|
valueKey: "_id"
|
|
14446
14463
|
}]
|
|
14447
|
-
},
|
|
14448
|
-
searchOptions: async (e, t, n) => e.searchFetchKey === "quickSubmitJobList" ?
|
|
14464
|
+
}, Tg = {
|
|
14465
|
+
searchOptions: async (e, t, n) => e.searchFetchKey === "quickSubmitJobList" ? ug(t) : e.searchFetchKey === "quickSubmitCandidates" ? dg(n.selectedIds[0], t) : [],
|
|
14449
14466
|
submit: async (e, t) => {
|
|
14450
|
-
t.moduleName === "candidate" ? await
|
|
14467
|
+
t.moduleName === "candidate" ? await fg({
|
|
14451
14468
|
jobId: e.jobId,
|
|
14452
14469
|
candidateId: t.selectedIds
|
|
14453
|
-
}) : await
|
|
14470
|
+
}) : await fg({
|
|
14454
14471
|
jobId: t.selectedIds[0],
|
|
14455
14472
|
candidateId: e.candidate
|
|
14456
14473
|
});
|
|
14457
14474
|
}
|
|
14458
|
-
},
|
|
14475
|
+
}, Eg = {
|
|
14459
14476
|
title: "Add Notes & Share",
|
|
14460
14477
|
okText: "Save & Share",
|
|
14461
14478
|
width: 480,
|
|
@@ -14467,18 +14484,30 @@ var Sg = { deleteItems: async (e, t) => {
|
|
|
14467
14484
|
placeholder: "Add your notes on the job. Use '@' to mention someone.",
|
|
14468
14485
|
mentionFetchKey: "mentionUsers"
|
|
14469
14486
|
}]
|
|
14470
|
-
},
|
|
14471
|
-
|
|
14487
|
+
}, Dg = (e) => e?.data ?? e;
|
|
14488
|
+
async function Og({ relatedId: e, notes: t, title: n, notesFor: r }) {
|
|
14489
|
+
return Dg(await sc(X, "/notes", {
|
|
14490
|
+
method: "POST",
|
|
14491
|
+
body: JSON.stringify({
|
|
14492
|
+
relatedId: e,
|
|
14493
|
+
notes: t,
|
|
14494
|
+
title: n,
|
|
14495
|
+
notesFor: r
|
|
14496
|
+
})
|
|
14497
|
+
}));
|
|
14498
|
+
}
|
|
14499
|
+
//#endregion
|
|
14500
|
+
//#region src/components/popups/definitions/add-notes/api.js
|
|
14501
|
+
var kg = {
|
|
14502
|
+
getMentionOptions: async (e, t) => pg(t),
|
|
14472
14503
|
submit: async (e, t) => {
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
relatedIds: t.selectedIds,
|
|
14476
|
-
module: t.moduleName,
|
|
14504
|
+
await Og({
|
|
14505
|
+
relatedId: t.selectedIds,
|
|
14477
14506
|
notes: e.notes,
|
|
14478
|
-
|
|
14507
|
+
notesFor: t.moduleName
|
|
14479
14508
|
});
|
|
14480
14509
|
}
|
|
14481
|
-
},
|
|
14510
|
+
}, Ag = {
|
|
14482
14511
|
title: "Tag to Job",
|
|
14483
14512
|
okText: "Tag",
|
|
14484
14513
|
width: 480,
|
|
@@ -14503,16 +14532,16 @@ var Sg = { deleteItems: async (e, t) => {
|
|
|
14503
14532
|
value: "Pipeline"
|
|
14504
14533
|
}]
|
|
14505
14534
|
}]
|
|
14506
|
-
},
|
|
14507
|
-
searchOptions: async (e, t) => e.searchFetchKey === "tagToJobJobList" ?
|
|
14535
|
+
}, jg = {
|
|
14536
|
+
searchOptions: async (e, t) => e.searchFetchKey === "tagToJobJobList" ? ug(t) : [],
|
|
14508
14537
|
submit: async (e, t) => {
|
|
14509
|
-
await
|
|
14538
|
+
await hg({
|
|
14510
14539
|
jobId: e.jobId,
|
|
14511
14540
|
candidateIds: t.selectedIds,
|
|
14512
14541
|
hiringStage: e.hiringStage
|
|
14513
14542
|
});
|
|
14514
14543
|
}
|
|
14515
|
-
},
|
|
14544
|
+
}, Mg = {
|
|
14516
14545
|
title: "Change Status",
|
|
14517
14546
|
okText: "Apply",
|
|
14518
14547
|
width: 420,
|
|
@@ -14544,9 +14573,9 @@ var Sg = { deleteItems: async (e, t) => {
|
|
|
14544
14573
|
}
|
|
14545
14574
|
]
|
|
14546
14575
|
}]
|
|
14547
|
-
},
|
|
14548
|
-
await
|
|
14549
|
-
} },
|
|
14576
|
+
}, Ng = { submit: async (e, t) => {
|
|
14577
|
+
await ag(t.moduleName, t.selectedIds, e.status);
|
|
14578
|
+
} }, Pg = {
|
|
14550
14579
|
getTitleText: (e) => `Remove ${e > 1 ? `${e} Candidates` : "Candidate"} from Shortlist`,
|
|
14551
14580
|
titleIcon: "delete",
|
|
14552
14581
|
okText: "Remove",
|
|
@@ -14555,12 +14584,12 @@ var Sg = { deleteItems: async (e, t) => {
|
|
|
14555
14584
|
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?",
|
|
14556
14585
|
footerNote: "The candidate will be moved back to the pipeline.",
|
|
14557
14586
|
fields: []
|
|
14558
|
-
},
|
|
14559
|
-
await
|
|
14587
|
+
}, Fg = { onOk: async (e) => {
|
|
14588
|
+
await Sg({
|
|
14560
14589
|
jobId: e.jobId ?? e.selectedIds[0],
|
|
14561
14590
|
candidateIds: e.selectedIds
|
|
14562
14591
|
});
|
|
14563
|
-
} },
|
|
14592
|
+
} }, Ig = {
|
|
14564
14593
|
title: "Add to Groups",
|
|
14565
14594
|
description: "Select a group to add the selected candidate(s) to",
|
|
14566
14595
|
okText: "Add to Group",
|
|
@@ -14574,26 +14603,26 @@ var Sg = { deleteItems: async (e, t) => {
|
|
|
14574
14603
|
placeholder: "Select a group",
|
|
14575
14604
|
fetchOptionsKey: "candidateGroups"
|
|
14576
14605
|
}]
|
|
14577
|
-
},
|
|
14578
|
-
getOptions: async (e) => e.fetchOptionsKey === "candidateGroups" ?
|
|
14606
|
+
}, Lg = {
|
|
14607
|
+
getOptions: async (e) => e.fetchOptionsKey === "candidateGroups" ? gg() : [],
|
|
14579
14608
|
submit: async (e, t, { dynamicOptions: n }) => {
|
|
14580
14609
|
let r = (n.groupId ?? []).find((t) => String(t.value) === String(e.groupId));
|
|
14581
|
-
await
|
|
14610
|
+
await _g({
|
|
14582
14611
|
candidateIds: t.selectedIds,
|
|
14583
14612
|
groupId: e.groupId,
|
|
14584
14613
|
groupName: r?.label ?? ""
|
|
14585
14614
|
});
|
|
14586
14615
|
}
|
|
14587
|
-
},
|
|
14616
|
+
}, Rg = {
|
|
14588
14617
|
title: "Self Assign",
|
|
14589
14618
|
okText: "Yes",
|
|
14590
14619
|
cancelText: "No",
|
|
14591
14620
|
width: 420,
|
|
14592
14621
|
bodyText: "Are you sure you want to assign this job?",
|
|
14593
14622
|
fields: []
|
|
14594
|
-
},
|
|
14595
|
-
await
|
|
14596
|
-
} },
|
|
14623
|
+
}, zg = { onOk: async (e) => {
|
|
14624
|
+
await vg({ jobIds: e.selectedIds });
|
|
14625
|
+
} }, Bg = {
|
|
14597
14626
|
getTitleText: (e, t, n) => {
|
|
14598
14627
|
let r = n?.jobTitle || n?.title || "";
|
|
14599
14628
|
return r ? `Assign - ${r}` : "Assign";
|
|
@@ -14623,11 +14652,11 @@ var Sg = { deleteItems: async (e, t) => {
|
|
|
14623
14652
|
checkboxLabel: "Mark as High"
|
|
14624
14653
|
}
|
|
14625
14654
|
]
|
|
14626
|
-
},
|
|
14627
|
-
getOptions: async (e) => e.fetchOptionsKey === "assignToUsers" ?
|
|
14628
|
-
loadExtraData: async (e) =>
|
|
14655
|
+
}, Vg = {
|
|
14656
|
+
getOptions: async (e) => e.fetchOptionsKey === "assignToUsers" ? yg() : [],
|
|
14657
|
+
loadExtraData: async (e) => bg(e.selectedIds[0]),
|
|
14629
14658
|
submit: async (e, t, { removedIds: n, extraData: r }) => {
|
|
14630
|
-
await
|
|
14659
|
+
await xg({
|
|
14631
14660
|
jobIds: t.selectedIds,
|
|
14632
14661
|
userId: e.assignToUserId,
|
|
14633
14662
|
rate: e.candidateRate,
|
|
@@ -14636,38 +14665,81 @@ var Sg = { deleteItems: async (e, t) => {
|
|
|
14636
14665
|
existingRecruiters: r?.recruitersData
|
|
14637
14666
|
});
|
|
14638
14667
|
}
|
|
14639
|
-
},
|
|
14640
|
-
|
|
14641
|
-
"
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
|
|
14668
|
+
}, Hg = {
|
|
14669
|
+
title: "Add Sticky Notes",
|
|
14670
|
+
okText: "Save",
|
|
14671
|
+
width: 480,
|
|
14672
|
+
fields: [
|
|
14673
|
+
{
|
|
14674
|
+
name: "heading",
|
|
14675
|
+
label: "Heading",
|
|
14676
|
+
type: "input",
|
|
14677
|
+
required: !0,
|
|
14678
|
+
placeholder: "Enter heading"
|
|
14679
|
+
},
|
|
14680
|
+
{
|
|
14681
|
+
name: "targetDate",
|
|
14682
|
+
label: "Target Date",
|
|
14683
|
+
type: "date-picker",
|
|
14684
|
+
required: !1
|
|
14685
|
+
},
|
|
14686
|
+
{
|
|
14687
|
+
name: "comments",
|
|
14688
|
+
label: "Comments",
|
|
14689
|
+
type: "mention-textarea",
|
|
14690
|
+
required: !0,
|
|
14691
|
+
rows: 5,
|
|
14692
|
+
placeholder: "Enter your note here... Use '@' to mention someone.",
|
|
14693
|
+
mentionFetchKey: "mentionUsers"
|
|
14694
|
+
}
|
|
14695
|
+
]
|
|
14696
|
+
}, Ug = {
|
|
14697
|
+
getMentionOptions: async (e, t) => pg(t),
|
|
14698
|
+
submit: async (e, t) => {
|
|
14699
|
+
let n = (e.comments?.match(/@([\w.]+)/g) ?? []).map((e) => e.slice(1));
|
|
14700
|
+
await mg({
|
|
14701
|
+
relatedIds: t.selectedIds,
|
|
14702
|
+
module: t.moduleName,
|
|
14703
|
+
title: e.heading,
|
|
14704
|
+
targetDate: e.targetDate ? e.targetDate.toISOString() : "",
|
|
14705
|
+
notes: e.comments,
|
|
14706
|
+
mentionedUsers: n
|
|
14707
|
+
});
|
|
14708
|
+
}
|
|
14709
|
+
}, Wg = {
|
|
14710
|
+
delete: tg,
|
|
14651
14711
|
"quick-submit": wg,
|
|
14652
14712
|
"add-notes": Eg,
|
|
14653
|
-
"tag-to-job":
|
|
14654
|
-
"change-status":
|
|
14655
|
-
"remove-from-shortlist":
|
|
14656
|
-
"add-to-groups":
|
|
14657
|
-
"self-assign":
|
|
14658
|
-
"others-assign":
|
|
14713
|
+
"tag-to-job": Ag,
|
|
14714
|
+
"change-status": Mg,
|
|
14715
|
+
"remove-from-shortlist": Pg,
|
|
14716
|
+
"add-to-groups": Ig,
|
|
14717
|
+
"self-assign": Rg,
|
|
14718
|
+
"others-assign": Bg,
|
|
14719
|
+
"sticky-notes": Hg
|
|
14720
|
+
}, Gg = {
|
|
14721
|
+
delete: Cg,
|
|
14722
|
+
"quick-submit": Tg,
|
|
14723
|
+
"add-notes": kg,
|
|
14724
|
+
"tag-to-job": jg,
|
|
14725
|
+
"change-status": Ng,
|
|
14726
|
+
"remove-from-shortlist": Fg,
|
|
14727
|
+
"add-to-groups": Lg,
|
|
14728
|
+
"self-assign": zg,
|
|
14729
|
+
"others-assign": Vg,
|
|
14730
|
+
"sticky-notes": Ug
|
|
14659
14731
|
};
|
|
14660
14732
|
//#endregion
|
|
14661
14733
|
//#region src/components/popups/dynamic/DynamicPopupRoute.jsx
|
|
14662
|
-
function
|
|
14734
|
+
function Kg({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
14663
14735
|
let n = {
|
|
14664
|
-
...
|
|
14736
|
+
...Gg,
|
|
14665
14737
|
...e
|
|
14666
14738
|
}, r = {
|
|
14667
|
-
...
|
|
14739
|
+
...Wg,
|
|
14668
14740
|
...t
|
|
14669
14741
|
}, { popupKey: a } = Ht(), o = Vt(), { state: s = {} } = Bt(), c = r[a];
|
|
14670
|
-
return /* @__PURE__ */ q(
|
|
14742
|
+
return /* @__PURE__ */ q(eg, {
|
|
14671
14743
|
open: !0,
|
|
14672
14744
|
config: c,
|
|
14673
14745
|
context: i(() => ({
|
|
@@ -14687,7 +14759,7 @@ function Vg({ apiMap: e = {}, extraConfigs: t = {} }) {
|
|
|
14687
14759
|
}
|
|
14688
14760
|
//#endregion
|
|
14689
14761
|
//#region src/components/form/validation.js
|
|
14690
|
-
var
|
|
14762
|
+
var qg = {
|
|
14691
14763
|
EMAIL: /^[a-zA-Z0-9._%+-]+@[a-zA-Z][a-zA-Z-]*\.[a-zA-Z]{2,}$/,
|
|
14692
14764
|
PHONE: /^[0-9]{10}$/,
|
|
14693
14765
|
PASSWORD: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,
|
|
@@ -14704,7 +14776,7 @@ var Hg = {
|
|
|
14704
14776
|
FULL_NAME: /^[A-Z][a-zA-Z]*(?: [A-Z][a-zA-Z]*)*$/,
|
|
14705
14777
|
NO_SPACES: /^\S+$/,
|
|
14706
14778
|
STARTS_WITH_CAPITAL: /^[A-Z].*$/
|
|
14707
|
-
},
|
|
14779
|
+
}, Jg = {
|
|
14708
14780
|
SINGLE_FILE_COUNT: 1,
|
|
14709
14781
|
MULTI_FILE_COUNT: 5,
|
|
14710
14782
|
MAX_FILE_SIZE: 2,
|
|
@@ -14713,7 +14785,7 @@ var Hg = {
|
|
|
14713
14785
|
"image/png",
|
|
14714
14786
|
"application/pdf"
|
|
14715
14787
|
]
|
|
14716
|
-
},
|
|
14788
|
+
}, Yg = {
|
|
14717
14789
|
REQUIRED: (e) => "Mandatory Field",
|
|
14718
14790
|
INVALID_EMAIL: "Please enter a valid email address.",
|
|
14719
14791
|
INVALID_PHONE: "Phone number must contain exactly 10 digits.",
|
|
@@ -14733,16 +14805,16 @@ var Hg = {
|
|
|
14733
14805
|
NO_SPACES_ALLOWED: "Spaces are not allowed.",
|
|
14734
14806
|
MUST_START_WITH_CAPITAL: "First letter must be capital.",
|
|
14735
14807
|
INVALID_FILE_TYPE: "Only JPG, PNG and PDF files are allowed.",
|
|
14736
|
-
INVALID_FILE_SIZE: `File upload must be ${
|
|
14808
|
+
INVALID_FILE_SIZE: `File upload must be ${Jg.MAX_FILE_SIZE} MB below.`,
|
|
14737
14809
|
INVALID_FILE_TYPE: "Only JPG, PNG and PDF files are allowed.",
|
|
14738
14810
|
SINGLE_FILE_ONLY: "Only one file can be uploaded."
|
|
14739
|
-
},
|
|
14811
|
+
}, Xg = {
|
|
14740
14812
|
FIRST_NAME_MIN: 3,
|
|
14741
14813
|
FIRST_NAME_MAX: 30
|
|
14742
|
-
},
|
|
14814
|
+
}, Zg = {
|
|
14743
14815
|
REMARKS_MIN: 10,
|
|
14744
14816
|
REMARKS_MAX: 250
|
|
14745
|
-
},
|
|
14817
|
+
}, Qg = {
|
|
14746
14818
|
removeSpaces: (e = "") => e.replace(/\s/g, ""),
|
|
14747
14819
|
capitalizeFirstLetter: (e = "") => e.charAt(0).toUpperCase() + e.slice(1),
|
|
14748
14820
|
capitalizeWords: (e = "") => e.replace(/\b\w/g, (e) => e.toUpperCase()),
|
|
@@ -14754,132 +14826,132 @@ var Hg = {
|
|
|
14754
14826
|
let t = e.replace(/\D/g, "");
|
|
14755
14827
|
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)}`;
|
|
14756
14828
|
}
|
|
14757
|
-
},
|
|
14829
|
+
}, $g = {
|
|
14758
14830
|
required: (e = "Field") => ({
|
|
14759
14831
|
required: !0,
|
|
14760
|
-
message:
|
|
14832
|
+
message: Yg.REQUIRED(e)
|
|
14761
14833
|
}),
|
|
14762
14834
|
email: () => ({
|
|
14763
|
-
pattern:
|
|
14764
|
-
message:
|
|
14835
|
+
pattern: qg.EMAIL,
|
|
14836
|
+
message: Yg.INVALID_EMAIL
|
|
14765
14837
|
}),
|
|
14766
14838
|
phone: () => ({
|
|
14767
|
-
pattern:
|
|
14768
|
-
message:
|
|
14839
|
+
pattern: qg.PHONE,
|
|
14840
|
+
message: Yg.INVALID_PHONE
|
|
14769
14841
|
}),
|
|
14770
14842
|
password: () => ({
|
|
14771
|
-
pattern:
|
|
14772
|
-
message:
|
|
14843
|
+
pattern: qg.PASSWORD,
|
|
14844
|
+
message: Yg.INVALID_PASSWORD
|
|
14773
14845
|
}),
|
|
14774
14846
|
alphabets: () => ({
|
|
14775
|
-
pattern:
|
|
14776
|
-
message:
|
|
14847
|
+
pattern: qg.ALPHABETS,
|
|
14848
|
+
message: Yg.INVALID_ALPHABETS
|
|
14777
14849
|
}),
|
|
14778
14850
|
alphanumeric: () => ({
|
|
14779
|
-
pattern:
|
|
14780
|
-
message:
|
|
14851
|
+
pattern: qg.ALPHANUMERIC,
|
|
14852
|
+
message: Yg.INVALID_ALPHANUMERIC
|
|
14781
14853
|
}),
|
|
14782
14854
|
number: () => ({
|
|
14783
|
-
pattern:
|
|
14784
|
-
message:
|
|
14855
|
+
pattern: qg.NUMBER,
|
|
14856
|
+
message: Yg.INVALID_NUMBER
|
|
14785
14857
|
}),
|
|
14786
14858
|
url: () => ({
|
|
14787
|
-
pattern:
|
|
14788
|
-
message:
|
|
14859
|
+
pattern: qg.URL,
|
|
14860
|
+
message: Yg.INVALID_URL
|
|
14789
14861
|
}),
|
|
14790
14862
|
candidateId: (e = "ID") => ({
|
|
14791
|
-
pattern:
|
|
14792
|
-
message:
|
|
14863
|
+
pattern: qg.CANDIDATE_ID,
|
|
14864
|
+
message: Yg.INVALID_CANDIDATE_ID(e)
|
|
14793
14865
|
}),
|
|
14794
14866
|
remarks: () => ({
|
|
14795
|
-
pattern:
|
|
14796
|
-
message:
|
|
14797
|
-
REMARKS_MIN: `Remarks must be at least ${
|
|
14798
|
-
REMARKS_MAX: `Remarks must not exceed ${
|
|
14867
|
+
pattern: qg.REMARKS,
|
|
14868
|
+
message: Yg.INVALID_REMARKS,
|
|
14869
|
+
REMARKS_MIN: `Remarks must be at least ${Zg.REMARKS_MIN} characters.`,
|
|
14870
|
+
REMARKS_MAX: `Remarks must not exceed ${Zg.REMARKS_MAX} characters.`
|
|
14799
14871
|
}),
|
|
14800
14872
|
designation: () => ({
|
|
14801
|
-
pattern:
|
|
14802
|
-
message:
|
|
14873
|
+
pattern: qg.DESIGNATION,
|
|
14874
|
+
message: Yg.INVALID_DESIGNATION
|
|
14803
14875
|
}),
|
|
14804
14876
|
dob: (e = !0) => ({ validator: (t, n) => {
|
|
14805
14877
|
if (!n) return e ? Promise.reject(/* @__PURE__ */ Error("Date of Birth is required.")) : Promise.resolve();
|
|
14806
|
-
if (!
|
|
14878
|
+
if (!qg.DOB.test(n)) return Promise.reject(Error(Yg.INVALID_DOB));
|
|
14807
14879
|
let r = Wt(n, "MM/DD/YYYY", !0);
|
|
14808
|
-
if (!r.isValid()) return Promise.reject(Error(
|
|
14880
|
+
if (!r.isValid()) return Promise.reject(Error(Yg.INVALID_DOB));
|
|
14809
14881
|
let i = Wt().endOf("day");
|
|
14810
14882
|
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();
|
|
14811
14883
|
} }),
|
|
14812
14884
|
linkedin: () => ({
|
|
14813
|
-
pattern:
|
|
14814
|
-
message:
|
|
14885
|
+
pattern: qg.LINKEDIN,
|
|
14886
|
+
message: Yg.INVALID_LINKEDIN
|
|
14815
14887
|
}),
|
|
14816
14888
|
companyName: () => ({
|
|
14817
|
-
pattern:
|
|
14818
|
-
message:
|
|
14889
|
+
pattern: qg.COMPANY_NAME,
|
|
14890
|
+
message: Yg.INVALID_COMPANY_NAME
|
|
14819
14891
|
}),
|
|
14820
14892
|
firstName: () => ({
|
|
14821
|
-
pattern:
|
|
14822
|
-
message:
|
|
14823
|
-
FIRST_NAME_MIN: `First Name must be at least ${
|
|
14824
|
-
FIRST_NAME_MAX: `First Name must not exceed ${
|
|
14893
|
+
pattern: qg.FIRST_NAME,
|
|
14894
|
+
message: Yg.INVALID_FIRST_NAME,
|
|
14895
|
+
FIRST_NAME_MIN: `First Name must be at least ${Xg.FIRST_NAME_MIN} characters.`,
|
|
14896
|
+
FIRST_NAME_MAX: `First Name must not exceed ${Xg.FIRST_NAME_MAX} characters.`
|
|
14825
14897
|
}),
|
|
14826
14898
|
firstNameMinLength: () => ({
|
|
14827
|
-
min:
|
|
14828
|
-
message:
|
|
14899
|
+
min: Xg.FIRST_NAME_MIN,
|
|
14900
|
+
message: Yg.FIRST_NAME_MIN
|
|
14829
14901
|
}),
|
|
14830
14902
|
firstNameMaxLength: () => ({
|
|
14831
|
-
max:
|
|
14832
|
-
message:
|
|
14903
|
+
max: Xg.FIRST_NAME_MAX,
|
|
14904
|
+
message: Yg.FIRST_NAME_MAX
|
|
14833
14905
|
}),
|
|
14834
14906
|
remarksMinLength: () => ({
|
|
14835
|
-
min:
|
|
14836
|
-
message:
|
|
14907
|
+
min: Zg.REMARKS_MIN,
|
|
14908
|
+
message: Yg.REMARKS_MIN
|
|
14837
14909
|
}),
|
|
14838
14910
|
remarksMaxLength: () => ({
|
|
14839
|
-
max:
|
|
14840
|
-
message:
|
|
14911
|
+
max: Zg.REMARKS_MAX,
|
|
14912
|
+
message: Yg.REMARKS_MAX
|
|
14841
14913
|
}),
|
|
14842
14914
|
fullName: () => ({
|
|
14843
|
-
pattern:
|
|
14844
|
-
message:
|
|
14915
|
+
pattern: qg.FULL_NAME,
|
|
14916
|
+
message: Yg.INVALID_FULL_NAME
|
|
14845
14917
|
}),
|
|
14846
14918
|
noSpaces: () => ({
|
|
14847
|
-
pattern:
|
|
14848
|
-
message:
|
|
14919
|
+
pattern: qg.NO_SPACES,
|
|
14920
|
+
message: Yg.NO_SPACES_ALLOWED
|
|
14849
14921
|
}),
|
|
14850
14922
|
startsWithCapital: () => ({
|
|
14851
|
-
pattern:
|
|
14852
|
-
message:
|
|
14923
|
+
pattern: qg.STARTS_WITH_CAPITAL,
|
|
14924
|
+
message: Yg.MUST_START_WITH_CAPITAL
|
|
14853
14925
|
}),
|
|
14854
14926
|
fileUpload: () => ({ validator: (e, t) => {
|
|
14855
14927
|
if (!t || t.length === 0) return Promise.resolve();
|
|
14856
14928
|
for (let e of t) {
|
|
14857
14929
|
let t = e.originFileObj || e;
|
|
14858
|
-
if (!(t.size / 1024 / 1024 <=
|
|
14859
|
-
if (!
|
|
14930
|
+
if (!(t.size / 1024 / 1024 <= Jg.MAX_FILE_SIZE)) return G.error(Yg.INVALID_FILE_SIZE), Promise.reject(Error(Yg.INVALID_FILE_SIZE));
|
|
14931
|
+
if (!Jg.ALLOWED_FILE_TYPES.includes(t.type)) return Promise.reject(Error(Yg.INVALID_FILE_TYPE));
|
|
14860
14932
|
}
|
|
14861
14933
|
return Promise.resolve();
|
|
14862
14934
|
} }),
|
|
14863
14935
|
singleFileUpload: () => ({ validator: (e, t) => {
|
|
14864
14936
|
if (!t || t.length === 0) return Promise.resolve();
|
|
14865
|
-
if (t.length >
|
|
14937
|
+
if (t.length > Jg.SINGLE_FILE_COUNT) return Promise.reject(Error(Yg.SINGLE_FILE_ONLY));
|
|
14866
14938
|
let n = t[0];
|
|
14867
|
-
return n.size / 1024 / 1024 <
|
|
14939
|
+
return n.size / 1024 / 1024 < Jg.MAX_FILE_SIZE ? Jg.ALLOWED_FILE_TYPES.includes(n.type) ? Promise.resolve() : Promise.reject(Error(Yg.INVALID_FILE_TYPE)) : Promise.reject(Error(Yg.INVALID_FILE_SIZE));
|
|
14868
14940
|
} }),
|
|
14869
14941
|
multiFileUpload: () => ({ validator: (e, t) => {
|
|
14870
14942
|
if (!t || t.length === 0) return Promise.resolve();
|
|
14871
|
-
if (t.length >
|
|
14943
|
+
if (t.length > Jg.MULTI_FILE_COUNT) return Promise.reject(Error(Yg.INVALID_FILE_COUNT));
|
|
14872
14944
|
for (let e of t) {
|
|
14873
|
-
if (!(e.size / 1024 / 1024 <
|
|
14874
|
-
if (!
|
|
14945
|
+
if (!(e.size / 1024 / 1024 < Jg.MAX_FILE_SIZE)) return Promise.reject(Error(Yg.INVALID_FILE_SIZE));
|
|
14946
|
+
if (!Jg.ALLOWED_FILE_TYPES.includes(e.type)) return Promise.reject(Error(Yg.INVALID_FILE_TYPE));
|
|
14875
14947
|
}
|
|
14876
14948
|
return Promise.resolve();
|
|
14877
14949
|
} })
|
|
14878
|
-
},
|
|
14950
|
+
}, e_ = { beforeUpload: (e) => [
|
|
14879
14951
|
"image/jpeg",
|
|
14880
14952
|
"image/png",
|
|
14881
14953
|
"application/pdf"
|
|
14882
|
-
].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) },
|
|
14954
|
+
].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) }, t_ = () => {
|
|
14883
14955
|
let [e] = C.useForm();
|
|
14884
14956
|
return /* @__PURE__ */ q("div", {
|
|
14885
14957
|
style: { padding: 24 },
|
|
@@ -14899,7 +14971,7 @@ var Hg = {
|
|
|
14899
14971
|
children: /* @__PURE__ */ q(C.Item, {
|
|
14900
14972
|
label: "Email",
|
|
14901
14973
|
name: "email",
|
|
14902
|
-
rules: [
|
|
14974
|
+
rules: [$g.required("Email"), $g.email()],
|
|
14903
14975
|
children: /* @__PURE__ */ q(w, {})
|
|
14904
14976
|
})
|
|
14905
14977
|
}),
|
|
@@ -14908,12 +14980,12 @@ var Hg = {
|
|
|
14908
14980
|
children: /* @__PURE__ */ q(C.Item, {
|
|
14909
14981
|
label: "Phone Number",
|
|
14910
14982
|
name: "phone",
|
|
14911
|
-
rules: [
|
|
14983
|
+
rules: [$g.required("Phone Number"), $g.phone()],
|
|
14912
14984
|
validateTrigger: ["onBlur", "onChange"],
|
|
14913
14985
|
children: /* @__PURE__ */ q(w, {
|
|
14914
14986
|
maxLength: 10,
|
|
14915
14987
|
onChange: (t) => {
|
|
14916
|
-
e.setFieldsValue({ phone:
|
|
14988
|
+
e.setFieldsValue({ phone: Qg.phoneFormatter(t.target.value) });
|
|
14917
14989
|
}
|
|
14918
14990
|
})
|
|
14919
14991
|
})
|
|
@@ -14923,7 +14995,7 @@ var Hg = {
|
|
|
14923
14995
|
children: /* @__PURE__ */ q(C.Item, {
|
|
14924
14996
|
label: "Password",
|
|
14925
14997
|
name: "password",
|
|
14926
|
-
rules: [
|
|
14998
|
+
rules: [$g.required("Password"), $g.password()],
|
|
14927
14999
|
children: /* @__PURE__ */ q(w.Password, {})
|
|
14928
15000
|
})
|
|
14929
15001
|
}),
|
|
@@ -14933,13 +15005,13 @@ var Hg = {
|
|
|
14933
15005
|
label: "Full Name",
|
|
14934
15006
|
name: "fullName",
|
|
14935
15007
|
rules: [
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
15008
|
+
$g.required("Full Name"),
|
|
15009
|
+
$g.alphabets(),
|
|
15010
|
+
$g.firstNameMinLength(),
|
|
15011
|
+
$g.firstNameMaxLength()
|
|
14940
15012
|
],
|
|
14941
15013
|
children: /* @__PURE__ */ q(w, { onChange: (t) => {
|
|
14942
|
-
e.setFieldsValue({ fullName:
|
|
15014
|
+
e.setFieldsValue({ fullName: Qg.firstNameFormatter(t.target.value) });
|
|
14943
15015
|
} })
|
|
14944
15016
|
})
|
|
14945
15017
|
}),
|
|
@@ -14948,9 +15020,9 @@ var Hg = {
|
|
|
14948
15020
|
children: /* @__PURE__ */ q(C.Item, {
|
|
14949
15021
|
label: "Username",
|
|
14950
15022
|
name: "username",
|
|
14951
|
-
rules: [
|
|
15023
|
+
rules: [$g.required("Username"), $g.alphanumeric()],
|
|
14952
15024
|
children: /* @__PURE__ */ q(w, { onChange: (t) => {
|
|
14953
|
-
e.setFieldsValue({ username:
|
|
15025
|
+
e.setFieldsValue({ username: Qg.removeExtraSpaces(t.target.value) });
|
|
14954
15026
|
} })
|
|
14955
15027
|
})
|
|
14956
15028
|
}),
|
|
@@ -14959,9 +15031,9 @@ var Hg = {
|
|
|
14959
15031
|
children: /* @__PURE__ */ q(C.Item, {
|
|
14960
15032
|
label: "Website URL",
|
|
14961
15033
|
name: "website",
|
|
14962
|
-
rules: [
|
|
15034
|
+
rules: [$g.required("Website URL"), $g.url()],
|
|
14963
15035
|
children: /* @__PURE__ */ q(w, { onChange: (t) => {
|
|
14964
|
-
e.setFieldsValue({ website:
|
|
15036
|
+
e.setFieldsValue({ website: Qg.removeExtraSpaces(t.target.value) });
|
|
14965
15037
|
} })
|
|
14966
15038
|
})
|
|
14967
15039
|
}),
|
|
@@ -14970,9 +15042,9 @@ var Hg = {
|
|
|
14970
15042
|
children: /* @__PURE__ */ q(C.Item, {
|
|
14971
15043
|
label: "MSP Req ID",
|
|
14972
15044
|
name: "mspreqID",
|
|
14973
|
-
rules: [
|
|
15045
|
+
rules: [$g.required("MSP Req ID"), $g.candidateId("MSP Req ID")],
|
|
14974
15046
|
children: /* @__PURE__ */ q(w, { onChange: (t) => {
|
|
14975
|
-
e.setFieldsValue({ mspreqID:
|
|
15047
|
+
e.setFieldsValue({ mspreqID: Qg.removeExtraSpaces(t.target.value) });
|
|
14976
15048
|
} })
|
|
14977
15049
|
})
|
|
14978
15050
|
}),
|
|
@@ -14981,9 +15053,9 @@ var Hg = {
|
|
|
14981
15053
|
children: /* @__PURE__ */ q(C.Item, {
|
|
14982
15054
|
label: "Candidate ID",
|
|
14983
15055
|
name: "candidateId",
|
|
14984
|
-
rules: [
|
|
15056
|
+
rules: [$g.required("Candidate ID"), $g.candidateId("Candidate ID")],
|
|
14985
15057
|
children: /* @__PURE__ */ q(w, { onChange: (t) => {
|
|
14986
|
-
e.setFieldsValue({ candidateId:
|
|
15058
|
+
e.setFieldsValue({ candidateId: Qg.removeExtraSpaces(t.target.value) });
|
|
14987
15059
|
} })
|
|
14988
15060
|
})
|
|
14989
15061
|
}),
|
|
@@ -14993,10 +15065,10 @@ var Hg = {
|
|
|
14993
15065
|
label: "Remarks",
|
|
14994
15066
|
name: "remarks",
|
|
14995
15067
|
rules: [
|
|
14996
|
-
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
15068
|
+
$g.required("Remarks"),
|
|
15069
|
+
$g.remarks(),
|
|
15070
|
+
$g.remarksMinLength(),
|
|
15071
|
+
$g.remarksMaxLength()
|
|
15000
15072
|
],
|
|
15001
15073
|
children: /* @__PURE__ */ q(w.TextArea, { rows: 4 })
|
|
15002
15074
|
})
|
|
@@ -15006,7 +15078,7 @@ var Hg = {
|
|
|
15006
15078
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15007
15079
|
label: "Designation",
|
|
15008
15080
|
name: "designation",
|
|
15009
|
-
rules: [
|
|
15081
|
+
rules: [$g.required("Designation"), $g.designation()],
|
|
15010
15082
|
children: /* @__PURE__ */ q(w, {})
|
|
15011
15083
|
})
|
|
15012
15084
|
}),
|
|
@@ -15015,12 +15087,12 @@ var Hg = {
|
|
|
15015
15087
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15016
15088
|
label: "Date of Birth",
|
|
15017
15089
|
name: "dob",
|
|
15018
|
-
rules: [
|
|
15090
|
+
rules: [$g.dob()],
|
|
15019
15091
|
children: /* @__PURE__ */ q(w, {
|
|
15020
15092
|
placeholder: "MM/DD/YYYY",
|
|
15021
15093
|
maxLength: 10,
|
|
15022
15094
|
onChange: (t) => {
|
|
15023
|
-
e.setFieldsValue({ dob:
|
|
15095
|
+
e.setFieldsValue({ dob: Qg.dobFormatter(t.target.value) });
|
|
15024
15096
|
}
|
|
15025
15097
|
})
|
|
15026
15098
|
})
|
|
@@ -15030,7 +15102,7 @@ var Hg = {
|
|
|
15030
15102
|
children: /* @__PURE__ */ q(C.Item, {
|
|
15031
15103
|
label: "Company Name",
|
|
15032
15104
|
name: "companyName",
|
|
15033
|
-
rules: [
|
|
15105
|
+
rules: [$g.required("Company Name"), $g.companyName()],
|
|
15034
15106
|
children: /* @__PURE__ */ q(w, {})
|
|
15035
15107
|
})
|
|
15036
15108
|
}),
|
|
@@ -15119,7 +15191,7 @@ var Hg = {
|
|
|
15119
15191
|
label: "Resume new",
|
|
15120
15192
|
name: "resume",
|
|
15121
15193
|
children: /* @__PURE__ */ q(W, {
|
|
15122
|
-
beforeUpload:
|
|
15194
|
+
beforeUpload: e_.beforeUpload,
|
|
15123
15195
|
maxCount: 1,
|
|
15124
15196
|
children: /* @__PURE__ */ q(f, { children: "Upload Resume" })
|
|
15125
15197
|
})
|
|
@@ -15132,10 +15204,10 @@ var Hg = {
|
|
|
15132
15204
|
name: "documents",
|
|
15133
15205
|
valuePropName: "fileList",
|
|
15134
15206
|
getValueFromEvent: (e) => e?.fileList,
|
|
15135
|
-
rules: [
|
|
15207
|
+
rules: [$g.multiFileUpload()],
|
|
15136
15208
|
children: /* @__PURE__ */ q(W, {
|
|
15137
15209
|
multiple: !0,
|
|
15138
|
-
beforeUpload:
|
|
15210
|
+
beforeUpload: e_.beforeUpload,
|
|
15139
15211
|
children: /* @__PURE__ */ q(f, { children: "Upload Documents" })
|
|
15140
15212
|
})
|
|
15141
15213
|
})
|
|
@@ -15147,9 +15219,9 @@ var Hg = {
|
|
|
15147
15219
|
name: "file",
|
|
15148
15220
|
valuePropName: "fileList",
|
|
15149
15221
|
getValueFromEvent: (e) => e?.fileList,
|
|
15150
|
-
rules: [
|
|
15222
|
+
rules: [$g.fileUpload()],
|
|
15151
15223
|
children: /* @__PURE__ */ q(W, {
|
|
15152
|
-
beforeUpload:
|
|
15224
|
+
beforeUpload: e_.beforeUpload,
|
|
15153
15225
|
maxCount: 1,
|
|
15154
15226
|
children: /* @__PURE__ */ q(f, { children: "Upload" })
|
|
15155
15227
|
})
|
|
@@ -15206,7 +15278,7 @@ var Hg = {
|
|
|
15206
15278
|
]
|
|
15207
15279
|
})
|
|
15208
15280
|
});
|
|
15209
|
-
}, { Text:
|
|
15281
|
+
}, { Text: n_ } = U, r_ = [
|
|
15210
15282
|
{
|
|
15211
15283
|
label: "Total Jobs",
|
|
15212
15284
|
value: 1697,
|
|
@@ -15222,13 +15294,13 @@ var Hg = {
|
|
|
15222
15294
|
value: 600,
|
|
15223
15295
|
icon: "user"
|
|
15224
15296
|
}
|
|
15225
|
-
],
|
|
15297
|
+
], i_ = {
|
|
15226
15298
|
fileText: /* @__PURE__ */ q(Be, {}),
|
|
15227
15299
|
checkCircle: /* @__PURE__ */ q(ye, {}),
|
|
15228
15300
|
user: /* @__PURE__ */ q(Ft, {}),
|
|
15229
15301
|
filter: /* @__PURE__ */ q(Ue, {})
|
|
15230
15302
|
};
|
|
15231
|
-
function
|
|
15303
|
+
function a_({ stats: e = r_ }) {
|
|
15232
15304
|
return /* @__PURE__ */ q(p, { children: /* @__PURE__ */ q(F, {
|
|
15233
15305
|
gutter: [12, 12],
|
|
15234
15306
|
children: e.map((e) => /* @__PURE__ */ q(h, {
|
|
@@ -15241,7 +15313,7 @@ function e_({ stats: e = Qg }) {
|
|
|
15241
15313
|
className: "stats-inner-card",
|
|
15242
15314
|
children: [/* @__PURE__ */ J(R, {
|
|
15243
15315
|
align: "center",
|
|
15244
|
-
children: [
|
|
15316
|
+
children: [i_[e.icon] ?? i_.fileText, /* @__PURE__ */ q(n_, { children: e.label })]
|
|
15245
15317
|
}), /* @__PURE__ */ q(te, { value: e.value })]
|
|
15246
15318
|
})
|
|
15247
15319
|
}, e.label))
|
|
@@ -15249,14 +15321,14 @@ function e_({ stats: e = Qg }) {
|
|
|
15249
15321
|
}
|
|
15250
15322
|
//#endregion
|
|
15251
15323
|
//#region src/pages/Modules/Admin/FormGroupsSection.jsx
|
|
15252
|
-
var { Text:
|
|
15324
|
+
var { Text: o_ } = U, s_ = [
|
|
15253
15325
|
"#0053a5",
|
|
15254
15326
|
"#52c41a",
|
|
15255
15327
|
"#722ed1",
|
|
15256
15328
|
"#fa8c16",
|
|
15257
15329
|
"#eb2f96",
|
|
15258
15330
|
"#13c2c2"
|
|
15259
|
-
],
|
|
15331
|
+
], c_ = [
|
|
15260
15332
|
{
|
|
15261
15333
|
label: "Text",
|
|
15262
15334
|
value: "text"
|
|
@@ -15301,7 +15373,7 @@ var { Text: t_ } = U, n_ = [
|
|
|
15301
15373
|
label: "File",
|
|
15302
15374
|
value: "file"
|
|
15303
15375
|
}
|
|
15304
|
-
],
|
|
15376
|
+
], l_ = [
|
|
15305
15377
|
{
|
|
15306
15378
|
label: "Static (define options here)",
|
|
15307
15379
|
value: "static"
|
|
@@ -15322,7 +15394,7 @@ var { Text: t_ } = U, n_ = [
|
|
|
15322
15394
|
label: "Group value",
|
|
15323
15395
|
value: "group"
|
|
15324
15396
|
}
|
|
15325
|
-
],
|
|
15397
|
+
], u_ = [
|
|
15326
15398
|
{
|
|
15327
15399
|
label: "Required",
|
|
15328
15400
|
value: "required",
|
|
@@ -15417,7 +15489,7 @@ var { Text: t_ } = U, n_ = [
|
|
|
15417
15489
|
placeholder: "e.g. 18",
|
|
15418
15490
|
messageOptional: !0
|
|
15419
15491
|
}
|
|
15420
|
-
],
|
|
15492
|
+
], d_ = [
|
|
15421
15493
|
{
|
|
15422
15494
|
label: "Equals (=)",
|
|
15423
15495
|
value: "eq"
|
|
@@ -15434,7 +15506,7 @@ var { Text: t_ } = U, n_ = [
|
|
|
15434
15506
|
label: "Is empty",
|
|
15435
15507
|
value: "falsy"
|
|
15436
15508
|
}
|
|
15437
|
-
],
|
|
15509
|
+
], f_ = [
|
|
15438
15510
|
{
|
|
15439
15511
|
label: "Auto (infer from field)",
|
|
15440
15512
|
value: "auto"
|
|
@@ -15463,7 +15535,7 @@ var { Text: t_ } = U, n_ = [
|
|
|
15463
15535
|
label: "Date (ISO)",
|
|
15464
15536
|
value: "date"
|
|
15465
15537
|
}
|
|
15466
|
-
],
|
|
15538
|
+
], p_ = [
|
|
15467
15539
|
{
|
|
15468
15540
|
label: "(none)",
|
|
15469
15541
|
value: ""
|
|
@@ -15480,7 +15552,7 @@ var { Text: t_ } = U, n_ = [
|
|
|
15480
15552
|
label: "Boolean",
|
|
15481
15553
|
value: "boolean"
|
|
15482
15554
|
}
|
|
15483
|
-
],
|
|
15555
|
+
], m_ = [
|
|
15484
15556
|
{
|
|
15485
15557
|
label: "Auto (value as-is)",
|
|
15486
15558
|
value: "auto"
|
|
@@ -15505,7 +15577,7 @@ var { Text: t_ } = U, n_ = [
|
|
|
15505
15577
|
label: "Skip (never send)",
|
|
15506
15578
|
value: "skip"
|
|
15507
15579
|
}
|
|
15508
|
-
],
|
|
15580
|
+
], h_ = {
|
|
15509
15581
|
required: "red",
|
|
15510
15582
|
min: "orange",
|
|
15511
15583
|
max: "gold",
|
|
@@ -15521,10 +15593,10 @@ var { Text: t_ } = U, n_ = [
|
|
|
15521
15593
|
noFutureDate: "magenta",
|
|
15522
15594
|
minAge: "green"
|
|
15523
15595
|
};
|
|
15524
|
-
function
|
|
15525
|
-
return
|
|
15596
|
+
function g_(e) {
|
|
15597
|
+
return u_.find((t) => t.value === e) ?? { hasValue: !1 };
|
|
15526
15598
|
}
|
|
15527
|
-
function
|
|
15599
|
+
function __(e) {
|
|
15528
15600
|
return [{
|
|
15529
15601
|
key: "all",
|
|
15530
15602
|
label: "All",
|
|
@@ -15532,17 +15604,17 @@ function f_(e) {
|
|
|
15532
15604
|
}, ...e.map((e, t) => ({
|
|
15533
15605
|
key: e.key,
|
|
15534
15606
|
label: e.label,
|
|
15535
|
-
color:
|
|
15607
|
+
color: s_[t % s_.length]
|
|
15536
15608
|
}))];
|
|
15537
15609
|
}
|
|
15538
|
-
function
|
|
15610
|
+
function v_(e) {
|
|
15539
15611
|
return Object.fromEntries(e.map(({ key: e }) => [e, {
|
|
15540
15612
|
groups: [],
|
|
15541
15613
|
loading: !1,
|
|
15542
15614
|
error: ""
|
|
15543
15615
|
}]));
|
|
15544
15616
|
}
|
|
15545
|
-
function
|
|
15617
|
+
function y_(e) {
|
|
15546
15618
|
if (e == null) return;
|
|
15547
15619
|
if (typeof e == "object") return e;
|
|
15548
15620
|
let t = String(e).trim();
|
|
@@ -15553,7 +15625,7 @@ function m_(e) {
|
|
|
15553
15625
|
return;
|
|
15554
15626
|
}
|
|
15555
15627
|
}
|
|
15556
|
-
function
|
|
15628
|
+
function b_(e) {
|
|
15557
15629
|
if (e == null) return "";
|
|
15558
15630
|
if (typeof e == "string") return e;
|
|
15559
15631
|
try {
|
|
@@ -15562,17 +15634,17 @@ function h_(e) {
|
|
|
15562
15634
|
return "";
|
|
15563
15635
|
}
|
|
15564
15636
|
}
|
|
15565
|
-
function
|
|
15637
|
+
function x_(e, t) {
|
|
15566
15638
|
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);
|
|
15567
|
-
let n =
|
|
15639
|
+
let n = y_(t.payloadTemplate);
|
|
15568
15640
|
n && (e.payloadTemplate = n);
|
|
15569
|
-
let r =
|
|
15641
|
+
let r = y_(t.transformRule);
|
|
15570
15642
|
return r && (e.transformRule = r), e;
|
|
15571
15643
|
}
|
|
15572
|
-
function
|
|
15644
|
+
function S_(e = []) {
|
|
15573
15645
|
return e.map((e) => {
|
|
15574
15646
|
let t = (e.validations ?? []).filter((e) => e?.type).map((e) => {
|
|
15575
|
-
let t =
|
|
15647
|
+
let t = g_(e.type), n = {
|
|
15576
15648
|
type: e.type,
|
|
15577
15649
|
message: e.message ?? ""
|
|
15578
15650
|
};
|
|
@@ -15587,7 +15659,7 @@ function __(e = []) {
|
|
|
15587
15659
|
formatter: e.formatter ?? "",
|
|
15588
15660
|
validations: t
|
|
15589
15661
|
};
|
|
15590
|
-
if (
|
|
15662
|
+
if (x_(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) {
|
|
15591
15663
|
n.showIf = {
|
|
15592
15664
|
field: e.showIf.field,
|
|
15593
15665
|
operator: e.showIf.operator ?? "eq"
|
|
@@ -15606,7 +15678,7 @@ function __(e = []) {
|
|
|
15606
15678
|
return n;
|
|
15607
15679
|
});
|
|
15608
15680
|
}
|
|
15609
|
-
function
|
|
15681
|
+
function C_(e) {
|
|
15610
15682
|
return {
|
|
15611
15683
|
...e,
|
|
15612
15684
|
show: e.show === 1,
|
|
@@ -15635,8 +15707,8 @@ function v_(e) {
|
|
|
15635
15707
|
defaultValue: e.defaultValue ?? "",
|
|
15636
15708
|
richValue: e.richValue ?? !1,
|
|
15637
15709
|
omitEmpty: e.omitEmpty ?? !1,
|
|
15638
|
-
payloadTemplate:
|
|
15639
|
-
transformRule:
|
|
15710
|
+
payloadTemplate: b_(e.payloadTemplate),
|
|
15711
|
+
transformRule: b_(e.transformRule),
|
|
15640
15712
|
showIf: e.showIf?.field ? {
|
|
15641
15713
|
field: e.showIf.field,
|
|
15642
15714
|
operator: e.showIf.operator ?? "eq",
|
|
@@ -15653,7 +15725,7 @@ function v_(e) {
|
|
|
15653
15725
|
}))
|
|
15654
15726
|
};
|
|
15655
15727
|
}
|
|
15656
|
-
function
|
|
15728
|
+
function w_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, moduleFieldOptions: o, fieldsLoading: s, dragIndexRef: l, dragOverIndex: u, setDragOverIndex: d, onFieldKeySelect: p }) {
|
|
15657
15729
|
let m = [...a, "fields"];
|
|
15658
15730
|
return /* @__PURE__ */ J(K, { children: [t.map(({ key: e, name: t, ...n }, a) => {
|
|
15659
15731
|
let s = [...m, t];
|
|
@@ -15733,7 +15805,7 @@ function y_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
15733
15805
|
initialValue: "text",
|
|
15734
15806
|
children: /* @__PURE__ */ q(I, {
|
|
15735
15807
|
size: "small",
|
|
15736
|
-
options:
|
|
15808
|
+
options: c_
|
|
15737
15809
|
})
|
|
15738
15810
|
}),
|
|
15739
15811
|
/* @__PURE__ */ q(C.Item, {
|
|
@@ -15840,7 +15912,7 @@ function y_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
15840
15912
|
children: /* @__PURE__ */ q(I, {
|
|
15841
15913
|
size: "small",
|
|
15842
15914
|
style: { width: 190 },
|
|
15843
|
-
options:
|
|
15915
|
+
options: l_
|
|
15844
15916
|
})
|
|
15845
15917
|
}),
|
|
15846
15918
|
n === "select" && /* @__PURE__ */ q(C.Item, {
|
|
@@ -16110,7 +16182,7 @@ function y_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16110
16182
|
children: /* @__PURE__ */ q(I, {
|
|
16111
16183
|
size: "small",
|
|
16112
16184
|
style: { width: 130 },
|
|
16113
|
-
options:
|
|
16185
|
+
options: d_,
|
|
16114
16186
|
getPopupContainer: () => document.body
|
|
16115
16187
|
})
|
|
16116
16188
|
}), i && /* @__PURE__ */ q(C.Item, {
|
|
@@ -16198,7 +16270,7 @@ function y_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16198
16270
|
children: /* @__PURE__ */ q(I, {
|
|
16199
16271
|
size: "small",
|
|
16200
16272
|
style: { width: 170 },
|
|
16201
|
-
options:
|
|
16273
|
+
options: f_,
|
|
16202
16274
|
getPopupContainer: () => document.body
|
|
16203
16275
|
})
|
|
16204
16276
|
}),
|
|
@@ -16209,7 +16281,7 @@ function y_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16209
16281
|
children: /* @__PURE__ */ q(I, {
|
|
16210
16282
|
size: "small",
|
|
16211
16283
|
style: { width: 130 },
|
|
16212
|
-
options:
|
|
16284
|
+
options: p_,
|
|
16213
16285
|
getPopupContainer: () => document.body
|
|
16214
16286
|
})
|
|
16215
16287
|
}),
|
|
@@ -16221,7 +16293,7 @@ function y_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16221
16293
|
children: /* @__PURE__ */ q(I, {
|
|
16222
16294
|
size: "small",
|
|
16223
16295
|
style: { width: 210 },
|
|
16224
|
-
options:
|
|
16296
|
+
options: m_,
|
|
16225
16297
|
getPopupContainer: () => document.body
|
|
16226
16298
|
})
|
|
16227
16299
|
}),
|
|
@@ -16350,7 +16422,7 @@ function y_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16350
16422
|
shouldUpdate: !0,
|
|
16351
16423
|
style: { marginBottom: 6 },
|
|
16352
16424
|
children: ({ getFieldValue: e }) => {
|
|
16353
|
-
let i =
|
|
16425
|
+
let i = g_(e([
|
|
16354
16426
|
...m,
|
|
16355
16427
|
t,
|
|
16356
16428
|
"validations",
|
|
@@ -16373,7 +16445,7 @@ function y_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16373
16445
|
style: { width: 148 },
|
|
16374
16446
|
listHeight: 400,
|
|
16375
16447
|
getPopupContainer: () => document.body,
|
|
16376
|
-
options:
|
|
16448
|
+
options: u_.map((e) => ({
|
|
16377
16449
|
label: e.label,
|
|
16378
16450
|
value: e.value
|
|
16379
16451
|
}))
|
|
@@ -16458,7 +16530,7 @@ function y_({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
16458
16530
|
children: "Add Field"
|
|
16459
16531
|
})] });
|
|
16460
16532
|
}
|
|
16461
|
-
function
|
|
16533
|
+
function T_({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allGroupsByModule: s, onClose: c, onSaved: l, onSaveGroup: u }) {
|
|
16462
16534
|
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);
|
|
16463
16535
|
async function O(e) {
|
|
16464
16536
|
if (!(!e || E.current[e])) {
|
|
@@ -16485,7 +16557,7 @@ function b_({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
16485
16557
|
label: t.label,
|
|
16486
16558
|
addRow: t.addRow ?? !1,
|
|
16487
16559
|
order: t.order ?? 0,
|
|
16488
|
-
fields: (t.fields ?? []).map(
|
|
16560
|
+
fields: (t.fields ?? []).map(C_)
|
|
16489
16561
|
}) : (d.resetFields(), d.setFieldsValue({
|
|
16490
16562
|
module: r,
|
|
16491
16563
|
addRow: !1,
|
|
@@ -16552,7 +16624,7 @@ function b_({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
16552
16624
|
label: e.label,
|
|
16553
16625
|
addRow: e.addRow ?? !1,
|
|
16554
16626
|
order: Number(e.order ?? 0),
|
|
16555
|
-
fields:
|
|
16627
|
+
fields: S_(e.fields ?? [])
|
|
16556
16628
|
};
|
|
16557
16629
|
u ? await u(n, t) : t ? (await $a(t.id, n), G.success("Group updated")) : (await Qa(n), G.success("Group created")), l();
|
|
16558
16630
|
} catch (e) {
|
|
@@ -16675,7 +16747,7 @@ function b_({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
16675
16747
|
}),
|
|
16676
16748
|
/* @__PURE__ */ q(C.List, {
|
|
16677
16749
|
name: "fields",
|
|
16678
|
-
children: (e, { add: t, remove: n, move: r }) =>
|
|
16750
|
+
children: (e, { add: t, remove: n, move: r }) => w_({
|
|
16679
16751
|
form: d,
|
|
16680
16752
|
fieldItems: e,
|
|
16681
16753
|
add: t,
|
|
@@ -16694,13 +16766,13 @@ function b_({ open: e, editingGroup: t, defaultModule: n, moduleOptions: i, allG
|
|
|
16694
16766
|
})
|
|
16695
16767
|
});
|
|
16696
16768
|
}
|
|
16697
|
-
function
|
|
16769
|
+
function E_({ groups: e, onEdit: t, onDelete: n }) {
|
|
16698
16770
|
let r = [
|
|
16699
16771
|
{
|
|
16700
16772
|
title: "Label",
|
|
16701
16773
|
dataIndex: "label",
|
|
16702
16774
|
key: "label",
|
|
16703
|
-
render: (e) => /* @__PURE__ */ q(
|
|
16775
|
+
render: (e) => /* @__PURE__ */ q(o_, {
|
|
16704
16776
|
strong: !0,
|
|
16705
16777
|
style: { color: "var(--color-text-heading)" },
|
|
16706
16778
|
children: e
|
|
@@ -16802,7 +16874,7 @@ function x_({ groups: e, onEdit: t, onDelete: n }) {
|
|
|
16802
16874
|
style: { padding: "24px 0" }
|
|
16803
16875
|
}) },
|
|
16804
16876
|
expandable: {
|
|
16805
|
-
expandedRowRender: (e) => (e.fields ?? []).length === 0 ? /* @__PURE__ */ q(
|
|
16877
|
+
expandedRowRender: (e) => (e.fields ?? []).length === 0 ? /* @__PURE__ */ q(o_, {
|
|
16806
16878
|
type: "secondary",
|
|
16807
16879
|
style: { fontSize: 12 },
|
|
16808
16880
|
children: "No fields in this group."
|
|
@@ -16890,7 +16962,7 @@ function x_({ groups: e, onEdit: t, onDelete: n }) {
|
|
|
16890
16962
|
} }), (e.validations ?? []).map((e, t) => /* @__PURE__ */ q(H, {
|
|
16891
16963
|
title: `${e.value !== void 0 && e.value !== "" ? `Value: ${e.value} — ` : ""}${e.message}`,
|
|
16892
16964
|
children: /* @__PURE__ */ J(V, {
|
|
16893
|
-
color:
|
|
16965
|
+
color: h_[e.type] ?? "default",
|
|
16894
16966
|
style: {
|
|
16895
16967
|
cursor: "default",
|
|
16896
16968
|
fontFamily: "monospace",
|
|
@@ -16908,7 +16980,7 @@ function x_({ groups: e, onEdit: t, onDelete: n }) {
|
|
|
16908
16980
|
}
|
|
16909
16981
|
});
|
|
16910
16982
|
}
|
|
16911
|
-
function
|
|
16983
|
+
function D_({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s }) {
|
|
16912
16984
|
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);
|
|
16913
16985
|
async function T(e) {
|
|
16914
16986
|
if (!(!e || x.current[e])) {
|
|
@@ -16937,7 +17009,7 @@ function S_({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s
|
|
|
16937
17009
|
label: t.label,
|
|
16938
17010
|
groups: (t.groups ?? []).map((e) => ({
|
|
16939
17011
|
...e,
|
|
16940
|
-
fields: (e.fields ?? []).map(
|
|
17012
|
+
fields: (e.fields ?? []).map(C_)
|
|
16941
17013
|
}))
|
|
16942
17014
|
}), T(e);
|
|
16943
17015
|
} else c.resetFields(), c.setFieldsValue({ groups: [] }), p("");
|
|
@@ -16972,7 +17044,7 @@ function S_({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s
|
|
|
16972
17044
|
name: e.name,
|
|
16973
17045
|
addRow: e.addRow ?? !1,
|
|
16974
17046
|
order: Number(e.order ?? 0),
|
|
16975
|
-
fields:
|
|
17047
|
+
fields: S_(e.fields ?? [])
|
|
16976
17048
|
}))
|
|
16977
17049
|
};
|
|
16978
17050
|
t ? (await Yo(t.id, {
|
|
@@ -17185,7 +17257,7 @@ function S_({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s
|
|
|
17185
17257
|
}),
|
|
17186
17258
|
/* @__PURE__ */ q(C.List, {
|
|
17187
17259
|
name: [t, "fields"],
|
|
17188
|
-
children: (e, { add: n, remove: r, move: i }) =>
|
|
17260
|
+
children: (e, { add: n, remove: r, move: i }) => w_({
|
|
17189
17261
|
form: c,
|
|
17190
17262
|
fieldItems: e,
|
|
17191
17263
|
add: n,
|
|
@@ -17240,7 +17312,7 @@ function S_({ open: e, editingForm: t, moduleOptions: n, onClose: i, onSaved: s
|
|
|
17240
17312
|
})
|
|
17241
17313
|
});
|
|
17242
17314
|
}
|
|
17243
|
-
function
|
|
17315
|
+
function O_({ moduleOptions: e }) {
|
|
17244
17316
|
let [t, n] = o([]), [i, a] = o(!1), [s, c] = o(!1), [l, d] = o(null);
|
|
17245
17317
|
function p() {
|
|
17246
17318
|
a(!0), qo().then((e) => n(e)).catch((e) => G.error(e.message || "Could not load custom forms")).finally(() => a(!1));
|
|
@@ -17297,7 +17369,7 @@ function C_({ moduleOptions: e }) {
|
|
|
17297
17369
|
title: "Label",
|
|
17298
17370
|
dataIndex: "label",
|
|
17299
17371
|
key: "label",
|
|
17300
|
-
render: (e) => /* @__PURE__ */ q(
|
|
17372
|
+
render: (e) => /* @__PURE__ */ q(o_, {
|
|
17301
17373
|
strong: !0,
|
|
17302
17374
|
style: { color: "var(--color-text-heading)" },
|
|
17303
17375
|
children: e
|
|
@@ -17362,7 +17434,7 @@ function C_({ moduleOptions: e }) {
|
|
|
17362
17434
|
}) }
|
|
17363
17435
|
})
|
|
17364
17436
|
}),
|
|
17365
|
-
/* @__PURE__ */ q(
|
|
17437
|
+
/* @__PURE__ */ q(D_, {
|
|
17366
17438
|
open: s,
|
|
17367
17439
|
editingForm: l,
|
|
17368
17440
|
moduleOptions: e,
|
|
@@ -17375,16 +17447,16 @@ function C_({ moduleOptions: e }) {
|
|
|
17375
17447
|
})
|
|
17376
17448
|
] });
|
|
17377
17449
|
}
|
|
17378
|
-
function
|
|
17379
|
-
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 =
|
|
17450
|
+
function k_() {
|
|
17451
|
+
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 = __(e), S = e.map((e) => ({
|
|
17380
17452
|
value: e.key,
|
|
17381
17453
|
label: e.label
|
|
17382
17454
|
}));
|
|
17383
17455
|
r(() => {
|
|
17384
17456
|
Ja().then((e) => {
|
|
17385
17457
|
t(e);
|
|
17386
|
-
let n =
|
|
17387
|
-
c(
|
|
17458
|
+
let n = __(e);
|
|
17459
|
+
c(v_(n)), w("all", n);
|
|
17388
17460
|
}).catch(() => t([])).finally(() => i(!1));
|
|
17389
17461
|
}, []);
|
|
17390
17462
|
function C(e, t) {
|
|
@@ -17437,7 +17509,7 @@ function w_() {
|
|
|
17437
17509
|
v(!0);
|
|
17438
17510
|
try {
|
|
17439
17511
|
let e = (await to())?.data?.seeded ?? [];
|
|
17440
|
-
G.success(e.length ? `Seeded: ${e.join(", ")}` : "All modules already seeded"), c(
|
|
17512
|
+
G.success(e.length ? `Seeded: ${e.join(", ")}` : "All modules already seeded"), c(v_(x)), T(l), l !== "all" && T("all");
|
|
17441
17513
|
} catch (e) {
|
|
17442
17514
|
G.error(e.message || "Could not seed groups");
|
|
17443
17515
|
} finally {
|
|
@@ -17500,7 +17572,7 @@ function w_() {
|
|
|
17500
17572
|
}),
|
|
17501
17573
|
/* @__PURE__ */ q(z, {
|
|
17502
17574
|
spinning: r.loading,
|
|
17503
|
-
children: /* @__PURE__ */ q(
|
|
17575
|
+
children: /* @__PURE__ */ q(E_, {
|
|
17504
17576
|
groups: i,
|
|
17505
17577
|
onEdit: O,
|
|
17506
17578
|
onDelete: j
|
|
@@ -17513,7 +17585,7 @@ function w_() {
|
|
|
17513
17585
|
size: "middle",
|
|
17514
17586
|
className: "fg-tabs"
|
|
17515
17587
|
})
|
|
17516
|
-
}) }), /* @__PURE__ */ q(
|
|
17588
|
+
}) }), /* @__PURE__ */ q(T_, {
|
|
17517
17589
|
open: p,
|
|
17518
17590
|
editingGroup: h,
|
|
17519
17591
|
defaultModule: l === "all" ? S[0]?.value ?? "" : l,
|
|
@@ -17525,7 +17597,7 @@ function w_() {
|
|
|
17525
17597
|
}, {
|
|
17526
17598
|
key: "custom",
|
|
17527
17599
|
label: "Custom Form",
|
|
17528
|
-
children: /* @__PURE__ */ q(Ks, { children: /* @__PURE__ */ q(
|
|
17600
|
+
children: /* @__PURE__ */ q(Ks, { children: /* @__PURE__ */ q(O_, { moduleOptions: S }) })
|
|
17529
17601
|
}];
|
|
17530
17602
|
return /* @__PURE__ */ J("div", {
|
|
17531
17603
|
className: "fg-section",
|
|
@@ -17551,7 +17623,7 @@ function w_() {
|
|
|
17551
17623
|
children: "New Group"
|
|
17552
17624
|
})]
|
|
17553
17625
|
}) : null,
|
|
17554
|
-
children: [/* @__PURE__ */ q("div", { className: "admin-accent-bar" }), /* @__PURE__ */ J(
|
|
17626
|
+
children: [/* @__PURE__ */ q("div", { className: "admin-accent-bar" }), /* @__PURE__ */ J(o_, {
|
|
17555
17627
|
type: "secondary",
|
|
17556
17628
|
style: { fontSize: 13 },
|
|
17557
17629
|
children: [
|
|
@@ -17581,7 +17653,7 @@ function w_() {
|
|
|
17581
17653
|
}
|
|
17582
17654
|
//#endregion
|
|
17583
17655
|
//#region src/pages/Modules/Admin/DetailGroupsSection.jsx
|
|
17584
|
-
var { Text: $ } = U,
|
|
17656
|
+
var { Text: $ } = U, A_ = [
|
|
17585
17657
|
{
|
|
17586
17658
|
label: "Default",
|
|
17587
17659
|
value: "default"
|
|
@@ -17594,8 +17666,8 @@ var { Text: $ } = U, T_ = [
|
|
|
17594
17666
|
label: "Off (raw text)",
|
|
17595
17667
|
value: "off"
|
|
17596
17668
|
}
|
|
17597
|
-
],
|
|
17598
|
-
function
|
|
17669
|
+
], j_ = (e) => e === !0 ? "on" : e === !1 ? "off" : "default", M_ = (e) => e === "on" ? !0 : e === "off" ? !1 : void 0;
|
|
17670
|
+
function N_(e) {
|
|
17599
17671
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
17600
17672
|
for (let r of e ?? []) for (let e of r.fields ?? []) !e.field || t.has(e.field) || (t.add(e.field), n.push({
|
|
17601
17673
|
key: e.field,
|
|
@@ -17605,7 +17677,7 @@ function O_(e) {
|
|
|
17605
17677
|
}));
|
|
17606
17678
|
return n;
|
|
17607
17679
|
}
|
|
17608
|
-
function
|
|
17680
|
+
function P_(e, t) {
|
|
17609
17681
|
if (!t) return null;
|
|
17610
17682
|
let n = { field: e };
|
|
17611
17683
|
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);
|
|
@@ -17615,7 +17687,7 @@ function k_(e, t) {
|
|
|
17615
17687
|
for (let [e, n] of Object.entries(t.renderOptions ?? {})) n !== void 0 && n !== "" && n !== !1 && (i[e] = n);
|
|
17616
17688
|
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;
|
|
17617
17689
|
}
|
|
17618
|
-
function
|
|
17690
|
+
function F_(e) {
|
|
17619
17691
|
return (e ?? []).filter((e) => e.key && (e.fields ?? []).length).map((e) => {
|
|
17620
17692
|
let t = {
|
|
17621
17693
|
key: e.key,
|
|
@@ -17625,7 +17697,7 @@ function A_(e) {
|
|
|
17625
17697
|
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;
|
|
17626
17698
|
});
|
|
17627
17699
|
}
|
|
17628
|
-
function
|
|
17700
|
+
function I_({ value: e, onChange: t }) {
|
|
17629
17701
|
return /* @__PURE__ */ J(R.Compact, {
|
|
17630
17702
|
style: { width: "100%" },
|
|
17631
17703
|
children: [/* @__PURE__ */ q(w, {
|
|
@@ -17650,7 +17722,7 @@ function j_({ value: e, onChange: t }) {
|
|
|
17650
17722
|
})]
|
|
17651
17723
|
});
|
|
17652
17724
|
}
|
|
17653
|
-
function
|
|
17725
|
+
function L_({ open: e, fieldMeta: t, value: n, onClose: i, onSave: a }) {
|
|
17654
17726
|
let [s, l] = o(() => ({ ...n ?? {} })), [u, d] = o([]), [p, m] = o([]);
|
|
17655
17727
|
r(() => {
|
|
17656
17728
|
if (!e) return;
|
|
@@ -17785,7 +17857,7 @@ function M_({ open: e, fieldMeta: t, value: n, onClose: i, onSave: a }) {
|
|
|
17785
17857
|
type: "secondary",
|
|
17786
17858
|
style: { fontSize: 12 },
|
|
17787
17859
|
children: "Colour"
|
|
17788
|
-
}), /* @__PURE__ */ q(
|
|
17860
|
+
}), /* @__PURE__ */ q(I_, {
|
|
17789
17861
|
value: s.color,
|
|
17790
17862
|
onChange: (e) => h("color", e)
|
|
17791
17863
|
})]
|
|
@@ -17798,9 +17870,9 @@ function M_({ open: e, fieldMeta: t, value: n, onClose: i, onSave: a }) {
|
|
|
17798
17870
|
}), /* @__PURE__ */ q(I, {
|
|
17799
17871
|
size: "small",
|
|
17800
17872
|
style: { width: "100%" },
|
|
17801
|
-
options:
|
|
17802
|
-
value:
|
|
17803
|
-
onChange: (e) => h("capitalize",
|
|
17873
|
+
options: A_,
|
|
17874
|
+
value: j_(s.capitalize),
|
|
17875
|
+
onChange: (e) => h("capitalize", M_(e))
|
|
17804
17876
|
})]
|
|
17805
17877
|
})]
|
|
17806
17878
|
}),
|
|
@@ -18042,7 +18114,7 @@ function M_({ open: e, fieldMeta: t, value: n, onClose: i, onSave: a }) {
|
|
|
18042
18114
|
})]
|
|
18043
18115
|
});
|
|
18044
18116
|
}
|
|
18045
|
-
function
|
|
18117
|
+
function R_(e) {
|
|
18046
18118
|
let t = [];
|
|
18047
18119
|
return Object.entries(e ?? {}).forEach(([e, n]) => {
|
|
18048
18120
|
Object.entries(n ?? {}).forEach(([n, r]) => t.push({
|
|
@@ -18052,7 +18124,7 @@ function N_(e) {
|
|
|
18052
18124
|
}));
|
|
18053
18125
|
}), t;
|
|
18054
18126
|
}
|
|
18055
|
-
function
|
|
18127
|
+
function z_(e) {
|
|
18056
18128
|
let t = {};
|
|
18057
18129
|
for (let n of e ?? []) !n.field || !n.from || (t[n.field] = {
|
|
18058
18130
|
...t[n.field] ?? {},
|
|
@@ -18060,7 +18132,7 @@ function P_(e) {
|
|
|
18060
18132
|
});
|
|
18061
18133
|
return t;
|
|
18062
18134
|
}
|
|
18063
|
-
function
|
|
18135
|
+
function B_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, onSave: a }) {
|
|
18064
18136
|
let [s, c] = o(() => ({
|
|
18065
18137
|
key: "",
|
|
18066
18138
|
label: "",
|
|
@@ -18074,7 +18146,7 @@ function F_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
18074
18146
|
group: "",
|
|
18075
18147
|
hideSources: !0,
|
|
18076
18148
|
...t ?? {},
|
|
18077
|
-
mapRows:
|
|
18149
|
+
mapRows: R_(t?.valueMaps)
|
|
18078
18150
|
})), l = (e, t) => c((n) => ({
|
|
18079
18151
|
...n,
|
|
18080
18152
|
[e]: t
|
|
@@ -18122,7 +18194,7 @@ function F_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
18122
18194
|
let { mapRows: e, ...t } = s;
|
|
18123
18195
|
a({
|
|
18124
18196
|
...t,
|
|
18125
|
-
valueMaps:
|
|
18197
|
+
valueMaps: z_(e)
|
|
18126
18198
|
});
|
|
18127
18199
|
},
|
|
18128
18200
|
children: "Apply"
|
|
@@ -18388,7 +18460,7 @@ function F_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
18388
18460
|
type: "secondary",
|
|
18389
18461
|
style: { fontSize: 12 },
|
|
18390
18462
|
children: "Colour"
|
|
18391
|
-
}), /* @__PURE__ */ q(
|
|
18463
|
+
}), /* @__PURE__ */ q(I_, {
|
|
18392
18464
|
value: s.color,
|
|
18393
18465
|
onChange: (e) => l("color", e)
|
|
18394
18466
|
})]
|
|
@@ -18401,9 +18473,9 @@ function F_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
18401
18473
|
}), /* @__PURE__ */ q(I, {
|
|
18402
18474
|
size: "small",
|
|
18403
18475
|
style: { width: "100%" },
|
|
18404
|
-
options:
|
|
18405
|
-
value:
|
|
18406
|
-
onChange: (e) => l("capitalize",
|
|
18476
|
+
options: A_,
|
|
18477
|
+
value: j_(s.capitalize),
|
|
18478
|
+
onChange: (e) => l("capitalize", M_(e))
|
|
18407
18479
|
})]
|
|
18408
18480
|
})]
|
|
18409
18481
|
}),
|
|
@@ -18427,7 +18499,7 @@ function F_({ open: e, merge: t, fieldOptions: n, groupOptions: r, onClose: i, o
|
|
|
18427
18499
|
})
|
|
18428
18500
|
});
|
|
18429
18501
|
}
|
|
18430
|
-
function
|
|
18502
|
+
function V_({ open: e, module: t, onClose: n }) {
|
|
18431
18503
|
let [r, i] = o(""), [a, c] = o([]), [l, u] = o(!1), [d, p] = o(""), m = async () => {
|
|
18432
18504
|
if (!r.trim()) return G.warning("Enter a record _id to preview");
|
|
18433
18505
|
u(!0), p("");
|
|
@@ -18517,7 +18589,7 @@ function I_({ open: e, module: t, onClose: n }) {
|
|
|
18517
18589
|
]
|
|
18518
18590
|
});
|
|
18519
18591
|
}
|
|
18520
|
-
function
|
|
18592
|
+
function H_(e) {
|
|
18521
18593
|
let t = {};
|
|
18522
18594
|
return [
|
|
18523
18595
|
"s3BaseUrl",
|
|
@@ -18530,7 +18602,7 @@ function L_(e) {
|
|
|
18530
18602
|
e?.[n] !== void 0 && e?.[n] !== "" && (t[n] = e[n]);
|
|
18531
18603
|
}), Array.isArray(e?.documentNameOrder) && e.documentNameOrder.length && (t.documentNameOrder = e.documentNameOrder), t;
|
|
18532
18604
|
}
|
|
18533
|
-
function
|
|
18605
|
+
function U_({ open: e, onClose: t }) {
|
|
18534
18606
|
let [n, i] = o(() => ({ ...ds() })), [a, s] = o(!1);
|
|
18535
18607
|
r(() => {
|
|
18536
18608
|
if (!e) return;
|
|
@@ -18538,7 +18610,7 @@ function R_({ open: e, onClose: t }) {
|
|
|
18538
18610
|
return oo().then((e) => {
|
|
18539
18611
|
t || i((t) => ({
|
|
18540
18612
|
...t,
|
|
18541
|
-
...
|
|
18613
|
+
...H_(e)
|
|
18542
18614
|
}));
|
|
18543
18615
|
}).catch(() => {}), () => {
|
|
18544
18616
|
t = !0;
|
|
@@ -18711,7 +18783,7 @@ function R_({ open: e, onClose: t }) {
|
|
|
18711
18783
|
})]
|
|
18712
18784
|
});
|
|
18713
18785
|
}
|
|
18714
|
-
function
|
|
18786
|
+
function W_() {
|
|
18715
18787
|
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);
|
|
18716
18788
|
r(() => {
|
|
18717
18789
|
Ja().then((e) => {
|
|
@@ -18725,7 +18797,7 @@ function z_() {
|
|
|
18725
18797
|
try {
|
|
18726
18798
|
let [t, n] = await Promise.all([Xa(c), ro(c)]);
|
|
18727
18799
|
if (e) return;
|
|
18728
|
-
p(t ?? []), h(
|
|
18800
|
+
p(t ?? []), h(N_(t)), _((t ?? []).map((e) => ({
|
|
18729
18801
|
value: e.name,
|
|
18730
18802
|
label: e.label ?? e.name
|
|
18731
18803
|
})));
|
|
@@ -18751,8 +18823,8 @@ function z_() {
|
|
|
18751
18823
|
try {
|
|
18752
18824
|
await io({
|
|
18753
18825
|
module: c,
|
|
18754
|
-
fields: Object.entries(v).map(([e, t]) =>
|
|
18755
|
-
merges:
|
|
18826
|
+
fields: Object.entries(v).map(([e, t]) => P_(e, t)).filter(Boolean),
|
|
18827
|
+
merges: F_(b)
|
|
18756
18828
|
}), G.success("Detail view configuration saved");
|
|
18757
18829
|
} catch (e) {
|
|
18758
18830
|
G.error(e?.message || "Could not save configuration");
|
|
@@ -19167,14 +19239,14 @@ function z_() {
|
|
|
19167
19239
|
})
|
|
19168
19240
|
]
|
|
19169
19241
|
}) }),
|
|
19170
|
-
/* @__PURE__ */ q(
|
|
19242
|
+
/* @__PURE__ */ q(L_, {
|
|
19171
19243
|
open: !!k,
|
|
19172
19244
|
fieldMeta: k,
|
|
19173
19245
|
value: k ? v[k.key] : null,
|
|
19174
19246
|
onClose: () => A(null),
|
|
19175
19247
|
onSave: te
|
|
19176
19248
|
}, k?.key ?? "field-closed"),
|
|
19177
|
-
/* @__PURE__ */ q(
|
|
19249
|
+
/* @__PURE__ */ q(B_, {
|
|
19178
19250
|
open: !!j,
|
|
19179
19251
|
merge: j?.merge,
|
|
19180
19252
|
fieldOptions: I,
|
|
@@ -19182,11 +19254,11 @@ function z_() {
|
|
|
19182
19254
|
onClose: () => M(null),
|
|
19183
19255
|
onSave: ae
|
|
19184
19256
|
}, j ? `merge-${j.index ?? "new"}` : "merge-closed"),
|
|
19185
|
-
/* @__PURE__ */ q(
|
|
19257
|
+
/* @__PURE__ */ q(U_, {
|
|
19186
19258
|
open: P,
|
|
19187
19259
|
onClose: () => F(!1)
|
|
19188
19260
|
}),
|
|
19189
|
-
/* @__PURE__ */ q(
|
|
19261
|
+
/* @__PURE__ */ q(V_, {
|
|
19190
19262
|
open: ee,
|
|
19191
19263
|
module: c,
|
|
19192
19264
|
onClose: () => N(!1)
|
|
@@ -19196,13 +19268,13 @@ function z_() {
|
|
|
19196
19268
|
}
|
|
19197
19269
|
//#endregion
|
|
19198
19270
|
//#region src/pages/Modules/Admin/RowActionsSection.jsx
|
|
19199
|
-
var { Text:
|
|
19271
|
+
var { Text: G_ } = U, K_ = [
|
|
19200
19272
|
"job",
|
|
19201
19273
|
"candidate",
|
|
19202
19274
|
"onboarding",
|
|
19203
19275
|
"submission",
|
|
19204
19276
|
"vendor"
|
|
19205
|
-
],
|
|
19277
|
+
], q_ = [
|
|
19206
19278
|
{
|
|
19207
19279
|
value: "delete",
|
|
19208
19280
|
label: "delete (trash)"
|
|
@@ -19235,7 +19307,7 @@ var { Text: B_ } = U, V_ = [
|
|
|
19235
19307
|
value: "userSwitch",
|
|
19236
19308
|
label: "userSwitch (switch user)"
|
|
19237
19309
|
}
|
|
19238
|
-
],
|
|
19310
|
+
], J_ = [
|
|
19239
19311
|
{
|
|
19240
19312
|
value: "navigate",
|
|
19241
19313
|
label: "Navigate (open page)"
|
|
@@ -19252,12 +19324,12 @@ var { Text: B_ } = U, V_ = [
|
|
|
19252
19324
|
value: "copy",
|
|
19253
19325
|
label: "Copy (clipboard)"
|
|
19254
19326
|
}
|
|
19255
|
-
],
|
|
19327
|
+
], Y_ = [
|
|
19256
19328
|
"GET",
|
|
19257
19329
|
"POST",
|
|
19258
19330
|
"PUT",
|
|
19259
19331
|
"DELETE"
|
|
19260
|
-
],
|
|
19332
|
+
], X_ = {
|
|
19261
19333
|
key: "",
|
|
19262
19334
|
label: "",
|
|
19263
19335
|
icon: "",
|
|
@@ -19270,13 +19342,13 @@ var { Text: B_ } = U, V_ = [
|
|
|
19270
19342
|
danger: !1,
|
|
19271
19343
|
showInList: !0
|
|
19272
19344
|
};
|
|
19273
|
-
function
|
|
19345
|
+
function Z_() {
|
|
19274
19346
|
return `action_${Date.now()}`;
|
|
19275
19347
|
}
|
|
19276
|
-
function
|
|
19348
|
+
function Q_({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
19277
19349
|
let [a] = C.useForm(), [s, c] = o("navigate");
|
|
19278
19350
|
return r(() => {
|
|
19279
|
-
e && (a.setFieldsValue(t ??
|
|
19351
|
+
e && (a.setFieldsValue(t ?? X_), c(t?.actionType ?? "navigate"));
|
|
19280
19352
|
}, [
|
|
19281
19353
|
e,
|
|
19282
19354
|
t,
|
|
@@ -19298,7 +19370,7 @@ function q_({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
|
19298
19370
|
children: /* @__PURE__ */ J(C, {
|
|
19299
19371
|
form: a,
|
|
19300
19372
|
layout: "vertical",
|
|
19301
|
-
initialValues:
|
|
19373
|
+
initialValues: X_,
|
|
19302
19374
|
children: [
|
|
19303
19375
|
/* @__PURE__ */ q(C.Item, {
|
|
19304
19376
|
name: "key",
|
|
@@ -19326,7 +19398,7 @@ function q_({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
|
19326
19398
|
message: "Icon is required"
|
|
19327
19399
|
}],
|
|
19328
19400
|
children: /* @__PURE__ */ q(I, {
|
|
19329
|
-
options:
|
|
19401
|
+
options: q_,
|
|
19330
19402
|
placeholder: "Select icon"
|
|
19331
19403
|
})
|
|
19332
19404
|
}),
|
|
@@ -19335,7 +19407,7 @@ function q_({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
|
19335
19407
|
label: "Action Type",
|
|
19336
19408
|
rules: [{ required: !0 }],
|
|
19337
19409
|
children: /* @__PURE__ */ q(I, {
|
|
19338
|
-
options:
|
|
19410
|
+
options: J_,
|
|
19339
19411
|
onChange: (e) => c(e)
|
|
19340
19412
|
})
|
|
19341
19413
|
}),
|
|
@@ -19347,7 +19419,7 @@ function q_({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
|
19347
19419
|
s === "api" && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(C.Item, {
|
|
19348
19420
|
name: "apiMethod",
|
|
19349
19421
|
label: "API Method",
|
|
19350
|
-
children: /* @__PURE__ */ q(I, { options:
|
|
19422
|
+
children: /* @__PURE__ */ q(I, { options: Y_.map((e) => ({
|
|
19351
19423
|
value: e,
|
|
19352
19424
|
label: e
|
|
19353
19425
|
})) })
|
|
@@ -19385,14 +19457,14 @@ function q_({ open: e, initial: t, onClose: n, onSave: i }) {
|
|
|
19385
19457
|
})
|
|
19386
19458
|
});
|
|
19387
19459
|
}
|
|
19388
|
-
function
|
|
19460
|
+
function $_() {
|
|
19389
19461
|
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);
|
|
19390
19462
|
r(() => {
|
|
19391
19463
|
Promise.all([Ja(), fo()]).then(([e, { roles: n }]) => {
|
|
19392
19464
|
let r = Array.isArray(e) ? e.map((e) => e.module ?? e.key ?? e.value ?? e) : [];
|
|
19393
|
-
t([...new Set([...
|
|
19465
|
+
t([...new Set([...K_, ...r.filter(Boolean)])]), a(n ?? []);
|
|
19394
19466
|
}).catch(() => {
|
|
19395
|
-
t(
|
|
19467
|
+
t(K_);
|
|
19396
19468
|
});
|
|
19397
19469
|
}, []);
|
|
19398
19470
|
let N = n(async () => {
|
|
@@ -19457,9 +19529,9 @@ function J_() {
|
|
|
19457
19529
|
...t,
|
|
19458
19530
|
...e
|
|
19459
19531
|
} : t) : (t) => [...t, {
|
|
19460
|
-
...
|
|
19532
|
+
...X_,
|
|
19461
19533
|
...e,
|
|
19462
|
-
_localKey:
|
|
19534
|
+
_localKey: Z_()
|
|
19463
19535
|
}]), b(!0), A(!1);
|
|
19464
19536
|
}, ie = (e) => {
|
|
19465
19537
|
v((t) => t.filter((t) => t.key !== e)), b(!0);
|
|
@@ -19491,7 +19563,7 @@ function J_() {
|
|
|
19491
19563
|
level: 5,
|
|
19492
19564
|
children: "Row Actions"
|
|
19493
19565
|
}),
|
|
19494
|
-
/* @__PURE__ */ q(
|
|
19566
|
+
/* @__PURE__ */ q(G_, {
|
|
19495
19567
|
type: "secondary",
|
|
19496
19568
|
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."
|
|
19497
19569
|
})
|
|
@@ -19516,7 +19588,7 @@ function J_() {
|
|
|
19516
19588
|
wrap: !0,
|
|
19517
19589
|
size: 12,
|
|
19518
19590
|
children: [
|
|
19519
|
-
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
19591
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(G_, {
|
|
19520
19592
|
type: "secondary",
|
|
19521
19593
|
style: {
|
|
19522
19594
|
display: "block",
|
|
@@ -19533,7 +19605,7 @@ function J_() {
|
|
|
19533
19605
|
label: e
|
|
19534
19606
|
}))
|
|
19535
19607
|
})] }),
|
|
19536
|
-
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
19608
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(G_, {
|
|
19537
19609
|
type: "secondary",
|
|
19538
19610
|
style: {
|
|
19539
19611
|
display: "block",
|
|
@@ -19635,7 +19707,7 @@ function J_() {
|
|
|
19635
19707
|
title: "Key",
|
|
19636
19708
|
dataIndex: "key",
|
|
19637
19709
|
key: "key",
|
|
19638
|
-
render: (e) => /* @__PURE__ */ q(
|
|
19710
|
+
render: (e) => /* @__PURE__ */ q(G_, {
|
|
19639
19711
|
code: !0,
|
|
19640
19712
|
children: e
|
|
19641
19713
|
})
|
|
@@ -19664,11 +19736,11 @@ function J_() {
|
|
|
19664
19736
|
title: "Permission Key",
|
|
19665
19737
|
dataIndex: "permissionKey",
|
|
19666
19738
|
key: "permissionKey",
|
|
19667
|
-
render: (e) => e ? /* @__PURE__ */ q(
|
|
19739
|
+
render: (e) => e ? /* @__PURE__ */ q(G_, {
|
|
19668
19740
|
type: "secondary",
|
|
19669
19741
|
code: !0,
|
|
19670
19742
|
children: e
|
|
19671
|
-
}) : /* @__PURE__ */ q(
|
|
19743
|
+
}) : /* @__PURE__ */ q(G_, {
|
|
19672
19744
|
type: "secondary",
|
|
19673
19745
|
children: "—"
|
|
19674
19746
|
})
|
|
@@ -19728,7 +19800,7 @@ function J_() {
|
|
|
19728
19800
|
})
|
|
19729
19801
|
})
|
|
19730
19802
|
}),
|
|
19731
|
-
/* @__PURE__ */ q(
|
|
19803
|
+
/* @__PURE__ */ q(Q_, {
|
|
19732
19804
|
open: k,
|
|
19733
19805
|
initial: M,
|
|
19734
19806
|
onClose: () => A(!1),
|
|
@@ -19739,7 +19811,7 @@ function J_() {
|
|
|
19739
19811
|
}
|
|
19740
19812
|
//#endregion
|
|
19741
19813
|
//#region src/pages/Modules/Admin/ModuleActionRulesSection.jsx
|
|
19742
|
-
var { Text:
|
|
19814
|
+
var { Text: ev, Title: tv } = U, nv = [
|
|
19743
19815
|
{
|
|
19744
19816
|
value: "job",
|
|
19745
19817
|
label: "Job"
|
|
@@ -19752,7 +19824,7 @@ var { Text: Y_, Title: X_ } = U, Z_ = [
|
|
|
19752
19824
|
value: "submissions",
|
|
19753
19825
|
label: "Submissions"
|
|
19754
19826
|
}
|
|
19755
|
-
],
|
|
19827
|
+
], rv = [
|
|
19756
19828
|
{
|
|
19757
19829
|
value: "eq",
|
|
19758
19830
|
label: "equals"
|
|
@@ -19781,17 +19853,17 @@ var { Text: Y_, Title: X_ } = U, Z_ = [
|
|
|
19781
19853
|
value: "scope",
|
|
19782
19854
|
label: "view scope"
|
|
19783
19855
|
}
|
|
19784
|
-
],
|
|
19856
|
+
], iv = [{
|
|
19785
19857
|
value: "myJobs",
|
|
19786
19858
|
label: "My Jobs"
|
|
19787
19859
|
}, {
|
|
19788
19860
|
value: "allJobs",
|
|
19789
19861
|
label: "All Jobs"
|
|
19790
|
-
}],
|
|
19862
|
+
}], av = [
|
|
19791
19863
|
"eq",
|
|
19792
19864
|
"ne",
|
|
19793
19865
|
"contains"
|
|
19794
|
-
],
|
|
19866
|
+
], ov = "scope", sv = "fieldEq", cv = [
|
|
19795
19867
|
{
|
|
19796
19868
|
name: "Fulfilled jobs — block sourcing",
|
|
19797
19869
|
description: "When a job status is fulfilled and has no recruiters, hide source & quick-submit buttons.",
|
|
@@ -19839,26 +19911,26 @@ var { Text: Y_, Title: X_ } = U, Z_ = [
|
|
|
19839
19911
|
blockedActions: ["sourceCandidates", "quickSubmit"],
|
|
19840
19912
|
isActive: !0
|
|
19841
19913
|
}
|
|
19842
|
-
],
|
|
19914
|
+
], lv = () => ({
|
|
19843
19915
|
field: "",
|
|
19844
19916
|
operator: "eq",
|
|
19845
19917
|
value: "",
|
|
19846
19918
|
compareField: ""
|
|
19847
|
-
}),
|
|
19919
|
+
}), uv = () => ({
|
|
19848
19920
|
name: "",
|
|
19849
19921
|
description: "",
|
|
19850
|
-
conditions: [
|
|
19922
|
+
conditions: [lv()],
|
|
19851
19923
|
blockedActions: [],
|
|
19852
19924
|
isActive: !0
|
|
19853
19925
|
});
|
|
19854
|
-
function
|
|
19855
|
-
return
|
|
19926
|
+
function dv(e) {
|
|
19927
|
+
return rv.find((t) => t.value === e)?.label ?? e;
|
|
19856
19928
|
}
|
|
19857
|
-
function
|
|
19858
|
-
return e.operator ===
|
|
19929
|
+
function fv(e) {
|
|
19930
|
+
return e.operator === ov ? `scope = ${e.value}` : e.operator === sv ? `${e.field} = field:${e.compareField}` : ["isEmpty", "notEmpty"].includes(e.operator) ? `${e.field} ${dv(e.operator)}` : `${e.field} ${dv(e.operator)} "${e.value}"`;
|
|
19859
19931
|
}
|
|
19860
|
-
function
|
|
19861
|
-
let [e, t] = o("job"), [n, i] = o([]), [a, c] = o(!1), [l, u] = o(!1), [d, p] = o(null), [m, h] = o(
|
|
19932
|
+
function pv() {
|
|
19933
|
+
let [e, t] = o("job"), [n, i] = o([]), [a, c] = o(!1), [l, u] = o(!1), [d, p] = o(null), [m, h] = o(uv()), [g, _] = o(!1), [b, x] = o(!1), [S, T] = o([]), [E, D] = o([]);
|
|
19862
19934
|
function O(e) {
|
|
19863
19935
|
c(!0), is(e).then((e) => i(Array.isArray(e) ? e : [])).catch(() => i([])).finally(() => c(!1));
|
|
19864
19936
|
}
|
|
@@ -19887,13 +19959,13 @@ function cv() {
|
|
|
19887
19959
|
O(e), k(e), A(e);
|
|
19888
19960
|
}, [e]);
|
|
19889
19961
|
function M() {
|
|
19890
|
-
p(null), h(
|
|
19962
|
+
p(null), h(uv()), u(!0);
|
|
19891
19963
|
}
|
|
19892
19964
|
function ee(e) {
|
|
19893
19965
|
p(e), h({
|
|
19894
19966
|
name: e.name ?? "",
|
|
19895
19967
|
description: e.description ?? "",
|
|
19896
|
-
conditions: e.conditions?.length ? e.conditions.map((e) => ({ ...e })) : [
|
|
19968
|
+
conditions: e.conditions?.length ? e.conditions.map((e) => ({ ...e })) : [lv()],
|
|
19897
19969
|
blockedActions: e.blockedActions ?? [],
|
|
19898
19970
|
isActive: e.isActive ?? !0
|
|
19899
19971
|
}), u(!0);
|
|
@@ -19917,7 +19989,7 @@ function cv() {
|
|
|
19917
19989
|
async function F() {
|
|
19918
19990
|
x(!0);
|
|
19919
19991
|
try {
|
|
19920
|
-
for (let t of
|
|
19992
|
+
for (let t of cv) await as({
|
|
19921
19993
|
...t,
|
|
19922
19994
|
module: e
|
|
19923
19995
|
});
|
|
@@ -19938,7 +20010,7 @@ function cv() {
|
|
|
19938
20010
|
function z() {
|
|
19939
20011
|
h((e) => ({
|
|
19940
20012
|
...e,
|
|
19941
|
-
conditions: [...e.conditions,
|
|
20013
|
+
conditions: [...e.conditions, lv()]
|
|
19942
20014
|
}));
|
|
19943
20015
|
}
|
|
19944
20016
|
function te(e) {
|
|
@@ -19959,13 +20031,13 @@ function cv() {
|
|
|
19959
20031
|
flexWrap: "wrap"
|
|
19960
20032
|
},
|
|
19961
20033
|
children: [
|
|
19962
|
-
/* @__PURE__ */ q(
|
|
20034
|
+
/* @__PURE__ */ q(tv, {
|
|
19963
20035
|
level: 5,
|
|
19964
20036
|
style: { margin: 0 },
|
|
19965
20037
|
children: "Action Rules"
|
|
19966
20038
|
}),
|
|
19967
20039
|
/* @__PURE__ */ q(I, {
|
|
19968
|
-
options:
|
|
20040
|
+
options: nv,
|
|
19969
20041
|
value: e,
|
|
19970
20042
|
onChange: t,
|
|
19971
20043
|
style: { width: 160 }
|
|
@@ -20013,10 +20085,10 @@ function cv() {
|
|
|
20013
20085
|
dataIndex: "name",
|
|
20014
20086
|
key: "name",
|
|
20015
20087
|
width: 200,
|
|
20016
|
-
render: (e, t) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
20088
|
+
render: (e, t) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(ev, {
|
|
20017
20089
|
strong: !0,
|
|
20018
20090
|
children: e
|
|
20019
|
-
}), t.description ? /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(
|
|
20091
|
+
}), t.description ? /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(ev, {
|
|
20020
20092
|
type: "secondary",
|
|
20021
20093
|
style: { fontSize: 11 },
|
|
20022
20094
|
children: t.description
|
|
@@ -20034,7 +20106,7 @@ function cv() {
|
|
|
20034
20106
|
fontSize: 11,
|
|
20035
20107
|
margin: 0
|
|
20036
20108
|
},
|
|
20037
|
-
children:
|
|
20109
|
+
children: fv(e)
|
|
20038
20110
|
}, t))
|
|
20039
20111
|
})
|
|
20040
20112
|
},
|
|
@@ -20152,7 +20224,7 @@ function cv() {
|
|
|
20152
20224
|
orientation: "left",
|
|
20153
20225
|
orientationMargin: 0,
|
|
20154
20226
|
style: { fontSize: 13 },
|
|
20155
|
-
children: ["Conditions ", /* @__PURE__ */ q(
|
|
20227
|
+
children: ["Conditions ", /* @__PURE__ */ q(ev, {
|
|
20156
20228
|
type: "secondary",
|
|
20157
20229
|
style: { fontSize: 12 },
|
|
20158
20230
|
children: "(ALL must match for the rule to fire)"
|
|
@@ -20181,7 +20253,7 @@ function cv() {
|
|
|
20181
20253
|
minWidth: 140
|
|
20182
20254
|
},
|
|
20183
20255
|
children: /* @__PURE__ */ q(I, {
|
|
20184
|
-
options:
|
|
20256
|
+
options: rv,
|
|
20185
20257
|
value: e.operator,
|
|
20186
20258
|
style: { width: 140 },
|
|
20187
20259
|
onChange: (e) => L(t, {
|
|
@@ -20191,7 +20263,7 @@ function cv() {
|
|
|
20191
20263
|
})
|
|
20192
20264
|
})
|
|
20193
20265
|
}),
|
|
20194
|
-
e.operator !==
|
|
20266
|
+
e.operator !== ov && /* @__PURE__ */ J(C.Item, {
|
|
20195
20267
|
label: "Record Field",
|
|
20196
20268
|
style: {
|
|
20197
20269
|
marginBottom: 0,
|
|
@@ -20209,7 +20281,7 @@ function cv() {
|
|
|
20209
20281
|
placeholder: "Select or type field name",
|
|
20210
20282
|
onChange: (e) => L(t, { field: e[e.length - 1] ?? "" }),
|
|
20211
20283
|
filterOption: (e, t) => (t?.label ?? t?.value ?? "").toLowerCase().includes(e.toLowerCase())
|
|
20212
|
-
}), /* @__PURE__ */ J(
|
|
20284
|
+
}), /* @__PURE__ */ J(ev, {
|
|
20213
20285
|
type: "secondary",
|
|
20214
20286
|
style: { fontSize: 11 },
|
|
20215
20287
|
children: [
|
|
@@ -20221,7 +20293,7 @@ function cv() {
|
|
|
20221
20293
|
]
|
|
20222
20294
|
})]
|
|
20223
20295
|
}),
|
|
20224
|
-
|
|
20296
|
+
av.includes(e.operator) && /* @__PURE__ */ q(C.Item, {
|
|
20225
20297
|
label: "Value",
|
|
20226
20298
|
style: {
|
|
20227
20299
|
marginBottom: 0,
|
|
@@ -20234,25 +20306,25 @@ function cv() {
|
|
|
20234
20306
|
onChange: (e) => L(t, { value: e.target.value })
|
|
20235
20307
|
})
|
|
20236
20308
|
}),
|
|
20237
|
-
e.operator ===
|
|
20309
|
+
e.operator === ov && /* @__PURE__ */ J(C.Item, {
|
|
20238
20310
|
label: "Scope Value",
|
|
20239
20311
|
style: {
|
|
20240
20312
|
marginBottom: 0,
|
|
20241
20313
|
minWidth: 140
|
|
20242
20314
|
},
|
|
20243
20315
|
children: [/* @__PURE__ */ q(I, {
|
|
20244
|
-
options:
|
|
20316
|
+
options: iv,
|
|
20245
20317
|
value: e.value || void 0,
|
|
20246
20318
|
style: { width: 150 },
|
|
20247
20319
|
placeholder: "Select scope",
|
|
20248
20320
|
onChange: (e) => L(t, { value: e })
|
|
20249
|
-
}), /* @__PURE__ */ q(
|
|
20321
|
+
}), /* @__PURE__ */ q(ev, {
|
|
20250
20322
|
type: "secondary",
|
|
20251
20323
|
style: { fontSize: 11 },
|
|
20252
20324
|
children: "Current view tab (myJobs / allJobs)"
|
|
20253
20325
|
})]
|
|
20254
20326
|
}),
|
|
20255
|
-
e.operator ===
|
|
20327
|
+
e.operator === sv && /* @__PURE__ */ J(C.Item, {
|
|
20256
20328
|
label: "Compare To Field",
|
|
20257
20329
|
style: {
|
|
20258
20330
|
marginBottom: 0,
|
|
@@ -20269,7 +20341,7 @@ function cv() {
|
|
|
20269
20341
|
placeholder: "Select or type field",
|
|
20270
20342
|
onChange: (e) => L(t, { compareField: e[e.length - 1] ?? "" }),
|
|
20271
20343
|
filterOption: (e, t) => (t?.label ?? t?.value ?? "").toLowerCase().includes(e.toLowerCase())
|
|
20272
|
-
}), /* @__PURE__ */ J(
|
|
20344
|
+
}), /* @__PURE__ */ J(ev, {
|
|
20273
20345
|
type: "secondary",
|
|
20274
20346
|
style: { fontSize: 11 },
|
|
20275
20347
|
children: ["e.g. ", /* @__PURE__ */ q("code", { children: "submissionCount" })]
|
|
@@ -20289,12 +20361,12 @@ function cv() {
|
|
|
20289
20361
|
]
|
|
20290
20362
|
}), /* @__PURE__ */ q("div", {
|
|
20291
20363
|
style: { marginTop: 6 },
|
|
20292
|
-
children: /* @__PURE__ */ J(
|
|
20364
|
+
children: /* @__PURE__ */ J(ev, {
|
|
20293
20365
|
type: "secondary",
|
|
20294
20366
|
style: { fontSize: 11 },
|
|
20295
20367
|
children: ["Preview: ", /* @__PURE__ */ q("code", {
|
|
20296
20368
|
style: { color: "#1677ff" },
|
|
20297
|
-
children:
|
|
20369
|
+
children: fv(e)
|
|
20298
20370
|
})]
|
|
20299
20371
|
})
|
|
20300
20372
|
})]
|
|
@@ -20309,7 +20381,7 @@ function cv() {
|
|
|
20309
20381
|
orientation: "left",
|
|
20310
20382
|
orientationMargin: 0,
|
|
20311
20383
|
style: { fontSize: 13 },
|
|
20312
|
-
children: ["Blocked Row Actions", /* @__PURE__ */ q(
|
|
20384
|
+
children: ["Blocked Row Actions", /* @__PURE__ */ q(ev, {
|
|
20313
20385
|
type: "secondary",
|
|
20314
20386
|
style: {
|
|
20315
20387
|
fontSize: 12,
|
|
@@ -20329,7 +20401,7 @@ function cv() {
|
|
|
20329
20401
|
blockedActions: e
|
|
20330
20402
|
})),
|
|
20331
20403
|
filterOption: (e, t) => (t?.value ?? "").toLowerCase().includes(e.toLowerCase())
|
|
20332
|
-
}), /* @__PURE__ */ J(
|
|
20404
|
+
}), /* @__PURE__ */ J(ev, {
|
|
20333
20405
|
type: "secondary",
|
|
20334
20406
|
style: { fontSize: 11 },
|
|
20335
20407
|
children: [
|
|
@@ -20359,7 +20431,7 @@ function cv() {
|
|
|
20359
20431
|
}
|
|
20360
20432
|
//#endregion
|
|
20361
20433
|
//#region src/pages/Modules/Admin/UsersSection.jsx
|
|
20362
|
-
var { Text:
|
|
20434
|
+
var { Text: mv } = U, { Option: hv } = I, gv = [
|
|
20363
20435
|
{
|
|
20364
20436
|
key: "job",
|
|
20365
20437
|
label: "Jobs"
|
|
@@ -20372,7 +20444,7 @@ var { Text: lv } = U, { Option: uv } = I, dv = [
|
|
|
20372
20444
|
key: "submissions",
|
|
20373
20445
|
label: "Submissions"
|
|
20374
20446
|
}
|
|
20375
|
-
],
|
|
20447
|
+
], _v = [
|
|
20376
20448
|
{
|
|
20377
20449
|
key: "listView",
|
|
20378
20450
|
label: "List View"
|
|
@@ -20389,7 +20461,7 @@ var { Text: lv } = U, { Option: uv } = I, dv = [
|
|
|
20389
20461
|
key: "permissions",
|
|
20390
20462
|
label: "Permissions"
|
|
20391
20463
|
}
|
|
20392
|
-
],
|
|
20464
|
+
], vv = [
|
|
20393
20465
|
{
|
|
20394
20466
|
key: "",
|
|
20395
20467
|
label: "Text",
|
|
@@ -20417,20 +20489,20 @@ var { Text: lv } = U, { Option: uv } = I, dv = [
|
|
|
20417
20489
|
icon: /* @__PURE__ */ q(et, { style: { fontSize: 16 } })
|
|
20418
20490
|
}
|
|
20419
20491
|
];
|
|
20420
|
-
function
|
|
20492
|
+
function yv(e) {
|
|
20421
20493
|
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 ?? "?"}`;
|
|
20422
20494
|
}
|
|
20423
|
-
function
|
|
20495
|
+
function bv(e) {
|
|
20424
20496
|
return {
|
|
20425
20497
|
...e,
|
|
20426
20498
|
key: e.USER_ID ?? e.user_id ?? e.userId ?? e.id ?? e._id,
|
|
20427
|
-
_name:
|
|
20499
|
+
_name: yv(e),
|
|
20428
20500
|
_email: e.email ?? e.EMAIL ?? e.user_email ?? "",
|
|
20429
20501
|
_role: e.role_name ?? e.roleName ?? e.ROLE_NAME ?? "",
|
|
20430
20502
|
_rawRef: e
|
|
20431
20503
|
};
|
|
20432
20504
|
}
|
|
20433
|
-
var
|
|
20505
|
+
var xv = [
|
|
20434
20506
|
{
|
|
20435
20507
|
color: "#52c41a",
|
|
20436
20508
|
bg: "#f6ffed"
|
|
@@ -20463,12 +20535,12 @@ var gv = [
|
|
|
20463
20535
|
color: "#faad14",
|
|
20464
20536
|
bg: "#fffbe6"
|
|
20465
20537
|
}
|
|
20466
|
-
],
|
|
20538
|
+
], Sv = {
|
|
20467
20539
|
job: "jobs",
|
|
20468
20540
|
candidate: "candidates",
|
|
20469
20541
|
submissions: "submissions"
|
|
20470
20542
|
};
|
|
20471
|
-
function
|
|
20543
|
+
function Cv({ 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 }) {
|
|
20472
20544
|
let [g, _] = o(""), [v, y] = o({}), [b, x] = o(!1);
|
|
20473
20545
|
function S(e) {
|
|
20474
20546
|
h(e === "common" ? {
|
|
@@ -20512,13 +20584,13 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20512
20584
|
async function O() {
|
|
20513
20585
|
x(!0);
|
|
20514
20586
|
try {
|
|
20515
|
-
let e = await _c(
|
|
20587
|
+
let e = await _c(Sv[p] ?? p, m, "", 50, 0), t = (Array.isArray(e) ? e : e?.data ?? []).map((e, t) => {
|
|
20516
20588
|
let n = typeof e == "object" ? e.value ?? e.label ?? "" : String(e), r = typeof e == "object" ? e.label ?? e.value ?? "" : String(e);
|
|
20517
20589
|
return {
|
|
20518
20590
|
value: String(n),
|
|
20519
20591
|
label: String(r),
|
|
20520
20592
|
variant: "badge",
|
|
20521
|
-
...
|
|
20593
|
+
...xv[t % xv.length]
|
|
20522
20594
|
};
|
|
20523
20595
|
});
|
|
20524
20596
|
if (t.length === 0) {
|
|
@@ -20564,7 +20636,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20564
20636
|
}),
|
|
20565
20637
|
/* @__PURE__ */ q("div", {
|
|
20566
20638
|
className: "uss-detail-row",
|
|
20567
|
-
children:
|
|
20639
|
+
children: vv.map((e) => /* @__PURE__ */ J("button", {
|
|
20568
20640
|
className: `uss-render-type-btn${A === e.key ? " active" : ""}`,
|
|
20569
20641
|
onClick: () => h({
|
|
20570
20642
|
renderType: e.key,
|
|
@@ -20618,7 +20690,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20618
20690
|
padding: 0
|
|
20619
20691
|
},
|
|
20620
20692
|
onChange: (e) => C({ color: e.target.value })
|
|
20621
|
-
}), /* @__PURE__ */ q(
|
|
20693
|
+
}), /* @__PURE__ */ q(mv, {
|
|
20622
20694
|
style: { fontSize: 10 },
|
|
20623
20695
|
children: "Text"
|
|
20624
20696
|
})]
|
|
@@ -20643,7 +20715,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20643
20715
|
padding: 0
|
|
20644
20716
|
},
|
|
20645
20717
|
onChange: (e) => C({ bg: e.target.value })
|
|
20646
|
-
}), /* @__PURE__ */ q(
|
|
20718
|
+
}), /* @__PURE__ */ q(mv, {
|
|
20647
20719
|
style: { fontSize: 10 },
|
|
20648
20720
|
children: "BG"
|
|
20649
20721
|
})]
|
|
@@ -20690,7 +20762,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20690
20762
|
alignItems: "center",
|
|
20691
20763
|
marginBottom: 6
|
|
20692
20764
|
},
|
|
20693
|
-
children: [/* @__PURE__ */ q(
|
|
20765
|
+
children: [/* @__PURE__ */ q(mv, {
|
|
20694
20766
|
style: {
|
|
20695
20767
|
fontSize: 11,
|
|
20696
20768
|
color: "#555",
|
|
@@ -20712,7 +20784,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20712
20784
|
})]
|
|
20713
20785
|
})]
|
|
20714
20786
|
}),
|
|
20715
|
-
ee.length === 0 && /* @__PURE__ */ q(
|
|
20787
|
+
ee.length === 0 && /* @__PURE__ */ q(mv, {
|
|
20716
20788
|
type: "secondary",
|
|
20717
20789
|
style: { fontSize: 12 },
|
|
20718
20790
|
children: "Click \"Auto-detect values\" to populate from live data, or \"Add\" to map manually."
|
|
@@ -20757,7 +20829,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20757
20829
|
padding: 0
|
|
20758
20830
|
},
|
|
20759
20831
|
onChange: (e) => E(t, { color: e.target.value })
|
|
20760
|
-
}), /* @__PURE__ */ q(
|
|
20832
|
+
}), /* @__PURE__ */ q(mv, {
|
|
20761
20833
|
style: { fontSize: 10 },
|
|
20762
20834
|
children: "Text"
|
|
20763
20835
|
})]
|
|
@@ -20782,7 +20854,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20782
20854
|
padding: 0
|
|
20783
20855
|
},
|
|
20784
20856
|
onChange: (e) => E(t, { bg: e.target.value })
|
|
20785
|
-
}), /* @__PURE__ */ q(
|
|
20857
|
+
}), /* @__PURE__ */ q(mv, {
|
|
20786
20858
|
style: { fontSize: 10 },
|
|
20787
20859
|
children: "BG"
|
|
20788
20860
|
})]
|
|
@@ -20823,7 +20895,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20823
20895
|
marginTop: 8
|
|
20824
20896
|
},
|
|
20825
20897
|
children: [
|
|
20826
|
-
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
20898
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(mv, {
|
|
20827
20899
|
style: {
|
|
20828
20900
|
fontSize: 11,
|
|
20829
20901
|
color: "#555",
|
|
@@ -20847,7 +20919,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20847
20919
|
labelField: e ?? ""
|
|
20848
20920
|
} })
|
|
20849
20921
|
})] }),
|
|
20850
|
-
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
20922
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(mv, {
|
|
20851
20923
|
style: {
|
|
20852
20924
|
fontSize: 11,
|
|
20853
20925
|
color: "#555",
|
|
@@ -20871,7 +20943,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20871
20943
|
colorField: e ?? ""
|
|
20872
20944
|
} })
|
|
20873
20945
|
})] }),
|
|
20874
|
-
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
20946
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(mv, {
|
|
20875
20947
|
style: {
|
|
20876
20948
|
fontSize: 11,
|
|
20877
20949
|
color: "#555",
|
|
@@ -20933,10 +21005,10 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20933
21005
|
value: e.linkType ?? "internal",
|
|
20934
21006
|
onChange: (e) => h({ linkType: e }),
|
|
20935
21007
|
style: { width: 120 },
|
|
20936
|
-
children: [/* @__PURE__ */ q(
|
|
21008
|
+
children: [/* @__PURE__ */ q(hv, {
|
|
20937
21009
|
value: "internal",
|
|
20938
21010
|
children: "internal"
|
|
20939
|
-
}), /* @__PURE__ */ q(
|
|
21011
|
+
}), /* @__PURE__ */ q(hv, {
|
|
20940
21012
|
value: "external",
|
|
20941
21013
|
children: "external"
|
|
20942
21014
|
})]
|
|
@@ -20945,10 +21017,10 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
20945
21017
|
value: e.linkTarget ?? "_self",
|
|
20946
21018
|
onChange: (e) => h({ linkTarget: e }),
|
|
20947
21019
|
style: { width: 100 },
|
|
20948
|
-
children: [/* @__PURE__ */ q(
|
|
21020
|
+
children: [/* @__PURE__ */ q(hv, {
|
|
20949
21021
|
value: "_self",
|
|
20950
21022
|
children: "_self"
|
|
20951
|
-
}), /* @__PURE__ */ q(
|
|
21023
|
+
}), /* @__PURE__ */ q(hv, {
|
|
20952
21024
|
value: "_blank",
|
|
20953
21025
|
children: "_blank"
|
|
20954
21026
|
})]
|
|
@@ -21002,7 +21074,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21002
21074
|
alignItems: "center",
|
|
21003
21075
|
gap: 8
|
|
21004
21076
|
},
|
|
21005
|
-
children: [/* @__PURE__ */ q(
|
|
21077
|
+
children: [/* @__PURE__ */ q(mv, {
|
|
21006
21078
|
style: {
|
|
21007
21079
|
fontSize: 11,
|
|
21008
21080
|
color: "var(--color-text-muted)"
|
|
@@ -21047,7 +21119,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21047
21119
|
showSearch: !0,
|
|
21048
21120
|
placeholder: "Select collection",
|
|
21049
21121
|
style: { flex: 1 },
|
|
21050
|
-
children: t.map((e) => /* @__PURE__ */ q(
|
|
21122
|
+
children: t.map((e) => /* @__PURE__ */ q(hv, {
|
|
21051
21123
|
value: e,
|
|
21052
21124
|
children: e
|
|
21053
21125
|
}, e))
|
|
@@ -21063,7 +21135,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21063
21135
|
onChange: (t) => a(e.fieldKey, { valueField: t }),
|
|
21064
21136
|
placeholder: "ID field",
|
|
21065
21137
|
style: { flex: 1 },
|
|
21066
|
-
children: n.map((e) => /* @__PURE__ */ q(
|
|
21138
|
+
children: n.map((e) => /* @__PURE__ */ q(hv, {
|
|
21067
21139
|
value: e,
|
|
21068
21140
|
children: e
|
|
21069
21141
|
}, e))
|
|
@@ -21079,7 +21151,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21079
21151
|
onChange: (t) => a(e.fieldKey, { displayField: t }),
|
|
21080
21152
|
placeholder: "Label field",
|
|
21081
21153
|
style: { flex: 1 },
|
|
21082
|
-
children: [...n, ...r].map((e) => /* @__PURE__ */ q(
|
|
21154
|
+
children: [...n, ...r].map((e) => /* @__PURE__ */ q(hv, {
|
|
21083
21155
|
value: e,
|
|
21084
21156
|
children: e
|
|
21085
21157
|
}, e))
|
|
@@ -21177,7 +21249,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21177
21249
|
gap: 8,
|
|
21178
21250
|
paddingLeft: 36
|
|
21179
21251
|
},
|
|
21180
|
-
children: [/* @__PURE__ */ q(
|
|
21252
|
+
children: [/* @__PURE__ */ q(mv, {
|
|
21181
21253
|
style: {
|
|
21182
21254
|
fontSize: 11,
|
|
21183
21255
|
color: "#999",
|
|
@@ -21202,7 +21274,7 @@ function vv({ field: e, collections: t, collFields: n, subfields: r, onCollectio
|
|
|
21202
21274
|
})
|
|
21203
21275
|
] });
|
|
21204
21276
|
}
|
|
21205
|
-
var
|
|
21277
|
+
var wv = [
|
|
21206
21278
|
{
|
|
21207
21279
|
label: "Module data (distinct)",
|
|
21208
21280
|
value: "module"
|
|
@@ -21215,11 +21287,11 @@ var yv = [
|
|
|
21215
21287
|
label: "Group value",
|
|
21216
21288
|
value: "group"
|
|
21217
21289
|
}
|
|
21218
|
-
],
|
|
21290
|
+
], Tv = [
|
|
21219
21291
|
"select",
|
|
21220
21292
|
"radio",
|
|
21221
21293
|
"checkbox"
|
|
21222
|
-
],
|
|
21294
|
+
], Ev = [
|
|
21223
21295
|
{
|
|
21224
21296
|
label: "Dropdown",
|
|
21225
21297
|
value: "dropdown"
|
|
@@ -21241,8 +21313,8 @@ var yv = [
|
|
|
21241
21313
|
value: "number-range"
|
|
21242
21314
|
}
|
|
21243
21315
|
];
|
|
21244
|
-
function
|
|
21245
|
-
let s =
|
|
21316
|
+
function Dv({ field: e, update: t, configType: n, collections: r, collFields: i, onCollectionChange: a, onLookupFieldChange: o }) {
|
|
21317
|
+
let s = Tv.includes(e.type), c = !!e.lookup;
|
|
21246
21318
|
function l(e) {
|
|
21247
21319
|
t({ lookup: e ? {
|
|
21248
21320
|
collection: "",
|
|
@@ -21264,7 +21336,7 @@ function Sv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21264
21336
|
alignItems: "center",
|
|
21265
21337
|
gap: 8
|
|
21266
21338
|
},
|
|
21267
|
-
children: [/* @__PURE__ */ q(
|
|
21339
|
+
children: [/* @__PURE__ */ q(mv, {
|
|
21268
21340
|
style: { fontSize: 12 },
|
|
21269
21341
|
children: "Editable"
|
|
21270
21342
|
}), /* @__PURE__ */ q(B, {
|
|
@@ -21279,7 +21351,7 @@ function Sv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21279
21351
|
alignItems: "center",
|
|
21280
21352
|
gap: 8
|
|
21281
21353
|
},
|
|
21282
|
-
children: [/* @__PURE__ */ q(
|
|
21354
|
+
children: [/* @__PURE__ */ q(mv, {
|
|
21283
21355
|
style: { fontSize: 12 },
|
|
21284
21356
|
children: "Mandatory"
|
|
21285
21357
|
}), /* @__PURE__ */ q(B, {
|
|
@@ -21294,14 +21366,14 @@ function Sv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21294
21366
|
alignItems: "center",
|
|
21295
21367
|
gap: 8
|
|
21296
21368
|
},
|
|
21297
|
-
children: [/* @__PURE__ */ q(
|
|
21369
|
+
children: [/* @__PURE__ */ q(mv, {
|
|
21298
21370
|
style: { fontSize: 12 },
|
|
21299
21371
|
children: "Value Input"
|
|
21300
21372
|
}), /* @__PURE__ */ q(I, {
|
|
21301
21373
|
size: "small",
|
|
21302
21374
|
value: e.filterInputType ?? "dropdown",
|
|
21303
21375
|
onChange: (e) => t({ filterInputType: e }),
|
|
21304
|
-
options:
|
|
21376
|
+
options: Ev,
|
|
21305
21377
|
style: { width: 140 }
|
|
21306
21378
|
})]
|
|
21307
21379
|
}),
|
|
@@ -21311,7 +21383,7 @@ function Sv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21311
21383
|
alignItems: "center",
|
|
21312
21384
|
gap: 8
|
|
21313
21385
|
},
|
|
21314
|
-
children: [/* @__PURE__ */ q(
|
|
21386
|
+
children: [/* @__PURE__ */ q(mv, {
|
|
21315
21387
|
style: { fontSize: 12 },
|
|
21316
21388
|
children: "Default"
|
|
21317
21389
|
}), /* @__PURE__ */ q(B, {
|
|
@@ -21326,7 +21398,7 @@ function Sv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21326
21398
|
alignItems: "center",
|
|
21327
21399
|
gap: 8
|
|
21328
21400
|
},
|
|
21329
|
-
children: [/* @__PURE__ */ q(
|
|
21401
|
+
children: [/* @__PURE__ */ q(mv, {
|
|
21330
21402
|
style: { fontSize: 12 },
|
|
21331
21403
|
children: "Lookup"
|
|
21332
21404
|
}), /* @__PURE__ */ q(B, {
|
|
@@ -21378,7 +21450,7 @@ function Sv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21378
21450
|
alignItems: "center",
|
|
21379
21451
|
gap: 8
|
|
21380
21452
|
},
|
|
21381
|
-
children: [/* @__PURE__ */ q(
|
|
21453
|
+
children: [/* @__PURE__ */ q(mv, {
|
|
21382
21454
|
style: { fontSize: 12 },
|
|
21383
21455
|
children: "Source"
|
|
21384
21456
|
}), /* @__PURE__ */ q(I, {
|
|
@@ -21388,7 +21460,7 @@ function Sv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21388
21460
|
dataSource: e,
|
|
21389
21461
|
groupName: ""
|
|
21390
21462
|
}),
|
|
21391
|
-
options:
|
|
21463
|
+
options: wv,
|
|
21392
21464
|
style: { width: 170 }
|
|
21393
21465
|
})]
|
|
21394
21466
|
}), (e.dataSource ?? "module") === "group" && /* @__PURE__ */ J("div", {
|
|
@@ -21397,7 +21469,7 @@ function Sv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21397
21469
|
alignItems: "center",
|
|
21398
21470
|
gap: 8
|
|
21399
21471
|
},
|
|
21400
|
-
children: [/* @__PURE__ */ q(
|
|
21472
|
+
children: [/* @__PURE__ */ q(mv, {
|
|
21401
21473
|
style: { fontSize: 12 },
|
|
21402
21474
|
children: "Group Name"
|
|
21403
21475
|
}), /* @__PURE__ */ q(w, {
|
|
@@ -21411,7 +21483,7 @@ function Sv({ field: e, update: t, configType: n, collections: r, collFields: i,
|
|
|
21411
21483
|
]
|
|
21412
21484
|
});
|
|
21413
21485
|
}
|
|
21414
|
-
function
|
|
21486
|
+
function Ov({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onReorder: s, collections: c, onFetchCollFields: l, dragFromRef: u }) {
|
|
21415
21487
|
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);
|
|
21416
21488
|
r(() => {
|
|
21417
21489
|
_(e.fieldName);
|
|
@@ -21557,7 +21629,7 @@ function Cv({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onRe
|
|
|
21557
21629
|
]
|
|
21558
21630
|
}), d && /* @__PURE__ */ q("div", {
|
|
21559
21631
|
className: "uss-detail-panel",
|
|
21560
|
-
children: n === "listView" ? /* @__PURE__ */ q(
|
|
21632
|
+
children: n === "listView" ? /* @__PURE__ */ q(Cv, {
|
|
21561
21633
|
field: e,
|
|
21562
21634
|
collections: c,
|
|
21563
21635
|
collFields: v,
|
|
@@ -21572,7 +21644,7 @@ function Cv({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onRe
|
|
|
21572
21644
|
moduleKey: i,
|
|
21573
21645
|
fieldKey: e.fieldKey,
|
|
21574
21646
|
update: j
|
|
21575
|
-
}) : /* @__PURE__ */ q(
|
|
21647
|
+
}) : /* @__PURE__ */ q(Dv, {
|
|
21576
21648
|
field: e,
|
|
21577
21649
|
update: j,
|
|
21578
21650
|
configType: n,
|
|
@@ -21583,7 +21655,7 @@ function Cv({ field: e, index: t, configType: n, moduleKey: i, onUpdate: a, onRe
|
|
|
21583
21655
|
})
|
|
21584
21656
|
})] });
|
|
21585
21657
|
}
|
|
21586
|
-
var
|
|
21658
|
+
var kv = {
|
|
21587
21659
|
jobs: {
|
|
21588
21660
|
title: "Jobs",
|
|
21589
21661
|
description: "Manage and configure job postings.",
|
|
@@ -21720,7 +21792,7 @@ var wv = {
|
|
|
21720
21792
|
"delete"
|
|
21721
21793
|
]
|
|
21722
21794
|
}
|
|
21723
|
-
},
|
|
21795
|
+
}, Av = {
|
|
21724
21796
|
view: "View",
|
|
21725
21797
|
add: "Add",
|
|
21726
21798
|
edit: "Edit",
|
|
@@ -21735,7 +21807,7 @@ var wv = {
|
|
|
21735
21807
|
candidate_all: "All Candidates",
|
|
21736
21808
|
my_jobs: "My Jobs",
|
|
21737
21809
|
all_jobs: "All Jobs"
|
|
21738
|
-
},
|
|
21810
|
+
}, jv = {
|
|
21739
21811
|
candidates: {
|
|
21740
21812
|
title: "Candidate View Access",
|
|
21741
21813
|
keys: ["candidate_self", "candidate_all"],
|
|
@@ -21752,13 +21824,13 @@ var wv = {
|
|
|
21752
21824
|
control: "mixed"
|
|
21753
21825
|
}
|
|
21754
21826
|
};
|
|
21755
|
-
function
|
|
21827
|
+
function Mv(e) {
|
|
21756
21828
|
return String(e || "").replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase()).trim();
|
|
21757
21829
|
}
|
|
21758
|
-
function
|
|
21759
|
-
return
|
|
21760
|
-
title:
|
|
21761
|
-
description: `Manage ${
|
|
21830
|
+
function Nv(e) {
|
|
21831
|
+
return kv[e] ?? {
|
|
21832
|
+
title: Mv(e),
|
|
21833
|
+
description: `Manage ${Mv(e).toLowerCase()} permissions.`,
|
|
21762
21834
|
Icon: le,
|
|
21763
21835
|
order: [
|
|
21764
21836
|
"view",
|
|
@@ -21768,23 +21840,23 @@ function Ov(e) {
|
|
|
21768
21840
|
]
|
|
21769
21841
|
};
|
|
21770
21842
|
}
|
|
21771
|
-
function
|
|
21772
|
-
let n = Object.keys(t?.permissions ?? {}), r =
|
|
21843
|
+
function Pv(e, t) {
|
|
21844
|
+
let n = Object.keys(t?.permissions ?? {}), r = Nv(e).order;
|
|
21773
21845
|
return [...r.filter((e) => n.includes(e)), ...n.filter((e) => !r.includes(e))];
|
|
21774
21846
|
}
|
|
21775
|
-
function
|
|
21776
|
-
let n =
|
|
21847
|
+
function Fv(e, t) {
|
|
21848
|
+
let n = jv[e];
|
|
21777
21849
|
return n ? n.keys.filter((e) => !!t?.permissions?.[e]) : [];
|
|
21778
21850
|
}
|
|
21779
|
-
function
|
|
21780
|
-
let n =
|
|
21781
|
-
return
|
|
21851
|
+
function Iv(e, t) {
|
|
21852
|
+
let n = Fv(e, t);
|
|
21853
|
+
return Pv(e, t).filter((e) => !n.includes(e));
|
|
21782
21854
|
}
|
|
21783
|
-
function
|
|
21784
|
-
let n =
|
|
21855
|
+
function Lv(e, t) {
|
|
21856
|
+
let n = Pv(e, t);
|
|
21785
21857
|
return e === "candidates" ? n.filter((e) => e !== "candidate_self") : e === "jobs" || e === "job" ? n.filter((e) => e !== "my_jobs") : n;
|
|
21786
21858
|
}
|
|
21787
|
-
function
|
|
21859
|
+
function Rv({ user: e }) {
|
|
21788
21860
|
let [t, n] = o({}), [a, s] = o(!1), [c, l] = o(!1), [u, d] = o(!1), p = wo(e);
|
|
21789
21861
|
r(() => {
|
|
21790
21862
|
if (!p) {
|
|
@@ -21803,7 +21875,7 @@ function Nv({ user: e }) {
|
|
|
21803
21875
|
...a[t],
|
|
21804
21876
|
value: r ? "1" : "0"
|
|
21805
21877
|
};
|
|
21806
|
-
let o =
|
|
21878
|
+
let o = Fv(e, i);
|
|
21807
21879
|
return t === "view" && (e === "jobs" || e === "job") && r && o.forEach((e) => {
|
|
21808
21880
|
a[e] = {
|
|
21809
21881
|
...a[e],
|
|
@@ -21828,7 +21900,7 @@ function Nv({ user: e }) {
|
|
|
21828
21900
|
}
|
|
21829
21901
|
function _(e, t, r) {
|
|
21830
21902
|
d(!0), n((n) => {
|
|
21831
|
-
let i = n[e] ?? {}, a = { ...i.permissions ?? {} }, o =
|
|
21903
|
+
let i = n[e] ?? {}, a = { ...i.permissions ?? {} }, o = Fv(e, i);
|
|
21832
21904
|
if (e === "candidates") o.forEach((e) => {
|
|
21833
21905
|
a[e] = {
|
|
21834
21906
|
...a[e],
|
|
@@ -21922,7 +21994,7 @@ function Nv({ user: e }) {
|
|
|
21922
21994
|
}) : /* @__PURE__ */ q("div", {
|
|
21923
21995
|
className: "uperm-list",
|
|
21924
21996
|
children: h.map(([e, t]) => {
|
|
21925
|
-
let n =
|
|
21997
|
+
let n = Nv(e), { Icon: r } = n, i = Iv(e, t), a = Lv(e, t), o = Fv(e, t), s = jv[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");
|
|
21926
21998
|
return /* @__PURE__ */ J("section", {
|
|
21927
21999
|
className: "uperm-card",
|
|
21928
22000
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -21953,7 +22025,7 @@ function Nv({ user: e }) {
|
|
|
21953
22025
|
children: [/* @__PURE__ */ q(m, {
|
|
21954
22026
|
checked: t.permissions[n]?.value === "1",
|
|
21955
22027
|
onChange: (t) => g(e, n, t.target.checked)
|
|
21956
|
-
}), /* @__PURE__ */ q("span", { children:
|
|
22028
|
+
}), /* @__PURE__ */ q("span", { children: Av[n] ?? Mv(n) })]
|
|
21957
22029
|
}, n))
|
|
21958
22030
|
}),
|
|
21959
22031
|
o.length > 0 && /* @__PURE__ */ J("div", {
|
|
@@ -21969,7 +22041,7 @@ function Nv({ user: e }) {
|
|
|
21969
22041
|
children: o.map((e) => /* @__PURE__ */ q(N, {
|
|
21970
22042
|
className: "uperm-scope-option",
|
|
21971
22043
|
value: e,
|
|
21972
|
-
children:
|
|
22044
|
+
children: Av[e] ?? Mv(e)
|
|
21973
22045
|
}, e))
|
|
21974
22046
|
}) : /* @__PURE__ */ q("div", {
|
|
21975
22047
|
className: "uperm-scope-row",
|
|
@@ -21979,7 +22051,7 @@ function Nv({ user: e }) {
|
|
|
21979
22051
|
checked: t.permissions[n]?.value === "1",
|
|
21980
22052
|
disabled: !c || n === "my_jobs",
|
|
21981
22053
|
onChange: (t) => _(e, n, t.target.checked)
|
|
21982
|
-
}), /* @__PURE__ */ q("span", { children:
|
|
22054
|
+
}), /* @__PURE__ */ q("span", { children: Av[n] ?? Mv(n) })]
|
|
21983
22055
|
}, n))
|
|
21984
22056
|
})]
|
|
21985
22057
|
})
|
|
@@ -21990,7 +22062,7 @@ function Nv({ user: e }) {
|
|
|
21990
22062
|
})]
|
|
21991
22063
|
});
|
|
21992
22064
|
}
|
|
21993
|
-
function
|
|
22065
|
+
function zv({ user: e, configType: t }) {
|
|
21994
22066
|
let [n, i] = o({}), [s, c] = o(!1), [l, u] = o({}), [d, p] = o("job"), [m, h] = o([]), g = a({}), _ = a(null);
|
|
21995
22067
|
r(() => {
|
|
21996
22068
|
e && (c(!0), Promise.all([Oo(e, t), jo()]).then(([e, t]) => {
|
|
@@ -22052,7 +22124,7 @@ function Pv({ user: e, configType: t }) {
|
|
|
22052
22124
|
size: "small",
|
|
22053
22125
|
activeKey: d,
|
|
22054
22126
|
onChange: p,
|
|
22055
|
-
items:
|
|
22127
|
+
items: gv.map((e) => ({
|
|
22056
22128
|
key: e.key,
|
|
22057
22129
|
label: e.label
|
|
22058
22130
|
}))
|
|
@@ -22075,7 +22147,7 @@ function Pv({ user: e, configType: t }) {
|
|
|
22075
22147
|
children: [v.length === 0 && !s && /* @__PURE__ */ q("div", {
|
|
22076
22148
|
className: "uss-empty",
|
|
22077
22149
|
children: "No fields found."
|
|
22078
|
-
}), v.map((e, n) => /* @__PURE__ */ q(
|
|
22150
|
+
}), v.map((e, n) => /* @__PURE__ */ q(Ov, {
|
|
22079
22151
|
field: e,
|
|
22080
22152
|
index: n,
|
|
22081
22153
|
configType: t,
|
|
@@ -22094,13 +22166,13 @@ function Pv({ user: e, configType: t }) {
|
|
|
22094
22166
|
size: "small",
|
|
22095
22167
|
loading: l[d],
|
|
22096
22168
|
onClick: C,
|
|
22097
|
-
children: ["Save ",
|
|
22169
|
+
children: ["Save ", gv.find((e) => e.key === d)?.label]
|
|
22098
22170
|
})
|
|
22099
22171
|
})
|
|
22100
22172
|
]
|
|
22101
22173
|
});
|
|
22102
22174
|
}
|
|
22103
|
-
function
|
|
22175
|
+
function Bv() {
|
|
22104
22176
|
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 } = {}) => {
|
|
22105
22177
|
h(!0);
|
|
22106
22178
|
try {
|
|
@@ -22108,7 +22180,7 @@ function Fv() {
|
|
|
22108
22180
|
offset: e,
|
|
22109
22181
|
limit: t,
|
|
22110
22182
|
searchQuery: n ?? ""
|
|
22111
|
-
}), i = (r.users ?? []).map(
|
|
22183
|
+
}), i = (r.users ?? []).map(bv);
|
|
22112
22184
|
u(i), p(r.total ?? i.length);
|
|
22113
22185
|
} catch {
|
|
22114
22186
|
G.error("Failed to load users");
|
|
@@ -22139,7 +22211,7 @@ function Fv() {
|
|
|
22139
22211
|
label: "Name",
|
|
22140
22212
|
value: "_name",
|
|
22141
22213
|
width: 220,
|
|
22142
|
-
render: (e, t) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
22214
|
+
render: (e, t) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(mv, {
|
|
22143
22215
|
strong: !0,
|
|
22144
22216
|
style: { fontSize: 13 },
|
|
22145
22217
|
children: e
|
|
@@ -22177,7 +22249,7 @@ function Fv() {
|
|
|
22177
22249
|
})]
|
|
22178
22250
|
})
|
|
22179
22251
|
}
|
|
22180
|
-
], T = e ?
|
|
22252
|
+
], T = e ? yv(e) : "";
|
|
22181
22253
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Ks, {
|
|
22182
22254
|
icon: /* @__PURE__ */ q(Dt, {}),
|
|
22183
22255
|
title: "Users",
|
|
@@ -22218,13 +22290,13 @@ function Fv() {
|
|
|
22218
22290
|
style: { marginBottom: 12 },
|
|
22219
22291
|
children: /* @__PURE__ */ q("div", {
|
|
22220
22292
|
className: "uss-config-toggle",
|
|
22221
|
-
children:
|
|
22293
|
+
children: _v.map((e) => /* @__PURE__ */ q("button", {
|
|
22222
22294
|
className: `uss-config-btn${s === e.key ? " active" : ""}`,
|
|
22223
22295
|
onClick: () => c(e.key),
|
|
22224
22296
|
children: e.label
|
|
22225
22297
|
}, e.key))
|
|
22226
22298
|
})
|
|
22227
|
-
}), e && s === "permissions" ? /* @__PURE__ */ q(
|
|
22299
|
+
}), e && s === "permissions" ? /* @__PURE__ */ q(Rv, { user: e }, String(wo(e) ?? "")) : e && /* @__PURE__ */ q(zv, {
|
|
22228
22300
|
user: e,
|
|
22229
22301
|
configType: s
|
|
22230
22302
|
}, `${String(wo(e) ?? "")}-${s}`)]
|
|
@@ -22232,7 +22304,7 @@ function Fv() {
|
|
|
22232
22304
|
}
|
|
22233
22305
|
//#endregion
|
|
22234
22306
|
//#region src/pages/Modules/Admin/TeamsSection.jsx
|
|
22235
|
-
var { Text:
|
|
22307
|
+
var { Text: Vv } = U, Hv = [
|
|
22236
22308
|
{
|
|
22237
22309
|
key: "job",
|
|
22238
22310
|
label: "Jobs"
|
|
@@ -22245,7 +22317,7 @@ var { Text: Iv } = U, Lv = [
|
|
|
22245
22317
|
key: "submissions",
|
|
22246
22318
|
label: "Submissions"
|
|
22247
22319
|
}
|
|
22248
|
-
],
|
|
22320
|
+
], Uv = [
|
|
22249
22321
|
{
|
|
22250
22322
|
key: "listView",
|
|
22251
22323
|
label: "List View"
|
|
@@ -22259,7 +22331,7 @@ var { Text: Iv } = U, Lv = [
|
|
|
22259
22331
|
label: "Form"
|
|
22260
22332
|
}
|
|
22261
22333
|
];
|
|
22262
|
-
function
|
|
22334
|
+
function Wv({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
22263
22335
|
let i = a(null), [s, c] = o(!1), [l, u] = o(!1);
|
|
22264
22336
|
function d(e) {
|
|
22265
22337
|
i.current = t, e.dataTransfer.effectAllowed = "move", u(!0);
|
|
@@ -22323,7 +22395,7 @@ function zv({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
|
22323
22395
|
]
|
|
22324
22396
|
});
|
|
22325
22397
|
}
|
|
22326
|
-
function
|
|
22398
|
+
function Gv({ team: e, configType: t }) {
|
|
22327
22399
|
let [n, i] = o({}), [a, s] = o(!1), [c, l] = o({}), [u, d] = o("job");
|
|
22328
22400
|
r(() => {
|
|
22329
22401
|
e && (s(!0), yo(e, t).then(i).catch(() => G.error("Failed to load field config")).finally(() => s(!1)));
|
|
@@ -22374,7 +22446,7 @@ function Bv({ team: e, configType: t }) {
|
|
|
22374
22446
|
size: "small",
|
|
22375
22447
|
activeKey: u,
|
|
22376
22448
|
onChange: d,
|
|
22377
|
-
items:
|
|
22449
|
+
items: Hv.map((e) => ({
|
|
22378
22450
|
key: e.key,
|
|
22379
22451
|
label: e.label
|
|
22380
22452
|
}))
|
|
@@ -22403,7 +22475,7 @@ function Bv({ team: e, configType: t }) {
|
|
|
22403
22475
|
children: [p.length === 0 && !a && /* @__PURE__ */ q("div", {
|
|
22404
22476
|
className: "uss-empty",
|
|
22405
22477
|
children: "No fields found."
|
|
22406
|
-
}), p.map((e, t) => /* @__PURE__ */ q(
|
|
22478
|
+
}), p.map((e, t) => /* @__PURE__ */ q(Wv, {
|
|
22407
22479
|
field: e,
|
|
22408
22480
|
index: t,
|
|
22409
22481
|
onToggle: h,
|
|
@@ -22417,13 +22489,13 @@ function Bv({ team: e, configType: t }) {
|
|
|
22417
22489
|
size: "small",
|
|
22418
22490
|
loading: c[u],
|
|
22419
22491
|
onClick: _,
|
|
22420
|
-
children: ["Save ",
|
|
22492
|
+
children: ["Save ", Hv.find((e) => e.key === u)?.label]
|
|
22421
22493
|
})
|
|
22422
22494
|
})
|
|
22423
22495
|
]
|
|
22424
22496
|
});
|
|
22425
22497
|
}
|
|
22426
|
-
function
|
|
22498
|
+
function Kv() {
|
|
22427
22499
|
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 () => {
|
|
22428
22500
|
_(!0);
|
|
22429
22501
|
try {
|
|
@@ -22570,13 +22642,13 @@ function Vv() {
|
|
|
22570
22642
|
style: { marginBottom: 12 },
|
|
22571
22643
|
children: /* @__PURE__ */ q("div", {
|
|
22572
22644
|
className: "uss-config-toggle",
|
|
22573
|
-
children:
|
|
22645
|
+
children: Uv.map((e) => /* @__PURE__ */ q("button", {
|
|
22574
22646
|
className: `uss-config-btn${l === e.key ? " active" : ""}`,
|
|
22575
22647
|
onClick: () => u(e.key),
|
|
22576
22648
|
children: e.label
|
|
22577
22649
|
}, e.key))
|
|
22578
22650
|
})
|
|
22579
|
-
}), e && /* @__PURE__ */ q(
|
|
22651
|
+
}), e && /* @__PURE__ */ q(Gv, {
|
|
22580
22652
|
team: e,
|
|
22581
22653
|
configType: l
|
|
22582
22654
|
}, `${e?.teamId}-${l}`)]
|
|
@@ -22585,7 +22657,7 @@ function Vv() {
|
|
|
22585
22657
|
}
|
|
22586
22658
|
//#endregion
|
|
22587
22659
|
//#region src/pages/Modules/Admin/RolesSection.jsx
|
|
22588
|
-
var
|
|
22660
|
+
var qv = [
|
|
22589
22661
|
{
|
|
22590
22662
|
key: "job",
|
|
22591
22663
|
label: "Jobs"
|
|
@@ -22598,7 +22670,7 @@ var Hv = [
|
|
|
22598
22670
|
key: "submissions",
|
|
22599
22671
|
label: "Submissions"
|
|
22600
22672
|
}
|
|
22601
|
-
],
|
|
22673
|
+
], Jv = [
|
|
22602
22674
|
{
|
|
22603
22675
|
key: "listView",
|
|
22604
22676
|
label: "List View"
|
|
@@ -22612,7 +22684,7 @@ var Hv = [
|
|
|
22612
22684
|
label: "Form"
|
|
22613
22685
|
}
|
|
22614
22686
|
];
|
|
22615
|
-
function
|
|
22687
|
+
function Yv({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
22616
22688
|
let i = useRef(null), [a, s] = o(!1), [c, l] = o(!1);
|
|
22617
22689
|
function u(e) {
|
|
22618
22690
|
i.current = t, e.dataTransfer.effectAllowed = "move", l(!0);
|
|
@@ -22676,7 +22748,7 @@ function Wv({ field: e, index: t, onToggle: n, onReorder: r }) {
|
|
|
22676
22748
|
]
|
|
22677
22749
|
});
|
|
22678
22750
|
}
|
|
22679
|
-
function
|
|
22751
|
+
function Xv({ role: e, configType: t }) {
|
|
22680
22752
|
let [n, i] = o({}), [a, s] = o(!1), [c, l] = o({}), [u, d] = o("job");
|
|
22681
22753
|
r(() => {
|
|
22682
22754
|
e && (s(!0), vo(e, t).then(i).catch(() => G.error("Failed to load field config")).finally(() => s(!1)));
|
|
@@ -22727,7 +22799,7 @@ function Gv({ role: e, configType: t }) {
|
|
|
22727
22799
|
size: "small",
|
|
22728
22800
|
activeKey: u,
|
|
22729
22801
|
onChange: d,
|
|
22730
|
-
items:
|
|
22802
|
+
items: qv.map((e) => ({
|
|
22731
22803
|
key: e.key,
|
|
22732
22804
|
label: e.label
|
|
22733
22805
|
}))
|
|
@@ -22756,7 +22828,7 @@ function Gv({ role: e, configType: t }) {
|
|
|
22756
22828
|
children: [p.length === 0 && !a && /* @__PURE__ */ q("div", {
|
|
22757
22829
|
className: "uss-empty",
|
|
22758
22830
|
children: "No fields found for this module."
|
|
22759
|
-
}), p.map((e, t) => /* @__PURE__ */ q(
|
|
22831
|
+
}), p.map((e, t) => /* @__PURE__ */ q(Yv, {
|
|
22760
22832
|
field: e,
|
|
22761
22833
|
index: t,
|
|
22762
22834
|
onToggle: h,
|
|
@@ -22770,13 +22842,13 @@ function Gv({ role: e, configType: t }) {
|
|
|
22770
22842
|
size: "small",
|
|
22771
22843
|
loading: c[u],
|
|
22772
22844
|
onClick: _,
|
|
22773
|
-
children: ["Save ",
|
|
22845
|
+
children: ["Save ", qv.find((e) => e.key === u)?.label]
|
|
22774
22846
|
})
|
|
22775
22847
|
})
|
|
22776
22848
|
]
|
|
22777
22849
|
});
|
|
22778
22850
|
}
|
|
22779
|
-
function
|
|
22851
|
+
function Zv() {
|
|
22780
22852
|
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 () => {
|
|
22781
22853
|
h(!0);
|
|
22782
22854
|
try {
|
|
@@ -22863,13 +22935,13 @@ function Kv() {
|
|
|
22863
22935
|
style: { marginBottom: 12 },
|
|
22864
22936
|
children: /* @__PURE__ */ q("div", {
|
|
22865
22937
|
className: "uss-config-toggle",
|
|
22866
|
-
children:
|
|
22938
|
+
children: Jv.map((e) => /* @__PURE__ */ q("button", {
|
|
22867
22939
|
className: `uss-config-btn${s === e.key ? " active" : ""}`,
|
|
22868
22940
|
onClick: () => c(e.key),
|
|
22869
22941
|
children: e.label
|
|
22870
22942
|
}, e.key))
|
|
22871
22943
|
})
|
|
22872
|
-
}), e && /* @__PURE__ */ q(
|
|
22944
|
+
}), e && /* @__PURE__ */ q(Xv, {
|
|
22873
22945
|
role: e,
|
|
22874
22946
|
configType: s
|
|
22875
22947
|
}, `${e?.roleId}-${s}`)]
|
|
@@ -22877,12 +22949,12 @@ function Kv() {
|
|
|
22877
22949
|
}
|
|
22878
22950
|
//#endregion
|
|
22879
22951
|
//#region src/pages/Modules/Admin/PermissionsPage.jsx
|
|
22880
|
-
var
|
|
22952
|
+
var Qv = [
|
|
22881
22953
|
"view",
|
|
22882
22954
|
"add",
|
|
22883
22955
|
"edit",
|
|
22884
22956
|
"delete"
|
|
22885
|
-
],
|
|
22957
|
+
], $v = {
|
|
22886
22958
|
view: "View",
|
|
22887
22959
|
add: "Add",
|
|
22888
22960
|
edit: "Edit",
|
|
@@ -22894,18 +22966,18 @@ var qv = [
|
|
|
22894
22966
|
my_jobs: "My Jobs",
|
|
22895
22967
|
all_jobs: "All Jobs"
|
|
22896
22968
|
};
|
|
22897
|
-
function
|
|
22898
|
-
return
|
|
22969
|
+
function ey(e) {
|
|
22970
|
+
return $v[e] ?? e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
22899
22971
|
}
|
|
22900
|
-
function
|
|
22901
|
-
let t =
|
|
22972
|
+
function ty(e) {
|
|
22973
|
+
let t = Qv.filter((t) => e.includes(t)), n = e.filter((e) => !Qv.includes(e)).sort();
|
|
22902
22974
|
return [...t, ...n];
|
|
22903
22975
|
}
|
|
22904
|
-
function
|
|
22976
|
+
function ny(e) {
|
|
22905
22977
|
let t = /* @__PURE__ */ new Set();
|
|
22906
|
-
return Object.values(e).forEach(({ permissions: e }) => Object.keys(e ?? {}).forEach((e) => t.add(e))),
|
|
22978
|
+
return Object.values(e).forEach(({ permissions: e }) => Object.keys(e ?? {}).forEach((e) => t.add(e))), ty([...t]);
|
|
22907
22979
|
}
|
|
22908
|
-
function
|
|
22980
|
+
function ry(e) {
|
|
22909
22981
|
let t = 0, n = 0;
|
|
22910
22982
|
return Object.values(e).forEach(({ permissions: e }) => {
|
|
22911
22983
|
Object.values(e ?? {}).forEach(({ value: e }) => {
|
|
@@ -22916,20 +22988,20 @@ function Qv(e) {
|
|
|
22916
22988
|
total: n
|
|
22917
22989
|
};
|
|
22918
22990
|
}
|
|
22919
|
-
var
|
|
22920
|
-
function
|
|
22991
|
+
var iy = "perm-module-labels", ay = "perm-action-labels";
|
|
22992
|
+
function oy(e) {
|
|
22921
22993
|
try {
|
|
22922
22994
|
return JSON.parse(localStorage.getItem(e) ?? "{}");
|
|
22923
22995
|
} catch {
|
|
22924
22996
|
return {};
|
|
22925
22997
|
}
|
|
22926
22998
|
}
|
|
22927
|
-
function
|
|
22999
|
+
function sy(e, t) {
|
|
22928
23000
|
try {
|
|
22929
23001
|
localStorage.setItem(e, JSON.stringify(t));
|
|
22930
23002
|
} catch {}
|
|
22931
23003
|
}
|
|
22932
|
-
function
|
|
23004
|
+
function cy({ value: e, onSave: t, className: n }) {
|
|
22933
23005
|
let [i, a] = o(!1), [s, c] = o(e);
|
|
22934
23006
|
r(() => {
|
|
22935
23007
|
c(e);
|
|
@@ -22958,7 +23030,7 @@ function ry({ value: e, onSave: t, className: n }) {
|
|
|
22958
23030
|
children: [e, /* @__PURE__ */ q(je, { className: "perm-name-edit-icon" })]
|
|
22959
23031
|
});
|
|
22960
23032
|
}
|
|
22961
|
-
function
|
|
23033
|
+
function ly({ permKey: e, entry: t, label: n, onToggle: i, onLabelSave: a }) {
|
|
22962
23034
|
let [s, c] = o(!1), [l, u] = o(n), d = t?.value === "1", f = !!t;
|
|
22963
23035
|
r(() => {
|
|
22964
23036
|
u(n);
|
|
@@ -23000,13 +23072,13 @@ function iy({ permKey: e, entry: t, label: n, onToggle: i, onLabelSave: a }) {
|
|
|
23000
23072
|
})
|
|
23001
23073
|
});
|
|
23002
23074
|
}
|
|
23003
|
-
function
|
|
23075
|
+
function uy({ menuName: e, menuData: t, permKeys: n, onChange: r, displayName: i, actionLabels: a, onModuleLabelSave: o, onActionLabelSave: s }) {
|
|
23004
23076
|
let c = t?.permissions ?? {}, l = Object.values(c).filter((e) => e?.value === "1").length, u = Object.keys(c).length, d = u > 0 && l === u;
|
|
23005
23077
|
return /* @__PURE__ */ J("div", {
|
|
23006
23078
|
className: `perm-module-card${d ? " all-on" : l > 0 && !d ? " some-on" : ""}`,
|
|
23007
23079
|
children: [/* @__PURE__ */ J("div", {
|
|
23008
23080
|
className: "perm-module-card-header",
|
|
23009
|
-
children: [/* @__PURE__ */ q(
|
|
23081
|
+
children: [/* @__PURE__ */ q(cy, {
|
|
23010
23082
|
value: i,
|
|
23011
23083
|
onSave: (t) => o(e, t),
|
|
23012
23084
|
className: "perm-module-card-name"
|
|
@@ -23020,17 +23092,17 @@ function ay({ menuName: e, menuData: t, permKeys: n, onChange: r, displayName: i
|
|
|
23020
23092
|
})]
|
|
23021
23093
|
}), /* @__PURE__ */ q("div", {
|
|
23022
23094
|
className: "perm-module-card-body",
|
|
23023
|
-
children: n.map((t) => /* @__PURE__ */ q(
|
|
23095
|
+
children: n.map((t) => /* @__PURE__ */ q(ly, {
|
|
23024
23096
|
permKey: t,
|
|
23025
23097
|
entry: c[t],
|
|
23026
|
-
label: a[t] ??
|
|
23098
|
+
label: a[t] ?? ey(t),
|
|
23027
23099
|
onToggle: () => r(e, t),
|
|
23028
23100
|
onLabelSave: (e) => s(t, e)
|
|
23029
23101
|
}, t))
|
|
23030
23102
|
})]
|
|
23031
23103
|
});
|
|
23032
23104
|
}
|
|
23033
|
-
function
|
|
23105
|
+
function dy({ label: e, onSave: t, onDelete: n, loading: r }) {
|
|
23034
23106
|
let [i, a] = o(!1), [s, c] = o(e);
|
|
23035
23107
|
function l() {
|
|
23036
23108
|
a(!1);
|
|
@@ -23081,7 +23153,7 @@ function oy({ label: e, onSave: t, onDelete: n, loading: r }) {
|
|
|
23081
23153
|
})]
|
|
23082
23154
|
});
|
|
23083
23155
|
}
|
|
23084
|
-
function
|
|
23156
|
+
function fy({ open: e, onClose: t }) {
|
|
23085
23157
|
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);
|
|
23086
23158
|
r(() => {
|
|
23087
23159
|
e && (E(), D());
|
|
@@ -23203,7 +23275,7 @@ function sy({ open: e, onClose: t }) {
|
|
|
23203
23275
|
className: "perm-empty",
|
|
23204
23276
|
style: { paddingTop: 24 },
|
|
23205
23277
|
children: "No modules found"
|
|
23206
|
-
}), a.map((e) => /* @__PURE__ */ q(
|
|
23278
|
+
}), a.map((e) => /* @__PURE__ */ q(dy, {
|
|
23207
23279
|
label: e.MENUNAME,
|
|
23208
23280
|
onSave: (t) => A(e.MENUID, t),
|
|
23209
23281
|
onDelete: () => j(e.MENUID)
|
|
@@ -23248,7 +23320,7 @@ function sy({ open: e, onClose: t }) {
|
|
|
23248
23320
|
className: "perm-empty",
|
|
23249
23321
|
style: { paddingTop: 24 },
|
|
23250
23322
|
children: "No actions found"
|
|
23251
|
-
}), h.map((e) => /* @__PURE__ */ q(
|
|
23323
|
+
}), h.map((e) => /* @__PURE__ */ q(dy, {
|
|
23252
23324
|
label: `${e.permissionName} (${e.permissionKey})`,
|
|
23253
23325
|
onSave: (t) => ee(e.permissionId, t),
|
|
23254
23326
|
onDelete: () => N(e.permissionId)
|
|
@@ -23278,7 +23350,7 @@ function sy({ open: e, onClose: t }) {
|
|
|
23278
23350
|
})
|
|
23279
23351
|
});
|
|
23280
23352
|
}
|
|
23281
|
-
function
|
|
23353
|
+
function py({ role: e, moduleLabels: t, actionLabels: n, onModuleLabelSave: a, onActionLabelSave: s }) {
|
|
23282
23354
|
let [c, l] = o({}), [u, d] = o({}), [p, m] = o(!1), [h, g] = o(!1), [_, v] = o(!1), y = uo(e);
|
|
23283
23355
|
r(() => {
|
|
23284
23356
|
y && (m(!0), v(!1), Ho(y).then((e) => {
|
|
@@ -23319,7 +23391,7 @@ function cy({ role: e, moduleLabels: t, actionLabels: n, onModuleLabelSave: a, o
|
|
|
23319
23391
|
g(!1);
|
|
23320
23392
|
}
|
|
23321
23393
|
}
|
|
23322
|
-
let S = i(() => Object.keys(u).sort(), [u]), C = i(() =>
|
|
23394
|
+
let S = i(() => Object.keys(u).sort(), [u]), C = i(() => ny(u), [u]), { enabled: w, total: T } = i(() => ry(u), [u]);
|
|
23323
23395
|
return /* @__PURE__ */ J(z, {
|
|
23324
23396
|
spinning: p,
|
|
23325
23397
|
children: [
|
|
@@ -23370,7 +23442,7 @@ function cy({ role: e, moduleLabels: t, actionLabels: n, onModuleLabelSave: a, o
|
|
|
23370
23442
|
children: "No permission entries found for this role."
|
|
23371
23443
|
}) : /* @__PURE__ */ q("div", {
|
|
23372
23444
|
className: "perm-cards-grid",
|
|
23373
|
-
children: S.map((e) => /* @__PURE__ */ q(
|
|
23445
|
+
children: S.map((e) => /* @__PURE__ */ q(uy, {
|
|
23374
23446
|
menuName: e,
|
|
23375
23447
|
menuData: u[e],
|
|
23376
23448
|
permKeys: C,
|
|
@@ -23384,14 +23456,14 @@ function cy({ role: e, moduleLabels: t, actionLabels: n, onModuleLabelSave: a, o
|
|
|
23384
23456
|
]
|
|
23385
23457
|
});
|
|
23386
23458
|
}
|
|
23387
|
-
function
|
|
23388
|
-
let [e, t] = o([]), [a, s] = o(!1), [c, l] = o(null), [u, d] = o(""), [p, m] = o(!1), [h, g] = o(() =>
|
|
23459
|
+
function my() {
|
|
23460
|
+
let [e, t] = o([]), [a, s] = o(!1), [c, l] = o(null), [u, d] = o(""), [p, m] = o(!1), [h, g] = o(() => oy(iy)), [_, v] = o(() => oy(ay)), y = n((e, t) => {
|
|
23389
23461
|
g((n) => {
|
|
23390
23462
|
let r = {
|
|
23391
23463
|
...n,
|
|
23392
23464
|
[e]: t
|
|
23393
23465
|
};
|
|
23394
|
-
return
|
|
23466
|
+
return sy(iy, r), r;
|
|
23395
23467
|
});
|
|
23396
23468
|
}, []), b = n((e, t) => {
|
|
23397
23469
|
v((n) => {
|
|
@@ -23399,11 +23471,11 @@ function ly() {
|
|
|
23399
23471
|
...n,
|
|
23400
23472
|
[e]: t
|
|
23401
23473
|
};
|
|
23402
|
-
return
|
|
23474
|
+
return sy(ay, r), r;
|
|
23403
23475
|
});
|
|
23404
23476
|
}, []);
|
|
23405
23477
|
function x() {
|
|
23406
|
-
g({}), v({}),
|
|
23478
|
+
g({}), v({}), sy(iy, {}), sy(ay, {}), G.success("Labels reset to defaults");
|
|
23407
23479
|
}
|
|
23408
23480
|
let S = n(async () => {
|
|
23409
23481
|
s(!0);
|
|
@@ -23487,7 +23559,7 @@ function ly() {
|
|
|
23487
23559
|
})]
|
|
23488
23560
|
}),
|
|
23489
23561
|
bodyStyle: { padding: "12px 16px" },
|
|
23490
|
-
children: c ? /* @__PURE__ */ q(
|
|
23562
|
+
children: c ? /* @__PURE__ */ q(py, {
|
|
23491
23563
|
role: c,
|
|
23492
23564
|
moduleLabels: h,
|
|
23493
23565
|
actionLabels: _,
|
|
@@ -23498,7 +23570,7 @@ function ly() {
|
|
|
23498
23570
|
children: "Select a role from the left to manage its permissions."
|
|
23499
23571
|
})
|
|
23500
23572
|
}),
|
|
23501
|
-
/* @__PURE__ */ q(
|
|
23573
|
+
/* @__PURE__ */ q(fy, {
|
|
23502
23574
|
open: p,
|
|
23503
23575
|
onClose: () => m(!1)
|
|
23504
23576
|
})
|
|
@@ -23507,7 +23579,7 @@ function ly() {
|
|
|
23507
23579
|
}
|
|
23508
23580
|
//#endregion
|
|
23509
23581
|
//#region src/components/cards/OnboardingCard.jsx
|
|
23510
|
-
var { Title:
|
|
23582
|
+
var { Title: hy, Text: gy } = U, _y = [
|
|
23511
23583
|
{
|
|
23512
23584
|
label: "In Progress",
|
|
23513
23585
|
value: 107,
|
|
@@ -23533,10 +23605,10 @@ var { Title: uy, Text: dy } = U, fy = [
|
|
|
23533
23605
|
color: "peach"
|
|
23534
23606
|
}
|
|
23535
23607
|
];
|
|
23536
|
-
function
|
|
23608
|
+
function vy({ items: e = _y }) {
|
|
23537
23609
|
return /* @__PURE__ */ q(p, {
|
|
23538
23610
|
className: "onboarding-card",
|
|
23539
|
-
title: /* @__PURE__ */ q(
|
|
23611
|
+
title: /* @__PURE__ */ q(hy, {
|
|
23540
23612
|
level: 5,
|
|
23541
23613
|
children: "Onboarding"
|
|
23542
23614
|
}),
|
|
@@ -23555,7 +23627,7 @@ function py({ items: e = fy }) {
|
|
|
23555
23627
|
children: /* @__PURE__ */ J("div", {
|
|
23556
23628
|
className: `onboarding-item ${e.color}`,
|
|
23557
23629
|
children: [
|
|
23558
|
-
/* @__PURE__ */ q(
|
|
23630
|
+
/* @__PURE__ */ q(gy, {
|
|
23559
23631
|
className: "onboarding-item-label",
|
|
23560
23632
|
children: e.label
|
|
23561
23633
|
}),
|
|
@@ -23565,7 +23637,7 @@ function py({ items: e = fy }) {
|
|
|
23565
23637
|
}),
|
|
23566
23638
|
/* @__PURE__ */ q("div", {
|
|
23567
23639
|
className: "onboarding-item-footer",
|
|
23568
|
-
children: /* @__PURE__ */ q(
|
|
23640
|
+
children: /* @__PURE__ */ q(gy, {
|
|
23569
23641
|
className: "onboarding-item-sub",
|
|
23570
23642
|
children: e.sub
|
|
23571
23643
|
})
|
|
@@ -23578,7 +23650,7 @@ function py({ items: e = fy }) {
|
|
|
23578
23650
|
}
|
|
23579
23651
|
//#endregion
|
|
23580
23652
|
//#region src/pages/Modules/AdminPage.jsx
|
|
23581
|
-
var { Text:
|
|
23653
|
+
var { Text: yy, Title: by } = U, xy = [
|
|
23582
23654
|
{
|
|
23583
23655
|
group: "Dashboard",
|
|
23584
23656
|
items: [{
|
|
@@ -23793,7 +23865,7 @@ var { Text: my, Title: hy } = U, gy = [
|
|
|
23793
23865
|
}
|
|
23794
23866
|
]
|
|
23795
23867
|
}
|
|
23796
|
-
],
|
|
23868
|
+
], Sy = [
|
|
23797
23869
|
{
|
|
23798
23870
|
label: "Sourced",
|
|
23799
23871
|
count: 312,
|
|
@@ -23824,7 +23896,7 @@ var { Text: my, Title: hy } = U, gy = [
|
|
|
23824
23896
|
color: "#E24B4A",
|
|
23825
23897
|
pct: 10
|
|
23826
23898
|
}
|
|
23827
|
-
],
|
|
23899
|
+
], Cy = [
|
|
23828
23900
|
{
|
|
23829
23901
|
name: "Tcs",
|
|
23830
23902
|
jobs: 14,
|
|
@@ -23845,7 +23917,7 @@ var { Text: my, Title: hy } = U, gy = [
|
|
|
23845
23917
|
jobs: 5,
|
|
23846
23918
|
candidates: 38
|
|
23847
23919
|
}
|
|
23848
|
-
],
|
|
23920
|
+
], wy = [
|
|
23849
23921
|
{
|
|
23850
23922
|
text: "New candidate Ravi Kumar added to Java Developer role",
|
|
23851
23923
|
time: "2 min ago",
|
|
@@ -23872,7 +23944,7 @@ var { Text: my, Title: hy } = U, gy = [
|
|
|
23872
23944
|
color: "#E24B4A"
|
|
23873
23945
|
}
|
|
23874
23946
|
];
|
|
23875
|
-
function
|
|
23947
|
+
function Ty() {
|
|
23876
23948
|
return /* @__PURE__ */ J("div", {
|
|
23877
23949
|
style: {
|
|
23878
23950
|
display: "flex",
|
|
@@ -23885,11 +23957,11 @@ function by() {
|
|
|
23885
23957
|
title: "Admin Dashboard",
|
|
23886
23958
|
children: [
|
|
23887
23959
|
/* @__PURE__ */ q("div", { className: "admin-accent-bar" }),
|
|
23888
|
-
/* @__PURE__ */ q(
|
|
23960
|
+
/* @__PURE__ */ q(by, {
|
|
23889
23961
|
level: 5,
|
|
23890
23962
|
children: "Admin Dashboard"
|
|
23891
23963
|
}),
|
|
23892
|
-
/* @__PURE__ */ q(
|
|
23964
|
+
/* @__PURE__ */ q(yy, {
|
|
23893
23965
|
type: "secondary",
|
|
23894
23966
|
children: "Overview of jobs, candidates, onboarding and recent activity"
|
|
23895
23967
|
})
|
|
@@ -23897,7 +23969,7 @@ function by() {
|
|
|
23897
23969
|
}),
|
|
23898
23970
|
/* @__PURE__ */ q("div", {
|
|
23899
23971
|
className: "admin-dashboard-stats",
|
|
23900
|
-
children: /* @__PURE__ */ q(
|
|
23972
|
+
children: /* @__PURE__ */ q(a_, { stats: [
|
|
23901
23973
|
{
|
|
23902
23974
|
label: "Total Jobs",
|
|
23903
23975
|
value: 1697,
|
|
@@ -23927,18 +23999,18 @@ function by() {
|
|
|
23927
23999
|
}),
|
|
23928
24000
|
/* @__PURE__ */ J("div", {
|
|
23929
24001
|
className: "admin-dashboard-mid-row",
|
|
23930
|
-
children: [/* @__PURE__ */ q(
|
|
24002
|
+
children: [/* @__PURE__ */ q(vy, {}), /* @__PURE__ */ J(Ks, {
|
|
23931
24003
|
icon: /* @__PURE__ */ q(le, {}),
|
|
23932
24004
|
title: "Candidate Pipeline",
|
|
23933
24005
|
children: [
|
|
23934
|
-
/* @__PURE__ */ q(
|
|
24006
|
+
/* @__PURE__ */ q(yy, {
|
|
23935
24007
|
type: "secondary",
|
|
23936
24008
|
style: { fontSize: 12 },
|
|
23937
24009
|
children: "By stage (892 total)"
|
|
23938
24010
|
}),
|
|
23939
24011
|
/* @__PURE__ */ q("div", {
|
|
23940
24012
|
className: "admin-pipeline-bar",
|
|
23941
|
-
children:
|
|
24013
|
+
children: Sy.map((e) => /* @__PURE__ */ q("div", {
|
|
23942
24014
|
className: "admin-pipeline-seg",
|
|
23943
24015
|
style: {
|
|
23944
24016
|
width: `${e.pct}%`,
|
|
@@ -23948,7 +24020,7 @@ function by() {
|
|
|
23948
24020
|
}),
|
|
23949
24021
|
/* @__PURE__ */ q("div", {
|
|
23950
24022
|
className: "admin-pipeline-legend",
|
|
23951
|
-
children:
|
|
24023
|
+
children: Sy.map((e) => /* @__PURE__ */ J("div", {
|
|
23952
24024
|
className: "admin-pipeline-legend-item",
|
|
23953
24025
|
children: [
|
|
23954
24026
|
/* @__PURE__ */ q("span", {
|
|
@@ -23962,7 +24034,7 @@ function by() {
|
|
|
23962
24034
|
}, e.label))
|
|
23963
24035
|
}),
|
|
23964
24036
|
/* @__PURE__ */ q("div", { className: "admin-divider" }),
|
|
23965
|
-
/* @__PURE__ */ q(
|
|
24037
|
+
/* @__PURE__ */ q(yy, {
|
|
23966
24038
|
strong: !0,
|
|
23967
24039
|
style: { fontSize: 12 },
|
|
23968
24040
|
children: "Submission status"
|
|
@@ -23973,7 +24045,7 @@ function by() {
|
|
|
23973
24045
|
children: [
|
|
23974
24046
|
/* @__PURE__ */ J("div", {
|
|
23975
24047
|
className: "admin-sub-status-item",
|
|
23976
|
-
children: [/* @__PURE__ */ q(
|
|
24048
|
+
children: [/* @__PURE__ */ q(yy, {
|
|
23977
24049
|
style: { fontSize: 13 },
|
|
23978
24050
|
children: "Pending client review"
|
|
23979
24051
|
}), /* @__PURE__ */ q("span", {
|
|
@@ -23983,7 +24055,7 @@ function by() {
|
|
|
23983
24055
|
}),
|
|
23984
24056
|
/* @__PURE__ */ J("div", {
|
|
23985
24057
|
className: "admin-sub-status-item",
|
|
23986
|
-
children: [/* @__PURE__ */ q(
|
|
24058
|
+
children: [/* @__PURE__ */ q(yy, {
|
|
23987
24059
|
style: { fontSize: 13 },
|
|
23988
24060
|
children: "Client approved"
|
|
23989
24061
|
}), /* @__PURE__ */ q("span", {
|
|
@@ -23993,7 +24065,7 @@ function by() {
|
|
|
23993
24065
|
}),
|
|
23994
24066
|
/* @__PURE__ */ J("div", {
|
|
23995
24067
|
className: "admin-sub-status-item",
|
|
23996
|
-
children: [/* @__PURE__ */ q(
|
|
24068
|
+
children: [/* @__PURE__ */ q(yy, {
|
|
23997
24069
|
style: { fontSize: 13 },
|
|
23998
24070
|
children: "Rejected"
|
|
23999
24071
|
}), /* @__PURE__ */ q("span", {
|
|
@@ -24016,7 +24088,7 @@ function by() {
|
|
|
24016
24088
|
size: "small",
|
|
24017
24089
|
children: "View all"
|
|
24018
24090
|
}),
|
|
24019
|
-
children:
|
|
24091
|
+
children: Cy.map((e) => /* @__PURE__ */ J("div", {
|
|
24020
24092
|
className: "admin-client-row",
|
|
24021
24093
|
children: [/* @__PURE__ */ J("div", {
|
|
24022
24094
|
className: "admin-client-left",
|
|
@@ -24044,7 +24116,7 @@ function by() {
|
|
|
24044
24116
|
}), /* @__PURE__ */ q(Ks, {
|
|
24045
24117
|
icon: /* @__PURE__ */ q(pe, {}),
|
|
24046
24118
|
title: "Recent Activity",
|
|
24047
|
-
children:
|
|
24119
|
+
children: wy.map((e, t) => /* @__PURE__ */ J("div", {
|
|
24048
24120
|
className: "admin-activity-row",
|
|
24049
24121
|
children: [/* @__PURE__ */ q("div", {
|
|
24050
24122
|
className: "admin-activity-dot",
|
|
@@ -24072,7 +24144,7 @@ function by() {
|
|
|
24072
24144
|
children: [
|
|
24073
24145
|
/* @__PURE__ */ J(h, {
|
|
24074
24146
|
span: 8,
|
|
24075
|
-
children: [/* @__PURE__ */ q(
|
|
24147
|
+
children: [/* @__PURE__ */ q(yy, {
|
|
24076
24148
|
type: "secondary",
|
|
24077
24149
|
style: {
|
|
24078
24150
|
fontSize: 12,
|
|
@@ -24085,7 +24157,7 @@ function by() {
|
|
|
24085
24157
|
["Templates", 2]
|
|
24086
24158
|
].map(([e, t]) => /* @__PURE__ */ J("div", {
|
|
24087
24159
|
className: "admin-cfg-overview-row",
|
|
24088
|
-
children: [/* @__PURE__ */ q(
|
|
24160
|
+
children: [/* @__PURE__ */ q(yy, {
|
|
24089
24161
|
style: { fontSize: 12 },
|
|
24090
24162
|
children: e
|
|
24091
24163
|
}), /* @__PURE__ */ J("span", {
|
|
@@ -24096,7 +24168,7 @@ function by() {
|
|
|
24096
24168
|
}),
|
|
24097
24169
|
/* @__PURE__ */ J(h, {
|
|
24098
24170
|
span: 8,
|
|
24099
|
-
children: [/* @__PURE__ */ q(
|
|
24171
|
+
children: [/* @__PURE__ */ q(yy, {
|
|
24100
24172
|
type: "secondary",
|
|
24101
24173
|
style: {
|
|
24102
24174
|
fontSize: 12,
|
|
@@ -24109,7 +24181,7 @@ function by() {
|
|
|
24109
24181
|
["Submissions", 2]
|
|
24110
24182
|
].map(([e, t]) => /* @__PURE__ */ J("div", {
|
|
24111
24183
|
className: "admin-cfg-overview-row",
|
|
24112
|
-
children: [/* @__PURE__ */ q(
|
|
24184
|
+
children: [/* @__PURE__ */ q(yy, {
|
|
24113
24185
|
style: { fontSize: 12 },
|
|
24114
24186
|
children: e
|
|
24115
24187
|
}), /* @__PURE__ */ J("span", {
|
|
@@ -24120,7 +24192,7 @@ function by() {
|
|
|
24120
24192
|
}),
|
|
24121
24193
|
/* @__PURE__ */ J(h, {
|
|
24122
24194
|
span: 8,
|
|
24123
|
-
children: [/* @__PURE__ */ q(
|
|
24195
|
+
children: [/* @__PURE__ */ q(yy, {
|
|
24124
24196
|
type: "secondary",
|
|
24125
24197
|
style: {
|
|
24126
24198
|
fontSize: 12,
|
|
@@ -24133,10 +24205,10 @@ function by() {
|
|
|
24133
24205
|
["Config Items", 19]
|
|
24134
24206
|
].map(([e, t]) => /* @__PURE__ */ J("div", {
|
|
24135
24207
|
className: "admin-cfg-overview-row",
|
|
24136
|
-
children: [/* @__PURE__ */ q(
|
|
24208
|
+
children: [/* @__PURE__ */ q(yy, {
|
|
24137
24209
|
style: { fontSize: 12 },
|
|
24138
24210
|
children: e
|
|
24139
|
-
}), /* @__PURE__ */ q(
|
|
24211
|
+
}), /* @__PURE__ */ q(yy, {
|
|
24140
24212
|
strong: !0,
|
|
24141
24213
|
style: { fontSize: 12 },
|
|
24142
24214
|
children: t
|
|
@@ -24149,7 +24221,7 @@ function by() {
|
|
|
24149
24221
|
]
|
|
24150
24222
|
});
|
|
24151
24223
|
}
|
|
24152
|
-
function
|
|
24224
|
+
function Ey({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r, setSearchText: i, allItems: a, handleNav: o }) {
|
|
24153
24225
|
return /* @__PURE__ */ J(F, {
|
|
24154
24226
|
gutter: [16, 16],
|
|
24155
24227
|
children: [
|
|
@@ -24168,11 +24240,11 @@ function xy({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
24168
24240
|
}),
|
|
24169
24241
|
children: [
|
|
24170
24242
|
/* @__PURE__ */ q("div", { className: "admin-accent-bar" }),
|
|
24171
|
-
/* @__PURE__ */ q(
|
|
24243
|
+
/* @__PURE__ */ q(by, {
|
|
24172
24244
|
level: 5,
|
|
24173
24245
|
children: e?.heading
|
|
24174
24246
|
}),
|
|
24175
|
-
/* @__PURE__ */ q(
|
|
24247
|
+
/* @__PURE__ */ q(yy, {
|
|
24176
24248
|
type: "secondary",
|
|
24177
24249
|
children: e?.desc
|
|
24178
24250
|
})
|
|
@@ -24186,7 +24258,7 @@ function xy({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
24186
24258
|
children: /* @__PURE__ */ q(Ks, {
|
|
24187
24259
|
icon: /* @__PURE__ */ q(le, {}),
|
|
24188
24260
|
title: "Configuration Items",
|
|
24189
|
-
extra: /* @__PURE__ */ J(
|
|
24261
|
+
extra: /* @__PURE__ */ J(yy, {
|
|
24190
24262
|
type: "secondary",
|
|
24191
24263
|
children: [
|
|
24192
24264
|
n.length,
|
|
@@ -24253,7 +24325,7 @@ function xy({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
24253
24325
|
title: "Section Overview",
|
|
24254
24326
|
children: [/* @__PURE__ */ q("div", {
|
|
24255
24327
|
className: "admin-overview-list",
|
|
24256
|
-
children:
|
|
24328
|
+
children: xy.filter((e) => e.group !== "Dashboard").map((e) => {
|
|
24257
24329
|
let n = e.group === t?.group;
|
|
24258
24330
|
return /* @__PURE__ */ J("div", {
|
|
24259
24331
|
className: `admin-overview-item${n ? " active" : ""}`,
|
|
@@ -24301,12 +24373,12 @@ function xy({ activeSection: e, activeGroup: t, filteredCards: n, searchText: r,
|
|
|
24301
24373
|
]
|
|
24302
24374
|
});
|
|
24303
24375
|
}
|
|
24304
|
-
function
|
|
24305
|
-
let [e, t] = o("dashboard"), [n, r] = o(""), a = i(() =>
|
|
24376
|
+
function Dy() {
|
|
24377
|
+
let [e, t] = o("dashboard"), [n, r] = o(""), a = i(() => xy.flatMap((e) => e.items), []), s = i(() => a.find((t) => t.id === e), [a, e]), c = i(() => xy.find((t) => t.items.some((t) => t.id === e)), [e]), l = i(() => {
|
|
24306
24378
|
if (!s?.cards) return [];
|
|
24307
24379
|
let e = n.trim().toLowerCase();
|
|
24308
24380
|
return e ? s.cards.filter((t) => t.label.toLowerCase().includes(e) || t.desc.toLowerCase().includes(e)) : s.cards;
|
|
24309
|
-
}, [s, n]), u = i(() =>
|
|
24381
|
+
}, [s, n]), u = i(() => xy.map((e) => ({
|
|
24310
24382
|
key: e.group,
|
|
24311
24383
|
type: "group",
|
|
24312
24384
|
label: e.group,
|
|
@@ -24355,7 +24427,7 @@ function Sy() {
|
|
|
24355
24427
|
children: "Groups"
|
|
24356
24428
|
}), /* @__PURE__ */ q("span", {
|
|
24357
24429
|
className: "admin-sidebar-pill-value",
|
|
24358
|
-
children:
|
|
24430
|
+
children: xy.length
|
|
24359
24431
|
})]
|
|
24360
24432
|
})
|
|
24361
24433
|
}), /* @__PURE__ */ q(h, {
|
|
@@ -24385,7 +24457,7 @@ function Sy() {
|
|
|
24385
24457
|
xs: 24,
|
|
24386
24458
|
lg: 18,
|
|
24387
24459
|
xl: 19,
|
|
24388
|
-
children: e === "dashboard" ? /* @__PURE__ */ q(
|
|
24460
|
+
children: e === "dashboard" ? /* @__PURE__ */ q(Ty, {}) : s?.component === "form-groups" ? /* @__PURE__ */ q(k_, {}) : s?.component === "detail-groups" ? /* @__PURE__ */ q(W_, {}) : s?.component === "row-actions" ? /* @__PURE__ */ q($_, {}) : s?.component === "action-rules" ? /* @__PURE__ */ q(pv, {}) : s?.component === "users" ? /* @__PURE__ */ q(Bv, {}) : s?.component === "teams" ? /* @__PURE__ */ q(Kv, {}) : s?.component === "roles" ? /* @__PURE__ */ q(Zv, {}) : s?.component === "permissions" ? /* @__PURE__ */ q(my, {}) : /* @__PURE__ */ q(Ey, {
|
|
24389
24461
|
activeSection: s,
|
|
24390
24462
|
activeGroup: c,
|
|
24391
24463
|
filteredCards: l,
|
|
@@ -24400,14 +24472,14 @@ function Sy() {
|
|
|
24400
24472
|
}
|
|
24401
24473
|
//#endregion
|
|
24402
24474
|
//#region src/pages/Modules/Jobs/JobsListPage.jsx
|
|
24403
|
-
var
|
|
24475
|
+
var Oy = [{
|
|
24404
24476
|
label: "Home",
|
|
24405
24477
|
href: "/dashboard"
|
|
24406
24478
|
}, { label: "Jobs" }];
|
|
24407
|
-
function
|
|
24479
|
+
function ky() {
|
|
24408
24480
|
return /* @__PURE__ */ q(zp, {
|
|
24409
24481
|
moduleName: "job",
|
|
24410
|
-
breadcrumbItems:
|
|
24482
|
+
breadcrumbItems: Oy,
|
|
24411
24483
|
actions: [{
|
|
24412
24484
|
name: "Add Notes & Share",
|
|
24413
24485
|
route: "/popup/add-notes",
|
|
@@ -24417,7 +24489,7 @@ function wy() {
|
|
|
24417
24489
|
}
|
|
24418
24490
|
//#endregion
|
|
24419
24491
|
//#region src/pages/Modules/Jobs/JobDetailPage.jsx
|
|
24420
|
-
function
|
|
24492
|
+
function Ay() {
|
|
24421
24493
|
let [e, t] = o(null);
|
|
24422
24494
|
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(qi, { items: [
|
|
24423
24495
|
{
|
|
@@ -24437,8 +24509,8 @@ function Ty() {
|
|
|
24437
24509
|
}
|
|
24438
24510
|
//#endregion
|
|
24439
24511
|
//#region src/pages/stickyNotesFullPage.jsx
|
|
24440
|
-
var { Title:
|
|
24441
|
-
function
|
|
24512
|
+
var { Title: jy } = U;
|
|
24513
|
+
function My() {
|
|
24442
24514
|
let e = Vt(), { state: t } = Bt(), n = t?.moduleName || "stickyNotes", r = t?.title || "Sticky Notes", i = {
|
|
24443
24515
|
...t?.request,
|
|
24444
24516
|
params: {
|
|
@@ -24463,7 +24535,7 @@ function Dy() {
|
|
|
24463
24535
|
}
|
|
24464
24536
|
//#endregion
|
|
24465
24537
|
//#region src/pages/BulkUpload/index.jsx
|
|
24466
|
-
var { Text:
|
|
24538
|
+
var { Text: Ny, Title: Py } = U, Fy = 10 * 1024 * 1024, Iy = "/templates/test_cases_flow_template.base64.txt", Ly = "test_cases_flow_template.xlsx", Ry = "module | subModule | step_order | description | actions | key | value | expected | scenario", zy = {
|
|
24467
24539
|
idle: 0,
|
|
24468
24540
|
module_set: 1,
|
|
24469
24541
|
encoding: 1,
|
|
@@ -24472,7 +24544,7 @@ var { Text: Oy, Title: ky } = U, Ay = 10 * 1024 * 1024, jy = "/templates/test_ca
|
|
|
24472
24544
|
inserting: 3,
|
|
24473
24545
|
done: 4,
|
|
24474
24546
|
error: 1
|
|
24475
|
-
},
|
|
24547
|
+
}, By = [
|
|
24476
24548
|
{
|
|
24477
24549
|
label: "Home",
|
|
24478
24550
|
href: "/"
|
|
@@ -24486,31 +24558,31 @@ var { Text: Oy, Title: ky } = U, Ay = 10 * 1024 * 1024, jy = "/templates/test_ca
|
|
|
24486
24558
|
href: "/bulk-upload"
|
|
24487
24559
|
}
|
|
24488
24560
|
];
|
|
24489
|
-
function
|
|
24561
|
+
function Vy(e) {
|
|
24490
24562
|
return new Promise((t, n) => {
|
|
24491
24563
|
let r = new FileReader();
|
|
24492
24564
|
r.onload = () => t(String(r.result).split(",")[1]), r.onerror = n, r.readAsDataURL(e);
|
|
24493
24565
|
});
|
|
24494
24566
|
}
|
|
24495
|
-
function
|
|
24567
|
+
function Hy(e) {
|
|
24496
24568
|
return e.filter((e) => e.row_status === "valid").map((e) => {
|
|
24497
24569
|
let t = { ...e };
|
|
24498
24570
|
return delete t.row_status, delete t.errors, t;
|
|
24499
24571
|
});
|
|
24500
24572
|
}
|
|
24501
|
-
function
|
|
24573
|
+
function Uy(e) {
|
|
24502
24574
|
return e.flatMap((e) => (e.errors ?? []).map((t) => ({
|
|
24503
24575
|
id: e.id,
|
|
24504
24576
|
...t
|
|
24505
24577
|
})));
|
|
24506
24578
|
}
|
|
24507
|
-
function
|
|
24579
|
+
function Wy({ errors: e }) {
|
|
24508
24580
|
return /* @__PURE__ */ q("div", {
|
|
24509
24581
|
className: "bulk-tooltip-errors",
|
|
24510
24582
|
children: (e ?? []).map((e, t) => /* @__PURE__ */ q("div", { children: e.message }, `${e.field}-${t}`))
|
|
24511
24583
|
});
|
|
24512
24584
|
}
|
|
24513
|
-
function
|
|
24585
|
+
function Gy({ errors: e, expanded: t, onToggle: n, onSummaryClick: r }) {
|
|
24514
24586
|
return e.length === 0 ? null : /* @__PURE__ */ J("div", {
|
|
24515
24587
|
className: "bulk-error-banner",
|
|
24516
24588
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -24541,7 +24613,7 @@ function By({ errors: e, expanded: t, onToggle: n, onSummaryClick: r }) {
|
|
|
24541
24613
|
})]
|
|
24542
24614
|
});
|
|
24543
24615
|
}
|
|
24544
|
-
function
|
|
24616
|
+
function Ky({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, saving: a, firstInvalidRowId: o, firstInvalidRowRef: s }) {
|
|
24545
24617
|
let c = e.filter((e) => e.row_status === "invalid"), l = t === "errors" ? c : e, d = c.length > 0 || a;
|
|
24546
24618
|
return /* @__PURE__ */ J(K, { children: [
|
|
24547
24619
|
/* @__PURE__ */ J(F, {
|
|
@@ -24557,7 +24629,7 @@ function Vy({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
24557
24629
|
type: t === "errors" ? "primary" : "default",
|
|
24558
24630
|
onClick: () => n("errors"),
|
|
24559
24631
|
children: "Errors only"
|
|
24560
|
-
})] }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ J(
|
|
24632
|
+
})] }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ J(Ny, {
|
|
24561
24633
|
type: "secondary",
|
|
24562
24634
|
children: [e.length, " row(s)"]
|
|
24563
24635
|
}) })]
|
|
@@ -24629,7 +24701,7 @@ function Vy({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
24629
24701
|
children: "Valid"
|
|
24630
24702
|
}) }),
|
|
24631
24703
|
/* @__PURE__ */ q("td", { children: n ? /* @__PURE__ */ q(H, {
|
|
24632
|
-
title: /* @__PURE__ */ q(
|
|
24704
|
+
title: /* @__PURE__ */ q(Wy, { errors: t }),
|
|
24633
24705
|
placement: "left",
|
|
24634
24706
|
children: /* @__PURE__ */ J("button", {
|
|
24635
24707
|
type: "button",
|
|
@@ -24666,11 +24738,11 @@ function Vy({ rows: e, view: t, onViewChange: n, onConfirm: r, onReset: i, savin
|
|
|
24666
24738
|
})
|
|
24667
24739
|
] });
|
|
24668
24740
|
}
|
|
24669
|
-
function
|
|
24741
|
+
function qy() {
|
|
24670
24742
|
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) => ({
|
|
24671
24743
|
value: e.modulename,
|
|
24672
24744
|
label: e.modulename
|
|
24673
|
-
})), P =
|
|
24745
|
+
})), P = Uy(C), L = _ === "encoding" || _ === "validating", z = !!m && !L, te = zy[_] ?? 0, ne = C.find((e) => e.row_status === "invalid")?.id, B = n(() => {
|
|
24674
24746
|
g(""), v("idle"), b(!1), S(null), w([]), E("all"), O(null), A(null), c.current && (c.current.value = "");
|
|
24675
24747
|
}, []);
|
|
24676
24748
|
r(() => {
|
|
@@ -24695,7 +24767,7 @@ function Hy() {
|
|
|
24695
24767
|
v("module_set"), O({ message: "Invalid file type. Please upload an Excel .xlsx or CSV .csv file." });
|
|
24696
24768
|
return;
|
|
24697
24769
|
}
|
|
24698
|
-
if (e.size >
|
|
24770
|
+
if (e.size > Fy) {
|
|
24699
24771
|
v("module_set"), O({ message: "File must be 10 MB or smaller." });
|
|
24700
24772
|
return;
|
|
24701
24773
|
}
|
|
@@ -24704,7 +24776,7 @@ function Hy() {
|
|
|
24704
24776
|
size: e.size
|
|
24705
24777
|
}), v("encoding");
|
|
24706
24778
|
try {
|
|
24707
|
-
let r = await
|
|
24779
|
+
let r = await Vy(e);
|
|
24708
24780
|
v("validating"), w((await zm({
|
|
24709
24781
|
filename: e.name,
|
|
24710
24782
|
project: t?.name ?? "",
|
|
@@ -24720,12 +24792,12 @@ function Hy() {
|
|
|
24720
24792
|
}
|
|
24721
24793
|
}, V = async () => {
|
|
24722
24794
|
try {
|
|
24723
|
-
let e = await fetch(
|
|
24795
|
+
let e = await fetch(Iy);
|
|
24724
24796
|
if (!e.ok) throw Error(`Template file not found (${e.status})`);
|
|
24725
24797
|
let t = (await e.text()).trim(), n = atob(t), r = new Uint8Array(n.length);
|
|
24726
24798
|
for (let e = 0; e < n.length; e += 1) r[e] = n.charCodeAt(e);
|
|
24727
24799
|
let i = new Blob([r], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
24728
|
-
o.href = a, o.download =
|
|
24800
|
+
o.href = a, o.download = Ly, document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(a), G.success("Sample template downloaded.");
|
|
24729
24801
|
} catch (e) {
|
|
24730
24802
|
console.error(e), G.error("Unable to download sample template.");
|
|
24731
24803
|
}
|
|
@@ -24736,7 +24808,7 @@ function Hy() {
|
|
|
24736
24808
|
project: t?.name ?? "",
|
|
24737
24809
|
module: m,
|
|
24738
24810
|
uploaded_by: localStorage.getItem("user_Email") ?? "",
|
|
24739
|
-
rows:
|
|
24811
|
+
rows: Hy(C)
|
|
24740
24812
|
})), v("done"), G.success("Bulk upload saved. Redirecting to view test cases..."), window.setTimeout(() => e("/viewTestCase"), 900);
|
|
24741
24813
|
} catch (e) {
|
|
24742
24814
|
console.error(e), O(e.payload ?? {
|
|
@@ -24762,7 +24834,7 @@ function Hy() {
|
|
|
24762
24834
|
align: "middle",
|
|
24763
24835
|
justify: "space-between",
|
|
24764
24836
|
className: "breadcrumb-action-wrapper",
|
|
24765
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
24837
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: By }) }), t?.name && /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(Ny, {
|
|
24766
24838
|
strong: !0,
|
|
24767
24839
|
children: t.name
|
|
24768
24840
|
}) })]
|
|
@@ -24771,16 +24843,16 @@ function Hy() {
|
|
|
24771
24843
|
children: [
|
|
24772
24844
|
/* @__PURE__ */ J("div", {
|
|
24773
24845
|
className: "bulk-header",
|
|
24774
|
-
children: [/* @__PURE__ */ q(
|
|
24846
|
+
children: [/* @__PURE__ */ q(Py, {
|
|
24775
24847
|
level: 3,
|
|
24776
24848
|
children: "Bulk upload test cases"
|
|
24777
24849
|
}), /* @__PURE__ */ J(R, {
|
|
24778
24850
|
direction: "vertical",
|
|
24779
24851
|
size: 4,
|
|
24780
|
-
children: [/* @__PURE__ */ q(
|
|
24852
|
+
children: [/* @__PURE__ */ q(Ny, {
|
|
24781
24853
|
type: "secondary",
|
|
24782
|
-
children:
|
|
24783
|
-
}), /* @__PURE__ */ q(
|
|
24854
|
+
children: Ry
|
|
24855
|
+
}), /* @__PURE__ */ q(Ny, {
|
|
24784
24856
|
type: "secondary",
|
|
24785
24857
|
children: "Use the sample template for the required columns. Uploaded rows are saved as Active by default."
|
|
24786
24858
|
})]
|
|
@@ -24878,7 +24950,7 @@ function Hy() {
|
|
|
24878
24950
|
className: "v1-card zt-fall",
|
|
24879
24951
|
title: "3. Validation result",
|
|
24880
24952
|
children: [
|
|
24881
|
-
/* @__PURE__ */ q(
|
|
24953
|
+
/* @__PURE__ */ q(Gy, {
|
|
24882
24954
|
errors: P,
|
|
24883
24955
|
expanded: j,
|
|
24884
24956
|
onToggle: () => M((e) => !e),
|
|
@@ -24890,7 +24962,7 @@ function Hy() {
|
|
|
24890
24962
|
message: D.message,
|
|
24891
24963
|
className: "bulk-inline-alert"
|
|
24892
24964
|
}),
|
|
24893
|
-
/* @__PURE__ */ q(
|
|
24965
|
+
/* @__PURE__ */ q(Ky, {
|
|
24894
24966
|
rows: C,
|
|
24895
24967
|
view: T,
|
|
24896
24968
|
onViewChange: E,
|
|
@@ -24913,17 +24985,17 @@ function Hy() {
|
|
|
24913
24985
|
/* @__PURE__ */ q(h, {
|
|
24914
24986
|
xs: 24,
|
|
24915
24987
|
md: 8,
|
|
24916
|
-
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
24988
|
+
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Ny, { children: "Total" }), /* @__PURE__ */ q("strong", { children: C.length })] })
|
|
24917
24989
|
}),
|
|
24918
24990
|
/* @__PURE__ */ q(h, {
|
|
24919
24991
|
xs: 24,
|
|
24920
24992
|
md: 8,
|
|
24921
|
-
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
24993
|
+
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Ny, { children: "Inserted" }), /* @__PURE__ */ q("strong", { children: k.inserted ?? 0 })] })
|
|
24922
24994
|
}),
|
|
24923
24995
|
/* @__PURE__ */ q(h, {
|
|
24924
24996
|
xs: 24,
|
|
24925
24997
|
md: 8,
|
|
24926
|
-
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
24998
|
+
children: /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(Ny, { children: "Failed" }), /* @__PURE__ */ q("strong", { children: k.failed ?? 0 })] })
|
|
24927
24999
|
})
|
|
24928
25000
|
]
|
|
24929
25001
|
}),
|
|
@@ -24947,7 +25019,7 @@ function Hy() {
|
|
|
24947
25019
|
}
|
|
24948
25020
|
//#endregion
|
|
24949
25021
|
//#region src/services/dropdownValues/testPageValues.js
|
|
24950
|
-
var
|
|
25022
|
+
var Jy = [
|
|
24951
25023
|
{
|
|
24952
25024
|
value: "navigate",
|
|
24953
25025
|
label: "Navigate"
|
|
@@ -25080,82 +25152,82 @@ var Uy = [
|
|
|
25080
25152
|
value: "wait_for_text",
|
|
25081
25153
|
label: "Wait For Text"
|
|
25082
25154
|
}
|
|
25083
|
-
], { Text:
|
|
25155
|
+
], { Text: Yy } = U, Xy = [{
|
|
25084
25156
|
label: "Home",
|
|
25085
25157
|
href: "/"
|
|
25086
25158
|
}, {
|
|
25087
25159
|
label: "Test Cases",
|
|
25088
25160
|
href: "/test-cases"
|
|
25089
|
-
}],
|
|
25161
|
+
}], Zy = {
|
|
25090
25162
|
tags: "regression",
|
|
25091
25163
|
active: 1
|
|
25092
|
-
},
|
|
25164
|
+
}, Qy = { module: {
|
|
25093
25165
|
dbName: "Modules",
|
|
25094
25166
|
formField: "module",
|
|
25095
25167
|
label: "Module"
|
|
25096
25168
|
} };
|
|
25097
|
-
function
|
|
25169
|
+
function $y(e = []) {
|
|
25098
25170
|
return e.map((e) => ({
|
|
25099
25171
|
value: e,
|
|
25100
25172
|
label: e
|
|
25101
25173
|
}));
|
|
25102
25174
|
}
|
|
25103
|
-
function
|
|
25175
|
+
function eb(e = "") {
|
|
25104
25176
|
return String(e ?? "").trim();
|
|
25105
25177
|
}
|
|
25106
|
-
function
|
|
25107
|
-
return
|
|
25178
|
+
function tb(e = "") {
|
|
25179
|
+
return eb(e).toLowerCase();
|
|
25108
25180
|
}
|
|
25109
|
-
function
|
|
25181
|
+
function nb(e = []) {
|
|
25110
25182
|
let t = /* @__PURE__ */ new Map();
|
|
25111
25183
|
return e.forEach((e) => {
|
|
25112
|
-
let n =
|
|
25184
|
+
let n = eb(e?.flow), r = n.toLowerCase();
|
|
25113
25185
|
n && !t.has(r) && t.set(r, n);
|
|
25114
25186
|
}), Array.from(t.values()).map((e) => ({
|
|
25115
25187
|
value: e,
|
|
25116
25188
|
label: e
|
|
25117
25189
|
}));
|
|
25118
25190
|
}
|
|
25119
|
-
function
|
|
25120
|
-
let r =
|
|
25191
|
+
function rb(e = [], t, n) {
|
|
25192
|
+
let r = eb(t).toLowerCase(), i = eb(n).toLowerCase();
|
|
25121
25193
|
return e.reduce((e, t) => {
|
|
25122
|
-
let n =
|
|
25194
|
+
let n = eb(t?.module).toLowerCase(), a = eb(t?.flow).toLowerCase();
|
|
25123
25195
|
if (n !== r || a !== i) return e;
|
|
25124
25196
|
let o = Number(t?.step_order) || 0;
|
|
25125
25197
|
return Math.max(e, o);
|
|
25126
25198
|
}, 0) + 1;
|
|
25127
25199
|
}
|
|
25128
|
-
function
|
|
25200
|
+
function ib({ icon: e, title: t }) {
|
|
25129
25201
|
return /* @__PURE__ */ J(R, {
|
|
25130
25202
|
size: 10,
|
|
25131
25203
|
align: "center",
|
|
25132
25204
|
children: [/* @__PURE__ */ q("div", {
|
|
25133
25205
|
className: "v1-section-icon-box",
|
|
25134
25206
|
children: e
|
|
25135
|
-
}), /* @__PURE__ */ q(
|
|
25207
|
+
}), /* @__PURE__ */ q(Yy, {
|
|
25136
25208
|
strong: !0,
|
|
25137
25209
|
className: "v1-section-label",
|
|
25138
25210
|
children: t
|
|
25139
25211
|
})]
|
|
25140
25212
|
});
|
|
25141
25213
|
}
|
|
25142
|
-
function
|
|
25214
|
+
function ab() {
|
|
25143
25215
|
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({
|
|
25144
25216
|
open: !1,
|
|
25145
25217
|
typeKey: "module"
|
|
25146
|
-
}), [S, T] = o(!1), [E, D] = o(!1), [O, A] = o(!1), j = Vt(), M =
|
|
25218
|
+
}), [S, T] = o(!1), [E, D] = o(!1), [O, A] = o(!1), j = Vt(), M = Qy[b.typeKey], ee = i(() => $y(a), [a]), N = C.useWatch("module", e), P = C.useWatch("flow", e), L = !!eb(N), z = !!eb(P), te = !L, ne = !L || !z, B = (e, t = []) => {
|
|
25147
25219
|
e === "module" && s(t);
|
|
25148
25220
|
}, re = async () => {
|
|
25149
25221
|
_(!0);
|
|
25150
25222
|
try {
|
|
25151
|
-
s((await Pm(
|
|
25223
|
+
s((await Pm(Qy.module.dbName))?.items ?? []);
|
|
25152
25224
|
} catch (e) {
|
|
25153
25225
|
console.error("Unable to load testing options:", e), G.error("Unable to load testing options.");
|
|
25154
25226
|
} finally {
|
|
25155
25227
|
_(!1);
|
|
25156
25228
|
}
|
|
25157
25229
|
}, ie = n(async (t) => {
|
|
25158
|
-
let n =
|
|
25230
|
+
let n = eb(t);
|
|
25159
25231
|
if (u([]), m([]), e.setFieldsValue({ step_order: void 0 }), n) {
|
|
25160
25232
|
y(!0);
|
|
25161
25233
|
try {
|
|
@@ -25164,7 +25236,7 @@ function eb() {
|
|
|
25164
25236
|
offset: 0,
|
|
25165
25237
|
module: n
|
|
25166
25238
|
}), t = Array.isArray(e?.items) ? e.items : [];
|
|
25167
|
-
u(t), m(
|
|
25239
|
+
u(t), m(nb(t));
|
|
25168
25240
|
} catch (e) {
|
|
25169
25241
|
console.error("Unable to load flows:", e), G.error("Unable to load flows.");
|
|
25170
25242
|
} finally {
|
|
@@ -25172,14 +25244,14 @@ function eb() {
|
|
|
25172
25244
|
}
|
|
25173
25245
|
}
|
|
25174
25246
|
}, [e]), V = n(async (t, n, r) => {
|
|
25175
|
-
let i =
|
|
25247
|
+
let i = eb(t), a = eb(n);
|
|
25176
25248
|
if (!i || !a) {
|
|
25177
25249
|
e.setFieldsValue({ step_order: void 0 });
|
|
25178
25250
|
return;
|
|
25179
25251
|
}
|
|
25180
25252
|
D(!0);
|
|
25181
25253
|
try {
|
|
25182
|
-
e.setFieldsValue({ step_order:
|
|
25254
|
+
e.setFieldsValue({ step_order: rb(r, i, a) });
|
|
25183
25255
|
} catch (e) {
|
|
25184
25256
|
console.error("Unable to load step order:", e), G.error("Unable to load step order.");
|
|
25185
25257
|
} finally {
|
|
@@ -25200,15 +25272,15 @@ function eb() {
|
|
|
25200
25272
|
]);
|
|
25201
25273
|
let ae = async (t) => {
|
|
25202
25274
|
let n = {
|
|
25203
|
-
module:
|
|
25204
|
-
flow:
|
|
25275
|
+
module: eb(t.module),
|
|
25276
|
+
flow: eb(t.flow),
|
|
25205
25277
|
step_order: Number(t.step_order),
|
|
25206
|
-
description:
|
|
25207
|
-
keyword:
|
|
25208
|
-
target:
|
|
25209
|
-
value:
|
|
25210
|
-
expected:
|
|
25211
|
-
tags: t.tags ?
|
|
25278
|
+
description: eb(t.description),
|
|
25279
|
+
keyword: tb(t.keyword),
|
|
25280
|
+
target: eb(t.target),
|
|
25281
|
+
value: eb(t.value),
|
|
25282
|
+
expected: eb(t.expected),
|
|
25283
|
+
tags: t.tags ? eb(t.tags) : Zy.tags,
|
|
25212
25284
|
active: Number(t.active)
|
|
25213
25285
|
};
|
|
25214
25286
|
A(!0);
|
|
@@ -25220,26 +25292,26 @@ function eb() {
|
|
|
25220
25292
|
A(!1);
|
|
25221
25293
|
}
|
|
25222
25294
|
}, H = (t, n) => {
|
|
25223
|
-
e.setFieldsValue({ [t]:
|
|
25295
|
+
e.setFieldsValue({ [t]: eb(n) });
|
|
25224
25296
|
}, U = (t) => {
|
|
25225
25297
|
e.setFieldsValue({
|
|
25226
|
-
module:
|
|
25298
|
+
module: eb(t),
|
|
25227
25299
|
flow: void 0,
|
|
25228
25300
|
step_order: void 0,
|
|
25229
25301
|
keyword: void 0,
|
|
25230
25302
|
description: void 0,
|
|
25231
25303
|
target: void 0,
|
|
25232
|
-
tags:
|
|
25304
|
+
tags: Zy.tags,
|
|
25233
25305
|
value: void 0,
|
|
25234
25306
|
expected: void 0
|
|
25235
25307
|
});
|
|
25236
25308
|
}, W = (t) => {
|
|
25237
25309
|
e.setFieldsValue({
|
|
25238
|
-
flow:
|
|
25310
|
+
flow: eb(t),
|
|
25239
25311
|
step_order: void 0
|
|
25240
25312
|
});
|
|
25241
25313
|
}, oe = (e) => {
|
|
25242
|
-
let n =
|
|
25314
|
+
let n = Qy[e];
|
|
25243
25315
|
x({
|
|
25244
25316
|
open: !0,
|
|
25245
25317
|
typeKey: e
|
|
@@ -25254,7 +25326,7 @@ function eb() {
|
|
|
25254
25326
|
})), t.resetFields();
|
|
25255
25327
|
}, ce = async () => {
|
|
25256
25328
|
try {
|
|
25257
|
-
let n =
|
|
25329
|
+
let n = eb((await t.validateFields()).name), r = await Fm({
|
|
25258
25330
|
name: n,
|
|
25259
25331
|
type: M.dbName
|
|
25260
25332
|
});
|
|
@@ -25272,7 +25344,7 @@ function eb() {
|
|
|
25272
25344
|
align: "middle",
|
|
25273
25345
|
justify: "space-between",
|
|
25274
25346
|
className: "breadcrumb-action-wrapper",
|
|
25275
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
25347
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: Xy }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(f, {
|
|
25276
25348
|
type: "link",
|
|
25277
25349
|
onClick: () => j("/zinnext-home"),
|
|
25278
25350
|
children: "View Table"
|
|
@@ -25287,7 +25359,7 @@ function eb() {
|
|
|
25287
25359
|
children: /* @__PURE__ */ J(R, {
|
|
25288
25360
|
align: "center",
|
|
25289
25361
|
size: 10,
|
|
25290
|
-
children: [/* @__PURE__ */ q(pt, { className: "v1-outer-icon" }), /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(
|
|
25362
|
+
children: [/* @__PURE__ */ q(pt, { className: "v1-outer-icon" }), /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(Yy, {
|
|
25291
25363
|
strong: !0,
|
|
25292
25364
|
style: { fontSize: 16 },
|
|
25293
25365
|
children: "Add Test Case"
|
|
@@ -25303,16 +25375,16 @@ function eb() {
|
|
|
25303
25375
|
className: "v1-required-mark",
|
|
25304
25376
|
children: " *"
|
|
25305
25377
|
})] }),
|
|
25306
|
-
initialValues:
|
|
25378
|
+
initialValues: Zy,
|
|
25307
25379
|
onFinish: ae,
|
|
25308
25380
|
autoComplete: "off",
|
|
25309
25381
|
children: [/* @__PURE__ */ q(p, {
|
|
25310
25382
|
className: "v1-card",
|
|
25311
|
-
title: /* @__PURE__ */ q(
|
|
25383
|
+
title: /* @__PURE__ */ q(ib, {
|
|
25312
25384
|
icon: /* @__PURE__ */ q(Be, {}),
|
|
25313
25385
|
title: "Test Case Details"
|
|
25314
25386
|
}),
|
|
25315
|
-
extra: /* @__PURE__ */ q(
|
|
25387
|
+
extra: /* @__PURE__ */ q(Yy, {
|
|
25316
25388
|
type: "secondary",
|
|
25317
25389
|
className: "v1-card-subtitle",
|
|
25318
25390
|
children: "Module, flow, step order and execution data"
|
|
@@ -25389,8 +25461,8 @@ function eb() {
|
|
|
25389
25461
|
disabled: ne,
|
|
25390
25462
|
optionFilterProp: "label",
|
|
25391
25463
|
placeholder: "Select action",
|
|
25392
|
-
options:
|
|
25393
|
-
onChange: (t) => e.setFieldsValue({ keyword:
|
|
25464
|
+
options: Jy,
|
|
25465
|
+
onChange: (t) => e.setFieldsValue({ keyword: tb(t) })
|
|
25394
25466
|
})
|
|
25395
25467
|
})
|
|
25396
25468
|
}),
|
|
@@ -25510,7 +25582,7 @@ function eb() {
|
|
|
25510
25582
|
maxLength: 100,
|
|
25511
25583
|
placeholder: `Enter ${M.label.toLowerCase()} name`,
|
|
25512
25584
|
onBlur: (e) => {
|
|
25513
|
-
t.setFieldsValue({ name:
|
|
25585
|
+
t.setFieldsValue({ name: eb(e.target.value) });
|
|
25514
25586
|
}
|
|
25515
25587
|
})
|
|
25516
25588
|
}), /* @__PURE__ */ q(C.Item, {
|
|
@@ -25527,23 +25599,23 @@ function eb() {
|
|
|
25527
25599
|
}
|
|
25528
25600
|
//#endregion
|
|
25529
25601
|
//#region src/pages/TestingPage/ZinnextTestForm.jsx
|
|
25530
|
-
var { Text:
|
|
25602
|
+
var { Text: ob } = U, sb = [{
|
|
25531
25603
|
label: "Home",
|
|
25532
25604
|
href: "/"
|
|
25533
25605
|
}, {
|
|
25534
25606
|
label: "Test Cases",
|
|
25535
25607
|
href: "/addTestCase"
|
|
25536
25608
|
}];
|
|
25537
|
-
function
|
|
25609
|
+
function cb(e = "") {
|
|
25538
25610
|
return String(e ?? "").trim();
|
|
25539
25611
|
}
|
|
25540
|
-
function
|
|
25612
|
+
function lb(e = [], t) {
|
|
25541
25613
|
return e.map((e) => ({
|
|
25542
25614
|
value: e.id,
|
|
25543
25615
|
label: e[t]
|
|
25544
25616
|
}));
|
|
25545
25617
|
}
|
|
25546
|
-
var
|
|
25618
|
+
var ub = [
|
|
25547
25619
|
{
|
|
25548
25620
|
label: "Step",
|
|
25549
25621
|
value: "step_order",
|
|
@@ -25582,22 +25654,22 @@ var ab = [
|
|
|
25582
25654
|
children: "Negative"
|
|
25583
25655
|
})
|
|
25584
25656
|
}
|
|
25585
|
-
],
|
|
25657
|
+
], db = {
|
|
25586
25658
|
key: !1,
|
|
25587
25659
|
value: !1,
|
|
25588
25660
|
expected: !1
|
|
25589
25661
|
};
|
|
25590
|
-
function
|
|
25591
|
-
return t ? e[t] ??
|
|
25662
|
+
function fb(e, t) {
|
|
25663
|
+
return t ? e[t] ?? db : db;
|
|
25592
25664
|
}
|
|
25593
|
-
function
|
|
25665
|
+
function pb(e, t) {
|
|
25594
25666
|
e.setFields(t.map((e) => ({
|
|
25595
25667
|
name: e,
|
|
25596
25668
|
errors: []
|
|
25597
25669
|
})));
|
|
25598
25670
|
}
|
|
25599
|
-
function
|
|
25600
|
-
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(
|
|
25671
|
+
function mb() {
|
|
25672
|
+
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(Jy), [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(() => fb(x, z), [x, z]), ie = i(() => lb(u, "modulename"), [u]), ae = i(() => lb(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 () => {
|
|
25601
25673
|
try {
|
|
25602
25674
|
let e = await Im();
|
|
25603
25675
|
Array.isArray(e?.options) && e.options.length > 0 && b(e.options), e?.rules && typeof e.rules == "object" && S(e.rules);
|
|
@@ -25738,10 +25810,10 @@ function lb() {
|
|
|
25738
25810
|
align: "middle",
|
|
25739
25811
|
justify: "space-between",
|
|
25740
25812
|
className: "breadcrumb-action-wrapper",
|
|
25741
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
25813
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: sb }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ J(R, {
|
|
25742
25814
|
size: 6,
|
|
25743
25815
|
className: "zt-section-title",
|
|
25744
|
-
children: [/* @__PURE__ */ q(mt, {}), /* @__PURE__ */ q(
|
|
25816
|
+
children: [/* @__PURE__ */ q(mt, {}), /* @__PURE__ */ q(ob, {
|
|
25745
25817
|
strong: !0,
|
|
25746
25818
|
children: l.name
|
|
25747
25819
|
})]
|
|
@@ -25762,11 +25834,11 @@ function lb() {
|
|
|
25762
25834
|
product_parent_ID: Number(l?.id),
|
|
25763
25835
|
module_parent_ID: Number(n.module),
|
|
25764
25836
|
submodule_parent_ID: Number(n.submodule),
|
|
25765
|
-
description:
|
|
25766
|
-
actions:
|
|
25767
|
-
key:
|
|
25768
|
-
value:
|
|
25769
|
-
expected:
|
|
25837
|
+
description: cb(n.description),
|
|
25838
|
+
actions: cb(n.actions),
|
|
25839
|
+
key: cb(n.key),
|
|
25840
|
+
value: cb(n.value),
|
|
25841
|
+
expected: cb(n.expected),
|
|
25770
25842
|
scenario: +!!n.scenario,
|
|
25771
25843
|
active: +!!n.active
|
|
25772
25844
|
};
|
|
@@ -25832,7 +25904,7 @@ function lb() {
|
|
|
25832
25904
|
key: void 0,
|
|
25833
25905
|
value: void 0,
|
|
25834
25906
|
expected: void 0
|
|
25835
|
-
}),
|
|
25907
|
+
}), pb(e, [
|
|
25836
25908
|
"actions",
|
|
25837
25909
|
"key",
|
|
25838
25910
|
"value",
|
|
@@ -25863,7 +25935,7 @@ function lb() {
|
|
|
25863
25935
|
key: void 0,
|
|
25864
25936
|
value: void 0,
|
|
25865
25937
|
expected: void 0
|
|
25866
|
-
}),
|
|
25938
|
+
}), pb(e, [
|
|
25867
25939
|
"actions",
|
|
25868
25940
|
"key",
|
|
25869
25941
|
"value",
|
|
@@ -25917,7 +25989,7 @@ function lb() {
|
|
|
25917
25989
|
/* @__PURE__ */ q("span", { children: "Step Details" })
|
|
25918
25990
|
]
|
|
25919
25991
|
}),
|
|
25920
|
-
extra: /* @__PURE__ */ J(
|
|
25992
|
+
extra: /* @__PURE__ */ J(ob, {
|
|
25921
25993
|
type: "secondary",
|
|
25922
25994
|
children: [
|
|
25923
25995
|
H,
|
|
@@ -25957,13 +26029,13 @@ function lb() {
|
|
|
25957
26029
|
placeholder: "Select action",
|
|
25958
26030
|
options: y,
|
|
25959
26031
|
onChange: (t) => {
|
|
25960
|
-
let n =
|
|
26032
|
+
let n = fb(x, t);
|
|
25961
26033
|
e.setFieldsValue({
|
|
25962
26034
|
actions: t,
|
|
25963
26035
|
key: n.key ? e.getFieldValue("key") : void 0,
|
|
25964
26036
|
value: n.value ? e.getFieldValue("value") : void 0,
|
|
25965
26037
|
expected: n.expected ? e.getFieldValue("expected") : void 0
|
|
25966
|
-
}),
|
|
26038
|
+
}), pb(e, [
|
|
25967
26039
|
"key",
|
|
25968
26040
|
"value",
|
|
25969
26041
|
"expected"
|
|
@@ -26072,7 +26144,7 @@ function lb() {
|
|
|
26072
26144
|
children: /* @__PURE__ */ q(Qc, {
|
|
26073
26145
|
listName: "Added Steps",
|
|
26074
26146
|
loading: k,
|
|
26075
|
-
fields:
|
|
26147
|
+
fields: ub,
|
|
26076
26148
|
dataSource: _,
|
|
26077
26149
|
current: 1,
|
|
26078
26150
|
pageSize: Math.max(_.length, 1),
|
|
@@ -26088,7 +26160,7 @@ function lb() {
|
|
|
26088
26160
|
}
|
|
26089
26161
|
//#endregion
|
|
26090
26162
|
//#region src/pages/TestingPage/ManageModules.jsx
|
|
26091
|
-
var { Text:
|
|
26163
|
+
var { Text: hb } = U, gb = [
|
|
26092
26164
|
{
|
|
26093
26165
|
label: "Home",
|
|
26094
26166
|
href: "/"
|
|
@@ -26102,7 +26174,7 @@ var { Text: ub } = U, db = [
|
|
|
26102
26174
|
href: "/manageModules"
|
|
26103
26175
|
}
|
|
26104
26176
|
];
|
|
26105
|
-
function
|
|
26177
|
+
function _b() {
|
|
26106
26178
|
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) => {
|
|
26107
26179
|
if (!e) {
|
|
26108
26180
|
s([]);
|
|
@@ -26170,7 +26242,7 @@ function fb() {
|
|
|
26170
26242
|
align: "middle",
|
|
26171
26243
|
justify: "space-between",
|
|
26172
26244
|
className: "breadcrumb-action-wrapper",
|
|
26173
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
26245
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: gb }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(f, {
|
|
26174
26246
|
type: "link",
|
|
26175
26247
|
onClick: () => e("/addTestCase"),
|
|
26176
26248
|
children: "Back to Form"
|
|
@@ -26190,7 +26262,7 @@ function fb() {
|
|
|
26190
26262
|
children: [
|
|
26191
26263
|
/* @__PURE__ */ q(mt, {}),
|
|
26192
26264
|
/* @__PURE__ */ q("span", { children: "Project:" }),
|
|
26193
|
-
/* @__PURE__ */ q(
|
|
26265
|
+
/* @__PURE__ */ q(hb, {
|
|
26194
26266
|
strong: !0,
|
|
26195
26267
|
children: t.name
|
|
26196
26268
|
})
|
|
@@ -26266,7 +26338,7 @@ function fb() {
|
|
|
26266
26338
|
children: /* @__PURE__ */ J(R, {
|
|
26267
26339
|
direction: "vertical",
|
|
26268
26340
|
className: "zt-modal-stack",
|
|
26269
|
-
children: [/* @__PURE__ */ J(
|
|
26341
|
+
children: [/* @__PURE__ */ J(hb, {
|
|
26270
26342
|
type: "secondary",
|
|
26271
26343
|
children: ["Project: ", /* @__PURE__ */ q("b", { children: t.name })]
|
|
26272
26344
|
}), /* @__PURE__ */ q(w, {
|
|
@@ -26283,7 +26355,7 @@ function fb() {
|
|
|
26283
26355
|
}
|
|
26284
26356
|
//#endregion
|
|
26285
26357
|
//#region src/pages/TestingPage/ManageSubmodules.jsx
|
|
26286
|
-
var { Text:
|
|
26358
|
+
var { Text: vb } = U, yb = [
|
|
26287
26359
|
{
|
|
26288
26360
|
label: "Home",
|
|
26289
26361
|
href: "/"
|
|
@@ -26301,7 +26373,7 @@ var { Text: pb } = U, mb = [
|
|
|
26301
26373
|
href: "/test-cases/zinnext/submodules"
|
|
26302
26374
|
}
|
|
26303
26375
|
];
|
|
26304
|
-
function
|
|
26376
|
+
function bb() {
|
|
26305
26377
|
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) => {
|
|
26306
26378
|
if (!e || !t) {
|
|
26307
26379
|
l([]);
|
|
@@ -26370,7 +26442,7 @@ function hb() {
|
|
|
26370
26442
|
align: "middle",
|
|
26371
26443
|
justify: "space-between",
|
|
26372
26444
|
className: "breadcrumb-action-wrapper",
|
|
26373
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
26445
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: yb }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(f, {
|
|
26374
26446
|
type: "link",
|
|
26375
26447
|
onClick: () => e("/manageModules"),
|
|
26376
26448
|
children: "Back to Modules"
|
|
@@ -26393,7 +26465,7 @@ function hb() {
|
|
|
26393
26465
|
children: [
|
|
26394
26466
|
/* @__PURE__ */ q(mt, {}),
|
|
26395
26467
|
/* @__PURE__ */ q("span", { children: "Project:" }),
|
|
26396
|
-
/* @__PURE__ */ q(
|
|
26468
|
+
/* @__PURE__ */ q(vb, {
|
|
26397
26469
|
strong: !0,
|
|
26398
26470
|
children: a.name
|
|
26399
26471
|
})
|
|
@@ -26403,7 +26475,7 @@ function hb() {
|
|
|
26403
26475
|
children: [
|
|
26404
26476
|
/* @__PURE__ */ q(le, {}),
|
|
26405
26477
|
/* @__PURE__ */ q("span", { children: "Module:" }),
|
|
26406
|
-
/* @__PURE__ */ q(
|
|
26478
|
+
/* @__PURE__ */ q(vb, {
|
|
26407
26479
|
strong: !0,
|
|
26408
26480
|
children: s
|
|
26409
26481
|
})
|
|
@@ -26466,7 +26538,7 @@ function hb() {
|
|
|
26466
26538
|
children: /* @__PURE__ */ J(R, {
|
|
26467
26539
|
direction: "vertical",
|
|
26468
26540
|
className: "zt-modal-stack",
|
|
26469
|
-
children: [/* @__PURE__ */ J(
|
|
26541
|
+
children: [/* @__PURE__ */ J(vb, {
|
|
26470
26542
|
type: "secondary",
|
|
26471
26543
|
children: [
|
|
26472
26544
|
"Project: ",
|
|
@@ -26488,7 +26560,7 @@ function hb() {
|
|
|
26488
26560
|
}
|
|
26489
26561
|
//#endregion
|
|
26490
26562
|
//#region src/pages/TestingPage/ZinnextTableView.jsx
|
|
26491
|
-
var { Text:
|
|
26563
|
+
var { Text: xb } = U, Sb = [
|
|
26492
26564
|
{
|
|
26493
26565
|
label: "Home",
|
|
26494
26566
|
href: "/"
|
|
@@ -26502,7 +26574,7 @@ var { Text: gb } = U, _b = [
|
|
|
26502
26574
|
href: "/viewTestCase"
|
|
26503
26575
|
}
|
|
26504
26576
|
];
|
|
26505
|
-
function
|
|
26577
|
+
function Cb() {
|
|
26506
26578
|
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 = {}) => {
|
|
26507
26579
|
u(!0);
|
|
26508
26580
|
try {
|
|
@@ -26562,7 +26634,7 @@ function vb() {
|
|
|
26562
26634
|
align: "middle",
|
|
26563
26635
|
justify: "space-between",
|
|
26564
26636
|
className: "breadcrumb-action-wrapper",
|
|
26565
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
26637
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: Sb }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(f, {
|
|
26566
26638
|
type: "link",
|
|
26567
26639
|
onClick: () => e("/addTestCase"),
|
|
26568
26640
|
children: "Back to Form"
|
|
@@ -26576,7 +26648,7 @@ function vb() {
|
|
|
26576
26648
|
className: "zt-section-title",
|
|
26577
26649
|
children: [/* @__PURE__ */ q(Tt, {}), /* @__PURE__ */ q("span", { children: "Test Flows" })]
|
|
26578
26650
|
}),
|
|
26579
|
-
extra: /* @__PURE__ */ J(
|
|
26651
|
+
extra: /* @__PURE__ */ J(xb, {
|
|
26580
26652
|
type: "secondary",
|
|
26581
26653
|
children: [s, " row(s)"]
|
|
26582
26654
|
}),
|
|
@@ -26730,17 +26802,17 @@ function vb() {
|
|
|
26730
26802
|
}
|
|
26731
26803
|
//#endregion
|
|
26732
26804
|
//#region src/pages/TestingPage/testHomePage.jsx
|
|
26733
|
-
var
|
|
26805
|
+
var wb = [{
|
|
26734
26806
|
label: "Home",
|
|
26735
26807
|
href: "/"
|
|
26736
26808
|
}, {
|
|
26737
26809
|
label: "Test Cases",
|
|
26738
26810
|
href: "/test-cases"
|
|
26739
26811
|
}];
|
|
26740
|
-
function
|
|
26812
|
+
function Tb() {
|
|
26741
26813
|
return /* @__PURE__ */ J("main", {
|
|
26742
26814
|
className: "jobs-list-page",
|
|
26743
|
-
children: [/* @__PURE__ */ q(qi, { items:
|
|
26815
|
+
children: [/* @__PURE__ */ q(qi, { items: wb }), /* @__PURE__ */ q(zp, {
|
|
26744
26816
|
moduleName: "test-flows",
|
|
26745
26817
|
rowKey: "id"
|
|
26746
26818
|
})]
|
|
@@ -26748,85 +26820,85 @@ function bb() {
|
|
|
26748
26820
|
}
|
|
26749
26821
|
//#endregion
|
|
26750
26822
|
//#region src/pages/TestingPage/lms-test-form.jsx
|
|
26751
|
-
var { Text:
|
|
26823
|
+
var { Text: Eb } = U, Db = [{
|
|
26752
26824
|
label: "Home",
|
|
26753
26825
|
href: "/"
|
|
26754
26826
|
}, {
|
|
26755
26827
|
label: "LMS Cases",
|
|
26756
26828
|
href: "/lms-cases"
|
|
26757
|
-
}],
|
|
26829
|
+
}], Ob = {
|
|
26758
26830
|
tags: "regression",
|
|
26759
26831
|
active: 1
|
|
26760
|
-
},
|
|
26832
|
+
}, kb = { module: {
|
|
26761
26833
|
dbName: "Modules",
|
|
26762
26834
|
formField: "module",
|
|
26763
26835
|
label: "Module"
|
|
26764
|
-
} },
|
|
26836
|
+
} }, Ab = {
|
|
26765
26837
|
key: !1,
|
|
26766
26838
|
value: !1,
|
|
26767
26839
|
expected: !1
|
|
26768
26840
|
};
|
|
26769
|
-
function
|
|
26770
|
-
return t ? e[t] ??
|
|
26841
|
+
function jb(e, t) {
|
|
26842
|
+
return t ? e[t] ?? Ab : Ab;
|
|
26771
26843
|
}
|
|
26772
|
-
function
|
|
26844
|
+
function Mb(e, t) {
|
|
26773
26845
|
e.setFields(t.map((e) => ({
|
|
26774
26846
|
name: e,
|
|
26775
26847
|
errors: []
|
|
26776
26848
|
})));
|
|
26777
26849
|
}
|
|
26778
|
-
function
|
|
26850
|
+
function Nb(e = []) {
|
|
26779
26851
|
return e.map((e) => ({
|
|
26780
26852
|
value: e,
|
|
26781
26853
|
label: e
|
|
26782
26854
|
}));
|
|
26783
26855
|
}
|
|
26784
|
-
function
|
|
26856
|
+
function Pb(e = "") {
|
|
26785
26857
|
return String(e ?? "").trim();
|
|
26786
26858
|
}
|
|
26787
|
-
function
|
|
26859
|
+
function Fb(e = []) {
|
|
26788
26860
|
let t = /* @__PURE__ */ new Map();
|
|
26789
26861
|
return e.forEach((e) => {
|
|
26790
|
-
let n =
|
|
26862
|
+
let n = Pb(e?.flow), r = n.toLowerCase();
|
|
26791
26863
|
n && !t.has(r) && t.set(r, n);
|
|
26792
26864
|
}), Array.from(t.values()).map((e) => ({
|
|
26793
26865
|
value: e,
|
|
26794
26866
|
label: e
|
|
26795
26867
|
}));
|
|
26796
26868
|
}
|
|
26797
|
-
function
|
|
26798
|
-
let r =
|
|
26869
|
+
function Ib(e = [], t, n) {
|
|
26870
|
+
let r = Pb(t).toLowerCase(), i = Pb(n).toLowerCase();
|
|
26799
26871
|
return e.reduce((e, t) => {
|
|
26800
|
-
let n =
|
|
26872
|
+
let n = Pb(t?.module).toLowerCase(), a = Pb(t?.flow).toLowerCase();
|
|
26801
26873
|
if (n !== r || a !== i) return e;
|
|
26802
26874
|
let o = Number(t?.step_order) || 0;
|
|
26803
26875
|
return Math.max(e, o);
|
|
26804
26876
|
}, 0) + 1;
|
|
26805
26877
|
}
|
|
26806
|
-
function
|
|
26878
|
+
function Lb({ icon: e, title: t }) {
|
|
26807
26879
|
return /* @__PURE__ */ J(R, {
|
|
26808
26880
|
size: 10,
|
|
26809
26881
|
align: "center",
|
|
26810
26882
|
children: [/* @__PURE__ */ q("div", {
|
|
26811
26883
|
className: "v1-section-icon-box",
|
|
26812
26884
|
children: e
|
|
26813
|
-
}), /* @__PURE__ */ q(
|
|
26885
|
+
}), /* @__PURE__ */ q(Eb, {
|
|
26814
26886
|
strong: !0,
|
|
26815
26887
|
className: "v1-section-label",
|
|
26816
26888
|
children: t
|
|
26817
26889
|
})]
|
|
26818
26890
|
});
|
|
26819
26891
|
}
|
|
26820
|
-
function
|
|
26821
|
-
let [e] = C.useForm(), [t] = C.useForm(), [a, s] = o([]), [l, u] = o([]), [d, m] = o([]), [g, _] = o(
|
|
26892
|
+
function Rb() {
|
|
26893
|
+
let [e] = C.useForm(), [t] = C.useForm(), [a, s] = o([]), [l, u] = o([]), [d, m] = o([]), [g, _] = o(Jy), [v, y] = o({}), [b, x] = o(!1), [S, T] = o(!1), [E, D] = o({
|
|
26822
26894
|
open: !1,
|
|
26823
26895
|
typeKey: "module"
|
|
26824
|
-
}), [O, A] = o(!1), [j, M] = o(!1), [ee, N] = o(!1), P = Vt(), L =
|
|
26896
|
+
}), [O, A] = o(!1), [j, M] = o(!1), [ee, N] = o(!1), P = Vt(), L = kb[E.typeKey], z = i(() => Nb(a), [a]), te = C.useWatch("module", e), ne = C.useWatch("flow", e), B = C.useWatch("keyword", e), re = !!Pb(te), ie = !!Pb(ne), V = !re, ae = !re || !ie, H = i(() => jb(v, B), [v, B]), U = (e, t = []) => {
|
|
26825
26897
|
e === "module" && s(t);
|
|
26826
26898
|
}, W = async () => {
|
|
26827
26899
|
x(!0);
|
|
26828
26900
|
try {
|
|
26829
|
-
s((await Pm(
|
|
26901
|
+
s((await Pm(kb.module.dbName))?.items ?? []);
|
|
26830
26902
|
} catch (e) {
|
|
26831
26903
|
console.error("Unable to load testing options:", e), G.error("Unable to load testing options.");
|
|
26832
26904
|
} finally {
|
|
@@ -26840,7 +26912,7 @@ function Nb() {
|
|
|
26840
26912
|
console.error("Unable to load action field rules:", e), G.error("Unable to load action validation rules.");
|
|
26841
26913
|
}
|
|
26842
26914
|
}, se = n(async (t) => {
|
|
26843
|
-
let n =
|
|
26915
|
+
let n = Pb(t);
|
|
26844
26916
|
if (u([]), m([]), e.setFieldsValue({ step_order: void 0 }), n) {
|
|
26845
26917
|
T(!0);
|
|
26846
26918
|
try {
|
|
@@ -26849,7 +26921,7 @@ function Nb() {
|
|
|
26849
26921
|
offset: 0,
|
|
26850
26922
|
module: n
|
|
26851
26923
|
}), t = Array.isArray(e?.items) ? e.items : [];
|
|
26852
|
-
u(t), m(
|
|
26924
|
+
u(t), m(Fb(t));
|
|
26853
26925
|
} catch (e) {
|
|
26854
26926
|
console.error("Unable to load flows:", e), G.error("Unable to load flows.");
|
|
26855
26927
|
} finally {
|
|
@@ -26857,14 +26929,14 @@ function Nb() {
|
|
|
26857
26929
|
}
|
|
26858
26930
|
}
|
|
26859
26931
|
}, [e]), ce = n(async (t, n, r) => {
|
|
26860
|
-
let i =
|
|
26932
|
+
let i = Pb(t), a = Pb(n);
|
|
26861
26933
|
if (!i || !a) {
|
|
26862
26934
|
e.setFieldsValue({ step_order: void 0 });
|
|
26863
26935
|
return;
|
|
26864
26936
|
}
|
|
26865
26937
|
M(!0);
|
|
26866
26938
|
try {
|
|
26867
|
-
e.setFieldsValue({ step_order:
|
|
26939
|
+
e.setFieldsValue({ step_order: Ib(r, i, a) });
|
|
26868
26940
|
} catch (e) {
|
|
26869
26941
|
console.error("Unable to load step order:", e), G.error("Unable to load step order.");
|
|
26870
26942
|
} finally {
|
|
@@ -26887,15 +26959,15 @@ function Nb() {
|
|
|
26887
26959
|
]);
|
|
26888
26960
|
let le = async (t) => {
|
|
26889
26961
|
let n = {
|
|
26890
|
-
module:
|
|
26891
|
-
flow:
|
|
26962
|
+
module: Pb(t.module),
|
|
26963
|
+
flow: Pb(t.flow),
|
|
26892
26964
|
step_order: Number(t.step_order),
|
|
26893
|
-
description:
|
|
26894
|
-
keyword:
|
|
26895
|
-
target:
|
|
26896
|
-
value:
|
|
26897
|
-
expected:
|
|
26898
|
-
tags: t.tags ?
|
|
26965
|
+
description: Pb(t.description),
|
|
26966
|
+
keyword: Pb(t.keyword),
|
|
26967
|
+
target: Pb(t.target),
|
|
26968
|
+
value: Pb(t.value),
|
|
26969
|
+
expected: Pb(t.expected),
|
|
26970
|
+
tags: t.tags ? Pb(t.tags) : Ob.tags,
|
|
26899
26971
|
active: Number(t.active)
|
|
26900
26972
|
};
|
|
26901
26973
|
N(!0);
|
|
@@ -26907,19 +26979,19 @@ function Nb() {
|
|
|
26907
26979
|
N(!1);
|
|
26908
26980
|
}
|
|
26909
26981
|
}, ue = (t, n) => {
|
|
26910
|
-
e.setFieldsValue({ [t]:
|
|
26982
|
+
e.setFieldsValue({ [t]: Pb(n) });
|
|
26911
26983
|
}, de = (t) => {
|
|
26912
26984
|
e.setFieldsValue({
|
|
26913
|
-
module:
|
|
26985
|
+
module: Pb(t),
|
|
26914
26986
|
flow: void 0,
|
|
26915
26987
|
step_order: void 0,
|
|
26916
26988
|
keyword: void 0,
|
|
26917
26989
|
description: void 0,
|
|
26918
26990
|
target: void 0,
|
|
26919
|
-
tags:
|
|
26991
|
+
tags: Ob.tags,
|
|
26920
26992
|
value: void 0,
|
|
26921
26993
|
expected: void 0
|
|
26922
|
-
}),
|
|
26994
|
+
}), Mb(e, [
|
|
26923
26995
|
"keyword",
|
|
26924
26996
|
"target",
|
|
26925
26997
|
"value",
|
|
@@ -26927,32 +26999,32 @@ function Nb() {
|
|
|
26927
26999
|
]);
|
|
26928
27000
|
}, fe = (t) => {
|
|
26929
27001
|
e.setFieldsValue({
|
|
26930
|
-
flow:
|
|
27002
|
+
flow: Pb(t),
|
|
26931
27003
|
step_order: void 0,
|
|
26932
27004
|
keyword: void 0,
|
|
26933
27005
|
target: void 0,
|
|
26934
27006
|
value: void 0,
|
|
26935
27007
|
expected: void 0
|
|
26936
|
-
}),
|
|
27008
|
+
}), Mb(e, [
|
|
26937
27009
|
"keyword",
|
|
26938
27010
|
"target",
|
|
26939
27011
|
"value",
|
|
26940
27012
|
"expected"
|
|
26941
27013
|
]);
|
|
26942
27014
|
}, pe = (t) => {
|
|
26943
|
-
let n =
|
|
27015
|
+
let n = jb(v, t);
|
|
26944
27016
|
e.setFieldsValue({
|
|
26945
|
-
keyword:
|
|
27017
|
+
keyword: Pb(t),
|
|
26946
27018
|
target: n.key ? e.getFieldValue("target") : void 0,
|
|
26947
27019
|
value: n.value ? e.getFieldValue("value") : void 0,
|
|
26948
27020
|
expected: n.expected ? e.getFieldValue("expected") : void 0
|
|
26949
|
-
}),
|
|
27021
|
+
}), Mb(e, [
|
|
26950
27022
|
"target",
|
|
26951
27023
|
"value",
|
|
26952
27024
|
"expected"
|
|
26953
27025
|
]);
|
|
26954
27026
|
}, me = (e) => {
|
|
26955
|
-
let n =
|
|
27027
|
+
let n = kb[e];
|
|
26956
27028
|
D({
|
|
26957
27029
|
open: !0,
|
|
26958
27030
|
typeKey: e
|
|
@@ -26967,7 +27039,7 @@ function Nb() {
|
|
|
26967
27039
|
})), t.resetFields();
|
|
26968
27040
|
}, ge = async () => {
|
|
26969
27041
|
try {
|
|
26970
|
-
let n =
|
|
27042
|
+
let n = Pb((await t.validateFields()).name), r = await Fm({
|
|
26971
27043
|
name: n,
|
|
26972
27044
|
type: L.dbName
|
|
26973
27045
|
});
|
|
@@ -26985,7 +27057,7 @@ function Nb() {
|
|
|
26985
27057
|
align: "middle",
|
|
26986
27058
|
justify: "space-between",
|
|
26987
27059
|
className: "breadcrumb-action-wrapper",
|
|
26988
|
-
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items:
|
|
27060
|
+
children: [/* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(qi, { items: Db }) }), /* @__PURE__ */ q(h, { children: /* @__PURE__ */ q(f, {
|
|
26989
27061
|
type: "link",
|
|
26990
27062
|
onClick: () => P("/lms-home"),
|
|
26991
27063
|
children: "View Table"
|
|
@@ -27000,7 +27072,7 @@ function Nb() {
|
|
|
27000
27072
|
children: /* @__PURE__ */ J(R, {
|
|
27001
27073
|
align: "center",
|
|
27002
27074
|
size: 10,
|
|
27003
|
-
children: [/* @__PURE__ */ q(pt, { className: "v1-outer-icon" }), /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(
|
|
27075
|
+
children: [/* @__PURE__ */ q(pt, { className: "v1-outer-icon" }), /* @__PURE__ */ q("div", { children: /* @__PURE__ */ q(Eb, {
|
|
27004
27076
|
strong: !0,
|
|
27005
27077
|
style: { fontSize: 16 },
|
|
27006
27078
|
children: "Add LMS Case"
|
|
@@ -27016,16 +27088,16 @@ function Nb() {
|
|
|
27016
27088
|
className: "v1-required-mark",
|
|
27017
27089
|
children: " *"
|
|
27018
27090
|
})] }),
|
|
27019
|
-
initialValues:
|
|
27091
|
+
initialValues: Ob,
|
|
27020
27092
|
onFinish: le,
|
|
27021
27093
|
autoComplete: "off",
|
|
27022
27094
|
children: [/* @__PURE__ */ q(p, {
|
|
27023
27095
|
className: "v1-card",
|
|
27024
|
-
title: /* @__PURE__ */ q(
|
|
27096
|
+
title: /* @__PURE__ */ q(Lb, {
|
|
27025
27097
|
icon: /* @__PURE__ */ q(Be, {}),
|
|
27026
27098
|
title: "LMS Case Details"
|
|
27027
27099
|
}),
|
|
27028
|
-
extra: /* @__PURE__ */ q(
|
|
27100
|
+
extra: /* @__PURE__ */ q(Eb, {
|
|
27029
27101
|
type: "secondary",
|
|
27030
27102
|
className: "v1-card-subtitle",
|
|
27031
27103
|
children: "Module, flow, step order and execution data"
|
|
@@ -27235,7 +27307,7 @@ function Nb() {
|
|
|
27235
27307
|
maxLength: 100,
|
|
27236
27308
|
placeholder: `Enter ${L.label.toLowerCase()} name`,
|
|
27237
27309
|
onBlur: (e) => {
|
|
27238
|
-
t.setFieldsValue({ name:
|
|
27310
|
+
t.setFieldsValue({ name: Pb(e.target.value) });
|
|
27239
27311
|
}
|
|
27240
27312
|
})
|
|
27241
27313
|
}), /* @__PURE__ */ q(C.Item, {
|
|
@@ -27252,17 +27324,17 @@ function Nb() {
|
|
|
27252
27324
|
}
|
|
27253
27325
|
//#endregion
|
|
27254
27326
|
//#region src/pages/TestingPage/lmsHomePage.jsx
|
|
27255
|
-
var
|
|
27327
|
+
var zb = [{
|
|
27256
27328
|
label: "Home",
|
|
27257
27329
|
href: "/"
|
|
27258
27330
|
}, {
|
|
27259
27331
|
label: "LMS Cases",
|
|
27260
27332
|
href: "/lms-cases"
|
|
27261
27333
|
}];
|
|
27262
|
-
function
|
|
27334
|
+
function Bb() {
|
|
27263
27335
|
return /* @__PURE__ */ J("main", {
|
|
27264
27336
|
className: "jobs-list-page",
|
|
27265
|
-
children: [/* @__PURE__ */ q(qi, { items:
|
|
27337
|
+
children: [/* @__PURE__ */ q(qi, { items: zb }), /* @__PURE__ */ q(zp, {
|
|
27266
27338
|
moduleName: "lms-flows",
|
|
27267
27339
|
rowKey: "id"
|
|
27268
27340
|
})]
|
|
@@ -27270,8 +27342,8 @@ function Fb() {
|
|
|
27270
27342
|
}
|
|
27271
27343
|
//#endregion
|
|
27272
27344
|
//#region src/index.js
|
|
27273
|
-
var
|
|
27345
|
+
var Vb = ih(Dy), Hb = ih(ky), Ub = ih(Ay), Wb = ih(My), Gb = ih(qy), Kb = ih(ab), qb = ih(mb), Jb = ih(_b), Yb = ih(bb), Xb = ih(Cb), Zb = ih(Tb), Qb = ih(Rb), $b = ih(Bb);
|
|
27274
27346
|
//#endregion
|
|
27275
|
-
export { X as AUTH_URL, Sa as AddFormV1,
|
|
27347
|
+
export { X as AUTH_URL, Sa as AddFormV1, Vb as AdminPage, Ca as AppAlert, wa as AppButton, Om as AppShell, Ta as AssigneeAvatars, Em as AuthGuard, qi as Breadcrumb, Gb as BulkUploadPage, sn as CANDIDATES_URL, Zn as CalendarCard, Ea as CustomPagination, La as DescriptionBlock, Ed as DetailHeaderCard, Md as DetailViewPage, Du as DetailViewV1, ru as DocumentViewer, Hr as DynamicCards, eg as DynamicPopup, Kg as DynamicPopupRoute, ju as DynamicTabs, nf as EditFormV1, mm as Header, on as JOBS_URL, Ub as JobModuleDetailPage, Hb as JobsListPage, zp as ListView, $b as LmsHomePage, Qb as LmsTestForm, km as Login, sh as MailPopup, Jb as ManageModules, Yb as ManageSubmodules, Wg as POPUP_CONFIGS, al as ParamCardView, Qc as ParamListView, bh as PreviewPopup, rh as ProjectSelect, an as SUBMISSIONS_URL, Sm as Sidebar, Wb as StickyNotesFullPage, Gs as StylishDynamicTabs, Wp as TemplateEditor, Kb as TestForm, Zb as TestingHomePage, Gr as TipTapEditor, t_ as UserForm, Ef as ViewSummaryWidget, Eh as WizardPopup, Xb as ZinnextTableView, qb 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, af as useDropdownFields, Df as useDropdownValues, Gp as useEditForm, of as useFieldConfig, sf as useFilterFields, Va as useMenuPermission, ih as withAuthGuard };
|
|
27276
27348
|
|
|
27277
27349
|
//# sourceMappingURL=index.js.map
|