@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.
Files changed (89) hide show
  1. package/dist/crewfoundry/pages/AdminAdminPagePage.js +76 -75
  2. package/dist/crewfoundry/pages/AdminAdminPagePage.js.map +1 -1
  3. package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +118 -117
  4. package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
  5. package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +115 -114
  6. package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
  7. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +105 -104
  8. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
  9. package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js +52 -51
  10. package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js.map +1 -1
  11. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +94 -93
  12. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
  13. package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js +97 -96
  14. package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js.map +1 -1
  15. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +68 -67
  16. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
  17. package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js +96 -95
  18. package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js.map +1 -1
  19. package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +153 -152
  20. package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
  21. package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +107 -106
  22. package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
  23. package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +77 -76
  24. package/dist/crewfoundry/pages/HiringApplicationsPagePage.js.map +1 -1
  25. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +80 -79
  26. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
  27. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +102 -101
  28. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
  29. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +126 -125
  30. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
  31. package/dist/crewfoundry/pages/HiringJobsPagePage.js +64 -63
  32. package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
  33. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +96 -95
  34. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
  35. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +127 -126
  36. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
  37. package/dist/crewfoundry/pages/HrPayrollPagePage.js +118 -117
  38. package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
  39. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +123 -122
  40. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
  41. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +77 -76
  42. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
  43. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +49 -48
  44. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
  45. package/dist/crewfoundry/pages/LearningCoursesPagePage.js +62 -61
  46. package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
  47. package/dist/crewfoundry/pages/LearningLearningPagePage.js +72 -71
  48. package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
  49. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +70 -69
  50. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
  51. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +57 -56
  52. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
  53. package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +58 -57
  54. package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +1 -1
  55. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +122 -121
  56. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +1 -1
  57. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +70 -69
  58. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
  59. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +41 -40
  60. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +1 -1
  61. package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +65 -64
  62. package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
  63. package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js +75 -74
  64. package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +1 -1
  65. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +60 -59
  66. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
  67. package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js +53 -52
  68. package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +1 -1
  69. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +37 -36
  70. package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +1 -1
  71. package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js +126 -125
  72. package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js.map +1 -1
  73. package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +62 -61
  74. package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
  75. package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js +50 -49
  76. package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
  77. package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +72 -71
  78. package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js.map +1 -1
  79. package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js +40 -39
  80. package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js.map +1 -1
  81. package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js +130 -129
  82. package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js.map +1 -1
  83. package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +60 -59
  84. package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
  85. package/dist/crewfoundry/store/crewfoundryStore.js +177 -146
  86. package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
  87. package/dist/crewfoundry/utils/formatEnumLabel.js +8 -0
  88. package/dist/crewfoundry/utils/formatEnumLabel.js.map +1 -0
  89. package/package.json +1 -1
@@ -1,109 +1,110 @@
1
1
  import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
