@burdenoff/microfe-crewfoundry 2026.713.1 → 2026.719.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 (27) hide show
  1. package/dist/crewfoundry/CrewFoundryRoutes.d.ts.map +1 -1
  2. package/dist/crewfoundry/CrewFoundryRoutes.js +53 -49
  3. package/dist/crewfoundry/CrewFoundryRoutes.js.map +1 -1
  4. package/dist/crewfoundry/components/forms/AttachDocumentDialog.d.ts +16 -0
  5. package/dist/crewfoundry/components/forms/AttachDocumentDialog.d.ts.map +1 -0
  6. package/dist/crewfoundry/components/forms/AttachDocumentDialog.js +123 -0
  7. package/dist/crewfoundry/components/forms/AttachDocumentDialog.js.map +1 -0
  8. package/dist/crewfoundry/components/viz/StepProgress.js +64 -3
  9. package/dist/crewfoundry/components/viz/StepProgress.js.map +1 -0
  10. package/dist/crewfoundry/pages/HiringOnboardingPagePage.d.ts +2 -0
  11. package/dist/crewfoundry/pages/HiringOnboardingPagePage.d.ts.map +1 -0
  12. package/dist/crewfoundry/pages/HiringOnboardingPagePage.js +323 -0
  13. package/dist/crewfoundry/pages/HiringOnboardingPagePage.js.map +1 -0
  14. package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.d.ts.map +1 -1
  15. package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js +208 -118
  16. package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js.map +1 -1
  17. package/dist/crewfoundry/store/crewfoundryStore.d.ts +72 -0
  18. package/dist/crewfoundry/store/crewfoundryStore.d.ts.map +1 -1
  19. package/dist/crewfoundry/store/crewfoundryStore.js +224 -116
  20. package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
  21. package/dist/stories/RatingStars.stories.d.ts +10 -0
  22. package/dist/stories/RatingStars.stories.d.ts.map +1 -0
  23. package/dist/stories/SkillBar.stories.d.ts +10 -0
  24. package/dist/stories/SkillBar.stories.d.ts.map +1 -0
  25. package/dist/stories/StatCard.stories.d.ts +10 -0
  26. package/dist/stories/StatCard.stories.d.ts.map +1 -0
  27. package/package.json +14 -3
@@ -5,13 +5,16 @@ import { Timeline as r } from "../components/viz/Timeline.js";
5
5
  import { AvatarStack as i } from "../components/viz/AvatarStack.js";
6
6
  import { SegmentedTabs as a } from "../components/viz/SegmentedTabs.js";
7
7
  import "../components/viz/index.js";
8
- import { useState as o } from "react";
9
- import { ArrowLeft as s, BadgeCheck as c, CalendarDays as l, Mail as u, MapPin as d, Phone as f } from "lucide-react";
10
- import { useNavigate as p, useSearchParams as m } from "react-router-dom";
11
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
12
- 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, Spinner as D } from "@burdenoff/fe-libs/ui";
8
+ import { ConfirmDialog as o } from "../components/forms/ConfirmDialog.js";
9
+ import { AttachDocumentDialog as s } from "../components/forms/AttachDocumentDialog.js";
10
+ import { useEffect as ee, useRef as te, useState as c } from "react";
11
+ import { ArrowLeft as l, BadgeCheck as ne, CalendarDays as re, FileText as ie, Mail as ae, MapPin as u, Phone as oe, Plus as d, Trash2 as f } from "lucide-react";
12
+ import { useNavigate as p, useSearchParams as se } from "react-router-dom";
13
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
14
+ import { Badge as g, Button as _, Card as v, CardContent as y, CardHeader as b, CardTitle as x, GlassCard as S, GradientText as ce, IllustratedEmptyState as C, PagePurpose as w, Spinner as T } from "@burdenoff/fe-libs/ui";
15
+ import { useGlobalUi as E } from "@burdenoff/fe-libs/shared/providers/shell";
13
16
  //#region src/crewfoundry/pages/HrEmployeeProfilePagePage.tsx
