@burdenoff/microfe-crewfoundry 2026.608.1 → 2026.624.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.
Files changed (131) hide show
  1. package/dist/crewfoundry/pages/AdminAdminPagePage.js +15 -15
  2. package/dist/crewfoundry/pages/AdminAdminPagePage.js.map +1 -1
  3. package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js +15 -15
  4. package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
  5. package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js +17 -17
  6. package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js.map +1 -1
  7. package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +19 -19
  8. package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
  9. package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +16 -16
  10. package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
  11. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +5 -5
  12. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
  13. package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js +7 -7
  14. package/dist/crewfoundry/pages/CommunicationsCallsPagePage.js.map +1 -1
  15. package/dist/crewfoundry/pages/CommunicationsDirectoryPagePage.js +7 -7
  16. package/dist/crewfoundry/pages/CommunicationsDirectoryPagePage.js.map +1 -1
  17. package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js +7 -7
  18. package/dist/crewfoundry/pages/CommunicationsFilesPagePage.js.map +1 -1
  19. package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js +7 -7
  20. package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js.map +1 -1
  21. package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js +3 -3
  22. package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js.map +1 -1
  23. package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js +8 -8
  24. package/dist/crewfoundry/pages/CommunicationsVideoCallsPagePage.js.map +1 -1
  25. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +8 -8
  26. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
  27. package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js +14 -14
  28. package/dist/crewfoundry/pages/CompanyCompanyDashboardPagePage.js.map +1 -1
  29. package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js +10 -10
  30. package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js.map +1 -1
  31. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +4 -4
  32. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
  33. package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js +17 -17
  34. package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js.map +1 -1
  35. package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +19 -19
  36. package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
  37. package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +17 -17
  38. package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
  39. package/dist/crewfoundry/pages/DashboardExecutiveDashboardPage.js +12 -12
  40. package/dist/crewfoundry/pages/DashboardExecutiveDashboardPage.js.map +1 -1
  41. package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js +12 -12
  42. package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js.map +1 -1
  43. package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +11 -11
  44. package/dist/crewfoundry/pages/HiringApplicationsPagePage.js.map +1 -1
  45. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +7 -7
  46. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
  47. package/dist/crewfoundry/pages/HiringCreateJobPagePage.js +1 -1
  48. package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
  49. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +7 -7
  50. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
  51. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +13 -13
  52. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
  53. package/dist/crewfoundry/pages/HiringJobsPagePage.js +7 -7
  54. package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
  55. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +10 -10
  56. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
  57. package/dist/crewfoundry/pages/HrEmployeesPagePage.js +9 -9
  58. package/dist/crewfoundry/pages/HrEmployeesPagePage.js.map +1 -1
  59. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +13 -13
  60. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
  61. package/dist/crewfoundry/pages/HrPayrollPagePage.js +10 -10
  62. package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
  63. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +9 -9
  64. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
  65. package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js +3 -3
  66. package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js.map +1 -1
  67. package/dist/crewfoundry/pages/LearningCertificatesPagePage.js +2 -2
  68. package/dist/crewfoundry/pages/LearningCertificatesPagePage.js.map +1 -1
  69. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +11 -11
  70. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
  71. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +7 -7
  72. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
  73. package/dist/crewfoundry/pages/LearningCoursesPagePage.js +4 -4
  74. package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
  75. package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js +9 -9
  76. package/dist/crewfoundry/pages/LearningLearningAnalyticsPagePage.js.map +1 -1
  77. package/dist/crewfoundry/pages/LearningLearningPagePage.js +10 -10
  78. package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
  79. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +11 -11
  80. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
  81. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +5 -5
  82. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
  83. package/dist/crewfoundry/pages/LearningMyLearningPagePage.js +7 -7
  84. package/dist/crewfoundry/pages/LearningMyLearningPagePage.js.map +1 -1
  85. package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js +3 -3
  86. package/dist/crewfoundry/pages/MarketplaceBookingManagementPagePage.js.map +1 -1
  87. package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +7 -7
  88. package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +1 -1
  89. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +11 -11
  90. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +1 -1
  91. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js +11 -11
  92. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js.map +1 -1
  93. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +6 -6
  94. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
  95. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +6 -6
  96. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +1 -1
  97. package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js +7 -7
  98. package/dist/crewfoundry/pages/MarketplaceMessagingPagePage.js.map +1 -1
  99. package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +2 -2
  100. package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
  101. package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js +15 -15
  102. package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +1 -1
  103. package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js +10 -10
  104. package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js.map +1 -1
  105. package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js +5 -5
  106. package/dist/crewfoundry/pages/PaymentsEscrowPagePage.js.map +1 -1
  107. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +6 -6
  108. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
  109. package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js +6 -6
  110. package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +1 -1
  111. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +4 -4
  112. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +1 -1
  113. package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js +4 -4
  114. package/dist/crewfoundry/pages/PaymentsSecurityPagePage.js.map +1 -1
  115. package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js +1 -1
  116. package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js.map +1 -1
  117. package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js +15 -15
  118. package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js.map +1 -1
  119. package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +4 -4
  120. package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
  121. package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js +8 -8
  122. package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
  123. package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +14 -14
  124. package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js.map +1 -1
  125. package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js +6 -6
  126. package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js.map +1 -1
  127. package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js +20 -20
  128. package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js.map +1 -1
  129. package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +3 -3
  130. package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
  131. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsEmployeeAnalyticsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { Award, BarChart3, Clock, MapPin, Star, TrendingUp, UserCheck } from 'lucide-react';\nimport { useMemo } from 'react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function AnalyticsEmployeeAnalyticsPagePage() {\n const { employees, departments } = useCrewFoundryStore();\n\n const tenureDistribution = useMemo(() => {\n const total = Math.max(employees.length, 1);\n const getYears = (startDate: string) =>\n Math.max(\n 0,\n (new Date('2026-03-01').getTime() - new Date(startDate).getTime()) /\n (1000 * 60 * 60 * 24 * 365)\n );\n const buckets = [\n { range: '< 1 year', min: 0, max: 1 },\n { range: '1-2 years', min: 1, max: 2 },\n { range: '2-3 years', min: 2, max: 3 },\n { range: '3-4 years', min: 3, max: 4 },\n { range: '4+ years', min: 4, max: Infinity },\n ];\n return buckets.map((bucket) => {\n const count = employees.filter((employee) => {\n const years = getYears(employee.startDate);\n return years >= bucket.min && years < bucket.max;\n }).length;\n return { range: bucket.range, count, percentage: Math.round((count / total) * 100) };\n });\n }, [employees]);\n\n const engagementDrivers = useMemo(() => {\n const byDept = departments.map((department) => {\n const deptEmployees = employees.filter((employee) => employee.department === department.name);\n const score =\n deptEmployees.length > 0\n ? deptEmployees.reduce((sum, employee) => sum + employee.performanceScore, 0) /\n deptEmployees.length\n : 0;\n return { department: department.name, score };\n });\n\n const avgScore =\n employees.length > 0\n ? employees.reduce((sum, employee) => sum + employee.performanceScore, 0) / employees.length\n : 0;\n\n const compScore =\n employees.length > 0\n ? Math.min(\n 5,\n Math.max(\n 3,\n employees.reduce((sum, employee) => sum + employee.salary, 0) /\n employees.length /\n 30000\n )\n )\n : 0;\n\n return [\n { driver: 'Workforce Performance', score: Number(avgScore.toFixed(1)), trend: '+0.2' },\n {\n driver: 'Career Growth',\n score: Number(\n (\n byDept.reduce((sum, entry) => sum + (entry.score > avgScore ? 4.6 : 4.0), 0) /\n Math.max(byDept.length, 1)\n ).toFixed(1)\n ),\n trend: '+0.1',\n },\n { driver: 'Compensation', score: Number(compScore.toFixed(1)), trend: '+0.2' },\n {\n driver: 'Management Quality',\n score: Number(\n (\n byDept.reduce((sum, entry) => sum + Math.min(5, entry.score + 0.4), 0) /\n Math.max(byDept.length, 1)\n ).toFixed(1)\n ),\n trend: '+0.3',\n },\n {\n driver: 'Company Culture',\n score: Number(Math.min(5, avgScore + 0.5).toFixed(1)),\n trend: '+0.2',\n },\n {\n driver: 'Learning Opportunities',\n score: Number(Math.min(5, avgScore + 0.3).toFixed(1)),\n trend: '+0.4',\n },\n ];\n }, [departments, employees]);\n\n const avgPerformance = (\n employees.reduce((sum, e) => sum + e.performanceScore, 0) / employees.length\n ).toFixed(1);\n const avgSalary = Math.round(employees.reduce((sum, e) => sum + e.salary, 0) / employees.length);\n const activeCount = employees.filter((e) => e.status === 'active').length;\n const onLeaveCount = employees.filter((e) => e.status === 'on_leave').length;\n\n const deptPerformance = departments.map((dept) => {\n const deptEmps = employees.filter((e) => e.department === dept.name);\n const avgScore =\n deptEmps.length > 0\n ? (deptEmps.reduce((s, e) => s + e.performanceScore, 0) / deptEmps.length).toFixed(1)\n : '0';\n const avgSal =\n deptEmps.length > 0\n ? Math.round(deptEmps.reduce((s, e) => s + e.salary, 0) / deptEmps.length)\n : 0;\n return { name: dept.name, headcount: deptEmps.length, avgScore, avgSalary: avgSal };\n });\n\n const locationBreakdown = employees.reduce<Record<string, number>>((acc, e) => {\n acc[e.location] = (acc[e.location] || 0) + 1;\n return acc;\n }, {});\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Employee Analytics</h1>\n <p className=\"text-sm text-muted-foreground\">\n Deep-dive into employee performance, engagement, and demographics\n </p>\n </div>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active Employees</CardTitle>\n <UserCheck className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{activeCount}</div>\n <p className=\"text-xs text-muted-foreground\">{onLeaveCount} currently on leave</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Avg Performance</CardTitle>\n <Star className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{avgPerformance}/5.0</div>\n <div className=\"flex items-center text-xs text-green-600\">\n <TrendingUp className=\"h-3 w-3 mr-1\" />\n +0.2 from last quarter\n </div>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Avg Compensation</CardTitle>\n <BarChart3 className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">${avgSalary.toLocaleString()}</div>\n <p className=\"text-xs text-muted-foreground\">Across all departments</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Avg Tenure</CardTitle>\n <Clock className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">2.4 yrs</div>\n <p className=\"text-xs text-muted-foreground\">Median: 2.1 years</p>\n </CardContent>\n </Card>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n <Card>\n <CardHeader>\n <CardTitle>Department Performance</CardTitle>\n <CardDescription>\n Average performance score and compensation by department\n </CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-4 gap-2 text-xs font-medium text-muted-foreground border-b pb-2 mb-2\">\n <span>Department</span>\n <span className=\"text-right\">Headcount</span>\n <span className=\"text-right\">Avg Score</span>\n <span className=\"text-right\">Avg Salary</span>\n </div>\n {deptPerformance\n .sort((a, b) => Number(b.avgScore) - Number(a.avgScore))\n .map((dept) => (\n <div\n key={dept.name}\n className=\"grid grid-cols-4 gap-2 py-2 border-b last:border-0 text-sm\"\n >\n <span className=\"font-medium\">{dept.name}</span>\n <span className=\"text-right\">{dept.headcount}</span>\n <div className=\"text-right\">\n <Badge variant={Number(dept.avgScore) >= 4.5 ? 'default' : 'secondary'}>\n {dept.avgScore}\n </Badge>\n </div>\n <span className=\"text-right\">${dept.avgSalary.toLocaleString()}</span>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Engagement Drivers</CardTitle>\n <CardDescription>Employee satisfaction by category</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {engagementDrivers\n .sort((a, b) => b.score - a.score)\n .map((driver) => (\n <div key={driver.driver} className=\"space-y-1\">\n <div className=\"flex justify-between text-sm\">\n <span>{driver.driver}</span>\n <div className=\"flex items-center gap-2\">\n <span className=\"font-medium\">{driver.score}/5</span>\n <span className=\"text-xs text-green-600\">{driver.trend}</span>\n </div>\n </div>\n <div className=\"h-2 bg-muted rounded overflow-hidden\">\n <div\n className={`h-2 rounded ${driver.score >= 4.5 ? 'bg-green-500' : driver.score >= 4 ? 'bg-blue-500' : 'bg-yellow-500'}`}\n style={{ width: `${(driver.score / 5) * 100}%` }}\n />\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 className=\"flex items-center gap-2\">\n <Clock className=\"h-4 w-4\" />\n Tenure Distribution\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {tenureDistribution.map((t) => (\n <div key={t.range} className=\"flex items-center gap-3\">\n <span className=\"w-20 text-sm text-muted-foreground\">{t.range}</span>\n <div className=\"flex-1 h-4 bg-muted rounded overflow-hidden\">\n <div\n className=\"h-4 bg-primary/70 rounded\"\n style={{ width: `${t.percentage}%` }}\n />\n </div>\n <span className=\"text-sm font-medium w-10 text-right\">{t.count}</span>\n <span className=\"text-xs text-muted-foreground w-10 text-right\">\n {t.percentage}%\n </span>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <MapPin className=\"h-4 w-4\" />\n Location Distribution\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {Object.entries(locationBreakdown)\n .sort(([, a], [, b]) => b - a)\n .map(([loc, count]) => (\n <div key={loc} className=\"flex items-center justify-between py-1\">\n <span className=\"text-sm\">{loc}</span>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-medium\">{count}</span>\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {Math.round((count / employees.length) * 100)}%\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <Award className=\"h-4 w-4 text-yellow-500\" />\n Key Insights\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"grid gap-3 md:grid-cols-3\">\n <div className=\"rounded border p-3\">\n <p className=\"text-sm font-medium\">Highest Performance</p>\n <p className=\"text-xs text-muted-foreground mt-1\">\n Engineering department leads with avg score of{' '}\n {deptPerformance.find((d) => d.name === 'Engineering')?.avgScore || 'N/A'}\n </p>\n </div>\n <div className=\"rounded border p-3\">\n <p className=\"text-sm font-medium\">Retention Risk</p>\n <p className=\"text-xs text-muted-foreground mt-1\">\n 12 employees flagged as flight risk based on engagement signals\n </p>\n </div>\n <div className=\"rounded border p-3\">\n <p className=\"text-sm font-medium\">Compensation Gap</p>\n <p className=\"text-xs text-muted-foreground mt-1\">\n 3 departments below market median, review recommended in Q2\n </p>\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAYA,SAAgB,IAAqC;CACnD,IAAM,EAAE,cAAW,mBAAgB,GAAqB,EAElD,IAAqB,QAAc;EACvC,IAAM,IAAQ,KAAK,IAAI,EAAU,QAAQ,EAAE,EACrC,KAAY,MAChB,KAAK,IACH,qBACC,IAAI,KAAK,aAAa,EAAC,SAAS,GAAG,IAAI,KAAK,EAAU,CAAC,SAAS,KAC9D,MAAO,KAAK,KAAK,KAAK,KAC1B;AAQH,SAPgB;GACd;IAAE,OAAO;IAAY,KAAK;IAAG,KAAK;IAAG;GACrC;IAAE,OAAO;IAAa,KAAK;IAAG,KAAK;IAAG;GACtC;IAAE,OAAO;IAAa,KAAK;IAAG,KAAK;IAAG;GACtC;IAAE,OAAO;IAAa,KAAK;IAAG,KAAK;IAAG;GACtC;IAAE,OAAO;IAAY,KAAK;IAAG,KAAK;IAAU;GAC7C,CACc,KAAK,MAAW;GAC7B,IAAM,IAAQ,EAAU,QAAQ,MAAa;IAC3C,IAAM,IAAQ,EAAS,EAAS,UAAU;AAC1C,WAAO,KAAS,EAAO,OAAO,IAAQ,EA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AAA,EAC1D,kBAAC,KAAD;OAAG,WAAU;iBAAb;QAAkD;QACD;QAC9C,EAAgB,MAAM,MAAM,EAAE,SAAS,cAAc,EAAE,YAAY;QAClE;SACA;;KACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,KAAD;OAAG,WAAU;iBAAsB;OAAkB,CAAA,EACrD,kBAAC,KAAD;OAAG,WAAU;iBAAqC;OAE9C,CAAA,CACA;;KACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,KAAD;OAAG,WAAU;iBAAsB;OAAoB,CAAA,EACvD,kBAAC,KAAD;OAAG,WAAU;iBAAqC;OAE9C,CAAA,CACA;;KACF;OACM,CAAA,CACT,EAAA,CAAA;GACH"}
