@burdenoff/microfe-support 2026.819.4 → 2026.824.1
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 +48 -0
- package/dist/generated/global-operations.js +134 -116
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +51 -0
- package/dist/generated/global-types.js.map +1 -1
- package/dist/node_modules/@tiptap/react/dist/index.js +25 -25
- package/dist/node_modules/@tiptap/react/dist/index.js.map +1 -1
- package/dist/support/components/careers/BulkCandidateDialogs.d.ts +9 -0
- package/dist/support/components/careers/BulkCandidateDialogs.js +287 -171
- 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 +75 -1
- package/dist/support/components/careers/BulkOperationFeedback.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +217 -176
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/utils/bulkCandidateOperations.d.ts +19 -0
- package/dist/support/utils/bulkCandidateOperations.js +15 -1
- package/dist/support/utils/bulkCandidateOperations.js.map +1 -1
- package/package.json +1 -1
- package/dist/_virtual/_rolldown/runtime.js +0 -7
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -56
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -54
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -54
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -46
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +0 -12
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js +0 -12
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
|
@@ -1,31 +1,31 @@
|
|
|
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
|
|
2
|
-
import { BulkEnsureInterviewRoundsDocument as
|
|
3
|
-
import { InterviewRoundType as
|
|
4
|
-
import { nativeNotify as
|
|
5
|
-
import { aggregateCandidateEmailResult as
|
|
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
|
|
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 o, SelectContent as s, SelectItem as re, SelectTrigger as c, SelectValue as ie, Textarea as l } from "../ui.js";
|
|
2
|
+
import { BulkEnsureInterviewRoundsDocument as u, BulkRandomizeAndSendAssignmentDocument as d, BulkSendRoundMessageDocument as f, NotifyDuplicateApplicantsDocument as p, useGetJobPostingQuery as m } from "../../../generated/global-operations.js";
|
|
3
|
+
import { InterviewRoundType as h } from "../../../generated/global-types.js";
|
|
4
|
+
import { nativeNotify as ae } from "../../../utils/nativeBridge.js";
|
|
5
|
+
import { aggregateCandidateEmailResult as g, aggregateDuplicateNoticeResult as oe, aggregateEnsureRoundResult as _, assertCompleteCandidateEmailChunkResult as v, assertCompleteEnsureRoundChunkResult as y, createEmptyCandidateEmailAggregate as b, createEmptyDuplicateNoticeAggregate as x, createEmptyEnsureRoundAggregate as S, executeSequentialCandidateChunks as se, getBulkOperationNotificationSeverity as ce, getCandidateSelectionCount as le, getSelectedCandidateIds as C, hasCandidateEmailType as w, resolveExactCandidateRounds as T } from "../../utils/bulkCandidateOperations.js";
|
|
6
|
+
import { BulkCandidateActionGuidance as E } from "./BulkCandidateActionGuidance.js";
|
|
7
|
+
import { BulkOperationProgress as ue, CandidateEmailResultDetails as D, DuplicateNoticeResultDetails as O, EnsureRoundResultDetails as k, StoppedBulkOperationNotice as de } from "./BulkOperationFeedback.js";
|
|
8
|
+
import { useEffect as fe, useMemo as pe, useState as A } from "react";
|
|
9
|
+
import { AlertCircle as me, Loader2 as j, Mail as M, Send as N, UserPlus as he } from "lucide-react";
|
|
10
|
+
import { graphqlFetch as P } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
11
|
+
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
12
|
+
import { useApolloClient as ge } from "@apollo/client/react";
|
|
13
|
+
import { print as L } from "graphql";
|
|
14
14
|
//#region src/support/components/careers/BulkCandidateDialogs.tsx
|
|
15
|
-
function
|
|
16
|
-
return e.isAssignmentRound || e.roundType ===
|
|
15
|
+
function R(e) {
|
|
16
|
+
return e.isAssignmentRound || e.roundType === h.TakeHome;
|
|
17
17
|
}
|
|
18
|
-
var
|
|
18
|
+
var _e = {
|
|
19
19
|
message: "ROUND_MESSAGE",
|
|
20
20
|
assignment: "ASSIGNMENT"
|
|
21
21
|
};
|
|
22
|
-
function
|
|
22
|
+
function ve(e) {
|
|
23
23
|
return e instanceof Error ? e.message : "The request failed without an error message.";
|
|
24
24
|
}
|
|
25
|
-
async function
|
|
26
|
-
let r = await
|
|
25
|
+
async function z(e, t, n) {
|
|
26
|
+
let r = await P({
|
|
27
27
|
gateway: "global",
|
|
28
|
-
query:
|
|
28
|
+
query: L(e),
|
|
29
29
|
variables: t,
|
|
30
30
|
operationName: n,
|
|
31
31
|
skipAuthRetry: !0
|
|
@@ -34,39 +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
|
|
38
|
-
let n =
|
|
37
|
+
function ye(e, t) {
|
|
38
|
+
let n = C(t);
|
|
39
39
|
return e.filter((e) => n.has(e.id));
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
let
|
|
43
|
-
variables: { id:
|
|
44
|
-
skip: !
|
|
41
|
+
function B({ mode: u, open: p, onClose: h, onOpenAddRound: oe, targets: _, selection: y, jobPostingId: x, previewLoading: S, previewError: C }) {
|
|
42
|
+
let O = ge(), [k, M] = A(""), [P, L] = A(""), [B, V] = A(!1), [H, U] = A(null), [be, W] = A(b), [G, K] = A(null), [xe, q] = A(!1), [J, Se] = A(!1), { data: Ce, loading: we, error: Te } = m({
|
|
43
|
+
variables: { id: x },
|
|
44
|
+
skip: !p || !x,
|
|
45
45
|
fetchPolicy: "network-only"
|
|
46
46
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, [
|
|
50
|
-
let
|
|
47
|
+
fe(() => {
|
|
48
|
+
p && (M(""), L(""), V(!1), U(null), W(b()), K(null), q(!1), Se(!1));
|
|
49
|
+
}, [p, u]);
|
|
50
|
+
let Ee = pe(() => ye(_, y), [y, _]), De = le(y), Oe = Ee.length === De, ke = Ce?.jobPosting?.rounds ?? [], Ae = ke.filter((e) => u !== "assignment" || R(e)), Y = ke.find((e) => e.id === k), X = Y ? T(Ee, Y.id) : {
|
|
51
51
|
pairs: [],
|
|
52
52
|
unresolved: []
|
|
53
|
-
}, je = X.unresolved.filter((e) => e.reason === "MISSING").length, Me = X.unresolved.filter((e) => e.reason === "AMBIGUOUS").length, Ne =
|
|
54
|
-
!Q &&
|
|
53
|
+
}, je = X.unresolved.filter((e) => e.reason === "MISSING").length, Me = X.unresolved.filter((e) => e.reason === "AMBIGUOUS").length, Ne = _e[u], Pe = X.pairs.filter(({ round: e }) => w(e, Ne)).length, Z = X.pairs.filter(({ round: e }) => B || !w(e, Ne)).length, Fe = Ee.some((e) => e.jobPostingId !== x), Q = C;
|
|
54
|
+
!Q && Te ? Q = "Could not load the posting rounds. Nothing will be sent." : !Q && !S && !Oe ? 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 && k && !we && !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
55
|
let Ie = async () => {
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
let e = await
|
|
56
|
+
if (J || xe || S || we || Q || !Oe || !Y || X.pairs.length === 0 || Z === 0 || u === "message" && !P.trim()) return;
|
|
57
|
+
Se(!0), q(!0), K(null), W(b());
|
|
58
|
+
let e = await se({
|
|
59
59
|
items: X.pairs.map(({ applicationId: e, roundId: t }) => ({
|
|
60
60
|
applicationId: e,
|
|
61
61
|
roundId: t
|
|
62
62
|
})),
|
|
63
|
-
initialAggregate:
|
|
64
|
-
onProgress:
|
|
63
|
+
initialAggregate: b(),
|
|
64
|
+
onProgress: U,
|
|
65
65
|
executeChunk: async (e) => {
|
|
66
|
-
if (
|
|
67
|
-
let t = (await
|
|
66
|
+
if (u === "assignment") {
|
|
67
|
+
let t = (await z(d, { input: {
|
|
68
68
|
items: [...e],
|
|
69
|
-
force:
|
|
69
|
+
force: B
|
|
70
70
|
} }, "BulkRandomizeAndSendAssignment")).bulkRandomizeAndSendAssignment;
|
|
71
71
|
if (!t) throw Error("The assignment request returned no result.");
|
|
72
72
|
let n = {
|
|
@@ -86,12 +86,12 @@ function A({ mode: s, open: u, onClose: f, onOpenAddRound: ue, targets: h, selec
|
|
|
86
86
|
message: e.message
|
|
87
87
|
}))
|
|
88
88
|
};
|
|
89
|
-
return
|
|
89
|
+
return v(e, n), n;
|
|
90
90
|
}
|
|
91
|
-
let t = (await
|
|
91
|
+
let t = (await z(f, { input: {
|
|
92
92
|
items: [...e],
|
|
93
|
-
message:
|
|
94
|
-
force:
|
|
93
|
+
message: P.trim(),
|
|
94
|
+
force: B
|
|
95
95
|
} }, "BulkSendRoundMessage")).bulkSendRoundMessage;
|
|
96
96
|
if (!t) throw Error("The message request returned no result.");
|
|
97
97
|
let n = {
|
|
@@ -111,80 +111,80 @@ function A({ mode: s, open: u, onClose: f, onOpenAddRound: ue, targets: h, selec
|
|
|
111
111
|
message: e.message
|
|
112
112
|
}))
|
|
113
113
|
};
|
|
114
|
-
return
|
|
114
|
+
return v(e, n), n;
|
|
115
115
|
},
|
|
116
|
-
mergeResult:
|
|
116
|
+
mergeResult: g
|
|
117
117
|
});
|
|
118
|
-
|
|
118
|
+
W(e.aggregate), e.error && K({
|
|
119
119
|
knownCompleted: e.processedItems.length,
|
|
120
120
|
ambiguous: e.ambiguousItems.length,
|
|
121
121
|
notStarted: e.notStartedItems.length,
|
|
122
|
-
message:
|
|
123
|
-
}),
|
|
122
|
+
message: ve(e.error)
|
|
123
|
+
}), ae(ce({
|
|
124
124
|
succeeded: e.aggregate.succeeded.length,
|
|
125
125
|
skipped: e.aggregate.skipped.length,
|
|
126
126
|
failed: e.aggregate.failed.length,
|
|
127
127
|
ambiguous: !!e.error
|
|
128
|
-
})),
|
|
129
|
-
}, $ =
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
-
open:
|
|
128
|
+
})), Se(!1), O.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
|
|
129
|
+
}, $ = S || we;
|
|
130
|
+
return /* @__PURE__ */ F(n, {
|
|
131
|
+
open: p,
|
|
132
132
|
onOpenChange: (e) => {
|
|
133
|
-
!e && !
|
|
133
|
+
!e && !J && h();
|
|
134
134
|
},
|
|
135
|
-
children: /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ I(r, {
|
|
136
136
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
137
137
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
action:
|
|
138
|
+
/* @__PURE__ */ I(te, { children: [/* @__PURE__ */ F(ne, { children: u === "assignment" ? "Assign & Email Random Take-Home" : "Send Message" }), /* @__PURE__ */ F(ee, { children: "Choose one configured round for the candidates in the filtered posting." })] }),
|
|
139
|
+
/* @__PURE__ */ F(E, {
|
|
140
|
+
action: u,
|
|
141
141
|
unresolvedCount: je
|
|
142
142
|
}),
|
|
143
|
-
|
|
143
|
+
xe ? /* @__PURE__ */ I("div", {
|
|
144
144
|
className: "space-y-4",
|
|
145
145
|
children: [
|
|
146
|
-
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
onClick:
|
|
151
|
-
disabled:
|
|
146
|
+
H ? /* @__PURE__ */ F(ue, { progress: H }) : null,
|
|
147
|
+
/* @__PURE__ */ F(D, { result: be }),
|
|
148
|
+
G ? /* @__PURE__ */ F(de, { details: G }) : null,
|
|
149
|
+
/* @__PURE__ */ F(i, { children: /* @__PURE__ */ F(e, {
|
|
150
|
+
onClick: h,
|
|
151
|
+
disabled: J,
|
|
152
152
|
children: "Done"
|
|
153
153
|
}) })
|
|
154
154
|
]
|
|
155
|
-
}) : /* @__PURE__ */
|
|
155
|
+
}) : /* @__PURE__ */ I("div", {
|
|
156
156
|
className: "space-y-4",
|
|
157
157
|
children: [
|
|
158
|
-
$ ? /* @__PURE__ */
|
|
158
|
+
$ ? /* @__PURE__ */ I("div", {
|
|
159
159
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ F(j, {
|
|
161
161
|
size: 14,
|
|
162
162
|
className: "animate-spin"
|
|
163
163
|
}), "Refreshing candidates and configured rounds…"]
|
|
164
164
|
}) : null,
|
|
165
|
-
Q ? /* @__PURE__ */
|
|
165
|
+
Q ? /* @__PURE__ */ I("div", {
|
|
166
166
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
167
167
|
role: "alert",
|
|
168
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ F(me, {
|
|
169
169
|
size: 14,
|
|
170
170
|
className: "mt-0.5 shrink-0"
|
|
171
|
-
}), /* @__PURE__ */
|
|
171
|
+
}), /* @__PURE__ */ F("span", { children: Q })]
|
|
172
172
|
}) : null,
|
|
173
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ I("div", {
|
|
174
174
|
className: "space-y-1.5",
|
|
175
175
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ F(a, {
|
|
177
177
|
htmlFor: "bulk-round-config",
|
|
178
178
|
children: "Target round"
|
|
179
179
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
value:
|
|
180
|
+
/* @__PURE__ */ I(o, {
|
|
181
|
+
value: k,
|
|
182
182
|
onValueChange: M,
|
|
183
183
|
disabled: $ || !!Q,
|
|
184
|
-
children: [/* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ F(c, {
|
|
185
185
|
id: "bulk-round-config",
|
|
186
|
-
children: /* @__PURE__ */
|
|
187
|
-
}), /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ F(ie, { placeholder: "Select a round" })
|
|
187
|
+
}), /* @__PURE__ */ F(s, { children: Ae.map((e) => /* @__PURE__ */ I(re, {
|
|
188
188
|
value: e.id,
|
|
189
189
|
children: [
|
|
190
190
|
"Round ",
|
|
@@ -194,35 +194,35 @@ function A({ mode: s, open: u, onClose: f, onOpenAddRound: ue, targets: h, selec
|
|
|
194
194
|
]
|
|
195
195
|
}, e.id)) })]
|
|
196
196
|
}),
|
|
197
|
-
Ae.length === 0 && !$ && !Q ? /* @__PURE__ */
|
|
197
|
+
Ae.length === 0 && !$ && !Q ? /* @__PURE__ */ F("p", {
|
|
198
198
|
className: "text-xs text-status-warning-text",
|
|
199
|
-
children:
|
|
199
|
+
children: u === "assignment" ? "This posting has no configured assignment round." : "This posting has no configured interview rounds."
|
|
200
200
|
}) : null
|
|
201
201
|
]
|
|
202
202
|
}),
|
|
203
|
-
|
|
203
|
+
u === "message" ? /* @__PURE__ */ I("div", {
|
|
204
204
|
className: "space-y-1.5",
|
|
205
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ F(a, {
|
|
206
206
|
htmlFor: "bulk-message",
|
|
207
207
|
children: "Free-text message"
|
|
208
|
-
}), /* @__PURE__ */
|
|
208
|
+
}), /* @__PURE__ */ F(l, {
|
|
209
209
|
id: "bulk-message",
|
|
210
|
-
value:
|
|
211
|
-
onChange: (e) =>
|
|
210
|
+
value: P,
|
|
211
|
+
onChange: (e) => L(e.target.value),
|
|
212
212
|
placeholder: "Write the message sent to each candidate",
|
|
213
213
|
rows: 5
|
|
214
214
|
})]
|
|
215
215
|
}) : null,
|
|
216
|
-
|
|
216
|
+
k && !$ && !Q ? /* @__PURE__ */ I("div", {
|
|
217
217
|
className: "space-y-2 rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-xs text-text-secondary",
|
|
218
218
|
children: [
|
|
219
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ F("p", {
|
|
220
220
|
className: "font-medium text-text-primary",
|
|
221
221
|
children: "Preview"
|
|
222
222
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ I("p", { children: [
|
|
224
224
|
"Will send to ",
|
|
225
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ F("span", {
|
|
226
226
|
className: "font-semibold",
|
|
227
227
|
children: Z
|
|
228
228
|
}),
|
|
@@ -230,41 +230,41 @@ function A({ mode: s, open: u, onClose: f, onOpenAddRound: ue, targets: h, selec
|
|
|
230
230
|
Z === 1 ? "" : "s",
|
|
231
231
|
"."
|
|
232
232
|
] }),
|
|
233
|
-
Pe > 0 ? /* @__PURE__ */
|
|
233
|
+
Pe > 0 ? /* @__PURE__ */ I("p", { children: [
|
|
234
234
|
Pe,
|
|
235
235
|
" already received this email type",
|
|
236
236
|
" ",
|
|
237
|
-
|
|
237
|
+
B ? "(force will send again)" : "(the backend will skip them)",
|
|
238
238
|
"."
|
|
239
239
|
] }) : null,
|
|
240
|
-
je > 0 ? /* @__PURE__ */
|
|
240
|
+
je > 0 ? /* @__PURE__ */ I(e, {
|
|
241
241
|
type: "button",
|
|
242
242
|
size: "sm",
|
|
243
243
|
variant: "outline",
|
|
244
|
-
onClick:
|
|
245
|
-
children: [/* @__PURE__ */
|
|
244
|
+
onClick: oe,
|
|
245
|
+
children: [/* @__PURE__ */ F(he, { size: 14 }), "Add Selected to Round"]
|
|
246
246
|
}) : null,
|
|
247
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ I("label", {
|
|
248
248
|
className: "flex cursor-pointer items-start gap-2 pt-1",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
250
|
-
checked:
|
|
251
|
-
onCheckedChange: (e) =>
|
|
252
|
-
}), /* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ F(t, {
|
|
250
|
+
checked: B,
|
|
251
|
+
onCheckedChange: (e) => V(e === !0)
|
|
252
|
+
}), /* @__PURE__ */ F("span", { children: "Force resend to candidates with a prior email. Force sends are non-idempotent and are never retried automatically." })]
|
|
253
253
|
})
|
|
254
254
|
]
|
|
255
255
|
}) : null,
|
|
256
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ I(i, { children: [/* @__PURE__ */ F(e, {
|
|
257
257
|
variant: "outline",
|
|
258
|
-
onClick:
|
|
259
|
-
disabled:
|
|
258
|
+
onClick: h,
|
|
259
|
+
disabled: J,
|
|
260
260
|
children: "Cancel"
|
|
261
|
-
}), /* @__PURE__ */
|
|
261
|
+
}), /* @__PURE__ */ I(e, {
|
|
262
262
|
onClick: () => void Ie(),
|
|
263
|
-
disabled:
|
|
264
|
-
children: [
|
|
263
|
+
disabled: J || $ || !!Q || !Oe || !k || X.pairs.length === 0 || Z === 0 || u === "message" && !P.trim(),
|
|
264
|
+
children: [J ? /* @__PURE__ */ F(j, {
|
|
265
265
|
size: 16,
|
|
266
266
|
className: "mr-2 animate-spin"
|
|
267
|
-
}) : /* @__PURE__ */
|
|
267
|
+
}) : /* @__PURE__ */ F(N, { size: 16 }), J ? "Sending…" : "Send"]
|
|
268
268
|
})] })
|
|
269
269
|
]
|
|
270
270
|
})
|
|
@@ -272,28 +272,28 @@ function A({ mode: s, open: u, onClose: f, onOpenAddRound: ue, targets: h, selec
|
|
|
272
272
|
})
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
|
-
function
|
|
276
|
-
let
|
|
277
|
-
variables: { id:
|
|
278
|
-
skip: !t || !
|
|
275
|
+
function V({ open: t, onClose: l, targets: d, selection: f, jobPostingId: p, previewLoading: h, previewError: g }) {
|
|
276
|
+
let oe = ge(), [v, b] = A(""), [x, C] = A(null), [w, T] = A(S), [E, D] = A(null), [O, M] = A(!1), [N, P] = A(!1), { data: L, loading: R, error: _e } = m({
|
|
277
|
+
variables: { id: p },
|
|
278
|
+
skip: !t || !p,
|
|
279
279
|
fetchPolicy: "network-only"
|
|
280
280
|
});
|
|
281
|
-
|
|
282
|
-
t && (
|
|
281
|
+
fe(() => {
|
|
282
|
+
t && (b(""), C(null), T(S()), D(null), M(!1), P(!1));
|
|
283
283
|
}, [t]);
|
|
284
|
-
let
|
|
285
|
-
!
|
|
286
|
-
let
|
|
287
|
-
if (
|
|
288
|
-
|
|
289
|
-
let e = await
|
|
290
|
-
items:
|
|
291
|
-
initialAggregate:
|
|
292
|
-
onProgress:
|
|
284
|
+
let B = pe(() => ye(d, f), [f, d]), V = le(f), H = B.length === V, U = B.map((e) => e.id), be = B.some((e) => e.jobPostingId !== p), W = L?.jobPosting?.rounds ?? [], G = W.find((e) => e.id === v), K = g;
|
|
285
|
+
!K && _e ? K = "Could not load the posting rounds. Nothing will be changed." : !K && !h && !H ? K = "Some selected candidate details are unavailable. Refresh the selection before adding rounds." : !K && be ? K = "Some selected candidates do not belong to the filtered posting." : !K && v && !R && !G && (K = "The selected round is no longer available. Choose another round.");
|
|
286
|
+
let xe = async () => {
|
|
287
|
+
if (N || O || h || R || K || !H || !G || U.length === 0) return;
|
|
288
|
+
P(!0), M(!0), D(null), T(S());
|
|
289
|
+
let e = await se({
|
|
290
|
+
items: U,
|
|
291
|
+
initialAggregate: S(),
|
|
292
|
+
onProgress: C,
|
|
293
293
|
executeChunk: async (e) => {
|
|
294
|
-
let t = (await
|
|
295
|
-
jobPostingId:
|
|
296
|
-
roundConfigId:
|
|
294
|
+
let t = (await z(u, { input: {
|
|
295
|
+
jobPostingId: p,
|
|
296
|
+
roundConfigId: G.id,
|
|
297
297
|
applicationIds: [...e]
|
|
298
298
|
} }, "BulkEnsureInterviewRounds")).bulkEnsureInterviewRounds;
|
|
299
299
|
if (!t) throw Error("The add-to-round request returned no result.");
|
|
@@ -312,80 +312,80 @@ function j({ open: t, onClose: o, targets: c, selection: l, jobPostingId: u, pre
|
|
|
312
312
|
message: e.message
|
|
313
313
|
}))
|
|
314
314
|
};
|
|
315
|
-
return
|
|
315
|
+
return y(e, n), n;
|
|
316
316
|
},
|
|
317
|
-
mergeResult:
|
|
317
|
+
mergeResult: _
|
|
318
318
|
});
|
|
319
|
-
|
|
319
|
+
T(e.aggregate), e.error && D({
|
|
320
320
|
knownCompleted: e.processedItems.length,
|
|
321
321
|
ambiguous: e.ambiguousItems.length,
|
|
322
322
|
notStarted: e.notStartedItems.length,
|
|
323
|
-
message:
|
|
324
|
-
}),
|
|
323
|
+
message: ve(e.error)
|
|
324
|
+
}), ae(ce({
|
|
325
325
|
succeeded: e.aggregate.created.length + e.aggregate.alreadyPresent.length,
|
|
326
326
|
skipped: 0,
|
|
327
327
|
failed: e.aggregate.failed.length,
|
|
328
328
|
ambiguous: !!e.error
|
|
329
|
-
})),
|
|
330
|
-
},
|
|
331
|
-
return /* @__PURE__ */
|
|
329
|
+
})), P(!1), oe.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
|
|
330
|
+
}, q = h || R;
|
|
331
|
+
return /* @__PURE__ */ F(n, {
|
|
332
332
|
open: t,
|
|
333
333
|
onOpenChange: (e) => {
|
|
334
|
-
!e && !
|
|
334
|
+
!e && !N && l();
|
|
335
335
|
},
|
|
336
|
-
children: /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ I(r, {
|
|
337
337
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
338
338
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ I(te, { children: [/* @__PURE__ */ F(ne, { children: "Add Selected to Round" }), /* @__PURE__ */ F(ee, { children: "Add every selected candidate in this posting to one configured interview round." })] }),
|
|
340
|
+
/* @__PURE__ */ F("div", {
|
|
341
341
|
className: "rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
|
|
342
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."
|
|
343
343
|
}),
|
|
344
|
-
O ? /* @__PURE__ */
|
|
344
|
+
O ? /* @__PURE__ */ I("div", {
|
|
345
345
|
className: "space-y-4",
|
|
346
346
|
children: [
|
|
347
|
-
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
-
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
onClick:
|
|
352
|
-
disabled:
|
|
347
|
+
x ? /* @__PURE__ */ F(ue, { progress: x }) : null,
|
|
348
|
+
/* @__PURE__ */ F(k, { result: w }),
|
|
349
|
+
E ? /* @__PURE__ */ F(de, { details: E }) : null,
|
|
350
|
+
/* @__PURE__ */ F(i, { children: /* @__PURE__ */ F(e, {
|
|
351
|
+
onClick: l,
|
|
352
|
+
disabled: N,
|
|
353
353
|
children: "Done"
|
|
354
354
|
}) })
|
|
355
355
|
]
|
|
356
|
-
}) : /* @__PURE__ */
|
|
356
|
+
}) : /* @__PURE__ */ I("div", {
|
|
357
357
|
className: "space-y-4",
|
|
358
358
|
children: [
|
|
359
|
-
|
|
359
|
+
q ? /* @__PURE__ */ I("div", {
|
|
360
360
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ F(j, {
|
|
362
362
|
size: 14,
|
|
363
363
|
className: "animate-spin"
|
|
364
364
|
}), "Refreshing candidates and configured rounds…"]
|
|
365
365
|
}) : null,
|
|
366
|
-
|
|
366
|
+
K ? /* @__PURE__ */ I("div", {
|
|
367
367
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
368
368
|
role: "alert",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ F(me, {
|
|
370
370
|
size: 14,
|
|
371
371
|
className: "mt-0.5 shrink-0"
|
|
372
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ F("span", { children: K })]
|
|
373
373
|
}) : null,
|
|
374
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ I("div", {
|
|
375
375
|
className: "space-y-1.5",
|
|
376
376
|
children: [
|
|
377
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ F(a, {
|
|
378
378
|
htmlFor: "ensure-round-config",
|
|
379
379
|
children: "Interview round"
|
|
380
380
|
}),
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
value:
|
|
383
|
-
onValueChange:
|
|
384
|
-
disabled:
|
|
385
|
-
children: [/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ I(o, {
|
|
382
|
+
value: v,
|
|
383
|
+
onValueChange: b,
|
|
384
|
+
disabled: q || !!K,
|
|
385
|
+
children: [/* @__PURE__ */ F(c, {
|
|
386
386
|
id: "ensure-round-config",
|
|
387
|
-
children: /* @__PURE__ */
|
|
388
|
-
}), /* @__PURE__ */
|
|
387
|
+
children: /* @__PURE__ */ F(ie, { placeholder: "Select a round" })
|
|
388
|
+
}), /* @__PURE__ */ F(s, { children: W.map((e) => /* @__PURE__ */ I(re, {
|
|
389
389
|
value: e.id,
|
|
390
390
|
children: [
|
|
391
391
|
"Round ",
|
|
@@ -395,34 +395,150 @@ function j({ open: t, onClose: o, targets: c, selection: l, jobPostingId: u, pre
|
|
|
395
395
|
]
|
|
396
396
|
}, e.id)) })]
|
|
397
397
|
}),
|
|
398
|
-
|
|
398
|
+
W.length === 0 && !q && !K ? /* @__PURE__ */ F("p", {
|
|
399
399
|
className: "text-xs text-status-warning-text",
|
|
400
400
|
children: "This posting has no configured interview rounds."
|
|
401
401
|
}) : null
|
|
402
402
|
]
|
|
403
403
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ I("p", {
|
|
405
405
|
className: "text-xs text-text-secondary",
|
|
406
406
|
children: [
|
|
407
|
-
|
|
407
|
+
V,
|
|
408
408
|
" selected candidate",
|
|
409
|
-
|
|
409
|
+
V === 1 ? "" : "s",
|
|
410
410
|
" ",
|
|
411
411
|
"will be checked. Existing target rounds are reported as already present."
|
|
412
412
|
]
|
|
413
413
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ I(i, { children: [/* @__PURE__ */ F(e, {
|
|
415
415
|
variant: "outline",
|
|
416
|
-
onClick:
|
|
417
|
-
disabled:
|
|
416
|
+
onClick: l,
|
|
417
|
+
disabled: N,
|
|
418
418
|
children: "Cancel"
|
|
419
|
-
}), /* @__PURE__ */
|
|
420
|
-
onClick: () => void
|
|
421
|
-
disabled:
|
|
422
|
-
children: [
|
|
419
|
+
}), /* @__PURE__ */ I(e, {
|
|
420
|
+
onClick: () => void xe(),
|
|
421
|
+
disabled: N || q || !!K || !H || !v || U.length === 0,
|
|
422
|
+
children: [N ? /* @__PURE__ */ F(j, {
|
|
423
423
|
size: 16,
|
|
424
424
|
className: "mr-2 animate-spin"
|
|
425
|
-
}) : /* @__PURE__ */
|
|
425
|
+
}) : /* @__PURE__ */ F(he, { size: 16 }), N ? "Adding…" : "Add Selected to Round"]
|
|
426
|
+
})] })
|
|
427
|
+
]
|
|
428
|
+
})
|
|
429
|
+
]
|
|
430
|
+
})
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
function H({ open: t, onClose: a, targets: o, selection: s, jobPostingId: re, previewLoading: c, previewError: ie }) {
|
|
434
|
+
let l = ge(), [u, d] = A(null), [f, m] = A(x), [h, g] = A(null), [_, v] = A(!1), [y, b] = A(!1);
|
|
435
|
+
fe(() => {
|
|
436
|
+
t && (d(null), m(x()), g(null), v(!1), b(!1));
|
|
437
|
+
}, [t]);
|
|
438
|
+
let S = pe(() => ye(o, s), [s, o]), C = le(s), w = S.length === C, T = S.map((e) => e.id), E = S.some((e) => e.jobPostingId !== re), D = ie;
|
|
439
|
+
!D && !c && !w ? D = "Some selected candidate details are unavailable. Refresh the selection before notifying." : !D && E && (D = "Some selected candidates do not belong to the filtered posting.");
|
|
440
|
+
let k = async () => {
|
|
441
|
+
if (y || _ || c || D || !w || T.length === 0) return;
|
|
442
|
+
b(!0), v(!0), g(null), m(x());
|
|
443
|
+
let e = await se({
|
|
444
|
+
items: T,
|
|
445
|
+
initialAggregate: x(),
|
|
446
|
+
onProgress: d,
|
|
447
|
+
executeChunk: async (e) => {
|
|
448
|
+
let t = (await z(p, { input: { applicationIds: [...e] } }, "NotifyDuplicateApplicants")).notifyDuplicateApplicants;
|
|
449
|
+
if (!t) throw Error("The duplicate-notice request returned no result.");
|
|
450
|
+
return {
|
|
451
|
+
succeeded: t.succeeded.map((e) => ({ email: e.email })),
|
|
452
|
+
skipped: t.skipped.map((e) => ({
|
|
453
|
+
email: e.email,
|
|
454
|
+
reason: e.reason,
|
|
455
|
+
message: e.message
|
|
456
|
+
})),
|
|
457
|
+
failed: t.failed.map((e) => ({
|
|
458
|
+
email: e.email,
|
|
459
|
+
message: e.message
|
|
460
|
+
}))
|
|
461
|
+
};
|
|
462
|
+
},
|
|
463
|
+
mergeResult: oe
|
|
464
|
+
});
|
|
465
|
+
m(e.aggregate), e.error && g({
|
|
466
|
+
knownCompleted: e.processedItems.length,
|
|
467
|
+
ambiguous: e.ambiguousItems.length,
|
|
468
|
+
notStarted: e.notStartedItems.length,
|
|
469
|
+
message: ve(e.error)
|
|
470
|
+
}), ae(ce({
|
|
471
|
+
succeeded: e.aggregate.succeeded.length,
|
|
472
|
+
skipped: e.aggregate.skipped.length,
|
|
473
|
+
failed: e.aggregate.failed.length,
|
|
474
|
+
ambiguous: !!e.error
|
|
475
|
+
})), b(!1), l.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
|
|
476
|
+
};
|
|
477
|
+
return /* @__PURE__ */ F(n, {
|
|
478
|
+
open: t,
|
|
479
|
+
onOpenChange: (e) => {
|
|
480
|
+
!e && !y && a();
|
|
481
|
+
},
|
|
482
|
+
children: /* @__PURE__ */ I(r, {
|
|
483
|
+
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
484
|
+
children: [
|
|
485
|
+
/* @__PURE__ */ I(te, { children: [/* @__PURE__ */ F(ne, { children: "Notify Duplicate Applicants" }), /* @__PURE__ */ F(ee, { children: "Let candidates with more than one application know they only need to complete one take-home assignment." })] }),
|
|
486
|
+
/* @__PURE__ */ F("div", {
|
|
487
|
+
className: "rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
|
|
488
|
+
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."
|
|
489
|
+
}),
|
|
490
|
+
_ ? /* @__PURE__ */ I("div", {
|
|
491
|
+
className: "space-y-4",
|
|
492
|
+
children: [
|
|
493
|
+
u ? /* @__PURE__ */ F(ue, { progress: u }) : null,
|
|
494
|
+
/* @__PURE__ */ F(O, { result: f }),
|
|
495
|
+
h ? /* @__PURE__ */ F(de, { details: h }) : null,
|
|
496
|
+
/* @__PURE__ */ F(i, { children: /* @__PURE__ */ F(e, {
|
|
497
|
+
onClick: a,
|
|
498
|
+
disabled: y,
|
|
499
|
+
children: "Done"
|
|
500
|
+
}) })
|
|
501
|
+
]
|
|
502
|
+
}) : /* @__PURE__ */ I("div", {
|
|
503
|
+
className: "space-y-4",
|
|
504
|
+
children: [
|
|
505
|
+
c ? /* @__PURE__ */ I("div", {
|
|
506
|
+
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
507
|
+
children: [/* @__PURE__ */ F(j, {
|
|
508
|
+
size: 14,
|
|
509
|
+
className: "animate-spin"
|
|
510
|
+
}), "Refreshing candidates…"]
|
|
511
|
+
}) : null,
|
|
512
|
+
D ? /* @__PURE__ */ I("div", {
|
|
513
|
+
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
514
|
+
role: "alert",
|
|
515
|
+
children: [/* @__PURE__ */ F(me, {
|
|
516
|
+
size: 14,
|
|
517
|
+
className: "mt-0.5 shrink-0"
|
|
518
|
+
}), /* @__PURE__ */ F("span", { children: D })]
|
|
519
|
+
}) : null,
|
|
520
|
+
/* @__PURE__ */ I("p", {
|
|
521
|
+
className: "text-xs text-text-secondary",
|
|
522
|
+
children: [
|
|
523
|
+
C,
|
|
524
|
+
" selected application",
|
|
525
|
+
C === 1 ? "" : "s",
|
|
526
|
+
" ",
|
|
527
|
+
"will be checked and grouped by email."
|
|
528
|
+
]
|
|
529
|
+
}),
|
|
530
|
+
/* @__PURE__ */ I(i, { children: [/* @__PURE__ */ F(e, {
|
|
531
|
+
variant: "outline",
|
|
532
|
+
onClick: a,
|
|
533
|
+
disabled: y,
|
|
534
|
+
children: "Cancel"
|
|
535
|
+
}), /* @__PURE__ */ I(e, {
|
|
536
|
+
onClick: () => void k(),
|
|
537
|
+
disabled: y || c || !!D || !w || T.length === 0,
|
|
538
|
+
children: [y ? /* @__PURE__ */ F(j, {
|
|
539
|
+
size: 16,
|
|
540
|
+
className: "mr-2 animate-spin"
|
|
541
|
+
}) : /* @__PURE__ */ F(M, { size: 16 }), y ? "Notifying…" : "Notify Duplicate Applicants"]
|
|
426
542
|
})] })
|
|
427
543
|
]
|
|
428
544
|
})
|
|
@@ -431,6 +547,6 @@ function j({ open: t, onClose: o, targets: c, selection: l, jobPostingId: u, pre
|
|
|
431
547
|
});
|
|
432
548
|
}
|
|
433
549
|
//#endregion
|
|
434
|
-
export {
|
|
550
|
+
export { V as AddSelectedToRoundDialog, B as BulkCandidateSendDialog, H as NotifyDuplicateApplicantsDialog, R as isAssignmentRoundConfig };
|
|
435
551
|
|
|
436
552
|
//# sourceMappingURL=BulkCandidateDialogs.js.map
|