@burdenoff/microfe-crewfoundry 2026.704.3 → 2026.704.5

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 (101) hide show
  1. package/dist/crewfoundry/pages/AdminAdminPagePage.js +76 -75
  2. package/dist/crewfoundry/pages/AdminAdminPagePage.js.map +1 -1
  3. package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +118 -117
  4. package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
  5. package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +115 -114
  6. package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
  7. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +105 -104
  8. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
  9. package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js +52 -51
  10. package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js.map +1 -1
  11. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +94 -93
  12. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
  13. package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js +97 -96
  14. package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js.map +1 -1
  15. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +68 -67
  16. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
  17. package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js +96 -95
  18. package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js.map +1 -1
  19. package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +153 -152
  20. package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
  21. package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +111 -110
  22. package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
  23. package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +77 -76
  24. package/dist/crewfoundry/pages/HiringApplicationsPagePage.js.map +1 -1
  25. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +80 -79
  26. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
  27. package/dist/crewfoundry/pages/HiringCreateJobPagePage.js +1 -1
  28. package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
  29. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +102 -101
  30. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
  31. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +126 -125
  32. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
  33. package/dist/crewfoundry/pages/HiringJobsPagePage.js +64 -63
  34. package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
  35. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +96 -95
  36. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
  37. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +129 -127
  38. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
  39. package/dist/crewfoundry/pages/HrPayrollPagePage.js +118 -117
  40. package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
  41. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +123 -122
  42. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
  43. package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js +1 -1
  44. package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js.map +1 -1
  45. package/dist/crewfoundry/pages/LearningCertificatesPagePage.js +1 -1
  46. package/dist/crewfoundry/pages/LearningCertificatesPagePage.js.map +1 -1
  47. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +77 -76
  48. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
  49. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +49 -48
  50. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
  51. package/dist/crewfoundry/pages/LearningCoursesPagePage.js +62 -61
  52. package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
  53. package/dist/crewfoundry/pages/LearningLearningPagePage.js +72 -71
  54. package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
  55. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +70 -69
  56. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
  57. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +57 -56
  58. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
  59. package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +58 -57
  60. package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +1 -1
  61. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +122 -121
  62. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +1 -1
  63. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js +2 -2
  64. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js.map +1 -1
  65. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +70 -69
  66. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
  67. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +41 -40
  68. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +1 -1
  69. package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +65 -64
  70. package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
  71. package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js +75 -74
  72. package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +1 -1
  73. package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js +4 -4
  74. package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js.map +1 -1
  75. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +60 -59
  76. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
  77. package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js +53 -52
  78. package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +1 -1
  79. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +37 -36
  80. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +1 -1
  81. package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js +1 -1
  82. package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.js.map +1 -1
  83. package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js +126 -125
  84. package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js.map +1 -1
  85. package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +62 -61
  86. package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
  87. package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js +50 -49
  88. package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
  89. package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +72 -71
  90. package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js.map +1 -1
  91. package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js +40 -39
  92. package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js.map +1 -1
  93. package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js +134 -133
  94. package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js.map +1 -1
  95. package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +60 -59
  96. package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
  97. package/dist/crewfoundry/store/crewfoundryStore.js +177 -146
  98. package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
  99. package/dist/crewfoundry/utils/formatEnumLabel.js +8 -0
  100. package/dist/crewfoundry/utils/formatEnumLabel.js.map +1 -0
  101. package/package.json +1 -1
@@ -1,13 +1,14 @@
1
1
  import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
2
- import { useMemo as t } from "react";
3
- import { DollarSign as n, FileText as r, Receipt as i, TrendingUp as a, Wallet as o } from "lucide-react";
4
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
5
- import { Badge as l, Card as u, CardContent as d, CardDescription as f, CardHeader as p, CardTitle as m, GlassCard as h, GradientText as g, IllustratedEmptyState as _, PagePurpose as v, Pagination as y, ResponsiveTable as b, Separator as x } from "@burdenoff/fe-libs/ui";
6
- import { usePagination as S } from "@burdenoff/fe-libs/shared/hooks";
2
+ import { formatEnumLabel as t } from "../utils/formatEnumLabel.js";
3
+ import { useMemo as n } from "react";
4
+ import { DollarSign as r, FileText as i, Receipt as a, TrendingUp as o, Wallet as s } from "lucide-react";
5
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ import { Badge as u, Card as d, CardContent as f, CardDescription as p, CardHeader as m, CardTitle as h, GlassCard as g, GradientText as _, IllustratedEmptyState as v, PagePurpose as y, Pagination as b, ResponsiveTable as x, Separator as S } from "@burdenoff/fe-libs/ui";
7
+ import { usePagination as C } from "@burdenoff/fe-libs/shared/hooks";
7
8
  //#region src/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.tsx