2
- import { useState as t } from "react";
3
- import { Briefcase as n, MapPin as r, Plus as i, Search as a, Users as o } from "lucide-react";
4
- import { useNavigate as s } from "react-router-dom";
5
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
- import { Badge as u, Button as d, CardContent as f, CardDescription as p, CardHeader as m, CardTitle as h, GlassCard as g, GradientText as _, IllustratedEmptyState as v, Input as y, PagePurpose as b, Pagination as x } from "@burdenoff/fe-libs/ui";
7
- import { usePagination as S } from "@burdenoff/fe-libs/shared/hooks";
8
- import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
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 w() {
11
- let { t: w } = C(), T = s(), { jobPostings: E } = e(), [D, O] = t(""), { page: k, pageSize: A, offset: j, setPage: M } = S({ initialPageSize: 12 }), N = (e, t) => {
12
- let n = w(e);
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
- }, P = E.filter((e) => `${e.title} ${e.department} ${e.location}`.toLowerCase().includes(D.toLowerCase())), F = P.slice(j, j + A), I = (e) => T(`../../hiring/job-details-page?id=${encodeURIComponent(e)}`), L = E.filter((e) => e.status === "active").length, R = E.reduce((e, t) => e + t.applicants, 0);
15
- return /* @__PURE__ */ l("div", {
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__ */ l("div", {
19
+ /* @__PURE__ */ u("div", {
19
20
  className: "flex items-center justify-between",
20
- children: [/* @__PURE__ */ l("div", { children: [
21
- /* @__PURE__ */ c("h1", {
21
+ children: [/* @__PURE__ */ u("div", { children: [
22
+ /* @__PURE__ */ l("h1", {
22
23
  className: "text-2xl font-semibold",
23
- children: /* @__PURE__ */ c(_, { children: N("crewfoundry.hiringJobs.title", "Job Postings") })
24
+ children: /* @__PURE__ */ l(v, { children: P("crewfoundry.hiringJobs.title", "Job Postings") })
24
25
  }),
25
- /* @__PURE__ */ l("p", {
26
+ /* @__PURE__ */ u("p", {
26
27
  className: "text-sm text-text-secondary",
27
28
  children: [
28
- L,
29
+ R,
29
30
  " ",
30
- N("crewfoundry.hiringJobs.summary.activePositions", "active positions"),
31
+ P("crewfoundry.hiringJobs.summary.activePositions", "active positions"),
31
32
  " ·",
32
33
  " ",
33
- R,
34
+ z,
34
35
  " ",
35
- N("crewfoundry.hiringJobs.summary.totalApplicants", "total applicants")
36
+ P("crewfoundry.hiringJobs.summary.totalApplicants", "total applicants")
36
37
  ]
37
38
  }),
38
- /* @__PURE__ */ c(b, {
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__ */ l(d, {
43
+ ] }), /* @__PURE__ */ u(f, {
43
44
  size: "sm",
44
- onClick: () => T("../../hiring/create-job-page"),
45
- children: [/* @__PURE__ */ c(i, { className: "h-4 w-4 mr-1" }), N("crewfoundry.hiringJobs.actions.postNewJob", "Post New Job")]
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__ */ l("div", {
49
+ /* @__PURE__ */ u("div", {
49
50
  className: "relative max-w-sm",
50
- children: [/* @__PURE__ */ c(a, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ c(y, {
51
- placeholder: N("crewfoundry.hiringJobs.searchPlaceholder", "Search positions..."),
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: D,
54
+ value: O,
54
55
  onChange: (e) => {
55
- O(e.target.value), M(1);
56
+ k(e.target.value), N(1);
56
57
  }
57
58
  })]
58
59
  }),
59
- P.length === 0 && /* @__PURE__ */ c(v, {
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__ */ c("div", {
65
+ /* @__PURE__ */ l("div", {
65
66
  className: "grid gap-4 md:grid-cols-2",
66
- children: F.map((e, t) => /* @__PURE__ */ l(g, {
67
- treatment: t === 0 ? "glass" : "plain",
68
- glow: t === 0,
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: () => I(e.id),
74
+ onClick: () => L(e.id),
74
75
  onKeyDown: (t) => {
75
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), I(e.id));
76
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), L(e.id));
76
77
  },
77
- children: [/* @__PURE__ */ l(m, { children: [/* @__PURE__ */ l("div", {
78
+ children: [/* @__PURE__ */ u(h, { children: [/* @__PURE__ */ u("div", {
78
79
  className: "flex items-center justify-between",
79
- children: [/* @__PURE__ */ c(h, {
80
+ children: [/* @__PURE__ */ l(g, {
80
81
  className: "text-lg",
81
82
  children: e.title
82
- }), /* @__PURE__ */ c(u, {
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__ */ c(p, { children: e.description })] }), /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l("div", {
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__ */ l("div", {
90
+ /* @__PURE__ */ u("div", {
90
91
  className: "flex items-center gap-1 text-sm text-text-secondary",
91
- children: [/* @__PURE__ */ c(n, { className: "h-3 w-3" }), e.department]
92
+ children: [/* @__PURE__ */ l(r, { className: "h-3 w-3" }), e.department]
92
93
  }),
93
- /* @__PURE__ */ l("div", {
94
+ /* @__PURE__ */ u("div", {
94
95
  className: "flex items-center gap-1 text-sm text-text-secondary",
95
- children: [/* @__PURE__ */ c(r, { className: "h-3 w-3" }), e.location]
96
+ children: [/* @__PURE__ */ l(i, { className: "h-3 w-3" }), e.location]
96
97
  }),
97
- /* @__PURE__ */ l("div", {
98
+ /* @__PURE__ */ u("div", {
98
99
  className: "flex items-center gap-1 text-sm text-text-secondary",
99
100
  children: [
100
- /* @__PURE__ */ c(o, { className: "h-3 w-3" }),
101
+ /* @__PURE__ */ l(s, { className: "h-3 w-3" }),
101
102
  e.applicants,
102
103
  " ",
103
- N("crewfoundry.hiringJobs.card.applicants", "applicants")
104
+ P("crewfoundry.hiringJobs.card.applicants", "applicants")
104
105
  ]
105
106
  }),
106
- /* @__PURE__ */ l("div", {
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__ */ l("div", {
118
+ }), /* @__PURE__ */ u("div", {
118
119
  className: "flex items-center justify-between text-xs text-text-secondary",
119
- children: [/* @__PURE__ */ l("div", {
120
+ children: [/* @__PURE__ */ u("div", {
120
121
  className: "flex gap-1",
121
- children: [/* @__PURE__ */ c(u, {
122
+ children: [/* @__PURE__ */ l(d, {
122
123
  variant: "outline",
123
124
  className: "text-[10px]",
124
125
  children: e.type.replace("_", " ")
125
- }), /* @__PURE__ */ c(u, {
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__ */ l("span", { children: [
131
- N("crewfoundry.hiringJobs.card.deadline", "Deadline"),
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
- P.length > A && /* @__PURE__ */ c(x, {
139
- page: k,
140
- pageSize: A,
141
- totalItems: P.length,
142
- onPageChange: M
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 { w as HiringJobsPagePage };
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(`../../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&apos;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 {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 {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":";;;;;;;;;AAqBA,SAAgB,IAAqB;CACnC,IAAM,EAAE,GAAG,MAAc,GAAS,EAC5B,IAAW,GAAa,EACxB,EAAE,mBAAgB,GAAqB,EACvC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,EAAE,SAAM,aAAU,WAAQ,eAAY,EAAc,EAAE,iBAAiB,IAAI,CAAC,EAC5E,KAAK,GAAa,MAAqB;EAC3C,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAG9B,IAAW,EAAY,QAAQ,MACnC,GAAG,EAAE,MAAM,GAAG,EAAE,WAAW,GAAG,EAAE,WAAW,aAAa,CAAC,SAAS,EAAO,aAAa,CAAC,CACxF,EACK,IAAQ,EAAS,MAAM,GAAQ,IAAS,EAAS,EACjD,KAAW,MACf,EAAS,oCAAoC,mBAAmB,EAAG,GAAG,EAClE,IAAa,EAAY,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,QAC9D,IAAkB,EAAY,QAAQ,GAAG,MAAM,IAAI,EAAE,YAAY,EAAE;AAEzE,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA;KACE,kBAAC,MAAD;MAAI,WAAU;gBACZ,kBAAC,GAAD,EAAA,UAAe,EAAE,gCAAgC,eAAe,EAAgB,CAAA;MAC7E,CAAA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C,CAAA,CACJ;SACN,kBAAC,GAAD,EAAA,UAAkB,EAAI,aAA8B,CAAA,CACzC,EAAA,CAAA,EACb,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,OAAD;MAAK,WAAU;gBAAf;OACE,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,GAAD,EAAW,WAAU,WAAY,CAAA,EAChC,EAAI,WACD;;OACN,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,GAAD,EAAQ,WAAU,WAAY,CAAA,EAC7B,EAAI,SACD;;OACN,kBAAC,OAAD;QAAK,WAAU;kBAAf;SACE,kBAAC,GAAD,EAAO,WAAU,WAAY,CAAA;SAC5B,EAAI;SAAW;SAAE,EAAE,0CAA0C,aAAa;SACvE;;OACN,kBAAC,OAAD;QAAK,WAAU;kBAAf;SAA6C;UACxC,EAAI,YAAY,KAAM,QAAQ,EAAE;SAAC;UAAO,EAAI,YAAY,KAAM,QAAQ,EAAE;SAAC;SACxE;;OACF;SACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,GAAD;QAAO,SAAQ;QAAU,WAAU;kBAChC,EAAI,KAAK,QAAQ,KAAK,IAAI;QACrB,CAAA,EACR,kBAAC,GAAD;QAAO,SAAQ;QAAU,WAAU;kBAChC,EAAI;QACC,CAAA,CACJ;UACN,kBAAC,QAAD,EAAA,UAAA;OACG,EAAE,wCAAwC,WAAW;OAAC;OAAG,EAAI;OACzD,EAAA,CAAA,CACH;QACM,EAAA,CAAA,CACJ;OAhEL,EAAI,GAgEC,CACZ;IACE,CAAA;GAEL,EAAS,SAAS,KACjB,kBAAC,GAAD;IACQ;IACI;IACV,YAAY,EAAS;IACrB,cAAc;IACd,CAAA;GAEA"}
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&apos;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":";;;;;;;;;;AAsBA,SAAgB,IAAqB;CACnC,IAAM,EAAE,GAAG,MAAc,GAAS,EAC5B,IAAW,GAAa,EACxB,EAAE,mBAAgB,GAAqB,EACvC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,EAAE,SAAM,aAAU,WAAQ,eAAY,EAAc,EAAE,iBAAiB,IAAI,CAAC,EAC5E,KAAK,GAAa,MAAqB;EAC3C,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAG9B,IAAW,EAAY,QAAQ,MACnC,GAAG,EAAE,MAAM,GAAG,EAAE,WAAW,GAAG,EAAE,WAAW,aAAa,CAAC,SAAS,EAAO,aAAa,CAAC,CACxF,EACK,IAAQ,EAAS,MAAM,GAAQ,IAAS,EAAS,EACjD,KAAW,MACf,EAAS,oCAAoC,mBAAmB,EAAG,GAAG,EAClE,IAAa,EAAY,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,QAC9D,IAAkB,EAAY,QAAQ,GAAG,MAAM,IAAI,EAAE,YAAY,EAAE;AAEzE,QACE,kBA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GAgEC,CACZ;IACE,CAAA;GAEL,EAAS,SAAS,KACjB,kBAAC,GAAD;IACQ;IACI;IACV,YAAY,EAAS;IACrB,cAAc;IACd,CAAA;GAEA"}
@@ -1,13 +1,14 @@
1
1
  import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
2
- import { FormModal as t, useFormModal as n } from "../components/forms/FormModal.js";
3
- import { ConfirmDialog as r } from "../components/forms/ConfirmDialog.js";
4
- import { getNumber as i, getText as a, newClientId as o } from "../components/forms/formValues.js";
5
- import { useState as s } from "react";
6
- import { Building2 as c, DollarSign as l, MapPin as u, Pencil as d, Plus as f, Trash2 as p, Users as m } from "lucide-react";
7
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
8
- import { Badge as _, Button as v, Card as y, CardContent as b, CardDescription as x, CardHeader as S, CardTitle as C, GlassCard as w, GradientText as T, PagePurpose as E, Separator as D } from "@burdenoff/fe-libs/ui";
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 O = [
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
- ], k = (e) => ({
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 A() {
57
- let { departments: A, employees: j, addDepartment: M, updateDepartment: N, removeDepartment: P } = e(), F = n(), [I, L] = s(null), R = A.reduce((e, t) => e + t.budget, 0), z = A.reduce((e, t) => e + t.employeeCount, 0), B = F.context;
58
- return /* @__PURE__ */ g("div", {
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__ */ g("div", {
62
+ /* @__PURE__ */ _("div", {
62
63
  className: "flex items-center justify-between",
63
- children: [/* @__PURE__ */ g("div", { children: [
64
- /* @__PURE__ */ h("h1", {
64
+ children: [/* @__PURE__ */ _("div", { children: [
65
+ /* @__PURE__ */ g("h1", {
65
66
  className: "text-2xl font-semibold",
66
- children: /* @__PURE__ */ h(T, { children: "Departments" })
67
+ children: /* @__PURE__ */ g(E, { children: "Departments" })
67
68
  }),
68
- /* @__PURE__ */ h("p", {
69
+ /* @__PURE__ */ g("p", {
69
70
  className: "text-sm text-text-secondary",
70
71
  children: "Organizational structure and department management"
71
72
  }),
72
- /* @__PURE__ */ h(E, {
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__ */ g(v, {
77
+ ] }), /* @__PURE__ */ _(y, {
77
78
  size: "sm",
78
- onClick: () => F.openModal(),
79
- children: [/* @__PURE__ */ h(f, { className: "h-4 w-4 mr-1" }), "Add Department"]
79
+ onClick: () => I.openModal(),
80
+ children: [/* @__PURE__ */ g(p, { className: "h-4 w-4 mr-1" }), "Add Department"]
80
81
  })]
81
82
  }),
82
- /* @__PURE__ */ g("div", {
83
+ /* @__PURE__ */ _("div", {
83
84
  className: "grid gap-4 md:grid-cols-3",
84
85
  children: [
85
- /* @__PURE__ */ g(w, {
86
+ /* @__PURE__ */ _(T, {
86
87
  treatment: "glass",
87
88
  glow: !0,
88
89
  className: "border-border-seam",
89
- children: [/* @__PURE__ */ g(S, {
90
+ children: [/* @__PURE__ */ _(C, {
90
91
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
91
- children: [/* @__PURE__ */ h(C, {
92
+ children: [/* @__PURE__ */ g(w, {
92
93
  className: "text-sm font-medium",
93
94
  children: "Total Departments"
94
- }), /* @__PURE__ */ h(c, { className: "h-4 w-4 text-text-secondary" })]
95
- }), /* @__PURE__ */ h(b, { children: /* @__PURE__ */ h("div", {
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: A.length
98
+ children: j.length
98
99
  }) })]
99
100
  }),
100
- /* @__PURE__ */ g(w, {
101
+ /* @__PURE__ */ _(T, {
101
102
  treatment: "metric",
102
103
  className: "border-border-seam",
103
- children: [/* @__PURE__ */ g(S, {
104
+ children: [/* @__PURE__ */ _(C, {
104
105
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
105
- children: [/* @__PURE__ */ h(C, {
106
+ children: [/* @__PURE__ */ g(w, {
106
107
  className: "text-sm font-medium",
107
108
  children: "Total Headcount"
108
- }), /* @__PURE__ */ h(m, { className: "h-4 w-4 text-text-secondary" })]
109
- }), /* @__PURE__ */ h(b, { children: /* @__PURE__ */ h("div", {
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: z
112
+ children: B
112
113
  }) })]
113
114
  }),
114
- /* @__PURE__ */ g(w, {
115
+ /* @__PURE__ */ _(T, {
115
116
  treatment: "metric",
116
117
  className: "border-border-seam",
117
- children: [/* @__PURE__ */ g(S, {
118
+ children: [/* @__PURE__ */ _(C, {
118
119
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
119
- children: [/* @__PURE__ */ h(C, {
120
+ children: [/* @__PURE__ */ g(w, {
120
121
  className: "text-sm font-medium",
121
122
  children: "Total Budget"
122
- }), /* @__PURE__ */ h(l, { className: "h-4 w-4 text-text-secondary" })]
123
- }), /* @__PURE__ */ h(b, { children: /* @__PURE__ */ g("div", {
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
- (R / 1e6).toFixed(1),
128
+ (z / 1e6).toFixed(1),
128
129
  "M"
129
130
  ]
130
131
  }) })]
131
132
  })
132
133
  ]
133
134
  }),
134
- /* @__PURE__ */ h("div", {
135
+ /* @__PURE__ */ g("div", {
135
136
  className: "grid gap-4 md:grid-cols-2",
136
- children: A.map((e) => {
137
- let t = j.filter((t) => t.department === e.name), n = t.length > 0 ? Math.round(t.reduce((e, t) => e + t.salary, 0) / t.length) : 0, r = t.length > 0 ? (t.reduce((e, t) => e + t.performanceScore, 0) / t.length).toFixed(1) : "0";
138
- return /* @__PURE__ */ g(y, { children: [/* @__PURE__ */ g(S, { children: [/* @__PURE__ */ g("div", {
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__ */ h(C, {
141
+ children: [/* @__PURE__ */ g(w, {
141
142
  className: "text-lg",
142
143
  children: e.name
143
- }), /* @__PURE__ */ g("div", {
144
+ }), /* @__PURE__ */ _("div", {
144
145
  className: "flex items-center gap-1",
145
146
  children: [
146
- /* @__PURE__ */ h(_, {
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__ */ h(v, {
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: () => F.openModal(e),
156
- children: /* @__PURE__ */ h(d, { className: "h-4 w-4" })
156
+ onClick: () => I.openModal(e),
157
+ children: /* @__PURE__ */ g(f, { className: "h-4 w-4" })
157
158
  }),
158
- /* @__PURE__ */ h(v, {
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: () => L(e),
164
- children: /* @__PURE__ */ h(p, { className: "h-4 w-4 text-status-error-text" })
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__ */ g(x, {
169
+ }), /* @__PURE__ */ _(S, {
169
170
  className: "flex items-center gap-1",
170
- children: [/* @__PURE__ */ h(u, { className: "h-3 w-3" }), e.location]
171
- })] }), /* @__PURE__ */ g(b, { children: [
172
- /* @__PURE__ */ g("div", {
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__ */ g("div", { children: [/* @__PURE__ */ h("p", {
176
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
176
177
  className: "text-xs text-text-secondary",
177
178
  children: "Department Head"
178
- }), /* @__PURE__ */ h("p", {
179
+ }), /* @__PURE__ */ g("p", {
179
180
  className: "text-sm font-medium",
180
181
  children: e.headName
181
182
  })] }),
182
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
183
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
183
184
  className: "text-xs text-text-secondary",
184
185
  children: "Headcount"
185
- }), /* @__PURE__ */ g("p", {
186
+ }), /* @__PURE__ */ _("p", {
186
187
  className: "text-sm font-medium",
187
188
  children: [e.employeeCount, " employees"]
188
189
  })] }),
189
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
190
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
190
191
  className: "text-xs text-text-secondary",
191
192
  children: "Annual Budget"
192
- }), /* @__PURE__ */ g("p", {
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__ */ g("div", { children: [/* @__PURE__ */ h("p", {
201
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
201
202
  className: "text-xs text-text-secondary",
202
203
  children: "Avg Salary"
203
- }), /* @__PURE__ */ g("p", {
204
+ }), /* @__PURE__ */ _("p", {
204
205
  className: "text-sm font-medium",
205
- children: ["$", n.toLocaleString()]
206
+ children: ["$", r.toLocaleString()]
206
207
  })] })
207
208
  ]
208
209
  }),
209
- /* @__PURE__ */ h(D, { className: "mb-3" }),
210
- /* @__PURE__ */ g("div", {
210
+ /* @__PURE__ */ g(O, { className: "mb-3" }),
211
+ /* @__PURE__ */ _("div", {
211
212
  className: "flex items-center justify-between text-xs",
212
- children: [/* @__PURE__ */ g("span", {
213
+ children: [/* @__PURE__ */ _("span", {
213
214
  className: "text-text-secondary",
214
215
  children: [
215
216
  "Avg Performance: ",
216
- r,
217
+ i,
217
218
  "/5"
218
219
  ]
219
- }), /* @__PURE__ */ g("span", {
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__ */ h(t, {
232
- open: F.open,
233
- onOpenChange: F.onOpenChange,
234
- title: B ? "Edit department" : "Add department",
235
- description: B ? "Update this department’s details." : "Create a new department in your organization.",
236
- fields: O,
237
- initialValues: B ? k(B) : void 0,
238
- submitLabel: B ? "Save changes" : "Add department",
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: B?.id ?? o(),
242
- name: a(e, "name"),
243
- headId: B?.headId ?? "",
244
- headName: a(e, "headName"),
245
- employeeCount: B?.employeeCount ?? 0,
246
- budget: i(e, "budget"),
247
- location: a(e, "location"),
248
- status: a(e, "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
- B ? await N(B.id, t) : await M(t);
251
+ V ? await P(V.id, t) : await N(t);
251
252
  }
252
253
  }),
253
- /* @__PURE__ */ h(r, {
254
- open: I !== null,
254
+ /* @__PURE__ */ g(i, {
255
+ open: L !== null,
255
256
  onOpenChange: (e) => {
256
- e || L(null);
257
+ e || R(null);
257
258
  },
258
259
  title: "Delete department?",
259
- description: I ? `${I.name} will be removed. This cannot be undone.` : void 0,
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
- I && (await P(I.id), L(null));
264
+ L && (await F(L.id), R(null));
264
265
  }
265
266
  })
266
267
  ]
267
268
  });
268
269
  }
269
270
  //#endregion
270
- export { A as HrDepartmentsPagePage };
271
+ export { j as HrDepartmentsPagePage };
271
272
 
272
273
  //# sourceMappingURL=HrDepartmentsPagePage.js.map