1
+ {"version":3,"file":"AnalyticsEmployeeAnalyticsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { Award, BarChart3, Clock, MapPin, Star, TrendingUp, UserCheck } from 'lucide-react';\nimport { useMemo } from 'react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function AnalyticsEmployeeAnalyticsPagePage() {\n const { employees, departments } = useCrewFoundryStore();\n\n const tenureDistribution = useMemo(() => {\n const total = Math.max(employees.length, 1);\n const getYears = (startDate: string) =>\n Math.max(\n 0,\n (new Date('2026-03-01').getTime() - new Date(startDate).getTime()) /\n (1000 * 60 * 60 * 24 * 365)\n );\n const buckets = [\n { range: '< 1 year', min: 0, max: 1 },\n { range: '1-2 years', min: 1, max: 2 },\n { range: '2-3 years', min: 2, max: 3 },\n { range: '3-4 years', min: 3, max: 4 },\n { range: '4+ years', min: 4, max: Infinity },\n ];\n return buckets.map((bucket) => {\n const count = employees.filter((employee) => {\n const years = getYears(employee.startDate);\n return years >= bucket.min && years < bucket.max;\n }).length;\n return { range: bucket.range, count, percentage: Math.round((count / total) * 100) };\n });\n }, [employees]);\n\n const engagementDrivers = useMemo(() => {\n const byDept = departments.map((department) => {\n const deptEmployees = employees.filter((employee) => employee.department === department.name);\n const score =\n deptEmployees.length > 0\n ? deptEmployees.reduce((sum, employee) => sum + employee.performanceScore, 0) /\n deptEmployees.length\n : 0;\n return { department: department.name, score };\n });\n\n const avgScore =\n employees.length > 0\n ? employees.reduce((sum, employee) => sum + employee.performanceScore, 0) / employees.length\n : 0;\n\n const compScore =\n employees.length > 0\n ? Math.min(\n 5,\n Math.max(\n 3,\n employees.reduce((sum, employee) => sum + employee.salary, 0) /\n employees.length /\n 30000\n )\n )\n : 0;\n\n return [\n { driver: 'Workforce Performance', score: Number(avgScore.toFixed(1)), trend: '+0.2' },\n {\n driver: 'Career Growth',\n score: Number(\n (\n byDept.reduce((sum, entry) => sum + (entry.score > avgScore ? 4.6 : 4.0), 0) /\n Math.max(byDept.length, 1)\n ).toFixed(1)\n ),\n trend: '+0.1',\n },\n { driver: 'Compensation', score: Number(compScore.toFixed(1)), trend: '+0.2' },\n {\n driver: 'Management Quality',\n score: Number(\n (\n byDept.reduce((sum, entry) => sum + Math.min(5, entry.score + 0.4), 0) /\n Math.max(byDept.length, 1)\n ).toFixed(1)\n ),\n trend: '+0.3',\n },\n {\n driver: 'Company Culture',\n score: Number(Math.min(5, avgScore + 0.5).toFixed(1)),\n trend: '+0.2',\n },\n {\n driver: 'Learning Opportunities',\n score: Number(Math.min(5, avgScore + 0.3).toFixed(1)),\n trend: '+0.4',\n },\n ];\n }, [departments, employees]);\n\n const avgPerformance = (\n employees.reduce((sum, e) => sum + e.performanceScore, 0) / employees.length\n ).toFixed(1);\n const avgSalary = Math.round(employees.reduce((sum, e) => sum + e.salary, 0) / employees.length);\n const activeCount = employees.filter((e) => e.status === 'active').length;\n const onLeaveCount = employees.filter((e) => e.status === 'on_leave').length;\n\n const deptPerformance = departments.map((dept) => {\n const deptEmps = employees.filter((e) => e.department === dept.name);\n const avgScore =\n deptEmps.length > 0\n ? (deptEmps.reduce((s, e) => s + e.performanceScore, 0) / deptEmps.length).toFixed(1)\n : '0';\n const avgSal =\n deptEmps.length > 0\n ? Math.round(deptEmps.reduce((s, e) => s + e.salary, 0) / deptEmps.length)\n : 0;\n return { name: dept.name, headcount: deptEmps.length, avgScore, avgSalary: avgSal };\n });\n\n const locationBreakdown = employees.reduce<Record<string, number>>((acc, e) => {\n acc[e.location] = (acc[e.location] || 0) + 1;\n return acc;\n }, {});\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Employee Analytics</h1>\n <p className=\"text-sm text-text-secondary\">\n Deep-dive into employee performance, engagement, and demographics\n </p>\n </div>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active Employees</CardTitle>\n <UserCheck className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{activeCount}</div>\n <p className=\"text-xs text-text-secondary\">{onLeaveCount} currently on leave</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Avg Performance</CardTitle>\n <Star className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{avgPerformance}/5.0</div>\n <div className=\"flex items-center text-xs text-green-600\">\n <TrendingUp className=\"h-3 w-3 mr-1\" />\n +0.2 from last quarter\n </div>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Avg Compensation</CardTitle>\n <BarChart3 className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">${avgSalary.toLocaleString()}</div>\n <p className=\"text-xs text-text-secondary\">Across all departments</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Avg Tenure</CardTitle>\n <Clock className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">2.4 yrs</div>\n <p className=\"text-xs text-text-secondary\">Median: 2.1 years</p>\n </CardContent>\n </Card>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n <Card>\n <CardHeader>\n <CardTitle>Department Performance</CardTitle>\n <CardDescription>\n Average performance score and compensation by department\n </CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-4 gap-2 text-xs font-medium text-text-secondary border-b pb-2 mb-2\">\n <span>Department</span>\n <span className=\"text-right\">Headcount</span>\n <span className=\"text-right\">Avg Score</span>\n <span className=\"text-right\">Avg Salary</span>\n </div>\n {deptPerformance\n .sort((a, b) => Number(b.avgScore) - Number(a.avgScore))\n .map((dept) => (\n <div\n key={dept.name}\n className=\"grid grid-cols-4 gap-2 py-2 border-b last:border-0 text-sm\"\n >\n <span className=\"font-medium\">{dept.name}</span>\n <span className=\"text-right\">{dept.headcount}</span>\n <div className=\"text-right\">\n <Badge variant={Number(dept.avgScore) >= 4.5 ? 'default' : 'secondary'}>\n {dept.avgScore}\n </Badge>\n </div>\n <span className=\"text-right\">${dept.avgSalary.toLocaleString()}</span>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Engagement Drivers</CardTitle>\n <CardDescription>Employee satisfaction by category</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {engagementDrivers\n .sort((a, b) => b.score - a.score)\n .map((driver) => (\n <div key={driver.driver} className=\"space-y-1\">\n <div className=\"flex justify-between text-sm\">\n <span>{driver.driver}</span>\n <div className=\"flex items-center gap-2\">\n <span className=\"font-medium\">{driver.score}/5</span>\n <span className=\"text-xs text-green-600\">{driver.trend}</span>\n </div>\n </div>\n <div className=\"h-2 bg-bg-sunken rounded overflow-hidden\">\n <div\n className={`h-2 rounded ${driver.score >= 4.5 ? 'bg-green-500' : driver.score >= 4 ? 'bg-blue-500' : 'bg-yellow-500'}`}\n style={{ width: `${(driver.score / 5) * 100}%` }}\n />\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 className=\"flex items-center gap-2\">\n <Clock className=\"h-4 w-4\" />\n Tenure Distribution\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {tenureDistribution.map((t) => (\n <div key={t.range} className=\"flex items-center gap-3\">\n <span className=\"w-20 text-sm text-text-secondary\">{t.range}</span>\n <div className=\"flex-1 h-4 bg-bg-sunken rounded overflow-hidden\">\n <div\n className=\"h-4 bg-action-primary-bg/70 rounded\"\n style={{ width: `${t.percentage}%` }}\n />\n </div>\n <span className=\"text-sm font-medium w-10 text-right\">{t.count}</span>\n <span className=\"text-xs text-text-secondary w-10 text-right\">\n {t.percentage}%\n </span>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <MapPin className=\"h-4 w-4\" />\n Location Distribution\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {Object.entries(locationBreakdown)\n .sort(([, a], [, b]) => b - a)\n .map(([loc, count]) => (\n <div key={loc} className=\"flex items-center justify-between py-1\">\n <span className=\"text-sm\">{loc}</span>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-medium\">{count}</span>\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {Math.round((count / employees.length) * 100)}%\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <Award className=\"h-4 w-4 text-yellow-500\" />\n Key Insights\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"grid gap-3 md:grid-cols-3\">\n <div className=\"rounded border p-3\">\n <p className=\"text-sm font-medium\">Highest Performance</p>\n <p className=\"text-xs text-text-secondary mt-1\">\n Engineering department leads with avg score of{' '}\n {deptPerformance.find((d) => d.name === 'Engineering')?.avgScore || 'N/A'}\n </p>\n </div>\n <div className=\"rounded border p-3\">\n <p className=\"text-sm font-medium\">Retention Risk</p>\n <p className=\"text-xs text-text-secondary mt-1\">\n 12 employees flagged as flight risk based on engagement signals\n </p>\n </div>\n <div className=\"rounded border p-3\">\n <p className=\"text-sm font-medium\">Compensation Gap</p>\n <p className=\"text-xs text-text-secondary mt-1\">\n 3 departments below market median, review recommended in Q2\n </p>\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAYA,SAAgB,IAAqC;CACnD,IAAM,EAAE,cAAW,mBAAgB,GAAqB,EAElD,IAAqB,QAAc;EACvC,IAAM,IAAQ,KAAK,IAAI,EAAU,QAAQ,EAAE,EACrC,KAAY,MAChB,KAAK,IACH,qBACC,IAAI,KAAK,aAAa,EAAC,SAAS,GAAG,IAAI,KAAK,EAAU,CAAC,SAAS,KAC9D,MAAO,KAAK,KAAK,KAAK,KAC1B;AAQH,SAPgB;GACd;IAAE,OAAO;IAAY,KAAK;IAAG,KAAK;IAAG;GACrC;IAAE,OAAO;IAAa,KAAK;IAAG,KAAK;IAAG;GACtC;IAAE,OAAO;IAAa,KAAK;IAAG,KAAK;IAAG;GACtC;IAAE,OAAO;IAAa,KAAK;IAAG,KAAK;IAAG;GACtC;IAAE,OAAO;IAAY,KAAK;IAAG,KAAK;IAAU;GAC7C,CACc,KAAK,MAAW;GAC7B,IAAM,IAAQ,EAAU,QAAQ,MAAa;IAC3C,IAAM,IAAQ,EAAS,EAAS,UAAU;AAC1C,WAAO,KAAS,EAAO,OAAO,IAAQ,EAAO;KAC7C,CAAC;AACH,UAA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AAG,WAAU;iBAAb;QAAgD;QACC;QAC9C,EAAgB,MAAM,MAAM,EAAE,SAAS,cAAc,EAAE,YAAY;QAClE;SACA;;KACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,KAAD;OAAG,WAAU;iBAAsB;OAAkB,CAAA,EACrD,kBAAC,KAAD;OAAG,WAAU;iBAAmC;OAE5C,CAAA,CACA;;KACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,KAAD;OAAG,WAAU;iBAAsB;OAAoB,CAAA,EACvD,kBAAC,KAAD;OAAG,WAAU;iBAAmC;OAE5C,CAAA,CACA;;KACF;OACM,CAAA,CACT,EAAA,CAAA;GACH"}
@@ -66,7 +66,7 @@ function _() {
66
66
  className: "text-2xl font-semibold",
67
67
  children: "Financial Analytics"
68
68
  }), /* @__PURE__ */ c("p", {
69
- className: "text-sm text-muted-foreground",
69
+ className: "text-sm text-text-secondary",
70
70
  children: "Workforce financial metrics and cost analysis"
71
71
  })] })
