@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.
@@ -7,9 +7,9 @@ import { useEffect as ue, useRef as d, useState as f } from "react";
7
7
  import { AlertCircle as p, ArrowLeft as m, Briefcase as h, Building2 as de, Check as g, CheckCircle as fe, Clock as pe, Edit2 as _, FileText as me, Layers as he, Loader2 as v, MapPin as ge, Plus as y, Trash2 as _e, Users as ve, X as b } from "lucide-react";
8
8
  import { useNavigate as ye, useParams as be } from "react-router";
9
9
  import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
10
- import { AlertDialog as xe, AlertDialogAction as Se, AlertDialogCancel as Ce, AlertDialogContent as we, AlertDialogDescription as Te, AlertDialogFooter as w, AlertDialogHeader as T, AlertDialogTitle as E, ResponsiveDialog as D, ResponsiveDialogContent as O, ResponsiveDialogHeader as k, ResponsiveDialogTitle as A } from "@burdenoff/fe-libs/ui";
10
+ import { AlertDialog as xe, AlertDialogAction as Se, AlertDialogCancel as Ce, AlertDialogContent as we, AlertDialogDescription as Te, AlertDialogFooter as Ee, AlertDialogHeader as De, AlertDialogTitle as w, ResponsiveDialog as T, ResponsiveDialogContent as E, ResponsiveDialogHeader as D, ResponsiveDialogTitle as O } from "@burdenoff/fe-libs/ui";
11
11
  //#region src/support/pages/JobPostingDetailPage.tsx
