@burdenoff/microfe-crewfoundry 2026.1029.2 → 2026.1030.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 (47) hide show
  1. package/dist/crewfoundry/components/EmployeeSkillsPanel.d.ts +12 -0
  2. package/dist/crewfoundry/components/EmployeeSkillsPanel.d.ts.map +1 -0
  3. package/dist/crewfoundry/components/EmployeeSkillsPanel.js +168 -0
  4. package/dist/crewfoundry/components/EmployeeSkillsPanel.js.map +1 -0
  5. package/dist/crewfoundry/lib/useFocusedRecordParam.d.ts +51 -0
  6. package/dist/crewfoundry/lib/useFocusedRecordParam.d.ts.map +1 -0
  7. package/dist/crewfoundry/lib/useFocusedRecordParam.js +38 -0
  8. package/dist/crewfoundry/lib/useFocusedRecordParam.js.map +1 -0
  9. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.d.ts.map +1 -1
  10. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +119 -112
  11. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
  12. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.d.ts.map +1 -1
  13. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +78 -71
  14. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
  15. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.d.ts.map +1 -1
  16. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +88 -81
  17. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
  18. package/dist/crewfoundry/pages/HiringCandidatesPagePage.d.ts.map +1 -1
  19. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +133 -126
  20. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
  21. package/dist/crewfoundry/pages/HiringInterviewsPagePage.d.ts.map +1 -1
  22. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +150 -143
  23. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
  24. package/dist/crewfoundry/pages/HrDepartmentsPagePage.d.ts.map +1 -1
  25. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +110 -103
  26. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
  27. package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.d.ts.map +1 -1
  28. package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js +124 -134
  29. package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js.map +1 -1
  30. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.d.ts.map +1 -1
  31. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +173 -162
  32. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
  33. package/dist/crewfoundry/pages/HrPayrollPagePage.d.ts.map +1 -1
  34. package/dist/crewfoundry/pages/HrPayrollPagePage.js +169 -158
  35. package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
  36. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.d.ts.map +1 -1
  37. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +179 -163
  38. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
  39. package/dist/crewfoundry/store/crewfoundryStore.d.ts +22 -0
  40. package/dist/crewfoundry/store/crewfoundryStore.d.ts.map +1 -1
  41. package/dist/crewfoundry/store/crewfoundryStore.js +158 -129
  42. package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
  43. package/dist/utils/pageContext.d.ts +43 -4
  44. package/dist/utils/pageContext.d.ts.map +1 -1
  45. package/dist/utils/pageContext.js +10 -3
  46. package/dist/utils/pageContext.js.map +1 -1
  47. package/package.json +3 -2
@@ -4,17 +4,18 @@ import { StatCard as n } from "../components/viz/StatCard.js";
4
4
  import { AvatarStack as r } from "../components/viz/AvatarStack.js";
5
5
  import "../components/viz/index.js";
6
6
  import { FormModal as i, useFormModal as a } from "../components/forms/FormModal.js";
7
- import { ConfirmDialog as o } from "../components/forms/ConfirmDialog.js";
8
- import { getNumber as s, getText as c, newClientId as ee } from "../components/forms/formValues.js";
9
- import { GlobalPayrollSection as te } from "../components/payroll/GlobalPayrollSection.js";
7
+ import { FOCUSED_CELL_CLASS as o, pageContaining as ee, useFocusedRecordParam as te } from "../lib/useFocusedRecordParam.js";
8
+ import { ConfirmDialog as ne } from "../components/forms/ConfirmDialog.js";
9
+ import { getNumber as s, getText as c, newClientId as re } from "../components/forms/formValues.js";
10
+ import { GlobalPayrollSection as ie } from "../components/payroll/GlobalPayrollSection.js";
10
11
  import { useMemo as l, useState as u } from "react";