14
- var O = [
17
+ var D = [
15
18
  {
16
19
  id: "overview",
17
20
  label: "Overview"
@@ -20,6 +23,10 @@ var O = [
20
23
  id: "skills",
21
24
  label: "Skills"
22
25
  },
26
+ {
27
+ id: "documents",
28
+ label: "Documents"
29
+ },
23
30
  {
24
31
  id: "performance",
25
32
  label: "Performance"
@@ -28,7 +35,7 @@ var O = [
28
35
  id: "activity",
29
36
  label: "Activity"
30
37
  }
31
- ], k = [
38
+ ], O = [
32
39
  {
33
40
  min: 0,
34
41
  max: 6e4
@@ -54,11 +61,11 @@ var O = [
54
61
  max: Infinity
55
62
  }
56
63
  ];
57
- function A(e) {
58
- let t = k.findIndex((t) => e >= t.min && e < t.max), n = t === -1 ? k.length - 1 : t, r = k[n], i = `$${Math.round(r.min / 1e3)}k`, a = r.max === Infinity ? "+" : `–$${Math.round(r.max / 1e3)}k`;
64
+ function le(e) {
65
+ let t = O.findIndex((t) => e >= t.min && e < t.max), n = t === -1 ? O.length - 1 : t, r = O[n], i = `$${Math.round(r.min / 1e3)}k`, a = r.max === Infinity ? "+" : `–$${Math.round(r.max / 1e3)}k`;
59
66
  return `Band ${n + 1} · ${i}${a}`;
60
67
  }
61
- function j(e) {
68
+ function ue(e) {
62
69
  let t = new Date(e);
63
70
  if (Number.isNaN(t.getTime())) return "—";
64
71
  let n = /* @__PURE__ */ new Date(), r = (n.getFullYear() - t.getFullYear()) * 12 + (n.getMonth() - t.getMonth());
@@ -66,37 +73,37 @@ function j(e) {
66
73
  let i = Math.floor(r / 12), a = r % 12, o = [];
67
74
  return i > 0 && o.push(`${i} year${i === 1 ? "" : "s"}`), o.push(`${a} month${a === 1 ? "" : "s"}`), o.join(", ");
68
75
  }
69
- function M(e) {
76
+ function k(e) {
70
77
  return e >= 4.5 ? "Excellent" : e >= 3.5 ? "Strong" : e >= 2.5 ? "Meets expectations" : "Needs improvement";
71
78
  }
72
- function N(e) {
79
+ function A(e) {
73
80
  return e === "active" ? "default" : e === "on_leave" ? "secondary" : "destructive";
74
81
  }
75
- function P({ icon: e, children: t }) {
76
- return /* @__PURE__ */ g("span", {
82
+ function j({ icon: e, children: t }) {
83
+ return /* @__PURE__ */ h("span", {
77
84
  className: "inline-flex items-center gap-1.5 rounded-full border border-border-subtle bg-bg-surface px-3 py-1 text-xs text-text-secondary",
78
- children: [/* @__PURE__ */ h("span", {
85
+ children: [/* @__PURE__ */ m("span", {
79
86
  className: "text-text-muted",
80
87
  children: e
81
- }), /* @__PURE__ */ h("span", {
88
+ }), /* @__PURE__ */ m("span", {
82
89
  className: "truncate",
83
90
  children: t
84
91
  })]
85
92
  });
86
93
  }
87
- function F({ label: e, children: t }) {
88
- return /* @__PURE__ */ g("div", {
94
+ function M({ label: e, children: t }) {
95
+ return /* @__PURE__ */ h("div", {
89
96
  className: "flex items-start justify-between gap-4 py-2 text-sm",
90
- children: [/* @__PURE__ */ h("span", {
97
+ children: [/* @__PURE__ */ m("span", {
91
98
  className: "text-text-secondary",
92
99
  children: e
93
- }), /* @__PURE__ */ h("span", {
100
+ }), /* @__PURE__ */ m("span", {
94
101
  className: "text-right font-medium text-text-primary",
95
102
  children: t
96
103
  })]
97
104
  });
98
105
  }
99
- function I(e, n, r, i, a) {
106
+ function N(e, n, r, i, a) {
100
107
  let o = [], s = (e) => {
101
108
  let t = new Date(e).getTime();
102
109
  return Number.isNaN(t) ? 0 : t;
@@ -146,89 +153,98 @@ function I(e, n, r, i, a) {
146
153
  });
147
154
  return o.sort((e, t) => t.ts - e.ts).slice(0, 14).map((e) => e.item);
148
155
  }
149
- function L() {
150
- let k = p(), [L] = m(), R = e((e) => e.employees), z = e((e) => e.timeEntries), B = e((e) => e.leaveRequests), V = e((e) => e.payrollRecords), H = e((e) => e.projects), U = e((e) => e.initialized), [W, G] = o("overview"), K = L.get("id"), q = R.find((e) => e.id === K);
151
- if (!U && !q) return /* @__PURE__ */ h("div", {
156
+ function P() {
157
+ let O = p(), [P] = se(), F = e((e) => e.employees), I = e((e) => e.timeEntries), L = e((e) => e.leaveRequests), R = e((e) => e.payrollRecords), z = e((e) => e.projects), B = e((e) => e.initialized), V = e((e) => e.employeeDocuments), H = e((e) => e.fetchEmployeeDocuments), de = e((e) => e.uploadEmployeeDocument), fe = e((e) => e.detachEmployeeDocument), { showToast: U } = E(), [W, pe] = c("overview"), [me, G] = c(!1), [K, q] = c(null), J = te(null), he = P.get("id"), Y = F.find((e) => e.id === he);
158
+ if (ee(() => {
159
+ W === "documents" && Y && J.current !== Y.id && (J.current = Y.id, H(Y.id).catch((e) => {
160
+ U(e instanceof Error ? e.message : "Unable to load documents", "error");
161
+ }));
162
+ }, [
163
+ W,
164
+ Y,
165
+ H,
166
+ U
167
+ ]), !B && !Y) return /* @__PURE__ */ m("div", {
152
168
  className: "flex min-h-[60vh] items-center justify-center p-6",
153
- children: /* @__PURE__ */ h(D, { size: "lg" })
169
+ children: /* @__PURE__ */ m(T, { size: "lg" })
154
170
  });
155
- if (!q) return /* @__PURE__ */ g("div", {
171
+ if (!Y) return /* @__PURE__ */ h("div", {
156
172
  className: "space-y-4 p-6",
157
- children: [/* @__PURE__ */ g(v, {
173
+ children: [/* @__PURE__ */ h(_, {
158
174
  variant: "ghost",
159
175
  size: "sm",
160
- onClick: () => k("../hr/employees-page"),
161
- children: [/* @__PURE__ */ h(s, { className: "mr-1 h-4 w-4" }), "Back to directory"]
162
- }), /* @__PURE__ */ h(T, {
176
+ onClick: () => O("../hr/employees-page"),
177
+ children: [/* @__PURE__ */ m(l, { className: "mr-1 h-4 w-4" }), "Back to directory"]
178
+ }), /* @__PURE__ */ m(C, {
163
179
  illustration: "empty-search",
164
180
  title: "Employee not found",
165
181
  description: "This profile is no longer available or the link is out of date."
166
182
  })]
167
183
  });
168
- let J = q.managerId ? R.find((e) => e.id === q.managerId) : void 0, Y = J ? `${J.firstName} ${J.lastName}` : q.managerId ? "Assigned" : "No manager", X = `${q.firstName} ${q.lastName}`, Z = I(q, z, B, V, H);
169
- return /* @__PURE__ */ g("div", {
184
+ let X = Y.managerId ? F.find((e) => e.id === Y.managerId) : void 0, Z = X ? `${X.firstName} ${X.lastName}` : Y.managerId ? "Assigned" : "No manager", Q = `${Y.firstName} ${Y.lastName}`, $ = N(Y, I, L, R, z);
185
+ return /* @__PURE__ */ h("div", {
170
186
  className: "space-y-6 p-6",
171
187
  children: [
172
- /* @__PURE__ */ g(v, {
188
+ /* @__PURE__ */ h(_, {
173
189
  variant: "ghost",
174
190
  size: "sm",
175
- onClick: () => k("../hr/employees-page"),
176
- children: [/* @__PURE__ */ h(s, { className: "mr-1 h-4 w-4" }), "Back to directory"]
191
+ onClick: () => O("../hr/employees-page"),
192
+ children: [/* @__PURE__ */ m(l, { className: "mr-1 h-4 w-4" }), "Back to directory"]
177
193
  }),
178
- /* @__PURE__ */ h(C, {
194
+ /* @__PURE__ */ m(S, {
179
195
  treatment: "glass",
180
196
  glow: !0,
181
197
  className: "border-border-seam",
182
- children: /* @__PURE__ */ h(b, {
198
+ children: /* @__PURE__ */ m(y, {
183
199
  className: "p-6",
184
- children: /* @__PURE__ */ g("div", {
200
+ children: /* @__PURE__ */ h("div", {
185
201
  className: "flex flex-col gap-5 sm:flex-row sm:items-start",
186
- children: [/* @__PURE__ */ h(i, {
202
+ children: [/* @__PURE__ */ m(i, {
187
203
  people: [{
188
- name: X,
189
- avatarUrl: q.avatar
204
+ name: Q,
205
+ avatarUrl: Y.avatar
190
206
  }],
191
207
  max: 1,
192
208
  size: 72
193
- }), /* @__PURE__ */ g("div", {
209
+ }), /* @__PURE__ */ h("div", {
194
210
  className: "flex-1 space-y-3",
195
211
  children: [
196
- /* @__PURE__ */ g("div", {
212
+ /* @__PURE__ */ h("div", {
197
213
  className: "flex flex-wrap items-center gap-3",
198
- children: [/* @__PURE__ */ h("h1", {
214
+ children: [/* @__PURE__ */ m("h1", {
199
215
  className: "text-2xl font-semibold",
200
- children: /* @__PURE__ */ h(w, { children: X })
201
- }), /* @__PURE__ */ h(_, {
202
- variant: N(q.status),
203
- children: t(q.status)
216
+ children: /* @__PURE__ */ m(ce, { children: Q })
217
+ }), /* @__PURE__ */ m(g, {
218
+ variant: A(Y.status),
219
+ children: t(Y.status)
204
220
  })]
205
221
  }),
206
- /* @__PURE__ */ g("p", {
222
+ /* @__PURE__ */ h("p", {
207
223
  className: "text-sm text-text-secondary",
208
224
  children: [
209
- q.position,
225
+ Y.position,
210
226
  " · ",
211
- q.department
227
+ Y.department
212
228
  ]
213
229
  }),
214
- /* @__PURE__ */ g("div", {
230
+ /* @__PURE__ */ h("div", {
215
231
  className: "flex flex-wrap gap-2",
216
232
  children: [
217
- /* @__PURE__ */ h(P, {
218
- icon: /* @__PURE__ */ h(u, { className: "h-3.5 w-3.5" }),
219
- children: q.email
233
+ /* @__PURE__ */ m(j, {
234
+ icon: /* @__PURE__ */ m(ae, { className: "h-3.5 w-3.5" }),
235
+ children: Y.email
220
236
  }),
221
- /* @__PURE__ */ h(P, {
222
- icon: /* @__PURE__ */ h(f, { className: "h-3.5 w-3.5" }),
223
- children: q.phone
237
+ /* @__PURE__ */ m(j, {
238
+ icon: /* @__PURE__ */ m(oe, { className: "h-3.5 w-3.5" }),
239
+ children: Y.phone
224
240
  }),
225
- /* @__PURE__ */ h(P, {
226
- icon: /* @__PURE__ */ h(d, { className: "h-3.5 w-3.5" }),
227
- children: q.location
241
+ /* @__PURE__ */ m(j, {
242
+ icon: /* @__PURE__ */ m(u, { className: "h-3.5 w-3.5" }),
243
+ children: Y.location
228
244
  }),
229
- /* @__PURE__ */ g(P, {
230
- icon: /* @__PURE__ */ h(l, { className: "h-3.5 w-3.5" }),
231
- children: ["Joined ", q.startDate]
245
+ /* @__PURE__ */ h(j, {
246
+ icon: /* @__PURE__ */ m(re, { className: "h-3.5 w-3.5" }),
247
+ children: ["Joined ", Y.startDate]
232
248
  })
233
249
  ]
234
250
  })
@@ -237,149 +253,223 @@ function L() {
237
253
  })
238
254
  })
239
255
  }),
240
- /* @__PURE__ */ h(E, { children: "A single view of one team member — their role, tenure, performance, and recent activity — so managers and partners have the full context in one place." }),
241
- /* @__PURE__ */ h(a, {
242
- tabs: O,
256
+ /* @__PURE__ */ m(w, { children: "A single view of one team member — their role, tenure, performance, and recent activity — so managers and partners have the full context in one place." }),
257
+ /* @__PURE__ */ m(a, {
258
+ tabs: D,
243
259
  value: W,
244
- onChange: (e) => G(e),
260
+ onChange: (e) => pe(e),
245
261
  "aria-label": "Employee profile sections"
246
262
  }),
247
- W === "overview" ? /* @__PURE__ */ g("div", {
263
+ W === "overview" ? /* @__PURE__ */ h("div", {
248
264
  className: "grid gap-4 lg:grid-cols-2",
249
- children: [/* @__PURE__ */ g(y, { children: [/* @__PURE__ */ h(x, { children: /* @__PURE__ */ h(S, {
265
+ children: [/* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m(b, { children: /* @__PURE__ */ m(x, {
250
266
  className: "text-base",
251
267
  children: "Details"
252
- }) }), /* @__PURE__ */ g(b, {
268
+ }) }), /* @__PURE__ */ h(y, {
253
269
  className: "divide-y divide-border-subtle pt-0",
254
270
  children: [
255
- /* @__PURE__ */ h(F, {
271
+ /* @__PURE__ */ m(M, {
256
272
  label: "Manager",
257
- children: /* @__PURE__ */ g("span", {
273
+ children: /* @__PURE__ */ h("span", {
258
274
  className: "inline-flex items-center gap-2",
259
- children: [J ? /* @__PURE__ */ h(i, {
275
+ children: [X ? /* @__PURE__ */ m(i, {
260
276
  people: [{
261
- name: Y,
262
- avatarUrl: J.avatar
277
+ name: Z,
278
+ avatarUrl: X.avatar
263
279
  }],
264
280
  max: 1,
265
281
  size: 24
266
- }) : null, Y]
282
+ }) : null, Z]
267
283
  })
268
284
  }),
269
- /* @__PURE__ */ h(F, {
285
+ /* @__PURE__ */ m(M, {
270
286
  label: "Employment type",
271
- children: t(q.type)
287
+ children: t(Y.type)
272
288
  }),
273
- /* @__PURE__ */ h(F, {
289
+ /* @__PURE__ */ m(M, {
274
290
  label: "Salary band",
275
- children: A(q.salary)
291
+ children: le(Y.salary)
276
292
  }),
277
- /* @__PURE__ */ h(F, {
293
+ /* @__PURE__ */ m(M, {
278
294
  label: "Tenure",
279
- children: j(q.startDate)
295
+ children: ue(Y.startDate)
280
296
  }),
281
- /* @__PURE__ */ h(F, {
297
+ /* @__PURE__ */ m(M, {
282
298
  label: "Employee ID",
283
- children: /* @__PURE__ */ h("span", {
299
+ children: /* @__PURE__ */ m("span", {
284
300
  className: "break-all font-mono text-xs",
285
- children: q.id
301
+ children: Y.id
286
302
  })
287
303
  })
288
304
  ]
289
- })] }), /* @__PURE__ */ g(y, { children: [/* @__PURE__ */ h(x, { children: /* @__PURE__ */ h(S, {
305
+ })] }), /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m(b, { children: /* @__PURE__ */ m(x, {
290
306
  className: "text-base",
291
307
  children: "Performance"
292
- }) }), /* @__PURE__ */ g(b, {
308
+ }) }), /* @__PURE__ */ h(y, {
293
309
  className: "flex items-center gap-6 pt-0",
294
- children: [/* @__PURE__ */ h(n, {
295
- value: q.performanceScore,
310
+ children: [/* @__PURE__ */ m(n, {
311
+ value: Y.performanceScore,
296
312
  max: 5,
297
- label: q.performanceScore.toFixed(1),
313
+ label: Y.performanceScore.toFixed(1),
298
314
  caption: "/ 5"
299
- }), /* @__PURE__ */ g("div", {
315
+ }), /* @__PURE__ */ h("div", {
300
316
  className: "space-y-1",
301
- children: [/* @__PURE__ */ h("p", {
317
+ children: [/* @__PURE__ */ m("p", {
302
318
  className: "text-lg font-semibold text-text-primary",
303
- children: M(q.performanceScore)
304
- }), /* @__PURE__ */ g("p", {
319
+ children: k(Y.performanceScore)
320
+ }), /* @__PURE__ */ h("p", {
305
321
  className: "text-sm text-text-secondary",
306
322
  children: [
307
323
  "Latest review score of ",
308
- q.performanceScore.toFixed(1),
324
+ Y.performanceScore.toFixed(1),
309
325
  " out of 5."
310
326
  ]
311
327
  })]
312
328
  })]
313
329
  })] })]
314
330
  }) : null,
315
- W === "skills" ? /* @__PURE__ */ g(y, { children: [/* @__PURE__ */ h(x, { children: /* @__PURE__ */ h(S, {
331
+ W === "skills" ? /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m(b, { children: /* @__PURE__ */ m(x, {
316
332
  className: "text-base",
317
333
  children: "Skills"
318
- }) }), /* @__PURE__ */ h(b, {
334
+ }) }), /* @__PURE__ */ m(y, {
319
335
  className: "pt-0",
320
- children: q.skills.length > 0 ? /* @__PURE__ */ h("div", {
336
+ children: Y.skills.length > 0 ? /* @__PURE__ */ m("div", {
321
337
  className: "flex flex-wrap gap-2",
322
- children: q.skills.map((e) => /* @__PURE__ */ h(_, {
338
+ children: Y.skills.map((e) => /* @__PURE__ */ m(g, {
323
339
  variant: "secondary",
324
340
  className: "text-xs",
325
341
  children: e
326
342
  }, e))
327
- }) : /* @__PURE__ */ h(T, {
343
+ }) : /* @__PURE__ */ m(C, {
328
344
  illustration: "empty-data",
329
345
  title: "No skills recorded",
330
346
  description: "This team member has no skills captured yet. Add skills from the employee directory to surface them here."
331
347
  })
332
348
  })] }) : null,
333
- W === "performance" ? /* @__PURE__ */ g(y, { children: [/* @__PURE__ */ h(x, { children: /* @__PURE__ */ h(S, {
349
+ W === "documents" ? /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ h(b, {
350
+ className: "flex flex-row items-center justify-between",
351
+ children: [/* @__PURE__ */ m(x, {
352
+ className: "text-base",
353
+ children: "Documents"
354
+ }), /* @__PURE__ */ h(_, {
355
+ size: "sm",
356
+ onClick: () => G(!0),
357
+ children: [/* @__PURE__ */ m(d, { className: "mr-1.5 h-3.5 w-3.5" }), "Attach document"]
358
+ })]
359
+ }), /* @__PURE__ */ m(y, {
360
+ className: "pt-0",
361
+ children: V.length > 0 ? /* @__PURE__ */ m("div", {
362
+ className: "space-y-2",
363
+ children: V.map((e) => /* @__PURE__ */ h("div", {
364
+ className: "flex items-center justify-between gap-3 rounded-input border border-border-subtle bg-bg-surface px-3 py-2.5",
365
+ children: [/* @__PURE__ */ h("div", {
366
+ className: "flex min-w-0 items-center gap-3",
367
+ children: [/* @__PURE__ */ m(ie, { className: "h-4 w-4 shrink-0 text-text-muted" }), /* @__PURE__ */ h("div", {
368
+ className: "min-w-0",
369
+ children: [/* @__PURE__ */ m("p", {
370
+ className: "truncate text-sm font-medium text-text-primary",
371
+ children: e.title
372
+ }), /* @__PURE__ */ h("p", {
373
+ className: "text-xs text-text-muted",
374
+ children: [
375
+ e.category ? `${e.category} · ` : "",
376
+ "Uploaded ",
377
+ e.uploadedAt.slice(0, 10)
378
+ ]
379
+ })]
380
+ })]
381
+ }), /* @__PURE__ */ m("button", {
382
+ type: "button",
383
+ "aria-label": `Remove document "${e.title}"`,
384
+ className: "shrink-0 text-text-muted hover:text-status-error-fg",
385
+ onClick: () => q(e.id),
386
+ children: /* @__PURE__ */ m(f, { className: "h-4 w-4" })
387
+ })]
388
+ }, e.id))
389
+ }) : /* @__PURE__ */ m(C, {
390
+ illustration: "empty-data",
391
+ title: "No documents attached",
392
+ description: "Offer letters, contracts, and compliance documents attached to this profile will appear here.",
393
+ action: /* @__PURE__ */ h(_, {
394
+ size: "sm",
395
+ onClick: () => G(!0),
396
+ children: [/* @__PURE__ */ m(d, { className: "mr-1.5 h-3.5 w-3.5" }), "Attach document"]
397
+ })
398
+ })
399
+ })] }) : null,
400
+ W === "performance" ? /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m(b, { children: /* @__PURE__ */ m(x, {
334
401
  className: "text-base",
335
402
  children: "Performance"
336
- }) }), /* @__PURE__ */ g(b, {
403
+ }) }), /* @__PURE__ */ h(y, {
337
404
  className: "flex flex-col items-center gap-6 pt-0 sm:flex-row sm:items-center",
338
- children: [/* @__PURE__ */ h(n, {
339
- value: q.performanceScore,
405
+ children: [/* @__PURE__ */ m(n, {
406
+ value: Y.performanceScore,
340
407
  max: 5,
341
408
  size: 160,
342
- label: q.performanceScore.toFixed(1),
409
+ label: Y.performanceScore.toFixed(1),
343
410
  caption: "/ 5"
344
- }), /* @__PURE__ */ g("div", {
411
+ }), /* @__PURE__ */ h("div", {
345
412
  className: "flex-1 space-y-2",
346
413
  children: [
347
- /* @__PURE__ */ g(_, {
414
+ /* @__PURE__ */ h(g, {
348
415
  variant: "secondary",
349
416
  className: "gap-1",
350
- children: [/* @__PURE__ */ h(c, { className: "h-3.5 w-3.5" }), M(q.performanceScore)]
417
+ children: [/* @__PURE__ */ m(ne, { className: "h-3.5 w-3.5" }), k(Y.performanceScore)]
351
418
  }),
352
- /* @__PURE__ */ g("p", {
419
+ /* @__PURE__ */ h("p", {
353
420
  className: "text-sm text-text-secondary",
354
421
  children: [
355
- X,
422
+ Q,
356
423
  " holds a review score of ",
357
- q.performanceScore.toFixed(1),
424
+ Y.performanceScore.toFixed(1),
358
425
  " out of 5."
359
426
  ]
360
427
  }),
361
- /* @__PURE__ */ h("p", {
428
+ /* @__PURE__ */ m("p", {
362
429
  className: "text-xs text-text-muted",
363
430
  children: "Goal, peer, and manager sub-scores will appear here once captured on the review record."
364
431
  })
365
432
  ]
366
433
  })]
367
434
  })] }) : null,
368
- W === "activity" ? /* @__PURE__ */ g(y, { children: [/* @__PURE__ */ h(x, { children: /* @__PURE__ */ h(S, {
435
+ W === "activity" ? /* @__PURE__ */ h(v, { children: [/* @__PURE__ */ m(b, { children: /* @__PURE__ */ m(x, {
369
436
  className: "text-base",
370
437
  children: "Recent activity"
371
- }) }), /* @__PURE__ */ h(b, {
438
+ }) }), /* @__PURE__ */ m(y, {
372
439
  className: "pt-0",
373
- children: Z.length > 0 ? /* @__PURE__ */ h(r, { items: Z }) : /* @__PURE__ */ h(T, {
440
+ children: $.length > 0 ? /* @__PURE__ */ m(r, { items: $ }) : /* @__PURE__ */ m(C, {
374
441
  illustration: "empty-data",
375
442
  title: "No activity yet",
376
443
  description: "Time logs, leave, payroll, and project assignments for this employee will show up here."
377
444
  })
378
- })] }) : null
445
+ })] }) : null,
446
+ /* @__PURE__ */ m(s, {
447
+ open: me,
448
+ onOpenChange: G,
449
+ onUpload: ({ file: e, title: t, category: n }) => de({
450
+ employeeId: Y.id,
451
+ file: e,
452
+ title: t,
453
+ category: n
454
+ })
455
+ }),
456
+ /* @__PURE__ */ m(o, {
457
+ open: K !== null,
458
+ onOpenChange: (e) => {
459
+ e || q(null);
460
+ },
461
+ title: "Remove document?",
462
+ description: "This unlinks the document from this employee's profile. The file itself stays in the workspace Files library.",
463
+ confirmLabel: "Remove",
464
+ destructive: !0,
465
+ onConfirm: async () => {
466
+ K && (await fe(K), q(null));
467
+ }
468
+ })
379
469
  ]
380
470
  });
381
471
  }
382
472
  //#endregion
383
- export { L as HrEmployeeProfilePagePage };
473
+ export { P as HrEmployeeProfilePagePage };
384
474
 
385
475
  //# sourceMappingURL=HrEmployeeProfilePagePage.js.map