@burdenoff/microfe-technospam 2026.1031.1 → 2026.1031.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.
- package/dist/technospam/components/StatusBadge.js +1 -1
- package/dist/technospam/components/StatusBadge.js.map +1 -1
- package/dist/technospam/components/SubmissionViews.js +1 -1
- package/dist/technospam/components/SubmissionViews.js.map +1 -1
- package/dist/technospam/components/lesson/InteractiveWorkspace.js +1 -1
- package/dist/technospam/components/lesson/InteractiveWorkspace.js.map +1 -1
- package/dist/technospam/pages/AdminAdminDashboardPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js +194 -186
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js.map +1 -1
- package/dist/technospam/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/AnalyticsAnalyticsPagePage.js +5 -2
- package/dist/technospam/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsPortfolioPagePage.js +1 -0
- package/dist/technospam/pages/ApplicationsPortfolioPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +2 -1
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js +167 -162
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +2 -2
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.js +77 -77
- package/dist/technospam/pages/CoursesCoursesPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesLessonPlayerPagePage.js +2 -2
- package/dist/technospam/pages/CoursesLessonPlayerPagePage.js.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js +3 -3
- package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js +71 -71
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipMentorProfilePagePage.d.ts.map +1 -1
- package/dist/technospam/pages/MentorshipMentorProfilePagePage.js +6 -1
- package/dist/technospam/pages/MentorshipMentorProfilePagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.js +1 -0
- package/dist/technospam/pages/MentorshipMentorsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.js +97 -98
- package/dist/technospam/pages/MentorshipSessionsPagePage.js.map +1 -1
- package/package.json +7 -6
|
@@ -8,55 +8,55 @@ import { EmptyView as f, ErrorView as p, LoadingRows as m } from "../components/
|
|
|
8
8
|
import { TagInput as h } from "../components/TagInput.js";
|
|
9
9
|
import { CodePanel as g, TestResultsPanel as _ } from "../components/SubmissionViews.js";
|
|
10
10
|
import { notify as v } from "../lib/toast.js";
|
|
11
|
-
import { useApproveMentor as y, useArchiveCourse as b, useCompleteHackathon as x, useCoursesQuery as S, useCreateCourse as C, useCreateHackathon as w, useCreateLesson as T, useCreateProblem as ee, useGradeSubmission as E, useHackathonsQuery as D, useLessonQuizKeyQuery as O, useLessonsQuery as k, useMentorsQuery as A, useOpenRegistration as
|
|
11
|
+
import { useApproveMentor as y, useArchiveCourse as b, useCompleteHackathon as x, useCoursesQuery as S, useCreateCourse as C, useCreateHackathon as w, useCreateLesson as T, useCreateProblem as ee, useGradeSubmission as E, useHackathonsQuery as D, useLessonQuizKeyQuery as O, useLessonsQuery as k, useMentorsQuery as A, useOpenRegistration as te, useProblemsQuery as j, usePublishCourse as M, usePublishProblem as N, useRegradeSubmission as P, useScoreTeam as F, useStartHackathon as I, useStartJudging as L, useSubmissionsQuery as R, useTeamsQuery as z, useUpdateLesson as B } from "../api/technospamApi.js";
|
|
12
12
|
import "../components/index.js";
|
|
13
|
-
import { draftFromLesson as
|
|
14
|
-
import { LessonKindFields as
|
|
15
|
-
import { useMemo as
|
|
16
|
-
import { Archive as
|
|
13
|
+
import { draftFromLesson as V, draftToInput as H } from "../components/lesson/lessonAuthoring.js";
|
|
14
|
+
import { LessonKindFields as ne } from "../components/lesson/LessonKindFields.js";
|
|
15
|
+
import { useMemo as re, useState as U } from "react";
|
|
16
|
+
import { Archive as ie, Award as ae, BookOpen as oe, Code2 as W, ExternalLink as se, Gavel as ce, ListChecks as le, Pencil as ue, Play as de, Plus as fe, RefreshCw as pe, Rocket as me, ShieldAlert as he, Trophy as ge, UserCheck as _e, Users as G, X as ve } from "lucide-react";
|
|
17
17
|
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
18
|
-
import { Badge as ye, Button as Y, GlassCard as be, Input as X, Select as xe, SelectContent as Se, SelectItem as Ce, SelectTrigger as we, SelectValue as Te, Tabs as Ee,
|
|
19
|
-
import { nativeConfirm as
|
|
18
|
+
import { Badge as ye, Button as Y, GlassCard as be, Input as X, Select as xe, SelectContent as Se, SelectItem as Ce, SelectTrigger as we, SelectValue as Te, Tabs as Ee, TabsContent as De, TabsList as Oe, TabsTrigger as ke, Textarea as Z } from "@burdenoff/fe-libs/ui";
|
|
19
|
+
import { nativeConfirm as Ae } from "@burdenoff/fe-libs/shared/native";
|
|
20
20
|
//#region src/technospam/pages/AdminAdminDashboardPagePage.tsx
|
|
21
|
-
var
|
|
21
|
+
var je = [
|
|
22
22
|
"ARTICLE",
|
|
23
23
|
"VIDEO",
|
|
24
24
|
"INTERACTIVE",
|
|
25
25
|
"QUIZ",
|
|
26
26
|
"PROJECT"
|
|
27
|
-
],
|
|
27
|
+
], Me = [
|
|
28
28
|
"ACCEPTED",
|
|
29
29
|
"WRONG_ANSWER",
|
|
30
30
|
"TIME_LIMIT_EXCEEDED",
|
|
31
31
|
"RUNTIME_ERROR",
|
|
32
32
|
"COMPILE_ERROR"
|
|
33
|
-
],
|
|
33
|
+
], Ne = [
|
|
34
34
|
"BEGINNER",
|
|
35
35
|
"INTERMEDIATE",
|
|
36
36
|
"ADVANCED",
|
|
37
37
|
"EXPERT"
|
|
38
|
-
],
|
|
38
|
+
], Pe = [
|
|
39
39
|
"EASY",
|
|
40
40
|
"MEDIUM",
|
|
41
41
|
"HARD"
|
|
42
42
|
];
|
|
43
|
-
function
|
|
43
|
+
function Fe(e) {
|
|
44
44
|
return e.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Ie(e) {
|
|
47
47
|
return e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
48
48
|
}
|
|
49
49
|
function Q(e) {
|
|
50
50
|
let t = Number.parseInt(e, 10);
|
|
51
51
|
return Number.isFinite(t) ? t : void 0;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Le(e) {
|
|
54
54
|
if (!e) return null;
|
|
55
55
|
let t = new Date(e);
|
|
56
56
|
return Number.isNaN(t.getTime()) ? null : t.toISOString();
|
|
57
57
|
}
|
|
58
58
|
function $({ label: e, required: t, className: n, children: r }) {
|
|
59
|
-
return /* @__PURE__ */ J("
|
|
59
|
+
return /* @__PURE__ */ J("label", {
|
|
60
60
|
className: `flex flex-col gap-1.5 ${n ?? ""}`,
|
|
61
61
|
children: [/* @__PURE__ */ J("span", {
|
|
62
62
|
className: "text-xs font-medium text-text-secondary",
|
|
@@ -67,7 +67,7 @@ function $({ label: e, required: t, className: n, children: r }) {
|
|
|
67
67
|
}), r]
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Re({ seed: e, icon: n }) {
|
|
71
71
|
return /* @__PURE__ */ q("span", {
|
|
72
72
|
className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br text-white shadow-sm", r(e)),
|
|
73
73
|
children: /* @__PURE__ */ q(n, {
|
|
@@ -76,7 +76,7 @@ function Le({ seed: e, icon: n }) {
|
|
|
76
76
|
})
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function ze({ title: e, description: t, icon: n, children: r, footer: i }) {
|
|
80
80
|
return /* @__PURE__ */ J(be, {
|
|
81
81
|
className: "space-y-4 p-4 sm:p-5",
|
|
82
82
|
children: [
|
|
@@ -107,7 +107,7 @@ function Re({ title: e, description: t, icon: n, children: r, footer: i }) {
|
|
|
107
107
|
]
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Be({ summary: e, actionLabel: t, open: n, onToggle: r }) {
|
|
111
111
|
return /* @__PURE__ */ J("div", {
|
|
112
112
|
className: "flex items-center justify-between gap-3",
|
|
113
113
|
children: [/* @__PURE__ */ q("p", {
|
|
@@ -121,7 +121,7 @@ function ze({ summary: e, actionLabel: t, open: n, onToggle: r }) {
|
|
|
121
121
|
}) : null]
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function Ve({ leading: e, children: t, actions: n }) {
|
|
125
125
|
return /* @__PURE__ */ J(be, {
|
|
126
126
|
className: "flex flex-col gap-3 p-4 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md sm:flex-row sm:items-center sm:justify-between",
|
|
127
127
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -136,8 +136,8 @@ function Be({ leading: e, children: t, actions: n }) {
|
|
|
136
136
|
}) : null]
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
let [r, { loading: i }] =
|
|
139
|
+
function He({ lesson: e, onSaved: t, onCancel: n }) {
|
|
140
|
+
let [r, { loading: i }] = B(), [a, o] = U(e.title), [s, c] = U(e.kind), [l, d] = U(e.content ?? ""), [f, p] = U(String(e.estimatedMinutes ?? "")), [m, h] = U(() => V(e)), { data: g } = O(e.id, s !== "QUIZ"), [_, y] = U(null), b = re(() => V(null, g?.tecLessonQuizKey).quiz, [g]), x = {
|
|
141
141
|
...m,
|
|
142
142
|
quiz: _ ?? b
|
|
143
143
|
};
|
|
@@ -147,13 +147,17 @@ function Ve({ lesson: e, onSaved: t, onCancel: n }) {
|
|
|
147
147
|
/* @__PURE__ */ J("div", {
|
|
148
148
|
className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
149
149
|
children: [/* @__PURE__ */ q(X, {
|
|
150
|
+
"aria-label": "Lesson title",
|
|
150
151
|
value: a,
|
|
151
152
|
onChange: (e) => o(e.target.value),
|
|
152
153
|
placeholder: "Lesson title"
|
|
153
154
|
}), /* @__PURE__ */ J(xe, {
|
|
154
155
|
value: s,
|
|
155
156
|
onValueChange: (e) => c(e),
|
|
156
|
-
children: [/* @__PURE__ */ q(we, {
|
|
157
|
+
children: [/* @__PURE__ */ q(we, {
|
|
158
|
+
"aria-label": "Lesson type",
|
|
159
|
+
children: /* @__PURE__ */ q(Te, {})
|
|
160
|
+
}), /* @__PURE__ */ q(Se, { children: je.map((e) => /* @__PURE__ */ q(Ce, {
|
|
157
161
|
value: e,
|
|
158
162
|
children: u(e)
|
|
159
163
|
}, e)) })]
|
|
@@ -164,7 +168,7 @@ function Ve({ lesson: e, onSaved: t, onCancel: n }) {
|
|
|
164
168
|
value: l,
|
|
165
169
|
onChange: (e) => d(e.target.value)
|
|
166
170
|
}),
|
|
167
|
-
/* @__PURE__ */ q(
|
|
171
|
+
/* @__PURE__ */ q(ne, {
|
|
168
172
|
kind: s,
|
|
169
173
|
draft: x,
|
|
170
174
|
onChange: (e) => {
|
|
@@ -192,7 +196,7 @@ function Ve({ lesson: e, onSaved: t, onCancel: n }) {
|
|
|
192
196
|
onClick: async () => {
|
|
193
197
|
let i = a.trim();
|
|
194
198
|
if (!i) return v.error("Lesson title is required");
|
|
195
|
-
let o =
|
|
199
|
+
let o = H(s, x);
|
|
196
200
|
if (!o.ok) return v.error(o.error);
|
|
197
201
|
(await r({ variables: {
|
|
198
202
|
id: e.id,
|
|
@@ -213,8 +217,8 @@ function Ve({ lesson: e, onSaved: t, onCancel: n }) {
|
|
|
213
217
|
]
|
|
214
218
|
});
|
|
215
219
|
}
|
|
216
|
-
function
|
|
217
|
-
let { data: t, loading: n, refetch: r } = k(e), [i, { loading: a }] = T(), [o] =
|
|
220
|
+
function Ue({ courseId: e }) {
|
|
221
|
+
let { data: t, loading: n, refetch: r } = k(e), [i, { loading: a }] = T(), [o] = B(), [c, l] = U(null), [d, f] = U(null), [p, h] = U(""), [g, _] = U("ARTICLE"), [y, b] = U(""), [x, S] = U(""), [C, w] = U(!1), [ee, E] = U(() => V()), D = [...t?.tecListLessons?.items ?? []].sort((e, t) => e.position - t.position), O = async (e) => {
|
|
218
222
|
f(e.id);
|
|
219
223
|
try {
|
|
220
224
|
let t = await o({ variables: {
|
|
@@ -255,7 +259,7 @@ function He({ courseId: e }) {
|
|
|
255
259
|
className: "flex flex-wrap items-center gap-2 rounded-lg bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
256
260
|
children: [
|
|
257
261
|
/* @__PURE__ */ q("span", {
|
|
258
|
-
className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-md bg-accent-primary/
|
|
262
|
+
className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-md bg-accent-primary/6 text-[11px] font-semibold text-accent-primary",
|
|
259
263
|
children: t + 1
|
|
260
264
|
}),
|
|
261
265
|
/* @__PURE__ */ q("span", {
|
|
@@ -291,7 +295,7 @@ function He({ courseId: e }) {
|
|
|
291
295
|
]
|
|
292
296
|
})
|
|
293
297
|
]
|
|
294
|
-
}), c === e.id ? /* @__PURE__ */ q(
|
|
298
|
+
}), c === e.id ? /* @__PURE__ */ q(He, {
|
|
295
299
|
lesson: e,
|
|
296
300
|
onSaved: async () => {
|
|
297
301
|
await r();
|
|
@@ -302,13 +306,17 @@ function He({ courseId: e }) {
|
|
|
302
306
|
/* @__PURE__ */ J("div", {
|
|
303
307
|
className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
304
308
|
children: [/* @__PURE__ */ q(X, {
|
|
309
|
+
"aria-label": "Lesson title",
|
|
305
310
|
placeholder: "Lesson title",
|
|
306
311
|
value: p,
|
|
307
312
|
onChange: (e) => h(e.target.value)
|
|
308
313
|
}), /* @__PURE__ */ J(xe, {
|
|
309
314
|
value: g,
|
|
310
315
|
onValueChange: (e) => _(e),
|
|
311
|
-
children: [/* @__PURE__ */ q(we, {
|
|
316
|
+
children: [/* @__PURE__ */ q(we, {
|
|
317
|
+
"aria-label": "Lesson type",
|
|
318
|
+
children: /* @__PURE__ */ q(Te, {})
|
|
319
|
+
}), /* @__PURE__ */ q(Se, { children: je.map((e) => /* @__PURE__ */ q(Ce, {
|
|
312
320
|
value: e,
|
|
313
321
|
children: u(e)
|
|
314
322
|
}, e)) })]
|
|
@@ -320,7 +328,7 @@ function He({ courseId: e }) {
|
|
|
320
328
|
value: y,
|
|
321
329
|
onChange: (e) => b(e.target.value)
|
|
322
330
|
}),
|
|
323
|
-
/* @__PURE__ */ q(
|
|
331
|
+
/* @__PURE__ */ q(ne, {
|
|
324
332
|
kind: g,
|
|
325
333
|
draft: ee,
|
|
326
334
|
onChange: E
|
|
@@ -348,7 +356,7 @@ function He({ courseId: e }) {
|
|
|
348
356
|
onClick: async () => {
|
|
349
357
|
let t = p.trim();
|
|
350
358
|
if (!t) return v.error("Lesson title is required");
|
|
351
|
-
let n =
|
|
359
|
+
let n = H(g, ee);
|
|
352
360
|
if (!n.ok) return v.error(n.error);
|
|
353
361
|
(await i({ variables: { input: {
|
|
354
362
|
courseId: e,
|
|
@@ -359,7 +367,7 @@ function He({ courseId: e }) {
|
|
|
359
367
|
estimatedMinutes: Q(x),
|
|
360
368
|
isPreview: C,
|
|
361
369
|
...n.input
|
|
362
|
-
} } })).data?.tecCreateLesson && (v.success("Lesson added", t), h(""), b(""), S(""), w(!1), E(
|
|
370
|
+
} } })).data?.tecCreateLesson && (v.success("Lesson added", t), h(""), b(""), S(""), w(!1), E(V()), await r());
|
|
363
371
|
},
|
|
364
372
|
disabled: a,
|
|
365
373
|
className: "ml-auto",
|
|
@@ -370,8 +378,8 @@ function He({ courseId: e }) {
|
|
|
370
378
|
]
|
|
371
379
|
});
|
|
372
380
|
}
|
|
373
|
-
function
|
|
374
|
-
let [i, a] =
|
|
381
|
+
function We({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
|
|
382
|
+
let [i, a] = U(!1), s = e.verdict !== "PENDING";
|
|
375
383
|
return /* @__PURE__ */ J("div", {
|
|
376
384
|
className: "space-y-3 rounded-lg bg-bg-surface px-3 py-3 text-sm",
|
|
377
385
|
children: [
|
|
@@ -435,7 +443,7 @@ function Ue({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
|
|
|
435
443
|
}) : null,
|
|
436
444
|
/* @__PURE__ */ q("div", {
|
|
437
445
|
className: "ml-auto flex flex-wrap gap-1",
|
|
438
|
-
children:
|
|
446
|
+
children: Me.map((r) => /* @__PURE__ */ q(Y, {
|
|
439
447
|
size: "sm",
|
|
440
448
|
variant: r === "ACCEPTED" ? "default" : "outline",
|
|
441
449
|
onClick: () => n(r),
|
|
@@ -457,8 +465,8 @@ function Ue({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
|
|
|
457
465
|
]
|
|
458
466
|
});
|
|
459
467
|
}
|
|
460
|
-
function
|
|
461
|
-
let { data: t, loading: n, refetch: r } =
|
|
468
|
+
function Ge({ problemId: e }) {
|
|
469
|
+
let { data: t, loading: n, refetch: r } = R({ problemId: e }), [i] = E(), [a] = P(), [o, s] = U(null), [c, l] = U(!1), d = t?.tecListSubmissions?.items ?? [], f = c ? d.filter((e) => e.verdict === "PENDING") : d, p = d.filter((e) => e.verdict === "PENDING").length, h = async (e, t) => {
|
|
462
470
|
s(e);
|
|
463
471
|
try {
|
|
464
472
|
(await i({ variables: {
|
|
@@ -511,7 +519,7 @@ function We({ problemId: e }) {
|
|
|
511
519
|
children: c ? "Nothing is waiting on a verdict." : "No submissions yet."
|
|
512
520
|
}) : /* @__PURE__ */ q("div", {
|
|
513
521
|
className: "space-y-2",
|
|
514
|
-
children: f.map((e) => /* @__PURE__ */ q(
|
|
522
|
+
children: f.map((e) => /* @__PURE__ */ q(We, {
|
|
515
523
|
submission: e,
|
|
516
524
|
busy: o === e.id,
|
|
517
525
|
onGrade: (t) => void h(e.id, t),
|
|
@@ -520,8 +528,8 @@ function We({ problemId: e }) {
|
|
|
520
528
|
})]
|
|
521
529
|
});
|
|
522
530
|
}
|
|
523
|
-
function
|
|
524
|
-
let { data: t, loading: n, refetch: r } =
|
|
531
|
+
function Ke({ hackathon: e }) {
|
|
532
|
+
let { data: t, loading: n, refetch: r } = z(e.id), [i] = F(), [a, o] = U(null), [s, c] = U({}), l = t?.tecListTeams?.items ?? [], u = async (e, t) => {
|
|
525
533
|
let n = Math.max(0, Number(s[e] ?? "0") || 0);
|
|
526
534
|
o(e);
|
|
527
535
|
try {
|
|
@@ -646,32 +654,32 @@ function Ge({ hackathon: e }) {
|
|
|
646
654
|
})]
|
|
647
655
|
});
|
|
648
656
|
}
|
|
649
|
-
function
|
|
650
|
-
let { data: e, loading: t, error: n, refetch: r } = S({}), [o, { loading: c }] = C(), [l] =
|
|
651
|
-
D(""), k(""),
|
|
652
|
-
},
|
|
657
|
+
function qe() {
|
|
658
|
+
let { data: e, loading: t, error: n, refetch: r } = S({}), [o, { loading: c }] = C(), [l] = M(), [g] = b(), [_, y] = U(!1), [x, w] = U(null), [T, ee] = U(null), [E, D] = U(""), [O, k] = U(""), [A, te] = U(""), [j, N] = U(""), [P, F] = U("BEGINNER"), [I, L] = U(""), [R, z] = U([]), B = e?.tecListCourses?.items ?? [], V = () => {
|
|
659
|
+
D(""), k(""), te(""), N(""), F("BEGINNER"), L(""), z([]), y(!1);
|
|
660
|
+
}, H = async () => {
|
|
653
661
|
let e = E.trim();
|
|
654
662
|
if (!e) return v.error("Title is required");
|
|
655
|
-
let t =
|
|
663
|
+
let t = Fe(O || e);
|
|
656
664
|
if (!t) return v.error("A valid slug is required");
|
|
657
665
|
(await o({ variables: { input: {
|
|
658
666
|
title: e,
|
|
659
667
|
slug: t,
|
|
660
668
|
summary: A.trim() || void 0,
|
|
661
|
-
topic:
|
|
662
|
-
level:
|
|
663
|
-
estimatedMinutes: Q(
|
|
664
|
-
tags:
|
|
665
|
-
} } })).data?.tecCreateCourse && (v.success("Course created", `"${e}" saved as a draft.`),
|
|
666
|
-
},
|
|
669
|
+
topic: j.trim() || void 0,
|
|
670
|
+
level: P,
|
|
671
|
+
estimatedMinutes: Q(I),
|
|
672
|
+
tags: R
|
|
673
|
+
} } })).data?.tecCreateCourse && (v.success("Course created", `"${e}" saved as a draft.`), V(), await r());
|
|
674
|
+
}, ne = async (e) => {
|
|
667
675
|
w(e);
|
|
668
676
|
try {
|
|
669
677
|
(await l({ variables: { id: e } })).data?.tecPublishCourse && (v.success("Course published"), await r());
|
|
670
678
|
} finally {
|
|
671
679
|
w(null);
|
|
672
680
|
}
|
|
673
|
-
},
|
|
674
|
-
if (await
|
|
681
|
+
}, re = async (e, t) => {
|
|
682
|
+
if (await Ae({
|
|
675
683
|
title: "Archive course",
|
|
676
684
|
message: `Archive "${t}"? Learners will no longer be able to enroll.`,
|
|
677
685
|
okButtonTitle: "Archive",
|
|
@@ -688,24 +696,24 @@ function Ke() {
|
|
|
688
696
|
return /* @__PURE__ */ J("div", {
|
|
689
697
|
className: "space-y-4",
|
|
690
698
|
children: [
|
|
691
|
-
/* @__PURE__ */ q(
|
|
692
|
-
summary: `${
|
|
699
|
+
/* @__PURE__ */ q(Be, {
|
|
700
|
+
summary: `${B.length} course${B.length === 1 ? "" : "s"}`,
|
|
693
701
|
actionLabel: "New course",
|
|
694
702
|
open: _,
|
|
695
703
|
onToggle: () => y((e) => !e)
|
|
696
704
|
}),
|
|
697
|
-
_ ? /* @__PURE__ */ J(
|
|
705
|
+
_ ? /* @__PURE__ */ J(ze, {
|
|
698
706
|
title: "New course",
|
|
699
707
|
description: "Draft a course, then add lessons and publish when it's ready.",
|
|
700
|
-
icon:
|
|
708
|
+
icon: oe,
|
|
701
709
|
footer: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Y, {
|
|
702
710
|
variant: "outline",
|
|
703
711
|
size: "sm",
|
|
704
|
-
onClick:
|
|
712
|
+
onClick: V,
|
|
705
713
|
children: "Cancel"
|
|
706
714
|
}), /* @__PURE__ */ q(Y, {
|
|
707
715
|
size: "sm",
|
|
708
|
-
onClick:
|
|
716
|
+
onClick: H,
|
|
709
717
|
disabled: c,
|
|
710
718
|
children: c ? "Creating…" : "Create course"
|
|
711
719
|
})] }),
|
|
@@ -731,17 +739,17 @@ function Ke() {
|
|
|
731
739
|
/* @__PURE__ */ q($, {
|
|
732
740
|
label: "Topic",
|
|
733
741
|
children: /* @__PURE__ */ q(X, {
|
|
734
|
-
value:
|
|
735
|
-
onChange: (e) =>
|
|
742
|
+
value: j,
|
|
743
|
+
onChange: (e) => N(e.target.value),
|
|
736
744
|
placeholder: "e.g. Web, AI, Data, Cloud"
|
|
737
745
|
})
|
|
738
746
|
}),
|
|
739
747
|
/* @__PURE__ */ q($, {
|
|
740
748
|
label: "Level",
|
|
741
749
|
children: /* @__PURE__ */ J(xe, {
|
|
742
|
-
value:
|
|
743
|
-
onValueChange: (e) =>
|
|
744
|
-
children: [/* @__PURE__ */ q(we, { children: /* @__PURE__ */ q(Te, {}) }), /* @__PURE__ */ q(Se, { children:
|
|
750
|
+
value: P,
|
|
751
|
+
onValueChange: (e) => F(e),
|
|
752
|
+
children: [/* @__PURE__ */ q(we, { children: /* @__PURE__ */ q(Te, {}) }), /* @__PURE__ */ q(Se, { children: Ne.map((e) => /* @__PURE__ */ q(Ce, {
|
|
745
753
|
value: e,
|
|
746
754
|
children: u(e)
|
|
747
755
|
}, e)) })]
|
|
@@ -752,16 +760,16 @@ function Ke() {
|
|
|
752
760
|
children: /* @__PURE__ */ q(X, {
|
|
753
761
|
type: "number",
|
|
754
762
|
min: 0,
|
|
755
|
-
value:
|
|
756
|
-
onChange: (e) =>
|
|
763
|
+
value: I,
|
|
764
|
+
onChange: (e) => L(e.target.value),
|
|
757
765
|
placeholder: "120"
|
|
758
766
|
})
|
|
759
767
|
}),
|
|
760
768
|
/* @__PURE__ */ q($, {
|
|
761
769
|
label: "Tags",
|
|
762
770
|
children: /* @__PURE__ */ q(h, {
|
|
763
|
-
value:
|
|
764
|
-
onChange:
|
|
771
|
+
value: R,
|
|
772
|
+
onChange: z,
|
|
765
773
|
placeholder: "typescript, basics"
|
|
766
774
|
})
|
|
767
775
|
}),
|
|
@@ -770,23 +778,23 @@ function Ke() {
|
|
|
770
778
|
className: "sm:col-span-2",
|
|
771
779
|
children: /* @__PURE__ */ q(Z, {
|
|
772
780
|
value: A,
|
|
773
|
-
onChange: (e) =>
|
|
781
|
+
onChange: (e) => te(e.target.value),
|
|
774
782
|
placeholder: "What learners will build and take away."
|
|
775
783
|
})
|
|
776
784
|
})
|
|
777
785
|
]
|
|
778
786
|
}) : null,
|
|
779
|
-
t && !
|
|
787
|
+
t && !B.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
|
|
780
788
|
title: "Couldn't load courses",
|
|
781
789
|
error: n
|
|
782
|
-
}) :
|
|
783
|
-
icon: /* @__PURE__ */ q(
|
|
790
|
+
}) : B.length === 0 ? /* @__PURE__ */ q(f, {
|
|
791
|
+
icon: /* @__PURE__ */ q(oe, { size: 26 }),
|
|
784
792
|
title: "No courses yet",
|
|
785
793
|
description: "Create your first course with the button above. TechnoSpam is pre-launch."
|
|
786
794
|
}) : /* @__PURE__ */ q("div", {
|
|
787
795
|
className: "space-y-3",
|
|
788
|
-
children:
|
|
789
|
-
leading: /* @__PURE__ */ q(
|
|
796
|
+
children: B.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Ve, {
|
|
797
|
+
leading: /* @__PURE__ */ q(Re, {
|
|
790
798
|
seed: `${e.topic ?? ""} ${e.title}`,
|
|
791
799
|
icon: i(e.topic ?? e.title)
|
|
792
800
|
}),
|
|
@@ -799,16 +807,16 @@ function Ke() {
|
|
|
799
807
|
}),
|
|
800
808
|
e.status === "DRAFT" ? /* @__PURE__ */ J(Y, {
|
|
801
809
|
size: "sm",
|
|
802
|
-
onClick: () =>
|
|
810
|
+
onClick: () => ne(e.id),
|
|
803
811
|
disabled: x === e.id,
|
|
804
812
|
children: [/* @__PURE__ */ q(me, { size: 15 }), " Publish"]
|
|
805
813
|
}) : null,
|
|
806
814
|
e.status === "ARCHIVED" ? null : /* @__PURE__ */ J(Y, {
|
|
807
815
|
size: "sm",
|
|
808
816
|
variant: "outline",
|
|
809
|
-
onClick: () =>
|
|
817
|
+
onClick: () => re(e.id, e.title),
|
|
810
818
|
disabled: x === e.id,
|
|
811
|
-
children: [/* @__PURE__ */ q(
|
|
819
|
+
children: [/* @__PURE__ */ q(ie, { size: 15 }), " Archive"]
|
|
812
820
|
})
|
|
813
821
|
] }),
|
|
814
822
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -836,18 +844,18 @@ function Ke() {
|
|
|
836
844
|
a(e.updatedAt)
|
|
837
845
|
]
|
|
838
846
|
})]
|
|
839
|
-
}), T === e.id ? /* @__PURE__ */ q(
|
|
847
|
+
}), T === e.id ? /* @__PURE__ */ q(Ue, { courseId: e.id }) : null] }, e.id))
|
|
840
848
|
})
|
|
841
849
|
]
|
|
842
850
|
});
|
|
843
851
|
}
|
|
844
|
-
function
|
|
845
|
-
let { data: e, loading: t, error: n, refetch: r } =
|
|
846
|
-
x(""), C(""), T(""), D(""), k("EASY"),
|
|
847
|
-
},
|
|
852
|
+
function Je() {
|
|
853
|
+
let { data: e, loading: t, error: n, refetch: r } = j({}), [a, { loading: o }] = ee(), [s] = N(), [c, l] = U(!1), [h, g] = U(null), [_, y] = U(null), [b, x] = U(""), [S, C] = U(""), [w, T] = U(""), [E, D] = U(""), [O, k] = U("EASY"), [A, te] = U(""), [M, P] = U(""), [F, I] = U(""), L = e?.tecListProblems?.items ?? [], R = () => {
|
|
854
|
+
x(""), C(""), T(""), D(""), k("EASY"), te(""), P(""), I(""), l(!1);
|
|
855
|
+
}, z = async () => {
|
|
848
856
|
let e = b.trim();
|
|
849
857
|
if (!e) return v.error("Title is required");
|
|
850
|
-
let t =
|
|
858
|
+
let t = Fe(S || e);
|
|
851
859
|
if (!t) return v.error("A valid slug is required");
|
|
852
860
|
(await a({ variables: { input: {
|
|
853
861
|
title: e,
|
|
@@ -856,10 +864,10 @@ function qe() {
|
|
|
856
864
|
topic: E.trim() || void 0,
|
|
857
865
|
difficulty: O,
|
|
858
866
|
points: Q(A),
|
|
859
|
-
languages:
|
|
860
|
-
starterCode:
|
|
861
|
-
} } })).data?.tecCreateProblem && (v.success("Problem created", `"${e}" saved as a draft.`),
|
|
862
|
-
},
|
|
867
|
+
languages: Ie(M),
|
|
868
|
+
starterCode: F.trim() || void 0
|
|
869
|
+
} } })).data?.tecCreateProblem && (v.success("Problem created", `"${e}" saved as a draft.`), R(), await r());
|
|
870
|
+
}, B = async (e) => {
|
|
863
871
|
g(e);
|
|
864
872
|
try {
|
|
865
873
|
(await s({ variables: { id: e } })).data?.tecPublishProblem && (v.success("Problem published"), await r());
|
|
@@ -870,24 +878,24 @@ function qe() {
|
|
|
870
878
|
return /* @__PURE__ */ J("div", {
|
|
871
879
|
className: "space-y-4",
|
|
872
880
|
children: [
|
|
873
|
-
/* @__PURE__ */ q(
|
|
874
|
-
summary: `${
|
|
881
|
+
/* @__PURE__ */ q(Be, {
|
|
882
|
+
summary: `${L.length} problem${L.length === 1 ? "" : "s"}`,
|
|
875
883
|
actionLabel: "New problem",
|
|
876
884
|
open: c,
|
|
877
885
|
onToggle: () => l((e) => !e)
|
|
878
886
|
}),
|
|
879
|
-
c ? /* @__PURE__ */ J(
|
|
887
|
+
c ? /* @__PURE__ */ J(ze, {
|
|
880
888
|
title: "New problem",
|
|
881
889
|
description: "Define a coding challenge learners can solve and submit.",
|
|
882
890
|
icon: W,
|
|
883
891
|
footer: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Y, {
|
|
884
892
|
variant: "outline",
|
|
885
893
|
size: "sm",
|
|
886
|
-
onClick:
|
|
894
|
+
onClick: R,
|
|
887
895
|
children: "Cancel"
|
|
888
896
|
}), /* @__PURE__ */ q(Y, {
|
|
889
897
|
size: "sm",
|
|
890
|
-
onClick:
|
|
898
|
+
onClick: z,
|
|
891
899
|
disabled: o,
|
|
892
900
|
children: o ? "Creating…" : "Create problem"
|
|
893
901
|
})] }),
|
|
@@ -923,7 +931,7 @@ function qe() {
|
|
|
923
931
|
children: /* @__PURE__ */ J(xe, {
|
|
924
932
|
value: O,
|
|
925
933
|
onValueChange: (e) => k(e),
|
|
926
|
-
children: [/* @__PURE__ */ q(we, { children: /* @__PURE__ */ q(Te, {}) }), /* @__PURE__ */ q(Se, { children:
|
|
934
|
+
children: [/* @__PURE__ */ q(we, { children: /* @__PURE__ */ q(Te, {}) }), /* @__PURE__ */ q(Se, { children: Pe.map((e) => /* @__PURE__ */ q(Ce, {
|
|
927
935
|
value: e,
|
|
928
936
|
children: u(e)
|
|
929
937
|
}, e)) })]
|
|
@@ -935,15 +943,15 @@ function qe() {
|
|
|
935
943
|
type: "number",
|
|
936
944
|
min: 0,
|
|
937
945
|
value: A,
|
|
938
|
-
onChange: (e) =>
|
|
946
|
+
onChange: (e) => te(e.target.value),
|
|
939
947
|
placeholder: "100"
|
|
940
948
|
})
|
|
941
949
|
}),
|
|
942
950
|
/* @__PURE__ */ q($, {
|
|
943
951
|
label: "Languages (comma-separated)",
|
|
944
952
|
children: /* @__PURE__ */ q(X, {
|
|
945
|
-
value:
|
|
946
|
-
onChange: (e) =>
|
|
953
|
+
value: M,
|
|
954
|
+
onChange: (e) => P(e.target.value),
|
|
947
955
|
placeholder: "python, typescript"
|
|
948
956
|
})
|
|
949
957
|
}),
|
|
@@ -960,25 +968,25 @@ function qe() {
|
|
|
960
968
|
label: "Starter code",
|
|
961
969
|
className: "sm:col-span-2",
|
|
962
970
|
children: /* @__PURE__ */ q(Z, {
|
|
963
|
-
value:
|
|
964
|
-
onChange: (e) =>
|
|
971
|
+
value: F,
|
|
972
|
+
onChange: (e) => I(e.target.value),
|
|
965
973
|
className: "font-mono",
|
|
966
974
|
placeholder: "def solve(nums, target):\\n pass"
|
|
967
975
|
})
|
|
968
976
|
})
|
|
969
977
|
]
|
|
970
978
|
}) : null,
|
|
971
|
-
t && !
|
|
979
|
+
t && !L.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
|
|
972
980
|
title: "Couldn't load problems",
|
|
973
981
|
error: n
|
|
974
|
-
}) :
|
|
982
|
+
}) : L.length === 0 ? /* @__PURE__ */ q(f, {
|
|
975
983
|
icon: /* @__PURE__ */ q(W, { size: 26 }),
|
|
976
984
|
title: "No problems yet",
|
|
977
985
|
description: "Create your first coding problem with the button above. TechnoSpam is pre-launch."
|
|
978
986
|
}) : /* @__PURE__ */ q("div", {
|
|
979
987
|
className: "space-y-3",
|
|
980
|
-
children:
|
|
981
|
-
leading: /* @__PURE__ */ q(
|
|
988
|
+
children: L.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Ve, {
|
|
989
|
+
leading: /* @__PURE__ */ q(Re, {
|
|
982
990
|
seed: `${e.topic ?? ""} ${e.title}`,
|
|
983
991
|
icon: i(e.topic ?? e.title)
|
|
984
992
|
}),
|
|
@@ -989,7 +997,7 @@ function qe() {
|
|
|
989
997
|
children: [/* @__PURE__ */ q(ce, { size: 15 }), " Grade"]
|
|
990
998
|
}), e.status === "DRAFT" ? /* @__PURE__ */ J(Y, {
|
|
991
999
|
size: "sm",
|
|
992
|
-
onClick: () =>
|
|
1000
|
+
onClick: () => B(e.id),
|
|
993
1001
|
disabled: h === e.id,
|
|
994
1002
|
children: [/* @__PURE__ */ q(me, { size: 15 }), " Publish"]
|
|
995
1003
|
}) : null] }),
|
|
@@ -1019,32 +1027,32 @@ function qe() {
|
|
|
1019
1027
|
e.languages.length ? e.languages.join(", ") : "No languages"
|
|
1020
1028
|
]
|
|
1021
1029
|
})]
|
|
1022
|
-
}), _ === e.id ? /* @__PURE__ */ q(
|
|
1030
|
+
}), _ === e.id ? /* @__PURE__ */ q(Ge, { problemId: e.id }) : null] }, e.id))
|
|
1023
1031
|
})
|
|
1024
1032
|
]
|
|
1025
1033
|
});
|
|
1026
1034
|
}
|
|
1027
|
-
function
|
|
1028
|
-
let { data: e, loading: t, error: n, refetch: r } = D({}), [a, { loading: s }] = w(), [l] =
|
|
1029
|
-
O(""), A(""),
|
|
1035
|
+
function Ye() {
|
|
1036
|
+
let { data: e, loading: t, error: n, refetch: r } = D({}), [a, { loading: s }] = w(), [l] = te(), [u] = I(), [g] = L(), [_] = x(), [y, b] = U(!1), [S, C] = U(null), [T, ee] = U(null), [E, O] = U(""), [k, A] = U(""), [j, M] = U(""), [N, P] = U(""), [F, R] = U(""), [z, B] = U(""), [V, H] = U(""), [ne, re] = U(""), [ie, oe] = U([]), W = e?.tecListHackathons?.items ?? [], se = () => {
|
|
1037
|
+
O(""), A(""), M(""), P(""), R(""), B(""), H(""), re(""), oe([]), b(!1);
|
|
1030
1038
|
}, le = async () => {
|
|
1031
1039
|
let e = E.trim();
|
|
1032
1040
|
if (!e) return v.error("Title is required");
|
|
1033
|
-
let t =
|
|
1041
|
+
let t = Fe(k || e);
|
|
1034
1042
|
if (!t) return v.error("A valid slug is required");
|
|
1035
|
-
let n =
|
|
1043
|
+
let n = Le(F), i = Le(z);
|
|
1036
1044
|
if (!n || !i) return v.error("Start and end date/time are required");
|
|
1037
1045
|
if (new Date(i) <= new Date(n)) return v.error("End must be after the start");
|
|
1038
1046
|
(await a({ variables: { input: {
|
|
1039
1047
|
title: e,
|
|
1040
1048
|
slug: t,
|
|
1041
|
-
theme:
|
|
1042
|
-
description:
|
|
1049
|
+
theme: j.trim() || void 0,
|
|
1050
|
+
description: N.trim() || void 0,
|
|
1043
1051
|
startAt: n,
|
|
1044
1052
|
endAt: i,
|
|
1045
|
-
prizePool: Q(
|
|
1046
|
-
maxTeamSize: Q(
|
|
1047
|
-
tags:
|
|
1053
|
+
prizePool: Q(V),
|
|
1054
|
+
maxTeamSize: Q(ne),
|
|
1055
|
+
tags: ie
|
|
1048
1056
|
} } })).data?.tecCreateHackathon && (v.success("Hackathon created", `"${e}" saved as a draft.`), se(), await r());
|
|
1049
1057
|
}, ue = async (e) => {
|
|
1050
1058
|
C(e);
|
|
@@ -1064,13 +1072,13 @@ function Je() {
|
|
|
1064
1072
|
return /* @__PURE__ */ J("div", {
|
|
1065
1073
|
className: "space-y-4",
|
|
1066
1074
|
children: [
|
|
1067
|
-
/* @__PURE__ */ q(
|
|
1075
|
+
/* @__PURE__ */ q(Be, {
|
|
1068
1076
|
summary: `${W.length} hackathon${W.length === 1 ? "" : "s"}`,
|
|
1069
1077
|
actionLabel: "New hackathon",
|
|
1070
1078
|
open: y,
|
|
1071
1079
|
onToggle: () => b((e) => !e)
|
|
1072
1080
|
}),
|
|
1073
|
-
y ? /* @__PURE__ */ J(
|
|
1081
|
+
y ? /* @__PURE__ */ J(ze, {
|
|
1074
1082
|
title: "New hackathon",
|
|
1075
1083
|
description: "Set up an event, open registration, then run judging to completion.",
|
|
1076
1084
|
icon: ge,
|
|
@@ -1107,16 +1115,16 @@ function Je() {
|
|
|
1107
1115
|
/* @__PURE__ */ q($, {
|
|
1108
1116
|
label: "Theme",
|
|
1109
1117
|
children: /* @__PURE__ */ q(X, {
|
|
1110
|
-
value:
|
|
1111
|
-
onChange: (e) =>
|
|
1118
|
+
value: j,
|
|
1119
|
+
onChange: (e) => M(e.target.value),
|
|
1112
1120
|
placeholder: "AI for good"
|
|
1113
1121
|
})
|
|
1114
1122
|
}),
|
|
1115
1123
|
/* @__PURE__ */ q($, {
|
|
1116
1124
|
label: "Tags",
|
|
1117
1125
|
children: /* @__PURE__ */ q(h, {
|
|
1118
|
-
value:
|
|
1119
|
-
onChange:
|
|
1126
|
+
value: ie,
|
|
1127
|
+
onChange: oe,
|
|
1120
1128
|
placeholder: "ai, web"
|
|
1121
1129
|
})
|
|
1122
1130
|
}),
|
|
@@ -1125,8 +1133,8 @@ function Je() {
|
|
|
1125
1133
|
required: !0,
|
|
1126
1134
|
children: /* @__PURE__ */ q(X, {
|
|
1127
1135
|
type: "datetime-local",
|
|
1128
|
-
value:
|
|
1129
|
-
onChange: (e) =>
|
|
1136
|
+
value: F,
|
|
1137
|
+
onChange: (e) => R(e.target.value)
|
|
1130
1138
|
})
|
|
1131
1139
|
}),
|
|
1132
1140
|
/* @__PURE__ */ q($, {
|
|
@@ -1134,8 +1142,8 @@ function Je() {
|
|
|
1134
1142
|
required: !0,
|
|
1135
1143
|
children: /* @__PURE__ */ q(X, {
|
|
1136
1144
|
type: "datetime-local",
|
|
1137
|
-
value:
|
|
1138
|
-
onChange: (e) =>
|
|
1145
|
+
value: z,
|
|
1146
|
+
onChange: (e) => B(e.target.value)
|
|
1139
1147
|
})
|
|
1140
1148
|
}),
|
|
1141
1149
|
/* @__PURE__ */ q($, {
|
|
@@ -1143,8 +1151,8 @@ function Je() {
|
|
|
1143
1151
|
children: /* @__PURE__ */ q(X, {
|
|
1144
1152
|
type: "number",
|
|
1145
1153
|
min: 0,
|
|
1146
|
-
value:
|
|
1147
|
-
onChange: (e) =>
|
|
1154
|
+
value: V,
|
|
1155
|
+
onChange: (e) => H(e.target.value),
|
|
1148
1156
|
placeholder: "5000"
|
|
1149
1157
|
})
|
|
1150
1158
|
}),
|
|
@@ -1153,8 +1161,8 @@ function Je() {
|
|
|
1153
1161
|
children: /* @__PURE__ */ q(X, {
|
|
1154
1162
|
type: "number",
|
|
1155
1163
|
min: 1,
|
|
1156
|
-
value:
|
|
1157
|
-
onChange: (e) =>
|
|
1164
|
+
value: ne,
|
|
1165
|
+
onChange: (e) => re(e.target.value),
|
|
1158
1166
|
placeholder: "4"
|
|
1159
1167
|
})
|
|
1160
1168
|
}),
|
|
@@ -1162,8 +1170,8 @@ function Je() {
|
|
|
1162
1170
|
label: "Description",
|
|
1163
1171
|
className: "sm:col-span-2",
|
|
1164
1172
|
children: /* @__PURE__ */ q(Z, {
|
|
1165
|
-
value:
|
|
1166
|
-
onChange: (e) =>
|
|
1173
|
+
value: N,
|
|
1174
|
+
onChange: (e) => P(e.target.value),
|
|
1167
1175
|
placeholder: "What the hackathon is about and how judging works."
|
|
1168
1176
|
})
|
|
1169
1177
|
})
|
|
@@ -1178,8 +1186,8 @@ function Je() {
|
|
|
1178
1186
|
description: "Create your first hackathon with the button above. TechnoSpam is pre-launch."
|
|
1179
1187
|
}) : /* @__PURE__ */ q("div", {
|
|
1180
1188
|
className: "space-y-3",
|
|
1181
|
-
children: W.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(
|
|
1182
|
-
leading: /* @__PURE__ */ q(
|
|
1189
|
+
children: W.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Ve, {
|
|
1190
|
+
leading: /* @__PURE__ */ q(Re, {
|
|
1183
1191
|
seed: e.title,
|
|
1184
1192
|
icon: i(e.title, ge)
|
|
1185
1193
|
}),
|
|
@@ -1212,7 +1220,7 @@ function Je() {
|
|
|
1212
1220
|
size: "sm",
|
|
1213
1221
|
onClick: () => fe(e.id, _, "Hackathon completed"),
|
|
1214
1222
|
disabled: S === e.id,
|
|
1215
|
-
children: [/* @__PURE__ */ q(
|
|
1223
|
+
children: [/* @__PURE__ */ q(ae, { size: 15 }), " Complete"]
|
|
1216
1224
|
}) : null
|
|
1217
1225
|
] }),
|
|
1218
1226
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -1232,13 +1240,13 @@ function Je() {
|
|
|
1232
1240
|
e.prizePool ? ` · ${c(e.prizePool, e.currency)} prize` : ""
|
|
1233
1241
|
]
|
|
1234
1242
|
})]
|
|
1235
|
-
}), T === e.id ? /* @__PURE__ */ q(
|
|
1243
|
+
}), T === e.id ? /* @__PURE__ */ q(Ke, { hackathon: e }) : null] }, e.id))
|
|
1236
1244
|
})
|
|
1237
1245
|
]
|
|
1238
1246
|
});
|
|
1239
1247
|
}
|
|
1240
|
-
function
|
|
1241
|
-
let { data: e, loading: t, error: n, refetch: r } = A({}), [a] = y(), [o, s] =
|
|
1248
|
+
function Xe() {
|
|
1249
|
+
let { data: e, loading: t, error: n, refetch: r } = A({}), [a] = y(), [o, s] = U(null), c = e?.tecListMentors?.items ?? [], u = c.filter((e) => e.status === "PENDING").length, h = async (e) => {
|
|
1242
1250
|
s(e);
|
|
1243
1251
|
try {
|
|
1244
1252
|
(await a({ variables: { id: e } })).data?.tecApproveMentor && (v.success("Mentor approved", "They can now accept mentees."), await r());
|
|
@@ -1248,7 +1256,7 @@ function Ye() {
|
|
|
1248
1256
|
};
|
|
1249
1257
|
return /* @__PURE__ */ J("div", {
|
|
1250
1258
|
className: "space-y-4",
|
|
1251
|
-
children: [/* @__PURE__ */ q(
|
|
1259
|
+
children: [/* @__PURE__ */ q(Be, { summary: `${c.length} mentor${c.length === 1 ? "" : "s"}${u ? ` · ${u} pending approval` : ""}` }), t && !c.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
|
|
1252
1260
|
title: "Couldn't load mentors",
|
|
1253
1261
|
error: n
|
|
1254
1262
|
}) : c.length === 0 ? /* @__PURE__ */ q(f, {
|
|
@@ -1257,8 +1265,8 @@ function Ye() {
|
|
|
1257
1265
|
description: "Mentor applications will appear here for review. TechnoSpam is pre-launch."
|
|
1258
1266
|
}) : /* @__PURE__ */ q("div", {
|
|
1259
1267
|
className: "space-y-3",
|
|
1260
|
-
children: c.map((e) => /* @__PURE__ */ J(
|
|
1261
|
-
leading: /* @__PURE__ */ q(
|
|
1268
|
+
children: c.map((e) => /* @__PURE__ */ J(Ve, {
|
|
1269
|
+
leading: /* @__PURE__ */ q(Re, {
|
|
1262
1270
|
seed: e.headline,
|
|
1263
1271
|
icon: i(e.expertise[0] ?? e.headline, G)
|
|
1264
1272
|
}),
|
|
@@ -1299,60 +1307,60 @@ function Ye() {
|
|
|
1299
1307
|
})]
|
|
1300
1308
|
});
|
|
1301
1309
|
}
|
|
1302
|
-
function
|
|
1303
|
-
let [t, r] =
|
|
1310
|
+
function Ze() {
|
|
1311
|
+
let [t, r] = U("courses"), { currentUser: i } = e(), a = (i?.role ?? "").toLowerCase();
|
|
1304
1312
|
return /* @__PURE__ */ J(n, {
|
|
1305
1313
|
hero: !0,
|
|
1306
1314
|
title: "Authoring Console",
|
|
1307
1315
|
description: "Create and manage TechnoSpam content — courses, problems, hackathons, and mentor applications.",
|
|
1308
|
-
children: [
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1316
|
+
children: [a.includes("admin") || a.includes("owner") || a.includes("instructor") ? null : /* @__PURE__ */ J(be, {
|
|
1317
|
+
className: "mb-5 flex items-start gap-3 border-status-warning-border p-4",
|
|
1318
|
+
children: [/* @__PURE__ */ q(he, {
|
|
1319
|
+
size: 18,
|
|
1320
|
+
className: "mt-0.5 shrink-0 text-status-warning-text"
|
|
1321
|
+
}), /* @__PURE__ */ J("div", {
|
|
1322
|
+
className: "text-sm text-text-secondary",
|
|
1323
|
+
children: [
|
|
1324
|
+
/* @__PURE__ */ q("span", {
|
|
1325
|
+
className: "font-medium text-text-primary",
|
|
1326
|
+
children: "Authoring is limited to workspace admins."
|
|
1327
|
+
}),
|
|
1328
|
+
" ",
|
|
1329
|
+
"You can review content here, but create/publish actions require the right permission and will be rejected at the gateway otherwise."
|
|
1330
|
+
]
|
|
1331
|
+
})]
|
|
1332
|
+
}), /* @__PURE__ */ J(Ee, {
|
|
1333
|
+
className: "gap-0",
|
|
1334
|
+
value: t,
|
|
1335
|
+
onValueChange: (e) => r(e),
|
|
1336
|
+
children: [/* @__PURE__ */ J(Oe, {
|
|
1337
|
+
className: "mb-5",
|
|
1338
|
+
children: [
|
|
1339
|
+
/* @__PURE__ */ J(ke, {
|
|
1340
|
+
value: "courses",
|
|
1341
|
+
children: [/* @__PURE__ */ q(oe, { size: 15 }), " Courses"]
|
|
1342
|
+
}),
|
|
1343
|
+
/* @__PURE__ */ J(ke, {
|
|
1344
|
+
value: "problems",
|
|
1345
|
+
children: [/* @__PURE__ */ q(W, { size: 15 }), " Problems"]
|
|
1346
|
+
}),
|
|
1347
|
+
/* @__PURE__ */ J(ke, {
|
|
1348
|
+
value: "hackathons",
|
|
1349
|
+
children: [/* @__PURE__ */ q(ge, { size: 15 }), " Hackathons"]
|
|
1350
|
+
}),
|
|
1351
|
+
/* @__PURE__ */ J(ke, {
|
|
1352
|
+
value: "mentors",
|
|
1353
|
+
children: [/* @__PURE__ */ q(G, { size: 15 }), " Mentors"]
|
|
1354
|
+
})
|
|
1355
|
+
]
|
|
1356
|
+
}), /* @__PURE__ */ q(De, {
|
|
1327
1357
|
value: t,
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
children: [
|
|
1332
|
-
/* @__PURE__ */ J(Oe, {
|
|
1333
|
-
value: "courses",
|
|
1334
|
-
children: [/* @__PURE__ */ q(U, { size: 15 }), " Courses"]
|
|
1335
|
-
}),
|
|
1336
|
-
/* @__PURE__ */ J(Oe, {
|
|
1337
|
-
value: "problems",
|
|
1338
|
-
children: [/* @__PURE__ */ q(W, { size: 15 }), " Problems"]
|
|
1339
|
-
}),
|
|
1340
|
-
/* @__PURE__ */ J(Oe, {
|
|
1341
|
-
value: "hackathons",
|
|
1342
|
-
children: [/* @__PURE__ */ q(ge, { size: 15 }), " Hackathons"]
|
|
1343
|
-
}),
|
|
1344
|
-
/* @__PURE__ */ J(Oe, {
|
|
1345
|
-
value: "mentors",
|
|
1346
|
-
children: [/* @__PURE__ */ q(G, { size: 15 }), " Mentors"]
|
|
1347
|
-
})
|
|
1348
|
-
]
|
|
1349
|
-
})
|
|
1350
|
-
}),
|
|
1351
|
-
q(t === "courses" ? Ke : t === "problems" ? qe : t === "hackathons" ? Je : Ye, {})
|
|
1352
|
-
]
|
|
1358
|
+
children: q(t === "courses" ? qe : t === "problems" ? Je : t === "hackathons" ? Ye : Xe, {})
|
|
1359
|
+
})]
|
|
1360
|
+
})]
|
|
1353
1361
|
});
|
|
1354
1362
|
}
|
|
1355
1363
|
//#endregion
|
|
1356
|
-
export {
|
|
1364
|
+
export { Ze as AdminAdminDashboardPagePage };
|
|
1357
1365
|
|
|
1358
1366
|
//# sourceMappingURL=AdminAdminDashboardPagePage.js.map
|