@burdenoff/microfe-crewfoundry 2026.704.6 → 2026.704.7
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/CrewFoundryRoutes.js +51 -43
- package/dist/crewfoundry/CrewFoundryRoutes.js.map +1 -1
- package/dist/crewfoundry/components/forms/formValues.js +5 -2
- package/dist/crewfoundry/components/forms/formValues.js.map +1 -1
- package/dist/crewfoundry/components/viz/AllocationBar.js +68 -0
- package/dist/crewfoundry/components/viz/AllocationBar.js.map +1 -0
- package/dist/crewfoundry/components/viz/AreaChart.js +102 -0
- package/dist/crewfoundry/components/viz/AreaChart.js.map +1 -0
- package/dist/crewfoundry/components/viz/AvatarStack.js +36 -0
- package/dist/crewfoundry/components/viz/AvatarStack.js.map +1 -0
- package/dist/crewfoundry/components/viz/BarChart.js +83 -0
- package/dist/crewfoundry/components/viz/BarChart.js.map +1 -0
- package/dist/crewfoundry/components/viz/CertificateCard.js +118 -0
- package/dist/crewfoundry/components/viz/CertificateCard.js.map +1 -0
- package/dist/crewfoundry/components/viz/DonutChart.js +109 -0
- package/dist/crewfoundry/components/viz/DonutChart.js.map +1 -0
- package/dist/crewfoundry/components/viz/HBarFunnel.js +54 -0
- package/dist/crewfoundry/components/viz/HBarFunnel.js.map +1 -0
- package/dist/crewfoundry/components/viz/Heatmap.js +91 -0
- package/dist/crewfoundry/components/viz/Heatmap.js.map +1 -0
- package/dist/crewfoundry/components/viz/KanbanBoard.js +50 -0
- package/dist/crewfoundry/components/viz/KanbanBoard.js.map +1 -0
- package/dist/crewfoundry/components/viz/LineChart.js +123 -0
- package/dist/crewfoundry/components/viz/LineChart.js.map +1 -0
- package/dist/crewfoundry/components/viz/OrgTree.js +83 -0
- package/dist/crewfoundry/components/viz/OrgTree.js.map +1 -0
- package/dist/crewfoundry/components/viz/PathSteps.js +68 -0
- package/dist/crewfoundry/components/viz/PathSteps.js.map +1 -0
- package/dist/crewfoundry/components/viz/ProgressRing.js +68 -0
- package/dist/crewfoundry/components/viz/ProgressRing.js.map +1 -0
- package/dist/crewfoundry/components/viz/RatingStars.js +51 -0
- package/dist/crewfoundry/components/viz/RatingStars.js.map +1 -0
- package/dist/crewfoundry/components/viz/SegmentedTabs.js +69 -0
- package/dist/crewfoundry/components/viz/SegmentedTabs.js.map +1 -0
- package/dist/crewfoundry/components/viz/SkillBar.js +3 -0
- package/dist/crewfoundry/components/viz/Sparkline.js +74 -0
- package/dist/crewfoundry/components/viz/Sparkline.js.map +1 -0
- package/dist/crewfoundry/components/viz/StatCard.js +60 -0
- package/dist/crewfoundry/components/viz/StatCard.js.map +1 -0
- package/dist/crewfoundry/components/viz/StepProgress.js +3 -0
- package/dist/crewfoundry/components/viz/Timeline.js +66 -0
- package/dist/crewfoundry/components/viz/Timeline.js.map +1 -0
- package/dist/crewfoundry/components/viz/index.js +23 -0
- package/dist/crewfoundry/components/viz/lib/Avatar.js +30 -0
- package/dist/crewfoundry/components/viz/lib/Avatar.js.map +1 -0
- package/dist/crewfoundry/components/viz/lib/CartesianFrame.js +119 -0
- package/dist/crewfoundry/components/viz/lib/CartesianFrame.js.map +1 -0
- package/dist/crewfoundry/components/viz/lib/ResponsiveSvg.js +35 -0
- package/dist/crewfoundry/components/viz/lib/ResponsiveSvg.js.map +1 -0
- package/dist/crewfoundry/components/viz/lib/format.js +21 -0
- package/dist/crewfoundry/components/viz/lib/format.js.map +1 -0
- package/dist/crewfoundry/components/viz/lib/geometry.js +69 -0
- package/dist/crewfoundry/components/viz/lib/geometry.js.map +1 -0
- package/dist/crewfoundry/components/viz/lib/hooks.js +39 -0
- package/dist/crewfoundry/components/viz/lib/hooks.js.map +1 -0
- package/dist/crewfoundry/components/viz/lib/palette.js +27 -0
- package/dist/crewfoundry/components/viz/lib/palette.js.map +1 -0
- package/dist/crewfoundry/lib/analytics.js +323 -0
- package/dist/crewfoundry/lib/analytics.js.map +1 -0
- package/dist/crewfoundry/lib/companyFinance.js +16 -0
- package/dist/crewfoundry/lib/companyFinance.js.map +1 -0
- package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js +226 -283
- package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js +107 -120
- package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +122 -162
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +121 -158
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +316 -211
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js +75 -27
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +167 -165
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +168 -109
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +401 -290
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +84 -75
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +368 -174
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js +236 -201
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +369 -196
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +269 -270
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobsPagePage.js +210 -110
- package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +216 -178
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js +385 -0
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js.map +1 -0
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js +189 -130
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +397 -241
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +262 -147
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +345 -167
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js +98 -24
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +1 -1
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +289 -108
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js +221 -114
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +134 -135
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +148 -97
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js +264 -157
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js +85 -93
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +211 -122
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +94 -54
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js +289 -140
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +169 -79
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +296 -125
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsResourcingPagePage.js +187 -0
- package/dist/crewfoundry/pages/ProjectsResourcingPagePage.js.map +1 -0
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +140 -78
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js +93 -43
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +250 -98
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
- package/dist/crewfoundry/utils/cn.js +10 -0
- package/dist/crewfoundry/utils/cn.js.map +1 -0
- package/dist/crewfoundry/utils/courseProgress.js +46 -0
- package/dist/crewfoundry/utils/courseProgress.js.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1716 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
2
|
import { formatEnumLabel as t } from "../utils/formatEnumLabel.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
3
|
+
import { StatCard as n } from "../components/viz/StatCard.js";
|
|
4
|
+
import { AvatarStack as r } from "../components/viz/AvatarStack.js";
|
|
5
|
+
import "../components/viz/index.js";
|
|
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 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";
|
|
7
11
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
8
|
-
import { Badge as v, Button as y, Card as b, CardContent as x, CardDescription as
|
|
9
|
-
import { usePagination as
|
|
10
|
-
import { useGlobalUi as
|
|
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";
|
|
11
15
|
//#region src/crewfoundry/pages/HrPayrollPagePage.tsx
|
|
12
|
-
var
|
|
16
|
+
var ue = [
|
|
13
17
|
{
|
|
14
18
|
label: "Draft",
|
|
15
19
|
value: "draft"
|
|
@@ -30,18 +34,49 @@ var N = [
|
|
|
30
34
|
label: "Failed",
|
|
31
35
|
value: "failed"
|
|
32
36
|
}
|
|
33
|
-
]
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
], D = [
|
|
38
|
+
"January",
|
|
39
|
+
"February",
|
|
40
|
+
"March",
|
|
41
|
+
"April",
|
|
42
|
+
"May",
|
|
43
|
+
"June",
|
|
44
|
+
"July",
|
|
45
|
+
"August",
|
|
46
|
+
"September",
|
|
47
|
+
"October",
|
|
48
|
+
"November",
|
|
49
|
+
"December"
|
|
50
|
+
], O = [
|
|
51
|
+
"Jan",
|
|
52
|
+
"Feb",
|
|
53
|
+
"Mar",
|
|
54
|
+
"Apr",
|
|
55
|
+
"May",
|
|
56
|
+
"Jun",
|
|
57
|
+
"Jul",
|
|
58
|
+
"Aug",
|
|
59
|
+
"Sep",
|
|
60
|
+
"Oct",
|
|
61
|
+
"Nov",
|
|
62
|
+
"Dec"
|
|
63
|
+
], de = (e) => {
|
|
64
|
+
let [t, n] = e.split(" "), r = D.findIndex((e) => e.toLowerCase() === t?.toLowerCase()), i = Number(n);
|
|
65
|
+
if (r === -1 || Number.isNaN(i)) return "—";
|
|
66
|
+
let a = (r + 1) % 12, o = r === 11 ? i + 1 : i;
|
|
67
|
+
return `${O[a]} 1, ${o}`;
|
|
68
|
+
};
|
|
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) => ({
|
|
36
71
|
label: `${e.firstName} ${e.lastName}`,
|
|
37
72
|
value: e.id
|
|
38
|
-
})), [
|
|
73
|
+
})), [O]), pe = u(() => [
|
|
39
74
|
{
|
|
40
75
|
name: "employeeId",
|
|
41
76
|
label: "Employee",
|
|
42
77
|
type: "select",
|
|
43
78
|
required: !0,
|
|
44
|
-
options:
|
|
79
|
+
options: G,
|
|
45
80
|
colSpan: 2
|
|
46
81
|
},
|
|
47
82
|
{
|
|
@@ -84,18 +119,65 @@ function P() {
|
|
|
84
119
|
name: "status",
|
|
85
120
|
label: "Status",
|
|
86
121
|
type: "select",
|
|
87
|
-
options:
|
|
122
|
+
options: ue
|
|
88
123
|
}
|
|
89
|
-
], [
|
|
90
|
-
|
|
91
|
-
},
|
|
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 () => {
|
|
127
|
+
let e = K.filter((e) => e.status !== "paid");
|
|
128
|
+
z(!0);
|
|
129
|
+
let t = 0;
|
|
130
|
+
try {
|
|
131
|
+
for (let n of e) await A(n.id, {
|
|
132
|
+
status: "paid",
|
|
133
|
+
payDate: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
|
|
134
|
+
}), t += 1;
|
|
135
|
+
j(`Pay run complete — ${t} record${t === 1 ? "" : "s"} paid`, "success");
|
|
136
|
+
} catch (e) {
|
|
137
|
+
j(e instanceof Error ? e.message : "Payroll run failed partway through", "error");
|
|
138
|
+
} finally {
|
|
139
|
+
z(!1), L(!1);
|
|
140
|
+
}
|
|
141
|
+
}, _e = () => {
|
|
142
|
+
if (K.length === 0) {
|
|
143
|
+
j("No records to export for this period", "info");
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
let e = [
|
|
147
|
+
"Employee",
|
|
148
|
+
"Department",
|
|
149
|
+
"Period",
|
|
150
|
+
"Gross",
|
|
151
|
+
"Deductions",
|
|
152
|
+
"Net",
|
|
153
|
+
"Status"
|
|
154
|
+
], t = (e) => `"${e.replace(/"/g, "\"\"")}"`, n = K.map((e) => [
|
|
155
|
+
e.employeeName,
|
|
156
|
+
e.department,
|
|
157
|
+
e.period,
|
|
158
|
+
String(e.grossPay),
|
|
159
|
+
String(e.deductions),
|
|
160
|
+
String(e.netPay),
|
|
161
|
+
e.status
|
|
162
|
+
].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 = [
|
|
92
165
|
{
|
|
93
166
|
key: "employee",
|
|
94
167
|
header: "Employee",
|
|
95
168
|
priority: "primary",
|
|
96
|
-
cell: (e) => /* @__PURE__ */
|
|
97
|
-
className: "
|
|
98
|
-
children:
|
|
169
|
+
cell: (e) => /* @__PURE__ */ _("div", {
|
|
170
|
+
className: "flex items-center gap-2.5",
|
|
171
|
+
children: [/* @__PURE__ */ g(r, {
|
|
172
|
+
people: [{
|
|
173
|
+
name: e.employeeName,
|
|
174
|
+
avatarUrl: fe.get(e.employeeId)?.avatar
|
|
175
|
+
}],
|
|
176
|
+
size: 32
|
|
177
|
+
}), /* @__PURE__ */ g("span", {
|
|
178
|
+
className: "font-medium",
|
|
179
|
+
children: e.employeeName
|
|
180
|
+
})]
|
|
99
181
|
})
|
|
100
182
|
},
|
|
101
183
|
{
|
|
@@ -154,34 +236,34 @@ function P() {
|
|
|
154
236
|
variant: "ghost",
|
|
155
237
|
size: "sm",
|
|
156
238
|
className: "h-6 px-2 text-[10px]",
|
|
157
|
-
onClick: () =>
|
|
239
|
+
onClick: () => be(e),
|
|
158
240
|
children: "Mark paid"
|
|
159
241
|
})]
|
|
160
242
|
})
|
|
161
243
|
}
|
|
162
|
-
],
|
|
163
|
-
let t =
|
|
164
|
-
await
|
|
165
|
-
id:
|
|
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(),
|
|
166
248
|
employeeId: t,
|
|
167
249
|
employeeName: n ? `${n.firstName} ${n.lastName}` : "",
|
|
168
250
|
department: n?.department ?? "",
|
|
169
|
-
period:
|
|
251
|
+
period: c(e, "period"),
|
|
170
252
|
grossPay: r,
|
|
171
|
-
deductions:
|
|
172
|
-
netPay:
|
|
173
|
-
status:
|
|
174
|
-
payDate:
|
|
175
|
-
paymentMethod:
|
|
253
|
+
deductions: i,
|
|
254
|
+
netPay: a > 0 ? a : Math.max(r - i, 0),
|
|
255
|
+
status: c(e, "status") || "draft",
|
|
256
|
+
payDate: c(e, "payDate"),
|
|
257
|
+
paymentMethod: c(e, "paymentMethod")
|
|
176
258
|
});
|
|
177
|
-
},
|
|
259
|
+
}, be = async (e) => {
|
|
178
260
|
try {
|
|
179
|
-
await
|
|
261
|
+
await A(e.id, {
|
|
180
262
|
status: "paid",
|
|
181
263
|
payDate: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
|
|
182
264
|
});
|
|
183
265
|
} catch (e) {
|
|
184
|
-
|
|
266
|
+
j(e instanceof Error ? e.message : "Unable to update payroll record", "error");
|
|
185
267
|
}
|
|
186
268
|
};
|
|
187
269
|
return /* @__PURE__ */ _("div", {
|
|
@@ -192,148 +274,171 @@ function P() {
|
|
|
192
274
|
children: [/* @__PURE__ */ _("div", { children: [
|
|
193
275
|
/* @__PURE__ */ g("h1", {
|
|
194
276
|
className: "text-2xl font-semibold",
|
|
195
|
-
children: /* @__PURE__ */ g(
|
|
277
|
+
children: /* @__PURE__ */ g(ae, { children: "Payroll" })
|
|
196
278
|
}),
|
|
197
279
|
/* @__PURE__ */ g("p", {
|
|
198
280
|
className: "text-sm text-text-secondary",
|
|
199
|
-
children: "Process and manage employee payroll"
|
|
281
|
+
children: W ? `${W} pay run` : "Process and manage employee payroll"
|
|
200
282
|
}),
|
|
201
|
-
/* @__PURE__ */ g(
|
|
283
|
+
/* @__PURE__ */ g(oe, {
|
|
202
284
|
className: "mt-1",
|
|
203
285
|
children: "Run and review payroll — track salaries, deductions, and pay runs so your team gets paid accurately and on time."
|
|
204
286
|
})
|
|
205
287
|
] }), /* @__PURE__ */ _("div", {
|
|
206
288
|
className: "flex gap-2",
|
|
207
|
-
children: [
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
"
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
289
|
+
children: [
|
|
290
|
+
/* @__PURE__ */ _(y, {
|
|
291
|
+
variant: "outline",
|
|
292
|
+
size: "sm",
|
|
293
|
+
onClick: _e,
|
|
294
|
+
children: [/* @__PURE__ */ g(ne, { className: "h-4 w-4 mr-1" }), "Export"]
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ _(y, {
|
|
297
|
+
variant: "outline",
|
|
298
|
+
size: "sm",
|
|
299
|
+
onClick: () => F.openModal(),
|
|
300
|
+
children: [/* @__PURE__ */ g(p, { className: "h-4 w-4 mr-1" }), "Add Record"]
|
|
301
|
+
}),
|
|
302
|
+
/* @__PURE__ */ _(y, {
|
|
303
|
+
size: "sm",
|
|
304
|
+
onClick: () => L(!0),
|
|
305
|
+
disabled: $ || K.length === 0,
|
|
306
|
+
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
|
+
})
|
|
309
|
+
]
|
|
227
310
|
})]
|
|
228
311
|
}),
|
|
229
312
|
/* @__PURE__ */ _("div", {
|
|
230
313
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
|
|
231
314
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
className: "
|
|
236
|
-
children: [/* @__PURE__ */ _(C, {
|
|
237
|
-
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
238
|
-
children: [/* @__PURE__ */ g(w, {
|
|
239
|
-
className: "text-sm font-medium",
|
|
240
|
-
children: "Gross Payroll"
|
|
241
|
-
}), /* @__PURE__ */ g(d, { className: "h-4 w-4 text-text-secondary" })]
|
|
242
|
-
}), /* @__PURE__ */ _(x, { children: [/* @__PURE__ */ _("div", {
|
|
243
|
-
className: "text-2xl font-bold tabular-nums",
|
|
244
|
-
children: ["$", Y.toLocaleString()]
|
|
245
|
-
}), /* @__PURE__ */ g("p", {
|
|
246
|
-
className: "text-xs text-text-secondary",
|
|
247
|
-
children: z
|
|
248
|
-
})] })]
|
|
315
|
+
/* @__PURE__ */ g(n, {
|
|
316
|
+
label: "Total Payroll",
|
|
317
|
+
value: `$${q.toLocaleString()}`,
|
|
318
|
+
icon: /* @__PURE__ */ g(te, { className: "h-4 w-4" })
|
|
249
319
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
255
|
-
children: [/* @__PURE__ */ g(w, {
|
|
256
|
-
className: "text-sm font-medium",
|
|
257
|
-
children: "Net Payroll"
|
|
258
|
-
}), /* @__PURE__ */ g(m, { className: "h-4 w-4 text-text-secondary" })]
|
|
259
|
-
}), /* @__PURE__ */ _(x, { children: [/* @__PURE__ */ _("div", {
|
|
260
|
-
className: "text-2xl font-bold tabular-nums",
|
|
261
|
-
children: ["$", X.toLocaleString()]
|
|
262
|
-
}), /* @__PURE__ */ g("p", {
|
|
263
|
-
className: "text-xs text-text-secondary",
|
|
264
|
-
children: "After deductions"
|
|
265
|
-
})] })]
|
|
320
|
+
/* @__PURE__ */ g(n, {
|
|
321
|
+
label: "Employees Paid",
|
|
322
|
+
value: X,
|
|
323
|
+
icon: /* @__PURE__ */ g(f, { className: "h-4 w-4" })
|
|
266
324
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
272
|
-
children: [/* @__PURE__ */ g(w, {
|
|
273
|
-
className: "text-sm font-medium",
|
|
274
|
-
children: "Paid"
|
|
275
|
-
}), /* @__PURE__ */ g(l, { className: "h-4 w-4 text-status-success-text" })]
|
|
276
|
-
}), /* @__PURE__ */ _(x, { children: [/* @__PURE__ */ g("div", {
|
|
277
|
-
className: "text-2xl font-bold tabular-nums",
|
|
278
|
-
children: Q
|
|
279
|
-
}), /* @__PURE__ */ g("p", {
|
|
280
|
-
className: "text-xs text-text-secondary",
|
|
281
|
-
children: "employees paid"
|
|
282
|
-
})] })]
|
|
325
|
+
/* @__PURE__ */ g(n, {
|
|
326
|
+
label: "Pending",
|
|
327
|
+
value: Z,
|
|
328
|
+
icon: /* @__PURE__ */ g(m, { className: "h-4 w-4" })
|
|
283
329
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
289
|
-
children: [/* @__PURE__ */ g(w, {
|
|
290
|
-
className: "text-sm font-medium",
|
|
291
|
-
children: "Processing"
|
|
292
|
-
}), /* @__PURE__ */ g(u, { className: "h-4 w-4 text-status-warning-text" })]
|
|
293
|
-
}), /* @__PURE__ */ _(x, { children: [/* @__PURE__ */ g("div", {
|
|
294
|
-
className: "text-2xl font-bold tabular-nums",
|
|
295
|
-
children: $
|
|
296
|
-
}), /* @__PURE__ */ g("p", {
|
|
297
|
-
className: "text-xs text-text-secondary",
|
|
298
|
-
children: "in progress"
|
|
299
|
-
})] })]
|
|
330
|
+
/* @__PURE__ */ g(n, {
|
|
331
|
+
label: "Next Run",
|
|
332
|
+
value: W ? de(W) : "—",
|
|
333
|
+
icon: /* @__PURE__ */ g(ee, { className: "h-4 w-4" })
|
|
300
334
|
})
|
|
301
335
|
]
|
|
302
336
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
337
|
+
K.length > 0 && /* @__PURE__ */ _(w, {
|
|
338
|
+
treatment: "glass",
|
|
339
|
+
glow: !0,
|
|
340
|
+
className: "border-border-seam",
|
|
341
|
+
children: [/* @__PURE__ */ _(S, {
|
|
342
|
+
className: "flex flex-row items-center justify-between space-y-0",
|
|
343
|
+
children: [/* @__PURE__ */ g(C, {
|
|
344
|
+
className: "text-base",
|
|
345
|
+
children: "Current pay run"
|
|
346
|
+
}), /* @__PURE__ */ _(v, {
|
|
347
|
+
variant: $ ? "default" : "secondary",
|
|
348
|
+
className: "flex items-center gap-1",
|
|
349
|
+
children: [/* @__PURE__ */ g(f, { className: "h-3 w-3" }), $ ? "Completed" : "Processing"]
|
|
350
|
+
})]
|
|
351
|
+
}), /* @__PURE__ */ _(x, {
|
|
352
|
+
className: "space-y-4",
|
|
353
|
+
children: [/* @__PURE__ */ _("div", {
|
|
354
|
+
className: "grid gap-4 sm:grid-cols-4",
|
|
355
|
+
children: [
|
|
356
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
357
|
+
className: "text-xs text-text-secondary",
|
|
358
|
+
children: "Period"
|
|
359
|
+
}), /* @__PURE__ */ g("p", {
|
|
360
|
+
className: "text-sm font-semibold",
|
|
361
|
+
children: W
|
|
362
|
+
})] }),
|
|
363
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
364
|
+
className: "text-xs text-text-secondary",
|
|
365
|
+
children: "Gross Total"
|
|
366
|
+
}), /* @__PURE__ */ _("p", {
|
|
367
|
+
className: "text-sm font-semibold tabular-nums",
|
|
368
|
+
children: ["$", q.toLocaleString()]
|
|
369
|
+
})] }),
|
|
370
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
371
|
+
className: "text-xs text-text-secondary",
|
|
372
|
+
children: "Deductions"
|
|
373
|
+
}), /* @__PURE__ */ _("p", {
|
|
374
|
+
className: "text-sm font-semibold tabular-nums text-status-error-text",
|
|
375
|
+
children: ["-$", Y.toLocaleString()]
|
|
376
|
+
})] }),
|
|
377
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
378
|
+
className: "text-xs text-text-secondary",
|
|
379
|
+
children: "Net Total"
|
|
380
|
+
}), /* @__PURE__ */ _("p", {
|
|
381
|
+
className: "text-sm font-semibold tabular-nums",
|
|
382
|
+
children: ["$", J.toLocaleString()]
|
|
383
|
+
})] })
|
|
384
|
+
]
|
|
385
|
+
}), /* @__PURE__ */ _("div", {
|
|
386
|
+
className: "space-y-1",
|
|
387
|
+
children: [/* @__PURE__ */ _("div", {
|
|
388
|
+
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
389
|
+
children: [/* @__PURE__ */ _("span", { children: [
|
|
390
|
+
X,
|
|
391
|
+
" of ",
|
|
392
|
+
K.length,
|
|
393
|
+
" paid"
|
|
394
|
+
] }), /* @__PURE__ */ _("span", {
|
|
395
|
+
className: "font-medium text-text-primary tabular-nums",
|
|
396
|
+
children: [Q, "%"]
|
|
397
|
+
})]
|
|
398
|
+
}), /* @__PURE__ */ g("div", {
|
|
399
|
+
className: "h-2 overflow-hidden rounded-full bg-bg-sunken",
|
|
400
|
+
children: /* @__PURE__ */ g("div", {
|
|
401
|
+
className: "h-2 rounded-full bg-status-success-text transition-all duration-500",
|
|
402
|
+
style: { width: `${Q}%` }
|
|
403
|
+
})
|
|
404
|
+
})]
|
|
405
|
+
})]
|
|
406
|
+
})]
|
|
407
|
+
}),
|
|
408
|
+
M.length > 1 && /* @__PURE__ */ g("div", {
|
|
304
409
|
className: "flex flex-wrap gap-2",
|
|
305
|
-
children:
|
|
306
|
-
variant:
|
|
410
|
+
children: M.map((e) => /* @__PURE__ */ g(y, {
|
|
411
|
+
variant: W === e ? "default" : "outline",
|
|
307
412
|
size: "sm",
|
|
308
|
-
onClick: () =>
|
|
413
|
+
onClick: () => he(e),
|
|
309
414
|
children: e
|
|
310
415
|
}, e))
|
|
311
416
|
}),
|
|
312
|
-
/* @__PURE__ */ _(b, { children: [/* @__PURE__ */ _(
|
|
417
|
+
/* @__PURE__ */ _(b, { children: [/* @__PURE__ */ _(S, { children: [/* @__PURE__ */ g(C, { children: "Payroll Records" }), /* @__PURE__ */ _(ie, { children: ["Individual employee payroll details for ", W] })] }), /* @__PURE__ */ _(x, {
|
|
313
418
|
className: "space-y-4",
|
|
314
419
|
children: [
|
|
315
|
-
/* @__PURE__ */ g(
|
|
316
|
-
data:
|
|
420
|
+
/* @__PURE__ */ g(E, {
|
|
421
|
+
data: me,
|
|
317
422
|
rowKey: (e) => e.id,
|
|
318
|
-
columns:
|
|
423
|
+
columns: ve,
|
|
319
424
|
emptyState: /* @__PURE__ */ _("p", {
|
|
320
425
|
className: "py-6 text-center text-sm text-text-secondary",
|
|
321
426
|
children: [
|
|
322
427
|
"No payroll records for ",
|
|
323
|
-
|
|
428
|
+
W || "this period",
|
|
324
429
|
"."
|
|
325
430
|
]
|
|
326
431
|
})
|
|
327
432
|
}),
|
|
328
|
-
|
|
329
|
-
page:
|
|
330
|
-
pageSize:
|
|
331
|
-
totalItems:
|
|
332
|
-
onPageChange:
|
|
433
|
+
K.length > V && /* @__PURE__ */ g(T, {
|
|
434
|
+
page: B,
|
|
435
|
+
pageSize: V,
|
|
436
|
+
totalItems: K.length,
|
|
437
|
+
onPageChange: U
|
|
333
438
|
}),
|
|
334
|
-
|
|
439
|
+
K.length > 0 && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(se, {}), /* @__PURE__ */ _("div", {
|
|
335
440
|
className: "flex flex-wrap items-center justify-between gap-4 text-sm font-semibold",
|
|
336
|
-
children: [/* @__PURE__ */ _("span", { children: ["Total for ",
|
|
441
|
+
children: [/* @__PURE__ */ _("span", { children: ["Total for ", W] }), /* @__PURE__ */ _("div", {
|
|
337
442
|
className: "flex flex-wrap gap-x-6 gap-y-1",
|
|
338
443
|
children: [
|
|
339
444
|
/* @__PURE__ */ _("span", { children: [
|
|
@@ -342,7 +447,7 @@ function P() {
|
|
|
342
447
|
children: "Gross "
|
|
343
448
|
}),
|
|
344
449
|
"$",
|
|
345
|
-
|
|
450
|
+
q.toLocaleString()
|
|
346
451
|
] }),
|
|
347
452
|
/* @__PURE__ */ _("span", {
|
|
348
453
|
className: "text-status-error-text",
|
|
@@ -352,7 +457,7 @@ function P() {
|
|
|
352
457
|
children: "Deductions "
|
|
353
458
|
}),
|
|
354
459
|
"-$",
|
|
355
|
-
|
|
460
|
+
Y.toLocaleString()
|
|
356
461
|
]
|
|
357
462
|
}),
|
|
358
463
|
/* @__PURE__ */ _("span", { children: [
|
|
@@ -361,26 +466,36 @@ function P() {
|
|
|
361
466
|
children: "Net "
|
|
362
467
|
}),
|
|
363
468
|
"$",
|
|
364
|
-
|
|
469
|
+
J.toLocaleString()
|
|
365
470
|
] })
|
|
366
471
|
]
|
|
367
472
|
})]
|
|
368
473
|
})] })
|
|
369
474
|
]
|
|
370
475
|
})] }),
|
|
371
|
-
/* @__PURE__ */ g(
|
|
372
|
-
open:
|
|
373
|
-
onOpenChange:
|
|
476
|
+
/* @__PURE__ */ g(i, {
|
|
477
|
+
open: F.open,
|
|
478
|
+
onOpenChange: F.onOpenChange,
|
|
374
479
|
title: "Add payroll record",
|
|
375
480
|
description: "Create a payroll entry for a team member.",
|
|
376
|
-
fields:
|
|
481
|
+
fields: pe,
|
|
377
482
|
submitLabel: "Add record",
|
|
378
|
-
onSubmit:
|
|
483
|
+
onSubmit: ye
|
|
484
|
+
}),
|
|
485
|
+
/* @__PURE__ */ g(o, {
|
|
486
|
+
open: I,
|
|
487
|
+
onOpenChange: (e) => {
|
|
488
|
+
!e && !R && L(!1);
|
|
489
|
+
},
|
|
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
|
|
379
494
|
})
|
|
380
495
|
]
|
|
381
496
|
});
|
|
382
497
|
}
|
|
383
498
|
//#endregion
|
|
384
|
-
export {
|
|
499
|
+
export { k as HrPayrollPagePage };
|
|
385
500
|
|
|
386
501
|
//# sourceMappingURL=HrPayrollPagePage.js.map
|