12
- var Ee = {
12
+ var Oe = {
13
13
  [s.Draft]: {
14
14
  label: "Draft",
15
15
  variant: "secondary"
@@ -26,19 +26,19 @@ var Ee = {
26
26
  label: "Archived",
27
27
  variant: "destructive"
28
28
  }
29
- }, De = {
29
+ }, ke = {
30
30
  [a.FullTime]: "Full-time",
31
31
  [a.PartTime]: "Part-time",
32
32
  [a.Contract]: "Contract",
33
33
  [a.Internship]: "Internship"
34
- }, Oe = {
34
+ }, Ae = {
35
35
  [o.PhoneScreen]: "Phone Screen",
36
36
  [o.Technical]: "Technical",
37
37
  [o.CultureFit]: "Culture Fit",
38
38
  [o.Hr]: "HR",
39
39
  [o.TakeHome]: "Take-home",
40
40
  [o.Final]: "Final"
41
- }, j = {
41
+ }, je = {
42
42
  NEW: "bg-status-info-bg-subtle text-status-info-text",
43
43
  SCREENING: "bg-status-warning-bg-subtle text-status-warning-text",
44
44
  SHORTLISTED: "bg-accent-purple-subtle text-accent-purple",
@@ -46,7 +46,7 @@ var Ee = {
46
46
  HIRED: "bg-status-success-bg-subtle text-status-success-text",
47
47
  REJECTED: "bg-status-error-bg-subtle text-status-error-text",
48
48
  ARCHIVED: "bg-bg-sunken text-text-secondary"
49
- }, ke = {
49
+ }, Me = {
50
50
  NEW: "New",
51
51
  SCREENING: "Screening",
52
52
  SHORTLISTED: "Shortlisted",
@@ -55,14 +55,20 @@ var Ee = {
55
55
  REJECTED: "Rejected",
56
56
  ARCHIVED: "Archived"
57
57
  };
58
- function Ae(e) {
58
+ function Ne(e) {
59
59
  return new Date(e).toLocaleDateString("en-US", {
60
60
  month: "short",
61
61
  day: "numeric",
62
62
  year: "numeric"
63
63
  });
64
64
  }
65
- function je() {
65
+ function k(e) {
66
+ return e.split("\n").map((e) => e.trim()).filter(Boolean);
67
+ }
68
+ function A(e) {
69
+ return (e ?? []).join("\n");
70
+ }
71
+ function Pe() {
66
72
  let [e, t] = f(null), n = d(null);
67
73
  return ue(() => () => {
68
74
  n.current && clearTimeout(n.current);
@@ -76,166 +82,189 @@ function je() {
76
82
  }
77
83
  };
78
84
  }
79
- function M() {
80
- let { id: d } = be(), M = ye(), { notification: N, show: P } = je(), [Me, Ne] = f("rounds"), [Pe, F] = f(!1), [Fe, I] = f(!1), [L, R] = f(null), [z, B] = f({
85
+ function j() {
86
+ let { id: d } = be(), j = ye(), { notification: M, show: N } = Pe(), [Fe, Ie] = f("rounds"), [Le, P] = f(!1), [Re, F] = f(!1), [I, L] = f(null), [R, z] = f({
81
87
  name: "",
82
88
  roundType: o.Technical,
83
89
  description: "",
84
90
  isAssignmentRound: !1,
85
91
  isRequired: !0
86
- }), [Ie, V] = f(!1), [H, U] = f(null), [W, G] = f({
92
+ }), [ze, B] = f(!1), [V, H] = f(null), [U, W] = f({
87
93
  title: "",
88
94
  description: "",
89
95
  problemStatement: "",
90
96
  difficulty: "",
91
- isActive: !0
92
- }), [K, q] = f(null), [J, Y] = f(null), { data: Le, loading: Re, error: ze } = ae({
97
+ isActive: !0,
98
+ ownerEmail: ""
99
+ }), [G, K] = f(null), [q, J] = f(null), { data: Be, loading: Ve, error: He } = ae({
93
100
  variables: { id: d },
94
101
  skip: !d
95
- }), X = Le?.jobPosting, [Be, { loading: Ve }] = ce({ refetchQueries: ["GetJobPosting"] }), [He, { loading: Ue }] = te({ refetchQueries: ["GetJobPosting"] }), [We, { loading: Ge }] = oe({ refetchQueries: ["GetJobPosting"] }), [Ke, { loading: qe }] = re({ refetchQueries: ["GetJobPosting"] }), [Je, { loading: Ye }] = ne({ refetchQueries: ["GetJobPosting"] }), [Xe, { loading: Ze }] = se({ refetchQueries: ["GetJobPosting"] }), [Qe, { loading: $e }] = ie({ refetchQueries: ["GetJobPosting"] }), [Z, Q] = f({
102
+ }), Y = Be?.jobPosting, [Ue, { loading: We }] = ce({ refetchQueries: ["GetJobPosting"] }), [Ge, { loading: Ke }] = te({ refetchQueries: ["GetJobPosting"] }), [qe, { loading: Je }] = oe({ refetchQueries: ["GetJobPosting"] }), [Ye, { loading: Xe }] = re({ refetchQueries: ["GetJobPosting"] }), [Ze, { loading: Qe }] = ne({ refetchQueries: ["GetJobPosting"] }), [$e, { loading: et }] = se({ refetchQueries: ["GetJobPosting"] }), [tt, { loading: nt }] = ie({ refetchQueries: ["GetJobPosting"] }), [X, Z] = f({
96
103
  title: "",
97
104
  department: "",
98
105
  location: "",
99
106
  employmentType: "",
100
107
  description: "",
101
108
  productId: "",
102
- status: s.Draft
109
+ status: s.Draft,
110
+ slug: "",
111
+ openings: "",
112
+ overview: "",
113
+ responsibilities: "",
114
+ learnings: "",
115
+ qualifications: ""
103
116
  });
104
117
  if (ue(() => {
105
- X && Q({
106
- title: X.title,
107
- department: X.department ?? "",
108
- location: X.location ?? "",
109
- employmentType: X.employmentType ?? "",
110
- description: X.description ?? "",
111
- productId: X.productId ?? "",
112
- status: X.status
118
+ Y && Z({
119
+ title: Y.title,
120
+ department: Y.department ?? "",
121
+ location: Y.location ?? "",
122
+ employmentType: Y.employmentType ?? "",
123
+ description: Y.description ?? "",
124
+ productId: Y.productId ?? "",
125
+ status: Y.status,
126
+ slug: Y.slug ?? "",
127
+ openings: Y.openings == null ? "" : String(Y.openings),
128
+ overview: Y.overview ?? "",
129
+ responsibilities: A(Y.responsibilities),
130
+ learnings: A(Y.learnings),
131
+ qualifications: A(Y.qualifications)
113
132
  });
114
- }, [X]), Re) return /* @__PURE__ */ S(u, {
133
+ }, [Y]), Ve) return /* @__PURE__ */ S(u, {
115
134
  title: "Job Posting",
116
135
  subtitle: "Loading posting details…",
117
136
  icon: /* @__PURE__ */ S(h, { size: 24 }),
118
137
  children: /* @__PURE__ */ S(le, { message: "Loading job posting…" })
119
138
  });
120
- if (ze || !X) return /* @__PURE__ */ S(u, {
139
+ if (He || !Y) return /* @__PURE__ */ S(u, {
121
140
  title: "Job Posting",
122
141
  icon: /* @__PURE__ */ S(h, { size: 24 }),
123
142
  children: /* @__PURE__ */ S(l, {
124
143
  icon: /* @__PURE__ */ S(p, { size: 48 }),
125
144
  title: "Posting not found",
126
- description: ze?.message || "This job posting may have been deleted or you don't have access.",
145
+ description: He?.message || "This job posting may have been deleted or you don't have access.",
127
146
  action: /* @__PURE__ */ C(t, {
128
- onClick: () => M("/support/applications/postings"),
147
+ onClick: () => j("/support/applications/postings"),
129
148
  children: [/* @__PURE__ */ S(m, { size: 16 }), "Back to Postings"]
130
149
  })
131
150
  })
132
151
  });
133
- let et = Ee[X.status], $ = [...X.rounds].sort((e, t) => e.roundNumber - t.roundNumber), tt = async (e) => {
134
- if (e.preventDefault(), !(!d || !Z.title.trim())) try {
135
- await Be({ variables: {
152
+ let Q = Oe[Y.status], $ = [...Y.rounds].sort((e, t) => e.roundNumber - t.roundNumber), rt = async (e) => {
153
+ if (e.preventDefault(), !d || !X.title.trim()) return;
154
+ let t = X.openings.trim() ? parseInt(X.openings.trim(), 10) : void 0;
155
+ try {
156
+ await Ue({ variables: {
136
157
  id: d,
137
158
  input: {
138
- title: Z.title,
139
- department: Z.department || void 0,
140
- location: Z.location || void 0,
141
- employmentType: Z.employmentType || void 0,
142
- description: Z.description || void 0,
143
- productId: Z.productId || void 0,
144
- status: Z.status
159
+ title: X.title,
160
+ department: X.department || void 0,
161
+ location: X.location || void 0,
162
+ employmentType: X.employmentType || void 0,
163
+ description: X.description || void 0,
164
+ productId: X.productId || void 0,
165
+ status: X.status,
166
+ slug: X.slug.trim() || void 0,
167
+ openings: t && !Number.isNaN(t) ? t : void 0,
168
+ overview: X.overview.trim() || void 0,
169
+ responsibilities: k(X.responsibilities),
170
+ learnings: k(X.learnings),
171
+ qualifications: k(X.qualifications)
145
172
  }
146
- } }), P("success", "Job posting updated."), F(!1);
173
+ } }), N("success", "Job posting updated."), P(!1);
147
174
  } catch {
148
- P("error", "Failed to update job posting.");
175
+ N("error", "Failed to update job posting.");
149
176
  }
150
- }, nt = () => {
151
- R(null), B({
177
+ }, it = () => {
178
+ L(null), z({
152
179
  name: "",
153
180
  roundType: o.Technical,
154
181
  description: "",
155
182
  isAssignmentRound: !1,
156
183
  isRequired: !0
157
- }), I(!0);
158
- }, rt = (e) => {
159
- R(e), B({
184
+ }), F(!0);
185
+ }, at = (e) => {
186
+ L(e), z({
160
187
  name: e.name,
161
188
  roundType: e.roundType,
162
189
  description: e.description ?? "",
163
190
  isAssignmentRound: e.isAssignmentRound,
164
191
  isRequired: e.isRequired
165
- }), I(!0);
166
- }, it = () => {
167
- I(!1), R(null);
168
- }, at = async (e) => {
169
- if (e.preventDefault(), !(!d || !z.name.trim())) try {
170
- L ? (await We({ variables: {
171
- id: L.id,
192
+ }), F(!0);
193
+ }, ot = () => {
194
+ F(!1), L(null);
195
+ }, st = async (e) => {
196
+ if (e.preventDefault(), !(!d || !R.name.trim())) try {
197
+ I ? (await qe({ variables: {
198
+ id: I.id,
172
199
  input: {
173
- name: z.name,
174
- roundType: z.roundType,
175
- description: z.description || void 0,
176
- isAssignmentRound: z.isAssignmentRound,
177
- isRequired: z.isRequired
200
+ name: R.name,
201
+ roundType: R.roundType,
202
+ description: R.description || void 0,
203
+ isAssignmentRound: R.isAssignmentRound,
204
+ isRequired: R.isRequired
178
205
  }
179
- } }), P("success", "Round config updated.")) : (await He({ variables: { input: {
206
+ } }), N("success", "Round config updated.")) : (await Ge({ variables: { input: {
180
207
  jobPostingId: d,
181
- name: z.name,
182
- roundType: z.roundType,
183
- description: z.description || void 0,
208
+ name: R.name,
209
+ roundType: R.roundType,
210
+ description: R.description || void 0,
184
211
  roundNumber: $.length + 1,
185
- isAssignmentRound: z.isAssignmentRound,
186
- isRequired: z.isRequired
187
- } } }), P("success", "Round config created.")), it();
212
+ isAssignmentRound: R.isAssignmentRound,
213
+ isRequired: R.isRequired
214
+ } } }), N("success", "Round config created.")), ot();
188
215
  } catch {
189
- P("error", `Failed to ${L ? "update" : "create"} round config.`);
216
+ N("error", `Failed to ${I ? "update" : "create"} round config.`);
190
217
  }
191
- }, ot = async () => {
192
- let e = K;
218
+ }, ct = async () => {
219
+ let e = G;
193
220
  if (e) {
194
- q(null);
221
+ K(null);
195
222
  try {
196
- await Ke({ variables: { id: e } }), P("success", "Round config deleted.");
223
+ await Ye({ variables: { id: e } }), N("success", "Round config deleted.");
197
224
  } catch {
198
- P("error", "Failed to delete round config.");
225
+ N("error", "Failed to delete round config.");
199
226
  }
200
227
  }
201
- }, st = () => {
202
- U(null), G({
228
+ }, lt = () => {
229
+ H(null), W({
203
230
  title: "",
204
231
  description: "",
205
232
  problemStatement: "",
206
233
  difficulty: "",
207
- isActive: !0
208
- }), V(!0);
209
- }, ct = (e) => {
210
- U(e), G({
234
+ isActive: !0,
235
+ ownerEmail: ""
236
+ }), B(!0);
237
+ }, ut = (e) => {
238
+ H(e), W({
211
239
  title: e.title,
212
240
  description: e.description,
213
241
  problemStatement: e.problemStatement ?? "",
214
242
  difficulty: e.difficulty ?? "",
215
- isActive: e.isActive
216
- }), V(!0);
217
- }, lt = () => {
218
- V(!1), U(null);
243
+ isActive: e.isActive,
244
+ ownerEmail: e.ownerEmail ?? ""
245
+ }), B(!0);
246
+ }, dt = () => {
247
+ B(!1), H(null);
219
248
  };
220
249
  return /* @__PURE__ */ C(u, {
221
- title: X.title,
250
+ title: Y.title,
222
251
  subtitle: "Manage interview rounds, take-home assignments and applications for this posting.",
223
252
  icon: /* @__PURE__ */ S(h, { size: 24 }),
224
253
  headerActions: /* @__PURE__ */ C("div", {
225
254
  className: "flex items-center gap-2",
226
255
  children: [/* @__PURE__ */ C(t, {
227
256
  variant: "outline",
228
- onClick: () => M("/support/applications/postings"),
257
+ onClick: () => j("/support/applications/postings"),
229
258
  children: [/* @__PURE__ */ S(m, { size: 16 }), "Back"]
230
259
  }), /* @__PURE__ */ C(t, {
231
- onClick: () => F(!0),
260
+ onClick: () => P(!0),
232
261
  children: [/* @__PURE__ */ S(_, { size: 16 }), "Edit Posting"]
233
262
  })]
234
263
  }),
235
264
  children: [
236
- N && /* @__PURE__ */ C("div", {
237
- className: c("fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200", N.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border-border-subtle" : "bg-status-error-bg-subtle text-status-error-text border-border-subtle"),
238
- children: [N.type === "success" ? /* @__PURE__ */ S(fe, {
265
+ M && /* @__PURE__ */ C("div", {
266
+ className: c("fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200", M.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border-border-subtle" : "bg-status-error-bg-subtle text-status-error-text border-border-subtle"),
267
+ children: [M.type === "success" ? /* @__PURE__ */ S(fe, {
239
268
  size: 20,
240
269
  className: "text-status-success-text"
241
270
  }) : /* @__PURE__ */ S(p, {
@@ -243,7 +272,7 @@ function M() {
243
272
  className: "text-status-error-text"
244
273
  }), /* @__PURE__ */ S("span", {
245
274
  className: "font-medium",
246
- children: N.message
275
+ children: M.message
247
276
  })]
248
277
  }),
249
278
  /* @__PURE__ */ C("div", {
@@ -254,40 +283,40 @@ function M() {
254
283
  className: "flex items-center gap-3 mb-2 flex-wrap",
255
284
  children: [/* @__PURE__ */ S("h1", {
256
285
  className: "text-xl font-bold text-text-primary",
257
- children: X.title
286
+ children: Y.title
258
287
  }), /* @__PURE__ */ S(e, {
259
- variant: et.variant,
260
- children: et.label
288
+ variant: Q.variant,
289
+ children: Q.label
261
290
  })]
262
291
  }), /* @__PURE__ */ C("div", {
263
292
  className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-text-secondary",
264
293
  children: [
265
- X.department && /* @__PURE__ */ C("span", {
294
+ Y.department && /* @__PURE__ */ C("span", {
266
295
  className: "flex items-center gap-1.5",
267
- children: [/* @__PURE__ */ S(de, { size: 14 }), X.department]
296
+ children: [/* @__PURE__ */ S(de, { size: 14 }), Y.department]
268
297
  }),
269
- X.location && /* @__PURE__ */ C("span", {
298
+ Y.location && /* @__PURE__ */ C("span", {
270
299
  className: "flex items-center gap-1.5",
271
- children: [/* @__PURE__ */ S(ge, { size: 14 }), X.location]
300
+ children: [/* @__PURE__ */ S(ge, { size: 14 }), Y.location]
272
301
  }),
273
- X.employmentType && /* @__PURE__ */ C("span", {
302
+ Y.employmentType && /* @__PURE__ */ C("span", {
274
303
  className: "flex items-center gap-1.5",
275
- children: [/* @__PURE__ */ S(pe, { size: 14 }), De[X.employmentType]]
304
+ children: [/* @__PURE__ */ S(pe, { size: 14 }), ke[Y.employmentType]]
276
305
  }),
277
- X.productId && /* @__PURE__ */ C("span", {
306
+ Y.productId && /* @__PURE__ */ C("span", {
278
307
  className: "flex items-center gap-1.5",
279
- children: [/* @__PURE__ */ S(he, { size: 14 }), X.productId]
308
+ children: [/* @__PURE__ */ S(he, { size: 14 }), Y.productId]
280
309
  })
281
310
  ]
282
311
  })] })
283
- }), X.description && /* @__PURE__ */ S("p", {
312
+ }), Y.description && /* @__PURE__ */ S("p", {
284
313
  className: "mt-4 text-sm text-text-primary leading-relaxed whitespace-pre-wrap",
285
- children: X.description
314
+ children: Y.description
286
315
  })]
287
316
  }),
288
317
  /* @__PURE__ */ C(n, {
289
- value: Me,
290
- onValueChange: Ne,
318
+ value: Fe,
319
+ onValueChange: Ie,
291
320
  children: [
292
321
  /* @__PURE__ */ C(ee, {
293
322
  className: "mb-6",
@@ -300,7 +329,7 @@ function M() {
300
329
  "Interview Rounds",
301
330
  /* @__PURE__ */ S("span", {
302
331
  className: "ml-1 inline-flex items-center justify-center px-1.5 py-0.5 rounded-full text-[10px] font-medium bg-bg-sunken text-text-secondary",
303
- children: X.rounds.length
332
+ children: Y.rounds.length
304
333
  })
305
334
  ]
306
335
  }),
@@ -312,7 +341,7 @@ function M() {
312
341
  "Assignments",
313
342
  /* @__PURE__ */ S("span", {
314
343
  className: "ml-1 inline-flex items-center justify-center px-1.5 py-0.5 rounded-full text-[10px] font-medium bg-bg-sunken text-text-secondary",
315
- children: X.assignments.length
344
+ children: Y.assignments.length
316
345
  })
317
346
  ]
318
347
  }),
@@ -324,7 +353,7 @@ function M() {
324
353
  "Applications",
325
354
  /* @__PURE__ */ S("span", {
326
355
  className: "ml-1 inline-flex items-center justify-center px-1.5 py-0.5 rounded-full text-[10px] font-medium bg-bg-sunken text-text-secondary",
327
- children: X.applications.length
356
+ children: Y.applications.length
328
357
  })
329
358
  ]
330
359
  })
@@ -339,7 +368,7 @@ function M() {
339
368
  className: "text-lg font-semibold text-text-primary",
340
369
  children: "Interview Rounds"
341
370
  }), /* @__PURE__ */ C(t, {
342
- onClick: nt,
371
+ onClick: it,
343
372
  children: [/* @__PURE__ */ S(y, { size: 16 }), "Add Round"]
344
373
  })]
345
374
  }), $.length === 0 ? /* @__PURE__ */ S(l, {
@@ -347,7 +376,7 @@ function M() {
347
376
  title: "No rounds configured",
348
377
  description: "Add interview rounds to define your hiring pipeline for this posting.",
349
378
  action: /* @__PURE__ */ C(t, {
350
- onClick: nt,
379
+ onClick: it,
351
380
  children: [/* @__PURE__ */ S(y, { size: 16 }), "Add Round"]
352
381
  })
353
382
  }) : /* @__PURE__ */ S("div", {
@@ -370,7 +399,7 @@ function M() {
370
399
  }),
371
400
  /* @__PURE__ */ S(e, {
372
401
  variant: "secondary",
373
- children: Oe[t.roundType]
402
+ children: Ae[t.roundType]
374
403
  }),
375
404
  t.isAssignmentRound && /* @__PURE__ */ S(e, {
376
405
  variant: "outline",
@@ -390,19 +419,19 @@ function M() {
390
419
  className: "flex items-center gap-1",
391
420
  children: [/* @__PURE__ */ S("button", {
392
421
  type: "button",
393
- onClick: () => rt(t),
422
+ onClick: () => at(t),
394
423
  className: "min-h-10 min-w-10 p-2 rounded-lg hover:bg-bg-sunken text-text-secondary transition-colors",
395
424
  "aria-label": "Edit round config",
396
425
  title: "Edit round config",
397
426
  children: /* @__PURE__ */ S(_, { size: 16 })
398
427
  }), /* @__PURE__ */ S("button", {
399
428
  type: "button",
400
- onClick: () => q(t.id),
401
- disabled: qe,
429
+ onClick: () => K(t.id),
430
+ disabled: Xe,
402
431
  className: "min-h-10 min-w-10 p-2 rounded-lg hover:bg-bg-sunken text-status-error-text transition-colors disabled:opacity-50",
403
432
  "aria-label": "Delete round config",
404
433
  title: "Delete round config",
405
- children: qe && K === t.id ? /* @__PURE__ */ S(v, {
434
+ children: Xe && G === t.id ? /* @__PURE__ */ S(v, {
406
435
  size: 16,
407
436
  className: "animate-spin"
408
437
  }) : /* @__PURE__ */ S(_e, { size: 16 })
@@ -421,20 +450,20 @@ function M() {
421
450
  className: "text-lg font-semibold text-text-primary",
422
451
  children: "Take-home Assignments"
423
452
  }), /* @__PURE__ */ C(t, {
424
- onClick: st,
453
+ onClick: lt,
425
454
  children: [/* @__PURE__ */ S(y, { size: 16 }), "Add Assignment"]
426
455
  })]
427
- }), X.assignments.length === 0 ? /* @__PURE__ */ S(l, {
456
+ }), Y.assignments.length === 0 ? /* @__PURE__ */ S(l, {
428
457
  icon: /* @__PURE__ */ S(me, { size: 48 }),
429
458
  title: "No assignments configured",
430
459
  description: "Add take-home assignments for candidates to complete during the hiring process.",
431
460
  action: /* @__PURE__ */ C(t, {
432
- onClick: st,
461
+ onClick: lt,
433
462
  children: [/* @__PURE__ */ S(y, { size: 16 }), "Add Assignment"]
434
463
  })
435
464
  }) : /* @__PURE__ */ S("div", {
436
465
  className: "space-y-3",
437
- children: X.assignments.map((t) => /* @__PURE__ */ C("div", {
466
+ children: Y.assignments.map((t) => /* @__PURE__ */ C("div", {
438
467
  className: c("p-4 rounded-xl border border-border-seam bg-bg-surface shadow-[var(--shadow-pop)] flex flex-col sm:flex-row sm:items-start gap-4", !t.isActive && "opacity-60"),
439
468
  children: [/* @__PURE__ */ C("div", {
440
469
  className: "flex-1 min-w-0",
@@ -463,25 +492,32 @@ function M() {
463
492
  t.problemStatement && /* @__PURE__ */ S("div", {
464
493
  className: "mt-3 p-3 rounded-lg bg-bg-sunken text-sm text-text-primary whitespace-pre-wrap",
465
494
  children: t.problemStatement
495
+ }),
496
+ t.ownerEmail && /* @__PURE__ */ C("p", {
497
+ className: "mt-2 text-xs text-text-secondary",
498
+ children: ["Owner: ", /* @__PURE__ */ S("span", {
499
+ className: "text-text-primary",
500
+ children: t.ownerEmail
501
+ })]
466
502
  })
467
503
  ]
468
504
  }), /* @__PURE__ */ C("div", {
469
505
  className: "flex items-center gap-1",
470
506
  children: [/* @__PURE__ */ S("button", {
471
507
  type: "button",
472
- onClick: () => ct(t),
508
+ onClick: () => ut(t),
473
509
  className: "min-h-10 min-w-10 p-2 rounded-lg hover:bg-bg-sunken text-text-secondary transition-colors",
474
510
  "aria-label": "Edit assignment",
475
511
  title: "Edit assignment",
476
512
  children: /* @__PURE__ */ S(_, { size: 16 })
477
513
  }), /* @__PURE__ */ S("button", {
478
514
  type: "button",
479
- onClick: () => Y(t.id),
480
- disabled: $e,
515
+ onClick: () => J(t.id),
516
+ disabled: nt,
481
517
  className: "min-h-10 min-w-10 p-2 rounded-lg hover:bg-bg-sunken text-status-error-text transition-colors disabled:opacity-50",
482
518
  "aria-label": "Delete assignment",
483
519
  title: "Delete assignment",
484
- children: $e && J === t.id ? /* @__PURE__ */ S(v, {
520
+ children: nt && q === t.id ? /* @__PURE__ */ S(v, {
485
521
  size: 16,
486
522
  className: "animate-spin"
487
523
  }) : /* @__PURE__ */ S(_e, { size: 16 })
@@ -499,15 +535,15 @@ function M() {
499
535
  className: "text-lg font-semibold text-text-primary",
500
536
  children: "Applications"
501
537
  })
502
- }), X.applications.length === 0 ? /* @__PURE__ */ S(l, {
538
+ }), Y.applications.length === 0 ? /* @__PURE__ */ S(l, {
503
539
  icon: /* @__PURE__ */ S(h, { size: 48 }),
504
540
  title: "No applications yet",
505
541
  description: "Candidates who apply for this posting will appear here."
506
542
  }) : /* @__PURE__ */ S("div", {
507
543
  className: "space-y-3",
508
- children: X.applications.map((e) => /* @__PURE__ */ S("button", {
544
+ children: Y.applications.map((e) => /* @__PURE__ */ S("button", {
509
545
  type: "button",
510
- onClick: () => M(`/support/applications/${e.id}`),
546
+ onClick: () => j(`/support/applications/${e.id}`),
511
547
  className: "w-full text-left p-4 bg-bg-surface border border-border-seam rounded-xl shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] duration-200 group",
512
548
  children: /* @__PURE__ */ C("div", {
513
549
  className: "flex items-start justify-between gap-4",
@@ -523,8 +559,8 @@ function M() {
523
559
  e.lastName
524
560
  ]
525
561
  }), /* @__PURE__ */ S("span", {
526
- className: c("inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium", j[e.status] || j.NEW),
527
- children: ke[e.status] || e.status
562
+ className: c("inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium", je[e.status] || je.NEW),
563
+ children: Me[e.status] || e.status
528
564
  })]
529
565
  }), /* @__PURE__ */ S("p", {
530
566
  className: "text-xs text-text-secondary truncate",
@@ -532,7 +568,7 @@ function M() {
532
568
  })]
533
569
  }), /* @__PURE__ */ S("div", {
534
570
  className: "text-xs text-text-secondary whitespace-nowrap",
535
- children: Ae(e.createdAt)
571
+ children: Ne(e.createdAt)
536
572
  })]
537
573
  })
538
574
  }, e.id))
@@ -540,13 +576,13 @@ function M() {
540
576
  })
541
577
  ]
542
578
  }),
543
- /* @__PURE__ */ S(D, {
544
- open: Pe,
545
- onOpenChange: F,
546
- children: /* @__PURE__ */ C(O, {
579
+ /* @__PURE__ */ S(T, {
580
+ open: Le,
581
+ onOpenChange: P,
582
+ children: /* @__PURE__ */ C(E, {
547
583
  className: "w-full max-w-lg max-h-[90vh] overflow-y-auto",
548
- children: [/* @__PURE__ */ S(k, { children: /* @__PURE__ */ S(A, { children: "Edit Job Posting" }) }), /* @__PURE__ */ C("form", {
549
- onSubmit: tt,
584
+ children: [/* @__PURE__ */ S(D, { children: /* @__PURE__ */ S(O, { children: "Edit Job Posting" }) }), /* @__PURE__ */ C("form", {
585
+ onSubmit: rt,
550
586
  className: "space-y-5",
551
587
  children: [
552
588
  /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
@@ -559,14 +595,47 @@ function M() {
559
595
  }), /* @__PURE__ */ S("input", {
560
596
  id: "posting-title",
561
597
  type: "text",
562
- value: Z.title,
563
- onChange: (e) => Q({
564
- ...Z,
598
+ value: X.title,
599
+ onChange: (e) => Z({
600
+ ...X,
565
601
  title: e.target.value
566
602
  }),
567
603
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
568
604
  required: !0
569
605
  })] }),
606
+ /* @__PURE__ */ C("div", {
607
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
608
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
609
+ htmlFor: "posting-slug",
610
+ className: "block text-sm font-medium text-text-primary mb-2",
611
+ children: "Slug"
612
+ }), /* @__PURE__ */ S("input", {
613
+ id: "posting-slug",
614
+ type: "text",
615
+ value: X.slug,
616
+ onChange: (e) => Z({
617
+ ...X,
618
+ slug: e.target.value
619
+ }),
620
+ placeholder: "e.g., product-engineering-intern-full-stack",
621
+ className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
622
+ })] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
623
+ htmlFor: "posting-openings",
624
+ className: "block text-sm font-medium text-text-primary mb-2",
625
+ children: "Openings"
626
+ }), /* @__PURE__ */ S("input", {
627
+ id: "posting-openings",
628
+ type: "number",
629
+ min: 1,
630
+ value: X.openings,
631
+ onChange: (e) => Z({
632
+ ...X,
633
+ openings: e.target.value
634
+ }),
635
+ placeholder: "e.g., 2",
636
+ className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
637
+ })] })]
638
+ }),
570
639
  /* @__PURE__ */ C("div", {
571
640
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
572
641
  children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
@@ -576,9 +645,9 @@ function M() {
576
645
  }), /* @__PURE__ */ S("input", {
577
646
  id: "posting-department",
578
647
  type: "text",
579
- value: Z.department,
580
- onChange: (e) => Q({
581
- ...Z,
648
+ value: X.department,
649
+ onChange: (e) => Z({
650
+ ...X,
582
651
  department: e.target.value
583
652
  }),
584
653
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
@@ -589,9 +658,9 @@ function M() {
589
658
  }), /* @__PURE__ */ S("input", {
590
659
  id: "posting-location",
591
660
  type: "text",
592
- value: Z.location,
593
- onChange: (e) => Q({
594
- ...Z,
661
+ value: X.location,
662
+ onChange: (e) => Z({
663
+ ...X,
595
664
  location: e.target.value
596
665
  }),
597
666
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
@@ -605,9 +674,9 @@ function M() {
605
674
  children: "Employment Type"
606
675
  }), /* @__PURE__ */ C("select", {
607
676
  id: "posting-employment-type",
608
- value: Z.employmentType,
609
- onChange: (e) => Q({
610
- ...Z,
677
+ value: X.employmentType,
678
+ onChange: (e) => Z({
679
+ ...X,
611
680
  employmentType: e.target.value
612
681
  }),
613
682
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
@@ -639,9 +708,9 @@ function M() {
639
708
  children: "Status"
640
709
  }), /* @__PURE__ */ C("select", {
641
710
  id: "posting-status",
642
- value: Z.status,
643
- onChange: (e) => Q({
644
- ...Z,
711
+ value: X.status,
712
+ onChange: (e) => Z({
713
+ ...X,
645
714
  status: e.target.value
646
715
  }),
647
716
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
@@ -672,9 +741,9 @@ function M() {
672
741
  }), /* @__PURE__ */ S("input", {
673
742
  id: "posting-product-id",
674
743
  type: "text",
675
- value: Z.productId,
676
- onChange: (e) => Q({
677
- ...Z,
744
+ value: X.productId,
745
+ onChange: (e) => Z({
746
+ ...X,
678
747
  productId: e.target.value
679
748
  }),
680
749
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
@@ -685,28 +754,109 @@ function M() {
685
754
  children: "Description"
686
755
  }), /* @__PURE__ */ S("textarea", {
687
756
  id: "posting-description",
688
- value: Z.description,
689
- onChange: (e) => Q({
690
- ...Z,
757
+ value: X.description,
758
+ onChange: (e) => Z({
759
+ ...X,
691
760
  description: e.target.value
692
761
  }),
693
762
  rows: 4,
694
763
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary resize-none"
695
764
  })] }),
765
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
766
+ htmlFor: "posting-overview",
767
+ className: "block text-sm font-medium text-text-primary mb-2",
768
+ children: "Overview"
769
+ }), /* @__PURE__ */ S("textarea", {
770
+ id: "posting-overview",
771
+ value: X.overview,
772
+ onChange: (e) => Z({
773
+ ...X,
774
+ overview: e.target.value
775
+ }),
776
+ rows: 3,
777
+ placeholder: "Short pitch shown at the top of the careers page…",
778
+ className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary resize-none"
779
+ })] }),
780
+ /* @__PURE__ */ C("div", { children: [
781
+ /* @__PURE__ */ S("label", {
782
+ htmlFor: "posting-responsibilities",
783
+ className: "block text-sm font-medium text-text-primary mb-2",
784
+ children: "Responsibilities"
785
+ }),
786
+ /* @__PURE__ */ S("textarea", {
787
+ id: "posting-responsibilities",
788
+ value: X.responsibilities,
789
+ onChange: (e) => Z({
790
+ ...X,
791
+ responsibilities: e.target.value
792
+ }),
793
+ rows: 4,
794
+ placeholder: "One responsibility per line",
795
+ className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary resize-none"
796
+ }),
797
+ /* @__PURE__ */ S("p", {
798
+ className: "mt-1 text-xs text-text-secondary",
799
+ children: "Enter one item per line."
800
+ })
801
+ ] }),
802
+ /* @__PURE__ */ C("div", { children: [
803
+ /* @__PURE__ */ S("label", {
804
+ htmlFor: "posting-learnings",
805
+ className: "block text-sm font-medium text-text-primary mb-2",
806
+ children: "Learnings"
807
+ }),
808
+ /* @__PURE__ */ S("textarea", {
809
+ id: "posting-learnings",
810
+ value: X.learnings,
811
+ onChange: (e) => Z({
812
+ ...X,
813
+ learnings: e.target.value
814
+ }),
815
+ rows: 4,
816
+ placeholder: "One learning per line",
817
+ className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary resize-none"
818
+ }),
819
+ /* @__PURE__ */ S("p", {
820
+ className: "mt-1 text-xs text-text-secondary",
821
+ children: "Enter one item per line."
822
+ })
823
+ ] }),
824
+ /* @__PURE__ */ C("div", { children: [
825
+ /* @__PURE__ */ S("label", {
826
+ htmlFor: "posting-qualifications",
827
+ className: "block text-sm font-medium text-text-primary mb-2",
828
+ children: "Qualifications"
829
+ }),
830
+ /* @__PURE__ */ S("textarea", {
831
+ id: "posting-qualifications",
832
+ value: X.qualifications,
833
+ onChange: (e) => Z({
834
+ ...X,
835
+ qualifications: e.target.value
836
+ }),
837
+ rows: 4,
838
+ placeholder: "One qualification per line",
839
+ className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary resize-none"
840
+ }),
841
+ /* @__PURE__ */ S("p", {
842
+ className: "mt-1 text-xs text-text-secondary",
843
+ children: "Enter one item per line."
844
+ })
845
+ ] }),
696
846
  /* @__PURE__ */ C("div", {
697
847
  className: "flex flex-col gap-3 pt-2 sm:flex-row",
698
848
  children: [/* @__PURE__ */ S(t, {
699
849
  type: "submit",
700
- disabled: Ve || !Z.title.trim(),
850
+ disabled: We || !X.title.trim(),
701
851
  className: "flex-1",
702
- children: Ve ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(v, {
852
+ children: We ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(v, {
703
853
  size: 16,
704
854
  className: "animate-spin"
705
855
  }), "Saving…"] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(g, { size: 16 }), "Save Changes"] })
706
856
  }), /* @__PURE__ */ C(t, {
707
857
  type: "button",
708
858
  variant: "outline",
709
- onClick: () => F(!1),
859
+ onClick: () => P(!1),
710
860
  children: [/* @__PURE__ */ S(b, { size: 16 }), "Cancel"]
711
861
  })]
712
862
  })
@@ -714,13 +864,13 @@ function M() {
714
864
  })]
715
865
  })
716
866
  }),
717
- /* @__PURE__ */ S(D, {
718
- open: Fe,
719
- onOpenChange: I,
720
- children: /* @__PURE__ */ C(O, {
867
+ /* @__PURE__ */ S(T, {
868
+ open: Re,
869
+ onOpenChange: F,
870
+ children: /* @__PURE__ */ C(E, {
721
871
  className: "w-full max-w-lg max-h-[90vh] overflow-y-auto",
722
- children: [/* @__PURE__ */ S(k, { children: /* @__PURE__ */ S(A, { children: L ? "Edit Round Config" : "Add Round Config" }) }), /* @__PURE__ */ C("form", {
723
- onSubmit: at,
872
+ children: [/* @__PURE__ */ S(D, { children: /* @__PURE__ */ S(O, { children: I ? "Edit Round Config" : "Add Round Config" }) }), /* @__PURE__ */ C("form", {
873
+ onSubmit: st,
724
874
  className: "space-y-5",
725
875
  children: [
726
876
  /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
@@ -733,9 +883,9 @@ function M() {
733
883
  }), /* @__PURE__ */ S("input", {
734
884
  id: "round-name",
735
885
  type: "text",
736
- value: z.name,
737
- onChange: (e) => B({
738
- ...z,
886
+ value: R.name,
887
+ onChange: (e) => z({
888
+ ...R,
739
889
  name: e.target.value
740
890
  }),
741
891
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
@@ -747,15 +897,15 @@ function M() {
747
897
  children: "Round Type"
748
898
  }), /* @__PURE__ */ S("select", {
749
899
  id: "round-type",
750
- value: z.roundType,
751
- onChange: (e) => B({
752
- ...z,
900
+ value: R.roundType,
901
+ onChange: (e) => z({
902
+ ...R,
753
903
  roundType: e.target.value
754
904
  }),
755
905
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
756
906
  children: Object.values(o).map((e) => /* @__PURE__ */ S("option", {
757
907
  value: e,
758
- children: Oe[e]
908
+ children: Ae[e]
759
909
  }, e))
760
910
  })] }),
761
911
  /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
@@ -764,9 +914,9 @@ function M() {
764
914
  children: "Description"
765
915
  }), /* @__PURE__ */ S("textarea", {
766
916
  id: "round-description",
767
- value: z.description,
768
- onChange: (e) => B({
769
- ...z,
917
+ value: R.description,
918
+ onChange: (e) => z({
919
+ ...R,
770
920
  description: e.target.value
771
921
  }),
772
922
  rows: 3,
@@ -778,9 +928,9 @@ function M() {
778
928
  className: "flex items-center gap-3 cursor-pointer",
779
929
  children: [/* @__PURE__ */ S("input", {
780
930
  type: "checkbox",
781
- checked: z.isAssignmentRound,
782
- onChange: (e) => B({
783
- ...z,
931
+ checked: R.isAssignmentRound,
932
+ onChange: (e) => z({
933
+ ...R,
784
934
  isAssignmentRound: e.target.checked
785
935
  }),
786
936
  className: "size-4 rounded border-border-default text-primary focus:ring-primary"
@@ -792,9 +942,9 @@ function M() {
792
942
  className: "flex items-center gap-3 cursor-pointer",
793
943
  children: [/* @__PURE__ */ S("input", {
794
944
  type: "checkbox",
795
- checked: z.isRequired,
796
- onChange: (e) => B({
797
- ...z,
945
+ checked: R.isRequired,
946
+ onChange: (e) => z({
947
+ ...R,
798
948
  isRequired: e.target.checked
799
949
  }),
800
950
  className: "size-4 rounded border-border-default text-primary focus:ring-primary"
@@ -808,16 +958,16 @@ function M() {
808
958
  className: "flex flex-col gap-3 pt-2 sm:flex-row",
809
959
  children: [/* @__PURE__ */ S(t, {
810
960
  type: "submit",
811
- disabled: Ue || Ge || !z.name.trim(),
961
+ disabled: Ke || Je || !R.name.trim(),
812
962
  className: "flex-1",
813
- children: Ue || Ge ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(v, {
963
+ children: Ke || Je ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(v, {
814
964
  size: 16,
815
965
  className: "animate-spin"
816
- }), L ? "Saving…" : "Creating…"] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(g, { size: 16 }), L ? "Update Round" : "Create Round"] })
966
+ }), I ? "Saving…" : "Creating…"] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(g, { size: 16 }), I ? "Update Round" : "Create Round"] })
817
967
  }), /* @__PURE__ */ C(t, {
818
968
  type: "button",
819
969
  variant: "outline",
820
- onClick: it,
970
+ onClick: ot,
821
971
  children: [/* @__PURE__ */ S(b, { size: 16 }), "Cancel"]
822
972
  })]
823
973
  })
@@ -825,33 +975,35 @@ function M() {
825
975
  })]
826
976
  })
827
977
  }),
828
- /* @__PURE__ */ S(D, {
829
- open: Ie,
830
- onOpenChange: V,
831
- children: /* @__PURE__ */ C(O, {
978
+ /* @__PURE__ */ S(T, {
979
+ open: ze,
980
+ onOpenChange: B,
981
+ children: /* @__PURE__ */ C(E, {
832
982
  className: "w-full max-w-lg max-h-[90vh] overflow-y-auto",
833
- children: [/* @__PURE__ */ S(k, { children: /* @__PURE__ */ S(A, { children: H ? "Edit Assignment" : "Add Assignment" }) }), /* @__PURE__ */ C("form", {
983
+ children: [/* @__PURE__ */ S(D, { children: /* @__PURE__ */ S(O, { children: V ? "Edit Assignment" : "Add Assignment" }) }), /* @__PURE__ */ C("form", {
834
984
  onSubmit: async (e) => {
835
- if (e.preventDefault(), !(!d || !W.title.trim() || !W.description.trim())) try {
836
- H ? (await Xe({ variables: {
837
- id: H.id,
985
+ if (e.preventDefault(), !(!d || !U.title.trim() || !U.description.trim())) try {
986
+ V ? (await $e({ variables: {
987
+ id: V.id,
838
988
  input: {
839
- title: W.title,
840
- description: W.description,
841
- problemStatement: W.problemStatement || void 0,
842
- difficulty: W.difficulty || void 0,
843
- isActive: W.isActive
989
+ title: U.title,
990
+ description: U.description,
991
+ problemStatement: U.problemStatement || void 0,
992
+ difficulty: U.difficulty || void 0,
993
+ isActive: U.isActive,
994
+ ownerEmail: U.ownerEmail.trim()
844
995
  }
845
- } }), P("success", "Assignment updated.")) : (await Je({ variables: { input: {
996
+ } }), N("success", "Assignment updated.")) : (await Ze({ variables: { input: {
846
997
  jobPostingId: d,
847
- title: W.title,
848
- description: W.description,
849
- problemStatement: W.problemStatement || void 0,
850
- difficulty: W.difficulty || void 0,
851
- isActive: W.isActive
852
- } } }), P("success", "Assignment created.")), lt();
998
+ title: U.title,
999
+ description: U.description,
1000
+ problemStatement: U.problemStatement || void 0,
1001
+ difficulty: U.difficulty || void 0,
1002
+ isActive: U.isActive,
1003
+ ownerEmail: U.ownerEmail.trim() || void 0
1004
+ } } }), N("success", "Assignment created.")), dt();
853
1005
  } catch {
854
- P("error", `Failed to ${H ? "update" : "create"} assignment.`);
1006
+ N("error", `Failed to ${V ? "update" : "create"} assignment.`);
855
1007
  }
856
1008
  },
857
1009
  className: "space-y-5",
@@ -866,9 +1018,9 @@ function M() {
866
1018
  }), /* @__PURE__ */ S("input", {
867
1019
  id: "assignment-title",
868
1020
  type: "text",
869
- value: W.title,
870
- onChange: (e) => G({
871
- ...W,
1021
+ value: U.title,
1022
+ onChange: (e) => W({
1023
+ ...U,
872
1024
  title: e.target.value
873
1025
  }),
874
1026
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary",
@@ -881,14 +1033,39 @@ function M() {
881
1033
  }), /* @__PURE__ */ S("input", {
882
1034
  id: "assignment-difficulty",
883
1035
  type: "text",
884
- value: W.difficulty,
885
- onChange: (e) => G({
886
- ...W,
1036
+ value: U.difficulty,
1037
+ onChange: (e) => W({
1038
+ ...U,
887
1039
  difficulty: e.target.value
888
1040
  }),
889
1041
  placeholder: "e.g., Easy, Medium, Hard",
890
1042
  className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
891
1043
  })] }),
1044
+ /* @__PURE__ */ C("div", { children: [
1045
+ /* @__PURE__ */ C("label", {
1046
+ htmlFor: "assignment-owner-email",
1047
+ className: "block text-sm font-medium text-text-primary mb-2",
1048
+ children: ["Owner email ", /* @__PURE__ */ S("span", {
1049
+ className: "text-text-secondary font-normal",
1050
+ children: "(optional)"
1051
+ })]
1052
+ }),
1053
+ /* @__PURE__ */ S("input", {
1054
+ id: "assignment-owner-email",
1055
+ type: "email",
1056
+ value: U.ownerEmail,
1057
+ onChange: (e) => W({
1058
+ ...U,
1059
+ ownerEmail: e.target.value
1060
+ }),
1061
+ placeholder: "whoever authored this assignment",
1062
+ className: "w-full px-4 py-2.5 rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
1063
+ }),
1064
+ /* @__PURE__ */ S("p", {
1065
+ className: "mt-1.5 text-xs text-text-secondary",
1066
+ children: "So you know who to ask if a candidate has questions about it."
1067
+ })
1068
+ ] }),
892
1069
  /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
893
1070
  htmlFor: "assignment-description",
894
1071
  className: "block text-sm font-medium text-text-primary mb-2",
@@ -898,9 +1075,9 @@ function M() {
898
1075
  })]
899
1076
  }), /* @__PURE__ */ S("textarea", {
900
1077
  id: "assignment-description",
901
- value: W.description,
902
- onChange: (e) => G({
903
- ...W,
1078
+ value: U.description,
1079
+ onChange: (e) => W({
1080
+ ...U,
904
1081
  description: e.target.value
905
1082
  }),
906
1083
  rows: 3,
@@ -913,9 +1090,9 @@ function M() {
913
1090
  children: "Problem Statement"
914
1091
  }), /* @__PURE__ */ S("textarea", {
915
1092
  id: "assignment-problem-statement",
916
- value: W.problemStatement,
917
- onChange: (e) => G({
918
- ...W,
1093
+ value: U.problemStatement,
1094
+ onChange: (e) => W({
1095
+ ...U,
919
1096
  problemStatement: e.target.value
920
1097
  }),
921
1098
  rows: 4,
@@ -925,9 +1102,9 @@ function M() {
925
1102
  className: "flex items-center gap-3 cursor-pointer",
926
1103
  children: [/* @__PURE__ */ S("input", {
927
1104
  type: "checkbox",
928
- checked: W.isActive,
929
- onChange: (e) => G({
930
- ...W,
1105
+ checked: U.isActive,
1106
+ onChange: (e) => W({
1107
+ ...U,
931
1108
  isActive: e.target.checked
932
1109
  }),
933
1110
  className: "size-4 rounded border-border-default text-primary focus:ring-primary"
@@ -940,16 +1117,16 @@ function M() {
940
1117
  className: "flex flex-col gap-3 pt-2 sm:flex-row",
941
1118
  children: [/* @__PURE__ */ S(t, {
942
1119
  type: "submit",
943
- disabled: Ye || Ze || !W.title.trim() || !W.description.trim(),
1120
+ disabled: Qe || et || !U.title.trim() || !U.description.trim(),
944
1121
  className: "flex-1",
945
- children: Ye || Ze ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(v, {
1122
+ children: Qe || et ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(v, {
946
1123
  size: 16,
947
1124
  className: "animate-spin"
948
- }), H ? "Saving…" : "Creating…"] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(g, { size: 16 }), H ? "Update Assignment" : "Create Assignment"] })
1125
+ }), V ? "Saving…" : "Creating…"] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(g, { size: 16 }), V ? "Update Assignment" : "Create Assignment"] })
949
1126
  }), /* @__PURE__ */ C(t, {
950
1127
  type: "button",
951
1128
  variant: "outline",
952
- onClick: lt,
1129
+ onClick: dt,
953
1130
  children: [/* @__PURE__ */ S(b, { size: 16 }), "Cancel"]
954
1131
  })]
955
1132
  })
@@ -958,29 +1135,29 @@ function M() {
958
1135
  })
959
1136
  }),
960
1137
  /* @__PURE__ */ S(xe, {
961
- open: K !== null,
1138
+ open: G !== null,
962
1139
  onOpenChange: (e) => {
963
- e || q(null);
1140
+ e || K(null);
964
1141
  },
965
- children: /* @__PURE__ */ C(we, { children: [/* @__PURE__ */ C(T, { children: [/* @__PURE__ */ S(E, { children: "Delete round config?" }), /* @__PURE__ */ S(Te, { children: "Are you sure you want to delete this interview round config? This action cannot be undone." })] }), /* @__PURE__ */ C(w, { children: [/* @__PURE__ */ S(Ce, { children: "Cancel" }), /* @__PURE__ */ S(Se, {
966
- onClick: ot,
1142
+ children: /* @__PURE__ */ C(we, { children: [/* @__PURE__ */ C(De, { children: [/* @__PURE__ */ S(w, { children: "Delete round config?" }), /* @__PURE__ */ S(Te, { children: "Are you sure you want to delete this interview round config? This action cannot be undone." })] }), /* @__PURE__ */ C(Ee, { children: [/* @__PURE__ */ S(Ce, { children: "Cancel" }), /* @__PURE__ */ S(Se, {
1143
+ onClick: ct,
967
1144
  children: "Delete"
968
1145
  })] })] })
969
1146
  }),
970
1147
  /* @__PURE__ */ S(xe, {
971
- open: J !== null,
1148
+ open: q !== null,
972
1149
  onOpenChange: (e) => {
973
- e || Y(null);
1150
+ e || J(null);
974
1151
  },
975
- children: /* @__PURE__ */ C(we, { children: [/* @__PURE__ */ C(T, { children: [/* @__PURE__ */ S(E, { children: "Delete assignment?" }), /* @__PURE__ */ S(Te, { children: "Are you sure you want to delete this assignment? This action cannot be undone." })] }), /* @__PURE__ */ C(w, { children: [/* @__PURE__ */ S(Ce, { children: "Cancel" }), /* @__PURE__ */ S(Se, {
1152
+ children: /* @__PURE__ */ C(we, { children: [/* @__PURE__ */ C(De, { children: [/* @__PURE__ */ S(w, { children: "Delete assignment?" }), /* @__PURE__ */ S(Te, { children: "Are you sure you want to delete this assignment? This action cannot be undone." })] }), /* @__PURE__ */ C(Ee, { children: [/* @__PURE__ */ S(Ce, { children: "Cancel" }), /* @__PURE__ */ S(Se, {
976
1153
  onClick: async () => {
977
- let e = J;
1154
+ let e = q;
978
1155
  if (e) {
979
- Y(null);
1156
+ J(null);
980
1157
  try {
981
- await Qe({ variables: { id: e } }), P("success", "Assignment deleted.");
1158
+ await tt({ variables: { id: e } }), N("success", "Assignment deleted.");
982
1159
  } catch {
983
- P("error", "Failed to delete assignment.");
1160
+ N("error", "Failed to delete assignment.");
984
1161
  }
985
1162
  }
986
1163
  },
@@ -991,6 +1168,6 @@ function M() {
991
1168
  });
992
1169
  }
993
1170
  //#endregion
994
- export { M as JobPostingDetailPage };
1171
+ export { j as JobPostingDetailPage };
995
1172
 
996
1173
  //# sourceMappingURL=JobPostingDetailPage.js.map