8
- function C() {
9
- let { employees: C, departments: w, payrollRecords: T, invoices: E, projects: D } = e(), O = t(() => {
10
- let e = T.reduce((e, t) => {
9
+ function w() {
10
+ let { employees: w, departments: T, payrollRecords: E, invoices: D, projects: O } = e(), k = n(() => {
11
+ let e = E.reduce((e, t) => {
11
12
  let n = new Date(t.payDate).toLocaleString("en-US", { month: "short" }), r = e[n] || {
12
13
  gross: 0,
13
14
  net: 0,
@@ -19,27 +20,27 @@ function C() {
19
20
  month: e,
20
21
  ...t
21
22
  })).slice(-6);
22
- }, [T]), k = t(() => {
23
+ }, [E]), A = n(() => {
23
24
  let e = [
24
25
  {
25
26
  category: "Gross Payroll",
26
- amount: T.reduce((e, t) => e + t.grossPay, 0),
27
- icon: o
27
+ amount: E.reduce((e, t) => e + t.grossPay, 0),
28
+ icon: s
28
29
  },
29
30
  {
30
31
  category: "Deductions",
31
- amount: T.reduce((e, t) => e + t.deductions, 0),
32
- icon: i
32
+ amount: E.reduce((e, t) => e + t.deductions, 0),
33
+ icon: a
33
34
  },
34
35
  {
35
36
  category: "Project Spend",
36
- amount: D.reduce((e, t) => e + t.spent, 0),
37
- icon: a
37
+ amount: O.reduce((e, t) => e + t.spent, 0),
38
+ icon: o
38
39
  },
39
40
  {
40
41
  category: "Collected Invoices",
41
- amount: E.filter((e) => e.status === "paid").reduce((e, t) => e + t.amount, 0),
42
- icon: r
42
+ amount: D.filter((e) => e.status === "paid").reduce((e, t) => e + t.amount, 0),
43
+ icon: i
43
44
  }
44
45
  ], t = e.reduce((e, t) => e + t.amount, 0) || 1;
45
46
  return e.map((e) => ({
@@ -47,152 +48,152 @@ function C() {
47
48
  percentage: Math.round(e.amount / t * 100)
48
49
  }));
49
50
  }, [
51
+ D,
50
52
  E,
51
- T,
52
- D
53
- ]), A = C.reduce((e, t) => e + t.salary, 0), j = Math.round(A / 12), M = E.reduce((e, t) => e + t.amount, 0), N = E.filter((e) => e.status === "paid").reduce((e, t) => e + t.amount, 0), P = D.reduce((e, t) => e + t.budget, 0), F = D.reduce((e, t) => e + t.spent, 0), I = Math.max(1, ...O.map((e) => e.gross)), L = P > 0 ? Math.round(F / P * 100) : 0, R = [...w.map((e) => {
54
- let t = C.filter((t) => t.department === e.name), n = t.reduce((e, t) => e + t.salary, 0);
53
+ O
54
+ ]), j = w.reduce((e, t) => e + t.salary, 0), M = Math.round(j / 12), N = D.reduce((e, t) => e + t.amount, 0), P = D.filter((e) => e.status === "paid").reduce((e, t) => e + t.amount, 0), F = O.reduce((e, t) => e + t.budget, 0), I = O.reduce((e, t) => e + t.spent, 0), L = Math.max(1, ...k.map((e) => e.gross)), R = F > 0 ? Math.round(I / F * 100) : 0, z = [...T.map((e) => {
55
+ let t = w.filter((t) => t.department === e.name), n = t.reduce((e, t) => e + t.salary, 0);
55
56
  return {
56
57
  name: e.name,
57
58
  salary: n,
58
59
  budget: e.budget,
59
60
  headcount: t.length
60
61
  };
61
- })].sort((e, t) => t.salary - e.salary), z = w.reduce((e, t) => e + t.budget, 0), B = [...E].filter((e) => e.status !== "paid").sort((e, t) => e.dueDate.localeCompare(t.dueDate)), { page: V, pageSize: H, offset: U, setPage: W } = S({ initialPageSize: 6 }), G = B.slice(U, U + H);
62
- return /* @__PURE__ */ c("div", {
62
+ })].sort((e, t) => t.salary - e.salary), B = T.reduce((e, t) => e + t.budget, 0), V = [...D].filter((e) => e.status !== "paid").sort((e, t) => e.dueDate.localeCompare(t.dueDate)), { page: H, pageSize: U, offset: W, setPage: G } = C({ initialPageSize: 6 }), K = V.slice(W, W + U);
63
+ return /* @__PURE__ */ l("div", {
63
64
  className: "space-y-6 p-6",
64
65
  children: [
65
- /* @__PURE__ */ s("div", {
66
+ /* @__PURE__ */ c("div", {
66
67
  className: "flex items-center justify-between",
67
- children: /* @__PURE__ */ c("div", { children: [
68
- /* @__PURE__ */ s("h1", {
68
+ children: /* @__PURE__ */ l("div", { children: [
69
+ /* @__PURE__ */ c("h1", {
69
70
  className: "text-2xl font-semibold",
70
- children: /* @__PURE__ */ s(g, { children: "Financial Analytics" })
71
+ children: /* @__PURE__ */ c(_, { children: "Financial Analytics" })
71
72
  }),
72
- /* @__PURE__ */ s("p", {
73
+ /* @__PURE__ */ c("p", {
73
74
  className: "text-sm text-text-secondary",
74
75
  children: "Workforce financial metrics and cost analysis"
75
76
  }),
76
- /* @__PURE__ */ s(v, {
77
+ /* @__PURE__ */ c(y, {
77
78
  className: "mt-1",
78
79
  children: "Understand the money side of your workforce — payroll, project budgets, and spend trends — so you can plan headcount and control costs with confidence."
79
80
  })
80
81
  ] })
81
82
  }),
82
- /* @__PURE__ */ c("div", {
83
+ /* @__PURE__ */ l("div", {
83
84
  className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
84
85
  children: [
85
- /* @__PURE__ */ c(h, {
86
+ /* @__PURE__ */ l(g, {
86
87
  treatment: "glass",
87
88
  glow: !0,
88
89
  className: "border-border-seam",
89
- children: [/* @__PURE__ */ c(p, {
90
+ children: [/* @__PURE__ */ l(m, {
90
91
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
91
- children: [/* @__PURE__ */ s(m, {
92
+ children: [/* @__PURE__ */ c(h, {
92
93
  className: "text-sm font-medium",
93
94
  children: "Monthly Payroll"
94
- }), /* @__PURE__ */ s(n, { className: "h-4 w-4 text-text-secondary" })]
95
- }), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ c("div", {
95
+ }), /* @__PURE__ */ c(r, { className: "h-4 w-4 text-text-secondary" })]
96
+ }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l("div", {
96
97
  className: "text-2xl font-bold tabular-nums",
97
98
  children: [
98
99
  "$",
99
- (j / 1e3).toFixed(0),
100
+ (M / 1e3).toFixed(0),
100
101
  "K"
101
102
  ]
102
- }), /* @__PURE__ */ s("p", {
103
+ }), /* @__PURE__ */ c("p", {
103
104
  className: "text-xs text-text-secondary",
104
105
  children: "Annual salary ÷ 12 months"
105
106
  })] })]
106
107
  }),
107
- /* @__PURE__ */ c(h, {
108
+ /* @__PURE__ */ l(g, {
108
109
  treatment: "metric",
109
110
  className: "border-border-seam",
110
- children: [/* @__PURE__ */ c(p, {
111
+ children: [/* @__PURE__ */ l(m, {
111
112
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
112
- children: [/* @__PURE__ */ s(m, {
113
+ children: [/* @__PURE__ */ c(h, {
113
114
  className: "text-sm font-medium",
114
115
  children: "Annual Salary Cost"
115
- }), /* @__PURE__ */ s(o, { className: "h-4 w-4 text-text-secondary" })]
116
- }), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ c("div", {
116
+ }), /* @__PURE__ */ c(s, { className: "h-4 w-4 text-text-secondary" })]
117
+ }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l("div", {
117
118
  className: "text-2xl font-bold tabular-nums",
118
119
  children: [
119
120
  "$",
120
- (A / 1e6).toFixed(1),
121
+ (j / 1e6).toFixed(1),
121
122
  "M"
122
123
  ]
123
- }), /* @__PURE__ */ c("p", {
124
+ }), /* @__PURE__ */ l("p", {
124
125
  className: "text-xs text-text-secondary",
125
- children: [C.length, " employees"]
126
+ children: [w.length, " employees"]
126
127
  })] })]
127
128
  }),
128
- /* @__PURE__ */ c(h, {
129
+ /* @__PURE__ */ l(g, {
129
130
  treatment: "metric",
130
131
  className: "border-border-seam",
131
- children: [/* @__PURE__ */ c(p, {
132
+ children: [/* @__PURE__ */ l(m, {
132
133
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
133
- children: [/* @__PURE__ */ s(m, {
134
+ children: [/* @__PURE__ */ c(h, {
134
135
  className: "text-sm font-medium",
135
136
  children: "Total Invoiced"
136
- }), /* @__PURE__ */ s(r, { className: "h-4 w-4 text-text-secondary" })]
137
- }), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ c("div", {
137
+ }), /* @__PURE__ */ c(i, { className: "h-4 w-4 text-text-secondary" })]
138
+ }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l("div", {
138
139
  className: "text-2xl font-bold tabular-nums",
139
140
  children: [
140
141
  "$",
141
- (M / 1e3).toFixed(1),
142
+ (N / 1e3).toFixed(1),
142
143
  "K"
143
144
  ]
144
- }), /* @__PURE__ */ c("p", {
145
+ }), /* @__PURE__ */ l("p", {
145
146
  className: "text-xs text-text-secondary",
146
147
  children: [
147
148
  "$",
148
- (N / 1e3).toFixed(1),
149
+ (P / 1e3).toFixed(1),
149
150
  "K collected"
150
151
  ]
151
152
  })] })]
152
153
  }),
153
- /* @__PURE__ */ c(h, {
154
+ /* @__PURE__ */ l(g, {
154
155
  treatment: "metric",
155
156
  className: "border-border-seam",
156
- children: [/* @__PURE__ */ c(p, {
157
+ children: [/* @__PURE__ */ l(m, {
157
158
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
158
- children: [/* @__PURE__ */ s(m, {
159
+ children: [/* @__PURE__ */ c(h, {
159
160
  className: "text-sm font-medium",
160
161
  children: "Project Budget"
161
- }), /* @__PURE__ */ s(a, { className: "h-4 w-4 text-text-secondary" })]
162
- }), /* @__PURE__ */ c(d, { children: [/* @__PURE__ */ c("div", {
162
+ }), /* @__PURE__ */ c(o, { className: "h-4 w-4 text-text-secondary" })]
163
+ }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l("div", {
163
164
  className: "text-2xl font-bold tabular-nums",
164
165
  children: [
165
166
  "$",
166
- (P / 1e6).toFixed(1),
167
+ (F / 1e6).toFixed(1),
167
168
  "M"
168
169
  ]
169
- }), /* @__PURE__ */ c("p", {
170
+ }), /* @__PURE__ */ l("p", {
170
171
  className: "text-xs text-text-secondary",
171
- children: [L, "% utilized"]
172
+ children: [R, "% utilized"]
172
173
  })] })]
173
174
  })
174
175
  ]
175
176
  }),
176
- /* @__PURE__ */ c(u, { children: [/* @__PURE__ */ c(p, { children: [/* @__PURE__ */ s(m, { children: "Payroll Trend" }), /* @__PURE__ */ s(f, { children: "Monthly gross payroll over the last 6 months" })] }), /* @__PURE__ */ c(d, {
177
+ /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(h, { children: "Payroll Trend" }), /* @__PURE__ */ c(p, { children: "Monthly gross payroll over the last 6 months" })] }), /* @__PURE__ */ l(f, {
177
178
  className: "space-y-3",
178
- children: [O.map((e) => /* @__PURE__ */ c("div", {
179
+ children: [k.map((e) => /* @__PURE__ */ l("div", {
179
180
  className: "flex items-center gap-3",
180
181
  children: [
181
- /* @__PURE__ */ s("span", {
182
+ /* @__PURE__ */ c("span", {
182
183
  className: "w-10 text-sm text-text-secondary",
183
184
  children: e.month
184
185
  }),
185
- /* @__PURE__ */ c("div", {
186
+ /* @__PURE__ */ l("div", {
186
187
  className: "flex-1 h-5 bg-bg-sunken rounded overflow-hidden flex",
187
- children: [/* @__PURE__ */ s("div", {
188
+ children: [/* @__PURE__ */ c("div", {
188
189
  className: "h-5 bg-action-primary-bg",
189
- style: { width: `${Math.round(e.net / I * 100)}%` }
190
- }), /* @__PURE__ */ s("div", {
190
+ style: { width: `${Math.round(e.net / L * 100)}%` }
191
+ }), /* @__PURE__ */ c("div", {
191
192
  className: "h-5 bg-action-primary-bg/30",
192
- style: { width: `${Math.round(e.deductions / I * 100)}%` }
193
+ style: { width: `${Math.round(e.deductions / L * 100)}%` }
193
194
  })]
194
195
  }),
195
- /* @__PURE__ */ c("span", {
196
+ /* @__PURE__ */ l("span", {
196
197
  className: "text-sm font-medium w-20 text-right",
197
198
  children: [
198
199
  "$",
@@ -201,93 +202,93 @@ function C() {
201
202
  ]
202
203
  })
203
204
  ]
204
- }, e.month)), /* @__PURE__ */ c("div", {
205
+ }, e.month)), /* @__PURE__ */ l("div", {
205
206
  className: "flex items-center gap-4 mt-2 text-xs text-text-secondary",
206
- children: [/* @__PURE__ */ c("div", {
207
+ children: [/* @__PURE__ */ l("div", {
207
208
  className: "flex items-center gap-1",
208
- children: [/* @__PURE__ */ s("div", { className: "h-3 w-3 bg-action-primary-bg rounded" }), /* @__PURE__ */ s("span", { children: "Net Pay" })]
209
- }), /* @__PURE__ */ c("div", {
209
+ children: [/* @__PURE__ */ c("div", { className: "h-3 w-3 bg-action-primary-bg rounded" }), /* @__PURE__ */ c("span", { children: "Net Pay" })]
210
+ }), /* @__PURE__ */ l("div", {
210
211
  className: "flex items-center gap-1",
211
- children: [/* @__PURE__ */ s("div", { className: "h-3 w-3 bg-action-primary-bg/30 rounded" }), /* @__PURE__ */ s("span", { children: "Deductions" })]
212
+ children: [/* @__PURE__ */ c("div", { className: "h-3 w-3 bg-action-primary-bg/30 rounded" }), /* @__PURE__ */ c("span", { children: "Deductions" })]
212
213
  })]
213
214
  })]
214
215
  })] }),
215
- /* @__PURE__ */ c("div", {
216
+ /* @__PURE__ */ l("div", {
216
217
  className: "grid gap-4 md:grid-cols-2",
217
- children: [/* @__PURE__ */ c(u, { children: [/* @__PURE__ */ c(p, { children: [/* @__PURE__ */ s(m, { children: "Spend by Category" }), /* @__PURE__ */ s(f, { children: "Share of tracked workforce spend" })] }), /* @__PURE__ */ s(d, {
218
+ children: [/* @__PURE__ */ l(d, { children: [/* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(h, { children: "Spend by Category" }), /* @__PURE__ */ c(p, { children: "Share of tracked workforce spend" })] }), /* @__PURE__ */ c(f, {
218
219
  className: "space-y-4",
219
- children: k.map((e) => /* @__PURE__ */ c("div", {
220
+ children: A.map((e) => /* @__PURE__ */ l("div", {
220
221
  className: "space-y-1",
221
222
  children: [
222
- /* @__PURE__ */ c("div", {
223
+ /* @__PURE__ */ l("div", {
223
224
  className: "flex justify-between text-sm",
224
- children: [/* @__PURE__ */ c("span", {
225
+ children: [/* @__PURE__ */ l("span", {
225
226
  className: "flex items-center gap-2 font-medium",
226
- children: [/* @__PURE__ */ s(e.icon, { className: "h-4 w-4 text-text-secondary" }), e.category]
227
- }), /* @__PURE__ */ c("span", { children: [
227
+ children: [/* @__PURE__ */ c(e.icon, { className: "h-4 w-4 text-text-secondary" }), e.category]
228
+ }), /* @__PURE__ */ l("span", { children: [
228
229
  "$",
229
230
  (e.amount / 1e3).toFixed(0),
230
231
  "K"
231
232
  ] })]
232
233
  }),
233
- /* @__PURE__ */ s("div", {
234
+ /* @__PURE__ */ c("div", {
234
235
  className: "h-3 bg-bg-sunken rounded overflow-hidden",
235
- children: /* @__PURE__ */ s("div", {
236
+ children: /* @__PURE__ */ c("div", {
236
237
  className: "h-3 rounded bg-action-primary-bg",
237
238
  style: { width: `${e.percentage}%` }
238
239
  })
239
240
  }),
240
- /* @__PURE__ */ c("p", {
241
+ /* @__PURE__ */ l("p", {
241
242
  className: "text-xs text-text-secondary text-right",
242
243
  children: [e.percentage, "% of spend"]
243
244
  })
244
245
  ]
245
246
  }, e.category))
246
- })] }), /* @__PURE__ */ c(u, { children: [/* @__PURE__ */ c(p, { children: [/* @__PURE__ */ s(m, { children: "Outstanding Invoices" }), /* @__PURE__ */ s(f, { children: "Unpaid invoices requiring attention" })] }), /* @__PURE__ */ c(d, {
247
+ })] }), /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c(h, { children: "Outstanding Invoices" }), /* @__PURE__ */ c(p, { children: "Unpaid invoices requiring attention" })] }), /* @__PURE__ */ l(f, {
247
248
  className: "space-y-3",
248
249
  children: [
249
- B.length === 0 && /* @__PURE__ */ s(_, {
250
+ V.length === 0 && /* @__PURE__ */ c(v, {
250
251
  illustration: "empty-data",
251
252
  title: "No outstanding invoices",
252
253
  description: "Every invoice has been paid. New unpaid invoices will appear here."
253
254
  }),
254
- G.map((e) => /* @__PURE__ */ c("div", {
255
+ K.map((e) => /* @__PURE__ */ l("div", {
255
256
  className: "flex items-center justify-between rounded border p-3",
256
- children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("p", {
257
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
257
258
  className: "text-sm font-medium",
258
259
  children: e.number
259
- }), /* @__PURE__ */ s("p", {
260
+ }), /* @__PURE__ */ c("p", {
260
261
  className: "text-xs text-text-secondary",
261
262
  children: e.clientName
262
- })] }), /* @__PURE__ */ c("div", {
263
+ })] }), /* @__PURE__ */ l("div", {
263
264
  className: "text-right",
264
- children: [/* @__PURE__ */ c("p", {
265
+ children: [/* @__PURE__ */ l("p", {
265
266
  className: "text-sm font-medium",
266
267
  children: ["$", e.amount.toLocaleString()]
267
- }), /* @__PURE__ */ s(l, {
268
+ }), /* @__PURE__ */ c(u, {
268
269
  variant: e.status === "overdue" ? "destructive" : "secondary",
269
270
  className: "text-[10px]",
270
- children: e.status
271
+ children: t(e.status)
271
272
  })]
272
273
  })]
273
274
  }, e.id)),
274
- B.length > H && /* @__PURE__ */ s(y, {
275
- page: V,
276
- pageSize: H,
277
- totalItems: B.length,
278
- onPageChange: W
275
+ V.length > U && /* @__PURE__ */ c(b, {
276
+ page: H,
277
+ pageSize: U,
278
+ totalItems: V.length,
279
+ onPageChange: G
279
280
  })
280
281
  ]
281
282
  })] })]
282
283
  }),
283
- /* @__PURE__ */ c(u, { children: [/* @__PURE__ */ c(p, { children: [/* @__PURE__ */ s(m, { children: "Department Cost Analysis" }), /* @__PURE__ */ s(f, { children: "Total salary cost and budget allocation by department" })] }), /* @__PURE__ */ c(d, { children: [
284
- /* @__PURE__ */ s(b, {
284
+ /* @__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: [
285
+ /* @__PURE__ */ c(x, {
285
286
  columns: [
286
287
  {
287
288
  key: "name",
288
289
  header: "Department",
289
290
  priority: "primary",
290
- cell: (e) => /* @__PURE__ */ s("span", {
291
+ cell: (e) => /* @__PURE__ */ c("span", {
291
292
  className: "font-medium",
292
293
  children: e.name
293
294
  })
@@ -296,7 +297,7 @@ function C() {
296
297
  key: "headcount",
297
298
  header: "Headcount",
298
299
  priority: "secondary",
299
- cell: (e) => /* @__PURE__ */ s("span", {
300
+ cell: (e) => /* @__PURE__ */ c("span", {
300
301
  className: "md:block md:text-right",
301
302
  children: e.headcount
302
303
  })
@@ -305,7 +306,7 @@ function C() {
305
306
  key: "salary",
306
307
  header: "Total Salary",
307
308
  priority: "secondary",
308
- cell: (e) => /* @__PURE__ */ c("span", {
309
+ cell: (e) => /* @__PURE__ */ l("span", {
309
310
  className: "md:block md:text-right",
310
311
  children: [
311
312
  "$",
@@ -318,7 +319,7 @@ function C() {
318
319
  key: "budget",
319
320
  header: "Dept Budget",
320
321
  priority: "secondary",
321
- cell: (e) => /* @__PURE__ */ c("span", {
322
+ cell: (e) => /* @__PURE__ */ l("span", {
322
323
  className: "md:block md:text-right",
323
324
  children: [
324
325
  "$",
@@ -333,9 +334,9 @@ function C() {
333
334
  priority: "primary",
334
335
  cell: (e) => {
335
336
  let t = e.budget > 0 ? Math.round(e.salary / e.budget * 100) : 0;
336
- return /* @__PURE__ */ s("span", {
337
+ return /* @__PURE__ */ c("span", {
337
338
  className: "md:block md:text-right",
338
- children: /* @__PURE__ */ c(l, {
339
+ children: /* @__PURE__ */ l(u, {
339
340
  variant: t > 50 ? "destructive" : "default",
340
341
  className: "text-[10px]",
341
342
  children: [t, "%"]
@@ -344,23 +345,23 @@ function C() {
344
345
  }
345
346
  }
346
347
  ],
347
- data: R,
348
+ data: z,
348
349
  rowKey: (e) => e.name
349
350
  }),
350
- /* @__PURE__ */ s(x, { className: "my-3" }),
351
- /* @__PURE__ */ c("div", {
351
+ /* @__PURE__ */ c(S, { className: "my-3" }),
352
+ /* @__PURE__ */ l("div", {
352
353
  className: "flex flex-wrap items-center justify-between gap-2 text-sm font-bold",
353
354
  children: [
354
- /* @__PURE__ */ s("span", { children: "Total" }),
355
- /* @__PURE__ */ c("span", { children: [C.length, " employees"] }),
356
- /* @__PURE__ */ c("span", { children: [
355
+ /* @__PURE__ */ c("span", { children: "Total" }),
356
+ /* @__PURE__ */ l("span", { children: [w.length, " employees"] }),
357
+ /* @__PURE__ */ l("span", { children: [
357
358
  "$",
358
- (A / 1e6).toFixed(1),
359
+ (j / 1e6).toFixed(1),
359
360
  "M salary"
360
361
  ] }),
361
- /* @__PURE__ */ c("span", { children: [
362
+ /* @__PURE__ */ l("span", { children: [
362
363
  "$",
363
- (z / 1e6).toFixed(1),
364
+ (B / 1e6).toFixed(1),
364
365
  "M budget"
365
366
  ] })
366
367
  ]
@@ -370,6 +371,6 @@ function C() {
370
371
  });
371
372
  }
372
373
  //#endregion
373
- export { C as AnalyticsFinancialAnalyticsPagePage };
374
+ export { w as AnalyticsFinancialAnalyticsPagePage };
374
375
 
375
376
  //# sourceMappingURL=AnalyticsFinancialAnalyticsPagePage.js.map
@@ -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 GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n Pagination,\n ResponsiveTable,\n type ResponsiveTableColumn,\n Separator,\n} from '@burdenoff/fe-libs/ui';\nimport { usePagination } from '@burdenoff/fe-libs/shared/hooks';\nimport { DollarSign, FileText, Receipt, TrendingUp, Wallet } from 'lucide-react';\nimport { useMemo } from 'react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\ntype DeptCostRow = {\n name: string;\n salary: number;\n budget: number;\n headcount: number;\n};\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 // Real spend lines only (no invented budget coefficients).\n const spendByCategory = useMemo(() => {\n const items = [\n {\n category: 'Gross Payroll',\n amount: payrollRecords.reduce((sum, record) => sum + record.grossPay, 0),\n icon: Wallet,\n },\n {\n category: 'Deductions',\n amount: payrollRecords.reduce((sum, record) => sum + record.deductions, 0),\n icon: Receipt,\n },\n {\n category: 'Project Spend',\n amount: projects.reduce((sum, project) => sum + project.spent, 0),\n icon: TrendingUp,\n },\n {\n category: 'Collected Invoices',\n amount: invoices\n .filter((invoice) => invoice.status === 'paid')\n .reduce((sum, invoice) => sum + invoice.amount, 0),\n icon: FileText,\n },\n ];\n const total = items.reduce((sum, item) => sum + item.amount, 0) || 1;\n return items.map((item) => ({ ...item, percentage: Math.round((item.amount / total) * 100) }));\n }, [invoices, payrollRecords, projects]);\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 const projectUtilization =\n totalProjectBudget > 0 ? Math.round((totalProjectSpent / totalProjectBudget) * 100) : 0;\n\n const deptCost: DeptCostRow[] = 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 const sortedDeptCost = [...deptCost].sort((a, b) => b.salary - a.salary);\n const totalDeptBudget = departments.reduce((s, d) => s + d.budget, 0);\n\n // Outstanding invoices = anything not fully paid, matching the card title.\n const outstandingInvoices = [...invoices]\n .filter((invoice) => invoice.status !== 'paid')\n .sort((a, b) => a.dueDate.localeCompare(b.dueDate));\n const {\n page: invoicePage,\n pageSize: invoicePageSize,\n offset: invoiceOffset,\n setPage: setInvoicePage,\n } = usePagination({ initialPageSize: 6 });\n const invoicePageItems = outstandingInvoices.slice(\n invoiceOffset,\n invoiceOffset + invoicePageSize\n );\n\n const deptCostColumns: ResponsiveTableColumn<DeptCostRow>[] = [\n {\n key: 'name',\n header: 'Department',\n priority: 'primary',\n cell: (d) => <span className=\"font-medium\">{d.name}</span>,\n },\n {\n key: 'headcount',\n header: 'Headcount',\n priority: 'secondary',\n cell: (d) => <span className=\"md:block md:text-right\">{d.headcount}</span>,\n },\n {\n key: 'salary',\n header: 'Total Salary',\n priority: 'secondary',\n cell: (d) => <span className=\"md:block md:text-right\">${(d.salary / 1000).toFixed(0)}K</span>,\n },\n {\n key: 'budget',\n header: 'Dept Budget',\n priority: 'secondary',\n cell: (d) => (\n <span className=\"md:block md:text-right\">${(d.budget / 1000000).toFixed(1)}M</span>\n ),\n },\n {\n key: 'ratio',\n header: 'Salary/Budget %',\n priority: 'primary',\n cell: (d) => {\n const ratio = d.budget > 0 ? Math.round((d.salary / d.budget) * 100) : 0;\n return (\n <span className=\"md:block md:text-right\">\n <Badge variant={ratio > 50 ? 'destructive' : 'default'} className=\"text-[10px]\">\n {ratio}%\n </Badge>\n </span>\n );\n },\n },\n ];\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Financial Analytics</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n Workforce financial metrics and cost analysis\n </p>\n <PagePurpose className=\"mt-1\">\n Understand the money side of your workforce — payroll, project budgets, and spend trends\n — so you can plan headcount and control costs with confidence.\n </PagePurpose>\n </div>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Monthly Payroll</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 ${(monthlyPayroll / 1000).toFixed(0)}K\n </div>\n <p className=\"text-xs text-text-secondary\">Annual salary ÷ 12 months</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">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 tabular-nums\">\n ${(totalPayroll / 1000000).toFixed(1)}M\n </div>\n <p className=\"text-xs text-text-secondary\">{employees.length} employees</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Invoiced</CardTitle>\n <FileText className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n ${(totalInvoiced / 1000).toFixed(1)}K\n </div>\n <p className=\"text-xs text-text-secondary\">\n ${(paidInvoices / 1000).toFixed(1)}K collected\n </p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Project Budget</CardTitle>\n <TrendingUp className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n ${(totalProjectBudget / 1000000).toFixed(1)}M\n </div>\n <p className=\"text-xs text-text-secondary\">{projectUtilization}% utilized</p>\n </CardContent>\n </GlassCard>\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>Spend by Category</CardTitle>\n <CardDescription>Share of tracked workforce spend</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {spendByCategory.map((cat) => (\n <div key={cat.category} className=\"space-y-1\">\n <div className=\"flex justify-between text-sm\">\n <span className=\"flex items-center gap-2 font-medium\">\n <cat.icon className=\"h-4 w-4 text-text-secondary\" />\n {cat.category}\n </span>\n <span>${(cat.amount / 1000).toFixed(0)}K</span>\n </div>\n <div className=\"h-3 bg-bg-sunken rounded overflow-hidden\">\n <div\n className=\"h-3 rounded bg-action-primary-bg\"\n style={{ width: `${cat.percentage}%` }}\n />\n </div>\n <p className=\"text-xs text-text-secondary text-right\">{cat.percentage}% of spend</p>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Outstanding Invoices</CardTitle>\n <CardDescription>Unpaid invoices requiring attention</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {outstandingInvoices.length === 0 && (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No outstanding invoices\"\n description=\"Every invoice has been paid. New unpaid invoices will appear here.\"\n />\n )}\n {invoicePageItems.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={inv.status === 'overdue' ? 'destructive' : 'secondary'}\n className=\"text-[10px]\"\n >\n {inv.status}\n </Badge>\n </div>\n </div>\n ))}\n {outstandingInvoices.length > invoicePageSize && (\n <Pagination\n page={invoicePage}\n pageSize={invoicePageSize}\n totalItems={outstandingInvoices.length}\n onPageChange={setInvoicePage}\n />\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 <ResponsiveTable columns={deptCostColumns} data={sortedDeptCost} rowKey={(d) => d.name} />\n <Separator className=\"my-3\" />\n <div className=\"flex flex-wrap items-center justify-between gap-2 text-sm font-bold\">\n <span>Total</span>\n <span>{employees.length} employees</span>\n <span>${(totalPayroll / 1000000).toFixed(1)}M salary</span>\n <span>${(totalDeptBudget / 1000000).toFixed(1)}M budget</span>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;AA4BA,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,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E;SAAC;SAAQ;;OAC9F;MACD;OACE,KAAK;OACL,QAAQ;OACR,UAAU;OACV,OAAO,MACL,kBAAC,QAAD;QAAM,WAAU;kBAAhB;SAAyC;UAAG,EAAE,SAAS,KAAS,QAAQ,EAAE;SAAC;SAAQ;;OAEtF;MACD;OACE,KAAK;OACL,QAAQ;OACR,UAAU;OACV,OAAO,MAAM;QACX,IAAM,IAAQ,EAAE,SAAS,IAAI,KAAK,MAAO,EAAE,SAAS,EAAE,SAAU,IAAI,GAAG;AACvE,eACE,kBAAC,QAAD;SAAM,WAAU;mBACd,kBAAC,GAAD;UAAO,SAAS,IAAQ,KAAK,gBAAgB;UAAW,WAAU;oBAAlE,CACG,GAAM,IACD;;SACH,CAAA;;OAGZ;MACF;KAyLkD,MAAM;KAAgB,SAAS,MAAM,EAAE;KAAQ,CAAA;IAC1F,kBAAC,GAAD,EAAW,WAAU,QAAS,CAAA;IAC9B,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,QAAD,EAAA,UAAM,SAAY,CAAA;MAClB,kBAAC,QAAD,EAAA,UAAA,CAAO,EAAU,QAAO,aAAiB,EAAA,CAAA;MACzC,kBAAC,QAAD,EAAA,UAAA;OAAM;QAAG,IAAe,KAAS,QAAQ,EAAE;OAAC;OAAe,EAAA,CAAA;MAC3D,kBAAC,QAAD,EAAA,UAAA;OAAM;QAAG,IAAkB,KAAS,QAAQ,EAAE;OAAC;OAAe,EAAA,CAAA;MAC1D;;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 GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n Pagination,\n ResponsiveTable,\n type ResponsiveTableColumn,\n Separator,\n} from '@burdenoff/fe-libs/ui';\nimport { usePagination } from '@burdenoff/fe-libs/shared/hooks';\nimport { DollarSign, FileText, Receipt, TrendingUp, Wallet } from 'lucide-react';\nimport { useMemo } from 'react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\nimport { formatEnumLabel } from '../utils/formatEnumLabel';\n\ntype DeptCostRow = {\n name: string;\n salary: number;\n budget: number;\n headcount: number;\n};\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 // Real spend lines only (no invented budget coefficients).\n const spendByCategory = useMemo(() => {\n const items = [\n {\n category: 'Gross Payroll',\n amount: payrollRecords.reduce((sum, record) => sum + record.grossPay, 0),\n icon: Wallet,\n },\n {\n category: 'Deductions',\n amount: payrollRecords.reduce((sum, record) => sum + record.deductions, 0),\n icon: Receipt,\n },\n {\n category: 'Project Spend',\n amount: projects.reduce((sum, project) => sum + project.spent, 0),\n icon: TrendingUp,\n },\n {\n category: 'Collected Invoices',\n amount: invoices\n .filter((invoice) => invoice.status === 'paid')\n .reduce((sum, invoice) => sum + invoice.amount, 0),\n icon: FileText,\n },\n ];\n const total = items.reduce((sum, item) => sum + item.amount, 0) || 1;\n return items.map((item) => ({ ...item, percentage: Math.round((item.amount / total) * 100) }));\n }, [invoices, payrollRecords, projects]);\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 const projectUtilization =\n totalProjectBudget > 0 ? Math.round((totalProjectSpent / totalProjectBudget) * 100) : 0;\n\n const deptCost: DeptCostRow[] = 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 const sortedDeptCost = [...deptCost].sort((a, b) => b.salary - a.salary);\n const totalDeptBudget = departments.reduce((s, d) => s + d.budget, 0);\n\n // Outstanding invoices = anything not fully paid, matching the card title.\n const outstandingInvoices = [...invoices]\n .filter((invoice) => invoice.status !== 'paid')\n .sort((a, b) => a.dueDate.localeCompare(b.dueDate));\n const {\n page: invoicePage,\n pageSize: invoicePageSize,\n offset: invoiceOffset,\n setPage: setInvoicePage,\n } = usePagination({ initialPageSize: 6 });\n const invoicePageItems = outstandingInvoices.slice(\n invoiceOffset,\n invoiceOffset + invoicePageSize\n );\n\n const deptCostColumns: ResponsiveTableColumn<DeptCostRow>[] = [\n {\n key: 'name',\n header: 'Department',\n priority: 'primary',\n cell: (d) => <span className=\"font-medium\">{d.name}</span>,\n },\n {\n key: 'headcount',\n header: 'Headcount',\n priority: 'secondary',\n cell: (d) => <span className=\"md:block md:text-right\">{d.headcount}</span>,\n },\n {\n key: 'salary',\n header: 'Total Salary',\n priority: 'secondary',\n cell: (d) => <span className=\"md:block md:text-right\">${(d.salary / 1000).toFixed(0)}K</span>,\n },\n {\n key: 'budget',\n header: 'Dept Budget',\n priority: 'secondary',\n cell: (d) => (\n <span className=\"md:block md:text-right\">${(d.budget / 1000000).toFixed(1)}M</span>\n ),\n },\n {\n key: 'ratio',\n header: 'Salary/Budget %',\n priority: 'primary',\n cell: (d) => {\n const ratio = d.budget > 0 ? Math.round((d.salary / d.budget) * 100) : 0;\n return (\n <span className=\"md:block md:text-right\">\n <Badge variant={ratio > 50 ? 'destructive' : 'default'} className=\"text-[10px]\">\n {ratio}%\n </Badge>\n </span>\n );\n },\n },\n ];\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Financial Analytics</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n Workforce financial metrics and cost analysis\n </p>\n <PagePurpose className=\"mt-1\">\n Understand the money side of your workforce — payroll, project budgets, and spend trends\n — so you can plan headcount and control costs with confidence.\n </PagePurpose>\n </div>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Monthly Payroll</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 ${(monthlyPayroll / 1000).toFixed(0)}K\n </div>\n <p className=\"text-xs text-text-secondary\">Annual salary ÷ 12 months</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">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 tabular-nums\">\n ${(totalPayroll / 1000000).toFixed(1)}M\n </div>\n <p className=\"text-xs text-text-secondary\">{employees.length} employees</p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Invoiced</CardTitle>\n <FileText className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n ${(totalInvoiced / 1000).toFixed(1)}K\n </div>\n <p className=\"text-xs text-text-secondary\">\n ${(paidInvoices / 1000).toFixed(1)}K collected\n </p>\n </CardContent>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"border-border-seam\">\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Project Budget</CardTitle>\n <TrendingUp className=\"h-4 w-4 text-text-secondary\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold tabular-nums\">\n ${(totalProjectBudget / 1000000).toFixed(1)}M\n </div>\n <p className=\"text-xs text-text-secondary\">{projectUtilization}% utilized</p>\n </CardContent>\n </GlassCard>\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>Spend by Category</CardTitle>\n <CardDescription>Share of tracked workforce spend</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {spendByCategory.map((cat) => (\n <div key={cat.category} className=\"space-y-1\">\n <div className=\"flex justify-between text-sm\">\n <span className=\"flex items-center gap-2 font-medium\">\n <cat.icon className=\"h-4 w-4 text-text-secondary\" />\n {cat.category}\n </span>\n <span>${(cat.amount / 1000).toFixed(0)}K</span>\n </div>\n <div className=\"h-3 bg-bg-sunken rounded overflow-hidden\">\n <div\n className=\"h-3 rounded bg-action-primary-bg\"\n style={{ width: `${cat.percentage}%` }}\n />\n </div>\n <p className=\"text-xs text-text-secondary text-right\">{cat.percentage}% of spend</p>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Outstanding Invoices</CardTitle>\n <CardDescription>Unpaid invoices requiring attention</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {outstandingInvoices.length === 0 && (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No outstanding invoices\"\n description=\"Every invoice has been paid. New unpaid invoices will appear here.\"\n />\n )}\n {invoicePageItems.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={inv.status === 'overdue' ? 'destructive' : 'secondary'}\n className=\"text-[10px]\"\n >\n {formatEnumLabel(inv.status)}\n </Badge>\n </div>\n </div>\n ))}\n {outstandingInvoices.length > invoicePageSize && (\n <Pagination\n page={invoicePage}\n pageSize={invoicePageSize}\n totalItems={outstandingInvoices.length}\n onPageChange={setInvoicePage}\n />\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 <ResponsiveTable columns={deptCostColumns} data={sortedDeptCost} rowKey={(d) => d.name} />\n <Separator className=\"my-3\" />\n <div className=\"flex flex-wrap items-center justify-between gap-2 text-sm font-bold\">\n <span>Total</span>\n <span>{employees.length} employees</span>\n <span>${(totalPayroll / 1000000).toFixed(1)}M salary</span>\n <span>${(totalDeptBudget / 1000000).toFixed(1)}M budget</span>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AA6BA,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,EAGd,IAAkB,QAAc;EACpC,IAAM,IAAQ;GACZ;IACE,UAAU;IACV,QAAQ,EAAe,QAAQ,GAAK,MAAW,IAAM,EAAO,UAAU,EAAE;IACxE,MAAM;IACP;GACD;IACE,UAAU;IACV,QAAQ,EAAe,QAAQ,GAAK,MAAW,IAAM,EAAO,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