11
- import { CalendarClock as ne, CheckCircle as d, DollarSign as re, Download as f, Play as p, Plus as m, Users as h } from "lucide-react";
12
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
13
- import { Badge as y, Button as b, Card as ie, CardContent as x, CardDescription as ae, CardHeader as S, CardTitle as C, GlassCard as oe, GradientText as se, PagePurpose as ce, Pagination as w, ResponsiveTable as T, Separator as le } from "@burdenoff/fe-libs/ui";
14
- import { usePagination as ue } from "@burdenoff/fe-libs/shared/hooks";
15
- import { useGlobalUi as de } from "@burdenoff/fe-libs/shared/providers/shell";
12
+ import { CalendarClock as ae, CheckCircle as d, DollarSign as f, Download as p, Play as oe, Plus as se, Users as ce } from "lucide-react";
13
+ import { Fragment as le, jsx as m, jsxs as h } from "react/jsx-runtime";
14
+ import { Badge as g, Button as _, Card as ue, CardContent as v, CardDescription as de, CardHeader as y, CardTitle as b, GlassCard as fe, GradientText as pe, PagePurpose as x, Pagination as S, ResponsiveTable as C, Separator as me } from "@burdenoff/fe-libs/ui";
15
+ import { usePagination as he } from "@burdenoff/fe-libs/shared/hooks";
16
+ import { useGlobalUi as w } from "@burdenoff/fe-libs/shared/providers/shell";
16
17
  //#region src/crewfoundry/pages/HrPayrollPagePage.tsx
