@burdenoff/microfe-support 2026.817.1 → 2026.817.3

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.
@@ -1,351 +1,380 @@
1
1
  import { useSupport as e } from "../providers/SupportProvider.js";
2
- import { Badge as t, Button as n, Card as ee, CardContent as te, Dialog as r, DialogContent as i, DialogFooter as a, DialogHeader as o, DialogTitle as s, Input as c, Label as l, PagePurpose as ne, Select as u, SelectContent as d, SelectItem as f, SelectTrigger as p, SelectValue as m, Textarea as re } from "../components/ui.js";
3
- import { useCreateJobPostingMutation as ie, useDeleteJobPostingMutation as ae, useGetJobPostingsQuery as oe, useUpdateJobPostingMutation as se } from "../../generated/global-operations.js";
4
- import { EmploymentType as h, JobPostingStatus as g } from "../../generated/global-types.js";
5
- import { cn as _ } from "../utils/cn.js";
6
- import { EmptyState as ce, LoadingState as le, PageLayout as v } from "../components/PageLayout.js";
7
- import { useEffect as ue, useState as y } from "react";
8
- import { AlertCircle as b, Briefcase as x, Building2 as de, Edit2 as fe, Loader2 as S, MapPin as pe, Plus as C, Search as me, Trash2 as he, Users as ge } from "lucide-react";
9
- import { useNavigate as _e } from "react-router";
10
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
2
+ import { Badge as t, Button as n, Card as ee, CardContent as te, Dialog as r, DialogContent as i, DialogFooter as a, DialogHeader as o, DialogTitle as s, Input as c, Label as l, PagePurpose as ne, Select as u, SelectContent as d, SelectItem as f, SelectTrigger as p, SelectValue as m, Textarea as h } from "../components/ui.js";
3
+ import { useCreateJobPostingMutation as re, useDeleteJobPostingMutation as ie, useGetJobPostingsQuery as ae, useUpdateJobPostingMutation as oe } from "../../generated/global-operations.js";
4
+ import { EmploymentType as g, JobPostingStatus as _ } from "../../generated/global-types.js";
5
+ import { cn as v } from "../utils/cn.js";
6
+ import { EmptyState as y, LoadingState as se, PageLayout as b } from "../components/PageLayout.js";
7
+ import { useEffect as ce, useState as x } from "react";
8
+ import { AlertCircle as S, Briefcase as C, Building2 as le, Edit2 as ue, Loader2 as w, MapPin as de, Plus as T, Search as fe, Trash2 as pe, Users as me } from "lucide-react";
9
+ import { useNavigate as he } from "react-router";
10
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
11
11
  //#region src/support/pages/JobPostingsPage.tsx
