@burdenoff/microfe-crewfoundry 2026.626.1 → 2026.703.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 (82) hide show
  1. package/dist/crewfoundry/components/forms/ConfirmDialog.js +43 -0
  2. package/dist/crewfoundry/components/forms/ConfirmDialog.js.map +1 -0
  3. package/dist/crewfoundry/components/forms/FormModal.js +220 -0
  4. package/dist/crewfoundry/components/forms/FormModal.js.map +1 -0
  5. package/dist/crewfoundry/components/forms/formValues.js +20 -0
  6. package/dist/crewfoundry/components/forms/formValues.js.map +1 -0
  7. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +255 -65
  8. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
  9. package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js +28 -17
  10. package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js.map +1 -1
  11. package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js +57 -53
  12. package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js.map +1 -1
  13. package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js +32 -23
  14. package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js.map +1 -1
  15. package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js +44 -29
  16. package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js.map +1 -1
  17. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +183 -57
  18. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
  19. package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js.map +1 -1
  20. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +214 -92
  21. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
  22. package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +165 -131
  23. package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
  24. package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +163 -133
  25. package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
  26. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +269 -54
  27. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
  28. package/dist/crewfoundry/pages/HiringCreateJobPagePage.js +225 -78
  29. package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
  30. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +213 -59
  31. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
  32. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +287 -90
  33. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
  34. package/dist/crewfoundry/pages/HiringJobsPagePage.js +49 -47
  35. package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
  36. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +166 -59
  37. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
  38. package/dist/crewfoundry/pages/HrEmployeesPagePage.js +274 -83
  39. package/dist/crewfoundry/pages/HrEmployeesPagePage.js.map +1 -1
  40. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +198 -88
  41. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
  42. package/dist/crewfoundry/pages/HrPayrollPagePage.js +216 -88
  43. package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
  44. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +216 -66
  45. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
  46. package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js +6 -7
  47. package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js.map +1 -1
  48. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +83 -68
  49. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
  50. package/dist/crewfoundry/pages/LearningCoursesPagePage.js +167 -46
  51. package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
  52. package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
  53. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +75 -55
  54. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
  55. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +152 -79
  56. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
  57. package/dist/crewfoundry/pages/LearningMyLearningPagePage.js +75 -63
  58. package/dist/crewfoundry/pages/LearningMyLearningPagePage.js.map +1 -1
  59. package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js +3 -1
  60. package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js.map +1 -1
  61. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
  62. package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +235 -87
  63. package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
  64. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +199 -86
  65. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
  66. package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +1 -1
  67. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +21 -40
  68. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +1 -1
  69. package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js +117 -45
  70. package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js.map +1 -1
  71. package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js +249 -90
  72. package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js.map +1 -1
  73. package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +47 -45
  74. package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
  75. package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
  76. package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js +262 -133
  77. package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js.map +1 -1
  78. package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +144 -77
  79. package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
  80. package/dist/crewfoundry/store/crewfoundryStore.js +339 -52
  81. package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
  82. package/package.json +1 -1
@@ -1,211 +1,402 @@
1
1
  import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