72
72
  }),
@@ -78,7 +78,7 @@ function _() {
78
78
  children: [/* @__PURE__ */ c(h, {
79
79
  className: "text-sm font-medium",
80
80
  children: "Monthly Payroll"
81
- }), /* @__PURE__ */ c(r, { className: "h-4 w-4 text-muted-foreground" })]
81
+ }), /* @__PURE__ */ c(r, { className: "h-4 w-4 text-text-secondary" })]
82
82
  }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l("div", {
83
83
  className: "text-2xl font-bold",
84
84
  children: [
@@ -95,7 +95,7 @@ function _() {
95
95
  children: [/* @__PURE__ */ c(h, {
96
96
  className: "text-sm font-medium",
97
97
  children: "Annual Salary Cost"
98
- }), /* @__PURE__ */ c(s, { className: "h-4 w-4 text-muted-foreground" })]
98
+ }), /* @__PURE__ */ c(s, { className: "h-4 w-4 text-text-secondary" })]
99
99
  }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l("div", {
100
100
  className: "text-2xl font-bold",
101
101
  children: [
@@ -104,7 +104,7 @@ function _() {
104
104
  "M"
105
105
  ]
106
106
  }), /* @__PURE__ */ l("p", {
107
- className: "text-xs text-muted-foreground",
107
+ className: "text-xs text-text-secondary",
108
108
  children: [_.length, " employees"]
109
109
  })] })] }),
110
110
  /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ l(m, {
@@ -112,7 +112,7 @@ function _() {
112
112
  children: [/* @__PURE__ */ c(h, {
113
113
  className: "text-sm font-medium",
114
114
  children: "Total Invoiced"
115
- }), /* @__PURE__ */ c(i, { className: "h-4 w-4 text-muted-foreground" })]
115
+ }), /* @__PURE__ */ c(i, { className: "h-4 w-4 text-text-secondary" })]
116
116
  }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l("div", {
117
117
  className: "text-2xl font-bold",
118
118
  children: [
@@ -121,7 +121,7 @@ function _() {
121
121
  "K"
122
122
  ]
123
123
  }), /* @__PURE__ */ l("p", {
124
- className: "text-xs text-muted-foreground",
124
+ className: "text-xs text-text-secondary",
125
125
  children: [
126
126
  "$",
127
127
  (D / 1e3).toFixed(1),
@@ -133,7 +133,7 @@ function _() {
133
133
  children: [/* @__PURE__ */ c(h, {
134
134
  className: "text-sm font-medium",
135
135
  children: "Project Budget"
136
- }), /* @__PURE__ */ c(o, { className: "h-4 w-4 text-muted-foreground" })]
136
+ }), /* @__PURE__ */ c(o, { className: "h-4 w-4 text-text-secondary" })]
137
137
  }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l("div", {
138
138
  className: "text-2xl font-bold",
139
139
  children: [
@@ -142,7 +142,7 @@ function _() {
142
142
  "M"
143
143
  ]
144
144
  }), /* @__PURE__ */ l("p", {
145
- className: "text-xs text-muted-foreground",
145
+ className: "text-xs text-text-secondary",
146
146
  children: [Math.round(k / O * 100), "% utilized"]
147
147
  })] })] })
148
148
  ]
@@ -153,16 +153,16 @@ function _() {
153
153
  className: "flex items-center gap-3",
154
154
  children: [
155
155
  /* @__PURE__ */ c("span", {
156
- className: "w-10 text-sm text-muted-foreground",
156
+ className: "w-10 text-sm text-text-secondary",
157
157
  children: e.month
158
158
  }),
159
159
  /* @__PURE__ */ l("div", {
160
- className: "flex-1 h-5 bg-muted rounded overflow-hidden flex",
160
+ className: "flex-1 h-5 bg-bg-sunken rounded overflow-hidden flex",
161
161
  children: [/* @__PURE__ */ c("div", {
162
- className: "h-5 bg-primary",
162
+ className: "h-5 bg-action-primary-bg",
163
163
  style: { width: `${Math.round(e.net / A * 100)}%` }
164
164
  }), /* @__PURE__ */ c("div", {
165
- className: "h-5 bg-primary/30",
165
+ className: "h-5 bg-action-primary-bg/30",
166
166
  style: { width: `${Math.round(e.deductions / A * 100)}%` }
167
167
  })]
168
168
  }),
@@ -176,13 +176,13 @@ function _() {
176
176
  })
177
177
  ]
