@burdenoff/microfe-crewfoundry 2026.827.1 → 2026.830.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/crewfoundry/CrewFoundryRoot.d.ts.map +1 -1
- package/dist/crewfoundry/CrewFoundryRoot.js +190 -185
- package/dist/crewfoundry/CrewFoundryRoot.js.map +1 -1
- package/dist/crewfoundry/components/forms/ConfirmDialog.d.ts.map +1 -1
- package/dist/crewfoundry/components/forms/ConfirmDialog.js +25 -24
- package/dist/crewfoundry/components/forms/ConfirmDialog.js.map +1 -1
- package/dist/crewfoundry/components/forms/FormModal.d.ts.map +1 -1
- package/dist/crewfoundry/components/forms/FormModal.js +103 -101
- package/dist/crewfoundry/components/forms/FormModal.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +207 -210
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HiringJobsPagePage.js +75 -78
- package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +101 -104
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +95 -98
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +101 -104
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
- package/dist/shared/hooks/useTr.d.ts +17 -0
- package/dist/shared/hooks/useTr.d.ts.map +1 -0
- package/dist/shared/hooks/useTr.js +14 -0
- package/dist/shared/hooks/useTr.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { useCrewFoundry as e } from "../providers/CrewFoundryProvider.js";
|
|
2
2
|
import { useCrewFoundryStore as t } from "../store/crewfoundryStore.js";
|
|
3
3
|
import { formatEnumLabel as n } from "../utils/formatEnumLabel.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { useTr as r } from "../../shared/hooks/useTr.js";
|
|
5
|
+
import { getInitials as i } from "../components/viz/lib/format.js";
|
|
6
|
+
import { AreaChart as ee } from "../components/viz/AreaChart.js";
|
|
7
|
+
import { HBarFunnel as te } from "../components/viz/HBarFunnel.js";
|
|
7
8
|
import { StatCard as a } from "../components/viz/StatCard.js";
|
|
8
9
|
import "../components/viz/index.js";
|
|
9
|
-
import { headcountByMonth as
|
|
10
|
-
import { useMemo as
|
|
11
|
-
import { Activity as
|
|
12
|
-
import { useNavigate as
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { AuroraBackground as
|
|
10
|
+
import { headcountByMonth as o, momDelta as ne } from "../lib/analytics.js";
|
|
11
|
+
import { useMemo as s, useState as c } from "react";
|
|
12
|
+
import { Activity as l, Briefcase as u, Calendar as d, FolderPlus as re, Plus as f, TrendingUp as ie, UserPlus as ae, Users as p } from "lucide-react";
|
|
13
|
+
import { useNavigate as m } from "react-router";
|
|
14
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
15
|
+
import { AuroraBackground as _, Badge as v, Button as y, Card as b, CardContent as x, CardHeader as S, CardTitle as C, DropdownMenu as oe, DropdownMenuContent as se, DropdownMenuItem as w, DropdownMenuLabel as ce, DropdownMenuSeparator as le, DropdownMenuTrigger as ue, GradientText as de, IllustratedEmptyState as T, NextSteps as fe, PagePurpose as pe, Pagination as me } from "@burdenoff/fe-libs/ui";
|
|
15
16
|
import { usePagination as he } from "@burdenoff/fe-libs/shared/hooks";
|
|
16
17
|
import { useGlobalUi as ge } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
17
|
-
import { useI18n as _e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
18
18
|
//#region src/crewfoundry/pages/DashboardDashboardPagePage.tsx
|
|
19
|
-
function
|
|
19
|
+
function E(e) {
|
|
20
20
|
let t = e.map((e) => e ? new Date(e) : null).filter((e) => e !== null && !Number.isNaN(e.getTime())).map((e) => e.getUTCFullYear() * 12 + e.getUTCMonth());
|
|
21
21
|
if (t.length === 0) return [];
|
|
22
22
|
let n = Math.min(...t), r = Math.max(...t), i = [];
|
|
23
23
|
for (let e = n; e <= r; e += 1) i.push(t.filter((t) => t <= e).length);
|
|
24
24
|
return i;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function D(e) {
|
|
27
27
|
if (e.length < 2) return;
|
|
28
28
|
let t = e[e.length - 1], n = e[e.length - 2];
|
|
29
29
|
if (!(n <= 0)) return Math.round((t - n) / n * 100);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return /* @__PURE__ */
|
|
31
|
+
function O({ name: e, size: t = 38 }) {
|
|
32
|
+
return /* @__PURE__ */ h("span", {
|
|
33
33
|
"aria-hidden": "true",
|
|
34
34
|
className: "inline-flex shrink-0 items-center justify-center rounded-full bg-bg-elevated font-medium text-text-secondary",
|
|
35
35
|
style: {
|
|
@@ -37,10 +37,10 @@ function D({ name: e, size: t = 38 }) {
|
|
|
37
37
|
height: t,
|
|
38
38
|
fontSize: Math.round(t * .36)
|
|
39
39
|
},
|
|
40
|
-
children:
|
|
40
|
+
children: i(e)
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
var
|
|
43
|
+
var _e = [
|
|
44
44
|
"new",
|
|
45
45
|
"screening",
|
|
46
46
|
"interview",
|
|
@@ -48,298 +48,295 @@ var ve = [
|
|
|
48
48
|
"offer",
|
|
49
49
|
"hired"
|
|
50
50
|
];
|
|
51
|
-
function
|
|
52
|
-
let
|
|
53
|
-
|
|
51
|
+
function k() {
|
|
52
|
+
let i = r(), k = m(), { showToast: A } = ge(), { currentUser: j } = e(), { employees: M, jobPostings: N, interviews: P, leaveRequests: F, projects: I, candidates: L, announcements: R, updateLeaveRequest: ve } = t(), [z, B] = c(null), [ye, be] = c({}), xe = j?.name || [j?.firstName, j?.lastName].filter(Boolean).join(" ") || j?.email || "Manager", V = async (e, t) => {
|
|
53
|
+
B(e);
|
|
54
54
|
try {
|
|
55
|
-
await
|
|
55
|
+
await ve(e, {
|
|
56
56
|
status: t,
|
|
57
|
-
approverName:
|
|
58
|
-
}),
|
|
57
|
+
approverName: xe
|
|
58
|
+
}), A(t === "approved" ? "Leave approved" : "Leave rejected", "success");
|
|
59
59
|
} catch (e) {
|
|
60
|
-
|
|
60
|
+
A(e instanceof Error ? e.message : "Unable to update leave request", "error");
|
|
61
61
|
} finally {
|
|
62
|
-
|
|
62
|
+
B(null);
|
|
63
63
|
}
|
|
64
|
-
},
|
|
65
|
-
let
|
|
66
|
-
return n === e ? t : n;
|
|
67
|
-
}, Ce = j.filter((e) => e.status === "active").length, we = j.filter((e) => e.status === "on_leave").length, Te = M.filter((e) => e.status === "active").length, Ee = M.reduce((e, t) => e + t.applicants, 0), De = P.filter((e) => e.status === "pending").length, Oe = F.filter((e) => e.status === "active").length, ke = (j.reduce((e, t) => e + t.performanceScore, 0) / Math.max(j.length, 1)).toFixed(1), H = o(() => te(j), [j]), Ae = H.map((e) => e.value), je = ne(H).deltaPercent, U = o(() => T(M.filter((e) => e.status === "active").map((e) => e.postedDate)), [M]), W = o(() => T(F.filter((e) => e.status === "active").map((e) => e.startDate)), [F]), G = o(() => {
|
|
68
|
-
let e = (e) => ve.indexOf(e), t = (t) => I.filter((n) => e(n.status) >= t).length;
|
|
64
|
+
}, Se = M.filter((e) => e.status === "active").length, Ce = M.filter((e) => e.status === "on_leave").length, we = N.filter((e) => e.status === "active").length, Te = N.reduce((e, t) => e + t.applicants, 0), H = F.filter((e) => e.status === "pending").length, Ee = I.filter((e) => e.status === "active").length, De = (M.reduce((e, t) => e + t.performanceScore, 0) / Math.max(M.length, 1)).toFixed(1), U = s(() => o(M), [M]), Oe = U.map((e) => e.value), ke = ne(U).deltaPercent, W = s(() => E(N.filter((e) => e.status === "active").map((e) => e.postedDate)), [N]), G = s(() => E(I.filter((e) => e.status === "active").map((e) => e.startDate)), [I]), K = s(() => {
|
|
65
|
+
let e = (e) => _e.indexOf(e), t = (t) => L.filter((n) => e(n.status) >= t).length;
|
|
69
66
|
return {
|
|
70
|
-
applied:
|
|
67
|
+
applied: L.length,
|
|
71
68
|
screening: t(1),
|
|
72
69
|
interview: t(2),
|
|
73
70
|
offer: t(4),
|
|
74
71
|
hired: t(5)
|
|
75
72
|
};
|
|
76
|
-
}, [
|
|
73
|
+
}, [L]), Ae = [
|
|
77
74
|
{
|
|
78
|
-
label:
|
|
79
|
-
value:
|
|
75
|
+
label: i("crewfoundry.dashboard.pipeline.applied", "Applied"),
|
|
76
|
+
value: K.applied
|
|
80
77
|
},
|
|
81
78
|
{
|
|
82
|
-
label:
|
|
83
|
-
value:
|
|
79
|
+
label: i("crewfoundry.dashboard.pipeline.screening", "Screening"),
|
|
80
|
+
value: K.screening
|
|
84
81
|
},
|
|
85
82
|
{
|
|
86
|
-
label:
|
|
87
|
-
value:
|
|
83
|
+
label: i("crewfoundry.dashboard.pipeline.interview", "Interview"),
|
|
84
|
+
value: K.interview
|
|
88
85
|
},
|
|
89
86
|
{
|
|
90
|
-
label:
|
|
91
|
-
value:
|
|
87
|
+
label: i("crewfoundry.dashboard.pipeline.offer", "Offer"),
|
|
88
|
+
value: K.offer
|
|
92
89
|
},
|
|
93
90
|
{
|
|
94
|
-
label:
|
|
95
|
-
value:
|
|
91
|
+
label: i("crewfoundry.dashboard.pipeline.hired", "Hired"),
|
|
92
|
+
value: K.hired
|
|
96
93
|
}
|
|
97
|
-
],
|
|
94
|
+
], je = s(() => {
|
|
98
95
|
let e = /* @__PURE__ */ new Map();
|
|
99
|
-
for (let t of
|
|
96
|
+
for (let t of M) e.set(`${t.firstName} ${t.lastName}`.trim().toLowerCase(), t.avatar);
|
|
100
97
|
return e;
|
|
101
|
-
}, [
|
|
102
|
-
return /* @__PURE__ */
|
|
98
|
+
}, [M]), q = [...P].filter((e) => e.status === "scheduled").sort((e, t) => `${e.date} ${e.time}`.localeCompare(`${t.date} ${t.time}`)), J = q.slice(0, 5), Y = s(() => [...R].sort((e, t) => e.isPinned === t.isPinned ? t.createdAt.localeCompare(e.createdAt) : e.isPinned ? -1 : 1), [R]), X = Y.slice(0, 4), Z = [...F].sort((e, t) => e.status === "pending" && t.status !== "pending" ? -1 : t.status === "pending" && e.status !== "pending" ? 1 : t.startDate.localeCompare(e.startDate)), { page: Me, pageSize: Q, offset: $, setPage: Ne } = he({ initialPageSize: 6 }), Pe = Z.slice($, $ + Q);
|
|
99
|
+
return /* @__PURE__ */ g("div", {
|
|
103
100
|
className: "space-y-6 p-6",
|
|
104
101
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ g("div", {
|
|
106
103
|
className: "relative overflow-hidden rounded-xl border border-border-seam bg-gloss-card p-6",
|
|
107
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ h(_, { intensity: "subtle" }), /* @__PURE__ */ g("div", {
|
|
108
105
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ g("div", { children: [
|
|
107
|
+
/* @__PURE__ */ h("h1", {
|
|
111
108
|
className: "text-2xl font-semibold",
|
|
112
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ h(de, { children: i("crewfoundry.dashboard.title", "Command Center") })
|
|
113
110
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ h("p", {
|
|
115
112
|
className: "text-sm text-text-secondary",
|
|
116
|
-
children:
|
|
113
|
+
children: i("crewfoundry.dashboard.subtitle", "Your workforce at a glance")
|
|
117
114
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ h(pe, {
|
|
119
116
|
className: "mt-2",
|
|
120
|
-
children:
|
|
117
|
+
children: i("crewfoundry.dashboard.purpose", "Your workforce command center — see headcount, hiring, performance, and projects at a glance, then jump straight to the area that needs your attention.")
|
|
121
118
|
})
|
|
122
|
-
] }), /* @__PURE__ */
|
|
119
|
+
] }), /* @__PURE__ */ g(oe, { children: [/* @__PURE__ */ h(ue, {
|
|
123
120
|
asChild: !0,
|
|
124
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ g(y, {
|
|
125
122
|
className: "self-start",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ h(f, { className: "mr-1 h-4 w-4" }), i("crewfoundry.dashboard.new", "New")]
|
|
127
124
|
})
|
|
128
|
-
}), /* @__PURE__ */
|
|
125
|
+
}), /* @__PURE__ */ g(se, {
|
|
129
126
|
align: "end",
|
|
130
127
|
className: "w-52",
|
|
131
128
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
onClick: () =>
|
|
136
|
-
children: [/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ h(ce, { children: i("crewfoundry.dashboard.newMenu", "Create") }),
|
|
130
|
+
/* @__PURE__ */ h(le, {}),
|
|
131
|
+
/* @__PURE__ */ g(w, {
|
|
132
|
+
onClick: () => k("../hr/employees-page"),
|
|
133
|
+
children: [/* @__PURE__ */ h(ae, { className: "mr-2 h-4 w-4" }), i("crewfoundry.dashboard.newEmployee", "Add employee")]
|
|
137
134
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
onClick: () =>
|
|
140
|
-
children: [/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ g(w, {
|
|
136
|
+
onClick: () => k("../hiring/create-job-page"),
|
|
137
|
+
children: [/* @__PURE__ */ h(u, { className: "mr-2 h-4 w-4" }), i("crewfoundry.dashboard.newJob", "Post a job")]
|
|
141
138
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
onClick: () =>
|
|
144
|
-
children: [/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ g(w, {
|
|
140
|
+
onClick: () => k("../projects/projects-page"),
|
|
141
|
+
children: [/* @__PURE__ */ h(re, { className: "mr-2 h-4 w-4" }), i("crewfoundry.dashboard.newProject", "New project")]
|
|
145
142
|
})
|
|
146
143
|
]
|
|
147
144
|
})] })]
|
|
148
145
|
})]
|
|
149
146
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ h(fe, {
|
|
151
148
|
storageKey: "crewfoundry-dashboard",
|
|
152
149
|
steps: [
|
|
153
150
|
{
|
|
154
151
|
id: "employees",
|
|
155
|
-
label:
|
|
156
|
-
description:
|
|
157
|
-
icon: /* @__PURE__ */ p
|
|
158
|
-
onClick: () =>
|
|
152
|
+
label: i("crewfoundry.dashboard.next.employees", "Review your team"),
|
|
153
|
+
description: i("crewfoundry.dashboard.next.employeesDesc", "Open the employee directory to see who is active and on leave."),
|
|
154
|
+
icon: /* @__PURE__ */ h(p, { className: "h-4 w-4" }),
|
|
155
|
+
onClick: () => k("../hr/employees-page")
|
|
159
156
|
},
|
|
160
157
|
{
|
|
161
158
|
id: "hiring",
|
|
162
|
-
label:
|
|
163
|
-
description:
|
|
164
|
-
icon: /* @__PURE__ */
|
|
165
|
-
onClick: () =>
|
|
159
|
+
label: i("crewfoundry.dashboard.next.hiring", "Post a new job"),
|
|
160
|
+
description: i("crewfoundry.dashboard.next.hiringDesc", "Create an opening to start collecting applicants."),
|
|
161
|
+
icon: /* @__PURE__ */ h(u, { className: "h-4 w-4" }),
|
|
162
|
+
onClick: () => k("../hiring/create-job-page")
|
|
166
163
|
},
|
|
167
164
|
{
|
|
168
165
|
id: "projects",
|
|
169
|
-
label:
|
|
170
|
-
description:
|
|
171
|
-
icon: /* @__PURE__ */
|
|
172
|
-
onClick: () =>
|
|
166
|
+
label: i("crewfoundry.dashboard.next.projects", "Check active projects"),
|
|
167
|
+
description: i("crewfoundry.dashboard.next.projectsDesc", "Track progress and budgets across in-flight work."),
|
|
168
|
+
icon: /* @__PURE__ */ h(l, { className: "h-4 w-4" }),
|
|
169
|
+
onClick: () => k("../projects/projects-page")
|
|
173
170
|
}
|
|
174
171
|
]
|
|
175
172
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ g("div", {
|
|
177
174
|
className: "grid gap-4 lg:grid-cols-12",
|
|
178
175
|
children: [
|
|
179
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ g("div", {
|
|
180
177
|
className: "grid gap-4 sm:grid-cols-2 lg:col-span-5",
|
|
181
178
|
children: [
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
label:
|
|
184
|
-
value:
|
|
185
|
-
delta:
|
|
186
|
-
deltaLabel:
|
|
187
|
-
icon: /* @__PURE__ */ p
|
|
188
|
-
sparkline:
|
|
179
|
+
/* @__PURE__ */ h(a, {
|
|
180
|
+
label: i("crewfoundry.dashboard.stats.totalEmployees", "Total Employees"),
|
|
181
|
+
value: M.length,
|
|
182
|
+
delta: ke || void 0,
|
|
183
|
+
deltaLabel: i("crewfoundry.dashboard.stats.fromLastMonth", "from last month"),
|
|
184
|
+
icon: /* @__PURE__ */ h(p, { className: "h-4 w-4" }),
|
|
185
|
+
sparkline: Oe,
|
|
189
186
|
sparklineVariant: "area"
|
|
190
187
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
label:
|
|
193
|
-
value:
|
|
194
|
-
delta:
|
|
195
|
-
deltaLabel:
|
|
196
|
-
icon: /* @__PURE__ */
|
|
197
|
-
sparkline:
|
|
188
|
+
/* @__PURE__ */ h(a, {
|
|
189
|
+
label: i("crewfoundry.dashboard.stats.openPositions", "Open Positions"),
|
|
190
|
+
value: we,
|
|
191
|
+
delta: D(W),
|
|
192
|
+
deltaLabel: i("crewfoundry.dashboard.stats.fromLastMonth", "from last month"),
|
|
193
|
+
icon: /* @__PURE__ */ h(u, { className: "h-4 w-4" }),
|
|
194
|
+
sparkline: W,
|
|
198
195
|
sparklineVariant: "area"
|
|
199
196
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
label:
|
|
202
|
-
value:
|
|
203
|
-
delta:
|
|
204
|
-
deltaLabel:
|
|
205
|
-
icon: /* @__PURE__ */
|
|
206
|
-
sparkline:
|
|
197
|
+
/* @__PURE__ */ h(a, {
|
|
198
|
+
label: i("crewfoundry.dashboard.stats.activeProjects", "Active Projects"),
|
|
199
|
+
value: Ee,
|
|
200
|
+
delta: D(G),
|
|
201
|
+
deltaLabel: i("crewfoundry.dashboard.stats.fromLastMonth", "from last month"),
|
|
202
|
+
icon: /* @__PURE__ */ h(l, { className: "h-4 w-4" }),
|
|
203
|
+
sparkline: G,
|
|
207
204
|
sparklineVariant: "area"
|
|
208
205
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
label:
|
|
211
|
-
value: `${
|
|
212
|
-
icon: /* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ h(a, {
|
|
207
|
+
label: i("crewfoundry.dashboard.stats.avgPerformance", "Avg Performance"),
|
|
208
|
+
value: `${De}`,
|
|
209
|
+
icon: /* @__PURE__ */ h(ie, { className: "h-4 w-4" })
|
|
213
210
|
})
|
|
214
211
|
]
|
|
215
212
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ g(b, {
|
|
217
214
|
className: "lg:col-span-4",
|
|
218
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ h(S, { children: /* @__PURE__ */ h(C, {
|
|
219
216
|
className: "text-base",
|
|
220
|
-
children:
|
|
221
|
-
}) }), /* @__PURE__ */
|
|
222
|
-
series:
|
|
217
|
+
children: i("crewfoundry.dashboard.headcountGrowth.title", "Headcount growth")
|
|
218
|
+
}) }), /* @__PURE__ */ h(x, { children: U.length > 1 ? /* @__PURE__ */ h(ee, {
|
|
219
|
+
series: U,
|
|
223
220
|
height: 210,
|
|
224
221
|
title: "Cumulative headcount by month"
|
|
225
|
-
}) : /* @__PURE__ */
|
|
222
|
+
}) : /* @__PURE__ */ h(T, {
|
|
226
223
|
illustration: "empty-data",
|
|
227
|
-
title:
|
|
228
|
-
description:
|
|
224
|
+
title: i("crewfoundry.dashboard.headcountGrowth.emptyTitle", "Not enough history"),
|
|
225
|
+
description: i("crewfoundry.dashboard.headcountGrowth.emptyDescription", "Headcount growth appears once employees span more than one hiring month.")
|
|
229
226
|
}) })]
|
|
230
227
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ g(b, {
|
|
232
229
|
className: "lg:col-span-3",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
230
|
+
children: [/* @__PURE__ */ h(S, {
|
|
234
231
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
235
|
-
children: /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ h(C, {
|
|
236
233
|
className: "text-base",
|
|
237
|
-
children:
|
|
234
|
+
children: i("crewfoundry.dashboard.upcomingInterviews.title", "Upcoming interviews")
|
|
238
235
|
})
|
|
239
|
-
}), /* @__PURE__ */
|
|
236
|
+
}), /* @__PURE__ */ g(x, {
|
|
240
237
|
className: "space-y-3",
|
|
241
238
|
children: [
|
|
242
|
-
|
|
239
|
+
J.length === 0 && /* @__PURE__ */ h(T, {
|
|
243
240
|
illustration: "empty-data",
|
|
244
|
-
title:
|
|
245
|
-
description:
|
|
241
|
+
title: i("crewfoundry.dashboard.upcomingInterviews.emptyTitle", "No interviews scheduled"),
|
|
242
|
+
description: i("crewfoundry.dashboard.upcomingInterviews.emptyDescription", "Scheduled interviews will appear here.")
|
|
246
243
|
}),
|
|
247
|
-
|
|
248
|
-
let t =
|
|
249
|
-
return /* @__PURE__ */
|
|
244
|
+
J.map((e) => {
|
|
245
|
+
let t = je.get(e.candidateName.trim().toLowerCase());
|
|
246
|
+
return /* @__PURE__ */ g("div", {
|
|
250
247
|
className: "flex items-center gap-3",
|
|
251
248
|
children: [
|
|
252
|
-
t ? /* @__PURE__ */
|
|
249
|
+
t ? /* @__PURE__ */ h("img", {
|
|
253
250
|
src: t,
|
|
254
251
|
alt: "",
|
|
255
252
|
className: "h-9 w-9 shrink-0 rounded-full object-cover"
|
|
256
|
-
}) : /* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */
|
|
253
|
+
}) : /* @__PURE__ */ h(O, { name: e.candidateName }),
|
|
254
|
+
/* @__PURE__ */ g("div", {
|
|
258
255
|
className: "min-w-0 flex-1",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ h("p", {
|
|
260
257
|
className: "truncate text-sm font-medium",
|
|
261
258
|
children: e.candidateName
|
|
262
|
-
}), /* @__PURE__ */
|
|
259
|
+
}), /* @__PURE__ */ h("p", {
|
|
263
260
|
className: "truncate text-xs text-text-secondary",
|
|
264
261
|
children: e.position
|
|
265
262
|
})]
|
|
266
263
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ g("div", {
|
|
268
265
|
className: "flex shrink-0 items-center gap-1.5 text-right",
|
|
269
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
270
267
|
className: "text-xs font-medium",
|
|
271
268
|
children: e.time
|
|
272
|
-
}), /* @__PURE__ */
|
|
269
|
+
}), /* @__PURE__ */ h("p", {
|
|
273
270
|
className: "text-[10px] text-text-secondary",
|
|
274
271
|
children: e.date
|
|
275
|
-
})] }), /* @__PURE__ */
|
|
272
|
+
})] }), /* @__PURE__ */ h(d, { className: "h-3.5 w-3.5 text-text-secondary" })]
|
|
276
273
|
})
|
|
277
274
|
]
|
|
278
275
|
}, e.id);
|
|
279
276
|
}),
|
|
280
|
-
|
|
277
|
+
q.length > J.length && /* @__PURE__ */ h(y, {
|
|
281
278
|
variant: "ghost",
|
|
282
279
|
size: "sm",
|
|
283
280
|
className: "w-full",
|
|
284
|
-
onClick: () =>
|
|
285
|
-
children:
|
|
281
|
+
onClick: () => k("../hiring/interviews-page"),
|
|
282
|
+
children: i("crewfoundry.dashboard.upcomingInterviews.viewAll", "View All")
|
|
286
283
|
})
|
|
287
284
|
]
|
|
288
285
|
})]
|
|
289
286
|
})
|
|
290
287
|
]
|
|
291
288
|
}),
|
|
292
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ g("div", {
|
|
293
290
|
className: "grid gap-4 lg:grid-cols-12",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ g(b, {
|
|
295
292
|
className: "lg:col-span-8",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ h(S, { children: /* @__PURE__ */ h(C, {
|
|
297
294
|
className: "text-base",
|
|
298
|
-
children:
|
|
299
|
-
}) }), /* @__PURE__ */
|
|
300
|
-
stages:
|
|
295
|
+
children: i("crewfoundry.dashboard.pipeline.title", "Hiring pipeline")
|
|
296
|
+
}) }), /* @__PURE__ */ h(x, { children: L.length > 0 ? /* @__PURE__ */ h(te, {
|
|
297
|
+
stages: Ae,
|
|
301
298
|
valueFormatter: (e) => `${e}`
|
|
302
|
-
}) : /* @__PURE__ */
|
|
299
|
+
}) : /* @__PURE__ */ h(T, {
|
|
303
300
|
illustration: "empty-data",
|
|
304
|
-
title:
|
|
305
|
-
description:
|
|
301
|
+
title: i("crewfoundry.dashboard.pipeline.emptyTitle", "No candidates yet"),
|
|
302
|
+
description: i("crewfoundry.dashboard.pipeline.emptyDescription", "Your hiring funnel appears here once candidates enter the pipeline.")
|
|
306
303
|
}) })]
|
|
307
|
-
}), /* @__PURE__ */
|
|
304
|
+
}), /* @__PURE__ */ g(b, {
|
|
308
305
|
className: "lg:col-span-4",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ g(S, {
|
|
310
307
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ h(C, {
|
|
312
309
|
className: "text-base",
|
|
313
|
-
children:
|
|
314
|
-
}),
|
|
310
|
+
children: i("crewfoundry.dashboard.announcements.title", "Announcements")
|
|
311
|
+
}), Y.length > X.length && /* @__PURE__ */ h(y, {
|
|
315
312
|
variant: "ghost",
|
|
316
313
|
size: "sm",
|
|
317
|
-
onClick: () =>
|
|
318
|
-
children:
|
|
314
|
+
onClick: () => k("../communications/announcements-page"),
|
|
315
|
+
children: i("crewfoundry.dashboard.announcements.viewAll", "View All")
|
|
319
316
|
})]
|
|
320
|
-
}), /* @__PURE__ */
|
|
317
|
+
}), /* @__PURE__ */ g(x, {
|
|
321
318
|
className: "space-y-4",
|
|
322
|
-
children: [
|
|
319
|
+
children: [X.length === 0 && /* @__PURE__ */ h(T, {
|
|
323
320
|
illustration: "empty-data",
|
|
324
|
-
title:
|
|
325
|
-
description:
|
|
326
|
-
}),
|
|
327
|
-
let t =
|
|
328
|
-
return /* @__PURE__ */
|
|
321
|
+
title: i("crewfoundry.dashboard.announcements.emptyTitle", "No announcements"),
|
|
322
|
+
description: i("crewfoundry.dashboard.announcements.emptyDescription", "Company announcements will appear here.")
|
|
323
|
+
}), X.map((e) => {
|
|
324
|
+
let t = ye[e.id], n = e.content.length > 120;
|
|
325
|
+
return /* @__PURE__ */ g("div", {
|
|
329
326
|
className: "space-y-1",
|
|
330
327
|
children: [
|
|
331
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ g("div", {
|
|
332
329
|
className: "flex items-center gap-2",
|
|
333
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ h("p", {
|
|
334
331
|
className: "text-sm font-medium",
|
|
335
332
|
children: e.title
|
|
336
|
-
}), e.isPinned && /* @__PURE__ */
|
|
333
|
+
}), e.isPinned && /* @__PURE__ */ h(v, {
|
|
337
334
|
variant: "outline",
|
|
338
335
|
className: "text-[10px]",
|
|
339
|
-
children:
|
|
336
|
+
children: i("crewfoundry.dashboard.announcements.pinned", "Pinned")
|
|
340
337
|
})]
|
|
341
338
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ g("p", {
|
|
343
340
|
className: "text-xs text-text-secondary",
|
|
344
341
|
children: [
|
|
345
342
|
e.createdAt,
|
|
@@ -347,18 +344,18 @@ function O() {
|
|
|
347
344
|
e.author
|
|
348
345
|
]
|
|
349
346
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ h("p", {
|
|
351
348
|
className: "text-sm text-text-secondary",
|
|
352
349
|
children: t || !n ? e.content : `${e.content.slice(0, 120)}…`
|
|
353
350
|
}),
|
|
354
|
-
n && /* @__PURE__ */
|
|
351
|
+
n && /* @__PURE__ */ h("button", {
|
|
355
352
|
type: "button",
|
|
356
353
|
className: "text-xs font-medium text-action-primary-bg hover:underline",
|
|
357
|
-
onClick: () =>
|
|
354
|
+
onClick: () => be((t) => ({
|
|
358
355
|
...t,
|
|
359
356
|
[e.id]: !t[e.id]
|
|
360
357
|
})),
|
|
361
|
-
children: t ?
|
|
358
|
+
children: t ? i("crewfoundry.dashboard.announcements.readLess", "Read Less") : i("crewfoundry.dashboard.announcements.readMore", "Read More")
|
|
362
359
|
})
|
|
363
360
|
]
|
|
364
361
|
}, e.id);
|
|
@@ -366,98 +363,98 @@ function O() {
|
|
|
366
363
|
})]
|
|
367
364
|
})]
|
|
368
365
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ g(b, { children: [/* @__PURE__ */ h(S, { children: /* @__PURE__ */ h(C, {
|
|
370
367
|
className: "text-base",
|
|
371
|
-
children:
|
|
372
|
-
}) }), /* @__PURE__ */
|
|
368
|
+
children: i("crewfoundry.dashboard.leaveRequests.title", "Recent Leave Requests")
|
|
369
|
+
}) }), /* @__PURE__ */ g(x, {
|
|
373
370
|
className: "space-y-3",
|
|
374
371
|
children: [
|
|
375
|
-
|
|
372
|
+
F.length === 0 && /* @__PURE__ */ h(T, {
|
|
376
373
|
illustration: "empty-data",
|
|
377
|
-
title:
|
|
378
|
-
description:
|
|
374
|
+
title: i("crewfoundry.dashboard.leaveRequests.emptyTitle", "No leave requests"),
|
|
375
|
+
description: i("crewfoundry.dashboard.leaveRequests.emptyDescription", "Pending leave requests will appear here.")
|
|
379
376
|
}),
|
|
380
|
-
|
|
377
|
+
Pe.map((e) => /* @__PURE__ */ g("div", {
|
|
381
378
|
className: "flex items-center justify-between rounded border p-3",
|
|
382
|
-
children: [/* @__PURE__ */
|
|
379
|
+
children: [/* @__PURE__ */ g("div", {
|
|
383
380
|
className: "flex items-center gap-3",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ h(O, {
|
|
385
382
|
name: e.employeeName,
|
|
386
383
|
size: 34
|
|
387
|
-
}), /* @__PURE__ */
|
|
384
|
+
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
388
385
|
className: "text-sm font-medium",
|
|
389
386
|
children: e.employeeName
|
|
390
|
-
}), /* @__PURE__ */
|
|
387
|
+
}), /* @__PURE__ */ g("div", {
|
|
391
388
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
392
|
-
children: [/* @__PURE__ */
|
|
389
|
+
children: [/* @__PURE__ */ h(d, { className: "h-3 w-3" }), /* @__PURE__ */ g("span", { children: [
|
|
393
390
|
e.startDate,
|
|
394
391
|
" - ",
|
|
395
392
|
e.endDate
|
|
396
393
|
] })]
|
|
397
394
|
})] })]
|
|
398
|
-
}), /* @__PURE__ */
|
|
395
|
+
}), /* @__PURE__ */ g("div", {
|
|
399
396
|
className: "flex items-center gap-2",
|
|
400
397
|
children: [
|
|
401
|
-
e.status === "pending" && /* @__PURE__ */
|
|
398
|
+
e.status === "pending" && /* @__PURE__ */ g("div", {
|
|
402
399
|
className: "flex gap-1",
|
|
403
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ h(y, {
|
|
404
401
|
size: "sm",
|
|
405
402
|
variant: "outline",
|
|
406
403
|
className: "h-7 text-xs",
|
|
407
|
-
disabled:
|
|
408
|
-
onClick: () => void
|
|
409
|
-
children:
|
|
410
|
-
}), /* @__PURE__ */
|
|
404
|
+
disabled: z === e.id,
|
|
405
|
+
onClick: () => void V(e.id, "rejected"),
|
|
406
|
+
children: i("crewfoundry.dashboard.leaveRequests.reject", "Reject")
|
|
407
|
+
}), /* @__PURE__ */ h(y, {
|
|
411
408
|
size: "sm",
|
|
412
409
|
className: "h-7 text-xs",
|
|
413
|
-
disabled:
|
|
414
|
-
onClick: () => void
|
|
415
|
-
children:
|
|
410
|
+
disabled: z === e.id,
|
|
411
|
+
onClick: () => void V(e.id, "approved"),
|
|
412
|
+
children: i("crewfoundry.dashboard.leaveRequests.approve", "Approve")
|
|
416
413
|
})]
|
|
417
414
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ h(v, {
|
|
419
416
|
variant: e.status === "approved" ? "default" : e.status === "pending" ? "secondary" : "destructive",
|
|
420
417
|
children: n(e.status)
|
|
421
418
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ h(v, {
|
|
423
420
|
variant: "outline",
|
|
424
421
|
children: n(e.type)
|
|
425
422
|
})
|
|
426
423
|
]
|
|
427
424
|
})]
|
|
428
425
|
}, e.id)),
|
|
429
|
-
|
|
430
|
-
page:
|
|
426
|
+
Z.length > Q && /* @__PURE__ */ h(me, {
|
|
427
|
+
page: Me,
|
|
431
428
|
pageSize: Q,
|
|
432
|
-
totalItems:
|
|
433
|
-
onPageChange:
|
|
429
|
+
totalItems: Z.length,
|
|
430
|
+
onPageChange: Ne
|
|
434
431
|
})
|
|
435
432
|
]
|
|
436
433
|
})] }),
|
|
437
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ g("p", {
|
|
438
435
|
className: "text-center text-xs text-text-muted",
|
|
439
436
|
children: [
|
|
440
|
-
|
|
437
|
+
Se,
|
|
441
438
|
" ",
|
|
442
|
-
|
|
439
|
+
i("crewfoundry.dashboard.stats.active", "active"),
|
|
443
440
|
" · ",
|
|
444
|
-
|
|
441
|
+
Ce,
|
|
445
442
|
" ",
|
|
446
|
-
|
|
443
|
+
i("crewfoundry.dashboard.stats.onLeave", "on leave"),
|
|
447
444
|
" · ",
|
|
448
|
-
|
|
445
|
+
Te,
|
|
449
446
|
" ",
|
|
450
|
-
|
|
447
|
+
i("crewfoundry.dashboard.stats.totalApplicants", "total applicants"),
|
|
451
448
|
" · ",
|
|
452
|
-
|
|
449
|
+
H,
|
|
453
450
|
" ",
|
|
454
|
-
|
|
451
|
+
i("crewfoundry.dashboard.stats.pendingLeaveRequests", "pending leave requests")
|
|
455
452
|
]
|
|
456
453
|
})
|
|
457
454
|
]
|
|
458
455
|
});
|
|
459
456
|
}
|
|
460
457
|
//#endregion
|
|
461
|
-
export {
|
|
458
|
+
export { k as DashboardDashboardPagePage };
|
|
462
459
|
|
|
463
460
|
//# sourceMappingURL=DashboardDashboardPagePage.js.map
|