@burdenoff/microfe-support 2026.625.1 → 2026.625.2

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.
@@ -4,8 +4,9 @@ import { AlertCircle as i, Briefcase as a, ChevronDown as o, Filter as s, Loader
4
4
  import { useLocation as d, useNavigate as f } from "react-router-dom";
5
5
  import { graphqlFetch as p } from "@burdenoff/fe-libs/shared/graphql/fetch";
6
6
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
7
+ import { IllustratedEmptyState as _ } from "@burdenoff/fe-libs/ui";
7
8
  //#region src/support/pages/JobApplicationsPage.tsx
8
- var _ = {
9
+ var v = {
9
10
  NEW: "bg-status-info-bg-subtle text-status-info-text",
10
11
  SCREENING: "bg-status-warning-bg-subtle text-status-warning-text",
11
12
  SHORTLISTED: "bg-accent-purple-subtle text-accent-purple",
@@ -13,7 +14,7 @@ var _ = {
13
14
  HIRED: "bg-status-success-bg-subtle text-status-success-text",
14
15
  REJECTED: "bg-status-error-bg-subtle text-status-error-text",
15
16
  ARCHIVED: "bg-bg-sunken text-text-secondary"
16
- }, v = {
17
+ }, y = {
17
18
  NEW: "New",
18
19
  SCREENING: "Screening",
19
20
  SHORTLISTED: "Shortlisted",
@@ -22,7 +23,7 @@ var _ = {
22
23
  REJECTED: "Rejected",
23
24
  ARCHIVED: "Archived"
24
25
  };
25
- function y(e) {
26
+ function b(e) {
26
27
  return new Date(e).toLocaleDateString("en-US", {
27
28
  month: "short",
28
29
  day: "numeric",
@@ -31,24 +32,24 @@ function y(e) {
31
32
  minute: "2-digit"
32
33
  });
33
34
  }
34
- function b() {
35
- let b = f(), x = d().search, [S, C] = r(""), [w, T] = r(""), [E, D] = r(""), [O, k] = r(""), [A, j] = r(!1), [M, N] = r({}), P = n(M);
36
- P.current = M, t(() => {
37
- let e = setTimeout(() => T(S), 300);
35
+ function x() {
36
+ let x = f(), S = d().search, [C, w] = r(""), [T, E] = r(""), [D, O] = r(""), [k, A] = r(""), [j, M] = r(!1), [N, P] = r({}), F = n(N);
37
+ F.current = N, t(() => {
38
+ let e = setTimeout(() => E(C), 300);
38
39
  return () => clearTimeout(e);
39
- }, [S]);
40
- let F = {};
41
- w && (F.search = w), E && (F.status = E), O && (F.productId = O);
42
- let { data: I, loading: L, error: R, fetchMore: z } = e({
40
+ }, [C]);
41
+ let I = {};
42
+ T && (I.search = T), D && (I.status = D), k && (I.productId = k);
43
+ let { data: L, loading: R, error: z, fetchMore: B } = e({
43
44
  variables: {
44
- filter: F,
45
+ filter: I,
45
46
  limit: 50,
46
47
  offset: 0
47
48
  },
48
49
  fetchPolicy: "cache-and-network"
49
- }), B = I?.jobApplications?.items ?? [], V = I?.jobApplications?.total ?? 0, H = I?.jobApplications?.hasMore ?? !1, U = Array.from(new Set(B.flatMap((e) => e.productId ? [e.productId] : []))).sort(), W = U.join(",");
50
+ }), V = L?.jobApplications?.items ?? [], H = L?.jobApplications?.total ?? 0, U = L?.jobApplications?.hasMore ?? !1, W = Array.from(new Set(V.flatMap((e) => e.productId ? [e.productId] : []))).sort(), G = W.join(",");
50
51
  return t(() => {
51
- let e = W ? W.split(",").filter((e) => !P.current[e]) : [];
52
+ let e = G ? G.split(",").filter((e) => !F.current[e]) : [];
52
53
  e.length !== 0 && e.forEach((e) => {
53
54
  p({
54
55
  gateway: "global",
@@ -56,13 +57,13 @@ function b() {
56
57
  variables: { id: e }
57
58
  }).then((t) => {
58
59
  let n = t.data?.platformProduct?.name;
59
- n && N((t) => ({
60
+ n && P((t) => ({
60
61
  ...t,
61
62
  [e]: n
62
63
  }));
63
64
  }).catch(() => {});
64
65
  });
65
- }, [W]), L && B.length === 0 ? /* @__PURE__ */ g("div", {
66
+ }, [G]), R && V.length === 0 ? /* @__PURE__ */ g("div", {
66
67
  className: "p-6",
67
68
  children: [/* @__PURE__ */ g("div", {
68
69
  className: "flex items-center gap-3 mb-6",
@@ -83,7 +84,7 @@ function b() {
83
84
  children: "Loading applications…"
84
85
  })]
85
86
  })]
86
- }) : R ? /* @__PURE__ */ g("div", {
87
+ }) : z ? /* @__PURE__ */ g("div", {
87
88
  className: "p-6",
88
89
  children: [/* @__PURE__ */ g("div", {
89
90
  className: "flex items-center gap-3 mb-6",
@@ -107,7 +108,7 @@ function b() {
107
108
  }),
108
109
  /* @__PURE__ */ h("p", {
109
110
  className: "text-sm text-text-secondary",
110
- children: R.message
111
+ children: z.message
111
112
  })
112
113
  ]
113
114
  })]
@@ -132,7 +133,7 @@ function b() {
132
133
  })] }),
133
134
  /* @__PURE__ */ h("span", {
134
135
  className: "ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-bg-sunken text-text-secondary",
135
- children: V
136
+ children: H
136
137
  })
137
138
  ]
138
139
  })
@@ -148,25 +149,25 @@ function b() {
148
149
  type: "text",
149
150
  "aria-label": "Search applications",
150
151
  placeholder: "Search by name, email, or position...",
151
- value: S,
152
- onChange: (e) => C(e.target.value),
152
+ value: C,
153
+ onChange: (e) => w(e.target.value),
153
154
  className: "w-full pl-9 pr-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-accent/50"
154
155
  })]
155
156
  }), /* @__PURE__ */ g("button", {
156
157
  type: "button",
157
- onClick: () => j(!A),
158
+ onClick: () => M(!j),
158
159
  className: "inline-flex items-center gap-2 px-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
159
160
  children: [
160
161
  /* @__PURE__ */ h(s, { size: 16 }),
161
162
  "Filters",
162
163
  /* @__PURE__ */ h(o, {
163
164
  size: 14,
164
- className: A ? "rotate-180 transition-transform" : "transition-transform"
165
+ className: j ? "rotate-180 transition-transform" : "transition-transform"
165
166
  })
166
167
  ]
167
168
  })]