178
178
  }, e.month)), /* @__PURE__ */ l("div", {
179
- className: "flex items-center gap-4 mt-2 text-xs text-muted-foreground",
179
+ className: "flex items-center gap-4 mt-2 text-xs text-text-secondary",
180
180
  children: [/* @__PURE__ */ l("div", {
181
181
  className: "flex items-center gap-1",
182
- children: [/* @__PURE__ */ c("div", { className: "h-3 w-3 bg-primary rounded" }), /* @__PURE__ */ c("span", { children: "Net Pay" })]
182
+ children: [/* @__PURE__ */ c("div", { className: "h-3 w-3 bg-action-primary-bg rounded" }), /* @__PURE__ */ c("span", { children: "Net Pay" })]
183
183
  }), /* @__PURE__ */ l("div", {
184
184
  className: "flex items-center gap-1",
185
- children: [/* @__PURE__ */ c("div", { className: "h-3 w-3 bg-primary/30 rounded" }), /* @__PURE__ */ c("span", { children: "Deductions" })]
185
+ children: [/* @__PURE__ */ c("div", { className: "h-3 w-3 bg-action-primary-bg/30 rounded" }), /* @__PURE__ */ c("span", { children: "Deductions" })]
186
186
  })]
187
187
  })]
188
188
  })] }),
@@ -209,14 +209,14 @@ function _() {
209
209
  ] })]
210
210
  }),
211
211
  /* @__PURE__ */ c("div", {
212
- className: "h-3 bg-muted rounded overflow-hidden",
212
+ className: "h-3 bg-bg-sunken rounded overflow-hidden",
213
213
  children: /* @__PURE__ */ c("div", {
214
214
  className: `h-3 rounded ${t > 95 ? "bg-red-500" : t > 80 ? "bg-yellow-500" : "bg-green-500"}`,
215
215
  style: { width: `${t}%` }
216
216
  })
217
217
  }),
218
218
  /* @__PURE__ */ l("p", {
219
- className: "text-xs text-muted-foreground text-right",
219
+ className: "text-xs text-text-secondary text-right",
220
220
  children: [t, "% utilized"]
221
221
  })
222
222
  ]
