@burdenoff/microfe-technospam 2026.704.1 → 2026.705.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.
- package/dist/technospam/api/technospamApi.js +232 -150
- package/dist/technospam/api/technospamApi.js.map +1 -1
- package/dist/technospam/components/LoadMore.js +18 -2
- package/dist/technospam/components/LoadMore.js.map +1 -0
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js +664 -334
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js +79 -72
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +140 -87
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.js +75 -68
- package/dist/technospam/pages/CoursesCoursesPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesMyLearningPagePage.js +3 -0
- package/dist/technospam/pages/CoursesMyLearningPagePage.js.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js +76 -53
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipMentorProfilePagePage.js +36 -35
- package/dist/technospam/pages/MentorshipMentorProfilePagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.js +112 -103
- package/dist/technospam/pages/MentorshipMentorsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.js +219 -110
- package/dist/technospam/pages/MentorshipSessionsPagePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,423 +1,700 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { useTechnoSpam as e } from "../providers/TechnoSpamProvider.js";
|
|
2
|
+
import { PageLayout as t } from "../components/PageLayout.js";
|
|
3
|
+
import { formatDateTime as n, formatDuration as r, formatMoney as i, humanizeEnum as a } from "../utils/format.js";
|
|
4
|
+
import { StatusBadge as o } from "../components/StatusBadge.js";
|
|
5
|
+
import { EmptyView as s, ErrorView as c, LoadingRows as l } from "../components/StateViews.js";
|
|
5
6
|
import "../components/index.js";
|
|
6
|
-
import { notify as
|
|
7
|
-
import { useApproveMentor as
|
|
8
|
-
import { useState as
|
|
9
|
-
import { Archive as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { Badge as
|
|
7
|
+
import { notify as u } from "../lib/toast.js";
|
|
8
|
+
import { useApproveMentor as d, useArchiveCourse as f, useCompleteHackathon as p, useCoursesQuery as m, useCreateCourse as h, useCreateHackathon as g, useCreateLesson as _, useCreateProblem as v, useGradeSubmission as y, useHackathonsQuery as b, useLessonsQuery as x, useMentorsQuery as S, useOpenRegistration as ee, useProblemsQuery as C, usePublishCourse as w, usePublishProblem as te, useScoreTeam as T, useStartHackathon as E, useStartJudging as D, useSubmissionsQuery as O, useTeamsQuery as k } from "../api/technospamApi.js";
|
|
9
|
+
import { useState as A } from "react";
|
|
10
|
+
import { Archive as j, Award as M, BookOpen as N, Code2 as P, Gavel as ne, ListChecks as re, Play as F, Plus as I, Rocket as ie, ShieldAlert as L, Trophy as R, UserCheck as z, Users as B, X as ae } from "lucide-react";
|
|
11
|
+
import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
12
|
+
import { Badge as W, Button as G, GlassCard as K, Input as q, Select as J, SelectContent as Y, SelectItem as X, SelectTrigger as Z, SelectValue as oe, Tabs as Q, TabsList as se, TabsTrigger as ce, Textarea as le } from "@burdenoff/fe-libs/ui";
|
|
12
13
|
//#region src/technospam/pages/AdminAdminDashboardPagePage.tsx
|
|
13
|
-
var
|
|
14
|
+
var ue = [
|
|
15
|
+
"ARTICLE",
|
|
16
|
+
"VIDEO",
|
|
17
|
+
"INTERACTIVE",
|
|
18
|
+
"QUIZ",
|
|
19
|
+
"PROJECT"
|
|
20
|
+
], de = [
|
|
21
|
+
"ACCEPTED",
|
|
22
|
+
"WRONG_ANSWER",
|
|
23
|
+
"TIME_LIMIT_EXCEEDED",
|
|
24
|
+
"RUNTIME_ERROR",
|
|
25
|
+
"COMPILE_ERROR"
|
|
26
|
+
], fe = [
|
|
14
27
|
"BEGINNER",
|
|
15
28
|
"INTERMEDIATE",
|
|
16
29
|
"ADVANCED",
|
|
17
30
|
"EXPERT"
|
|
18
|
-
],
|
|
31
|
+
], pe = [
|
|
19
32
|
"EASY",
|
|
20
33
|
"MEDIUM",
|
|
21
34
|
"HARD"
|
|
22
35
|
];
|
|
23
|
-
function
|
|
36
|
+
function me(e) {
|
|
24
37
|
return e.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
25
38
|
}
|
|
26
|
-
function
|
|
39
|
+
function he(e) {
|
|
27
40
|
return e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
28
41
|
}
|
|
29
|
-
function
|
|
42
|
+
function ge(e) {
|
|
30
43
|
let t = Number.parseInt(e, 10);
|
|
31
44
|
return Number.isFinite(t) ? t : void 0;
|
|
32
45
|
}
|
|
33
|
-
function
|
|
46
|
+
function _e(e) {
|
|
34
47
|
if (!e) return null;
|
|
35
48
|
let t = new Date(e);
|
|
36
49
|
return Number.isNaN(t.getTime()) ? null : t.toISOString();
|
|
37
50
|
}
|
|
38
|
-
function
|
|
39
|
-
return /* @__PURE__ */
|
|
51
|
+
function $({ label: e, required: t, className: n, children: r }) {
|
|
52
|
+
return /* @__PURE__ */ U("div", {
|
|
40
53
|
className: `flex flex-col gap-1.5 ${n ?? ""}`,
|
|
41
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ U("span", {
|
|
42
55
|
className: "text-xs font-medium text-text-secondary",
|
|
43
|
-
children: [e, t ? /* @__PURE__ */
|
|
56
|
+
children: [e, t ? /* @__PURE__ */ H("span", {
|
|
44
57
|
className: "text-status-error-text",
|
|
45
58
|
children: " *"
|
|
46
59
|
}) : null]
|
|
47
60
|
}), r]
|
|
48
61
|
});
|
|
49
62
|
}
|
|
50
|
-
function
|
|
51
|
-
return /* @__PURE__ */
|
|
63
|
+
function ve({ title: e, children: t, footer: n }) {
|
|
64
|
+
return /* @__PURE__ */ U(K, {
|
|
52
65
|
className: "space-y-4 p-4 sm:p-5",
|
|
53
66
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ H("h3", {
|
|
55
68
|
className: "text-sm font-semibold text-text-primary",
|
|
56
69
|
children: e
|
|
57
70
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ H("div", {
|
|
59
72
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
60
73
|
children: t
|
|
61
74
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ H("div", {
|
|
63
76
|
className: "flex justify-end gap-2",
|
|
64
77
|
children: n
|
|
65
78
|
})
|
|
66
79
|
]
|
|
67
80
|
});
|
|
68
81
|
}
|
|
69
|
-
function
|
|
70
|
-
return /* @__PURE__ */
|
|
82
|
+
function ye({ summary: e, actionLabel: t, open: n, onToggle: r }) {
|
|
83
|
+
return /* @__PURE__ */ U("div", {
|
|
71
84
|
className: "flex items-center justify-between gap-3",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ H("p", {
|
|
73
86
|
className: "text-sm text-text-secondary",
|
|
74
87
|
children: e
|
|
75
|
-
}), t && r ? /* @__PURE__ */
|
|
88
|
+
}), t && r ? /* @__PURE__ */ U(G, {
|
|
76
89
|
size: "sm",
|
|
77
90
|
variant: n ? "outline" : "default",
|
|
78
91
|
onClick: r,
|
|
79
|
-
children: [
|
|
92
|
+
children: [H(n ? ae : I, { size: 15 }), n ? "Close" : t]
|
|
80
93
|
}) : null]
|
|
81
94
|
});
|
|
82
95
|
}
|
|
83
|
-
function
|
|
84
|
-
return /* @__PURE__ */
|
|
96
|
+
function be({ children: e, actions: t }) {
|
|
97
|
+
return /* @__PURE__ */ U(K, {
|
|
85
98
|
className: "flex flex-col gap-3 p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
86
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ H("div", {
|
|
87
100
|
className: "min-w-0",
|
|
88
101
|
children: e
|
|
89
|
-
}), t ? /* @__PURE__ */
|
|
102
|
+
}), t ? /* @__PURE__ */ H("div", {
|
|
90
103
|
className: "flex shrink-0 flex-wrap items-center gap-2",
|
|
91
104
|
children: t
|
|
92
105
|
}) : null]
|
|
93
106
|
});
|
|
94
107
|
}
|
|
95
|
-
function
|
|
96
|
-
let { data:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
108
|
+
function xe({ courseId: e }) {
|
|
109
|
+
let { data: t, loading: n, refetch: i } = x(e), [o, { loading: s }] = _(), [c, d] = A(""), [f, p] = A("ARTICLE"), [m, h] = A(""), [g, v] = A(""), [y, b] = A(!1), S = [...t?.tecListLessons ?? []].sort((e, t) => e.position - t.position);
|
|
110
|
+
return /* @__PURE__ */ U("div", {
|
|
111
|
+
className: "mt-3 rounded-lg border border-border-seam bg-bg-sunken p-3",
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ U("div", {
|
|
114
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-text-muted",
|
|
115
|
+
children: [
|
|
116
|
+
"Curriculum (",
|
|
117
|
+
S.length,
|
|
118
|
+
")"
|
|
119
|
+
]
|
|
120
|
+
}),
|
|
121
|
+
n && S.length === 0 ? /* @__PURE__ */ H(l, {
|
|
122
|
+
count: 2,
|
|
123
|
+
height: "h-10"
|
|
124
|
+
}) : S.length === 0 ? /* @__PURE__ */ H("p", {
|
|
125
|
+
className: "mb-3 text-xs text-text-muted",
|
|
126
|
+
children: "No lessons yet — add the first below."
|
|
127
|
+
}) : /* @__PURE__ */ H("ol", {
|
|
128
|
+
className: "mb-3 space-y-1",
|
|
129
|
+
children: S.map((e, t) => /* @__PURE__ */ U("li", {
|
|
130
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ U("span", {
|
|
133
|
+
className: "text-xs text-text-muted",
|
|
134
|
+
children: [t + 1, "."]
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ H("span", {
|
|
137
|
+
className: "truncate",
|
|
138
|
+
children: e.title
|
|
139
|
+
}),
|
|
140
|
+
/* @__PURE__ */ H(W, {
|
|
141
|
+
variant: "secondary",
|
|
142
|
+
className: "text-[11px]",
|
|
143
|
+
children: a(e.kind)
|
|
144
|
+
}),
|
|
145
|
+
e.isPreview ? /* @__PURE__ */ H(W, {
|
|
146
|
+
variant: "outline",
|
|
147
|
+
className: "text-[11px]",
|
|
148
|
+
children: "Preview"
|
|
149
|
+
}) : null,
|
|
150
|
+
/* @__PURE__ */ H("span", {
|
|
151
|
+
className: "ml-auto text-xs text-text-muted",
|
|
152
|
+
children: r(e.estimatedMinutes)
|
|
153
|
+
})
|
|
154
|
+
]
|
|
155
|
+
}, e.id))
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ U("div", {
|
|
158
|
+
className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
159
|
+
children: [/* @__PURE__ */ H(q, {
|
|
160
|
+
placeholder: "Lesson title",
|
|
161
|
+
value: c,
|
|
162
|
+
onChange: (e) => d(e.target.value)
|
|
163
|
+
}), /* @__PURE__ */ U(J, {
|
|
164
|
+
value: f,
|
|
165
|
+
onValueChange: (e) => p(e),
|
|
166
|
+
children: [/* @__PURE__ */ H(Z, { children: /* @__PURE__ */ H(oe, {}) }), /* @__PURE__ */ H(Y, { children: ue.map((e) => /* @__PURE__ */ H(X, {
|
|
167
|
+
value: e,
|
|
168
|
+
children: a(e)
|
|
169
|
+
}, e)) })]
|
|
170
|
+
})]
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ H(le, {
|
|
173
|
+
className: "mt-2",
|
|
174
|
+
placeholder: "Lesson content (markdown / notes)",
|
|
175
|
+
value: m,
|
|
176
|
+
onChange: (e) => h(e.target.value)
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ U("div", {
|
|
179
|
+
className: "mt-2 flex flex-wrap items-center gap-3",
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ H(q, {
|
|
182
|
+
type: "number",
|
|
183
|
+
className: "w-28",
|
|
184
|
+
placeholder: "Minutes",
|
|
185
|
+
value: g,
|
|
186
|
+
onChange: (e) => v(e.target.value)
|
|
187
|
+
}),
|
|
188
|
+
/* @__PURE__ */ U("label", {
|
|
189
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
190
|
+
children: [/* @__PURE__ */ H("input", {
|
|
191
|
+
type: "checkbox",
|
|
192
|
+
checked: y,
|
|
193
|
+
onChange: (e) => b(e.target.checked)
|
|
194
|
+
}), "Free preview"]
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ U(G, {
|
|
197
|
+
size: "sm",
|
|
198
|
+
onClick: async () => {
|
|
199
|
+
let t = c.trim();
|
|
200
|
+
if (!t) return u.error("Lesson title is required");
|
|
201
|
+
(await o({ variables: { input: {
|
|
202
|
+
courseId: e,
|
|
203
|
+
title: t,
|
|
204
|
+
kind: f,
|
|
205
|
+
content: m.trim() || void 0,
|
|
206
|
+
position: S.length + 1,
|
|
207
|
+
estimatedMinutes: ge(g),
|
|
208
|
+
isPreview: y
|
|
209
|
+
} } })).data?.tecCreateLesson && (u.success("Lesson added", t), d(""), h(""), v(""), b(!1), await i());
|
|
210
|
+
},
|
|
211
|
+
disabled: s,
|
|
212
|
+
className: "ml-auto",
|
|
213
|
+
children: [/* @__PURE__ */ H(I, { size: 14 }), " Add lesson"]
|
|
214
|
+
})
|
|
215
|
+
]
|
|
216
|
+
})
|
|
217
|
+
]
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
function Se({ problemId: e }) {
|
|
221
|
+
let { data: t, loading: r, refetch: i } = O({ problemId: e }), [s] = y(), [c, d] = A(null), f = t?.tecListSubmissions.items ?? [], p = async (e, t) => {
|
|
222
|
+
d(e);
|
|
223
|
+
try {
|
|
224
|
+
(await s({ variables: {
|
|
225
|
+
id: e,
|
|
226
|
+
verdict: t
|
|
227
|
+
} })).data?.tecGradeSubmission && (u.success("Submission graded", a(t)), await i());
|
|
228
|
+
} finally {
|
|
229
|
+
d(null);
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
return /* @__PURE__ */ U("div", {
|
|
233
|
+
className: "mt-3 rounded-lg border border-border-seam bg-bg-sunken p-3",
|
|
234
|
+
children: [/* @__PURE__ */ U("div", {
|
|
235
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-text-muted",
|
|
236
|
+
children: [
|
|
237
|
+
"Submissions (",
|
|
238
|
+
f.length,
|
|
239
|
+
")"
|
|
240
|
+
]
|
|
241
|
+
}), r && f.length === 0 ? /* @__PURE__ */ H(l, {
|
|
242
|
+
count: 2,
|
|
243
|
+
height: "h-10"
|
|
244
|
+
}) : f.length === 0 ? /* @__PURE__ */ H("p", {
|
|
245
|
+
className: "text-xs text-text-muted",
|
|
246
|
+
children: "No submissions yet."
|
|
247
|
+
}) : /* @__PURE__ */ H("div", {
|
|
248
|
+
className: "space-y-2",
|
|
249
|
+
children: f.map((e) => /* @__PURE__ */ U("div", {
|
|
250
|
+
className: "flex flex-wrap items-center gap-2 text-sm",
|
|
251
|
+
children: [
|
|
252
|
+
/* @__PURE__ */ H(o, { status: e.verdict }),
|
|
253
|
+
/* @__PURE__ */ H("span", {
|
|
254
|
+
className: "text-xs text-text-muted",
|
|
255
|
+
children: e.language
|
|
256
|
+
}),
|
|
257
|
+
/* @__PURE__ */ H("span", {
|
|
258
|
+
className: "text-xs text-text-muted",
|
|
259
|
+
children: n(e.createdAt)
|
|
260
|
+
}),
|
|
261
|
+
e.verdict === "PENDING" ? /* @__PURE__ */ H("div", {
|
|
262
|
+
className: "ml-auto flex flex-wrap gap-1",
|
|
263
|
+
children: de.map((t) => /* @__PURE__ */ H(G, {
|
|
264
|
+
size: "sm",
|
|
265
|
+
variant: t === "ACCEPTED" ? "default" : "outline",
|
|
266
|
+
onClick: () => p(e.id, t),
|
|
267
|
+
disabled: c === e.id,
|
|
268
|
+
children: t === "ACCEPTED" ? "Accept" : a(t)
|
|
269
|
+
}, t))
|
|
270
|
+
}) : /* @__PURE__ */ U("span", {
|
|
271
|
+
className: "ml-auto text-xs text-text-muted",
|
|
272
|
+
children: [e.pointsAwarded, " pts"]
|
|
273
|
+
})
|
|
274
|
+
]
|
|
275
|
+
}, e.id))
|
|
276
|
+
})]
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
function Ce({ hackathon: e }) {
|
|
280
|
+
let { data: t, loading: n, refetch: r } = k(e.id), [i] = T(), [a, s] = A(null), [c, d] = A({}), f = t?.tecListTeams ?? [], p = async (e, t) => {
|
|
281
|
+
let n = Math.max(0, Number(c[e] ?? "0") || 0);
|
|
282
|
+
s(e);
|
|
283
|
+
try {
|
|
284
|
+
(await i({ variables: {
|
|
285
|
+
id: e,
|
|
286
|
+
score: n,
|
|
287
|
+
winner: t
|
|
288
|
+
} })).data?.tecScoreTeam && (u.success("Team scored", `${n} pts${t ? " · winner" : ""}`), await r());
|
|
289
|
+
} finally {
|
|
290
|
+
s(null);
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
return /* @__PURE__ */ U("div", {
|
|
294
|
+
className: "mt-3 rounded-lg border border-border-seam bg-bg-sunken p-3",
|
|
295
|
+
children: [/* @__PURE__ */ U("div", {
|
|
296
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wide text-text-muted",
|
|
297
|
+
children: [
|
|
298
|
+
"Teams (",
|
|
299
|
+
f.length,
|
|
300
|
+
")"
|
|
301
|
+
]
|
|
302
|
+
}), n && f.length === 0 ? /* @__PURE__ */ H(l, {
|
|
303
|
+
count: 2,
|
|
304
|
+
height: "h-10"
|
|
305
|
+
}) : f.length === 0 ? /* @__PURE__ */ H("p", {
|
|
306
|
+
className: "text-xs text-text-muted",
|
|
307
|
+
children: "No teams registered yet."
|
|
308
|
+
}) : /* @__PURE__ */ H("div", {
|
|
309
|
+
className: "space-y-2",
|
|
310
|
+
children: f.map((t) => /* @__PURE__ */ U("div", {
|
|
311
|
+
className: "flex flex-wrap items-center gap-2 text-sm",
|
|
312
|
+
children: [
|
|
313
|
+
/* @__PURE__ */ H("span", {
|
|
314
|
+
className: "truncate font-medium text-text-primary",
|
|
315
|
+
children: t.name
|
|
316
|
+
}),
|
|
317
|
+
/* @__PURE__ */ H(o, { status: t.status }),
|
|
318
|
+
t.projectName ? /* @__PURE__ */ H("span", {
|
|
319
|
+
className: "text-xs text-text-muted",
|
|
320
|
+
children: t.projectName
|
|
321
|
+
}) : null,
|
|
322
|
+
e.status === "JUDGING" ? /* @__PURE__ */ U("div", {
|
|
323
|
+
className: "ml-auto flex items-center gap-1",
|
|
324
|
+
children: [
|
|
325
|
+
/* @__PURE__ */ H(q, {
|
|
326
|
+
type: "number",
|
|
327
|
+
className: "w-20",
|
|
328
|
+
placeholder: "Score",
|
|
329
|
+
value: c[t.id] ?? "",
|
|
330
|
+
onChange: (e) => d((n) => ({
|
|
331
|
+
...n,
|
|
332
|
+
[t.id]: e.target.value
|
|
333
|
+
}))
|
|
334
|
+
}),
|
|
335
|
+
/* @__PURE__ */ H(G, {
|
|
336
|
+
size: "sm",
|
|
337
|
+
onClick: () => p(t.id, !1),
|
|
338
|
+
disabled: a === t.id,
|
|
339
|
+
children: "Score"
|
|
340
|
+
}),
|
|
341
|
+
/* @__PURE__ */ U(G, {
|
|
342
|
+
size: "sm",
|
|
343
|
+
variant: "outline",
|
|
344
|
+
onClick: () => p(t.id, !0),
|
|
345
|
+
disabled: a === t.id,
|
|
346
|
+
children: [/* @__PURE__ */ H(R, { size: 14 }), " Winner"]
|
|
347
|
+
})
|
|
348
|
+
]
|
|
349
|
+
}) : /* @__PURE__ */ U("span", {
|
|
350
|
+
className: "ml-auto text-xs text-text-muted",
|
|
351
|
+
children: [t.score, " pts"]
|
|
352
|
+
})
|
|
353
|
+
]
|
|
354
|
+
}, t.id))
|
|
355
|
+
})]
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
function we() {
|
|
359
|
+
let { data: e, loading: t, error: n, refetch: i } = m({}), [d, { loading: p }] = h(), [g] = w(), [_] = f(), [v, y] = A(!1), [b, x] = A(null), [S, ee] = A(null), [C, te] = A(""), [T, E] = A(""), [D, O] = A(""), [k, M] = A(""), [P, ne] = A("BEGINNER"), [F, I] = A(""), [L, R] = A(""), z = e?.tecListCourses.items ?? [], B = () => {
|
|
360
|
+
te(""), E(""), O(""), M(""), ne("BEGINNER"), I(""), R(""), y(!1);
|
|
361
|
+
}, ae = async () => {
|
|
362
|
+
let e = C.trim();
|
|
363
|
+
if (!e) return u.error("Title is required");
|
|
364
|
+
let t = me(T || e);
|
|
365
|
+
if (!t) return u.error("A valid slug is required");
|
|
366
|
+
(await d({ variables: { input: {
|
|
104
367
|
title: e,
|
|
105
368
|
slug: t,
|
|
106
|
-
summary:
|
|
107
|
-
topic:
|
|
108
|
-
level:
|
|
109
|
-
estimatedMinutes:
|
|
110
|
-
tags:
|
|
111
|
-
} } })).data?.tecCreateCourse && (
|
|
112
|
-
},
|
|
113
|
-
|
|
369
|
+
summary: D.trim() || void 0,
|
|
370
|
+
topic: k.trim() || void 0,
|
|
371
|
+
level: P,
|
|
372
|
+
estimatedMinutes: ge(F),
|
|
373
|
+
tags: he(L)
|
|
374
|
+
} } })).data?.tecCreateCourse && (u.success("Course created", `"${e}" saved as a draft.`), B(), await i());
|
|
375
|
+
}, W = async (e) => {
|
|
376
|
+
x(e);
|
|
114
377
|
try {
|
|
115
|
-
(await g({ variables: { id: e } })).data?.tecPublishCourse && (
|
|
378
|
+
(await g({ variables: { id: e } })).data?.tecPublishCourse && (u.success("Course published"), await i());
|
|
116
379
|
} finally {
|
|
117
|
-
|
|
380
|
+
x(null);
|
|
118
381
|
}
|
|
119
|
-
},
|
|
120
|
-
|
|
382
|
+
}, K = async (e) => {
|
|
383
|
+
x(e);
|
|
121
384
|
try {
|
|
122
|
-
(await _({ variables: { id: e } })).data?.tecArchiveCourse && (
|
|
385
|
+
(await _({ variables: { id: e } })).data?.tecArchiveCourse && (u.success("Course archived"), await i());
|
|
123
386
|
} finally {
|
|
124
|
-
|
|
387
|
+
x(null);
|
|
125
388
|
}
|
|
126
389
|
};
|
|
127
|
-
return /* @__PURE__ */
|
|
390
|
+
return /* @__PURE__ */ U("div", {
|
|
128
391
|
className: "space-y-4",
|
|
129
392
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
summary: `${
|
|
393
|
+
/* @__PURE__ */ H(ye, {
|
|
394
|
+
summary: `${z.length} course${z.length === 1 ? "" : "s"}`,
|
|
132
395
|
actionLabel: "New course",
|
|
133
396
|
open: v,
|
|
134
397
|
onToggle: () => y((e) => !e)
|
|
135
398
|
}),
|
|
136
|
-
v ? /* @__PURE__ */
|
|
399
|
+
v ? /* @__PURE__ */ U(ve, {
|
|
137
400
|
title: "New course",
|
|
138
|
-
footer: /* @__PURE__ */
|
|
401
|
+
footer: /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(G, {
|
|
139
402
|
variant: "outline",
|
|
140
403
|
size: "sm",
|
|
141
|
-
onClick:
|
|
404
|
+
onClick: B,
|
|
142
405
|
children: "Cancel"
|
|
143
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ H(G, {
|
|
144
407
|
size: "sm",
|
|
145
|
-
onClick:
|
|
146
|
-
disabled:
|
|
147
|
-
children:
|
|
408
|
+
onClick: ae,
|
|
409
|
+
disabled: p,
|
|
410
|
+
children: p ? "Creating…" : "Create course"
|
|
148
411
|
})] }),
|
|
149
412
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ H($, {
|
|
151
414
|
label: "Title",
|
|
152
415
|
required: !0,
|
|
153
|
-
children: /* @__PURE__ */
|
|
154
|
-
value:
|
|
155
|
-
onChange: (e) =>
|
|
416
|
+
children: /* @__PURE__ */ H(q, {
|
|
417
|
+
value: C,
|
|
418
|
+
onChange: (e) => te(e.target.value),
|
|
156
419
|
placeholder: "Intro to TypeScript"
|
|
157
420
|
})
|
|
158
421
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ H($, {
|
|
160
423
|
label: "Slug",
|
|
161
424
|
required: !0,
|
|
162
|
-
children: /* @__PURE__ */
|
|
163
|
-
value:
|
|
164
|
-
onChange: (e) =>
|
|
425
|
+
children: /* @__PURE__ */ H(q, {
|
|
426
|
+
value: T,
|
|
427
|
+
onChange: (e) => E(e.target.value),
|
|
165
428
|
placeholder: "auto from title if blank"
|
|
166
429
|
})
|
|
167
430
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ H($, {
|
|
169
432
|
label: "Topic",
|
|
170
|
-
children: /* @__PURE__ */
|
|
171
|
-
value:
|
|
172
|
-
onChange: (e) =>
|
|
173
|
-
placeholder: "
|
|
433
|
+
children: /* @__PURE__ */ H(q, {
|
|
434
|
+
value: k,
|
|
435
|
+
onChange: (e) => M(e.target.value),
|
|
436
|
+
placeholder: "e.g. Web, AI, Data, Cloud"
|
|
174
437
|
})
|
|
175
438
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ H($, {
|
|
177
440
|
label: "Level",
|
|
178
|
-
children: /* @__PURE__ */
|
|
179
|
-
value:
|
|
180
|
-
onValueChange: (e) =>
|
|
181
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: /* @__PURE__ */ U(J, {
|
|
442
|
+
value: P,
|
|
443
|
+
onValueChange: (e) => ne(e),
|
|
444
|
+
children: [/* @__PURE__ */ H(Z, { children: /* @__PURE__ */ H(oe, {}) }), /* @__PURE__ */ H(Y, { children: fe.map((e) => /* @__PURE__ */ H(X, {
|
|
182
445
|
value: e,
|
|
183
|
-
children:
|
|
446
|
+
children: a(e)
|
|
184
447
|
}, e)) })]
|
|
185
448
|
})
|
|
186
449
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ H($, {
|
|
188
451
|
label: "Estimated minutes",
|
|
189
|
-
children: /* @__PURE__ */
|
|
452
|
+
children: /* @__PURE__ */ H(q, {
|
|
190
453
|
type: "number",
|
|
191
454
|
min: 0,
|
|
192
|
-
value:
|
|
193
|
-
onChange: (e) =>
|
|
455
|
+
value: F,
|
|
456
|
+
onChange: (e) => I(e.target.value),
|
|
194
457
|
placeholder: "120"
|
|
195
458
|
})
|
|
196
459
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ H($, {
|
|
198
461
|
label: "Tags (comma-separated)",
|
|
199
|
-
children: /* @__PURE__ */
|
|
200
|
-
value:
|
|
201
|
-
onChange: (e) =>
|
|
462
|
+
children: /* @__PURE__ */ H(q, {
|
|
463
|
+
value: L,
|
|
464
|
+
onChange: (e) => R(e.target.value),
|
|
202
465
|
placeholder: "typescript, basics"
|
|
203
466
|
})
|
|
204
467
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ H($, {
|
|
206
469
|
label: "Summary",
|
|
207
470
|
className: "sm:col-span-2",
|
|
208
|
-
children: /* @__PURE__ */
|
|
209
|
-
value:
|
|
210
|
-
onChange: (e) =>
|
|
471
|
+
children: /* @__PURE__ */ H(le, {
|
|
472
|
+
value: D,
|
|
473
|
+
onChange: (e) => O(e.target.value),
|
|
211
474
|
placeholder: "What learners will build and take away."
|
|
212
475
|
})
|
|
213
476
|
})
|
|
214
477
|
]
|
|
215
478
|
}) : null,
|
|
216
|
-
t &&
|
|
479
|
+
t && !z.length ? /* @__PURE__ */ H(l, { count: 4 }) : n ? /* @__PURE__ */ H(c, {
|
|
217
480
|
title: "Couldn't load courses",
|
|
218
|
-
error:
|
|
219
|
-
}) :
|
|
220
|
-
icon: /* @__PURE__ */
|
|
481
|
+
error: n
|
|
482
|
+
}) : z.length === 0 ? /* @__PURE__ */ H(s, {
|
|
483
|
+
icon: /* @__PURE__ */ H(N, { size: 26 }),
|
|
221
484
|
title: "No courses yet",
|
|
222
485
|
description: "Create your first course with the button above. TechnoSpam is pre-launch."
|
|
223
|
-
}) : /* @__PURE__ */
|
|
486
|
+
}) : /* @__PURE__ */ H("div", {
|
|
224
487
|
className: "space-y-3",
|
|
225
|
-
children:
|
|
226
|
-
actions: /* @__PURE__ */
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
488
|
+
children: z.map((e) => /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U(be, {
|
|
489
|
+
actions: /* @__PURE__ */ U(V, { children: [
|
|
490
|
+
/* @__PURE__ */ U(G, {
|
|
491
|
+
size: "sm",
|
|
492
|
+
variant: "outline",
|
|
493
|
+
onClick: () => ee(S === e.id ? null : e.id),
|
|
494
|
+
children: [/* @__PURE__ */ H(re, { size: 15 }), " Lessons"]
|
|
495
|
+
}),
|
|
496
|
+
e.status === "DRAFT" ? /* @__PURE__ */ U(G, {
|
|
497
|
+
size: "sm",
|
|
498
|
+
onClick: () => W(e.id),
|
|
499
|
+
disabled: b === e.id,
|
|
500
|
+
children: [/* @__PURE__ */ H(ie, { size: 15 }), " Publish"]
|
|
501
|
+
}) : null,
|
|
502
|
+
e.status === "ARCHIVED" ? null : /* @__PURE__ */ U(G, {
|
|
503
|
+
size: "sm",
|
|
504
|
+
variant: "outline",
|
|
505
|
+
onClick: () => K(e.id),
|
|
506
|
+
disabled: b === e.id,
|
|
507
|
+
children: [/* @__PURE__ */ H(j, { size: 15 }), " Archive"]
|
|
508
|
+
})
|
|
509
|
+
] }),
|
|
510
|
+
children: [/* @__PURE__ */ U("div", {
|
|
239
511
|
className: "flex flex-wrap items-center gap-2",
|
|
240
512
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ H("span", {
|
|
242
514
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
243
515
|
children: e.title
|
|
244
516
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ H(o, { status: e.status }),
|
|
518
|
+
/* @__PURE__ */ H(o, {
|
|
247
519
|
status: e.level,
|
|
248
520
|
kind: "level"
|
|
249
521
|
})
|
|
250
522
|
]
|
|
251
|
-
}), /* @__PURE__ */
|
|
523
|
+
}), /* @__PURE__ */ U("div", {
|
|
252
524
|
className: "mt-1 truncate text-xs text-text-muted",
|
|
253
525
|
children: [
|
|
254
526
|
e.slug,
|
|
255
527
|
" · ",
|
|
256
528
|
e.topic ?? "No topic",
|
|
257
529
|
" · ",
|
|
258
|
-
|
|
530
|
+
r(e.estimatedMinutes)
|
|
259
531
|
]
|
|
260
532
|
})]
|
|
261
|
-
}, e.id))
|
|
533
|
+
}), S === e.id ? /* @__PURE__ */ H(xe, { courseId: e.id }) : null] }, e.id))
|
|
262
534
|
})
|
|
263
535
|
]
|
|
264
536
|
});
|
|
265
537
|
}
|
|
266
|
-
function
|
|
267
|
-
let { data: e, loading: t, error: n, refetch: r } =
|
|
268
|
-
|
|
269
|
-
},
|
|
270
|
-
let e =
|
|
271
|
-
if (!e) return
|
|
272
|
-
let t =
|
|
273
|
-
if (!t) return
|
|
274
|
-
(await
|
|
538
|
+
function Te() {
|
|
539
|
+
let { data: e, loading: t, error: n, refetch: r } = C({}), [i, { loading: d }] = v(), [f] = te(), [p, m] = A(!1), [h, g] = A(null), [_, y] = A(null), [b, x] = A(""), [S, ee] = A(""), [w, T] = A(""), [E, D] = A(""), [O, k] = A("EASY"), [j, M] = A(""), [N, re] = A(""), [F, I] = A(""), L = e?.tecListProblems.items ?? [], R = () => {
|
|
540
|
+
x(""), ee(""), T(""), D(""), k("EASY"), M(""), re(""), I(""), m(!1);
|
|
541
|
+
}, z = async () => {
|
|
542
|
+
let e = b.trim();
|
|
543
|
+
if (!e) return u.error("Title is required");
|
|
544
|
+
let t = me(S || e);
|
|
545
|
+
if (!t) return u.error("A valid slug is required");
|
|
546
|
+
(await i({ variables: { input: {
|
|
275
547
|
title: e,
|
|
276
548
|
slug: t,
|
|
277
|
-
statement:
|
|
278
|
-
topic:
|
|
279
|
-
difficulty:
|
|
280
|
-
points:
|
|
281
|
-
languages:
|
|
282
|
-
starterCode:
|
|
283
|
-
} } })).data?.tecCreateProblem && (
|
|
284
|
-
},
|
|
285
|
-
|
|
549
|
+
statement: w.trim() || void 0,
|
|
550
|
+
topic: E.trim() || void 0,
|
|
551
|
+
difficulty: O,
|
|
552
|
+
points: ge(j),
|
|
553
|
+
languages: he(N),
|
|
554
|
+
starterCode: F.trim() || void 0
|
|
555
|
+
} } })).data?.tecCreateProblem && (u.success("Problem created", `"${e}" saved as a draft.`), R(), await r());
|
|
556
|
+
}, B = async (e) => {
|
|
557
|
+
g(e);
|
|
286
558
|
try {
|
|
287
|
-
(await f({ variables: { id: e } })).data?.tecPublishProblem && (
|
|
559
|
+
(await f({ variables: { id: e } })).data?.tecPublishProblem && (u.success("Problem published"), await r());
|
|
288
560
|
} finally {
|
|
289
|
-
|
|
561
|
+
g(null);
|
|
290
562
|
}
|
|
291
563
|
};
|
|
292
|
-
return /* @__PURE__ */
|
|
564
|
+
return /* @__PURE__ */ U("div", {
|
|
293
565
|
className: "space-y-4",
|
|
294
566
|
children: [
|
|
295
|
-
/* @__PURE__ */
|
|
296
|
-
summary: `${
|
|
567
|
+
/* @__PURE__ */ H(ye, {
|
|
568
|
+
summary: `${L.length} problem${L.length === 1 ? "" : "s"}`,
|
|
297
569
|
actionLabel: "New problem",
|
|
298
570
|
open: p,
|
|
299
571
|
onToggle: () => m((e) => !e)
|
|
300
572
|
}),
|
|
301
|
-
p ? /* @__PURE__ */
|
|
573
|
+
p ? /* @__PURE__ */ U(ve, {
|
|
302
574
|
title: "New problem",
|
|
303
|
-
footer: /* @__PURE__ */
|
|
575
|
+
footer: /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(G, {
|
|
304
576
|
variant: "outline",
|
|
305
577
|
size: "sm",
|
|
306
|
-
onClick:
|
|
578
|
+
onClick: R,
|
|
307
579
|
children: "Cancel"
|
|
308
|
-
}), /* @__PURE__ */
|
|
580
|
+
}), /* @__PURE__ */ H(G, {
|
|
309
581
|
size: "sm",
|
|
310
|
-
onClick:
|
|
582
|
+
onClick: z,
|
|
311
583
|
disabled: d,
|
|
312
584
|
children: d ? "Creating…" : "Create problem"
|
|
313
585
|
})] }),
|
|
314
586
|
children: [
|
|
315
|
-
/* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ H($, {
|
|
316
588
|
label: "Title",
|
|
317
589
|
required: !0,
|
|
318
|
-
children: /* @__PURE__ */
|
|
319
|
-
value:
|
|
320
|
-
onChange: (e) =>
|
|
590
|
+
children: /* @__PURE__ */ H(q, {
|
|
591
|
+
value: b,
|
|
592
|
+
onChange: (e) => x(e.target.value),
|
|
321
593
|
placeholder: "Two Sum"
|
|
322
594
|
})
|
|
323
595
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ H($, {
|
|
325
597
|
label: "Slug",
|
|
326
598
|
required: !0,
|
|
327
|
-
children: /* @__PURE__ */
|
|
328
|
-
value:
|
|
329
|
-
onChange: (e) =>
|
|
599
|
+
children: /* @__PURE__ */ H(q, {
|
|
600
|
+
value: S,
|
|
601
|
+
onChange: (e) => ee(e.target.value),
|
|
330
602
|
placeholder: "auto from title if blank"
|
|
331
603
|
})
|
|
332
604
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ H($, {
|
|
334
606
|
label: "Topic",
|
|
335
|
-
children: /* @__PURE__ */
|
|
336
|
-
value:
|
|
337
|
-
onChange: (e) =>
|
|
607
|
+
children: /* @__PURE__ */ H(q, {
|
|
608
|
+
value: E,
|
|
609
|
+
onChange: (e) => D(e.target.value),
|
|
338
610
|
placeholder: "Arrays"
|
|
339
611
|
})
|
|
340
612
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ H($, {
|
|
342
614
|
label: "Difficulty",
|
|
343
|
-
children: /* @__PURE__ */
|
|
344
|
-
value:
|
|
345
|
-
onValueChange: (e) =>
|
|
346
|
-
children: [/* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ U(J, {
|
|
616
|
+
value: O,
|
|
617
|
+
onValueChange: (e) => k(e),
|
|
618
|
+
children: [/* @__PURE__ */ H(Z, { children: /* @__PURE__ */ H(oe, {}) }), /* @__PURE__ */ H(Y, { children: pe.map((e) => /* @__PURE__ */ H(X, {
|
|
347
619
|
value: e,
|
|
348
|
-
children:
|
|
620
|
+
children: a(e)
|
|
349
621
|
}, e)) })]
|
|
350
622
|
})
|
|
351
623
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ H($, {
|
|
353
625
|
label: "Points",
|
|
354
|
-
children: /* @__PURE__ */
|
|
626
|
+
children: /* @__PURE__ */ H(q, {
|
|
355
627
|
type: "number",
|
|
356
628
|
min: 0,
|
|
357
|
-
value:
|
|
358
|
-
onChange: (e) =>
|
|
629
|
+
value: j,
|
|
630
|
+
onChange: (e) => M(e.target.value),
|
|
359
631
|
placeholder: "100"
|
|
360
632
|
})
|
|
361
633
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
634
|
+
/* @__PURE__ */ H($, {
|
|
363
635
|
label: "Languages (comma-separated)",
|
|
364
|
-
children: /* @__PURE__ */
|
|
365
|
-
value:
|
|
366
|
-
onChange: (e) =>
|
|
636
|
+
children: /* @__PURE__ */ H(q, {
|
|
637
|
+
value: N,
|
|
638
|
+
onChange: (e) => re(e.target.value),
|
|
367
639
|
placeholder: "python, typescript"
|
|
368
640
|
})
|
|
369
641
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ H($, {
|
|
371
643
|
label: "Statement",
|
|
372
644
|
className: "sm:col-span-2",
|
|
373
|
-
children: /* @__PURE__ */
|
|
374
|
-
value:
|
|
375
|
-
onChange: (e) =>
|
|
645
|
+
children: /* @__PURE__ */ H(le, {
|
|
646
|
+
value: w,
|
|
647
|
+
onChange: (e) => T(e.target.value),
|
|
376
648
|
placeholder: "Describe the problem and constraints."
|
|
377
649
|
})
|
|
378
650
|
}),
|
|
379
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ H($, {
|
|
380
652
|
label: "Starter code",
|
|
381
653
|
className: "sm:col-span-2",
|
|
382
|
-
children: /* @__PURE__ */
|
|
383
|
-
value:
|
|
384
|
-
onChange: (e) =>
|
|
654
|
+
children: /* @__PURE__ */ H(le, {
|
|
655
|
+
value: F,
|
|
656
|
+
onChange: (e) => I(e.target.value),
|
|
385
657
|
className: "font-mono",
|
|
386
658
|
placeholder: "def solve(nums, target):\\n pass"
|
|
387
659
|
})
|
|
388
660
|
})
|
|
389
661
|
]
|
|
390
662
|
}) : null,
|
|
391
|
-
t && !
|
|
663
|
+
t && !L.length ? /* @__PURE__ */ H(l, { count: 4 }) : n ? /* @__PURE__ */ H(c, {
|
|
392
664
|
title: "Couldn't load problems",
|
|
393
665
|
error: n
|
|
394
|
-
}) :
|
|
395
|
-
icon: /* @__PURE__ */
|
|
666
|
+
}) : L.length === 0 ? /* @__PURE__ */ H(s, {
|
|
667
|
+
icon: /* @__PURE__ */ H(P, { size: 26 }),
|
|
396
668
|
title: "No problems yet",
|
|
397
669
|
description: "Create your first coding problem with the button above. TechnoSpam is pre-launch."
|
|
398
|
-
}) : /* @__PURE__ */
|
|
670
|
+
}) : /* @__PURE__ */ H("div", {
|
|
399
671
|
className: "space-y-3",
|
|
400
|
-
children:
|
|
401
|
-
actions:
|
|
672
|
+
children: L.map((e) => /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U(be, {
|
|
673
|
+
actions: /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ U(G, {
|
|
674
|
+
size: "sm",
|
|
675
|
+
variant: "outline",
|
|
676
|
+
onClick: () => y(_ === e.id ? null : e.id),
|
|
677
|
+
children: [/* @__PURE__ */ H(ne, { size: 15 }), " Grade"]
|
|
678
|
+
}), e.status === "DRAFT" ? /* @__PURE__ */ U(G, {
|
|
402
679
|
size: "sm",
|
|
403
|
-
onClick: () =>
|
|
404
|
-
disabled:
|
|
405
|
-
children: [/* @__PURE__ */
|
|
406
|
-
}) :
|
|
407
|
-
children: [/* @__PURE__ */
|
|
680
|
+
onClick: () => B(e.id),
|
|
681
|
+
disabled: h === e.id,
|
|
682
|
+
children: [/* @__PURE__ */ H(ie, { size: 15 }), " Publish"]
|
|
683
|
+
}) : null] }),
|
|
684
|
+
children: [/* @__PURE__ */ U("div", {
|
|
408
685
|
className: "flex flex-wrap items-center gap-2",
|
|
409
686
|
children: [
|
|
410
|
-
/* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ H("span", {
|
|
411
688
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
412
689
|
children: e.title
|
|
413
690
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
-
/* @__PURE__ */
|
|
691
|
+
/* @__PURE__ */ H(o, { status: e.status }),
|
|
692
|
+
/* @__PURE__ */ H(o, {
|
|
416
693
|
status: e.difficulty,
|
|
417
694
|
kind: "level"
|
|
418
695
|
})
|
|
419
696
|
]
|
|
420
|
-
}), /* @__PURE__ */
|
|
697
|
+
}), /* @__PURE__ */ U("div", {
|
|
421
698
|
className: "mt-1 truncate text-xs text-text-muted",
|
|
422
699
|
children: [
|
|
423
700
|
e.slug,
|
|
@@ -430,233 +707,266 @@ function Q() {
|
|
|
430
707
|
e.languages.length ? e.languages.join(", ") : "No languages"
|
|
431
708
|
]
|
|
432
709
|
})]
|
|
433
|
-
}, e.id))
|
|
710
|
+
}), _ === e.id ? /* @__PURE__ */ H(Se, { problemId: e.id }) : null] }, e.id))
|
|
434
711
|
})
|
|
435
712
|
]
|
|
436
713
|
});
|
|
437
714
|
}
|
|
438
|
-
function
|
|
439
|
-
let { data: e, loading:
|
|
440
|
-
|
|
441
|
-
},
|
|
442
|
-
let e =
|
|
443
|
-
if (!e) return
|
|
444
|
-
let t =
|
|
445
|
-
if (!t) return
|
|
446
|
-
let n =
|
|
447
|
-
if (!n || !r) return
|
|
448
|
-
if (new Date(r) <= new Date(n)) return
|
|
715
|
+
function Ee() {
|
|
716
|
+
let { data: e, loading: t, error: r, refetch: a } = b({}), [d, { loading: f }] = g(), [m] = ee(), [h] = E(), [_] = D(), [v] = p(), [y, x] = A(!1), [S, C] = A(null), [w, te] = A(null), [T, O] = A(""), [k, j] = A(""), [N, P] = A(""), [re, I] = A(""), [L, z] = A(""), [ae, W] = A(""), [K, J] = A(""), [Y, X] = A(""), [Z, oe] = A(""), Q = e?.tecListHackathons.items ?? [], se = () => {
|
|
717
|
+
O(""), j(""), P(""), I(""), z(""), W(""), J(""), X(""), oe(""), x(!1);
|
|
718
|
+
}, ce = async () => {
|
|
719
|
+
let e = T.trim();
|
|
720
|
+
if (!e) return u.error("Title is required");
|
|
721
|
+
let t = me(k || e);
|
|
722
|
+
if (!t) return u.error("A valid slug is required");
|
|
723
|
+
let n = _e(L), r = _e(ae);
|
|
724
|
+
if (!n || !r) return u.error("Start and end date/time are required");
|
|
725
|
+
if (new Date(r) <= new Date(n)) return u.error("End must be after the start");
|
|
449
726
|
(await d({ variables: { input: {
|
|
450
727
|
title: e,
|
|
451
728
|
slug: t,
|
|
452
|
-
theme:
|
|
453
|
-
description:
|
|
729
|
+
theme: N.trim() || void 0,
|
|
730
|
+
description: re.trim() || void 0,
|
|
454
731
|
startAt: n,
|
|
455
732
|
endAt: r,
|
|
456
|
-
prizePool: K
|
|
457
|
-
maxTeamSize:
|
|
458
|
-
tags:
|
|
459
|
-
} } })).data?.tecCreateHackathon && (
|
|
460
|
-
},
|
|
461
|
-
|
|
733
|
+
prizePool: ge(K),
|
|
734
|
+
maxTeamSize: ge(Y),
|
|
735
|
+
tags: he(Z)
|
|
736
|
+
} } })).data?.tecCreateHackathon && (u.success("Hackathon created", `"${e}" saved as a draft.`), se(), await a());
|
|
737
|
+
}, ue = async (e) => {
|
|
738
|
+
C(e);
|
|
462
739
|
try {
|
|
463
|
-
(await
|
|
740
|
+
(await m({ variables: { id: e } })).data?.tecOpenRegistration && (u.success("Registration open", "Teams can now register."), await a());
|
|
464
741
|
} finally {
|
|
465
|
-
|
|
742
|
+
C(null);
|
|
743
|
+
}
|
|
744
|
+
}, de = async (e, t, n) => {
|
|
745
|
+
C(e);
|
|
746
|
+
try {
|
|
747
|
+
(await t({ variables: { id: e } })).data && (u.success(n), await a());
|
|
748
|
+
} finally {
|
|
749
|
+
C(null);
|
|
466
750
|
}
|
|
467
751
|
};
|
|
468
|
-
return /* @__PURE__ */
|
|
752
|
+
return /* @__PURE__ */ U("div", {
|
|
469
753
|
className: "space-y-4",
|
|
470
754
|
children: [
|
|
471
|
-
/* @__PURE__ */
|
|
472
|
-
summary: `${
|
|
755
|
+
/* @__PURE__ */ H(ye, {
|
|
756
|
+
summary: `${Q.length} hackathon${Q.length === 1 ? "" : "s"}`,
|
|
473
757
|
actionLabel: "New hackathon",
|
|
474
|
-
open:
|
|
475
|
-
onToggle: () =>
|
|
758
|
+
open: y,
|
|
759
|
+
onToggle: () => x((e) => !e)
|
|
476
760
|
}),
|
|
477
|
-
|
|
761
|
+
y ? /* @__PURE__ */ U(ve, {
|
|
478
762
|
title: "New hackathon",
|
|
479
|
-
footer: /* @__PURE__ */
|
|
763
|
+
footer: /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(G, {
|
|
480
764
|
variant: "outline",
|
|
481
765
|
size: "sm",
|
|
482
|
-
onClick:
|
|
766
|
+
onClick: se,
|
|
483
767
|
children: "Cancel"
|
|
484
|
-
}), /* @__PURE__ */
|
|
768
|
+
}), /* @__PURE__ */ H(G, {
|
|
485
769
|
size: "sm",
|
|
486
|
-
onClick:
|
|
770
|
+
onClick: ce,
|
|
487
771
|
disabled: f,
|
|
488
772
|
children: f ? "Creating…" : "Create hackathon"
|
|
489
773
|
})] }),
|
|
490
774
|
children: [
|
|
491
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ H($, {
|
|
492
776
|
label: "Title",
|
|
493
777
|
required: !0,
|
|
494
|
-
children: /* @__PURE__ */
|
|
495
|
-
value:
|
|
496
|
-
onChange: (e) =>
|
|
778
|
+
children: /* @__PURE__ */ H(q, {
|
|
779
|
+
value: T,
|
|
780
|
+
onChange: (e) => O(e.target.value),
|
|
497
781
|
placeholder: "Build Days 2026"
|
|
498
782
|
})
|
|
499
783
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ H($, {
|
|
501
785
|
label: "Slug",
|
|
502
786
|
required: !0,
|
|
503
|
-
children: /* @__PURE__ */
|
|
504
|
-
value:
|
|
505
|
-
onChange: (e) =>
|
|
787
|
+
children: /* @__PURE__ */ H(q, {
|
|
788
|
+
value: k,
|
|
789
|
+
onChange: (e) => j(e.target.value),
|
|
506
790
|
placeholder: "auto from title if blank"
|
|
507
791
|
})
|
|
508
792
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ H($, {
|
|
510
794
|
label: "Theme",
|
|
511
|
-
children: /* @__PURE__ */
|
|
512
|
-
value:
|
|
513
|
-
onChange: (e) =>
|
|
795
|
+
children: /* @__PURE__ */ H(q, {
|
|
796
|
+
value: N,
|
|
797
|
+
onChange: (e) => P(e.target.value),
|
|
514
798
|
placeholder: "AI for good"
|
|
515
799
|
})
|
|
516
800
|
}),
|
|
517
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ H($, {
|
|
518
802
|
label: "Tags (comma-separated)",
|
|
519
|
-
children: /* @__PURE__ */
|
|
520
|
-
value:
|
|
521
|
-
onChange: (e) =>
|
|
803
|
+
children: /* @__PURE__ */ H(q, {
|
|
804
|
+
value: Z,
|
|
805
|
+
onChange: (e) => oe(e.target.value),
|
|
522
806
|
placeholder: "ai, web"
|
|
523
807
|
})
|
|
524
808
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ H($, {
|
|
526
810
|
label: "Starts",
|
|
527
811
|
required: !0,
|
|
528
|
-
children: /* @__PURE__ */
|
|
812
|
+
children: /* @__PURE__ */ H(q, {
|
|
529
813
|
type: "datetime-local",
|
|
530
|
-
value:
|
|
531
|
-
onChange: (e) =>
|
|
814
|
+
value: L,
|
|
815
|
+
onChange: (e) => z(e.target.value)
|
|
532
816
|
})
|
|
533
817
|
}),
|
|
534
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ H($, {
|
|
535
819
|
label: "Ends",
|
|
536
820
|
required: !0,
|
|
537
|
-
children: /* @__PURE__ */
|
|
821
|
+
children: /* @__PURE__ */ H(q, {
|
|
538
822
|
type: "datetime-local",
|
|
539
|
-
value:
|
|
540
|
-
onChange: (e) =>
|
|
823
|
+
value: ae,
|
|
824
|
+
onChange: (e) => W(e.target.value)
|
|
541
825
|
})
|
|
542
826
|
}),
|
|
543
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ H($, {
|
|
544
828
|
label: "Prize pool",
|
|
545
|
-
children: /* @__PURE__ */
|
|
829
|
+
children: /* @__PURE__ */ H(q, {
|
|
546
830
|
type: "number",
|
|
547
831
|
min: 0,
|
|
548
|
-
value:
|
|
549
|
-
onChange: (e) =>
|
|
832
|
+
value: K,
|
|
833
|
+
onChange: (e) => J(e.target.value),
|
|
550
834
|
placeholder: "5000"
|
|
551
835
|
})
|
|
552
836
|
}),
|
|
553
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ H($, {
|
|
554
838
|
label: "Max team size",
|
|
555
|
-
children: /* @__PURE__ */
|
|
839
|
+
children: /* @__PURE__ */ H(q, {
|
|
556
840
|
type: "number",
|
|
557
841
|
min: 1,
|
|
558
|
-
value:
|
|
559
|
-
onChange: (e) =>
|
|
842
|
+
value: Y,
|
|
843
|
+
onChange: (e) => X(e.target.value),
|
|
560
844
|
placeholder: "4"
|
|
561
845
|
})
|
|
562
846
|
}),
|
|
563
|
-
/* @__PURE__ */
|
|
847
|
+
/* @__PURE__ */ H($, {
|
|
564
848
|
label: "Description",
|
|
565
849
|
className: "sm:col-span-2",
|
|
566
|
-
children: /* @__PURE__ */
|
|
567
|
-
value:
|
|
568
|
-
onChange: (e) =>
|
|
850
|
+
children: /* @__PURE__ */ H(le, {
|
|
851
|
+
value: re,
|
|
852
|
+
onChange: (e) => I(e.target.value),
|
|
569
853
|
placeholder: "What the hackathon is about and how judging works."
|
|
570
854
|
})
|
|
571
855
|
})
|
|
572
856
|
]
|
|
573
857
|
}) : null,
|
|
574
|
-
|
|
858
|
+
t && !Q.length ? /* @__PURE__ */ H(l, { count: 4 }) : r ? /* @__PURE__ */ H(c, {
|
|
575
859
|
title: "Couldn't load hackathons",
|
|
576
|
-
error:
|
|
577
|
-
}) :
|
|
578
|
-
icon: /* @__PURE__ */
|
|
860
|
+
error: r
|
|
861
|
+
}) : Q.length === 0 ? /* @__PURE__ */ H(s, {
|
|
862
|
+
icon: /* @__PURE__ */ H(R, { size: 26 }),
|
|
579
863
|
title: "No hackathons yet",
|
|
580
864
|
description: "Create your first hackathon with the button above. TechnoSpam is pre-launch."
|
|
581
|
-
}) : /* @__PURE__ */
|
|
865
|
+
}) : /* @__PURE__ */ H("div", {
|
|
582
866
|
className: "space-y-3",
|
|
583
|
-
children:
|
|
584
|
-
actions:
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
867
|
+
children: Q.map((e) => /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U(be, {
|
|
868
|
+
actions: /* @__PURE__ */ U(V, { children: [
|
|
869
|
+
/* @__PURE__ */ U(G, {
|
|
870
|
+
size: "sm",
|
|
871
|
+
variant: "outline",
|
|
872
|
+
onClick: () => te(w === e.id ? null : e.id),
|
|
873
|
+
children: [/* @__PURE__ */ H(B, { size: 15 }), " Teams"]
|
|
874
|
+
}),
|
|
875
|
+
e.status === "DRAFT" ? /* @__PURE__ */ U(G, {
|
|
876
|
+
size: "sm",
|
|
877
|
+
onClick: () => ue(e.id),
|
|
878
|
+
disabled: S === e.id,
|
|
879
|
+
children: [/* @__PURE__ */ H(ie, { size: 15 }), " Open registration"]
|
|
880
|
+
}) : null,
|
|
881
|
+
e.status === "REGISTRATION_OPEN" ? /* @__PURE__ */ U(G, {
|
|
882
|
+
size: "sm",
|
|
883
|
+
onClick: () => de(e.id, h, "Hackathon started"),
|
|
884
|
+
disabled: S === e.id,
|
|
885
|
+
children: [/* @__PURE__ */ H(F, { size: 15 }), " Start"]
|
|
886
|
+
}) : null,
|
|
887
|
+
e.status === "IN_PROGRESS" ? /* @__PURE__ */ U(G, {
|
|
888
|
+
size: "sm",
|
|
889
|
+
onClick: () => de(e.id, _, "Judging started"),
|
|
890
|
+
disabled: S === e.id,
|
|
891
|
+
children: [/* @__PURE__ */ H(ne, { size: 15 }), " Start judging"]
|
|
892
|
+
}) : null,
|
|
893
|
+
e.status === "JUDGING" ? /* @__PURE__ */ U(G, {
|
|
894
|
+
size: "sm",
|
|
895
|
+
onClick: () => de(e.id, v, "Hackathon completed"),
|
|
896
|
+
disabled: S === e.id,
|
|
897
|
+
children: [/* @__PURE__ */ H(M, { size: 15 }), " Complete"]
|
|
898
|
+
}) : null
|
|
899
|
+
] }),
|
|
900
|
+
children: [/* @__PURE__ */ U("div", {
|
|
591
901
|
className: "flex flex-wrap items-center gap-2",
|
|
592
|
-
children: [/* @__PURE__ */
|
|
902
|
+
children: [/* @__PURE__ */ H("span", {
|
|
593
903
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
594
904
|
children: e.title
|
|
595
|
-
}), /* @__PURE__ */
|
|
596
|
-
}), /* @__PURE__ */
|
|
905
|
+
}), /* @__PURE__ */ H(o, { status: e.status })]
|
|
906
|
+
}), /* @__PURE__ */ U("div", {
|
|
597
907
|
className: "mt-1 truncate text-xs text-text-muted",
|
|
598
908
|
children: [
|
|
599
909
|
e.slug,
|
|
600
910
|
" · ",
|
|
601
|
-
|
|
911
|
+
n(e.startAt),
|
|
602
912
|
" → ",
|
|
603
|
-
|
|
604
|
-
e.prizePool ? ` · ${
|
|
913
|
+
n(e.endAt),
|
|
914
|
+
e.prizePool ? ` · ${i(e.prizePool, e.currency)} prize` : ""
|
|
605
915
|
]
|
|
606
916
|
})]
|
|
607
|
-
}, e.id))
|
|
917
|
+
}), w === e.id ? /* @__PURE__ */ H(Ce, { hackathon: e }) : null] }, e.id))
|
|
608
918
|
})
|
|
609
919
|
]
|
|
610
920
|
});
|
|
611
921
|
}
|
|
612
|
-
function
|
|
613
|
-
let { data: e, loading: t, error: n, refetch:
|
|
922
|
+
function De() {
|
|
923
|
+
let { data: e, loading: t, error: n, refetch: r } = S({}), [a] = d(), [f, p] = A(null), m = e?.tecListMentors.items ?? [], h = m.filter((e) => e.status === "PENDING").length, g = async (e) => {
|
|
614
924
|
p(e);
|
|
615
925
|
try {
|
|
616
|
-
(await
|
|
926
|
+
(await a({ variables: { id: e } })).data?.tecApproveMentor && (u.success("Mentor approved", "They can now accept mentees."), await r());
|
|
617
927
|
} finally {
|
|
618
928
|
p(null);
|
|
619
929
|
}
|
|
620
930
|
};
|
|
621
|
-
return /* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ U("div", {
|
|
622
932
|
className: "space-y-4",
|
|
623
|
-
children: [/* @__PURE__ */
|
|
933
|
+
children: [/* @__PURE__ */ H(ye, { summary: `${m.length} mentor${m.length === 1 ? "" : "s"}${h ? ` · ${h} pending approval` : ""}` }), t && !m.length ? /* @__PURE__ */ H(l, { count: 4 }) : n ? /* @__PURE__ */ H(c, {
|
|
624
934
|
title: "Couldn't load mentors",
|
|
625
935
|
error: n
|
|
626
|
-
}) : m.length === 0 ? /* @__PURE__ */
|
|
627
|
-
icon: /* @__PURE__ */
|
|
936
|
+
}) : m.length === 0 ? /* @__PURE__ */ H(s, {
|
|
937
|
+
icon: /* @__PURE__ */ H(B, { size: 26 }),
|
|
628
938
|
title: "No mentors yet",
|
|
629
939
|
description: "Mentor applications will appear here for review. TechnoSpam is pre-launch."
|
|
630
|
-
}) : /* @__PURE__ */
|
|
940
|
+
}) : /* @__PURE__ */ H("div", {
|
|
631
941
|
className: "space-y-3",
|
|
632
|
-
children: m.map((e) => /* @__PURE__ */
|
|
633
|
-
actions: e.status === "PENDING" ? /* @__PURE__ */
|
|
942
|
+
children: m.map((e) => /* @__PURE__ */ U(be, {
|
|
943
|
+
actions: e.status === "PENDING" ? /* @__PURE__ */ U(G, {
|
|
634
944
|
size: "sm",
|
|
635
945
|
onClick: () => g(e.id),
|
|
636
946
|
disabled: f === e.id,
|
|
637
|
-
children: [/* @__PURE__ */
|
|
947
|
+
children: [/* @__PURE__ */ H(z, { size: 15 }), " Approve"]
|
|
638
948
|
}) : void 0,
|
|
639
|
-
children: [/* @__PURE__ */
|
|
949
|
+
children: [/* @__PURE__ */ U("div", {
|
|
640
950
|
className: "flex flex-wrap items-center gap-2",
|
|
641
951
|
children: [
|
|
642
|
-
/* @__PURE__ */
|
|
952
|
+
/* @__PURE__ */ H("span", {
|
|
643
953
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
644
954
|
children: e.headline
|
|
645
955
|
}),
|
|
646
|
-
/* @__PURE__ */
|
|
647
|
-
e.isAcceptingMentees ? /* @__PURE__ */
|
|
956
|
+
/* @__PURE__ */ H(o, { status: e.status }),
|
|
957
|
+
e.isAcceptingMentees ? /* @__PURE__ */ H(W, {
|
|
648
958
|
variant: "secondary",
|
|
649
959
|
className: "text-[11px]",
|
|
650
960
|
children: "Accepting mentees"
|
|
651
961
|
}) : null
|
|
652
962
|
]
|
|
653
|
-
}), /* @__PURE__ */
|
|
963
|
+
}), /* @__PURE__ */ U("div", {
|
|
654
964
|
className: "mt-1 truncate text-xs text-text-muted",
|
|
655
965
|
children: [
|
|
656
966
|
e.expertise.length ? e.expertise.slice(0, 4).join(", ") : "No expertise listed",
|
|
657
967
|
" ·",
|
|
658
968
|
" ",
|
|
659
|
-
|
|
969
|
+
i(e.hourlyRate, e.currency),
|
|
660
970
|
"/hr · ",
|
|
661
971
|
e.sessionsCount,
|
|
662
972
|
" sessions"
|
|
@@ -666,40 +976,60 @@ function se() {
|
|
|
666
976
|
})]
|
|
667
977
|
});
|
|
668
978
|
}
|
|
669
|
-
function
|
|
670
|
-
let [
|
|
671
|
-
return /* @__PURE__ */
|
|
979
|
+
function Oe() {
|
|
980
|
+
let [n, r] = A("courses"), { currentUser: i } = e(), a = (i?.role ?? "").toLowerCase();
|
|
981
|
+
return /* @__PURE__ */ U(t, {
|
|
672
982
|
hero: !0,
|
|
673
983
|
title: "Authoring Console",
|
|
674
984
|
description: "Create and manage TechnoSpam content — courses, problems, hackathons, and mentor applications.",
|
|
675
|
-
children: [
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
985
|
+
children: [
|
|
986
|
+
a.includes("admin") || a.includes("owner") || a.includes("instructor") ? null : /* @__PURE__ */ U(K, {
|
|
987
|
+
className: "mb-5 flex items-start gap-3 border-status-warning-border p-4",
|
|
988
|
+
children: [/* @__PURE__ */ H(L, {
|
|
989
|
+
size: 18,
|
|
990
|
+
className: "mt-0.5 shrink-0 text-status-warning-text"
|
|
991
|
+
}), /* @__PURE__ */ U("div", {
|
|
992
|
+
className: "text-sm text-text-secondary",
|
|
993
|
+
children: [
|
|
994
|
+
/* @__PURE__ */ H("span", {
|
|
995
|
+
className: "font-medium text-text-primary",
|
|
996
|
+
children: "Authoring is limited to workspace admins."
|
|
997
|
+
}),
|
|
998
|
+
" ",
|
|
999
|
+
"You can review content here, but create/publish actions require the right permission and will be rejected at the gateway otherwise."
|
|
1000
|
+
]
|
|
1001
|
+
})]
|
|
1002
|
+
}),
|
|
1003
|
+
/* @__PURE__ */ H(Q, {
|
|
1004
|
+
value: n,
|
|
1005
|
+
onValueChange: (e) => r(e),
|
|
1006
|
+
children: /* @__PURE__ */ U(se, {
|
|
1007
|
+
className: "mb-5",
|
|
1008
|
+
children: [
|
|
1009
|
+
/* @__PURE__ */ U(ce, {
|
|
1010
|
+
value: "courses",
|
|
1011
|
+
children: [/* @__PURE__ */ H(N, { size: 15 }), " Courses"]
|
|
1012
|
+
}),
|
|
1013
|
+
/* @__PURE__ */ U(ce, {
|
|
1014
|
+
value: "problems",
|
|
1015
|
+
children: [/* @__PURE__ */ H(P, { size: 15 }), " Problems"]
|
|
1016
|
+
}),
|
|
1017
|
+
/* @__PURE__ */ U(ce, {
|
|
1018
|
+
value: "hackathons",
|
|
1019
|
+
children: [/* @__PURE__ */ H(R, { size: 15 }), " Hackathons"]
|
|
1020
|
+
}),
|
|
1021
|
+
/* @__PURE__ */ U(ce, {
|
|
1022
|
+
value: "mentors",
|
|
1023
|
+
children: [/* @__PURE__ */ H(B, { size: 15 }), " Mentors"]
|
|
1024
|
+
})
|
|
1025
|
+
]
|
|
1026
|
+
})
|
|
1027
|
+
}),
|
|
1028
|
+
H(n === "courses" ? we : n === "problems" ? Te : n === "hackathons" ? Ee : De, {})
|
|
1029
|
+
]
|
|
700
1030
|
});
|
|
701
1031
|
}
|
|
702
1032
|
//#endregion
|
|
703
|
-
export {
|
|
1033
|
+
export { Oe as AdminAdminDashboardPagePage };
|
|
704
1034
|
|
|
705
1035
|
//# sourceMappingURL=AdminAdminDashboardPagePage.js.map
|