@burdenoff/microfe-crewfoundry 2026.924.1 → 2026.1013.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/crewfoundry/components/forms/FormModal.d.ts +25 -1
  2. package/dist/crewfoundry/components/forms/FormModal.d.ts.map +1 -1
  3. package/dist/crewfoundry/components/forms/FormModal.js +151 -136
  4. package/dist/crewfoundry/components/forms/FormModal.js.map +1 -1
  5. package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.d.ts.map +1 -1
  6. package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +49 -49
  7. package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
  8. package/dist/crewfoundry/pages/HiringCreateJobPagePage.d.ts.map +1 -1
  9. package/dist/crewfoundry/pages/HiringCreateJobPagePage.js +260 -115
  10. package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
  11. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.d.ts.map +1 -1
  12. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +199 -166
  13. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
  14. package/dist/crewfoundry/pages/HiringJobsPagePage.d.ts.map +1 -1
  15. package/dist/crewfoundry/pages/HiringJobsPagePage.js +118 -104
  16. package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
  17. package/dist/crewfoundry/store/crewfoundryStore.d.ts +1 -1
  18. package/dist/crewfoundry/store/crewfoundryStore.d.ts.map +1 -1
  19. package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
  20. package/dist/crewfoundry/utils/dateUtils.d.ts +47 -0
  21. package/dist/crewfoundry/utils/dateUtils.d.ts.map +1 -0
  22. package/dist/crewfoundry/utils/dateUtils.js +22 -0
  23. package/dist/crewfoundry/utils/dateUtils.js.map +1 -0
  24. package/package.json +1 -1
@@ -4,17 +4,18 @@ import { STATUS as n } from "../components/viz/lib/palette.js";
4
4
  import { getInitials as r } from "../components/viz/lib/format.js";
5
5
  import { HBarFunnel as i } from "../components/viz/HBarFunnel.js";
6
6
  import { RatingStars as a } from "../components/viz/RatingStars.js";
7
- import { SkillBar as ee } from "../components/viz/SkillBar.js";
7
+ import { SkillBar as o } from "../components/viz/SkillBar.js";
8
8
  import "../components/viz/index.js";
9
- import { FormModal as te } from "../components/forms/FormModal.js";
10
- import { ConfirmDialog as ne } from "../components/forms/ConfirmDialog.js";
11
- import { getNumber as o, getTags as s, getText as c } from "../components/forms/formValues.js";
12
- import { useState as l } from "react";
13
- import { Briefcase as re, Calendar as ie, CheckCircle as u, MapPin as ae, Pencil as d, Share2 as f, Sparkles as p, Trash2 as m, Users as h, XCircle as g } from "lucide-react";
14
- import { useNavigate as _, useSearchParams as oe } from "react-router";
15
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
16
- import { Badge as b, Button as x, Card as S, CardContent as C, CardHeader as w, CardTitle as T, GlassCard as se, GradientText as E, IllustratedEmptyState as D, PagePurpose as O, Spinner as k } from "@burdenoff/fe-libs/ui";
17
- import { useGlobalUi as A } from "@burdenoff/fe-libs/shared/providers/shell";
9
+ import { FormModal as s } from "../components/forms/FormModal.js";
10
+ import { ConfirmDialog as c } from "../components/forms/ConfirmDialog.js";
11
+ import { getNumber as l, getTags as u, getText as d } from "../components/forms/formValues.js";
12
+ import { localDayDiff as f, localTodayString as p, parseLocalDate as m } from "../utils/dateUtils.js";
13
+ import { useState as h } from "react";
14
+ import { Briefcase as ee, Calendar as te, CheckCircle as g, Clock as ne, MapPin as re, Pencil as ie, Share2 as ae, Sparkles as _, Trash2 as oe, Users as v, XCircle as y } from "lucide-react";
15
+ import { useNavigate as b, useSearchParams as x } from "react-router";
16
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
17
+ import { Badge as w, Button as T, Card as E, CardContent as D, CardHeader as O, CardTitle as k, GlassCard as se, GradientText as ce, IllustratedEmptyState as le, PagePurpose as ue, Spinner as A } from "@burdenoff/fe-libs/ui";
18
+ import { useGlobalUi as de } from "@burdenoff/fe-libs/shared/providers/shell";
18
19
  //#region src/crewfoundry/pages/HiringJobDetailsPagePage.tsx
