@burdenoff/microfe-crewfoundry 2026.1029.2 → 2026.1030.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.
Files changed (36) hide show
  1. package/dist/crewfoundry/lib/useFocusedRecordParam.d.ts +51 -0
  2. package/dist/crewfoundry/lib/useFocusedRecordParam.d.ts.map +1 -0
  3. package/dist/crewfoundry/lib/useFocusedRecordParam.js +38 -0
  4. package/dist/crewfoundry/lib/useFocusedRecordParam.js.map +1 -0
  5. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.d.ts.map +1 -1
  6. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +119 -112
  7. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
  8. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.d.ts.map +1 -1
  9. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +78 -71
  10. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
  11. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.d.ts.map +1 -1
  12. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +88 -81
  13. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
  14. package/dist/crewfoundry/pages/HiringCandidatesPagePage.d.ts.map +1 -1
  15. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +133 -126
  16. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
  17. package/dist/crewfoundry/pages/HiringInterviewsPagePage.d.ts.map +1 -1
  18. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +150 -143
  19. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
  20. package/dist/crewfoundry/pages/HrDepartmentsPagePage.d.ts.map +1 -1
  21. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +110 -103
  22. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
  23. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.d.ts.map +1 -1
  24. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +173 -162
  25. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
  26. package/dist/crewfoundry/pages/HrPayrollPagePage.d.ts.map +1 -1
  27. package/dist/crewfoundry/pages/HrPayrollPagePage.js +169 -158
  28. package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
  29. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.d.ts.map +1 -1
  30. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +179 -163
  31. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
  32. package/dist/utils/pageContext.d.ts +43 -4
  33. package/dist/utils/pageContext.d.ts.map +1 -1
  34. package/dist/utils/pageContext.js +10 -3
  35. package/dist/utils/pageContext.js.map +1 -1
  36. package/package.json +3 -2
@@ -4,14 +4,15 @@ import { getInitials as n } from "../components/viz/lib/format.js";
4
4
  import { RatingStars as r } from "../components/viz/RatingStars.js";
5
5
  import "../components/viz/index.js";
6
6
  import { FormModal as i } from "../components/forms/FormModal.js";
7
- import { getText as a, newClientId as o } from "../components/forms/formValues.js";
8
- import { useMemo as s, useState as c } from "react";
9
- import { Calendar as l, Clock as u, Plus as d, Star as f, Video as p } from "lucide-react";
10
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
11
- import { Badge as _, Button as v, Card as y, CardContent as b, CardHeader as x, CardTitle as S, GlassCard as C, GradientText as w, IllustratedEmptyState as T, PagePurpose as E, Textarea as D } from "@burdenoff/fe-libs/ui";
12
- import { useGlobalUi as O } from "@burdenoff/fe-libs/shared/providers/shell";
7
+ import { useFocusedRecordParam as a } from "../lib/useFocusedRecordParam.js";
8
+ import { getText as o, newClientId as s } from "../components/forms/formValues.js";
9
+ import { useMemo as c, useState as l } from "react";
10
+ import { Calendar as u, Clock as d, Plus as f, Star as p, Video as m } from "lucide-react";
11
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
12
+ import { Badge as v, Button as y, Card as b, CardContent as x, CardHeader as S, CardTitle as C, GlassCard as w, GradientText as T, IllustratedEmptyState as E, PagePurpose as D, Textarea as O } from "@burdenoff/fe-libs/ui";
13
+ import { useGlobalUi as k } from "@burdenoff/fe-libs/shared/providers/shell";
13
14
  //#region src/crewfoundry/pages/HiringInterviewsPagePage.tsx
