@burdenoff/microfe-crewfoundry 2026.704.6 → 2026.707.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.
Files changed (150) hide show
  1. package/dist/crewfoundry/CrewFoundryRoutes.js +51 -43
  2. package/dist/crewfoundry/CrewFoundryRoutes.js.map +1 -1
  3. package/dist/crewfoundry/components/forms/formValues.js +5 -2
  4. package/dist/crewfoundry/components/forms/formValues.js.map +1 -1
  5. package/dist/crewfoundry/components/viz/AllocationBar.js +68 -0
  6. package/dist/crewfoundry/components/viz/AllocationBar.js.map +1 -0
  7. package/dist/crewfoundry/components/viz/AreaChart.js +102 -0
  8. package/dist/crewfoundry/components/viz/AreaChart.js.map +1 -0
  9. package/dist/crewfoundry/components/viz/AvatarStack.js +36 -0
  10. package/dist/crewfoundry/components/viz/AvatarStack.js.map +1 -0
  11. package/dist/crewfoundry/components/viz/BarChart.js +83 -0
  12. package/dist/crewfoundry/components/viz/BarChart.js.map +1 -0
  13. package/dist/crewfoundry/components/viz/CertificateCard.js +118 -0
  14. package/dist/crewfoundry/components/viz/CertificateCard.js.map +1 -0
  15. package/dist/crewfoundry/components/viz/DonutChart.js +109 -0
  16. package/dist/crewfoundry/components/viz/DonutChart.js.map +1 -0
  17. package/dist/crewfoundry/components/viz/HBarFunnel.js +54 -0
  18. package/dist/crewfoundry/components/viz/HBarFunnel.js.map +1 -0
  19. package/dist/crewfoundry/components/viz/Heatmap.js +91 -0
  20. package/dist/crewfoundry/components/viz/Heatmap.js.map +1 -0
  21. package/dist/crewfoundry/components/viz/KanbanBoard.js +50 -0
  22. package/dist/crewfoundry/components/viz/KanbanBoard.js.map +1 -0
  23. package/dist/crewfoundry/components/viz/LineChart.js +123 -0
  24. package/dist/crewfoundry/components/viz/LineChart.js.map +1 -0
  25. package/dist/crewfoundry/components/viz/OrgTree.js +83 -0
  26. package/dist/crewfoundry/components/viz/OrgTree.js.map +1 -0
  27. package/dist/crewfoundry/components/viz/PathSteps.js +68 -0
  28. package/dist/crewfoundry/components/viz/PathSteps.js.map +1 -0
  29. package/dist/crewfoundry/components/viz/ProgressRing.js +68 -0
  30. package/dist/crewfoundry/components/viz/ProgressRing.js.map +1 -0
  31. package/dist/crewfoundry/components/viz/RatingStars.js +51 -0
  32. package/dist/crewfoundry/components/viz/RatingStars.js.map +1 -0
  33. package/dist/crewfoundry/components/viz/SegmentedTabs.js +69 -0
  34. package/dist/crewfoundry/components/viz/SegmentedTabs.js.map +1 -0
  35. package/dist/crewfoundry/components/viz/SkillBar.js +3 -0
  36. package/dist/crewfoundry/components/viz/Sparkline.js +74 -0
  37. package/dist/crewfoundry/components/viz/Sparkline.js.map +1 -0
  38. package/dist/crewfoundry/components/viz/StatCard.js +60 -0
  39. package/dist/crewfoundry/components/viz/StatCard.js.map +1 -0
  40. package/dist/crewfoundry/components/viz/StepProgress.js +3 -0
  41. package/dist/crewfoundry/components/viz/Timeline.js +66 -0
  42. package/dist/crewfoundry/components/viz/Timeline.js.map +1 -0
  43. package/dist/crewfoundry/components/viz/index.js +23 -0
  44. package/dist/crewfoundry/components/viz/lib/Avatar.js +30 -0
  45. package/dist/crewfoundry/components/viz/lib/Avatar.js.map +1 -0
  46. package/dist/crewfoundry/components/viz/lib/CartesianFrame.js +119 -0
  47. package/dist/crewfoundry/components/viz/lib/CartesianFrame.js.map +1 -0
  48. package/dist/crewfoundry/components/viz/lib/ResponsiveSvg.js +35 -0
  49. package/dist/crewfoundry/components/viz/lib/ResponsiveSvg.js.map +1 -0
  50. package/dist/crewfoundry/components/viz/lib/format.js +21 -0
  51. package/dist/crewfoundry/components/viz/lib/format.js.map +1 -0
  52. package/dist/crewfoundry/components/viz/lib/geometry.js +69 -0
  53. package/dist/crewfoundry/components/viz/lib/geometry.js.map +1 -0
  54. package/dist/crewfoundry/components/viz/lib/hooks.js +39 -0
  55. package/dist/crewfoundry/components/viz/lib/hooks.js.map +1 -0
  56. package/dist/crewfoundry/components/viz/lib/palette.js +27 -0
  57. package/dist/crewfoundry/components/viz/lib/palette.js.map +1 -0
  58. package/dist/crewfoundry/lib/analytics.js +323 -0
  59. package/dist/crewfoundry/lib/analytics.js.map +1 -0
  60. package/dist/crewfoundry/lib/companyFinance.js +16 -0
  61. package/dist/crewfoundry/lib/companyFinance.js.map +1 -0
  62. package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js +226 -283
  63. package/dist/crewfoundry/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
  64. package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js +107 -120
  65. package/dist/crewfoundry/pages/AnalyticsEmployeeAnalyticsPagePage.js.map +1 -1
  66. package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +122 -162
  67. package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
  68. package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +121 -158
  69. package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
  70. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +316 -211
  71. package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
  72. package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js +75 -27
  73. package/dist/crewfoundry/pages/CommunicationsMessagesPagePage.js.map +1 -1
  74. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +167 -165
  75. package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
  76. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +168 -109
  77. package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
  78. package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +401 -290
  79. package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
  80. package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js +0 -41
  81. package/dist/crewfoundry/pages/HelpApiDocumentationPagePage.js.map +1 -1
  82. package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +84 -75
  83. package/dist/crewfoundry/pages/HiringApplicationsPagePage.js.map +1 -1
  84. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +368 -174
  85. package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
  86. package/dist/crewfoundry/pages/HiringCreateJobPagePage.js +236 -201
  87. package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
  88. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +369 -196
  89. package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
  90. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +269 -270
  91. package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
  92. package/dist/crewfoundry/pages/HiringJobsPagePage.js +210 -110
  93. package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
  94. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +216 -178
  95. package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
  96. package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js +385 -0
  97. package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js.map +1 -0
  98. package/dist/crewfoundry/pages/HrEmployeesPagePage.js +189 -130
  99. package/dist/crewfoundry/pages/HrEmployeesPagePage.js.map +1 -1
  100. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +397 -241
  101. package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
  102. package/dist/crewfoundry/pages/HrPayrollPagePage.js +262 -147
  103. package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
  104. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +345 -167
  105. package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
  106. package/dist/crewfoundry/pages/LearningCertificatesPagePage.js +98 -24
  107. package/dist/crewfoundry/pages/LearningCertificatesPagePage.js.map +1 -1
  108. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +1 -1
  109. package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
  110. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +289 -108
  111. package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
  112. package/dist/crewfoundry/pages/LearningCoursesPagePage.js +221 -114
  113. package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
  114. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +134 -135
  115. package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
  116. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +148 -97
  117. package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
  118. package/dist/crewfoundry/pages/LearningMyLearningPagePage.js +264 -157
  119. package/dist/crewfoundry/pages/LearningMyLearningPagePage.js.map +1 -1
  120. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js +85 -93
  121. package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePagePage.js.map +1 -1
  122. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +211 -122
  123. package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
  124. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +94 -54
  125. package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +1 -1
  126. package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js +289 -140
  127. package/dist/crewfoundry/pages/MarketplaceServiceDetailsPagePage.js.map +1 -1
  128. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +169 -79
  129. package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
  130. package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +296 -125
  131. package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
  132. package/dist/crewfoundry/pages/ProjectsResourcingPagePage.js +187 -0
  133. package/dist/crewfoundry/pages/ProjectsResourcingPagePage.js.map +1 -0
  134. package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +140 -78
  135. package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js.map +1 -1
  136. package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js +93 -43
  137. package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js.map +1 -1
  138. package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +250 -98
  139. package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
  140. package/dist/crewfoundry/store/crewfoundryStore.js +142 -184
  141. package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
  142. package/dist/crewfoundry/utils/cn.js +10 -0
  143. package/dist/crewfoundry/utils/cn.js.map +1 -0
  144. package/dist/crewfoundry/utils/courseProgress.js +46 -0
  145. package/dist/crewfoundry/utils/courseProgress.js.map +1 -0
  146. package/dist/node_modules/clsx/dist/clsx.js +18 -0
  147. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  148. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1716 -0
  149. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  150. package/package.json +1 -1
