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