@burdenoff/microfe-crewfoundry 2026.723.2 → 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.
- package/dist/crewfoundry/components/payroll/GlobalPayrollSection.d.ts +2 -0
- package/dist/crewfoundry/components/payroll/GlobalPayrollSection.d.ts.map +1 -0
- package/dist/crewfoundry/components/payroll/GlobalPayrollSection.js +369 -0
- package/dist/crewfoundry/components/payroll/GlobalPayrollSection.js.map +1 -0
- package/dist/crewfoundry/components/viz/SkillBar.js +43 -3
- package/dist/crewfoundry/components/viz/SkillBar.js.map +1 -0
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +219 -122
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +136 -134
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.d.ts +87 -0
- package/dist/crewfoundry/store/crewfoundryStore.d.ts.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js +126 -49
- package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
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
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
64
|
-
let [t, n] = e.split(" "), r =
|
|
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 `${
|
|
68
|
+
return `${D[a]} 1, ${o}`;
|
|
68
69
|
};
|
|
69
|
-
function
|
|
70
|
-
let { payrollRecords:
|
|
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
|
-
})), [
|
|
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:
|
|
123
|
+
options: fe
|
|
123
124
|
}
|
|
124
|
-
], [G]), K =
|
|
125
|
-
|
|
126
|
-
},
|
|
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
|
-
|
|
129
|
+
R(!0);
|
|
129
130
|
let t = 0;
|
|
130
131
|
try {
|
|
131
|
-
for (let n of e) await
|
|
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
|
-
|
|
136
|
+
A(`Pay run complete — ${t} record${t === 1 ? "" : "s"} paid`, "success");
|
|
136
137
|
} catch (e) {
|
|
137
|
-
|
|
138
|
+
A(e instanceof Error ? e.message : "Payroll run failed partway through", "error");
|
|
138
139
|
} finally {
|
|
139
|
-
|
|
140
|
+
R(!1), I(!1);
|
|
140
141
|
}
|
|
141
|
-
},
|
|
142
|
+
}, ve = () => {
|
|
142
143
|
if (K.length === 0) {
|
|
143
|
-
|
|
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-${
|
|
164
|
-
},
|
|
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__ */
|
|
170
|
+
cell: (e) => /* @__PURE__ */ v("div", {
|
|
170
171
|
className: "flex items-center gap-2.5",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ _(r, {
|
|
172
173
|
people: [{
|
|
173
174
|
name: e.employeeName,
|
|
174
|
-
avatarUrl:
|
|
175
|
+
avatarUrl: W.get(e.employeeId)?.avatar
|
|
175
176
|
}],
|
|
176
177
|
size: 32
|
|
177
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
230
|
+
cell: (e) => /* @__PURE__ */ v("div", {
|
|
230
231
|
className: "flex items-center gap-2",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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: () =>
|
|
240
|
+
onClick: () => xe(e),
|
|
240
241
|
children: "Mark paid"
|
|
241
242
|
})]
|
|
242
243
|
})
|
|
243
244
|
}
|
|
244
|
-
],
|
|
245
|
-
let t = c(e, "employeeId"), n =
|
|
246
|
-
await
|
|
247
|
-
id:
|
|
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
|
-
},
|
|
260
|
+
}, xe = async (e) => {
|
|
260
261
|
try {
|
|
261
|
-
await
|
|
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
|
-
|
|
267
|
+
A(e instanceof Error ? e.message : "Unable to update payroll record", "error");
|
|
267
268
|
}
|
|
268
269
|
};
|
|
269
|
-
return /* @__PURE__ */
|
|
270
|
+
return /* @__PURE__ */ v("div", {
|
|
270
271
|
className: "space-y-6 p-6",
|
|
271
272
|
children: [
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ v("div", {
|
|
273
274
|
className: "flex items-center justify-between",
|
|
274
|
-
children: [/* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
275
|
+
children: [/* @__PURE__ */ v("div", { children: [
|
|
276
|
+
/* @__PURE__ */ _("h1", {
|
|
276
277
|
className: "text-2xl font-semibold",
|
|
277
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ _(se, { children: "Payroll" })
|
|
278
279
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ _("p", {
|
|
280
281
|
className: "text-sm text-text-secondary",
|
|
281
|
-
children:
|
|
282
|
+
children: U ? `${U} pay run` : "Process and manage employee payroll"
|
|
282
283
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
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__ */
|
|
288
|
+
] }), /* @__PURE__ */ v("div", {
|
|
288
289
|
className: "flex gap-2",
|
|
289
290
|
children: [
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ v(b, {
|
|
291
292
|
variant: "outline",
|
|
292
293
|
size: "sm",
|
|
293
|
-
onClick:
|
|
294
|
-
children: [/* @__PURE__ */
|
|
294
|
+
onClick: ve,
|
|
295
|
+
children: [/* @__PURE__ */ _(f, { className: "h-4 w-4 mr-1" }), "Export"]
|
|
295
296
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ v(b, {
|
|
297
298
|
variant: "outline",
|
|
298
299
|
size: "sm",
|
|
299
|
-
onClick: () =>
|
|
300
|
-
children: [/* @__PURE__ */
|
|
300
|
+
onClick: () => P.openModal(),
|
|
301
|
+
children: [/* @__PURE__ */ _(m, { className: "h-4 w-4 mr-1" }), "Add Record"]
|
|
301
302
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ v(b, {
|
|
303
304
|
size: "sm",
|
|
304
|
-
onClick: () =>
|
|
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__ */
|
|
308
|
+
children: [/* @__PURE__ */ _(p, { className: "h-4 w-4 mr-1" }), "Run Payroll"]
|
|
308
309
|
})
|
|
309
310
|
]
|
|
310
311
|
})]
|
|
311
312
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ v("div", {
|
|
313
314
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
|
|
314
315
|
children: [
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ _(n, {
|
|
316
317
|
label: "Total Payroll",
|
|
317
318
|
value: `$${q.toLocaleString()}`,
|
|
318
|
-
icon: /* @__PURE__ */
|
|
319
|
+
icon: /* @__PURE__ */ _(re, { className: "h-4 w-4" })
|
|
319
320
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ _(n, {
|
|
321
322
|
label: "Employees Paid",
|
|
322
323
|
value: X,
|
|
323
|
-
icon: /* @__PURE__ */
|
|
324
|
+
icon: /* @__PURE__ */ _(d, { className: "h-4 w-4" })
|
|
324
325
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ _(n, {
|
|
326
327
|
label: "Pending",
|
|
327
328
|
value: Z,
|
|
328
|
-
icon: /* @__PURE__ */
|
|
329
|
+
icon: /* @__PURE__ */ _(h, { className: "h-4 w-4" })
|
|
329
330
|
}),
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ _(n, {
|
|
331
332
|
label: "Next Run",
|
|
332
|
-
value:
|
|
333
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
338
|
+
K.length > 0 && /* @__PURE__ */ v(oe, {
|
|
338
339
|
treatment: "glass",
|
|
339
340
|
glow: !0,
|
|
340
341
|
className: "border-border-seam",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ v(S, {
|
|
342
343
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
344
|
+
children: [/* @__PURE__ */ _(C, {
|
|
344
345
|
className: "text-base",
|
|
345
346
|
children: "Current pay run"
|
|
346
|
-
}), /* @__PURE__ */
|
|
347
|
+
}), /* @__PURE__ */ v(y, {
|
|
347
348
|
variant: $ ? "default" : "secondary",
|
|
348
349
|
className: "flex items-center gap-1",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
350
|
+
children: [/* @__PURE__ */ _(d, { className: "h-3 w-3" }), $ ? "Completed" : "Processing"]
|
|
350
351
|
})]
|
|
351
|
-
}), /* @__PURE__ */
|
|
352
|
+
}), /* @__PURE__ */ v(x, {
|
|
352
353
|
className: "space-y-4",
|
|
353
|
-
children: [/* @__PURE__ */
|
|
354
|
+
children: [/* @__PURE__ */ v("div", {
|
|
354
355
|
className: "grid gap-4 sm:grid-cols-4",
|
|
355
356
|
children: [
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
357
358
|
className: "text-xs text-text-secondary",
|
|
358
359
|
children: "Period"
|
|
359
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ _("p", {
|
|
360
361
|
className: "text-sm font-semibold",
|
|
361
|
-
children:
|
|
362
|
+
children: U
|
|
362
363
|
})] }),
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
364
365
|
className: "text-xs text-text-secondary",
|
|
365
366
|
children: "Gross Total"
|
|
366
|
-
}), /* @__PURE__ */
|
|
367
|
+
}), /* @__PURE__ */ v("p", {
|
|
367
368
|
className: "text-sm font-semibold tabular-nums",
|
|
368
369
|
children: ["$", q.toLocaleString()]
|
|
369
370
|
})] }),
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
371
372
|
className: "text-xs text-text-secondary",
|
|
372
373
|
children: "Deductions"
|
|
373
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
378
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
378
379
|
className: "text-xs text-text-secondary",
|
|
379
380
|
children: "Net Total"
|
|
380
|
-
}), /* @__PURE__ */
|
|
381
|
+
}), /* @__PURE__ */ v("p", {
|
|
381
382
|
className: "text-sm font-semibold tabular-nums",
|
|
382
383
|
children: ["$", J.toLocaleString()]
|
|
383
384
|
})] })
|
|
384
385
|
]
|
|
385
|
-
}), /* @__PURE__ */
|
|
386
|
+
}), /* @__PURE__ */ v("div", {
|
|
386
387
|
className: "space-y-1",
|
|
387
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ v("div", {
|
|
388
389
|
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ v("span", { children: [
|
|
390
391
|
X,
|
|
391
392
|
" of ",
|
|
392
393
|
K.length,
|
|
393
394
|
" paid"
|
|
394
|
-
] }), /* @__PURE__ */
|
|
395
|
+
] }), /* @__PURE__ */ v("span", {
|
|
395
396
|
className: "font-medium text-text-primary tabular-nums",
|
|
396
397
|
children: [Q, "%"]
|
|
397
398
|
})]
|
|
398
|
-
}), /* @__PURE__ */
|
|
399
|
+
}), /* @__PURE__ */ _("div", {
|
|
399
400
|
className: "h-2 overflow-hidden rounded-full bg-bg-sunken",
|
|
400
|
-
children: /* @__PURE__ */
|
|
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
|
-
|
|
409
|
+
j.length > 1 && /* @__PURE__ */ _("div", {
|
|
409
410
|
className: "flex flex-wrap gap-2",
|
|
410
|
-
children:
|
|
411
|
-
variant:
|
|
411
|
+
children: j.map((e) => /* @__PURE__ */ _(b, {
|
|
412
|
+
variant: U === e ? "default" : "outline",
|
|
412
413
|
size: "sm",
|
|
413
|
-
onClick: () =>
|
|
414
|
+
onClick: () => ge(e),
|
|
414
415
|
children: e
|
|
415
416
|
}, e))
|
|
416
417
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
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__ */
|
|
421
|
-
data:
|
|
421
|
+
/* @__PURE__ */ _(T, {
|
|
422
|
+
data: he,
|
|
422
423
|
rowKey: (e) => e.id,
|
|
423
|
-
columns:
|
|
424
|
-
emptyState: /* @__PURE__ */
|
|
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
|
-
|
|
429
|
+
U || "this period",
|
|
429
430
|
"."
|
|
430
431
|
]
|
|
431
432
|
})
|
|
432
433
|
}),
|
|
433
|
-
K.length >
|
|
434
|
-
page:
|
|
435
|
-
pageSize:
|
|
434
|
+
K.length > B && /* @__PURE__ */ _(w, {
|
|
435
|
+
page: z,
|
|
436
|
+
pageSize: B,
|
|
436
437
|
totalItems: K.length,
|
|
437
|
-
onPageChange:
|
|
438
|
+
onPageChange: H
|
|
438
439
|
}),
|
|
439
|
-
K.length > 0 && /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
445
|
-
/* @__PURE__ */
|
|
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__ */
|
|
453
|
+
/* @__PURE__ */ v("span", {
|
|
453
454
|
className: "text-status-error-text",
|
|
454
455
|
children: [
|
|
455
|
-
/* @__PURE__ */
|
|
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__ */
|
|
464
|
-
/* @__PURE__ */
|
|
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__ */
|
|
477
|
-
|
|
478
|
-
|
|
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:
|
|
483
|
+
fields: me,
|
|
482
484
|
submitLabel: "Add record",
|
|
483
|
-
onSubmit:
|
|
485
|
+
onSubmit: be
|
|
484
486
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
-
open:
|
|
487
|
+
/* @__PURE__ */ _(o, {
|
|
488
|
+
open: F,
|
|
487
489
|
onOpenChange: (e) => {
|
|
488
|
-
!e && !
|
|
490
|
+
!e && !L && I(!1);
|
|
489
491
|
},
|
|
490
|
-
title: `Run payroll for ${
|
|
491
|
-
description: `This marks the ${Z} remaining record${Z === 1 ? "" : "s"} in ${
|
|
492
|
-
confirmLabel:
|
|
493
|
-
onConfirm:
|
|
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 {
|
|
501
|
+
export { O as HrPayrollPagePage };
|
|
500
502
|
|
|
501
503
|
//# sourceMappingURL=HrPayrollPagePage.js.map
|