@burdenoff/microfe-crewfoundry 2026.625.1 → 2026.626.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/crewfoundry/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
|
@@ -1,163 +1,197 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
2
|
import { useState as t } from "react";
|
|
3
3
|
import { Activity as n, Briefcase as r, Calendar as i, TrendingUp as a, Users as o } from "lucide-react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { useNavigate as s } from "react-router-dom";
|
|
5
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { AuroraBackground as u, Badge as d, Button as f, Card as p, CardContent as m, CardDescription as h, CardHeader as g, CardTitle as _, EmphasisPanel as v, GlassCard as y, GradientText as b, IllustratedEmptyState as x, NextSteps as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
|
|
7
|
+
import { useI18n as w } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
7
8
|
//#region src/crewfoundry/pages/DashboardDashboardPagePage.tsx
|
|
8
|
-
function
|
|
9
|
-
let { t:
|
|
10
|
-
let n =
|
|
9
|
+
function T() {
|
|
10
|
+
let { t: T } = w(), E = s(), { employees: D, jobPostings: O, leaveRequests: k, notifications: A, projects: j } = e(), [M, N] = t("month"), P = (e, t) => {
|
|
11
|
+
let n = T(e);
|
|
11
12
|
return n === e ? t : n;
|
|
12
|
-
},
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
}, F = D.filter((e) => e.status === "active").length, I = D.filter((e) => e.status === "on_leave").length, L = O.filter((e) => e.status === "active").length, R = O.reduce((e, t) => e + t.applicants, 0), z = k.filter((e) => e.status === "pending").length, B = A.filter((e) => !e.read).length, V = j.filter((e) => e.status === "active").length, H = (D.reduce((e, t) => e + t.performanceScore, 0) / D.length).toFixed(1), U = D.reduce((e, t) => (e[t.department] = (e[t.department] || 0) + 1, e), {}), W = Math.max(...Object.values(U));
|
|
14
|
+
return /* @__PURE__ */ l("div", {
|
|
14
15
|
className: "space-y-6 p-6",
|
|
15
16
|
children: [
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
+
/* @__PURE__ */ l("div", {
|
|
17
18
|
className: "relative overflow-hidden rounded-xl border border-border-seam bg-gloss-card p-6",
|
|
18
|
-
children: [/* @__PURE__ */
|
|
19
|
+
children: [/* @__PURE__ */ c(u, { intensity: "subtle" }), /* @__PURE__ */ l("div", {
|
|
19
20
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
20
|
-
children: [/* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
children: [/* @__PURE__ */ l("div", { children: [
|
|
22
|
+
/* @__PURE__ */ c("h1", {
|
|
23
|
+
className: "text-2xl font-semibold",
|
|
24
|
+
children: /* @__PURE__ */ c(b, { children: P("crewfoundry.dashboard.title", "Workforce Dashboard") })
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ c("p", {
|
|
27
|
+
className: "text-sm text-text-secondary",
|
|
28
|
+
children: P("crewfoundry.dashboard.subtitle", "Overview of your organization's workforce metrics")
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ c(C, {
|
|
31
|
+
className: "mt-2",
|
|
32
|
+
children: P("crewfoundry.dashboard.purpose", "Your workforce command center — see headcount, hiring, performance, and projects at a glance, then jump straight to the area that needs your attention.")
|
|
33
|
+
})
|
|
34
|
+
] }), /* @__PURE__ */ c("div", {
|
|
27
35
|
className: "flex gap-2",
|
|
28
36
|
children: [
|
|
29
37
|
"week",
|
|
30
38
|
"month",
|
|
31
39
|
"quarter"
|
|
32
|
-
].map((e) => /* @__PURE__ */
|
|
33
|
-
variant:
|
|
40
|
+
].map((e) => /* @__PURE__ */ c(f, {
|
|
41
|
+
variant: M === e ? "default" : "outline",
|
|
34
42
|
size: "sm",
|
|
35
|
-
onClick: () =>
|
|
36
|
-
children:
|
|
43
|
+
onClick: () => N(e),
|
|
44
|
+
children: P(`crewfoundry.dashboard.period.${e}`, e.charAt(0).toUpperCase() + e.slice(1))
|
|
37
45
|
}, e))
|
|
38
46
|
})]
|
|
39
47
|
})]
|
|
40
48
|
}),
|
|
41
|
-
/* @__PURE__ */ c(
|
|
49
|
+
/* @__PURE__ */ c(S, {
|
|
50
|
+
storageKey: "crewfoundry-dashboard",
|
|
51
|
+
steps: [
|
|
52
|
+
{
|
|
53
|
+
id: "employees",
|
|
54
|
+
label: P("crewfoundry.dashboard.next.employees", "Review your team"),
|
|
55
|
+
description: P("crewfoundry.dashboard.next.employeesDesc", "Open the employee directory to see who is active and on leave."),
|
|
56
|
+
icon: /* @__PURE__ */ c(o, { className: "h-4 w-4" }),
|
|
57
|
+
onClick: () => E("../../hr/employees-page")
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "hiring",
|
|
61
|
+
label: P("crewfoundry.dashboard.next.hiring", "Post a new job"),
|
|
62
|
+
description: P("crewfoundry.dashboard.next.hiringDesc", "Create an opening to start collecting applicants."),
|
|
63
|
+
icon: /* @__PURE__ */ c(r, { className: "h-4 w-4" }),
|
|
64
|
+
onClick: () => E("../../hiring/create-job-page")
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: "projects",
|
|
68
|
+
label: P("crewfoundry.dashboard.next.projects", "Check active projects"),
|
|
69
|
+
description: P("crewfoundry.dashboard.next.projectsDesc", "Track progress and budgets across in-flight work."),
|
|
70
|
+
icon: /* @__PURE__ */ c(n, { className: "h-4 w-4" }),
|
|
71
|
+
onClick: () => E("../../projects/projects-page")
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ l("div", {
|
|
42
76
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
|
|
43
77
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ l(y, {
|
|
45
79
|
treatment: "glass",
|
|
46
80
|
glow: !0,
|
|
47
81
|
className: "border-border-seam",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
82
|
+
children: [/* @__PURE__ */ l(g, {
|
|
49
83
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ c(_, {
|
|
51
85
|
className: "text-sm font-medium",
|
|
52
|
-
children:
|
|
53
|
-
}), /* @__PURE__ */
|
|
54
|
-
}), /* @__PURE__ */
|
|
86
|
+
children: P("crewfoundry.dashboard.stats.totalEmployees", "Total Employees")
|
|
87
|
+
}), /* @__PURE__ */ c(o, { className: "h-4 w-4 text-text-secondary" })]
|
|
88
|
+
}), /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c("div", {
|
|
55
89
|
className: "text-2xl font-bold tabular-nums",
|
|
56
|
-
children:
|
|
57
|
-
}), /* @__PURE__ */
|
|
90
|
+
children: D.length
|
|
91
|
+
}), /* @__PURE__ */ l("p", {
|
|
58
92
|
className: "text-xs text-text-secondary",
|
|
59
93
|
children: [
|
|
60
|
-
|
|
94
|
+
F,
|
|
61
95
|
" ",
|
|
62
|
-
|
|
96
|
+
P("crewfoundry.dashboard.stats.active", "active"),
|
|
63
97
|
", ",
|
|
64
|
-
|
|
98
|
+
I,
|
|
65
99
|
" ",
|
|
66
|
-
|
|
100
|
+
P("crewfoundry.dashboard.stats.onLeave", "on leave")
|
|
67
101
|
]
|
|
68
102
|
})] })]
|
|
69
103
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ l(y, {
|
|
71
105
|
treatment: "metric",
|
|
72
106
|
className: "border-border-seam",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
107
|
+
children: [/* @__PURE__ */ l(g, {
|
|
74
108
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
109
|
+
children: [/* @__PURE__ */ c(_, {
|
|
76
110
|
className: "text-sm font-medium",
|
|
77
|
-
children:
|
|
78
|
-
}), /* @__PURE__ */
|
|
79
|
-
}), /* @__PURE__ */
|
|
111
|
+
children: P("crewfoundry.dashboard.stats.openPositions", "Open Positions")
|
|
112
|
+
}), /* @__PURE__ */ c(r, { className: "h-4 w-4 text-text-secondary" })]
|
|
113
|
+
}), /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c("div", {
|
|
80
114
|
className: "text-2xl font-bold tabular-nums",
|
|
81
|
-
children:
|
|
82
|
-
}), /* @__PURE__ */
|
|
115
|
+
children: L
|
|
116
|
+
}), /* @__PURE__ */ l("p", {
|
|
83
117
|
className: "text-xs text-text-secondary",
|
|
84
118
|
children: [
|
|
85
|
-
|
|
119
|
+
R,
|
|
86
120
|
" ",
|
|
87
|
-
|
|
121
|
+
P("crewfoundry.dashboard.stats.totalApplicants", "total applicants")
|
|
88
122
|
]
|
|
89
123
|
})] })]
|
|
90
124
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ l(y, {
|
|
92
126
|
treatment: "metric",
|
|
93
127
|
className: "border-border-seam",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ l(g, {
|
|
95
129
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ c(_, {
|
|
97
131
|
className: "text-sm font-medium",
|
|
98
|
-
children:
|
|
99
|
-
}), /* @__PURE__ */
|
|
100
|
-
}), /* @__PURE__ */
|
|
132
|
+
children: P("crewfoundry.dashboard.stats.avgPerformance", "Avg Performance")
|
|
133
|
+
}), /* @__PURE__ */ c(a, { className: "h-4 w-4 text-text-secondary" })]
|
|
134
|
+
}), /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ l("div", {
|
|
101
135
|
className: "text-2xl font-bold tabular-nums",
|
|
102
|
-
children: [
|
|
103
|
-
}), /* @__PURE__ */
|
|
136
|
+
children: [H, "/5"]
|
|
137
|
+
}), /* @__PURE__ */ c("p", {
|
|
104
138
|
className: "text-xs text-text-secondary",
|
|
105
|
-
children:
|
|
139
|
+
children: P("crewfoundry.dashboard.stats.performanceTrend", "+0.2 from last quarter")
|
|
106
140
|
})] })]
|
|
107
141
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ l(y, {
|
|
109
143
|
treatment: "metric",
|
|
110
144
|
className: "border-border-seam",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ l(g, {
|
|
112
146
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ c(_, {
|
|
114
148
|
className: "text-sm font-medium",
|
|
115
|
-
children:
|
|
116
|
-
}), /* @__PURE__ */
|
|
117
|
-
}), /* @__PURE__ */
|
|
149
|
+
children: P("crewfoundry.dashboard.stats.activeProjects", "Active Projects")
|
|
150
|
+
}), /* @__PURE__ */ c(n, { className: "h-4 w-4 text-text-secondary" })]
|
|
151
|
+
}), /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c("div", {
|
|
118
152
|
className: "text-2xl font-bold tabular-nums",
|
|
119
|
-
children:
|
|
120
|
-
}), /* @__PURE__ */
|
|
153
|
+
children: V
|
|
154
|
+
}), /* @__PURE__ */ l("p", {
|
|
121
155
|
className: "text-xs text-text-secondary",
|
|
122
156
|
children: [
|
|
123
|
-
|
|
157
|
+
z,
|
|
124
158
|
" ",
|
|
125
|
-
|
|
159
|
+
P("crewfoundry.dashboard.stats.pendingLeaveRequests", "pending leave requests")
|
|
126
160
|
]
|
|
127
161
|
})] })]
|
|
128
162
|
})
|
|
129
163
|
]
|
|
130
164
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ l("div", {
|
|
132
166
|
className: "grid gap-4 md:grid-cols-7",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ l(v, {
|
|
134
168
|
className: "col-span-4",
|
|
135
169
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ c("div", {
|
|
137
171
|
className: "mb-1 text-lg font-semibold",
|
|
138
|
-
children:
|
|
172
|
+
children: P("crewfoundry.dashboard.departmentHeadcount.title", "Department Headcount")
|
|
139
173
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ c("p", {
|
|
141
175
|
className: "mb-4 text-sm text-text-secondary",
|
|
142
|
-
children:
|
|
176
|
+
children: P("crewfoundry.dashboard.departmentHeadcount.description", "Employee distribution across departments")
|
|
143
177
|
}),
|
|
144
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ c("div", {
|
|
145
179
|
className: "space-y-3",
|
|
146
|
-
children: Object.entries(
|
|
180
|
+
children: Object.entries(U).sort(([, e], [, t]) => t - e).map(([e, t]) => /* @__PURE__ */ l("div", {
|
|
147
181
|
className: "flex items-center gap-3",
|
|
148
182
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ c("span", {
|
|
150
184
|
className: "w-24 text-sm text-text-secondary truncate",
|
|
151
185
|
children: e
|
|
152
186
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ c("div", {
|
|
154
188
|
className: "flex-1 h-4 bg-bg-sunken rounded overflow-hidden",
|
|
155
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ c("div", {
|
|
156
190
|
className: "h-4 bg-action-primary-bg rounded",
|
|
157
|
-
style: { width: `${Math.round(t /
|
|
191
|
+
style: { width: `${Math.round(t / W * 100)}%` }
|
|
158
192
|
})
|
|
159
193
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ c("span", {
|
|
161
195
|
className: "text-sm font-medium w-8 text-right tabular-nums",
|
|
162
196
|
children: t
|
|
163
197
|
})
|
|
@@ -165,28 +199,28 @@ function S() {
|
|
|
165
199
|
}, e))
|
|
166
200
|
})
|
|
167
201
|
]
|
|
168
|
-
}), /* @__PURE__ */
|
|
202
|
+
}), /* @__PURE__ */ l(p, {
|
|
169
203
|
className: "col-span-3",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ l(g, {
|
|
171
205
|
className: "flex flex-row items-center justify-between",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ c(_, { children: P("crewfoundry.dashboard.notifications.title", "Recent Notifications") }), /* @__PURE__ */ l(d, {
|
|
173
207
|
variant: "secondary",
|
|
174
208
|
children: [
|
|
175
|
-
|
|
209
|
+
B,
|
|
176
210
|
" ",
|
|
177
|
-
|
|
211
|
+
P("crewfoundry.dashboard.notifications.unread", "unread")
|
|
178
212
|
]
|
|
179
213
|
})]
|
|
180
|
-
}), /* @__PURE__ */
|
|
214
|
+
}), /* @__PURE__ */ c(m, {
|
|
181
215
|
className: "space-y-4",
|
|
182
|
-
children:
|
|
216
|
+
children: A.slice(0, 5).map((e) => /* @__PURE__ */ l("div", {
|
|
183
217
|
className: "flex items-start gap-3",
|
|
184
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ c("div", { className: `mt-1 h-2 w-2 rounded-full flex-shrink-0 motion-safe:animate-vc-glow-pulse ${e.type === "success" ? "bg-status-success-text" : e.type === "warning" ? "bg-status-warning-text" : e.type === "error" ? "bg-status-error-text" : "bg-status-info-text"}` }), /* @__PURE__ */ l("div", {
|
|
185
219
|
className: "flex-1 min-w-0",
|
|
186
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ c("p", {
|
|
187
221
|
className: `text-sm ${e.read ? "text-text-secondary" : "font-medium"}`,
|
|
188
222
|
children: e.title
|
|
189
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ c("p", {
|
|
190
224
|
className: "text-xs text-text-secondary truncate",
|
|
191
225
|
children: e.message
|
|
192
226
|
})]
|
|
@@ -195,59 +229,59 @@ function S() {
|
|
|
195
229
|
})]
|
|
196
230
|
})]
|
|
197
231
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ l("div", {
|
|
199
233
|
className: "grid gap-4 md:grid-cols-2",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ l(p, { children: [/* @__PURE__ */ l(g, { children: [/* @__PURE__ */ c(_, { children: P("crewfoundry.dashboard.upcomingInterviews.title", "Upcoming Interviews") }), /* @__PURE__ */ c(h, { children: P("crewfoundry.dashboard.upcomingInterviews.description", "Scheduled for this week") })] }), /* @__PURE__ */ c(m, {
|
|
201
235
|
className: "space-y-3",
|
|
202
|
-
children:
|
|
236
|
+
children: j.filter((e) => e.status === "active").slice(0, 4).map((e) => /* @__PURE__ */ l("div", {
|
|
203
237
|
className: "flex items-center justify-between rounded border p-3",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
|
|
205
239
|
className: "text-sm font-medium",
|
|
206
240
|
children: e.name
|
|
207
|
-
}), /* @__PURE__ */
|
|
241
|
+
}), /* @__PURE__ */ c("p", {
|
|
208
242
|
className: "text-xs text-text-secondary",
|
|
209
243
|
children: e.teamName
|
|
210
|
-
})] }), /* @__PURE__ */
|
|
244
|
+
})] }), /* @__PURE__ */ l("div", {
|
|
211
245
|
className: "flex items-center gap-2",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ c("div", {
|
|
213
247
|
className: "w-24 h-2 bg-bg-sunken rounded overflow-hidden",
|
|
214
|
-
children: /* @__PURE__ */
|
|
248
|
+
children: /* @__PURE__ */ c("div", {
|
|
215
249
|
className: "h-2 bg-action-primary-bg rounded",
|
|
216
250
|
style: { width: `${e.progress}%` }
|
|
217
251
|
})
|
|
218
|
-
}), /* @__PURE__ */
|
|
252
|
+
}), /* @__PURE__ */ l("span", {
|
|
219
253
|
className: "text-xs text-text-secondary",
|
|
220
254
|
children: [e.progress, "%"]
|
|
221
255
|
})]
|
|
222
256
|
})]
|
|
223
257
|
}, e.id))
|
|
224
|
-
})] }), /* @__PURE__ */
|
|
258
|
+
})] }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ l(g, { children: [/* @__PURE__ */ c(_, { children: P("crewfoundry.dashboard.leaveRequests.title", "Recent Leave Requests") }), /* @__PURE__ */ c(h, { children: P("crewfoundry.dashboard.leaveRequests.description", "Pending approval") })] }), /* @__PURE__ */ l(m, {
|
|
225
259
|
className: "space-y-3",
|
|
226
|
-
children: [
|
|
260
|
+
children: [k.length === 0 && /* @__PURE__ */ c(x, {
|
|
227
261
|
illustration: "empty-data",
|
|
228
|
-
title:
|
|
229
|
-
description:
|
|
230
|
-
}),
|
|
262
|
+
title: P("crewfoundry.dashboard.leaveRequests.emptyTitle", "No leave requests"),
|
|
263
|
+
description: P("crewfoundry.dashboard.leaveRequests.emptyDescription", "Pending leave requests will appear here.")
|
|
264
|
+
}), k.map((e) => /* @__PURE__ */ l("div", {
|
|
231
265
|
className: "flex items-center justify-between rounded border p-3",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ c("div", {
|
|
233
267
|
className: "flex items-center gap-3",
|
|
234
|
-
children: /* @__PURE__ */
|
|
268
|
+
children: /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
|
|
235
269
|
className: "text-sm font-medium",
|
|
236
270
|
children: e.employeeName
|
|
237
|
-
}), /* @__PURE__ */
|
|
271
|
+
}), /* @__PURE__ */ l("div", {
|
|
238
272
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
273
|
+
children: [/* @__PURE__ */ c(i, { className: "h-3 w-3" }), /* @__PURE__ */ l("span", { children: [
|
|
240
274
|
e.startDate,
|
|
241
275
|
" - ",
|
|
242
276
|
e.endDate
|
|
243
277
|
] })]
|
|
244
278
|
})] })
|
|
245
|
-
}), /* @__PURE__ */
|
|
279
|
+
}), /* @__PURE__ */ l("div", {
|
|
246
280
|
className: "flex items-center gap-2",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
281
|
+
children: [/* @__PURE__ */ c(d, {
|
|
248
282
|
variant: e.status === "approved" ? "default" : e.status === "pending" ? "secondary" : "destructive",
|
|
249
283
|
children: e.status
|
|
250
|
-
}), /* @__PURE__ */
|
|
284
|
+
}), /* @__PURE__ */ c(d, {
|
|
251
285
|
variant: "outline",
|
|
252
286
|
children: e.type
|
|
253
287
|
})]
|
|
@@ -259,6 +293,6 @@ function S() {
|
|
|
259
293
|
});
|
|
260
294
|
}
|
|
261
295
|
//#endregion
|
|
262
|
-
export {
|
|
296
|
+
export { T as DashboardDashboardPagePage };
|
|
263
297
|
|
|
264
298
|
//# sourceMappingURL=DashboardDashboardPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardDashboardPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/DashboardDashboardPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n AuroraBackground,\n EmphasisPanel,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n} from '@burdenoff/fe-libs/ui';\nimport {\n Activity,\n ArrowUpRight,\n Briefcase,\n Calendar,\n Clock,\n TrendingUp,\n Users,\n UserCheck,\n} from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function DashboardDashboardPagePage() {\n const { t: translate } = useI18n();\n const { employees, jobPostings, leaveRequests, notifications, projects } = useCrewFoundryStore();\n const [selectedPeriod, setSelectedPeriod] = useState<'week' | 'month' | 'quarter'>('month');\n const t = (key: string, fallback: string) => {\n const value = translate(key);\n return value === key ? fallback : value;\n };\n\n const activeEmployees = employees.filter((e) => e.status === 'active').length;\n const onLeave = employees.filter((e) => e.status === 'on_leave').length;\n const openPositions = jobPostings.filter((j) => j.status === 'active').length;\n const totalApplicants = jobPostings.reduce((sum, j) => sum + j.applicants, 0);\n const pendingLeaves = leaveRequests.filter((l) => l.status === 'pending').length;\n const unreadNotifications = notifications.filter((n) => !n.read).length;\n const activeProjects = projects.filter((p) => p.status === 'active').length;\n const avgPerformance = (\n employees.reduce((sum, e) => sum + e.performanceScore, 0) / employees.length\n ).toFixed(1);\n\n const departmentHeadcount = employees.reduce<Record<string, number>>((acc, e) => {\n acc[e.department] = (acc[e.department] || 0) + 1;\n return acc;\n }, {});\n\n const maxHeadcount = Math.max(...Object.values(departmentHeadcount));\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"relative overflow-hidden rounded-xl border border-border-seam bg-gloss-card p-6\">\n <AuroraBackground intensity=\"subtle\" />\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>{t('crewfoundry.dashboard.title', 'Workforce Dashboard')}</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {t(\n 'crewfoundry.dashboard.subtitle',\n \"Overview of your organization's workforce metrics\"\n )}\n </p>\n </div>\n <div className=\"flex gap-2\">\n {(['week', 'month', 'quarter'] as const).map((period) => (\n <Button\n key={period}\n variant={selectedPeriod === period ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => setSelectedPeriod(period)}\n >\n {t(\n `crewfoundry.dashboard.period.${period}`,\n period.charAt(0).toUpperCase() + period.slice(1)\n )}\n </Button>\n ))}\n </div>\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\">\n {t('crewfoundry.dashboard.stats.totalEmployees', 'Total Employees')}\n </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\">\n {activeEmployees} {t('crewfoundry.dashboard.stats.active', 'active')}, {onLeave}{' '}\n {t('crewfoundry.dashboard.stats.onLeave', 'on leave')}\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\">\n {t('crewfoundry.dashboard.stats.openPositions', 'Open Positions')}\n </CardTitle>\n <Briefcase className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{openPositions}</div>\n <p className=\"text-xs text-text-secondary\">\n {totalApplicants}{' '}\n {t('crewfoundry.dashboard.stats.totalApplicants', 'total applicants')}\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\">\n {t('crewfoundry.dashboard.stats.avgPerformance', 'Avg Performance')}\n </CardTitle>\n <TrendingUp className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{avgPerformance}/5</div>\n <p className=\"text-xs text-text-secondary\">\n {t('crewfoundry.dashboard.stats.performanceTrend', '+0.2 from last quarter')}\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\">\n {t('crewfoundry.dashboard.stats.activeProjects', 'Active Projects')}\n </CardTitle>\n <Activity className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{activeProjects}</div>\n <p className=\"text-xs text-text-secondary\">\n {pendingLeaves}{' '}\n {t('crewfoundry.dashboard.stats.pendingLeaveRequests', 'pending leave requests')}\n </p>\n </CardContent>\n </GlassCard>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-7\">\n <EmphasisPanel className=\"col-span-4\">\n <div className=\"mb-1 text-lg font-semibold\">\n {t('crewfoundry.dashboard.departmentHeadcount.title', 'Department Headcount')}\n </div>\n <p className=\"mb-4 text-sm text-text-secondary\">\n {t(\n 'crewfoundry.dashboard.departmentHeadcount.description',\n 'Employee distribution across departments'\n )}\n </p>\n <div className=\"space-y-3\">\n {Object.entries(departmentHeadcount)\n .sort(([, a], [, b]) => b - a)\n .map(([dept, count]) => (\n <div key={dept} className=\"flex items-center gap-3\">\n <span className=\"w-24 text-sm text-text-secondary truncate\">{dept}</span>\n <div className=\"flex-1 h-4 bg-bg-sunken rounded overflow-hidden\">\n <div\n className=\"h-4 bg-action-primary-bg rounded\"\n style={{ width: `${Math.round((count / maxHeadcount) * 100)}%` }}\n />\n </div>\n <span className=\"text-sm font-medium w-8 text-right tabular-nums\">{count}</span>\n </div>\n ))}\n </div>\n </EmphasisPanel>\n\n <Card className=\"col-span-3\">\n <CardHeader className=\"flex flex-row items-center justify-between\">\n <CardTitle>\n {t('crewfoundry.dashboard.notifications.title', 'Recent Notifications')}\n </CardTitle>\n <Badge variant=\"secondary\">\n {unreadNotifications} {t('crewfoundry.dashboard.notifications.unread', 'unread')}\n </Badge>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {notifications.slice(0, 5).map((notif) => (\n <div key={notif.id} className=\"flex items-start gap-3\">\n <div\n className={`mt-1 h-2 w-2 rounded-full flex-shrink-0 motion-safe:animate-vc-glow-pulse ${\n notif.type === 'success'\n ? 'bg-status-success-text'\n : notif.type === 'warning'\n ? 'bg-status-warning-text'\n : notif.type === 'error'\n ? 'bg-status-error-text'\n : 'bg-status-info-text'\n }`}\n />\n <div className=\"flex-1 min-w-0\">\n <p className={`text-sm ${notif.read ? 'text-text-secondary' : 'font-medium'}`}>\n {notif.title}\n </p>\n <p className=\"text-xs text-text-secondary truncate\">{notif.message}</p>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n <Card>\n <CardHeader>\n <CardTitle>\n {t('crewfoundry.dashboard.upcomingInterviews.title', 'Upcoming Interviews')}\n </CardTitle>\n <CardDescription>\n {t('crewfoundry.dashboard.upcomingInterviews.description', 'Scheduled for this week')}\n </CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {projects\n .filter((p) => p.status === 'active')\n .slice(0, 4)\n .map((project) => (\n <div\n key={project.id}\n className=\"flex items-center justify-between rounded border p-3\"\n >\n <div>\n <p className=\"text-sm font-medium\">{project.name}</p>\n <p className=\"text-xs text-text-secondary\">{project.teamName}</p>\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"w-24 h-2 bg-bg-sunken rounded overflow-hidden\">\n <div\n className=\"h-2 bg-action-primary-bg rounded\"\n style={{ width: `${project.progress}%` }}\n />\n </div>\n <span className=\"text-xs text-text-secondary\">{project.progress}%</span>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>\n {t('crewfoundry.dashboard.leaveRequests.title', 'Recent Leave Requests')}\n </CardTitle>\n <CardDescription>\n {t('crewfoundry.dashboard.leaveRequests.description', 'Pending approval')}\n </CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {leaveRequests.length === 0 && (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={t('crewfoundry.dashboard.leaveRequests.emptyTitle', 'No leave requests')}\n description={t(\n 'crewfoundry.dashboard.leaveRequests.emptyDescription',\n 'Pending leave requests will appear here.'\n )}\n />\n )}\n {leaveRequests.map((leave) => (\n <div key={leave.id} className=\"flex items-center justify-between rounded border p-3\">\n <div className=\"flex items-center gap-3\">\n <div>\n <p className=\"text-sm font-medium\">{leave.employeeName}</p>\n <div className=\"flex items-center gap-2 text-xs text-text-secondary\">\n <Calendar className=\"h-3 w-3\" />\n <span>\n {leave.startDate} - {leave.endDate}\n </span>\n </div>\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <Badge\n variant={\n leave.status === 'approved'\n ? 'default'\n : leave.status === 'pending'\n ? 'secondary'\n : 'destructive'\n }\n >\n {leave.status}\n </Badge>\n <Badge variant=\"outline\">{leave.type}</Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;AA4BA,SAAgB,IAA6B;CAC3C,IAAM,EAAE,GAAG,MAAc,GAAS,EAC5B,EAAE,cAAW,gBAAa,kBAAe,kBAAe,gBAAa,GAAqB,EAC1F,CAAC,GAAgB,KAAqB,EAAuC,QAAQ,EACrF,KAAK,GAAa,MAAqB;EAC3C,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAG9B,IAAkB,EAAU,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,QACjE,IAAU,EAAU,QAAQ,MAAM,EAAE,WAAW,WAAW,CAAC,QAC3D,IAAgB,EAAY,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,QACjE,IAAkB,EAAY,QAAQ,GAAK,MAAM,IAAM,EAAE,YAAY,EAAE,EACvE,IAAgB,EAAc,QAAQ,MAAM,EAAE,WAAW,UAAU,CAAC,QACpE,IAAsB,EAAc,QAAQ,MAAM,CAAC,EAAE,KAAK,CAAC,QAC3D,IAAiB,EAAS,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,QAC/D,KACJ,EAAU,QAAQ,GAAK,MAAM,IAAM,EAAE,kBAAkB,EAAE,GAAG,EAAU,QACtE,QAAQ,EAAE,EAEN,IA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D,EAAA,UACG,EAAE,mDAAmD,mBAAmB,EACzD,CAAA,CACP,EAAA,CAAA,EACb,kBAAC,GAAD;KAAa,WAAU;eAAvB,CACG,EAAc,WAAW,KACxB,kBAAC,GAAD;MACE,cAAa;MACb,OAAO,EAAE,kDAAkD,oBAAoB;MAC/E,aAAa,EACX,wDACA,2CACD;MACD,CAAA,EAEH,EAAc,KAAK,MAClB,kBAAC,OAAD;MAAoB,WAAU;gBAA9B,CACE,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;QAAG,WAAU;kBAAuB,EAAM;QAAiB,CAAA,EAC3D,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,GAAD,EAAU,WAAU,WAAY,CAAA,EAChC,kBAAC,QAAD,EAAA,UAAA;SACG,EAAM;SAAU;SAAI,EAAM;SACtB,EAAA,CAAA,CACH;UACF,EAAA,CAAA;OACF,CAAA,EACN,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,GAAD;QACE,SACE,EAAM,WAAW,aACb,YACA,EAAM,WAAW,YACf,cACA;kBAGP,EAAM;QACD,CAAA,EACR,kBAAC,GAAD;QAAO,SAAQ;kBAAW,EAAM;QAAa,CAAA,CACzC;SACF;QA1BI,EAAM,GA0BV,CACN,CACU;OACT,EAAA,CAAA,CACH;;GACF"}
|
|
1
|
+
{"version":3,"file":"DashboardDashboardPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/DashboardDashboardPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n AuroraBackground,\n EmphasisPanel,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n NextSteps,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport {\n Activity,\n ArrowUpRight,\n Briefcase,\n Calendar,\n Clock,\n TrendingUp,\n Users,\n UserCheck,\n} from 'lucide-react';\nimport { useNavigate } from 'react-router-dom';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function DashboardDashboardPagePage() {\n const { t: translate } = useI18n();\n const navigate = useNavigate();\n const { employees, jobPostings, leaveRequests, notifications, projects } = useCrewFoundryStore();\n const [selectedPeriod, setSelectedPeriod] = useState<'week' | 'month' | 'quarter'>('month');\n const t = (key: string, fallback: string) => {\n const value = translate(key);\n return value === key ? fallback : value;\n };\n\n const activeEmployees = employees.filter((e) => e.status === 'active').length;\n const onLeave = employees.filter((e) => e.status === 'on_leave').length;\n const openPositions = jobPostings.filter((j) => j.status === 'active').length;\n const totalApplicants = jobPostings.reduce((sum, j) => sum + j.applicants, 0);\n const pendingLeaves = leaveRequests.filter((l) => l.status === 'pending').length;\n const unreadNotifications = notifications.filter((n) => !n.read).length;\n const activeProjects = projects.filter((p) => p.status === 'active').length;\n const avgPerformance = (\n employees.reduce((sum, e) => sum + e.performanceScore, 0) / employees.length\n ).toFixed(1);\n\n const departmentHeadcount = employees.reduce<Record<string, number>>((acc, e) => {\n acc[e.department] = (acc[e.department] || 0) + 1;\n return acc;\n }, {});\n\n const maxHeadcount = Math.max(...Object.values(departmentHeadcount));\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"relative overflow-hidden rounded-xl border border-border-seam bg-gloss-card p-6\">\n <AuroraBackground intensity=\"subtle\" />\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>{t('crewfoundry.dashboard.title', 'Workforce Dashboard')}</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {t(\n 'crewfoundry.dashboard.subtitle',\n \"Overview of your organization's workforce metrics\"\n )}\n </p>\n <PagePurpose className=\"mt-2\">\n {t(\n 'crewfoundry.dashboard.purpose',\n 'Your workforce command center — see headcount, hiring, performance, and projects at a glance, then jump straight to the area that needs your attention.'\n )}\n </PagePurpose>\n </div>\n <div className=\"flex gap-2\">\n {(['week', 'month', 'quarter'] as const).map((period) => (\n <Button\n key={period}\n variant={selectedPeriod === period ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => setSelectedPeriod(period)}\n >\n {t(\n `crewfoundry.dashboard.period.${period}`,\n period.charAt(0).toUpperCase() + period.slice(1)\n )}\n </Button>\n ))}\n </div>\n </div>\n </div>\n\n <NextSteps\n storageKey=\"crewfoundry-dashboard\"\n steps={[\n {\n id: 'employees',\n label: t('crewfoundry.dashboard.next.employees', 'Review your team'),\n description: t(\n 'crewfoundry.dashboard.next.employeesDesc',\n 'Open the employee directory to see who is active and on leave.'\n ),\n icon: <Users className=\"h-4 w-4\" />,\n onClick: () => navigate('../../hr/employees-page'),\n },\n {\n id: 'hiring',\n label: t('crewfoundry.dashboard.next.hiring', 'Post a new job'),\n description: t(\n 'crewfoundry.dashboard.next.hiringDesc',\n 'Create an opening to start collecting applicants.'\n ),\n icon: <Briefcase className=\"h-4 w-4\" />,\n onClick: () => navigate('../../hiring/create-job-page'),\n },\n {\n id: 'projects',\n label: t('crewfoundry.dashboard.next.projects', 'Check active projects'),\n description: t(\n 'crewfoundry.dashboard.next.projectsDesc',\n 'Track progress and budgets across in-flight work.'\n ),\n icon: <Activity className=\"h-4 w-4\" />,\n onClick: () => navigate('../../projects/projects-page'),\n },\n ]}\n />\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\">\n {t('crewfoundry.dashboard.stats.totalEmployees', 'Total Employees')}\n </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\">\n {activeEmployees} {t('crewfoundry.dashboard.stats.active', 'active')}, {onLeave}{' '}\n {t('crewfoundry.dashboard.stats.onLeave', 'on leave')}\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\">\n {t('crewfoundry.dashboard.stats.openPositions', 'Open Positions')}\n </CardTitle>\n <Briefcase className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{openPositions}</div>\n <p className=\"text-xs text-text-secondary\">\n {totalApplicants}{' '}\n {t('crewfoundry.dashboard.stats.totalApplicants', 'total applicants')}\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\">\n {t('crewfoundry.dashboard.stats.avgPerformance', 'Avg Performance')}\n </CardTitle>\n <TrendingUp className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{avgPerformance}/5</div>\n <p className=\"text-xs text-text-secondary\">\n {t('crewfoundry.dashboard.stats.performanceTrend', '+0.2 from last quarter')}\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\">\n {t('crewfoundry.dashboard.stats.activeProjects', 'Active Projects')}\n </CardTitle>\n <Activity className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{activeProjects}</div>\n <p className=\"text-xs text-text-secondary\">\n {pendingLeaves}{' '}\n {t('crewfoundry.dashboard.stats.pendingLeaveRequests', 'pending leave requests')}\n </p>\n </CardContent>\n </GlassCard>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-7\">\n <EmphasisPanel className=\"col-span-4\">\n <div className=\"mb-1 text-lg font-semibold\">\n {t('crewfoundry.dashboard.departmentHeadcount.title', 'Department Headcount')}\n </div>\n <p className=\"mb-4 text-sm text-text-secondary\">\n {t(\n 'crewfoundry.dashboard.departmentHeadcount.description',\n 'Employee distribution across departments'\n )}\n </p>\n <div className=\"space-y-3\">\n {Object.entries(departmentHeadcount)\n .sort(([, a], [, b]) => b - a)\n .map(([dept, count]) => (\n <div key={dept} className=\"flex items-center gap-3\">\n <span className=\"w-24 text-sm text-text-secondary truncate\">{dept}</span>\n <div className=\"flex-1 h-4 bg-bg-sunken rounded overflow-hidden\">\n <div\n className=\"h-4 bg-action-primary-bg rounded\"\n style={{ width: `${Math.round((count / maxHeadcount) * 100)}%` }}\n />\n </div>\n <span className=\"text-sm font-medium w-8 text-right tabular-nums\">{count}</span>\n </div>\n ))}\n </div>\n </EmphasisPanel>\n\n <Card className=\"col-span-3\">\n <CardHeader className=\"flex flex-row items-center justify-between\">\n <CardTitle>\n {t('crewfoundry.dashboard.notifications.title', 'Recent Notifications')}\n </CardTitle>\n <Badge variant=\"secondary\">\n {unreadNotifications} {t('crewfoundry.dashboard.notifications.unread', 'unread')}\n </Badge>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {notifications.slice(0, 5).map((notif) => (\n <div key={notif.id} className=\"flex items-start gap-3\">\n <div\n className={`mt-1 h-2 w-2 rounded-full flex-shrink-0 motion-safe:animate-vc-glow-pulse ${\n notif.type === 'success'\n ? 'bg-status-success-text'\n : notif.type === 'warning'\n ? 'bg-status-warning-text'\n : notif.type === 'error'\n ? 'bg-status-error-text'\n : 'bg-status-info-text'\n }`}\n />\n <div className=\"flex-1 min-w-0\">\n <p className={`text-sm ${notif.read ? 'text-text-secondary' : 'font-medium'}`}>\n {notif.title}\n </p>\n <p className=\"text-xs text-text-secondary truncate\">{notif.message}</p>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n <Card>\n <CardHeader>\n <CardTitle>\n {t('crewfoundry.dashboard.upcomingInterviews.title', 'Upcoming Interviews')}\n </CardTitle>\n <CardDescription>\n {t('crewfoundry.dashboard.upcomingInterviews.description', 'Scheduled for this week')}\n </CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {projects\n .filter((p) => p.status === 'active')\n .slice(0, 4)\n .map((project) => (\n <div\n key={project.id}\n className=\"flex items-center justify-between rounded border p-3\"\n >\n <div>\n <p className=\"text-sm font-medium\">{project.name}</p>\n <p className=\"text-xs text-text-secondary\">{project.teamName}</p>\n </div>\n <div className=\"flex items-center gap-2\">\n <div className=\"w-24 h-2 bg-bg-sunken rounded overflow-hidden\">\n <div\n className=\"h-2 bg-action-primary-bg rounded\"\n style={{ width: `${project.progress}%` }}\n />\n </div>\n <span className=\"text-xs text-text-secondary\">{project.progress}%</span>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>\n {t('crewfoundry.dashboard.leaveRequests.title', 'Recent Leave Requests')}\n </CardTitle>\n <CardDescription>\n {t('crewfoundry.dashboard.leaveRequests.description', 'Pending approval')}\n </CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {leaveRequests.length === 0 && (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={t('crewfoundry.dashboard.leaveRequests.emptyTitle', 'No leave requests')}\n description={t(\n 'crewfoundry.dashboard.leaveRequests.emptyDescription',\n 'Pending leave requests will appear here.'\n )}\n />\n )}\n {leaveRequests.map((leave) => (\n <div key={leave.id} className=\"flex items-center justify-between rounded border p-3\">\n <div className=\"flex items-center gap-3\">\n <div>\n <p className=\"text-sm font-medium\">{leave.employeeName}</p>\n <div className=\"flex items-center gap-2 text-xs text-text-secondary\">\n <Calendar className=\"h-3 w-3\" />\n <span>\n {leave.startDate} - {leave.endDate}\n </span>\n </div>\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <Badge\n variant={\n leave.status === 'approved'\n ? 'default'\n : leave.status === 'pending'\n ? 'secondary'\n : 'destructive'\n }\n >\n {leave.status}\n </Badge>\n <Badge variant=\"outline\">{leave.type}</Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AA+BA,SAAgB,IAA6B;CAC3C,IAAM,EAAE,GAAG,MAAc,GAAS,EAC5B,IAAW,GAAa,EACxB,EAAE,cAAW,gBAAa,kBAAe,kBAAe,gBAAa,GAAqB,EAC1F,CAAC,GAAgB,KAAqB,EAAuC,QAAQ,EACrF,KAAK,GAAa,MAAqB;EAC3C,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAG9B,IAAkB,EAAU,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,QACjE,IAAU,EAAU,QAAQ,MAAM,EAAE,WAAW,WAAW,CAAC,QAC3D,IAAgB,EAAY,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,QACjE,IAAkB,EAAY,QAAQ,GAAK,MAAM,IAAM,EAAE,YAAY,EAAE,EACvE,IAAgB,EAAc,QAAQ,MAAM,EAAE,WAAW,UAAU,CAAC,QACpE,IAAsB,EAAc,QAAQ,MAAM,CAAC,EAAE,KAAK,CAAC,QAC3D,IAAiB,EAAS,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,QAC/D,KACJ,EAAU,QAAQ,GAAK,MAAM,IAAM,EAAE,kBAAkB,EAAE,GAAG,EAAU,QACtE,QAAQ,EAAE,EAEN,IAAsB,EAAU,QAAgC,GAAK,OACzE,EAAI,EAAE,eAAe,EAAI,EAAE,eAAe,KAAK,GACxC,IACN,EAAE,CAAC,EAEA,IAAe,KAAK,IAAI,GAAG,OAAO,OAAO,EAAoB,CAAC;AAEpE,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAkB,WAAU,UAAW,CAAA,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