@@ -1,14 +1,17 @@
1
1
  import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
2
2
  import { formatEnumLabel as t } from "../utils/formatEnumLabel.js";
3
- import { FormModal as n } from "../components/forms/FormModal.js";
4
- import { getText as r, newClientId as i } from "../components/forms/formValues.js";
5
- import { useMemo as a, useState as o } from "react";
6
- import { Calendar as s, Clock as c, Plus as l, Star as u, Video as d } from "lucide-react";
7
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
8
- import { Badge as m, Button as h, Card as g, CardContent as _, CardDescription as v, CardHeader as y, CardTitle as b, GlassCard as x, GradientText as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
9
- import { useGlobalUi as w } from "@burdenoff/fe-libs/shared/providers/shell";
3
+ import { getInitials as n } from "../components/viz/lib/format.js";
4
+ import { RatingStars as r } from "../components/viz/RatingStars.js";
5
+ import "../components/viz/index.js";
6
+ import { FormModal as i } from "../components/forms/FormModal.js";
7
+ import { getText as a, newClientId as o } from "../components/forms/formValues.js";
8
+ import { useMemo as s, useState as c } from "react";
9
+ import { Calendar as l, Clock as u, Plus as d, Star as f, Video as p } from "lucide-react";
10
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
11
+ import { Badge as _, Button as v, Card as y, CardContent as b, CardHeader as x, CardTitle as S, GlassCard as C, GradientText as w, IllustratedEmptyState as T, PagePurpose as E, Textarea as D } from "@burdenoff/fe-libs/ui";
12
+ import { useGlobalUi as O } from "@burdenoff/fe-libs/shared/providers/shell";
10
13
  //#region src/crewfoundry/pages/HiringInterviewsPagePage.tsx
11
- var T = [
14
+ var k = [
12
15
  {
13
16
  label: "Phone",
14
17
  value: "phone"
@@ -29,60 +32,129 @@ var T = [
29
32
  label: "Technical",
30
33
  value: "technical"
31
34
  }
32
- ], E = [
35
+ ], A = [
33
36
  {
34
- name: "status",
35
- label: "Status",
36
- type: "select",
37
- options: [
38
- {
39
- label: "Scheduled",
40
- value: "scheduled"
41
- },
42
- {
43
- label: "Completed",
44
- value: "completed"
45
- },
46
- {
47
- label: "Cancelled",
48
- value: "cancelled"
49
- },
50
- {
51
- label: "No show",
52
- value: "no_show"
53
- }
54
- ],
55
- required: !0
37
+ key: "technical",
38
+ label: "Technical Skills"
56
39
  },
57
40
  {
58
- name: "rating",
59
- label: "Rating (out of 5)",
60
- type: "number"
41
+ key: "problem",
42
+ label: "Problem Solving"
61
43
  },
62
44
  {
63
- name: "feedback",
64
- label: "Feedback",
65
- type: "textarea",
66
- colSpan: 2
45
+ key: "communication",
46
+ label: "Communication"
47
+ },
48
+ {
49
+ key: "culture",
50
+ label: "Culture Fit"
67
51
  }
68
- ];
69
- function D() {
70
- let { showToast: D } = w(), { interviews: O, candidates: k, addInterview: A, updateInterview: j } = e(), [M, N] = o(!1), [P, F] = o(null), I = O.filter((e) => e.status === "scheduled"), L = O.filter((e) => e.status === "completed"), R = a(() => {
52
+ ], j = "@@scorecard";
53
+ function M(e) {
54
+ if (!e) return {
55
+ scores: {},
56
+ notes: ""
57
+ };
58
+ if (!e.startsWith(`${j}:`)) return {
59
+ scores: {},
60
+ notes: e
61
+ };
62
+ let t = e.indexOf("\n"), n = t === -1 ? e : e.slice(0, t), r = t === -1 ? "" : e.slice(t + 1), i = {}, a = n.slice(12);
63
+ for (let e of a.split(",")) {
64
+ let [t, n] = e.split("="), r = Number(n);
65
+ t && !Number.isNaN(r) && (i[t] = r);
66
+ }
67
+ return {
68
+ scores: i,
69
+ notes: r
70
+ };
71
+ }
72
+ function N(e, t) {
73
+ let n = A.filter((t) => (e[t.key] ?? 0) > 0).map((t) => `${t.key}=${e[t.key]}`);
74
+ return n.length === 0 ? t : `${j}:${n.join(",")}\n${t}`;
75
+ }
76
+ function P(e) {
77
+ let t = A.map((t) => e[t.key]).filter((e) => typeof e == "number" && e > 0);
78
+ return t.length === 0 ? 0 : Math.round(t.reduce((e, t) => e + t, 0) / t.length * 10) / 10;
79
+ }
80
+ function F({ name: e, size: t = 40 }) {
81
+ return /* @__PURE__ */ h("span", {
82
+ className: "inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border-subtle bg-bg-sunken font-medium text-text-secondary",
83
+ style: {
84
+ width: t,
85
+ height: t,
86
+ fontSize: Math.round(t * .36)
87
+ },
88
+ "aria-hidden": "true",
89
+ children: n(e)
90
+ });
91
+ }
92
+ function I({ value: e, onChange: t, label: n, max: r = 5 }) {
93
+ return /* @__PURE__ */ h("div", {
94
+ className: "flex items-center gap-0.5",
95
+ role: "radiogroup",
96
+ "aria-label": n,
97
+ children: Array.from({ length: r }, (e, t) => t + 1).map((n) => /* @__PURE__ */ h("button", {
98
+ type: "button",
99
+ role: "radio",
100
+ "aria-checked": e === n,
101
+ "aria-label": `${n} out of ${r}`,
102
+ onClick: () => t(e === n ? 0 : n),
103
+ className: "rounded p-0.5 outline-none transition-transform hover:scale-110 focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
104
+ children: /* @__PURE__ */ h(f, {
105
+ className: "h-5 w-5",
106
+ strokeWidth: 1.5,
107
+ style: { color: n <= e ? "var(--color-status-warning-text)" : "var(--color-border-strong)" },
108
+ fill: n <= e ? "currentColor" : "none"
109
+ })
110
+ }, n))
111
+ });
112
+ }
113
+ var L = {
114
+ technical: "default",
115
+ panel: "secondary",
116
+ onsite: "secondary",
117
+ video: "outline",
118
+ phone: "outline"
119
+ };
120
+ function R(e) {
121
+ let t = new Date(e);
122
+ return Number.isNaN(t.getTime()) ? e || "Unscheduled" : t.toLocaleDateString(void 0, {
123
+ weekday: "short",
124
+ month: "short",
125
+ day: "numeric"
126
+ });
127
+ }
128
+ function z() {
129
+ let { showToast: n } = O(), { interviews: f, candidates: m, addInterview: D, updateInterview: A } = e(), [j, N] = c(!1), [I, z] = c(null), [V, H] = c(!1), U = f.filter((e) => e.status === "scheduled"), W = f.filter((e) => e.status === "completed"), G = s(() => {
130
+ let e = [...f].sort((e, t) => {
131
+ let n = new Date(e.date).getTime(), r = new Date(t.date).getTime();
132
+ return Number.isNaN(n) && Number.isNaN(r) ? 0 : Number.isNaN(n) ? 1 : Number.isNaN(r) ? -1 : n - r;
133
+ }), t = [];
134
+ for (let n of e) {
135
+ let e = R(n.date), r = t[t.length - 1];
136
+ r && r.label === e ? r.items.push(n) : t.push({
137
+ label: e,
138
+ items: [n]
139
+ });
140
+ }
141
+ return t;
142
+ }, [f]), K = I ?? U[0]?.id ?? f[0]?.id ?? null, q = K ? f.find((e) => e.id === K) ?? null : null, J = s(() => {
71
143
  let e = /* @__PURE__ */ new Date(), t = new Date(e);
72
144
  t.setDate(e.getDate() - (e.getDay() + 6) % 7), t.setHours(0, 0, 0, 0);
73
145
  let n = new Date(t);
74
- return n.setDate(t.getDate() + 7), O.filter((e) => {
146
+ return n.setDate(t.getDate() + 7), f.filter((e) => {
75
147
  let r = new Date(e.date);
76
148
  return !Number.isNaN(r.getTime()) && r >= t && r < n;
77
149
  }).length;
78
- }, [O]), z = a(() => [
150
+ }, [f]), Y = s(() => [
79
151
  {
80
152
  name: "candidateId",
81
153
  label: "Candidate",
82
154
  type: "select",
83
155
  required: !0,
84
- placeholder: k.length ? "Select a candidate…" : "No candidates available",
85
- options: k.map((e) => ({
156
+ placeholder: m.length ? "Select a candidate…" : "No candidates available",
157
+ options: m.map((e) => ({
86
158
  label: `${e.firstName} ${e.lastName} — ${e.position}`,
87
159
  value: e.id
88
160
  }))
@@ -111,221 +183,322 @@ function D() {
111
183
  label: "Type",
112
184
  type: "select",
113
185
  required: !0,
114
- options: T
186
+ options: k
115
187
  }
116
- ], [k]);
117
- return /* @__PURE__ */ p("div", {
188
+ ], [m]);
189
+ return /* @__PURE__ */ g("div", {
118
190
  className: "space-y-6 p-6",
119
191
  children: [
120
- /* @__PURE__ */ p("div", {
121
- className: "flex items-center justify-between",
122
- children: [/* @__PURE__ */ p("div", { children: [
123
- /* @__PURE__ */ f("h1", {
192
+ /* @__PURE__ */ g("div", {
193
+ className: "flex flex-wrap items-start justify-between gap-3",
194
+ children: [/* @__PURE__ */ g("div", { children: [
195
+ /* @__PURE__ */ h("h1", {
124
196
  className: "text-2xl font-semibold",
125
- children: /* @__PURE__ */ f(S, { children: "Interviews" })
197
+ children: /* @__PURE__ */ h(w, { children: "Interviews" })
126
198
  }),
127
- /* @__PURE__ */ p("p", {
199
+ /* @__PURE__ */ g("p", {
128
200
  className: "text-sm text-text-secondary",
129
201
  children: [
130
- I.length,
202
+ U.length,
131
203
  " upcoming · ",
132
- L.length,
204
+ W.length,
133
205
  " completed"
134
206
  ]
135
207
  }),
136
- /* @__PURE__ */ f(C, {
208
+ /* @__PURE__ */ h(E, {
137
209
  className: "mt-1",
138
- children: "Schedule and track interviews across your hiring pipeline — keep everyone aligned on who's meeting which candidate and when."
210
+ children: "Schedule interviews and score candidates on a live scorecard — capture competency ratings and feedback the moment the conversation ends."
139
211
  })
140
- ] }), /* @__PURE__ */ p(h, {
212
+ ] }), /* @__PURE__ */ g(v, {
141
213
  size: "sm",
142
214
  onClick: () => N(!0),
143
- children: [/* @__PURE__ */ f(l, { className: "h-4 w-4 mr-1" }), "Schedule Interview"]
215
+ children: [/* @__PURE__ */ h(d, { className: "mr-1 h-4 w-4" }), "Schedule Interview"]
144
216
  })]
145
217
  }),
146
- /* @__PURE__ */ p("div", {
147
- className: "grid gap-4 md:grid-cols-3",
218
+ /* @__PURE__ */ g("div", {
219
+ className: "grid gap-4 sm:grid-cols-3",
148
220
  children: [
149
- /* @__PURE__ */ p(x, {
221
+ /* @__PURE__ */ g(C, {
150
222
  treatment: "glass",
151
223
  glow: !0,
152
224
  className: "border-border-seam",
153
- children: [/* @__PURE__ */ p(y, {
225
+ children: [/* @__PURE__ */ g(x, {
154
226
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
155
- children: [/* @__PURE__ */ f(b, {
227
+ children: [/* @__PURE__ */ h(S, {
156
228
  className: "text-sm font-medium",
157
229
  children: "Scheduled"
158
- }), /* @__PURE__ */ f(s, { className: "h-4 w-4 text-status-info-text" })]
159
- }), /* @__PURE__ */ f(_, { children: /* @__PURE__ */ f("div", {
230
+ }), /* @__PURE__ */ h(l, { className: "h-4 w-4 text-status-info-text" })]
231
+ }), /* @__PURE__ */ h(b, { children: /* @__PURE__ */ h("div", {
160
232
  className: "text-2xl font-bold tabular-nums",
161
- children: I.length
233
+ children: U.length
162
234
  }) })]
163
235
  }),
164
- /* @__PURE__ */ p(x, {
236
+ /* @__PURE__ */ g(C, {
165
237
  treatment: "metric",
166
238
  className: "border-border-seam",
167
- children: [/* @__PURE__ */ p(y, {
239
+ children: [/* @__PURE__ */ g(x, {
168
240
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
169
- children: [/* @__PURE__ */ f(b, {
241
+ children: [/* @__PURE__ */ h(S, {
170
242
  className: "text-sm font-medium",
171
243
  children: "Completed"
172
- }), /* @__PURE__ */ f(c, { className: "h-4 w-4 text-status-success-text" })]
173
- }), /* @__PURE__ */ f(_, { children: /* @__PURE__ */ f("div", {
244
+ }), /* @__PURE__ */ h(u, { className: "h-4 w-4 text-status-success-text" })]
245
+ }), /* @__PURE__ */ h(b, { children: /* @__PURE__ */ h("div", {
174
246
  className: "text-2xl font-bold tabular-nums",
175
- children: L.length
247
+ children: W.length
176
248
  }) })]
177
249
  }),
178
- /* @__PURE__ */ p(x, {
250
+ /* @__PURE__ */ g(C, {
179
251
  treatment: "metric",
180
252
  className: "border-border-seam",
181
- children: [/* @__PURE__ */ p(y, {
253
+ children: [/* @__PURE__ */ g(x, {
182
254
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
183
- children: [/* @__PURE__ */ f(b, {
255
+ children: [/* @__PURE__ */ h(S, {
184
256
  className: "text-sm font-medium",
185
257
  children: "This Week"
186
- }), /* @__PURE__ */ f(d, { className: "h-4 w-4 text-text-secondary" })]
187
- }), /* @__PURE__ */ f(_, { children: /* @__PURE__ */ f("div", {
258
+ }), /* @__PURE__ */ h(p, { className: "h-4 w-4 text-text-secondary" })]
259
+ }), /* @__PURE__ */ h(b, { children: /* @__PURE__ */ h("div", {
188
260
  className: "text-2xl font-bold tabular-nums",
189
- children: R
261
+ children: J
190
262
  }) })]
191
263
  })
192
264
  ]
193
265
  }),
194
- /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p(y, { children: [/* @__PURE__ */ f(b, { children: "Upcoming Interviews" }), /* @__PURE__ */ f(v, { children: "Scheduled interviews for the coming days" })] }), /* @__PURE__ */ f(_, {
195
- className: "space-y-3",
196
- children: I.map((e) => /* @__PURE__ */ p("div", {
197
- className: "flex flex-wrap items-center justify-between gap-3 rounded border p-4",
198
- children: [/* @__PURE__ */ p("div", { children: [
199
- /* @__PURE__ */ f("p", {
200
- className: "text-sm font-medium",
201
- children: e.candidateName
202
- }),
203
- /* @__PURE__ */ f("p", {
204
- className: "text-xs text-text-secondary",
205
- children: e.position
206
- }),
207
- /* @__PURE__ */ p("p", {
208
- className: "text-xs text-text-secondary mt-1",
209
- children: ["Interviewer: ", e.interviewerName]
210
- })
211
- ] }), /* @__PURE__ */ p("div", {
212
- className: "flex items-center gap-3",
266
+ /* @__PURE__ */ g("div", {
267
+ className: "grid gap-6 lg:grid-cols-3",
268
+ children: [/* @__PURE__ */ g(y, {
269
+ className: "lg:col-span-2",
270
+ children: [/* @__PURE__ */ h(x, { children: /* @__PURE__ */ h(S, { children: "Scheduled Interviews" }) }), /* @__PURE__ */ h(b, {
271
+ className: "space-y-4",
272
+ children: f.length === 0 ? /* @__PURE__ */ h(T, {
273
+ illustration: "empty-search",
274
+ title: "No interviews scheduled",
275
+ description: "Schedule an interview to start tracking your pipeline conversations."
276
+ }) : G.map((e) => /* @__PURE__ */ g("div", {
277
+ className: "space-y-2",
278
+ children: [/* @__PURE__ */ h("div", {
279
+ className: "sticky top-0 rounded bg-bg-sunken px-3 py-1 text-xs font-medium text-text-secondary",
280
+ children: e.label
281
+ }), e.items.map((e) => {
282
+ let n = e.id === K, i = P(M(e.feedback).scores) || e.rating || 0;
283
+ return /* @__PURE__ */ g("button", {
284
+ type: "button",
285
+ onClick: () => z(e.id),
286
+ "aria-pressed": n,
287
+ className: `flex w-full flex-wrap items-center justify-between gap-3 rounded-[var(--radius-input)] border p-4 text-left transition-colors ${n ? "border-action-primary-bg bg-action-primary-bg/10" : "border-border-subtle hover:bg-bg-sunken"}`,
288
+ children: [/* @__PURE__ */ g("div", {
289
+ className: "flex min-w-0 items-center gap-3",
290
+ children: [/* @__PURE__ */ h(F, { name: e.candidateName }), /* @__PURE__ */ g("div", {
291
+ className: "min-w-0",
292
+ children: [
293
+ /* @__PURE__ */ h("p", {
294
+ className: "truncate text-sm font-medium text-text-primary",
295
+ children: e.candidateName
296
+ }),
297
+ /* @__PURE__ */ h("p", {
298
+ className: "truncate text-xs text-text-secondary",
299
+ children: e.position
300
+ }),
301
+ /* @__PURE__ */ g("p", {
302
+ className: "truncate text-xs text-text-secondary",
303
+ children: ["Interviewer: ", e.interviewerName]
304
+ })
305
+ ]
306
+ })]
307
+ }), /* @__PURE__ */ g("div", {
308
+ className: "flex flex-wrap items-center gap-2",
309
+ children: [
310
+ /* @__PURE__ */ g("div", {
311
+ className: "text-right",
312
+ children: [/* @__PURE__ */ h(_, {
313
+ variant: L[e.type],
314
+ className: "text-[10px]",
315
+ children: t(e.type)
316
+ }), /* @__PURE__ */ h("p", {
317
+ className: "mt-1 text-xs text-text-secondary",
318
+ children: e.time
319
+ })]
320
+ }),
321
+ e.status === "completed" && i > 0 && /* @__PURE__ */ h(r, {
322
+ value: i,
323
+ size: 12
324
+ }),
325
+ /* @__PURE__ */ h(_, {
326
+ variant: e.status === "completed" ? "default" : "secondary",
327
+ className: "text-[10px]",
328
+ children: t(e.status)
329
+ })
330
+ ]
331
+ })]
332
+ }, e.id);
333
+ })]
334
+ }, e.label))
335
+ })]
336
+ }), /* @__PURE__ */ h("div", {
337
+ className: "lg:sticky lg:top-4 lg:self-start",
338
+ children: /* @__PURE__ */ g(y, { children: [/* @__PURE__ */ g(x, { children: [/* @__PURE__ */ h(S, { children: "Interview Scorecard" }), q && /* @__PURE__ */ g("p", {
339
+ className: "text-sm text-text-secondary",
213
340
  children: [
214
- /* @__PURE__ */ p("div", {
215
- className: "text-right",
216
- children: [/* @__PURE__ */ f("p", {
217
- className: "text-sm font-medium",
218
- children: e.date
219
- }), /* @__PURE__ */ f("p", {
220
- className: "text-xs text-text-secondary",
221
- children: e.time
222
- })]
223
- }),
224
- /* @__PURE__ */ f(m, {
225
- variant: "outline",
226
- children: t(e.type)
227
- }),
228
- /* @__PURE__ */ f(m, {
229
- variant: "secondary",
230
- children: t(e.status)
231
- }),
232
- /* @__PURE__ */ f(h, {
233
- variant: "outline",
234
- size: "sm",
235
- onClick: () => F(e),
236
- children: "Record outcome"
237
- })
341
+ t(q.type),
342
+ " interview for ",
343
+ q.candidateName
238
344
  ]
239
- })]
240
- }, e.id))
241
- })] }),
242
- L.length > 0 && /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p(y, { children: [/* @__PURE__ */ f(b, { children: "Completed Interviews" }), /* @__PURE__ */ f(v, { children: "Recent interview feedback" })] }), /* @__PURE__ */ f(_, {
243
- className: "space-y-3",
244
- children: L.map((e) => /* @__PURE__ */ p("div", {
245
- className: "flex flex-wrap items-center justify-between gap-3 rounded border p-4",
246
- children: [/* @__PURE__ */ p("div", { children: [
247
- /* @__PURE__ */ f("p", {
248
- className: "text-sm font-medium",
249
- children: e.candidateName
250
- }),
251
- /* @__PURE__ */ f("p", {
252
- className: "text-xs text-text-secondary",
253
- children: e.position
254
- }),
255
- e.feedback && /* @__PURE__ */ p("p", {
256
- className: "text-xs text-text-secondary mt-1 italic",
257
- children: [
258
- "\"",
259
- e.feedback,
260
- "\""
261
- ]
345
+ })] }), /* @__PURE__ */ h(b, {
346
+ className: "space-y-4",
347
+ children: q ? /* @__PURE__ */ h(B, {
348
+ interview: q,
349
+ saving: V,
350
+ onSave: async (e, t) => {
351
+ if (q) {
352
+ H(!0);
353
+ try {
354
+ await A(q.id, {
355
+ status: e ? "completed" : q.status,
356
+ feedback: t
357
+ }), n(e ? "Scorecard submitted" : "Draft saved", "success");
358
+ } catch {
359
+ n("Could not save the scorecard", "error");
360
+ } finally {
361
+ H(!1);
362
+ }
363
+ }
364
+ }
365
+ }, q.id) : /* @__PURE__ */ h("p", {
366
+ className: "text-sm text-text-muted",
367
+ children: "Select an interview to open its scorecard."
262
368
  })
263
- ] }), /* @__PURE__ */ p("div", {
264
- className: "flex items-center gap-3",
265
- children: [e.rating && /* @__PURE__ */ p("div", {
266
- className: "flex items-center gap-1",
267
- children: [/* @__PURE__ */ f(u, { className: "h-4 w-4 text-status-warning-text" }), /* @__PURE__ */ p("span", {
268
- className: "text-sm font-medium",
269
- children: [e.rating, "/5"]
270
- })]
271
- }), /* @__PURE__ */ f(m, {
272
- variant: "default",
273
- children: "completed"
274
- })]
275
- })]
276
- }, e.id))
277
- })] }),
278
- /* @__PURE__ */ f(n, {
279
- open: M,
369
+ })] })
370
+ })]
371
+ }),
372
+ /* @__PURE__ */ h(i, {
373
+ open: j,
280
374
  onOpenChange: N,
281
375
  title: "Schedule Interview",
282
376
  description: "Set up a conversation with a candidate in your pipeline.",
283
- fields: z,
377
+ fields: Y,
284
378
  submitLabel: "Schedule",
285
379
  onSubmit: async (e) => {
286
- let t = k.find((t) => t.id === r(e, "candidateId"));
380
+ let t = m.find((t) => t.id === a(e, "candidateId"));
287
381
  if (!t) throw Error("Please select a candidate");
288
- await A({
289
- id: i(),
382
+ await D({
383
+ id: o(),
290
384
  candidateId: t.id,
291
385
  candidateName: `${t.firstName} ${t.lastName}`,
292
386
  position: t.position,
293
- interviewerName: r(e, "interviewerName"),
294
- date: r(e, "date"),
295
- time: r(e, "time"),
387
+ interviewerName: a(e, "interviewerName"),
388
+ date: a(e, "date"),
389
+ time: a(e, "time"),
296
390
  type: e.type,
297
391
  status: "scheduled"
298
- }), D("Interview scheduled", "success");
299
- }
300
- }),
301
- /* @__PURE__ */ f(n, {
302
- open: P !== null,
303
- onOpenChange: (e) => {
304
- e || F(null);
305
- },
306
- title: "Record Interview Outcome",
307
- description: P ? `${P.candidateName} — ${P.position}` : void 0,
308
- fields: E,
309
- initialValues: P ? {
310
- status: P.status,
311
- rating: P.rating ?? "",
312
- feedback: P.feedback ?? ""
313
- } : void 0,
314
- submitLabel: "Save outcome",
315
- onSubmit: async (e) => {
316
- if (!P) return;
317
- let t = e.rating, n = typeof t == "number" || typeof t == "string" && t.trim() !== "";
318
- await j(P.id, {
319
- status: e.status,
320
- feedback: r(e, "feedback"),
321
- ...n ? { rating: Number(t) } : {}
322
- }), D("Interview updated", "success");
392
+ }), n("Interview scheduled", "success");
323
393
  }
324
394
  })
325
395
  ]
326
396
  });
327
397
  }
398
+ function B({ interview: e, saving: t, onSave: n }) {
399
+ let i = M(e.feedback), [a, o] = c(i.scores), [s, l] = c(i.notes), u = P(a);
400
+ return /* @__PURE__ */ g(m, { children: [
401
+ /* @__PURE__ */ g("div", {
402
+ className: "grid grid-cols-2 gap-3 rounded-[var(--radius-input)] bg-bg-sunken p-3 text-xs",
403
+ children: [/* @__PURE__ */ g("div", { children: [
404
+ /* @__PURE__ */ h("p", {
405
+ className: "text-text-muted",
406
+ children: "Candidate"
407
+ }),
408
+ /* @__PURE__ */ h("p", {
409
+ className: "font-medium text-text-primary",
410
+ children: e.candidateName
411
+ }),
412
+ /* @__PURE__ */ h("p", {
413
+ className: "mt-1 text-text-muted",
414
+ children: "Position"
415
+ }),
416
+ /* @__PURE__ */ h("p", {
417
+ className: "font-medium text-text-primary",
418
+ children: e.position
419
+ })
420
+ ] }), /* @__PURE__ */ g("div", { children: [
421
+ /* @__PURE__ */ h("p", {
422
+ className: "text-text-muted",
423
+ children: "Date"
424
+ }),
425
+ /* @__PURE__ */ h("p", {
426
+ className: "font-medium text-text-primary",
427
+ children: e.date
428
+ }),
429
+ /* @__PURE__ */ h("p", {
430
+ className: "mt-1 text-text-muted",
431
+ children: "Time"
432
+ }),
433
+ /* @__PURE__ */ h("p", {
434
+ className: "font-medium text-text-primary",
435
+ children: e.time
436
+ })
437
+ ] })]
438
+ }),
439
+ /* @__PURE__ */ h("div", {
440
+ className: "space-y-3",
441
+ children: A.map((e) => /* @__PURE__ */ g("div", {
442
+ className: "flex items-center justify-between gap-2",
443
+ children: [/* @__PURE__ */ h("span", {
444
+ className: "text-sm font-medium text-text-primary",
445
+ children: e.label
446
+ }), /* @__PURE__ */ h(I, {
447
+ label: e.label,
448
+ value: a[e.key] ?? 0,
449
+ onChange: (t) => o((n) => ({
450
+ ...n,
451
+ [e.key]: t
452
+ }))
453
+ })]
454
+ }, e.key))
455
+ }),
456
+ /* @__PURE__ */ g("div", {
457
+ className: "flex items-center justify-between border-t border-border-subtle pt-3 text-sm",
458
+ children: [/* @__PURE__ */ h("span", {
459
+ className: "font-medium text-text-primary",
460
+ children: "Overall"
461
+ }), u > 0 ? /* @__PURE__ */ h(r, {
462
+ value: u,
463
+ size: 16,
464
+ showValue: !0
465
+ }) : /* @__PURE__ */ h("span", {
466
+ className: "text-xs text-text-muted",
467
+ children: "Not scored"
468
+ })]
469
+ }),
470
+ /* @__PURE__ */ g("div", {
471
+ className: "space-y-1.5",
472
+ children: [/* @__PURE__ */ h("label", {
473
+ htmlFor: "scorecard-feedback",
474
+ className: "text-sm font-medium",
475
+ children: "Feedback"
476
+ }), /* @__PURE__ */ h(D, {
477
+ id: "scorecard-feedback",
478
+ rows: 5,
479
+ value: s,
480
+ onChange: (e) => l(e.target.value),
481
+ placeholder: "Summarize strengths, concerns, and a recommendation…"
482
+ })]
483
+ }),
484
+ /* @__PURE__ */ g("div", {
485
+ className: "flex gap-2",
486
+ children: [/* @__PURE__ */ h(v, {
487
+ className: "flex-1",
488
+ disabled: t,
489
+ onClick: () => n(!0, N(a, s)),
490
+ children: "Submit"
491
+ }), /* @__PURE__ */ h(v, {
492
+ variant: "outline",
493
+ className: "flex-1",
494
+ disabled: t,
495
+ onClick: () => n(!1, N(a, s)),
496
+ children: "Save Draft"
497
+ })]
498
+ })
499
+ ] });
500
+ }
328
501
  //#endregion
329
- export { D as HiringInterviewsPagePage };
502
+ export { z as HiringInterviewsPagePage };
330
503
 
331
504
  //# sourceMappingURL=HiringInterviewsPagePage.js.map