@burdenoff/microfe-buildmyiq 2026.705.13 → 2026.706.10
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/buildmyiq/BuildmyiqRoot.d.ts.map +1 -1
- package/dist/buildmyiq/BuildmyiqRoot.js +57 -49
- package/dist/buildmyiq/BuildmyiqRoot.js.map +1 -1
- package/dist/buildmyiq/BuildmyiqRoutes.d.ts.map +1 -1
- package/dist/buildmyiq/BuildmyiqRoutes.js +15 -11
- package/dist/buildmyiq/BuildmyiqRoutes.js.map +1 -1
- package/dist/buildmyiq/components/Avatar.d.ts +15 -0
- package/dist/buildmyiq/components/Avatar.d.ts.map +1 -0
- package/dist/buildmyiq/components/Avatar.js +42 -0
- package/dist/buildmyiq/components/Avatar.js.map +1 -0
- package/dist/buildmyiq/components/Viz.d.ts +25 -0
- package/dist/buildmyiq/components/Viz.d.ts.map +1 -0
- package/dist/buildmyiq/components/Viz.js +78 -0
- package/dist/buildmyiq/components/Viz.js.map +1 -0
- package/dist/buildmyiq/components/index.d.ts +2 -0
- package/dist/buildmyiq/components/index.d.ts.map +1 -1
- package/dist/buildmyiq/components/index.js +2 -0
- package/dist/buildmyiq/pages/DashboardPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/DashboardPage.js +200 -98
- package/dist/buildmyiq/pages/DashboardPage.js.map +1 -1
- package/dist/buildmyiq/pages/assessments/AssessmentDetailPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/assessments/AssessmentDetailPage.js +262 -241
- package/dist/buildmyiq/pages/assessments/AssessmentDetailPage.js.map +1 -1
- package/dist/buildmyiq/pages/assessments/AssessmentsPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/assessments/AssessmentsPage.js +142 -115
- package/dist/buildmyiq/pages/assessments/AssessmentsPage.js.map +1 -1
- package/dist/buildmyiq/pages/assessments/TakeAssessmentPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/assessments/TakeAssessmentPage.js +220 -156
- package/dist/buildmyiq/pages/assessments/TakeAssessmentPage.js.map +1 -1
- package/dist/buildmyiq/pages/authoring/AuthoringPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/authoring/AuthoringPage.js +51 -46
- package/dist/buildmyiq/pages/authoring/AuthoringPage.js.map +1 -1
- package/dist/buildmyiq/pages/authoring/CourseBuilderPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/authoring/CourseBuilderPage.js +581 -448
- package/dist/buildmyiq/pages/authoring/CourseBuilderPage.js.map +1 -1
- package/dist/buildmyiq/pages/catalog/CatalogPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/catalog/CatalogPage.js +52 -42
- package/dist/buildmyiq/pages/catalog/CatalogPage.js.map +1 -1
- package/dist/buildmyiq/pages/catalog/CourseDetailPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/catalog/CourseDetailPage.js +422 -301
- package/dist/buildmyiq/pages/catalog/CourseDetailPage.js.map +1 -1
- package/dist/buildmyiq/pages/certificates/CertificatesPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/certificates/CertificatesPage.js +237 -151
- package/dist/buildmyiq/pages/certificates/CertificatesPage.js.map +1 -1
- package/dist/buildmyiq/pages/cohorts/CohortsPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/cohorts/CohortsPage.js +219 -138
- package/dist/buildmyiq/pages/cohorts/CohortsPage.js.map +1 -1
- package/dist/buildmyiq/pages/insights/InsightsPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/insights/InsightsPage.js +276 -152
- package/dist/buildmyiq/pages/insights/InsightsPage.js.map +1 -1
- package/dist/buildmyiq/pages/learning/LessonPlayerPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/learning/LessonPlayerPage.js +237 -174
- package/dist/buildmyiq/pages/learning/LessonPlayerPage.js.map +1 -1
- package/dist/buildmyiq/pages/learning/MyLearningPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/learning/MyLearningPage.js +307 -169
- package/dist/buildmyiq/pages/learning/MyLearningPage.js.map +1 -1
- package/dist/buildmyiq/pages/paths/PathsPage.d.ts +4 -0
- package/dist/buildmyiq/pages/paths/PathsPage.d.ts.map +1 -0
- package/dist/buildmyiq/pages/paths/PathsPage.js +187 -0
- package/dist/buildmyiq/pages/paths/PathsPage.js.map +1 -0
- package/dist/buildmyiq/pages/skills/SkillsPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/skills/SkillsPage.js +233 -140
- package/dist/buildmyiq/pages/skills/SkillsPage.js.map +1 -1
- package/dist/buildmyiq/pages/submissions/SubmissionsPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/submissions/SubmissionsPage.js +379 -275
- package/dist/buildmyiq/pages/submissions/SubmissionsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,250 +1,388 @@
|
|
|
1
1
|
import { useBuildmyiq as e } from "../../context/BuildmyiqContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { cn as t } from "../../utils/cn.js";
|
|
3
|
+
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
+
import { formatDate as r, formatDateTime as i, formatRelativeTime as a } from "../../utils/formatters.js";
|
|
5
|
+
import { StatusBadge as o } from "../../components/StatusBadge.js";
|
|
6
|
+
import { EmptyState as s } from "../../components/EmptyState.js";
|
|
7
|
+
import { ErrorView as c, LoadingView as l, Section as u } from "../../components/StateViews.js";
|
|
8
|
+
import { DataTable as d } from "../../components/DataTable.js";
|
|
9
|
+
import { Tabs as f } from "../../components/Tabs.js";
|
|
10
|
+
import { MiniBar as p } from "../../components/MiniBar.js";
|
|
11
|
+
import { ProgressRing as m, Sparkline as h } from "../../components/Viz.js";
|
|
9
12
|
import "../../context/index.js";
|
|
10
|
-
import { useBuiCertificates as
|
|
13
|
+
import { useBuiCertificates as g, useBuiCourses as ee, useBuiEnrollments as te, useBuiSubmissions as ne } from "../../hooks/useBuildmyiqApi.js";
|
|
11
14
|
import "../../hooks/index.js";
|
|
12
|
-
import { FileLink as
|
|
15
|
+
import { FileLink as _ } from "../../components/FileLink.js";
|
|
13
16
|
import "../../components/index.js";
|
|
14
|
-
import { useMemo as
|
|
15
|
-
import { ArrowRight as
|
|
16
|
-
import { jsx as
|
|
17
|
-
import { Button as
|
|
17
|
+
import { useMemo as v, useState as y } from "react";
|
|
18
|
+
import { ArrowRight as b, Award as x, Calendar as re, CheckCircle2 as S, ClipboardCheck as C, GraduationCap as ie, PlayCircle as ae, TrendingUp as w, Users as T, XCircle as E } from "lucide-react";
|
|
19
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
20
|
+
import { Button as k, GlassCard as A } from "@burdenoff/fe-libs/ui";
|
|
18
21
|
//#region src/buildmyiq/pages/learning/MyLearningPage.tsx
|
|
19
|
-
var
|
|
20
|
-
let { currentUser:
|
|
21
|
-
learnerId:
|
|
22
|
+
var oe = new Set(["ENROLLED", "IN_PROGRESS"]), se = (e) => e.passed == null ? "text-text-primary" : e.passed ? "text-status-success-text" : "text-status-error-text", j = () => {
|
|
23
|
+
let { currentUser: j, navigateTo: M } = e(), N = j?.id, [P, F] = y("in_progress"), I = te({
|
|
24
|
+
learnerId: N,
|
|
22
25
|
limit: 100,
|
|
23
|
-
enabled: !!
|
|
24
|
-
}),
|
|
25
|
-
learnerId:
|
|
26
|
+
enabled: !!N
|
|
27
|
+
}), L = ee({ limit: 100 }), R = g(void 0, N), z = ne({
|
|
28
|
+
learnerId: N,
|
|
26
29
|
limit: 50,
|
|
27
|
-
enabled: !!
|
|
28
|
-
}),
|
|
30
|
+
enabled: !!N
|
|
31
|
+
}), B = v(() => [...z.data?.items ?? []].sort((e, t) => (t.submittedAt ?? t.createdAt).localeCompare(e.submittedAt ?? e.createdAt)), [z.data]), V = v(() => I.data?.items ?? [], [I.data]), H = v(() => L.data?.items ?? [], [L.data]), U = v(() => R.data ?? [], [R.data]), W = v(() => {
|
|
29
32
|
let e = /* @__PURE__ */ new Map();
|
|
30
|
-
for (let t of
|
|
33
|
+
for (let t of H) e.set(t.id, t);
|
|
31
34
|
return e;
|
|
32
|
-
}, [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
}, [H]), G = v(() => {
|
|
36
|
+
let e = /* @__PURE__ */ new Map();
|
|
37
|
+
for (let t of V) e.set(t.id, t);
|
|
38
|
+
return e;
|
|
39
|
+
}, [V]), K = (e) => W.get(e)?.title ?? "Course", ce = (e) => {
|
|
40
|
+
let t = e.enrollmentId ? G.get(e.enrollmentId) : void 0;
|
|
41
|
+
return t ? K(t.courseId) : "Assessment";
|
|
42
|
+
}, q = v(() => V.filter((e) => oe.has(e.status)), [V]), J = v(() => V.filter((e) => e.status === "COMPLETED"), [V]), Y = v(() => [...P === "in_progress" ? q : P === "completed" ? J : V].sort((e, t) => (t.lastActiveAt ?? t.enrolledAt).localeCompare(e.lastActiveAt ?? e.enrolledAt)), [
|
|
43
|
+
P,
|
|
44
|
+
q,
|
|
45
|
+
J,
|
|
46
|
+
V
|
|
47
|
+
]), X = v(() => [...U].sort((e, t) => t.issuedAt.localeCompare(e.issuedAt)), [U]), Z = v(() => B.filter((e) => e.score != null), [B]), Q = v(() => [...Z].reverse().map((e) => e.score), [Z]), $ = Z.length > 0 ? Math.round(Z.reduce((e, t) => e + (t.score ?? 0), 0) / Z.length) : null, le = v(() => B.filter((e) => e.passed === !0).length, [B]), ue = [
|
|
38
48
|
{
|
|
39
49
|
value: "in_progress",
|
|
40
50
|
label: "In progress",
|
|
41
|
-
count:
|
|
51
|
+
count: q.length
|
|
42
52
|
},
|
|
43
53
|
{
|
|
44
54
|
value: "completed",
|
|
45
55
|
label: "Completed",
|
|
46
|
-
count:
|
|
56
|
+
count: J.length
|
|
47
57
|
},
|
|
48
58
|
{
|
|
49
59
|
value: "all",
|
|
50
60
|
label: "All",
|
|
51
|
-
count:
|
|
61
|
+
count: V.length
|
|
52
62
|
}
|
|
53
|
-
],
|
|
54
|
-
return /* @__PURE__ */
|
|
63
|
+
], de = !!N && (I.isLoading || L.isLoading);
|
|
64
|
+
return /* @__PURE__ */ D(n, {
|
|
55
65
|
title: "My Learning",
|
|
56
66
|
description: "Your enrollments, progress and the credentials you've earned.",
|
|
57
67
|
titleGradient: !0,
|
|
58
68
|
aurora: !0,
|
|
59
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ O("div", {
|
|
60
70
|
className: "flex flex-col gap-6",
|
|
61
71
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ O(u, {
|
|
63
73
|
title: "Courses",
|
|
64
74
|
description: "Everything you're enrolled in.",
|
|
65
|
-
children: [
|
|
75
|
+
children: [N && V.length > 0 && /* @__PURE__ */ D("div", {
|
|
66
76
|
className: "mb-4",
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
-
items:
|
|
69
|
-
value:
|
|
70
|
-
onChange:
|
|
77
|
+
children: /* @__PURE__ */ D(f, {
|
|
78
|
+
items: ue,
|
|
79
|
+
value: P,
|
|
80
|
+
onChange: F
|
|
71
81
|
})
|
|
72
|
-
}),
|
|
82
|
+
}), N ? de ? /* @__PURE__ */ D(l, { label: "Loading your enrollments…" }) : I.isError ? /* @__PURE__ */ D(c, {
|
|
73
83
|
title: "Couldn't load your learning",
|
|
74
|
-
message:
|
|
75
|
-
onRetry: () =>
|
|
76
|
-
}) :
|
|
84
|
+
message: I.error instanceof Error ? I.error.message : void 0,
|
|
85
|
+
onRetry: () => I.refetch()
|
|
86
|
+
}) : V.length === 0 ? /* @__PURE__ */ D(s, {
|
|
77
87
|
illustration: "onboarding",
|
|
78
88
|
title: "You're not enrolled in anything yet",
|
|
79
89
|
description: "Browse the catalog and enrol in a course to start learning.",
|
|
80
|
-
action: /* @__PURE__ */
|
|
81
|
-
onClick: () =>
|
|
90
|
+
action: /* @__PURE__ */ D(k, {
|
|
91
|
+
onClick: () => M("catalog"),
|
|
82
92
|
children: "Explore the catalog"
|
|
83
93
|
})
|
|
84
|
-
}) :
|
|
94
|
+
}) : Y.length === 0 ? /* @__PURE__ */ D(s, {
|
|
85
95
|
illustration: "empty-data",
|
|
86
|
-
title:
|
|
87
|
-
description:
|
|
88
|
-
}) : /* @__PURE__ */
|
|
89
|
-
className: "
|
|
90
|
-
children:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}),
|
|
98
|
-
/* @__PURE__ */ w("div", {
|
|
99
|
-
className: "min-w-0 flex-1",
|
|
96
|
+
title: P === "in_progress" ? "No courses in progress" : P === "completed" ? "No completed courses yet" : "No courses",
|
|
97
|
+
description: P === "completed" ? "Finish a course to see it here — and earn a certificate." : "Switch tabs or enrol in a new course to keep learning."
|
|
98
|
+
}) : /* @__PURE__ */ D("div", {
|
|
99
|
+
className: "grid grid-cols-1 gap-4 xl:grid-cols-2",
|
|
100
|
+
children: Y.map((e) => {
|
|
101
|
+
let t = W.get(e.courseId), n = t?.cover?.downloadUrl ?? null, r = e.status === "COMPLETED", i = Math.round(e.progressPct ?? 0);
|
|
102
|
+
return /* @__PURE__ */ O(A, {
|
|
103
|
+
treatment: "plain",
|
|
104
|
+
className: "group flex flex-col overflow-hidden transition-shadow hover:shadow-lg sm:flex-row",
|
|
105
|
+
children: [/* @__PURE__ */ O("div", {
|
|
106
|
+
className: "relative aspect-video w-full shrink-0 overflow-hidden bg-[var(--color-accent-soft)] sm:aspect-auto sm:w-44",
|
|
100
107
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
108
|
+
n ? /* @__PURE__ */ D("img", {
|
|
109
|
+
src: n,
|
|
110
|
+
alt: "",
|
|
111
|
+
className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"
|
|
112
|
+
}) : null,
|
|
113
|
+
/* @__PURE__ */ D("div", {
|
|
114
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
115
|
+
children: /* @__PURE__ */ D("span", {
|
|
116
|
+
className: "flex h-11 w-11 items-center justify-center rounded-full bg-bg-surface/85 text-text-primary shadow-sm backdrop-blur transition-transform group-hover:scale-110",
|
|
117
|
+
children: /* @__PURE__ */ D(ae, { className: "h-6 w-6" })
|
|
118
|
+
})
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ D("div", {
|
|
121
|
+
className: "absolute bottom-2 left-2 rounded-full bg-bg-surface/85 p-0.5 shadow-sm backdrop-blur",
|
|
122
|
+
children: /* @__PURE__ */ D(m, {
|
|
123
|
+
value: i,
|
|
124
|
+
size: 38,
|
|
125
|
+
stroke: 5,
|
|
126
|
+
color: r ? "var(--color-status-success-text)" : "var(--color-accent-teal)"
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
}), /* @__PURE__ */ O("div", {
|
|
131
|
+
className: "flex min-w-0 flex-1 flex-col gap-2 p-4",
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ O("div", {
|
|
134
|
+
className: "flex flex-wrap items-start gap-2",
|
|
135
|
+
children: [/* @__PURE__ */ D("p", {
|
|
136
|
+
className: "min-w-0 flex-1 truncate font-semibold text-text-primary",
|
|
137
|
+
children: K(e.courseId)
|
|
138
|
+
}), /* @__PURE__ */ D(o, { status: e.status })]
|
|
139
|
+
}),
|
|
140
|
+
(t?.level || t?.skill?.name || e.cohort?.name) && /* @__PURE__ */ O("div", {
|
|
141
|
+
className: "flex flex-wrap items-center gap-2 text-xs text-text-secondary",
|
|
142
|
+
children: [
|
|
143
|
+
t?.level && /* @__PURE__ */ D(o, { status: t.level }),
|
|
144
|
+
t?.skill?.name && /* @__PURE__ */ D("span", {
|
|
145
|
+
className: "rounded-full bg-bg-sunken px-2 py-0.5",
|
|
146
|
+
children: t.skill.name
|
|
147
|
+
}),
|
|
148
|
+
e.cohort?.name && /* @__PURE__ */ O("span", {
|
|
149
|
+
className: "inline-flex items-center gap-1",
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ D(T, { className: "h-3.5 w-3.5" }),
|
|
152
|
+
" ",
|
|
153
|
+
e.cohort.name
|
|
154
|
+
]
|
|
155
|
+
})
|
|
156
|
+
]
|
|
107
157
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
className: "mt-
|
|
110
|
-
children: [/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ O("div", {
|
|
159
|
+
className: "mt-1 flex items-center gap-2",
|
|
160
|
+
children: [/* @__PURE__ */ D(p, {
|
|
111
161
|
value: e.progressPct,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
162
|
+
barClassName: r ? "bg-[var(--color-status-success-text)]" : "bg-[var(--color-accent-primary)]",
|
|
163
|
+
className: "flex-1"
|
|
164
|
+
}), /* @__PURE__ */ O("span", {
|
|
165
|
+
className: "shrink-0 text-xs font-semibold tabular-nums text-text-secondary",
|
|
166
|
+
children: [i, "%"]
|
|
116
167
|
})]
|
|
117
168
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
className: "
|
|
120
|
-
children:
|
|
169
|
+
/* @__PURE__ */ D("p", {
|
|
170
|
+
className: "text-xs text-text-secondary",
|
|
171
|
+
children: r && e.completedAt ? `Completed ${a(e.completedAt)}` : `Active ${a(e.lastActiveAt ?? e.enrolledAt)}`
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ O("div", {
|
|
174
|
+
className: "mt-auto flex flex-wrap gap-2 pt-2",
|
|
175
|
+
children: [/* @__PURE__ */ O(k, {
|
|
176
|
+
size: "sm",
|
|
177
|
+
className: "max-sm:flex-1",
|
|
178
|
+
onClick: () => M(`learning/${e.id}`),
|
|
179
|
+
children: [r ? "Review" : "Continue", /* @__PURE__ */ D(b, { className: "ml-1 h-4 w-4" })]
|
|
180
|
+
}), /* @__PURE__ */ D(k, {
|
|
181
|
+
variant: "secondary",
|
|
182
|
+
size: "sm",
|
|
183
|
+
className: "max-sm:flex-1",
|
|
184
|
+
onClick: () => M(`catalog/${e.courseId}`),
|
|
185
|
+
children: "Overview"
|
|
186
|
+
})]
|
|
121
187
|
})
|
|
122
188
|
]
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
className: "shrink-0 max-sm:w-full",
|
|
128
|
-
onClick: () => k(`learning/${e.id}`),
|
|
129
|
-
children: [e.status === "COMPLETED" ? "Review" : "Continue", /* @__PURE__ */ C(v, { className: "ml-1 h-4 w-4" })]
|
|
130
|
-
})
|
|
131
|
-
]
|
|
132
|
-
}, e.id))
|
|
133
|
-
}) : /* @__PURE__ */ C(a, {
|
|
189
|
+
})]
|
|
190
|
+
}, e.id);
|
|
191
|
+
})
|
|
192
|
+
}) : /* @__PURE__ */ D(s, {
|
|
134
193
|
illustration: "empty-people",
|
|
135
194
|
title: "Sign in to see your learning",
|
|
136
195
|
description: "Your enrollments and progress appear here once you are signed in to the workspace."
|
|
137
196
|
})]
|
|
138
197
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ D(u, {
|
|
140
199
|
title: "Assessment results",
|
|
141
200
|
description: "Your submitted assessments, scores and educator feedback.",
|
|
142
|
-
children:
|
|
201
|
+
children: N ? z.isLoading ? /* @__PURE__ */ D(l, { label: "Loading your results…" }) : z.isError ? /* @__PURE__ */ D(c, {
|
|
143
202
|
title: "Couldn't load your results",
|
|
144
|
-
message:
|
|
145
|
-
onRetry: () =>
|
|
146
|
-
}) :
|
|
203
|
+
message: z.error instanceof Error ? z.error.message : void 0,
|
|
204
|
+
onRetry: () => z.refetch()
|
|
205
|
+
}) : B.length === 0 ? /* @__PURE__ */ D(s, {
|
|
147
206
|
illustration: "empty-data",
|
|
148
207
|
title: "No assessment results yet",
|
|
149
208
|
description: "Take a course assessment and your score and feedback will appear here."
|
|
150
|
-
}) : /* @__PURE__ */
|
|
209
|
+
}) : /* @__PURE__ */ O("div", {
|
|
151
210
|
className: "flex flex-col gap-3",
|
|
152
|
-
children:
|
|
153
|
-
treatment: "
|
|
154
|
-
className: "flex flex-wrap items-center gap-
|
|
155
|
-
children: [
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
className: "
|
|
211
|
+
children: [$ != null && /* @__PURE__ */ O(A, {
|
|
212
|
+
treatment: "metric",
|
|
213
|
+
className: "flex flex-wrap items-center justify-between gap-4 p-4",
|
|
214
|
+
children: [/* @__PURE__ */ O("div", {
|
|
215
|
+
className: "flex items-center gap-3",
|
|
216
|
+
children: [/* @__PURE__ */ D(m, {
|
|
217
|
+
value: $,
|
|
218
|
+
size: 54
|
|
219
|
+
}), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
220
|
+
className: "text-sm font-semibold text-text-primary",
|
|
221
|
+
children: "Average score"
|
|
222
|
+
}), /* @__PURE__ */ O("p", {
|
|
223
|
+
className: "text-xs text-text-secondary",
|
|
162
224
|
children: [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}),
|
|
170
|
-
/* @__PURE__ */ C(i, { status: e.status }),
|
|
171
|
-
e.passed != null && /* @__PURE__ */ C("span", {
|
|
172
|
-
className: `text-xs font-medium ${e.passed ? "text-status-success-text" : "text-status-error-text"}`,
|
|
173
|
-
children: e.passed ? "Passed" : "Not passed"
|
|
174
|
-
})
|
|
175
|
-
]
|
|
176
|
-
}),
|
|
177
|
-
e.feedback && /* @__PURE__ */ C("p", {
|
|
178
|
-
className: "mt-1 text-sm text-text-secondary",
|
|
179
|
-
children: e.feedback
|
|
180
|
-
}),
|
|
181
|
-
/* @__PURE__ */ w("p", {
|
|
182
|
-
className: "mt-1 text-xs text-text-secondary",
|
|
183
|
-
children: [
|
|
184
|
-
"Submitted ",
|
|
185
|
-
n(e.submittedAt ?? e.createdAt),
|
|
186
|
-
e.gradedAt ? ` · graded ${n(e.gradedAt)}` : ""
|
|
187
|
-
]
|
|
188
|
-
})
|
|
225
|
+
le,
|
|
226
|
+
" of ",
|
|
227
|
+
Z.length,
|
|
228
|
+
" passed · ",
|
|
229
|
+
Z.length,
|
|
230
|
+
" graded"
|
|
189
231
|
]
|
|
190
|
-
})
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
232
|
+
})] })]
|
|
233
|
+
}), Q.length >= 2 && /* @__PURE__ */ O("div", {
|
|
234
|
+
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ D(w, { className: "h-4 w-4 text-status-success-text" }),
|
|
237
|
+
/* @__PURE__ */ D(h, {
|
|
238
|
+
data: Q,
|
|
239
|
+
width: 128,
|
|
240
|
+
height: 36
|
|
241
|
+
}),
|
|
242
|
+
/* @__PURE__ */ D("span", { children: "score trend" })
|
|
243
|
+
]
|
|
244
|
+
})]
|
|
245
|
+
}), /* @__PURE__ */ D(d, {
|
|
246
|
+
columns: [
|
|
247
|
+
{
|
|
248
|
+
key: "assessment",
|
|
249
|
+
header: "Assessment",
|
|
250
|
+
render: (e) => /* @__PURE__ */ O("div", {
|
|
251
|
+
className: "flex min-w-0 items-center gap-3",
|
|
252
|
+
children: [/* @__PURE__ */ D("span", {
|
|
253
|
+
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)]",
|
|
254
|
+
children: /* @__PURE__ */ D(C, { className: "h-4 w-4 text-text-primary" })
|
|
255
|
+
}), /* @__PURE__ */ O("div", {
|
|
256
|
+
className: "min-w-0",
|
|
257
|
+
children: [/* @__PURE__ */ D("p", {
|
|
258
|
+
className: "truncate font-medium text-text-primary",
|
|
259
|
+
children: ce(e)
|
|
260
|
+
}), /* @__PURE__ */ O("p", {
|
|
261
|
+
className: "text-xs text-text-secondary",
|
|
262
|
+
children: ["Attempt ", e.attempt]
|
|
263
|
+
})]
|
|
264
|
+
})]
|
|
265
|
+
})
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
key: "status",
|
|
269
|
+
header: "Status",
|
|
270
|
+
render: (e) => /* @__PURE__ */ D(o, { status: e.status })
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
key: "result",
|
|
274
|
+
header: "Result",
|
|
275
|
+
render: (e) => e.passed == null ? /* @__PURE__ */ D("span", {
|
|
276
|
+
className: "text-text-tertiary",
|
|
277
|
+
children: "—"
|
|
278
|
+
}) : /* @__PURE__ */ O("span", {
|
|
279
|
+
className: t("inline-flex items-center gap-1.5 text-sm font-medium", e.passed ? "text-status-success-text" : "text-status-error-text"),
|
|
280
|
+
children: [e.passed ? /* @__PURE__ */ D(S, { className: "h-4 w-4" }) : /* @__PURE__ */ D(E, { className: "h-4 w-4" }), e.passed ? "Passed" : "Not passed"]
|
|
281
|
+
})
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
key: "feedback",
|
|
285
|
+
header: "Feedback",
|
|
286
|
+
hideOnMobile: !0,
|
|
287
|
+
render: (e) => e.feedback ? /* @__PURE__ */ D("p", {
|
|
288
|
+
className: "line-clamp-2 max-w-[18rem] text-sm text-text-secondary",
|
|
289
|
+
children: e.feedback
|
|
290
|
+
}) : /* @__PURE__ */ D("span", {
|
|
291
|
+
className: "text-text-tertiary",
|
|
292
|
+
children: "—"
|
|
293
|
+
})
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
key: "submitted",
|
|
297
|
+
header: "Submitted",
|
|
298
|
+
hideOnMobile: !0,
|
|
299
|
+
sortValue: (e) => e.submittedAt ?? e.createdAt,
|
|
300
|
+
render: (e) => /* @__PURE__ */ D("span", {
|
|
301
|
+
className: "whitespace-nowrap text-sm text-text-secondary",
|
|
302
|
+
children: i(e.submittedAt ?? e.createdAt)
|
|
303
|
+
})
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
key: "score",
|
|
307
|
+
header: "Score",
|
|
308
|
+
align: "right",
|
|
309
|
+
sortValue: (e) => e.score ?? -1,
|
|
310
|
+
render: (e) => /* @__PURE__ */ D("span", {
|
|
311
|
+
className: t("text-lg font-bold tabular-nums", se(e)),
|
|
195
312
|
children: e.score == null ? "—" : `${e.score}%`
|
|
196
|
-
})
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
313
|
+
})
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
rows: B,
|
|
317
|
+
rowKey: (e) => e.id,
|
|
318
|
+
defaultSort: {
|
|
319
|
+
key: "submitted",
|
|
320
|
+
dir: "desc"
|
|
321
|
+
}
|
|
322
|
+
})]
|
|
203
323
|
}) : null
|
|
204
324
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ D(u, {
|
|
206
326
|
title: "Certificates",
|
|
207
327
|
description: "Verifiable credentials issued for the courses you've completed.",
|
|
208
|
-
action: /* @__PURE__ */
|
|
328
|
+
action: /* @__PURE__ */ O(k, {
|
|
209
329
|
variant: "ghost",
|
|
210
330
|
size: "sm",
|
|
211
|
-
onClick: () =>
|
|
212
|
-
children: [/* @__PURE__ */
|
|
331
|
+
onClick: () => M("certificates"),
|
|
332
|
+
children: [/* @__PURE__ */ D(ie, { className: "mr-1 h-4 w-4" }), " All certificates"]
|
|
213
333
|
}),
|
|
214
|
-
children:
|
|
334
|
+
children: N ? R.isLoading ? /* @__PURE__ */ D(l, { label: "Loading your certificates…" }) : R.isError ? /* @__PURE__ */ D(c, {
|
|
215
335
|
title: "Couldn't load your certificates",
|
|
216
|
-
message:
|
|
217
|
-
onRetry: () =>
|
|
218
|
-
}) :
|
|
336
|
+
message: R.error instanceof Error ? R.error.message : void 0,
|
|
337
|
+
onRetry: () => R.refetch()
|
|
338
|
+
}) : X.length === 0 ? /* @__PURE__ */ D(s, {
|
|
219
339
|
illustration: "empty-data",
|
|
220
340
|
title: "No certificates yet",
|
|
221
341
|
description: "Complete a credentialed course to earn a verifiable certificate."
|
|
222
|
-
}) : /* @__PURE__ */
|
|
342
|
+
}) : /* @__PURE__ */ D("div", {
|
|
223
343
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",
|
|
224
|
-
children:
|
|
344
|
+
children: X.map((e) => /* @__PURE__ */ O(A, {
|
|
225
345
|
treatment: "plain",
|
|
226
|
-
className: "flex flex-col gap-3 p-4",
|
|
346
|
+
className: "flex flex-col gap-3 p-4 transition-shadow hover:shadow-lg",
|
|
227
347
|
children: [
|
|
228
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ O("div", {
|
|
229
349
|
className: "flex items-start justify-between gap-3",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
231
|
-
className: "flex h-
|
|
232
|
-
children: /* @__PURE__ */
|
|
233
|
-
}), /* @__PURE__ */
|
|
350
|
+
children: [/* @__PURE__ */ D("div", {
|
|
351
|
+
className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-xl bg-[color-mix(in_srgb,var(--color-status-warning-text)_16%,transparent)]",
|
|
352
|
+
children: /* @__PURE__ */ D(x, { className: "h-6 w-6 text-status-warning-text" })
|
|
353
|
+
}), /* @__PURE__ */ D(o, { status: e.status })]
|
|
234
354
|
}),
|
|
235
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ O("div", {
|
|
236
356
|
className: "min-w-0",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
238
|
-
className: "truncate font-
|
|
239
|
-
children:
|
|
240
|
-
}), /* @__PURE__ */
|
|
241
|
-
className: "mt-
|
|
242
|
-
children:
|
|
357
|
+
children: [/* @__PURE__ */ D("p", {
|
|
358
|
+
className: "truncate font-semibold text-text-primary",
|
|
359
|
+
children: K(e.courseId)
|
|
360
|
+
}), /* @__PURE__ */ O("div", {
|
|
361
|
+
className: "mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-text-secondary",
|
|
362
|
+
children: [/* @__PURE__ */ D("span", {
|
|
363
|
+
className: "font-mono",
|
|
364
|
+
children: e.serial
|
|
365
|
+
}), e.finalScore != null && /* @__PURE__ */ O("span", {
|
|
366
|
+
className: "inline-flex items-center gap-1 text-status-success-text",
|
|
367
|
+
children: [
|
|
368
|
+
/* @__PURE__ */ D(S, { className: "h-3.5 w-3.5" }),
|
|
369
|
+
" ",
|
|
370
|
+
e.finalScore,
|
|
371
|
+
"%"
|
|
372
|
+
]
|
|
373
|
+
})]
|
|
243
374
|
})]
|
|
244
375
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
className: "mt-auto flex flex-wrap items-center justify-between gap-2 pt-
|
|
247
|
-
children: [/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ O("div", {
|
|
377
|
+
className: "mt-auto flex flex-wrap items-center justify-between gap-2 border-t border-border-seam/60 pt-3 text-xs text-text-secondary",
|
|
378
|
+
children: [/* @__PURE__ */ O("span", {
|
|
379
|
+
className: "inline-flex items-center gap-1.5",
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ D(re, { className: "h-3.5 w-3.5" }),
|
|
382
|
+
" Issued ",
|
|
383
|
+
r(e.issuedAt)
|
|
384
|
+
]
|
|
385
|
+
}), e.file ? /* @__PURE__ */ D(_, { fileId: e.file.id }) : null]
|
|
248
386
|
})
|
|
249
387
|
]
|
|
250
388
|
}, e.id))
|
|
@@ -255,6 +393,6 @@ var D = new Set(["ENROLLED", "IN_PROGRESS"]), O = () => {
|
|
|
255
393
|
});
|
|
256
394
|
};
|
|
257
395
|
//#endregion
|
|
258
|
-
export {
|
|
396
|
+
export { j as MyLearningPage };
|
|
259
397
|
|
|
260
398
|
//# sourceMappingURL=MyLearningPage.js.map
|