@burdenoff/microfe-crewfoundry 2026.625.1 → 2026.625.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/pages/AdminAdminPagePage.js +37 -29
- package/dist/crewfoundry/pages/AdminAdminPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js +50 -42
- package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js +39 -31
- package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +52 -44
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +46 -38
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +28 -15
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js +30 -22
- package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsDirectoryPagePage.js +87 -69
- package/dist/crewfoundry/pages/CommunicationsDirectoryPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js +99 -80
- package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js +86 -67
- package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js +31 -15
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js +37 -29
- package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +29 -21
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js +25 -17
- package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js +42 -35
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +80 -62
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js +41 -33
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +142 -108
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +177 -136
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardExecutiveDashboardPage.js +44 -36
- package/dist/crewfoundry/pages/DashboardExecutiveDashboardPage.js.map +1 -1
- package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js +49 -38
- package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +26 -18
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +112 -93
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js +53 -46
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +31 -23
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +129 -90
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobsPagePage.js +96 -85
- package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +26 -18
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js +47 -35
- package/dist/crewfoundry/pages/HrEmployeesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +33 -25
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +36 -28
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +27 -19
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js +27 -19
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js +93 -75
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +111 -70
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +65 -53
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js +35 -19
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js +33 -25
- package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPagePage.js +26 -18
- package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +80 -55
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +33 -17
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js +31 -23
- package/dist/crewfoundry/pages/LearningMyLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js +29 -21
- package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +35 -27
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +147 -112
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js +31 -27
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +31 -23
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +104 -85
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js +75 -56
- package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +78 -60
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js +133 -92
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js +93 -52
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js +28 -20
- package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +84 -65
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js +25 -17
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +58 -40
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js +41 -33
- package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js +36 -29
- package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js +103 -72
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +43 -27
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js +28 -20
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +103 -62
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js +83 -64
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js +185 -144
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +40 -24
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,9 +2,9 @@ import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { Activity as n, Database as r, Globe as i, Lock as a, Monitor as o, Server as s, Shield as c, Users as l, Wrench as u } from "lucide-react";
|
|
4
4
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
5
|
-
import { Badge as p, Button as m, Card as h, CardContent as g, CardDescription as _, CardHeader as v, CardTitle as y, GlassCard as b, GradientText as x } from "@burdenoff/fe-libs/ui";
|
|
5
|
+
import { Badge as p, Button as m, Card as h, CardContent as g, CardDescription as _, CardHeader as v, CardTitle as y, GlassCard as b, GradientText as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/crewfoundry/pages/AdminAdminPagePage.tsx
|
|
7
|
-
var
|
|
7
|
+
var C = (e) => {
|
|
8
8
|
let t = new Date(e);
|
|
9
9
|
return Number.isNaN(t.getTime()) ? "Unknown" : t.toLocaleString("en-US", {
|
|
10
10
|
year: "numeric",
|
|
@@ -14,9 +14,9 @@ var S = (e) => {
|
|
|
14
14
|
minute: "2-digit"
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
|
-
function
|
|
18
|
-
let { employees:
|
|
19
|
-
let e =
|
|
17
|
+
function w() {
|
|
18
|
+
let { employees: w, departments: T, notifications: E, payrollRecords: D, jobPostings: O } = e(), k = t(() => {
|
|
19
|
+
let e = E.some((e) => e.type === "warning"), t = E.some((e) => e.type === "error");
|
|
20
20
|
return [
|
|
21
21
|
{
|
|
22
22
|
name: "Authentication",
|
|
@@ -32,7 +32,7 @@ function C() {
|
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
name: "Payroll Engine",
|
|
35
|
-
status:
|
|
35
|
+
status: D.some((e) => e.status === "failed") ? "degraded" : "operational",
|
|
36
36
|
uptime: "99.91%",
|
|
37
37
|
icon: r
|
|
38
38
|
},
|
|
@@ -55,14 +55,14 @@ function C() {
|
|
|
55
55
|
icon: o
|
|
56
56
|
}
|
|
57
57
|
];
|
|
58
|
-
}, [
|
|
58
|
+
}, [E, D]), A = t(() => E.slice(0, 12).map((e, t) => ({
|
|
59
59
|
action: e.type === "error" ? "Incident detected" : e.type === "warning" ? "Policy alert generated" : "Operational event recorded",
|
|
60
|
-
actor:
|
|
60
|
+
actor: w[t % Math.max(w.length, 1)] ? `${w[t % w.length].firstName} ${w[t % w.length].lastName}` : "System",
|
|
61
61
|
target: e.title,
|
|
62
|
-
timestamp:
|
|
62
|
+
timestamp: C(e.createdAt),
|
|
63
63
|
severity: e.type === "error" ? "high" : e.type === "warning" ? "medium" : "low"
|
|
64
|
-
})), [
|
|
65
|
-
let e =
|
|
64
|
+
})), [w, E]), j = t(() => {
|
|
65
|
+
let e = w.filter((e) => e.position.toLowerCase().includes("manager")).length, t = w.filter((e) => e.position.toLowerCase().includes("lead")).length, n = O.filter((e) => e.status === "active").length;
|
|
66
66
|
return [
|
|
67
67
|
{
|
|
68
68
|
role: "Super Admin",
|
|
@@ -86,23 +86,30 @@ function C() {
|
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
role: "Employee",
|
|
89
|
-
count: Math.max(0,
|
|
89
|
+
count: Math.max(0, w.length - e - t),
|
|
90
90
|
permissions: "Self-service, directory, learning"
|
|
91
91
|
}
|
|
92
92
|
];
|
|
93
|
-
}, [
|
|
93
|
+
}, [w, O]), M = Math.round(k.filter((e) => e.status === "operational").length / Math.max(k.length, 1) * 100);
|
|
94
94
|
return /* @__PURE__ */ f("div", {
|
|
95
95
|
className: "space-y-6 p-6",
|
|
96
96
|
children: [
|
|
97
97
|
/* @__PURE__ */ f("div", {
|
|
98
98
|
className: "flex items-center justify-between",
|
|
99
|
-
children: [/* @__PURE__ */ f("div", { children: [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
children: [/* @__PURE__ */ f("div", { children: [
|
|
100
|
+
/* @__PURE__ */ d("h1", {
|
|
101
|
+
className: "text-2xl font-semibold",
|
|
102
|
+
children: /* @__PURE__ */ d(x, { children: "Administration" })
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ d("p", {
|
|
105
|
+
className: "text-sm text-text-secondary",
|
|
106
|
+
children: "System administration and access management"
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ d(S, {
|
|
109
|
+
className: "mt-1",
|
|
110
|
+
children: "Manage organization-wide settings, roles, and system controls from one place — use it to onboard admins, adjust permissions, and keep your CrewFoundry workspace secure and compliant."
|
|
111
|
+
})
|
|
112
|
+
] }), /* @__PURE__ */ f("div", {
|
|
106
113
|
className: "flex gap-2",
|
|
107
114
|
children: [/* @__PURE__ */ f(m, {
|
|
108
115
|
variant: "outline",
|
|
@@ -118,7 +125,8 @@ function C() {
|
|
|
118
125
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
|
|
119
126
|
children: [
|
|
120
127
|
/* @__PURE__ */ f(b, {
|
|
121
|
-
treatment: "
|
|
128
|
+
treatment: "glass",
|
|
129
|
+
glow: !0,
|
|
122
130
|
className: "border-border-seam",
|
|
123
131
|
children: [/* @__PURE__ */ f(v, {
|
|
124
132
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
@@ -128,10 +136,10 @@ function C() {
|
|
|
128
136
|
}), /* @__PURE__ */ d(l, { className: "h-4 w-4 text-text-secondary" })]
|
|
129
137
|
}), /* @__PURE__ */ f(g, { children: [/* @__PURE__ */ d("div", {
|
|
130
138
|
className: "text-2xl font-bold tabular-nums",
|
|
131
|
-
children:
|
|
139
|
+
children: w.length
|
|
132
140
|
}), /* @__PURE__ */ f("p", {
|
|
133
141
|
className: "text-xs text-text-secondary",
|
|
134
|
-
children: [
|
|
142
|
+
children: [T.length, " departments"]
|
|
135
143
|
})] })]
|
|
136
144
|
}),
|
|
137
145
|
/* @__PURE__ */ f(b, {
|
|
@@ -145,7 +153,7 @@ function C() {
|
|
|
145
153
|
}), /* @__PURE__ */ d(o, { className: "h-4 w-4 text-text-secondary" })]
|
|
146
154
|
}), /* @__PURE__ */ f(g, { children: [/* @__PURE__ */ d("div", {
|
|
147
155
|
className: "text-2xl font-bold tabular-nums",
|
|
148
|
-
children: Math.round(
|
|
156
|
+
children: Math.round(w.length * .76)
|
|
149
157
|
}), /* @__PURE__ */ d("p", {
|
|
150
158
|
className: "text-xs text-text-secondary",
|
|
151
159
|
children: "Estimated from active workforce"
|
|
@@ -179,7 +187,7 @@ function C() {
|
|
|
179
187
|
}), /* @__PURE__ */ d(c, { className: "h-4 w-4 text-text-secondary" })]
|
|
180
188
|
}), /* @__PURE__ */ f(g, { children: [/* @__PURE__ */ f("div", {
|
|
181
189
|
className: "text-2xl font-bold tabular-nums",
|
|
182
|
-
children: [
|
|
190
|
+
children: [M, "/100"]
|
|
183
191
|
}), /* @__PURE__ */ d("p", {
|
|
184
192
|
className: "text-xs text-status-success-text",
|
|
185
193
|
children: "Derived from module health checks"
|
|
@@ -191,7 +199,7 @@ function C() {
|
|
|
191
199
|
className: "grid gap-4 md:grid-cols-2",
|
|
192
200
|
children: [/* @__PURE__ */ f(h, { children: [/* @__PURE__ */ f(v, { children: [/* @__PURE__ */ d(y, { children: "System Status" }), /* @__PURE__ */ d(_, { children: "Module health and uptime" })] }), /* @__PURE__ */ d(g, {
|
|
193
201
|
className: "space-y-3",
|
|
194
|
-
children:
|
|
202
|
+
children: k.map((e) => /* @__PURE__ */ f("div", {
|
|
195
203
|
className: "flex items-center justify-between rounded border p-3",
|
|
196
204
|
children: [/* @__PURE__ */ f("div", {
|
|
197
205
|
className: "flex items-center gap-3",
|
|
@@ -221,7 +229,7 @@ function C() {
|
|
|
221
229
|
}),
|
|
222
230
|
/* @__PURE__ */ d("span", { children: "Permissions" })
|
|
223
231
|
]
|
|
224
|
-
}),
|
|
232
|
+
}), j.map((e) => /* @__PURE__ */ f("div", {
|
|
225
233
|
className: "grid grid-cols-3 gap-2 border-b py-2 text-sm last:border-0",
|
|
226
234
|
children: [
|
|
227
235
|
/* @__PURE__ */ d("span", {
|
|
@@ -248,7 +256,7 @@ function C() {
|
|
|
248
256
|
/* @__PURE__ */ d("span", { children: "Timestamp" }),
|
|
249
257
|
/* @__PURE__ */ d("span", { children: "Severity" })
|
|
250
258
|
]
|
|
251
|
-
}),
|
|
259
|
+
}), A.map((e, t) => /* @__PURE__ */ f("div", {
|
|
252
260
|
className: "grid grid-cols-5 gap-2 border-b py-2 text-sm last:border-0",
|
|
253
261
|
children: [
|
|
254
262
|
/* @__PURE__ */ d("span", {
|
|
@@ -278,6 +286,6 @@ function C() {
|
|
|
278
286
|
});
|
|
279
287
|
}
|
|
280
288
|
//#endregion
|
|
281
|
-
export {
|
|
289
|
+
export { w as AdminAdminPagePage };
|
|
282
290
|
|
|
283
291
|
//# sourceMappingURL=AdminAdminPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminAdminPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/AdminAdminPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n Activity,\n Database,\n Globe,\n Lock,\n Monitor,\n Server,\n Shield,\n Users,\n Wrench,\n} from 'lucide-react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n} from '@burdenoff/fe-libs/ui';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype SystemModule = {\n name: string;\n status: 'operational' | 'degraded';\n uptime: string;\n icon: typeof Lock;\n};\n\ntype AuditLog = {\n action: string;\n actor: string;\n target: string;\n timestamp: string;\n severity: 'low' | 'medium' | 'high';\n};\n\ntype UserRole = {\n role: string;\n count: number;\n permissions: string;\n};\n\nconst isoDateTime = (value: string): string => {\n const parsed = new Date(value);\n if (Number.isNaN(parsed.getTime())) {\n return 'Unknown';\n }\n return parsed.toLocaleString('en-US', {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n });\n};\n\nexport function AdminAdminPagePage() {\n const { employees, departments, notifications, payrollRecords, jobPostings } =\n useCrewFoundryStore();\n\n const systemModules = useMemo<SystemModule[]>(() => {\n const hasWarning = notifications.some((notification) => notification.type === 'warning');\n const hasError = notifications.some((notification) => notification.type === 'error');\n\n return [\n { name: 'Authentication', status: 'operational', uptime: '99.98%', icon: Lock },\n { name: 'Employee Directory', status: 'operational', uptime: '99.95%', icon: Users },\n {\n name: 'Payroll Engine',\n status: payrollRecords.some((record) => record.status === 'failed')\n ? 'degraded'\n : 'operational',\n uptime: '99.91%',\n icon: Database,\n },\n { name: 'Recruitment ATS', status: 'operational', uptime: '99.94%', icon: Globe },\n {\n name: 'Analytics Pipeline',\n status: hasWarning || hasError ? 'degraded' : 'operational',\n uptime: hasWarning || hasError ? '98.70%' : '99.96%',\n icon: Activity,\n },\n {\n name: 'Notification Service',\n status: hasError ? 'degraded' : 'operational',\n uptime: '99.97%',\n icon: Monitor,\n },\n ];\n }, [notifications, payrollRecords]);\n\n const recentAuditLogs = useMemo<AuditLog[]>(() => {\n return notifications.slice(0, 12).map((notification, index) => ({\n action:\n notification.type === 'error'\n ? 'Incident detected'\n : notification.type === 'warning'\n ? 'Policy alert generated'\n : 'Operational event recorded',\n actor: employees[index % Math.max(employees.length, 1)]\n ? `${employees[index % employees.length].firstName} ${employees[index % employees.length].lastName}`\n : 'System',\n target: notification.title,\n timestamp: isoDateTime(notification.createdAt),\n severity:\n notification.type === 'error' ? 'high' : notification.type === 'warning' ? 'medium' : 'low',\n }));\n }, [employees, notifications]);\n\n const userRoles = useMemo<UserRole[]>(() => {\n const managers = employees.filter((employee) =>\n employee.position.toLowerCase().includes('manager')\n ).length;\n const leads = employees.filter((employee) =>\n employee.position.toLowerCase().includes('lead')\n ).length;\n const recruiters = jobPostings.filter((posting) => posting.status === 'active').length;\n return [\n { role: 'Super Admin', count: 2, permissions: 'Full access' },\n {\n role: 'HR Manager',\n count: Math.max(1, managers),\n permissions: 'Employee, payroll, leave management',\n },\n {\n role: 'Hiring Manager',\n count: Math.max(1, recruiters),\n permissions: 'Job postings, candidates, interviews',\n },\n {\n role: 'Department Lead',\n count: Math.max(1, leads),\n permissions: 'Team management, reports',\n },\n {\n role: 'Employee',\n count: Math.max(0, employees.length - managers - leads),\n permissions: 'Self-service, directory, learning',\n },\n ];\n }, [employees, jobPostings]);\n\n const securityScore = Math.round(\n (systemModules.filter((module) => module.status === 'operational').length /\n Math.max(systemModules.length, 1)) *\n 100\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Administration</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">System administration and access management</p>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\">\n <Wrench className=\"mr-1 h-4 w-4\" />\n System Settings\n </Button>\n <Button size=\"sm\">\n <Shield className=\"mr-1 h-4 w-4\" />\n Security\n </Button>\n </div>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Users</CardTitle>\n <Users className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{employees.length}</div>\n <p className=\"text-xs text-text-secondary\">{departments.length} departments</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active Sessions</CardTitle>\n <Monitor className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n {Math.round(employees.length * 0.76)}\n </div>\n <p className=\"text-xs text-text-secondary\">Estimated from active workforce</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">System Uptime</CardTitle>\n <Server className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">99.95%</div>\n <p className=\"text-xs text-text-secondary\">Rolling platform uptime</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Security Score</CardTitle>\n <Shield className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{securityScore}/100</div>\n <p className=\"text-xs text-status-success-text\">Derived from module health checks</p>\n </CardContent>\n </GlassCard>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n <Card>\n <CardHeader>\n <CardTitle>System Status</CardTitle>\n <CardDescription>Module health and uptime</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {systemModules.map((module) => (\n <div\n key={module.name}\n className=\"flex items-center justify-between rounded border p-3\"\n >\n <div className=\"flex items-center gap-3\">\n <module.icon className=\"h-4 w-4 text-text-secondary\" />\n <span className=\"text-sm font-medium\">{module.name}</span>\n </div>\n <div className=\"flex items-center gap-3\">\n <span className=\"text-xs text-text-secondary\">{module.uptime}</span>\n <Badge\n variant={module.status === 'operational' ? 'default' : 'destructive'}\n className=\"text-[10px]\"\n >\n {module.status}\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>User Roles</CardTitle>\n <CardDescription>Role distribution and permissions</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"mb-2 grid grid-cols-3 gap-2 border-b pb-2 text-xs font-medium text-text-secondary\">\n <span>Role</span>\n <span className=\"text-right\">Users</span>\n <span>Permissions</span>\n </div>\n {userRoles.map((role) => (\n <div\n key={role.role}\n className=\"grid grid-cols-3 gap-2 border-b py-2 text-sm last:border-0\"\n >\n <span className=\"font-medium\">{role.role}</span>\n <span className=\"text-right\">{role.count}</span>\n <span className=\"truncate text-xs text-text-secondary\">{role.permissions}</span>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle>Recent Audit Log</CardTitle>\n <CardDescription>System activity and security events</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"mb-2 grid grid-cols-5 gap-2 border-b pb-2 text-xs font-medium text-text-secondary\">\n <span>Action</span>\n <span>Actor</span>\n <span>Target</span>\n <span>Timestamp</span>\n <span>Severity</span>\n </div>\n {recentAuditLogs.map((log, index) => (\n <div\n key={`${log.action}-${index}`}\n className=\"grid grid-cols-5 gap-2 border-b py-2 text-sm last:border-0\"\n >\n <span className=\"font-medium\">{log.action}</span>\n <span className=\"text-text-secondary\">{log.actor}</span>\n <span className=\"truncate text-text-secondary\">{log.target}</span>\n <span className=\"text-xs\">{log.timestamp}</span>\n <Badge\n variant={\n log.severity === 'high'\n ? 'destructive'\n : log.severity === 'medium'\n ? 'secondary'\n : 'outline'\n }\n className=\"w-fit text-[10px]\"\n >\n {log.severity}\n </Badge>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AA8CA,IAAM,KAAe,MAA0B;CAC7C,IAAM,IAAS,IAAI,KAAK,EAAM;AAI9B,QAHI,OAAO,MAAM,EAAO,SAAS,CAAC,GACzB,YAEF,EAAO,eAAe,SAAS;EACpC,MAAM;EACN,OAAO;EACP,KAAK;EACL,MAAM;EACN,QAAQ;EACT,CAAC;;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G,EAAI,OAAO,GAAG,IAmBlB,CACN,CACU,EAAA,CAAA,CACT,EAAA,CAAA;GACH"}
|
|
1
|
+
{"version":3,"file":"AdminAdminPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/AdminAdminPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n Activity,\n Database,\n Globe,\n Lock,\n Monitor,\n Server,\n Shield,\n Users,\n Wrench,\n} from 'lucide-react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype SystemModule = {\n name: string;\n status: 'operational' | 'degraded';\n uptime: string;\n icon: typeof Lock;\n};\n\ntype AuditLog = {\n action: string;\n actor: string;\n target: string;\n timestamp: string;\n severity: 'low' | 'medium' | 'high';\n};\n\ntype UserRole = {\n role: string;\n count: number;\n permissions: string;\n};\n\nconst isoDateTime = (value: string): string => {\n const parsed = new Date(value);\n if (Number.isNaN(parsed.getTime())) {\n return 'Unknown';\n }\n return parsed.toLocaleString('en-US', {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n });\n};\n\nexport function AdminAdminPagePage() {\n const { employees, departments, notifications, payrollRecords, jobPostings } =\n useCrewFoundryStore();\n\n const systemModules = useMemo<SystemModule[]>(() => {\n const hasWarning = notifications.some((notification) => notification.type === 'warning');\n const hasError = notifications.some((notification) => notification.type === 'error');\n\n return [\n { name: 'Authentication', status: 'operational', uptime: '99.98%', icon: Lock },\n { name: 'Employee Directory', status: 'operational', uptime: '99.95%', icon: Users },\n {\n name: 'Payroll Engine',\n status: payrollRecords.some((record) => record.status === 'failed')\n ? 'degraded'\n : 'operational',\n uptime: '99.91%',\n icon: Database,\n },\n { name: 'Recruitment ATS', status: 'operational', uptime: '99.94%', icon: Globe },\n {\n name: 'Analytics Pipeline',\n status: hasWarning || hasError ? 'degraded' : 'operational',\n uptime: hasWarning || hasError ? '98.70%' : '99.96%',\n icon: Activity,\n },\n {\n name: 'Notification Service',\n status: hasError ? 'degraded' : 'operational',\n uptime: '99.97%',\n icon: Monitor,\n },\n ];\n }, [notifications, payrollRecords]);\n\n const recentAuditLogs = useMemo<AuditLog[]>(() => {\n return notifications.slice(0, 12).map((notification, index) => ({\n action:\n notification.type === 'error'\n ? 'Incident detected'\n : notification.type === 'warning'\n ? 'Policy alert generated'\n : 'Operational event recorded',\n actor: employees[index % Math.max(employees.length, 1)]\n ? `${employees[index % employees.length].firstName} ${employees[index % employees.length].lastName}`\n : 'System',\n target: notification.title,\n timestamp: isoDateTime(notification.createdAt),\n severity:\n notification.type === 'error' ? 'high' : notification.type === 'warning' ? 'medium' : 'low',\n }));\n }, [employees, notifications]);\n\n const userRoles = useMemo<UserRole[]>(() => {\n const managers = employees.filter((employee) =>\n employee.position.toLowerCase().includes('manager')\n ).length;\n const leads = employees.filter((employee) =>\n employee.position.toLowerCase().includes('lead')\n ).length;\n const recruiters = jobPostings.filter((posting) => posting.status === 'active').length;\n return [\n { role: 'Super Admin', count: 2, permissions: 'Full access' },\n {\n role: 'HR Manager',\n count: Math.max(1, managers),\n permissions: 'Employee, payroll, leave management',\n },\n {\n role: 'Hiring Manager',\n count: Math.max(1, recruiters),\n permissions: 'Job postings, candidates, interviews',\n },\n {\n role: 'Department Lead',\n count: Math.max(1, leads),\n permissions: 'Team management, reports',\n },\n {\n role: 'Employee',\n count: Math.max(0, employees.length - managers - leads),\n permissions: 'Self-service, directory, learning',\n },\n ];\n }, [employees, jobPostings]);\n\n const securityScore = Math.round(\n (systemModules.filter((module) => module.status === 'operational').length /\n Math.max(systemModules.length, 1)) *\n 100\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Administration</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">System administration and access management</p>\n <PagePurpose className=\"mt-1\">Manage organization-wide settings, roles, and system controls from one place — use it to onboard admins, adjust permissions, and keep your CrewFoundry workspace secure and compliant.</PagePurpose>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\">\n <Wrench className=\"mr-1 h-4 w-4\" />\n System Settings\n </Button>\n <Button size=\"sm\">\n <Shield className=\"mr-1 h-4 w-4\" />\n Security\n </Button>\n </div>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Users</CardTitle>\n <Users className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{employees.length}</div>\n <p className=\"text-xs text-text-secondary\">{departments.length} departments</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active Sessions</CardTitle>\n <Monitor className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n {Math.round(employees.length * 0.76)}\n </div>\n <p className=\"text-xs text-text-secondary\">Estimated from active workforce</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">System Uptime</CardTitle>\n <Server className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">99.95%</div>\n <p className=\"text-xs text-text-secondary\">Rolling platform uptime</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Security Score</CardTitle>\n <Shield className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{securityScore}/100</div>\n <p className=\"text-xs text-status-success-text\">Derived from module health checks</p>\n </CardContent>\n </GlassCard>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n <Card>\n <CardHeader>\n <CardTitle>System Status</CardTitle>\n <CardDescription>Module health and uptime</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {systemModules.map((module) => (\n <div\n key={module.name}\n className=\"flex items-center justify-between rounded border p-3\"\n >\n <div className=\"flex items-center gap-3\">\n <module.icon className=\"h-4 w-4 text-text-secondary\" />\n <span className=\"text-sm font-medium\">{module.name}</span>\n </div>\n <div className=\"flex items-center gap-3\">\n <span className=\"text-xs text-text-secondary\">{module.uptime}</span>\n <Badge\n variant={module.status === 'operational' ? 'default' : 'destructive'}\n className=\"text-[10px]\"\n >\n {module.status}\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>User Roles</CardTitle>\n <CardDescription>Role distribution and permissions</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"mb-2 grid grid-cols-3 gap-2 border-b pb-2 text-xs font-medium text-text-secondary\">\n <span>Role</span>\n <span className=\"text-right\">Users</span>\n <span>Permissions</span>\n </div>\n {userRoles.map((role) => (\n <div\n key={role.role}\n className=\"grid grid-cols-3 gap-2 border-b py-2 text-sm last:border-0\"\n >\n <span className=\"font-medium\">{role.role}</span>\n <span className=\"text-right\">{role.count}</span>\n <span className=\"truncate text-xs text-text-secondary\">{role.permissions}</span>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle>Recent Audit Log</CardTitle>\n <CardDescription>System activity and security events</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"mb-2 grid grid-cols-5 gap-2 border-b pb-2 text-xs font-medium text-text-secondary\">\n <span>Action</span>\n <span>Actor</span>\n <span>Target</span>\n <span>Timestamp</span>\n <span>Severity</span>\n </div>\n {recentAuditLogs.map((log, index) => (\n <div\n key={`${log.action}-${index}`}\n className=\"grid grid-cols-5 gap-2 border-b py-2 text-sm last:border-0\"\n >\n <span className=\"font-medium\">{log.action}</span>\n <span className=\"text-text-secondary\">{log.actor}</span>\n <span className=\"truncate text-text-secondary\">{log.target}</span>\n <span className=\"text-xs\">{log.timestamp}</span>\n <Badge\n variant={\n log.severity === 'high'\n ? 'destructive'\n : log.severity === 'medium'\n ? 'secondary'\n : 'outline'\n }\n className=\"w-fit text-[10px]\"\n >\n {log.severity}\n </Badge>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AA+CA,IAAM,KAAe,MAA0B;CAC7C,IAAM,IAAS,IAAI,KAAK,EAAM;AAI9B,QAHI,OAAO,MAAM,EAAO,SAAS,CAAC,GACzB,YAEF,EAAO,eAAe,SAAS;EACpC,MAAM;EACN,OAAO;EACP,KAAK;EACL,MAAM;EACN,QAAQ;EACT,CAAC;;AAGJ,SAAgB,IAAqB;CACnC,IAAM,EAAE,cAAW,gBAAa,kBAAe,mBAAgB,mBAC7D,GAAqB,EAEjB,IAAgB,QAA8B;EAClD,IAAM,IAAa,EAAc,MAAM,MAAiB,EAAa,SAAS,UAAU,EAClF,IAAW,EAAc,MAAM,MAAiB,EAAa,SAAS,QAAQ;AAEpF,SAAO;GACL;IAAE,MAAM;IAAkB,QAAQ;IAAe,QAAQ;IAAU,MAAM;IAAM;GAC/E;IAAE,MAAM;IAAsB,QAAQ;IAAe,QAAQ;IAAU,MAAM;IAAO;GACpF;IACE,MAAM;IACN,QAAQ,EAAe,MAAM,MAAW,EAAO,WAAW,SAAS,GAC/D,aACA;IACJ,QAAQ;IACR,MAAM;IACP;GACD;IAAE,MAAM;IAAmB,QAAQ;IAAe,QAAQ;IAAU,MAAM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W,oBAA4B,CAAA,EACvC,kBAAC,GAAD,EAAA,UAAiB,uCAAqD,CAAA,CAC3D,EAAA,CAAA,EACb,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,QAAD,EAAA,UAAM,UAAa,CAAA;KACnB,kBAAC,QAAD,EAAA,UAAM,SAAY,CAAA;KAClB,kBAAC,QAAD,EAAA,UAAM,UAAa,CAAA;KACnB,kBAAC,QAAD,EAAA,UAAM,aAAgB,CAAA;KACtB,kBAAC,QAAD,EAAA,UAAM,YAAe,CAAA;KACjB;OACL,EAAgB,KAAK,GAAK,MACzB,kBAAC,OAAD;IAEE,WAAU;cAFZ;KAIE,kBAAC,QAAD;MAAM,WAAU;gBAAe,EAAI;MAAc,CAAA;KACjD,kBAAC,QAAD;MAAM,WAAU;gBAAuB,EAAI;MAAa,CAAA;KACxD,kBAAC,QAAD;MAAM,WAAU;gBAAgC,EAAI;MAAc,CAAA;KAClE,kBAAC,QAAD;MAAM,WAAU;gBAAW,EAAI;MAAiB,CAAA;KAChD,kBAAC,GAAD;MACE,SACE,EAAI,aAAa,SACb,gBACA,EAAI,aAAa,WACf,cACA;MAER,WAAU;gBAET,EAAI;MACC,CAAA;KACJ;MAnBC,GAAG,EAAI,OAAO,GAAG,IAmBlB,CACN,CACU,EAAA,CAAA,CACT,EAAA,CAAA;GACH"}
|
|
@@ -2,69 +2,76 @@ import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { Activity as n, BarChart3 as r, Calendar as i, PieChart as a, TrendingUp as o, Users as s } from "lucide-react";
|
|
4
4
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
-
import { Badge as u, Button as d, Card as f, CardContent as p, CardDescription as m, CardHeader as h, CardTitle as g, GlassCard as _, GradientText as v,
|
|
5
|
+
import { Badge as u, Button as d, Card as f, CardContent as p, CardDescription as m, CardHeader as h, CardTitle as g, GlassCard as _, GradientText as v, PagePurpose as y, Tabs as b, TabsContent as x, TabsList as S, TabsTrigger as C } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/crewfoundry/pages/AnalyticsAnalyticsPagePage.tsx
|
|
7
|
-
function
|
|
8
|
-
let { employees:
|
|
9
|
-
let e = [...
|
|
7
|
+
function w() {
|
|
8
|
+
let { employees: w, departments: T, jobPostings: E, candidates: D, projects: O } = e(), k = t(() => {
|
|
9
|
+
let e = [...w].sort((e, t) => e.startDate.localeCompare(t.startDate)), t = e.slice(-6).map((t, n) => {
|
|
10
10
|
let r = new Date(t.startDate).toLocaleString("en-US", { month: "short" }), i = e.filter((e) => new Date(e.startDate).toLocaleString("en-US", { month: "short" }) === r && e.status === "active").length, a = e.filter((e) => new Date(e.startDate).toLocaleString("en-US", { month: "short" }) === r && e.status === "terminated").length;
|
|
11
11
|
return {
|
|
12
12
|
month: r,
|
|
13
13
|
headcount: Math.max(1, e.length - (5 - n) * 2),
|
|
14
14
|
hires: i,
|
|
15
15
|
exits: a,
|
|
16
|
-
openRoles: Math.max(0,
|
|
16
|
+
openRoles: Math.max(0, E.filter((e) => e.status === "active").length - n)
|
|
17
17
|
};
|
|
18
18
|
});
|
|
19
19
|
return t.length > 0 ? t : [];
|
|
20
|
-
}, [
|
|
20
|
+
}, [w, E]), A = T.map((e) => ({
|
|
21
21
|
name: e.name,
|
|
22
22
|
count: e.employeeCount,
|
|
23
23
|
budget: e.budget
|
|
24
|
-
})),
|
|
24
|
+
})), j = Math.max(1, ...A.map((e) => e.count)), M = Math.max(1, ...k.map((e) => e.headcount)), N = t(() => [
|
|
25
25
|
{
|
|
26
26
|
stage: "Applications",
|
|
27
|
-
count:
|
|
27
|
+
count: E.reduce((e, t) => e + t.applicants, 0),
|
|
28
28
|
color: "bg-status-info-text"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
stage: "Screening",
|
|
32
|
-
count:
|
|
32
|
+
count: D.filter((e) => e.status === "screening").length,
|
|
33
33
|
color: "bg-status-info-text"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
stage: "Interview",
|
|
37
|
-
count:
|
|
37
|
+
count: D.filter((e) => e.status === "interview").length,
|
|
38
38
|
color: "bg-action-primary-bg"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
stage: "Assessment",
|
|
42
|
-
count:
|
|
42
|
+
count: D.filter((e) => e.status === "assessment").length,
|
|
43
43
|
color: "bg-action-primary-bg"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
stage: "Offer",
|
|
47
|
-
count:
|
|
47
|
+
count: D.filter((e) => e.status === "offer").length,
|
|
48
48
|
color: "bg-status-warning-text"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
stage: "Hired",
|
|
52
|
-
count:
|
|
52
|
+
count: D.filter((e) => e.status === "hired").length,
|
|
53
53
|
color: "bg-status-success-text"
|
|
54
54
|
}
|
|
55
|
-
], [
|
|
55
|
+
], [D, E]), P = Math.max(1, ...N.map((e) => e.count));
|
|
56
56
|
return /* @__PURE__ */ l("div", {
|
|
57
57
|
className: "space-y-6 p-6",
|
|
58
58
|
children: [
|
|
59
59
|
/* @__PURE__ */ l("div", {
|
|
60
60
|
className: "flex items-center justify-between",
|
|
61
|
-
children: [/* @__PURE__ */ l("div", { children: [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
children: [/* @__PURE__ */ l("div", { children: [
|
|
62
|
+
/* @__PURE__ */ c("h1", {
|
|
63
|
+
className: "text-2xl font-semibold",
|
|
64
|
+
children: /* @__PURE__ */ c(v, { children: "Workforce Analytics" })
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ c("p", {
|
|
67
|
+
className: "text-sm text-text-secondary",
|
|
68
|
+
children: "Comprehensive analytics across all HR domains"
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ c(y, {
|
|
71
|
+
className: "mt-1",
|
|
72
|
+
children: "Your workforce analytics hub — track headcount, performance, and engagement trends here to spot what's working and where your teams need attention."
|
|
73
|
+
})
|
|
74
|
+
] }), /* @__PURE__ */ l(d, {
|
|
68
75
|
variant: "outline",
|
|
69
76
|
size: "sm",
|
|
70
77
|
children: [/* @__PURE__ */ c(i, { className: "mr-2 h-4 w-4" }), "Rolling 6 Months"]
|
|
@@ -74,7 +81,8 @@ function C() {
|
|
|
74
81
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
|
|
75
82
|
children: [
|
|
76
83
|
/* @__PURE__ */ l(_, {
|
|
77
|
-
treatment: "
|
|
84
|
+
treatment: "glass",
|
|
85
|
+
glow: !0,
|
|
78
86
|
className: "border-border-seam",
|
|
79
87
|
children: [/* @__PURE__ */ l(h, {
|
|
80
88
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
@@ -84,7 +92,7 @@ function C() {
|
|
|
84
92
|
}), /* @__PURE__ */ c(s, { className: "h-4 w-4 text-text-secondary" })]
|
|
85
93
|
}), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
|
|
86
94
|
className: "text-2xl font-bold tabular-nums",
|
|
87
|
-
children:
|
|
95
|
+
children: w.length
|
|
88
96
|
}), /* @__PURE__ */ l("div", {
|
|
89
97
|
className: "flex items-center text-xs text-status-success-text",
|
|
90
98
|
children: [/* @__PURE__ */ c(o, { className: "mr-1 h-3 w-3" }), "Live headcount data"]
|
|
@@ -101,7 +109,7 @@ function C() {
|
|
|
101
109
|
}), /* @__PURE__ */ c(a, { className: "h-4 w-4 text-text-secondary" })]
|
|
102
110
|
}), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
|
|
103
111
|
className: "text-2xl font-bold tabular-nums",
|
|
104
|
-
children:
|
|
112
|
+
children: T.length
|
|
105
113
|
}), /* @__PURE__ */ c("p", {
|
|
106
114
|
className: "text-xs text-text-secondary",
|
|
107
115
|
children: "All departments tracked"
|
|
@@ -118,10 +126,10 @@ function C() {
|
|
|
118
126
|
}), /* @__PURE__ */ c(n, { className: "h-4 w-4 text-text-secondary" })]
|
|
119
127
|
}), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
|
|
120
128
|
className: "text-2xl font-bold tabular-nums",
|
|
121
|
-
children:
|
|
129
|
+
children: O.filter((e) => e.status === "active").length
|
|
122
130
|
}), /* @__PURE__ */ l("p", {
|
|
123
131
|
className: "text-xs text-text-secondary",
|
|
124
|
-
children: [
|
|
132
|
+
children: [O.filter((e) => e.status === "completed").length, " completed"]
|
|
125
133
|
})] })]
|
|
126
134
|
}),
|
|
127
135
|
/* @__PURE__ */ l(_, {
|
|
@@ -135,7 +143,7 @@ function C() {
|
|
|
135
143
|
}), /* @__PURE__ */ c(r, { className: "h-4 w-4 text-text-secondary" })]
|
|
136
144
|
}), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
|
|
137
145
|
className: "text-2xl font-bold tabular-nums",
|
|
138
|
-
children:
|
|
146
|
+
children: D.length
|
|
139
147
|
}), /* @__PURE__ */ c("p", {
|
|
140
148
|
className: "text-xs text-text-secondary",
|
|
141
149
|
children: "candidates in pipeline"
|
|
@@ -143,29 +151,29 @@ function C() {
|
|
|
143
151
|
})
|
|
144
152
|
]
|
|
145
153
|
}),
|
|
146
|
-
/* @__PURE__ */ l(
|
|
154
|
+
/* @__PURE__ */ l(b, {
|
|
147
155
|
defaultValue: "overview",
|
|
148
156
|
children: [
|
|
149
|
-
/* @__PURE__ */ l(
|
|
150
|
-
/* @__PURE__ */ c(
|
|
157
|
+
/* @__PURE__ */ l(S, { children: [
|
|
158
|
+
/* @__PURE__ */ c(C, {
|
|
151
159
|
value: "overview",
|
|
152
160
|
children: "Overview"
|
|
153
161
|
}),
|
|
154
|
-
/* @__PURE__ */ c(
|
|
162
|
+
/* @__PURE__ */ c(C, {
|
|
155
163
|
value: "hiring",
|
|
156
164
|
children: "Hiring Funnel"
|
|
157
165
|
}),
|
|
158
|
-
/* @__PURE__ */ c(
|
|
166
|
+
/* @__PURE__ */ c(C, {
|
|
159
167
|
value: "departments",
|
|
160
168
|
children: "Departments"
|
|
161
169
|
})
|
|
162
170
|
] }),
|
|
163
|
-
/* @__PURE__ */ c(
|
|
171
|
+
/* @__PURE__ */ c(x, {
|
|
164
172
|
value: "overview",
|
|
165
173
|
className: "space-y-4",
|
|
166
174
|
children: /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(g, { children: "Workforce Growth Trend" }), /* @__PURE__ */ c(m, { children: "Monthly headcount and hiring activity" })] }), /* @__PURE__ */ c(p, {
|
|
167
175
|
className: "space-y-3",
|
|
168
|
-
children:
|
|
176
|
+
children: k.map((e) => /* @__PURE__ */ l("div", {
|
|
169
177
|
className: "flex items-center gap-3",
|
|
170
178
|
children: [
|
|
171
179
|
/* @__PURE__ */ c("span", {
|
|
@@ -176,7 +184,7 @@ function C() {
|
|
|
176
184
|
className: "h-5 flex-1 overflow-hidden rounded bg-bg-sunken",
|
|
177
185
|
children: /* @__PURE__ */ c("div", {
|
|
178
186
|
className: "h-5 rounded bg-action-primary-bg",
|
|
179
|
-
style: { width: `${Math.round(e.headcount /
|
|
187
|
+
style: { width: `${Math.round(e.headcount / M * 100)}%` }
|
|
180
188
|
})
|
|
181
189
|
}),
|
|
182
190
|
/* @__PURE__ */ c("span", {
|
|
@@ -203,12 +211,12 @@ function C() {
|
|
|
203
211
|
}, `${e.month}-${e.headcount}`))
|
|
204
212
|
})] })
|
|
205
213
|
}),
|
|
206
|
-
/* @__PURE__ */ c(
|
|
214
|
+
/* @__PURE__ */ c(x, {
|
|
207
215
|
value: "hiring",
|
|
208
216
|
className: "space-y-4",
|
|
209
217
|
children: /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(g, { children: "Hiring Funnel" }), /* @__PURE__ */ c(m, { children: "Candidate pipeline stages" })] }), /* @__PURE__ */ c(p, {
|
|
210
218
|
className: "space-y-4",
|
|
211
|
-
children:
|
|
219
|
+
children: N.map((e) => /* @__PURE__ */ l("div", {
|
|
212
220
|
className: "flex items-center gap-3",
|
|
213
221
|
children: [
|
|
214
222
|
/* @__PURE__ */ c("span", {
|
|
@@ -219,7 +227,7 @@ function C() {
|
|
|
219
227
|
className: "h-6 flex-1 overflow-hidden rounded bg-bg-sunken",
|
|
220
228
|
children: /* @__PURE__ */ c("div", {
|
|
221
229
|
className: `h-6 rounded ${e.color}`,
|
|
222
|
-
style: { width: `${Math.max(Math.round(e.count /
|
|
230
|
+
style: { width: `${Math.max(Math.round(e.count / P * 100), 5)}%` }
|
|
223
231
|
})
|
|
224
232
|
}),
|
|
225
233
|
/* @__PURE__ */ c("span", {
|
|
@@ -230,7 +238,7 @@ function C() {
|
|
|
230
238
|
}, e.stage))
|
|
231
239
|
})] })
|
|
232
240
|
}),
|
|
233
|
-
/* @__PURE__ */ c(
|
|
241
|
+
/* @__PURE__ */ c(x, {
|
|
234
242
|
value: "departments",
|
|
235
243
|
className: "space-y-4",
|
|
236
244
|
children: /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l(h, { children: [/* @__PURE__ */ c(g, { children: "Department Breakdown" }), /* @__PURE__ */ c(m, { children: "Headcount and budget by department" })] }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ l("div", {
|
|
@@ -247,7 +255,7 @@ function C() {
|
|
|
247
255
|
}),
|
|
248
256
|
/* @__PURE__ */ c("span", { children: "Distribution" })
|
|
249
257
|
]
|
|
250
|
-
}),
|
|
258
|
+
}), A.sort((e, t) => t.count - e.count).map((e) => /* @__PURE__ */ l("div", {
|
|
251
259
|
className: "grid grid-cols-4 items-center gap-2 border-b py-2 text-sm last:border-0",
|
|
252
260
|
children: [
|
|
253
261
|
/* @__PURE__ */ c("span", {
|
|
@@ -270,7 +278,7 @@ function C() {
|
|
|
270
278
|
className: "h-3 overflow-hidden rounded bg-bg-sunken",
|
|
271
279
|
children: /* @__PURE__ */ c("div", {
|
|
272
280
|
className: "h-3 rounded bg-action-primary-bg/70",
|
|
273
|
-
style: { width: `${Math.round(e.count /
|
|
281
|
+
style: { width: `${Math.round(e.count / j * 100)}%` }
|
|
274
282
|
})
|
|
275
283
|
})
|
|
276
284
|
]
|
|
@@ -282,6 +290,6 @@ function C() {
|
|
|
282
290
|
});
|
|
283
291
|
}
|
|
284
292
|
//#endregion
|
|
285
|
-
export {
|
|
293
|
+
export { w as AnalyticsAnalyticsPagePage };
|
|
286
294
|
|
|
287
295
|
//# sourceMappingURL=AnalyticsAnalyticsPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalyticsAnalyticsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/AnalyticsAnalyticsPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Activity, BarChart3, Calendar, PieChart, TrendingUp, Users } from 'lucide-react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from '@burdenoff/fe-libs/ui';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype MonthlyMetric = {\n month: string;\n headcount: number;\n hires: number;\n exits: number;\n openRoles: number;\n};\n\ntype FunnelStage = {\n stage: string;\n count: number;\n color: string;\n};\n\nexport function AnalyticsAnalyticsPagePage() {\n const { employees, departments, jobPostings, candidates, projects } = useCrewFoundryStore();\n\n const monthlyMetrics = useMemo<MonthlyMetric[]>(() => {\n const sortedEmployees = [...employees].sort((a, b) => a.startDate.localeCompare(b.startDate));\n const months = sortedEmployees.slice(-6).map((employee, index) => {\n const month = new Date(employee.startDate).toLocaleString('en-US', { month: 'short' });\n const hires = sortedEmployees.filter(\n (item) =>\n new Date(item.startDate).toLocaleString('en-US', { month: 'short' }) === month &&\n item.status === 'active'\n ).length;\n const exits = sortedEmployees.filter(\n (item) =>\n new Date(item.startDate).toLocaleString('en-US', { month: 'short' }) === month &&\n item.status === 'terminated'\n ).length;\n return {\n month,\n headcount: Math.max(1, sortedEmployees.length - (5 - index) * 2),\n hires,\n exits,\n openRoles: Math.max(\n 0,\n jobPostings.filter((posting) => posting.status === 'active').length - index\n ),\n };\n });\n return months.length > 0 ? months : [];\n }, [employees, jobPostings]);\n\n const deptDistribution = departments.map((department) => ({\n name: department.name,\n count: department.employeeCount,\n budget: department.budget,\n }));\n\n const maxDeptCount = Math.max(1, ...deptDistribution.map((department) => department.count));\n const maxMetric = Math.max(1, ...monthlyMetrics.map((metric) => metric.headcount));\n\n const hiringFunnel = useMemo<FunnelStage[]>(\n () => [\n {\n stage: 'Applications',\n count: jobPostings.reduce((sum, posting) => sum + posting.applicants, 0),\n color: 'bg-status-info-text',\n },\n {\n stage: 'Screening',\n count: candidates.filter((candidate) => candidate.status === 'screening').length,\n color: 'bg-status-info-text',\n },\n {\n stage: 'Interview',\n count: candidates.filter((candidate) => candidate.status === 'interview').length,\n color: 'bg-action-primary-bg',\n },\n {\n stage: 'Assessment',\n count: candidates.filter((candidate) => candidate.status === 'assessment').length,\n color: 'bg-action-primary-bg',\n },\n {\n stage: 'Offer',\n count: candidates.filter((candidate) => candidate.status === 'offer').length,\n color: 'bg-status-warning-text',\n },\n {\n stage: 'Hired',\n count: candidates.filter((candidate) => candidate.status === 'hired').length,\n color: 'bg-status-success-text',\n },\n ],\n [candidates, jobPostings]\n );\n\n const maxFunnel = Math.max(1, ...hiringFunnel.map((stage) => stage.count));\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Workforce Analytics</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n Comprehensive analytics across all HR domains\n </p>\n </div>\n <Button variant=\"outline\" size=\"sm\">\n <Calendar className=\"mr-2 h-4 w-4\" />\n Rolling 6 Months\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Workforce</CardTitle>\n <Users className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{employees.length}</div>\n <div className=\"flex items-center text-xs text-status-success-text\">\n <TrendingUp className=\"mr-1 h-3 w-3\" />\n Live headcount data\n </div>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active Departments</CardTitle>\n <PieChart className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{departments.length}</div>\n <p className=\"text-xs text-text-secondary\">All departments tracked</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active Projects</CardTitle>\n <Activity className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n {projects.filter((project) => project.status === 'active').length}\n </div>\n <p className=\"text-xs text-text-secondary\">\n {projects.filter((project) => project.status === 'completed').length} completed\n </p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Hiring Pipeline</CardTitle>\n <BarChart3 className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{candidates.length}</div>\n <p className=\"text-xs text-text-secondary\">candidates in pipeline</p>\n </CardContent>\n </GlassCard>\n </div>\n\n <Tabs defaultValue=\"overview\">\n <TabsList>\n <TabsTrigger value=\"overview\">Overview</TabsTrigger>\n <TabsTrigger value=\"hiring\">Hiring Funnel</TabsTrigger>\n <TabsTrigger value=\"departments\">Departments</TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"overview\" className=\"space-y-4\">\n <Card>\n <CardHeader>\n <CardTitle>Workforce Growth Trend</CardTitle>\n <CardDescription>Monthly headcount and hiring activity</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {monthlyMetrics.map((metric) => (\n <div\n key={`${metric.month}-${metric.headcount}`}\n className=\"flex items-center gap-3\"\n >\n <span className=\"w-10 text-sm text-text-secondary\">{metric.month}</span>\n <div className=\"h-5 flex-1 overflow-hidden rounded bg-bg-sunken\">\n <div\n className=\"h-5 rounded bg-action-primary-bg\"\n style={{ width: `${Math.round((metric.headcount / maxMetric) * 100)}%` }}\n />\n </div>\n <span className=\"w-10 text-right text-sm font-medium\">{metric.headcount}</span>\n <div className=\"flex w-32 justify-end gap-1\">\n <Badge variant=\"default\" className=\"text-[10px]\">\n +{metric.hires} hired\n </Badge>\n <Badge variant=\"secondary\" className=\"text-[10px]\">\n {metric.openRoles} open\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </TabsContent>\n\n <TabsContent value=\"hiring\" className=\"space-y-4\">\n <Card>\n <CardHeader>\n <CardTitle>Hiring Funnel</CardTitle>\n <CardDescription>Candidate pipeline stages</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {hiringFunnel.map((stage) => (\n <div key={stage.stage} className=\"flex items-center gap-3\">\n <span className=\"w-28 text-sm font-medium\">{stage.stage}</span>\n <div className=\"h-6 flex-1 overflow-hidden rounded bg-bg-sunken\">\n <div\n className={`h-6 rounded ${stage.color}`}\n style={{\n width: `${Math.max(Math.round((stage.count / maxFunnel) * 100), 5)}%`,\n }}\n />\n </div>\n <span className=\"w-10 text-right text-sm font-bold\">{stage.count}</span>\n </div>\n ))}\n </CardContent>\n </Card>\n </TabsContent>\n\n <TabsContent value=\"departments\" className=\"space-y-4\">\n <Card>\n <CardHeader>\n <CardTitle>Department Breakdown</CardTitle>\n <CardDescription>Headcount and budget by department</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"mb-2 grid grid-cols-4 gap-2 border-b pb-2 text-xs font-medium text-text-secondary\">\n <span>Department</span>\n <span className=\"text-right\">Headcount</span>\n <span className=\"text-right\">Budget</span>\n <span>Distribution</span>\n </div>\n {deptDistribution\n .sort((a, b) => b.count - a.count)\n .map((department) => (\n <div\n key={department.name}\n className=\"grid grid-cols-4 items-center gap-2 border-b py-2 text-sm last:border-0\"\n >\n <span className=\"font-medium\">{department.name}</span>\n <span className=\"text-right\">{department.count}</span>\n <span className=\"text-right\">${(department.budget / 1000000).toFixed(1)}M</span>\n <div className=\"h-3 overflow-hidden rounded bg-bg-sunken\">\n <div\n className=\"h-3 rounded bg-action-primary-bg/70\"\n style={{ width: `${Math.round((department.count / maxDeptCount) * 100)}%` }}\n />\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </TabsContent>\n </Tabs>\n </div>\n );\n}\n"],"mappings":";;;;;;AAiCA,SAAgB,IAA6B;CAC3C,IAAM,EAAE,cAAW,gBAAa,gBAAa,eAAY,gBAAa,GAAqB,EAErF,IAAiB,QAA+B;EACpD,IAAM,IAAkB,CAAC,GAAG,EAAU,CAAC,MAAM,GAAG,MAAM,EAAE,UAAU,cAAc,EAAE,UAAU,CAAC,EACvF,IAAS,EAAgB,MAAM,GAAG,CAAC,KAAK,GAAU,MAAU;GAChE,IAAM,IAAQ,IAAI,KAAK,EAAS,UAAU,CAAC,eAAe,SAAS,EAAE,OAAO,SAAS,CAAC,EAChF,IAAQ,EAAgB,QAC3B,MACC,IAAI,KAAK,EAAK,UAAU,CAAC,eAAe,SAAS,EAAE,OAAO,SAAS,CAAC,KAAK,KACzE,EAAK,WAAW,SACnB,CAAC,QACI,IAAQ,EAAgB,QAC3B,MACC,IAAI,KAAK,EAAK,U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/pages/AnalyticsAnalyticsPagePage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Activity, BarChart3, Calendar, PieChart, TrendingUp, Users } from 'lucide-react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n PagePurpose,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from '@burdenoff/fe-libs/ui';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype MonthlyMetric = {\n month: string;\n headcount: number;\n hires: number;\n exits: number;\n openRoles: number;\n};\n\ntype FunnelStage = {\n stage: string;\n count: number;\n color: string;\n};\n\nexport function AnalyticsAnalyticsPagePage() {\n const { employees, departments, jobPostings, candidates, projects } = useCrewFoundryStore();\n\n const monthlyMetrics = useMemo<MonthlyMetric[]>(() => {\n const sortedEmployees = [...employees].sort((a, b) => a.startDate.localeCompare(b.startDate));\n const months = sortedEmployees.slice(-6).map((employee, index) => {\n const month = new Date(employee.startDate).toLocaleString('en-US', { month: 'short' });\n const hires = sortedEmployees.filter(\n (item) =>\n new Date(item.startDate).toLocaleString('en-US', { month: 'short' }) === month &&\n item.status === 'active'\n ).length;\n const exits = sortedEmployees.filter(\n (item) =>\n new Date(item.startDate).toLocaleString('en-US', { month: 'short' }) === month &&\n item.status === 'terminated'\n ).length;\n return {\n month,\n headcount: Math.max(1, sortedEmployees.length - (5 - index) * 2),\n hires,\n exits,\n openRoles: Math.max(\n 0,\n jobPostings.filter((posting) => posting.status === 'active').length - index\n ),\n };\n });\n return months.length > 0 ? months : [];\n }, [employees, jobPostings]);\n\n const deptDistribution = departments.map((department) => ({\n name: department.name,\n count: department.employeeCount,\n budget: department.budget,\n }));\n\n const maxDeptCount = Math.max(1, ...deptDistribution.map((department) => department.count));\n const maxMetric = Math.max(1, ...monthlyMetrics.map((metric) => metric.headcount));\n\n const hiringFunnel = useMemo<FunnelStage[]>(\n () => [\n {\n stage: 'Applications',\n count: jobPostings.reduce((sum, posting) => sum + posting.applicants, 0),\n color: 'bg-status-info-text',\n },\n {\n stage: 'Screening',\n count: candidates.filter((candidate) => candidate.status === 'screening').length,\n color: 'bg-status-info-text',\n },\n {\n stage: 'Interview',\n count: candidates.filter((candidate) => candidate.status === 'interview').length,\n color: 'bg-action-primary-bg',\n },\n {\n stage: 'Assessment',\n count: candidates.filter((candidate) => candidate.status === 'assessment').length,\n color: 'bg-action-primary-bg',\n },\n {\n stage: 'Offer',\n count: candidates.filter((candidate) => candidate.status === 'offer').length,\n color: 'bg-status-warning-text',\n },\n {\n stage: 'Hired',\n count: candidates.filter((candidate) => candidate.status === 'hired').length,\n color: 'bg-status-success-text',\n },\n ],\n [candidates, jobPostings]\n );\n\n const maxFunnel = Math.max(1, ...hiringFunnel.map((stage) => stage.count));\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Workforce Analytics</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n Comprehensive analytics across all HR domains\n </p>\n <PagePurpose className=\"mt-1\">Your workforce analytics hub — track headcount, performance, and engagement trends here to spot what's working and where your teams need attention.</PagePurpose>\n </div>\n <Button variant=\"outline\" size=\"sm\">\n <Calendar className=\"mr-2 h-4 w-4\" />\n Rolling 6 Months\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Workforce</CardTitle>\n <Users className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{employees.length}</div>\n <div className=\"flex items-center text-xs text-status-success-text\">\n <TrendingUp className=\"mr-1 h-3 w-3\" />\n Live headcount data\n </div>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active Departments</CardTitle>\n <PieChart className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{departments.length}</div>\n <p className=\"text-xs text-text-secondary\">All departments tracked</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active Projects</CardTitle>\n <Activity className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n {projects.filter((project) => project.status === 'active').length}\n </div>\n <p className=\"text-xs text-text-secondary\">\n {projects.filter((project) => project.status === 'completed').length} completed\n </p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Hiring Pipeline</CardTitle>\n <BarChart3 className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{candidates.length}</div>\n <p className=\"text-xs text-text-secondary\">candidates in pipeline</p>\n </CardContent>\n </GlassCard>\n </div>\n\n <Tabs defaultValue=\"overview\">\n <TabsList>\n <TabsTrigger value=\"overview\">Overview</TabsTrigger>\n <TabsTrigger value=\"hiring\">Hiring Funnel</TabsTrigger>\n <TabsTrigger value=\"departments\">Departments</TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"overview\" className=\"space-y-4\">\n <Card>\n <CardHeader>\n <CardTitle>Workforce Growth Trend</CardTitle>\n <CardDescription>Monthly headcount and hiring activity</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {monthlyMetrics.map((metric) => (\n <div\n key={`${metric.month}-${metric.headcount}`}\n className=\"flex items-center gap-3\"\n >\n <span className=\"w-10 text-sm text-text-secondary\">{metric.month}</span>\n <div className=\"h-5 flex-1 overflow-hidden rounded bg-bg-sunken\">\n <div\n className=\"h-5 rounded bg-action-primary-bg\"\n style={{ width: `${Math.round((metric.headcount / maxMetric) * 100)}%` }}\n />\n </div>\n <span className=\"w-10 text-right text-sm font-medium\">{metric.headcount}</span>\n <div className=\"flex w-32 justify-end gap-1\">\n <Badge variant=\"default\" className=\"text-[10px]\">\n +{metric.hires} hired\n </Badge>\n <Badge variant=\"secondary\" className=\"text-[10px]\">\n {metric.openRoles} open\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </TabsContent>\n\n <TabsContent value=\"hiring\" className=\"space-y-4\">\n <Card>\n <CardHeader>\n <CardTitle>Hiring Funnel</CardTitle>\n <CardDescription>Candidate pipeline stages</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {hiringFunnel.map((stage) => (\n <div key={stage.stage} className=\"flex items-center gap-3\">\n <span className=\"w-28 text-sm font-medium\">{stage.stage}</span>\n <div className=\"h-6 flex-1 overflow-hidden rounded bg-bg-sunken\">\n <div\n className={`h-6 rounded ${stage.color}`}\n style={{\n width: `${Math.max(Math.round((stage.count / maxFunnel) * 100), 5)}%`,\n }}\n />\n </div>\n <span className=\"w-10 text-right text-sm font-bold\">{stage.count}</span>\n </div>\n ))}\n </CardContent>\n </Card>\n </TabsContent>\n\n <TabsContent value=\"departments\" className=\"space-y-4\">\n <Card>\n <CardHeader>\n <CardTitle>Department Breakdown</CardTitle>\n <CardDescription>Headcount and budget by department</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"mb-2 grid grid-cols-4 gap-2 border-b pb-2 text-xs font-medium text-text-secondary\">\n <span>Department</span>\n <span className=\"text-right\">Headcount</span>\n <span className=\"text-right\">Budget</span>\n <span>Distribution</span>\n </div>\n {deptDistribution\n .sort((a, b) => b.count - a.count)\n .map((department) => (\n <div\n key={department.name}\n className=\"grid grid-cols-4 items-center gap-2 border-b py-2 text-sm last:border-0\"\n >\n <span className=\"font-medium\">{department.name}</span>\n <span className=\"text-right\">{department.count}</span>\n <span className=\"text-right\">${(department.budget / 1000000).toFixed(1)}M</span>\n <div className=\"h-3 overflow-hidden rounded bg-bg-sunken\">\n <div\n className=\"h-3 rounded bg-action-primary-bg/70\"\n style={{ width: `${Math.round((department.count / maxDeptCount) * 100)}%` }}\n />\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </TabsContent>\n </Tabs>\n </div>\n );\n}\n"],"mappings":";;;;;;AAkCA,SAAgB,IAA6B;CAC3C,IAAM,EAAE,cAAW,gBAAa,gBAAa,eAAY,gBAAa,GAAqB,EAErF,IAAiB,QAA+B;EACpD,IAAM,IAAkB,CAAC,GAAG,EAAU,CAAC,MAAM,GAAG,MAAM,EAAE,UAAU,cAAc,EAAE,UAAU,CAAC,EACvF,IAAS,EAAgB,MAAM,GAAG,CAAC,KAAK,GAAU,MAAU;GAChE,IAAM,IAAQ,IAAI,KAAK,EAAS,UAAU,CAAC,eAAe,SAAS,EAAE,OAAO,SAAS,CAAC,EAChF,IAAQ,EAAgB,QAC3B,MACC,IAAI,KAAK,EAAK,UAAU,CAAC,eAAe,SAAS,EAAE,OAAO,SAAS,CAAC,KAAK,KACzE,EAAK,WAAW,SACnB,CAAC,QACI,IAAQ,EAAgB,QAC3B,MACC,IAAI,KAAK,EAAK,UAAU,CAAC,eAAe,SAAS,EAAE,OAAO,SAAS,CAAC,KAAK,KACzE,EAAK,WAAW,aACnB,CAAC;AACF,UAAO;IACL;IACA,WAAW,KAAK,IAAI,GAAG,EAAgB,UAAU,IAAI,KAAS,EAAE;IAChE;IACA;IACA,WAAW,KAAK,IACd,GACA,EAAY,QAAQ,MAAY,EAAQ,WAAW,SAAS,CAAC,SAAS,EACvE;IACF;IACD;AACF,SAAO,EAAO,SAAS,IAAI,IAAS,EAAE;IACrC,CAAC,GAAW,EAAY,CAAC,EAEtB,IAAmB,EAAY,KAAK,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