@burdenoff/microfe-technospam 2026.1102.2 → 2026.1102.4
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/generated/global-types.d.ts +307 -41
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.d.ts +1730 -8
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/stories/fixtures/technospamFixtures.d.ts.map +1 -1
- package/dist/technospam/TechnoSpamRoot.d.ts.map +1 -1
- package/dist/technospam/TechnoSpamRoot.js +187 -178
- package/dist/technospam/TechnoSpamRoot.js.map +1 -1
- package/dist/technospam/TechnoSpamRoutes.d.ts.map +1 -1
- package/dist/technospam/TechnoSpamRoutes.js +32 -28
- package/dist/technospam/TechnoSpamRoutes.js.map +1 -1
- package/dist/technospam/api/assessmentApi.d.ts +183 -0
- package/dist/technospam/api/assessmentApi.d.ts.map +1 -0
- package/dist/technospam/api/assessmentApi.js +278 -0
- package/dist/technospam/api/assessmentApi.js.map +1 -0
- package/dist/technospam/api/technospamApi.js +141 -141
- package/dist/technospam/api/technospamApi.js.map +1 -1
- package/dist/technospam/components/CourseAssessments.d.ts +9 -0
- package/dist/technospam/components/CourseAssessments.d.ts.map +1 -0
- package/dist/technospam/components/CourseAssessments.js +66 -0
- package/dist/technospam/components/CourseAssessments.js.map +1 -0
- package/dist/technospam/components/MediaCover.js +2 -2
- package/dist/technospam/components/MediaCover.js.map +1 -1
- package/dist/technospam/components/MobileSectionTabs.d.ts +9 -0
- package/dist/technospam/components/MobileSectionTabs.d.ts.map +1 -0
- package/dist/technospam/components/MobileSectionTabs.js +43 -0
- package/dist/technospam/components/MobileSectionTabs.js.map +1 -0
- package/dist/technospam/components/PageLayout.d.ts +7 -1
- package/dist/technospam/components/PageLayout.d.ts.map +1 -1
- package/dist/technospam/components/PageLayout.js +40 -28
- package/dist/technospam/components/PageLayout.js.map +1 -1
- package/dist/technospam/components/StatusBadge.d.ts.map +1 -1
- package/dist/technospam/components/StatusBadge.js +8 -1
- package/dist/technospam/components/StatusBadge.js.map +1 -1
- package/dist/technospam/components/admin/AssessmentsAdminTab.d.ts +7 -0
- package/dist/technospam/components/admin/AssessmentsAdminTab.d.ts.map +1 -0
- package/dist/technospam/components/admin/AssessmentsAdminTab.js +421 -0
- package/dist/technospam/components/admin/AssessmentsAdminTab.js.map +1 -0
- package/dist/technospam/components/lesson/LessonKindFields.d.ts +3 -1
- package/dist/technospam/components/lesson/LessonKindFields.d.ts.map +1 -1
- package/dist/technospam/components/lesson/LessonKindFields.js +2 -2
- package/dist/technospam/components/lesson/LessonKindFields.js.map +1 -1
- package/dist/technospam/components/lesson/SaveCourseOffline.js +6 -6
- package/dist/technospam/hooks/useAssessmentIntegrity.d.ts +29 -0
- package/dist/technospam/hooks/useAssessmentIntegrity.d.ts.map +1 -0
- package/dist/technospam/hooks/useAssessmentIntegrity.js +57 -0
- package/dist/technospam/hooks/useAssessmentIntegrity.js.map +1 -0
- package/dist/technospam/hooks/usePhoneLayout.d.ts +18 -0
- package/dist/technospam/hooks/usePhoneLayout.d.ts.map +1 -0
- package/dist/technospam/hooks/usePhoneLayout.js +14 -0
- package/dist/technospam/hooks/usePhoneLayout.js.map +1 -0
- package/dist/technospam/pages/AdminAdminDashboardPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js +365 -360
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js +89 -87
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesAssessmentPagePage.d.ts +9 -0
- package/dist/technospam/pages/CoursesAssessmentPagePage.d.ts.map +1 -0
- package/dist/technospam/pages/CoursesAssessmentPagePage.js +464 -0
- package/dist/technospam/pages/CoursesAssessmentPagePage.js.map +1 -0
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +213 -211
- 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 +117 -81
- package/dist/technospam/pages/CoursesCoursesPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesMyLearningPagePage.js +1 -1
- package/dist/technospam/pages/CoursesMyLearningPagePage.js.map +1 -1
- package/dist/technospam/pages/DashboardDashboardPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/DashboardDashboardPagePage.js +21 -17
- package/dist/technospam/pages/DashboardDashboardPagePage.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/MentorshipMentorProfilePagePage.js +4 -4
- 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 +6 -4
- package/dist/technospam/pages/MentorshipMentorsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.js +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.js.map +1 -1
- package/dist/technospam/types/index.d.ts +7 -0
- package/dist/technospam/types/index.d.ts.map +1 -1
- package/dist/technospam/utils/assessment.d.ts +64 -0
- package/dist/technospam/utils/assessment.d.ts.map +1 -0
- package/dist/technospam/utils/assessment.js +122 -0
- package/dist/technospam/utils/assessment.js.map +1 -0
- package/dist/technospam/utils/mobileTabs.d.ts +45 -0
- package/dist/technospam/utils/mobileTabs.d.ts.map +1 -0
- package/dist/technospam/utils/mobileTabs.js +70 -0
- package/dist/technospam/utils/mobileTabs.js.map +1 -0
- package/dist/test/matchMedia.d.ts +6 -0
- package/dist/test/matchMedia.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -8,192 +8,193 @@ 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 te, useProblemsQuery as ne, usePublishCourse as j, usePublishProblem 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 ne, usePublishCourse as j, usePublishProblem as re, useRegradeSubmission as M, useScoreTeam as N, useStartHackathon as P, useStartJudging as F, useSubmissionsQuery as I, useTeamsQuery as L, useUpdateLesson as R } from "../api/technospamApi.js";
|
|
12
12
|
import "../components/index.js";
|
|
13
13
|
import { TAB_PANEL_FOCUS_CLASS as ie } from "../lib/a11y.js";
|
|
14
14
|
import { draftFromLesson as z, draftToInput as ae } from "../components/lesson/lessonAuthoring.js";
|
|
15
15
|
import { LessonKindFields as oe } from "../components/lesson/LessonKindFields.js";
|
|
16
16
|
import { EnterpriseIntegrationsTab as se } from "../components/admin/EnterpriseIntegrationsTab.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
17
|
+
import { AssessmentsAdminTab as ce } from "../components/admin/AssessmentsAdminTab.js";
|
|
18
|
+
import { useMemo as B, useState as V } from "react";
|
|
19
|
+
import { Archive as le, Award as ue, BookOpen as de, Code2 as H, ExternalLink as fe, Gavel as pe, ListChecks as me, Pencil as he, Play as ge, PlugZap as _e, Plus as ve, RefreshCw as ye, Rocket as be, ShieldAlert as xe, ShieldCheck as Se, Trophy as U, UserCheck as Ce, Users as W, X as we } from "lucide-react";
|
|
20
|
+
import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
21
|
+
import { Badge as Te, Button as J, GlassCard as Ee, Input as Y, Select as De, SelectContent as Oe, SelectItem as ke, SelectTrigger as Ae, SelectValue as je, Tabs as Me, TabsContent as Ne, TabsList as Pe, TabsTrigger as X, Textarea as Z } from "@burdenoff/fe-libs/ui";
|
|
22
|
+
import { nativeConfirm as Fe } from "@burdenoff/fe-libs/shared/native";
|
|
22
23
|
//#region src/technospam/pages/AdminAdminDashboardPagePage.tsx
|
|
23
|
-
var
|
|
24
|
+
var Ie = [
|
|
24
25
|
"ARTICLE",
|
|
25
26
|
"VIDEO",
|
|
26
27
|
"INTERACTIVE",
|
|
27
28
|
"QUIZ",
|
|
28
29
|
"PROJECT"
|
|
29
|
-
],
|
|
30
|
+
], Le = [
|
|
30
31
|
"ACCEPTED",
|
|
31
32
|
"WRONG_ANSWER",
|
|
32
33
|
"TIME_LIMIT_EXCEEDED",
|
|
33
34
|
"RUNTIME_ERROR",
|
|
34
35
|
"COMPILE_ERROR"
|
|
35
|
-
],
|
|
36
|
+
], Re = [
|
|
36
37
|
"BEGINNER",
|
|
37
38
|
"INTERMEDIATE",
|
|
38
39
|
"ADVANCED",
|
|
39
40
|
"EXPERT"
|
|
40
|
-
],
|
|
41
|
+
], ze = [
|
|
41
42
|
"EASY",
|
|
42
43
|
"MEDIUM",
|
|
43
44
|
"HARD"
|
|
44
45
|
];
|
|
45
|
-
function
|
|
46
|
+
function Be(e) {
|
|
46
47
|
return e.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
+
function Ve(e) {
|
|
49
50
|
return e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
50
51
|
}
|
|
51
52
|
function Q(e) {
|
|
52
53
|
let t = Number.parseInt(e, 10);
|
|
53
54
|
return Number.isFinite(t) ? t : void 0;
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function He(e) {
|
|
56
57
|
if (!e) return null;
|
|
57
58
|
let t = new Date(e);
|
|
58
59
|
return Number.isNaN(t.getTime()) ? null : t.toISOString();
|
|
59
60
|
}
|
|
60
61
|
function $({ label: e, required: t, className: n, children: r }) {
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ q("label", {
|
|
62
63
|
className: `flex flex-col gap-1.5 ${n ?? ""}`,
|
|
63
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ q("span", {
|
|
64
65
|
className: "text-xs font-medium text-text-secondary",
|
|
65
|
-
children: [e, t ? /* @__PURE__ */
|
|
66
|
+
children: [e, t ? /* @__PURE__ */ K("span", {
|
|
66
67
|
className: "text-status-error-text",
|
|
67
68
|
children: " *"
|
|
68
69
|
}) : null]
|
|
69
70
|
}), r]
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br text-
|
|
75
|
-
children: /* @__PURE__ */
|
|
73
|
+
function Ue({ seed: e, icon: n }) {
|
|
74
|
+
return /* @__PURE__ */ K("span", {
|
|
75
|
+
className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br text-action-primary-text shadow-sm", r(e)),
|
|
76
|
+
children: /* @__PURE__ */ K(n, {
|
|
76
77
|
size: 18,
|
|
77
78
|
strokeWidth: 2
|
|
78
79
|
})
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
function We({ title: e, description: t, icon: n, children: r, footer: i }) {
|
|
83
|
+
return /* @__PURE__ */ q(Ee, {
|
|
83
84
|
className: "space-y-4 p-4 sm:p-5",
|
|
84
85
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ q("div", {
|
|
86
87
|
className: "flex items-center gap-3 border-b border-border-seam pb-3",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
88
|
+
children: [/* @__PURE__ */ K("span", {
|
|
88
89
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-accent-primary/15 text-accent-primary ring-1 ring-accent-primary/20",
|
|
89
|
-
children: /* @__PURE__ */
|
|
90
|
-
}), /* @__PURE__ */
|
|
90
|
+
children: /* @__PURE__ */ K(n, { size: 17 })
|
|
91
|
+
}), /* @__PURE__ */ q("div", {
|
|
91
92
|
className: "min-w-0",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: [/* @__PURE__ */ K("h3", {
|
|
93
94
|
className: "text-sm font-semibold text-text-primary",
|
|
94
95
|
children: e
|
|
95
|
-
}), t ? /* @__PURE__ */
|
|
96
|
+
}), t ? /* @__PURE__ */ K("p", {
|
|
96
97
|
className: "text-xs text-text-muted",
|
|
97
98
|
children: t
|
|
98
99
|
}) : null]
|
|
99
100
|
})]
|
|
100
101
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ K("div", {
|
|
102
103
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
103
104
|
children: r
|
|
104
105
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ K("div", {
|
|
106
107
|
className: "flex justify-end gap-2 border-t border-border-seam pt-3",
|
|
107
108
|
children: i
|
|
108
109
|
})
|
|
109
110
|
]
|
|
110
111
|
});
|
|
111
112
|
}
|
|
112
|
-
function
|
|
113
|
-
return /* @__PURE__ */
|
|
113
|
+
function Ge({ summary: e, actionLabel: t, open: n, onToggle: r }) {
|
|
114
|
+
return /* @__PURE__ */ q("div", {
|
|
114
115
|
className: "flex items-center justify-between gap-3",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
116
|
+
children: [/* @__PURE__ */ K("p", {
|
|
116
117
|
className: "text-sm text-text-secondary",
|
|
117
118
|
children: e
|
|
118
|
-
}), t && r ? /* @__PURE__ */ J
|
|
119
|
+
}), t && r ? /* @__PURE__ */ q(J, {
|
|
119
120
|
size: "sm",
|
|
120
121
|
variant: n ? "outline" : "default",
|
|
121
122
|
onClick: r,
|
|
122
|
-
children: [
|
|
123
|
+
children: [K(n ? we : ve, { size: 15 }), n ? "Close" : t]
|
|
123
124
|
}) : null]
|
|
124
125
|
});
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
-
return /* @__PURE__ */
|
|
127
|
+
function Ke({ leading: e, children: t, actions: n }) {
|
|
128
|
+
return /* @__PURE__ */ q(Ee, {
|
|
128
129
|
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",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ q("div", {
|
|
130
131
|
className: "flex min-w-0 items-center gap-3",
|
|
131
|
-
children: [e, /* @__PURE__ */
|
|
132
|
+
children: [e, /* @__PURE__ */ K("div", {
|
|
132
133
|
className: "min-w-0",
|
|
133
134
|
children: t
|
|
134
135
|
})]
|
|
135
|
-
}), n ? /* @__PURE__ */
|
|
136
|
+
}), n ? /* @__PURE__ */ K("div", {
|
|
136
137
|
className: "flex shrink-0 flex-wrap items-center gap-2",
|
|
137
138
|
children: n
|
|
138
139
|
}) : null]
|
|
139
140
|
});
|
|
140
141
|
}
|
|
141
|
-
function
|
|
142
|
-
let [r, { loading: i }] = R(), [a, o] =
|
|
142
|
+
function qe({ lesson: e, onSaved: t, onCancel: n }) {
|
|
143
|
+
let [r, { loading: i }] = R(), [a, o] = V(e.title), [s, c] = V(e.kind), [l, d] = V(e.content ?? ""), [f, p] = V(String(e.estimatedMinutes ?? "")), [m, h] = V(() => z(e)), { data: g } = O(e.id, s !== "QUIZ"), [_, y] = V(null), b = B(() => z(null, g?.tecLessonQuizKey).quiz, [g]), x = {
|
|
143
144
|
...m,
|
|
144
145
|
quiz: _ ?? b
|
|
145
146
|
};
|
|
146
|
-
return /* @__PURE__ */
|
|
147
|
+
return /* @__PURE__ */ q("div", {
|
|
147
148
|
className: "mt-2 space-y-2 rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
148
149
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ q("div", {
|
|
150
151
|
className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
152
|
+
children: [/* @__PURE__ */ K(Y, {
|
|
152
153
|
"aria-label": "Lesson title",
|
|
153
154
|
value: a,
|
|
154
155
|
onChange: (e) => o(e.target.value),
|
|
155
156
|
placeholder: "Lesson title"
|
|
156
|
-
}), /* @__PURE__ */
|
|
157
|
+
}), /* @__PURE__ */ q(De, {
|
|
157
158
|
value: s,
|
|
158
159
|
onValueChange: (e) => c(e),
|
|
159
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ K(Ae, {
|
|
160
161
|
"aria-label": "Lesson type",
|
|
161
|
-
children: /* @__PURE__ */
|
|
162
|
-
}), /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ K(je, {})
|
|
163
|
+
}), /* @__PURE__ */ K(Oe, { children: Ie.map((e) => /* @__PURE__ */ K(ke, {
|
|
163
164
|
value: e,
|
|
164
165
|
children: u(e)
|
|
165
166
|
}, e)) })]
|
|
166
167
|
})]
|
|
167
168
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ K(Z, {
|
|
169
170
|
placeholder: "Lesson content (markdown / notes)",
|
|
170
171
|
value: l,
|
|
171
172
|
onChange: (e) => d(e.target.value)
|
|
172
173
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ K(oe, {
|
|
174
175
|
kind: s,
|
|
175
176
|
draft: x,
|
|
176
177
|
onChange: (e) => {
|
|
177
178
|
h(e), e.quiz !== x.quiz && y(e.quiz);
|
|
178
179
|
}
|
|
179
180
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ q("div", {
|
|
181
182
|
className: "flex flex-wrap items-center gap-2",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ K(Y, {
|
|
183
184
|
type: "number",
|
|
184
185
|
min: 0,
|
|
185
186
|
className: "w-28",
|
|
186
187
|
placeholder: "Minutes",
|
|
187
188
|
value: f,
|
|
188
189
|
onChange: (e) => p(e.target.value)
|
|
189
|
-
}), /* @__PURE__ */
|
|
190
|
+
}), /* @__PURE__ */ q("div", {
|
|
190
191
|
className: "ml-auto flex gap-2",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ K(J, {
|
|
192
193
|
size: "sm",
|
|
193
194
|
variant: "outline",
|
|
194
195
|
onClick: n,
|
|
195
196
|
children: "Cancel"
|
|
196
|
-
}), /* @__PURE__ */
|
|
197
|
+
}), /* @__PURE__ */ K(J, {
|
|
197
198
|
size: "sm",
|
|
198
199
|
onClick: async () => {
|
|
199
200
|
let i = a.trim();
|
|
@@ -219,8 +220,8 @@ function Ge({ lesson: e, onSaved: t, onCancel: n }) {
|
|
|
219
220
|
]
|
|
220
221
|
});
|
|
221
222
|
}
|
|
222
|
-
function
|
|
223
|
-
let { data: t, loading: n, refetch: r } = k(e), [i, { loading: a }] = T(), [o] = R(), [c, l] =
|
|
223
|
+
function Je({ courseId: e }) {
|
|
224
|
+
let { data: t, loading: n, refetch: r } = k(e), [i, { loading: a }] = T(), [o] = R(), [c, l] = V(null), [d, f] = V(null), [p, h] = V(""), [g, _] = V("ARTICLE"), [y, b] = V(""), [x, S] = V(""), [C, w] = V(!1), [ee, E] = V(() => z()), D = [...t?.tecListLessons?.items ?? []].sort((e, t) => e.position - t.position), O = async (e) => {
|
|
224
225
|
f(e.id);
|
|
225
226
|
try {
|
|
226
227
|
let t = await o({ variables: {
|
|
@@ -232,15 +233,15 @@ function Ke({ courseId: e }) {
|
|
|
232
233
|
f(null);
|
|
233
234
|
}
|
|
234
235
|
};
|
|
235
|
-
return /* @__PURE__ */
|
|
236
|
+
return /* @__PURE__ */ q("div", {
|
|
236
237
|
className: "mt-3 rounded-xl border border-border-seam bg-bg-sunken p-4",
|
|
237
238
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ q("div", {
|
|
239
240
|
className: "mb-3 flex items-center gap-2",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
241
|
+
children: [/* @__PURE__ */ K("span", {
|
|
241
242
|
className: "flex h-7 w-7 items-center justify-center rounded-lg bg-accent-primary/15 text-accent-primary ring-1 ring-accent-primary/20",
|
|
242
|
-
children: /* @__PURE__ */
|
|
243
|
-
}), /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ K(me, { size: 15 })
|
|
244
|
+
}), /* @__PURE__ */ q("span", {
|
|
244
245
|
className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
245
246
|
children: [
|
|
246
247
|
"Curriculum (",
|
|
@@ -249,55 +250,55 @@ function Ke({ courseId: e }) {
|
|
|
249
250
|
]
|
|
250
251
|
})]
|
|
251
252
|
}),
|
|
252
|
-
n && D.length === 0 ? /* @__PURE__ */
|
|
253
|
+
n && D.length === 0 ? /* @__PURE__ */ K(m, {
|
|
253
254
|
count: 2,
|
|
254
255
|
height: "h-10"
|
|
255
|
-
}) : D.length === 0 ? /* @__PURE__ */
|
|
256
|
+
}) : D.length === 0 ? /* @__PURE__ */ K("p", {
|
|
256
257
|
className: "mb-3 text-xs text-text-muted",
|
|
257
258
|
children: "No lessons yet — add the first below."
|
|
258
|
-
}) : /* @__PURE__ */
|
|
259
|
+
}) : /* @__PURE__ */ K("ol", {
|
|
259
260
|
className: "mb-3 space-y-1.5",
|
|
260
|
-
children: D.map((e, t) => /* @__PURE__ */
|
|
261
|
+
children: D.map((e, t) => /* @__PURE__ */ q("li", { children: [/* @__PURE__ */ q("div", {
|
|
261
262
|
className: "flex flex-wrap items-center gap-2 rounded-lg bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
262
263
|
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ K("span", {
|
|
264
265
|
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",
|
|
265
266
|
children: t + 1
|
|
266
267
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ K("span", {
|
|
268
269
|
className: "min-w-0 flex-1 truncate",
|
|
269
270
|
children: e.title
|
|
270
271
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ K(Te, {
|
|
272
273
|
variant: "secondary",
|
|
273
274
|
className: "text-[11px]",
|
|
274
275
|
children: u(e.kind)
|
|
275
276
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ K("span", {
|
|
277
278
|
className: "text-xs text-text-muted",
|
|
278
279
|
children: s(e.estimatedMinutes)
|
|
279
280
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ q("label", {
|
|
281
282
|
className: "flex items-center gap-1.5 text-xs text-text-secondary",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ K("input", {
|
|
283
284
|
type: "checkbox",
|
|
284
285
|
checked: e.isPreview,
|
|
285
286
|
disabled: d === e.id,
|
|
286
287
|
onChange: () => void O(e)
|
|
287
288
|
}), "Free preview"]
|
|
288
289
|
}),
|
|
289
|
-
/* @__PURE__ */ J
|
|
290
|
+
/* @__PURE__ */ q(J, {
|
|
290
291
|
size: "sm",
|
|
291
292
|
variant: "ghost",
|
|
292
293
|
onClick: () => l(c === e.id ? null : e.id),
|
|
293
294
|
children: [
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ K(he, { size: 13 }),
|
|
295
296
|
" ",
|
|
296
297
|
c === e.id ? "Close" : "Edit"
|
|
297
298
|
]
|
|
298
299
|
})
|
|
299
300
|
]
|
|
300
|
-
}), c === e.id ? /* @__PURE__ */
|
|
301
|
+
}), c === e.id ? /* @__PURE__ */ K(qe, {
|
|
301
302
|
lesson: e,
|
|
302
303
|
onSaved: async () => {
|
|
303
304
|
await r();
|
|
@@ -305,55 +306,55 @@ function Ke({ courseId: e }) {
|
|
|
305
306
|
onCancel: () => l(null)
|
|
306
307
|
}) : null] }, e.id))
|
|
307
308
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ q("div", {
|
|
309
310
|
className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ K(Y, {
|
|
311
312
|
"aria-label": "Lesson title",
|
|
312
313
|
placeholder: "Lesson title",
|
|
313
314
|
value: p,
|
|
314
315
|
onChange: (e) => h(e.target.value)
|
|
315
|
-
}), /* @__PURE__ */
|
|
316
|
+
}), /* @__PURE__ */ q(De, {
|
|
316
317
|
value: g,
|
|
317
318
|
onValueChange: (e) => _(e),
|
|
318
|
-
children: [/* @__PURE__ */
|
|
319
|
+
children: [/* @__PURE__ */ K(Ae, {
|
|
319
320
|
"aria-label": "Lesson type",
|
|
320
|
-
children: /* @__PURE__ */
|
|
321
|
-
}), /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ K(je, {})
|
|
322
|
+
}), /* @__PURE__ */ K(Oe, { children: Ie.map((e) => /* @__PURE__ */ K(ke, {
|
|
322
323
|
value: e,
|
|
323
324
|
children: u(e)
|
|
324
325
|
}, e)) })]
|
|
325
326
|
})]
|
|
326
327
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ K(Z, {
|
|
328
329
|
className: "mt-2",
|
|
329
330
|
placeholder: "Lesson content (markdown / notes)",
|
|
330
331
|
value: y,
|
|
331
332
|
onChange: (e) => b(e.target.value)
|
|
332
333
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ K(oe, {
|
|
334
335
|
kind: g,
|
|
335
336
|
draft: ee,
|
|
336
337
|
onChange: E
|
|
337
338
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ q("div", {
|
|
339
340
|
className: "mt-2 flex flex-wrap items-center gap-3",
|
|
340
341
|
children: [
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ K(Y, {
|
|
342
343
|
type: "number",
|
|
343
344
|
className: "w-28",
|
|
344
345
|
placeholder: "Minutes",
|
|
345
346
|
value: x,
|
|
346
347
|
onChange: (e) => S(e.target.value)
|
|
347
348
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ q("label", {
|
|
349
350
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ K("input", {
|
|
351
352
|
type: "checkbox",
|
|
352
353
|
checked: C,
|
|
353
354
|
onChange: (e) => w(e.target.checked)
|
|
354
355
|
}), "Free preview"]
|
|
355
356
|
}),
|
|
356
|
-
/* @__PURE__ */ J
|
|
357
|
+
/* @__PURE__ */ q(J, {
|
|
357
358
|
size: "sm",
|
|
358
359
|
onClick: async () => {
|
|
359
360
|
let t = p.trim();
|
|
@@ -373,31 +374,31 @@ function Ke({ courseId: e }) {
|
|
|
373
374
|
},
|
|
374
375
|
disabled: a,
|
|
375
376
|
className: "ml-auto",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
377
|
+
children: [/* @__PURE__ */ K(ve, { size: 14 }), " Add lesson"]
|
|
377
378
|
})
|
|
378
379
|
]
|
|
379
380
|
})
|
|
380
381
|
]
|
|
381
382
|
});
|
|
382
383
|
}
|
|
383
|
-
function
|
|
384
|
-
let [i, a] =
|
|
385
|
-
return /* @__PURE__ */
|
|
384
|
+
function Ye({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
|
|
385
|
+
let [i, a] = V(!1), s = e.verdict !== "PENDING";
|
|
386
|
+
return /* @__PURE__ */ q("div", {
|
|
386
387
|
className: "space-y-3 rounded-lg bg-bg-surface px-3 py-3 text-sm",
|
|
387
388
|
children: [
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ q("div", {
|
|
389
390
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
390
391
|
children: [
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ K(d, { status: e.verdict }),
|
|
393
|
+
/* @__PURE__ */ q("span", {
|
|
393
394
|
className: "inline-flex items-center gap-1 text-xs text-text-muted",
|
|
394
395
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ K(H, { size: 12 }),
|
|
396
397
|
" ",
|
|
397
398
|
u(e.language)
|
|
398
399
|
]
|
|
399
400
|
}),
|
|
400
|
-
e.totalCount > 0 ? /* @__PURE__ */
|
|
401
|
+
e.totalCount > 0 ? /* @__PURE__ */ q("span", {
|
|
401
402
|
className: "text-xs text-text-muted",
|
|
402
403
|
children: [
|
|
403
404
|
e.passedCount,
|
|
@@ -405,47 +406,47 @@ function qe({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
|
|
|
405
406
|
e.totalCount,
|
|
406
407
|
" test cases passed"
|
|
407
408
|
]
|
|
408
|
-
}) : /* @__PURE__ */
|
|
409
|
+
}) : /* @__PURE__ */ K("span", {
|
|
409
410
|
className: "text-xs text-text-muted",
|
|
410
411
|
children: "No test cases run"
|
|
411
412
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ q("span", {
|
|
413
414
|
className: "text-xs text-text-muted",
|
|
414
415
|
children: [e.runtimeMs, " ms"]
|
|
415
416
|
}),
|
|
416
|
-
s ? /* @__PURE__ */
|
|
417
|
+
s ? /* @__PURE__ */ q("span", {
|
|
417
418
|
className: "text-xs text-text-muted",
|
|
418
419
|
children: [e.pointsAwarded, " pts"]
|
|
419
420
|
}) : null,
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ K("span", {
|
|
421
422
|
className: "ml-auto text-xs text-text-muted",
|
|
422
423
|
children: o(e.judgedAt ?? e.createdAt)
|
|
423
424
|
})
|
|
424
425
|
]
|
|
425
426
|
}),
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ q("div", {
|
|
427
428
|
className: "flex flex-wrap items-center gap-2",
|
|
428
429
|
children: [
|
|
429
|
-
/* @__PURE__ */ J
|
|
430
|
+
/* @__PURE__ */ q(J, {
|
|
430
431
|
size: "sm",
|
|
431
432
|
variant: "outline",
|
|
432
433
|
onClick: () => a((e) => !e),
|
|
433
434
|
children: [
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ K(H, { size: 13 }),
|
|
435
436
|
" ",
|
|
436
437
|
i ? "Hide code" : "View code"
|
|
437
438
|
]
|
|
438
439
|
}),
|
|
439
|
-
e.verdict === "PENDING" ? /* @__PURE__ */ J
|
|
440
|
+
e.verdict === "PENDING" ? /* @__PURE__ */ q(J, {
|
|
440
441
|
size: "sm",
|
|
441
442
|
variant: "outline",
|
|
442
443
|
onClick: r,
|
|
443
444
|
disabled: t,
|
|
444
|
-
children: [/* @__PURE__ */
|
|
445
|
+
children: [/* @__PURE__ */ K(ye, { size: 13 }), " Re-run grader"]
|
|
445
446
|
}) : null,
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ K("div", {
|
|
447
448
|
className: "ml-auto flex flex-wrap gap-1",
|
|
448
|
-
children:
|
|
449
|
+
children: Le.map((r) => /* @__PURE__ */ K(J, {
|
|
449
450
|
size: "sm",
|
|
450
451
|
variant: r === "ACCEPTED" ? "default" : "outline",
|
|
451
452
|
onClick: () => n(r),
|
|
@@ -455,20 +456,20 @@ function qe({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
|
|
|
455
456
|
})
|
|
456
457
|
]
|
|
457
458
|
}),
|
|
458
|
-
i ? /* @__PURE__ */
|
|
459
|
+
i ? /* @__PURE__ */ K(g, {
|
|
459
460
|
label: u(e.language),
|
|
460
461
|
bodyClassName: "max-h-72",
|
|
461
462
|
children: e.code
|
|
462
463
|
}) : null,
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ K(_, {
|
|
464
465
|
submission: e,
|
|
465
466
|
actualOutputLabel: "Actual output"
|
|
466
467
|
})
|
|
467
468
|
]
|
|
468
469
|
});
|
|
469
470
|
}
|
|
470
|
-
function
|
|
471
|
-
let { data: t, loading: n, refetch: r } = I({ problemId: e }), [i] = E(), [a] =
|
|
471
|
+
function Xe({ problemId: e }) {
|
|
472
|
+
let { data: t, loading: n, refetch: r } = I({ problemId: e }), [i] = E(), [a] = M(), [o, s] = V(null), [c, l] = V(!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) => {
|
|
472
473
|
s(e);
|
|
473
474
|
try {
|
|
474
475
|
(await i({ variables: {
|
|
@@ -487,16 +488,16 @@ function Je({ problemId: e }) {
|
|
|
487
488
|
s(null);
|
|
488
489
|
}
|
|
489
490
|
};
|
|
490
|
-
return /* @__PURE__ */
|
|
491
|
+
return /* @__PURE__ */ q("div", {
|
|
491
492
|
className: "mt-3 rounded-xl border border-border-seam bg-bg-sunken p-4",
|
|
492
|
-
children: [/* @__PURE__ */
|
|
493
|
+
children: [/* @__PURE__ */ q("div", {
|
|
493
494
|
className: "mb-3 flex flex-wrap items-center gap-2",
|
|
494
495
|
children: [
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ K("span", {
|
|
496
497
|
className: "flex h-7 w-7 items-center justify-center rounded-lg bg-accent-purple/15 text-accent-purple ring-1 ring-accent-purple/20",
|
|
497
|
-
children: /* @__PURE__ */
|
|
498
|
+
children: /* @__PURE__ */ K(pe, { size: 15 })
|
|
498
499
|
}),
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ q("span", {
|
|
500
501
|
className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
501
502
|
children: [
|
|
502
503
|
"Submissions (",
|
|
@@ -505,7 +506,7 @@ function Je({ problemId: e }) {
|
|
|
505
506
|
p ? ` · ${p} pending` : ""
|
|
506
507
|
]
|
|
507
508
|
}),
|
|
508
|
-
p ? /* @__PURE__ */
|
|
509
|
+
p ? /* @__PURE__ */ K(J, {
|
|
509
510
|
size: "sm",
|
|
510
511
|
variant: c ? "default" : "outline",
|
|
511
512
|
className: "ml-auto",
|
|
@@ -513,15 +514,15 @@ function Je({ problemId: e }) {
|
|
|
513
514
|
children: c ? "Showing pending" : "Pending only"
|
|
514
515
|
}) : null
|
|
515
516
|
]
|
|
516
|
-
}), n && d.length === 0 ? /* @__PURE__ */
|
|
517
|
+
}), n && d.length === 0 ? /* @__PURE__ */ K(m, {
|
|
517
518
|
count: 2,
|
|
518
519
|
height: "h-10"
|
|
519
|
-
}) : f.length === 0 ? /* @__PURE__ */
|
|
520
|
+
}) : f.length === 0 ? /* @__PURE__ */ K("p", {
|
|
520
521
|
className: "text-xs text-text-muted",
|
|
521
522
|
children: c ? "Nothing is waiting on a verdict." : "No submissions yet."
|
|
522
|
-
}) : /* @__PURE__ */
|
|
523
|
+
}) : /* @__PURE__ */ K("div", {
|
|
523
524
|
className: "space-y-2",
|
|
524
|
-
children: f.map((e) => /* @__PURE__ */
|
|
525
|
+
children: f.map((e) => /* @__PURE__ */ K(Ye, {
|
|
525
526
|
submission: e,
|
|
526
527
|
busy: o === e.id,
|
|
527
528
|
onGrade: (t) => void h(e.id, t),
|
|
@@ -530,8 +531,8 @@ function Je({ problemId: e }) {
|
|
|
530
531
|
})]
|
|
531
532
|
});
|
|
532
533
|
}
|
|
533
|
-
function
|
|
534
|
-
let { data: t, loading: n, refetch: r } = L(e.id), [i] =
|
|
534
|
+
function Ze({ hackathon: e }) {
|
|
535
|
+
let { data: t, loading: n, refetch: r } = L(e.id), [i] = N(), [a, o] = V(null), [s, c] = V({}), l = t?.tecListTeams?.items ?? [], u = async (e, t) => {
|
|
535
536
|
let n = Math.max(0, Number(s[e] ?? "0") || 0);
|
|
536
537
|
o(e);
|
|
537
538
|
try {
|
|
@@ -544,14 +545,14 @@ function Ye({ hackathon: e }) {
|
|
|
544
545
|
o(null);
|
|
545
546
|
}
|
|
546
547
|
};
|
|
547
|
-
return /* @__PURE__ */
|
|
548
|
+
return /* @__PURE__ */ q("div", {
|
|
548
549
|
className: "mt-3 rounded-xl border border-border-seam bg-bg-sunken p-4",
|
|
549
|
-
children: [/* @__PURE__ */
|
|
550
|
+
children: [/* @__PURE__ */ q("div", {
|
|
550
551
|
className: "mb-3 flex items-center gap-2",
|
|
551
|
-
children: [/* @__PURE__ */
|
|
552
|
+
children: [/* @__PURE__ */ K("span", {
|
|
552
553
|
className: "flex h-7 w-7 items-center justify-center rounded-lg bg-accent-teal/15 text-accent-teal ring-1 ring-accent-teal/20",
|
|
553
|
-
children: /* @__PURE__ */
|
|
554
|
-
}), /* @__PURE__ */
|
|
554
|
+
children: /* @__PURE__ */ K(W, { size: 15 })
|
|
555
|
+
}), /* @__PURE__ */ q("span", {
|
|
555
556
|
className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
556
557
|
children: [
|
|
557
558
|
"Teams (",
|
|
@@ -559,38 +560,38 @@ function Ye({ hackathon: e }) {
|
|
|
559
560
|
")"
|
|
560
561
|
]
|
|
561
562
|
})]
|
|
562
|
-
}), n && l.length === 0 ? /* @__PURE__ */
|
|
563
|
+
}), n && l.length === 0 ? /* @__PURE__ */ K(m, {
|
|
563
564
|
count: 2,
|
|
564
565
|
height: "h-10"
|
|
565
|
-
}) : l.length === 0 ? /* @__PURE__ */
|
|
566
|
+
}) : l.length === 0 ? /* @__PURE__ */ K("p", {
|
|
566
567
|
className: "text-xs text-text-muted",
|
|
567
568
|
children: "No teams registered yet."
|
|
568
|
-
}) : /* @__PURE__ */
|
|
569
|
+
}) : /* @__PURE__ */ K("div", {
|
|
569
570
|
className: "space-y-2",
|
|
570
|
-
children: l.map((t) => /* @__PURE__ */
|
|
571
|
+
children: l.map((t) => /* @__PURE__ */ q("div", {
|
|
571
572
|
className: "space-y-2 rounded-lg bg-bg-surface px-3 py-2.5 text-sm",
|
|
572
|
-
children: [/* @__PURE__ */
|
|
573
|
+
children: [/* @__PURE__ */ q("div", {
|
|
573
574
|
className: "flex flex-wrap items-center gap-2",
|
|
574
575
|
children: [
|
|
575
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ K("span", {
|
|
576
577
|
className: "truncate font-medium text-text-primary",
|
|
577
578
|
children: t.name
|
|
578
579
|
}),
|
|
579
|
-
/* @__PURE__ */
|
|
580
|
-
/* @__PURE__ */
|
|
580
|
+
/* @__PURE__ */ K(d, { status: t.status }),
|
|
581
|
+
/* @__PURE__ */ q("span", {
|
|
581
582
|
className: "inline-flex items-center gap-1 text-xs text-text-muted",
|
|
582
583
|
children: [
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ K(W, { size: 12 }),
|
|
584
585
|
" ",
|
|
585
586
|
t.memberIds.length,
|
|
586
587
|
" member",
|
|
587
588
|
t.memberIds.length === 1 ? "" : "s"
|
|
588
589
|
]
|
|
589
590
|
}),
|
|
590
|
-
e.status === "JUDGING" ? /* @__PURE__ */
|
|
591
|
+
e.status === "JUDGING" ? /* @__PURE__ */ q("div", {
|
|
591
592
|
className: "ml-auto flex items-center gap-1",
|
|
592
593
|
children: [
|
|
593
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ K(Y, {
|
|
594
595
|
type: "number",
|
|
595
596
|
min: 0,
|
|
596
597
|
className: "w-20",
|
|
@@ -601,54 +602,54 @@ function Ye({ hackathon: e }) {
|
|
|
601
602
|
[t.id]: e.target.value
|
|
602
603
|
}))
|
|
603
604
|
}),
|
|
604
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ K(J, {
|
|
605
606
|
size: "sm",
|
|
606
607
|
onClick: () => u(t.id, !1),
|
|
607
608
|
disabled: a === t.id,
|
|
608
609
|
children: "Score"
|
|
609
610
|
}),
|
|
610
|
-
/* @__PURE__ */ J
|
|
611
|
+
/* @__PURE__ */ q(J, {
|
|
611
612
|
size: "sm",
|
|
612
613
|
variant: "outline",
|
|
613
614
|
onClick: () => u(t.id, !0),
|
|
614
615
|
disabled: a === t.id,
|
|
615
|
-
children: [/* @__PURE__ */
|
|
616
|
+
children: [/* @__PURE__ */ K(U, { size: 14 }), " Winner"]
|
|
616
617
|
})
|
|
617
618
|
]
|
|
618
|
-
}) : /* @__PURE__ */
|
|
619
|
+
}) : /* @__PURE__ */ q("span", {
|
|
619
620
|
className: "ml-auto text-xs text-text-muted",
|
|
620
621
|
children: [t.score, " pts"]
|
|
621
622
|
})
|
|
622
623
|
]
|
|
623
|
-
}), t.projectName || t.pitch || t.projectUrl || t.repoUrl ? /* @__PURE__ */
|
|
624
|
+
}), t.projectName || t.pitch || t.projectUrl || t.repoUrl ? /* @__PURE__ */ q("div", {
|
|
624
625
|
className: "space-y-1 border-t border-border-seam pt-2",
|
|
625
626
|
children: [
|
|
626
|
-
t.projectName ? /* @__PURE__ */
|
|
627
|
+
t.projectName ? /* @__PURE__ */ K("div", {
|
|
627
628
|
className: "truncate text-xs font-medium text-text-secondary",
|
|
628
629
|
children: t.projectName
|
|
629
630
|
}) : null,
|
|
630
|
-
t.pitch ? /* @__PURE__ */
|
|
631
|
+
t.pitch ? /* @__PURE__ */ K("p", {
|
|
631
632
|
className: "line-clamp-2 text-xs text-text-muted",
|
|
632
633
|
children: t.pitch
|
|
633
634
|
}) : null,
|
|
634
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ q("div", {
|
|
635
636
|
className: "flex flex-wrap gap-3",
|
|
636
|
-
children: [t.projectUrl ? /* @__PURE__ */
|
|
637
|
+
children: [t.projectUrl ? /* @__PURE__ */ q("a", {
|
|
637
638
|
href: t.projectUrl,
|
|
638
639
|
target: "_blank",
|
|
639
640
|
rel: "noreferrer noopener",
|
|
640
641
|
className: "inline-flex items-center gap-1 text-xs font-medium text-accent-primary hover:underline",
|
|
641
|
-
children: [/* @__PURE__ */
|
|
642
|
-
}) : null, t.repoUrl ? /* @__PURE__ */
|
|
642
|
+
children: [/* @__PURE__ */ K(fe, { size: 12 }), " Project"]
|
|
643
|
+
}) : null, t.repoUrl ? /* @__PURE__ */ q("a", {
|
|
643
644
|
href: t.repoUrl,
|
|
644
645
|
target: "_blank",
|
|
645
646
|
rel: "noreferrer noopener",
|
|
646
647
|
className: "inline-flex items-center gap-1 text-xs font-medium text-accent-primary hover:underline",
|
|
647
|
-
children: [/* @__PURE__ */
|
|
648
|
+
children: [/* @__PURE__ */ K(H, { size: 12 }), " Repository"]
|
|
648
649
|
}) : null]
|
|
649
650
|
})
|
|
650
651
|
]
|
|
651
|
-
}) : /* @__PURE__ */
|
|
652
|
+
}) : /* @__PURE__ */ K("p", {
|
|
652
653
|
className: "border-t border-border-seam pt-2 text-xs text-text-muted",
|
|
653
654
|
children: "Nothing submitted yet."
|
|
654
655
|
})]
|
|
@@ -656,21 +657,21 @@ function Ye({ hackathon: e }) {
|
|
|
656
657
|
})]
|
|
657
658
|
});
|
|
658
659
|
}
|
|
659
|
-
function
|
|
660
|
-
let { data: e, loading: t, error: n, refetch: r } = S({}), [o, { loading: c }] = C(), [l] = j(), [g] = b(), [_, y] =
|
|
661
|
-
D(""), k(""), te(""),
|
|
660
|
+
function Qe() {
|
|
661
|
+
let { data: e, loading: t, error: n, refetch: r } = S({}), [o, { loading: c }] = C(), [l] = j(), [g] = b(), [_, y] = V(!1), [x, w] = V(null), [T, ee] = V(null), [E, D] = V(""), [O, k] = V(""), [A, te] = V(""), [ne, re] = V(""), [M, N] = V("BEGINNER"), [P, F] = V(""), [I, L] = V([]), R = e?.tecListCourses?.items ?? [], ie = () => {
|
|
662
|
+
D(""), k(""), te(""), re(""), N("BEGINNER"), F(""), L([]), y(!1);
|
|
662
663
|
}, z = async () => {
|
|
663
664
|
let e = E.trim();
|
|
664
665
|
if (!e) return v.error("Title is required");
|
|
665
|
-
let t =
|
|
666
|
+
let t = Be(O || e);
|
|
666
667
|
if (!t) return v.error("A valid slug is required");
|
|
667
668
|
(await o({ variables: { input: {
|
|
668
669
|
title: e,
|
|
669
670
|
slug: t,
|
|
670
671
|
summary: A.trim() || void 0,
|
|
671
672
|
topic: ne.trim() || void 0,
|
|
672
|
-
level:
|
|
673
|
-
estimatedMinutes: Q(
|
|
673
|
+
level: M,
|
|
674
|
+
estimatedMinutes: Q(P),
|
|
674
675
|
tags: I
|
|
675
676
|
} } })).data?.tecCreateCourse && (v.success("Course created", `"${e}" saved as a draft.`), ie(), await r());
|
|
676
677
|
}, ae = async (e) => {
|
|
@@ -681,7 +682,7 @@ function Xe() {
|
|
|
681
682
|
w(null);
|
|
682
683
|
}
|
|
683
684
|
}, oe = async (e, t) => {
|
|
684
|
-
if (await
|
|
685
|
+
if (await Fe({
|
|
685
686
|
title: "Archive course",
|
|
686
687
|
message: `Archive "${t}"? Learners will no longer be able to enroll.`,
|
|
687
688
|
okButtonTitle: "Archive",
|
|
@@ -695,90 +696,90 @@ function Xe() {
|
|
|
695
696
|
}
|
|
696
697
|
}
|
|
697
698
|
};
|
|
698
|
-
return /* @__PURE__ */
|
|
699
|
+
return /* @__PURE__ */ q("div", {
|
|
699
700
|
className: "space-y-4",
|
|
700
701
|
children: [
|
|
701
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ K(Ge, {
|
|
702
703
|
summary: `${R.length} course${R.length === 1 ? "" : "s"}`,
|
|
703
704
|
actionLabel: "New course",
|
|
704
705
|
open: _,
|
|
705
706
|
onToggle: () => y((e) => !e)
|
|
706
707
|
}),
|
|
707
|
-
_ ? /* @__PURE__ */
|
|
708
|
+
_ ? /* @__PURE__ */ q(We, {
|
|
708
709
|
title: "New course",
|
|
709
710
|
description: "Draft a course, then add lessons and publish when it's ready.",
|
|
710
|
-
icon:
|
|
711
|
-
footer: /* @__PURE__ */
|
|
711
|
+
icon: de,
|
|
712
|
+
footer: /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(J, {
|
|
712
713
|
variant: "outline",
|
|
713
714
|
size: "sm",
|
|
714
715
|
onClick: ie,
|
|
715
716
|
children: "Cancel"
|
|
716
|
-
}), /* @__PURE__ */
|
|
717
|
+
}), /* @__PURE__ */ K(J, {
|
|
717
718
|
size: "sm",
|
|
718
719
|
onClick: z,
|
|
719
720
|
disabled: c,
|
|
720
721
|
children: c ? "Creating…" : "Create course"
|
|
721
722
|
})] }),
|
|
722
723
|
children: [
|
|
723
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ K($, {
|
|
724
725
|
label: "Title",
|
|
725
726
|
required: !0,
|
|
726
|
-
children: /* @__PURE__ */
|
|
727
|
+
children: /* @__PURE__ */ K(Y, {
|
|
727
728
|
value: E,
|
|
728
729
|
onChange: (e) => D(e.target.value),
|
|
729
730
|
placeholder: "Intro to TypeScript"
|
|
730
731
|
})
|
|
731
732
|
}),
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
+
/* @__PURE__ */ K($, {
|
|
733
734
|
label: "Slug",
|
|
734
735
|
required: !0,
|
|
735
|
-
children: /* @__PURE__ */
|
|
736
|
+
children: /* @__PURE__ */ K(Y, {
|
|
736
737
|
value: O,
|
|
737
738
|
onChange: (e) => k(e.target.value),
|
|
738
739
|
placeholder: "auto from title if blank"
|
|
739
740
|
})
|
|
740
741
|
}),
|
|
741
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ K($, {
|
|
742
743
|
label: "Topic",
|
|
743
|
-
children: /* @__PURE__ */
|
|
744
|
+
children: /* @__PURE__ */ K(Y, {
|
|
744
745
|
value: ne,
|
|
745
|
-
onChange: (e) =>
|
|
746
|
+
onChange: (e) => re(e.target.value),
|
|
746
747
|
placeholder: "e.g. Web, AI, Data, Cloud"
|
|
747
748
|
})
|
|
748
749
|
}),
|
|
749
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ K($, {
|
|
750
751
|
label: "Level",
|
|
751
|
-
children: /* @__PURE__ */
|
|
752
|
-
value:
|
|
753
|
-
onValueChange: (e) =>
|
|
754
|
-
children: [/* @__PURE__ */
|
|
752
|
+
children: /* @__PURE__ */ q(De, {
|
|
753
|
+
value: M,
|
|
754
|
+
onValueChange: (e) => N(e),
|
|
755
|
+
children: [/* @__PURE__ */ K(Ae, { children: /* @__PURE__ */ K(je, {}) }), /* @__PURE__ */ K(Oe, { children: Re.map((e) => /* @__PURE__ */ K(ke, {
|
|
755
756
|
value: e,
|
|
756
757
|
children: u(e)
|
|
757
758
|
}, e)) })]
|
|
758
759
|
})
|
|
759
760
|
}),
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ K($, {
|
|
761
762
|
label: "Estimated minutes",
|
|
762
|
-
children: /* @__PURE__ */
|
|
763
|
+
children: /* @__PURE__ */ K(Y, {
|
|
763
764
|
type: "number",
|
|
764
765
|
min: 0,
|
|
765
|
-
value:
|
|
766
|
+
value: P,
|
|
766
767
|
onChange: (e) => F(e.target.value),
|
|
767
768
|
placeholder: "120"
|
|
768
769
|
})
|
|
769
770
|
}),
|
|
770
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ K($, {
|
|
771
772
|
label: "Tags",
|
|
772
|
-
children: /* @__PURE__ */
|
|
773
|
+
children: /* @__PURE__ */ K(h, {
|
|
773
774
|
value: I,
|
|
774
775
|
onChange: L,
|
|
775
776
|
placeholder: "typescript, basics"
|
|
776
777
|
})
|
|
777
778
|
}),
|
|
778
|
-
/* @__PURE__ */
|
|
779
|
+
/* @__PURE__ */ K($, {
|
|
779
780
|
label: "Summary",
|
|
780
781
|
className: "sm:col-span-2",
|
|
781
|
-
children: /* @__PURE__ */
|
|
782
|
+
children: /* @__PURE__ */ K(Z, {
|
|
782
783
|
value: A,
|
|
783
784
|
onChange: (e) => te(e.target.value),
|
|
784
785
|
placeholder: "What learners will build and take away."
|
|
@@ -786,55 +787,55 @@ function Xe() {
|
|
|
786
787
|
})
|
|
787
788
|
]
|
|
788
789
|
}) : null,
|
|
789
|
-
t && !R.length ? /* @__PURE__ */
|
|
790
|
+
t && !R.length ? /* @__PURE__ */ K(m, { count: 4 }) : n ? /* @__PURE__ */ K(p, {
|
|
790
791
|
title: "Couldn't load courses",
|
|
791
792
|
error: n
|
|
792
|
-
}) : R.length === 0 ? /* @__PURE__ */
|
|
793
|
-
icon: /* @__PURE__ */
|
|
793
|
+
}) : R.length === 0 ? /* @__PURE__ */ K(f, {
|
|
794
|
+
icon: /* @__PURE__ */ K(de, { size: 26 }),
|
|
794
795
|
title: "No courses yet",
|
|
795
796
|
description: "Create your first course with the button above. TechnoSpam is pre-launch."
|
|
796
|
-
}) : /* @__PURE__ */
|
|
797
|
+
}) : /* @__PURE__ */ K("div", {
|
|
797
798
|
className: "space-y-3",
|
|
798
|
-
children: R.map((e) => /* @__PURE__ */
|
|
799
|
-
leading: /* @__PURE__ */
|
|
799
|
+
children: R.map((e) => /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q(Ke, {
|
|
800
|
+
leading: /* @__PURE__ */ K(Ue, {
|
|
800
801
|
seed: `${e.topic ?? ""} ${e.title}`,
|
|
801
802
|
icon: i(e.topic ?? e.title)
|
|
802
803
|
}),
|
|
803
|
-
actions: /* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */ J
|
|
804
|
+
actions: /* @__PURE__ */ q(G, { children: [
|
|
805
|
+
/* @__PURE__ */ q(J, {
|
|
805
806
|
size: "sm",
|
|
806
807
|
variant: "outline",
|
|
807
808
|
onClick: () => ee(T === e.id ? null : e.id),
|
|
808
|
-
children: [/* @__PURE__ */
|
|
809
|
+
children: [/* @__PURE__ */ K(me, { size: 15 }), " Lessons"]
|
|
809
810
|
}),
|
|
810
|
-
e.status === "DRAFT" ? /* @__PURE__ */ J
|
|
811
|
+
e.status === "DRAFT" ? /* @__PURE__ */ q(J, {
|
|
811
812
|
size: "sm",
|
|
812
813
|
onClick: () => ae(e.id),
|
|
813
814
|
disabled: x === e.id,
|
|
814
|
-
children: [/* @__PURE__ */
|
|
815
|
+
children: [/* @__PURE__ */ K(be, { size: 15 }), " Publish"]
|
|
815
816
|
}) : null,
|
|
816
|
-
e.status === "ARCHIVED" ? null : /* @__PURE__ */ J
|
|
817
|
+
e.status === "ARCHIVED" ? null : /* @__PURE__ */ q(J, {
|
|
817
818
|
size: "sm",
|
|
818
819
|
variant: "outline",
|
|
819
820
|
onClick: () => oe(e.id, e.title),
|
|
820
821
|
disabled: x === e.id,
|
|
821
|
-
children: [/* @__PURE__ */
|
|
822
|
+
children: [/* @__PURE__ */ K(le, { size: 15 }), " Archive"]
|
|
822
823
|
})
|
|
823
824
|
] }),
|
|
824
|
-
children: [/* @__PURE__ */
|
|
825
|
+
children: [/* @__PURE__ */ q("div", {
|
|
825
826
|
className: "flex flex-wrap items-center gap-2",
|
|
826
827
|
children: [
|
|
827
|
-
/* @__PURE__ */
|
|
828
|
+
/* @__PURE__ */ K("span", {
|
|
828
829
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
829
830
|
children: e.title
|
|
830
831
|
}),
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
832
|
+
/* @__PURE__ */ K(d, { status: e.status }),
|
|
833
|
+
/* @__PURE__ */ K(d, {
|
|
833
834
|
status: e.level,
|
|
834
835
|
kind: "level"
|
|
835
836
|
})
|
|
836
837
|
]
|
|
837
|
-
}), /* @__PURE__ */
|
|
838
|
+
}), /* @__PURE__ */ q("div", {
|
|
838
839
|
className: "mt-1 truncate text-xs text-text-muted",
|
|
839
840
|
children: [
|
|
840
841
|
e.slug,
|
|
@@ -846,18 +847,18 @@ function Xe() {
|
|
|
846
847
|
a(e.updatedAt)
|
|
847
848
|
]
|
|
848
849
|
})]
|
|
849
|
-
}), T === e.id ? /* @__PURE__ */
|
|
850
|
+
}), T === e.id ? /* @__PURE__ */ K(Je, { courseId: e.id }) : null] }, e.id))
|
|
850
851
|
})
|
|
851
852
|
]
|
|
852
853
|
});
|
|
853
854
|
}
|
|
854
|
-
function
|
|
855
|
-
let { data: e, loading: t, error: n, refetch: r } = ne({}), [a, { loading: o }] = ee(), [s] =
|
|
856
|
-
x(""), C(""), T(""), D(""), k("EASY"), te(""),
|
|
855
|
+
function $e() {
|
|
856
|
+
let { data: e, loading: t, error: n, refetch: r } = ne({}), [a, { loading: o }] = ee(), [s] = re(), [c, l] = V(!1), [h, g] = V(null), [_, y] = V(null), [b, x] = V(""), [S, C] = V(""), [w, T] = V(""), [E, D] = V(""), [O, k] = V("EASY"), [A, te] = V(""), [j, M] = V(""), [N, P] = V(""), F = e?.tecListProblems?.items ?? [], I = () => {
|
|
857
|
+
x(""), C(""), T(""), D(""), k("EASY"), te(""), M(""), P(""), l(!1);
|
|
857
858
|
}, L = async () => {
|
|
858
859
|
let e = b.trim();
|
|
859
860
|
if (!e) return v.error("Title is required");
|
|
860
|
-
let t =
|
|
861
|
+
let t = Be(S || e);
|
|
861
862
|
if (!t) return v.error("A valid slug is required");
|
|
862
863
|
(await a({ variables: { input: {
|
|
863
864
|
title: e,
|
|
@@ -866,8 +867,8 @@ function Ze() {
|
|
|
866
867
|
topic: E.trim() || void 0,
|
|
867
868
|
difficulty: O,
|
|
868
869
|
points: Q(A),
|
|
869
|
-
languages:
|
|
870
|
-
starterCode:
|
|
870
|
+
languages: Ve(j),
|
|
871
|
+
starterCode: N.trim() || void 0
|
|
871
872
|
} } })).data?.tecCreateProblem && (v.success("Problem created", `"${e}" saved as a draft.`), I(), await r());
|
|
872
873
|
}, R = async (e) => {
|
|
873
874
|
g(e);
|
|
@@ -877,71 +878,71 @@ function Ze() {
|
|
|
877
878
|
g(null);
|
|
878
879
|
}
|
|
879
880
|
};
|
|
880
|
-
return /* @__PURE__ */
|
|
881
|
+
return /* @__PURE__ */ q("div", {
|
|
881
882
|
className: "space-y-4",
|
|
882
883
|
children: [
|
|
883
|
-
/* @__PURE__ */
|
|
884
|
+
/* @__PURE__ */ K(Ge, {
|
|
884
885
|
summary: `${F.length} problem${F.length === 1 ? "" : "s"}`,
|
|
885
886
|
actionLabel: "New problem",
|
|
886
887
|
open: c,
|
|
887
888
|
onToggle: () => l((e) => !e)
|
|
888
889
|
}),
|
|
889
|
-
c ? /* @__PURE__ */
|
|
890
|
+
c ? /* @__PURE__ */ q(We, {
|
|
890
891
|
title: "New problem",
|
|
891
892
|
description: "Define a coding challenge learners can solve and submit.",
|
|
892
|
-
icon:
|
|
893
|
-
footer: /* @__PURE__ */
|
|
893
|
+
icon: H,
|
|
894
|
+
footer: /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(J, {
|
|
894
895
|
variant: "outline",
|
|
895
896
|
size: "sm",
|
|
896
897
|
onClick: I,
|
|
897
898
|
children: "Cancel"
|
|
898
|
-
}), /* @__PURE__ */
|
|
899
|
+
}), /* @__PURE__ */ K(J, {
|
|
899
900
|
size: "sm",
|
|
900
901
|
onClick: L,
|
|
901
902
|
disabled: o,
|
|
902
903
|
children: o ? "Creating…" : "Create problem"
|
|
903
904
|
})] }),
|
|
904
905
|
children: [
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
+
/* @__PURE__ */ K($, {
|
|
906
907
|
label: "Title",
|
|
907
908
|
required: !0,
|
|
908
|
-
children: /* @__PURE__ */
|
|
909
|
+
children: /* @__PURE__ */ K(Y, {
|
|
909
910
|
value: b,
|
|
910
911
|
onChange: (e) => x(e.target.value),
|
|
911
912
|
placeholder: "Two Sum"
|
|
912
913
|
})
|
|
913
914
|
}),
|
|
914
|
-
/* @__PURE__ */
|
|
915
|
+
/* @__PURE__ */ K($, {
|
|
915
916
|
label: "Slug",
|
|
916
917
|
required: !0,
|
|
917
|
-
children: /* @__PURE__ */
|
|
918
|
+
children: /* @__PURE__ */ K(Y, {
|
|
918
919
|
value: S,
|
|
919
920
|
onChange: (e) => C(e.target.value),
|
|
920
921
|
placeholder: "auto from title if blank"
|
|
921
922
|
})
|
|
922
923
|
}),
|
|
923
|
-
/* @__PURE__ */
|
|
924
|
+
/* @__PURE__ */ K($, {
|
|
924
925
|
label: "Topic",
|
|
925
|
-
children: /* @__PURE__ */
|
|
926
|
+
children: /* @__PURE__ */ K(Y, {
|
|
926
927
|
value: E,
|
|
927
928
|
onChange: (e) => D(e.target.value),
|
|
928
929
|
placeholder: "Arrays"
|
|
929
930
|
})
|
|
930
931
|
}),
|
|
931
|
-
/* @__PURE__ */
|
|
932
|
+
/* @__PURE__ */ K($, {
|
|
932
933
|
label: "Difficulty",
|
|
933
|
-
children: /* @__PURE__ */
|
|
934
|
+
children: /* @__PURE__ */ q(De, {
|
|
934
935
|
value: O,
|
|
935
936
|
onValueChange: (e) => k(e),
|
|
936
|
-
children: [/* @__PURE__ */
|
|
937
|
+
children: [/* @__PURE__ */ K(Ae, { children: /* @__PURE__ */ K(je, {}) }), /* @__PURE__ */ K(Oe, { children: ze.map((e) => /* @__PURE__ */ K(ke, {
|
|
937
938
|
value: e,
|
|
938
939
|
children: u(e)
|
|
939
940
|
}, e)) })]
|
|
940
941
|
})
|
|
941
942
|
}),
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
+
/* @__PURE__ */ K($, {
|
|
943
944
|
label: "Points",
|
|
944
|
-
children: /* @__PURE__ */
|
|
945
|
+
children: /* @__PURE__ */ K(Y, {
|
|
945
946
|
type: "number",
|
|
946
947
|
min: 0,
|
|
947
948
|
value: A,
|
|
@@ -949,74 +950,74 @@ function Ze() {
|
|
|
949
950
|
placeholder: "100"
|
|
950
951
|
})
|
|
951
952
|
}),
|
|
952
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ K($, {
|
|
953
954
|
label: "Languages (comma-separated)",
|
|
954
|
-
children: /* @__PURE__ */
|
|
955
|
+
children: /* @__PURE__ */ K(Y, {
|
|
955
956
|
value: j,
|
|
956
|
-
onChange: (e) =>
|
|
957
|
+
onChange: (e) => M(e.target.value),
|
|
957
958
|
placeholder: "python, typescript"
|
|
958
959
|
})
|
|
959
960
|
}),
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ K($, {
|
|
961
962
|
label: "Statement",
|
|
962
963
|
className: "sm:col-span-2",
|
|
963
|
-
children: /* @__PURE__ */
|
|
964
|
+
children: /* @__PURE__ */ K(Z, {
|
|
964
965
|
value: w,
|
|
965
966
|
onChange: (e) => T(e.target.value),
|
|
966
967
|
placeholder: "Describe the problem and constraints."
|
|
967
968
|
})
|
|
968
969
|
}),
|
|
969
|
-
/* @__PURE__ */
|
|
970
|
+
/* @__PURE__ */ K($, {
|
|
970
971
|
label: "Starter code",
|
|
971
972
|
className: "sm:col-span-2",
|
|
972
|
-
children: /* @__PURE__ */
|
|
973
|
-
value:
|
|
974
|
-
onChange: (e) =>
|
|
973
|
+
children: /* @__PURE__ */ K(Z, {
|
|
974
|
+
value: N,
|
|
975
|
+
onChange: (e) => P(e.target.value),
|
|
975
976
|
className: "font-mono",
|
|
976
977
|
placeholder: "def solve(nums, target):\\n pass"
|
|
977
978
|
})
|
|
978
979
|
})
|
|
979
980
|
]
|
|
980
981
|
}) : null,
|
|
981
|
-
t && !F.length ? /* @__PURE__ */
|
|
982
|
+
t && !F.length ? /* @__PURE__ */ K(m, { count: 4 }) : n ? /* @__PURE__ */ K(p, {
|
|
982
983
|
title: "Couldn't load problems",
|
|
983
984
|
error: n
|
|
984
|
-
}) : F.length === 0 ? /* @__PURE__ */
|
|
985
|
-
icon: /* @__PURE__ */
|
|
985
|
+
}) : F.length === 0 ? /* @__PURE__ */ K(f, {
|
|
986
|
+
icon: /* @__PURE__ */ K(H, { size: 26 }),
|
|
986
987
|
title: "No problems yet",
|
|
987
988
|
description: "Create your first coding problem with the button above. TechnoSpam is pre-launch."
|
|
988
|
-
}) : /* @__PURE__ */
|
|
989
|
+
}) : /* @__PURE__ */ K("div", {
|
|
989
990
|
className: "space-y-3",
|
|
990
|
-
children: F.map((e) => /* @__PURE__ */
|
|
991
|
-
leading: /* @__PURE__ */
|
|
991
|
+
children: F.map((e) => /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q(Ke, {
|
|
992
|
+
leading: /* @__PURE__ */ K(Ue, {
|
|
992
993
|
seed: `${e.topic ?? ""} ${e.title}`,
|
|
993
994
|
icon: i(e.topic ?? e.title)
|
|
994
995
|
}),
|
|
995
|
-
actions: /* @__PURE__ */
|
|
996
|
+
actions: /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ q(J, {
|
|
996
997
|
size: "sm",
|
|
997
998
|
variant: "outline",
|
|
998
999
|
onClick: () => y(_ === e.id ? null : e.id),
|
|
999
|
-
children: [/* @__PURE__ */
|
|
1000
|
-
}), e.status === "DRAFT" ? /* @__PURE__ */ J
|
|
1000
|
+
children: [/* @__PURE__ */ K(pe, { size: 15 }), " Grade"]
|
|
1001
|
+
}), e.status === "DRAFT" ? /* @__PURE__ */ q(J, {
|
|
1001
1002
|
size: "sm",
|
|
1002
1003
|
onClick: () => R(e.id),
|
|
1003
1004
|
disabled: h === e.id,
|
|
1004
|
-
children: [/* @__PURE__ */
|
|
1005
|
+
children: [/* @__PURE__ */ K(be, { size: 15 }), " Publish"]
|
|
1005
1006
|
}) : null] }),
|
|
1006
|
-
children: [/* @__PURE__ */
|
|
1007
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1007
1008
|
className: "flex flex-wrap items-center gap-2",
|
|
1008
1009
|
children: [
|
|
1009
|
-
/* @__PURE__ */
|
|
1010
|
+
/* @__PURE__ */ K("span", {
|
|
1010
1011
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
1011
1012
|
children: e.title
|
|
1012
1013
|
}),
|
|
1013
|
-
/* @__PURE__ */
|
|
1014
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ K(d, { status: e.status }),
|
|
1015
|
+
/* @__PURE__ */ K(d, {
|
|
1015
1016
|
status: e.difficulty,
|
|
1016
1017
|
kind: "level"
|
|
1017
1018
|
})
|
|
1018
1019
|
]
|
|
1019
|
-
}), /* @__PURE__ */
|
|
1020
|
+
}), /* @__PURE__ */ q("div", {
|
|
1020
1021
|
className: "mt-1 truncate text-xs text-text-muted",
|
|
1021
1022
|
children: [
|
|
1022
1023
|
e.slug,
|
|
@@ -1029,41 +1030,41 @@ function Ze() {
|
|
|
1029
1030
|
e.languages.length ? e.languages.join(", ") : "No languages"
|
|
1030
1031
|
]
|
|
1031
1032
|
})]
|
|
1032
|
-
}), _ === e.id ? /* @__PURE__ */
|
|
1033
|
+
}), _ === e.id ? /* @__PURE__ */ K(Xe, { problemId: e.id }) : null] }, e.id))
|
|
1033
1034
|
})
|
|
1034
1035
|
]
|
|
1035
1036
|
});
|
|
1036
1037
|
}
|
|
1037
|
-
function
|
|
1038
|
-
let { data: e, loading: t, error: n, refetch: r } = D({}), [a, { loading: s }] = w(), [l] = te(), [u] =
|
|
1039
|
-
O(""), A(""), j(""),
|
|
1040
|
-
},
|
|
1038
|
+
function et() {
|
|
1039
|
+
let { data: e, loading: t, error: n, refetch: r } = D({}), [a, { loading: s }] = w(), [l] = te(), [u] = P(), [g] = F(), [_] = x(), [y, b] = V(!1), [S, C] = V(null), [T, ee] = V(null), [E, O] = V(""), [k, A] = V(""), [ne, j] = V(""), [re, M] = V(""), [N, I] = V(""), [L, R] = V(""), [ie, z] = V(""), [ae, oe] = V(""), [se, ce] = V([]), B = e?.tecListHackathons?.items ?? [], le = () => {
|
|
1040
|
+
O(""), A(""), j(""), M(""), I(""), R(""), z(""), oe(""), ce([]), b(!1);
|
|
1041
|
+
}, de = async () => {
|
|
1041
1042
|
let e = E.trim();
|
|
1042
1043
|
if (!e) return v.error("Title is required");
|
|
1043
|
-
let t =
|
|
1044
|
+
let t = Be(k || e);
|
|
1044
1045
|
if (!t) return v.error("A valid slug is required");
|
|
1045
|
-
let n =
|
|
1046
|
+
let n = He(N), i = He(L);
|
|
1046
1047
|
if (!n || !i) return v.error("Start and end date/time are required");
|
|
1047
1048
|
if (new Date(i) <= new Date(n)) return v.error("End must be after the start");
|
|
1048
1049
|
(await a({ variables: { input: {
|
|
1049
1050
|
title: e,
|
|
1050
1051
|
slug: t,
|
|
1051
1052
|
theme: ne.trim() || void 0,
|
|
1052
|
-
description:
|
|
1053
|
+
description: re.trim() || void 0,
|
|
1053
1054
|
startAt: n,
|
|
1054
1055
|
endAt: i,
|
|
1055
1056
|
prizePool: Q(ie),
|
|
1056
1057
|
maxTeamSize: Q(ae),
|
|
1057
1058
|
tags: se
|
|
1058
|
-
} } })).data?.tecCreateHackathon && (v.success("Hackathon created", `"${e}" saved as a draft.`),
|
|
1059
|
-
},
|
|
1059
|
+
} } })).data?.tecCreateHackathon && (v.success("Hackathon created", `"${e}" saved as a draft.`), le(), await r());
|
|
1060
|
+
}, H = async (e) => {
|
|
1060
1061
|
C(e);
|
|
1061
1062
|
try {
|
|
1062
1063
|
(await l({ variables: { id: e } })).data?.tecOpenRegistration && (v.success("Registration open", "Teams can now register."), await r());
|
|
1063
1064
|
} finally {
|
|
1064
1065
|
C(null);
|
|
1065
1066
|
}
|
|
1066
|
-
},
|
|
1067
|
+
}, fe = async (e, t, n) => {
|
|
1067
1068
|
C(e);
|
|
1068
1069
|
try {
|
|
1069
1070
|
(await t({ variables: { id: e } })).data && (v.success(n), await r());
|
|
@@ -1071,86 +1072,86 @@ function Qe() {
|
|
|
1071
1072
|
C(null);
|
|
1072
1073
|
}
|
|
1073
1074
|
};
|
|
1074
|
-
return /* @__PURE__ */
|
|
1075
|
+
return /* @__PURE__ */ q("div", {
|
|
1075
1076
|
className: "space-y-4",
|
|
1076
1077
|
children: [
|
|
1077
|
-
/* @__PURE__ */
|
|
1078
|
-
summary: `${
|
|
1078
|
+
/* @__PURE__ */ K(Ge, {
|
|
1079
|
+
summary: `${B.length} hackathon${B.length === 1 ? "" : "s"}`,
|
|
1079
1080
|
actionLabel: "New hackathon",
|
|
1080
1081
|
open: y,
|
|
1081
1082
|
onToggle: () => b((e) => !e)
|
|
1082
1083
|
}),
|
|
1083
|
-
y ? /* @__PURE__ */
|
|
1084
|
+
y ? /* @__PURE__ */ q(We, {
|
|
1084
1085
|
title: "New hackathon",
|
|
1085
1086
|
description: "Set up an event, open registration, then run judging to completion.",
|
|
1086
|
-
icon:
|
|
1087
|
-
footer: /* @__PURE__ */
|
|
1087
|
+
icon: U,
|
|
1088
|
+
footer: /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(J, {
|
|
1088
1089
|
variant: "outline",
|
|
1089
1090
|
size: "sm",
|
|
1090
|
-
onClick:
|
|
1091
|
+
onClick: le,
|
|
1091
1092
|
children: "Cancel"
|
|
1092
|
-
}), /* @__PURE__ */
|
|
1093
|
+
}), /* @__PURE__ */ K(J, {
|
|
1093
1094
|
size: "sm",
|
|
1094
|
-
onClick:
|
|
1095
|
+
onClick: de,
|
|
1095
1096
|
disabled: s,
|
|
1096
1097
|
children: s ? "Creating…" : "Create hackathon"
|
|
1097
1098
|
})] }),
|
|
1098
1099
|
children: [
|
|
1099
|
-
/* @__PURE__ */
|
|
1100
|
+
/* @__PURE__ */ K($, {
|
|
1100
1101
|
label: "Title",
|
|
1101
1102
|
required: !0,
|
|
1102
|
-
children: /* @__PURE__ */
|
|
1103
|
+
children: /* @__PURE__ */ K(Y, {
|
|
1103
1104
|
value: E,
|
|
1104
1105
|
onChange: (e) => O(e.target.value),
|
|
1105
1106
|
placeholder: "Build Days 2026"
|
|
1106
1107
|
})
|
|
1107
1108
|
}),
|
|
1108
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ K($, {
|
|
1109
1110
|
label: "Slug",
|
|
1110
1111
|
required: !0,
|
|
1111
|
-
children: /* @__PURE__ */
|
|
1112
|
+
children: /* @__PURE__ */ K(Y, {
|
|
1112
1113
|
value: k,
|
|
1113
1114
|
onChange: (e) => A(e.target.value),
|
|
1114
1115
|
placeholder: "auto from title if blank"
|
|
1115
1116
|
})
|
|
1116
1117
|
}),
|
|
1117
|
-
/* @__PURE__ */
|
|
1118
|
+
/* @__PURE__ */ K($, {
|
|
1118
1119
|
label: "Theme",
|
|
1119
|
-
children: /* @__PURE__ */
|
|
1120
|
+
children: /* @__PURE__ */ K(Y, {
|
|
1120
1121
|
value: ne,
|
|
1121
1122
|
onChange: (e) => j(e.target.value),
|
|
1122
1123
|
placeholder: "AI for good"
|
|
1123
1124
|
})
|
|
1124
1125
|
}),
|
|
1125
|
-
/* @__PURE__ */
|
|
1126
|
+
/* @__PURE__ */ K($, {
|
|
1126
1127
|
label: "Tags",
|
|
1127
|
-
children: /* @__PURE__ */
|
|
1128
|
+
children: /* @__PURE__ */ K(h, {
|
|
1128
1129
|
value: se,
|
|
1129
1130
|
onChange: ce,
|
|
1130
1131
|
placeholder: "ai, web"
|
|
1131
1132
|
})
|
|
1132
1133
|
}),
|
|
1133
|
-
/* @__PURE__ */
|
|
1134
|
+
/* @__PURE__ */ K($, {
|
|
1134
1135
|
label: "Starts",
|
|
1135
1136
|
required: !0,
|
|
1136
|
-
children: /* @__PURE__ */
|
|
1137
|
+
children: /* @__PURE__ */ K(Y, {
|
|
1137
1138
|
type: "datetime-local",
|
|
1138
|
-
value:
|
|
1139
|
+
value: N,
|
|
1139
1140
|
onChange: (e) => I(e.target.value)
|
|
1140
1141
|
})
|
|
1141
1142
|
}),
|
|
1142
|
-
/* @__PURE__ */
|
|
1143
|
+
/* @__PURE__ */ K($, {
|
|
1143
1144
|
label: "Ends",
|
|
1144
1145
|
required: !0,
|
|
1145
|
-
children: /* @__PURE__ */
|
|
1146
|
+
children: /* @__PURE__ */ K(Y, {
|
|
1146
1147
|
type: "datetime-local",
|
|
1147
1148
|
value: L,
|
|
1148
1149
|
onChange: (e) => R(e.target.value)
|
|
1149
1150
|
})
|
|
1150
1151
|
}),
|
|
1151
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ K($, {
|
|
1152
1153
|
label: "Prize pool",
|
|
1153
|
-
children: /* @__PURE__ */
|
|
1154
|
+
children: /* @__PURE__ */ K(Y, {
|
|
1154
1155
|
type: "number",
|
|
1155
1156
|
min: 0,
|
|
1156
1157
|
value: ie,
|
|
@@ -1158,9 +1159,9 @@ function Qe() {
|
|
|
1158
1159
|
placeholder: "5000"
|
|
1159
1160
|
})
|
|
1160
1161
|
}),
|
|
1161
|
-
/* @__PURE__ */
|
|
1162
|
+
/* @__PURE__ */ K($, {
|
|
1162
1163
|
label: "Max team size",
|
|
1163
|
-
children: /* @__PURE__ */
|
|
1164
|
+
children: /* @__PURE__ */ K(Y, {
|
|
1164
1165
|
type: "number",
|
|
1165
1166
|
min: 1,
|
|
1166
1167
|
value: ae,
|
|
@@ -1168,70 +1169,70 @@ function Qe() {
|
|
|
1168
1169
|
placeholder: "4"
|
|
1169
1170
|
})
|
|
1170
1171
|
}),
|
|
1171
|
-
/* @__PURE__ */
|
|
1172
|
+
/* @__PURE__ */ K($, {
|
|
1172
1173
|
label: "Description",
|
|
1173
1174
|
className: "sm:col-span-2",
|
|
1174
|
-
children: /* @__PURE__ */
|
|
1175
|
-
value:
|
|
1176
|
-
onChange: (e) =>
|
|
1175
|
+
children: /* @__PURE__ */ K(Z, {
|
|
1176
|
+
value: re,
|
|
1177
|
+
onChange: (e) => M(e.target.value),
|
|
1177
1178
|
placeholder: "What the hackathon is about and how judging works."
|
|
1178
1179
|
})
|
|
1179
1180
|
})
|
|
1180
1181
|
]
|
|
1181
1182
|
}) : null,
|
|
1182
|
-
t && !
|
|
1183
|
+
t && !B.length ? /* @__PURE__ */ K(m, { count: 4 }) : n ? /* @__PURE__ */ K(p, {
|
|
1183
1184
|
title: "Couldn't load hackathons",
|
|
1184
1185
|
error: n
|
|
1185
|
-
}) :
|
|
1186
|
-
icon: /* @__PURE__ */
|
|
1186
|
+
}) : B.length === 0 ? /* @__PURE__ */ K(f, {
|
|
1187
|
+
icon: /* @__PURE__ */ K(U, { size: 26 }),
|
|
1187
1188
|
title: "No hackathons yet",
|
|
1188
1189
|
description: "Create your first hackathon with the button above. TechnoSpam is pre-launch."
|
|
1189
|
-
}) : /* @__PURE__ */
|
|
1190
|
+
}) : /* @__PURE__ */ K("div", {
|
|
1190
1191
|
className: "space-y-3",
|
|
1191
|
-
children:
|
|
1192
|
-
leading: /* @__PURE__ */
|
|
1192
|
+
children: B.map((e) => /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q(Ke, {
|
|
1193
|
+
leading: /* @__PURE__ */ K(Ue, {
|
|
1193
1194
|
seed: e.title,
|
|
1194
|
-
icon: i(e.title,
|
|
1195
|
+
icon: i(e.title, U)
|
|
1195
1196
|
}),
|
|
1196
|
-
actions: /* @__PURE__ */
|
|
1197
|
-
/* @__PURE__ */ J
|
|
1197
|
+
actions: /* @__PURE__ */ q(G, { children: [
|
|
1198
|
+
/* @__PURE__ */ q(J, {
|
|
1198
1199
|
size: "sm",
|
|
1199
1200
|
variant: "outline",
|
|
1200
1201
|
onClick: () => ee(T === e.id ? null : e.id),
|
|
1201
|
-
children: [/* @__PURE__ */
|
|
1202
|
+
children: [/* @__PURE__ */ K(W, { size: 15 }), " Teams"]
|
|
1202
1203
|
}),
|
|
1203
|
-
e.status === "DRAFT" ? /* @__PURE__ */ J
|
|
1204
|
+
e.status === "DRAFT" ? /* @__PURE__ */ q(J, {
|
|
1204
1205
|
size: "sm",
|
|
1205
|
-
onClick: () =>
|
|
1206
|
+
onClick: () => H(e.id),
|
|
1206
1207
|
disabled: S === e.id,
|
|
1207
|
-
children: [/* @__PURE__ */
|
|
1208
|
+
children: [/* @__PURE__ */ K(be, { size: 15 }), " Open registration"]
|
|
1208
1209
|
}) : null,
|
|
1209
|
-
e.status === "REGISTRATION_OPEN" ? /* @__PURE__ */ J
|
|
1210
|
+
e.status === "REGISTRATION_OPEN" ? /* @__PURE__ */ q(J, {
|
|
1210
1211
|
size: "sm",
|
|
1211
|
-
onClick: () =>
|
|
1212
|
+
onClick: () => fe(e.id, u, "Hackathon started"),
|
|
1212
1213
|
disabled: S === e.id,
|
|
1213
|
-
children: [/* @__PURE__ */
|
|
1214
|
+
children: [/* @__PURE__ */ K(ge, { size: 15 }), " Start"]
|
|
1214
1215
|
}) : null,
|
|
1215
|
-
e.status === "IN_PROGRESS" ? /* @__PURE__ */ J
|
|
1216
|
+
e.status === "IN_PROGRESS" ? /* @__PURE__ */ q(J, {
|
|
1216
1217
|
size: "sm",
|
|
1217
|
-
onClick: () =>
|
|
1218
|
+
onClick: () => fe(e.id, g, "Judging started"),
|
|
1218
1219
|
disabled: S === e.id,
|
|
1219
|
-
children: [/* @__PURE__ */
|
|
1220
|
+
children: [/* @__PURE__ */ K(pe, { size: 15 }), " Start judging"]
|
|
1220
1221
|
}) : null,
|
|
1221
|
-
e.status === "JUDGING" ? /* @__PURE__ */ J
|
|
1222
|
+
e.status === "JUDGING" ? /* @__PURE__ */ q(J, {
|
|
1222
1223
|
size: "sm",
|
|
1223
|
-
onClick: () =>
|
|
1224
|
+
onClick: () => fe(e.id, _, "Hackathon completed"),
|
|
1224
1225
|
disabled: S === e.id,
|
|
1225
|
-
children: [/* @__PURE__ */
|
|
1226
|
+
children: [/* @__PURE__ */ K(ue, { size: 15 }), " Complete"]
|
|
1226
1227
|
}) : null
|
|
1227
1228
|
] }),
|
|
1228
|
-
children: [/* @__PURE__ */
|
|
1229
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1229
1230
|
className: "flex flex-wrap items-center gap-2",
|
|
1230
|
-
children: [/* @__PURE__ */
|
|
1231
|
+
children: [/* @__PURE__ */ K("span", {
|
|
1231
1232
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
1232
1233
|
children: e.title
|
|
1233
|
-
}), /* @__PURE__ */
|
|
1234
|
-
}), /* @__PURE__ */
|
|
1234
|
+
}), /* @__PURE__ */ K(d, { status: e.status })]
|
|
1235
|
+
}), /* @__PURE__ */ q("div", {
|
|
1235
1236
|
className: "mt-1 truncate text-xs text-text-muted",
|
|
1236
1237
|
children: [
|
|
1237
1238
|
e.slug,
|
|
@@ -1242,13 +1243,13 @@ function Qe() {
|
|
|
1242
1243
|
e.prizePool ? ` · ${c(e.prizePool, e.currency)} prize` : ""
|
|
1243
1244
|
]
|
|
1244
1245
|
})]
|
|
1245
|
-
}), T === e.id ? /* @__PURE__ */
|
|
1246
|
+
}), T === e.id ? /* @__PURE__ */ K(Ze, { hackathon: e }) : null] }, e.id))
|
|
1246
1247
|
})
|
|
1247
1248
|
]
|
|
1248
1249
|
});
|
|
1249
1250
|
}
|
|
1250
|
-
function
|
|
1251
|
-
let { data: e, loading: t, error: n, refetch: r } = A({}), [a] = y(), [o, s] =
|
|
1251
|
+
function tt() {
|
|
1252
|
+
let { data: e, loading: t, error: n, refetch: r } = A({}), [a] = y(), [o, s] = V(null), c = e?.tecListMentors?.items ?? [], u = c.filter((e) => e.status === "PENDING").length, h = async (e) => {
|
|
1252
1253
|
s(e);
|
|
1253
1254
|
try {
|
|
1254
1255
|
(await a({ variables: { id: e } })).data?.tecApproveMentor && (v.success("Mentor approved", "They can now accept mentees."), await r());
|
|
@@ -1256,43 +1257,43 @@ function $e() {
|
|
|
1256
1257
|
s(null);
|
|
1257
1258
|
}
|
|
1258
1259
|
};
|
|
1259
|
-
return /* @__PURE__ */
|
|
1260
|
+
return /* @__PURE__ */ q("div", {
|
|
1260
1261
|
className: "space-y-4",
|
|
1261
|
-
children: [/* @__PURE__ */
|
|
1262
|
+
children: [/* @__PURE__ */ K(Ge, { summary: `${c.length} mentor${c.length === 1 ? "" : "s"}${u ? ` · ${u} pending approval` : ""}` }), t && !c.length ? /* @__PURE__ */ K(m, { count: 4 }) : n ? /* @__PURE__ */ K(p, {
|
|
1262
1263
|
title: "Couldn't load mentors",
|
|
1263
1264
|
error: n
|
|
1264
|
-
}) : c.length === 0 ? /* @__PURE__ */
|
|
1265
|
-
icon: /* @__PURE__ */
|
|
1265
|
+
}) : c.length === 0 ? /* @__PURE__ */ K(f, {
|
|
1266
|
+
icon: /* @__PURE__ */ K(W, { size: 26 }),
|
|
1266
1267
|
title: "No mentors yet",
|
|
1267
1268
|
description: "Mentor applications will appear here for review. TechnoSpam is pre-launch."
|
|
1268
|
-
}) : /* @__PURE__ */
|
|
1269
|
+
}) : /* @__PURE__ */ K("div", {
|
|
1269
1270
|
className: "space-y-3",
|
|
1270
|
-
children: c.map((e) => /* @__PURE__ */
|
|
1271
|
-
leading: /* @__PURE__ */
|
|
1271
|
+
children: c.map((e) => /* @__PURE__ */ q(Ke, {
|
|
1272
|
+
leading: /* @__PURE__ */ K(Ue, {
|
|
1272
1273
|
seed: e.headline,
|
|
1273
|
-
icon: i(e.expertise[0] ?? e.headline,
|
|
1274
|
+
icon: i(e.expertise[0] ?? e.headline, W)
|
|
1274
1275
|
}),
|
|
1275
|
-
actions: e.status === "PENDING" ? /* @__PURE__ */ J
|
|
1276
|
+
actions: e.status === "PENDING" ? /* @__PURE__ */ q(J, {
|
|
1276
1277
|
size: "sm",
|
|
1277
1278
|
onClick: () => h(e.id),
|
|
1278
1279
|
disabled: o === e.id,
|
|
1279
|
-
children: [/* @__PURE__ */
|
|
1280
|
+
children: [/* @__PURE__ */ K(Ce, { size: 15 }), " Approve"]
|
|
1280
1281
|
}) : void 0,
|
|
1281
|
-
children: [/* @__PURE__ */
|
|
1282
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1282
1283
|
className: "flex flex-wrap items-center gap-2",
|
|
1283
1284
|
children: [
|
|
1284
|
-
/* @__PURE__ */
|
|
1285
|
+
/* @__PURE__ */ K("span", {
|
|
1285
1286
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
1286
1287
|
children: e.headline
|
|
1287
1288
|
}),
|
|
1288
|
-
/* @__PURE__ */
|
|
1289
|
-
e.isAcceptingMentees ? /* @__PURE__ */
|
|
1289
|
+
/* @__PURE__ */ K(d, { status: e.status }),
|
|
1290
|
+
e.isAcceptingMentees ? /* @__PURE__ */ K(Te, {
|
|
1290
1291
|
variant: "secondary",
|
|
1291
1292
|
className: "text-[11px]",
|
|
1292
1293
|
children: "Accepting mentees"
|
|
1293
1294
|
}) : null
|
|
1294
1295
|
]
|
|
1295
|
-
}), /* @__PURE__ */
|
|
1296
|
+
}), /* @__PURE__ */ q("div", {
|
|
1296
1297
|
className: "mt-1 truncate text-xs text-text-muted",
|
|
1297
1298
|
children: [
|
|
1298
1299
|
e.expertise.length ? e.expertise.slice(0, 4).join(", ") : "No expertise listed",
|
|
@@ -1309,21 +1310,21 @@ function $e() {
|
|
|
1309
1310
|
})]
|
|
1310
1311
|
});
|
|
1311
1312
|
}
|
|
1312
|
-
function
|
|
1313
|
-
let [t, r] =
|
|
1314
|
-
return /* @__PURE__ */
|
|
1313
|
+
function nt() {
|
|
1314
|
+
let [t, r] = V("courses"), { currentUser: i } = e(), a = (i?.role ?? "").toLowerCase();
|
|
1315
|
+
return /* @__PURE__ */ q(n, {
|
|
1315
1316
|
hero: !0,
|
|
1316
1317
|
title: "Authoring Console",
|
|
1317
|
-
description: "Create and manage TechnoSpam content — courses, problems, hackathons, mentor applications — and enterprise integrations.",
|
|
1318
|
-
children: [a.includes("admin") || a.includes("owner") || a.includes("instructor") ? null : /* @__PURE__ */
|
|
1318
|
+
description: "Create and manage TechnoSpam content — courses, certification assessments, problems, hackathons, mentor applications — and enterprise integrations.",
|
|
1319
|
+
children: [a.includes("admin") || a.includes("owner") || a.includes("instructor") ? null : /* @__PURE__ */ q(Ee, {
|
|
1319
1320
|
className: "mb-5 flex items-start gap-3 border-status-warning-border p-4",
|
|
1320
|
-
children: [/* @__PURE__ */
|
|
1321
|
+
children: [/* @__PURE__ */ K(xe, {
|
|
1321
1322
|
size: 18,
|
|
1322
1323
|
className: "mt-0.5 shrink-0 text-status-warning-text"
|
|
1323
|
-
}), /* @__PURE__ */
|
|
1324
|
+
}), /* @__PURE__ */ q("div", {
|
|
1324
1325
|
className: "text-sm text-text-secondary",
|
|
1325
1326
|
children: [
|
|
1326
|
-
/* @__PURE__ */
|
|
1327
|
+
/* @__PURE__ */ K("span", {
|
|
1327
1328
|
className: "font-medium text-text-primary",
|
|
1328
1329
|
children: "Authoring is limited to workspace admins."
|
|
1329
1330
|
}),
|
|
@@ -1331,43 +1332,47 @@ function et() {
|
|
|
1331
1332
|
"You can review content here, but create/publish actions require the right permission and will be rejected at the gateway otherwise."
|
|
1332
1333
|
]
|
|
1333
1334
|
})]
|
|
1334
|
-
}), /* @__PURE__ */
|
|
1335
|
+
}), /* @__PURE__ */ q(Me, {
|
|
1335
1336
|
className: "gap-0",
|
|
1336
1337
|
value: t,
|
|
1337
1338
|
onValueChange: (e) => r(e),
|
|
1338
|
-
children: [/* @__PURE__ */
|
|
1339
|
+
children: [/* @__PURE__ */ q(Pe, {
|
|
1339
1340
|
className: "mb-5",
|
|
1340
1341
|
children: [
|
|
1341
|
-
/* @__PURE__ */
|
|
1342
|
+
/* @__PURE__ */ q(X, {
|
|
1342
1343
|
value: "courses",
|
|
1343
|
-
children: [/* @__PURE__ */
|
|
1344
|
+
children: [/* @__PURE__ */ K(de, { size: 15 }), " Courses"]
|
|
1345
|
+
}),
|
|
1346
|
+
/* @__PURE__ */ q(X, {
|
|
1347
|
+
value: "assessments",
|
|
1348
|
+
children: [/* @__PURE__ */ K(Se, { size: 15 }), " Assessments"]
|
|
1344
1349
|
}),
|
|
1345
|
-
/* @__PURE__ */
|
|
1350
|
+
/* @__PURE__ */ q(X, {
|
|
1346
1351
|
value: "problems",
|
|
1347
|
-
children: [/* @__PURE__ */
|
|
1352
|
+
children: [/* @__PURE__ */ K(H, { size: 15 }), " Problems"]
|
|
1348
1353
|
}),
|
|
1349
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ q(X, {
|
|
1350
1355
|
value: "hackathons",
|
|
1351
|
-
children: [/* @__PURE__ */
|
|
1356
|
+
children: [/* @__PURE__ */ K(U, { size: 15 }), " Hackathons"]
|
|
1352
1357
|
}),
|
|
1353
|
-
/* @__PURE__ */
|
|
1358
|
+
/* @__PURE__ */ q(X, {
|
|
1354
1359
|
value: "mentors",
|
|
1355
|
-
children: [/* @__PURE__ */
|
|
1360
|
+
children: [/* @__PURE__ */ K(W, { size: 15 }), " Mentors"]
|
|
1356
1361
|
}),
|
|
1357
|
-
/* @__PURE__ */
|
|
1362
|
+
/* @__PURE__ */ q(X, {
|
|
1358
1363
|
value: "integrations",
|
|
1359
|
-
children: [/* @__PURE__ */
|
|
1364
|
+
children: [/* @__PURE__ */ K(_e, { size: 15 }), " Integrations"]
|
|
1360
1365
|
})
|
|
1361
1366
|
]
|
|
1362
|
-
}), /* @__PURE__ */
|
|
1367
|
+
}), /* @__PURE__ */ K(Ne, {
|
|
1363
1368
|
value: t,
|
|
1364
1369
|
className: ie,
|
|
1365
|
-
children:
|
|
1370
|
+
children: K(t === "courses" ? Qe : t === "assessments" ? ce : t === "problems" ? $e : t === "hackathons" ? et : t === "mentors" ? tt : se, {})
|
|
1366
1371
|
})]
|
|
1367
1372
|
})]
|
|
1368
1373
|
});
|
|
1369
1374
|
}
|
|
1370
1375
|
//#endregion
|
|
1371
|
-
export {
|
|
1376
|
+
export { nt as AdminAdminDashboardPagePage };
|
|
1372
1377
|
|
|
1373
1378
|
//# sourceMappingURL=AdminAdminDashboardPagePage.js.map
|