168
169
  }),
169
- A && /* @__PURE__ */ h("div", {
170
+ j && /* @__PURE__ */ h("div", {
170
171
  className: "mb-6 p-4 bg-bg-surface border border-border-seam rounded-lg",
171
172
  children: /* @__PURE__ */ g("div", {
172
173
  className: "flex flex-wrap gap-4",
@@ -176,8 +177,8 @@ function b() {
176
177
  children: "Status"
177
178
  }), /* @__PURE__ */ g("select", {
178
179
  id: "job-app-status-filter",
179
- value: E,
180
- onChange: (e) => D(e.target.value),
180
+ value: D,
181
+ onChange: (e) => O(e.target.value),
181
182
  className: "px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
182
183
  children: [
183
184
  /* @__PURE__ */ h("option", {
@@ -219,43 +220,28 @@ function b() {
219
220
  children: "Product"
220
221
  }), /* @__PURE__ */ g("select", {
221
222
  id: "job-app-product-filter",
222
- value: O,
223
- onChange: (e) => k(e.target.value),
223
+ value: k,
224
+ onChange: (e) => A(e.target.value),
224
225
  className: "px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
225
226
  children: [/* @__PURE__ */ h("option", {
226
227
  value: "",
227
228
  children: "All products"
228
- }), U.map((e) => /* @__PURE__ */ h("option", {
229
+ }), W.map((e) => /* @__PURE__ */ h("option", {
229
230
  value: e,
230
- children: M[e] || e
231
+ children: N[e] || e
231
232
  }, e))]
232
233
  })] })]
233
234
  })
234
235
  }),
235
- B.length === 0 ? /* @__PURE__ */ g("div", {
236
- className: "flex flex-col items-center justify-center py-16 text-center",
237
- children: [
238
- /* @__PURE__ */ h("div", {
239
- className: "p-4 rounded-2xl bg-bg-sunken mb-4",
240
- children: /* @__PURE__ */ h(a, {
241
- size: 48,
242
- className: "text-text-secondary opacity-50"
243
- })
244
- }),
245
- /* @__PURE__ */ h("h3", {
246
- className: "text-lg font-semibold text-text-primary mb-2",
247
- children: "No applications yet"
248
- }),
249
- /* @__PURE__ */ h("p", {
250
- className: "text-sm text-text-secondary",
251
- children: "Job applications from your careers pages will appear here."
252
- })
253
- ]
236
+ V.length === 0 ? /* @__PURE__ */ h(_, {
237
+ illustration: "empty-people",
238
+ title: "No applications yet",
239
+ description: "Job applications from your careers pages will appear here."
254
240
  }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
255
241
  className: "space-y-3",
256
- children: B.map((e) => /* @__PURE__ */ h("button", {
242
+ children: V.map((e) => /* @__PURE__ */ h("button", {
257
243
  type: "button",
258
- onClick: () => b(`/support/applications/${e.id}${x}`),
244
+ onClick: () => x(`/support/applications/${e.id}${S}`),
259
245
  className: "w-full text-left p-4 bg-bg-surface border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] duration-200 group",
260
246
  children: /* @__PURE__ */ g("div", {
261
247
  className: "flex items-start justify-between gap-4",
@@ -274,13 +260,13 @@ function b() {
274
260
  ]
275
261
  }),
276
262
  /* @__PURE__ */ h("span", {
277
- className: `inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${_[e.status] || _.NEW}`,
278
- children: v[e.status] || e.status
263
+ className: `inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${v[e.status] || v.NEW} ${e.status === "NEW" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
264
+ children: y[e.status] || e.status
279
265
  }),
280
- e.productId && M[e.productId] && /* @__PURE__ */ h("span", {
266
+ e.productId && N[e.productId] && /* @__PURE__ */ h("span", {
281
267
  className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-purple-subtle text-accent-purple",
282
- title: `Product: ${M[e.productId]}`,
283
- children: M[e.productId]
268
+ title: `Product: ${N[e.productId]}`,
269
+ children: N[e.productId]
284
270
  }),
285
271
  e.resumeFileName && /* @__PURE__ */ g("span", {
286
272
  className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-accent-blue-subtle text-accent-blue",
@@ -305,26 +291,26 @@ function b() {
305
291
  ]
306
292
  }), /* @__PURE__ */ h("div", {
307
293
  className: "text-xs text-text-secondary whitespace-nowrap",
308
- children: y(e.createdAt)
294
+ children: b(e.createdAt)
309
295
  })]
310
296
  })
311
297
  }, e.id))
312
- }), H && /* @__PURE__ */ h("div", {
298
+ }), U && /* @__PURE__ */ h("div", {
313
299
  className: "flex justify-center mt-6",
314
300
  children: /* @__PURE__ */ g("button", {
315
301
  type: "button",
316
302
  onClick: () => {
317
- H && z({
318
- variables: { offset: B.length },
303
+ U && B({
304
+ variables: { offset: V.length },
319
305
  updateQuery: (e, { fetchMoreResult: t }) => t ? { jobApplications: {
320
306
  ...t.jobApplications,
321
307
  items: [...e.jobApplications?.items ?? [], ...t.jobApplications?.items ?? []]
322
308
  } } : e
323
309
  });
324
310
  },
325
- disabled: L,
311
+ disabled: R,
326
312
  className: "inline-flex items-center gap-2 px-6 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors disabled:opacity-50",
327
- children: [L ? /* @__PURE__ */ h(c, {
313
+ children: [R ? /* @__PURE__ */ h(c, {
328
314
  size: 14,
329
315
  className: "animate-spin"
330
316
  }) : null, "Load more"]
@@ -334,6 +320,6 @@ function b() {
334
320
  });
335
321
  }
336
322
  //#endregion
337
- export { b as JobApplicationsPage };
323
+ export { x as JobApplicationsPage };
338
324
 
339
325
  //# sourceMappingURL=JobApplicationsPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"JobApplicationsPage.js","names":[],"sources":["../../../src/support/pages/JobApplicationsPage.tsx"],"sourcesContent":["import { useState, useEffect, useRef } from 'react';\nimport { useNavigate, useLocation } from 'react-router-dom';\nimport {\n Briefcase,\n Search,\n Filter,\n Loader2,\n AlertCircle,\n ChevronDown,\n Paperclip,\n} from 'lucide-react';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport {\n useGetJobApplicationsQuery,\n type GetJobApplicationsQuery,\n} from '../../generated/global-operations';\nimport type { JobApplicationStatus, JobApplicationFilterInput } from '../../generated/global-types';\n\ntype JobApplication = GetJobApplicationsQuery['jobApplications']['items'][number];\n\nconst statusColors: Record<string, string> = {\n NEW: 'bg-status-info-bg-subtle text-status-info-text',\n SCREENING: 'bg-status-warning-bg-subtle text-status-warning-text',\n SHORTLISTED: 'bg-accent-purple-subtle text-accent-purple',\n INTERVIEW: 'bg-accent-blue-subtle text-accent-blue',\n HIRED: 'bg-status-success-bg-subtle text-status-success-text',\n REJECTED: 'bg-status-error-bg-subtle text-status-error-text',\n ARCHIVED: 'bg-bg-sunken text-text-secondary',\n};\n\nconst statusLabels: Record<string, string> = {\n NEW: 'New',\n SCREENING: 'Screening',\n SHORTLISTED: 'Shortlisted',\n INTERVIEW: 'Interview',\n HIRED: 'Hired',\n REJECTED: 'Rejected',\n ARCHIVED: 'Archived',\n};\n\nfunction formatDate(dateString: string): string {\n return new Date(dateString).toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nexport function JobApplicationsPage() {\n const navigate = useNavigate();\n const location = useLocation();\n const queryParams = location.search;\n const [search, setSearch] = useState('');\n const [debouncedSearch, setDebouncedSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState<JobApplicationStatus | ''>('');\n const [productFilter, setProductFilter] = useState('');\n const [showFilters, setShowFilters] = useState(false);\n const [productNames, setProductNames] = useState<Record<string, string>>({});\n // Mirror the latest map into a ref so the resolver effect can read it\n // without re-running every time we cache a freshly-resolved name.\n const productNamesRef = useRef(productNames);\n productNamesRef.current = productNames;\n\n // Debounce the search box so we don't fire a query on every keystroke.\n useEffect(() => {\n const t = setTimeout(() => setDebouncedSearch(search), 300);\n return () => clearTimeout(t);\n }, [search]);\n\n const filter: JobApplicationFilterInput = {};\n if (debouncedSearch) filter.search = debouncedSearch;\n if (statusFilter) filter.status = statusFilter;\n if (productFilter) filter.productId = productFilter;\n\n const { data, loading, error, fetchMore } = useGetJobApplicationsQuery({\n variables: { filter, limit: 50, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n\n const applications = data?.jobApplications?.items ?? [];\n const total = data?.jobApplications?.total ?? 0;\n const hasMore = data?.jobApplications?.hasMore ?? false;\n\n // Resolve human-readable product names for the badges/filter (same one-shot\n // federated lookup the inquiries list uses).\n const productIds = Array.from(\n new Set(\n applications.flatMap((a: JobApplication): string[] => (a.productId ? [a.productId] : []))\n )\n ).sort() as string[];\n const productIdsKey = productIds.join(',');\n useEffect(() => {\n const unknownIds = productIdsKey\n ? productIdsKey.split(',').filter((pid) => !productNamesRef.current[pid])\n : [];\n if (unknownIds.length === 0) return;\n unknownIds.forEach((pid) => {\n graphqlFetch<{ platformProduct?: { name?: string } }>({\n gateway: 'global',\n query: 'query($id: ID!) { platformProduct(id: $id) { name } }',\n variables: { id: pid },\n })\n .then((result) => {\n const name = result.data?.platformProduct?.name;\n if (name) setProductNames((prev) => ({ ...prev, [pid]: name }));\n })\n .catch(() => {});\n });\n }, [productIdsKey]);\n\n const loadMore = () => {\n if (!hasMore) return;\n fetchMore({\n variables: { offset: applications.length },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult) return prev;\n return {\n jobApplications: {\n ...fetchMoreResult.jobApplications,\n items: [\n ...(prev.jobApplications?.items ?? []),\n ...(fetchMoreResult.jobApplications?.items ?? []),\n ],\n },\n };\n },\n });\n };\n\n // Loading state\n if (loading && applications.length === 0) {\n return (\n <div className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16\">\n <Loader2 size={32} className=\"animate-spin text-text-secondary mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading applications…</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4\">\n <AlertCircle size={48} />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">\n Failed to load applications\n </h3>\n <p className=\"text-sm text-text-secondary\">{error.message}</p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"p-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-3\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n <p className=\"text-sm text-text-secondary\">Careers form submissions</p>\n </div>\n <span className=\"ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-bg-sunken text-text-secondary\">\n {total}\n </span>\n </div>\n </div>\n\n {/* Toolbar */}\n <div className=\"flex flex-col sm:flex-row gap-3 mb-6\">\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search\n size={16}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <input\n type=\"text\"\n aria-label=\"Search applications\"\n placeholder=\"Search by name, email, or position...\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"w-full pl-9 pr-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n />\n </div>\n\n {/* Filter toggle */}\n <button\n type=\"button\"\n onClick={() => setShowFilters(!showFilters)}\n className=\"inline-flex items-center gap-2 px-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors\"\n >\n <Filter size={16} />\n Filters\n <ChevronDown\n size={14}\n className={showFilters ? 'rotate-180 transition-transform' : 'transition-transform'}\n />\n </button>\n </div>\n\n {/* Filters panel */}\n {showFilters && (\n <div className=\"mb-6 p-4 bg-bg-surface border border-border-seam rounded-lg\">\n <div className=\"flex flex-wrap gap-4\">\n <div>\n <label\n htmlFor=\"job-app-status-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Status\n </label>\n <select\n id=\"job-app-status-filter\"\n value={statusFilter}\n onChange={(e) => setStatusFilter(e.target.value as JobApplicationStatus | '')}\n className=\"px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All statuses</option>\n <option value=\"NEW\">New</option>\n <option value=\"SCREENING\">Screening</option>\n <option value=\"SHORTLISTED\">Shortlisted</option>\n <option value=\"INTERVIEW\">Interview</option>\n <option value=\"HIRED\">Hired</option>\n <option value=\"REJECTED\">Rejected</option>\n <option value=\"ARCHIVED\">Archived</option>\n </select>\n </div>\n <div>\n <label\n htmlFor=\"job-app-product-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Product\n </label>\n <select\n id=\"job-app-product-filter\"\n value={productFilter}\n onChange={(e) => setProductFilter(e.target.value)}\n className=\"px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All products</option>\n {productIds.map((pid) => (\n <option key={pid} value={pid}>\n {productNames[pid] || pid}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n )}\n\n {/* Empty state */}\n {applications.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-bg-sunken mb-4\">\n <Briefcase size={48} className=\"text-text-secondary opacity-50\" />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">No applications yet</h3>\n <p className=\"text-sm text-text-secondary\">\n Job applications from your careers pages will appear here.\n </p>\n </div>\n ) : (\n <>\n {/* Application list */}\n <div className=\"space-y-3\">\n {applications.map((application: JobApplication) => (\n <button\n type=\"button\"\n key={application.id}\n onClick={() => navigate(`/support/applications/${application.id}${queryParams}`)}\n className=\"w-full text-left p-4 bg-bg-surface border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] duration-200 group\"\n >\n <div className=\"flex items-start justify-between gap-4\">\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 mb-1 flex-wrap\">\n <h3 className=\"text-sm font-semibold text-text-primary truncate group-hover:text-accent transition-colors\">\n {application.firstName} {application.lastName}\n </h3>\n <span\n className={`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${statusColors[application.status] || statusColors.NEW}`}\n >\n {statusLabels[application.status] || application.status}\n </span>\n {application.productId && productNames[application.productId] && (\n <span\n className=\"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-purple-subtle text-accent-purple\"\n title={`Product: ${productNames[application.productId]}`}\n >\n {productNames[application.productId]}\n </span>\n )}\n {application.resumeFileName && (\n <span className=\"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-accent-blue-subtle text-accent-blue\">\n <Paperclip size={11} />\n Resume\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-secondary mb-1\">\n <span className=\"font-medium\">{application.position}</span>\n {application.department && (\n <>\n <span className=\"mx-1.5 text-text-secondary/50\">&middot;</span>\n <span>{application.department}</span>\n </>\n )}\n </p>\n <p className=\"text-xs text-text-secondary truncate\">{application.email}</p>\n </div>\n <div className=\"text-xs text-text-secondary whitespace-nowrap\">\n {formatDate(application.createdAt)}\n </div>\n </div>\n </button>\n ))}\n </div>\n\n {/* Load more */}\n {hasMore && (\n <div className=\"flex justify-center mt-6\">\n <button\n type=\"button\"\n onClick={loadMore}\n disabled={loading}\n className=\"inline-flex items-center gap-2 px-6 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors disabled:opacity-50\"\n >\n {loading ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Load more\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;AA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GAT4B;OAWhC,CAAC;;KAsNU,UAAU;KACV,WAAU;eAJZ,CAMG,IAAU,kBAAC,GAAD;MAAS,MAAM;MAAI,WAAU;MAAiB,CAAA,GAAG,MAAK,YAE1D;;IACL,CAAA,CAEP,EAAA,CAAA;GAED"}
1
+ {"version":3,"file":"JobApplicationsPage.js","names":[],"sources":["../../../src/support/pages/JobApplicationsPage.tsx"],"sourcesContent":["import { useState, useEffect, useRef } from 'react';\nimport { useNavigate, useLocation } from 'react-router-dom';\nimport {\n Briefcase,\n Search,\n Filter,\n Loader2,\n AlertCircle,\n ChevronDown,\n Paperclip,\n} from 'lucide-react';\nimport { IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport {\n useGetJobApplicationsQuery,\n type GetJobApplicationsQuery,\n} from '../../generated/global-operations';\nimport type { JobApplicationStatus, JobApplicationFilterInput } from '../../generated/global-types';\n\ntype JobApplication = GetJobApplicationsQuery['jobApplications']['items'][number];\n\nconst statusColors: Record<string, string> = {\n NEW: 'bg-status-info-bg-subtle text-status-info-text',\n SCREENING: 'bg-status-warning-bg-subtle text-status-warning-text',\n SHORTLISTED: 'bg-accent-purple-subtle text-accent-purple',\n INTERVIEW: 'bg-accent-blue-subtle text-accent-blue',\n HIRED: 'bg-status-success-bg-subtle text-status-success-text',\n REJECTED: 'bg-status-error-bg-subtle text-status-error-text',\n ARCHIVED: 'bg-bg-sunken text-text-secondary',\n};\n\nconst statusLabels: Record<string, string> = {\n NEW: 'New',\n SCREENING: 'Screening',\n SHORTLISTED: 'Shortlisted',\n INTERVIEW: 'Interview',\n HIRED: 'Hired',\n REJECTED: 'Rejected',\n ARCHIVED: 'Archived',\n};\n\nfunction formatDate(dateString: string): string {\n return new Date(dateString).toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nexport function JobApplicationsPage() {\n const navigate = useNavigate();\n const location = useLocation();\n const queryParams = location.search;\n const [search, setSearch] = useState('');\n const [debouncedSearch, setDebouncedSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState<JobApplicationStatus | ''>('');\n const [productFilter, setProductFilter] = useState('');\n const [showFilters, setShowFilters] = useState(false);\n const [productNames, setProductNames] = useState<Record<string, string>>({});\n // Mirror the latest map into a ref so the resolver effect can read it\n // without re-running every time we cache a freshly-resolved name.\n const productNamesRef = useRef(productNames);\n productNamesRef.current = productNames;\n\n // Debounce the search box so we don't fire a query on every keystroke.\n useEffect(() => {\n const t = setTimeout(() => setDebouncedSearch(search), 300);\n return () => clearTimeout(t);\n }, [search]);\n\n const filter: JobApplicationFilterInput = {};\n if (debouncedSearch) filter.search = debouncedSearch;\n if (statusFilter) filter.status = statusFilter;\n if (productFilter) filter.productId = productFilter;\n\n const { data, loading, error, fetchMore } = useGetJobApplicationsQuery({\n variables: { filter, limit: 50, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n\n const applications = data?.jobApplications?.items ?? [];\n const total = data?.jobApplications?.total ?? 0;\n const hasMore = data?.jobApplications?.hasMore ?? false;\n\n // Resolve human-readable product names for the badges/filter (same one-shot\n // federated lookup the inquiries list uses).\n const productIds = Array.from(\n new Set(\n applications.flatMap((a: JobApplication): string[] => (a.productId ? [a.productId] : []))\n )\n ).sort() as string[];\n const productIdsKey = productIds.join(',');\n useEffect(() => {\n const unknownIds = productIdsKey\n ? productIdsKey.split(',').filter((pid) => !productNamesRef.current[pid])\n : [];\n if (unknownIds.length === 0) return;\n unknownIds.forEach((pid) => {\n graphqlFetch<{ platformProduct?: { name?: string } }>({\n gateway: 'global',\n query: 'query($id: ID!) { platformProduct(id: $id) { name } }',\n variables: { id: pid },\n })\n .then((result) => {\n const name = result.data?.platformProduct?.name;\n if (name) setProductNames((prev) => ({ ...prev, [pid]: name }));\n })\n .catch(() => {});\n });\n }, [productIdsKey]);\n\n const loadMore = () => {\n if (!hasMore) return;\n fetchMore({\n variables: { offset: applications.length },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult) return prev;\n return {\n jobApplications: {\n ...fetchMoreResult.jobApplications,\n items: [\n ...(prev.jobApplications?.items ?? []),\n ...(fetchMoreResult.jobApplications?.items ?? []),\n ],\n },\n };\n },\n });\n };\n\n // Loading state\n if (loading && applications.length === 0) {\n return (\n <div className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16\">\n <Loader2 size={32} className=\"animate-spin text-text-secondary mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading applications…</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4\">\n <AlertCircle size={48} />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">\n Failed to load applications\n </h3>\n <p className=\"text-sm text-text-secondary\">{error.message}</p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"p-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-3\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n <p className=\"text-sm text-text-secondary\">Careers form submissions</p>\n </div>\n <span className=\"ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-bg-sunken text-text-secondary\">\n {total}\n </span>\n </div>\n </div>\n\n {/* Toolbar */}\n <div className=\"flex flex-col sm:flex-row gap-3 mb-6\">\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search\n size={16}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <input\n type=\"text\"\n aria-label=\"Search applications\"\n placeholder=\"Search by name, email, or position...\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"w-full pl-9 pr-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n />\n </div>\n\n {/* Filter toggle */}\n <button\n type=\"button\"\n onClick={() => setShowFilters(!showFilters)}\n className=\"inline-flex items-center gap-2 px-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors\"\n >\n <Filter size={16} />\n Filters\n <ChevronDown\n size={14}\n className={showFilters ? 'rotate-180 transition-transform' : 'transition-transform'}\n />\n </button>\n </div>\n\n {/* Filters panel */}\n {showFilters && (\n <div className=\"mb-6 p-4 bg-bg-surface border border-border-seam rounded-lg\">\n <div className=\"flex flex-wrap gap-4\">\n <div>\n <label\n htmlFor=\"job-app-status-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Status\n </label>\n <select\n id=\"job-app-status-filter\"\n value={statusFilter}\n onChange={(e) => setStatusFilter(e.target.value as JobApplicationStatus | '')}\n className=\"px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All statuses</option>\n <option value=\"NEW\">New</option>\n <option value=\"SCREENING\">Screening</option>\n <option value=\"SHORTLISTED\">Shortlisted</option>\n <option value=\"INTERVIEW\">Interview</option>\n <option value=\"HIRED\">Hired</option>\n <option value=\"REJECTED\">Rejected</option>\n <option value=\"ARCHIVED\">Archived</option>\n </select>\n </div>\n <div>\n <label\n htmlFor=\"job-app-product-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Product\n </label>\n <select\n id=\"job-app-product-filter\"\n value={productFilter}\n onChange={(e) => setProductFilter(e.target.value)}\n className=\"px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All products</option>\n {productIds.map((pid) => (\n <option key={pid} value={pid}>\n {productNames[pid] || pid}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n )}\n\n {/* Empty state */}\n {applications.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-people\"\n title=\"No applications yet\"\n description=\"Job applications from your careers pages will appear here.\"\n />\n ) : (\n <>\n {/* Application list */}\n <div className=\"space-y-3\">\n {applications.map((application: JobApplication) => (\n <button\n type=\"button\"\n key={application.id}\n onClick={() => navigate(`/support/applications/${application.id}${queryParams}`)}\n className=\"w-full text-left p-4 bg-bg-surface border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] duration-200 group\"\n >\n <div className=\"flex items-start justify-between gap-4\">\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 mb-1 flex-wrap\">\n <h3 className=\"text-sm font-semibold text-text-primary truncate group-hover:text-accent transition-colors\">\n {application.firstName} {application.lastName}\n </h3>\n <span\n className={`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${statusColors[application.status] || statusColors.NEW} ${application.status === 'NEW' ? 'motion-safe:animate-vc-glow-pulse' : ''}`}\n >\n {statusLabels[application.status] || application.status}\n </span>\n {application.productId && productNames[application.productId] && (\n <span\n className=\"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-purple-subtle text-accent-purple\"\n title={`Product: ${productNames[application.productId]}`}\n >\n {productNames[application.productId]}\n </span>\n )}\n {application.resumeFileName && (\n <span className=\"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-accent-blue-subtle text-accent-blue\">\n <Paperclip size={11} />\n Resume\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-secondary mb-1\">\n <span className=\"font-medium\">{application.position}</span>\n {application.department && (\n <>\n <span className=\"mx-1.5 text-text-secondary/50\">&middot;</span>\n <span>{application.department}</span>\n </>\n )}\n </p>\n <p className=\"text-xs text-text-secondary truncate\">{application.email}</p>\n </div>\n <div className=\"text-xs text-text-secondary whitespace-nowrap\">\n {formatDate(application.createdAt)}\n </div>\n </div>\n </button>\n ))}\n </div>\n\n {/* Load more */}\n {hasMore && (\n <div className=\"flex justify-center mt-6\">\n <button\n type=\"button\"\n onClick={loadMore}\n disabled={loading}\n className=\"inline-flex items-center gap-2 px-6 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors disabled:opacity-50\"\n >\n {loading ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Load more\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAqBA,IAAM,IAAuC;CAC3C,KAAK;CACL,WAAW;CACX,aAAa;CACb,WAAW;CACX,OAAO;CACP,UAAU;CACV,UAAU;CACX,EAEK,IAAuC;CAC3C,KAAK;CACL,WAAW;CACX,aAAa;CACb,WAAW;CACX,OAAO;CACP,UAAU;CACV,UAAU;CACX;AAED,SAAS,EAAW,GAA4B;AAC9C,QAAO,IAAI,KAAK,EAAW,CAAC,mBAAmB,SAAS;EACtD,OAAO;EACP,KAAK;EACL,MAAM;EACN,MAAM;EACN,QAAQ;EACT,CAAC;;AAGJ,SAAgB,IAAsB;CACpC,IAAM,IAAW,GAAa,EAExB,IADW,GAAa,CACD,QACvB,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,CAAC,GAAiB,KAAsB,EAAS,GAAG,EACpD,CAAC,GAAc,KAAmB,EAAoC,GAAG,EACzE,CAAC,GAAe,KAAoB,EAAS,GAAG,EAChD,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,CAAC,GAAc,KAAmB,EAAiC,EAAE,CAAC,EAGtE,IAAkB,EAAO,EAAa;AAI5C,CAHA,EAAgB,UAAU,G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AU;iBACZ,EAAW,EAAY,UAAU;OAC9B,CAAA,CACF;;KACC,EA7CF,EAAY,GA6CV,CACT;IACE,CAAA,EAGL,KACC,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,UAAD;KACE,MAAK;KACL,eAjOS;AAChB,WACL,EAAU;OACR,WAAW,EAAE,QAAQ,EAAa,QAAQ;OAC1C,cAAc,GAAM,EAAE,yBACf,IACE,EACL,iBAAiB;QACf,GAAG,EAAgB;QACnB,OAAO,CACL,GAAI,EAAK,iBAAiB,SAAS,EAAE,EACrC,GAAI,EAAgB,iBAAiB,SAAS,EAAE,CACjD;QACF,EACF,GAT4B;OAWhC,CAAC;;KAkNU,UAAU;KACV,WAAU;eAJZ,CAMG,IAAU,kBAAC,GAAD;MAAS,MAAM;MAAI,WAAU;MAAiB,CAAA,GAAG,MAAK,YAE1D;;IACL,CAAA,CAEP,EAAA,CAAA;GAED"}
@@ -196,7 +196,7 @@ function C() {
196
196
  children: "Load More"
197
197
  })
198
198
  })] }) : /* @__PURE__ */ x(i, {
199
- icon: /* @__PURE__ */ x(d, { size: 48 }),
199
+ illustration: V ? "empty-search" : "empty-files",
200
200
  title: V ? "No articles found" : "No articles available",
201
201
  description: V ? "Try adjusting your search terms or browse by category" : "Check back later for helpful articles and guides"
202
202
  })] })
@@ -1 +1 @@
1
- {"version":3,"file":"KnowledgeBaseAdminPage.js","names":[],"sources":["../../../src/support/pages/KnowledgeBaseAdminPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport {\n BookOpen,\n Search,\n TrendingUp,\n FolderOpen,\n Eye,\n ThumbsUp,\n Plus,\n GlobeLock,\n Archive,\n} from 'lucide-react';\nimport { Button, Input, Badge } from '../components/ui';\nimport { useKnowledgeBaseOperations } from '../hooks/useKnowledgeBaseOperations';\nimport { PageLayout, LoadingState, EmptyState } from '../components/PageLayout';\nimport { useSupport } from '../providers/SupportProvider';\nimport { getCategoryBadgeClass } from '../utils/categoryColors';\nimport type { TicketCategory, KnowledgeBaseArticle } from '../../generated/global-types';\n\n/**\n * Admin-facing knowledge base page.\n *\n * Shows all articles (published, draft, archived) with status badges.\n * Includes \"New Article\" button for creating KB content.\n */\nexport function KnowledgeBaseAdminPage() {\n const navigate = useNavigate();\n const { basePath = '' } = useSupport();\n const {\n articles,\n popularArticles,\n categories,\n searchResults,\n articlesLoading,\n popularLoading,\n categoriesLoading,\n searchLoading,\n searchArticles,\n filterArticles,\n hasMoreArticles,\n loadMoreArticles,\n } = useKnowledgeBaseOperations();\n\n const [query, setQuery] = useState('');\n const [selectedCategory, setSelectedCategory] = useState<string | null>(null);\n const [showSearch, setShowSearch] = useState(false);\n\n const handleSearch = (e: React.FormEvent) => {\n e.preventDefault();\n if (query.trim()) {\n searchArticles(query, { categoryId: selectedCategory ?? undefined });\n setShowSearch(true);\n }\n };\n\n const handleClearSearch = () => {\n setQuery('');\n setShowSearch(false);\n setSelectedCategory(null);\n filterArticles({ categoryId: undefined, tags: [] });\n };\n\n const selectedCategoryName = categories.find(\n (category: TicketCategory) => category.id === selectedCategory\n )?.name;\n\n const displayArticles: KnowledgeBaseArticle[] =\n showSearch && query ? (searchResults as unknown as KnowledgeBaseArticle[]) : articles;\n const isLoading = showSearch ? searchLoading : articlesLoading;\n\n return (\n <PageLayout\n title=\"Knowledge Base\"\n subtitle=\"Manage help articles and documentation\"\n icon={<BookOpen size={24} />}\n headerActions={\n <Button onClick={() => navigate(`${basePath}/kb/articles/new`)}>\n <Plus size={18} />\n New Article\n </Button>\n }\n >\n {/* Search */}\n <div className=\"relative max-w-2xl\">\n <form onSubmit={handleSearch} className=\"relative\">\n <Search\n size={20}\n className=\"absolute left-4 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <Input\n type=\"text\"\n value={query}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => setQuery(e.target.value)}\n placeholder=\"Search for help articles...\"\n className=\"pl-12 pr-4 py-6 text-lg\"\n />\n {query && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={handleClearSearch}\n className=\"absolute right-2 top-1/2 -translate-y-1/2\"\n >\n Clear\n </Button>\n )}\n </form>\n </div>\n\n {/* Categories */}\n {!showSearch && !categoriesLoading && categories.length > 0 && (\n <div>\n <h2 className=\"text-lg font-semibold mb-4 flex items-center gap-2 text-text-primary\">\n <FolderOpen size={20} className=\"text-primary\" />\n Browse by Category\n </h2>\n <div className=\"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4\">\n {categories.slice(0, 8).map((category: TicketCategory) => (\n <button\n type=\"button\"\n key={category.id}\n onClick={() => {\n setSelectedCategory(category.id);\n setShowSearch(false);\n filterArticles({ categoryId: category.id });\n }}\n className={`p-4 rounded-xl border border-border-seam text-left transition-[box-shadow,border-color] duration-200 shadow-[var(--shadow-pop)] hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong bg-bg-surface ${\n selectedCategory === category.id ? 'border-primary ring-2 ring-primary/20' : ''\n }`}\n >\n <div className=\"text-2xl mb-2\">{category.icon || '📁'}</div>\n <p className=\"font-medium text-text-primary mb-1\">{category.name}</p>\n <p className=\"text-xs text-text-secondary\">\n {category.articleCount || 0} articles\n </p>\n </button>\n ))}\n </div>\n </div>\n )}\n\n {/* Popular Articles */}\n {!showSearch && !popularLoading && popularArticles.length > 0 && (\n <div>\n <h2 className=\"text-lg font-semibold mb-4 flex items-center gap-2 text-text-primary\">\n <TrendingUp size={20} className=\"text-primary\" />\n Popular Articles\n </h2>\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {popularArticles.map((article: KnowledgeBaseArticle) => (\n <button\n type=\"button\"\n key={article.id}\n onClick={() => navigate(`${basePath}/kb/articles/${article.slug}`)}\n className=\"p-5 rounded-xl border border-border-seam bg-bg-surface text-left transition-[box-shadow,border-color] duration-200 shadow-[var(--shadow-pop)] hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong group\"\n >\n <h3 className=\"font-semibold text-text-primary mb-2 group-hover:text-primary transition-colors\">\n {article.title}\n </h3>\n <p className=\"text-sm text-text-secondary mb-3 line-clamp-2\">{article.excerpt}</p>\n <div className=\"flex items-center gap-4 text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <Eye size={14} />\n {article.viewCount} views\n </span>\n <span className=\"flex items-center gap-1\">\n <ThumbsUp size={14} />\n {article.helpfulCount} helpful\n </span>\n </div>\n </button>\n ))}\n </div>\n </div>\n )}\n\n {/* Articles List */}\n <div>\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {showSearch && query\n ? `Search Results for \"${query}\"`\n : selectedCategoryName || 'All Articles'}\n </h2>\n {(showSearch || selectedCategory) && (\n <Button variant=\"outline\" size=\"sm\" onClick={handleClearSearch}>\n {showSearch ? 'Clear Search' : 'All Articles'}\n </Button>\n )}\n </div>\n\n {isLoading ? (\n <LoadingState message=\"Loading articles...\" />\n ) : displayArticles.length > 0 ? (\n <>\n <div className=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n {displayArticles.map((article: KnowledgeBaseArticle) => (\n <button\n type=\"button\"\n key={article.id}\n onClick={() => navigate(`${basePath}/kb/articles/${article.slug}`)}\n className=\"p-6 rounded-xl border border-border-seam bg-bg-surface text-left transition-[box-shadow,border-color] duration-200 shadow-[var(--shadow-pop)] hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong group\"\n >\n <div className=\"flex items-center gap-2 mb-2 flex-wrap\">\n {article.category && (\n <Badge\n variant=\"outline\"\n className={getCategoryBadgeClass(article.category.color)}\n >\n {article.category.name}\n </Badge>\n )}\n {article.status === 'DRAFT' && (\n <Badge className=\"bg-status-warning-bg-subtle text-status-warning-text text-xs\">\n <GlobeLock size={10} className=\"mr-1\" />\n Draft\n </Badge>\n )}\n {article.status === 'ARCHIVED' && (\n <Badge className=\"bg-bg-sunken text-text-secondary text-xs\">\n <Archive size={10} className=\"mr-1\" />\n Archived\n </Badge>\n )}\n </div>\n <h3 className=\"font-semibold text-lg text-text-primary mb-2 group-hover:text-primary transition-colors\">\n {article.title}\n </h3>\n <p className=\"text-sm text-text-secondary mb-4 line-clamp-3\">\n {article.excerpt}\n </p>\n <div className=\"flex items-center justify-between text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <Eye size={14} />\n {article.viewCount}\n </span>\n <span className=\"flex items-center gap-1\">\n <ThumbsUp size={14} />\n {article.helpfulCount}\n </span>\n </div>\n </button>\n ))}\n </div>\n\n {hasMoreArticles && (\n <div className=\"flex justify-center mt-6\">\n <Button variant=\"outline\" onClick={loadMoreArticles}>\n Load More\n </Button>\n </div>\n )}\n </>\n ) : (\n <EmptyState\n icon={<BookOpen size={48} />}\n title={showSearch ? 'No articles found' : 'No articles available'}\n description={\n showSearch\n ? 'Try adjusting your search terms or browse by category'\n : 'Check back later for helpful articles and guides'\n }\n />\n )}\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAgB,IAAyB;CACvC,IAAM,IAAW,GAAa,EACxB,EAAE,cAAW,OAAO,GAAY,EAChC,EACJ,aACA,oBACA,eACA,kBACA,oBACA,mBACA,sBACA,kBACA,mBACA,mBACA,oBACA,wBACE,GAA4B,EAE1B,CAAC,GAAO,KAAY,EAAS,GAAG,EAChC,CAAC,GAAkB,KAAuB,EAAwB,KAAK,EACvE,CAAC,GAAY,KAAiB,EAAS,GAAM,EAE7C,KAAgB,MAAuB;AAE3C,EADA,EAAE,gBAAgB,EACd,EAAM,MAAM,KACd,EAAe,GAAO,EAAE,YAAY,KAAoB,KAAA,GAAW,CAAC,EACpE,EAAc,GAAK;IAIjB,UAA0B;AAI9B,EAHA,EAAS,GAAG,EACZ,EAAc,GAAM,EACpB,EAAoB,KAAK,EACzB,EAAe;GAAE,YAAY,KAAA;GAAW,MAAM,EAAE;GAAE,CAAC;IAG/C,IAAuB,EAAW,MACrC,MAA6B,EAAS,OAAO,EAC/C,EAAE,MAEG,IACJ,KAAc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"file":"KnowledgeBaseAdminPage.js","names":[],"sources":["../../../src/support/pages/KnowledgeBaseAdminPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport {\n BookOpen,\n Search,\n TrendingUp,\n FolderOpen,\n Eye,\n ThumbsUp,\n Plus,\n GlobeLock,\n Archive,\n} from 'lucide-react';\nimport { Button, Input, Badge } from '../components/ui';\nimport { useKnowledgeBaseOperations } from '../hooks/useKnowledgeBaseOperations';\nimport { PageLayout, LoadingState, EmptyState } from '../components/PageLayout';\nimport { useSupport } from '../providers/SupportProvider';\nimport { getCategoryBadgeClass } from '../utils/categoryColors';\nimport type { TicketCategory, KnowledgeBaseArticle } from '../../generated/global-types';\n\n/**\n * Admin-facing knowledge base page.\n *\n * Shows all articles (published, draft, archived) with status badges.\n * Includes \"New Article\" button for creating KB content.\n */\nexport function KnowledgeBaseAdminPage() {\n const navigate = useNavigate();\n const { basePath = '' } = useSupport();\n const {\n articles,\n popularArticles,\n categories,\n searchResults,\n articlesLoading,\n popularLoading,\n categoriesLoading,\n searchLoading,\n searchArticles,\n filterArticles,\n hasMoreArticles,\n loadMoreArticles,\n } = useKnowledgeBaseOperations();\n\n const [query, setQuery] = useState('');\n const [selectedCategory, setSelectedCategory] = useState<string | null>(null);\n const [showSearch, setShowSearch] = useState(false);\n\n const handleSearch = (e: React.FormEvent) => {\n e.preventDefault();\n if (query.trim()) {\n searchArticles(query, { categoryId: selectedCategory ?? undefined });\n setShowSearch(true);\n }\n };\n\n const handleClearSearch = () => {\n setQuery('');\n setShowSearch(false);\n setSelectedCategory(null);\n filterArticles({ categoryId: undefined, tags: [] });\n };\n\n const selectedCategoryName = categories.find(\n (category: TicketCategory) => category.id === selectedCategory\n )?.name;\n\n const displayArticles: KnowledgeBaseArticle[] =\n showSearch && query ? (searchResults as unknown as KnowledgeBaseArticle[]) : articles;\n const isLoading = showSearch ? searchLoading : articlesLoading;\n\n return (\n <PageLayout\n title=\"Knowledge Base\"\n subtitle=\"Manage help articles and documentation\"\n icon={<BookOpen size={24} />}\n headerActions={\n <Button onClick={() => navigate(`${basePath}/kb/articles/new`)}>\n <Plus size={18} />\n New Article\n </Button>\n }\n >\n {/* Search */}\n <div className=\"relative max-w-2xl\">\n <form onSubmit={handleSearch} className=\"relative\">\n <Search\n size={20}\n className=\"absolute left-4 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <Input\n type=\"text\"\n value={query}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => setQuery(e.target.value)}\n placeholder=\"Search for help articles...\"\n className=\"pl-12 pr-4 py-6 text-lg\"\n />\n {query && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={handleClearSearch}\n className=\"absolute right-2 top-1/2 -translate-y-1/2\"\n >\n Clear\n </Button>\n )}\n </form>\n </div>\n\n {/* Categories */}\n {!showSearch && !categoriesLoading && categories.length > 0 && (\n <div>\n <h2 className=\"text-lg font-semibold mb-4 flex items-center gap-2 text-text-primary\">\n <FolderOpen size={20} className=\"text-primary\" />\n Browse by Category\n </h2>\n <div className=\"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4\">\n {categories.slice(0, 8).map((category: TicketCategory) => (\n <button\n type=\"button\"\n key={category.id}\n onClick={() => {\n setSelectedCategory(category.id);\n setShowSearch(false);\n filterArticles({ categoryId: category.id });\n }}\n className={`p-4 rounded-xl border border-border-seam text-left transition-[box-shadow,border-color] duration-200 shadow-[var(--shadow-pop)] hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong bg-bg-surface ${\n selectedCategory === category.id ? 'border-primary ring-2 ring-primary/20' : ''\n }`}\n >\n <div className=\"text-2xl mb-2\">{category.icon || '📁'}</div>\n <p className=\"font-medium text-text-primary mb-1\">{category.name}</p>\n <p className=\"text-xs text-text-secondary\">{category.articleCount || 0} articles</p>\n </button>\n ))}\n </div>\n </div>\n )}\n\n {/* Popular Articles */}\n {!showSearch && !popularLoading && popularArticles.length > 0 && (\n <div>\n <h2 className=\"text-lg font-semibold mb-4 flex items-center gap-2 text-text-primary\">\n <TrendingUp size={20} className=\"text-primary\" />\n Popular Articles\n </h2>\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {popularArticles.map((article: KnowledgeBaseArticle) => (\n <button\n type=\"button\"\n key={article.id}\n onClick={() => navigate(`${basePath}/kb/articles/${article.slug}`)}\n className=\"p-5 rounded-xl border border-border-seam bg-bg-surface text-left transition-[box-shadow,border-color] duration-200 shadow-[var(--shadow-pop)] hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong group\"\n >\n <h3 className=\"font-semibold text-text-primary mb-2 group-hover:text-primary transition-colors\">\n {article.title}\n </h3>\n <p className=\"text-sm text-text-secondary mb-3 line-clamp-2\">{article.excerpt}</p>\n <div className=\"flex items-center gap-4 text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <Eye size={14} />\n {article.viewCount} views\n </span>\n <span className=\"flex items-center gap-1\">\n <ThumbsUp size={14} />\n {article.helpfulCount} helpful\n </span>\n </div>\n </button>\n ))}\n </div>\n </div>\n )}\n\n {/* Articles List */}\n <div>\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {showSearch && query\n ? `Search Results for \"${query}\"`\n : selectedCategoryName || 'All Articles'}\n </h2>\n {(showSearch || selectedCategory) && (\n <Button variant=\"outline\" size=\"sm\" onClick={handleClearSearch}>\n {showSearch ? 'Clear Search' : 'All Articles'}\n </Button>\n )}\n </div>\n\n {isLoading ? (\n <LoadingState message=\"Loading articles...\" />\n ) : displayArticles.length > 0 ? (\n <>\n <div className=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n {displayArticles.map((article: KnowledgeBaseArticle) => (\n <button\n type=\"button\"\n key={article.id}\n onClick={() => navigate(`${basePath}/kb/articles/${article.slug}`)}\n className=\"p-6 rounded-xl border border-border-seam bg-bg-surface text-left transition-[box-shadow,border-color] duration-200 shadow-[var(--shadow-pop)] hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong group\"\n >\n <div className=\"flex items-center gap-2 mb-2 flex-wrap\">\n {article.category && (\n <Badge\n variant=\"outline\"\n className={getCategoryBadgeClass(article.category.color)}\n >\n {article.category.name}\n </Badge>\n )}\n {article.status === 'DRAFT' && (\n <Badge className=\"bg-status-warning-bg-subtle text-status-warning-text text-xs\">\n <GlobeLock size={10} className=\"mr-1\" />\n Draft\n </Badge>\n )}\n {article.status === 'ARCHIVED' && (\n <Badge className=\"bg-bg-sunken text-text-secondary text-xs\">\n <Archive size={10} className=\"mr-1\" />\n Archived\n </Badge>\n )}\n </div>\n <h3 className=\"font-semibold text-lg text-text-primary mb-2 group-hover:text-primary transition-colors\">\n {article.title}\n </h3>\n <p className=\"text-sm text-text-secondary mb-4 line-clamp-3\">{article.excerpt}</p>\n <div className=\"flex items-center justify-between text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <Eye size={14} />\n {article.viewCount}\n </span>\n <span className=\"flex items-center gap-1\">\n <ThumbsUp size={14} />\n {article.helpfulCount}\n </span>\n </div>\n </button>\n ))}\n </div>\n\n {hasMoreArticles && (\n <div className=\"flex justify-center mt-6\">\n <Button variant=\"outline\" onClick={loadMoreArticles}>\n Load More\n </Button>\n </div>\n )}\n </>\n ) : (\n <EmptyState\n illustration={showSearch ? 'empty-search' : 'empty-files'}\n title={showSearch ? 'No articles found' : 'No articles available'}\n description={\n showSearch\n ? 'Try adjusting your search terms or browse by category'\n : 'Check back later for helpful articles and guides'\n }\n />\n )}\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAgB,IAAyB;CACvC,IAAM,IAAW,GAAa,EACxB,EAAE,cAAW,OAAO,GAAY,EAChC,EACJ,aACA,oBACA,eACA,kBACA,oBACA,mBACA,sBACA,kBACA,mBACA,mBACA,oBACA,wBACE,GAA4B,EAE1B,CAAC,GAAO,KAAY,EAAS,GAAG,EAChC,CAAC,GAAkB,KA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