@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiringJobsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HiringJobsPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Badge,\n Button,\n
|
|
1
|
+
{"version":3,"file":"HiringJobsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HiringJobsPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Badge,\n Button,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { Briefcase, MapPin, Plus, Search, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function HiringJobsPagePage() {\n const { t: translate } = useI18n();\n const { jobPostings } = useCrewFoundryStore();\n const [search, setSearch] = useState('');\n const t = (key: string, fallback: string) => {\n const value = translate(key);\n return value === key ? fallback : value;\n };\n\n const filtered = jobPostings.filter((j) =>\n `${j.title} ${j.department} ${j.location}`.toLowerCase().includes(search.toLowerCase())\n );\n const activeJobs = jobPostings.filter((j) => j.status === 'active').length;\n const totalApplicants = jobPostings.reduce((s, j) => s + j.applicants, 0);\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>{t('crewfoundry.hiringJobs.title', 'Job Postings')}</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {activeJobs} {t('crewfoundry.hiringJobs.summary.activePositions', 'active positions')} ·{' '}\n {totalApplicants}{' '}\n {t('crewfoundry.hiringJobs.summary.totalApplicants', 'total applicants')}\n </p>\n <PagePurpose className=\"mt-1\">All your open and past job postings in one place — use it to monitor applicant volume and manage what roles you're actively hiring for.</PagePurpose>\n </div>\n <Button size=\"sm\">\n <Plus className=\"h-4 w-4 mr-1\" />\n {t('crewfoundry.hiringJobs.actions.postNewJob', 'Post New Job')}\n </Button>\n </div>\n\n <div className=\"relative max-w-sm\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\" />\n <Input\n placeholder={t('crewfoundry.hiringJobs.searchPlaceholder', 'Search positions...')}\n className=\"pl-9\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </div>\n\n {filtered.length === 0 && (\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"No job postings found\"\n description=\"Try adjusting your search, or create a new job posting.\"\n />\n )}\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n {filtered.map((job, _idx) => (\n <GlassCard key={job.id} treatment={_idx === 0 ? 'glass' : 'plain'} glow={_idx === 0}>\n <CardHeader>\n <div className=\"flex items-center justify-between\">\n <CardTitle className=\"text-lg\">{job.title}</CardTitle>\n <Badge\n variant={\n job.status === 'active'\n ? 'default'\n : job.status === 'paused'\n ? 'secondary'\n : 'outline'\n }\n >\n {job.status}\n </Badge>\n </div>\n <CardDescription>{job.description}</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-2 gap-3 mb-3\">\n <div className=\"flex items-center gap-1 text-sm text-text-secondary\">\n <Briefcase className=\"h-3 w-3\" />\n {job.department}\n </div>\n <div className=\"flex items-center gap-1 text-sm text-text-secondary\">\n <MapPin className=\"h-3 w-3\" />\n {job.location}\n </div>\n <div className=\"flex items-center gap-1 text-sm text-text-secondary\">\n <Users className=\"h-3 w-3\" />\n {job.applicants} {t('crewfoundry.hiringJobs.card.applicants', 'applicants')}\n </div>\n <div className=\"text-sm text-text-secondary\">\n ${(job.salaryMin / 1000).toFixed(0)}K — ${(job.salaryMax / 1000).toFixed(0)}K\n </div>\n </div>\n <div className=\"flex items-center justify-between text-xs text-text-secondary\">\n <div className=\"flex gap-1\">\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {job.type.replace('_', ' ')}\n </Badge>\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {job.experienceLevel}\n </Badge>\n </div>\n <span>\n {t('crewfoundry.hiringJobs.card.deadline', 'Deadline')}: {job.deadline}\n </span>\n </div>\n </CardContent>\n </GlassCard>\n ))}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAkBA,SAAgB,IAAqB;CACnC,IAAM,EAAE,GAAG,MAAc,GAAS,EAC5B,EAAE,mBAAgB,GAAqB,EACvC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,KAAK,GAAa,MAAqB;EAC3C,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAG9B,IAAW,EAAY,QAAQ,MACnC,GAAG,EAAE,MAAM,GAAG,EAAE,WAAW,GAAG,EAAE,WAAW,aAAa,CAAC,SAAS,EAAO,aAAa,CAAC,CACxF,EACK,IAAa,EAAY,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,QAC9D,IAAkB,EAAY,QAAQ,GAAG,MAAM,IAAI,EAAE,YAAY,EAAE;AAEzE,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA;KACE,kBAAC,MAAD;MAAI,WAAU;gBACZ,kBAAC,GAAD,EAAA,UAAe,EAAE,gCAAgC,eAAe,EAAgB,CAAA;MAC7E,CAAA;KACL,kBAAC,KAAD;MAAG,WAAU;gBAAb;OACG;OAAW;OAAE,EAAE,kDAAkD,mBAAmB;OAAC;OAAG;OACxF;OAAiB;OACjB,EAAE,kDAAkD,mBAAmB;OACtE;;KACJ,kBAAC,GAAD;MAAa,WAAU;gBAA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B,EAAI;SAAW;SAAE,EAAE,0CAA0C,aAAa;SACvE;;OACN,kBAAC,OAAD;QAAK,WAAU;kBAAf;SAA6C;UACxC,EAAI,YAAY,KAAM,QAAQ,EAAE;SAAC;UAAO,EAAI,YAAY,KAAM,QAAQ,EAAE;SAAC;SACxE;;OACF;SACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,GAAD;QAAO,SAAQ;QAAU,WAAU;kBAChC,EAAI,KAAK,QAAQ,KAAK,IAAI;QACrB,CAAA,EACR,kBAAC,GAAD;QAAO,SAAQ;QAAU,WAAU;kBAChC,EAAI;QACC,CAAA,CACJ;UACN,kBAAC,QAAD,EAAA,UAAA;OACG,EAAE,wCAAwC,WAAW;OAAC;OAAG,EAAI;OACzD,EAAA,CAAA,CACH;QACM,EAAA,CAAA,CACJ;OAlDI,EAAI,GAkDR,CACZ;IACE,CAAA;GACF"}
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
2
|
import { Building2 as t, DollarSign as n, MapPin as r, Plus as i, Users as a } from "lucide-react";
|
|
3
3
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
|
-
import { Badge as c, Button as l, Card as u, CardContent as d, CardDescription as f, CardHeader as p, CardTitle as m, GlassCard as h, GradientText as g,
|
|
4
|
+
import { Badge as c, Button as l, Card as u, CardContent as d, CardDescription as f, CardHeader as p, CardTitle as m, GlassCard as h, GradientText as g, PagePurpose as _, Separator as v } from "@burdenoff/fe-libs/ui";
|
|
5
5
|
//#region src/crewfoundry/pages/HrDepartmentsPagePage.tsx
|
|
6
|
-
function
|
|
7
|
-
let { departments:
|
|
6
|
+
function y() {
|
|
7
|
+
let { departments: y, employees: b } = e(), x = y.reduce((e, t) => e + t.budget, 0), S = y.reduce((e, t) => e + t.employeeCount, 0);
|
|
8
8
|
return /* @__PURE__ */ s("div", {
|
|
9
9
|
className: "space-y-6 p-6",
|
|
10
10
|
children: [
|
|
11
11
|
/* @__PURE__ */ s("div", {
|
|
12
12
|
className: "flex items-center justify-between",
|
|
13
|
-
children: [/* @__PURE__ */ s("div", { children: [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
children: [/* @__PURE__ */ s("div", { children: [
|
|
14
|
+
/* @__PURE__ */ o("h1", {
|
|
15
|
+
className: "text-2xl font-semibold",
|
|
16
|
+
children: /* @__PURE__ */ o(g, { children: "Departments" })
|
|
17
|
+
}),
|
|
18
|
+
/* @__PURE__ */ o("p", {
|
|
19
|
+
className: "text-sm text-text-secondary",
|
|
20
|
+
children: "Organizational structure and department management"
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ o(_, {
|
|
23
|
+
className: "mt-1",
|
|
24
|
+
children: "Organize your company into departments — set up structure, assign heads, and see how headcount is distributed across the org."
|
|
25
|
+
})
|
|
26
|
+
] }), /* @__PURE__ */ s(l, {
|
|
20
27
|
size: "sm",
|
|
21
28
|
children: [/* @__PURE__ */ o(i, { className: "h-4 w-4 mr-1" }), "Add Department"]
|
|
22
29
|
})]
|
|
@@ -25,7 +32,8 @@ function v() {
|
|
|
25
32
|
className: "grid gap-4 md:grid-cols-3",
|
|
26
33
|
children: [
|
|
27
34
|
/* @__PURE__ */ s(h, {
|
|
28
|
-
treatment: "
|
|
35
|
+
treatment: "glass",
|
|
36
|
+
glow: !0,
|
|
29
37
|
className: "border-border-seam",
|
|
30
38
|
children: [/* @__PURE__ */ s(p, {
|
|
31
39
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
@@ -35,7 +43,7 @@ function v() {
|
|
|
35
43
|
}), /* @__PURE__ */ o(t, { className: "h-4 w-4 text-text-secondary" })]
|
|
36
44
|
}), /* @__PURE__ */ o(d, { children: /* @__PURE__ */ o("div", {
|
|
37
45
|
className: "text-2xl font-bold tabular-nums",
|
|
38
|
-
children:
|
|
46
|
+
children: y.length
|
|
39
47
|
}) })]
|
|
40
48
|
}),
|
|
41
49
|
/* @__PURE__ */ s(h, {
|
|
@@ -49,7 +57,7 @@ function v() {
|
|
|
49
57
|
}), /* @__PURE__ */ o(a, { className: "h-4 w-4 text-text-secondary" })]
|
|
50
58
|
}), /* @__PURE__ */ o(d, { children: /* @__PURE__ */ o("div", {
|
|
51
59
|
className: "text-2xl font-bold tabular-nums",
|
|
52
|
-
children:
|
|
60
|
+
children: S
|
|
53
61
|
}) })]
|
|
54
62
|
}),
|
|
55
63
|
/* @__PURE__ */ s(h, {
|
|
@@ -65,7 +73,7 @@ function v() {
|
|
|
65
73
|
className: "text-2xl font-bold tabular-nums",
|
|
66
74
|
children: [
|
|
67
75
|
"$",
|
|
68
|
-
(
|
|
76
|
+
(x / 1e6).toFixed(1),
|
|
69
77
|
"M"
|
|
70
78
|
]
|
|
71
79
|
}) })]
|
|
@@ -74,8 +82,8 @@ function v() {
|
|
|
74
82
|
}),
|
|
75
83
|
/* @__PURE__ */ o("div", {
|
|
76
84
|
className: "grid gap-4 md:grid-cols-2",
|
|
77
|
-
children:
|
|
78
|
-
let t =
|
|
85
|
+
children: y.map((e) => {
|
|
86
|
+
let t = b.filter((t) => t.department === e.name), n = t.length > 0 ? Math.round(t.reduce((e, t) => e + t.salary, 0) / t.length) : 0, i = t.length > 0 ? (t.reduce((e, t) => e + t.performanceScore, 0) / t.length).toFixed(1) : "0";
|
|
79
87
|
return /* @__PURE__ */ s(u, { children: [/* @__PURE__ */ s(p, { children: [/* @__PURE__ */ s("div", {
|
|
80
88
|
className: "flex items-center justify-between",
|
|
81
89
|
children: [/* @__PURE__ */ o(m, {
|
|
@@ -126,7 +134,7 @@ function v() {
|
|
|
126
134
|
})] })
|
|
127
135
|
]
|
|
128
136
|
}),
|
|
129
|
-
/* @__PURE__ */ o(
|
|
137
|
+
/* @__PURE__ */ o(v, { className: "mb-3" }),
|
|
130
138
|
/* @__PURE__ */ s("div", {
|
|
131
139
|
className: "flex items-center justify-between text-xs",
|
|
132
140
|
children: [/* @__PURE__ */ s("span", {
|
|
@@ -152,6 +160,6 @@ function v() {
|
|
|
152
160
|
});
|
|
153
161
|
}
|
|
154
162
|
//#endregion
|
|
155
|
-
export {
|
|
163
|
+
export { y as HrDepartmentsPagePage };
|
|
156
164
|
|
|
157
165
|
//# sourceMappingURL=HrDepartmentsPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HrDepartmentsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HrDepartmentsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n Separator,\n} from '@burdenoff/fe-libs/ui';\nimport { Building2, DollarSign, MapPin, Plus, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function HrDepartmentsPagePage() {\n const { departments, employees } = useCrewFoundryStore();\n\n const totalBudget = departments.reduce((s, d) => s + d.budget, 0);\n const totalHeadcount = departments.reduce((s, d) => s + d.employeeCount, 0);\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>Departments</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n Organizational structure and department management\n </p>\n </div>\n <Button size=\"sm\">\n <Plus className=\"h-4 w-4 mr-1\" />\n Add Department\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-3\">\n <GlassCard treatment=\"
|
|
1
|
+
{"version":3,"file":"HrDepartmentsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HrDepartmentsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n PagePurpose,\n Separator,\n} from '@burdenoff/fe-libs/ui';\nimport { Building2, DollarSign, MapPin, Plus, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function HrDepartmentsPagePage() {\n const { departments, employees } = useCrewFoundryStore();\n\n const totalBudget = departments.reduce((s, d) => s + d.budget, 0);\n const totalHeadcount = departments.reduce((s, d) => s + d.employeeCount, 0);\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>Departments</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n Organizational structure and department management\n </p>\n <PagePurpose className=\"mt-1\">Organize your company into departments — set up structure, assign heads, and see how headcount is distributed across the org.</PagePurpose>\n </div>\n <Button size=\"sm\">\n <Plus className=\"h-4 w-4 mr-1\" />\n Add Department\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-3\">\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 Departments</CardTitle>\n <Building2 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 </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\">Total Headcount</CardTitle>\n <Users className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{totalHeadcount}</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\">Total Budget</CardTitle>\n <DollarSign className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n ${(totalBudget / 1000000).toFixed(1)}M\n </div>\n </CardContent>\n </GlassCard>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n {departments.map((dept) => {\n const deptEmps = employees.filter((e) => e.department === dept.name);\n const avgSalary =\n deptEmps.length > 0\n ? Math.round(deptEmps.reduce((s, e) => s + e.salary, 0) / deptEmps.length)\n : 0;\n const avgPerf =\n deptEmps.length > 0\n ? (deptEmps.reduce((s, e) => s + e.performanceScore, 0) / deptEmps.length).toFixed(1)\n : '0';\n\n return (\n <Card key={dept.id}>\n <CardHeader>\n <div className=\"flex items-center justify-between\">\n <CardTitle className=\"text-lg\">{dept.name}</CardTitle>\n <Badge variant={dept.status === 'active' ? 'default' : 'secondary'}>\n {dept.status}\n </Badge>\n </div>\n <CardDescription className=\"flex items-center gap-1\">\n <MapPin className=\"h-3 w-3\" />\n {dept.location}\n </CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-2 gap-4 mb-4\">\n <div>\n <p className=\"text-xs text-text-secondary\">Department Head</p>\n <p className=\"text-sm font-medium\">{dept.headName}</p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Headcount</p>\n <p className=\"text-sm font-medium\">{dept.employeeCount} employees</p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Annual Budget</p>\n <p className=\"text-sm font-medium\">${(dept.budget / 1000000).toFixed(1)}M</p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Avg Salary</p>\n <p className=\"text-sm font-medium\">${avgSalary.toLocaleString()}</p>\n </div>\n </div>\n <Separator className=\"mb-3\" />\n <div className=\"flex items-center justify-between text-xs\">\n <span className=\"text-text-secondary\">Avg Performance: {avgPerf}/5</span>\n <span className=\"text-text-secondary\">\n Cost/Head: ${Math.round(dept.budget / dept.employeeCount / 1000)}K\n </span>\n </div>\n </CardContent>\n </Card>\n );\n })}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;AAgBA,SAAgB,IAAwB;CACtC,IAAM,EAAE,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,EAAA,CAAA;QACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;SAAG,WAAU;mBAA8B;SAAa,CAAA,EACxD,kBAAC,KAAD;SAAG,WAAU;mBAAb,CAAoC,EAAK,eAAc,aAAc;WACjE,EAAA,CAAA;QACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;SAAG,WAAU;mBAA8B;SAAiB,CAAA,EAC5D,kBAAC,KAAD;SAAG,WAAU;mBAAb;UAAmC;WAAG,EAAK,SAAS,KAAS,QAAQ,EAAE;UAAC;UAAK;WACzE,EAAA,CAAA;QACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;SAAG,WAAU;mBAA8B;SAAc,CAAA,EACzD,kBAAC,KAAD;SAAG,WAAU;mBAAb,CAAmC,KAAE,EAAU,gBAAgB,CAAK;WAChE,EAAA,CAAA;QACF;;MACN,kBAAC,GAAD,EAAW,WAAU,QAAS,CAAA;MAC9B,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,QAAD;QAAM,WAAU;kBAAhB;SAAsC;SAAkB;SAAQ;SAAS;WACzE,kBAAC,QAAD;QAAM,WAAU;kBAAhB;SAAsC;SACvB,KAAK,MAAM,EAAK,SAAS,EAAK,gBAAgB,IAAK;SAAC;SAC5D;UACH;;MACM,EAAA,CAAA,CACT,EAAA,EAxCI,EAAK,GAwCT;MAET;IACE,CAAA;GACF"}
|
|
@@ -2,30 +2,37 @@ import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
|
2
2
|
import { useState as t } from "react";
|
|
3
3
|
import { MapPin as n, Plus as r, Search as i, Star as a, UserCheck 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, CardHeader as m, CardTitle as h, GlassCard as g, GradientText as _,
|
|
5
|
+
import { Badge as u, Button as d, Card as f, CardContent as p, CardHeader as m, CardTitle as h, GlassCard as g, GradientText as _, IllustratedEmptyState as v, Input as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/crewfoundry/pages/HrEmployeesPagePage.tsx
|
|
7
|
-
function
|
|
8
|
-
let { employees:
|
|
9
|
-
let t = `${e.firstName} ${e.lastName} ${e.email} ${e.position}`.toLowerCase().includes(
|
|
7
|
+
function x() {
|
|
8
|
+
let { employees: x } = e(), [S, C] = t(""), [w, T] = t("all"), E = [...new Set(x.map((e) => e.department))], D = x.filter((e) => {
|
|
9
|
+
let t = `${e.firstName} ${e.lastName} ${e.email} ${e.position}`.toLowerCase().includes(S.toLowerCase()), n = w === "all" || e.department === w;
|
|
10
10
|
return t && n;
|
|
11
|
-
}),
|
|
11
|
+
}), O = x.filter((e) => e.status === "active").length, k = x.filter((e) => e.status === "on_leave").length;
|
|
12
12
|
return /* @__PURE__ */ l("div", {
|
|
13
13
|
className: "space-y-6 p-6",
|
|
14
14
|
children: [
|
|
15
15
|
/* @__PURE__ */ l("div", {
|
|
16
16
|
className: "flex items-center justify-between",
|
|
17
|
-
children: [/* @__PURE__ */ l("div", { children: [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
children: [/* @__PURE__ */ l("div", { children: [
|
|
18
|
+
/* @__PURE__ */ c("h1", {
|
|
19
|
+
className: "text-2xl font-semibold",
|
|
20
|
+
children: /* @__PURE__ */ c(_, { children: "Employee Directory" })
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ l("p", {
|
|
23
|
+
className: "text-sm text-text-secondary",
|
|
24
|
+
children: [
|
|
25
|
+
x.length,
|
|
26
|
+
" employees across ",
|
|
27
|
+
E.length,
|
|
28
|
+
" departments"
|
|
29
|
+
]
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ c(b, {
|
|
32
|
+
className: "mt-1",
|
|
33
|
+
children: "Your complete employee directory — search, filter, and review everyone on the team along with their role, department, and status."
|
|
34
|
+
})
|
|
35
|
+
] }), /* @__PURE__ */ l(d, {
|
|
29
36
|
size: "sm",
|
|
30
37
|
children: [/* @__PURE__ */ c(r, { className: "h-4 w-4 mr-1" }), "Add Employee"]
|
|
31
38
|
})]
|
|
@@ -34,7 +41,8 @@ function y() {
|
|
|
34
41
|
className: "grid gap-4 md:grid-cols-4",
|
|
35
42
|
children: [
|
|
36
43
|
/* @__PURE__ */ l(g, {
|
|
37
|
-
treatment: "
|
|
44
|
+
treatment: "glass",
|
|
45
|
+
glow: !0,
|
|
38
46
|
className: "border-border-seam",
|
|
39
47
|
children: [/* @__PURE__ */ l(m, {
|
|
40
48
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
@@ -44,7 +52,7 @@ function y() {
|
|
|
44
52
|
}), /* @__PURE__ */ c(s, { className: "h-4 w-4 text-text-secondary" })]
|
|
45
53
|
}), /* @__PURE__ */ c(p, { children: /* @__PURE__ */ c("div", {
|
|
46
54
|
className: "text-2xl font-bold tabular-nums",
|
|
47
|
-
children:
|
|
55
|
+
children: x.length
|
|
48
56
|
}) })]
|
|
49
57
|
}),
|
|
50
58
|
/* @__PURE__ */ l(g, {
|
|
@@ -58,7 +66,7 @@ function y() {
|
|
|
58
66
|
}), /* @__PURE__ */ c(o, { className: "h-4 w-4 text-status-success-text" })]
|
|
59
67
|
}), /* @__PURE__ */ c(p, { children: /* @__PURE__ */ c("div", {
|
|
60
68
|
className: "text-2xl font-bold tabular-nums",
|
|
61
|
-
children:
|
|
69
|
+
children: O
|
|
62
70
|
}) })]
|
|
63
71
|
}),
|
|
64
72
|
/* @__PURE__ */ l(g, {
|
|
@@ -72,7 +80,7 @@ function y() {
|
|
|
72
80
|
}), /* @__PURE__ */ c(s, { className: "h-4 w-4 text-status-warning-text" })]
|
|
73
81
|
}), /* @__PURE__ */ c(p, { children: /* @__PURE__ */ c("div", {
|
|
74
82
|
className: "text-2xl font-bold tabular-nums",
|
|
75
|
-
children:
|
|
83
|
+
children: k
|
|
76
84
|
}) })]
|
|
77
85
|
}),
|
|
78
86
|
/* @__PURE__ */ l(g, {
|
|
@@ -86,7 +94,7 @@ function y() {
|
|
|
86
94
|
}), /* @__PURE__ */ c(a, { className: "h-4 w-4 text-status-warning-text" })]
|
|
87
95
|
}), /* @__PURE__ */ c(p, { children: /* @__PURE__ */ c("div", {
|
|
88
96
|
className: "text-2xl font-bold tabular-nums",
|
|
89
|
-
children: (
|
|
97
|
+
children: (x.reduce((e, t) => e + t.performanceScore, 0) / x.length).toFixed(1)
|
|
90
98
|
}) })]
|
|
91
99
|
})
|
|
92
100
|
]
|
|
@@ -95,23 +103,23 @@ function y() {
|
|
|
95
103
|
className: "flex gap-3",
|
|
96
104
|
children: [/* @__PURE__ */ l("div", {
|
|
97
105
|
className: "relative flex-1 max-w-sm",
|
|
98
|
-
children: [/* @__PURE__ */ c(i, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ c(
|
|
106
|
+
children: [/* @__PURE__ */ c(i, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ c(y, {
|
|
99
107
|
placeholder: "Search employees...",
|
|
100
108
|
className: "pl-9",
|
|
101
|
-
value:
|
|
102
|
-
onChange: (e) =>
|
|
109
|
+
value: S,
|
|
110
|
+
onChange: (e) => C(e.target.value)
|
|
103
111
|
})]
|
|
104
112
|
}), /* @__PURE__ */ l("div", {
|
|
105
113
|
className: "flex gap-1",
|
|
106
114
|
children: [/* @__PURE__ */ c(d, {
|
|
107
|
-
variant:
|
|
115
|
+
variant: w === "all" ? "default" : "outline",
|
|
108
116
|
size: "sm",
|
|
109
|
-
onClick: () =>
|
|
117
|
+
onClick: () => T("all"),
|
|
110
118
|
children: "All"
|
|
111
|
-
}),
|
|
112
|
-
variant:
|
|
119
|
+
}), E.slice(0, 5).map((e) => /* @__PURE__ */ c(d, {
|
|
120
|
+
variant: w === e ? "default" : "outline",
|
|
113
121
|
size: "sm",
|
|
114
|
-
onClick: () =>
|
|
122
|
+
onClick: () => T(e),
|
|
115
123
|
children: e
|
|
116
124
|
}, e))]
|
|
117
125
|
})]
|
|
@@ -140,7 +148,7 @@ function y() {
|
|
|
140
148
|
})
|
|
141
149
|
]
|
|
142
150
|
}),
|
|
143
|
-
|
|
151
|
+
D.map((e) => /* @__PURE__ */ l("div", {
|
|
144
152
|
className: "grid grid-cols-7 gap-2 py-3 px-4 border-b last:border-0 text-sm hover:bg-bg-sunken/50",
|
|
145
153
|
children: [
|
|
146
154
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ l("p", {
|
|
@@ -184,9 +192,13 @@ function y() {
|
|
|
184
192
|
})
|
|
185
193
|
]
|
|
186
194
|
}, e.id)),
|
|
187
|
-
|
|
188
|
-
className: "p-
|
|
189
|
-
children:
|
|
195
|
+
D.length === 0 && /* @__PURE__ */ c("div", {
|
|
196
|
+
className: "p-6",
|
|
197
|
+
children: /* @__PURE__ */ c(v, {
|
|
198
|
+
illustration: "empty-people",
|
|
199
|
+
title: "No employees match",
|
|
200
|
+
description: "Try a different search term or department filter."
|
|
201
|
+
})
|
|
190
202
|
})
|
|
191
203
|
]
|
|
192
204
|
}) })
|
|
@@ -194,6 +206,6 @@ function y() {
|
|
|
194
206
|
});
|
|
195
207
|
}
|
|
196
208
|
//#endregion
|
|
197
|
-
export {
|
|
209
|
+
export { x as HrEmployeesPagePage };
|
|
198
210
|
|
|
199
211
|
//# sourceMappingURL=HrEmployeesPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HrEmployeesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HrEmployeesPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n Input,\n} from '@burdenoff/fe-libs/ui';\nimport { Mail, MapPin, Phone, Plus, Search, Star, UserCheck, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function HrEmployeesPagePage() {\n const { employees } = useCrewFoundryStore();\n const [search, setSearch] = useState('');\n const [filterDept, setFilterDept] = useState<string>('all');\n\n const departments = [...new Set(employees.map((e) => e.department))];\n const filtered = employees.filter((e) => {\n const matchSearch = `${e.firstName} ${e.lastName} ${e.email} ${e.position}`\n .toLowerCase()\n .includes(search.toLowerCase());\n const matchDept = filterDept === 'all' || e.department === filterDept;\n return matchSearch && matchDept;\n });\n\n const activeCount = employees.filter((e) => e.status === 'active').length;\n const onLeaveCount = employees.filter((e) => e.status === 'on_leave').length;\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>Employee Directory</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {employees.length} employees across {departments.length} departments\n </p>\n </div>\n <Button size=\"sm\">\n <Plus className=\"h-4 w-4 mr-1\" />\n Add Employee\n </Button>\n </div>\n\n <div className=\"grid gap-4 md: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</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 </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</CardTitle>\n <UserCheck className=\"h-4 w-4 text-status-success-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{activeCount}</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\">On Leave</CardTitle>\n <Users className=\"h-4 w-4 text-status-warning-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{onLeaveCount}</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\">Avg Rating</CardTitle>\n <Star className=\"h-4 w-4 text-status-warning-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n {(employees.reduce((s, e) => s + e.performanceScore, 0) / employees.length).toFixed(\n 1\n )}\n </div>\n </CardContent>\n </GlassCard>\n </div>\n\n <div className=\"flex gap-3\">\n <div className=\"relative flex-1 max-w-sm\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\" />\n <Input\n placeholder=\"Search employees...\"\n className=\"pl-9\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </div>\n <div className=\"flex gap-1\">\n <Button\n variant={filterDept === 'all' ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => setFilterDept('all')}\n >\n All\n </Button>\n {departments.slice(0, 5).map((dept) => (\n <Button\n key={dept}\n variant={filterDept === dept ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => setFilterDept(dept)}\n >\n {dept}\n </Button>\n ))}\n </div>\n </div>\n\n <Card>\n <CardContent className=\"p-0\">\n <div className=\"grid grid-cols-7 gap-2 text-xs font-medium text-text-secondary border-b p-4\">\n <span>Name</span>\n <span>Position</span>\n <span>Department</span>\n <span>Location</span>\n <span className=\"text-right\">Salary</span>\n <span className=\"text-center\">Rating</span>\n <span className=\"text-center\">Status</span>\n </div>\n {filtered.map((emp) => (\n <div\n key={emp.id}\n className=\"grid grid-cols-7 gap-2 py-3 px-4 border-b last:border-0 text-sm hover:bg-bg-sunken/50\"\n >\n <div>\n <p className=\"font-medium\">\n {emp.firstName} {emp.lastName}\n </p>\n <p className=\"text-xs text-text-secondary\">{emp.email}</p>\n </div>\n <span className=\"text-text-secondary\">{emp.position}</span>\n <span>{emp.department}</span>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <MapPin className=\"h-3 w-3\" />\n <span className=\"truncate text-xs\">{emp.location}</span>\n </div>\n <span className=\"text-right\">${emp.salary.toLocaleString()}</span>\n <div className=\"flex items-center justify-center gap-1\">\n <Star className=\"h-3 w-3 text-status-warning-text\" />\n <span>{emp.performanceScore}</span>\n </div>\n <div className=\"text-center\">\n <Badge\n variant={\n emp.status === 'active'\n ? 'default'\n : emp.status === 'on_leave'\n ? 'secondary'\n : 'destructive'\n }\n className=\"text-[10px]\"\n >\n {emp.status.replace('_', ' ')}\n </Badge>\n </div>\n </div>\n ))}\n {filtered.length === 0 && (\n <div className=\"p-8 text-center text-sm text-text-secondary\">\n No employees match your search criteria.\n </div>\n )}\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAgBA,SAAgB,IAAsB;CACpC,IAAM,EAAE,iBAAc,GAAqB,EACrC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,CAAC,GAAY,KAAiB,EAAiB,MAAM,EAErD,IAAc,CAAC,GAAG,IAAI,IAAI,EAAU,KAAK,MAAM,EAAE,WAAW,CAAC,CAAC,EAC9D,IAAW,EAAU,QAAQ,MAAM;EACvC,IAAM,IAAc,GAAG,EAAE,UAAU,GAAG,EAAE,SAAS,GAAG,EAAE,MAAM,GAAG,EAAE,WAC9D,aAAa,CACb,SAAS,EAAO,aAAa,CAAC,EAC3B,IAAY,MAAe,SAAS,EAAE,eAAe;AAC3D,SAAO,KAAe;GACtB,EAEI,IAAc,EAAU,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,QAC7D,IAAe,EAAU,QAAQ,MAAM,EAAE,WAAW,WAAW,CAAC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"HrEmployeesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HrEmployeesPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { Mail, MapPin, Phone, Plus, Search, Star, UserCheck, Users } from 'lucide-react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function HrEmployeesPagePage() {\n const { employees } = useCrewFoundryStore();\n const [search, setSearch] = useState('');\n const [filterDept, setFilterDept] = useState<string>('all');\n\n const departments = [...new Set(employees.map((e) => e.department))];\n const filtered = employees.filter((e) => {\n const matchSearch = `${e.firstName} ${e.lastName} ${e.email} ${e.position}`\n .toLowerCase()\n .includes(search.toLowerCase());\n const matchDept = filterDept === 'all' || e.department === filterDept;\n return matchSearch && matchDept;\n });\n\n const activeCount = employees.filter((e) => e.status === 'active').length;\n const onLeaveCount = employees.filter((e) => e.status === 'on_leave').length;\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>Employee Directory</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {employees.length} employees across {departments.length} departments\n </p>\n <PagePurpose className=\"mt-1\">Your complete employee directory — search, filter, and review everyone on the team along with their role, department, and status.</PagePurpose>\n </div>\n <Button size=\"sm\">\n <Plus className=\"h-4 w-4 mr-1\" />\n Add Employee\n </Button>\n </div>\n\n <div className=\"grid gap-4 md: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</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 </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</CardTitle>\n <UserCheck className=\"h-4 w-4 text-status-success-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{activeCount}</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\">On Leave</CardTitle>\n <Users className=\"h-4 w-4 text-status-warning-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">{onLeaveCount}</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\">Avg Rating</CardTitle>\n <Star className=\"h-4 w-4 text-status-warning-text\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n {(employees.reduce((s, e) => s + e.performanceScore, 0) / employees.length).toFixed(\n 1\n )}\n </div>\n </CardContent>\n </GlassCard>\n </div>\n\n <div className=\"flex gap-3\">\n <div className=\"relative flex-1 max-w-sm\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\" />\n <Input\n placeholder=\"Search employees...\"\n className=\"pl-9\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </div>\n <div className=\"flex gap-1\">\n <Button\n variant={filterDept === 'all' ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => setFilterDept('all')}\n >\n All\n </Button>\n {departments.slice(0, 5).map((dept) => (\n <Button\n key={dept}\n variant={filterDept === dept ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => setFilterDept(dept)}\n >\n {dept}\n </Button>\n ))}\n </div>\n </div>\n\n <Card>\n <CardContent className=\"p-0\">\n <div className=\"grid grid-cols-7 gap-2 text-xs font-medium text-text-secondary border-b p-4\">\n <span>Name</span>\n <span>Position</span>\n <span>Department</span>\n <span>Location</span>\n <span className=\"text-right\">Salary</span>\n <span className=\"text-center\">Rating</span>\n <span className=\"text-center\">Status</span>\n </div>\n {filtered.map((emp) => (\n <div\n key={emp.id}\n className=\"grid grid-cols-7 gap-2 py-3 px-4 border-b last:border-0 text-sm hover:bg-bg-sunken/50\"\n >\n <div>\n <p className=\"font-medium\">\n {emp.firstName} {emp.lastName}\n </p>\n <p className=\"text-xs text-text-secondary\">{emp.email}</p>\n </div>\n <span className=\"text-text-secondary\">{emp.position}</span>\n <span>{emp.department}</span>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <MapPin className=\"h-3 w-3\" />\n <span className=\"truncate text-xs\">{emp.location}</span>\n </div>\n <span className=\"text-right\">${emp.salary.toLocaleString()}</span>\n <div className=\"flex items-center justify-center gap-1\">\n <Star className=\"h-3 w-3 text-status-warning-text\" />\n <span>{emp.performanceScore}</span>\n </div>\n <div className=\"text-center\">\n <Badge\n variant={\n emp.status === 'active'\n ? 'default'\n : emp.status === 'on_leave'\n ? 'secondary'\n : 'destructive'\n }\n className=\"text-[10px]\"\n >\n {emp.status.replace('_', ' ')}\n </Badge>\n </div>\n </div>\n ))}\n {filtered.length === 0 && (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-people\"\n title=\"No employees match\"\n description=\"Try a different search term or department filter.\"\n />\n </div>\n )}\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAiBA,SAAgB,IAAsB;CACpC,IAAM,EAAE,iBAAc,GAAqB,EACrC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,CAAC,GAAY,KAAiB,EAAiB,MAAM,EAErD,IAAc,CAAC,GAAG,IAAI,IAAI,EAAU,KAAK,MAAM,EAAE,WAAW,CAAC,CAAC,EAC9D,IAAW,EAAU,QAAQ,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kBAAC,QAAD,EAAA,UAAO,EAAI,kBAAwB,CAAA,CAC/B;;OACN,kBAAC,OAAD;QAAK,WAAU;kBACb,kBAAC,GAAD;SACE,SACE,EAAI,WAAW,WACX,YACA,EAAI,WAAW,aACb,cACA;SAER,WAAU;mBAET,EAAI,OAAO,QAAQ,KAAK,IAAI;SACvB,CAAA;QACJ,CAAA;OACF;QAlCC,EAAI,GAkCL,CACN;KACD,EAAS,WAAW,KACnB,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,GAAD;OACE,cAAa;OACb,OAAM;OACN,aAAY;OACZ,CAAA;MACE,CAAA;KAEI;OACT,CAAA;GACH"}
|
|
@@ -2,11 +2,11 @@ import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { Calendar as n, CheckCircle as r, Clock as i, XCircle as a } from "lucide-react";
|
|
4
4
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
-
import { Badge as c, Button as l, Card as u, CardContent as d, CardDescription as f, CardHeader as p, CardTitle as m, GlassCard as h, GradientText as g } from "@burdenoff/fe-libs/ui";
|
|
5
|
+
import { Badge as c, Button as l, Card as u, CardContent as d, CardDescription as f, CardHeader as p, CardTitle as m, GlassCard as h, GradientText as g, PagePurpose as _ } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/crewfoundry/pages/HrLeaveManagementPagePage.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let { leaveRequests:
|
|
7
|
+
var v = (e) => e.split("_").map((e) => e[0]?.toUpperCase() + e.slice(1)).join(" ");
|
|
8
|
+
function y() {
|
|
9
|
+
let { leaveRequests: y } = e(), b = y.filter((e) => e.status === "pending").length, x = y.filter((e) => e.status === "approved").length, S = y.filter((e) => e.status === "approved").reduce((e, t) => e + t.days, 0), C = t(() => {
|
|
10
10
|
let e = {
|
|
11
11
|
annual: 20,
|
|
12
12
|
sick: 12,
|
|
@@ -14,32 +14,39 @@ function v() {
|
|
|
14
14
|
maternity: 90,
|
|
15
15
|
paternity: 30,
|
|
16
16
|
unpaid: 15
|
|
17
|
-
}, t =
|
|
17
|
+
}, t = y.filter((e) => e.status === "approved").reduce((e, t) => (e[t.type] = (e[t.type] || 0) + t.days, e), {});
|
|
18
18
|
return Object.entries(e).map(([e, n]) => {
|
|
19
19
|
let r = t[e] || 0;
|
|
20
20
|
return {
|
|
21
|
-
type:
|
|
21
|
+
type: v(e),
|
|
22
22
|
total: n,
|
|
23
23
|
used: r,
|
|
24
24
|
remaining: Math.max(n - r, 0)
|
|
25
25
|
};
|
|
26
26
|
});
|
|
27
|
-
}, [
|
|
27
|
+
}, [y]), w = t(() => {
|
|
28
28
|
let e = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
29
|
-
return
|
|
30
|
-
}, [
|
|
29
|
+
return y.filter((t) => t.status === "approved" && t.startDate <= e && t.endDate >= e).length;
|
|
30
|
+
}, [y]);
|
|
31
31
|
return /* @__PURE__ */ s("div", {
|
|
32
32
|
className: "space-y-6 p-6",
|
|
33
33
|
children: [
|
|
34
34
|
/* @__PURE__ */ s("div", {
|
|
35
35
|
className: "flex items-center justify-between",
|
|
36
|
-
children: [/* @__PURE__ */ s("div", { children: [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
children: [/* @__PURE__ */ s("div", { children: [
|
|
37
|
+
/* @__PURE__ */ o("h1", {
|
|
38
|
+
className: "text-2xl font-semibold",
|
|
39
|
+
children: /* @__PURE__ */ o(g, { children: "Leave Management" })
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ o("p", {
|
|
42
|
+
className: "text-sm text-text-secondary",
|
|
43
|
+
children: "Track and manage employee leave requests"
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ o(_, {
|
|
46
|
+
className: "mt-1",
|
|
47
|
+
children: "Handle time-off in one place — review and approve leave requests and keep an eye on team availability and balances."
|
|
48
|
+
})
|
|
49
|
+
] }), /* @__PURE__ */ s(l, {
|
|
43
50
|
size: "sm",
|
|
44
51
|
children: [/* @__PURE__ */ o(n, { className: "mr-1 h-4 w-4" }), "Request Leave"]
|
|
45
52
|
})]
|
|
@@ -48,7 +55,8 @@ function v() {
|
|
|
48
55
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
|
|
49
56
|
children: [
|
|
50
57
|
/* @__PURE__ */ s(h, {
|
|
51
|
-
treatment: "
|
|
58
|
+
treatment: "glass",
|
|
59
|
+
glow: !0,
|
|
52
60
|
className: "border-border-seam",
|
|
53
61
|
children: [/* @__PURE__ */ s(p, {
|
|
54
62
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
@@ -58,7 +66,7 @@ function v() {
|
|
|
58
66
|
}), /* @__PURE__ */ o(i, { className: "h-4 w-4 text-status-warning-text" })]
|
|
59
67
|
}), /* @__PURE__ */ s(d, { children: [/* @__PURE__ */ o("div", {
|
|
60
68
|
className: "text-2xl font-bold tabular-nums",
|
|
61
|
-
children:
|
|
69
|
+
children: b
|
|
62
70
|
}), /* @__PURE__ */ o("p", {
|
|
63
71
|
className: "text-xs text-text-secondary",
|
|
64
72
|
children: "Awaiting approval"
|
|
@@ -75,7 +83,7 @@ function v() {
|
|
|
75
83
|
}), /* @__PURE__ */ o(r, { className: "h-4 w-4 text-status-success-text" })]
|
|
76
84
|
}), /* @__PURE__ */ s(d, { children: [/* @__PURE__ */ o("div", {
|
|
77
85
|
className: "text-2xl font-bold tabular-nums",
|
|
78
|
-
children:
|
|
86
|
+
children: x
|
|
79
87
|
}), /* @__PURE__ */ o("p", {
|
|
80
88
|
className: "text-xs text-text-secondary",
|
|
81
89
|
children: "Current period"
|
|
@@ -92,7 +100,7 @@ function v() {
|
|
|
92
100
|
}), /* @__PURE__ */ o(n, { className: "h-4 w-4 text-text-secondary" })]
|
|
93
101
|
}), /* @__PURE__ */ s(d, { children: [/* @__PURE__ */ o("div", {
|
|
94
102
|
className: "text-2xl font-bold tabular-nums",
|
|
95
|
-
children:
|
|
103
|
+
children: S
|
|
96
104
|
}), /* @__PURE__ */ o("p", {
|
|
97
105
|
className: "text-xs text-text-secondary",
|
|
98
106
|
children: "Total approved days"
|
|
@@ -109,7 +117,7 @@ function v() {
|
|
|
109
117
|
}), /* @__PURE__ */ o(a, { className: "h-4 w-4 text-text-secondary" })]
|
|
110
118
|
}), /* @__PURE__ */ s(d, { children: [/* @__PURE__ */ o("div", {
|
|
111
119
|
className: "text-2xl font-bold tabular-nums",
|
|
112
|
-
children:
|
|
120
|
+
children: w
|
|
113
121
|
}), /* @__PURE__ */ o("p", {
|
|
114
122
|
className: "text-xs text-text-secondary",
|
|
115
123
|
children: "Out of office"
|
|
@@ -121,7 +129,7 @@ function v() {
|
|
|
121
129
|
className: "grid gap-4 md:grid-cols-2",
|
|
122
130
|
children: [/* @__PURE__ */ s(u, { children: [/* @__PURE__ */ s(p, { children: [/* @__PURE__ */ o(m, { children: "Leave Balances" }), /* @__PURE__ */ o(f, { children: "Company-wide leave allocation overview" })] }), /* @__PURE__ */ o(d, {
|
|
123
131
|
className: "space-y-4",
|
|
124
|
-
children:
|
|
132
|
+
children: C.map((e) => {
|
|
125
133
|
let t = Math.round(e.used / Math.max(e.total, 1) * 100);
|
|
126
134
|
return /* @__PURE__ */ s("div", {
|
|
127
135
|
className: "space-y-1",
|
|
@@ -147,7 +155,7 @@ function v() {
|
|
|
147
155
|
})
|
|
148
156
|
})] }), /* @__PURE__ */ s(u, { children: [/* @__PURE__ */ s(p, { children: [/* @__PURE__ */ o(m, { children: "Pending Approvals" }), /* @__PURE__ */ o(f, { children: "Leave requests waiting for your review" })] }), /* @__PURE__ */ o(d, {
|
|
149
157
|
className: "space-y-3",
|
|
150
|
-
children:
|
|
158
|
+
children: y.filter((e) => e.status === "pending").map((e) => /* @__PURE__ */ s("div", {
|
|
151
159
|
className: "flex items-center justify-between rounded border p-3",
|
|
152
160
|
children: [/* @__PURE__ */ s("div", { children: [
|
|
153
161
|
/* @__PURE__ */ o("p", {
|
|
@@ -203,7 +211,7 @@ function v() {
|
|
|
203
211
|
children: "Status"
|
|
204
212
|
})
|
|
205
213
|
]
|
|
206
|
-
}),
|
|
214
|
+
}), y.map((e) => /* @__PURE__ */ s("div", {
|
|
207
215
|
className: "grid grid-cols-7 gap-2 border-b py-2 text-sm last:border-0",
|
|
208
216
|
children: [
|
|
209
217
|
/* @__PURE__ */ o("span", {
|
|
@@ -249,6 +257,6 @@ function v() {
|
|
|
249
257
|
});
|
|
250
258
|
}
|
|
251
259
|
//#endregion
|
|
252
|
-
export {
|
|
260
|
+
export { y as HrLeaveManagementPagePage };
|
|
253
261
|
|
|
254
262
|
//# sourceMappingURL=HrLeaveManagementPagePage.js.map
|