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