@burdenoff/microfe-buildmyiq 2026.1102.1 → 2026.1102.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buildmyiq/components/BuiDiscussion.d.ts +8 -4
- package/dist/buildmyiq/components/BuiDiscussion.d.ts.map +1 -1
- package/dist/buildmyiq/components/BuiDiscussion.js +190 -87
- package/dist/buildmyiq/components/BuiDiscussion.js.map +1 -1
- package/dist/buildmyiq/hooks/useBuiComments.d.ts +50 -10
- package/dist/buildmyiq/hooks/useBuiComments.d.ts.map +1 -1
- package/dist/buildmyiq/hooks/useBuiComments.js +67 -23
- package/dist/buildmyiq/hooks/useBuiComments.js.map +1 -1
- package/dist/buildmyiq/hooks/useBuildmyiqApi.d.ts +52 -0
- package/dist/buildmyiq/hooks/useBuildmyiqApi.d.ts.map +1 -1
- package/dist/buildmyiq/hooks/useBuildmyiqApi.js +169 -122
- package/dist/buildmyiq/hooks/useBuildmyiqApi.js.map +1 -1
- package/dist/buildmyiq/pages/catalog/CatalogPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/catalog/CatalogPage.js +97 -68
- 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 +270 -208
- package/dist/buildmyiq/pages/catalog/CourseDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,98 +8,153 @@ import { StatusBadge as s } from "../../components/StatusBadge.js";
|
|
|
8
8
|
import { EmptyState as c } from "../../components/EmptyState.js";
|
|
9
9
|
import { ErrorView as l, LoadingView as u, Section as d } from "../../components/StateViews.js";
|
|
10
10
|
import { MiniBar as ee } from "../../components/MiniBar.js";
|
|
11
|
-
import { useBuiAssessments as te, useBuiCourse as ne, useBuiEnroll as
|
|
11
|
+
import { useBuiAssessments as te, useBuiCourse as ne, useBuiEnroll as re, useBuiModules as ie, useBuiMyEnrollment as ae, useBuiMyEnrollments as oe, useBuiMySavedCourses as f, useBuiToggleSavedCourse as p } from "../../hooks/useBuildmyiqApi.js";
|
|
12
12
|
import "../../hooks/index.js";
|
|
13
|
-
import { BuiDiscussion as
|
|
14
|
-
import { BuiTags as
|
|
15
|
-
import { BuiPermissionButton as
|
|
13
|
+
import { BuiDiscussion as se } from "../../components/BuiDiscussion.js";
|
|
14
|
+
import { BuiTags as ce } from "../../components/BuiTags.js";
|
|
15
|
+
import { BuiPermissionButton as le } from "../../components/BuiPermissionButton.js";
|
|
16
16
|
import "../../components/index.js";
|
|
17
|
-
import { useBuildmyiqAnalytics as
|
|
17
|
+
import { useBuildmyiqAnalytics as m } from "../../analytics/useBuildmyiqAnalytics.js";
|
|
18
18
|
import "../../analytics/index.js";
|
|
19
|
-
import { useMemo as
|
|
20
|
-
import { ArrowLeft as ue, ArrowRight as de, BookOpen as fe, CheckCircle2 as
|
|
21
|
-
import { useParams as
|
|
22
|
-
import { jsx as
|
|
23
|
-
import { Button as
|
|
19
|
+
import { useMemo as h, useState as g } from "react";
|
|
20
|
+
import { ArrowLeft as ue, ArrowRight as de, BookOpen as fe, Bookmark as _, BookmarkCheck as v, CheckCircle2 as y, ChevronDown as pe, Circle as b, CircleDashed as x, ClipboardCheck as S, ClipboardList as C, Clock as w, FileText as T, GraduationCap as me, Layers as E, ListChecks as D, MousePointerClick as O, PlayCircle as k, Radio as A, Sparkles as he, Video as j } from "lucide-react";
|
|
21
|
+
import { useParams as ge } from "react-router";
|
|
22
|
+
import { jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
23
|
+
import { Button as P, GlassCard as F } from "@burdenoff/fe-libs/ui";
|
|
24
24
|
//#region src/buildmyiq/pages/catalog/CourseDetailPage.tsx
|
|
25
|
-
var
|
|
26
|
-
ARTICLE:
|
|
27
|
-
VIDEO:
|
|
28
|
-
QUIZ:
|
|
29
|
-
ASSIGNMENT:
|
|
30
|
-
INTERACTIVE:
|
|
31
|
-
LIVE_SESSION:
|
|
32
|
-
},
|
|
25
|
+
var I = "buildmyiq-course", _e = "__ungrouped__", L = {
|
|
26
|
+
ARTICLE: T,
|
|
27
|
+
VIDEO: j,
|
|
28
|
+
QUIZ: D,
|
|
29
|
+
ASSIGNMENT: C,
|
|
30
|
+
INTERACTIVE: O,
|
|
31
|
+
LIVE_SESSION: A
|
|
32
|
+
}, R = ({ status: e, label: t }) => {
|
|
33
33
|
if (!e) return null;
|
|
34
|
-
let r = e === "COMPLETED" ?
|
|
35
|
-
return /* @__PURE__ */
|
|
34
|
+
let r = e === "COMPLETED" ? y : e === "IN_PROGRESS" ? x : b;
|
|
35
|
+
return /* @__PURE__ */ N("span", {
|
|
36
36
|
className: n("shrink-0", e === "COMPLETED" ? "text-status-success-text" : e === "IN_PROGRESS" ? "text-[var(--color-accent-teal)]" : "text-text-tertiary"),
|
|
37
37
|
title: t,
|
|
38
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ M(r, {
|
|
39
39
|
className: "h-4 w-4",
|
|
40
40
|
"aria-hidden": !0
|
|
41
|
-
}), /* @__PURE__ */
|
|
41
|
+
}), /* @__PURE__ */ M("span", {
|
|
42
42
|
className: "sr-only",
|
|
43
43
|
children: t
|
|
44
44
|
})]
|
|
45
45
|
});
|
|
46
|
-
},
|
|
46
|
+
}, z = ({ lesson: e, index: t, progressStatus: n, progressLabel: r }) => /* @__PURE__ */ N("li", {
|
|
47
47
|
className: "flex items-center gap-3 px-4 py-3 transition-colors hover:bg-bg-sunken/60",
|
|
48
48
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ M("span", {
|
|
50
50
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
|
|
51
|
-
children: /* @__PURE__ */
|
|
51
|
+
children: /* @__PURE__ */ M(L[e.type] ?? T, { className: "h-4 w-4" })
|
|
52
52
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ N("div", {
|
|
54
54
|
className: "min-w-0 flex-1",
|
|
55
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ N("p", {
|
|
56
56
|
className: "truncate text-sm font-medium text-text-primary",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
57
|
+
children: [/* @__PURE__ */ N("span", {
|
|
58
58
|
className: "me-1.5 tabular-nums text-text-tertiary",
|
|
59
59
|
children: [t + 1, "."]
|
|
60
60
|
}), e.title]
|
|
61
|
-
}), /* @__PURE__ */
|
|
61
|
+
}), /* @__PURE__ */ M("p", {
|
|
62
62
|
className: "text-xs text-text-tertiary",
|
|
63
63
|
children: a(e.type)
|
|
64
64
|
})]
|
|
65
65
|
}),
|
|
66
|
-
e.durationMin > 0 && /* @__PURE__ */
|
|
66
|
+
e.durationMin > 0 && /* @__PURE__ */ N("span", {
|
|
67
67
|
className: "hidden shrink-0 items-center gap-1 text-xs tabular-nums text-text-secondary sm:inline-flex",
|
|
68
68
|
children: [
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ M(w, { className: "h-3.5 w-3.5" }),
|
|
70
70
|
" ",
|
|
71
71
|
i(e.durationMin)
|
|
72
72
|
]
|
|
73
73
|
}),
|
|
74
|
-
e.isPreview && /* @__PURE__ */
|
|
74
|
+
e.isPreview && /* @__PURE__ */ M("span", {
|
|
75
75
|
className: "shrink-0 rounded-full border border-[var(--color-accent-teal)] px-2 py-0.5 text-xs font-medium text-[var(--color-accent-teal)]",
|
|
76
76
|
children: "Preview"
|
|
77
77
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ M(R, {
|
|
79
79
|
status: n,
|
|
80
80
|
label: r ?? ""
|
|
81
81
|
})
|
|
82
82
|
]
|
|
83
|
-
}),
|
|
83
|
+
}), B = ({ icon: e, children: t }) => /* @__PURE__ */ N("span", {
|
|
84
84
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam bg-bg-surface px-3 py-1.5 text-xs font-medium text-text-secondary",
|
|
85
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ M(e, {
|
|
86
86
|
className: "h-3.5 w-3.5 text-text-tertiary",
|
|
87
87
|
"aria-hidden": !0
|
|
88
88
|
}), t]
|
|
89
|
-
}),
|
|
90
|
-
let
|
|
89
|
+
}), ve = ({ courseId: e, enabled: n }) => {
|
|
90
|
+
let r = t(), i = f({
|
|
91
|
+
courseId: e,
|
|
92
|
+
limit: 1,
|
|
93
|
+
enabled: n
|
|
94
|
+
}), a = p(), [o, s] = g(null);
|
|
95
|
+
if (!n || i.isLoading) return null;
|
|
96
|
+
if (i.isError) return /* @__PURE__ */ N("div", {
|
|
97
|
+
className: "ms-auto flex flex-col items-end gap-1",
|
|
98
|
+
children: [/* @__PURE__ */ N(P, {
|
|
99
|
+
size: "sm",
|
|
100
|
+
variant: "outline",
|
|
101
|
+
onClick: () => void i.refetch(),
|
|
102
|
+
disabled: i.isFetching,
|
|
103
|
+
"data-testid": "bui-save-course-retry",
|
|
104
|
+
children: [/* @__PURE__ */ M(_, {
|
|
105
|
+
className: "me-1.5 h-4 w-4",
|
|
106
|
+
"aria-hidden": !0
|
|
107
|
+
}), r("buildmyiq.course.save.retry", "Retry Save for later")]
|
|
108
|
+
}), /* @__PURE__ */ M("p", {
|
|
109
|
+
role: "alert",
|
|
110
|
+
className: "text-xs text-status-error-text",
|
|
111
|
+
children: r("buildmyiq.course.save.loadError", "Could not load your saved courses.")
|
|
112
|
+
})]
|
|
113
|
+
});
|
|
114
|
+
let c = (i.data?.items.length ?? 0) > 0, l = async () => {
|
|
115
|
+
s(null);
|
|
116
|
+
try {
|
|
117
|
+
await a.mutateAsync({
|
|
118
|
+
courseId: e,
|
|
119
|
+
save: !c
|
|
120
|
+
});
|
|
121
|
+
} catch (e) {
|
|
122
|
+
s(e instanceof Error ? e.message : r("buildmyiq.course.save.error", "Could not update your saved courses."));
|
|
123
|
+
}
|
|
124
|
+
}, u = c ? v : _;
|
|
125
|
+
return /* @__PURE__ */ N("div", {
|
|
126
|
+
className: "ms-auto flex flex-col items-end gap-1",
|
|
127
|
+
children: [/* @__PURE__ */ N(P, {
|
|
128
|
+
size: "sm",
|
|
129
|
+
variant: c ? "secondary" : "outline",
|
|
130
|
+
onClick: l,
|
|
131
|
+
disabled: a.isPending,
|
|
132
|
+
"aria-pressed": c,
|
|
133
|
+
"data-testid": "bui-save-course",
|
|
134
|
+
children: [/* @__PURE__ */ M(u, {
|
|
135
|
+
className: "me-1.5 h-4 w-4",
|
|
136
|
+
"aria-hidden": !0
|
|
137
|
+
}), c ? r("buildmyiq.course.save.saved", "Saved") : r("buildmyiq.course.save.saveForLater", "Save for later")]
|
|
138
|
+
}), o && /* @__PURE__ */ M("p", {
|
|
139
|
+
role: "alert",
|
|
140
|
+
className: "text-xs text-status-error-text",
|
|
141
|
+
children: o
|
|
142
|
+
})]
|
|
143
|
+
});
|
|
144
|
+
}, V = () => {
|
|
145
|
+
let { courseId: a } = ge(), { currentUser: f, navigateTo: p } = e(), _ = t(), v = f?.id, y = ne(a), b = ie(a), x = te(a), C = oe({
|
|
91
146
|
courseId: a,
|
|
92
|
-
enabled: !!(a &&
|
|
93
|
-
}),
|
|
147
|
+
enabled: !!(a && v)
|
|
148
|
+
}), T = re(), { trackCourseEnrolled: D } = m(), [O, A] = g(null), [j, L] = g(null), R = y.data ?? null, V = b.data ?? [], H = x.data ?? [], U = C.data?.items ?? [], W = h(() => U.find((e) => e.status !== "DROPPED" && e.status !== "EXPIRED"), [U]), G = ae(W?.id), K = h(() => {
|
|
94
149
|
let e = /* @__PURE__ */ new Map();
|
|
95
|
-
for (let t of
|
|
150
|
+
for (let t of G.data?.lessonProgress ?? []) e.set(t.lessonId, t.status);
|
|
96
151
|
return e;
|
|
97
|
-
}, [
|
|
152
|
+
}, [G.data]), q = !!W && G.data != null, ye = {
|
|
98
153
|
COMPLETED: _("buildmyiq.course.lessonProgress.completed", "Completed"),
|
|
99
154
|
IN_PROGRESS: _("buildmyiq.course.lessonProgress.inProgress", "In progress"),
|
|
100
155
|
NOT_STARTED: _("buildmyiq.course.lessonProgress.notStarted", "Not started")
|
|
101
|
-
},
|
|
102
|
-
let e =
|
|
156
|
+
}, be = (e) => q ? K.get(e) ?? "NOT_STARTED" : void 0, J = h(() => (R?.lessons ?? []).filter((e) => !e.moduleId), [R]), Y = h(() => {
|
|
157
|
+
let e = V.map((e) => ({
|
|
103
158
|
id: e.id,
|
|
104
159
|
title: e.title,
|
|
105
160
|
description: e.description,
|
|
@@ -111,263 +166,270 @@ var M = "buildmyiq-course", _e = "__ungrouped__", N = {
|
|
|
111
166
|
lessons: J
|
|
112
167
|
}), e;
|
|
113
168
|
}, [
|
|
114
|
-
|
|
169
|
+
V,
|
|
115
170
|
J,
|
|
116
171
|
_
|
|
117
|
-
]), X =
|
|
118
|
-
if (
|
|
119
|
-
for (let e of Y) for (let t of e.lessons) if (
|
|
172
|
+
]), X = R?.lessons?.length ?? 0, xe = H.filter((e) => e.status === "PUBLISHED").length, Z = h(() => {
|
|
173
|
+
if (q) {
|
|
174
|
+
for (let e of Y) for (let t of e.lessons) if (K.get(t.id) !== "COMPLETED") return t.id;
|
|
120
175
|
}
|
|
121
176
|
}, [
|
|
122
|
-
|
|
177
|
+
q,
|
|
123
178
|
Y,
|
|
124
|
-
|
|
125
|
-
]),
|
|
179
|
+
K
|
|
180
|
+
]), Se = (e) => Z ? `learning/${e}?lesson=${encodeURIComponent(Z)}` : `learning/${e}`, Q = j ?? new Set(Y.slice(0, 1).map((e) => e.id)), $ = Y.length > 0 && Y.every((e) => Q.has(e.id)), Ce = (e) => {
|
|
126
181
|
let t = new Set(Q);
|
|
127
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
182
|
+
t.has(e) ? t.delete(e) : t.add(e), L(t);
|
|
128
183
|
};
|
|
129
|
-
return a ?
|
|
184
|
+
return a ? y.isLoading ? /* @__PURE__ */ M(r, {
|
|
130
185
|
title: _("buildmyiq.course.pageTitle", "Course"),
|
|
131
|
-
children: /* @__PURE__ */
|
|
132
|
-
}) :
|
|
186
|
+
children: /* @__PURE__ */ M(u, { label: _("buildmyiq.course.loading", "Loading course…") })
|
|
187
|
+
}) : y.isError ? /* @__PURE__ */ M(r, {
|
|
133
188
|
title: _("buildmyiq.course.pageTitle", "Course"),
|
|
134
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ M(l, {
|
|
135
190
|
title: _("buildmyiq.course.errorTitle", "Couldn't load this course"),
|
|
136
|
-
message:
|
|
137
|
-
onRetry: () =>
|
|
191
|
+
message: y.error instanceof Error ? y.error.message : void 0,
|
|
192
|
+
onRetry: () => y.refetch()
|
|
138
193
|
})
|
|
139
|
-
}) :
|
|
140
|
-
title:
|
|
141
|
-
children: /* @__PURE__ */
|
|
194
|
+
}) : R ? /* @__PURE__ */ M(r, {
|
|
195
|
+
title: R.title,
|
|
196
|
+
children: /* @__PURE__ */ N("div", {
|
|
142
197
|
className: "mx-auto flex w-full max-w-6xl flex-col gap-6",
|
|
143
198
|
children: [
|
|
144
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ N("div", {
|
|
145
200
|
className: "flex flex-wrap items-center justify-between gap-3",
|
|
146
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ N("nav", {
|
|
147
202
|
className: "flex min-w-0 items-center gap-1.5 text-sm",
|
|
148
203
|
"aria-label": "Breadcrumb",
|
|
149
204
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ M("button", {
|
|
151
206
|
type: "button",
|
|
152
|
-
onClick: () =>
|
|
207
|
+
onClick: () => p("catalog"),
|
|
153
208
|
className: "shrink-0 font-medium text-[var(--color-accent-teal)] transition-colors hover:opacity-80",
|
|
154
209
|
children: _("buildmyiq.course.breadcrumbCatalog", "Catalog")
|
|
155
210
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ M("span", {
|
|
157
212
|
className: "shrink-0 text-text-tertiary",
|
|
158
213
|
children: "/"
|
|
159
214
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ M("span", {
|
|
161
216
|
className: "truncate text-text-secondary",
|
|
162
|
-
children:
|
|
217
|
+
children: R.title
|
|
163
218
|
})
|
|
164
219
|
]
|
|
165
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ N("button", {
|
|
166
221
|
type: "button",
|
|
167
|
-
onClick: () =>
|
|
222
|
+
onClick: () => p("catalog"),
|
|
168
223
|
className: "inline-flex shrink-0 items-center gap-1.5 text-sm text-text-secondary transition-colors hover:text-text-primary",
|
|
169
224
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ M(ue, { className: "h-4 w-4 rtl:-scale-x-100" }),
|
|
171
226
|
" ",
|
|
172
227
|
_("buildmyiq.course.backToCatalog", "Back to catalog")
|
|
173
228
|
]
|
|
174
229
|
})]
|
|
175
230
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ N("div", {
|
|
177
232
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem]",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
233
|
+
children: [/* @__PURE__ */ M(F, {
|
|
179
234
|
treatment: "plain",
|
|
180
235
|
className: "overflow-hidden",
|
|
181
|
-
children: /* @__PURE__ */
|
|
236
|
+
children: /* @__PURE__ */ N("div", {
|
|
182
237
|
className: "grid grid-cols-1 sm:grid-cols-[minmax(0,15rem)_minmax(0,1fr)]",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ M("div", {
|
|
184
239
|
className: "relative h-44 w-full overflow-hidden bg-bg-sunken sm:h-full",
|
|
185
|
-
children:
|
|
186
|
-
src:
|
|
240
|
+
children: R.cover?.downloadUrl ? /* @__PURE__ */ M("img", {
|
|
241
|
+
src: R.cover.downloadUrl,
|
|
187
242
|
alt: "",
|
|
188
243
|
className: "h-full w-full object-cover"
|
|
189
|
-
}) : /* @__PURE__ */
|
|
244
|
+
}) : /* @__PURE__ */ M("div", {
|
|
190
245
|
className: "flex h-full min-h-[11rem] w-full items-center justify-center bg-[var(--color-accent-soft)]",
|
|
191
|
-
children: /* @__PURE__ */
|
|
246
|
+
children: /* @__PURE__ */ M(fe, { className: "h-10 w-10 text-text-secondary opacity-60" })
|
|
192
247
|
})
|
|
193
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ N("div", {
|
|
194
249
|
className: "flex flex-col gap-4 p-6",
|
|
195
250
|
children: [
|
|
196
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ N("div", {
|
|
197
252
|
className: "flex flex-wrap items-center gap-2",
|
|
198
|
-
children: [
|
|
253
|
+
children: [
|
|
254
|
+
/* @__PURE__ */ M(s, { status: R.level }),
|
|
255
|
+
/* @__PURE__ */ M(s, { status: R.status }),
|
|
256
|
+
/* @__PURE__ */ M(ve, {
|
|
257
|
+
courseId: R.id,
|
|
258
|
+
enabled: !!v && R.status === "PUBLISHED"
|
|
259
|
+
})
|
|
260
|
+
]
|
|
199
261
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("h1", {
|
|
201
263
|
className: "text-2xl font-semibold tracking-tight text-text-primary",
|
|
202
|
-
children:
|
|
203
|
-
}),
|
|
264
|
+
children: R.title
|
|
265
|
+
}), R.summary && /* @__PURE__ */ M("p", {
|
|
204
266
|
className: "mt-2 text-sm text-text-secondary",
|
|
205
|
-
children:
|
|
267
|
+
children: R.summary
|
|
206
268
|
})] }),
|
|
207
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ N("div", {
|
|
208
270
|
className: "flex flex-wrap gap-2",
|
|
209
271
|
children: [
|
|
210
|
-
|
|
211
|
-
icon:
|
|
212
|
-
children:
|
|
272
|
+
R.skill?.name && /* @__PURE__ */ M(B, {
|
|
273
|
+
icon: he,
|
|
274
|
+
children: R.skill.name
|
|
213
275
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
icon:
|
|
276
|
+
/* @__PURE__ */ M(B, {
|
|
277
|
+
icon: E,
|
|
216
278
|
children: _("buildmyiq.course.meta.modulesLessons", "{{modules}} module{{modulesSuffix}} · {{lessons}} lesson{{lessonsSuffix}}", {
|
|
217
|
-
modules:
|
|
218
|
-
modulesSuffix:
|
|
279
|
+
modules: V.length,
|
|
280
|
+
modulesSuffix: V.length === 1 ? "" : "s",
|
|
219
281
|
lessons: X,
|
|
220
282
|
lessonsSuffix: X === 1 ? "" : "s"
|
|
221
283
|
})
|
|
222
284
|
}),
|
|
223
|
-
|
|
224
|
-
icon:
|
|
225
|
-
children: o(
|
|
285
|
+
R.estimatedHours > 0 && /* @__PURE__ */ M(B, {
|
|
286
|
+
icon: w,
|
|
287
|
+
children: o(R.estimatedHours)
|
|
226
288
|
})
|
|
227
289
|
]
|
|
228
290
|
}),
|
|
229
|
-
|
|
291
|
+
R.tags.length > 0 && /* @__PURE__ */ M("div", {
|
|
230
292
|
className: "flex flex-wrap gap-1.5",
|
|
231
|
-
children:
|
|
293
|
+
children: R.tags.map((e) => /* @__PURE__ */ M("span", {
|
|
232
294
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
233
295
|
children: e
|
|
234
296
|
}, e))
|
|
235
297
|
}),
|
|
236
|
-
|
|
298
|
+
R.description && /* @__PURE__ */ M("p", {
|
|
237
299
|
className: "whitespace-pre-wrap text-sm leading-relaxed text-text-secondary",
|
|
238
|
-
children:
|
|
300
|
+
children: R.description
|
|
239
301
|
})
|
|
240
302
|
]
|
|
241
303
|
})]
|
|
242
304
|
})
|
|
243
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ M(F, {
|
|
244
306
|
treatment: "glass",
|
|
245
307
|
glow: !0,
|
|
246
308
|
className: "h-fit p-5 lg:sticky lg:top-4",
|
|
247
|
-
children:
|
|
309
|
+
children: W ? /* @__PURE__ */ N("div", {
|
|
248
310
|
className: "flex flex-col gap-4",
|
|
249
311
|
children: [
|
|
250
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ N(P, {
|
|
251
313
|
size: "lg",
|
|
252
314
|
className: "w-full",
|
|
253
|
-
onClick: () =>
|
|
315
|
+
onClick: () => p(Se(W.id)),
|
|
254
316
|
children: [
|
|
255
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ M(k, { className: "me-2 h-4 w-4" }),
|
|
256
318
|
" ",
|
|
257
319
|
_("buildmyiq.course.enrol.continueLearning", "Continue learning")
|
|
258
320
|
]
|
|
259
321
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ N("div", {
|
|
261
323
|
className: "flex flex-col gap-1.5",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ N("div", {
|
|
263
325
|
className: "flex items-center justify-between text-sm",
|
|
264
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ M("span", {
|
|
265
327
|
className: "text-text-secondary",
|
|
266
328
|
children: _("buildmyiq.course.enrol.yourProgress", "Your progress")
|
|
267
|
-
}), /* @__PURE__ */
|
|
329
|
+
}), /* @__PURE__ */ N("span", {
|
|
268
330
|
className: "font-semibold tabular-nums text-text-primary",
|
|
269
|
-
children: [
|
|
331
|
+
children: [W.progressPct, "%"]
|
|
270
332
|
})]
|
|
271
|
-
}), /* @__PURE__ */
|
|
272
|
-
value:
|
|
333
|
+
}), /* @__PURE__ */ M(ee, {
|
|
334
|
+
value: W.progressPct,
|
|
273
335
|
label: _("buildmyiq.course.enrol.yourProgress", "Your progress")
|
|
274
336
|
})]
|
|
275
337
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ N("div", {
|
|
277
339
|
className: "flex items-center justify-between border-t border-border-seam pt-3 text-xs",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
340
|
+
children: [/* @__PURE__ */ M("span", {
|
|
279
341
|
className: "text-text-secondary",
|
|
280
342
|
children: _("buildmyiq.course.enrol.enrollment", "Enrollment")
|
|
281
|
-
}), /* @__PURE__ */
|
|
343
|
+
}), /* @__PURE__ */ M(s, { status: W.status })]
|
|
282
344
|
})
|
|
283
345
|
]
|
|
284
|
-
}) : /* @__PURE__ */
|
|
346
|
+
}) : /* @__PURE__ */ N("div", {
|
|
285
347
|
className: "flex flex-col gap-4",
|
|
286
348
|
children: [
|
|
287
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ M(le, {
|
|
288
350
|
resource: "buildmyiq-enrollment",
|
|
289
351
|
action: "create",
|
|
290
352
|
deniedBehavior: "tooltip",
|
|
291
|
-
children: /* @__PURE__ */
|
|
353
|
+
children: /* @__PURE__ */ N(P, {
|
|
292
354
|
size: "lg",
|
|
293
355
|
className: "w-full",
|
|
294
356
|
onClick: async () => {
|
|
295
|
-
if (!(!a || !
|
|
296
|
-
|
|
357
|
+
if (!(!a || !v)) {
|
|
358
|
+
A(null);
|
|
297
359
|
try {
|
|
298
|
-
let e = await
|
|
360
|
+
let e = await T.mutateAsync({
|
|
299
361
|
courseId: a,
|
|
300
|
-
learnerId:
|
|
362
|
+
learnerId: v
|
|
301
363
|
});
|
|
302
|
-
|
|
364
|
+
D({
|
|
303
365
|
courseId: a,
|
|
304
366
|
enrollmentId: e.id
|
|
305
|
-
}),
|
|
367
|
+
}), p(`learning/${e.id}`);
|
|
306
368
|
} catch (e) {
|
|
307
|
-
|
|
369
|
+
A(e instanceof Error ? e.message : _("buildmyiq.course.enrol.enrolError", "Could not enrol in this course."));
|
|
308
370
|
}
|
|
309
371
|
}
|
|
310
372
|
},
|
|
311
|
-
disabled:
|
|
373
|
+
disabled: T.isPending || !v,
|
|
312
374
|
children: [
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
|
|
315
|
-
!
|
|
375
|
+
/* @__PURE__ */ M(me, { className: "me-2 h-4 w-4" }),
|
|
376
|
+
T.isPending ? _("buildmyiq.course.enrol.enrolling", "Enrolling…") : _("buildmyiq.course.enrol.enrolButton", "Enrol in this course"),
|
|
377
|
+
!T.isPending && /* @__PURE__ */ M(de, { className: "ms-2 h-4 w-4 rtl:-scale-x-100" })
|
|
316
378
|
]
|
|
317
379
|
})
|
|
318
380
|
}),
|
|
319
|
-
!
|
|
381
|
+
!v && /* @__PURE__ */ M("p", {
|
|
320
382
|
className: "text-xs text-text-tertiary",
|
|
321
383
|
children: _("buildmyiq.course.enrol.signInToEnrol", "Sign in to your workspace to enrol.")
|
|
322
384
|
}),
|
|
323
|
-
|
|
385
|
+
O && /* @__PURE__ */ M("p", {
|
|
324
386
|
role: "alert",
|
|
325
387
|
className: "text-xs text-status-error-text",
|
|
326
|
-
children:
|
|
388
|
+
children: O
|
|
327
389
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ N("dl", {
|
|
329
391
|
className: "flex flex-col gap-2.5 border-t border-border-seam pt-3 text-sm",
|
|
330
392
|
children: [
|
|
331
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ N("div", {
|
|
332
394
|
className: "flex items-center justify-between",
|
|
333
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
334
396
|
className: "inline-flex items-center gap-1.5 text-text-secondary",
|
|
335
397
|
children: [
|
|
336
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ M(E, { className: "h-3.5 w-3.5 text-text-tertiary" }),
|
|
337
399
|
" ",
|
|
338
400
|
_("buildmyiq.course.enrol.lessonsMeta", "Lessons")
|
|
339
401
|
]
|
|
340
|
-
}), /* @__PURE__ */
|
|
402
|
+
}), /* @__PURE__ */ M("dd", {
|
|
341
403
|
className: "font-medium tabular-nums text-text-primary",
|
|
342
404
|
children: X
|
|
343
405
|
})]
|
|
344
406
|
}),
|
|
345
|
-
|
|
407
|
+
R.estimatedHours > 0 && /* @__PURE__ */ N("div", {
|
|
346
408
|
className: "flex items-center justify-between",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
348
410
|
className: "inline-flex items-center gap-1.5 text-text-secondary",
|
|
349
411
|
children: [
|
|
350
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ M(w, { className: "h-3.5 w-3.5 text-text-tertiary" }),
|
|
351
413
|
" ",
|
|
352
414
|
_("buildmyiq.course.enrol.durationMeta", "Duration")
|
|
353
415
|
]
|
|
354
|
-
}), /* @__PURE__ */
|
|
416
|
+
}), /* @__PURE__ */ M("dd", {
|
|
355
417
|
className: "font-medium text-text-primary",
|
|
356
|
-
children: o(
|
|
418
|
+
children: o(R.estimatedHours)
|
|
357
419
|
})]
|
|
358
420
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ N("div", {
|
|
360
422
|
className: "flex items-center justify-between",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
423
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
362
424
|
className: "inline-flex items-center gap-1.5 text-text-secondary",
|
|
363
425
|
children: [
|
|
364
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ M(S, { className: "h-3.5 w-3.5 text-text-tertiary" }),
|
|
365
427
|
" ",
|
|
366
428
|
_("buildmyiq.course.enrol.assessmentsMeta", "Assessments")
|
|
367
429
|
]
|
|
368
|
-
}), /* @__PURE__ */
|
|
430
|
+
}), /* @__PURE__ */ M("dd", {
|
|
369
431
|
className: "font-medium tabular-nums text-text-primary",
|
|
370
|
-
children:
|
|
432
|
+
children: xe
|
|
371
433
|
})]
|
|
372
434
|
})
|
|
373
435
|
]
|
|
@@ -376,181 +438,181 @@ var M = "buildmyiq-course", _e = "__ungrouped__", N = {
|
|
|
376
438
|
})
|
|
377
439
|
})]
|
|
378
440
|
}),
|
|
379
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ N("div", {
|
|
380
442
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1.7fr)_minmax(0,1fr)]",
|
|
381
|
-
children: [/* @__PURE__ */
|
|
443
|
+
children: [/* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(d, {
|
|
382
444
|
title: _("buildmyiq.course.curriculumTitle", "Curriculum"),
|
|
383
445
|
description: _("buildmyiq.course.curriculumDescription", "Modules and lessons in this course."),
|
|
384
|
-
action: Y.length > 1 ? /* @__PURE__ */
|
|
446
|
+
action: Y.length > 1 ? /* @__PURE__ */ M("button", {
|
|
385
447
|
type: "button",
|
|
386
448
|
onClick: () => {
|
|
387
|
-
|
|
449
|
+
L($ ? /* @__PURE__ */ new Set() : new Set(Y.map((e) => e.id)));
|
|
388
450
|
},
|
|
389
451
|
className: "text-sm font-medium text-[var(--color-accent-teal)] transition-colors hover:opacity-80",
|
|
390
452
|
children: $ ? _("buildmyiq.course.collapseAll", "Collapse all") : _("buildmyiq.course.expandAll", "Expand all")
|
|
391
453
|
}) : void 0,
|
|
392
|
-
children:
|
|
454
|
+
children: b.isLoading ? /* @__PURE__ */ M(u, { label: _("buildmyiq.course.loadingCurriculum", "Loading curriculum…") }) : b.isError ? /* @__PURE__ */ M(l, {
|
|
393
455
|
title: _("buildmyiq.course.curriculumErrorTitle", "Couldn't load the curriculum"),
|
|
394
|
-
message:
|
|
395
|
-
onRetry: () =>
|
|
396
|
-
}) : Y.length === 0 ? /* @__PURE__ */
|
|
456
|
+
message: b.error instanceof Error ? b.error.message : void 0,
|
|
457
|
+
onRetry: () => b.refetch()
|
|
458
|
+
}) : Y.length === 0 ? /* @__PURE__ */ M(c, {
|
|
397
459
|
illustration: "empty-data",
|
|
398
460
|
title: _("buildmyiq.course.noLessonsTitle", "No lessons yet"),
|
|
399
461
|
description: _("buildmyiq.course.noLessonsDescription", "The instructor hasn't added any modules or lessons to this course.")
|
|
400
|
-
}) : /* @__PURE__ */
|
|
462
|
+
}) : /* @__PURE__ */ N("div", {
|
|
401
463
|
className: "flex flex-col gap-3",
|
|
402
|
-
children: [
|
|
464
|
+
children: [W && G.isError && /* @__PURE__ */ M("p", {
|
|
403
465
|
className: "rounded-lg border border-status-warning-border bg-status-warning-bg-subtle px-3 py-2 text-xs text-status-warning-text",
|
|
404
466
|
children: _("buildmyiq.course.progressUnavailable", "Your completion marks couldn't be loaded, so the lessons below show no progress.")
|
|
405
467
|
}), Y.map((e, t) => {
|
|
406
468
|
let r = Q.has(e.id), i = `curriculum-panel-${e.id}`;
|
|
407
|
-
return /* @__PURE__ */
|
|
469
|
+
return /* @__PURE__ */ N("div", {
|
|
408
470
|
className: n("overflow-hidden rounded-xl border bg-bg-surface transition-colors", r ? "border-[var(--color-accent-soft)]" : "border-border-seam"),
|
|
409
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ N("button", {
|
|
410
472
|
type: "button",
|
|
411
|
-
onClick: () =>
|
|
473
|
+
onClick: () => Ce(e.id),
|
|
412
474
|
"aria-expanded": r,
|
|
413
475
|
"aria-controls": i,
|
|
414
476
|
className: "flex w-full items-center gap-3 px-4 py-3 text-start transition-colors hover:bg-bg-sunken/50",
|
|
415
477
|
children: [
|
|
416
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ M("span", {
|
|
417
479
|
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg text-xs font-semibold text-action-primary-text",
|
|
418
480
|
children: t + 1
|
|
419
481
|
}),
|
|
420
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ N("div", {
|
|
421
483
|
className: "min-w-0 flex-1",
|
|
422
|
-
children: [/* @__PURE__ */
|
|
484
|
+
children: [/* @__PURE__ */ M("h3", {
|
|
423
485
|
className: "truncate font-semibold text-text-primary",
|
|
424
486
|
children: e.title
|
|
425
|
-
}), e.description && r && /* @__PURE__ */
|
|
487
|
+
}), e.description && r && /* @__PURE__ */ M("p", {
|
|
426
488
|
className: "mt-0.5 line-clamp-2 text-sm text-text-secondary",
|
|
427
489
|
children: e.description
|
|
428
490
|
})]
|
|
429
491
|
}),
|
|
430
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ M("span", {
|
|
431
493
|
className: "shrink-0 text-xs text-text-tertiary",
|
|
432
|
-
children:
|
|
433
|
-
done: e.lessons.filter((e) =>
|
|
494
|
+
children: q ? _("buildmyiq.course.moduleProgress", "{{done}} of {{total}} complete", {
|
|
495
|
+
done: e.lessons.filter((e) => K.get(e.id) === "COMPLETED").length,
|
|
434
496
|
total: e.lessons.length
|
|
435
497
|
}) : _(e.lessons.length === 1 ? "buildmyiq.course.lessonCount" : "buildmyiq.course.lessonCountPlural", e.lessons.length === 1 ? "{{n}} lesson" : "{{n}} lessons", { n: e.lessons.length })
|
|
436
498
|
}),
|
|
437
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ M(pe, {
|
|
438
500
|
className: n("h-4 w-4 shrink-0 text-text-tertiary transition-transform", r && "rotate-180"),
|
|
439
501
|
"aria-hidden": !0
|
|
440
502
|
})
|
|
441
503
|
]
|
|
442
|
-
}), r && (e.lessons.length === 0 ? /* @__PURE__ */
|
|
504
|
+
}), r && (e.lessons.length === 0 ? /* @__PURE__ */ M("p", {
|
|
443
505
|
className: "border-t border-border-seam px-4 py-3 text-sm text-text-tertiary",
|
|
444
506
|
children: _("buildmyiq.course.noLessonsInModule", "No lessons in this module yet.")
|
|
445
|
-
}) : /* @__PURE__ */
|
|
507
|
+
}) : /* @__PURE__ */ M("ul", {
|
|
446
508
|
id: i,
|
|
447
509
|
className: "divide-y divide-border-seam border-t border-border-seam",
|
|
448
510
|
children: e.lessons.map((e, t) => {
|
|
449
|
-
let n =
|
|
450
|
-
return /* @__PURE__ */
|
|
511
|
+
let n = be(e.id);
|
|
512
|
+
return /* @__PURE__ */ M(z, {
|
|
451
513
|
lesson: e,
|
|
452
514
|
index: t,
|
|
453
515
|
progressStatus: n,
|
|
454
|
-
progressLabel: n ?
|
|
516
|
+
progressLabel: n ? ye[n] : void 0
|
|
455
517
|
}, e.id);
|
|
456
518
|
})
|
|
457
519
|
}))]
|
|
458
520
|
}, e.id);
|
|
459
521
|
})]
|
|
460
522
|
})
|
|
461
|
-
}) }), /* @__PURE__ */
|
|
523
|
+
}) }), /* @__PURE__ */ N("div", {
|
|
462
524
|
className: "flex flex-col gap-6",
|
|
463
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(d, {
|
|
464
526
|
title: _("buildmyiq.course.assessmentsTitle", "Assessments"),
|
|
465
527
|
description: _("buildmyiq.course.assessmentsDescription", "Quizzes and exams for this course."),
|
|
466
|
-
children:
|
|
528
|
+
children: x.isLoading ? /* @__PURE__ */ M(u, { label: _("buildmyiq.course.loadingAssessments", "Loading assessments…") }) : x.isError ? /* @__PURE__ */ M(l, {
|
|
467
529
|
title: _("buildmyiq.course.assessmentsErrorTitle", "Couldn't load assessments"),
|
|
468
|
-
message:
|
|
469
|
-
onRetry: () =>
|
|
470
|
-
}) :
|
|
530
|
+
message: x.error instanceof Error ? x.error.message : void 0,
|
|
531
|
+
onRetry: () => x.refetch()
|
|
532
|
+
}) : H.length === 0 ? /* @__PURE__ */ M(c, {
|
|
471
533
|
illustration: "empty-data",
|
|
472
|
-
icon: /* @__PURE__ */
|
|
534
|
+
icon: /* @__PURE__ */ M(S, { className: "h-9 w-9" }),
|
|
473
535
|
title: _("buildmyiq.course.noAssessmentsTitle", "No assessments yet"),
|
|
474
536
|
description: _("buildmyiq.course.noAssessmentsDescription", "This course doesn't have any quizzes or exams attached.")
|
|
475
|
-
}) : /* @__PURE__ */
|
|
537
|
+
}) : /* @__PURE__ */ M("ul", {
|
|
476
538
|
className: "flex flex-col gap-3",
|
|
477
|
-
children:
|
|
539
|
+
children: H.map((e) => /* @__PURE__ */ N("li", {
|
|
478
540
|
className: "rounded-xl border border-border-seam bg-bg-surface p-4",
|
|
479
|
-
children: [/* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ N("div", {
|
|
480
542
|
className: "flex items-start gap-3",
|
|
481
|
-
children: [/* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ M("span", {
|
|
482
544
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
|
|
483
|
-
children: /* @__PURE__ */
|
|
484
|
-
}), /* @__PURE__ */
|
|
545
|
+
children: /* @__PURE__ */ M(S, { className: "h-4 w-4" })
|
|
546
|
+
}), /* @__PURE__ */ N("div", {
|
|
485
547
|
className: "min-w-0 flex-1",
|
|
486
548
|
children: [
|
|
487
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ M("p", {
|
|
488
550
|
className: "font-medium text-text-primary",
|
|
489
551
|
children: e.title
|
|
490
552
|
}),
|
|
491
|
-
/* @__PURE__ */
|
|
553
|
+
/* @__PURE__ */ N("div", {
|
|
492
554
|
className: "mt-1.5 flex flex-wrap items-center gap-1.5",
|
|
493
|
-
children: [/* @__PURE__ */
|
|
555
|
+
children: [/* @__PURE__ */ M(s, { status: e.type }), /* @__PURE__ */ M(s, { status: e.status })]
|
|
494
556
|
}),
|
|
495
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ N("div", {
|
|
496
558
|
className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-text-secondary",
|
|
497
559
|
children: [
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ M("span", { children: _("buildmyiq.course.meta.passAtLeast", "Pass ≥ {{score}}%", { score: e.passingScore }) }),
|
|
561
|
+
/* @__PURE__ */ M("span", { children: _("buildmyiq.course.meta.attemptCount", "{{count}} attempt{{suffix}}", {
|
|
500
562
|
count: e.maxAttempts,
|
|
501
563
|
suffix: e.maxAttempts === 1 ? "" : "s"
|
|
502
564
|
}) }),
|
|
503
|
-
e.timeLimitMin > 0 && /* @__PURE__ */
|
|
565
|
+
e.timeLimitMin > 0 && /* @__PURE__ */ N("span", {
|
|
504
566
|
className: "inline-flex items-center gap-1",
|
|
505
|
-
children: [/* @__PURE__ */
|
|
567
|
+
children: [/* @__PURE__ */ M(w, { className: "h-3.5 w-3.5" }), i(e.timeLimitMin)]
|
|
506
568
|
})
|
|
507
569
|
]
|
|
508
570
|
})
|
|
509
571
|
]
|
|
510
572
|
})]
|
|
511
|
-
}), e.status === "PUBLISHED" &&
|
|
573
|
+
}), e.status === "PUBLISHED" && W && /* @__PURE__ */ M("div", {
|
|
512
574
|
className: "mt-3 flex justify-end",
|
|
513
|
-
children: /* @__PURE__ */
|
|
575
|
+
children: /* @__PURE__ */ M(P, {
|
|
514
576
|
size: "sm",
|
|
515
|
-
onClick: () =>
|
|
577
|
+
onClick: () => p(`assessments/${e.id}/take`),
|
|
516
578
|
children: _("buildmyiq.course.takeAssessment", "Take")
|
|
517
579
|
})
|
|
518
580
|
})]
|
|
519
581
|
}, e.id))
|
|
520
582
|
})
|
|
521
|
-
}) }), /* @__PURE__ */
|
|
522
|
-
entityType:
|
|
583
|
+
}) }), /* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(se, {
|
|
584
|
+
entityType: I,
|
|
523
585
|
entityId: a,
|
|
524
586
|
description: _("buildmyiq.course.discussionDescription", "Ask questions and discuss this course with your workspace.")
|
|
525
587
|
}) })]
|
|
526
588
|
})]
|
|
527
589
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
entityType:
|
|
590
|
+
/* @__PURE__ */ M("div", { children: /* @__PURE__ */ M(ce, {
|
|
591
|
+
entityType: I,
|
|
530
592
|
entityId: a
|
|
531
593
|
}) })
|
|
532
594
|
]
|
|
533
595
|
})
|
|
534
|
-
}) : /* @__PURE__ */
|
|
596
|
+
}) : /* @__PURE__ */ M(r, {
|
|
535
597
|
title: _("buildmyiq.course.pageTitle", "Course"),
|
|
536
|
-
children: /* @__PURE__ */
|
|
598
|
+
children: /* @__PURE__ */ M(c, {
|
|
537
599
|
illustration: "empty-search",
|
|
538
600
|
title: _("buildmyiq.course.notFoundTitle", "Course not found"),
|
|
539
601
|
description: _("buildmyiq.course.notFoundDescription", "This course may have been unpublished or removed."),
|
|
540
|
-
action: /* @__PURE__ */
|
|
541
|
-
onClick: () =>
|
|
602
|
+
action: /* @__PURE__ */ M(P, {
|
|
603
|
+
onClick: () => p("catalog"),
|
|
542
604
|
children: _("buildmyiq.course.backToCatalog", "Back to catalog")
|
|
543
605
|
})
|
|
544
606
|
})
|
|
545
|
-
}) : /* @__PURE__ */
|
|
607
|
+
}) : /* @__PURE__ */ M(r, {
|
|
546
608
|
title: _("buildmyiq.course.pageTitle", "Course"),
|
|
547
|
-
children: /* @__PURE__ */
|
|
609
|
+
children: /* @__PURE__ */ M(l, {
|
|
548
610
|
title: _("buildmyiq.course.missingTitle", "Missing course"),
|
|
549
611
|
message: _("buildmyiq.course.missingMessage", "No course was specified.")
|
|
550
612
|
})
|
|
551
613
|
});
|
|
552
614
|
};
|
|
553
615
|
//#endregion
|
|
554
|
-
export {
|
|
616
|
+
export { V as CourseDetailPage };
|
|
555
617
|
|
|
556
618
|
//# sourceMappingURL=CourseDetailPage.js.map
|