@@ -230,7 +230,7 @@ function _() {
230
230
  className: "text-sm font-medium",
231
231
  children: e.number
232
232
  }), /* @__PURE__ */ c("p", {
233
- className: "text-xs text-muted-foreground",
233
+ className: "text-xs text-text-secondary",
234
234
  children: e.clientName
235
235
  })] }), /* @__PURE__ */ l("div", {
236
236
  className: "text-right",
@@ -248,7 +248,7 @@ function _() {
248
248
  }),
249
249
  /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(h, { children: "Department Cost Analysis" }), /* @__PURE__ */ c(p, { children: "Total salary cost and budget allocation by department" })] }), /* @__PURE__ */ l(f, { children: [
250
250
  /* @__PURE__ */ l("div", {
251
- className: "grid grid-cols-5 gap-2 text-xs font-medium text-muted-foreground border-b pb-2 mb-2",
251
+ className: "grid grid-cols-5 gap-2 text-xs font-medium text-text-secondary border-b pb-2 mb-2",
252
252
  children: [
253
253
  /* @__PURE__ */ c("span", { children: "Department" }),
254
254
  /* @__PURE__ */ c("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsFinancialAnalyticsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n Separator,\n} from '@burdenoff/fe-libs/ui';\nimport { ArrowUp, DollarSign, FileText, Receipt, TrendingUp, Wallet } from 'lucide-react';\nimport { useMemo } from 'react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function AnalyticsFinancialAnalyticsPagePage() {\n const { employees, departments, payrollRecords, invoices, projects } = useCrewFoundryStore();\n\n const monthlyPayrollTrend = useMemo(() => {\n const byPeriod = payrollRecords.reduce<\n Record<string, { gross: number; net: number; deductions: number }>\n >((acc, record) => {\n const month = new Date(record.payDate).toLocaleString('en-US', { month: 'short' });\n const current = acc[month] || { gross: 0, net: 0, deductions: 0 };\n current.gross += record.grossPay;\n current.net += record.netPay;\n current.deductions += record.deductions;\n acc[month] = current;\n return acc;\n }, {});\n return Object.entries(byPeriod)\n .map(([month, value]) => ({ month, ...value }))\n .slice(-6);\n }, [payrollRecords]);\n\n const expenseCategories = useMemo(\n () => [\n {\n category: 'Payroll',\n amount: payrollRecords.reduce((sum, record) => sum + record.grossPay, 0),\n budget: departments.reduce((sum, department) => sum + department.budget * 0.7, 0),\n icon: Wallet,\n },\n {\n category: 'Benefits',\n amount: payrollRecords.reduce((sum, record) => sum + record.deductions * 0.4, 0),\n budget: departments.reduce((sum, department) => sum + department.budget * 0.15, 0),\n icon: Receipt,\n },\n {\n category: 'Recruitment',\n amount: invoices.reduce(\n (sum, invoice) => sum + (invoice.status === 'paid' ? invoice.amount * 0.15 : 0),\n 0\n ),\n budget: departments.reduce((sum, department) => sum + department.budget * 0.1, 0),\n icon: FileText,\n },\n {\n category: 'Training',\n amount: projects.reduce((sum, project) => sum + project.spent * 0.08, 0),\n budget: departments.reduce((sum, department) => sum + department.budget * 0.08, 0),\n icon: TrendingUp,\n },\n ],\n [departments, invoices, payrollRecords, projects]\n );\n\n const totalPayroll = employees.reduce((sum, e) => sum + e.salary, 0);\n const monthlyPayroll = Math.round(totalPayroll / 12);\n const totalInvoiced = invoices.reduce((sum, inv) => sum + inv.amount, 0);\n const paidInvoices = invoices\n .filter((i) => i.status === 'paid')\n .reduce((s, i) => s + i.amount, 0);\n const totalProjectBudget = projects.reduce((s, p) => s + p.budget, 0);\n const totalProjectSpent = projects.reduce((s, p) => s + p.spent, 0);\n\n const maxPayroll = Math.max(1, ...monthlyPayrollTrend.map((m) => m.gross));\n\n const deptCost = departments.map((d) => {\n const deptEmps = employees.filter((e) => e.department === d.name);\n const totalSal = deptEmps.reduce((s, e) => s + e.salary, 0);\n return { name: d.name, salary: totalSal, budget: d.budget, headcount: deptEmps.length };\n });\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Financial Analytics</h1>\n <p className=\"text-sm text-muted-foreground\">\n Workforce financial metrics and cost analysis\n </p>\n </div>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Monthly Payroll</CardTitle>\n <DollarSign className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">${(monthlyPayroll / 1000).toFixed(0)}K</div>\n <div className=\"flex items-center text-xs text-yellow-600\">\n <ArrowUp className=\"h-3 w-3 mr-1\" />\n +2.1% from last month\n </div>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Annual Salary Cost</CardTitle>\n <Wallet className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">${(totalPayroll / 1000000).toFixed(1)}M</div>\n <p className=\"text-xs text-muted-foreground\">{employees.length} employees</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Invoiced</CardTitle>\n <FileText className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">${(totalInvoiced / 1000).toFixed(1)}K</div>\n <p className=\"text-xs text-muted-foreground\">\n ${(paidInvoices / 1000).toFixed(1)}K collected\n </p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Project Budget</CardTitle>\n <TrendingUp className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">${(totalProjectBudget / 1000000).toFixed(1)}M</div>\n <p className=\"text-xs text-muted-foreground\">\n {Math.round((totalProjectSpent / totalProjectBudget) * 100)}% utilized\n </p>\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle>Payroll Trend</CardTitle>\n <CardDescription>Monthly gross payroll over the last 6 months</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {monthlyPayrollTrend.map((m) => (\n <div key={m.month} className=\"flex items-center gap-3\">\n <span className=\"w-10 text-sm text-muted-foreground\">{m.month}</span>\n <div className=\"flex-1 h-5 bg-muted rounded overflow-hidden flex\">\n <div\n className=\"h-5 bg-primary\"\n style={{ width: `${Math.round((m.net / maxPayroll) * 100)}%` }}\n />\n <div\n className=\"h-5 bg-primary/30\"\n style={{ width: `${Math.round((m.deductions / maxPayroll) * 100)}%` }}\n />\n </div>\n <span className=\"text-sm font-medium w-20 text-right\">\n ${(m.gross / 1000000).toFixed(2)}M\n </span>\n </div>\n ))}\n <div className=\"flex items-center gap-4 mt-2 text-xs text-muted-foreground\">\n <div className=\"flex items-center gap-1\">\n <div className=\"h-3 w-3 bg-primary rounded\" />\n <span>Net Pay</span>\n </div>\n <div className=\"flex items-center gap-1\">\n <div className=\"h-3 w-3 bg-primary/30 rounded\" />\n <span>Deductions</span>\n </div>\n </div>\n </CardContent>\n </Card>\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n <Card>\n <CardHeader>\n <CardTitle>Budget vs Actual</CardTitle>\n <CardDescription>Monthly expense tracking by category</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {expenseCategories.map((cat) => {\n const pct = Math.round((cat.amount / cat.budget) * 100);\n return (\n <div key={cat.category} className=\"space-y-1\">\n <div className=\"flex justify-between text-sm\">\n <span className=\"font-medium\">{cat.category}</span>\n <span>\n ${(cat.amount / 1000).toFixed(0)}K / ${(cat.budget / 1000).toFixed(0)}K\n </span>\n </div>\n <div className=\"h-3 bg-muted rounded overflow-hidden\">\n <div\n className={`h-3 rounded ${pct > 95 ? 'bg-red-500' : pct > 80 ? 'bg-yellow-500' : 'bg-green-500'}`}\n style={{ width: `${pct}%` }}\n />\n </div>\n <p className=\"text-xs text-muted-foreground text-right\">{pct}% utilized</p>\n </div>\n );\n })}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Outstanding Invoices</CardTitle>\n <CardDescription>Invoices requiring attention</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {invoices.map((inv) => (\n <div key={inv.id} className=\"flex items-center justify-between rounded border p-3\">\n <div>\n <p className=\"text-sm font-medium\">{inv.number}</p>\n <p className=\"text-xs text-muted-foreground\">{inv.clientName}</p>\n </div>\n <div className=\"text-right\">\n <p className=\"text-sm font-medium\">${inv.amount.toLocaleString()}</p>\n <Badge\n variant={\n inv.status === 'paid'\n ? 'default'\n : inv.status === 'overdue'\n ? 'destructive'\n : 'secondary'\n }\n className=\"text-[10px]\"\n >\n {inv.status}\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle>Department Cost Analysis</CardTitle>\n <CardDescription>Total salary cost and budget allocation by department</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-5 gap-2 text-xs font-medium text-muted-foreground border-b pb-2 mb-2\">\n <span>Department</span>\n <span className=\"text-right\">Headcount</span>\n <span className=\"text-right\">Total Salary</span>\n <span className=\"text-right\">Dept Budget</span>\n <span className=\"text-right\">Salary/Budget %</span>\n </div>\n {deptCost\n .sort((a, b) => b.salary - a.salary)\n .map((d) => (\n <div\n key={d.name}\n className=\"grid grid-cols-5 gap-2 py-2 border-b last:border-0 text-sm\"\n >\n <span className=\"font-medium\">{d.name}</span>\n <span className=\"text-right\">{d.headcount}</span>\n <span className=\"text-right\">${(d.salary / 1000).toFixed(0)}K</span>\n <span className=\"text-right\">${(d.budget / 1000000).toFixed(1)}M</span>\n <span className=\"text-right\">\n <Badge\n variant={d.salary / d.budget > 0.5 ? 'destructive' : 'default'}\n className=\"text-[10px]\"\n >\n {Math.round((d.salary / d.budget) * 100)}%\n </Badge>\n </span>\n </div>\n ))}\n <Separator className=\"my-2\" />\n <div className=\"grid grid-cols-5 gap-2 text-sm font-bold\">\n <span>Total</span>\n <span className=\"text-right\">{employees.length}</span>\n <span className=\"text-right\">${(totalPayroll / 1000000).toFixed(1)}M</span>\n <span className=\"text-right\">\n ${(departments.reduce((s, d) => s + d.budget, 0) / 1000000).toFixed(1)}M\n </span>\n <span />\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAaA,SAAgB,IAAsC;CACpD,IAAM,EAAE,cAAW,gBAAa,mBAAgB,aAAU,gBAAa,GAAqB,EAEtF,IAAsB,QAAc;EACxC,IAAM,IAAW,EAAe,QAE7B,GAAK,MAAW;GACjB,IAAM,IAAQ,IAAI,KAAK,EAAO,QAAQ,CAAC,eAAe,SAAS,EAAE,OAAO,SAAS,CAAC,EAC5E,IAAU,EAAI,MAAU;IAAE,OAAO;IAAG,KAAK;IAAG,YAAY;IAAG;AAKjE,UAJA,EAAQ,SAAS,EAAO,UACxB,EAAQ,OAAO,EAAO,QACtB,EAAQ,cAAc,EAAO,YAC7B,EAAI,KAAS,GACN;KACN,EAAE,CAAC;AACN,SAAO,OAAO,QAAQ,EAAS,CAC5B,KAAK,CAAC,GAAO,QAAY;GAAE;GAAO,GAAG;GAAO,EAAE,CAC9C,MAAM,GAAG;IACX,CAAC,EAAe,CAAC,EAEd,IAAoB,QAClB;EACJ;GACE,UAAU;GACV,QAAQ,EAAe,QAAQ,GAAK,MAAW,IAAM,EAAO,UAAU,EAAE;GACxE,QAAQ,E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;OAAM,WAAU;iBAAhB;QAA6B;SACxB,EAAY,QAAQ,GAAG,MAAM,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAS,QAAQ,EAAE;QAAC;QAClE;;MACP,kBAAC,QAAD,EAAQ,CAAA;MACJ;;IACM,EAAA,CAAA,CACT,EAAA,CAAA;GACH"}
1
+ {"version":3,"file":"AnalyticsFinancialAnalyticsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n Separator,\n} from '@burdenoff/fe-libs/ui';\nimport { ArrowUp, DollarSign, FileText, Receipt, TrendingUp, Wallet } from 'lucide-react';\nimport { useMemo } from 'react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function AnalyticsFinancialAnalyticsPagePage() {\n const { employees, departments, payrollRecords, invoices, projects } = useCrewFoundryStore();\n\n const monthlyPayrollTrend = useMemo(() => {\n const byPeriod = payrollRecords.reduce<\n Record<string, { gross: number; net: number; deductions: number }>\n >((acc, record) => {\n const month = new Date(record.payDate).toLocaleString('en-US', { month: 'short' });\n const current = acc[month] || { gross: 0, net: 0, deductions: 0 };\n current.gross += record.grossPay;\n current.net += record.netPay;\n current.deductions += record.deductions;\n acc[month] = current;\n return acc;\n }, {});\n return Object.entries(byPeriod)\n .map(([month, value]) => ({ month, ...value }))\n .slice(-6);\n }, [payrollRecords]);\n\n const expenseCategories = useMemo(\n () => [\n {\n category: 'Payroll',\n amount: payrollRecords.reduce((sum, record) => sum + record.grossPay, 0),\n budget: departments.reduce((sum, department) => sum + department.budget * 0.7, 0),\n icon: Wallet,\n },\n {\n category: 'Benefits',\n amount: payrollRecords.reduce((sum, record) => sum + record.deductions * 0.4, 0),\n budget: departments.reduce((sum, department) => sum + department.budget * 0.15, 0),\n icon: Receipt,\n },\n {\n category: 'Recruitment',\n amount: invoices.reduce(\n (sum, invoice) => sum + (invoice.status === 'paid' ? invoice.amount * 0.15 : 0),\n 0\n ),\n budget: departments.reduce((sum, department) => sum + department.budget * 0.1, 0),\n icon: FileText,\n },\n {\n category: 'Training',\n amount: projects.reduce((sum, project) => sum + project.spent * 0.08, 0),\n budget: departments.reduce((sum, department) => sum + department.budget * 0.08, 0),\n icon: TrendingUp,\n },\n ],\n [departments, invoices, payrollRecords, projects]\n );\n\n const totalPayroll = employees.reduce((sum, e) => sum + e.salary, 0);\n const monthlyPayroll = Math.round(totalPayroll / 12);\n const totalInvoiced = invoices.reduce((sum, inv) => sum + inv.amount, 0);\n const paidInvoices = invoices\n .filter((i) => i.status === 'paid')\n .reduce((s, i) => s + i.amount, 0);\n const totalProjectBudget = projects.reduce((s, p) => s + p.budget, 0);\n const totalProjectSpent = projects.reduce((s, p) => s + p.spent, 0);\n\n const maxPayroll = Math.max(1, ...monthlyPayrollTrend.map((m) => m.gross));\n\n const deptCost = departments.map((d) => {\n const deptEmps = employees.filter((e) => e.department === d.name);\n const totalSal = deptEmps.reduce((s, e) => s + e.salary, 0);\n return { name: d.name, salary: totalSal, budget: d.budget, headcount: deptEmps.length };\n });\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Financial Analytics</h1>\n <p className=\"text-sm text-text-secondary\">\n Workforce financial metrics and cost analysis\n </p>\n </div>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Monthly Payroll</CardTitle>\n <DollarSign className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">${(monthlyPayroll / 1000).toFixed(0)}K</div>\n <div className=\"flex items-center text-xs text-yellow-600\">\n <ArrowUp className=\"h-3 w-3 mr-1\" />\n +2.1% from last month\n </div>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Annual Salary Cost</CardTitle>\n <Wallet className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">${(totalPayroll / 1000000).toFixed(1)}M</div>\n <p className=\"text-xs text-text-secondary\">{employees.length} employees</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Invoiced</CardTitle>\n <FileText className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">${(totalInvoiced / 1000).toFixed(1)}K</div>\n <p className=\"text-xs text-text-secondary\">\n ${(paidInvoices / 1000).toFixed(1)}K collected\n </p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Project Budget</CardTitle>\n <TrendingUp className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">${(totalProjectBudget / 1000000).toFixed(1)}M</div>\n <p className=\"text-xs text-text-secondary\">\n {Math.round((totalProjectSpent / totalProjectBudget) * 100)}% utilized\n </p>\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle>Payroll Trend</CardTitle>\n <CardDescription>Monthly gross payroll over the last 6 months</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {monthlyPayrollTrend.map((m) => (\n <div key={m.month} className=\"flex items-center gap-3\">\n <span className=\"w-10 text-sm text-text-secondary\">{m.month}</span>\n <div className=\"flex-1 h-5 bg-bg-sunken rounded overflow-hidden flex\">\n <div\n className=\"h-5 bg-action-primary-bg\"\n style={{ width: `${Math.round((m.net / maxPayroll) * 100)}%` }}\n />\n <div\n className=\"h-5 bg-action-primary-bg/30\"\n style={{ width: `${Math.round((m.deductions / maxPayroll) * 100)}%` }}\n />\n </div>\n <span className=\"text-sm font-medium w-20 text-right\">\n ${(m.gross / 1000000).toFixed(2)}M\n </span>\n </div>\n ))}\n <div className=\"flex items-center gap-4 mt-2 text-xs text-text-secondary\">\n <div className=\"flex items-center gap-1\">\n <div className=\"h-3 w-3 bg-action-primary-bg rounded\" />\n <span>Net Pay</span>\n </div>\n <div className=\"flex items-center gap-1\">\n <div className=\"h-3 w-3 bg-action-primary-bg/30 rounded\" />\n <span>Deductions</span>\n </div>\n </div>\n </CardContent>\n </Card>\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n <Card>\n <CardHeader>\n <CardTitle>Budget vs Actual</CardTitle>\n <CardDescription>Monthly expense tracking by category</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {expenseCategories.map((cat) => {\n const pct = Math.round((cat.amount / cat.budget) * 100);\n return (\n <div key={cat.category} className=\"space-y-1\">\n <div className=\"flex justify-between text-sm\">\n <span className=\"font-medium\">{cat.category}</span>\n <span>\n ${(cat.amount / 1000).toFixed(0)}K / ${(cat.budget / 1000).toFixed(0)}K\n </span>\n </div>\n <div className=\"h-3 bg-bg-sunken rounded overflow-hidden\">\n <div\n className={`h-3 rounded ${pct > 95 ? 'bg-red-500' : pct > 80 ? 'bg-yellow-500' : 'bg-green-500'}`}\n style={{ width: `${pct}%` }}\n />\n </div>\n <p className=\"text-xs text-text-secondary text-right\">{pct}% utilized</p>\n </div>\n );\n })}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Outstanding Invoices</CardTitle>\n <CardDescription>Invoices requiring attention</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {invoices.map((inv) => (\n <div key={inv.id} className=\"flex items-center justify-between rounded border p-3\">\n <div>\n <p className=\"text-sm font-medium\">{inv.number}</p>\n <p className=\"text-xs text-text-secondary\">{inv.clientName}</p>\n </div>\n <div className=\"text-right\">\n <p className=\"text-sm font-medium\">${inv.amount.toLocaleString()}</p>\n <Badge\n variant={\n inv.status === 'paid'\n ? 'default'\n : inv.status === 'overdue'\n ? 'destructive'\n : 'secondary'\n }\n className=\"text-[10px]\"\n >\n {inv.status}\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle>Department Cost Analysis</CardTitle>\n <CardDescription>Total salary cost and budget allocation by department</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-5 gap-2 text-xs font-medium text-text-secondary border-b pb-2 mb-2\">\n <span>Department</span>\n <span className=\"text-right\">Headcount</span>\n <span className=\"text-right\">Total Salary</span>\n <span className=\"text-right\">Dept Budget</span>\n <span className=\"text-right\">Salary/Budget %</span>\n </div>\n {deptCost\n .sort((a, b) => b.salary - a.salary)\n .map((d) => (\n <div\n key={d.name}\n className=\"grid grid-cols-5 gap-2 py-2 border-b last:border-0 text-sm\"\n >\n <span className=\"font-medium\">{d.name}</span>\n <span className=\"text-right\">{d.headcount}</span>\n <span className=\"text-right\">${(d.salary / 1000).toFixed(0)}K</span>\n <span className=\"text-right\">${(d.budget / 1000000).toFixed(1)}M</span>\n <span className=\"text-right\">\n <Badge\n variant={d.salary / d.budget > 0.5 ? 'destructive' : 'default'}\n className=\"text-[10px]\"\n >\n {Math.round((d.salary / d.budget) * 100)}%\n </Badge>\n </span>\n </div>\n ))}\n <Separator className=\"my-2\" />\n <div className=\"grid grid-cols-5 gap-2 text-sm font-bold\">\n <span>Total</span>\n <span className=\"text-right\">{employees.length}</span>\n <span className=\"text-right\">${(totalPayroll / 1000000).toFixed(1)}M</span>\n <span className=\"text-right\">\n ${(departments.reduce((s, d) => s + d.budget, 0) / 1000000).toFixed(1)}M\n </span>\n <span />\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAaA,SAAgB,IAAsC;CACpD,IAAM,EAAE,cAAW,gBAAa,mBAAgB,aAAU,gBAAa,GAAqB,EAEtF,IAAsB,QAAc;EAC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SAAG,EAAE,SAAS,KAAS,QAAQ,EAAE;QAAC;QAAQ;;MACvE,kBAAC,QAAD;OAAM,WAAU;iBACd,kBAAC,GAAD;QACE,SAAS,EAAE,SAAS,EAAE,SAAS,KAAM,gBAAgB;QACrD,WAAU;kBAFZ,CAIG,KAAK,MAAO,EAAE,SAAS,EAAE,SAAU,IAAI,EAAC,IACnC;;OACH,CAAA;MACH;OAfC,EAAE,KAeH,CACN;IACJ,kBAAC,GAAD,EAAW,WAAU,QAAS,CAAA;IAC9B,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,QAAD,EAAA,UAAM,SAAY,CAAA;MAClB,kBAAC,QAAD;OAAM,WAAU;iBAAc,EAAU;OAAc,CAAA;MACtD,kBAAC,QAAD;OAAM,WAAU;iBAAhB;QAA6B;SAAG,IAAe,KAAS,QAAQ,EAAE;QAAC;QAAQ;;MAC3E,kBAAC,QAAD;OAAM,WAAU;iBAAhB;QAA6B;SACxB,EAAY,QAAQ,GAAG,MAAM,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAS,QAAQ,EAAE;QAAC;QAClE;;MACP,kBAAC,QAAD,EAAQ,CAAA;MACJ;;IACM,EAAA,CAAA,CACT,EAAA,CAAA;GACH"}
@@ -86,7 +86,7 @@ function h() {
86
86
  className: "text-2xl font-semibold",
87
87
  children: "Hiring Analytics"
88
88
  }), /* @__PURE__ */ s("p", {
89
- className: "text-sm text-muted-foreground",
89
+ className: "text-sm text-text-secondary",
90
90
  children: "Recruitment performance and pipeline analysis"
91
91
  })] })
92
92
  }),