12
- var ve = {
13
- [g.Open]: "bg-status-success-bg-subtle text-status-success-text",
14
- [g.Draft]: "bg-status-warning-bg-subtle text-status-warning-text",
15
- [g.Closed]: "bg-status-error-bg-subtle text-status-error-text",
16
- [g.Archived]: "bg-bg-sunken text-text-secondary"
17
- }, ye = {
18
- [g.Open]: "Open",
19
- [g.Draft]: "Draft",
20
- [g.Closed]: "Closed",
21
- [g.Archived]: "Archived"
22
- }, be = {
23
- [h.FullTime]: "Full-time",
24
- [h.PartTime]: "Part-time",
25
- [h.Contract]: "Contract",
26
- [h.Internship]: "Internship"
12
+ var ge = {
13
+ [_.Open]: "bg-status-success-bg-subtle text-status-success-text",
14
+ [_.Draft]: "bg-status-warning-bg-subtle text-status-warning-text",
15
+ [_.Closed]: "bg-status-error-bg-subtle text-status-error-text",
16
+ [_.Archived]: "bg-bg-sunken text-text-secondary"
17
+ }, _e = {
18
+ [_.Open]: "Open",
19
+ [_.Draft]: "Draft",
20
+ [_.Closed]: "Closed",
21
+ [_.Archived]: "Archived"
22
+ }, ve = {
23
+ [g.FullTime]: "Full-time",
24
+ [g.PartTime]: "Part-time",
25
+ [g.Contract]: "Contract",
26
+ [g.Internship]: "Internship"
27
27
  };
28
- function xe(e) {
28
+ function ye(e) {
29
29
  return new Date(e).toLocaleDateString("en-US", {
30
30
  month: "short",
31
31
  day: "numeric",
32
32
  year: "numeric"
33
33
  });
34
34
  }
35
- var D = {
35
+ var k = "ALL", A = {
36
36
  title: "",
37
37
  department: "",
38
38
  location: "",
39
39
  employmentType: "",
40
40
  description: "",
41
41
  status: "",
42
- productId: ""
42
+ productId: "",
43
+ slug: "",
44
+ openings: "",
45
+ overview: "",
46
+ responsibilities: "",
47
+ learnings: "",
48
+ qualifications: ""
43
49
  };
44
- function O() {
45
- let O = _e(), { basePath: Se = "" } = e(), [k, Ce] = y(""), [A, we] = y(""), [j, Te] = y(""), [Ee, M] = y(!1), [N, P] = y(null), [F, I] = y(D), [De, L] = y(!1), [R, z] = y(null), [B, V] = y(null);
46
- ue(() => {
47
- let e = setTimeout(() => we(k), 300);
50
+ function j(e) {
51
+ return e.split("\n").map((e) => e.trim()).filter(Boolean);
52
+ }
53
+ function M(e) {
54
+ return (e ?? []).join("\n");
55
+ }
56
+ function N() {
57
+ let N = he(), { basePath: be = "" } = e(), [P, xe] = x(""), [F, Se] = x(""), [I, Ce] = x(k), [we, L] = x(!1), [R, z] = x(null), [B, V] = x(A), [Te, H] = x(!1), [U, W] = x(null), [G, K] = x(null);
58
+ ce(() => {
59
+ let e = setTimeout(() => Se(P), 300);
48
60
  return () => clearTimeout(e);
49
- }, [k]);
50
- let H = {};
51
- A && (H.search = A), j && (H.status = j);
52
- let { data: U, loading: W, error: G, fetchMore: Oe, refetch: ke } = oe({
61
+ }, [P]);
62
+ let q = {};
63
+ F && (q.search = F), I !== k && (q.status = I);
64
+ let { data: J, loading: Y, error: X, fetchMore: Ee, refetch: De } = ae({
53
65
  variables: {
54
- filter: H,
66
+ filter: q,
55
67
  limit: 50,
56
68
  offset: 0
57
69
  },
58
70
  fetchPolicy: "cache-and-network"
59
- }), K = U?.jobPostings?.items ?? [], q = U?.jobPostings?.total ?? 0, J = U?.jobPostings?.hasMore ?? !1, [Ae, { loading: Y }] = ie({
71
+ }), Z = J?.jobPostings?.items ?? [], Oe = J?.jobPostings?.total ?? 0, ke = J?.jobPostings?.hasMore ?? !1, [Ae, { loading: je }] = re({
60
72
  refetchQueries: ["GetJobPostings"],
61
73
  awaitRefetchQueries: !0
62
- }), [je, { loading: X }] = se({
74
+ }), [Me, { loading: Ne }] = oe({
63
75
  refetchQueries: ["GetJobPostings"],
64
76
  awaitRefetchQueries: !0
65
- }), [Me, { loading: Z }] = ae({
77
+ }), [Pe, { loading: Fe }] = ie({
66
78
  refetchQueries: ["GetJobPostings"],
67
79
  awaitRefetchQueries: !0
68
80
  }), Q = (e, t) => {
69
- V({
81
+ K({
70
82
  type: e,
71
83
  message: t
72
- }), setTimeout(() => V(null), 4e3);
73
- }, Ne = () => {
74
- P(null), I({
75
- ...D,
76
- status: g.Open,
77
- employmentType: h.FullTime
78
- }), M(!0);
79
- }, Pe = (e) => {
80
- P(e), I({
84
+ }), setTimeout(() => K(null), 4e3);
85
+ }, Ie = () => {
86
+ z(null), V({
87
+ ...A,
88
+ status: _.Open,
89
+ employmentType: g.FullTime
90
+ }), L(!0);
91
+ }, Le = (e) => {
92
+ z(e), V({
81
93
  title: e.title,
82
94
  department: e.department ?? "",
83
95
  location: e.location ?? "",
84
96
  employmentType: e.employmentType ?? "",
85
97
  description: e.description ?? "",
86
98
  status: e.status,
87
- productId: e.productId ?? ""
88
- }), M(!0);
99
+ productId: e.productId ?? "",
100
+ slug: e.slug ?? "",
101
+ openings: e.openings == null ? "" : String(e.openings),
102
+ overview: e.overview ?? "",
103
+ responsibilities: M(e.responsibilities),
104
+ learnings: M(e.learnings),
105
+ qualifications: M(e.qualifications)
106
+ }), L(!0);
89
107
  }, $ = () => {
90
- M(!1), P(null), I(D);
91
- }, Fe = async (e) => {
92
- if (e.preventDefault(), F.title.trim()) try {
93
- N ? (await je({ variables: {
94
- id: N.id,
108
+ L(!1), z(null), V(A);
109
+ }, Re = async (e) => {
110
+ if (e.preventDefault(), !B.title.trim()) return;
111
+ let t = B.openings.trim() ? parseInt(B.openings.trim(), 10) : void 0, n = {
112
+ slug: B.slug.trim() || void 0,
113
+ openings: t && !Number.isNaN(t) ? t : void 0,
114
+ overview: B.overview.trim() || void 0,
115
+ responsibilities: j(B.responsibilities),
116
+ learnings: j(B.learnings),
117
+ qualifications: j(B.qualifications)
118
+ };
119
+ try {
120
+ R ? (await Me({ variables: {
121
+ id: R.id,
95
122
  input: {
96
- title: F.title,
97
- department: F.department || void 0,
98
- location: F.location || void 0,
99
- employmentType: F.employmentType || void 0,
100
- description: F.description || void 0,
101
- status: F.status || void 0,
102
- productId: F.productId || void 0
123
+ title: B.title,
124
+ department: B.department || void 0,
125
+ location: B.location || void 0,
126
+ employmentType: B.employmentType || void 0,
127
+ description: B.description || void 0,
128
+ status: B.status || void 0,
129
+ productId: B.productId || void 0,
130
+ ...n
103
131
  }
104
132
  } }), Q("success", "Job posting updated.")) : (await Ae({ variables: { input: {
105
- title: F.title,
106
- department: F.department || void 0,
107
- location: F.location || void 0,
108
- employmentType: F.employmentType || void 0,
109
- description: F.description || void 0,
110
- status: F.status || g.Open,
111
- productId: F.productId || void 0
133
+ title: B.title,
134
+ department: B.department || void 0,
135
+ location: B.location || void 0,
136
+ employmentType: B.employmentType || void 0,
137
+ description: B.description || void 0,
138
+ status: B.status || _.Open,
139
+ productId: B.productId || void 0,
140
+ ...n
112
141
  } } }), Q("success", "Job posting created.")), $();
113
142
  } catch (e) {
114
143
  Q("error", e instanceof Error ? e.message : "Something went wrong.");
115
144
  }
116
- }, Ie = (e) => {
117
- z(e), L(!0);
145
+ }, ze = (e) => {
146
+ W(e), H(!0);
118
147
  };
119
- return W && K.length === 0 ? /* @__PURE__ */ T(v, {
148
+ return Y && Z.length === 0 ? /* @__PURE__ */ D(b, {
120
149
  title: "Job Postings",
121
150
  subtitle: "Manage open roles and hiring pipelines",
122
- icon: /* @__PURE__ */ T(x, { size: 24 }),
123
- children: /* @__PURE__ */ T(le, { message: "Loading job postings…" })
124
- }) : G ? /* @__PURE__ */ T(v, {
151
+ icon: /* @__PURE__ */ D(C, { size: 24 }),
152
+ children: /* @__PURE__ */ D(se, { message: "Loading job postings…" })
153
+ }) : X ? /* @__PURE__ */ D(b, {
125
154
  title: "Job Postings",
126
155
  subtitle: "Manage open roles and hiring pipelines",
127
- icon: /* @__PURE__ */ T(x, { size: 24 }),
128
- children: /* @__PURE__ */ T(ce, {
129
- icon: /* @__PURE__ */ T(b, { size: 48 }),
156
+ icon: /* @__PURE__ */ D(C, { size: 24 }),
157
+ children: /* @__PURE__ */ D(y, {
158
+ icon: /* @__PURE__ */ D(S, { size: 48 }),
130
159
  title: "Failed to load job postings",
131
- description: G.message,
132
- action: /* @__PURE__ */ T(n, {
160
+ description: X.message,
161
+ action: /* @__PURE__ */ D(n, {
133
162
  variant: "outline",
134
- onClick: () => ke(),
163
+ onClick: () => De(),
135
164
  children: "Retry"
136
165
  })
137
166
  })
138
- }) : /* @__PURE__ */ E(v, {
167
+ }) : /* @__PURE__ */ O(b, {
139
168
  title: "Job Postings",
140
169
  subtitle: "Manage open roles and hiring pipelines",
141
- icon: /* @__PURE__ */ T(x, { size: 24 }),
142
- headerActions: /* @__PURE__ */ E(n, {
143
- onClick: Ne,
144
- children: [/* @__PURE__ */ T(C, { size: 18 }), "New Job Posting"]
170
+ icon: /* @__PURE__ */ D(C, { size: 24 }),
171
+ headerActions: /* @__PURE__ */ O(n, {
172
+ onClick: Ie,
173
+ children: [/* @__PURE__ */ D(T, { size: 18 }), "New Job Posting"]
145
174
  }),
146
175
  children: [
147
- /* @__PURE__ */ T(ne, { children: "Create and manage job postings across your products. Each posting drives your careers page and collects applications that you can review, screen, and move through interviews." }),
148
- B && /* @__PURE__ */ T("div", {
149
- className: _("fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border border-border-subtle animate-in slide-in-from-top-4 duration-200", B.type === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"),
150
- children: B.type === "success" ? /* @__PURE__ */ T("span", {
176
+ /* @__PURE__ */ D(ne, { children: "Create and manage job postings across your products. Each posting drives your careers page and collects applications that you can review, screen, and move through interviews." }),
177
+ G && /* @__PURE__ */ D("div", {
178
+ className: v("fixed right-4 top-[calc(var(--header-height,4rem)+1rem)] z-[200] flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border border-border-subtle animate-in slide-in-from-top-4 duration-200", G.type === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"),
179
+ children: G.type === "success" ? /* @__PURE__ */ D("span", {
151
180
  className: "font-medium",
152
- children: B.message
153
- }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(b, { size: 18 }), /* @__PURE__ */ T("span", {
181
+ children: G.message
182
+ }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(S, { size: 18 }), /* @__PURE__ */ D("span", {
154
183
  className: "font-medium",
155
- children: B.message
184
+ children: G.message
156
185
  })] })
157
186
  }),
158
- /* @__PURE__ */ E("div", {
187
+ /* @__PURE__ */ O("div", {
159
188
  className: "flex flex-col sm:flex-row gap-3",
160
- children: [/* @__PURE__ */ E("div", {
189
+ children: [/* @__PURE__ */ O("div", {
161
190
  className: "relative flex-1",
162
- children: [/* @__PURE__ */ T(me, {
191
+ children: [/* @__PURE__ */ D(fe, {
163
192
  size: 16,
164
193
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
165
- }), /* @__PURE__ */ T(c, {
194
+ }), /* @__PURE__ */ D(c, {
166
195
  type: "text",
167
196
  "aria-label": "Search job postings",
168
197
  placeholder: "Search by title, department, or location…",
169
- value: k,
170
- onChange: (e) => Ce(e.target.value),
198
+ value: P,
199
+ onChange: (e) => xe(e.target.value),
171
200
  className: "pl-9"
172
201
  })]
173
- }), /* @__PURE__ */ E(u, {
174
- value: j,
175
- onValueChange: (e) => Te(e),
176
- children: [/* @__PURE__ */ T(p, {
202
+ }), /* @__PURE__ */ O(u, {
203
+ value: I,
204
+ onValueChange: (e) => Ce(e),
205
+ children: [/* @__PURE__ */ D(p, {
177
206
  className: "w-full sm:w-[180px]",
178
- children: /* @__PURE__ */ T(m, { placeholder: "All statuses" })
179
- }), /* @__PURE__ */ E(d, { children: [
180
- /* @__PURE__ */ T(f, {
181
- value: "",
207
+ children: /* @__PURE__ */ D(m, { placeholder: "All statuses" })
208
+ }), /* @__PURE__ */ O(d, { children: [
209
+ /* @__PURE__ */ D(f, {
210
+ value: k,
182
211
  children: "All statuses"
183
212
  }),
184
- /* @__PURE__ */ T(f, {
185
- value: g.Open,
213
+ /* @__PURE__ */ D(f, {
214
+ value: _.Open,
186
215
  children: "Open"
187
216
  }),
188
- /* @__PURE__ */ T(f, {
189
- value: g.Draft,
217
+ /* @__PURE__ */ D(f, {
218
+ value: _.Draft,
190
219
  children: "Draft"
191
220
  }),
192
- /* @__PURE__ */ T(f, {
193
- value: g.Closed,
221
+ /* @__PURE__ */ D(f, {
222
+ value: _.Closed,
194
223
  children: "Closed"
195
224
  }),
196
- /* @__PURE__ */ T(f, {
197
- value: g.Archived,
225
+ /* @__PURE__ */ D(f, {
226
+ value: _.Archived,
198
227
  children: "Archived"
199
228
  })
200
229
  ] })]
201
230
  })]
202
231
  }),
203
- /* @__PURE__ */ E("p", {
232
+ /* @__PURE__ */ O("p", {
204
233
  className: "text-sm text-text-secondary",
205
234
  children: [
206
- q,
235
+ Oe,
207
236
  " posting",
208
- q === 1 ? "" : "s"
237
+ Oe === 1 ? "" : "s"
209
238
  ]
210
239
  }),
211
- K.length === 0 ? /* @__PURE__ */ T(ce, {
240
+ Z.length === 0 ? /* @__PURE__ */ D(y, {
212
241
  illustration: "empty-files",
213
242
  title: "No job postings yet",
214
243
  description: "Create your first job posting to start collecting applications.",
215
- action: /* @__PURE__ */ E(n, {
216
- onClick: Ne,
217
- children: [/* @__PURE__ */ T(C, { size: 18 }), "New Job Posting"]
244
+ action: /* @__PURE__ */ O(n, {
245
+ onClick: Ie,
246
+ children: [/* @__PURE__ */ D(T, { size: 18 }), "New Job Posting"]
218
247
  })
219
- }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("div", {
248
+ }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("div", {
220
249
  className: "grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",
221
- children: K.map((e) => /* @__PURE__ */ E(ee, {
250
+ children: Z.map((e) => /* @__PURE__ */ O(ee, {
222
251
  className: "group cursor-pointer transition-[box-shadow,border-color] duration-200 hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong",
223
- onClick: () => O(`${Se}/applications/postings/${e.id}`),
224
- children: [/* @__PURE__ */ E(te, {
252
+ onClick: () => N(`${be}/applications/postings/${e.id}`),
253
+ children: [/* @__PURE__ */ O(te, {
225
254
  className: "p-5",
226
255
  children: [
227
- /* @__PURE__ */ E("div", {
256
+ /* @__PURE__ */ O("div", {
228
257
  className: "flex items-start justify-between gap-3 mb-3",
229
- children: [/* @__PURE__ */ E("div", {
258
+ children: [/* @__PURE__ */ O("div", {
230
259
  className: "flex-1 min-w-0",
231
- children: [/* @__PURE__ */ T("h3", {
260
+ children: [/* @__PURE__ */ D("h3", {
232
261
  className: "font-semibold text-text-primary truncate group-hover:text-primary transition-colors",
233
262
  children: e.title
234
- }), e.department && /* @__PURE__ */ E("p", {
263
+ }), e.department && /* @__PURE__ */ O("p", {
235
264
  className: "text-sm text-text-secondary flex items-center gap-1 mt-0.5",
236
- children: [/* @__PURE__ */ T(de, { size: 12 }), e.department]
265
+ children: [/* @__PURE__ */ D(le, { size: 12 }), e.department]
237
266
  })]
238
- }), /* @__PURE__ */ T(t, {
239
- className: _("text-xs", ve[e.status]),
240
- children: ye[e.status]
267
+ }), /* @__PURE__ */ D(t, {
268
+ className: v("text-xs", ge[e.status]),
269
+ children: _e[e.status]
241
270
  })]
242
271
  }),
243
- /* @__PURE__ */ E("div", {
272
+ /* @__PURE__ */ O("div", {
244
273
  className: "flex flex-wrap items-center gap-2 mb-4",
245
274
  children: [
246
- e.location && /* @__PURE__ */ E(t, {
275
+ e.location && /* @__PURE__ */ O(t, {
247
276
  variant: "outline",
248
277
  className: "text-xs font-normal",
249
- children: [/* @__PURE__ */ T(pe, {
278
+ children: [/* @__PURE__ */ D(de, {
250
279
  size: 10,
251
280
  className: "mr-1"
252
281
  }), e.location]
253
282
  }),
254
- e.employmentType && /* @__PURE__ */ T(t, {
283
+ e.employmentType && /* @__PURE__ */ D(t, {
255
284
  variant: "outline",
256
285
  className: "text-xs font-normal",
257
- children: be[e.employmentType]
286
+ children: ve[e.employmentType]
258
287
  }),
259
- e.productId && /* @__PURE__ */ T(t, {
288
+ e.productId && /* @__PURE__ */ D(t, {
260
289
  variant: "outline",
261
290
  className: "text-xs font-normal",
262
291
  children: e.productId
263
292
  })
264
293
  ]
265
294
  }),
266
- /* @__PURE__ */ E("div", {
295
+ /* @__PURE__ */ O("div", {
267
296
  className: "flex items-center justify-between text-sm",
268
- children: [/* @__PURE__ */ E("span", {
297
+ children: [/* @__PURE__ */ O("span", {
269
298
  className: "text-text-secondary flex items-center gap-1.5",
270
299
  children: [
271
- /* @__PURE__ */ T(ge, { size: 14 }),
300
+ /* @__PURE__ */ D(me, { size: 14 }),
272
301
  e.applications.length,
273
302
  " application",
274
303
  e.applications.length === 1 ? "" : "s"
275
304
  ]
276
- }), /* @__PURE__ */ E("span", {
305
+ }), /* @__PURE__ */ O("span", {
277
306
  className: "text-xs text-text-secondary",
278
- children: ["Updated ", xe(e.updatedAt)]
307
+ children: ["Updated ", ye(e.updatedAt)]
279
308
  })]
280
309
  })
281
310
  ]
282
- }), /* @__PURE__ */ E("div", {
311
+ }), /* @__PURE__ */ O("div", {
283
312
  className: "px-5 pb-4 pt-0 flex items-center justify-end gap-2 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity",
284
- children: [/* @__PURE__ */ E(n, {
313
+ children: [/* @__PURE__ */ O(n, {
285
314
  type: "button",
286
315
  variant: "outline",
287
316
  size: "sm",
288
317
  onClick: (t) => {
289
- t.stopPropagation(), Pe(e);
318
+ t.stopPropagation(), Le(e);
290
319
  },
291
- children: [/* @__PURE__ */ T(fe, {
320
+ children: [/* @__PURE__ */ D(ue, {
292
321
  size: 14,
293
322
  className: "mr-1"
294
323
  }), "Edit"]
295
- }), /* @__PURE__ */ E(n, {
324
+ }), /* @__PURE__ */ O(n, {
296
325
  type: "button",
297
326
  variant: "outline",
298
327
  size: "sm",
299
328
  className: "text-status-error-text hover:bg-status-error-bg-subtle",
300
329
  onClick: (t) => {
301
- t.stopPropagation(), Ie(e);
330
+ t.stopPropagation(), ze(e);
302
331
  },
303
- children: [/* @__PURE__ */ T(he, {
332
+ children: [/* @__PURE__ */ D(pe, {
304
333
  size: 14,
305
334
  className: "mr-1"
306
335
  }), "Delete"]
307
336
  })]
308
337
  })]
309
338
  }, e.id))
310
- }), J && /* @__PURE__ */ T("div", {
339
+ }), ke && /* @__PURE__ */ D("div", {
311
340
  className: "flex justify-center mt-6",
312
- children: /* @__PURE__ */ E(n, {
341
+ children: /* @__PURE__ */ O(n, {
313
342
  variant: "outline",
314
343
  onClick: () => {
315
- J && Oe({
316
- variables: { offset: K.length },
344
+ ke && Ee({
345
+ variables: { offset: Z.length },
317
346
  updateQuery: (e, { fetchMoreResult: t }) => t ? { jobPostings: {
318
347
  ...t.jobPostings,
319
348
  items: [...e.jobPostings?.items ?? [], ...t.jobPostings?.items ?? []]
320
349
  } } : e
321
350
  });
322
351
  },
323
- disabled: W,
324
- children: [W ? /* @__PURE__ */ T(S, {
352
+ disabled: Y,
353
+ children: [Y ? /* @__PURE__ */ D(w, {
325
354
  size: 14,
326
355
  className: "animate-spin mr-2"
327
356
  }) : null, "Load more"]
328
357
  })
329
358
  })] }),
330
- /* @__PURE__ */ T(r, {
331
- open: Ee,
332
- onOpenChange: M,
333
- children: /* @__PURE__ */ E(i, {
359
+ /* @__PURE__ */ D(r, {
360
+ open: we,
361
+ onOpenChange: L,
362
+ children: /* @__PURE__ */ O(i, {
334
363
  className: "w-full max-w-lg max-h-[90vh] overflow-y-auto",
335
- children: [/* @__PURE__ */ T(o, { children: /* @__PURE__ */ T(s, { children: N ? "Edit Job Posting" : "New Job Posting" }) }), /* @__PURE__ */ E("form", {
336
- onSubmit: Fe,
364
+ children: [/* @__PURE__ */ D(o, { children: /* @__PURE__ */ D(s, { children: R ? "Edit Job Posting" : "New Job Posting" }) }), /* @__PURE__ */ O("form", {
365
+ onSubmit: Re,
337
366
  className: "space-y-5",
338
367
  children: [
339
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E(l, {
368
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O(l, {
340
369
  htmlFor: "job-posting-title",
341
- children: ["Title ", /* @__PURE__ */ T("span", {
370
+ children: ["Title ", /* @__PURE__ */ D("span", {
342
371
  className: "text-status-error-text",
343
372
  children: "*"
344
373
  })]
345
- }), /* @__PURE__ */ T(c, {
374
+ }), /* @__PURE__ */ D(c, {
346
375
  id: "job-posting-title",
347
- value: F.title,
348
- onChange: (e) => I((t) => ({
376
+ value: B.title,
377
+ onChange: (e) => V((t) => ({
349
378
  ...t,
350
379
  title: e.target.value
351
380
  })),
@@ -353,27 +382,57 @@ function O() {
353
382
  required: !0,
354
383
  className: "mt-1.5"
355
384
  })] }),
356
- /* @__PURE__ */ E("div", {
385
+ /* @__PURE__ */ O("div", {
357
386
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
358
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(l, {
387
+ children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(l, {
388
+ htmlFor: "job-posting-slug",
389
+ children: "Slug"
390
+ }), /* @__PURE__ */ D(c, {
391
+ id: "job-posting-slug",
392
+ value: B.slug,
393
+ onChange: (e) => V((t) => ({
394
+ ...t,
395
+ slug: e.target.value
396
+ })),
397
+ placeholder: "e.g., product-engineering-intern-full-stack",
398
+ className: "mt-1.5"
399
+ })] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(l, {
400
+ htmlFor: "job-posting-openings",
401
+ children: "Openings"
402
+ }), /* @__PURE__ */ D(c, {
403
+ id: "job-posting-openings",
404
+ type: "number",
405
+ min: 1,
406
+ value: B.openings,
407
+ onChange: (e) => V((t) => ({
408
+ ...t,
409
+ openings: e.target.value
410
+ })),
411
+ placeholder: "e.g., 2",
412
+ className: "mt-1.5"
413
+ })] })]
414
+ }),
415
+ /* @__PURE__ */ O("div", {
416
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
417
+ children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(l, {
359
418
  htmlFor: "job-posting-department",
360
419
  children: "Department"
361
- }), /* @__PURE__ */ T(c, {
420
+ }), /* @__PURE__ */ D(c, {
362
421
  id: "job-posting-department",
363
- value: F.department,
364
- onChange: (e) => I((t) => ({
422
+ value: B.department,
423
+ onChange: (e) => V((t) => ({
365
424
  ...t,
366
425
  department: e.target.value
367
426
  })),
368
427
  placeholder: "e.g., Engineering",
369
428
  className: "mt-1.5"
370
- })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(l, {
429
+ })] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(l, {
371
430
  htmlFor: "job-posting-location",
372
431
  children: "Location"
373
- }), /* @__PURE__ */ T(c, {
432
+ }), /* @__PURE__ */ D(c, {
374
433
  id: "job-posting-location",
375
- value: F.location,
376
- onChange: (e) => I((t) => ({
434
+ value: B.location,
435
+ onChange: (e) => V((t) => ({
377
436
  ...t,
378
437
  location: e.target.value
379
438
  })),
@@ -381,92 +440,92 @@ function O() {
381
440
  className: "mt-1.5"
382
441
  })] })]
383
442
  }),
384
- /* @__PURE__ */ E("div", {
443
+ /* @__PURE__ */ O("div", {
385
444
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
386
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(l, {
445
+ children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(l, {
387
446
  htmlFor: "job-posting-employment-type",
388
447
  children: "Employment Type"
389
- }), /* @__PURE__ */ E(u, {
390
- value: F.employmentType,
391
- onValueChange: (e) => I((t) => ({
448
+ }), /* @__PURE__ */ O(u, {
449
+ value: B.employmentType,
450
+ onValueChange: (e) => V((t) => ({
392
451
  ...t,
393
452
  employmentType: e
394
453
  })),
395
- children: [/* @__PURE__ */ T(p, {
454
+ children: [/* @__PURE__ */ D(p, {
396
455
  id: "job-posting-employment-type",
397
456
  className: "mt-1.5",
398
- children: /* @__PURE__ */ T(m, { placeholder: "Select type" })
399
- }), /* @__PURE__ */ E(d, { children: [
400
- /* @__PURE__ */ T(f, {
401
- value: h.FullTime,
457
+ children: /* @__PURE__ */ D(m, { placeholder: "Select type" })
458
+ }), /* @__PURE__ */ O(d, { children: [
459
+ /* @__PURE__ */ D(f, {
460
+ value: g.FullTime,
402
461
  children: "Full-time"
403
462
  }),
404
- /* @__PURE__ */ T(f, {
405
- value: h.PartTime,
463
+ /* @__PURE__ */ D(f, {
464
+ value: g.PartTime,
406
465
  children: "Part-time"
407
466
  }),
408
- /* @__PURE__ */ T(f, {
409
- value: h.Contract,
467
+ /* @__PURE__ */ D(f, {
468
+ value: g.Contract,
410
469
  children: "Contract"
411
470
  }),
412
- /* @__PURE__ */ T(f, {
413
- value: h.Internship,
471
+ /* @__PURE__ */ D(f, {
472
+ value: g.Internship,
414
473
  children: "Internship"
415
474
  })
416
475
  ] })]
417
- })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(l, {
476
+ })] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(l, {
418
477
  htmlFor: "job-posting-status",
419
478
  children: "Status"
420
- }), /* @__PURE__ */ E(u, {
421
- value: F.status,
422
- onValueChange: (e) => I((t) => ({
479
+ }), /* @__PURE__ */ O(u, {
480
+ value: B.status,
481
+ onValueChange: (e) => V((t) => ({
423
482
  ...t,
424
483
  status: e
425
484
  })),
426
- children: [/* @__PURE__ */ T(p, {
485
+ children: [/* @__PURE__ */ D(p, {
427
486
  id: "job-posting-status",
428
487
  className: "mt-1.5",
429
- children: /* @__PURE__ */ T(m, { placeholder: "Select status" })
430
- }), /* @__PURE__ */ E(d, { children: [
431
- /* @__PURE__ */ T(f, {
432
- value: g.Open,
488
+ children: /* @__PURE__ */ D(m, { placeholder: "Select status" })
489
+ }), /* @__PURE__ */ O(d, { children: [
490
+ /* @__PURE__ */ D(f, {
491
+ value: _.Open,
433
492
  children: "Open"
434
493
  }),
435
- /* @__PURE__ */ T(f, {
436
- value: g.Draft,
494
+ /* @__PURE__ */ D(f, {
495
+ value: _.Draft,
437
496
  children: "Draft"
438
497
  }),
439
- /* @__PURE__ */ T(f, {
440
- value: g.Closed,
498
+ /* @__PURE__ */ D(f, {
499
+ value: _.Closed,
441
500
  children: "Closed"
442
501
  }),
443
- /* @__PURE__ */ T(f, {
444
- value: g.Archived,
502
+ /* @__PURE__ */ D(f, {
503
+ value: _.Archived,
445
504
  children: "Archived"
446
505
  })
447
506
  ] })]
448
507
  })] })]
449
508
  }),
450
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(l, {
509
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(l, {
451
510
  htmlFor: "job-posting-product-id",
452
511
  children: "Product ID"
453
- }), /* @__PURE__ */ T(c, {
512
+ }), /* @__PURE__ */ D(c, {
454
513
  id: "job-posting-product-id",
455
- value: F.productId,
456
- onChange: (e) => I((t) => ({
514
+ value: B.productId,
515
+ onChange: (e) => V((t) => ({
457
516
  ...t,
458
517
  productId: e.target.value
459
518
  })),
460
519
  placeholder: "Optional product identifier",
461
520
  className: "mt-1.5"
462
521
  })] }),
463
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(l, {
522
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(l, {
464
523
  htmlFor: "job-posting-description",
465
524
  children: "Description"
466
- }), /* @__PURE__ */ T(re, {
525
+ }), /* @__PURE__ */ D(h, {
467
526
  id: "job-posting-description",
468
- value: F.description,
469
- onChange: (e) => I((t) => ({
527
+ value: B.description,
528
+ onChange: (e) => V((t) => ({
470
529
  ...t,
471
530
  description: e.target.value
472
531
  })),
@@ -474,60 +533,138 @@ function O() {
474
533
  rows: 5,
475
534
  className: "mt-1.5 resize-none"
476
535
  })] }),
477
- /* @__PURE__ */ E(a, { children: [/* @__PURE__ */ T(n, {
536
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(l, {
537
+ htmlFor: "job-posting-overview",
538
+ children: "Overview"
539
+ }), /* @__PURE__ */ D(h, {
540
+ id: "job-posting-overview",
541
+ value: B.overview,
542
+ onChange: (e) => V((t) => ({
543
+ ...t,
544
+ overview: e.target.value
545
+ })),
546
+ placeholder: "Short pitch shown at the top of the careers page…",
547
+ rows: 3,
548
+ className: "mt-1.5 resize-none"
549
+ })] }),
550
+ /* @__PURE__ */ O("div", { children: [
551
+ /* @__PURE__ */ D(l, {
552
+ htmlFor: "job-posting-responsibilities",
553
+ children: "Responsibilities"
554
+ }),
555
+ /* @__PURE__ */ D(h, {
556
+ id: "job-posting-responsibilities",
557
+ value: B.responsibilities,
558
+ onChange: (e) => V((t) => ({
559
+ ...t,
560
+ responsibilities: e.target.value
561
+ })),
562
+ placeholder: "One responsibility per line",
563
+ rows: 4,
564
+ className: "mt-1.5 resize-none"
565
+ }),
566
+ /* @__PURE__ */ D("p", {
567
+ className: "mt-1 text-xs text-text-secondary",
568
+ children: "Enter one item per line."
569
+ })
570
+ ] }),
571
+ /* @__PURE__ */ O("div", { children: [
572
+ /* @__PURE__ */ D(l, {
573
+ htmlFor: "job-posting-learnings",
574
+ children: "Learnings"
575
+ }),
576
+ /* @__PURE__ */ D(h, {
577
+ id: "job-posting-learnings",
578
+ value: B.learnings,
579
+ onChange: (e) => V((t) => ({
580
+ ...t,
581
+ learnings: e.target.value
582
+ })),
583
+ placeholder: "One learning per line",
584
+ rows: 4,
585
+ className: "mt-1.5 resize-none"
586
+ }),
587
+ /* @__PURE__ */ D("p", {
588
+ className: "mt-1 text-xs text-text-secondary",
589
+ children: "Enter one item per line."
590
+ })
591
+ ] }),
592
+ /* @__PURE__ */ O("div", { children: [
593
+ /* @__PURE__ */ D(l, {
594
+ htmlFor: "job-posting-qualifications",
595
+ children: "Qualifications"
596
+ }),
597
+ /* @__PURE__ */ D(h, {
598
+ id: "job-posting-qualifications",
599
+ value: B.qualifications,
600
+ onChange: (e) => V((t) => ({
601
+ ...t,
602
+ qualifications: e.target.value
603
+ })),
604
+ placeholder: "One qualification per line",
605
+ rows: 4,
606
+ className: "mt-1.5 resize-none"
607
+ }),
608
+ /* @__PURE__ */ D("p", {
609
+ className: "mt-1 text-xs text-text-secondary",
610
+ children: "Enter one item per line."
611
+ })
612
+ ] }),
613
+ /* @__PURE__ */ O(a, { children: [/* @__PURE__ */ D(n, {
478
614
  type: "button",
479
615
  variant: "outline",
480
616
  onClick: $,
481
617
  children: "Cancel"
482
- }), /* @__PURE__ */ E(n, {
618
+ }), /* @__PURE__ */ O(n, {
483
619
  type: "submit",
484
- disabled: Y || X,
485
- children: [Y || X ? /* @__PURE__ */ T(S, {
620
+ disabled: je || Ne,
621
+ children: [je || Ne ? /* @__PURE__ */ D(w, {
486
622
  size: 16,
487
623
  className: "animate-spin mr-2"
488
- }) : null, N ? "Save Changes" : "Create Posting"]
624
+ }) : null, R ? "Save Changes" : "Create Posting"]
489
625
  })] })
490
626
  ]
491
627
  })]
492
628
  })
493
629
  }),
494
- /* @__PURE__ */ T(r, {
495
- open: De,
496
- onOpenChange: L,
497
- children: /* @__PURE__ */ E(i, {
630
+ /* @__PURE__ */ D(r, {
631
+ open: Te,
632
+ onOpenChange: H,
633
+ children: /* @__PURE__ */ O(i, {
498
634
  className: "w-full max-w-md",
499
635
  children: [
500
- /* @__PURE__ */ T(o, { children: /* @__PURE__ */ T(s, { children: "Delete job posting?" }) }),
501
- /* @__PURE__ */ E("p", {
636
+ /* @__PURE__ */ D(o, { children: /* @__PURE__ */ D(s, { children: "Delete job posting?" }) }),
637
+ /* @__PURE__ */ O("p", {
502
638
  className: "text-sm text-text-secondary",
503
639
  children: [
504
- "This will permanently remove ",
505
- /* @__PURE__ */ T("strong", {
640
+ "This will permanently remove",
641
+ " ",
642
+ /* @__PURE__ */ D("strong", {
506
643
  className: "text-text-primary",
507
- children: R?.title
644
+ children: U?.title
508
645
  }),
509
646
  " and cannot be undone."
510
647
  ]
511
648
  }),
512
- /* @__PURE__ */ E(a, { children: [/* @__PURE__ */ T(n, {
649
+ /* @__PURE__ */ O(a, { children: [/* @__PURE__ */ D(n, {
513
650
  type: "button",
514
651
  variant: "outline",
515
- onClick: () => L(!1),
652
+ onClick: () => H(!1),
516
653
  children: "Cancel"
517
- }), /* @__PURE__ */ E(n, {
654
+ }), /* @__PURE__ */ O(n, {
518
655
  type: "button",
519
656
  variant: "destructive",
520
657
  onClick: async () => {
521
- if (R) try {
522
- await Me({ variables: { id: R.id } }), Q("success", "Job posting deleted.");
658
+ if (U) try {
659
+ await Pe({ variables: { id: U.id } }), Q("success", "Job posting deleted.");
523
660
  } catch (e) {
524
661
  Q("error", e instanceof Error ? e.message : "Failed to delete posting.");
525
662
  } finally {
526
- L(!1), z(null);
663
+ H(!1), W(null);
527
664
  }
528
665
  },
529
- disabled: Z,
530
- children: [Z ? /* @__PURE__ */ T(S, {
666
+ disabled: Fe,
667
+ children: [Fe ? /* @__PURE__ */ D(w, {
531
668
  size: 16,
532
669
  className: "animate-spin mr-2"
533
670
  }) : null, "Delete"]
@@ -539,6 +676,6 @@ function O() {
539
676
  });
540
677
  }
541
678
  //#endregion
542
- export { O as JobPostingsPage };
679
+ export { N as JobPostingsPage };
543
680
 
544
681
  //# sourceMappingURL=JobPostingsPage.js.map