14
- var k = [
15
+ var A = [
15
16
  {
16
17
  label: "Phone",
17
18
  value: "phone"
@@ -32,7 +33,7 @@ var k = [
32
33
  label: "Technical",
33
34
  value: "technical"
34
35
  }
35
- ], A = [
36
+ ], j = [
36
37
  {
37
38
  key: "technical",
38
39
  label: "Technical Skills"
@@ -49,13 +50,13 @@ var k = [
49
50
  key: "culture",
50
51
  label: "Culture Fit"
51
52
  }
52
- ], j = "@@scorecard";
53
- function M(e) {
53
+ ], M = "@@scorecard";
54
+ function N(e) {
54
55
  if (!e) return {
55
56
  scores: {},
56
57
  notes: ""
57
58
  };
58
- if (!e.startsWith(`${j}:`)) return {
59
+ if (!e.startsWith(`${M}:`)) return {
59
60
  scores: {},
60
61
  notes: e
61
62
  };
@@ -69,16 +70,16 @@ function M(e) {
69
70
  notes: r
70
71
  };
71
72
  }
72
- function N(e, t) {
73
- let n = A.filter((t) => (e[t.key] ?? 0) > 0).map((t) => `${t.key}=${e[t.key]}`);
74
- return n.length === 0 ? t : `${j}:${n.join(",")}\n${t}`;
73
+ function P(e, t) {
74
+ let n = j.filter((t) => (e[t.key] ?? 0) > 0).map((t) => `${t.key}=${e[t.key]}`);
75
+ return n.length === 0 ? t : `${M}:${n.join(",")}\n${t}`;
75
76
  }
76
- function P(e) {
77
- let t = A.map((t) => e[t.key]).filter((e) => typeof e == "number" && e > 0);
77
+ function F(e) {
78
+ let t = j.map((t) => e[t.key]).filter((e) => typeof e == "number" && e > 0);
78
79
  return t.length === 0 ? 0 : Math.round(t.reduce((e, t) => e + t, 0) / t.length * 10) / 10;
79
80
  }
80
- function F({ name: e, size: t = 40 }) {
81
- return /* @__PURE__ */ h("span", {
81
+ function I({ name: e, size: t = 40 }) {
82
+ return /* @__PURE__ */ g("span", {
82
83
  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",
83
84
  style: {
84
85
  width: t,
@@ -89,19 +90,19 @@ function F({ name: e, size: t = 40 }) {
89
90
  children: n(e)
90
91
  });
91
92
  }
92
- function I({ value: e, onChange: t, label: n, max: r = 5 }) {
93
- return /* @__PURE__ */ h("div", {
93
+ function L({ value: e, onChange: t, label: n, max: r = 5 }) {
94
+ return /* @__PURE__ */ g("div", {
94
95
  className: "flex items-center gap-0.5",
95
96
  role: "radiogroup",
96
97
  "aria-label": n,
97
- children: Array.from({ length: r }, (e, t) => t + 1).map((n) => /* @__PURE__ */ h("button", {
98
+ children: Array.from({ length: r }, (e, t) => t + 1).map((n) => /* @__PURE__ */ g("button", {
98
99
  type: "button",
99
100
  role: "radio",
100
101
  "aria-checked": e === n,
101
102
  "aria-label": `${n} out of ${r}`,
102
103
  onClick: () => t(e === n ? 0 : n),
103
104
  className: "rounded p-0.5 outline-none transition-transform hover:scale-110 focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
104
- children: /* @__PURE__ */ h(f, {
105
+ children: /* @__PURE__ */ g(p, {
105
106
  className: "h-5 w-5",
106
107
  strokeWidth: 1.5,
107
108
  style: { color: n <= e ? "var(--color-status-warning-text)" : "var(--color-border-strong)" },
@@ -110,14 +111,14 @@ function I({ value: e, onChange: t, label: n, max: r = 5 }) {
110
111
  }, n))
111
112
  });
112
113
  }
113
- var L = {
114
+ var R = {
114
115
  technical: "default",
115
116
  panel: "secondary",
116
117
  onsite: "secondary",
117
118
  video: "outline",
118
119
  phone: "outline"
119
120
  };
120
- function R(e) {
121
+ function z(e) {
121
122
  let t = new Date(e);
122
123
  return Number.isNaN(t.getTime()) ? e || "Unscheduled" : t.toLocaleDateString(void 0, {
123
124
  weekday: "short",
@@ -125,36 +126,42 @@ function R(e) {
125
126
  day: "numeric"
126
127
  });
127
128
  }
128
- function z() {
129
- let { showToast: n } = O(), { interviews: f, candidates: m, addInterview: D, updateInterview: A } = e(), [j, N] = c(!1), [I, z] = c(null), [V, H] = c(!1), U = f.filter((e) => e.status === "scheduled"), W = f.filter((e) => e.status === "completed"), G = s(() => {
130
- let e = [...f].sort((e, t) => {
129
+ function B() {
130
+ let { showToast: n } = k(), { interviews: p, candidates: h, addInterview: O, updateInterview: j } = e(), [M, P] = l(!1), [L, B] = l(null), [H, U] = l(!1), W = p.filter((e) => e.status === "scheduled"), G = p.filter((e) => e.status === "completed"), K = c(() => {
131
+ let e = [...p].sort((e, t) => {
131
132
  let n = new Date(e.date).getTime(), r = new Date(t.date).getTime();
132
133
  return Number.isNaN(n) && Number.isNaN(r) ? 0 : Number.isNaN(n) ? 1 : Number.isNaN(r) ? -1 : n - r;
133
134
  }), t = [];
134
135
  for (let n of e) {
135
- let e = R(n.date), r = t[t.length - 1];
136
+ let e = z(n.date), r = t[t.length - 1];
136
137
  r && r.label === e ? r.items.push(n) : t.push({
137
138
  label: e,
138
139
  items: [n]
139
140
  });
140
141
  }
141
142
  return t;
142
- }, [f]), K = I ?? U[0]?.id ?? f[0]?.id ?? null, q = K ? f.find((e) => e.id === K) ?? null : null, J = s(() => {
143
+ }, [p]), q = L ?? W[0]?.id ?? p[0]?.id ?? null, J = q ? p.find((e) => e.id === q) ?? null : null;
144
+ a({
145
+ records: p,
146
+ activeId: J?.id ?? null,
147
+ onRestore: (e) => B(e.id)
148
+ });
149
+ let Y = c(() => {
143
150
  let e = /* @__PURE__ */ new Date(), t = new Date(e);
144
151
  t.setDate(e.getDate() - (e.getDay() + 6) % 7), t.setHours(0, 0, 0, 0);
145
152
  let n = new Date(t);
146
- return n.setDate(t.getDate() + 7), f.filter((e) => {
153
+ return n.setDate(t.getDate() + 7), p.filter((e) => {
147
154
  let r = new Date(e.date);
148
155
  return !Number.isNaN(r.getTime()) && r >= t && r < n;
149
156
  }).length;
150
- }, [f]), Y = s(() => [
157
+ }, [p]), X = c(() => [
151
158
  {
152
159
  name: "candidateId",
153
160
  label: "Candidate",
154
161
  type: "select",
155
162
  required: !0,
156
- placeholder: m.length ? "Select a candidate…" : "No candidates available",
157
- options: m.map((e) => ({
163
+ placeholder: h.length ? "Select a candidate…" : "No candidates available",
164
+ options: h.map((e) => ({
158
165
  label: `${e.firstName} ${e.lastName} — ${e.position}`,
159
166
  value: e.id
160
167
  }))
@@ -183,146 +190,146 @@ function z() {
183
190
  label: "Type",
184
191
  type: "select",
185
192
  required: !0,
186
- options: k
193
+ options: A
187
194
  }
188
- ], [m]);
189
- return /* @__PURE__ */ g("div", {
195
+ ], [h]);
196
+ return /* @__PURE__ */ _("div", {
190
197
  className: "space-y-6 p-6",
191
198
  children: [
192
- /* @__PURE__ */ g("div", {
199
+ /* @__PURE__ */ _("div", {
193
200
  className: "flex flex-wrap items-start justify-between gap-3",
194
- children: [/* @__PURE__ */ g("div", { children: [
195
- /* @__PURE__ */ h("h1", {
201
+ children: [/* @__PURE__ */ _("div", { children: [
202
+ /* @__PURE__ */ g("h1", {
196
203
  className: "text-2xl font-semibold",
197
- children: /* @__PURE__ */ h(w, { children: "Interviews" })
204
+ children: /* @__PURE__ */ g(T, { children: "Interviews" })
198
205
  }),
199
- /* @__PURE__ */ g("p", {
206
+ /* @__PURE__ */ _("p", {
200
207
  className: "text-sm text-text-secondary",
201
208
  children: [
202
- U.length,
203
- " upcoming · ",
204
209
  W.length,
210
+ " upcoming · ",
211
+ G.length,
205
212
  " completed"
206
213
  ]
207
214
  }),
208
- /* @__PURE__ */ h(E, {
215
+ /* @__PURE__ */ g(D, {
209
216
  className: "mt-1",
210
217
  children: "Schedule interviews and score candidates on a live scorecard — capture competency ratings and feedback the moment the conversation ends."
211
218
  })
212
- ] }), /* @__PURE__ */ g(v, {
219
+ ] }), /* @__PURE__ */ _(y, {
213
220
  size: "sm",
214
- onClick: () => N(!0),
215
- children: [/* @__PURE__ */ h(d, { className: "mr-1 h-4 w-4" }), "Schedule Interview"]
221
+ onClick: () => P(!0),
222
+ children: [/* @__PURE__ */ g(f, { className: "mr-1 h-4 w-4" }), "Schedule Interview"]
216
223
  })]
217
224
  }),
218
- /* @__PURE__ */ g("div", {
225
+ /* @__PURE__ */ _("div", {
219
226
  className: "grid gap-4 sm:grid-cols-3",
220
227
  children: [
221
- /* @__PURE__ */ g(C, {
228
+ /* @__PURE__ */ _(w, {
222
229
  treatment: "glass",
223
230
  glow: !0,
224
231
  className: "border-border-seam",
225
- children: [/* @__PURE__ */ g(x, {
232
+ children: [/* @__PURE__ */ _(S, {
226
233
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
227
- children: [/* @__PURE__ */ h(S, {
234
+ children: [/* @__PURE__ */ g(C, {
228
235
  className: "text-sm font-medium",
229
236
  children: "Scheduled"
230
- }), /* @__PURE__ */ h(l, { className: "h-4 w-4 text-status-info-text" })]
231
- }), /* @__PURE__ */ h(b, { children: /* @__PURE__ */ h("div", {
237
+ }), /* @__PURE__ */ g(u, { className: "h-4 w-4 text-status-info-text" })]
238
+ }), /* @__PURE__ */ g(x, { children: /* @__PURE__ */ g("div", {
232
239
  className: "text-2xl font-bold tabular-nums",
233
- children: U.length
240
+ children: W.length
234
241
  }) })]
235
242
  }),
236
- /* @__PURE__ */ g(C, {
243
+ /* @__PURE__ */ _(w, {
237
244
  treatment: "metric",
238
245
  className: "border-border-seam",
239
- children: [/* @__PURE__ */ g(x, {
246
+ children: [/* @__PURE__ */ _(S, {
240
247
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
241
- children: [/* @__PURE__ */ h(S, {
248
+ children: [/* @__PURE__ */ g(C, {
242
249
  className: "text-sm font-medium",
243
250
  children: "Completed"
244
- }), /* @__PURE__ */ h(u, { className: "h-4 w-4 text-status-success-text" })]
245
- }), /* @__PURE__ */ h(b, { children: /* @__PURE__ */ h("div", {
251
+ }), /* @__PURE__ */ g(d, { className: "h-4 w-4 text-status-success-text" })]
252
+ }), /* @__PURE__ */ g(x, { children: /* @__PURE__ */ g("div", {
246
253
  className: "text-2xl font-bold tabular-nums",
247
- children: W.length
254
+ children: G.length
248
255
  }) })]
249
256
  }),
250
- /* @__PURE__ */ g(C, {
257
+ /* @__PURE__ */ _(w, {
251
258
  treatment: "metric",
252
259
  className: "border-border-seam",
253
- children: [/* @__PURE__ */ g(x, {
260
+ children: [/* @__PURE__ */ _(S, {
254
261
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
255
- children: [/* @__PURE__ */ h(S, {
262
+ children: [/* @__PURE__ */ g(C, {
256
263
  className: "text-sm font-medium",
257
264
  children: "This Week"
258
- }), /* @__PURE__ */ h(p, { className: "h-4 w-4 text-text-secondary" })]
259
- }), /* @__PURE__ */ h(b, { children: /* @__PURE__ */ h("div", {
265
+ }), /* @__PURE__ */ g(m, { className: "h-4 w-4 text-text-secondary" })]
266
+ }), /* @__PURE__ */ g(x, { children: /* @__PURE__ */ g("div", {
260
267
  className: "text-2xl font-bold tabular-nums",
261
- children: J
268
+ children: Y
262
269
  }) })]
263
270
  })
264
271
  ]
265
272
  }),
266
- /* @__PURE__ */ g("div", {
273
+ /* @__PURE__ */ _("div", {
267
274
  className: "grid gap-6 lg:grid-cols-3",
268
- children: [/* @__PURE__ */ g(y, {
275
+ children: [/* @__PURE__ */ _(b, {
269
276
  className: "lg:col-span-2",
270
- children: [/* @__PURE__ */ h(x, { children: /* @__PURE__ */ h(S, { children: "Scheduled Interviews" }) }), /* @__PURE__ */ h(b, {
277
+ children: [/* @__PURE__ */ g(S, { children: /* @__PURE__ */ g(C, { children: "Scheduled Interviews" }) }), /* @__PURE__ */ g(x, {
271
278
  className: "space-y-4",
272
- children: f.length === 0 ? /* @__PURE__ */ h(T, {
279
+ children: p.length === 0 ? /* @__PURE__ */ g(E, {
273
280
  illustration: "empty-search",
274
281
  title: "No interviews scheduled",
275
282
  description: "Schedule an interview to start tracking your pipeline conversations."
276
- }) : G.map((e) => /* @__PURE__ */ g("div", {
283
+ }) : K.map((e) => /* @__PURE__ */ _("div", {
277
284
  className: "space-y-2",
278
- children: [/* @__PURE__ */ h("div", {
285
+ children: [/* @__PURE__ */ g("div", {
279
286
  className: "sticky top-0 rounded bg-bg-sunken px-3 py-1 text-xs font-medium text-text-secondary",
280
287
  children: e.label
281
288
  }), e.items.map((e) => {
282
- let n = e.id === K, i = P(M(e.feedback).scores) || e.rating || 0;
283
- return /* @__PURE__ */ g("button", {
289
+ let n = e.id === q, i = F(N(e.feedback).scores) || e.rating || 0;
290
+ return /* @__PURE__ */ _("button", {
284
291
  type: "button",
285
- onClick: () => z(e.id),
292
+ onClick: () => B(e.id),
286
293
  "aria-pressed": n,
287
294
  className: `flex w-full flex-wrap items-center justify-between gap-3 rounded-[var(--radius-input)] border p-4 text-left transition-colors ${n ? "border-action-primary-bg bg-action-primary-bg/10" : "border-border-subtle hover:bg-bg-sunken"}`,
288
- children: [/* @__PURE__ */ g("div", {
295
+ children: [/* @__PURE__ */ _("div", {
289
296
  className: "flex min-w-0 items-center gap-3",
290
- children: [/* @__PURE__ */ h(F, { name: e.candidateName }), /* @__PURE__ */ g("div", {
297
+ children: [/* @__PURE__ */ g(I, { name: e.candidateName }), /* @__PURE__ */ _("div", {
291
298
  className: "min-w-0",
292
299
  children: [
293
- /* @__PURE__ */ h("p", {
300
+ /* @__PURE__ */ g("p", {
294
301
  className: "truncate text-sm font-medium text-text-primary",
295
302
  children: e.candidateName
296
303
  }),
297
- /* @__PURE__ */ h("p", {
304
+ /* @__PURE__ */ g("p", {
298
305
  className: "truncate text-xs text-text-secondary",
299
306
  children: e.position
300
307
  }),
301
- /* @__PURE__ */ g("p", {
308
+ /* @__PURE__ */ _("p", {
302
309
  className: "truncate text-xs text-text-secondary",
303
310
  children: ["Interviewer: ", e.interviewerName]
304
311
  })
305
312
  ]
306
313
  })]
307
- }), /* @__PURE__ */ g("div", {
314
+ }), /* @__PURE__ */ _("div", {
308
315
  className: "flex flex-wrap items-center gap-2",
309
316
  children: [
310
- /* @__PURE__ */ g("div", {
317
+ /* @__PURE__ */ _("div", {
311
318
  className: "text-right",
312
- children: [/* @__PURE__ */ h(_, {
313
- variant: L[e.type],
319
+ children: [/* @__PURE__ */ g(v, {
320
+ variant: R[e.type],
314
321
  className: "text-[10px]",
315
322
  children: t(e.type)
316
- }), /* @__PURE__ */ h("p", {
323
+ }), /* @__PURE__ */ g("p", {
317
324
  className: "mt-1 text-xs text-text-secondary",
318
325
  children: e.time
319
326
  })]
320
327
  }),
321
- e.status === "completed" && i > 0 && /* @__PURE__ */ h(r, {
328
+ e.status === "completed" && i > 0 && /* @__PURE__ */ g(r, {
322
329
  value: i,
323
330
  size: 12
324
331
  }),
325
- /* @__PURE__ */ h(_, {
332
+ /* @__PURE__ */ g(v, {
326
333
  variant: e.status === "completed" ? "default" : "secondary",
327
334
  className: "text-[10px]",
328
335
  children: t(e.status)
@@ -333,60 +340,60 @@ function z() {
333
340
  })]
334
341
  }, e.label))
335
342
  })]
336
- }), /* @__PURE__ */ h("div", {
343
+ }), /* @__PURE__ */ g("div", {
337
344
  className: "lg:sticky lg:top-4 lg:self-start",
338
- children: /* @__PURE__ */ g(y, { children: [/* @__PURE__ */ g(x, { children: [/* @__PURE__ */ h(S, { children: "Interview Scorecard" }), q && /* @__PURE__ */ g("p", {
345
+ children: /* @__PURE__ */ _(b, { children: [/* @__PURE__ */ _(S, { children: [/* @__PURE__ */ g(C, { children: "Interview Scorecard" }), J && /* @__PURE__ */ _("p", {
339
346
  className: "text-sm text-text-secondary",
340
347
  children: [
341
- t(q.type),
348
+ t(J.type),
342
349
  " interview for ",
343
- q.candidateName
350
+ J.candidateName
344
351
  ]
345
- })] }), /* @__PURE__ */ h(b, {
352
+ })] }), /* @__PURE__ */ g(x, {
346
353
  className: "space-y-4",
347
- children: q ? /* @__PURE__ */ h(B, {
348
- interview: q,
349
- saving: V,
354
+ children: J ? /* @__PURE__ */ g(V, {
355
+ interview: J,
356
+ saving: H,
350
357
  onSave: async (e, t) => {
351
- if (q) {
352
- H(!0);
358
+ if (J) {
359
+ U(!0);
353
360
  try {
354
- await A(q.id, {
355
- status: e ? "completed" : q.status,
361
+ await j(J.id, {
362
+ status: e ? "completed" : J.status,
356
363
  feedback: t
357
364
  }), n(e ? "Scorecard submitted" : "Draft saved", "success");
358
365
  } catch {
359
366
  n("Could not save the scorecard", "error");
360
367
  } finally {
361
- H(!1);
368
+ U(!1);
362
369
  }
363
370
  }
364
371
  }
365
- }, q.id) : /* @__PURE__ */ h("p", {
372
+ }, J.id) : /* @__PURE__ */ g("p", {
366
373
  className: "text-sm text-text-muted",
367
374
  children: "Select an interview to open its scorecard."
368
375
  })
369
376
  })] })
370
377
  })]
371
378
  }),
372
- /* @__PURE__ */ h(i, {
373
- open: j,
374
- onOpenChange: N,
379
+ /* @__PURE__ */ g(i, {
380
+ open: M,
381
+ onOpenChange: P,
375
382
  title: "Schedule Interview",
376
383
  description: "Set up a conversation with a candidate in your pipeline.",
377
- fields: Y,
384
+ fields: X,
378
385
  submitLabel: "Schedule",
379
386
  onSubmit: async (e) => {
380
- let t = m.find((t) => t.id === a(e, "candidateId"));
387
+ let t = h.find((t) => t.id === o(e, "candidateId"));
381
388
  if (!t) throw Error("Please select a candidate");
382
- await D({
383
- id: o(),
389
+ await O({
390
+ id: s(),
384
391
  candidateId: t.id,
385
392
  candidateName: `${t.firstName} ${t.lastName}`,
386
393
  position: t.position,
387
- interviewerName: a(e, "interviewerName"),
388
- date: a(e, "date"),
389
- time: a(e, "time"),
394
+ interviewerName: o(e, "interviewerName"),
395
+ date: o(e, "date"),
396
+ time: o(e, "time"),
390
397
  type: e.type,
391
398
  status: "scheduled"
392
399
  }), n("Interview scheduled", "success");
@@ -395,55 +402,55 @@ function z() {
395
402
  ]
396
403
  });
397
404
  }
398
- function B({ interview: e, saving: t, onSave: n }) {
399
- let i = M(e.feedback), [a, o] = c(i.scores), [s, l] = c(i.notes), u = P(a);
400
- return /* @__PURE__ */ g(m, { children: [
401
- /* @__PURE__ */ g("div", {
405
+ function V({ interview: e, saving: t, onSave: n }) {
406
+ let i = N(e.feedback), [a, o] = l(i.scores), [s, c] = l(i.notes), u = F(a);
407
+ return /* @__PURE__ */ _(h, { children: [
408
+ /* @__PURE__ */ _("div", {
402
409
  className: "grid grid-cols-2 gap-3 rounded-[var(--radius-input)] bg-bg-sunken p-3 text-xs",
403
- children: [/* @__PURE__ */ g("div", { children: [
404
- /* @__PURE__ */ h("p", {
410
+ children: [/* @__PURE__ */ _("div", { children: [
411
+ /* @__PURE__ */ g("p", {
405
412
  className: "text-text-muted",
406
413
  children: "Candidate"
407
414
  }),
408
- /* @__PURE__ */ h("p", {
415
+ /* @__PURE__ */ g("p", {
409
416
  className: "font-medium text-text-primary",
410
417
  children: e.candidateName
411
418
  }),
412
- /* @__PURE__ */ h("p", {
419
+ /* @__PURE__ */ g("p", {
413
420
  className: "mt-1 text-text-muted",
414
421
  children: "Position"
415
422
  }),
416
- /* @__PURE__ */ h("p", {
423
+ /* @__PURE__ */ g("p", {
417
424
  className: "font-medium text-text-primary",
418
425
  children: e.position
419
426
  })
420
- ] }), /* @__PURE__ */ g("div", { children: [
421
- /* @__PURE__ */ h("p", {
427
+ ] }), /* @__PURE__ */ _("div", { children: [
428
+ /* @__PURE__ */ g("p", {
422
429
  className: "text-text-muted",
423
430
  children: "Date"
424
431
  }),
425
- /* @__PURE__ */ h("p", {
432
+ /* @__PURE__ */ g("p", {
426
433
  className: "font-medium text-text-primary",
427
434
  children: e.date
428
435
  }),
429
- /* @__PURE__ */ h("p", {
436
+ /* @__PURE__ */ g("p", {
430
437
  className: "mt-1 text-text-muted",
431
438
  children: "Time"
432
439
  }),
433
- /* @__PURE__ */ h("p", {
440
+ /* @__PURE__ */ g("p", {
434
441
  className: "font-medium text-text-primary",
435
442
  children: e.time
436
443
  })
437
444
  ] })]
438
445
  }),
439
- /* @__PURE__ */ h("div", {
446
+ /* @__PURE__ */ g("div", {
440
447
  className: "space-y-3",
441
- children: A.map((e) => /* @__PURE__ */ g("div", {
448
+ children: j.map((e) => /* @__PURE__ */ _("div", {
442
449
  className: "flex items-center justify-between gap-2",
443
- children: [/* @__PURE__ */ h("span", {
450
+ children: [/* @__PURE__ */ g("span", {
444
451
  className: "text-sm font-medium text-text-primary",
445
452
  children: e.label
446
- }), /* @__PURE__ */ h(I, {
453
+ }), /* @__PURE__ */ g(L, {
447
454
  label: e.label,
448
455
  value: a[e.key] ?? 0,
449
456
  onChange: (t) => o((n) => ({
@@ -453,52 +460,52 @@ function B({ interview: e, saving: t, onSave: n }) {
453
460
  })]
454
461
  }, e.key))
455
462
  }),
456
- /* @__PURE__ */ g("div", {
463
+ /* @__PURE__ */ _("div", {
457
464
  className: "flex items-center justify-between border-t border-border-subtle pt-3 text-sm",
458
- children: [/* @__PURE__ */ h("span", {
465
+ children: [/* @__PURE__ */ g("span", {
459
466
  className: "font-medium text-text-primary",
460
467
  children: "Overall"
461
- }), u > 0 ? /* @__PURE__ */ h(r, {
468
+ }), u > 0 ? /* @__PURE__ */ g(r, {
462
469
  value: u,
463
470
  size: 16,
464
471
  showValue: !0
465
- }) : /* @__PURE__ */ h("span", {
472
+ }) : /* @__PURE__ */ g("span", {
466
473
  className: "text-xs text-text-muted",
467
474
  children: "Not scored"
468
475
  })]
469
476
  }),
470
- /* @__PURE__ */ g("div", {
477
+ /* @__PURE__ */ _("div", {
471
478
  className: "space-y-1.5",
472
- children: [/* @__PURE__ */ h("label", {
479
+ children: [/* @__PURE__ */ g("label", {
473
480
  htmlFor: "scorecard-feedback",
474
481
  className: "text-sm font-medium",
475
482
  children: "Feedback"
476
- }), /* @__PURE__ */ h(D, {
483
+ }), /* @__PURE__ */ g(O, {
477
484
  id: "scorecard-feedback",
478
485
  rows: 5,
479
486
  value: s,
480
- onChange: (e) => l(e.target.value),
487
+ onChange: (e) => c(e.target.value),
481
488
  placeholder: "Summarize strengths, concerns, and a recommendation…"
482
489
  })]
483
490
  }),
484
- /* @__PURE__ */ g("div", {
491
+ /* @__PURE__ */ _("div", {
485
492
  className: "flex gap-2",
486
- children: [/* @__PURE__ */ h(v, {
493
+ children: [/* @__PURE__ */ g(y, {
487
494
  className: "flex-1",
488
495
  disabled: t,
489
- onClick: () => n(!0, N(a, s)),
496
+ onClick: () => n(!0, P(a, s)),
490
497
  children: "Submit"
491
- }), /* @__PURE__ */ h(v, {
498
+ }), /* @__PURE__ */ g(y, {
492
499
  variant: "outline",
493
500
  className: "flex-1",
494
501
  disabled: t,
495
- onClick: () => n(!1, N(a, s)),
502
+ onClick: () => n(!1, P(a, s)),
496
503
  children: "Save Draft"
497
504
  })]
498
505
  })
499
506
  ] });
500
507
  }
501
508
  //#endregion
502
- export { z as HiringInterviewsPagePage };
509
+ export { B as HiringInterviewsPagePage };
503
510
 
504
511
  //# sourceMappingURL=HiringInterviewsPagePage.js.map