@burdenoff/microfe-support 2026.817.2 → 2026.818.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 +220 -0
- package/dist/generated/global-operations.js +318 -189
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +1646 -631
- package/dist/generated/global-types.js.map +1 -1
- package/dist/support/SupportAdminRoot.js +3 -3
- package/dist/support/SupportAdminRoot.js.map +1 -1
- package/dist/support/components/ui.d.ts +1 -1
- package/dist/support/components/ui.js +2 -2
- package/dist/support/constants/pipeline.d.ts +15 -0
- package/dist/support/constants/pipeline.js +73 -0
- package/dist/support/constants/pipeline.js.map +1 -0
- package/dist/support/pages/ContactInquiriesPage.js +1 -1
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/JobApplicationDetailPage.js +685 -592
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +991 -268
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/pages/JobPostingDetailPage.js +410 -233
- package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
- package/dist/support/pages/JobPostingsPage.js +383 -247
- package/dist/support/pages/JobPostingsPage.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,39 +1,21 @@
|
|
|
1
|
-
import { Badge as e, Button as t,
|
|
2
|
-
import { useGetJobApplicationsQuery as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { Badge as e, Button as t, Checkbox as n, Dialog as r, DialogContent as i, DialogDescription as a, DialogFooter as ee, DialogHeader as te, DialogTitle as ne, Input as o, Label as s, Select as re, SelectContent as ie, SelectItem as ae, SelectTrigger as oe, SelectValue as se, Textarea as ce } from "../components/ui.js";
|
|
2
|
+
import { useBulkRandomizeAndSendAssignmentMutation as le, useBulkSendRoundMessageMutation as ue, useCreateJobApplicationMutation as c, useGetJobApplicationsQuery as l, useGetJobPostingQuery as u, useGetJobPostingsQuery as de } from "../../generated/global-operations.js";
|
|
3
|
+
import { JobPostingStatus as d } from "../../generated/global-types.js";
|
|
4
|
+
import { nativeNotify as f } from "../../utils/nativeBridge.js";
|
|
5
|
+
import { roundStatusConfig as fe, roundStatusOrder as p, statusColors as m, statusLabels as h, statusOrder as g } from "../constants/pipeline.js";
|
|
6
|
+
import { useEffect as _, useRef as v, useState as y } from "react";
|
|
7
|
+
import { AlertCircle as pe, Briefcase as b, CheckCircle2 as me, ChevronDown as he, Filter as x, Grid as ge, List as _e, Loader2 as S, Paperclip as C, Plus as ve, Search as ye, Send as be, Shuffle as w, SkipForward as T, UserPlus as E, XCircle as xe } from "lucide-react";
|
|
8
|
+
import { useLocation as Se, useNavigate as D } from "react-router";
|
|
9
|
+
import { graphqlFetch as Ce } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
10
|
+
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
11
|
+
import { IllustratedEmptyState as we, PagePurpose as Te } from "@burdenoff/fe-libs/ui";
|
|
10
12
|
//#region src/support/pages/JobApplicationsPage.tsx
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
a.Rejected,
|
|
18
|
-
a.Archived
|
|
19
|
-
], C = {
|
|
20
|
-
NEW: "bg-status-info-bg-subtle text-status-info-text",
|
|
21
|
-
SCREENING: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
22
|
-
SHORTLISTED: "bg-accent-purple-subtle text-accent-purple",
|
|
23
|
-
INTERVIEW: "bg-accent-blue-subtle text-accent-blue",
|
|
24
|
-
HIRED: "bg-status-success-bg-subtle text-status-success-text",
|
|
25
|
-
REJECTED: "bg-status-error-bg-subtle text-status-error-text",
|
|
26
|
-
ARCHIVED: "bg-bg-sunken text-text-secondary"
|
|
27
|
-
}, w = {
|
|
28
|
-
NEW: "New",
|
|
29
|
-
SCREENING: "Screening",
|
|
30
|
-
SHORTLISTED: "Shortlisted",
|
|
31
|
-
INTERVIEW: "Interview",
|
|
32
|
-
HIRED: "Hired",
|
|
33
|
-
REJECTED: "Rejected",
|
|
34
|
-
ARCHIVED: "Archived"
|
|
35
|
-
};
|
|
36
|
-
function T(e) {
|
|
13
|
+
var j = 50, M = 100;
|
|
14
|
+
function N(e, t) {
|
|
15
|
+
let n = new Set(e);
|
|
16
|
+
return n.has(t) ? n.delete(t) : n.add(t), n;
|
|
17
|
+
}
|
|
18
|
+
function P(e) {
|
|
37
19
|
return new Date(e).toLocaleDateString("en-US", {
|
|
38
20
|
month: "short",
|
|
39
21
|
day: "numeric",
|
|
@@ -42,402 +24,1143 @@ function T(e) {
|
|
|
42
24
|
minute: "2-digit"
|
|
43
25
|
});
|
|
44
26
|
}
|
|
45
|
-
function
|
|
27
|
+
function Ee(e) {
|
|
46
28
|
let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4);
|
|
47
29
|
if (n < 2) return "just now";
|
|
48
30
|
if (n < 60) return `${n}m ago`;
|
|
49
31
|
let r = Math.floor(n / 60);
|
|
50
32
|
if (r < 24) return `${r}h ago`;
|
|
51
33
|
let i = Math.floor(r / 24);
|
|
52
|
-
return i < 30 ? `${i}d ago` :
|
|
34
|
+
return i < 30 ? `${i}d ago` : P(e);
|
|
35
|
+
}
|
|
36
|
+
var F = "__none__", De = [
|
|
37
|
+
"LinkedIn",
|
|
38
|
+
"Referral",
|
|
39
|
+
"Indeed",
|
|
40
|
+
"Email",
|
|
41
|
+
"Walk-in",
|
|
42
|
+
"Other"
|
|
43
|
+
], Oe = 10 * 1024 * 1024, ke = ".pdf,.doc,.docx", Ae = new Set([
|
|
44
|
+
"application/pdf",
|
|
45
|
+
"application/msword",
|
|
46
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
47
|
+
]), je = {
|
|
48
|
+
name: "",
|
|
49
|
+
email: "",
|
|
50
|
+
phone: "",
|
|
51
|
+
jobPostingId: F,
|
|
52
|
+
position: "",
|
|
53
|
+
source: "",
|
|
54
|
+
linkedin: "",
|
|
55
|
+
portfolio: "",
|
|
56
|
+
coverLetter: ""
|
|
57
|
+
};
|
|
58
|
+
function Me(e) {
|
|
59
|
+
return new Promise((t, n) => {
|
|
60
|
+
let r = new FileReader();
|
|
61
|
+
r.onload = () => {
|
|
62
|
+
let e = r.result;
|
|
63
|
+
if (typeof e != "string") {
|
|
64
|
+
n(/* @__PURE__ */ Error("Failed to read file"));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
let i = e.indexOf(",");
|
|
68
|
+
t(i >= 0 ? e.slice(i + 1) : e);
|
|
69
|
+
}, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read file")), r.readAsDataURL(e);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
var Ne = {
|
|
73
|
+
message: "ROUND_MESSAGE",
|
|
74
|
+
assignment: "ASSIGNMENT"
|
|
75
|
+
};
|
|
76
|
+
function Pe({ mode: e, open: o, onClose: c, applications: l, jobPostingId: de }) {
|
|
77
|
+
let [d, fe] = y(""), [p, m] = y(""), [h, g] = y(!1), [v, b] = y(null), { data: he, loading: x, error: ge } = u({
|
|
78
|
+
variables: { id: de },
|
|
79
|
+
skip: !o || !de
|
|
80
|
+
}), [_e, { loading: C }] = le({ refetchQueries: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }), [ve, { loading: ye }] = ue({ refetchQueries: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }), w = C || ye, E = he?.jobPosting?.rounds ?? [], Se = E.filter((t) => e === "assignment" ? t.isAssignmentRound : !0), D = E.find((e) => e.id === d), Ce = (D ? E.filter((e) => e.name.trim().toLowerCase() === D.name.trim().toLowerCase() && e.roundType === D.roundType) : []).length === 1, we = Ne[e], Te = !!d && x, j = null;
|
|
81
|
+
l.length > M ? j = `Select no more than ${M} candidates for one bulk send.` : d && ge ? j = "Could not load the posting rounds. Nothing will be sent. Try again." : d && !x && !D && (j = "The selected round is no longer available. Choose another round.");
|
|
82
|
+
let N = D ? l.map((e) => {
|
|
83
|
+
let t = e.interviewRounds.find((e) => e.roundConfigId === D.id), n = Ce ? e.interviewRounds.find((e) => !e.roundConfigId && e.name.trim().toLowerCase() === D.name.trim().toLowerCase() && e.roundType === D.roundType) : void 0, r = t ?? n;
|
|
84
|
+
return {
|
|
85
|
+
applicationId: e.id,
|
|
86
|
+
name: `${e.firstName} ${e.lastName}`.trim(),
|
|
87
|
+
round: r ? {
|
|
88
|
+
id: r.id,
|
|
89
|
+
alreadySent: r.emailLogs.some((e) => e.emailType === we)
|
|
90
|
+
} : null
|
|
91
|
+
};
|
|
92
|
+
}) : [];
|
|
93
|
+
_(() => {
|
|
94
|
+
o || (fe(""), m(""), g(!1), b(null));
|
|
95
|
+
}, [o]);
|
|
96
|
+
let P = N.filter((e) => e.round ? h || !e.round.alreadySent : !1), Ee = N.filter((e) => e.round?.alreadySent).length, F = N.filter((e) => !e.round).length, De = new Set(l.map((e) => e.id)).size, Oe = !Te && !j && De > 0 && N.length === De;
|
|
97
|
+
return /* @__PURE__ */ k(r, {
|
|
98
|
+
open: o,
|
|
99
|
+
onOpenChange: (e) => !e && c(),
|
|
100
|
+
children: /* @__PURE__ */ A(i, {
|
|
101
|
+
className: "sm:max-w-lg max-h-[90vh] overflow-y-auto",
|
|
102
|
+
children: [/* @__PURE__ */ A(te, { children: [/* @__PURE__ */ k(ne, { children: e === "assignment" ? "Randomize & Send Assignment" : "Send Message" }), /* @__PURE__ */ A(a, { children: [
|
|
103
|
+
e === "assignment" ? "Pick a random active assignment for the posting and email it to every selected candidate at once." : "Send the same message to every selected candidate at once.",
|
|
104
|
+
" ",
|
|
105
|
+
l.length,
|
|
106
|
+
" candidate",
|
|
107
|
+
l.length === 1 ? "" : "s",
|
|
108
|
+
" selected."
|
|
109
|
+
] })] }), v ? /* @__PURE__ */ A("div", {
|
|
110
|
+
className: "space-y-4",
|
|
111
|
+
children: [/* @__PURE__ */ A("div", {
|
|
112
|
+
className: "space-y-2",
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ A("div", {
|
|
115
|
+
className: "flex items-center gap-2 text-sm text-status-success-text",
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ k(me, { size: 16 }),
|
|
118
|
+
"Sent to ",
|
|
119
|
+
v.succeeded,
|
|
120
|
+
" candidate",
|
|
121
|
+
v.succeeded === 1 ? "" : "s"
|
|
122
|
+
]
|
|
123
|
+
}),
|
|
124
|
+
v.skipped > 0 && /* @__PURE__ */ A("div", {
|
|
125
|
+
className: "flex items-center gap-2 text-sm text-status-warning-text",
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ k(T, { size: 16 }),
|
|
128
|
+
"Skipped ",
|
|
129
|
+
v.skipped,
|
|
130
|
+
" — already sent (use force to resend)"
|
|
131
|
+
]
|
|
132
|
+
}),
|
|
133
|
+
v.failed > 0 && /* @__PURE__ */ A("div", {
|
|
134
|
+
className: "flex items-center gap-2 text-sm text-status-error-text",
|
|
135
|
+
children: [
|
|
136
|
+
/* @__PURE__ */ k(xe, { size: 16 }),
|
|
137
|
+
"Failed for ",
|
|
138
|
+
v.failed,
|
|
139
|
+
" candidate",
|
|
140
|
+
v.failed === 1 ? "" : "s"
|
|
141
|
+
]
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
}), /* @__PURE__ */ k(ee, { children: /* @__PURE__ */ k(t, {
|
|
145
|
+
onClick: c,
|
|
146
|
+
children: "Done"
|
|
147
|
+
}) })]
|
|
148
|
+
}) : /* @__PURE__ */ A("div", {
|
|
149
|
+
className: "space-y-4",
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ A("div", {
|
|
152
|
+
className: "space-y-1.5",
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ k(s, {
|
|
155
|
+
htmlFor: "bulk-round-config",
|
|
156
|
+
children: "Target round"
|
|
157
|
+
}),
|
|
158
|
+
/* @__PURE__ */ A(re, {
|
|
159
|
+
value: d,
|
|
160
|
+
onValueChange: fe,
|
|
161
|
+
disabled: x,
|
|
162
|
+
children: [/* @__PURE__ */ k(oe, {
|
|
163
|
+
id: "bulk-round-config",
|
|
164
|
+
children: /* @__PURE__ */ k(se, { placeholder: "Select a round" })
|
|
165
|
+
}), /* @__PURE__ */ k(ie, { children: Se.map((e) => /* @__PURE__ */ A(ae, {
|
|
166
|
+
value: e.id,
|
|
167
|
+
children: [
|
|
168
|
+
"Round ",
|
|
169
|
+
e.roundNumber,
|
|
170
|
+
" — ",
|
|
171
|
+
e.name
|
|
172
|
+
]
|
|
173
|
+
}, e.id)) })]
|
|
174
|
+
}),
|
|
175
|
+
Se.length === 0 && !x && /* @__PURE__ */ k("p", {
|
|
176
|
+
className: "text-xs text-status-warning-text",
|
|
177
|
+
children: e === "assignment" ? "This posting has no round configured as an assignment round yet." : "This posting has no interview rounds configured yet."
|
|
178
|
+
})
|
|
179
|
+
]
|
|
180
|
+
}),
|
|
181
|
+
e === "message" && /* @__PURE__ */ A("div", {
|
|
182
|
+
className: "space-y-1.5",
|
|
183
|
+
children: [/* @__PURE__ */ k(s, {
|
|
184
|
+
htmlFor: "bulk-message",
|
|
185
|
+
children: "Message"
|
|
186
|
+
}), /* @__PURE__ */ k(ce, {
|
|
187
|
+
id: "bulk-message",
|
|
188
|
+
value: p,
|
|
189
|
+
onChange: (e) => m(e.target.value),
|
|
190
|
+
placeholder: "e.g. Hey, this is a quick task for you — complete it and submit here: https://…",
|
|
191
|
+
rows: 5
|
|
192
|
+
})]
|
|
193
|
+
}),
|
|
194
|
+
d && /* @__PURE__ */ A("div", {
|
|
195
|
+
className: "space-y-1.5",
|
|
196
|
+
children: [
|
|
197
|
+
/* @__PURE__ */ k("p", {
|
|
198
|
+
className: "text-xs font-medium text-text-secondary",
|
|
199
|
+
children: "Preview"
|
|
200
|
+
}),
|
|
201
|
+
Te ? /* @__PURE__ */ A("div", {
|
|
202
|
+
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
203
|
+
children: [/* @__PURE__ */ k(S, {
|
|
204
|
+
size: 14,
|
|
205
|
+
className: "animate-spin"
|
|
206
|
+
}), "Checking candidates…"]
|
|
207
|
+
}) : j ? /* @__PURE__ */ A("div", {
|
|
208
|
+
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
209
|
+
children: [/* @__PURE__ */ k(pe, {
|
|
210
|
+
size: 14,
|
|
211
|
+
className: "mt-0.5 shrink-0"
|
|
212
|
+
}), /* @__PURE__ */ k("span", { children: j })]
|
|
213
|
+
}) : /* @__PURE__ */ A("div", {
|
|
214
|
+
className: "text-xs text-text-secondary space-y-1",
|
|
215
|
+
children: [
|
|
216
|
+
/* @__PURE__ */ A("p", { children: [
|
|
217
|
+
"Will send to",
|
|
218
|
+
" ",
|
|
219
|
+
/* @__PURE__ */ k("span", {
|
|
220
|
+
className: "font-medium text-text-primary",
|
|
221
|
+
children: P.length
|
|
222
|
+
}),
|
|
223
|
+
" ",
|
|
224
|
+
"candidate",
|
|
225
|
+
P.length === 1 ? "" : "s"
|
|
226
|
+
] }),
|
|
227
|
+
Ee > 0 && /* @__PURE__ */ A("p", { children: [
|
|
228
|
+
Ee,
|
|
229
|
+
" already sent",
|
|
230
|
+
" ",
|
|
231
|
+
h ? "(will resend — force is on)" : "(will be skipped)"
|
|
232
|
+
] }),
|
|
233
|
+
F > 0 && /* @__PURE__ */ A("p", { children: [F, " have no round for this stage yet (skipped)"] })
|
|
234
|
+
]
|
|
235
|
+
}),
|
|
236
|
+
/* @__PURE__ */ A("label", {
|
|
237
|
+
className: "flex items-center gap-2 pt-1 cursor-pointer",
|
|
238
|
+
children: [/* @__PURE__ */ k(n, {
|
|
239
|
+
checked: h,
|
|
240
|
+
onCheckedChange: (e) => g(e === !0)
|
|
241
|
+
}), /* @__PURE__ */ k("span", {
|
|
242
|
+
className: "text-xs text-text-primary",
|
|
243
|
+
children: "Resend to already-sent candidates"
|
|
244
|
+
})]
|
|
245
|
+
})
|
|
246
|
+
]
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ A(ee, { children: [/* @__PURE__ */ k(t, {
|
|
249
|
+
variant: "outline",
|
|
250
|
+
onClick: c,
|
|
251
|
+
disabled: w,
|
|
252
|
+
children: "Cancel"
|
|
253
|
+
}), /* @__PURE__ */ k(t, {
|
|
254
|
+
onClick: async () => {
|
|
255
|
+
if (!Oe) return;
|
|
256
|
+
let t = [], n = /* @__PURE__ */ new Set();
|
|
257
|
+
for (let e of N) {
|
|
258
|
+
if (!e.round) continue;
|
|
259
|
+
let r = `${e.applicationId}:${e.round.id}`;
|
|
260
|
+
n.has(r) || (n.add(r), t.push({
|
|
261
|
+
applicationId: e.applicationId,
|
|
262
|
+
roundId: e.round.id
|
|
263
|
+
}));
|
|
264
|
+
}
|
|
265
|
+
if (!(t.length === 0 || t.length > M)) try {
|
|
266
|
+
if (e === "assignment") {
|
|
267
|
+
let e = (await _e({ variables: { input: {
|
|
268
|
+
items: t,
|
|
269
|
+
force: h
|
|
270
|
+
} } })).data?.bulkRandomizeAndSendAssignment;
|
|
271
|
+
if (!e) throw Error("Assignment send returned no result");
|
|
272
|
+
b({
|
|
273
|
+
succeeded: e.succeeded.length,
|
|
274
|
+
skipped: e.skipped.length,
|
|
275
|
+
failed: e.failed.length
|
|
276
|
+
});
|
|
277
|
+
} else {
|
|
278
|
+
let e = (await ve({ variables: { input: {
|
|
279
|
+
items: t,
|
|
280
|
+
message: p.trim(),
|
|
281
|
+
force: h
|
|
282
|
+
} } })).data?.bulkSendRoundMessage;
|
|
283
|
+
if (!e) throw Error("Message send returned no result");
|
|
284
|
+
b({
|
|
285
|
+
succeeded: e.succeeded.length,
|
|
286
|
+
skipped: e.skipped.length,
|
|
287
|
+
failed: e.failed.length
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
f("success");
|
|
291
|
+
} catch (e) {
|
|
292
|
+
console.error("Bulk send failed:", e), f("error");
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
disabled: w || !d || !Oe || e === "message" && !p.trim() || P.length === 0,
|
|
296
|
+
children: w ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(S, {
|
|
297
|
+
size: 16,
|
|
298
|
+
className: "animate-spin mr-2"
|
|
299
|
+
}), "Sending…"] }) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(be, {
|
|
300
|
+
size: 16,
|
|
301
|
+
className: "mr-2"
|
|
302
|
+
}), "Send"] })
|
|
303
|
+
})] })
|
|
304
|
+
]
|
|
305
|
+
})]
|
|
306
|
+
})
|
|
307
|
+
});
|
|
53
308
|
}
|
|
54
|
-
function
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
-
let e = setTimeout(() =>
|
|
309
|
+
function I() {
|
|
310
|
+
let le = D(), ue = Se().search, [u, me] = y(""), [T, xe] = y(""), [P, Ne] = y(/* @__PURE__ */ new Set()), [I, Fe] = y(/* @__PURE__ */ new Set()), [L, Ie] = y(""), [R, Le] = y(""), [z, Re] = y(!1), [ze, Be] = y("list"), [Ve, B] = y(/* @__PURE__ */ new Set()), [He, V] = y(null), [Ue, H] = y(!1), [U, W] = y(je), [G, We] = y({}), [K, q] = y(null), [Ge, J] = y(""), [Ke, qe] = y(!1), [Je, Ye] = y(!1), [Y, Xe] = y({}), X = v(j), Ze = v(Y);
|
|
311
|
+
Ze.current = Y, _(() => {
|
|
312
|
+
let e = setTimeout(() => xe(u), 300);
|
|
58
313
|
return () => clearTimeout(e);
|
|
59
|
-
}, [
|
|
60
|
-
let
|
|
314
|
+
}, [u]);
|
|
315
|
+
let Qe = {
|
|
316
|
+
...T ? { search: T } : {},
|
|
317
|
+
...P.size > 0 ? { statuses: Array.from(P) } : {},
|
|
318
|
+
...I.size > 0 ? { roundStatuses: Array.from(I) } : {},
|
|
319
|
+
...L ? { productId: L } : {},
|
|
320
|
+
...R ? { jobPostingId: R } : {}
|
|
321
|
+
}, Z = JSON.stringify({
|
|
322
|
+
search: T,
|
|
323
|
+
statuses: Array.from(P).sort(),
|
|
324
|
+
roundStatuses: Array.from(I).sort(),
|
|
325
|
+
productId: L,
|
|
326
|
+
jobPostingId: R
|
|
327
|
+
}), $e = v(Z);
|
|
328
|
+
$e.current = Z, _(() => {
|
|
329
|
+
B(/* @__PURE__ */ new Set()), V(null), Ye(!1), X.current = j;
|
|
330
|
+
}, [Z]);
|
|
331
|
+
let { data: et, loading: tt, error: nt, fetchMore: rt } = l({
|
|
61
332
|
variables: {
|
|
62
|
-
filter:
|
|
63
|
-
|
|
64
|
-
...A ? { status: A } : {},
|
|
65
|
-
...j ? { productId: j } : {},
|
|
66
|
-
...N ? { jobPostingId: N } : {}
|
|
67
|
-
},
|
|
68
|
-
limit: 50,
|
|
333
|
+
filter: Qe,
|
|
334
|
+
limit: j,
|
|
69
335
|
offset: 0
|
|
70
336
|
},
|
|
71
337
|
fetchPolicy: "cache-and-network"
|
|
72
|
-
}), { data:
|
|
338
|
+
}), { data: it, loading: at } = de({
|
|
73
339
|
variables: {
|
|
74
340
|
limit: 200,
|
|
75
341
|
offset: 0
|
|
76
342
|
},
|
|
77
343
|
fetchPolicy: "cache-and-network"
|
|
78
|
-
}),
|
|
79
|
-
|
|
80
|
-
|
|
344
|
+
}), [ot] = c(), st = (it?.jobPostings?.items ?? []).filter((e) => e.status === d.Open), ct = et?.jobApplications?.items ?? [], lt = /* @__PURE__ */ new Map();
|
|
345
|
+
for (let e of ct) lt.set(e.id, e);
|
|
346
|
+
let Q = Array.from(lt.values()), ut = et?.jobApplications?.total ?? 0, dt = et?.jobApplications?.hasMore ?? !1, ft = Q.map((e) => e.id).join(",");
|
|
347
|
+
_(() => {
|
|
348
|
+
let e = new Set(ft ? ft.split(",") : []);
|
|
349
|
+
B((t) => {
|
|
350
|
+
let n = new Set(Array.from(t).filter((t) => e.has(t)));
|
|
351
|
+
return n.size === t.size && Array.from(n).every((e) => t.has(e)) ? t : n;
|
|
352
|
+
});
|
|
353
|
+
}, [ft]);
|
|
354
|
+
let pt = (it?.jobPostings?.items ?? []).reduce((e, t) => (e[t.id] = t, e), {}), $ = Q.filter((e) => Ve.has(e.id)), mt = R ? $.filter((e) => e.jobPostingId === R) : [], ht = mt.length !== $.length, gt = $.length > M, _t = !!R && $.length > 0 && !ht && !gt, vt = `Select all ${Q.length} visible`;
|
|
355
|
+
Q.length > M && (vt = `Select candidates individually (maximum ${M})`), $.length > 0 && (vt = `${$.length} selected`);
|
|
356
|
+
let yt = Array.from(new Set(Q.flatMap((e) => e.productId ? [e.productId] : []))).sort(), bt = yt.join(",");
|
|
357
|
+
_(() => {
|
|
358
|
+
let e = bt ? bt.split(",").filter((e) => !Ze.current[e]) : [];
|
|
81
359
|
e.length !== 0 && e.forEach((e) => {
|
|
82
|
-
|
|
360
|
+
Ce({
|
|
83
361
|
gateway: "global",
|
|
84
362
|
query: "query($id: ID!) { platformProduct(id: $id) { name } }",
|
|
85
363
|
variables: { id: e }
|
|
86
364
|
}).then((t) => {
|
|
87
365
|
let n = t.data?.platformProduct?.name;
|
|
88
|
-
n &&
|
|
366
|
+
n && Xe((t) => ({
|
|
89
367
|
...t,
|
|
90
368
|
[e]: n
|
|
91
369
|
}));
|
|
92
370
|
}).catch(() => {});
|
|
93
371
|
});
|
|
94
|
-
}, [
|
|
95
|
-
let
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
})
|
|
167
|
-
|
|
372
|
+
}, [bt]);
|
|
373
|
+
let xt = async () => {
|
|
374
|
+
if (!dt || Je) return;
|
|
375
|
+
let e = X.current, t = Z;
|
|
376
|
+
Ye(!0);
|
|
377
|
+
try {
|
|
378
|
+
let n = await rt({
|
|
379
|
+
variables: { offset: e },
|
|
380
|
+
updateQuery: (e, { fetchMoreResult: t }) => {
|
|
381
|
+
if (!t) return e;
|
|
382
|
+
let n = /* @__PURE__ */ new Map();
|
|
383
|
+
for (let t of e.jobApplications?.items ?? []) n.set(t.id, t);
|
|
384
|
+
for (let e of t.jobApplications?.items ?? []) n.set(e.id, e);
|
|
385
|
+
return { jobApplications: {
|
|
386
|
+
...t.jobApplications,
|
|
387
|
+
items: Array.from(n.values())
|
|
388
|
+
} };
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
$e.current === t && (X.current = e + (n.data.jobApplications?.items.length ?? j));
|
|
392
|
+
} catch (e) {
|
|
393
|
+
console.error("Failed to load more applications:", e), f("error");
|
|
394
|
+
} finally {
|
|
395
|
+
$e.current === t && Ye(!1);
|
|
396
|
+
}
|
|
397
|
+
}, St = () => {
|
|
398
|
+
W(je), We({}), q(null), J("");
|
|
399
|
+
}, Ct = (e) => {
|
|
400
|
+
let t = e.target.files?.[0] ?? null;
|
|
401
|
+
if (J(""), !t) {
|
|
402
|
+
q(null);
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
if (t.size > Oe) {
|
|
406
|
+
J("Resume must be 10 MB or smaller."), q(null), e.target.value = "";
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
let n = t.name.toLowerCase().split(".").pop() ?? "";
|
|
410
|
+
if (!Ae.has(t.type) && ![
|
|
411
|
+
"pdf",
|
|
412
|
+
"doc",
|
|
413
|
+
"docx"
|
|
414
|
+
].includes(n)) {
|
|
415
|
+
J("Resume must be a PDF, DOC, or DOCX file."), q(null), e.target.value = "";
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
q(t);
|
|
419
|
+
}, wt = () => {
|
|
420
|
+
let e = {};
|
|
421
|
+
return U.name.trim() || (e.name = "Name is required"), U.email.trim() ? /^\S+@\S+\.\S+$/.test(U.email.trim()) || (e.email = "Enter a valid email") : e.email = "Email is required", U.source.trim() || (e.source = "Source is required"), U.jobPostingId === F && !U.position.trim() && (e.position = "Position is required when no job posting is selected"), We(e), Object.keys(e).length === 0;
|
|
422
|
+
}, Tt = async (e) => {
|
|
423
|
+
if (e.preventDefault(), wt()) {
|
|
424
|
+
qe(!0);
|
|
425
|
+
try {
|
|
426
|
+
let e, t, n;
|
|
427
|
+
K && (t = await Me(K), e = K.name, n = K.type || void 0);
|
|
428
|
+
let r = U.jobPostingId !== F, i = (await ot({
|
|
429
|
+
variables: { input: {
|
|
430
|
+
name: U.name.trim(),
|
|
431
|
+
email: U.email.trim(),
|
|
432
|
+
phone: U.phone.trim() || void 0,
|
|
433
|
+
jobPostingId: r ? U.jobPostingId : void 0,
|
|
434
|
+
position: r ? void 0 : U.position.trim() || void 0,
|
|
435
|
+
source: U.source.trim(),
|
|
436
|
+
linkedin: U.linkedin.trim() || void 0,
|
|
437
|
+
portfolio: U.portfolio.trim() || void 0,
|
|
438
|
+
coverLetter: U.coverLetter.trim() || void 0,
|
|
439
|
+
resumeFileName: e,
|
|
440
|
+
resumeBase64: t,
|
|
441
|
+
resumeMimeType: n
|
|
442
|
+
} },
|
|
443
|
+
refetchQueries: ["GetJobApplications"]
|
|
444
|
+
})).data?.createJobApplication?.id;
|
|
445
|
+
f("success"), H(!1), St(), i && le(`/support/applications/${i}${ue}`);
|
|
446
|
+
} catch (e) {
|
|
447
|
+
console.error("Failed to create candidate:", e), f("error");
|
|
448
|
+
} finally {
|
|
449
|
+
qe(!1);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}, Et = g.reduce((e, t) => (e[t] = Q.filter((e) => e.status === t), e), {}), Dt = (t, r = !1) => {
|
|
453
|
+
let i = t.jobPostingId ? pt[t.jobPostingId]?.title : void 0, a = Ve.has(t.id);
|
|
454
|
+
return /* @__PURE__ */ A("div", {
|
|
455
|
+
className: `w-full bg-bg-surface border rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] duration-200 group flex items-start gap-2 ${r ? "p-3" : "p-4"} ${a ? "border-primary" : "border-border-seam"}`,
|
|
456
|
+
children: [/* @__PURE__ */ k("div", {
|
|
457
|
+
className: "pt-0.5",
|
|
458
|
+
children: /* @__PURE__ */ k(n, {
|
|
459
|
+
checked: a,
|
|
460
|
+
onCheckedChange: () => B((e) => N(e, t.id)),
|
|
461
|
+
"aria-label": `Select ${t.firstName} ${t.lastName}`
|
|
462
|
+
})
|
|
463
|
+
}), /* @__PURE__ */ k("button", {
|
|
464
|
+
type: "button",
|
|
465
|
+
onClick: () => le(`/support/applications/${t.id}${ue}`),
|
|
466
|
+
className: "flex-1 min-w-0 text-left",
|
|
467
|
+
children: /* @__PURE__ */ A("div", {
|
|
468
|
+
className: `flex ${r ? "flex-col" : "items-start"} justify-between gap-3`,
|
|
469
|
+
children: [/* @__PURE__ */ A("div", {
|
|
470
|
+
className: "flex-1 min-w-0",
|
|
471
|
+
children: [
|
|
472
|
+
/* @__PURE__ */ A("div", {
|
|
473
|
+
className: "flex items-center gap-2 mb-1 flex-wrap",
|
|
474
|
+
children: [
|
|
475
|
+
/* @__PURE__ */ A("h3", {
|
|
476
|
+
className: "font-semibold text-text-primary truncate group-hover:text-primary transition-colors text-sm",
|
|
477
|
+
children: [
|
|
478
|
+
t.firstName,
|
|
479
|
+
" ",
|
|
480
|
+
t.lastName
|
|
481
|
+
]
|
|
482
|
+
}),
|
|
483
|
+
/* @__PURE__ */ k(e, {
|
|
484
|
+
variant: "secondary",
|
|
485
|
+
className: `${m[t.status] || m.NEW} ${t.status === "NEW" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
|
|
486
|
+
children: h[t.status] || t.status
|
|
487
|
+
}),
|
|
488
|
+
i && /* @__PURE__ */ k(e, {
|
|
489
|
+
variant: "outline",
|
|
490
|
+
title: `Job posting: ${i}`,
|
|
491
|
+
children: i
|
|
492
|
+
}),
|
|
493
|
+
t.productId && Y[t.productId] && /* @__PURE__ */ k(e, {
|
|
494
|
+
variant: "secondary",
|
|
495
|
+
className: "bg-accent-purple-subtle text-accent-purple",
|
|
496
|
+
title: `Product: ${Y[t.productId]}`,
|
|
497
|
+
children: Y[t.productId]
|
|
498
|
+
}),
|
|
499
|
+
t.resumeFileName && /* @__PURE__ */ A(e, {
|
|
500
|
+
variant: "secondary",
|
|
501
|
+
className: "bg-accent-blue-subtle text-accent-blue gap-1",
|
|
502
|
+
children: [/* @__PURE__ */ k(C, { size: r ? 10 : 11 }), "Resume"]
|
|
503
|
+
})
|
|
504
|
+
]
|
|
505
|
+
}),
|
|
506
|
+
/* @__PURE__ */ A("p", {
|
|
507
|
+
className: `text-text-secondary mb-1 ${r ? "text-xs" : "text-sm"}`,
|
|
508
|
+
children: [/* @__PURE__ */ k("span", {
|
|
509
|
+
className: "font-medium",
|
|
510
|
+
children: t.position
|
|
511
|
+
}), t.department && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("span", {
|
|
512
|
+
className: "mx-1.5 text-text-secondary/50",
|
|
513
|
+
children: "·"
|
|
514
|
+
}), /* @__PURE__ */ k("span", { children: t.department })] })]
|
|
515
|
+
}),
|
|
516
|
+
/* @__PURE__ */ k("p", {
|
|
517
|
+
className: `text-text-secondary truncate ${r ? "text-[11px]" : "text-xs"}`,
|
|
518
|
+
children: t.email
|
|
519
|
+
})
|
|
520
|
+
]
|
|
521
|
+
}), /* @__PURE__ */ k("div", {
|
|
522
|
+
className: `text-text-secondary whitespace-nowrap ${r ? "text-[11px]" : "text-xs"}`,
|
|
523
|
+
children: Ee(t.createdAt)
|
|
524
|
+
})]
|
|
525
|
+
})
|
|
526
|
+
})]
|
|
168
527
|
}, t.id);
|
|
169
528
|
};
|
|
170
|
-
return
|
|
529
|
+
return tt && Q.length === 0 ? /* @__PURE__ */ A("div", {
|
|
171
530
|
className: "p-6",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ A("div", {
|
|
173
532
|
className: "flex items-center gap-3 mb-6",
|
|
174
|
-
children: [/* @__PURE__ */ b
|
|
533
|
+
children: [/* @__PURE__ */ k(b, {
|
|
175
534
|
size: 24,
|
|
176
535
|
className: "text-text-primary"
|
|
177
|
-
}), /* @__PURE__ */
|
|
536
|
+
}), /* @__PURE__ */ k("h1", {
|
|
178
537
|
className: "text-2xl font-bold text-text-primary",
|
|
179
538
|
children: "Job Applications"
|
|
180
539
|
})]
|
|
181
|
-
}), /* @__PURE__ */
|
|
540
|
+
}), /* @__PURE__ */ A("div", {
|
|
182
541
|
className: "flex flex-col items-center justify-center py-16",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
542
|
+
children: [/* @__PURE__ */ k(S, {
|
|
184
543
|
size: 32,
|
|
185
544
|
className: "animate-spin text-text-secondary mb-4"
|
|
186
|
-
}), /* @__PURE__ */
|
|
545
|
+
}), /* @__PURE__ */ k("p", {
|
|
187
546
|
className: "text-sm text-text-secondary",
|
|
188
547
|
children: "Loading applications…"
|
|
189
548
|
})]
|
|
190
549
|
})]
|
|
191
|
-
}) :
|
|
550
|
+
}) : nt ? /* @__PURE__ */ A("div", {
|
|
192
551
|
className: "p-6",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
552
|
+
children: [/* @__PURE__ */ A("div", {
|
|
194
553
|
className: "flex items-center gap-3 mb-6",
|
|
195
|
-
children: [/* @__PURE__ */ b
|
|
554
|
+
children: [/* @__PURE__ */ k(b, {
|
|
196
555
|
size: 24,
|
|
197
556
|
className: "text-text-primary"
|
|
198
|
-
}), /* @__PURE__ */
|
|
557
|
+
}), /* @__PURE__ */ k("h1", {
|
|
199
558
|
className: "text-2xl font-bold text-text-primary",
|
|
200
559
|
children: "Job Applications"
|
|
201
560
|
})]
|
|
202
|
-
}), /* @__PURE__ */
|
|
561
|
+
}), /* @__PURE__ */ A("div", {
|
|
203
562
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
204
563
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ k("div", {
|
|
206
565
|
className: "p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4",
|
|
207
|
-
children: /* @__PURE__ */
|
|
566
|
+
children: /* @__PURE__ */ k(pe, { size: 48 })
|
|
208
567
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ k("h3", {
|
|
210
569
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
211
570
|
children: "Failed to load applications"
|
|
212
571
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ k("p", {
|
|
214
573
|
className: "text-sm text-text-secondary",
|
|
215
|
-
children:
|
|
574
|
+
children: nt.message
|
|
216
575
|
})
|
|
217
576
|
]
|
|
218
577
|
})]
|
|
219
|
-
}) : /* @__PURE__ */
|
|
578
|
+
}) : /* @__PURE__ */ A("div", {
|
|
220
579
|
className: "p-6",
|
|
221
580
|
children: [
|
|
222
|
-
/* @__PURE__ */
|
|
581
|
+
/* @__PURE__ */ A("div", {
|
|
223
582
|
className: "flex items-center justify-between mb-6",
|
|
224
|
-
children: /* @__PURE__ */
|
|
583
|
+
children: [/* @__PURE__ */ A("div", {
|
|
225
584
|
className: "flex items-center gap-3",
|
|
226
585
|
children: [
|
|
227
|
-
/* @__PURE__ */ b
|
|
586
|
+
/* @__PURE__ */ k(b, {
|
|
228
587
|
size: 24,
|
|
229
588
|
className: "text-text-primary"
|
|
230
589
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h1", {
|
|
232
591
|
className: "text-2xl font-bold text-text-primary",
|
|
233
592
|
children: "Job Applications"
|
|
234
|
-
}), /* @__PURE__ */
|
|
593
|
+
}), /* @__PURE__ */ k("p", {
|
|
235
594
|
className: "text-sm text-text-secondary",
|
|
236
595
|
children: "Careers form submissions"
|
|
237
596
|
})] }),
|
|
238
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ k(e, {
|
|
239
598
|
variant: "secondary",
|
|
240
599
|
className: "ml-2",
|
|
241
|
-
children:
|
|
600
|
+
children: ut
|
|
242
601
|
})
|
|
243
602
|
]
|
|
244
|
-
})
|
|
603
|
+
}), /* @__PURE__ */ A(t, {
|
|
604
|
+
onClick: () => H(!0),
|
|
605
|
+
children: [/* @__PURE__ */ k(ve, { size: 18 }), "Add Candidate"]
|
|
606
|
+
})]
|
|
245
607
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
608
|
+
Q.length > 0 && /* @__PURE__ */ A("div", {
|
|
609
|
+
className: "flex items-center gap-2 mb-4 -mt-2",
|
|
610
|
+
children: [
|
|
611
|
+
/* @__PURE__ */ k(n, {
|
|
612
|
+
checked: Q.length > 0 && Q.every((e) => Ve.has(e.id)),
|
|
613
|
+
disabled: Q.length > M,
|
|
614
|
+
onCheckedChange: (e) => B(e ? new Set(Q.map((e) => e.id)) : /* @__PURE__ */ new Set()),
|
|
615
|
+
"aria-label": "Select all visible applications"
|
|
616
|
+
}),
|
|
617
|
+
/* @__PURE__ */ k("span", {
|
|
618
|
+
className: "text-xs text-text-secondary",
|
|
619
|
+
children: vt
|
|
620
|
+
}),
|
|
621
|
+
$.length > 0 && /* @__PURE__ */ k("button", {
|
|
622
|
+
type: "button",
|
|
623
|
+
onClick: () => B(/* @__PURE__ */ new Set()),
|
|
624
|
+
className: "text-xs text-text-secondary hover:text-text-primary underline",
|
|
625
|
+
children: "Clear"
|
|
626
|
+
})
|
|
627
|
+
]
|
|
628
|
+
}),
|
|
629
|
+
$.length > 0 && /* @__PURE__ */ A("div", {
|
|
630
|
+
className: "flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-4 p-3 rounded-lg border border-primary/30 bg-primary/5",
|
|
631
|
+
children: [/* @__PURE__ */ A("p", {
|
|
632
|
+
className: "text-sm text-text-primary font-medium",
|
|
633
|
+
children: [
|
|
634
|
+
$.length,
|
|
635
|
+
" candidate",
|
|
636
|
+
$.length === 1 ? "" : "s",
|
|
637
|
+
" ",
|
|
638
|
+
"selected"
|
|
639
|
+
]
|
|
640
|
+
}), /* @__PURE__ */ A("div", {
|
|
641
|
+
className: "flex items-center gap-2",
|
|
642
|
+
children: [
|
|
643
|
+
!R && /* @__PURE__ */ k("p", {
|
|
644
|
+
className: "text-xs text-text-secondary",
|
|
645
|
+
children: "Filter to one job posting to enable bulk send"
|
|
646
|
+
}),
|
|
647
|
+
ht && /* @__PURE__ */ k("p", {
|
|
648
|
+
className: "text-xs text-status-error-text",
|
|
649
|
+
children: "Some selected candidates do not belong to this posting"
|
|
650
|
+
}),
|
|
651
|
+
gt && /* @__PURE__ */ A("p", {
|
|
652
|
+
className: "text-xs text-status-error-text",
|
|
653
|
+
children: [
|
|
654
|
+
"Select no more than ",
|
|
655
|
+
M,
|
|
656
|
+
" candidates"
|
|
657
|
+
]
|
|
658
|
+
}),
|
|
659
|
+
/* @__PURE__ */ A(t, {
|
|
660
|
+
variant: "outline",
|
|
661
|
+
size: "sm",
|
|
662
|
+
disabled: !_t,
|
|
663
|
+
onClick: () => V("message"),
|
|
664
|
+
className: "gap-2",
|
|
665
|
+
children: [/* @__PURE__ */ k(be, { size: 14 }), "Send Message"]
|
|
666
|
+
}),
|
|
667
|
+
/* @__PURE__ */ A(t, {
|
|
668
|
+
variant: "outline",
|
|
669
|
+
size: "sm",
|
|
670
|
+
disabled: !_t,
|
|
671
|
+
onClick: () => V("assignment"),
|
|
672
|
+
className: "gap-2",
|
|
673
|
+
children: [/* @__PURE__ */ k(w, { size: 14 }), "Randomize & Send Assignment"]
|
|
674
|
+
})
|
|
675
|
+
]
|
|
676
|
+
})]
|
|
677
|
+
}),
|
|
678
|
+
/* @__PURE__ */ k(Te, {
|
|
247
679
|
className: "mb-6",
|
|
248
680
|
children: "Candidates who apply through your careers pages show up here. Review resumes and move applicants through your hiring pipeline — from new submission to screening, interview and hire — so promising people get a timely response. Open an application to see the full profile and resume."
|
|
249
681
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ A("div", {
|
|
251
683
|
className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-4 p-4 rounded-xl border border-border-seam bg-bg-surface mb-6",
|
|
252
684
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ A("div", {
|
|
254
686
|
className: "relative flex-1",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
687
|
+
children: [/* @__PURE__ */ k(ye, {
|
|
256
688
|
size: 18,
|
|
257
689
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
258
|
-
}), /* @__PURE__ */
|
|
690
|
+
}), /* @__PURE__ */ k(o, {
|
|
259
691
|
type: "text",
|
|
260
692
|
"aria-label": "Search applications",
|
|
261
693
|
placeholder: "Search by name, email, or position...",
|
|
262
|
-
value:
|
|
263
|
-
onChange: (e) =>
|
|
694
|
+
value: u,
|
|
695
|
+
onChange: (e) => me(e.target.value),
|
|
264
696
|
className: "pl-10"
|
|
265
697
|
})]
|
|
266
698
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ A("div", {
|
|
268
700
|
className: "flex items-center gap-1 p-1 rounded-lg border bg-bg-sunken/50",
|
|
269
|
-
children: [/* @__PURE__ */
|
|
270
|
-
variant:
|
|
701
|
+
children: [/* @__PURE__ */ k(t, {
|
|
702
|
+
variant: ze === "list" ? "secondary" : "ghost",
|
|
271
703
|
size: "sm",
|
|
272
|
-
onClick: () =>
|
|
704
|
+
onClick: () => Be("list"),
|
|
273
705
|
className: "px-3",
|
|
274
706
|
"aria-label": "Show applications as a list",
|
|
275
|
-
children: /* @__PURE__ */
|
|
276
|
-
}), /* @__PURE__ */
|
|
277
|
-
variant:
|
|
707
|
+
children: /* @__PURE__ */ k(_e, { size: 18 })
|
|
708
|
+
}), /* @__PURE__ */ k(t, {
|
|
709
|
+
variant: ze === "kanban" ? "secondary" : "ghost",
|
|
278
710
|
size: "sm",
|
|
279
|
-
onClick: () =>
|
|
711
|
+
onClick: () => Be("kanban"),
|
|
280
712
|
className: "px-3",
|
|
281
713
|
"aria-label": "Show applications as a kanban board",
|
|
282
|
-
children: /* @__PURE__ */
|
|
714
|
+
children: /* @__PURE__ */ k(ge, { size: 18 })
|
|
283
715
|
})]
|
|
284
716
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
variant:
|
|
717
|
+
/* @__PURE__ */ A(t, {
|
|
718
|
+
variant: z ? "secondary" : "outline",
|
|
287
719
|
size: "sm",
|
|
288
|
-
onClick: () =>
|
|
720
|
+
onClick: () => Re(!z),
|
|
289
721
|
className: "gap-2",
|
|
290
722
|
children: [
|
|
291
|
-
/* @__PURE__ */
|
|
723
|
+
/* @__PURE__ */ k(x, { size: 16 }),
|
|
292
724
|
"Filters",
|
|
293
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ k(he, {
|
|
294
726
|
size: 14,
|
|
295
|
-
className:
|
|
727
|
+
className: z ? "rotate-180 transition-transform" : "transition-transform"
|
|
296
728
|
})
|
|
297
729
|
]
|
|
298
730
|
})
|
|
299
731
|
]
|
|
300
732
|
}),
|
|
301
|
-
|
|
302
|
-
className: "mb-6 p-4 bg-bg-surface border border-border-seam rounded-lg",
|
|
303
|
-
children:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
733
|
+
z && /* @__PURE__ */ A("div", {
|
|
734
|
+
className: "mb-6 p-4 bg-bg-surface border border-border-seam rounded-lg space-y-4",
|
|
735
|
+
children: [
|
|
736
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("p", {
|
|
737
|
+
className: "block text-xs font-medium text-text-secondary mb-1.5",
|
|
738
|
+
children: ["Status ", /* @__PURE__ */ k("span", {
|
|
739
|
+
className: "font-normal",
|
|
740
|
+
children: "(select any number)"
|
|
741
|
+
})]
|
|
742
|
+
}), /* @__PURE__ */ A("div", {
|
|
743
|
+
className: "flex flex-wrap gap-1.5",
|
|
744
|
+
children: [g.map((e) => {
|
|
745
|
+
let t = P.has(e);
|
|
746
|
+
return /* @__PURE__ */ k("button", {
|
|
747
|
+
type: "button",
|
|
748
|
+
onClick: () => Ne((t) => N(t, e)),
|
|
749
|
+
"aria-pressed": t,
|
|
750
|
+
className: `px-2.5 py-1 rounded-full text-xs font-medium border transition-colors ${t ? `${m[e]} border-transparent` : "bg-bg-surface text-text-secondary border-border-seam hover:border-border-strong"}`,
|
|
751
|
+
children: h[e]
|
|
752
|
+
}, e);
|
|
753
|
+
}), P.size > 0 && /* @__PURE__ */ k("button", {
|
|
754
|
+
type: "button",
|
|
755
|
+
onClick: () => Ne(/* @__PURE__ */ new Set()),
|
|
756
|
+
className: "px-2.5 py-1 rounded-full text-xs font-medium text-text-secondary hover:text-text-primary underline",
|
|
757
|
+
children: "Clear"
|
|
758
|
+
})]
|
|
759
|
+
})] }),
|
|
760
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("p", {
|
|
761
|
+
className: "block text-xs font-medium text-text-secondary mb-1.5",
|
|
762
|
+
children: ["Interview round stage ", /* @__PURE__ */ k("span", {
|
|
763
|
+
className: "font-normal",
|
|
764
|
+
children: "(select any number)"
|
|
765
|
+
})]
|
|
766
|
+
}), /* @__PURE__ */ A("div", {
|
|
767
|
+
className: "flex flex-wrap gap-1.5",
|
|
768
|
+
children: [p.map((e) => {
|
|
769
|
+
let t = I.has(e), n = fe[e];
|
|
770
|
+
return /* @__PURE__ */ k("button", {
|
|
771
|
+
type: "button",
|
|
772
|
+
onClick: () => Fe((t) => N(t, e)),
|
|
773
|
+
"aria-pressed": t,
|
|
774
|
+
className: `px-2.5 py-1 rounded-full text-xs font-medium border transition-colors ${t ? `${n.className} border-transparent` : "bg-bg-surface text-text-secondary border-border-seam hover:border-border-strong"}`,
|
|
775
|
+
children: n.label
|
|
776
|
+
}, e);
|
|
777
|
+
}), I.size > 0 && /* @__PURE__ */ k("button", {
|
|
778
|
+
type: "button",
|
|
779
|
+
onClick: () => Fe(/* @__PURE__ */ new Set()),
|
|
780
|
+
className: "px-2.5 py-1 rounded-full text-xs font-medium text-text-secondary hover:text-text-primary underline",
|
|
781
|
+
children: "Clear"
|
|
782
|
+
})]
|
|
783
|
+
})] }),
|
|
784
|
+
/* @__PURE__ */ A("div", {
|
|
785
|
+
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
786
|
+
children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
351
787
|
htmlFor: "job-app-product-filter",
|
|
352
788
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
353
789
|
children: "Product"
|
|
354
|
-
}), /* @__PURE__ */
|
|
790
|
+
}), /* @__PURE__ */ A("select", {
|
|
355
791
|
id: "job-app-product-filter",
|
|
356
|
-
value:
|
|
357
|
-
onChange: (e) =>
|
|
792
|
+
value: L,
|
|
793
|
+
onChange: (e) => Ie(e.target.value),
|
|
358
794
|
className: "w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
|
|
359
|
-
children: [/* @__PURE__ */
|
|
795
|
+
children: [/* @__PURE__ */ k("option", {
|
|
360
796
|
value: "",
|
|
361
797
|
children: "All products"
|
|
362
|
-
}),
|
|
798
|
+
}), yt.map((e) => /* @__PURE__ */ k("option", {
|
|
363
799
|
value: e,
|
|
364
|
-
children:
|
|
800
|
+
children: Y[e] || e
|
|
365
801
|
}, e))]
|
|
366
|
-
})] }),
|
|
367
|
-
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
802
|
+
})] }), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
368
803
|
htmlFor: "job-app-posting-filter",
|
|
369
804
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
370
805
|
children: "Job Posting"
|
|
371
|
-
}), /* @__PURE__ */
|
|
806
|
+
}), /* @__PURE__ */ A("select", {
|
|
372
807
|
id: "job-app-posting-filter",
|
|
373
|
-
value:
|
|
374
|
-
onChange: (e) =>
|
|
375
|
-
disabled:
|
|
808
|
+
value: R,
|
|
809
|
+
onChange: (e) => Le(e.target.value),
|
|
810
|
+
disabled: at,
|
|
376
811
|
className: "w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50 disabled:opacity-50",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
812
|
+
children: [/* @__PURE__ */ k("option", {
|
|
378
813
|
value: "",
|
|
379
814
|
children: "All postings"
|
|
380
|
-
}), (
|
|
815
|
+
}), (it?.jobPostings?.items ?? []).map((e) => /* @__PURE__ */ k("option", {
|
|
381
816
|
value: e.id,
|
|
382
817
|
children: e.title
|
|
383
818
|
}, e.id))]
|
|
384
|
-
})] })
|
|
385
|
-
|
|
386
|
-
|
|
819
|
+
})] })]
|
|
820
|
+
})
|
|
821
|
+
]
|
|
387
822
|
}),
|
|
388
|
-
|
|
823
|
+
Q.length === 0 ? /* @__PURE__ */ k(we, {
|
|
389
824
|
illustration: "empty-people",
|
|
390
825
|
title: "No applications yet",
|
|
391
826
|
description: "Job applications from your careers pages will appear here."
|
|
392
|
-
}) : /* @__PURE__ */
|
|
827
|
+
}) : /* @__PURE__ */ A(O, { children: [ze === "list" ? /* @__PURE__ */ k("div", {
|
|
393
828
|
className: "space-y-3",
|
|
394
|
-
children:
|
|
395
|
-
}) : /* @__PURE__ */
|
|
829
|
+
children: Q.map((e) => Dt(e))
|
|
830
|
+
}) : /* @__PURE__ */ k("div", {
|
|
396
831
|
className: "flex gap-4 overflow-x-auto pb-4",
|
|
397
|
-
children:
|
|
398
|
-
let n =
|
|
399
|
-
return /* @__PURE__ */
|
|
832
|
+
children: g.map((t) => {
|
|
833
|
+
let n = Et[t] ?? [];
|
|
834
|
+
return /* @__PURE__ */ A("div", {
|
|
400
835
|
className: "flex flex-col gap-3 w-[280px] flex-shrink-0 max-h-[calc(100vh-280px)]",
|
|
401
|
-
children: [/* @__PURE__ */
|
|
836
|
+
children: [/* @__PURE__ */ A("div", {
|
|
402
837
|
className: "flex items-center justify-between px-1",
|
|
403
|
-
children: [/* @__PURE__ */
|
|
838
|
+
children: [/* @__PURE__ */ k("h3", {
|
|
404
839
|
className: "text-sm font-semibold text-text-primary",
|
|
405
|
-
children:
|
|
406
|
-
}), /* @__PURE__ */
|
|
840
|
+
children: h[t]
|
|
841
|
+
}), /* @__PURE__ */ k(e, {
|
|
407
842
|
variant: "secondary",
|
|
408
|
-
className:
|
|
843
|
+
className: m[t],
|
|
409
844
|
children: n.length
|
|
410
845
|
})]
|
|
411
|
-
}), /* @__PURE__ */
|
|
846
|
+
}), /* @__PURE__ */ A("div", {
|
|
412
847
|
className: "flex flex-col gap-3 overflow-y-auto pr-1",
|
|
413
|
-
children: [n.length === 0 && /* @__PURE__ */
|
|
848
|
+
children: [n.length === 0 && /* @__PURE__ */ k("div", {
|
|
414
849
|
className: "text-center py-6 px-3 rounded-lg border border-dashed border-border-seam bg-bg-sunken/30",
|
|
415
|
-
children: /* @__PURE__ */
|
|
850
|
+
children: /* @__PURE__ */ k("p", {
|
|
416
851
|
className: "text-xs text-text-secondary",
|
|
417
852
|
children: "No applications"
|
|
418
853
|
})
|
|
419
|
-
}), n.map((e) =>
|
|
854
|
+
}), n.map((e) => Dt(e, !0))]
|
|
420
855
|
})]
|
|
421
856
|
}, t);
|
|
422
857
|
})
|
|
423
|
-
}),
|
|
858
|
+
}), dt && /* @__PURE__ */ k("div", {
|
|
424
859
|
className: "flex justify-center mt-6",
|
|
425
|
-
children: /* @__PURE__ */
|
|
860
|
+
children: /* @__PURE__ */ A(t, {
|
|
426
861
|
variant: "outline",
|
|
427
862
|
size: "sm",
|
|
428
|
-
onClick:
|
|
429
|
-
disabled:
|
|
863
|
+
onClick: () => void xt(),
|
|
864
|
+
disabled: Je,
|
|
430
865
|
className: "gap-2",
|
|
431
|
-
children: [
|
|
866
|
+
children: [Je ? /* @__PURE__ */ k(S, {
|
|
432
867
|
size: 14,
|
|
433
868
|
className: "animate-spin"
|
|
434
869
|
}) : null, "Load more"]
|
|
435
870
|
})
|
|
436
|
-
})] })
|
|
871
|
+
})] }),
|
|
872
|
+
/* @__PURE__ */ k(r, {
|
|
873
|
+
open: Ue,
|
|
874
|
+
onOpenChange: (e) => {
|
|
875
|
+
H(e), e || St();
|
|
876
|
+
},
|
|
877
|
+
children: /* @__PURE__ */ A(i, {
|
|
878
|
+
className: "sm:max-w-2xl max-h-[90vh] overflow-y-auto",
|
|
879
|
+
children: [
|
|
880
|
+
/* @__PURE__ */ A(te, { children: [/* @__PURE__ */ k(ne, { children: "Add Candidate" }), /* @__PURE__ */ k(a, { children: "Manually add a candidate to the hiring pipeline. Resumes are optional and can be attached as PDF, DOC, or DOCX (max 10 MB)." })] }),
|
|
881
|
+
/* @__PURE__ */ A("form", {
|
|
882
|
+
id: "add-candidate-form",
|
|
883
|
+
onSubmit: Tt,
|
|
884
|
+
className: "space-y-4",
|
|
885
|
+
children: [
|
|
886
|
+
/* @__PURE__ */ A("div", {
|
|
887
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
888
|
+
children: [/* @__PURE__ */ A("div", {
|
|
889
|
+
className: "space-y-1.5",
|
|
890
|
+
children: [
|
|
891
|
+
/* @__PURE__ */ A(s, {
|
|
892
|
+
htmlFor: "candidate-name",
|
|
893
|
+
children: ["Name ", /* @__PURE__ */ k("span", {
|
|
894
|
+
className: "text-status-error-text",
|
|
895
|
+
children: "*"
|
|
896
|
+
})]
|
|
897
|
+
}),
|
|
898
|
+
/* @__PURE__ */ k(o, {
|
|
899
|
+
id: "candidate-name",
|
|
900
|
+
value: U.name,
|
|
901
|
+
onChange: (e) => W((t) => ({
|
|
902
|
+
...t,
|
|
903
|
+
name: e.target.value
|
|
904
|
+
})),
|
|
905
|
+
placeholder: "Full name",
|
|
906
|
+
"aria-invalid": !!G.name
|
|
907
|
+
}),
|
|
908
|
+
G.name && /* @__PURE__ */ k("p", {
|
|
909
|
+
className: "text-xs text-status-error-text",
|
|
910
|
+
children: G.name
|
|
911
|
+
})
|
|
912
|
+
]
|
|
913
|
+
}), /* @__PURE__ */ A("div", {
|
|
914
|
+
className: "space-y-1.5",
|
|
915
|
+
children: [
|
|
916
|
+
/* @__PURE__ */ A(s, {
|
|
917
|
+
htmlFor: "candidate-email",
|
|
918
|
+
children: ["Email ", /* @__PURE__ */ k("span", {
|
|
919
|
+
className: "text-status-error-text",
|
|
920
|
+
children: "*"
|
|
921
|
+
})]
|
|
922
|
+
}),
|
|
923
|
+
/* @__PURE__ */ k(o, {
|
|
924
|
+
id: "candidate-email",
|
|
925
|
+
type: "email",
|
|
926
|
+
value: U.email,
|
|
927
|
+
onChange: (e) => W((t) => ({
|
|
928
|
+
...t,
|
|
929
|
+
email: e.target.value
|
|
930
|
+
})),
|
|
931
|
+
placeholder: "email@example.com",
|
|
932
|
+
"aria-invalid": !!G.email
|
|
933
|
+
}),
|
|
934
|
+
G.email && /* @__PURE__ */ k("p", {
|
|
935
|
+
className: "text-xs text-status-error-text",
|
|
936
|
+
children: G.email
|
|
937
|
+
})
|
|
938
|
+
]
|
|
939
|
+
})]
|
|
940
|
+
}),
|
|
941
|
+
/* @__PURE__ */ A("div", {
|
|
942
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
943
|
+
children: [/* @__PURE__ */ A("div", {
|
|
944
|
+
className: "space-y-1.5",
|
|
945
|
+
children: [/* @__PURE__ */ k(s, {
|
|
946
|
+
htmlFor: "candidate-phone",
|
|
947
|
+
children: "Phone"
|
|
948
|
+
}), /* @__PURE__ */ k(o, {
|
|
949
|
+
id: "candidate-phone",
|
|
950
|
+
value: U.phone,
|
|
951
|
+
onChange: (e) => W((t) => ({
|
|
952
|
+
...t,
|
|
953
|
+
phone: e.target.value
|
|
954
|
+
})),
|
|
955
|
+
placeholder: "+91 98765 43210"
|
|
956
|
+
})]
|
|
957
|
+
}), /* @__PURE__ */ A("div", {
|
|
958
|
+
className: "space-y-1.5",
|
|
959
|
+
children: [
|
|
960
|
+
/* @__PURE__ */ A(s, {
|
|
961
|
+
htmlFor: "candidate-source",
|
|
962
|
+
children: ["Source ", /* @__PURE__ */ k("span", {
|
|
963
|
+
className: "text-status-error-text",
|
|
964
|
+
children: "*"
|
|
965
|
+
})]
|
|
966
|
+
}),
|
|
967
|
+
/* @__PURE__ */ k(o, {
|
|
968
|
+
id: "candidate-source",
|
|
969
|
+
list: "candidate-source-suggestions",
|
|
970
|
+
value: U.source,
|
|
971
|
+
onChange: (e) => W((t) => ({
|
|
972
|
+
...t,
|
|
973
|
+
source: e.target.value
|
|
974
|
+
})),
|
|
975
|
+
placeholder: "e.g. LinkedIn",
|
|
976
|
+
"aria-invalid": !!G.source
|
|
977
|
+
}),
|
|
978
|
+
/* @__PURE__ */ k("datalist", {
|
|
979
|
+
id: "candidate-source-suggestions",
|
|
980
|
+
children: De.map((e) => /* @__PURE__ */ k("option", { value: e }, e))
|
|
981
|
+
}),
|
|
982
|
+
G.source && /* @__PURE__ */ k("p", {
|
|
983
|
+
className: "text-xs text-status-error-text",
|
|
984
|
+
children: G.source
|
|
985
|
+
})
|
|
986
|
+
]
|
|
987
|
+
})]
|
|
988
|
+
}),
|
|
989
|
+
/* @__PURE__ */ A("div", {
|
|
990
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
991
|
+
children: [/* @__PURE__ */ A("div", {
|
|
992
|
+
className: "space-y-1.5",
|
|
993
|
+
children: [
|
|
994
|
+
/* @__PURE__ */ k(s, {
|
|
995
|
+
htmlFor: "candidate-job-posting",
|
|
996
|
+
children: "Job Posting"
|
|
997
|
+
}),
|
|
998
|
+
/* @__PURE__ */ A(re, {
|
|
999
|
+
value: U.jobPostingId,
|
|
1000
|
+
onValueChange: (e) => W((t) => ({
|
|
1001
|
+
...t,
|
|
1002
|
+
jobPostingId: e
|
|
1003
|
+
})),
|
|
1004
|
+
disabled: at,
|
|
1005
|
+
children: [/* @__PURE__ */ k(oe, {
|
|
1006
|
+
id: "candidate-job-posting",
|
|
1007
|
+
children: /* @__PURE__ */ k(se, { placeholder: "Select an open posting" })
|
|
1008
|
+
}), /* @__PURE__ */ A(ie, { children: [/* @__PURE__ */ k(ae, {
|
|
1009
|
+
value: F,
|
|
1010
|
+
children: "No posting (manual entry)"
|
|
1011
|
+
}), st.map((e) => /* @__PURE__ */ k(ae, {
|
|
1012
|
+
value: e.id,
|
|
1013
|
+
children: e.title
|
|
1014
|
+
}, e.id))] })]
|
|
1015
|
+
}),
|
|
1016
|
+
/* @__PURE__ */ k("p", {
|
|
1017
|
+
className: "text-xs text-text-secondary",
|
|
1018
|
+
children: "Position and department are derived from the selected posting."
|
|
1019
|
+
})
|
|
1020
|
+
]
|
|
1021
|
+
}), /* @__PURE__ */ A("div", {
|
|
1022
|
+
className: "space-y-1.5",
|
|
1023
|
+
children: [
|
|
1024
|
+
/* @__PURE__ */ A(s, {
|
|
1025
|
+
htmlFor: "candidate-position",
|
|
1026
|
+
children: [
|
|
1027
|
+
"Position",
|
|
1028
|
+
" ",
|
|
1029
|
+
U.jobPostingId === F && /* @__PURE__ */ k("span", {
|
|
1030
|
+
className: "text-status-error-text",
|
|
1031
|
+
children: "*"
|
|
1032
|
+
})
|
|
1033
|
+
]
|
|
1034
|
+
}),
|
|
1035
|
+
/* @__PURE__ */ k(o, {
|
|
1036
|
+
id: "candidate-position",
|
|
1037
|
+
value: U.position,
|
|
1038
|
+
onChange: (e) => W((t) => ({
|
|
1039
|
+
...t,
|
|
1040
|
+
position: e.target.value
|
|
1041
|
+
})),
|
|
1042
|
+
placeholder: "e.g. Product Engineer",
|
|
1043
|
+
disabled: U.jobPostingId !== F,
|
|
1044
|
+
"aria-invalid": !!G.position
|
|
1045
|
+
}),
|
|
1046
|
+
G.position && /* @__PURE__ */ k("p", {
|
|
1047
|
+
className: "text-xs text-status-error-text",
|
|
1048
|
+
children: G.position
|
|
1049
|
+
})
|
|
1050
|
+
]
|
|
1051
|
+
})]
|
|
1052
|
+
}),
|
|
1053
|
+
/* @__PURE__ */ A("div", {
|
|
1054
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
1055
|
+
children: [/* @__PURE__ */ A("div", {
|
|
1056
|
+
className: "space-y-1.5",
|
|
1057
|
+
children: [/* @__PURE__ */ k(s, {
|
|
1058
|
+
htmlFor: "candidate-linkedin",
|
|
1059
|
+
children: "LinkedIn"
|
|
1060
|
+
}), /* @__PURE__ */ k(o, {
|
|
1061
|
+
id: "candidate-linkedin",
|
|
1062
|
+
value: U.linkedin,
|
|
1063
|
+
onChange: (e) => W((t) => ({
|
|
1064
|
+
...t,
|
|
1065
|
+
linkedin: e.target.value
|
|
1066
|
+
})),
|
|
1067
|
+
placeholder: "https://linkedin.com/in/…"
|
|
1068
|
+
})]
|
|
1069
|
+
}), /* @__PURE__ */ A("div", {
|
|
1070
|
+
className: "space-y-1.5",
|
|
1071
|
+
children: [/* @__PURE__ */ k(s, {
|
|
1072
|
+
htmlFor: "candidate-portfolio",
|
|
1073
|
+
children: "Portfolio"
|
|
1074
|
+
}), /* @__PURE__ */ k(o, {
|
|
1075
|
+
id: "candidate-portfolio",
|
|
1076
|
+
value: U.portfolio,
|
|
1077
|
+
onChange: (e) => W((t) => ({
|
|
1078
|
+
...t,
|
|
1079
|
+
portfolio: e.target.value
|
|
1080
|
+
})),
|
|
1081
|
+
placeholder: "https://…"
|
|
1082
|
+
})]
|
|
1083
|
+
})]
|
|
1084
|
+
}),
|
|
1085
|
+
/* @__PURE__ */ A("div", {
|
|
1086
|
+
className: "space-y-1.5",
|
|
1087
|
+
children: [/* @__PURE__ */ k(s, {
|
|
1088
|
+
htmlFor: "candidate-cover-letter",
|
|
1089
|
+
children: "Cover Letter"
|
|
1090
|
+
}), /* @__PURE__ */ k(ce, {
|
|
1091
|
+
id: "candidate-cover-letter",
|
|
1092
|
+
value: U.coverLetter,
|
|
1093
|
+
onChange: (e) => W((t) => ({
|
|
1094
|
+
...t,
|
|
1095
|
+
coverLetter: e.target.value
|
|
1096
|
+
})),
|
|
1097
|
+
placeholder: "Notes or cover letter from the candidate",
|
|
1098
|
+
rows: 4
|
|
1099
|
+
})]
|
|
1100
|
+
}),
|
|
1101
|
+
/* @__PURE__ */ A("div", {
|
|
1102
|
+
className: "space-y-1.5",
|
|
1103
|
+
children: [
|
|
1104
|
+
/* @__PURE__ */ k(s, {
|
|
1105
|
+
htmlFor: "candidate-resume",
|
|
1106
|
+
children: "Resume (optional)"
|
|
1107
|
+
}),
|
|
1108
|
+
/* @__PURE__ */ k(o, {
|
|
1109
|
+
id: "candidate-resume",
|
|
1110
|
+
type: "file",
|
|
1111
|
+
accept: ke,
|
|
1112
|
+
onChange: Ct
|
|
1113
|
+
}),
|
|
1114
|
+
/* @__PURE__ */ A("p", {
|
|
1115
|
+
className: "text-xs text-text-secondary flex items-center gap-1",
|
|
1116
|
+
children: [
|
|
1117
|
+
/* @__PURE__ */ k(C, { size: 11 }),
|
|
1118
|
+
"PDF, DOC, or DOCX up to 10 MB.",
|
|
1119
|
+
K ? ` Selected: ${K.name}` : ""
|
|
1120
|
+
]
|
|
1121
|
+
}),
|
|
1122
|
+
Ge && /* @__PURE__ */ k("p", {
|
|
1123
|
+
className: "text-xs text-status-error-text",
|
|
1124
|
+
children: Ge
|
|
1125
|
+
})
|
|
1126
|
+
]
|
|
1127
|
+
})
|
|
1128
|
+
]
|
|
1129
|
+
}),
|
|
1130
|
+
/* @__PURE__ */ A(ee, { children: [/* @__PURE__ */ k(t, {
|
|
1131
|
+
type: "button",
|
|
1132
|
+
variant: "outline",
|
|
1133
|
+
onClick: () => {
|
|
1134
|
+
H(!1), St();
|
|
1135
|
+
},
|
|
1136
|
+
disabled: Ke,
|
|
1137
|
+
children: "Cancel"
|
|
1138
|
+
}), /* @__PURE__ */ k(t, {
|
|
1139
|
+
type: "submit",
|
|
1140
|
+
form: "add-candidate-form",
|
|
1141
|
+
disabled: Ke,
|
|
1142
|
+
children: Ke ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(S, {
|
|
1143
|
+
size: 16,
|
|
1144
|
+
className: "animate-spin mr-2"
|
|
1145
|
+
}), "Adding…"] }) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(E, {
|
|
1146
|
+
size: 16,
|
|
1147
|
+
className: "mr-2"
|
|
1148
|
+
}), "Add Candidate"] })
|
|
1149
|
+
})] })
|
|
1150
|
+
]
|
|
1151
|
+
})
|
|
1152
|
+
}),
|
|
1153
|
+
He && /* @__PURE__ */ k(Pe, {
|
|
1154
|
+
mode: He,
|
|
1155
|
+
open: !!He,
|
|
1156
|
+
onClose: () => V(null),
|
|
1157
|
+
applications: mt,
|
|
1158
|
+
jobPostingId: R
|
|
1159
|
+
})
|
|
437
1160
|
]
|
|
438
1161
|
});
|
|
439
1162
|
}
|
|
440
1163
|
//#endregion
|
|
441
|
-
export {
|
|
1164
|
+
export { I as JobApplicationsPage };
|
|
442
1165
|
|
|
443
1166
|
//# sourceMappingURL=JobApplicationsPage.js.map
|