@burdenoff/microfe-support 2026.819.2 → 2026.819.3
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/generated/global-types.d.ts +217 -1
- package/dist/generated/global-types.js +16 -14
- package/dist/generated/global-types.js.map +1 -1
- package/dist/support/components/careers/BulkCandidateDialogs.d.ts +2 -3
- package/dist/support/components/careers/BulkCandidateDialogs.js +178 -188
- package/dist/support/components/careers/BulkCandidateDialogs.js.map +1 -1
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +383 -339
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/utils/bulkCandidateOperations.js +31 -65
- package/dist/support/utils/bulkCandidateOperations.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,11 +12,10 @@ interface SharedDialogProps {
|
|
|
12
12
|
jobPostingId: string;
|
|
13
13
|
previewLoading: boolean;
|
|
14
14
|
previewError: string | null;
|
|
15
|
-
refreshTargets: (applicationIds: ReadonlyArray<string>) => Promise<BulkCandidateTarget[]>;
|
|
16
15
|
}
|
|
17
|
-
export declare function BulkCandidateSendDialog({ mode, open, onClose, onOpenAddRound, targets, selection, jobPostingId, previewLoading, previewError,
|
|
16
|
+
export declare function BulkCandidateSendDialog({ mode, open, onClose, onOpenAddRound, targets, selection, jobPostingId, previewLoading, previewError, }: SharedDialogProps & {
|
|
18
17
|
mode: BulkCandidateDialogMode;
|
|
19
18
|
onOpenAddRound: () => void;
|
|
20
19
|
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare function AddSelectedToRoundDialog({ open, onClose, targets, selection, jobPostingId, previewLoading, previewError,
|
|
20
|
+
export declare function AddSelectedToRoundDialog({ open, onClose, targets, selection, jobPostingId, previewLoading, previewError, }: SharedDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
22
21
|
export {};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { Button as e, Checkbox as t, Dialog as n, DialogContent as r, DialogDescription as ee, DialogFooter as i, DialogHeader as te, DialogTitle as ne, Label as a, Select as re, SelectContent as ie, SelectItem as ae, SelectTrigger as oe, SelectValue as se, Textarea as o } from "../ui.js";
|
|
2
|
-
import { BulkEnsureInterviewRoundsDocument as s, BulkRandomizeAndSendAssignmentDocument as
|
|
3
|
-
import { InterviewRoundType as
|
|
4
|
-
import { nativeNotify as
|
|
5
|
-
import {
|
|
6
|
-
import { BulkCandidateActionGuidance as
|
|
7
|
-
import { BulkOperationProgress as
|
|
8
|
-
import { useEffect as
|
|
9
|
-
import { AlertCircle as
|
|
10
|
-
import { graphqlFetch as
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { useApolloClient as
|
|
13
|
-
import { print as
|
|
2
|
+
import { BulkEnsureInterviewRoundsDocument as s, BulkRandomizeAndSendAssignmentDocument as c, BulkSendRoundMessageDocument as l, useGetJobPostingQuery as ce } from "../../../generated/global-operations.js";
|
|
3
|
+
import { InterviewRoundType as u } from "../../../generated/global-types.js";
|
|
4
|
+
import { nativeNotify as le } from "../../../utils/nativeBridge.js";
|
|
5
|
+
import { aggregateCandidateEmailResult as d, aggregateEnsureRoundResult as f, assertCompleteCandidateEmailChunkResult as p, assertCompleteEnsureRoundChunkResult as ue, createEmptyCandidateEmailAggregate as m, createEmptyEnsureRoundAggregate as h, executeSequentialCandidateChunks as de, getBulkOperationNotificationSeverity as fe, getCandidateSelectionCount as pe, getSelectedCandidateIds as g, hasCandidateEmailType as _, resolveExactCandidateRounds as v } from "../../utils/bulkCandidateOperations.js";
|
|
6
|
+
import { BulkCandidateActionGuidance as y } from "./BulkCandidateActionGuidance.js";
|
|
7
|
+
import { BulkOperationProgress as me, CandidateEmailResultDetails as he, EnsureRoundResultDetails as b, StoppedBulkOperationNotice as ge } from "./BulkOperationFeedback.js";
|
|
8
|
+
import { useEffect as _e, useMemo as ve, useState as x } from "react";
|
|
9
|
+
import { AlertCircle as ye, Loader2 as S, Send as C, UserPlus as be } from "lucide-react";
|
|
10
|
+
import { graphqlFetch as w } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
11
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
12
|
+
import { useApolloClient as xe } from "@apollo/client/react";
|
|
13
|
+
import { print as D } from "graphql";
|
|
14
14
|
//#region src/support/components/careers/BulkCandidateDialogs.tsx
|
|
15
|
-
function
|
|
16
|
-
return e.isAssignmentRound || e.roundType ===
|
|
15
|
+
function O(e) {
|
|
16
|
+
return e.isAssignmentRound || e.roundType === u.TakeHome;
|
|
17
17
|
}
|
|
18
|
-
var
|
|
18
|
+
var Se = {
|
|
19
19
|
message: "ROUND_MESSAGE",
|
|
20
20
|
assignment: "ASSIGNMENT"
|
|
21
21
|
};
|
|
22
|
-
function
|
|
22
|
+
function Ce(e) {
|
|
23
23
|
return e instanceof Error ? e.message : "The request failed without an error message.";
|
|
24
24
|
}
|
|
25
25
|
async function k(e, t, n) {
|
|
26
|
-
let r = await
|
|
26
|
+
let r = await w({
|
|
27
27
|
gateway: "global",
|
|
28
|
-
query:
|
|
28
|
+
query: D(e),
|
|
29
29
|
variables: t,
|
|
30
30
|
operationName: n,
|
|
31
31
|
skipAuthRetry: !0
|
|
@@ -34,47 +34,39 @@ async function k(e, t, n) {
|
|
|
34
34
|
if (!r.data) throw Error(`${n} returned no data.`);
|
|
35
35
|
return r.data;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function we(e, t) {
|
|
38
38
|
let n = g(t);
|
|
39
39
|
return e.filter((e) => n.has(e.id));
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
throw new u(`Candidate scope revalidation failed before this chunk: ${Ee(e)}`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
function A({ mode: s, open: l, onClose: u, onOpenAddRound: fe, targets: d, selection: p, jobPostingId: h, previewLoading: g, previewError: ye, refreshTargets: C }) {
|
|
49
|
-
let E = Te(), [A, j] = b(""), [M, N] = b(""), [P, F] = b(!1), [I, L] = b(null), [ke, R] = b(m), [z, B] = b(null), [V, H] = b(!1), [U, W] = b(!1), { data: Ae, loading: G, error: je } = le({
|
|
50
|
-
variables: { id: h },
|
|
51
|
-
skip: !l || !h,
|
|
41
|
+
function A({ mode: s, open: u, onClose: f, onOpenAddRound: ue, targets: h, selection: g, jobPostingId: b, previewLoading: w, previewError: D }) {
|
|
42
|
+
let A = xe(), [j, M] = x(""), [N, P] = x(""), [F, I] = x(!1), [L, R] = x(null), [Te, z] = x(m), [B, V] = x(null), [H, U] = x(!1), [W, G] = x(!1), { data: Ee, loading: K, error: De } = ce({
|
|
43
|
+
variables: { id: b },
|
|
44
|
+
skip: !u || !b,
|
|
52
45
|
fetchPolicy: "network-only"
|
|
53
46
|
});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
let
|
|
47
|
+
_e(() => {
|
|
48
|
+
u && (M(""), P(""), I(!1), R(null), z(m()), V(null), U(!1), G(!1));
|
|
49
|
+
}, [u, s]);
|
|
50
|
+
let q = ve(() => we(h, g), [g, h]), Oe = pe(g), J = q.length === Oe, ke = Ee?.jobPosting?.rounds ?? [], Ae = ke.filter((e) => s !== "assignment" || O(e)), Y = ke.find((e) => e.id === j), X = Y ? v(q, Y.id) : {
|
|
58
51
|
pairs: [],
|
|
59
52
|
unresolved: []
|
|
60
|
-
},
|
|
61
|
-
!Q &&
|
|
62
|
-
let
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
let e = await
|
|
66
|
-
items:
|
|
53
|
+
}, je = X.unresolved.filter((e) => e.reason === "MISSING").length, Me = X.unresolved.filter((e) => e.reason === "AMBIGUOUS").length, Ne = Se[s], Pe = X.pairs.filter(({ round: e }) => _(e, Ne)).length, Z = X.pairs.filter(({ round: e }) => F || !_(e, Ne)).length, Fe = q.some((e) => e.jobPostingId !== b), Q = D;
|
|
54
|
+
!Q && De ? Q = "Could not load the posting rounds. Nothing will be sent." : !Q && !w && !J ? Q = "Some selected candidate details are unavailable. Refresh the selection before sending." : !Q && Fe ? Q = "Some selected candidates do not belong to the filtered posting." : !Q && j && !K && !Y ? Q = "The selected round is no longer available. Choose another round." : !Q && Me > 0 && (Q = `${Me} selected candidate${Me === 1 ? " has" : "s have"} multiple concrete rounds for this configuration. Nothing will be sent until the data is corrected.`);
|
|
55
|
+
let Ie = async () => {
|
|
56
|
+
if (W || H || w || K || Q || !J || !Y || X.pairs.length === 0 || Z === 0 || s === "message" && !N.trim()) return;
|
|
57
|
+
G(!0), U(!0), V(null), z(m());
|
|
58
|
+
let e = await de({
|
|
59
|
+
items: X.pairs.map(({ applicationId: e, roundId: t }) => ({
|
|
67
60
|
applicationId: e,
|
|
68
61
|
roundId: t
|
|
69
62
|
})),
|
|
70
63
|
initialAggregate: m(),
|
|
71
|
-
onProgress:
|
|
64
|
+
onProgress: R,
|
|
72
65
|
executeChunk: async (e) => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
let t = (await k(ce, { input: {
|
|
66
|
+
if (s === "assignment") {
|
|
67
|
+
let t = (await k(c, { input: {
|
|
76
68
|
items: [...e],
|
|
77
|
-
force:
|
|
69
|
+
force: F
|
|
78
70
|
} }, "BulkRandomizeAndSendAssignment")).bulkRandomizeAndSendAssignment;
|
|
79
71
|
if (!t) throw Error("The assignment request returned no result.");
|
|
80
72
|
let n = {
|
|
@@ -94,105 +86,105 @@ function A({ mode: s, open: l, onClose: u, onOpenAddRound: fe, targets: d, selec
|
|
|
94
86
|
message: e.message
|
|
95
87
|
}))
|
|
96
88
|
};
|
|
97
|
-
return
|
|
89
|
+
return p(e, n), n;
|
|
98
90
|
}
|
|
99
|
-
let
|
|
91
|
+
let t = (await k(l, { input: {
|
|
100
92
|
items: [...e],
|
|
101
|
-
message:
|
|
102
|
-
force:
|
|
93
|
+
message: N.trim(),
|
|
94
|
+
force: F
|
|
103
95
|
} }, "BulkSendRoundMessage")).bulkSendRoundMessage;
|
|
104
|
-
if (!
|
|
105
|
-
let
|
|
106
|
-
succeeded:
|
|
96
|
+
if (!t) throw Error("The message request returned no result.");
|
|
97
|
+
let n = {
|
|
98
|
+
succeeded: t.succeeded.map((e) => ({
|
|
107
99
|
applicationId: e.applicationId,
|
|
108
100
|
roundId: e.id
|
|
109
101
|
})),
|
|
110
|
-
skipped:
|
|
102
|
+
skipped: t.skipped.map((e) => ({
|
|
111
103
|
applicationId: e.applicationId,
|
|
112
104
|
roundId: e.roundId,
|
|
113
105
|
reason: e.reason,
|
|
114
106
|
message: e.message
|
|
115
107
|
})),
|
|
116
|
-
failed:
|
|
108
|
+
failed: t.failed.map((e) => ({
|
|
117
109
|
applicationId: e.applicationId,
|
|
118
110
|
roundId: e.roundId,
|
|
119
111
|
message: e.message
|
|
120
112
|
}))
|
|
121
113
|
};
|
|
122
|
-
return
|
|
114
|
+
return p(e, n), n;
|
|
123
115
|
},
|
|
124
|
-
mergeResult:
|
|
116
|
+
mergeResult: d
|
|
125
117
|
});
|
|
126
|
-
|
|
118
|
+
z(e.aggregate), e.error && V({
|
|
127
119
|
knownCompleted: e.processedItems.length,
|
|
128
120
|
ambiguous: e.ambiguousItems.length,
|
|
129
121
|
notStarted: e.notStartedItems.length,
|
|
130
|
-
message:
|
|
131
|
-
}),
|
|
122
|
+
message: Ce(e.error)
|
|
123
|
+
}), le(fe({
|
|
132
124
|
succeeded: e.aggregate.succeeded.length,
|
|
133
125
|
skipped: e.aggregate.skipped.length,
|
|
134
126
|
failed: e.aggregate.failed.length,
|
|
135
127
|
ambiguous: !!e.error
|
|
136
|
-
})),
|
|
137
|
-
}, $ =
|
|
138
|
-
return /* @__PURE__ */
|
|
139
|
-
open:
|
|
128
|
+
})), G(!1), A.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
|
|
129
|
+
}, $ = w || K;
|
|
130
|
+
return /* @__PURE__ */ T(n, {
|
|
131
|
+
open: u,
|
|
140
132
|
onOpenChange: (e) => {
|
|
141
|
-
!e && !
|
|
133
|
+
!e && !W && f();
|
|
142
134
|
},
|
|
143
|
-
children: /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ E(r, {
|
|
144
136
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
145
137
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ E(te, { children: [/* @__PURE__ */ T(ne, { children: s === "assignment" ? "Assign & Email Random Take-Home" : "Send Message" }), /* @__PURE__ */ T(ee, { children: "Choose one configured round for the candidates in the filtered posting." })] }),
|
|
139
|
+
/* @__PURE__ */ T(y, {
|
|
148
140
|
action: s,
|
|
149
|
-
unresolvedCount:
|
|
141
|
+
unresolvedCount: je
|
|
150
142
|
}),
|
|
151
|
-
|
|
143
|
+
H ? /* @__PURE__ */ E("div", {
|
|
152
144
|
className: "space-y-4",
|
|
153
145
|
children: [
|
|
154
|
-
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
onClick:
|
|
159
|
-
disabled:
|
|
146
|
+
L ? /* @__PURE__ */ T(me, { progress: L }) : null,
|
|
147
|
+
/* @__PURE__ */ T(he, { result: Te }),
|
|
148
|
+
B ? /* @__PURE__ */ T(ge, { details: B }) : null,
|
|
149
|
+
/* @__PURE__ */ T(i, { children: /* @__PURE__ */ T(e, {
|
|
150
|
+
onClick: f,
|
|
151
|
+
disabled: W,
|
|
160
152
|
children: "Done"
|
|
161
153
|
}) })
|
|
162
154
|
]
|
|
163
|
-
}) : /* @__PURE__ */
|
|
155
|
+
}) : /* @__PURE__ */ E("div", {
|
|
164
156
|
className: "space-y-4",
|
|
165
157
|
children: [
|
|
166
|
-
$ ? /* @__PURE__ */
|
|
158
|
+
$ ? /* @__PURE__ */ E("div", {
|
|
167
159
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ T(S, {
|
|
169
161
|
size: 14,
|
|
170
162
|
className: "animate-spin"
|
|
171
163
|
}), "Refreshing candidates and configured rounds…"]
|
|
172
164
|
}) : null,
|
|
173
|
-
Q ? /* @__PURE__ */
|
|
165
|
+
Q ? /* @__PURE__ */ E("div", {
|
|
174
166
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
175
167
|
role: "alert",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ T(ye, {
|
|
177
169
|
size: 14,
|
|
178
170
|
className: "mt-0.5 shrink-0"
|
|
179
|
-
}), /* @__PURE__ */
|
|
171
|
+
}), /* @__PURE__ */ T("span", { children: Q })]
|
|
180
172
|
}) : null,
|
|
181
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ E("div", {
|
|
182
174
|
className: "space-y-1.5",
|
|
183
175
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ T(a, {
|
|
185
177
|
htmlFor: "bulk-round-config",
|
|
186
178
|
children: "Target round"
|
|
187
179
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
value:
|
|
190
|
-
onValueChange:
|
|
180
|
+
/* @__PURE__ */ E(re, {
|
|
181
|
+
value: j,
|
|
182
|
+
onValueChange: M,
|
|
191
183
|
disabled: $ || !!Q,
|
|
192
|
-
children: [/* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ T(oe, {
|
|
193
185
|
id: "bulk-round-config",
|
|
194
|
-
children: /* @__PURE__ */
|
|
195
|
-
}), /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ T(se, { placeholder: "Select a round" })
|
|
187
|
+
}), /* @__PURE__ */ T(ie, { children: Ae.map((e) => /* @__PURE__ */ E(ae, {
|
|
196
188
|
value: e.id,
|
|
197
189
|
children: [
|
|
198
190
|
"Round ",
|
|
@@ -202,35 +194,35 @@ function A({ mode: s, open: l, onClose: u, onOpenAddRound: fe, targets: d, selec
|
|
|
202
194
|
]
|
|
203
195
|
}, e.id)) })]
|
|
204
196
|
}),
|
|
205
|
-
|
|
197
|
+
Ae.length === 0 && !$ && !Q ? /* @__PURE__ */ T("p", {
|
|
206
198
|
className: "text-xs text-status-warning-text",
|
|
207
199
|
children: s === "assignment" ? "This posting has no configured assignment round." : "This posting has no configured interview rounds."
|
|
208
200
|
}) : null
|
|
209
201
|
]
|
|
210
202
|
}),
|
|
211
|
-
s === "message" ? /* @__PURE__ */
|
|
203
|
+
s === "message" ? /* @__PURE__ */ E("div", {
|
|
212
204
|
className: "space-y-1.5",
|
|
213
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ T(a, {
|
|
214
206
|
htmlFor: "bulk-message",
|
|
215
207
|
children: "Free-text message"
|
|
216
|
-
}), /* @__PURE__ */
|
|
208
|
+
}), /* @__PURE__ */ T(o, {
|
|
217
209
|
id: "bulk-message",
|
|
218
|
-
value:
|
|
219
|
-
onChange: (e) =>
|
|
210
|
+
value: N,
|
|
211
|
+
onChange: (e) => P(e.target.value),
|
|
220
212
|
placeholder: "Write the message sent to each candidate",
|
|
221
213
|
rows: 5
|
|
222
214
|
})]
|
|
223
215
|
}) : null,
|
|
224
|
-
|
|
216
|
+
j && !$ && !Q ? /* @__PURE__ */ E("div", {
|
|
225
217
|
className: "space-y-2 rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-xs text-text-secondary",
|
|
226
218
|
children: [
|
|
227
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ T("p", {
|
|
228
220
|
className: "font-medium text-text-primary",
|
|
229
221
|
children: "Preview"
|
|
230
222
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ E("p", { children: [
|
|
232
224
|
"Will send to ",
|
|
233
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ T("span", {
|
|
234
226
|
className: "font-semibold",
|
|
235
227
|
children: Z
|
|
236
228
|
}),
|
|
@@ -238,41 +230,41 @@ function A({ mode: s, open: l, onClose: u, onOpenAddRound: fe, targets: d, selec
|
|
|
238
230
|
Z === 1 ? "" : "s",
|
|
239
231
|
"."
|
|
240
232
|
] }),
|
|
241
|
-
|
|
242
|
-
|
|
233
|
+
Pe > 0 ? /* @__PURE__ */ E("p", { children: [
|
|
234
|
+
Pe,
|
|
243
235
|
" already received this email type",
|
|
244
236
|
" ",
|
|
245
|
-
|
|
237
|
+
F ? "(force will send again)" : "(the backend will skip them)",
|
|
246
238
|
"."
|
|
247
239
|
] }) : null,
|
|
248
|
-
|
|
240
|
+
je > 0 ? /* @__PURE__ */ E(e, {
|
|
249
241
|
type: "button",
|
|
250
242
|
size: "sm",
|
|
251
243
|
variant: "outline",
|
|
252
|
-
onClick:
|
|
253
|
-
children: [/* @__PURE__ */
|
|
244
|
+
onClick: ue,
|
|
245
|
+
children: [/* @__PURE__ */ T(be, { size: 14 }), "Add Selected to Round"]
|
|
254
246
|
}) : null,
|
|
255
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ E("label", {
|
|
256
248
|
className: "flex cursor-pointer items-start gap-2 pt-1",
|
|
257
|
-
children: [/* @__PURE__ */
|
|
258
|
-
checked:
|
|
259
|
-
onCheckedChange: (e) =>
|
|
260
|
-
}), /* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ T(t, {
|
|
250
|
+
checked: F,
|
|
251
|
+
onCheckedChange: (e) => I(e === !0)
|
|
252
|
+
}), /* @__PURE__ */ T("span", { children: "Force resend to candidates with a prior email. Force sends are non-idempotent and are never retried automatically." })]
|
|
261
253
|
})
|
|
262
254
|
]
|
|
263
255
|
}) : null,
|
|
264
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ E(i, { children: [/* @__PURE__ */ T(e, {
|
|
265
257
|
variant: "outline",
|
|
266
|
-
onClick:
|
|
267
|
-
disabled:
|
|
258
|
+
onClick: f,
|
|
259
|
+
disabled: W,
|
|
268
260
|
children: "Cancel"
|
|
269
|
-
}), /* @__PURE__ */
|
|
270
|
-
onClick: () => void
|
|
271
|
-
disabled:
|
|
272
|
-
children: [
|
|
261
|
+
}), /* @__PURE__ */ E(e, {
|
|
262
|
+
onClick: () => void Ie(),
|
|
263
|
+
disabled: W || $ || !!Q || !J || !j || X.pairs.length === 0 || Z === 0 || s === "message" && !N.trim(),
|
|
264
|
+
children: [W ? /* @__PURE__ */ T(S, {
|
|
273
265
|
size: 16,
|
|
274
266
|
className: "mr-2 animate-spin"
|
|
275
|
-
}) : /* @__PURE__ */
|
|
267
|
+
}) : /* @__PURE__ */ T(C, { size: 16 }), W ? "Sending…" : "Send"]
|
|
276
268
|
})] })
|
|
277
269
|
]
|
|
278
270
|
})
|
|
@@ -280,122 +272,120 @@ function A({ mode: s, open: l, onClose: u, onOpenAddRound: fe, targets: d, selec
|
|
|
280
272
|
})
|
|
281
273
|
});
|
|
282
274
|
}
|
|
283
|
-
function j({ open: t, onClose: o, targets:
|
|
284
|
-
let
|
|
285
|
-
variables: { id:
|
|
286
|
-
skip: !t || !
|
|
275
|
+
function j({ open: t, onClose: o, targets: c, selection: l, jobPostingId: u, previewLoading: d, previewError: p }) {
|
|
276
|
+
let m = xe(), [g, _] = x(""), [v, y] = x(null), [he, C] = x(h), [w, D] = x(null), [O, Se] = x(!1), [A, j] = x(!1), { data: M, loading: N, error: P } = ce({
|
|
277
|
+
variables: { id: u },
|
|
278
|
+
skip: !t || !u,
|
|
287
279
|
fetchPolicy: "network-only"
|
|
288
280
|
});
|
|
289
|
-
|
|
290
|
-
t && (
|
|
281
|
+
_e(() => {
|
|
282
|
+
t && (_(""), y(null), C(h()), D(null), Se(!1), j(!1));
|
|
291
283
|
}, [t]);
|
|
292
|
-
let
|
|
293
|
-
!
|
|
294
|
-
let
|
|
295
|
-
if (
|
|
296
|
-
|
|
297
|
-
let e = await
|
|
298
|
-
items:
|
|
284
|
+
let F = ve(() => we(c, l), [l, c]), I = pe(l), L = F.length === I, R = F.map((e) => e.id), Te = F.some((e) => e.jobPostingId !== u), z = M?.jobPosting?.rounds ?? [], B = z.find((e) => e.id === g), V = p;
|
|
285
|
+
!V && P ? V = "Could not load the posting rounds. Nothing will be changed." : !V && !d && !L ? V = "Some selected candidate details are unavailable. Refresh the selection before adding rounds." : !V && Te ? V = "Some selected candidates do not belong to the filtered posting." : !V && g && !N && !B && (V = "The selected round is no longer available. Choose another round.");
|
|
286
|
+
let H = async () => {
|
|
287
|
+
if (A || O || d || N || V || !L || !B || R.length === 0) return;
|
|
288
|
+
j(!0), Se(!0), D(null), C(h());
|
|
289
|
+
let e = await de({
|
|
290
|
+
items: R,
|
|
299
291
|
initialAggregate: h(),
|
|
300
|
-
onProgress:
|
|
292
|
+
onProgress: y,
|
|
301
293
|
executeChunk: async (e) => {
|
|
302
|
-
let t = await
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
jobPostingId: l,
|
|
306
|
-
roundConfigId: z.id,
|
|
294
|
+
let t = (await k(s, { input: {
|
|
295
|
+
jobPostingId: u,
|
|
296
|
+
roundConfigId: B.id,
|
|
307
297
|
applicationIds: [...e]
|
|
308
298
|
} }, "BulkEnsureInterviewRounds")).bulkEnsureInterviewRounds;
|
|
309
|
-
if (!
|
|
310
|
-
let
|
|
311
|
-
created:
|
|
299
|
+
if (!t) throw Error("The add-to-round request returned no result.");
|
|
300
|
+
let n = {
|
|
301
|
+
created: t.created.map((e) => ({
|
|
312
302
|
id: e.round.id,
|
|
313
303
|
applicationId: e.applicationId
|
|
314
304
|
})),
|
|
315
|
-
alreadyPresent:
|
|
305
|
+
alreadyPresent: t.alreadyPresent.map((e) => ({
|
|
316
306
|
id: e.round.id,
|
|
317
307
|
applicationId: e.applicationId
|
|
318
308
|
})),
|
|
319
|
-
failed:
|
|
309
|
+
failed: t.failed.map((e) => ({
|
|
320
310
|
applicationId: e.applicationId,
|
|
321
311
|
code: e.code,
|
|
322
312
|
message: e.message
|
|
323
313
|
}))
|
|
324
314
|
};
|
|
325
|
-
return
|
|
315
|
+
return ue(e, n), n;
|
|
326
316
|
},
|
|
327
|
-
mergeResult:
|
|
317
|
+
mergeResult: f
|
|
328
318
|
});
|
|
329
|
-
|
|
319
|
+
C(e.aggregate), e.error && D({
|
|
330
320
|
knownCompleted: e.processedItems.length,
|
|
331
321
|
ambiguous: e.ambiguousItems.length,
|
|
332
322
|
notStarted: e.notStartedItems.length,
|
|
333
|
-
message:
|
|
334
|
-
}),
|
|
323
|
+
message: Ce(e.error)
|
|
324
|
+
}), le(fe({
|
|
335
325
|
succeeded: e.aggregate.created.length + e.aggregate.alreadyPresent.length,
|
|
336
326
|
skipped: 0,
|
|
337
327
|
failed: e.aggregate.failed.length,
|
|
338
328
|
ambiguous: !!e.error
|
|
339
|
-
})),
|
|
340
|
-
},
|
|
341
|
-
return /* @__PURE__ */
|
|
329
|
+
})), j(!1), m.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
|
|
330
|
+
}, U = d || N;
|
|
331
|
+
return /* @__PURE__ */ T(n, {
|
|
342
332
|
open: t,
|
|
343
333
|
onOpenChange: (e) => {
|
|
344
|
-
!e && !
|
|
334
|
+
!e && !A && o();
|
|
345
335
|
},
|
|
346
|
-
children: /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ E(r, {
|
|
347
337
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
348
338
|
children: [
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ E(te, { children: [/* @__PURE__ */ T(ne, { children: "Add Selected to Round" }), /* @__PURE__ */ T(ee, { children: "Add every selected candidate in this posting to one configured interview round." })] }),
|
|
340
|
+
/* @__PURE__ */ T("div", {
|
|
351
341
|
className: "rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
|
|
352
342
|
children: "Candidates without this concrete round are added with status Scheduled. Existing target rounds are left unchanged, and all prior round history and application status remain unchanged."
|
|
353
343
|
}),
|
|
354
|
-
|
|
344
|
+
O ? /* @__PURE__ */ E("div", {
|
|
355
345
|
className: "space-y-4",
|
|
356
346
|
children: [
|
|
357
|
-
|
|
358
|
-
/* @__PURE__ */
|
|
359
|
-
|
|
360
|
-
/* @__PURE__ */
|
|
347
|
+
v ? /* @__PURE__ */ T(me, { progress: v }) : null,
|
|
348
|
+
/* @__PURE__ */ T(b, { result: he }),
|
|
349
|
+
w ? /* @__PURE__ */ T(ge, { details: w }) : null,
|
|
350
|
+
/* @__PURE__ */ T(i, { children: /* @__PURE__ */ T(e, {
|
|
361
351
|
onClick: o,
|
|
362
|
-
disabled:
|
|
352
|
+
disabled: A,
|
|
363
353
|
children: "Done"
|
|
364
354
|
}) })
|
|
365
355
|
]
|
|
366
|
-
}) : /* @__PURE__ */
|
|
356
|
+
}) : /* @__PURE__ */ E("div", {
|
|
367
357
|
className: "space-y-4",
|
|
368
358
|
children: [
|
|
369
|
-
|
|
359
|
+
U ? /* @__PURE__ */ E("div", {
|
|
370
360
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ T(S, {
|
|
372
362
|
size: 14,
|
|
373
363
|
className: "animate-spin"
|
|
374
364
|
}), "Refreshing candidates and configured rounds…"]
|
|
375
365
|
}) : null,
|
|
376
|
-
|
|
366
|
+
V ? /* @__PURE__ */ E("div", {
|
|
377
367
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
378
368
|
role: "alert",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ T(ye, {
|
|
380
370
|
size: 14,
|
|
381
371
|
className: "mt-0.5 shrink-0"
|
|
382
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ T("span", { children: V })]
|
|
383
373
|
}) : null,
|
|
384
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ E("div", {
|
|
385
375
|
className: "space-y-1.5",
|
|
386
376
|
children: [
|
|
387
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ T(a, {
|
|
388
378
|
htmlFor: "ensure-round-config",
|
|
389
379
|
children: "Interview round"
|
|
390
380
|
}),
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
value:
|
|
393
|
-
onValueChange:
|
|
394
|
-
disabled:
|
|
395
|
-
children: [/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ E(re, {
|
|
382
|
+
value: g,
|
|
383
|
+
onValueChange: _,
|
|
384
|
+
disabled: U || !!V,
|
|
385
|
+
children: [/* @__PURE__ */ T(oe, {
|
|
396
386
|
id: "ensure-round-config",
|
|
397
|
-
children: /* @__PURE__ */
|
|
398
|
-
}), /* @__PURE__ */
|
|
387
|
+
children: /* @__PURE__ */ T(se, { placeholder: "Select a round" })
|
|
388
|
+
}), /* @__PURE__ */ T(ie, { children: z.map((e) => /* @__PURE__ */ E(ae, {
|
|
399
389
|
value: e.id,
|
|
400
390
|
children: [
|
|
401
391
|
"Round ",
|
|
@@ -405,34 +395,34 @@ function j({ open: t, onClose: o, targets: ce, selection: c, jobPostingId: l, pr
|
|
|
405
395
|
]
|
|
406
396
|
}, e.id)) })]
|
|
407
397
|
}),
|
|
408
|
-
|
|
398
|
+
z.length === 0 && !U && !V ? /* @__PURE__ */ T("p", {
|
|
409
399
|
className: "text-xs text-status-warning-text",
|
|
410
400
|
children: "This posting has no configured interview rounds."
|
|
411
401
|
}) : null
|
|
412
402
|
]
|
|
413
403
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ E("p", {
|
|
415
405
|
className: "text-xs text-text-secondary",
|
|
416
406
|
children: [
|
|
417
|
-
|
|
407
|
+
I,
|
|
418
408
|
" selected candidate",
|
|
419
|
-
|
|
409
|
+
I === 1 ? "" : "s",
|
|
420
410
|
" ",
|
|
421
411
|
"will be checked. Existing target rounds are reported as already present."
|
|
422
412
|
]
|
|
423
413
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ E(i, { children: [/* @__PURE__ */ T(e, {
|
|
425
415
|
variant: "outline",
|
|
426
416
|
onClick: o,
|
|
427
|
-
disabled:
|
|
417
|
+
disabled: A,
|
|
428
418
|
children: "Cancel"
|
|
429
|
-
}), /* @__PURE__ */
|
|
430
|
-
onClick: () => void
|
|
431
|
-
disabled:
|
|
432
|
-
children: [
|
|
419
|
+
}), /* @__PURE__ */ E(e, {
|
|
420
|
+
onClick: () => void H(),
|
|
421
|
+
disabled: A || U || !!V || !L || !g || R.length === 0,
|
|
422
|
+
children: [A ? /* @__PURE__ */ T(S, {
|
|
433
423
|
size: 16,
|
|
434
424
|
className: "mr-2 animate-spin"
|
|
435
|
-
}) : /* @__PURE__ */
|
|
425
|
+
}) : /* @__PURE__ */ T(be, { size: 16 }), A ? "Adding…" : "Add Selected to Round"]
|
|
436
426
|
})] })
|
|
437
427
|
]
|
|
438
428
|
})
|
|
@@ -441,6 +431,6 @@ function j({ open: t, onClose: o, targets: ce, selection: c, jobPostingId: l, pr
|
|
|
441
431
|
});
|
|
442
432
|
}
|
|
443
433
|
//#endregion
|
|
444
|
-
export { j as AddSelectedToRoundDialog, A as BulkCandidateSendDialog,
|
|
434
|
+
export { j as AddSelectedToRoundDialog, A as BulkCandidateSendDialog, O as isAssignmentRoundConfig };
|
|
445
435
|
|
|
446
436
|
//# sourceMappingURL=BulkCandidateDialogs.js.map
|