@burdenoff/microfe-support 2026.902.1 → 2026.902.2
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-operations.d.ts +43 -0
- package/dist/generated/global-operations.js +131 -117
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +25 -1
- package/dist/generated/global-types.js +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/dist/support/components/careers/BulkCandidateDialogs.d.ts +1 -0
- package/dist/support/components/careers/BulkCandidateDialogs.js +394 -267
- package/dist/support/components/careers/BulkCandidateDialogs.js.map +1 -1
- package/dist/support/components/careers/BulkOperationFeedback.d.ts +4 -1
- package/dist/support/components/careers/BulkOperationFeedback.js +32 -1
- package/dist/support/components/careers/BulkOperationFeedback.js.map +1 -1
- package/dist/support/constants/pipeline.js +3 -0
- package/dist/support/constants/pipeline.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +308 -291
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/utils/bulkCandidateOperations.d.ts +15 -0
- package/dist/support/utils/bulkCandidateOperations.js +19 -4
- package/dist/support/utils/bulkCandidateOperations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,32 +1,33 @@
|
|
|
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
|
|
2
|
-
import { BulkEnsureInterviewRoundsDocument as
|
|
3
|
-
import { InterviewRoundType as
|
|
4
|
-
import { nativeNotify as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
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 a, Label as o, Select as s, SelectContent as c, SelectItem as l, SelectTrigger as u, SelectValue as ne, Textarea as d } from "../ui.js";
|
|
2
|
+
import { BulkEnsureInterviewRoundsDocument as f, BulkRandomizeAndSendAssignmentDocument as p, BulkSendCustomEmailDocument as m, BulkSendRoundMessageDocument as h, BulkUpdateApplicationStatusDocument as g, NotifyDuplicateApplicantsDocument as _, useGetJobPostingQuery as v } from "../../../generated/global-operations.js";
|
|
3
|
+
import { InterviewRoundType as y } from "../../../generated/global-types.js";
|
|
4
|
+
import { nativeNotify as re } from "../../../utils/nativeBridge.js";
|
|
5
|
+
import { statusLabels as b, statusOrder as x } from "../../constants/pipeline.js";
|
|
6
|
+
import { RichTextEditor as S } from "./RichTextEditor.js";
|
|
7
|
+
import { aggregateBulkCustomEmailResult as C, aggregateBulkStatusUpdateResult as w, aggregateCandidateEmailResult as T, aggregateDuplicateNoticeResult as E, aggregateEnsureRoundResult as D, assertCompleteBulkCustomEmailChunkResult as O, assertCompleteBulkStatusUpdateChunkResult as k, assertCompleteCandidateEmailChunkResult as A, assertCompleteEnsureRoundChunkResult as j, createEmptyBulkCustomEmailAggregate as M, createEmptyBulkStatusUpdateAggregate as N, createEmptyCandidateEmailAggregate as P, createEmptyDuplicateNoticeAggregate as F, createEmptyEnsureRoundAggregate as I, executeSequentialCandidateChunks as ie, getBulkOperationNotificationSeverity as ae, getCandidateSelectionCount as oe, getSelectedCandidateIds as L, hasCandidateEmailType as R, resolveExactCandidateRounds as z } from "../../utils/bulkCandidateOperations.js";
|
|
8
|
+
import { BulkCandidateActionGuidance as B } from "./BulkCandidateActionGuidance.js";
|
|
9
|
+
import { BulkCustomEmailResultDetails as V, BulkOperationProgress as se, BulkStatusUpdateResultDetails as ce, CandidateEmailResultDetails as le, DuplicateNoticeResultDetails as H, EnsureRoundResultDetails as ue, StoppedBulkOperationNotice as U } from "./BulkOperationFeedback.js";
|
|
10
|
+
import { useEffect as de, useMemo as fe, useState as W } from "react";
|
|
11
|
+
import { AlertCircle as pe, Loader2 as G, Mail as K, Send as me, Tag as q, UserPlus as he } from "lucide-react";
|
|
12
|
+
import { graphqlFetch as ge } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
13
|
+
import { jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
14
|
+
import { useApolloClient as _e } from "@apollo/client/react";
|
|
15
|
+
import { print as ve } from "graphql";
|
|
15
16
|
//#region src/support/components/careers/BulkCandidateDialogs.tsx
|
|
16
|
-
function
|
|
17
|
-
return e.isAssignmentRound || e.roundType ===
|
|
17
|
+
function ye(e) {
|
|
18
|
+
return e.isAssignmentRound || e.roundType === y.TakeHome;
|
|
18
19
|
}
|
|
19
|
-
var
|
|
20
|
+
var be = {
|
|
20
21
|
message: "ROUND_MESSAGE",
|
|
21
22
|
assignment: "ASSIGNMENT"
|
|
22
23
|
};
|
|
23
|
-
function
|
|
24
|
+
function xe(e) {
|
|
24
25
|
return e instanceof Error ? e.message : "The request failed without an error message.";
|
|
25
26
|
}
|
|
26
|
-
async function
|
|
27
|
-
let r = await
|
|
27
|
+
async function X(e, t, n) {
|
|
28
|
+
let r = await ge({
|
|
28
29
|
gateway: "global",
|
|
29
|
-
query:
|
|
30
|
+
query: ve(e),
|
|
30
31
|
variables: t,
|
|
31
32
|
operationName: n,
|
|
32
33
|
skipAuthRetry: !0
|
|
@@ -35,39 +36,39 @@ async function K(e, t, n) {
|
|
|
35
36
|
if (!r.data) throw Error(`${n} returned no data.`);
|
|
36
37
|
return r.data;
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
-
let n =
|
|
39
|
+
function Se(e, t) {
|
|
40
|
+
let n = L(t);
|
|
40
41
|
return e.filter((e) => n.has(e.id));
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
-
let
|
|
43
|
+
function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selection: b, jobPostingId: x, previewLoading: S, previewError: C }) {
|
|
44
|
+
let w = _e(), [E, D] = W(""), [O, k] = W(""), [j, M] = W(!1), [N, F] = W(null), [I, L] = W(P), [V, ce] = W(null), [H, ue] = W(!1), [K, q] = W(!1), { data: ge, loading: ve, error: Ce } = v({
|
|
44
45
|
variables: { id: x },
|
|
45
|
-
skip: !
|
|
46
|
+
skip: !m || !x,
|
|
46
47
|
fetchPolicy: "network-only"
|
|
47
48
|
});
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}, [
|
|
51
|
-
let we =
|
|
49
|
+
de(() => {
|
|
50
|
+
m && (D(""), k(""), M(!1), F(null), L(P()), ce(null), ue(!1), q(!1));
|
|
51
|
+
}, [m, f]);
|
|
52
|
+
let we = fe(() => Se(y, b), [b, y]), Te = oe(b), Ee = we.length === Te, De = ge?.jobPosting?.rounds ?? [], Oe = De.filter((e) => f !== "assignment" || ye(e)), ke = De.find((e) => e.id === E), Z = ke ? z(we, ke.id) : {
|
|
52
53
|
pairs: [],
|
|
53
54
|
unresolved: []
|
|
54
|
-
}, Ae = Z.unresolved.filter((e) => e.reason === "MISSING").length, je = Z.unresolved.filter((e) => e.reason === "AMBIGUOUS").length, Me =
|
|
55
|
-
!Q && Ce ? Q = "Could not load the posting rounds. Nothing will be sent." : !Q && !S && !Ee ? 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 && E && !
|
|
55
|
+
}, Ae = Z.unresolved.filter((e) => e.reason === "MISSING").length, je = Z.unresolved.filter((e) => e.reason === "AMBIGUOUS").length, Me = be[f], Ne = Z.pairs.filter(({ round: e }) => R(e, Me)).length, Pe = Z.pairs.filter(({ round: e }) => j || !R(e, Me)).length, Fe = we.some((e) => e.jobPostingId !== x), Q = C;
|
|
56
|
+
!Q && Ce ? Q = "Could not load the posting rounds. Nothing will be sent." : !Q && !S && !Ee ? 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 && E && !ve && !ke ? Q = "The selected round is no longer available. Choose another round." : !Q && je > 0 && (Q = `${je} selected candidate${je === 1 ? " has" : "s have"} multiple concrete rounds for this configuration. Nothing will be sent until the data is corrected.`);
|
|
56
57
|
let Ie = async () => {
|
|
57
|
-
if (
|
|
58
|
-
|
|
59
|
-
let e = await
|
|
58
|
+
if (K || H || S || ve || Q || !Ee || !ke || Z.pairs.length === 0 || Pe === 0 || f === "message" && !O.trim()) return;
|
|
59
|
+
q(!0), ue(!0), ce(null), L(P());
|
|
60
|
+
let e = await ie({
|
|
60
61
|
items: Z.pairs.map(({ applicationId: e, roundId: t }) => ({
|
|
61
62
|
applicationId: e,
|
|
62
63
|
roundId: t
|
|
63
64
|
})),
|
|
64
|
-
initialAggregate:
|
|
65
|
-
onProgress:
|
|
65
|
+
initialAggregate: P(),
|
|
66
|
+
onProgress: F,
|
|
66
67
|
executeChunk: async (e) => {
|
|
67
|
-
if (
|
|
68
|
-
let t = (await
|
|
68
|
+
if (f === "assignment") {
|
|
69
|
+
let t = (await X(p, { input: {
|
|
69
70
|
items: [...e],
|
|
70
|
-
force:
|
|
71
|
+
force: j
|
|
71
72
|
} }, "BulkRandomizeAndSendAssignment")).bulkRandomizeAndSendAssignment;
|
|
72
73
|
if (!t) throw Error("The assignment request returned no result.");
|
|
73
74
|
let n = {
|
|
@@ -87,12 +88,12 @@ function q({ mode: d, open: p, onClose: h, onOpenAddRound: _, targets: v, select
|
|
|
87
88
|
message: e.message
|
|
88
89
|
}))
|
|
89
90
|
};
|
|
90
|
-
return
|
|
91
|
+
return A(e, n), n;
|
|
91
92
|
}
|
|
92
|
-
let t = (await
|
|
93
|
+
let t = (await X(h, { input: {
|
|
93
94
|
items: [...e],
|
|
94
|
-
message:
|
|
95
|
-
force:
|
|
95
|
+
message: O.trim(),
|
|
96
|
+
force: j
|
|
96
97
|
} }, "BulkSendRoundMessage")).bulkSendRoundMessage;
|
|
97
98
|
if (!t) throw Error("The message request returned no result.");
|
|
98
99
|
let n = {
|
|
@@ -112,80 +113,80 @@ function q({ mode: d, open: p, onClose: h, onOpenAddRound: _, targets: v, select
|
|
|
112
113
|
message: e.message
|
|
113
114
|
}))
|
|
114
115
|
};
|
|
115
|
-
return
|
|
116
|
+
return A(e, n), n;
|
|
116
117
|
},
|
|
117
|
-
mergeResult:
|
|
118
|
+
mergeResult: T
|
|
118
119
|
});
|
|
119
|
-
|
|
120
|
+
L(e.aggregate), e.error && ce({
|
|
120
121
|
knownCompleted: e.processedItems.length,
|
|
121
122
|
ambiguous: e.ambiguousItems.length,
|
|
122
123
|
notStarted: e.notStartedItems.length,
|
|
123
|
-
message:
|
|
124
|
-
}),
|
|
124
|
+
message: xe(e.error)
|
|
125
|
+
}), re(ae({
|
|
125
126
|
succeeded: e.aggregate.succeeded.length,
|
|
126
127
|
skipped: e.aggregate.skipped.length,
|
|
127
128
|
failed: e.aggregate.failed.length,
|
|
128
129
|
ambiguous: !!e.error
|
|
129
|
-
})),
|
|
130
|
-
}, $ = S ||
|
|
131
|
-
return /* @__PURE__ */
|
|
132
|
-
open:
|
|
130
|
+
})), q(!1), w.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
|
|
131
|
+
}, $ = S || ve;
|
|
132
|
+
return /* @__PURE__ */ J(n, {
|
|
133
|
+
open: m,
|
|
133
134
|
onOpenChange: (e) => {
|
|
134
|
-
!e && !
|
|
135
|
+
!e && !K && g();
|
|
135
136
|
},
|
|
136
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ Y(r, {
|
|
137
138
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
138
139
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
action:
|
|
140
|
+
/* @__PURE__ */ Y(te, { children: [/* @__PURE__ */ J(a, { children: f === "assignment" ? "Assign & Email Random Take-Home" : "Send Message" }), /* @__PURE__ */ J(ee, { children: "Choose one configured round for the candidates in the filtered posting." })] }),
|
|
141
|
+
/* @__PURE__ */ J(B, {
|
|
142
|
+
action: f,
|
|
142
143
|
unresolvedCount: Ae
|
|
143
144
|
}),
|
|
144
|
-
|
|
145
|
+
H ? /* @__PURE__ */ Y("div", {
|
|
145
146
|
className: "space-y-4",
|
|
146
147
|
children: [
|
|
147
|
-
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
onClick:
|
|
152
|
-
disabled:
|
|
148
|
+
N ? /* @__PURE__ */ J(se, { progress: N }) : null,
|
|
149
|
+
/* @__PURE__ */ J(le, { result: I }),
|
|
150
|
+
V ? /* @__PURE__ */ J(U, { details: V }) : null,
|
|
151
|
+
/* @__PURE__ */ J(i, { children: /* @__PURE__ */ J(e, {
|
|
152
|
+
onClick: g,
|
|
153
|
+
disabled: K,
|
|
153
154
|
children: "Done"
|
|
154
155
|
}) })
|
|
155
156
|
]
|
|
156
|
-
}) : /* @__PURE__ */
|
|
157
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
157
158
|
className: "space-y-4",
|
|
158
159
|
children: [
|
|
159
|
-
$ ? /* @__PURE__ */
|
|
160
|
+
$ ? /* @__PURE__ */ Y("div", {
|
|
160
161
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
161
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ J(G, {
|
|
162
163
|
size: 14,
|
|
163
164
|
className: "animate-spin"
|
|
164
165
|
}), "Refreshing candidates and configured rounds…"]
|
|
165
166
|
}) : null,
|
|
166
|
-
Q ? /* @__PURE__ */
|
|
167
|
+
Q ? /* @__PURE__ */ Y("div", {
|
|
167
168
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
168
169
|
role: "alert",
|
|
169
|
-
children: [/* @__PURE__ */
|
|
170
|
+
children: [/* @__PURE__ */ J(pe, {
|
|
170
171
|
size: 14,
|
|
171
172
|
className: "mt-0.5 shrink-0"
|
|
172
|
-
}), /* @__PURE__ */
|
|
173
|
+
}), /* @__PURE__ */ J("span", { children: Q })]
|
|
173
174
|
}) : null,
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ Y("div", {
|
|
175
176
|
className: "space-y-1.5",
|
|
176
177
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ J(o, {
|
|
178
179
|
htmlFor: "bulk-round-config",
|
|
179
180
|
children: "Target round"
|
|
180
181
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ Y(s, {
|
|
182
183
|
value: E,
|
|
183
|
-
onValueChange:
|
|
184
|
+
onValueChange: D,
|
|
184
185
|
disabled: $ || !!Q,
|
|
185
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ J(u, {
|
|
186
187
|
id: "bulk-round-config",
|
|
187
|
-
children: /* @__PURE__ */
|
|
188
|
-
}), /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ J(ne, { placeholder: "Select a round" })
|
|
189
|
+
}), /* @__PURE__ */ J(c, { children: Oe.map((e) => /* @__PURE__ */ Y(l, {
|
|
189
190
|
value: e.id,
|
|
190
191
|
children: [
|
|
191
192
|
"Round ",
|
|
@@ -195,35 +196,35 @@ function q({ mode: d, open: p, onClose: h, onOpenAddRound: _, targets: v, select
|
|
|
195
196
|
]
|
|
196
197
|
}, e.id)) })]
|
|
197
198
|
}),
|
|
198
|
-
Oe.length === 0 && !$ && !Q ? /* @__PURE__ */
|
|
199
|
+
Oe.length === 0 && !$ && !Q ? /* @__PURE__ */ J("p", {
|
|
199
200
|
className: "text-xs text-status-warning-text",
|
|
200
|
-
children:
|
|
201
|
+
children: f === "assignment" ? "This posting has no configured assignment round." : "This posting has no configured interview rounds."
|
|
201
202
|
}) : null
|
|
202
203
|
]
|
|
203
204
|
}),
|
|
204
|
-
|
|
205
|
+
f === "message" ? /* @__PURE__ */ Y("div", {
|
|
205
206
|
className: "space-y-1.5",
|
|
206
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ J(o, {
|
|
207
208
|
htmlFor: "bulk-message",
|
|
208
209
|
children: "Free-text message"
|
|
209
|
-
}), /* @__PURE__ */
|
|
210
|
+
}), /* @__PURE__ */ J(d, {
|
|
210
211
|
id: "bulk-message",
|
|
211
|
-
value:
|
|
212
|
-
onChange: (e) =>
|
|
212
|
+
value: O,
|
|
213
|
+
onChange: (e) => k(e.target.value),
|
|
213
214
|
placeholder: "Write the message sent to each candidate",
|
|
214
215
|
rows: 5
|
|
215
216
|
})]
|
|
216
217
|
}) : null,
|
|
217
|
-
E && !$ && !Q ? /* @__PURE__ */
|
|
218
|
+
E && !$ && !Q ? /* @__PURE__ */ Y("div", {
|
|
218
219
|
className: "space-y-2 rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-xs text-text-secondary",
|
|
219
220
|
children: [
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ J("p", {
|
|
221
222
|
className: "font-medium text-text-primary",
|
|
222
223
|
children: "Preview"
|
|
223
224
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ Y("p", { children: [
|
|
225
226
|
"Will send to ",
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ J("span", {
|
|
227
228
|
className: "font-semibold",
|
|
228
229
|
children: Pe
|
|
229
230
|
}),
|
|
@@ -231,41 +232,41 @@ function q({ mode: d, open: p, onClose: h, onOpenAddRound: _, targets: v, select
|
|
|
231
232
|
Pe === 1 ? "" : "s",
|
|
232
233
|
"."
|
|
233
234
|
] }),
|
|
234
|
-
Ne > 0 ? /* @__PURE__ */
|
|
235
|
+
Ne > 0 ? /* @__PURE__ */ Y("p", { children: [
|
|
235
236
|
Ne,
|
|
236
237
|
" already received this email type",
|
|
237
238
|
" ",
|
|
238
|
-
|
|
239
|
+
j ? "(force will send again)" : "(the backend will skip them)",
|
|
239
240
|
"."
|
|
240
241
|
] }) : null,
|
|
241
|
-
Ae > 0 ? /* @__PURE__ */
|
|
242
|
+
Ae > 0 ? /* @__PURE__ */ Y(e, {
|
|
242
243
|
type: "button",
|
|
243
244
|
size: "sm",
|
|
244
245
|
variant: "outline",
|
|
245
246
|
onClick: _,
|
|
246
|
-
children: [/* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ J(he, { size: 14 }), "Add Selected to Round"]
|
|
247
248
|
}) : null,
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ Y("label", {
|
|
249
250
|
className: "flex cursor-pointer items-start gap-2 pt-1",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
251
|
-
checked:
|
|
252
|
-
onCheckedChange: (e) =>
|
|
253
|
-
}), /* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ J(t, {
|
|
252
|
+
checked: j,
|
|
253
|
+
onCheckedChange: (e) => M(e === !0)
|
|
254
|
+
}), /* @__PURE__ */ J("span", { children: "Force resend to candidates with a prior email. Force sends are non-idempotent and are never retried automatically." })]
|
|
254
255
|
})
|
|
255
256
|
]
|
|
256
257
|
}) : null,
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ Y(i, { children: [/* @__PURE__ */ J(e, {
|
|
258
259
|
variant: "outline",
|
|
259
|
-
onClick:
|
|
260
|
-
disabled:
|
|
260
|
+
onClick: g,
|
|
261
|
+
disabled: K,
|
|
261
262
|
children: "Cancel"
|
|
262
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ Y(e, {
|
|
263
264
|
onClick: () => void Ie(),
|
|
264
|
-
disabled:
|
|
265
|
-
children: [
|
|
265
|
+
disabled: K || $ || !!Q || !Ee || !E || Z.pairs.length === 0 || Pe === 0 || f === "message" && !O.trim(),
|
|
266
|
+
children: [K ? /* @__PURE__ */ J(G, {
|
|
266
267
|
size: 16,
|
|
267
268
|
className: "mr-2 animate-spin"
|
|
268
|
-
}) : /* @__PURE__ */
|
|
269
|
+
}) : /* @__PURE__ */ J(me, { size: 16 }), K ? "Sending…" : "Send"]
|
|
269
270
|
})] })
|
|
270
271
|
]
|
|
271
272
|
})
|
|
@@ -273,28 +274,28 @@ function q({ mode: d, open: p, onClose: h, onOpenAddRound: _, targets: v, select
|
|
|
273
274
|
})
|
|
274
275
|
});
|
|
275
276
|
}
|
|
276
|
-
function
|
|
277
|
-
let
|
|
278
|
-
variables: { id:
|
|
279
|
-
skip: !t || !
|
|
277
|
+
function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, previewLoading: g, previewError: _ }) {
|
|
278
|
+
let y = _e(), [b, x] = W(""), [S, C] = W(null), [w, T] = W(I), [E, O] = W(null), [k, A] = W(!1), [M, N] = W(!1), { data: P, loading: F, error: L } = v({
|
|
279
|
+
variables: { id: h },
|
|
280
|
+
skip: !t || !h,
|
|
280
281
|
fetchPolicy: "network-only"
|
|
281
282
|
});
|
|
282
|
-
|
|
283
|
-
t && (
|
|
283
|
+
de(() => {
|
|
284
|
+
t && (x(""), C(null), T(I()), O(null), A(!1), N(!1));
|
|
284
285
|
}, [t]);
|
|
285
|
-
let
|
|
286
|
-
!
|
|
287
|
-
let
|
|
288
|
-
if (M ||
|
|
289
|
-
N(!0),
|
|
290
|
-
let e = await
|
|
291
|
-
items:
|
|
292
|
-
initialAggregate:
|
|
286
|
+
let R = fe(() => Se(p, m), [m, p]), z = oe(m), B = R.length === z, V = R.map((e) => e.id), ce = R.some((e) => e.jobPostingId !== h), le = P?.jobPosting?.rounds ?? [], H = le.find((e) => e.id === b), K = _;
|
|
287
|
+
!K && L ? K = "Could not load the posting rounds. Nothing will be changed." : !K && !g && !B ? K = "Some selected candidate details are unavailable. Refresh the selection before adding rounds." : !K && ce ? K = "Some selected candidates do not belong to the filtered posting." : !K && b && !F && !H && (K = "The selected round is no longer available. Choose another round.");
|
|
288
|
+
let me = async () => {
|
|
289
|
+
if (M || k || g || F || K || !B || !H || V.length === 0) return;
|
|
290
|
+
N(!0), A(!0), O(null), T(I());
|
|
291
|
+
let e = await ie({
|
|
292
|
+
items: V,
|
|
293
|
+
initialAggregate: I(),
|
|
293
294
|
onProgress: C,
|
|
294
295
|
executeChunk: async (e) => {
|
|
295
|
-
let t = (await
|
|
296
|
-
jobPostingId:
|
|
297
|
-
roundConfigId:
|
|
296
|
+
let t = (await X(f, { input: {
|
|
297
|
+
jobPostingId: h,
|
|
298
|
+
roundConfigId: H.id,
|
|
298
299
|
applicationIds: [...e]
|
|
299
300
|
} }, "BulkEnsureInterviewRounds")).bulkEnsureInterviewRounds;
|
|
300
301
|
if (!t) throw Error("The add-to-round request returned no result.");
|
|
@@ -313,80 +314,80 @@ function J({ open: t, onClose: u, targets: f, selection: p, jobPostingId: m, pre
|
|
|
313
314
|
message: e.message
|
|
314
315
|
}))
|
|
315
316
|
};
|
|
316
|
-
return
|
|
317
|
+
return j(e, n), n;
|
|
317
318
|
},
|
|
318
|
-
mergeResult:
|
|
319
|
+
mergeResult: D
|
|
319
320
|
});
|
|
320
|
-
|
|
321
|
+
T(e.aggregate), e.error && O({
|
|
321
322
|
knownCompleted: e.processedItems.length,
|
|
322
323
|
ambiguous: e.ambiguousItems.length,
|
|
323
324
|
notStarted: e.notStartedItems.length,
|
|
324
|
-
message:
|
|
325
|
-
}),
|
|
325
|
+
message: xe(e.error)
|
|
326
|
+
}), re(ae({
|
|
326
327
|
succeeded: e.aggregate.created.length + e.aggregate.alreadyPresent.length,
|
|
327
328
|
skipped: 0,
|
|
328
329
|
failed: e.aggregate.failed.length,
|
|
329
330
|
ambiguous: !!e.error
|
|
330
|
-
})), N(!1),
|
|
331
|
-
},
|
|
332
|
-
return /* @__PURE__ */
|
|
331
|
+
})), N(!1), y.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
|
|
332
|
+
}, q = g || F;
|
|
333
|
+
return /* @__PURE__ */ J(n, {
|
|
333
334
|
open: t,
|
|
334
335
|
onOpenChange: (e) => {
|
|
335
|
-
!e && !M &&
|
|
336
|
+
!e && !M && d();
|
|
336
337
|
},
|
|
337
|
-
children: /* @__PURE__ */
|
|
338
|
+
children: /* @__PURE__ */ Y(r, {
|
|
338
339
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
339
340
|
children: [
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ Y(te, { children: [/* @__PURE__ */ J(a, { children: "Add Selected to Round" }), /* @__PURE__ */ J(ee, { children: "Add every selected candidate in this posting to one configured interview round." })] }),
|
|
342
|
+
/* @__PURE__ */ J("div", {
|
|
342
343
|
className: "rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
|
|
343
344
|
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."
|
|
344
345
|
}),
|
|
345
|
-
|
|
346
|
+
k ? /* @__PURE__ */ Y("div", {
|
|
346
347
|
className: "space-y-4",
|
|
347
348
|
children: [
|
|
348
|
-
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
-
onClick:
|
|
349
|
+
S ? /* @__PURE__ */ J(se, { progress: S }) : null,
|
|
350
|
+
/* @__PURE__ */ J(ue, { result: w }),
|
|
351
|
+
E ? /* @__PURE__ */ J(U, { details: E }) : null,
|
|
352
|
+
/* @__PURE__ */ J(i, { children: /* @__PURE__ */ J(e, {
|
|
353
|
+
onClick: d,
|
|
353
354
|
disabled: M,
|
|
354
355
|
children: "Done"
|
|
355
356
|
}) })
|
|
356
357
|
]
|
|
357
|
-
}) : /* @__PURE__ */
|
|
358
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
358
359
|
className: "space-y-4",
|
|
359
360
|
children: [
|
|
360
|
-
|
|
361
|
+
q ? /* @__PURE__ */ Y("div", {
|
|
361
362
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ J(G, {
|
|
363
364
|
size: 14,
|
|
364
365
|
className: "animate-spin"
|
|
365
366
|
}), "Refreshing candidates and configured rounds…"]
|
|
366
367
|
}) : null,
|
|
367
|
-
|
|
368
|
+
K ? /* @__PURE__ */ Y("div", {
|
|
368
369
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
369
370
|
role: "alert",
|
|
370
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ J(pe, {
|
|
371
372
|
size: 14,
|
|
372
373
|
className: "mt-0.5 shrink-0"
|
|
373
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ J("span", { children: K })]
|
|
374
375
|
}) : null,
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ Y("div", {
|
|
376
377
|
className: "space-y-1.5",
|
|
377
378
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ J(o, {
|
|
379
380
|
htmlFor: "ensure-round-config",
|
|
380
381
|
children: "Interview round"
|
|
381
382
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
value:
|
|
384
|
-
onValueChange:
|
|
385
|
-
disabled:
|
|
386
|
-
children: [/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ Y(s, {
|
|
384
|
+
value: b,
|
|
385
|
+
onValueChange: x,
|
|
386
|
+
disabled: q || !!K,
|
|
387
|
+
children: [/* @__PURE__ */ J(u, {
|
|
387
388
|
id: "ensure-round-config",
|
|
388
|
-
children: /* @__PURE__ */
|
|
389
|
-
}), /* @__PURE__ */
|
|
389
|
+
children: /* @__PURE__ */ J(ne, { placeholder: "Select a round" })
|
|
390
|
+
}), /* @__PURE__ */ J(c, { children: le.map((e) => /* @__PURE__ */ Y(l, {
|
|
390
391
|
value: e.id,
|
|
391
392
|
children: [
|
|
392
393
|
"Round ",
|
|
@@ -396,34 +397,34 @@ function J({ open: t, onClose: u, targets: f, selection: p, jobPostingId: m, pre
|
|
|
396
397
|
]
|
|
397
398
|
}, e.id)) })]
|
|
398
399
|
}),
|
|
399
|
-
|
|
400
|
+
le.length === 0 && !q && !K ? /* @__PURE__ */ J("p", {
|
|
400
401
|
className: "text-xs text-status-warning-text",
|
|
401
402
|
children: "This posting has no configured interview rounds."
|
|
402
403
|
}) : null
|
|
403
404
|
]
|
|
404
405
|
}),
|
|
405
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ Y("p", {
|
|
406
407
|
className: "text-xs text-text-secondary",
|
|
407
408
|
children: [
|
|
408
|
-
|
|
409
|
+
z,
|
|
409
410
|
" selected candidate",
|
|
410
|
-
|
|
411
|
+
z === 1 ? "" : "s",
|
|
411
412
|
" ",
|
|
412
413
|
"will be checked. Existing target rounds are reported as already present."
|
|
413
414
|
]
|
|
414
415
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ Y(i, { children: [/* @__PURE__ */ J(e, {
|
|
416
417
|
variant: "outline",
|
|
417
|
-
onClick:
|
|
418
|
+
onClick: d,
|
|
418
419
|
disabled: M,
|
|
419
420
|
children: "Cancel"
|
|
420
|
-
}), /* @__PURE__ */
|
|
421
|
-
onClick: () => void
|
|
422
|
-
disabled: M ||
|
|
423
|
-
children: [M ? /* @__PURE__ */
|
|
421
|
+
}), /* @__PURE__ */ Y(e, {
|
|
422
|
+
onClick: () => void me(),
|
|
423
|
+
disabled: M || q || !!K || !B || !b || V.length === 0,
|
|
424
|
+
children: [M ? /* @__PURE__ */ J(G, {
|
|
424
425
|
size: 16,
|
|
425
426
|
className: "mr-2 animate-spin"
|
|
426
|
-
}) : /* @__PURE__ */
|
|
427
|
+
}) : /* @__PURE__ */ J(he, { size: 16 }), M ? "Adding…" : "Add Selected to Round"]
|
|
427
428
|
})] })
|
|
428
429
|
]
|
|
429
430
|
})
|
|
@@ -431,22 +432,22 @@ function J({ open: t, onClose: u, targets: f, selection: p, jobPostingId: m, pre
|
|
|
431
432
|
})
|
|
432
433
|
});
|
|
433
434
|
}
|
|
434
|
-
function
|
|
435
|
-
let
|
|
436
|
-
|
|
437
|
-
t && (
|
|
435
|
+
function Te({ open: t, onClose: o, targets: s, selection: c, jobPostingId: l, previewLoading: u, previewError: ne }) {
|
|
436
|
+
let d = _e(), [f, p] = W(null), [m, h] = W(F), [g, v] = W(null), [y, b] = W(!1), [x, S] = W(!1);
|
|
437
|
+
de(() => {
|
|
438
|
+
t && (p(null), h(F()), v(null), b(!1), S(!1));
|
|
438
439
|
}, [t]);
|
|
439
|
-
let C =
|
|
440
|
-
!k && !
|
|
440
|
+
let C = fe(() => Se(s, c), [c, s]), w = oe(c), T = C.length === w, D = C.map((e) => e.id), O = C.some((e) => e.jobPostingId !== l), k = ne;
|
|
441
|
+
!k && !u && !T ? k = "Some selected candidate details are unavailable. Refresh the selection before notifying." : !k && O && (k = "Some selected candidates do not belong to the filtered posting.");
|
|
441
442
|
let A = async () => {
|
|
442
|
-
if (
|
|
443
|
-
S(!0),
|
|
444
|
-
let e = await
|
|
445
|
-
items:
|
|
446
|
-
initialAggregate:
|
|
447
|
-
onProgress:
|
|
443
|
+
if (x || y || u || k || !T || D.length === 0) return;
|
|
444
|
+
S(!0), b(!0), v(null), h(F());
|
|
445
|
+
let e = await ie({
|
|
446
|
+
items: D,
|
|
447
|
+
initialAggregate: F(),
|
|
448
|
+
onProgress: p,
|
|
448
449
|
executeChunk: async (e) => {
|
|
449
|
-
let t = (await
|
|
450
|
+
let t = (await X(_, { input: { applicationIds: [...e] } }, "NotifyDuplicateApplicants")).notifyDuplicateApplicants;
|
|
450
451
|
if (!t) throw Error("The duplicate-notice request returned no result.");
|
|
451
452
|
return {
|
|
452
453
|
succeeded: t.succeeded.map((e) => ({ email: e.email })),
|
|
@@ -461,64 +462,64 @@ function ye({ open: t, onClose: a, targets: o, selection: s, jobPostingId: c, pr
|
|
|
461
462
|
}))
|
|
462
463
|
};
|
|
463
464
|
},
|
|
464
|
-
mergeResult:
|
|
465
|
+
mergeResult: E
|
|
465
466
|
});
|
|
466
|
-
|
|
467
|
+
h(e.aggregate), e.error && v({
|
|
467
468
|
knownCompleted: e.processedItems.length,
|
|
468
469
|
ambiguous: e.ambiguousItems.length,
|
|
469
470
|
notStarted: e.notStartedItems.length,
|
|
470
|
-
message:
|
|
471
|
-
}),
|
|
471
|
+
message: xe(e.error)
|
|
472
|
+
}), re(ae({
|
|
472
473
|
succeeded: e.aggregate.succeeded.length,
|
|
473
474
|
skipped: e.aggregate.skipped.length,
|
|
474
475
|
failed: e.aggregate.failed.length,
|
|
475
476
|
ambiguous: !!e.error
|
|
476
|
-
})), S(!1),
|
|
477
|
+
})), S(!1), d.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
|
|
477
478
|
};
|
|
478
|
-
return /* @__PURE__ */
|
|
479
|
+
return /* @__PURE__ */ J(n, {
|
|
479
480
|
open: t,
|
|
480
481
|
onOpenChange: (e) => {
|
|
481
|
-
!e && !
|
|
482
|
+
!e && !x && o();
|
|
482
483
|
},
|
|
483
|
-
children: /* @__PURE__ */
|
|
484
|
+
children: /* @__PURE__ */ Y(r, {
|
|
484
485
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
485
486
|
children: [
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ Y(te, { children: [/* @__PURE__ */ J(a, { children: "Notify Duplicate Applicants" }), /* @__PURE__ */ J(ee, { children: "Let candidates with more than one application know they only need to complete one take-home assignment." })] }),
|
|
488
|
+
/* @__PURE__ */ J("div", {
|
|
488
489
|
className: "rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
|
|
489
490
|
children: "Selected applications are grouped by email address — exactly one notice goes out per unique candidate, even if you select several of their duplicate applications. An email that only appears once among your selection is skipped (it isn't a duplicate), and an email already notified before is skipped automatically."
|
|
490
491
|
}),
|
|
491
|
-
|
|
492
|
+
y ? /* @__PURE__ */ Y("div", {
|
|
492
493
|
className: "space-y-4",
|
|
493
494
|
children: [
|
|
494
|
-
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
g ? /* @__PURE__ */ U
|
|
497
|
-
/* @__PURE__ */
|
|
498
|
-
onClick:
|
|
499
|
-
disabled:
|
|
495
|
+
f ? /* @__PURE__ */ J(se, { progress: f }) : null,
|
|
496
|
+
/* @__PURE__ */ J(H, { result: m }),
|
|
497
|
+
g ? /* @__PURE__ */ J(U, { details: g }) : null,
|
|
498
|
+
/* @__PURE__ */ J(i, { children: /* @__PURE__ */ J(e, {
|
|
499
|
+
onClick: o,
|
|
500
|
+
disabled: x,
|
|
500
501
|
children: "Done"
|
|
501
502
|
}) })
|
|
502
503
|
]
|
|
503
|
-
}) : /* @__PURE__ */
|
|
504
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
504
505
|
className: "space-y-4",
|
|
505
506
|
children: [
|
|
506
|
-
|
|
507
|
+
u ? /* @__PURE__ */ Y("div", {
|
|
507
508
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
508
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ J(G, {
|
|
509
510
|
size: 14,
|
|
510
511
|
className: "animate-spin"
|
|
511
512
|
}), "Refreshing candidates…"]
|
|
512
513
|
}) : null,
|
|
513
|
-
k ? /* @__PURE__ */
|
|
514
|
+
k ? /* @__PURE__ */ Y("div", {
|
|
514
515
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
515
516
|
role: "alert",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
517
|
+
children: [/* @__PURE__ */ J(pe, {
|
|
517
518
|
size: 14,
|
|
518
519
|
className: "mt-0.5 shrink-0"
|
|
519
|
-
}), /* @__PURE__ */
|
|
520
|
+
}), /* @__PURE__ */ J("span", { children: k })]
|
|
520
521
|
}) : null,
|
|
521
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ Y("p", {
|
|
522
523
|
className: "text-xs text-text-secondary",
|
|
523
524
|
children: [
|
|
524
525
|
w,
|
|
@@ -528,18 +529,18 @@ function ye({ open: t, onClose: a, targets: o, selection: s, jobPostingId: c, pr
|
|
|
528
529
|
"will be checked and grouped by email."
|
|
529
530
|
]
|
|
530
531
|
}),
|
|
531
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ Y(i, { children: [/* @__PURE__ */ J(e, {
|
|
532
533
|
variant: "outline",
|
|
533
|
-
onClick:
|
|
534
|
-
disabled:
|
|
534
|
+
onClick: o,
|
|
535
|
+
disabled: x,
|
|
535
536
|
children: "Cancel"
|
|
536
|
-
}), /* @__PURE__ */
|
|
537
|
+
}), /* @__PURE__ */ Y(e, {
|
|
537
538
|
onClick: () => void A(),
|
|
538
|
-
disabled:
|
|
539
|
-
children: [
|
|
539
|
+
disabled: x || u || !!k || !T || D.length === 0,
|
|
540
|
+
children: [x ? /* @__PURE__ */ J(G, {
|
|
540
541
|
size: 16,
|
|
541
542
|
className: "mr-2 animate-spin"
|
|
542
|
-
}) : /* @__PURE__ */
|
|
543
|
+
}) : /* @__PURE__ */ J(K, { size: 16 }), x ? "Notifying…" : "Notify Duplicate Applicants"]
|
|
543
544
|
})] })
|
|
544
545
|
]
|
|
545
546
|
})
|
|
@@ -547,25 +548,25 @@ function ye({ open: t, onClose: a, targets: o, selection: s, jobPostingId: c, pr
|
|
|
547
548
|
})
|
|
548
549
|
});
|
|
549
550
|
}
|
|
550
|
-
function
|
|
551
|
-
let
|
|
552
|
-
|
|
553
|
-
t && (
|
|
551
|
+
function Ee({ open: t, onClose: s, targets: c, selection: l, previewLoading: u, previewError: ne }) {
|
|
552
|
+
let d = _e(), [f, p] = W(""), [h, g] = W(""), [_, v] = W(null), [y, b] = W(M), [x, w] = W(null), [T, E] = W(!1), [D, k] = W(!1);
|
|
553
|
+
de(() => {
|
|
554
|
+
t && (p(""), g(""), v(null), b(M()), w(null), E(!1), k(!1));
|
|
554
555
|
}, [t]);
|
|
555
|
-
let A =
|
|
556
|
-
!L && !
|
|
557
|
-
let
|
|
558
|
-
if (!
|
|
559
|
-
k(!0),
|
|
560
|
-
let e = await
|
|
561
|
-
items:
|
|
562
|
-
initialAggregate:
|
|
563
|
-
onProgress:
|
|
556
|
+
let A = fe(() => Se(c, l), [l, c]), j = oe(l), N = A.length === j, P = A.map((e) => e.id), F = f.trim().length > 0, I = h.trim().length > 0, L = ne;
|
|
557
|
+
!L && !u && !N && (L = "Some selected candidate details are unavailable. Refresh the selection before sending.");
|
|
558
|
+
let R = !D && !T && !u && !L && N && P.length > 0 && F && I, z = async () => {
|
|
559
|
+
if (!R) return;
|
|
560
|
+
k(!0), E(!0), w(null), b(M());
|
|
561
|
+
let e = await ie({
|
|
562
|
+
items: P,
|
|
563
|
+
initialAggregate: M(),
|
|
564
|
+
onProgress: v,
|
|
564
565
|
executeChunk: async (e) => {
|
|
565
|
-
let t = (await
|
|
566
|
+
let t = (await X(m, { input: {
|
|
566
567
|
applicationIds: [...e],
|
|
567
|
-
subject:
|
|
568
|
-
message:
|
|
568
|
+
subject: f.trim(),
|
|
569
|
+
message: h
|
|
569
570
|
} }, "BulkSendCustomEmail")).bulkSendCustomEmail;
|
|
570
571
|
if (!t) throw Error("The bulk email request returned no result.");
|
|
571
572
|
let n = {
|
|
@@ -578,84 +579,84 @@ function Y({ open: t, onClose: o, targets: s, selection: c, previewLoading: l, p
|
|
|
578
579
|
message: e.message
|
|
579
580
|
}))
|
|
580
581
|
};
|
|
581
|
-
return
|
|
582
|
+
return O([...e], n), n;
|
|
582
583
|
},
|
|
583
|
-
mergeResult:
|
|
584
|
+
mergeResult: C
|
|
584
585
|
});
|
|
585
|
-
|
|
586
|
+
b(e.aggregate), e.error && w({
|
|
586
587
|
knownCompleted: e.processedItems.length,
|
|
587
588
|
ambiguous: e.ambiguousItems.length,
|
|
588
589
|
notStarted: e.notStartedItems.length,
|
|
589
|
-
message:
|
|
590
|
-
}),
|
|
590
|
+
message: xe(e.error)
|
|
591
|
+
}), re(ae({
|
|
591
592
|
succeeded: e.aggregate.succeeded.length,
|
|
592
593
|
skipped: 0,
|
|
593
594
|
failed: e.aggregate.failed.length,
|
|
594
595
|
ambiguous: !!e.error
|
|
595
|
-
})), k(!1),
|
|
596
|
+
})), k(!1), d.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
|
|
596
597
|
};
|
|
597
|
-
return /* @__PURE__ */
|
|
598
|
+
return /* @__PURE__ */ J(n, {
|
|
598
599
|
open: t,
|
|
599
600
|
onOpenChange: (e) => {
|
|
600
|
-
!e && !
|
|
601
|
+
!e && !D && s();
|
|
601
602
|
},
|
|
602
|
-
children: /* @__PURE__ */
|
|
603
|
+
children: /* @__PURE__ */ Y(r, {
|
|
603
604
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
605
|
+
children: [/* @__PURE__ */ Y(te, { children: [/* @__PURE__ */ J(a, { children: "Send Custom Email" }), /* @__PURE__ */ J(ee, { children: "Send the same branded email — your own subject and message — to every selected candidate, regardless of their stage or round. Useful for progress updates or a closing note to candidates who won't move forward." })] }), T ? /* @__PURE__ */ Y("div", {
|
|
605
606
|
className: "space-y-4",
|
|
606
607
|
children: [
|
|
607
|
-
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
onClick:
|
|
612
|
-
disabled:
|
|
608
|
+
_ ? /* @__PURE__ */ J(se, { progress: _ }) : null,
|
|
609
|
+
/* @__PURE__ */ J(V, { result: y }),
|
|
610
|
+
x ? /* @__PURE__ */ J(U, { details: x }) : null,
|
|
611
|
+
/* @__PURE__ */ J(i, { children: /* @__PURE__ */ J(e, {
|
|
612
|
+
onClick: s,
|
|
613
|
+
disabled: D,
|
|
613
614
|
children: "Done"
|
|
614
615
|
}) })
|
|
615
616
|
]
|
|
616
|
-
}) : /* @__PURE__ */
|
|
617
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
617
618
|
className: "space-y-4",
|
|
618
619
|
children: [
|
|
619
|
-
|
|
620
|
+
u ? /* @__PURE__ */ Y("div", {
|
|
620
621
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
621
|
-
children: [/* @__PURE__ */
|
|
622
|
+
children: [/* @__PURE__ */ J(G, {
|
|
622
623
|
size: 14,
|
|
623
624
|
className: "animate-spin"
|
|
624
625
|
}), "Refreshing candidates…"]
|
|
625
626
|
}) : null,
|
|
626
|
-
L ? /* @__PURE__ */
|
|
627
|
+
L ? /* @__PURE__ */ Y("div", {
|
|
627
628
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
628
629
|
role: "alert",
|
|
629
|
-
children: [/* @__PURE__ */
|
|
630
|
+
children: [/* @__PURE__ */ J(pe, {
|
|
630
631
|
size: 14,
|
|
631
632
|
className: "mt-0.5 shrink-0"
|
|
632
|
-
}), /* @__PURE__ */
|
|
633
|
+
}), /* @__PURE__ */ J("span", { children: L })]
|
|
633
634
|
}) : null,
|
|
634
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(o, {
|
|
635
636
|
htmlFor: "bulk-custom-email-subject",
|
|
636
637
|
children: "Subject"
|
|
637
|
-
}), /* @__PURE__ */
|
|
638
|
+
}), /* @__PURE__ */ J("input", {
|
|
638
639
|
id: "bulk-custom-email-subject",
|
|
639
640
|
type: "text",
|
|
640
|
-
value:
|
|
641
|
-
onChange: (e) =>
|
|
641
|
+
value: f,
|
|
642
|
+
onChange: (e) => p(e.target.value),
|
|
642
643
|
placeholder: "e.g. An update on your application",
|
|
643
644
|
className: "mt-1.5 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/30"
|
|
644
645
|
})] }),
|
|
645
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(o, {
|
|
646
647
|
htmlFor: "bulk-custom-email-message",
|
|
647
648
|
children: "Message"
|
|
648
|
-
}), /* @__PURE__ */
|
|
649
|
+
}), /* @__PURE__ */ J("div", {
|
|
649
650
|
className: "mt-1.5",
|
|
650
|
-
children: /* @__PURE__ */
|
|
651
|
+
children: /* @__PURE__ */ J(S, {
|
|
651
652
|
id: "bulk-custom-email-message",
|
|
652
|
-
value:
|
|
653
|
-
onChange:
|
|
653
|
+
value: h,
|
|
654
|
+
onChange: g,
|
|
654
655
|
placeholder: "Type your message… This will be sent as a branded email to every selected candidate.",
|
|
655
656
|
"aria-required": !0
|
|
656
657
|
})
|
|
657
658
|
})] }),
|
|
658
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ Y("p", {
|
|
659
660
|
className: "text-xs text-text-secondary",
|
|
660
661
|
children: [
|
|
661
662
|
j,
|
|
@@ -665,18 +666,144 @@ function Y({ open: t, onClose: o, targets: s, selection: c, previewLoading: l, p
|
|
|
665
666
|
"will each receive their own copy of this email."
|
|
666
667
|
]
|
|
667
668
|
}),
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ Y(i, { children: [/* @__PURE__ */ J(e, {
|
|
670
|
+
variant: "outline",
|
|
671
|
+
onClick: s,
|
|
672
|
+
disabled: D,
|
|
673
|
+
children: "Cancel"
|
|
674
|
+
}), /* @__PURE__ */ Y(e, {
|
|
675
|
+
onClick: () => void z(),
|
|
676
|
+
disabled: !R,
|
|
677
|
+
children: [D ? /* @__PURE__ */ J(G, {
|
|
678
|
+
size: 16,
|
|
679
|
+
className: "mr-2 animate-spin"
|
|
680
|
+
}) : /* @__PURE__ */ J(K, { size: 16 }), D ? "Sending…" : "Send Email"]
|
|
681
|
+
})] })
|
|
682
|
+
]
|
|
683
|
+
})]
|
|
684
|
+
})
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
function De({ open: t, onClose: d, targets: f, selection: p, previewLoading: m, previewError: h }) {
|
|
688
|
+
let _ = _e(), [v, y] = W(null), [S, C] = W(null), [T, E] = W(N), [D, O] = W(null), [A, j] = W(!1), [M, P] = W(!1);
|
|
689
|
+
de(() => {
|
|
690
|
+
t && (y(null), C(null), E(N()), O(null), j(!1), P(!1));
|
|
691
|
+
}, [t]);
|
|
692
|
+
let F = fe(() => Se(f, p), [p, f]), I = oe(p), L = F.length === I, R = F.map((e) => e.id), z = h;
|
|
693
|
+
!z && !m && !L && (z = "Some selected candidate details are unavailable. Refresh the selection before updating.");
|
|
694
|
+
let B = !M && !A && !m && !z && L && R.length > 0 && v !== null, V = async () => {
|
|
695
|
+
if (!B || v === null) return;
|
|
696
|
+
P(!0), j(!0), O(null), E(N());
|
|
697
|
+
let e = await ie({
|
|
698
|
+
items: R,
|
|
699
|
+
initialAggregate: N(),
|
|
700
|
+
onProgress: C,
|
|
701
|
+
executeChunk: async (e) => {
|
|
702
|
+
let t = (await X(g, { input: {
|
|
703
|
+
applicationIds: [...e],
|
|
704
|
+
status: v
|
|
705
|
+
} }, "BulkUpdateApplicationStatus")).bulkUpdateApplicationStatus;
|
|
706
|
+
if (!t) throw Error("The bulk status update request returned no result.");
|
|
707
|
+
let n = {
|
|
708
|
+
succeeded: t.succeeded.map((e) => ({
|
|
709
|
+
applicationId: e.id,
|
|
710
|
+
status: e.status
|
|
711
|
+
})),
|
|
712
|
+
failed: t.failed.map((e) => ({
|
|
713
|
+
applicationId: e.applicationId,
|
|
714
|
+
message: e.message
|
|
715
|
+
}))
|
|
716
|
+
};
|
|
717
|
+
return k([...e], n), n;
|
|
718
|
+
},
|
|
719
|
+
mergeResult: w
|
|
720
|
+
});
|
|
721
|
+
E(e.aggregate), e.error && O({
|
|
722
|
+
knownCompleted: e.processedItems.length,
|
|
723
|
+
ambiguous: e.ambiguousItems.length,
|
|
724
|
+
notStarted: e.notStartedItems.length,
|
|
725
|
+
message: xe(e.error)
|
|
726
|
+
}), re(ae({
|
|
727
|
+
succeeded: e.aggregate.succeeded.length,
|
|
728
|
+
skipped: 0,
|
|
729
|
+
failed: e.aggregate.failed.length,
|
|
730
|
+
ambiguous: !!e.error
|
|
731
|
+
})), P(!1), _.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
|
|
732
|
+
};
|
|
733
|
+
return /* @__PURE__ */ J(n, {
|
|
734
|
+
open: t,
|
|
735
|
+
onOpenChange: (e) => {
|
|
736
|
+
!e && !M && d();
|
|
737
|
+
},
|
|
738
|
+
children: /* @__PURE__ */ Y(r, {
|
|
739
|
+
className: "sm:max-w-md",
|
|
740
|
+
children: [/* @__PURE__ */ Y(te, { children: [/* @__PURE__ */ J(a, { children: "Update Status" }), /* @__PURE__ */ J(ee, { children: "Set the same status on every selected candidate — e.g. mark everyone you just sent a bulk email as \"Email Sent\" so a later send doesn't reach them twice, then move them back to their real stage once you decide the outcome." })] }), A ? /* @__PURE__ */ Y("div", {
|
|
741
|
+
className: "space-y-4",
|
|
742
|
+
children: [
|
|
743
|
+
S ? /* @__PURE__ */ J(se, { progress: S }) : null,
|
|
744
|
+
/* @__PURE__ */ J(ce, { result: T }),
|
|
745
|
+
D ? /* @__PURE__ */ J(U, { details: D }) : null,
|
|
746
|
+
/* @__PURE__ */ J(i, { children: /* @__PURE__ */ J(e, {
|
|
747
|
+
onClick: d,
|
|
748
|
+
disabled: M,
|
|
749
|
+
children: "Done"
|
|
750
|
+
}) })
|
|
751
|
+
]
|
|
752
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
753
|
+
className: "space-y-4",
|
|
754
|
+
children: [
|
|
755
|
+
m ? /* @__PURE__ */ Y("div", {
|
|
756
|
+
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
757
|
+
children: [/* @__PURE__ */ J(G, {
|
|
758
|
+
size: 14,
|
|
759
|
+
className: "animate-spin"
|
|
760
|
+
}), "Refreshing candidates…"]
|
|
761
|
+
}) : null,
|
|
762
|
+
z ? /* @__PURE__ */ Y("div", {
|
|
763
|
+
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
764
|
+
role: "alert",
|
|
765
|
+
children: [/* @__PURE__ */ J(pe, {
|
|
766
|
+
size: 14,
|
|
767
|
+
className: "mt-0.5 shrink-0"
|
|
768
|
+
}), /* @__PURE__ */ J("span", { children: z })]
|
|
769
|
+
}) : null,
|
|
770
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(o, {
|
|
771
|
+
htmlFor: "bulk-status-update-status",
|
|
772
|
+
children: "New status"
|
|
773
|
+
}), /* @__PURE__ */ Y(s, {
|
|
774
|
+
value: v ?? "",
|
|
775
|
+
onValueChange: (e) => y(e),
|
|
776
|
+
children: [/* @__PURE__ */ J(u, {
|
|
777
|
+
id: "bulk-status-update-status",
|
|
778
|
+
className: "mt-1.5",
|
|
779
|
+
children: /* @__PURE__ */ J(ne, { placeholder: "Select a status" })
|
|
780
|
+
}), /* @__PURE__ */ J(c, { children: x.map((e) => /* @__PURE__ */ J(l, {
|
|
781
|
+
value: e,
|
|
782
|
+
children: b[e] || e
|
|
783
|
+
}, e)) })]
|
|
784
|
+
})] }),
|
|
785
|
+
/* @__PURE__ */ Y("p", {
|
|
786
|
+
className: "text-xs text-text-secondary",
|
|
787
|
+
children: [
|
|
788
|
+
I,
|
|
789
|
+
" selected candidate",
|
|
790
|
+
I === 1 ? "" : "s",
|
|
791
|
+
" ",
|
|
792
|
+
"will be moved to this status."
|
|
793
|
+
]
|
|
794
|
+
}),
|
|
795
|
+
/* @__PURE__ */ Y(i, { children: [/* @__PURE__ */ J(e, {
|
|
669
796
|
variant: "outline",
|
|
670
|
-
onClick:
|
|
671
|
-
disabled:
|
|
797
|
+
onClick: d,
|
|
798
|
+
disabled: M,
|
|
672
799
|
children: "Cancel"
|
|
673
|
-
}), /* @__PURE__ */
|
|
674
|
-
onClick: () => void
|
|
675
|
-
disabled: !
|
|
676
|
-
children: [
|
|
800
|
+
}), /* @__PURE__ */ Y(e, {
|
|
801
|
+
onClick: () => void V(),
|
|
802
|
+
disabled: !B,
|
|
803
|
+
children: [M ? /* @__PURE__ */ J(G, {
|
|
677
804
|
size: 16,
|
|
678
805
|
className: "mr-2 animate-spin"
|
|
679
|
-
}) : /* @__PURE__ */
|
|
806
|
+
}) : /* @__PURE__ */ J(q, { size: 16 }), M ? "Updating…" : "Update Status"]
|
|
680
807
|
})] })
|
|
681
808
|
]
|
|
682
809
|
})]
|
|
@@ -684,6 +811,6 @@ function Y({ open: t, onClose: o, targets: s, selection: c, previewLoading: l, p
|
|
|
684
811
|
});
|
|
685
812
|
}
|
|
686
813
|
//#endregion
|
|
687
|
-
export {
|
|
814
|
+
export { we as AddSelectedToRoundDialog, Ce as BulkCandidateSendDialog, Ee as BulkCustomEmailDialog, De as BulkStatusUpdateDialog, Te as NotifyDuplicateApplicantsDialog, ye as isAssignmentRoundConfig };
|
|
688
815
|
|
|
689
816
|
//# sourceMappingURL=BulkCandidateDialogs.js.map
|