19
20
  var j = [
20
21
  {
@@ -34,12 +35,13 @@ var j = [
34
35
  name: "location",
35
36
  label: "Location",
36
37
  type: "text",
37
- required: !0
38
+ requiredWhen: (e) => String(e.status ?? "").toLowerCase() === "active"
38
39
  },
39
40
  {
40
41
  name: "type",
41
42
  label: "Employment Type",
42
43
  type: "select",
44
+ requiredWhen: (e) => String(e.status ?? "").toLowerCase() === "active",
43
45
  options: [
44
46
  {
45
47
  label: "Full time",
@@ -59,6 +61,7 @@ var j = [
59
61
  name: "experienceLevel",
60
62
  label: "Experience Level",
61
63
  type: "select",
64
+ requiredWhen: (e) => String(e.status ?? "").toLowerCase() === "active",
62
65
  options: [
63
66
  {
64
67
  label: "Entry",
@@ -128,7 +131,8 @@ var j = [
128
131
  name: "description",
129
132
  label: "Description",
130
133
  type: "textarea",
131
- colSpan: 2
134
+ colSpan: 2,
135
+ requiredWhen: (e) => String(e.status ?? "").toLowerCase() === "active"
132
136
  },
133
137
  {
134
138
  name: "requirements",
@@ -150,7 +154,7 @@ var j = [
150
154
  rejected: "destructive"
151
155
  };
152
156
  function N({ name: e, size: t = 32 }) {
153
- return /* @__PURE__ */ v("span", {
157
+ return /* @__PURE__ */ S("span", {
154
158
  className: "inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border-subtle bg-bg-sunken font-medium text-text-secondary",
155
159
  style: {
156
160
  width: t,
@@ -161,253 +165,275 @@ function N({ name: e, size: t = 32 }) {
161
165
  children: r(e)
162
166
  });
163
167
  }
164
- function P() {
165
- let r = _(), [P] = oe(), { showToast: F } = A(), { jobPostings: I, candidates: L, updateJobPosting: R, removeJobPosting: z, initialized: B, jobPostingMatches: V, jobPostingMatchesLoading: H, fetchJobPostingMatches: U } = e(), W = P.get("id"), G = W ? I.find((e) => e.id === W) : I[0], [K, q] = l(!1), [ce, J] = l(!1);
166
- if (!B && !G) return /* @__PURE__ */ v("div", {
168
+ function P(e) {
169
+ return e === 0 ? "$0" : e < 1e3 ? `$${e.toLocaleString()}` : `$${Math.round(e / 1e3)}k`;
170
+ }
171
+ function F(e, t) {
172
+ return `${P(e)} – ${P(t)}`;
173
+ }
174
+ function I(e) {
175
+ if (!e) return "No deadline";
176
+ let t = m(e);
177
+ if (!t) return e;
178
+ let n = f(/* @__PURE__ */ new Date(), t);
179
+ return n > 1 ? `Closes in ${n} days` : n === 1 ? "Closes tomorrow" : n === 0 ? "Closes today" : n === -1 ? "Closed yesterday" : `Closed ${Math.abs(n)} days ago`;
180
+ }
181
+ function L() {
182
+ let r = b(), [f] = x(), { showToast: m } = de(), { jobPostings: P, candidates: L, updateJobPosting: R, removeJobPosting: z, initialized: B, jobPostingMatches: V, jobPostingMatchesLoading: H, fetchJobPostingMatches: fe } = e(), U = f.get("id"), W = U ? P.find((e) => e.id === U) : P[0], [pe, G] = h(!1), [me, K] = h(!1), [he, q] = h(null), ge = p();
183
+ if (!B && !W) return /* @__PURE__ */ S("div", {
167
184
  className: "flex min-h-[60vh] items-center justify-center p-6",
168
- children: /* @__PURE__ */ v(k, { size: "lg" })
185
+ children: /* @__PURE__ */ S(A, { size: "lg" })
169
186
  });
170
- if (!G) return /* @__PURE__ */ v("div", {
187
+ if (!W) return /* @__PURE__ */ S("div", {
171
188
  className: "p-6",
172
- children: /* @__PURE__ */ v(D, {
189
+ children: /* @__PURE__ */ S(le, {
173
190
  illustration: "empty-search",
174
191
  title: "No job posting found",
175
192
  description: "This job posting is no longer available."
176
193
  })
177
194
  });
178
- let le = G.title.trim().toLowerCase(), Y = L.filter((e) => e.position.trim().toLowerCase() === le), X = (e) => Y.filter((t) => t.status === e).length, Z = X("interview"), ue = [
195
+ let _e = W.title.trim().toLowerCase(), J = L.filter((e) => e.position.trim().toLowerCase() === _e), Y = (e) => J.filter((t) => t.status === e).length, X = Y("interview"), ve = [
179
196
  {
180
197
  label: "Applied",
181
- value: Y.length
198
+ value: J.length
182
199
  },
183
200
  {
184
201
  label: "Screening",
185
- value: X("screening")
202
+ value: Y("screening")
186
203
  },
187
204
  {
188
205
  label: "Interview",
189
- value: Z
206
+ value: X
190
207
  },
191
208
  {
192
209
  label: "Assessment",
193
- value: X("assessment")
210
+ value: Y("assessment")
194
211
  },
195
212
  {
196
213
  label: "Offer",
197
- value: X("offer") + X("hired")
214
+ value: Y("offer") + Y("hired")
198
215
  }
199
- ], de = {
200
- title: G.title,
201
- department: G.department,
202
- location: G.location,
203
- type: G.type,
204
- experienceLevel: G.experienceLevel,
205
- status: G.status,
206
- salaryMin: G.salaryMin,
207
- salaryMax: G.salaryMax,
208
- deadline: G.deadline,
209
- description: G.description,
210
- requirements: G.requirements,
211
- benefits: G.benefits
212
- }, fe = async (e) => {
213
- let t = {
214
- title: c(e, "title"),
215
- department: c(e, "department"),
216
- location: c(e, "location"),
216
+ ], Z = {
217
+ title: W.title,
218
+ department: W.department,
219
+ location: W.location,
220
+ type: W.type,
221
+ experienceLevel: W.experienceLevel,
222
+ status: W.status,
223
+ salaryMin: W.salaryMin,
224
+ salaryMax: W.salaryMax,
225
+ deadline: W.deadline ?? "",
226
+ description: W.description,
227
+ requirements: W.requirements,
228
+ benefits: W.benefits
229
+ }, ye = async (e) => {
230
+ let t = [], n = d(e, "title").trim(), r = d(e, "department").trim(), i = d(e, "location").trim(), a = d(e, "description").trim(), o = d(e, "deadline").trim();
231
+ n || t.push("Job Title is required"), r || t.push("Department is required"), o && o < p() && t.push("Application Deadline cannot be a past date"), String(e.status ?? "").toLowerCase() === "active" && (i || t.push("Location is required"), a || t.push("Description is required"));
232
+ let s = l(e, "salaryMin"), c = l(e, "salaryMax");
233
+ if (s < 0) t.push("Salary Min cannot be negative");
234
+ else if (c < 0) t.push("Salary Max cannot be negative");
235
+ else {
236
+ let e = s === 0 && c === 0;
237
+ !e && c === 0 && s > 0 ? t.push("Provide Salary Max, or leave both empty") : !e && c > 0 && s === 0 ? t.push("Provide Salary Min, or leave both empty") : !e && c > 0 && c < s && t.push("Salary Max cannot be less than Salary Min");
238
+ }
239
+ if (t.length > 0) throw q(t[0]), Error(t[0]);
240
+ q(null);
241
+ let f = {
242
+ title: n,
243
+ department: r,
244
+ location: i,
217
245
  type: e.type,
218
246
  experienceLevel: e.experienceLevel,
219
247
  status: e.status,
220
- salaryMin: o(e, "salaryMin"),
221
- salaryMax: o(e, "salaryMax"),
222
- deadline: c(e, "deadline"),
223
- description: c(e, "description"),
224
- requirements: s(e, "requirements"),
225
- benefits: s(e, "benefits")
248
+ salaryMin: s,
249
+ salaryMax: c,
250
+ deadline: o === "" ? null : o,
251
+ description: a,
252
+ requirements: u(e, "requirements"),
253
+ benefits: u(e, "benefits")
226
254
  };
227
- await R(G.id, t), F("Job posting updated", "success");
228
- }, pe = async () => {
229
- await z(G.id), F("Job posting deleted", "success"), r("../hiring/jobs-page");
230
- }, me = async () => {
255
+ await R(W.id, f), m("Job posting updated", "success"), G(!1);
256
+ }, be = async () => {
257
+ await z(W.id), m("Job posting deleted", "success"), r("../hiring/jobs-page");
258
+ }, xe = async () => {
231
259
  try {
232
- await navigator.clipboard.writeText(window.location.href), F("Job link copied to clipboard", "success");
260
+ await navigator.clipboard.writeText(window.location.href), m("Job link copied to clipboard", "success");
233
261
  } catch {
234
- F("Could not copy the job link", "error");
262
+ m("Could not copy the job link", "error");
235
263
  }
236
- }, he = () => r(`../hiring/applications-page?position=${encodeURIComponent(G.title)}`), Q = V[G.id], $ = Q !== void 0, ge = (e) => e >= 75 ? n.success : e >= 45 ? n.warning : n.danger;
237
- return /* @__PURE__ */ y("div", {
264
+ }, Se = () => r(`../hiring/applications-page?position=${encodeURIComponent(W.title)}`), Q = V[W.id], $ = Q !== void 0, Ce = (e) => e >= 75 ? n.success : e >= 45 ? n.warning : n.danger;
265
+ return /* @__PURE__ */ C("div", {
238
266
  className: "space-y-6 p-6",
239
267
  children: [
240
- /* @__PURE__ */ v(se, {
268
+ /* @__PURE__ */ S(se, {
241
269
  treatment: "glass",
242
270
  glow: !0,
243
271
  className: "border-border-seam",
244
- children: /* @__PURE__ */ y(C, {
272
+ children: /* @__PURE__ */ C(D, {
245
273
  className: "flex flex-col gap-4 p-6 lg:flex-row lg:items-start lg:justify-between",
246
- children: [/* @__PURE__ */ y("div", {
274
+ children: [/* @__PURE__ */ C("div", {
247
275
  className: "min-w-0",
248
276
  children: [
249
- /* @__PURE__ */ y("div", {
277
+ /* @__PURE__ */ C("div", {
250
278
  className: "mb-1 flex flex-wrap items-center gap-2",
251
- children: [/* @__PURE__ */ v("h1", {
279
+ children: [/* @__PURE__ */ S("h1", {
252
280
  className: "text-2xl font-semibold",
253
- children: /* @__PURE__ */ v(E, { children: G.title })
254
- }), /* @__PURE__ */ v(b, {
255
- variant: G.status === "active" ? "default" : "secondary",
256
- children: t(G.status)
281
+ children: /* @__PURE__ */ S(ce, { children: W.title })
282
+ }), /* @__PURE__ */ S(w, {
283
+ variant: W.status === "active" ? "default" : "secondary",
284
+ children: t(W.status)
257
285
  })]
258
286
  }),
259
- /* @__PURE__ */ y("div", {
287
+ /* @__PURE__ */ C("div", {
260
288
  className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-text-secondary",
261
289
  children: [
262
- /* @__PURE__ */ y("span", {
290
+ /* @__PURE__ */ C("span", {
263
291
  className: "flex items-center gap-1",
264
- children: [/* @__PURE__ */ v(re, { className: "h-3.5 w-3.5" }), G.department]
292
+ children: [/* @__PURE__ */ S(ee, { className: "h-3.5 w-3.5" }), W.department]
265
293
  }),
266
- /* @__PURE__ */ y("span", {
294
+ /* @__PURE__ */ C("span", {
267
295
  className: "flex items-center gap-1",
268
- children: [/* @__PURE__ */ v(ae, { className: "h-3.5 w-3.5" }), G.location]
296
+ children: [/* @__PURE__ */ S(re, { className: "h-3.5 w-3.5" }), W.location]
269
297
  }),
270
- /* @__PURE__ */ v("span", { children: t(G.type) })
298
+ /* @__PURE__ */ S("span", { children: t(W.type) })
271
299
  ]
272
300
  }),
273
- /* @__PURE__ */ y("div", {
274
- className: "mt-2 flex flex-wrap items-center gap-2 text-xs text-text-secondary",
301
+ /* @__PURE__ */ C("div", {
302
+ className: "mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
275
303
  children: [
276
- /* @__PURE__ */ y(b, {
304
+ /* @__PURE__ */ C(w, {
277
305
  variant: "secondary",
278
306
  className: "text-[10px]",
279
- children: [Y.length, " applicants"]
307
+ children: [J.length, " applicants"]
280
308
  }),
281
- Z > 0 && /* @__PURE__ */ y(b, {
309
+ X > 0 && /* @__PURE__ */ C(w, {
282
310
  variant: "secondary",
283
311
  className: "text-[10px]",
284
- children: [Z, " in interview"]
312
+ children: [X, " in interview"]
285
313
  }),
286
- /* @__PURE__ */ y("span", {
314
+ /* @__PURE__ */ C("span", {
287
315
  className: "flex items-center gap-1",
288
316
  children: [
289
- /* @__PURE__ */ v(ie, { className: "h-3 w-3" }),
317
+ /* @__PURE__ */ S(te, { className: "h-3 w-3" }),
290
318
  "Posted ",
291
- G.postedDate
319
+ W.postedDate
292
320
  ]
321
+ }),
322
+ /* @__PURE__ */ C("span", {
323
+ className: "flex items-center gap-1 text-text-secondary",
324
+ children: [/* @__PURE__ */ S(ne, { className: "h-3 w-3" }), I(W.deadline)]
293
325
  })
294
326
  ]
295
327
  }),
296
- /* @__PURE__ */ v(O, {
328
+ /* @__PURE__ */ S(ue, {
297
329
  className: "mt-3",
298
330
  children: "Everything about this role in one place — review applicants, requirements, and compensation to decide who to interview and keep the posting current."
299
331
  })
300
332
  ]
301
- }), /* @__PURE__ */ y("div", {
333
+ }), /* @__PURE__ */ C("div", {
302
334
  className: "flex shrink-0 flex-col items-start gap-3 lg:items-end",
303
- children: [/* @__PURE__ */ y("div", {
335
+ children: [/* @__PURE__ */ S("div", {
304
336
  className: "text-2xl font-bold tabular-nums text-text-primary",
305
- children: [
306
- "$",
307
- (G.salaryMin / 1e3).toFixed(0),
308
- "k – $",
309
- (G.salaryMax / 1e3).toFixed(0),
310
- "k"
311
- ]
312
- }), /* @__PURE__ */ y("div", {
337
+ children: F(W.salaryMin, W.salaryMax)
338
+ }), /* @__PURE__ */ C("div", {
313
339
  className: "flex flex-wrap gap-2",
314
340
  children: [
315
- /* @__PURE__ */ y(x, {
341
+ /* @__PURE__ */ C(T, {
316
342
  variant: "outline",
317
343
  size: "sm",
318
- onClick: me,
319
- children: [/* @__PURE__ */ v(f, { className: "mr-1 h-4 w-4" }), "Share"]
344
+ onClick: xe,
345
+ children: [/* @__PURE__ */ S(ae, { className: "mr-1 h-4 w-4" }), "Share"]
320
346
  }),
321
- /* @__PURE__ */ y(x, {
347
+ /* @__PURE__ */ C(T, {
322
348
  variant: "outline",
323
349
  size: "sm",
324
- onClick: () => q(!0),
325
- children: [/* @__PURE__ */ v(d, { className: "mr-1 h-4 w-4" }), "Edit"]
350
+ onClick: () => G(!0),
351
+ children: [/* @__PURE__ */ S(ie, { className: "mr-1 h-4 w-4" }), "Edit"]
326
352
  }),
327
- /* @__PURE__ */ v(x, {
353
+ /* @__PURE__ */ S(T, {
328
354
  variant: "destructive",
329
355
  size: "sm",
330
356
  "aria-label": "Delete job posting",
331
- onClick: () => J(!0),
332
- children: /* @__PURE__ */ v(m, { className: "h-4 w-4" })
357
+ onClick: () => K(!0),
358
+ children: /* @__PURE__ */ S(oe, { className: "h-4 w-4" })
333
359
  }),
334
- /* @__PURE__ */ y(x, {
360
+ /* @__PURE__ */ C(T, {
335
361
  size: "sm",
336
- onClick: he,
337
- children: [/* @__PURE__ */ v(h, { className: "mr-1 h-4 w-4" }), "View Applications"]
362
+ onClick: Se,
363
+ children: [/* @__PURE__ */ S(v, { className: "mr-1 h-4 w-4" }), "View Applications"]
338
364
  })
339
365
  ]
340
366
  })]
341
367
  })]
342
368
  })
343
369
  }),
344
- /* @__PURE__ */ y("div", {
370
+ /* @__PURE__ */ C("div", {
345
371
  className: "grid gap-6 lg:grid-cols-3",
346
- children: [/* @__PURE__ */ y("div", {
372
+ children: [/* @__PURE__ */ C("div", {
347
373
  className: "space-y-6 lg:col-span-2",
348
374
  children: [
349
- /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: "Description" }) }), /* @__PURE__ */ v(C, { children: /* @__PURE__ */ v("p", {
375
+ /* @__PURE__ */ C(E, { children: [/* @__PURE__ */ S(O, { children: /* @__PURE__ */ S(k, { children: "Description" }) }), /* @__PURE__ */ S(D, { children: /* @__PURE__ */ S("p", {
350
376
  className: "text-sm leading-relaxed text-text-secondary",
351
- children: G.description
377
+ children: W.description
352
378
  }) })] }),
353
- /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: "Requirements" }) }), /* @__PURE__ */ v(C, { children: G.requirements.length === 0 ? /* @__PURE__ */ v("p", {
379
+ /* @__PURE__ */ C(E, { children: [/* @__PURE__ */ S(O, { children: /* @__PURE__ */ S(k, { children: "Requirements" }) }), /* @__PURE__ */ S(D, { children: W.requirements.length === 0 ? /* @__PURE__ */ S("p", {
354
380
  className: "text-sm text-text-muted",
355
381
  children: "No requirements listed."
356
- }) : /* @__PURE__ */ v("ul", {
382
+ }) : /* @__PURE__ */ S("ul", {
357
383
  className: "space-y-2",
358
- children: G.requirements.map((e, t) => /* @__PURE__ */ y("li", {
384
+ children: W.requirements.map((e, t) => /* @__PURE__ */ C("li", {
359
385
  className: "flex items-start gap-2 text-sm",
360
- children: [/* @__PURE__ */ v(u, { className: "mt-0.5 h-4 w-4 flex-shrink-0 text-status-success-text" }), e]
386
+ children: [/* @__PURE__ */ S(g, { className: "mt-0.5 h-4 w-4 flex-shrink-0 text-status-success-text" }), e]
361
387
  }, t))
362
388
  }) })] }),
363
- /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: "Benefits" }) }), /* @__PURE__ */ v(C, { children: G.benefits.length === 0 ? /* @__PURE__ */ v("p", {
389
+ /* @__PURE__ */ C(E, { children: [/* @__PURE__ */ S(O, { children: /* @__PURE__ */ S(k, { children: "Benefits" }) }), /* @__PURE__ */ S(D, { children: W.benefits.length === 0 ? /* @__PURE__ */ S("p", {
364
390
  className: "text-sm text-text-muted",
365
391
  children: "No benefits listed."
366
- }) : /* @__PURE__ */ v("div", {
392
+ }) : /* @__PURE__ */ S("div", {
367
393
  className: "flex flex-wrap gap-2",
368
- children: G.benefits.map((e, t) => /* @__PURE__ */ v(b, {
394
+ children: W.benefits.map((e, t) => /* @__PURE__ */ S(w, {
369
395
  variant: "outline",
370
396
  className: "rounded-full px-3 py-1 text-xs",
371
397
  children: e
372
398
  }, t))
373
399
  }) })] }),
374
- /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ y(w, {
400
+ /* @__PURE__ */ C(E, { children: [/* @__PURE__ */ C(O, {
375
401
  className: "flex flex-row items-center justify-between gap-3",
376
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v(T, { children: "Suggested Matches" }), /* @__PURE__ */ v("p", {
402
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S(k, { children: "Suggested Matches" }), /* @__PURE__ */ S("p", {
377
403
  className: "mt-1 text-xs text-text-muted",
378
404
  children: "Rule-based scoring — skill overlap (70%) + experience fit (30%) against this role's requirements. Not an AI-generated summary."
379
- })] }), /* @__PURE__ */ y(x, {
405
+ })] }), /* @__PURE__ */ C(T, {
380
406
  size: "sm",
381
407
  variant: "outline",
382
408
  onClick: async () => {
383
409
  try {
384
- await U(G.id);
410
+ await fe(W.id);
385
411
  } catch {
386
- F("Unable to generate candidate matches", "error");
412
+ m("Unable to generate candidate matches", "error");
387
413
  }
388
414
  },
389
415
  disabled: H,
390
- children: [/* @__PURE__ */ v(p, { className: "mr-1 h-4 w-4" }), $ ? "Refresh matches" : "Generate matches"]
416
+ children: [/* @__PURE__ */ S(_, { className: "mr-1 h-4 w-4" }), $ ? "Refresh matches" : "Generate matches"]
391
417
  })]
392
- }), /* @__PURE__ */ v(C, { children: H ? /* @__PURE__ */ v("div", {
418
+ }), /* @__PURE__ */ S(D, { children: H ? /* @__PURE__ */ S("div", {
393
419
  className: "flex items-center justify-center py-6",
394
- children: /* @__PURE__ */ v(k, { size: "md" })
395
- }) : $ ? Q.length === 0 ? /* @__PURE__ */ v("p", {
420
+ children: /* @__PURE__ */ S(A, { size: "md" })
421
+ }) : $ ? Q.length === 0 ? /* @__PURE__ */ S("p", {
396
422
  className: "text-sm text-text-muted",
397
423
  children: "No candidates in the pool right now (excluding already-hired/rejected)."
398
- }) : /* @__PURE__ */ v("ul", {
424
+ }) : /* @__PURE__ */ S("ul", {
399
425
  className: "space-y-4",
400
- children: Q.map((e) => /* @__PURE__ */ y("li", {
426
+ children: Q.map((e) => /* @__PURE__ */ C("li", {
401
427
  className: "rounded-[var(--radius-card)] border border-border-subtle bg-bg-surface p-3",
402
428
  children: [
403
- /* @__PURE__ */ y("div", {
429
+ /* @__PURE__ */ C("div", {
404
430
  className: "flex items-center gap-2",
405
431
  children: [
406
- /* @__PURE__ */ v(N, {
432
+ /* @__PURE__ */ S(N, {
407
433
  name: `${e.candidate.firstName} ${e.candidate.lastName}`,
408
434
  size: 28
409
435
  }),
410
- /* @__PURE__ */ y("span", {
436
+ /* @__PURE__ */ C("span", {
411
437
  className: "min-w-0 flex-1 truncate text-sm font-medium text-text-primary",
412
438
  children: [
413
439
  e.candidate.firstName,
@@ -415,73 +441,73 @@ function P() {
415
441
  e.candidate.lastName
416
442
  ]
417
443
  }),
418
- /* @__PURE__ */ v(b, {
444
+ /* @__PURE__ */ S(w, {
419
445
  variant: M[e.candidate.status],
420
446
  className: "shrink-0 text-[9px]",
421
447
  children: t(e.candidate.status)
422
448
  })
423
449
  ]
424
450
  }),
425
- /* @__PURE__ */ v("div", {
451
+ /* @__PURE__ */ S("div", {
426
452
  className: "mt-2",
427
- children: /* @__PURE__ */ v(ee, {
453
+ children: /* @__PURE__ */ S(o, {
428
454
  label: "Overall match",
429
455
  value: e.score,
430
456
  levelLabel: `${e.score}%`,
431
- color: ge(e.score),
457
+ color: Ce(e.score),
432
458
  height: 6
433
459
  })
434
460
  }),
435
- /* @__PURE__ */ y("div", {
461
+ /* @__PURE__ */ C("div", {
436
462
  className: "mt-2 grid grid-cols-2 gap-2 text-xs text-text-secondary",
437
- children: [/* @__PURE__ */ y("span", { children: [
463
+ children: [/* @__PURE__ */ C("span", { children: [
438
464
  "Skills: ",
439
465
  e.skillScore,
440
466
  "%"
441
- ] }), /* @__PURE__ */ y("span", { children: [
467
+ ] }), /* @__PURE__ */ C("span", { children: [
442
468
  "Experience: ",
443
469
  e.experienceScore,
444
470
  "%"
445
471
  ] })]
446
472
  }),
447
- (e.matchedSkills.length > 0 || e.missingSkills.length > 0) && /* @__PURE__ */ y("div", {
473
+ (e.matchedSkills.length > 0 || e.missingSkills.length > 0) && /* @__PURE__ */ C("div", {
448
474
  className: "mt-2 flex flex-wrap gap-1",
449
- children: [e.matchedSkills.map((e) => /* @__PURE__ */ y(b, {
475
+ children: [e.matchedSkills.map((e) => /* @__PURE__ */ C(w, {
450
476
  variant: "secondary",
451
477
  className: "gap-1 text-[10px]",
452
- children: [/* @__PURE__ */ v(u, { className: "h-3 w-3 text-status-success-text" }), e]
453
- }, `m-${e}`)), e.missingSkills.map((e) => /* @__PURE__ */ y(b, {
478
+ children: [/* @__PURE__ */ S(g, { className: "h-3 w-3 text-status-success-text" }), e]
479
+ }, `m-${e}`)), e.missingSkills.map((e) => /* @__PURE__ */ C(w, {
454
480
  variant: "outline",
455
481
  className: "gap-1 text-[10px] text-text-muted",
456
- children: [/* @__PURE__ */ v(g, { className: "h-3 w-3 text-status-error-text" }), e]
482
+ children: [/* @__PURE__ */ S(y, { className: "h-3 w-3 text-status-error-text" }), e]
457
483
  }, `x-${e}`))]
458
484
  }),
459
- /* @__PURE__ */ v("p", {
485
+ /* @__PURE__ */ S("p", {
460
486
  className: "mt-2 text-xs leading-relaxed text-text-muted",
461
487
  children: e.rationale
462
488
  })
463
489
  ]
464
490
  }, e.candidateId))
465
- }) : /* @__PURE__ */ v("p", {
491
+ }) : /* @__PURE__ */ S("p", {
466
492
  className: "text-sm text-text-muted",
467
493
  children: "Click \"Generate matches\" to rank the candidate pool against this posting's requirements and experience level."
468
494
  }) })] })
469
495
  ]
470
- }), /* @__PURE__ */ y("div", {
496
+ }), /* @__PURE__ */ C("div", {
471
497
  className: "space-y-6",
472
- children: [/* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: "Candidates" }) }), /* @__PURE__ */ v(C, { children: Y.length === 0 ? /* @__PURE__ */ v("p", {
498
+ children: [/* @__PURE__ */ C(E, { children: [/* @__PURE__ */ S(O, { children: /* @__PURE__ */ S(k, { children: "Candidates" }) }), /* @__PURE__ */ S(D, { children: J.length === 0 ? /* @__PURE__ */ S("p", {
473
499
  className: "text-sm text-text-muted",
474
500
  children: "No applicants matched to this role yet."
475
- }) : /* @__PURE__ */ v("ul", {
501
+ }) : /* @__PURE__ */ S("ul", {
476
502
  className: "max-h-96 space-y-1 overflow-y-auto pr-1",
477
- children: Y.map((e) => /* @__PURE__ */ y("li", {
503
+ children: J.map((e) => /* @__PURE__ */ C("li", {
478
504
  className: "flex items-center gap-2 rounded-[var(--radius-input)] px-2 py-2 hover:bg-bg-sunken",
479
505
  children: [
480
- /* @__PURE__ */ v(N, {
506
+ /* @__PURE__ */ S(N, {
481
507
  name: `${e.firstName} ${e.lastName}`,
482
508
  size: 30
483
509
  }),
484
- /* @__PURE__ */ y("span", {
510
+ /* @__PURE__ */ C("span", {
485
511
  className: "min-w-0 flex-1 truncate text-sm font-medium text-text-primary",
486
512
  children: [
487
513
  e.firstName,
@@ -489,51 +515,58 @@ function P() {
489
515
  e.lastName
490
516
  ]
491
517
  }),
492
- /* @__PURE__ */ v(b, {
518
+ /* @__PURE__ */ S(w, {
493
519
  variant: M[e.status],
494
520
  className: "shrink-0 text-[9px]",
495
521
  children: t(e.status)
496
522
  }),
497
- /* @__PURE__ */ v(a, {
523
+ /* @__PURE__ */ S(a, {
498
524
  value: e.rating,
499
525
  size: 12,
500
526
  className: "shrink-0"
501
527
  })
502
528
  ]
503
529
  }, e.id))
504
- }) })] }), /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: "Hiring funnel" }) }), /* @__PURE__ */ v(C, { children: Y.length === 0 ? /* @__PURE__ */ v("p", {
530
+ }) })] }), /* @__PURE__ */ C(E, { children: [/* @__PURE__ */ S(O, { children: /* @__PURE__ */ S(k, { children: "Hiring funnel" }) }), /* @__PURE__ */ S(D, { children: J.length === 0 ? /* @__PURE__ */ S("p", {
505
531
  className: "text-sm text-text-muted",
506
532
  children: "The funnel appears once candidates apply to this role."
507
- }) : /* @__PURE__ */ v(i, {
508
- stages: ue,
533
+ }) : /* @__PURE__ */ S(i, {
534
+ stages: ve,
509
535
  valueFormatter: (e) => String(e),
510
536
  showConversion: !0
511
537
  }) })] })]
512
538
  })]
513
539
  }),
514
- /* @__PURE__ */ v(te, {
515
- open: K,
516
- onOpenChange: q,
540
+ /* @__PURE__ */ S(s, {
541
+ open: pe,
542
+ onOpenChange: (e) => {
543
+ G(e), q(null);
544
+ },
517
545
  title: "Edit Job Posting",
518
546
  description: "Update the role details, compensation, and status.",
519
- fields: j,
520
- initialValues: de,
547
+ errorMessage: he ?? void 0,
548
+ onValidationError: (e) => q(e),
549
+ fields: j.map((e) => e.name === "deadline" ? {
550
+ ...e,
551
+ min: ge
552
+ } : e),
553
+ initialValues: Z,
521
554
  submitLabel: "Save changes",
522
- onSubmit: fe
555
+ onSubmit: ye
523
556
  }),
524
- /* @__PURE__ */ v(ne, {
525
- open: ce,
526
- onOpenChange: J,
557
+ /* @__PURE__ */ S(c, {
558
+ open: me,
559
+ onOpenChange: K,
527
560
  title: "Delete job posting",
528
- description: `Permanently remove “${G.title}”? This cannot be undone.`,
561
+ description: `Permanently remove “${W.title}”? This cannot be undone.`,
529
562
  confirmLabel: "Delete",
530
563
  destructive: !0,
531
- onConfirm: pe
564
+ onConfirm: be
532
565
  })
533
566
  ]
534
567
  });
535
568
  }
536
569
  //#endregion
537
- export { P as HiringJobDetailsPagePage };
570
+ export { L as HiringJobDetailsPagePage };
538
571
 
539
572
  //# sourceMappingURL=HiringJobDetailsPagePage.js.map