@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.
- package/dist/crewfoundry/components/EmployeeSkillsPanel.d.ts +12 -0
- package/dist/crewfoundry/components/EmployeeSkillsPanel.d.ts.map +1 -0
- package/dist/crewfoundry/components/EmployeeSkillsPanel.js +168 -0
- package/dist/crewfoundry/components/EmployeeSkillsPanel.js.map +1 -0
- package/dist/crewfoundry/lib/useFocusedRecordParam.d.ts +51 -0
- package/dist/crewfoundry/lib/useFocusedRecordParam.d.ts.map +1 -0
- package/dist/crewfoundry/lib/useFocusedRecordParam.js +38 -0
- package/dist/crewfoundry/lib/useFocusedRecordParam.js.map +1 -0
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +119 -112
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +78 -71
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +88 -81
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +133 -126
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +150 -143
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +110 -103
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js +124 -134
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +173 -162
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +169 -158
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +179 -163
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.d.ts +22 -0
- package/dist/crewfoundry/store/crewfoundryStore.d.ts.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js +158 -129
- package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
- package/dist/utils/pageContext.d.ts +43 -4
- package/dist/utils/pageContext.d.ts.map +1 -1
- package/dist/utils/pageContext.js +10 -3
- package/dist/utils/pageContext.js.map +1 -1
- 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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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
|
|
12
|
-
import { Fragment as
|
|
13
|
-
import { Badge as
|
|
14
|
-
import { usePagination as
|
|
15
|
-
import { useGlobalUi as
|
|
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
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
65
|
-
let [t, n] = e.split(" "), r =
|
|
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 `${
|
|
69
|
+
return `${E[a]} 1, ${o}`;
|
|
69
70
|
};
|
|
70
|
-
function
|
|
71
|
-
let { payrollRecords:
|
|
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
|
-
})), [
|
|
75
|
+
})), [E]), be = l(() => [
|
|
75
76
|
{
|
|
76
77
|
name: "employeeId",
|
|
77
78
|
label: "Employee",
|
|
78
79
|
type: "select",
|
|
79
80
|
required: !0,
|
|
80
|
-
options:
|
|
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:
|
|
124
|
+
options: ge
|
|
124
125
|
}
|
|
125
|
-
], [
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
|
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
|
-
|
|
145
|
+
k(`Pay run complete — ${t} record${t === 1 ? "" : "s"} paid`, "success");
|
|
137
146
|
} catch (e) {
|
|
138
|
-
|
|
147
|
+
k(e instanceof Error ? e.message : "Payroll run failed partway through", "error");
|
|
139
148
|
} finally {
|
|
140
|
-
|
|
149
|
+
L(!1), F(!1);
|
|
141
150
|
}
|
|
142
|
-
},
|
|
143
|
-
if (
|
|
144
|
-
|
|
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 =
|
|
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-${
|
|
165
|
-
},
|
|
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__ */
|
|
171
|
-
|
|
172
|
-
|
|
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:
|
|
185
|
+
avatarUrl: ye.get(e.employeeId)?.avatar
|
|
176
186
|
}],
|
|
177
187
|
size: 32
|
|
178
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
240
|
+
cell: (e) => /* @__PURE__ */ h("div", {
|
|
231
241
|
className: "flex items-center gap-2",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
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__ */ _
|
|
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: () =>
|
|
250
|
+
onClick: () => De(e),
|
|
241
251
|
children: "Mark paid"
|
|
242
252
|
})]
|
|
243
253
|
})
|
|
244
254
|
}
|
|
245
|
-
],
|
|
246
|
-
let t = c(e, "employeeId"), n =
|
|
247
|
-
await
|
|
248
|
-
id:
|
|
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
|
-
},
|
|
270
|
+
}, De = async (e) => {
|
|
261
271
|
try {
|
|
262
|
-
await
|
|
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
|
-
|
|
277
|
+
k(e instanceof Error ? e.message : "Unable to update payroll record", "error");
|
|
268
278
|
}
|
|
269
279
|
};
|
|
270
|
-
return /* @__PURE__ */
|
|
280
|
+
return /* @__PURE__ */ h("div", {
|
|
271
281
|
className: "space-y-6 p-6",
|
|
272
282
|
children: [
|
|
273
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ h("div", {
|
|
274
284
|
className: "flex items-center justify-between",
|
|
275
|
-
children: [/* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ h("div", { children: [
|
|
286
|
+
/* @__PURE__ */ m("h1", {
|
|
277
287
|
className: "text-2xl font-semibold",
|
|
278
|
-
children: /* @__PURE__ */
|
|
288
|
+
children: /* @__PURE__ */ m(pe, { children: "Payroll" })
|
|
279
289
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ m("p", {
|
|
281
291
|
className: "text-sm text-text-secondary",
|
|
282
|
-
children:
|
|
292
|
+
children: V ? `${V} pay run` : "Process and manage employee payroll"
|
|
283
293
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
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__ */
|
|
298
|
+
] }), /* @__PURE__ */ h("div", {
|
|
289
299
|
className: "flex gap-2",
|
|
290
300
|
children: [
|
|
291
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ h(_, {
|
|
292
302
|
variant: "outline",
|
|
293
303
|
size: "sm",
|
|
294
|
-
onClick:
|
|
295
|
-
children: [/* @__PURE__ */
|
|
304
|
+
onClick: we,
|
|
305
|
+
children: [/* @__PURE__ */ m(p, { className: "h-4 w-4 mr-1" }), "Export"]
|
|
296
306
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ h(_, {
|
|
298
308
|
variant: "outline",
|
|
299
309
|
size: "sm",
|
|
300
|
-
onClick: () =>
|
|
301
|
-
children: [/* @__PURE__ */
|
|
310
|
+
onClick: () => N.openModal(),
|
|
311
|
+
children: [/* @__PURE__ */ m(se, { className: "h-4 w-4 mr-1" }), "Add Record"]
|
|
302
312
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ h(_, {
|
|
304
314
|
size: "sm",
|
|
305
|
-
onClick: () =>
|
|
306
|
-
disabled:
|
|
307
|
-
title:
|
|
308
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
323
|
+
/* @__PURE__ */ h("div", {
|
|
314
324
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
|
|
315
325
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ m(n, {
|
|
317
327
|
label: "Total Payroll",
|
|
318
|
-
value: `$${
|
|
319
|
-
icon: /* @__PURE__ */
|
|
328
|
+
value: `$${W.toLocaleString()}`,
|
|
329
|
+
icon: /* @__PURE__ */ m(f, { className: "h-4 w-4" })
|
|
320
330
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ m(n, {
|
|
322
332
|
label: "Employees Paid",
|
|
323
|
-
value:
|
|
324
|
-
icon: /* @__PURE__ */
|
|
333
|
+
value: q,
|
|
334
|
+
icon: /* @__PURE__ */ m(d, { className: "h-4 w-4" })
|
|
325
335
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ m(n, {
|
|
327
337
|
label: "Pending",
|
|
328
|
-
value:
|
|
329
|
-
icon: /* @__PURE__ */
|
|
338
|
+
value: J,
|
|
339
|
+
icon: /* @__PURE__ */ m(ce, { className: "h-4 w-4" })
|
|
330
340
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ m(n, {
|
|
332
342
|
label: "Next Run",
|
|
333
|
-
value:
|
|
334
|
-
icon: /* @__PURE__ */
|
|
343
|
+
value: V ? _e(V) : "—",
|
|
344
|
+
icon: /* @__PURE__ */ m(ae, { className: "h-4 w-4" })
|
|
335
345
|
})
|
|
336
346
|
]
|
|
337
347
|
}),
|
|
338
|
-
|
|
348
|
+
U.length > 0 && /* @__PURE__ */ h(fe, {
|
|
339
349
|
treatment: "glass",
|
|
340
350
|
glow: !0,
|
|
341
351
|
className: "border-border-seam",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
352
|
+
children: [/* @__PURE__ */ h(y, {
|
|
343
353
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
354
|
+
children: [/* @__PURE__ */ m(b, {
|
|
345
355
|
className: "text-base",
|
|
346
356
|
children: "Current pay run"
|
|
347
|
-
}), /* @__PURE__ */
|
|
348
|
-
variant:
|
|
357
|
+
}), /* @__PURE__ */ h(g, {
|
|
358
|
+
variant: X ? "default" : "secondary",
|
|
349
359
|
className: "flex items-center gap-1",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ m(d, { className: "h-3 w-3" }), X ? "Completed" : "Processing"]
|
|
351
361
|
})]
|
|
352
|
-
}), /* @__PURE__ */ v
|
|
362
|
+
}), /* @__PURE__ */ h(v, {
|
|
353
363
|
className: "space-y-4",
|
|
354
|
-
children: [/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ h("div", {
|
|
355
365
|
className: "grid gap-4 sm:grid-cols-4",
|
|
356
366
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
358
368
|
className: "text-xs text-text-secondary",
|
|
359
369
|
children: "Period"
|
|
360
|
-
}), /* @__PURE__ */
|
|
370
|
+
}), /* @__PURE__ */ m("p", {
|
|
361
371
|
className: "text-sm font-semibold",
|
|
362
|
-
children:
|
|
372
|
+
children: V
|
|
363
373
|
})] }),
|
|
364
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
365
375
|
className: "text-xs text-text-secondary",
|
|
366
376
|
children: "Gross Total"
|
|
367
|
-
}), /* @__PURE__ */
|
|
377
|
+
}), /* @__PURE__ */ h("p", {
|
|
368
378
|
className: "text-sm font-semibold tabular-nums",
|
|
369
|
-
children: ["$",
|
|
379
|
+
children: ["$", W.toLocaleString()]
|
|
370
380
|
})] }),
|
|
371
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
372
382
|
className: "text-xs text-text-secondary",
|
|
373
383
|
children: "Deductions"
|
|
374
|
-
}), /* @__PURE__ */
|
|
384
|
+
}), /* @__PURE__ */ h("p", {
|
|
375
385
|
className: "text-sm font-semibold tabular-nums text-status-error-text",
|
|
376
|
-
children: ["-$",
|
|
386
|
+
children: ["-$", K.toLocaleString()]
|
|
377
387
|
})] }),
|
|
378
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
379
389
|
className: "text-xs text-text-secondary",
|
|
380
390
|
children: "Net Total"
|
|
381
|
-
}), /* @__PURE__ */
|
|
391
|
+
}), /* @__PURE__ */ h("p", {
|
|
382
392
|
className: "text-sm font-semibold tabular-nums",
|
|
383
|
-
children: ["$",
|
|
393
|
+
children: ["$", G.toLocaleString()]
|
|
384
394
|
})] })
|
|
385
395
|
]
|
|
386
|
-
}), /* @__PURE__ */
|
|
396
|
+
}), /* @__PURE__ */ h("div", {
|
|
387
397
|
className: "space-y-1",
|
|
388
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ h("div", {
|
|
389
399
|
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
390
|
-
children: [/* @__PURE__ */
|
|
391
|
-
|
|
400
|
+
children: [/* @__PURE__ */ h("span", { children: [
|
|
401
|
+
q,
|
|
392
402
|
" of ",
|
|
393
|
-
|
|
403
|
+
U.length,
|
|
394
404
|
" paid"
|
|
395
|
-
] }), /* @__PURE__ */
|
|
405
|
+
] }), /* @__PURE__ */ h("span", {
|
|
396
406
|
className: "font-medium text-text-primary tabular-nums",
|
|
397
|
-
children: [
|
|
407
|
+
children: [Y, "%"]
|
|
398
408
|
})]
|
|
399
|
-
}), /* @__PURE__ */
|
|
409
|
+
}), /* @__PURE__ */ m("div", {
|
|
400
410
|
className: "h-2 overflow-hidden rounded-full bg-bg-sunken",
|
|
401
|
-
children: /* @__PURE__ */
|
|
411
|
+
children: /* @__PURE__ */ m("div", {
|
|
402
412
|
className: "h-2 rounded-full bg-status-success-text transition-all duration-500",
|
|
403
|
-
style: { width: `${
|
|
413
|
+
style: { width: `${Y}%` }
|
|
404
414
|
})
|
|
405
415
|
})]
|
|
406
416
|
})]
|
|
407
417
|
})]
|
|
408
418
|
}),
|
|
409
|
-
|
|
419
|
+
A.length > 1 && /* @__PURE__ */ m("div", {
|
|
410
420
|
className: "flex flex-wrap gap-2",
|
|
411
|
-
children:
|
|
412
|
-
variant:
|
|
421
|
+
children: A.map((e) => /* @__PURE__ */ m(_, {
|
|
422
|
+
variant: V === e ? "default" : "outline",
|
|
413
423
|
size: "sm",
|
|
414
|
-
onClick: () =>
|
|
424
|
+
onClick: () => Se(e),
|
|
415
425
|
children: e
|
|
416
426
|
}, e))
|
|
417
427
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
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__ */
|
|
422
|
-
data:
|
|
431
|
+
/* @__PURE__ */ m(C, {
|
|
432
|
+
data: xe,
|
|
423
433
|
rowKey: (e) => e.id,
|
|
424
|
-
columns:
|
|
425
|
-
|
|
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
|
-
|
|
440
|
+
V || "this period",
|
|
430
441
|
"."
|
|
431
442
|
]
|
|
432
443
|
})
|
|
433
444
|
}),
|
|
434
|
-
|
|
435
|
-
page:
|
|
436
|
-
pageSize:
|
|
437
|
-
totalItems:
|
|
438
|
-
onPageChange:
|
|
445
|
+
U.length > R && /* @__PURE__ */ m(S, {
|
|
446
|
+
page: ve,
|
|
447
|
+
pageSize: R,
|
|
448
|
+
totalItems: U.length,
|
|
449
|
+
onPageChange: B
|
|
439
450
|
}),
|
|
440
|
-
|
|
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__ */
|
|
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__ */
|
|
446
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ h("span", { children: [
|
|
457
|
+
/* @__PURE__ */ m("span", {
|
|
447
458
|
className: "text-text-secondary",
|
|
448
459
|
children: "Gross "
|
|
449
460
|
}),
|
|
450
461
|
"$",
|
|
451
|
-
|
|
462
|
+
W.toLocaleString()
|
|
452
463
|
] }),
|
|
453
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ h("span", {
|
|
454
465
|
className: "text-status-error-text",
|
|
455
466
|
children: [
|
|
456
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ m("span", {
|
|
457
468
|
className: "text-text-secondary",
|
|
458
469
|
children: "Deductions "
|
|
459
470
|
}),
|
|
460
471
|
"-$",
|
|
461
|
-
|
|
472
|
+
K.toLocaleString()
|
|
462
473
|
]
|
|
463
474
|
}),
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ h("span", { children: [
|
|
476
|
+
/* @__PURE__ */ m("span", {
|
|
466
477
|
className: "text-text-secondary",
|
|
467
478
|
children: "Net "
|
|
468
479
|
}),
|
|
469
480
|
"$",
|
|
470
|
-
|
|
481
|
+
G.toLocaleString()
|
|
471
482
|
] })
|
|
472
483
|
]
|
|
473
484
|
})]
|
|
474
485
|
})] })
|
|
475
486
|
]
|
|
476
487
|
})] }),
|
|
477
|
-
/* @__PURE__ */
|
|
478
|
-
/* @__PURE__ */
|
|
479
|
-
open:
|
|
480
|
-
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:
|
|
494
|
+
fields: be,
|
|
484
495
|
submitLabel: "Add record",
|
|
485
|
-
onSubmit:
|
|
496
|
+
onSubmit: Ee
|
|
486
497
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
open:
|
|
498
|
+
/* @__PURE__ */ m(ne, {
|
|
499
|
+
open: P,
|
|
489
500
|
onOpenChange: (e) => {
|
|
490
|
-
!e && !
|
|
501
|
+
!e && !I && F(!1);
|
|
491
502
|
},
|
|
492
|
-
title: `Run payroll for ${
|
|
493
|
-
description: `This marks the ${
|
|
494
|
-
confirmLabel:
|
|
495
|
-
onConfirm:
|
|
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 {
|
|
512
|
+
export { D as HrPayrollPagePage };
|
|
502
513
|
|
|
503
514
|
//# sourceMappingURL=HrPayrollPagePage.js.map
|