@@ -98,12 +98,12 @@ function h() {
98
98
  children: [/* @__PURE__ */ s(m, {
99
99
  className: "text-sm font-medium",
100
100
  children: "Active Postings"
101
- }), /* @__PURE__ */ s(n, { className: "h-4 w-4 text-muted-foreground" })]
101
+ }), /* @__PURE__ */ s(n, { className: "h-4 w-4 text-text-secondary" })]
102
102
  }), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ s("div", {
103
103
  className: "text-2xl font-bold",
104
104
  children: b.length
105
105
  }), /* @__PURE__ */ c("p", {
106
- className: "text-xs text-muted-foreground",
106
+ className: "text-xs text-text-secondary",
107
107
  children: [x, " total applicants"]
108
108
  })] })] }),
109
109
  /* @__PURE__ */ c(u, { children: [/* @__PURE__ */ c(p, {
@@ -111,7 +111,7 @@ function h() {
111
111
  children: [/* @__PURE__ */ s(m, {
112
112
  className: "text-sm font-medium",
113
113
  children: "Time to Fill"
114
- }), /* @__PURE__ */ s(r, { className: "h-4 w-4 text-muted-foreground" })]
114
+ }), /* @__PURE__ */ s(r, { className: "h-4 w-4 text-text-secondary" })]
115
115
  }), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ s("div", {
116
116
  className: "text-2xl font-bold",
117
117
  children: "28 days"
@@ -124,12 +124,12 @@ function h() {
124
124
  children: [/* @__PURE__ */ s(m, {
125
125
  className: "text-sm font-medium",
126
126
  children: "Interview to Offer"
127
- }), /* @__PURE__ */ s(i, { className: "h-4 w-4 text-muted-foreground" })]
127
+ }), /* @__PURE__ */ s(i, { className: "h-4 w-4 text-text-secondary" })]
128
128
  }), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ s("div", {
129
129
  className: "text-2xl font-bold",
130
130
  children: "32%"
131
131
  }), /* @__PURE__ */ c("p", {
132
- className: "text-xs text-muted-foreground",
132
+ className: "text-xs text-text-secondary",
133
133
  children: [
134
134
  S,
135
135
  " scheduled, ",
@@ -142,12 +142,12 @@ function h() {
142
142
  children: [/* @__PURE__ */ s(m, {
143
143
  className: "text-sm font-medium",
144
144
  children: "Offer Acceptance"
145
- }), /* @__PURE__ */ s(o, { className: "h-4 w-4 text-muted-foreground" })]
145
+ }), /* @__PURE__ */ s(o, { className: "h-4 w-4 text-text-secondary" })]
146
146
  }), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ s("div", {
147
147
  className: "text-2xl font-bold",
148
148
  children: "87%"
149
149
  }), /* @__PURE__ */ c("p", {
150
- className: "text-xs text-muted-foreground",
150
+ className: "text-xs text-text-secondary",
151
151
  children: [T, " hired this quarter"]
152
152
  })] })] })
153
153
  ]
@@ -162,13 +162,13 @@ function h() {
162
162
  className: "flex items-center gap-3",
163
163
  children: [
164
164
  /* @__PURE__ */ s("span", {
165
- className: "w-10 text-sm text-muted-foreground",
165
+ className: "w-10 text-sm text-text-secondary",
166
166
  children: e.month
167
167
  }),
168
168
  /* @__PURE__ */ s("div", {
169
- className: "flex-1 h-5 bg-muted rounded overflow-hidden",
169
+ className: "flex-1 h-5 bg-bg-sunken rounded overflow-hidden",
170
170
  children: /* @__PURE__ */ s("div", {
171
- className: "h-5 bg-primary rounded",
171
+ className: "h-5 bg-action-primary-bg rounded",
172
172
  style: { width: `${Math.round(e.applications / (E + 20) * 100)}%` }
173
173
  })
174
174
  }),
@@ -208,7 +208,7 @@ function h() {
208
208
  children: e.status
209
209
  }),
210
210
  /* @__PURE__ */ s("div", {
211
- className: "flex-1 h-3 bg-muted rounded overflow-hidden",
211
+ className: "flex-1 h-3 bg-bg-sunken rounded overflow-hidden",
212
212
  children: /* @__PURE__ */ s("div", {
213
213
  className: `h-3 rounded ${e.color}`,
214
214
  style: { width: `${O > 0 ? Math.max(Math.round(e.count / O * 100), 3) : 3}%` }
@@ -224,7 +224,7 @@ function h() {
224
224
  })]
225
225
  }),
226
226
  /* @__PURE__ */ c(u, { children: [/* @__PURE__ */ c(p, { children: [/* @__PURE__ */ s(m, { children: "Source Effectiveness" }), /* @__PURE__ */ s(f, { children: "Recruitment channel performance comparison" })] }), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ c("div", {
227
- className: "grid grid-cols-5 gap-2 text-xs font-medium text-muted-foreground border-b pb-2 mb-2",
227
+ className: "grid grid-cols-5 gap-2 text-xs font-medium text-text-secondary border-b pb-2 mb-2",
228
228
  children: [
229
229
  /* @__PURE__ */ s("span", { children: "Source" }),
230
230
  /* @__PURE__ */ s("span", {
@@ -274,7 +274,7 @@ function h() {
274
274
  ]
275
275
  }, e.source))] })] }),