17
- var fe = [
18
+ var ge = [
18
19
  {
19
20
  label: "Draft",
20
21
  value: "draft"
@@ -35,7 +36,7 @@ var fe = [
35
36
  label: "Failed",
36
37
  value: "failed"
37
38
  }
38
- ], E = [
39
+ ], T = [
39
40
  "January",
40
41
  "February",
41
42
  "March",
@@ -48,7 +49,7 @@ var fe = [
48
49
  "October",
49
50
  "November",
50
51
  "December"
51
- ], D = [
52
+ ], E = [
52
53
  "Jan",
53
54
  "Feb",
54
55
  "Mar",
@@ -61,23 +62,23 @@ var fe = [
61
62
  "Oct",
62
63
  "Nov",
63
64
  "Dec"
64
- ], pe = (e) => {
65
- let [t, n] = e.split(" "), r = E.findIndex((e) => e.toLowerCase() === t?.toLowerCase()), i = Number(n);
65
+ ], _e = (e) => {
66
+ let [t, n] = e.split(" "), r = T.findIndex((e) => e.toLowerCase() === t?.toLowerCase()), i = Number(n);
66
67
  if (r === -1 || Number.isNaN(i)) return "—";
67
68
  let a = (r + 1) % 12, o = r === 11 ? i + 1 : i;
68
- return `${D[a]} 1, ${o}`;
69
+ return `${E[a]} 1, ${o}`;
69
70
  };
70
- function O() {
71
- let { payrollRecords: E, employees: D, addPayrollRecord: O, updatePayrollRecord: k } = e(), { showToast: A } = de(), j = l(() => [...new Set(E.map((e) => e.period))], [E]), [M, N] = u(""), P = a(), [F, I] = u(!1), [L, R] = u(!1), { page: z, pageSize: B, offset: V, setPage: H } = ue({ initialPageSize: 10 }), U = M || j[0] || "", W = l(() => new Map(D.map((e) => [e.id, e])), [D]), G = l(() => D.map((e) => ({
71
+ function D() {
72
+ let { payrollRecords: T, employees: E, addPayrollRecord: D, updatePayrollRecord: O } = e(), { showToast: k } = w(), A = l(() => [...new Set(T.map((e) => e.period))], [T]), [j, M] = u(""), N = a(), [P, F] = u(!1), [I, L] = u(!1), { page: ve, pageSize: R, offset: z, setPage: B } = he({ initialPageSize: 10 }), V = j || A[0] || "", ye = l(() => new Map(E.map((e) => [e.id, e])), [E]), H = l(() => E.map((e) => ({
72
73
  label: `${e.firstName} ${e.lastName}`,
73
74
  value: e.id
74
- })), [D]), me = l(() => [
75
+ })), [E]), be = l(() => [
75
76
  {
76
77
  name: "employeeId",
77
78
  label: "Employee",
78
79
  type: "select",
79
80
  required: !0,
80
- options: G,
81
+ options: H,
81
82
  colSpan: 2
82
83
  },
83
84
  {
@@ -120,28 +121,36 @@ function O() {
120
121
  name: "status",
121
122
  label: "Status",
122
123
  type: "select",
123
- options: fe
124
+ options: ge
124
125
  }
125
- ], [G]), K = E.filter((e) => e.period === U), q = K.reduce((e, t) => e + t.grossPay, 0), J = K.reduce((e, t) => e + t.netPay, 0), Y = K.reduce((e, t) => e + t.deductions, 0), X = K.filter((e) => e.status === "paid").length, Z = K.length - X, Q = K.length > 0 ? Math.round(X / K.length * 100) : 0, $ = K.length > 0 && Z === 0, he = K.slice(V, V + B), ge = (e) => {
126
- N(e), H(1);
127
- }, _e = async () => {
128
- let e = K.filter((e) => e.status !== "paid");
129
- R(!0);
126
+ ], [H]), U = T.filter((e) => e.period === V), W = U.reduce((e, t) => e + t.grossPay, 0), G = U.reduce((e, t) => e + t.netPay, 0), K = U.reduce((e, t) => e + t.deductions, 0), q = U.filter((e) => e.status === "paid").length, J = U.length - q, Y = U.length > 0 ? Math.round(q / U.length * 100) : 0, X = U.length > 0 && J === 0, xe = U.slice(z, z + R), [Z, Q] = u(null), $ = Z && U.some((e) => e.id === Z) ? Z : null;
127
+ te({
128
+ records: T,
129
+ activeId: $,
130
+ onRestore: (e) => {
131
+ Q(e.id), M(e.period), B(ee(T.filter((t) => t.period === e.period), e.id, R));
132
+ }
133
+ });
134
+ let Se = (e) => {
135
+ M(e), B(1);
136
+ }, Ce = async () => {
137
+ let e = U.filter((e) => e.status !== "paid");
138
+ L(!0);
130
139
  let t = 0;
131
140
  try {
132
- for (let n of e) await k(n.id, {
141
+ for (let n of e) await O(n.id, {
133
142
  status: "paid",
134
143
  payDate: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
135
144
  }), t += 1;
136
- A(`Pay run complete — ${t} record${t === 1 ? "" : "s"} paid`, "success");
145
+ k(`Pay run complete — ${t} record${t === 1 ? "" : "s"} paid`, "success");
137
146
  } catch (e) {
138
- A(e instanceof Error ? e.message : "Payroll run failed partway through", "error");
147
+ k(e instanceof Error ? e.message : "Payroll run failed partway through", "error");
139
148
  } finally {
140
- R(!1), I(!1);
149
+ L(!1), F(!1);
141
150
  }
142
- }, ve = () => {
143
- if (K.length === 0) {
144
- A("No records to export for this period", "info");
151
+ }, we = () => {
152
+ if (U.length === 0) {
153
+ k("No records to export for this period", "info");
145
154
  return;
146
155
  }
147
156
  let e = [
@@ -152,7 +161,7 @@ function O() {
152
161
  "Deductions",
153
162
  "Net",
154
163
  "Status"
155
- ], t = (e) => `"${e.replace(/"/g, "\"\"")}"`, n = K.map((e) => [
164
+ ], t = (e) => `"${e.replace(/"/g, "\"\"")}"`, n = U.map((e) => [
156
165
  e.employeeName,
157
166
  e.department,
158
167
  e.period,
@@ -161,21 +170,22 @@ function O() {
161
170
  String(e.netPay),
162
171
  e.status
163
172
  ].map(t).join(",")), r = [e.map(t).join(","), ...n].join("\n"), i = new Blob([r], { type: "text/csv;charset=utf-8;" }), a = URL.createObjectURL(i), o = document.createElement("a");
164
- o.href = a, o.download = `payroll-${U.replace(/\s+/g, "-").toLowerCase()}.csv`, document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(a), A("Payroll CSV exported", "success");
165
- }, ye = [
173
+ o.href = a, o.download = `payroll-${V.replace(/\s+/g, "-").toLowerCase()}.csv`, document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(a), k("Payroll CSV exported", "success");
174
+ }, Te = [
166
175
  {
167
176
  key: "employee",
168
177
  header: "Employee",
169
178
  priority: "primary",
170
- cell: (e) => /* @__PURE__ */ v("div", {
171
- className: "flex items-center gap-2.5",
172
- children: [/* @__PURE__ */ _(r, {
179
+ cell: (e) => /* @__PURE__ */ h("div", {
180
+ "aria-current": e.id === $ ? "true" : void 0,
181
+ className: `flex items-center gap-2.5 ${e.id === $ ? o : ""}`,
182
+ children: [/* @__PURE__ */ m(r, {
173
183
  people: [{
174
184
  name: e.employeeName,
175
- avatarUrl: W.get(e.employeeId)?.avatar
185
+ avatarUrl: ye.get(e.employeeId)?.avatar
176
186
  }],
177
187
  size: 32
178
- }), /* @__PURE__ */ _("span", {
188
+ }), /* @__PURE__ */ m("span", {
179
189
  className: "font-medium",
180
190
  children: e.employeeName
181
191
  })]
@@ -184,7 +194,7 @@ function O() {
184
194
  {
185
195
  key: "department",
186
196
  header: "Department",
187
- cell: (e) => /* @__PURE__ */ _("span", {
197
+ cell: (e) => /* @__PURE__ */ m("span", {
188
198
  className: "text-text-secondary",
189
199
  children: e.department
190
200
  })
@@ -194,14 +204,14 @@ function O() {
194
204
  header: "Gross Pay",
195
205
  headerClassName: "text-right",
196
206
  cellClassName: "md:text-right",
197
- cell: (e) => /* @__PURE__ */ v("span", { children: ["$", e.grossPay.toLocaleString()] })
207
+ cell: (e) => /* @__PURE__ */ h("span", { children: ["$", e.grossPay.toLocaleString()] })
198
208
  },
199
209
  {
200
210
  key: "deductions",
201
211
  header: "Deductions",
202
212
  headerClassName: "text-right",
203
213
  cellClassName: "md:text-right",
204
- cell: (e) => /* @__PURE__ */ v("span", {
214
+ cell: (e) => /* @__PURE__ */ h("span", {
205
215
  className: "text-status-error-text",
206
216
  children: ["-$", e.deductions.toLocaleString()]
207
217
  })
@@ -211,7 +221,7 @@ function O() {
211
221
  header: "Net Pay",
212
222
  headerClassName: "text-right",
213
223
  cellClassName: "md:text-right",
214
- cell: (e) => /* @__PURE__ */ v("span", {
224
+ cell: (e) => /* @__PURE__ */ h("span", {
215
225
  className: "font-medium",
216
226
  children: ["$", e.netPay.toLocaleString()]
217
227
  })
@@ -219,7 +229,7 @@ function O() {
219
229
  {
220
230
  key: "method",
221
231
  header: "Payment Method",
222
- cell: (e) => /* @__PURE__ */ _("span", {
232
+ cell: (e) => /* @__PURE__ */ m("span", {
223
233
  className: "text-text-secondary",
224
234
  children: e.paymentMethod
225
235
  })
@@ -227,25 +237,25 @@ function O() {
227
237
  {
228
238
  key: "status",
229
239
  header: "Status",
230
- cell: (e) => /* @__PURE__ */ v("div", {
240
+ cell: (e) => /* @__PURE__ */ h("div", {
231
241
  className: "flex items-center gap-2",
232
- children: [/* @__PURE__ */ _(y, {
242
+ children: [/* @__PURE__ */ m(g, {
233
243
  variant: e.status === "paid" ? "default" : e.status === "processing" ? "secondary" : "outline",
234
244
  className: "text-[10px]",
235
245
  children: t(e.status)
236
- }), e.status !== "paid" && /* @__PURE__ */ _(b, {
246
+ }), e.status !== "paid" && /* @__PURE__ */ m(_, {
237
247
  variant: "ghost",
238
248
  size: "sm",
239
249
  className: "h-6 px-2 text-[10px]",
240
- onClick: () => xe(e),
250
+ onClick: () => De(e),
241
251
  children: "Mark paid"
242
252
  })]
243
253
  })
244
254
  }
245
- ], be = async (e) => {
246
- let t = c(e, "employeeId"), n = D.find((e) => e.id === t), r = s(e, "grossPay"), i = s(e, "deductions"), a = s(e, "netPay");
247
- await O({
248
- id: ee(),
255
+ ], Ee = async (e) => {
256
+ let t = c(e, "employeeId"), n = E.find((e) => e.id === t), r = s(e, "grossPay"), i = s(e, "deductions"), a = s(e, "netPay");
257
+ await D({
258
+ id: re(),
249
259
  employeeId: t,
250
260
  employeeName: n ? `${n.firstName} ${n.lastName}` : "",
251
261
  department: n?.department ?? "",
@@ -257,247 +267,248 @@ function O() {
257
267
  payDate: c(e, "payDate"),
258
268
  paymentMethod: c(e, "paymentMethod")
259
269
  });
260
- }, xe = async (e) => {
270
+ }, De = async (e) => {
261
271
  try {
262
- await k(e.id, {
272
+ await O(e.id, {
263
273
  status: "paid",
264
274
  payDate: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
265
275
  });
266
276
  } catch (e) {
267
- A(e instanceof Error ? e.message : "Unable to update payroll record", "error");
277
+ k(e instanceof Error ? e.message : "Unable to update payroll record", "error");
268
278
  }
269
279
  };
270
- return /* @__PURE__ */ v("div", {
280
+ return /* @__PURE__ */ h("div", {
271
281
  className: "space-y-6 p-6",
272
282
  children: [
273
- /* @__PURE__ */ v("div", {
283
+ /* @__PURE__ */ h("div", {
274
284
  className: "flex items-center justify-between",
275
- children: [/* @__PURE__ */ v("div", { children: [
276
- /* @__PURE__ */ _("h1", {
285
+ children: [/* @__PURE__ */ h("div", { children: [
286
+ /* @__PURE__ */ m("h1", {
277
287
  className: "text-2xl font-semibold",
278
- children: /* @__PURE__ */ _(se, { children: "Payroll" })
288
+ children: /* @__PURE__ */ m(pe, { children: "Payroll" })
279
289
  }),
280
- /* @__PURE__ */ _("p", {
290
+ /* @__PURE__ */ m("p", {
281
291
  className: "text-sm text-text-secondary",
282
- children: U ? `${U} pay run` : "Process and manage employee payroll"
292
+ children: V ? `${V} pay run` : "Process and manage employee payroll"
283
293
  }),
284
- /* @__PURE__ */ _(ce, {
294
+ /* @__PURE__ */ m(x, {
285
295
  className: "mt-1",
286
296
  children: "Run and review payroll — track salaries, deductions, and pay runs so your team gets paid accurately and on time."
287
297
  })
288
- ] }), /* @__PURE__ */ v("div", {
298
+ ] }), /* @__PURE__ */ h("div", {
289
299
  className: "flex gap-2",
290
300
  children: [
291
- /* @__PURE__ */ v(b, {
301
+ /* @__PURE__ */ h(_, {
292
302
  variant: "outline",
293
303
  size: "sm",
294
- onClick: ve,
295
- children: [/* @__PURE__ */ _(f, { className: "h-4 w-4 mr-1" }), "Export"]
304
+ onClick: we,
305
+ children: [/* @__PURE__ */ m(p, { className: "h-4 w-4 mr-1" }), "Export"]
296
306
  }),
297
- /* @__PURE__ */ v(b, {
307
+ /* @__PURE__ */ h(_, {
298
308
  variant: "outline",
299
309
  size: "sm",
300
- onClick: () => P.openModal(),
301
- children: [/* @__PURE__ */ _(m, { className: "h-4 w-4 mr-1" }), "Add Record"]
310
+ onClick: () => N.openModal(),
311
+ children: [/* @__PURE__ */ m(se, { className: "h-4 w-4 mr-1" }), "Add Record"]
302
312
  }),
303
- /* @__PURE__ */ v(b, {
313
+ /* @__PURE__ */ h(_, {
304
314
  size: "sm",
305
- onClick: () => I(!0),
306
- disabled: $ || K.length === 0,
307
- title: $ ? "All records in this period are paid" : "Advance this period to paid",
308
- children: [/* @__PURE__ */ _(p, { className: "h-4 w-4 mr-1" }), "Run Payroll"]
315
+ onClick: () => F(!0),
316
+ disabled: X || U.length === 0,
317
+ title: X ? "All records in this period are paid" : "Advance this period to paid",
318
+ children: [/* @__PURE__ */ m(oe, { className: "h-4 w-4 mr-1" }), "Run Payroll"]
309
319
  })
310
320
  ]
311
321
  })]
312
322
  }),
313
- /* @__PURE__ */ v("div", {
323
+ /* @__PURE__ */ h("div", {
314
324
  className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
315
325
  children: [
316
- /* @__PURE__ */ _(n, {
326
+ /* @__PURE__ */ m(n, {
317
327
  label: "Total Payroll",
318
- value: `$${q.toLocaleString()}`,
319
- icon: /* @__PURE__ */ _(re, { className: "h-4 w-4" })
328
+ value: `$${W.toLocaleString()}`,
329
+ icon: /* @__PURE__ */ m(f, { className: "h-4 w-4" })
320
330
  }),
321
- /* @__PURE__ */ _(n, {
331
+ /* @__PURE__ */ m(n, {
322
332
  label: "Employees Paid",
323
- value: X,
324
- icon: /* @__PURE__ */ _(d, { className: "h-4 w-4" })
333
+ value: q,
334
+ icon: /* @__PURE__ */ m(d, { className: "h-4 w-4" })
325
335
  }),
326
- /* @__PURE__ */ _(n, {
336
+ /* @__PURE__ */ m(n, {
327
337
  label: "Pending",
328
- value: Z,
329
- icon: /* @__PURE__ */ _(h, { className: "h-4 w-4" })
338
+ value: J,
339
+ icon: /* @__PURE__ */ m(ce, { className: "h-4 w-4" })
330
340
  }),
331
- /* @__PURE__ */ _(n, {
341
+ /* @__PURE__ */ m(n, {
332
342
  label: "Next Run",
333
- value: U ? pe(U) : "—",
334
- icon: /* @__PURE__ */ _(ne, { className: "h-4 w-4" })
343
+ value: V ? _e(V) : "—",
344
+ icon: /* @__PURE__ */ m(ae, { className: "h-4 w-4" })
335
345
  })
336
346
  ]
337
347
  }),
338
- K.length > 0 && /* @__PURE__ */ v(oe, {
348
+ U.length > 0 && /* @__PURE__ */ h(fe, {
339
349
  treatment: "glass",
340
350
  glow: !0,
341
351
  className: "border-border-seam",
342
- children: [/* @__PURE__ */ v(S, {
352
+ children: [/* @__PURE__ */ h(y, {
343
353
  className: "flex flex-row items-center justify-between space-y-0",
344
- children: [/* @__PURE__ */ _(C, {
354
+ children: [/* @__PURE__ */ m(b, {
345
355
  className: "text-base",
346
356
  children: "Current pay run"
347
- }), /* @__PURE__ */ v(y, {
348
- variant: $ ? "default" : "secondary",
357
+ }), /* @__PURE__ */ h(g, {
358
+ variant: X ? "default" : "secondary",
349
359
  className: "flex items-center gap-1",
350
- children: [/* @__PURE__ */ _(d, { className: "h-3 w-3" }), $ ? "Completed" : "Processing"]
360
+ children: [/* @__PURE__ */ m(d, { className: "h-3 w-3" }), X ? "Completed" : "Processing"]
351
361
  })]
352
- }), /* @__PURE__ */ v(x, {
362
+ }), /* @__PURE__ */ h(v, {
353
363
  className: "space-y-4",
354
- children: [/* @__PURE__ */ v("div", {
364
+ children: [/* @__PURE__ */ h("div", {
355
365
  className: "grid gap-4 sm:grid-cols-4",
356
366
  children: [
357
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
367
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
358
368
  className: "text-xs text-text-secondary",
359
369
  children: "Period"
360
- }), /* @__PURE__ */ _("p", {
370
+ }), /* @__PURE__ */ m("p", {
361
371
  className: "text-sm font-semibold",
362
- children: U
372
+ children: V
363
373
  })] }),
364
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
374
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
365
375
  className: "text-xs text-text-secondary",
366
376
  children: "Gross Total"
367
- }), /* @__PURE__ */ v("p", {
377
+ }), /* @__PURE__ */ h("p", {
368
378
  className: "text-sm font-semibold tabular-nums",
369
- children: ["$", q.toLocaleString()]
379
+ children: ["$", W.toLocaleString()]
370
380
  })] }),
371
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
381
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
372
382
  className: "text-xs text-text-secondary",
373
383
  children: "Deductions"
374
- }), /* @__PURE__ */ v("p", {
384
+ }), /* @__PURE__ */ h("p", {
375
385
  className: "text-sm font-semibold tabular-nums text-status-error-text",
376
- children: ["-$", Y.toLocaleString()]
386
+ children: ["-$", K.toLocaleString()]
377
387
  })] }),
378
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
388
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
379
389
  className: "text-xs text-text-secondary",
380
390
  children: "Net Total"
381
- }), /* @__PURE__ */ v("p", {
391
+ }), /* @__PURE__ */ h("p", {
382
392
  className: "text-sm font-semibold tabular-nums",
383
- children: ["$", J.toLocaleString()]
393
+ children: ["$", G.toLocaleString()]
384
394
  })] })
385
395
  ]
386
- }), /* @__PURE__ */ v("div", {
396
+ }), /* @__PURE__ */ h("div", {
387
397
  className: "space-y-1",
388
- children: [/* @__PURE__ */ v("div", {
398
+ children: [/* @__PURE__ */ h("div", {
389
399
  className: "flex items-center justify-between text-xs text-text-secondary",
390
- children: [/* @__PURE__ */ v("span", { children: [
391
- X,
400
+ children: [/* @__PURE__ */ h("span", { children: [
401
+ q,
392
402
  " of ",
393
- K.length,
403
+ U.length,
394
404
  " paid"
395
- ] }), /* @__PURE__ */ v("span", {
405
+ ] }), /* @__PURE__ */ h("span", {
396
406
  className: "font-medium text-text-primary tabular-nums",
397
- children: [Q, "%"]
407
+ children: [Y, "%"]
398
408
  })]
399
- }), /* @__PURE__ */ _("div", {
409
+ }), /* @__PURE__ */ m("div", {
400
410
  className: "h-2 overflow-hidden rounded-full bg-bg-sunken",
401
- children: /* @__PURE__ */ _("div", {
411
+ children: /* @__PURE__ */ m("div", {
402
412
  className: "h-2 rounded-full bg-status-success-text transition-all duration-500",
403
- style: { width: `${Q}%` }
413
+ style: { width: `${Y}%` }
404
414
  })
405
415
  })]
406
416
  })]
407
417
  })]
408
418
  }),
409
- j.length > 1 && /* @__PURE__ */ _("div", {
419
+ A.length > 1 && /* @__PURE__ */ m("div", {
410
420
  className: "flex flex-wrap gap-2",
411
- children: j.map((e) => /* @__PURE__ */ _(b, {
412
- variant: U === e ? "default" : "outline",
421
+ children: A.map((e) => /* @__PURE__ */ m(_, {
422
+ variant: V === e ? "default" : "outline",
413
423
  size: "sm",
414
- onClick: () => ge(e),
424
+ onClick: () => Se(e),
415
425
  children: e
416
426
  }, e))
417
427
  }),
418
- /* @__PURE__ */ v(ie, { children: [/* @__PURE__ */ v(S, { children: [/* @__PURE__ */ _(C, { children: "Payroll Records" }), /* @__PURE__ */ v(ae, { children: ["Individual employee payroll details for ", U] })] }), /* @__PURE__ */ v(x, {
428
+ /* @__PURE__ */ h(ue, { children: [/* @__PURE__ */ h(y, { children: [/* @__PURE__ */ m(b, { children: "Payroll Records" }), /* @__PURE__ */ h(de, { children: ["Individual employee payroll details for ", V] })] }), /* @__PURE__ */ h(v, {
419
429
  className: "space-y-4",
420
430
  children: [
421
- /* @__PURE__ */ _(T, {
422
- data: he,
431
+ /* @__PURE__ */ m(C, {
432
+ data: xe,
423
433
  rowKey: (e) => e.id,
424
- columns: ye,
425
- emptyState: /* @__PURE__ */ v("p", {
434
+ columns: Te,
435
+ onRowClick: (e) => Q(e.id),
436
+ emptyState: /* @__PURE__ */ h("p", {
426
437
  className: "py-6 text-center text-sm text-text-secondary",
427
438
  children: [
428
439
  "No payroll records for ",
429
- U || "this period",
440
+ V || "this period",
430
441
  "."
431
442
  ]
432
443
  })
433
444
  }),
434
- K.length > B && /* @__PURE__ */ _(w, {
435
- page: z,
436
- pageSize: B,
437
- totalItems: K.length,
438
- onPageChange: H
445
+ U.length > R && /* @__PURE__ */ m(S, {
446
+ page: ve,
447
+ pageSize: R,
448
+ totalItems: U.length,
449
+ onPageChange: B
439
450
  }),
440
- K.length > 0 && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(le, {}), /* @__PURE__ */ v("div", {
451
+ U.length > 0 && /* @__PURE__ */ h(le, { children: [/* @__PURE__ */ m(me, {}), /* @__PURE__ */ h("div", {
441
452
  className: "flex flex-wrap items-center justify-between gap-4 text-sm font-semibold",
442
- children: [/* @__PURE__ */ v("span", { children: ["Total for ", U] }), /* @__PURE__ */ v("div", {
453
+ children: [/* @__PURE__ */ h("span", { children: ["Total for ", V] }), /* @__PURE__ */ h("div", {
443
454
  className: "flex flex-wrap gap-x-6 gap-y-1",
444
455
  children: [
445
- /* @__PURE__ */ v("span", { children: [
446
- /* @__PURE__ */ _("span", {
456
+ /* @__PURE__ */ h("span", { children: [
457
+ /* @__PURE__ */ m("span", {
447
458
  className: "text-text-secondary",
448
459
  children: "Gross "
449
460
  }),
450
461
  "$",
451
- q.toLocaleString()
462
+ W.toLocaleString()
452
463
  ] }),
453
- /* @__PURE__ */ v("span", {
464
+ /* @__PURE__ */ h("span", {
454
465
  className: "text-status-error-text",
455
466
  children: [
456
- /* @__PURE__ */ _("span", {
467
+ /* @__PURE__ */ m("span", {
457
468
  className: "text-text-secondary",
458
469
  children: "Deductions "
459
470
  }),
460
471
  "-$",
461
- Y.toLocaleString()
472
+ K.toLocaleString()
462
473
  ]
463
474
  }),
464
- /* @__PURE__ */ v("span", { children: [
465
- /* @__PURE__ */ _("span", {
475
+ /* @__PURE__ */ h("span", { children: [
476
+ /* @__PURE__ */ m("span", {
466
477
  className: "text-text-secondary",
467
478
  children: "Net "
468
479
  }),
469
480
  "$",
470
- J.toLocaleString()
481
+ G.toLocaleString()
471
482
  ] })
472
483
  ]
473
484
  })]
474
485
  })] })
475
486
  ]
476
487
  })] }),
477
- /* @__PURE__ */ _(te, {}),
478
- /* @__PURE__ */ _(i, {
479
- open: P.open,
480
- onOpenChange: P.onOpenChange,
488
+ /* @__PURE__ */ m(ie, {}),
489
+ /* @__PURE__ */ m(i, {
490
+ open: N.open,
491
+ onOpenChange: N.onOpenChange,
481
492
  title: "Add payroll record",
482
493
  description: "Create a payroll entry for a team member.",
483
- fields: me,
494
+ fields: be,
484
495
  submitLabel: "Add record",
485
- onSubmit: be
496
+ onSubmit: Ee
486
497
  }),
487
- /* @__PURE__ */ _(o, {
488
- open: F,
498
+ /* @__PURE__ */ m(ne, {
499
+ open: P,
489
500
  onOpenChange: (e) => {
490
- !e && !L && I(!1);
501
+ !e && !I && F(!1);
491
502
  },
492
- title: `Run payroll for ${U}?`,
493
- description: `This marks the ${Z} remaining record${Z === 1 ? "" : "s"} in ${U} as paid. This cannot be undone.`,
494
- confirmLabel: L ? "Processing…" : "Run payroll",
495
- onConfirm: _e
503
+ title: `Run payroll for ${V}?`,
504
+ description: `This marks the ${J} remaining record${J === 1 ? "" : "s"} in ${V} as paid. This cannot be undone.`,
505
+ confirmLabel: I ? "Processing…" : "Run payroll",
506
+ onConfirm: Ce
496
507
  })
497
508
  ]
498
509
  });
499
510
  }
500
511
  //#endregion
501
- export { O as HrPayrollPagePage };
512
+ export { D as HrPayrollPagePage };
502
513
 
503
514
  //# sourceMappingURL=HrPayrollPagePage.js.map