@realtek/core-theme 0.0.154 → 0.0.155

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.js CHANGED
@@ -38136,7 +38136,7 @@ var CO = { deleteItems: async (e, t) => {
38136
38136
  optionsKey: "candidateOptions",
38137
38137
  searchFetchKey: "quickSubmitCandidates",
38138
38138
  labelTemplate: "{applicantRefrenceId} - {firstName} {lastName} - ({lastdate})",
38139
- valueKey: "_id"
38139
+ valueKey: "applicantId"
38140
38140
  }]
38141
38141
  }, TO = {
38142
38142
  searchOptions: async (e, t, n) => {
@@ -38161,21 +38161,19 @@ var CO = { deleteItems: async (e, t) => {
38161
38161
  }
38162
38162
  return [];
38163
38163
  },
38164
- submit: async (e, t) => {
38165
- let { navigate: n, selectedRecords: r = [], selectedIds: i = [], moduleName: a, isFromSubmission: o = !1 } = t, s = r[0] ?? {}, c, l;
38166
- t.jobId ? (c = t.jobId, l = s.id ?? s._id ?? i[0] ?? "") : a === "candidate" ? (c = e.jobId ?? "", l = s.id ?? s._id ?? i[0] ?? "") : (c = s.jobId ?? s.id ?? s._id ?? i[0] ?? "", l = e.candidate ?? "");
38167
- let u = new URLSearchParams();
38168
- if (l && u.set("candidateId", l), u.set("isFromSubmission", String(!!o)), o) {
38169
- let e = t.submissionId ?? s.submissionId ?? s._id ?? s.id ?? i[0] ?? "";
38170
- e && u.set("submissionId", e);
38171
- } else if (c && l) {
38164
+ submit: async (e, t, n) => {
38165
+ let { navigate: r, selectedRecords: i = [], selectedIds: a = [], moduleName: o, isFromSubmission: s = !1 } = t, c = i[0] ?? {}, l, u;
38166
+ t.jobId ? (l = t.jobId, u = c.id ?? c._id ?? a[0] ?? "") : o === "candidate" ? (l = e.jobId ?? "", u = c.id ?? c._id ?? a[0] ?? "") : (l = c.jobId ?? c.id ?? c._id ?? a[0] ?? "", u = e.candidate ?? "");
38167
+ let d = n?.dynamicOptions?.candidate?.find((e) => e?._raw?.applicantId === u), f = s || !!d?._raw?.isFromSubmission, p = t.submissionId ?? d?._raw?.submissionId ?? c.submissionId ?? "", m = new URLSearchParams();
38168
+ if (u && m.set("candidateId", u), m.set("isFromSubmission", String(!!f)), f) p && m.set("submissionId", p);
38169
+ else if (l && u) {
38172
38170
  let { exists: e, submissionId: t } = await xO({
38173
- jobId: c,
38174
- applicantId: l
38171
+ jobId: l,
38172
+ applicantId: u
38175
38173
  });
38176
38174
  if (e) throw Error(`This candidate is already submitted for this job${t ? ` (submission ${t})` : ""}.`);
38177
38175
  }
38178
- return n(`/submission-create/${c}?${u.toString()}`), { navigated: !0 };
38176
+ return r(`/submission-create/${l}?${m.toString()}`), { navigated: !0 };
38179
38177
  }
38180
38178
  }, EO = {
38181
38179
  title: "Add Notes & Share",