2
- import { useState as t } from "react";
3
- import { MapPin as n, Plus as r, Search as i, Star as a, UserCheck as o, Users as s } from "lucide-react";
4
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
- import { Badge as u, Button as d, Card as f, CardContent as p, CardHeader as m, CardTitle as h, GlassCard as g, GradientText as _, IllustratedEmptyState as v, Input as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
2
+ import { FormModal as t, useFormModal as n } from "../components/forms/FormModal.js";
3
+ import { ConfirmDialog as r } from "../components/forms/ConfirmDialog.js";
4
+ import { getNumber as i, getText as a, newClientId as o } from "../components/forms/formValues.js";
5
+ import { useState as s } from "react";
6
+ import { MapPin as c, Pencil as l, Plus as u, Search as d, Star as f, Trash2 as p, UserCheck as m, Users as h } from "lucide-react";
7
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
8
+ 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, Input as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
6
9
  //#region src/crewfoundry/pages/HrEmployeesPagePage.tsx
7
- function x() {
8
- let { employees: x } = e(), [S, C] = t(""), [w, T] = t("all"), E = [...new Set(x.map((e) => e.department))], D = x.filter((e) => {
9
- let t = `${e.firstName} ${e.lastName} ${e.email} ${e.position}`.toLowerCase().includes(S.toLowerCase()), n = w === "all" || e.department === w;
10
+ var k = [
11
+ {
12
+ name: "firstName",
13
+ label: "First name",
14
+ type: "text",
15
+ required: !0
16
+ },
17
+ {
18
+ name: "lastName",
19
+ label: "Last name",
20
+ type: "text",
21
+ required: !0
22
+ },
23
+ {
24
+ name: "email",
25
+ label: "Email",
26
+ type: "email",
27
+ required: !0,
28
+ colSpan: 2
29
+ },
30
+ {
31
+ name: "position",
32
+ label: "Position",
33
+ type: "text",
34
+ required: !0
35
+ },
36
+ {
37
+ name: "department",
38
+ label: "Department",
39
+ type: "text",
40
+ required: !0
41
+ },
42
+ {
43
+ name: "location",
44
+ label: "Location",
45
+ type: "text",
46
+ required: !0
47
+ },
48
+ {
49
+ name: "phone",
50
+ label: "Phone",
51
+ type: "text",
52
+ required: !0
53
+ },
54
+ {
55
+ name: "type",
56
+ label: "Employment type",
57
+ type: "select",
58
+ required: !0,
59
+ options: [
60
+ {
61
+ label: "Full time",
62
+ value: "full_time"
63
+ },
64
+ {
65
+ label: "Part time",
66
+ value: "part_time"
67
+ },
68
+ {
69
+ label: "Contract",
70
+ value: "contract"
71
+ },
72
+ {
73
+ label: "Intern",
74
+ value: "intern"
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ name: "status",
80
+ label: "Status",
81
+ type: "select",
82
+ required: !0,
83
+ options: [
84
+ {
85
+ label: "Active",
86
+ value: "active"
87
+ },
88
+ {
89
+ label: "Inactive",
90
+ value: "inactive"
91
+ },
92
+ {
93
+ label: "On leave",
94
+ value: "on_leave"
95
+ },
96
+ {
97
+ label: "Terminated",
98
+ value: "terminated"
99
+ }
100
+ ]
101
+ },
102
+ {
103
+ name: "salary",
104
+ label: "Annual salary",
105
+ type: "number",
106
+ required: !0
107
+ },
108
+ {
109
+ name: "startDate",
110
+ label: "Start date",
111
+ type: "date",
112
+ required: !0
113
+ },
114
+ {
115
+ name: "performanceScore",
116
+ label: "Performance score (0-5)",
117
+ type: "number"
118
+ }
119
+ ], A = (e) => ({
120
+ firstName: e.firstName,
121
+ lastName: e.lastName,
122
+ email: e.email,
123
+ position: e.position,
124
+ department: e.department,
125
+ location: e.location,
126
+ phone: e.phone,
127
+ type: e.type,
128
+ status: e.status,
129
+ salary: e.salary,
130
+ startDate: e.startDate.slice(0, 10),
131
+ performanceScore: e.performanceScore
132
+ });
133
+ function j() {
134
+ let { employees: j, addEmployee: M, updateEmployee: N, removeEmployee: P } = e(), [F, I] = s(""), [L, R] = s("all"), z = n(), [B, V] = s(null), H = [...new Set(j.map((e) => e.department))], U = j.filter((e) => {
135
+ let t = `${e.firstName} ${e.lastName} ${e.email} ${e.position}`.toLowerCase().includes(F.toLowerCase()), n = L === "all" || e.department === L;
10
136
  return t && n;
11
- }), O = x.filter((e) => e.status === "active").length, k = x.filter((e) => e.status === "on_leave").length;
12
- return /* @__PURE__ */ l("div", {
137
+ }), W = j.filter((e) => e.status === "active").length, G = j.filter((e) => e.status === "on_leave").length, K = j.length > 0 ? (j.reduce((e, t) => e + t.performanceScore, 0) / j.length).toFixed(1) : "0.0", q = z.context;
138
+ return /* @__PURE__ */ _("div", {
13
139
  className: "space-y-6 p-6",
14
140
  children: [
15
- /* @__PURE__ */ l("div", {
141
+ /* @__PURE__ */ _("div", {
16
142
  className: "flex items-center justify-between",
17
- children: [/* @__PURE__ */ l("div", { children: [
18
- /* @__PURE__ */ c("h1", {
143
+ children: [/* @__PURE__ */ _("div", { children: [
144
+ /* @__PURE__ */ g("h1", {
19
145
  className: "text-2xl font-semibold",
20
- children: /* @__PURE__ */ c(_, { children: "Employee Directory" })
146
+ children: /* @__PURE__ */ g(T, { children: "Employee Directory" })
21
147
  }),
22
- /* @__PURE__ */ l("p", {
148
+ /* @__PURE__ */ _("p", {
23
149
  className: "text-sm text-text-secondary",
24
150
  children: [
25
- x.length,
151
+ j.length,
26
152
  " employees across ",
27
- E.length,
153
+ H.length,
28
154
  " departments"
29
155
  ]
30
156
  }),
31
- /* @__PURE__ */ c(b, {
157
+ /* @__PURE__ */ g(O, {
32
158
  className: "mt-1",
33
159
  children: "Your complete employee directory — search, filter, and review everyone on the team along with their role, department, and status."
34
160
  })
35
- ] }), /* @__PURE__ */ l(d, {
161
+ ] }), /* @__PURE__ */ _(y, {
36
162
  size: "sm",
37
- children: [/* @__PURE__ */ c(r, { className: "h-4 w-4 mr-1" }), "Add Employee"]
163
+ onClick: () => z.openModal(),
164
+ children: [/* @__PURE__ */ g(u, { className: "h-4 w-4 mr-1" }), "Add Employee"]
38
165
  })]
39
166
  }),
40
- /* @__PURE__ */ l("div", {
167
+ /* @__PURE__ */ _("div", {
41
168
  className: "grid gap-4 md:grid-cols-4",
42
169
  children: [
43
- /* @__PURE__ */ l(g, {
170
+ /* @__PURE__ */ _(w, {
44
171
  treatment: "glass",
45
172
  glow: !0,
46
173
  className: "border-border-seam",
47
- children: [/* @__PURE__ */ l(m, {
174
+ children: [/* @__PURE__ */ _(S, {
48
175
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
49
- children: [/* @__PURE__ */ c(h, {
176
+ children: [/* @__PURE__ */ g(C, {
50
177
  className: "text-sm font-medium",
51
178
  children: "Total"
52
- }), /* @__PURE__ */ c(s, { className: "h-4 w-4 text-text-secondary" })]
53
- }), /* @__PURE__ */ c(p, { children: /* @__PURE__ */ c("div", {
179
+ }), /* @__PURE__ */ g(h, { className: "h-4 w-4 text-text-secondary" })]
180
+ }), /* @__PURE__ */ g(x, { children: /* @__PURE__ */ g("div", {
54
181
  className: "text-2xl font-bold tabular-nums",
55
- children: x.length
182
+ children: j.length
56
183
  }) })]
57
184
  }),
58
- /* @__PURE__ */ l(g, {
185
+ /* @__PURE__ */ _(w, {
59
186
  treatment: "metric",
60
187
  className: "border-border-seam",
61
- children: [/* @__PURE__ */ l(m, {
188
+ children: [/* @__PURE__ */ _(S, {
62
189
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
63
- children: [/* @__PURE__ */ c(h, {
190
+ children: [/* @__PURE__ */ g(C, {
64
191
  className: "text-sm font-medium",
65
192
  children: "Active"
66
- }), /* @__PURE__ */ c(o, { className: "h-4 w-4 text-status-success-text" })]
67
- }), /* @__PURE__ */ c(p, { children: /* @__PURE__ */ c("div", {
193
+ }), /* @__PURE__ */ g(m, { className: "h-4 w-4 text-status-success-text" })]
194
+ }), /* @__PURE__ */ g(x, { children: /* @__PURE__ */ g("div", {
68
195
  className: "text-2xl font-bold tabular-nums",
69
- children: O
196
+ children: W
70
197
  }) })]
71
198
  }),
72
- /* @__PURE__ */ l(g, {
199
+ /* @__PURE__ */ _(w, {
73
200
  treatment: "metric",
74
201
  className: "border-border-seam",
75
- children: [/* @__PURE__ */ l(m, {
202
+ children: [/* @__PURE__ */ _(S, {
76
203
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
77
- children: [/* @__PURE__ */ c(h, {
204
+ children: [/* @__PURE__ */ g(C, {
78
205
  className: "text-sm font-medium",
79
206
  children: "On Leave"
80
- }), /* @__PURE__ */ c(s, { className: "h-4 w-4 text-status-warning-text" })]
81
- }), /* @__PURE__ */ c(p, { children: /* @__PURE__ */ c("div", {
207
+ }), /* @__PURE__ */ g(h, { className: "h-4 w-4 text-status-warning-text" })]
208
+ }), /* @__PURE__ */ g(x, { children: /* @__PURE__ */ g("div", {
82
209
  className: "text-2xl font-bold tabular-nums",
83
- children: k
210
+ children: G
84
211
  }) })]
85
212
  }),
86
- /* @__PURE__ */ l(g, {
213
+ /* @__PURE__ */ _(w, {
87
214
  treatment: "metric",
88
215
  className: "border-border-seam",
89
- children: [/* @__PURE__ */ l(m, {
216
+ children: [/* @__PURE__ */ _(S, {
90
217
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
91
- children: [/* @__PURE__ */ c(h, {
218
+ children: [/* @__PURE__ */ g(C, {
92
219
  className: "text-sm font-medium",
93
220
  children: "Avg Rating"
94
- }), /* @__PURE__ */ c(a, { className: "h-4 w-4 text-status-warning-text" })]
95
- }), /* @__PURE__ */ c(p, { children: /* @__PURE__ */ c("div", {
221
+ }), /* @__PURE__ */ g(f, { className: "h-4 w-4 text-status-warning-text" })]
222
+ }), /* @__PURE__ */ g(x, { children: /* @__PURE__ */ g("div", {
96
223
  className: "text-2xl font-bold tabular-nums",
97
- children: (x.reduce((e, t) => e + t.performanceScore, 0) / x.length).toFixed(1)
224
+ children: K
98
225
  }) })]
99
226
  })
100
227
  ]
101
228
  }),
102
- /* @__PURE__ */ l("div", {
229
+ /* @__PURE__ */ _("div", {
103
230
  className: "flex gap-3",
104
- children: [/* @__PURE__ */ l("div", {
231
+ children: [/* @__PURE__ */ _("div", {
105
232
  className: "relative flex-1 max-w-sm",
106
- children: [/* @__PURE__ */ c(i, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ c(y, {
233
+ children: [/* @__PURE__ */ g(d, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g(D, {
107
234
  placeholder: "Search employees...",
108
235
  className: "pl-9",
109
- value: S,
110
- onChange: (e) => C(e.target.value)
236
+ value: F,
237
+ onChange: (e) => I(e.target.value)
111
238
  })]
112
- }), /* @__PURE__ */ l("div", {
239
+ }), /* @__PURE__ */ _("div", {
113
240
  className: "flex gap-1",
114
- children: [/* @__PURE__ */ c(d, {
115
- variant: w === "all" ? "default" : "outline",
241
+ children: [/* @__PURE__ */ g(y, {
242
+ variant: L === "all" ? "default" : "outline",
116
243
  size: "sm",
117
- onClick: () => T("all"),
244
+ onClick: () => R("all"),
118
245
  children: "All"
119
- }), E.slice(0, 5).map((e) => /* @__PURE__ */ c(d, {
120
- variant: w === e ? "default" : "outline",
246
+ }), H.slice(0, 5).map((e) => /* @__PURE__ */ g(y, {
247
+ variant: L === e ? "default" : "outline",
121
248
  size: "sm",
122
- onClick: () => T(e),
249
+ onClick: () => R(e),
123
250
  children: e
124
251
  }, e))]
125
252
  })]
126
253
  }),
127
- /* @__PURE__ */ c(f, { children: /* @__PURE__ */ l(p, {
254
+ /* @__PURE__ */ g(b, { children: /* @__PURE__ */ _(x, {
128
255
  className: "p-0",
129
256
  children: [
130
- /* @__PURE__ */ l("div", {
131
- className: "grid grid-cols-7 gap-2 text-xs font-medium text-text-secondary border-b p-4",
257
+ /* @__PURE__ */ _("div", {
258
+ className: "grid grid-cols-8 gap-2 text-xs font-medium text-text-secondary border-b p-4",
132
259
  children: [
133
- /* @__PURE__ */ c("span", { children: "Name" }),
134
- /* @__PURE__ */ c("span", { children: "Position" }),
135
- /* @__PURE__ */ c("span", { children: "Department" }),
136
- /* @__PURE__ */ c("span", { children: "Location" }),
137
- /* @__PURE__ */ c("span", {
260
+ /* @__PURE__ */ g("span", { children: "Name" }),
261
+ /* @__PURE__ */ g("span", { children: "Position" }),
262
+ /* @__PURE__ */ g("span", { children: "Department" }),
263
+ /* @__PURE__ */ g("span", { children: "Location" }),
264
+ /* @__PURE__ */ g("span", {
138
265
  className: "text-right",
139
266
  children: "Salary"
140
267
  }),
141
- /* @__PURE__ */ c("span", {
268
+ /* @__PURE__ */ g("span", {
142
269
  className: "text-center",
143
270
  children: "Rating"
144
271
  }),
145
- /* @__PURE__ */ c("span", {
272
+ /* @__PURE__ */ g("span", {
146
273
  className: "text-center",
147
274
  children: "Status"
275
+ }),
276
+ /* @__PURE__ */ g("span", {
277
+ className: "text-right",
278
+ children: "Actions"
148
279
  })
149
280
  ]
150
281
  }),
151
- D.map((e) => /* @__PURE__ */ l("div", {
152
- className: "grid grid-cols-7 gap-2 py-3 px-4 border-b last:border-0 text-sm hover:bg-bg-sunken/50",
282
+ U.map((e) => /* @__PURE__ */ _("div", {
283
+ className: "grid grid-cols-8 gap-2 py-3 px-4 border-b last:border-0 text-sm hover:bg-bg-sunken/50",
153
284
  children: [
154
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ l("p", {
285
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("p", {
155
286
  className: "font-medium",
156
287
  children: [
157
288
  e.firstName,
158
289
  " ",
159
290
  e.lastName
160
291
  ]
161
- }), /* @__PURE__ */ c("p", {
292
+ }), /* @__PURE__ */ g("p", {
162
293
  className: "text-xs text-text-secondary",
163
294
  children: e.email
164
295
  })] }),
165
- /* @__PURE__ */ c("span", {
296
+ /* @__PURE__ */ g("span", {
166
297
  className: "text-text-secondary",
167
298
  children: e.position
168
299
  }),
169
- /* @__PURE__ */ c("span", { children: e.department }),
170
- /* @__PURE__ */ l("div", {
300
+ /* @__PURE__ */ g("span", { children: e.department }),
301
+ /* @__PURE__ */ _("div", {
171
302
  className: "flex items-center gap-1 text-text-secondary",
172
- children: [/* @__PURE__ */ c(n, { className: "h-3 w-3" }), /* @__PURE__ */ c("span", {
303
+ children: [/* @__PURE__ */ g(c, { className: "h-3 w-3" }), /* @__PURE__ */ g("span", {
173
304
  className: "truncate text-xs",
174
305
  children: e.location
175
306
  })]
176
307
  }),
177
- /* @__PURE__ */ l("span", {
308
+ /* @__PURE__ */ _("span", {
178
309
  className: "text-right",
179
310
  children: ["$", e.salary.toLocaleString()]
180
311
  }),
181
- /* @__PURE__ */ l("div", {
312
+ /* @__PURE__ */ _("div", {
182
313
  className: "flex items-center justify-center gap-1",
183
- children: [/* @__PURE__ */ c(a, { className: "h-3 w-3 text-status-warning-text" }), /* @__PURE__ */ c("span", { children: e.performanceScore })]
314
+ children: [/* @__PURE__ */ g(f, { className: "h-3 w-3 text-status-warning-text" }), /* @__PURE__ */ g("span", { children: e.performanceScore })]
184
315
  }),
185
- /* @__PURE__ */ c("div", {
316
+ /* @__PURE__ */ g("div", {
186
317
  className: "text-center",
187
- children: /* @__PURE__ */ c(u, {
318
+ children: /* @__PURE__ */ g(v, {
188
319
  variant: e.status === "active" ? "default" : e.status === "on_leave" ? "secondary" : "destructive",
189
320
  className: "text-[10px]",
190
321
  children: e.status.replace("_", " ")
191
322
  })
323
+ }),
324
+ /* @__PURE__ */ _("div", {
325
+ className: "flex items-center justify-end gap-1",
326
+ children: [/* @__PURE__ */ g(y, {
327
+ variant: "ghost",
328
+ size: "sm",
329
+ className: "h-8 w-8 p-0",
330
+ "aria-label": `Edit ${e.firstName} ${e.lastName}`,
331
+ onClick: () => z.openModal(e),
332
+ children: /* @__PURE__ */ g(l, { className: "h-4 w-4" })
333
+ }), /* @__PURE__ */ g(y, {
334
+ variant: "ghost",
335
+ size: "sm",
336
+ className: "h-8 w-8 p-0",
337
+ "aria-label": `Delete ${e.firstName} ${e.lastName}`,
338
+ onClick: () => V(e),
339
+ children: /* @__PURE__ */ g(p, { className: "h-4 w-4 text-status-error-text" })
340
+ })]
192
341
  })
193
342
  ]
194
343
  }, e.id)),
195
- D.length === 0 && /* @__PURE__ */ c("div", {
344
+ U.length === 0 && /* @__PURE__ */ g("div", {
196
345
  className: "p-6",
197
- children: /* @__PURE__ */ c(v, {
346
+ children: /* @__PURE__ */ g(E, {
198
347
  illustration: "empty-people",
199
348
  title: "No employees match",
200
349
  description: "Try a different search term or department filter."
201
350
  })
202
351
  })
203
352
  ]
204
- }) })
353
+ }) }),
354
+ /* @__PURE__ */ g(t, {
355
+ open: z.open,
356
+ onOpenChange: z.onOpenChange,
357
+ title: q ? "Edit employee" : "Add employee",
358
+ description: q ? "Update this team member’s profile details." : "Add a new team member to your directory.",
359
+ fields: k,
360
+ initialValues: q ? A(q) : void 0,
361
+ submitLabel: q ? "Save changes" : "Add employee",
362
+ onSubmit: async (e) => {
363
+ let t = {
364
+ id: q?.id ?? o(),
365
+ firstName: a(e, "firstName"),
366
+ lastName: a(e, "lastName"),
367
+ email: a(e, "email"),
368
+ department: a(e, "department"),
369
+ position: a(e, "position"),
370
+ status: a(e, "status"),
371
+ type: a(e, "type"),
372
+ salary: i(e, "salary"),
373
+ startDate: a(e, "startDate"),
374
+ location: a(e, "location"),
375
+ phone: a(e, "phone"),
376
+ performanceScore: i(e, "performanceScore"),
377
+ managerId: q?.managerId,
378
+ avatar: q?.avatar
379
+ };
380
+ q ? await N(q.id, t) : await M(t);
381
+ }
382
+ }),
383
+ /* @__PURE__ */ g(r, {
384
+ open: B !== null,
385
+ onOpenChange: (e) => {
386
+ e || V(null);
387
+ },
388
+ title: "Delete employee?",
389
+ description: B ? `${B.firstName} ${B.lastName} will be removed from the directory. This cannot be undone.` : void 0,
390
+ confirmLabel: "Delete",
391
+ destructive: !0,
392
+ onConfirm: async () => {
393
+ B && (await P(B.id), V(null));
394
+ }
395
+ })
205
396
  ]
206
397
  });
207
398
  }
208
399
  //#endregion
209
- export { x as HrEmployeesPagePage };
400
+ export { j as HrEmployeesPagePage };
210
401
 
211
402
  //# sourceMappingURL=HrEmployeesPagePage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HrEmployeesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HrEmployeesPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { Mail, MapPin, Phone, Plus, Search, Star, UserCheck, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function HrEmployeesPagePage() {\n const { employees } = useCrewFoundryStore();\n const [search, setSearch] = useState('');\n const [filterDept, setFilterDept] = useState<string>('all');\n\n const departments = [...new Set(employees.map((e) => e.department))];\n const filtered = employees.filter((e) => {\n const matchSearch = `${e.firstName} ${e.lastName} ${e.email} ${e.position}`\n .toLowerCase()\n .includes(search.toLowerCase());\n const matchDept = filterDept === 'all' || e.department === filterDept;\n return matchSearch && matchDept;\n });\n\n const activeCount = employees.filter((e) => e.status === 'active').length;\n const onLeaveCount = employees.filter((e) => e.status === 'on_leave').length;\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Employee Directory</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {employees.length} employees across {departments.length} departments\n </p>\n <PagePurpose className=\"mt-1\">Your complete employee directory — search, filter, and review everyone on the team along with their role, department, and status.</PagePurpose>\n </div>\n <Button size=\"sm\">\n <Plus className=\"h-4 w-4 mr-1\" />\n Add Employee\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-4\">\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total</CardTitle>\n <Users className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{employees.length}</div>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active</CardTitle>\n <UserCheck className=\"h-4 w-4 text-status-success-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{activeCount}</div>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">On Leave</CardTitle>\n <Users className=\"h-4 w-4 text-status-warning-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{onLeaveCount}</div>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Avg Rating</CardTitle>\n <Star className=\"h-4 w-4 text-status-warning-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n {(employees.reduce((s, e) => s + e.performanceScore, 0) / employees.length).toFixed(\n 1\n )}\n </div>\n </CardContent>\n </GlassCard>\n </div>\n\n <div className=\"flex gap-3\">\n <div className=\"relative flex-1 max-w-sm\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\" />\n <Input\n placeholder=\"Search employees...\"\n className=\"pl-9\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </div>\n <div className=\"flex gap-1\">\n <Button\n variant={filterDept === 'all' ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => setFilterDept('all')}\n >\n All\n </Button>\n {departments.slice(0, 5).map((dept) => (\n <Button\n key={dept}\n variant={filterDept === dept ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => setFilterDept(dept)}\n >\n {dept}\n </Button>\n ))}\n </div>\n </div>\n\n <Card>\n <CardContent className=\"p-0\">\n <div className=\"grid grid-cols-7 gap-2 text-xs font-medium text-text-secondary border-b p-4\">\n <span>Name</span>\n <span>Position</span>\n <span>Department</span>\n <span>Location</span>\n <span className=\"text-right\">Salary</span>\n <span className=\"text-center\">Rating</span>\n <span className=\"text-center\">Status</span>\n </div>\n {filtered.map((emp) => (\n <div\n key={emp.id}\n className=\"grid grid-cols-7 gap-2 py-3 px-4 border-b last:border-0 text-sm hover:bg-bg-sunken/50\"\n >\n <div>\n <p className=\"font-medium\">\n {emp.firstName} {emp.lastName}\n </p>\n <p className=\"text-xs text-text-secondary\">{emp.email}</p>\n </div>\n <span className=\"text-text-secondary\">{emp.position}</span>\n <span>{emp.department}</span>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <MapPin className=\"h-3 w-3\" />\n <span className=\"truncate text-xs\">{emp.location}</span>\n </div>\n <span className=\"text-right\">${emp.salary.toLocaleString()}</span>\n <div className=\"flex items-center justify-center gap-1\">\n <Star className=\"h-3 w-3 text-status-warning-text\" />\n <span>{emp.performanceScore}</span>\n </div>\n <div className=\"text-center\">\n <Badge\n variant={\n emp.status === 'active'\n ? 'default'\n : emp.status === 'on_leave'\n ? 'secondary'\n : 'destructive'\n }\n className=\"text-[10px]\"\n >\n {emp.status.replace('_', ' ')}\n </Badge>\n </div>\n </div>\n ))}\n {filtered.length === 0 && (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-people\"\n title=\"No employees match\"\n description=\"Try a different search term or department filter.\"\n />\n </div>\n )}\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAiBA,SAAgB,IAAsB;CACpC,IAAM,EAAE,iBAAc,GAAqB,EACrC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,CAAC,GAAY,KAAiB,EAAiB,MAAM,EAErD,IAAc,CAAC,GAAG,IAAI,IAAI,EAAU,KAAK,MAAM,EAAE,WAAW,CAAC,CAAC,EAC9D,IAAW,EAAU,QAAQ,MAAM;EACvC,IAAM,IAAc,GAAG,EAAE,UAAU,GAAG,EAAE,SAAS,GAAG,EAAE,MAAM,GAAG,EAAE,WAC9D,aAAa,CACb,SAAS,EAAO,aAAa,CAAC,EAC3B,IAAY,MAAe,SAAS,EAAE,eAAe;AAC3D,SAAO,KAAe;GACtB,EAEI,IAAc,EAAU,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,QAC7D,IAAe,EAAU,QAAQ,MAAM,EAAE,WAAW,WAAW,CAAC;AAEtE,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA;KACE,kBAAC,MAAD;MAAI,WAAU;gBACZ,kBAAC,GAAD,EAAA,UAAc,sBAAiC,CAAA;MAC5C,CAAA;KACL,kBAAC,KAAD;MAAG,WAAU;gBAAb;OACG,EAAU;OAAO;OAAmB,EAAY;OAAO;OACtD;;KACJ,kBAAC,GAAD;MAAa,WAAU;gBAAO;MAA+I,CAAA;KACzK,EAAA,CAAA,EACN,kBAAC,GAAD;KAAQ,MAAK;eAAb,CACE,kBAAC,GAAD,EAAM,WAAU,gBAAiB,CAAA,EAAA,eAE1B;OACL;;GAEN,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,GAAD;MAAW,WAAU;M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WAAU;kBAAuB,EAAI;QAAgB,CAAA;OAC3D,kBAAC,QAAD,EAAA,UAAO,EAAI,YAAkB,CAAA;OAC7B,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,GAAD,EAAQ,WAAU,WAAY,CAAA,EAC9B,kBAAC,QAAD;SAAM,WAAU;mBAAoB,EAAI;SAAgB,CAAA,CACpD;;OACN,kBAAC,QAAD;QAAM,WAAU;kBAAhB,CAA6B,KAAE,EAAI,OAAO,gBAAgB,CAAQ;;OAClE,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,GAAD,EAAM,WAAU,oCAAqC,CAAA,EACrD,kBAAC,QAAD,EAAA,UAAO,EAAI,kBAAwB,CAAA,CAC/B;;OACN,kBAAC,OAAD;QAAK,WAAU;kBACb,kBAAC,GAAD;SACE,SACE,EAAI,WAAW,WACX,YACA,EAAI,WAAW,aACb,cACA;SAER,WAAU;mBAET,EAAI,OAAO,QAAQ,KAAK,IAAI;SACvB,CAAA;QACJ,CAAA;OACF;QAlCC,EAAI,GAkCL,CACN;KACD,EAAS,WAAW,KACnB,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,GAAD;OACE,cAAa;OACb,OAAM;OACN,aAAY;OACZ,CAAA;MACE,CAAA;KAEI;OACT,CAAA;GACH"}
1
+ {"version":3,"file":"HrEmployeesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HrEmployeesPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport {\n MapPin,\n Pencil,\n Plus,\n Search,\n Star,\n Trash2,\n UserCheck,\n Users,\n} from 'lucide-react';\nimport { useCrewFoundryStore, type Employee } from '../store/crewfoundryStore';\nimport { FormModal, useFormModal, type FieldConfig, type FormValues } from '../components/forms/FormModal';\nimport { ConfirmDialog } from '../components/forms/ConfirmDialog';\nimport { getNumber, getText, newClientId } from '../components/forms/formValues';\n\nconst EMPLOYEE_FIELDS: FieldConfig[] = [\n { name: 'firstName', label: 'First name', type: 'text', required: true },\n { name: 'lastName', label: 'Last name', type: 'text', required: true },\n { name: 'email', label: 'Email', type: 'email', required: true, colSpan: 2 },\n { name: 'position', label: 'Position', type: 'text', required: true },\n { name: 'department', label: 'Department', type: 'text', required: true },\n { name: 'location', label: 'Location', type: 'text', required: true },\n { name: 'phone', label: 'Phone', type: 'text', required: true },\n {\n name: 'type',\n label: 'Employment type',\n type: 'select',\n required: true,\n options: [\n { label: 'Full time', value: 'full_time' },\n { label: 'Part time', value: 'part_time' },\n { label: 'Contract', value: 'contract' },\n { label: 'Intern', value: 'intern' },\n ],\n },\n {\n name: 'status',\n label: 'Status',\n type: 'select',\n required: true,\n options: [\n { label: 'Active', value: 'active' },\n { label: 'Inactive', value: 'inactive' },\n { label: 'On leave', value: 'on_leave' },\n { label: 'Terminated', value: 'terminated' },\n ],\n },\n { name: 'salary', label: 'Annual salary', type: 'number', required: true },\n { name: 'startDate', label: 'Start date', type: 'date', required: true },\n { name: 'performanceScore', label: 'Performance score (0-5)', type: 'number' },\n];\n\nconst toFormValues = (employee: Employee): FormValues => ({\n firstName: employee.firstName,\n lastName: employee.lastName,\n email: employee.email,\n position: employee.position,\n department: employee.department,\n location: employee.location,\n phone: employee.phone,\n type: employee.type,\n status: employee.status,\n salary: employee.salary,\n startDate: employee.startDate.slice(0, 10),\n performanceScore: employee.performanceScore,\n});\n\nexport function HrEmployeesPagePage() {\n const { employees, addEmployee, updateEmployee, removeEmployee } = useCrewFoundryStore();\n const [search, setSearch] = useState('');\n const [filterDept, setFilterDept] = useState<string>('all');\n const form = useFormModal<Employee>();\n const [deleting, setDeleting] = useState<Employee | null>(null);\n\n const departments = [...new Set(employees.map((e) => e.department))];\n const filtered = employees.filter((e) => {\n const matchSearch = `${e.firstName} ${e.lastName} ${e.email} ${e.position}`\n .toLowerCase()\n .includes(search.toLowerCase());\n const matchDept = filterDept === 'all' || e.department === filterDept;\n return matchSearch && matchDept;\n });\n\n const activeCount = employees.filter((e) => e.status === 'active').length;\n const onLeaveCount = employees.filter((e) => e.status === 'on_leave').length;\n const avgRating =\n employees.length > 0\n ? (employees.reduce((s, e) => s + e.performanceScore, 0) / employees.length).toFixed(1)\n : '0.0';\n\n const editing = form.context;\n\n const handleSubmit = async (values: FormValues) => {\n const payload: Employee = {\n id: editing?.id ?? newClientId(),\n firstName: getText(values, 'firstName'),\n lastName: getText(values, 'lastName'),\n email: getText(values, 'email'),\n department: getText(values, 'department'),\n position: getText(values, 'position'),\n status: getText(values, 'status') as Employee['status'],\n type: getText(values, 'type') as Employee['type'],\n salary: getNumber(values, 'salary'),\n startDate: getText(values, 'startDate'),\n location: getText(values, 'location'),\n phone: getText(values, 'phone'),\n performanceScore: getNumber(values, 'performanceScore'),\n managerId: editing?.managerId,\n avatar: editing?.avatar,\n };\n if (editing) {\n await updateEmployee(editing.id, payload);\n } else {\n await addEmployee(payload);\n }\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Employee Directory</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {employees.length} employees across {departments.length} departments\n </p>\n <PagePurpose className=\"mt-1\">Your complete employee directory — search, filter, and review everyone on the team along with their role, department, and status.</PagePurpose>\n </div>\n <Button size=\"sm\" onClick={() => form.openModal()}>\n <Plus className=\"h-4 w-4 mr-1\" />\n Add Employee\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-4\">\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total</CardTitle>\n <Users className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{employees.length}</div>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active</CardTitle>\n <UserCheck className=\"h-4 w-4 text-status-success-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{activeCount}</div>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">On Leave</CardTitle>\n <Users className=\"h-4 w-4 text-status-warning-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{onLeaveCount}</div>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Avg Rating</CardTitle>\n <Star className=\"h-4 w-4 text-status-warning-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{avgRating}</div>\n </CardContent>\n </GlassCard>\n </div>\n\n <div className=\"flex gap-3\">\n <div className=\"relative flex-1 max-w-sm\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\" />\n <Input\n placeholder=\"Search employees...\"\n className=\"pl-9\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </div>\n <div className=\"flex gap-1\">\n <Button\n variant={filterDept === 'all' ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => setFilterDept('all')}\n >\n All\n </Button>\n {departments.slice(0, 5).map((dept) => (\n <Button\n key={dept}\n variant={filterDept === dept ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => setFilterDept(dept)}\n >\n {dept}\n </Button>\n ))}\n </div>\n </div>\n\n <Card>\n <CardContent className=\"p-0\">\n <div className=\"grid grid-cols-8 gap-2 text-xs font-medium text-text-secondary border-b p-4\">\n <span>Name</span>\n <span>Position</span>\n <span>Department</span>\n <span>Location</span>\n <span className=\"text-right\">Salary</span>\n <span className=\"text-center\">Rating</span>\n <span className=\"text-center\">Status</span>\n <span className=\"text-right\">Actions</span>\n </div>\n {filtered.map((emp) => (\n <div\n key={emp.id}\n className=\"grid grid-cols-8 gap-2 py-3 px-4 border-b last:border-0 text-sm hover:bg-bg-sunken/50\"\n >\n <div>\n <p className=\"font-medium\">\n {emp.firstName} {emp.lastName}\n </p>\n <p className=\"text-xs text-text-secondary\">{emp.email}</p>\n </div>\n <span className=\"text-text-secondary\">{emp.position}</span>\n <span>{emp.department}</span>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <MapPin className=\"h-3 w-3\" />\n <span className=\"truncate text-xs\">{emp.location}</span>\n </div>\n <span className=\"text-right\">${emp.salary.toLocaleString()}</span>\n <div className=\"flex items-center justify-center gap-1\">\n <Star className=\"h-3 w-3 text-status-warning-text\" />\n <span>{emp.performanceScore}</span>\n </div>\n <div className=\"text-center\">\n <Badge\n variant={\n emp.status === 'active'\n ? 'default'\n : emp.status === 'on_leave'\n ? 'secondary'\n : 'destructive'\n }\n className=\"text-[10px]\"\n >\n {emp.status.replace('_', ' ')}\n </Badge>\n </div>\n <div className=\"flex items-center justify-end gap-1\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-8 w-8 p-0\"\n aria-label={`Edit ${emp.firstName} ${emp.lastName}`}\n onClick={() => form.openModal(emp)}\n >\n <Pencil className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-8 w-8 p-0\"\n aria-label={`Delete ${emp.firstName} ${emp.lastName}`}\n onClick={() => setDeleting(emp)}\n >\n <Trash2 className=\"h-4 w-4 text-status-error-text\" />\n </Button>\n </div>\n </div>\n ))}\n {filtered.length === 0 && (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-people\"\n title=\"No employees match\"\n description=\"Try a different search term or department filter.\"\n />\n </div>\n )}\n </CardContent>\n </Card>\n\n <FormModal\n open={form.open}\n onOpenChange={form.onOpenChange}\n title={editing ? 'Edit employee' : 'Add employee'}\n description={\n editing\n ? 'Update this team member’s profile details.'\n : 'Add a new team member to your directory.'\n }\n fields={EMPLOYEE_FIELDS}\n initialValues={editing ? toFormValues(editing) : undefined}\n submitLabel={editing ? 'Save changes' : 'Add employee'}\n onSubmit={handleSubmit}\n />\n\n <ConfirmDialog\n open={deleting !== null}\n onOpenChange={(open) => {\n if (!open) {\n setDeleting(null);\n }\n }}\n title=\"Delete employee?\"\n description={\n deleting\n ? `${deleting.firstName} ${deleting.lastName} will be removed from the directory. This cannot be undone.`\n : undefined\n }\n confirmLabel=\"Delete\"\n destructive\n onConfirm={async () => {\n if (deleting) {\n await removeEmployee(deleting.id);\n setDeleting(null);\n }\n }}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AA6BA,IAAM,IAAiC;CACrC;EAAE,MAAM;EAAa,OAAO;EAAc,MAAM;EAAQ,UAAU;EAAM;CACxE;EAAE,MAAM;EAAY,OAAO;EAAa,MAAM;EAAQ,UAAU;EAAM;CACtE;EAAE,MAAM;EAAS,OAAO;EAAS,MAAM;EAAS,UAAU;EAAM,SAAS;EAAG;CAC5E;EAAE,MAAM;EAAY,OAAO;EAAY,MAAM;EAAQ,UAAU;EAAM;CACrE;EAAE,MAAM;EAAc,OAAO;EAAc,MAAM;EAAQ,UAAU;EAAM;CACzE;EAAE,MAAM;EAAY,OAAO;EAAY,MAAM;EAAQ,UAAU;EAAM;CACrE;EAAE,MAAM;EAAS,OAAO;EAAS,MAAM;EAAQ,UAAU;EAAM;CAC/D;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,UAAU;EACV,SAAS;GACP;IAAE,OAAO;IAAa,OAAO;IAAa;GAC1C;IAAE,OAAO;IAAa,OAAO;IAAa;GAC1C;IAAE,OAAO;IAAY,OAAO;IAAY;G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