276
276
  /* @__PURE__ */ c(u, { children: [/* @__PURE__ */ c(p, { children: [/* @__PURE__ */ s(m, { children: "Open Positions Detail" }), /* @__PURE__ */ s(f, { children: "Active job postings and applicant counts" })] }), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ c("div", {
277
- className: "grid grid-cols-6 gap-2 text-xs font-medium text-muted-foreground border-b pb-2 mb-2",
277
+ className: "grid grid-cols-6 gap-2 text-xs font-medium text-text-secondary border-b pb-2 mb-2",
278
278
  children: [
279
279
  /* @__PURE__ */ s("span", { children: "Position" }),
280
280
  /* @__PURE__ */ s("span", { children: "Department" }),
@@ -300,7 +300,7 @@ function h() {
300
300
  children: e.title
301
301
  }),
302
302
  /* @__PURE__ */ s("span", {
303
- className: "text-muted-foreground",
303
+ className: "text-text-secondary",
304
304
  children: e.department
305
305
  }),
306
306
  /* @__PURE__ */ s(l, {
@@ -313,7 +313,7 @@ function h() {
313
313
  children: e.applicants
314
314
  }),
315
315
  /* @__PURE__ */ c("span", {
316
- className: "text-right text-muted-foreground",
316
+ className: "text-right text-text-secondary",
317
317
  children: [
318
318
  "$",
319
319
  (e.salaryMin / 1e3).toFixed(0),
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsHiringAnalyticsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { Briefcase, Clock, Target, TrendingUp, Users } from 'lucide-react';\nimport { useMemo } from 'react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function AnalyticsHiringAnalyticsPagePage() {\n const { jobPostings, candidates, interviews } = useCrewFoundryStore();\n\n const hiringMetrics = useMemo(() => {\n const months = ['Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb'];\n return months.map((month, index) => {\n const monthInterviews = interviews.filter(\n (interview) =>\n new Date(interview.date).toLocaleString('en-US', { month: 'short' }) === month\n ).length;\n const monthCandidates = candidates.filter(\n (candidate) =>\n new Date(candidate.appliedDate).toLocaleString('en-US', { month: 'short' }) === month\n );\n const offers = monthCandidates.filter((candidate) => candidate.status === 'offer').length;\n const hires = monthCandidates.filter((candidate) => candidate.status === 'hired').length;\n const applications =\n monthCandidates.length +\n jobPostings.reduce((sum, posting) => sum + posting.applicants, 0) / 6;\n return {\n month,\n applications: Math.round(applications - index * 3),\n interviews: monthInterviews,\n offers,\n hires,\n };\n });\n }, [candidates, interviews, jobPostings]);\n\n const sourceEffectiveness = useMemo(() => {\n const grouped = candidates.reduce<Record<string, { applications: number; hires: number }>>(\n (acc, candidate) => {\n const source = candidate.source || 'Unknown';\n const value = acc[source] || { applications: 0, hires: 0 };\n value.applications += 1;\n if (candidate.status === 'hired') {\n value.hires += 1;\n }\n acc[source] = value;\n return acc;\n },\n {}\n );\n\n return Object.entries(grouped).map(([source, value]) => ({\n source,\n applications: value.applications,\n hires: value.hires,\n conversionRate: Number(((value.hires / Math.max(value.applications, 1)) * 100).toFixed(1)),\n costPerHire: Math.round(\n jobPostings.reduce((sum, posting) => sum + posting.salaryMin * 0.02, 0) /\n Math.max(value.hires, 1)\n ),\n }));\n }, [candidates, jobPostings]);\n\n const activeJobs = jobPostings.filter((j) => j.status === 'active');\n const totalApplicants = jobPostings.reduce((s, j) => s + j.applicants, 0);\n const scheduledInterviews = interviews.filter((i) => i.status === 'scheduled').length;\n const completedInterviews = interviews.filter((i) => i.status === 'completed').length;\n const offeredCandidates = candidates.filter((c) => c.status === 'offer').length;\n const hiredCandidates = candidates.filter((c) => c.status === 'hired').length;\n\n const maxApplications = Math.max(1, ...hiringMetrics.map((m) => m.applications));\n\n const statusPipeline = [\n {\n status: 'New',\n count: candidates.filter((c) => c.status === 'new').length,\n color: 'bg-gray-500',\n },\n {\n status: 'Screening',\n count: candidates.filter((c) => c.status === 'screening').length,\n color: 'bg-blue-500',\n },\n {\n status: 'Interview',\n count: candidates.filter((c) => c.status === 'interview').length,\n color: 'bg-indigo-500',\n },\n {\n status: 'Assessment',\n count: candidates.filter((c) => c.status === 'assessment').length,\n color: 'bg-purple-500',\n },\n { status: 'Offer', count: offeredCandidates, color: 'bg-orange-500' },\n { status: 'Hired', count: hiredCandidates, color: 'bg-green-500' },\n {\n status: 'Rejected',\n count: candidates.filter((c) => c.status === 'rejected').length,\n color: 'bg-red-500',\n },\n ];\n const totalPipeline = statusPipeline.reduce((s, p) => s + p.count, 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\">Hiring Analytics</h1>\n <p className=\"text-sm text-muted-foreground\">\n Recruitment performance and pipeline analysis\n </p>\n </div>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active Postings</CardTitle>\n <Briefcase className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{activeJobs.length}</div>\n <p className=\"text-xs text-muted-foreground\">{totalApplicants} total applicants</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Time to Fill</CardTitle>\n <Clock className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">28 days</div>\n <div className=\"flex items-center text-xs text-green-600\">\n <TrendingUp className=\"h-3 w-3 mr-1\" />\n -3 days from last quarter\n </div>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Interview to Offer</CardTitle>\n <Target className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">32%</div>\n <p className=\"text-xs text-muted-foreground\">\n {scheduledInterviews} scheduled, {completedInterviews} completed\n </p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Offer Acceptance</CardTitle>\n <Users className=\"h-4 w-4 text-muted-foreground\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">87%</div>\n <p className=\"text-xs text-muted-foreground\">{hiredCandidates} hired this quarter</p>\n </CardContent>\n </Card>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-7\">\n <Card className=\"col-span-4\">\n <CardHeader>\n <CardTitle>Monthly Hiring Activity</CardTitle>\n <CardDescription>Applications, interviews, and hires over time</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {hiringMetrics.map((m) => (\n <div key={m.month} className=\"flex items-center gap-3\">\n <span className=\"w-10 text-sm text-muted-foreground\">{m.month}</span>\n <div className=\"flex-1 h-5 bg-muted rounded overflow-hidden\">\n <div\n className=\"h-5 bg-primary rounded\"\n style={{\n width: `${Math.round((m.applications / (maxApplications + 20)) * 100)}%`,\n }}\n />\n </div>\n <div className=\"flex gap-1 w-48 justify-end\">\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {m.applications} apps\n </Badge>\n <Badge variant=\"secondary\" className=\"text-[10px]\">\n {m.interviews} int\n </Badge>\n <Badge variant=\"default\" className=\"text-[10px]\">\n {m.hires} hired\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card className=\"col-span-3\">\n <CardHeader>\n <CardTitle>Pipeline Status</CardTitle>\n <CardDescription>Current candidate distribution</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {statusPipeline.map((stage) => (\n <div key={stage.status} className=\"flex items-center gap-3\">\n <div className={`h-3 w-3 rounded-full ${stage.color}`} />\n <span className=\"w-20 text-sm\">{stage.status}</span>\n <div className=\"flex-1 h-3 bg-muted rounded overflow-hidden\">\n <div\n className={`h-3 rounded ${stage.color}`}\n style={{\n width: `${totalPipeline > 0 ? Math.max(Math.round((stage.count / totalPipeline) * 100), 3) : 3}%`,\n }}\n />\n </div>\n <span className=\"text-sm font-medium w-6 text-right\">{stage.count}</span>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle>Source Effectiveness</CardTitle>\n <CardDescription>Recruitment channel performance comparison</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-5 gap-2 text-xs font-medium text-muted-foreground border-b pb-2 mb-2\">\n <span>Source</span>\n <span className=\"text-right\">Applications</span>\n <span className=\"text-right\">Hires</span>\n <span className=\"text-right\">Conversion</span>\n <span className=\"text-right\">Cost/Hire</span>\n </div>\n {sourceEffectiveness\n .sort((a, b) => b.conversionRate - a.conversionRate)\n .map((src) => (\n <div\n key={src.source}\n className=\"grid grid-cols-5 gap-2 py-2 border-b last:border-0 text-sm\"\n >\n <span className=\"font-medium\">{src.source}</span>\n <span className=\"text-right\">{src.applications}</span>\n <span className=\"text-right\">{src.hires}</span>\n <span className=\"text-right\">\n <Badge\n variant={src.conversionRate >= 5 ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {src.conversionRate}%\n </Badge>\n </span>\n <span className=\"text-right\">${src.costPerHire.toLocaleString()}</span>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Open Positions Detail</CardTitle>\n <CardDescription>Active job postings and applicant counts</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-6 gap-2 text-xs font-medium text-muted-foreground border-b pb-2 mb-2\">\n <span>Position</span>\n <span>Department</span>\n <span>Level</span>\n <span className=\"text-right\">Applicants</span>\n <span className=\"text-right\">Salary Range</span>\n <span className=\"text-right\">Status</span>\n </div>\n {jobPostings.map((job) => (\n <div\n key={job.id}\n className=\"grid grid-cols-6 gap-2 py-2 border-b last:border-0 text-sm\"\n >\n <span className=\"font-medium truncate\">{job.title}</span>\n <span className=\"text-muted-foreground\">{job.department}</span>\n <Badge variant=\"outline\" className=\"w-fit text-[10px]\">\n {job.experienceLevel}\n </Badge>\n <span className=\"text-right\">{job.applicants}</span>\n <span className=\"text-right text-muted-foreground\">\n ${(job.salaryMin / 1000).toFixed(0)}K-${(job.salaryMax / 1000).toFixed(0)}K\n </span>\n <div className=\"text-right\">\n <Badge\n variant={job.status === 'active' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {job.status}\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAYA,SAAgB,IAAmC;CACjD,IAAM,EAAE,gBAAa,eAAY,kBAAe,GAAqB,EAE/D,IAAgB,QACL;EAAC;EAAO;EAAO;EAAO;EAAO;EAAO;EAAM,CAC3C,KAAK,GAAO,MAAU;EAClC,IAAM,IAAkB,EAAW,QAChC,MACC,IAAI,KAAK,EAAU,KAAK,CAAC,eAAe,SAAS,EAAE,OAAO,SAAS,CAAC,KAAK,EAC5E,CAAC,QACI,IAAkB,EAAW,QAChC,MACC,IAAI,KAAK,EAAU,YAAY,CAAC,eAAe,SAAS,EAAE,OAAO,SAAS,CAAC,KAAK,EACnF,EACK,IAAS,EAAgB,QAAQ,MAAc,EAAU,WAAW,QAAQ,CAAC,QAC7E,IAAQ,EAAgB,QAAQ,MAAc,EAAU,WAAW,QAAQ,CAAC,QAC5E,IACJ,EAAgB,SAChB,EAAY,QAAQ,GAAK,MAAY,IAAM,EAAQ,YAAY,EAAE,GAAG;AACtE,SAAO;GACL;GACA,cAAc,KAAK,MAAM,IAAe,IAAQ,EAAE;GAClD,YAAY;GACZ;GACA;GACD;GACD,EACD;EAAC;EAAY;EAAY;EAAY,CAAC,EAEnC,IAAsB,QAAc;EACxC,IAAM,IAAU,EAAW,QACxB,GAAK,MAAc;GAClB,IAAM,IAAS,EAAU,UAAU,WAC7B,IAAQ,EAAI,MAAW;IAAE,cAAc;IAAG,OAAO;IAAG;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AAiB,CAAA;KACvB,kBAAC,QAAD,EAAA,UAAM,SAAY,CAAA;KAClB,kBAAC,QAAD;MAAM,WAAU;gBAAa;MAAiB,CAAA;KAC9C,kBAAC,QAAD;MAAM,WAAU;gBAAa;MAAmB,CAAA;KAChD,kBAAC,QAAD;MAAM,WAAU;gBAAa;MAAa,CAAA;KACtC;OACL,EAAY,KAAK,MAChB,kBAAC,OAAD;IAEE,WAAU;cAFZ;KAIE,kBAAC,QAAD;MAAM,WAAU;gBAAwB,EAAI;MAAa,CAAA;KACzD,kBAAC,QAAD;MAAM,WAAU;gBAAyB,EAAI;MAAkB,CAAA;KAC/D,kBAAC,GAAD;MAAO,SAAQ;MAAU,WAAU;gBAChC,EAAI;MACC,CAAA;KACR,kBAAC,QAAD;MAAM,WAAU;gBAAc,EAAI;MAAkB,CAAA;KACpD,kBAAC,QAAD;MAAM,WAAU;gBAAhB;OAAmD;QAC9C,EAAI,YAAY,KAAM,QAAQ,EAAE;OAAC;QAAK,EAAI,YAAY,KAAM,QAAQ,EAAE;OAAC;OACrE;;KACP,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,GAAD;OACE,SAAS,EAAI,WAAW,WAAW,YAAY;OAC/C,WAAU;iBAET,EAAI;OACC,CAAA;MACJ,CAAA;KACF;MApBC,EAAI,GAoBL,CACN,CACU,EAAA,CAAA,CACT,EAAA,CAAA;GACH"}
1
+ {"version":3,"file":"AnalyticsHiringAnalyticsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.tsx"],"sourcesContent":["import {\n Badge,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from '@burdenoff/fe-libs/ui';\nimport { Briefcase, Clock, Target, TrendingUp, Users } from 'lucide-react';\nimport { useMemo } from 'react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function AnalyticsHiringAnalyticsPagePage() {\n const { jobPostings, candidates, interviews } = useCrewFoundryStore();\n\n const hiringMetrics = useMemo(() => {\n const months = ['Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb'];\n return months.map((month, index) => {\n const monthInterviews = interviews.filter(\n (interview) =>\n new Date(interview.date).toLocaleString('en-US', { month: 'short' }) === month\n ).length;\n const monthCandidates = candidates.filter(\n (candidate) =>\n new Date(candidate.appliedDate).toLocaleString('en-US', { month: 'short' }) === month\n );\n const offers = monthCandidates.filter((candidate) => candidate.status === 'offer').length;\n const hires = monthCandidates.filter((candidate) => candidate.status === 'hired').length;\n const applications =\n monthCandidates.length +\n jobPostings.reduce((sum, posting) => sum + posting.applicants, 0) / 6;\n return {\n month,\n applications: Math.round(applications - index * 3),\n interviews: monthInterviews,\n offers,\n hires,\n };\n });\n }, [candidates, interviews, jobPostings]);\n\n const sourceEffectiveness = useMemo(() => {\n const grouped = candidates.reduce<Record<string, { applications: number; hires: number }>>(\n (acc, candidate) => {\n const source = candidate.source || 'Unknown';\n const value = acc[source] || { applications: 0, hires: 0 };\n value.applications += 1;\n if (candidate.status === 'hired') {\n value.hires += 1;\n }\n acc[source] = value;\n return acc;\n },\n {}\n );\n\n return Object.entries(grouped).map(([source, value]) => ({\n source,\n applications: value.applications,\n hires: value.hires,\n conversionRate: Number(((value.hires / Math.max(value.applications, 1)) * 100).toFixed(1)),\n costPerHire: Math.round(\n jobPostings.reduce((sum, posting) => sum + posting.salaryMin * 0.02, 0) /\n Math.max(value.hires, 1)\n ),\n }));\n }, [candidates, jobPostings]);\n\n const activeJobs = jobPostings.filter((j) => j.status === 'active');\n const totalApplicants = jobPostings.reduce((s, j) => s + j.applicants, 0);\n const scheduledInterviews = interviews.filter((i) => i.status === 'scheduled').length;\n const completedInterviews = interviews.filter((i) => i.status === 'completed').length;\n const offeredCandidates = candidates.filter((c) => c.status === 'offer').length;\n const hiredCandidates = candidates.filter((c) => c.status === 'hired').length;\n\n const maxApplications = Math.max(1, ...hiringMetrics.map((m) => m.applications));\n\n const statusPipeline = [\n {\n status: 'New',\n count: candidates.filter((c) => c.status === 'new').length,\n color: 'bg-gray-500',\n },\n {\n status: 'Screening',\n count: candidates.filter((c) => c.status === 'screening').length,\n color: 'bg-blue-500',\n },\n {\n status: 'Interview',\n count: candidates.filter((c) => c.status === 'interview').length,\n color: 'bg-indigo-500',\n },\n {\n status: 'Assessment',\n count: candidates.filter((c) => c.status === 'assessment').length,\n color: 'bg-purple-500',\n },\n { status: 'Offer', count: offeredCandidates, color: 'bg-orange-500' },\n { status: 'Hired', count: hiredCandidates, color: 'bg-green-500' },\n {\n status: 'Rejected',\n count: candidates.filter((c) => c.status === 'rejected').length,\n color: 'bg-red-500',\n },\n ];\n const totalPipeline = statusPipeline.reduce((s, p) => s + p.count, 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\">Hiring Analytics</h1>\n <p className=\"text-sm text-text-secondary\">\n Recruitment performance and pipeline analysis\n </p>\n </div>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Active Postings</CardTitle>\n <Briefcase className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{activeJobs.length}</div>\n <p className=\"text-xs text-text-secondary\">{totalApplicants} total applicants</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Time to Fill</CardTitle>\n <Clock className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">28 days</div>\n <div className=\"flex items-center text-xs text-green-600\">\n <TrendingUp className=\"h-3 w-3 mr-1\" />\n -3 days from last quarter\n </div>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Interview to Offer</CardTitle>\n <Target className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">32%</div>\n <p className=\"text-xs text-text-secondary\">\n {scheduledInterviews} scheduled, {completedInterviews} completed\n </p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Offer Acceptance</CardTitle>\n <Users className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">87%</div>\n <p className=\"text-xs text-text-secondary\">{hiredCandidates} hired this quarter</p>\n </CardContent>\n </Card>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-7\">\n <Card className=\"col-span-4\">\n <CardHeader>\n <CardTitle>Monthly Hiring Activity</CardTitle>\n <CardDescription>Applications, interviews, and hires over time</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {hiringMetrics.map((m) => (\n <div key={m.month} className=\"flex items-center gap-3\">\n <span className=\"w-10 text-sm text-text-secondary\">{m.month}</span>\n <div className=\"flex-1 h-5 bg-bg-sunken rounded overflow-hidden\">\n <div\n className=\"h-5 bg-action-primary-bg rounded\"\n style={{\n width: `${Math.round((m.applications / (maxApplications + 20)) * 100)}%`,\n }}\n />\n </div>\n <div className=\"flex gap-1 w-48 justify-end\">\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {m.applications} apps\n </Badge>\n <Badge variant=\"secondary\" className=\"text-[10px]\">\n {m.interviews} int\n </Badge>\n <Badge variant=\"default\" className=\"text-[10px]\">\n {m.hires} hired\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card className=\"col-span-3\">\n <CardHeader>\n <CardTitle>Pipeline Status</CardTitle>\n <CardDescription>Current candidate distribution</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {statusPipeline.map((stage) => (\n <div key={stage.status} className=\"flex items-center gap-3\">\n <div className={`h-3 w-3 rounded-full ${stage.color}`} />\n <span className=\"w-20 text-sm\">{stage.status}</span>\n <div className=\"flex-1 h-3 bg-bg-sunken rounded overflow-hidden\">\n <div\n className={`h-3 rounded ${stage.color}`}\n style={{\n width: `${totalPipeline > 0 ? Math.max(Math.round((stage.count / totalPipeline) * 100), 3) : 3}%`,\n }}\n />\n </div>\n <span className=\"text-sm font-medium w-6 text-right\">{stage.count}</span>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n\n <Card>\n <CardHeader>\n <CardTitle>Source Effectiveness</CardTitle>\n <CardDescription>Recruitment channel performance comparison</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-5 gap-2 text-xs font-medium text-text-secondary border-b pb-2 mb-2\">\n <span>Source</span>\n <span className=\"text-right\">Applications</span>\n <span className=\"text-right\">Hires</span>\n <span className=\"text-right\">Conversion</span>\n <span className=\"text-right\">Cost/Hire</span>\n </div>\n {sourceEffectiveness\n .sort((a, b) => b.conversionRate - a.conversionRate)\n .map((src) => (\n <div\n key={src.source}\n className=\"grid grid-cols-5 gap-2 py-2 border-b last:border-0 text-sm\"\n >\n <span className=\"font-medium\">{src.source}</span>\n <span className=\"text-right\">{src.applications}</span>\n <span className=\"text-right\">{src.hires}</span>\n <span className=\"text-right\">\n <Badge\n variant={src.conversionRate >= 5 ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {src.conversionRate}%\n </Badge>\n </span>\n <span className=\"text-right\">${src.costPerHire.toLocaleString()}</span>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Open Positions Detail</CardTitle>\n <CardDescription>Active job postings and applicant counts</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-6 gap-2 text-xs font-medium text-text-secondary border-b pb-2 mb-2\">\n <span>Position</span>\n <span>Department</span>\n <span>Level</span>\n <span className=\"text-right\">Applicants</span>\n <span className=\"text-right\">Salary Range</span>\n <span className=\"text-right\">Status</span>\n </div>\n {jobPostings.map((job) => (\n <div\n key={job.id}\n className=\"grid grid-cols-6 gap-2 py-2 border-b last:border-0 text-sm\"\n >\n <span className=\"font-medium truncate\">{job.title}</span>\n <span className=\"text-text-secondary\">{job.department}</span>\n <Badge variant=\"outline\" className=\"w-fit text-[10px]\">\n {job.experienceLevel}\n </Badge>\n <span className=\"text-right\">{job.applicants}</span>\n <span className=\"text-right text-text-secondary\">\n ${(job.salaryMin / 1000).toFixed(0)}K-${(job.salaryMax / 1000).toFixed(0)}K\n </span>\n <div className=\"text-right\">\n <Badge\n variant={job.status === 'active' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {job.status}\n </Badge>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAYA,SAAgB,IAAmC;CACjD,IAAM,EAAE,gBAAa,eAAY,kBAAe,GAAqB,EAE/D,IAAgB,QACL;EAAC;EAAO;EAAO;EAAO;EAAO;EAAO;EAAM,CAC3C,KAAK,GAAO,MAAU;EAClC,IAAM,IAAkB,EAAW,QAChC,MACC,IAAI,KAAK,EAAU,KAAK,CAAC,eAAe,SAAS,EAAE,OAAO,SAAS,CAAC,KAAK,EAC5E,CAAC,QACI,IAAkB,EAAW,QAChC,MACC,IAAI,KAAK,EAAU,YAAY,CAAC,eAAe,SAAS,EAAE,OAAO,SAAS,CAAC,KAAK,EACnF,EACK,IAAS,EAAgB,QAAQ,MAAc,EAAU,WAAW,QAAQ,CAAC,QAC7E,IAAQ,EAAgB,QAAQ,MAAc,EAAU,WAAW,QAAQ,CAAC,QAC5E,IACJ,EAAgB,SAChB,EAAY,QAAQ,GAAK,MAAY,IAAM,EAAQ,YAAY,EAAE,GAAG;AACtE,SAAO;GACL;GACA,cAAc,KAAK,MAAM,IAAe,IAAQ,EAAE;GAClD,YAAY;GACZ;GACA;GACD;GACD,EACD;EAAC;EAAY;EAAY;EAAY,CAAC,EAEnC,IAAsB,QAAc;EACxC,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