@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.
- 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 +111 -110
- 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/HiringCreateJobPagePage.js +1 -1
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.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 +129 -127
- 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/LearningAssessmentsPagePage.js +1 -1
- package/dist/crewfoundry/pages/LearningAssessmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.js +1 -1
- package/dist/crewfoundry/pages/LearningCertificatesPagePage.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/MarketplaceFreelancerProfilePagePage.js +2 -2
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.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/MarketplaceServiceDetailsPagePage.js +4 -4
- package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.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/ProjectsCreateProjectPagePage.js +1 -1
- package/dist/crewfoundry/pages/ProjectsCreateProjectPagePage.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 +134 -133
- 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,109 +1,110 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { formatEnumLabel as t } from "../utils/formatEnumLabel.js";
|
|
3
|
+
import { useState as n } from "react";
|
|
4
|
+
import { Briefcase as r, MapPin as i, Plus as a, Search as o, Users as s } from "lucide-react";
|
|
5
|
+
import { useNavigate as c } from "react-router-dom";
|
|
6
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
+
import { Badge as d, Button as f, CardContent as p, CardDescription as m, CardHeader as h, CardTitle as g, GlassCard as _, GradientText as v, IllustratedEmptyState as y, Input as b, PagePurpose as x, Pagination as S } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { usePagination as C } from "@burdenoff/fe-libs/shared/hooks";
|
|
9
|
+
import { useI18n as w } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
10
|
//#region src/crewfoundry/pages/HiringJobsPagePage.tsx
|
|
10
|
-
function
|
|
11
|
-
let { t:
|
|
12
|
-
let n =
|
|
11
|
+
function T() {
|
|
12
|
+
let { t: T } = w(), E = c(), { jobPostings: D } = e(), [O, k] = n(""), { page: A, pageSize: j, offset: M, setPage: N } = C({ initialPageSize: 12 }), P = (e, t) => {
|
|
13
|
+
let n = T(e);
|
|
13
14
|
return n === e ? t : n;
|
|
14
|
-
},
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
}, F = D.filter((e) => `${e.title} ${e.department} ${e.location}`.toLowerCase().includes(O.toLowerCase())), I = F.slice(M, M + j), L = (e) => E(`../hiring/job-details-page?id=${encodeURIComponent(e)}`), R = D.filter((e) => e.status === "active").length, z = D.reduce((e, t) => e + t.applicants, 0);
|
|
16
|
+
return /* @__PURE__ */ u("div", {
|
|
16
17
|
className: "space-y-6 p-6",
|
|
17
18
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ u("div", {
|
|
19
20
|
className: "flex items-center justify-between",
|
|
20
|
-
children: [/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
21
|
+
children: [/* @__PURE__ */ u("div", { children: [
|
|
22
|
+
/* @__PURE__ */ l("h1", {
|
|
22
23
|
className: "text-2xl font-semibold",
|
|
23
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ l(v, { children: P("crewfoundry.hiringJobs.title", "Job Postings") })
|
|
24
25
|
}),
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ u("p", {
|
|
26
27
|
className: "text-sm text-text-secondary",
|
|
27
28
|
children: [
|
|
28
|
-
|
|
29
|
+
R,
|
|
29
30
|
" ",
|
|
30
|
-
|
|
31
|
+
P("crewfoundry.hiringJobs.summary.activePositions", "active positions"),
|
|
31
32
|
" ·",
|
|
32
33
|
" ",
|
|
33
|
-
|
|
34
|
+
z,
|
|
34
35
|
" ",
|
|
35
|
-
|
|
36
|
+
P("crewfoundry.hiringJobs.summary.totalApplicants", "total applicants")
|
|
36
37
|
]
|
|
37
38
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ l(x, {
|
|
39
40
|
className: "mt-1",
|
|
40
41
|
children: "All your open and past job postings in one place — use it to monitor applicant volume and manage what roles you're actively hiring for."
|
|
41
42
|
})
|
|
42
|
-
] }), /* @__PURE__ */
|
|
43
|
+
] }), /* @__PURE__ */ u(f, {
|
|
43
44
|
size: "sm",
|
|
44
|
-
onClick: () =>
|
|
45
|
-
children: [/* @__PURE__ */
|
|
45
|
+
onClick: () => E("../hiring/create-job-page"),
|
|
46
|
+
children: [/* @__PURE__ */ l(a, { className: "h-4 w-4 mr-1" }), P("crewfoundry.hiringJobs.actions.postNewJob", "Post New Job")]
|
|
46
47
|
})]
|
|
47
48
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ u("div", {
|
|
49
50
|
className: "relative max-w-sm",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
51
|
-
placeholder:
|
|
51
|
+
children: [/* @__PURE__ */ l(o, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ l(b, {
|
|
52
|
+
placeholder: P("crewfoundry.hiringJobs.searchPlaceholder", "Search positions..."),
|
|
52
53
|
className: "pl-9",
|
|
53
|
-
value:
|
|
54
|
+
value: O,
|
|
54
55
|
onChange: (e) => {
|
|
55
|
-
|
|
56
|
+
k(e.target.value), N(1);
|
|
56
57
|
}
|
|
57
58
|
})]
|
|
58
59
|
}),
|
|
59
|
-
|
|
60
|
+
F.length === 0 && /* @__PURE__ */ l(y, {
|
|
60
61
|
illustration: "empty-search",
|
|
61
62
|
title: "No job postings found",
|
|
62
63
|
description: "Try adjusting your search, or create a new job posting."
|
|
63
64
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ l("div", {
|
|
65
66
|
className: "grid gap-4 md:grid-cols-2",
|
|
66
|
-
children:
|
|
67
|
-
treatment:
|
|
68
|
-
glow:
|
|
67
|
+
children: I.map((e, n) => /* @__PURE__ */ u(_, {
|
|
68
|
+
treatment: n === 0 ? "glass" : "plain",
|
|
69
|
+
glow: n === 0,
|
|
69
70
|
role: "button",
|
|
70
71
|
tabIndex: 0,
|
|
71
72
|
"aria-label": `View ${e.title}`,
|
|
72
73
|
className: "cursor-pointer transition-shadow hover:shadow-elevation-2 focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus)]",
|
|
73
|
-
onClick: () =>
|
|
74
|
+
onClick: () => L(e.id),
|
|
74
75
|
onKeyDown: (t) => {
|
|
75
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
76
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), L(e.id));
|
|
76
77
|
},
|
|
77
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ u(h, { children: [/* @__PURE__ */ u("div", {
|
|
78
79
|
className: "flex items-center justify-between",
|
|
79
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ l(g, {
|
|
80
81
|
className: "text-lg",
|
|
81
82
|
children: e.title
|
|
82
|
-
}), /* @__PURE__ */
|
|
83
|
+
}), /* @__PURE__ */ l(d, {
|
|
83
84
|
variant: e.status === "active" ? "default" : e.status === "paused" ? "secondary" : "outline",
|
|
84
|
-
children: e.status
|
|
85
|
+
children: t(e.status)
|
|
85
86
|
})]
|
|
86
|
-
}), /* @__PURE__ */
|
|
87
|
+
}), /* @__PURE__ */ l(m, { children: e.description })] }), /* @__PURE__ */ u(p, { children: [/* @__PURE__ */ u("div", {
|
|
87
88
|
className: "grid grid-cols-2 gap-3 mb-3",
|
|
88
89
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ u("div", {
|
|
90
91
|
className: "flex items-center gap-1 text-sm text-text-secondary",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ l(r, { className: "h-3 w-3" }), e.department]
|
|
92
93
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ u("div", {
|
|
94
95
|
className: "flex items-center gap-1 text-sm text-text-secondary",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ l(i, { className: "h-3 w-3" }), e.location]
|
|
96
97
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ u("div", {
|
|
98
99
|
className: "flex items-center gap-1 text-sm text-text-secondary",
|
|
99
100
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ l(s, { className: "h-3 w-3" }),
|
|
101
102
|
e.applicants,
|
|
102
103
|
" ",
|
|
103
|
-
|
|
104
|
+
P("crewfoundry.hiringJobs.card.applicants", "applicants")
|
|
104
105
|
]
|
|
105
106
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ u("div", {
|
|
107
108
|
className: "text-sm text-text-secondary",
|
|
108
109
|
children: [
|
|
109
110
|
"$",
|
|
@@ -114,37 +115,37 @@ function w() {
|
|
|
114
115
|
]
|
|
115
116
|
})
|
|
116
117
|
]
|
|
117
|
-
}), /* @__PURE__ */
|
|
118
|
+
}), /* @__PURE__ */ u("div", {
|
|
118
119
|
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ u("div", {
|
|
120
121
|
className: "flex gap-1",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ l(d, {
|
|
122
123
|
variant: "outline",
|
|
123
124
|
className: "text-[10px]",
|
|
124
125
|
children: e.type.replace("_", " ")
|
|
125
|
-
}), /* @__PURE__ */
|
|
126
|
+
}), /* @__PURE__ */ l(d, {
|
|
126
127
|
variant: "outline",
|
|
127
128
|
className: "text-[10px]",
|
|
128
|
-
children: e.experienceLevel
|
|
129
|
+
children: t(e.experienceLevel)
|
|
129
130
|
})]
|
|
130
|
-
}), /* @__PURE__ */
|
|
131
|
-
|
|
131
|
+
}), /* @__PURE__ */ u("span", { children: [
|
|
132
|
+
P("crewfoundry.hiringJobs.card.deadline", "Deadline"),
|
|
132
133
|
": ",
|
|
133
134
|
e.deadline
|
|
134
135
|
] })]
|
|
135
136
|
})] })]
|
|
136
137
|
}, e.id))
|
|
137
138
|
}),
|
|
138
|
-
|
|
139
|
-
page:
|
|
140
|
-
pageSize:
|
|
141
|
-
totalItems:
|
|
142
|
-
onPageChange:
|
|
139
|
+
F.length > j && /* @__PURE__ */ l(S, {
|
|
140
|
+
page: A,
|
|
141
|
+
pageSize: j,
|
|
142
|
+
totalItems: F.length,
|
|
143
|
+
onPageChange: N
|
|
143
144
|
})
|
|
144
145
|
]
|
|
145
146
|
});
|
|
146
147
|
}
|
|
147
148
|
//#endregion
|
|
148
|
-
export {
|
|
149
|
+
export { T as HiringJobsPagePage };
|
|
149
150
|
|
|
150
151
|
//# sourceMappingURL=HiringJobsPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiringJobsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HiringJobsPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Badge,\n Button,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n Pagination,\n} from '@burdenoff/fe-libs/ui';\nimport { usePagination } from '@burdenoff/fe-libs/shared/hooks';\nimport { Briefcase, MapPin, Plus, Search, Users } from 'lucide-react';\nimport { useNavigate } from 'react-router-dom';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\n\nexport function HiringJobsPagePage() {\n const { t: translate } = useI18n();\n const navigate = useNavigate();\n const { jobPostings } = useCrewFoundryStore();\n const [search, setSearch] = useState('');\n const { page, pageSize, offset, setPage } = usePagination({ initialPageSize: 12 });\n const t = (key: string, fallback: string) => {\n const value = translate(key);\n return value === key ? fallback : value;\n };\n\n const filtered = jobPostings.filter((j) =>\n `${j.title} ${j.department} ${j.location}`.toLowerCase().includes(search.toLowerCase())\n );\n const paged = filtered.slice(offset, offset + pageSize);\n const openJob = (id: string) =>\n navigate(
|
|
1
|
+
{"version":3,"file":"HiringJobsPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/HiringJobsPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Badge,\n Button,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n Pagination,\n} from '@burdenoff/fe-libs/ui';\nimport { usePagination } from '@burdenoff/fe-libs/shared/hooks';\nimport { Briefcase, MapPin, Plus, Search, Users } from 'lucide-react';\nimport { useNavigate } from 'react-router-dom';\nimport { useCrewFoundryStore } from '../store/crewfoundryStore';\nimport { formatEnumLabel } from '../utils/formatEnumLabel';\n\nexport function HiringJobsPagePage() {\n const { t: translate } = useI18n();\n const navigate = useNavigate();\n const { jobPostings } = useCrewFoundryStore();\n const [search, setSearch] = useState('');\n const { page, pageSize, offset, setPage } = usePagination({ initialPageSize: 12 });\n const t = (key: string, fallback: string) => {\n const value = translate(key);\n return value === key ? fallback : value;\n };\n\n const filtered = jobPostings.filter((j) =>\n `${j.title} ${j.department} ${j.location}`.toLowerCase().includes(search.toLowerCase())\n );\n const paged = filtered.slice(offset, offset + pageSize);\n const openJob = (id: string) =>\n navigate(`../hiring/job-details-page?id=${encodeURIComponent(id)}`);\n const activeJobs = jobPostings.filter((j) => j.status === 'active').length;\n const totalApplicants = jobPostings.reduce((s, j) => s + j.applicants, 0);\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>{t('crewfoundry.hiringJobs.title', 'Job Postings')}</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {activeJobs} {t('crewfoundry.hiringJobs.summary.activePositions', 'active positions')} ·{' '}\n {totalApplicants}{' '}\n {t('crewfoundry.hiringJobs.summary.totalApplicants', 'total applicants')}\n </p>\n <PagePurpose className=\"mt-1\">\n All your open and past job postings in one place — use it to monitor applicant volume\n and manage what roles you're actively hiring for.\n </PagePurpose>\n </div>\n <Button size=\"sm\" onClick={() => navigate('../hiring/create-job-page')}>\n <Plus className=\"h-4 w-4 mr-1\" />\n {t('crewfoundry.hiringJobs.actions.postNewJob', 'Post New Job')}\n </Button>\n </div>\n\n <div className=\"relative max-w-sm\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary\" />\n <Input\n placeholder={t('crewfoundry.hiringJobs.searchPlaceholder', 'Search positions...')}\n className=\"pl-9\"\n value={search}\n onChange={(e) => {\n setSearch(e.target.value);\n setPage(1);\n }}\n />\n </div>\n\n {filtered.length === 0 && (\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"No job postings found\"\n description=\"Try adjusting your search, or create a new job posting.\"\n />\n )}\n\n <div className=\"grid gap-4 md:grid-cols-2\">\n {paged.map((job, _idx) => (\n <GlassCard\n key={job.id}\n treatment={_idx === 0 ? 'glass' : 'plain'}\n glow={_idx === 0}\n role=\"button\"\n tabIndex={0}\n aria-label={`View ${job.title}`}\n className=\"cursor-pointer transition-shadow hover:shadow-elevation-2 focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus)]\"\n onClick={() => openJob(job.id)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n openJob(job.id);\n }\n }}\n >\n <CardHeader>\n <div className=\"flex items-center justify-between\">\n <CardTitle className=\"text-lg\">{job.title}</CardTitle>\n <Badge\n variant={\n job.status === 'active'\n ? 'default'\n : job.status === 'paused'\n ? 'secondary'\n : 'outline'\n }\n >\n {formatEnumLabel(job.status)}\n </Badge>\n </div>\n <CardDescription>{job.description}</CardDescription>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-2 gap-3 mb-3\">\n <div className=\"flex items-center gap-1 text-sm text-text-secondary\">\n <Briefcase className=\"h-3 w-3\" />\n {job.department}\n </div>\n <div className=\"flex items-center gap-1 text-sm text-text-secondary\">\n <MapPin className=\"h-3 w-3\" />\n {job.location}\n </div>\n <div className=\"flex items-center gap-1 text-sm text-text-secondary\">\n <Users className=\"h-3 w-3\" />\n {job.applicants} {t('crewfoundry.hiringJobs.card.applicants', 'applicants')}\n </div>\n <div className=\"text-sm text-text-secondary\">\n ${(job.salaryMin / 1000).toFixed(0)}K — ${(job.salaryMax / 1000).toFixed(0)}K\n </div>\n </div>\n <div className=\"flex items-center justify-between text-xs text-text-secondary\">\n <div className=\"flex gap-1\">\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {job.type.replace('_', ' ')}\n </Badge>\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {formatEnumLabel(job.experienceLevel)}\n </Badge>\n </div>\n <span>\n {t('crewfoundry.hiringJobs.card.deadline', 'Deadline')}: {job.deadline}\n </span>\n </div>\n </CardContent>\n </GlassCard>\n ))}\n </div>\n\n {filtered.length > pageSize && (\n <Pagination\n page={page}\n pageSize={pageSize}\n totalItems={filtered.length}\n onPageChange={setPage}\n />\n )}\n </div>\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { formatEnumLabel as t } from "../utils/formatEnumLabel.js";
|
|
3
|
+
import { FormModal as n, useFormModal as r } from "../components/forms/FormModal.js";
|
|
4
|
+
import { ConfirmDialog as i } from "../components/forms/ConfirmDialog.js";
|
|
5
|
+
import { getNumber as a, getText as o, newClientId as s } from "../components/forms/formValues.js";
|
|
6
|
+
import { useState as c } from "react";
|
|
7
|
+
import { Building2 as l, DollarSign as u, MapPin as d, Pencil as f, Plus as p, Trash2 as m, Users as h } from "lucide-react";
|
|
8
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
9
|
+
import { Badge as v, Button as y, Card as b, CardContent as x, CardDescription as S, CardHeader as C, CardTitle as w, GlassCard as T, GradientText as E, PagePurpose as D, Separator as O } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/crewfoundry/pages/HrDepartmentsPagePage.tsx
|
|
10
|
-
var
|
|
11
|
+
var k = [
|
|
11
12
|
{
|
|
12
13
|
name: "name",
|
|
13
14
|
label: "Department name",
|
|
@@ -46,150 +47,150 @@ var O = [
|
|
|
46
47
|
value: "restructuring"
|
|
47
48
|
}]
|
|
48
49
|
}
|
|
49
|
-
],
|
|
50
|
+
], A = (e) => ({
|
|
50
51
|
name: e.name,
|
|
51
52
|
headName: e.headName,
|
|
52
53
|
location: e.location,
|
|
53
54
|
budget: e.budget,
|
|
54
55
|
status: e.status
|
|
55
56
|
});
|
|
56
|
-
function
|
|
57
|
-
let { departments:
|
|
58
|
-
return /* @__PURE__ */
|
|
57
|
+
function j() {
|
|
58
|
+
let { departments: j, employees: M, addDepartment: N, updateDepartment: P, removeDepartment: F } = e(), I = r(), [L, R] = c(null), z = j.reduce((e, t) => e + t.budget, 0), B = j.reduce((e, t) => e + t.employeeCount, 0), V = I.context;
|
|
59
|
+
return /* @__PURE__ */ _("div", {
|
|
59
60
|
className: "space-y-6 p-6",
|
|
60
61
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ _("div", {
|
|
62
63
|
className: "flex items-center justify-between",
|
|
63
|
-
children: [/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ _("div", { children: [
|
|
65
|
+
/* @__PURE__ */ g("h1", {
|
|
65
66
|
className: "text-2xl font-semibold",
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ g(E, { children: "Departments" })
|
|
67
68
|
}),
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ g("p", {
|
|
69
70
|
className: "text-sm text-text-secondary",
|
|
70
71
|
children: "Organizational structure and department management"
|
|
71
72
|
}),
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ g(D, {
|
|
73
74
|
className: "mt-1",
|
|
74
75
|
children: "Organize your company into departments — set up structure, assign heads, and see how headcount is distributed across the org."
|
|
75
76
|
})
|
|
76
|
-
] }), /* @__PURE__ */
|
|
77
|
+
] }), /* @__PURE__ */ _(y, {
|
|
77
78
|
size: "sm",
|
|
78
|
-
onClick: () =>
|
|
79
|
-
children: [/* @__PURE__ */
|
|
79
|
+
onClick: () => I.openModal(),
|
|
80
|
+
children: [/* @__PURE__ */ g(p, { className: "h-4 w-4 mr-1" }), "Add Department"]
|
|
80
81
|
})]
|
|
81
82
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ _("div", {
|
|
83
84
|
className: "grid gap-4 md:grid-cols-3",
|
|
84
85
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ _(T, {
|
|
86
87
|
treatment: "glass",
|
|
87
88
|
glow: !0,
|
|
88
89
|
className: "border-border-seam",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ _(C, {
|
|
90
91
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ g(w, {
|
|
92
93
|
className: "text-sm font-medium",
|
|
93
94
|
children: "Total Departments"
|
|
94
|
-
}), /* @__PURE__ */
|
|
95
|
-
}), /* @__PURE__ */
|
|
95
|
+
}), /* @__PURE__ */ g(l, { className: "h-4 w-4 text-text-secondary" })]
|
|
96
|
+
}), /* @__PURE__ */ g(x, { children: /* @__PURE__ */ g("div", {
|
|
96
97
|
className: "text-2xl font-bold tabular-nums",
|
|
97
|
-
children:
|
|
98
|
+
children: j.length
|
|
98
99
|
}) })]
|
|
99
100
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ _(T, {
|
|
101
102
|
treatment: "metric",
|
|
102
103
|
className: "border-border-seam",
|
|
103
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ _(C, {
|
|
104
105
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ g(w, {
|
|
106
107
|
className: "text-sm font-medium",
|
|
107
108
|
children: "Total Headcount"
|
|
108
|
-
}), /* @__PURE__ */ h
|
|
109
|
-
}), /* @__PURE__ */
|
|
109
|
+
}), /* @__PURE__ */ g(h, { className: "h-4 w-4 text-text-secondary" })]
|
|
110
|
+
}), /* @__PURE__ */ g(x, { children: /* @__PURE__ */ g("div", {
|
|
110
111
|
className: "text-2xl font-bold tabular-nums",
|
|
111
|
-
children:
|
|
112
|
+
children: B
|
|
112
113
|
}) })]
|
|
113
114
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ _(T, {
|
|
115
116
|
treatment: "metric",
|
|
116
117
|
className: "border-border-seam",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ _(C, {
|
|
118
119
|
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ g(w, {
|
|
120
121
|
className: "text-sm font-medium",
|
|
121
122
|
children: "Total Budget"
|
|
122
|
-
}), /* @__PURE__ */
|
|
123
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ g(u, { className: "h-4 w-4 text-text-secondary" })]
|
|
124
|
+
}), /* @__PURE__ */ g(x, { children: /* @__PURE__ */ _("div", {
|
|
124
125
|
className: "text-2xl font-bold tabular-nums",
|
|
125
126
|
children: [
|
|
126
127
|
"$",
|
|
127
|
-
(
|
|
128
|
+
(z / 1e6).toFixed(1),
|
|
128
129
|
"M"
|
|
129
130
|
]
|
|
130
131
|
}) })]
|
|
131
132
|
})
|
|
132
133
|
]
|
|
133
134
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ g("div", {
|
|
135
136
|
className: "grid gap-4 md:grid-cols-2",
|
|
136
|
-
children:
|
|
137
|
-
let
|
|
138
|
-
return /* @__PURE__ */
|
|
137
|
+
children: j.map((e) => {
|
|
138
|
+
let n = M.filter((t) => t.department === e.name), r = n.length > 0 ? Math.round(n.reduce((e, t) => e + t.salary, 0) / n.length) : 0, i = n.length > 0 ? (n.reduce((e, t) => e + t.performanceScore, 0) / n.length).toFixed(1) : "0";
|
|
139
|
+
return /* @__PURE__ */ _(b, { children: [/* @__PURE__ */ _(C, { children: [/* @__PURE__ */ _("div", {
|
|
139
140
|
className: "flex items-center justify-between",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ g(w, {
|
|
141
142
|
className: "text-lg",
|
|
142
143
|
children: e.name
|
|
143
|
-
}), /* @__PURE__ */
|
|
144
|
+
}), /* @__PURE__ */ _("div", {
|
|
144
145
|
className: "flex items-center gap-1",
|
|
145
146
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ g(v, {
|
|
147
148
|
variant: e.status === "active" ? "default" : "secondary",
|
|
148
|
-
children: e.status
|
|
149
|
+
children: t(e.status)
|
|
149
150
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ g(y, {
|
|
151
152
|
variant: "ghost",
|
|
152
153
|
size: "sm",
|
|
153
154
|
className: "h-8 w-8 p-0",
|
|
154
155
|
"aria-label": `Edit ${e.name}`,
|
|
155
|
-
onClick: () =>
|
|
156
|
-
children: /* @__PURE__ */
|
|
156
|
+
onClick: () => I.openModal(e),
|
|
157
|
+
children: /* @__PURE__ */ g(f, { className: "h-4 w-4" })
|
|
157
158
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ g(y, {
|
|
159
160
|
variant: "ghost",
|
|
160
161
|
size: "sm",
|
|
161
162
|
className: "h-8 w-8 p-0",
|
|
162
163
|
"aria-label": `Delete ${e.name}`,
|
|
163
|
-
onClick: () =>
|
|
164
|
-
children: /* @__PURE__ */
|
|
164
|
+
onClick: () => R(e),
|
|
165
|
+
children: /* @__PURE__ */ g(m, { className: "h-4 w-4 text-status-error-text" })
|
|
165
166
|
})
|
|
166
167
|
]
|
|
167
168
|
})]
|
|
168
|
-
}), /* @__PURE__ */
|
|
169
|
+
}), /* @__PURE__ */ _(S, {
|
|
169
170
|
className: "flex items-center gap-1",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
171
|
-
})] }), /* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ g(d, { className: "h-3 w-3" }), e.location]
|
|
172
|
+
})] }), /* @__PURE__ */ _(x, { children: [
|
|
173
|
+
/* @__PURE__ */ _("div", {
|
|
173
174
|
className: "grid grid-cols-2 gap-4 mb-4",
|
|
174
175
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
176
177
|
className: "text-xs text-text-secondary",
|
|
177
178
|
children: "Department Head"
|
|
178
|
-
}), /* @__PURE__ */
|
|
179
|
+
}), /* @__PURE__ */ g("p", {
|
|
179
180
|
className: "text-sm font-medium",
|
|
180
181
|
children: e.headName
|
|
181
182
|
})] }),
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
183
184
|
className: "text-xs text-text-secondary",
|
|
184
185
|
children: "Headcount"
|
|
185
|
-
}), /* @__PURE__ */
|
|
186
|
+
}), /* @__PURE__ */ _("p", {
|
|
186
187
|
className: "text-sm font-medium",
|
|
187
188
|
children: [e.employeeCount, " employees"]
|
|
188
189
|
})] }),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
190
191
|
className: "text-xs text-text-secondary",
|
|
191
192
|
children: "Annual Budget"
|
|
192
|
-
}), /* @__PURE__ */
|
|
193
|
+
}), /* @__PURE__ */ _("p", {
|
|
193
194
|
className: "text-sm font-medium",
|
|
194
195
|
children: [
|
|
195
196
|
"$",
|
|
@@ -197,26 +198,26 @@ function A() {
|
|
|
197
198
|
"M"
|
|
198
199
|
]
|
|
199
200
|
})] }),
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
201
202
|
className: "text-xs text-text-secondary",
|
|
202
203
|
children: "Avg Salary"
|
|
203
|
-
}), /* @__PURE__ */
|
|
204
|
+
}), /* @__PURE__ */ _("p", {
|
|
204
205
|
className: "text-sm font-medium",
|
|
205
|
-
children: ["$",
|
|
206
|
+
children: ["$", r.toLocaleString()]
|
|
206
207
|
})] })
|
|
207
208
|
]
|
|
208
209
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ g(O, { className: "mb-3" }),
|
|
211
|
+
/* @__PURE__ */ _("div", {
|
|
211
212
|
className: "flex items-center justify-between text-xs",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ _("span", {
|
|
213
214
|
className: "text-text-secondary",
|
|
214
215
|
children: [
|
|
215
216
|
"Avg Performance: ",
|
|
216
|
-
|
|
217
|
+
i,
|
|
217
218
|
"/5"
|
|
218
219
|
]
|
|
219
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ _("span", {
|
|
220
221
|
className: "text-text-secondary",
|
|
221
222
|
children: [
|
|
222
223
|
"Cost/Head:",
|
|
@@ -228,45 +229,45 @@ function A() {
|
|
|
228
229
|
] })] }, e.id);
|
|
229
230
|
})
|
|
230
231
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
open:
|
|
233
|
-
onOpenChange:
|
|
234
|
-
title:
|
|
235
|
-
description:
|
|
236
|
-
fields:
|
|
237
|
-
initialValues:
|
|
238
|
-
submitLabel:
|
|
232
|
+
/* @__PURE__ */ g(n, {
|
|
233
|
+
open: I.open,
|
|
234
|
+
onOpenChange: I.onOpenChange,
|
|
235
|
+
title: V ? "Edit department" : "Add department",
|
|
236
|
+
description: V ? "Update this department’s details." : "Create a new department in your organization.",
|
|
237
|
+
fields: k,
|
|
238
|
+
initialValues: V ? A(V) : void 0,
|
|
239
|
+
submitLabel: V ? "Save changes" : "Add department",
|
|
239
240
|
onSubmit: async (e) => {
|
|
240
241
|
let t = {
|
|
241
|
-
id:
|
|
242
|
-
name:
|
|
243
|
-
headId:
|
|
244
|
-
headName:
|
|
245
|
-
employeeCount:
|
|
246
|
-
budget:
|
|
247
|
-
location:
|
|
248
|
-
status:
|
|
242
|
+
id: V?.id ?? s(),
|
|
243
|
+
name: o(e, "name"),
|
|
244
|
+
headId: V?.headId ?? "",
|
|
245
|
+
headName: o(e, "headName"),
|
|
246
|
+
employeeCount: V?.employeeCount ?? 0,
|
|
247
|
+
budget: a(e, "budget"),
|
|
248
|
+
location: o(e, "location"),
|
|
249
|
+
status: o(e, "status")
|
|
249
250
|
};
|
|
250
|
-
|
|
251
|
+
V ? await P(V.id, t) : await N(t);
|
|
251
252
|
}
|
|
252
253
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
open:
|
|
254
|
+
/* @__PURE__ */ g(i, {
|
|
255
|
+
open: L !== null,
|
|
255
256
|
onOpenChange: (e) => {
|
|
256
|
-
e ||
|
|
257
|
+
e || R(null);
|
|
257
258
|
},
|
|
258
259
|
title: "Delete department?",
|
|
259
|
-
description:
|
|
260
|
+
description: L ? `${L.name} will be removed. This cannot be undone.` : void 0,
|
|
260
261
|
confirmLabel: "Delete",
|
|
261
262
|
destructive: !0,
|
|
262
263
|
onConfirm: async () => {
|
|
263
|
-
|
|
264
|
+
L && (await F(L.id), R(null));
|
|
264
265
|
}
|
|
265
266
|
})
|
|
266
267
|
]
|
|
267
268
|
});
|
|
268
269
|
}
|
|
269
270
|
//#endregion
|
|
270
|
-
export {
|
|
271
|
+
export { j as HrDepartmentsPagePage };
|
|
271
272
|
|
|
272
273
|
//# sourceMappingURL=HrDepartmentsPagePage.js.map
|