@burdenoff/microfe-crewfoundry 2026.704.3 → 2026.704.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/crewfoundry/pages/AdminAdminPagePage.js +76 -75
- package/dist/crewfoundry/pages/AdminAdminPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +118 -117
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +115 -114
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +105 -104
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js +52 -51
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +94 -93
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js +97 -96
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +68 -67
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js +96 -95
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +153 -152
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +107 -106
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +77 -76
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +80 -79
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +102 -101
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +126 -125
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobsPagePage.js +64 -63
- package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +96 -95
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +127 -126
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +118 -117
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +123 -122
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +77 -76
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +49 -48
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js +62 -61
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPagePage.js +72 -71
- package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +70 -69
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +57 -56
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +58 -57
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +122 -121
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +70 -69
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +41 -40
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +65 -64
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js +75 -74
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +60 -59
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js +53 -52
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +37 -36
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js +126 -125
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +62 -61
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js +50 -49
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +72 -71
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js +40 -39
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js +130 -129
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +60 -59
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js +177 -146
- package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
- package/dist/crewfoundry/utils/formatEnumLabel.js +8 -0
- package/dist/crewfoundry/utils/formatEnumLabel.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,247 +1,248 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { formatEnumLabel as t } from "../utils/formatEnumLabel.js";
|
|
3
|
+
import { useMemo as n } from "react";
|
|
4
|
+
import { BarChart3 as r, Building2 as i, ExternalLink as a, MapPin as o, TrendingUp as s, Users as c } from "lucide-react";
|
|
5
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
+
import { Badge as d, Button as f, Card as p, CardContent as m, CardDescription as h, CardHeader as g, CardTitle as _, EmphasisPanel as v, GradientText as y, IllustratedEmptyState as b, PagePurpose as x, Separator as S } from "@burdenoff/fe-libs/ui";
|
|
6
7
|
//#region src/crewfoundry/pages/CompanyCompanyProfilePagePage.tsx
|
|
7
|
-
var
|
|
8
|
+
var C = "https://crewfoundry.com", w = (e) => {
|
|
8
9
|
let t = new Date(e);
|
|
9
10
|
return Number.isNaN(t.getTime()) ? "—" : t.toLocaleDateString(void 0, {
|
|
10
11
|
year: "numeric",
|
|
11
12
|
month: "short"
|
|
12
13
|
});
|
|
13
14
|
};
|
|
14
|
-
function
|
|
15
|
-
let { employees:
|
|
15
|
+
function T() {
|
|
16
|
+
let { employees: T, departments: E, teams: D, projects: O, announcements: k } = e(), A = n(() => Array.from(new Set(T.map((e) => e.location).filter((e) => e.trim() !== ""))), [T]), j = n(() => [...k].sort((e, t) => (t.createdAt ?? "").localeCompare(e.createdAt ?? "")).slice(0, 6).map((e) => ({
|
|
16
17
|
id: e.id,
|
|
17
18
|
date: e.createdAt,
|
|
18
19
|
title: e.title
|
|
19
|
-
})), [
|
|
20
|
+
})), [k]), M = n(() => [
|
|
20
21
|
{
|
|
21
22
|
title: "People First",
|
|
22
|
-
description: `Supporting ${
|
|
23
|
+
description: `Supporting ${T.length} employees with modern workforce tooling.`
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
26
|
title: "Transparency",
|
|
26
|
-
description: `Cross-functional visibility across ${
|
|
27
|
+
description: `Cross-functional visibility across ${E.length} departments.`
|
|
27
28
|
},
|
|
28
29
|
{
|
|
29
30
|
title: "Innovation",
|
|
30
|
-
description: `${
|
|
31
|
+
description: `${O.filter((e) => e.status === "active").length} active initiatives driving product growth.`
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
34
|
title: "Inclusion",
|
|
34
|
-
description: `Distributed teams across ${
|
|
35
|
+
description: `Distributed teams across ${A.length} location${A.length === 1 ? "" : "s"}.`
|
|
35
36
|
}
|
|
36
37
|
], [
|
|
38
|
+
E.length,
|
|
37
39
|
T.length,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
]), M = t(() => [
|
|
40
|
+
A.length,
|
|
41
|
+
O
|
|
42
|
+
]), N = n(() => [
|
|
42
43
|
{
|
|
43
|
-
icon:
|
|
44
|
-
label: `${
|
|
44
|
+
icon: c,
|
|
45
|
+
label: `${T.length} employees`
|
|
45
46
|
},
|
|
46
47
|
{
|
|
47
|
-
icon:
|
|
48
|
-
label: `${
|
|
48
|
+
icon: i,
|
|
49
|
+
label: `${E.length} departments`
|
|
49
50
|
},
|
|
50
51
|
{
|
|
51
|
-
icon:
|
|
52
|
-
label: `${
|
|
52
|
+
icon: s,
|
|
53
|
+
label: `${D.length} teams`
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
|
-
icon:
|
|
56
|
-
label: `${
|
|
56
|
+
icon: o,
|
|
57
|
+
label: `${A.length} office location${A.length === 1 ? "" : "s"}`
|
|
57
58
|
}
|
|
58
59
|
], [
|
|
60
|
+
E.length,
|
|
59
61
|
T.length,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
E.length
|
|
62
|
+
A.length,
|
|
63
|
+
D.length
|
|
63
64
|
]);
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ u("div", {
|
|
65
66
|
className: "space-y-6 p-6",
|
|
66
67
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ u("div", {
|
|
68
69
|
className: "flex items-center justify-between",
|
|
69
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ u("div", {
|
|
70
71
|
className: "flex items-center gap-4",
|
|
71
|
-
children: [/* @__PURE__ */
|
|
72
|
+
children: [/* @__PURE__ */ l("div", {
|
|
72
73
|
className: "flex h-14 w-14 items-center justify-center rounded-xl bg-action-primary-bg text-action-primary-text",
|
|
73
|
-
children: /* @__PURE__ */
|
|
74
|
-
}), /* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ l(i, { className: "h-7 w-7" })
|
|
75
|
+
}), /* @__PURE__ */ u("div", { children: [
|
|
76
|
+
/* @__PURE__ */ l("h1", {
|
|
76
77
|
className: "text-2xl font-semibold",
|
|
77
|
-
children: /* @__PURE__ */
|
|
78
|
+
children: /* @__PURE__ */ l(y, { children: "CrewFoundry" })
|
|
78
79
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ l("p", {
|
|
80
81
|
className: "text-sm text-text-secondary",
|
|
81
82
|
children: "Modern workforce management platform"
|
|
82
83
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ l(x, {
|
|
84
85
|
className: "mt-1",
|
|
85
86
|
children: "Maintain your company's public identity — name, branding, and details that appear across CrewFoundry and to external partners."
|
|
86
87
|
})
|
|
87
88
|
] })]
|
|
88
|
-
}), /* @__PURE__ */
|
|
89
|
+
}), /* @__PURE__ */ u(f, {
|
|
89
90
|
variant: "outline",
|
|
90
91
|
size: "sm",
|
|
91
92
|
"aria-label": "Open crewfoundry.com in a new tab",
|
|
92
|
-
onClick: () => window.open(
|
|
93
|
-
children: [/* @__PURE__ */
|
|
93
|
+
onClick: () => window.open(C, "_blank", "noopener,noreferrer"),
|
|
94
|
+
children: [/* @__PURE__ */ l(a, { className: "h-3 w-3 mr-1" }), "crewfoundry.com"]
|
|
94
95
|
})]
|
|
95
96
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ l("div", {
|
|
97
98
|
className: "grid gap-4 md:grid-cols-4",
|
|
98
99
|
children: [
|
|
99
100
|
{
|
|
100
|
-
icon:
|
|
101
|
+
icon: c,
|
|
101
102
|
label: "Employees",
|
|
102
|
-
value: `${
|
|
103
|
+
value: `${T.length}+`,
|
|
103
104
|
color: "text-status-info-text"
|
|
104
105
|
},
|
|
105
106
|
{
|
|
106
|
-
icon:
|
|
107
|
+
icon: i,
|
|
107
108
|
label: "Departments",
|
|
108
|
-
value:
|
|
109
|
+
value: E.length.toString(),
|
|
109
110
|
color: "text-action-primary-bg"
|
|
110
111
|
},
|
|
111
112
|
{
|
|
112
|
-
icon:
|
|
113
|
+
icon: r,
|
|
113
114
|
label: "Active Projects",
|
|
114
|
-
value:
|
|
115
|
+
value: O.filter((e) => e.status === "active").length.toString(),
|
|
115
116
|
color: "text-status-success-text"
|
|
116
117
|
},
|
|
117
118
|
{
|
|
118
|
-
icon:
|
|
119
|
+
icon: s,
|
|
119
120
|
label: "Teams",
|
|
120
|
-
value:
|
|
121
|
+
value: D.length.toString(),
|
|
121
122
|
color: "text-status-warning-text"
|
|
122
123
|
}
|
|
123
|
-
].map((e) => /* @__PURE__ */
|
|
124
|
+
].map((e) => /* @__PURE__ */ l(p, { children: /* @__PURE__ */ u(m, {
|
|
124
125
|
className: "flex items-center gap-3 pt-6",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ l(e.icon, { className: `h-5 w-5 ${e.color}` }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
|
|
126
127
|
className: "text-xs text-text-secondary",
|
|
127
128
|
children: e.label
|
|
128
|
-
}), /* @__PURE__ */
|
|
129
|
+
}), /* @__PURE__ */ l("p", {
|
|
129
130
|
className: "text-lg font-bold",
|
|
130
131
|
children: e.value
|
|
131
132
|
})] })]
|
|
132
133
|
}) }, e.label))
|
|
133
134
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ u("div", {
|
|
135
136
|
className: "grid gap-6 lg:grid-cols-3",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ u("div", {
|
|
137
138
|
className: "lg:col-span-2 space-y-6",
|
|
138
139
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ u(v, { children: [/* @__PURE__ */ l("div", {
|
|
140
141
|
className: "mb-2 text-base font-semibold",
|
|
141
142
|
children: "About CrewFoundry"
|
|
142
|
-
}), /* @__PURE__ */
|
|
143
|
+
}), /* @__PURE__ */ u("div", {
|
|
143
144
|
className: "space-y-3 text-sm text-text-secondary",
|
|
144
145
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ l("p", { children: "CrewFoundry is a modern, all-in-one workforce management platform built for growing organizations. It streamlines HR operations, recruitment, payroll processing, and employee development through an intuitive interface powered by automation." }),
|
|
147
|
+
/* @__PURE__ */ l("p", { children: "The platform brings hiring, onboarding, time tracking, learning management, and analytics together in one integrated suite so teams can manage their entire workforce in a single place." }),
|
|
148
|
+
/* @__PURE__ */ l(S, {}),
|
|
149
|
+
/* @__PURE__ */ l("div", {
|
|
149
150
|
className: "grid grid-cols-2 gap-3 text-xs",
|
|
150
|
-
children:
|
|
151
|
+
children: N.map((e) => /* @__PURE__ */ u("div", {
|
|
151
152
|
className: "flex items-center gap-2",
|
|
152
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ l(e.icon, { className: "h-3 w-3" }), /* @__PURE__ */ l("span", { children: e.label })]
|
|
153
154
|
}, e.label))
|
|
154
155
|
})
|
|
155
156
|
]
|
|
156
157
|
})] }),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ u(p, { children: [/* @__PURE__ */ u(g, { children: [/* @__PURE__ */ l(_, {
|
|
158
159
|
className: "text-base",
|
|
159
160
|
children: "Our Values"
|
|
160
|
-
}), /* @__PURE__ */
|
|
161
|
+
}), /* @__PURE__ */ l(h, { children: "The principles that guide how we build and work" })] }), /* @__PURE__ */ l(m, {
|
|
161
162
|
className: "grid gap-3 sm:grid-cols-2",
|
|
162
|
-
children:
|
|
163
|
+
children: M.map((e) => /* @__PURE__ */ u("div", {
|
|
163
164
|
className: "rounded-lg border p-3 space-y-1",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ l("p", {
|
|
165
166
|
className: "text-sm font-medium",
|
|
166
167
|
children: e.title
|
|
167
|
-
}), /* @__PURE__ */
|
|
168
|
+
}), /* @__PURE__ */ l("p", {
|
|
168
169
|
className: "text-xs text-text-secondary",
|
|
169
170
|
children: e.description
|
|
170
171
|
})]
|
|
171
172
|
}, e.title))
|
|
172
173
|
})] }),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(_, {
|
|
174
175
|
className: "text-base",
|
|
175
176
|
children: "Departments"
|
|
176
|
-
}) }), /* @__PURE__ */
|
|
177
|
+
}) }), /* @__PURE__ */ l(m, {
|
|
177
178
|
className: "p-0",
|
|
178
|
-
children:
|
|
179
|
+
children: E.length === 0 ? /* @__PURE__ */ l("div", {
|
|
179
180
|
className: "p-6",
|
|
180
|
-
children: /* @__PURE__ */
|
|
181
|
+
children: /* @__PURE__ */ l(b, {
|
|
181
182
|
illustration: "empty-data",
|
|
182
183
|
title: "No departments yet",
|
|
183
184
|
description: "Departments you create will appear here."
|
|
184
185
|
})
|
|
185
|
-
}) :
|
|
186
|
-
className: `flex items-center justify-between px-6 py-3 ${
|
|
187
|
-
children: [/* @__PURE__ */
|
|
186
|
+
}) : E.map((e, n) => /* @__PURE__ */ u("div", {
|
|
187
|
+
className: `flex items-center justify-between px-6 py-3 ${n < E.length - 1 ? "border-b" : ""}`,
|
|
188
|
+
children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
|
|
188
189
|
className: "text-sm font-medium",
|
|
189
190
|
children: e.name
|
|
190
|
-
}), /* @__PURE__ */
|
|
191
|
+
}), /* @__PURE__ */ u("p", {
|
|
191
192
|
className: "text-xs text-text-secondary",
|
|
192
193
|
children: ["Led by ", e.headName]
|
|
193
|
-
})] }), /* @__PURE__ */
|
|
194
|
+
})] }), /* @__PURE__ */ u("div", {
|
|
194
195
|
className: "flex items-center gap-3",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ u("span", {
|
|
196
197
|
className: "text-xs text-text-secondary",
|
|
197
198
|
children: [e.employeeCount, " employees"]
|
|
198
|
-
}), /* @__PURE__ */
|
|
199
|
+
}), /* @__PURE__ */ l(d, {
|
|
199
200
|
variant: e.status === "active" ? "default" : "secondary",
|
|
200
201
|
className: "text-[10px]",
|
|
201
|
-
children: e.status
|
|
202
|
+
children: t(e.status)
|
|
202
203
|
})]
|
|
203
204
|
})]
|
|
204
205
|
}, e.id))
|
|
205
206
|
})] })
|
|
206
207
|
]
|
|
207
|
-
}), /* @__PURE__ */
|
|
208
|
+
}), /* @__PURE__ */ u("div", {
|
|
208
209
|
className: "space-y-4",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
210
|
+
children: [/* @__PURE__ */ u(p, { children: [/* @__PURE__ */ u(g, { children: [/* @__PURE__ */ l(_, {
|
|
210
211
|
className: "text-sm",
|
|
211
212
|
children: "Company Timeline"
|
|
212
|
-
}), /* @__PURE__ */
|
|
213
|
+
}), /* @__PURE__ */ l(h, { children: "Recent company announcements" })] }), /* @__PURE__ */ l(m, {
|
|
213
214
|
className: "space-y-0",
|
|
214
|
-
children:
|
|
215
|
+
children: j.length === 0 ? /* @__PURE__ */ l(b, {
|
|
215
216
|
illustration: "empty-data",
|
|
216
217
|
title: "No announcements yet",
|
|
217
218
|
description: "Company milestones from announcements will appear here."
|
|
218
|
-
}) :
|
|
219
|
+
}) : j.map((e, t) => /* @__PURE__ */ u("div", {
|
|
219
220
|
className: "flex gap-3",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ u("div", {
|
|
221
222
|
className: "flex flex-col items-center",
|
|
222
|
-
children: [/* @__PURE__ */
|
|
223
|
-
}), /* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ l("div", { className: "flex h-2.5 w-2.5 shrink-0 items-center justify-center rounded-full bg-action-primary-bg" }), t < j.length - 1 && /* @__PURE__ */ l("div", { className: "h-full w-px bg-border my-1" })]
|
|
224
|
+
}), /* @__PURE__ */ u("div", {
|
|
224
225
|
className: "pb-4",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ l("p", {
|
|
226
227
|
className: "text-xs font-medium",
|
|
227
|
-
children:
|
|
228
|
-
}), /* @__PURE__ */
|
|
228
|
+
children: w(e.date)
|
|
229
|
+
}), /* @__PURE__ */ l("p", {
|
|
229
230
|
className: "text-xs text-text-secondary",
|
|
230
231
|
children: e.title
|
|
231
232
|
})]
|
|
232
233
|
})]
|
|
233
234
|
}, e.id))
|
|
234
|
-
})] }), /* @__PURE__ */
|
|
235
|
+
})] }), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ l(g, { children: /* @__PURE__ */ l(_, {
|
|
235
236
|
className: "text-sm",
|
|
236
237
|
children: "Office Locations"
|
|
237
|
-
}) }), /* @__PURE__ */
|
|
238
|
+
}) }), /* @__PURE__ */ l(m, {
|
|
238
239
|
className: "space-y-2",
|
|
239
|
-
children:
|
|
240
|
+
children: A.length === 0 ? /* @__PURE__ */ l("p", {
|
|
240
241
|
className: "text-sm text-text-secondary",
|
|
241
242
|
children: "No locations on record yet."
|
|
242
|
-
}) :
|
|
243
|
+
}) : A.map((e) => /* @__PURE__ */ u("div", {
|
|
243
244
|
className: "flex items-center gap-2 text-sm",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
245
|
+
children: [/* @__PURE__ */ l(o, { className: "h-3 w-3 text-text-secondary" }), /* @__PURE__ */ l("span", { children: e })]
|
|
245
246
|
}, e))
|
|
246
247
|
})] })]
|
|
247
248
|
})]
|
|
@@ -250,6 +251,6 @@ function w() {
|
|
|
250
251
|
});
|
|
251
252
|
}
|
|
252
253
|
//#endregion
|
|
253
|
-
export {
|
|
254
|
+
export { T as CompanyCompanyProfilePagePage };
|
|
254
255
|
|
|
255
256
|
//# sourceMappingURL=CompanyCompanyProfilePagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompanyCompanyProfilePagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CompanyCompanyProfilePagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n EmphasisPanel,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n Separator,\n} from '@burdenoff/fe-libs/ui';\nimport { BarChart3, Building2, ExternalLink, MapPin, TrendingUp, Users } from 'lucide-react';\nimport { useMemo } from 'react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nconst COMPANY_WEBSITE = 'https://crewfoundry.com';\n\nconst formatTimelineDate = (value: string): string => {\n const parsed = new Date(value);\n if (Number.isNaN(parsed.getTime())) {\n return '—';\n }\n return parsed.toLocaleDateString(undefined, { year: 'numeric', month: 'short' });\n};\n\nexport function CompanyCompanyProfilePagePage() {\n const { employees, departments, teams, projects, announcements } = useCrewFoundryStore();\n\n const officeLocations = useMemo(\n () =>\n Array.from(\n new Set(employees.map((employee) => employee.location).filter((loc) => loc.trim() !== ''))\n ),\n [employees]\n );\n\n const timeline = useMemo(\n () =>\n [...announcements]\n .sort((a, b) => (b.createdAt ?? '').localeCompare(a.createdAt ?? ''))\n .slice(0, 6)\n .map((announcement) => ({\n id: announcement.id,\n date: announcement.createdAt,\n title: announcement.title,\n })),\n [announcements]\n );\n\n const values = useMemo(\n () => [\n {\n title: 'People First',\n description: `Supporting ${employees.length} employees with modern workforce tooling.`,\n },\n {\n title: 'Transparency',\n description: `Cross-functional visibility across ${departments.length} departments.`,\n },\n {\n title: 'Innovation',\n description: `${projects.filter((project) => project.status === 'active').length} active initiatives driving product growth.`,\n },\n {\n title: 'Inclusion',\n description: `Distributed teams across ${officeLocations.length} location${officeLocations.length === 1 ? '' : 's'}.`,\n },\n ],\n [departments.length, employees.length, officeLocations.length, projects]\n );\n\n const facts = useMemo(\n () => [\n { icon: Users, label: `${employees.length} employees` },\n { icon: Building2, label: `${departments.length} departments` },\n { icon: TrendingUp, label: `${teams.length} teams` },\n {\n icon: MapPin,\n label: `${officeLocations.length} office location${officeLocations.length === 1 ? '' : 's'}`,\n },\n ],\n [departments.length, employees.length, officeLocations.length, teams.length]\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-4\">\n <div className=\"flex h-14 w-14 items-center justify-center rounded-xl bg-action-primary-bg text-action-primary-text\">\n <Building2 className=\"h-7 w-7\" />\n </div>\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>CrewFoundry</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">Modern workforce management platform</p>\n <PagePurpose className=\"mt-1\">\n Maintain your company's public identity — name, branding, and details that appear\n across CrewFoundry and to external partners.\n </PagePurpose>\n </div>\n </div>\n <Button\n variant=\"outline\"\n size=\"sm\"\n aria-label=\"Open crewfoundry.com in a new tab\"\n onClick={() => window.open(COMPANY_WEBSITE, '_blank', 'noopener,noreferrer')}\n >\n <ExternalLink className=\"h-3 w-3 mr-1\" />\n crewfoundry.com\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-4\">\n {[\n {\n icon: Users,\n label: 'Employees',\n value: `${employees.length}+`,\n color: 'text-status-info-text',\n },\n {\n icon: Building2,\n label: 'Departments',\n value: departments.length.toString(),\n color: 'text-action-primary-bg',\n },\n {\n icon: BarChart3,\n label: 'Active Projects',\n value: projects.filter((p) => p.status === 'active').length.toString(),\n color: 'text-status-success-text',\n },\n {\n icon: TrendingUp,\n label: 'Teams',\n value: teams.length.toString(),\n color: 'text-status-warning-text',\n },\n ].map((stat) => (\n <Card key={stat.label}>\n <CardContent className=\"flex items-center gap-3 pt-6\">\n <stat.icon className={`h-5 w-5 ${stat.color}`} />\n <div>\n <p className=\"text-xs text-text-secondary\">{stat.label}</p>\n <p className=\"text-lg font-bold\">{stat.value}</p>\n </div>\n </CardContent>\n </Card>\n ))}\n </div>\n\n <div className=\"grid gap-6 lg:grid-cols-3\">\n <div className=\"lg:col-span-2 space-y-6\">\n <EmphasisPanel>\n <div className=\"mb-2 text-base font-semibold\">About CrewFoundry</div>\n <div className=\"space-y-3 text-sm text-text-secondary\">\n <p>\n CrewFoundry is a modern, all-in-one workforce management platform built for growing\n organizations. It streamlines HR operations, recruitment, payroll processing, and\n employee development through an intuitive interface powered by automation.\n </p>\n <p>\n The platform brings hiring, onboarding, time tracking, learning management, and\n analytics together in one integrated suite so teams can manage their entire\n workforce in a single place.\n </p>\n <Separator />\n <div className=\"grid grid-cols-2 gap-3 text-xs\">\n {facts.map((fact) => (\n <div key={fact.label} className=\"flex items-center gap-2\">\n <fact.icon className=\"h-3 w-3\" />\n <span>{fact.label}</span>\n </div>\n ))}\n </div>\n </div>\n </EmphasisPanel>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"text-base\">Our Values</CardTitle>\n <CardDescription>The principles that guide how we build and work</CardDescription>\n </CardHeader>\n <CardContent className=\"grid gap-3 sm:grid-cols-2\">\n {values.map((v) => (\n <div key={v.title} className=\"rounded-lg border p-3 space-y-1\">\n <p className=\"text-sm font-medium\">{v.title}</p>\n <p className=\"text-xs text-text-secondary\">{v.description}</p>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"text-base\">Departments</CardTitle>\n </CardHeader>\n <CardContent className=\"p-0\">\n {departments.length === 0 ? (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No departments yet\"\n description=\"Departments you create will appear here.\"\n />\n </div>\n ) : (\n departments.map((dept, i) => (\n <div\n key={dept.id}\n className={`flex items-center justify-between px-6 py-3 ${i < departments.length - 1 ? 'border-b' : ''}`}\n >\n <div>\n <p className=\"text-sm font-medium\">{dept.name}</p>\n <p className=\"text-xs text-text-secondary\">Led by {dept.headName}</p>\n </div>\n <div className=\"flex items-center gap-3\">\n <span className=\"text-xs text-text-secondary\">\n {dept.employeeCount} employees\n </span>\n <Badge\n variant={dept.status === 'active' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {dept.status}\n </Badge>\n </div>\n </div>\n ))\n )}\n </CardContent>\n </Card>\n </div>\n\n <div className=\"space-y-4\">\n <Card>\n <CardHeader>\n <CardTitle className=\"text-sm\">Company Timeline</CardTitle>\n <CardDescription>Recent company announcements</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-0\">\n {timeline.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No announcements yet\"\n description=\"Company milestones from announcements will appear here.\"\n />\n ) : (\n timeline.map((entry, i) => (\n <div key={entry.id} className=\"flex gap-3\">\n <div className=\"flex flex-col items-center\">\n <div className=\"flex h-2.5 w-2.5 shrink-0 items-center justify-center rounded-full bg-action-primary-bg\" />\n {i < timeline.length - 1 && <div className=\"h-full w-px bg-border my-1\" />}\n </div>\n <div className=\"pb-4\">\n <p className=\"text-xs font-medium\">{formatTimelineDate(entry.date)}</p>\n <p className=\"text-xs text-text-secondary\">{entry.title}</p>\n </div>\n </div>\n ))\n )}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"text-sm\">Office Locations</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n {officeLocations.length === 0 ? (\n <p className=\"text-sm text-text-secondary\">No locations on record yet.</p>\n ) : (\n officeLocations.map((loc) => (\n <div key={loc} className=\"flex items-center gap-2 text-sm\">\n <MapPin className=\"h-3 w-3 text-text-secondary\" />\n <span>{loc}</span>\n </div>\n ))\n )}\n </CardContent>\n </Card>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;AAkBA,IAAM,IAAkB,2BAElB,KAAsB,MAA0B;CACpD,IAAM,IAAS,IAAI,KAAK,EAAM;AAI9B,QAHI,OAAO,MAAM,EAAO,SAAS,CAAC,GACzB,MAEF,EAAO,mBAAmB,KAAA,GAAW;EAAE,MAAM;EAAW,OAAO;EAAS,CAAC;;AAGlF,SAAgB,IAAgC;CAC9C,IAAM,EAAE,cAAW,gBAAa,UAAO,aAAU,qBAAkB,GAAqB,EAElF,IAAkB,QAEpB,MAAM,KACJ,IAAI,IAAI,EAAU,KAAK,MAAa,EAAS,SAAS,CAAC,QAAQ,MAAQ,EAAI,MAAM,KAAK,GAAG,CAAC,CAC3F,EACH,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EAAA,UACE,kBAAC,GAAD;MAAW,WAAU;gBAAU;MAA4B,CAAA,EAChD,CAAA,EACb,kBAAC,GAAD;MAAa,WAAU;gBACpB,EAAgB,WAAW,IAC1B,kBAAC,KAAD;OAAG,WAAU;iBAA8B;OAA+B,CAAA,GAE1E,EAAgB,KAAK,MACnB,kBAAC,OAAD;OAAe,WAAU;iBAAzB,CACE,kBAAC,GAAD,EAAQ,WAAU,+BAAgC,CAAA,EAClD,kBAAC,QAAD,EAAA,UAAO,GAAW,CAAA,CACd;SAHI,EAGJ,CACN;MAEQ,CAAA,CACT,EAAA,CAAA,CACH;OACF;;GACF"}
|
|
1
|
+
{"version":3,"file":"CompanyCompanyProfilePagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CompanyCompanyProfilePagePage.tsx"],"sourcesContent":["import {\n Badge,\n Button,\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n EmphasisPanel,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n Separator,\n} from '@burdenoff/fe-libs/ui';\nimport { BarChart3, Building2, ExternalLink, MapPin, TrendingUp, Users } from 'lucide-react';\nimport { useMemo } from 'react';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\nimport { formatEnumLabel } from '../utils/formatEnumLabel';\n\nconst COMPANY_WEBSITE = 'https://crewfoundry.com';\n\nconst formatTimelineDate = (value: string): string => {\n const parsed = new Date(value);\n if (Number.isNaN(parsed.getTime())) {\n return '—';\n }\n return parsed.toLocaleDateString(undefined, { year: 'numeric', month: 'short' });\n};\n\nexport function CompanyCompanyProfilePagePage() {\n const { employees, departments, teams, projects, announcements } = useCrewFoundryStore();\n\n const officeLocations = useMemo(\n () =>\n Array.from(\n new Set(employees.map((employee) => employee.location).filter((loc) => loc.trim() !== ''))\n ),\n [employees]\n );\n\n const timeline = useMemo(\n () =>\n [...announcements]\n .sort((a, b) => (b.createdAt ?? '').localeCompare(a.createdAt ?? ''))\n .slice(0, 6)\n .map((announcement) => ({\n id: announcement.id,\n date: announcement.createdAt,\n title: announcement.title,\n })),\n [announcements]\n );\n\n const values = useMemo(\n () => [\n {\n title: 'People First',\n description: `Supporting ${employees.length} employees with modern workforce tooling.`,\n },\n {\n title: 'Transparency',\n description: `Cross-functional visibility across ${departments.length} departments.`,\n },\n {\n title: 'Innovation',\n description: `${projects.filter((project) => project.status === 'active').length} active initiatives driving product growth.`,\n },\n {\n title: 'Inclusion',\n description: `Distributed teams across ${officeLocations.length} location${officeLocations.length === 1 ? '' : 's'}.`,\n },\n ],\n [departments.length, employees.length, officeLocations.length, projects]\n );\n\n const facts = useMemo(\n () => [\n { icon: Users, label: `${employees.length} employees` },\n { icon: Building2, label: `${departments.length} departments` },\n { icon: TrendingUp, label: `${teams.length} teams` },\n {\n icon: MapPin,\n label: `${officeLocations.length} office location${officeLocations.length === 1 ? '' : 's'}`,\n },\n ],\n [departments.length, employees.length, officeLocations.length, teams.length]\n );\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-4\">\n <div className=\"flex h-14 w-14 items-center justify-center rounded-xl bg-action-primary-bg text-action-primary-text\">\n <Building2 className=\"h-7 w-7\" />\n </div>\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>CrewFoundry</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">Modern workforce management platform</p>\n <PagePurpose className=\"mt-1\">\n Maintain your company's public identity — name, branding, and details that appear\n across CrewFoundry and to external partners.\n </PagePurpose>\n </div>\n </div>\n <Button\n variant=\"outline\"\n size=\"sm\"\n aria-label=\"Open crewfoundry.com in a new tab\"\n onClick={() => window.open(COMPANY_WEBSITE, '_blank', 'noopener,noreferrer')}\n >\n <ExternalLink className=\"h-3 w-3 mr-1\" />\n crewfoundry.com\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-4\">\n {[\n {\n icon: Users,\n label: 'Employees',\n value: `${employees.length}+`,\n color: 'text-status-info-text',\n },\n {\n icon: Building2,\n label: 'Departments',\n value: departments.length.toString(),\n color: 'text-action-primary-bg',\n },\n {\n icon: BarChart3,\n label: 'Active Projects',\n value: projects.filter((p) => p.status === 'active').length.toString(),\n color: 'text-status-success-text',\n },\n {\n icon: TrendingUp,\n label: 'Teams',\n value: teams.length.toString(),\n color: 'text-status-warning-text',\n },\n ].map((stat) => (\n <Card key={stat.label}>\n <CardContent className=\"flex items-center gap-3 pt-6\">\n <stat.icon className={`h-5 w-5 ${stat.color}`} />\n <div>\n <p className=\"text-xs text-text-secondary\">{stat.label}</p>\n <p className=\"text-lg font-bold\">{stat.value}</p>\n </div>\n </CardContent>\n </Card>\n ))}\n </div>\n\n <div className=\"grid gap-6 lg:grid-cols-3\">\n <div className=\"lg:col-span-2 space-y-6\">\n <EmphasisPanel>\n <div className=\"mb-2 text-base font-semibold\">About CrewFoundry</div>\n <div className=\"space-y-3 text-sm text-text-secondary\">\n <p>\n CrewFoundry is a modern, all-in-one workforce management platform built for growing\n organizations. It streamlines HR operations, recruitment, payroll processing, and\n employee development through an intuitive interface powered by automation.\n </p>\n <p>\n The platform brings hiring, onboarding, time tracking, learning management, and\n analytics together in one integrated suite so teams can manage their entire\n workforce in a single place.\n </p>\n <Separator />\n <div className=\"grid grid-cols-2 gap-3 text-xs\">\n {facts.map((fact) => (\n <div key={fact.label} className=\"flex items-center gap-2\">\n <fact.icon className=\"h-3 w-3\" />\n <span>{fact.label}</span>\n </div>\n ))}\n </div>\n </div>\n </EmphasisPanel>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"text-base\">Our Values</CardTitle>\n <CardDescription>The principles that guide how we build and work</CardDescription>\n </CardHeader>\n <CardContent className=\"grid gap-3 sm:grid-cols-2\">\n {values.map((v) => (\n <div key={v.title} className=\"rounded-lg border p-3 space-y-1\">\n <p className=\"text-sm font-medium\">{v.title}</p>\n <p className=\"text-xs text-text-secondary\">{v.description}</p>\n </div>\n ))}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"text-base\">Departments</CardTitle>\n </CardHeader>\n <CardContent className=\"p-0\">\n {departments.length === 0 ? (\n <div className=\"p-6\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No departments yet\"\n description=\"Departments you create will appear here.\"\n />\n </div>\n ) : (\n departments.map((dept, i) => (\n <div\n key={dept.id}\n className={`flex items-center justify-between px-6 py-3 ${i < departments.length - 1 ? 'border-b' : ''}`}\n >\n <div>\n <p className=\"text-sm font-medium\">{dept.name}</p>\n <p className=\"text-xs text-text-secondary\">Led by {dept.headName}</p>\n </div>\n <div className=\"flex items-center gap-3\">\n <span className=\"text-xs text-text-secondary\">\n {dept.employeeCount} employees\n </span>\n <Badge\n variant={dept.status === 'active' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {formatEnumLabel(dept.status)}\n </Badge>\n </div>\n </div>\n ))\n )}\n </CardContent>\n </Card>\n </div>\n\n <div className=\"space-y-4\">\n <Card>\n <CardHeader>\n <CardTitle className=\"text-sm\">Company Timeline</CardTitle>\n <CardDescription>Recent company announcements</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-0\">\n {timeline.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No announcements yet\"\n description=\"Company milestones from announcements will appear here.\"\n />\n ) : (\n timeline.map((entry, i) => (\n <div key={entry.id} className=\"flex gap-3\">\n <div className=\"flex flex-col items-center\">\n <div className=\"flex h-2.5 w-2.5 shrink-0 items-center justify-center rounded-full bg-action-primary-bg\" />\n {i < timeline.length - 1 && <div className=\"h-full w-px bg-border my-1\" />}\n </div>\n <div className=\"pb-4\">\n <p className=\"text-xs font-medium\">{formatTimelineDate(entry.date)}</p>\n <p className=\"text-xs text-text-secondary\">{entry.title}</p>\n </div>\n </div>\n ))\n )}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle className=\"text-sm\">Office Locations</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n {officeLocations.length === 0 ? (\n <p className=\"text-sm text-text-secondary\">No locations on record yet.</p>\n ) : (\n officeLocations.map((loc) => (\n <div key={loc} className=\"flex items-center gap-2 text-sm\">\n <MapPin className=\"h-3 w-3 text-text-secondary\" />\n <span>{loc}</span>\n </div>\n ))\n )}\n </CardContent>\n </Card>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAmBA,IAAM,IAAkB,2BAElB,KAAsB,MAA0B;CACpD,IAAM,IAAS,IAAI,KAAK,EAAM;AAI9B,QAHI,OAAO,MAAM,EAAO,SAAS,CAAC,GACzB,MAEF,EAAO,mBAAmB,KAAA,GAAW;EAAE,MAAM;EAAW,OAAO;EAAS,CAAC;;AAGlF,SAAgB,IAAgC;CAC9C,IAAM,EAAE,cAAW,gBAAa,UAAO,aAAU,qBAAkB,GAAqB,EAElF,IAAkB,QAEpB,MAAM,KACJ,IAAI,IAAI,EAAU,KAAK,MAAa,EAAS,SAAS,CAAC,QAAQ,MAAQ,EAAI,MAAM,KAAK,GAAG,CAAC,CAC3F,EACH,CAAC,EAAU,CACZ,EAEK,IAAW,QAEb,CAAC,GAAG,EAAc,CACf,MAAM,GAAG,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,aAAa,GAAG,CAAC,CACpE,MAAM,GAAG,EAAE,CACX,KAAK,OAAkB;EACtB,IAAI,EAAa;EACjB,MAAM,EAAa;EACnB,OAAO,EAAa;EACrB,EAAE,EACP,CAAC,EAAc,CAChB,EAEK,IAAS,QACP;EACJ;GACE,OAAO;GACP,aAAa,cAAc,EAAU,OAAO;GAC7C;EACD;GACE,OAAO;GACP,aAAa,sCAAsC,EAAY,OAAO;GACvE;EACD;GACE,OAAO;GACP,aAAa,GAAG,EAAS,QAAQ,MAAY,EAAQ,WAAW,SAAS,CAAC,OAAO;GAClF;EACD;GACE,OAAO;GACP,aAAa,4BAA4B,EAAgB,OAAO,WAAW,EAAgB,WAAW,IAAI,KAAK,IAAI;GACpH;EACF,EACD;EAAC,EAAY;EAAQ,EAAU;EAAQ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