@burdenoff/microfe-buildmyiq 2026.1029.5 → 2026.1030.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buildmyiq/BuildmyiqAdminRoot.d.ts.map +1 -1
- package/dist/buildmyiq/BuildmyiqAdminRoot.js +160 -165
- package/dist/buildmyiq/BuildmyiqAdminRoot.js.map +1 -1
- package/dist/buildmyiq/components/Pagination.d.ts +5 -5
- package/dist/buildmyiq/components/Pagination.js.map +1 -1
- package/dist/buildmyiq/hooks/index.d.ts +1 -1
- package/dist/buildmyiq/hooks/index.js +1 -1
- package/dist/buildmyiq/hooks/useBuildmyiqApi.d.ts +4 -4
- package/dist/buildmyiq/hooks/useBuildmyiqApi.d.ts.map +1 -1
- package/dist/buildmyiq/hooks/useBuildmyiqApi.js +14 -14
- package/dist/buildmyiq/hooks/useBuildmyiqApi.js.map +1 -1
- package/dist/buildmyiq/hooks/useOffsetPager.d.ts +28 -0
- package/dist/buildmyiq/hooks/useOffsetPager.d.ts.map +1 -0
- package/dist/buildmyiq/hooks/useOffsetPager.js +19 -0
- package/dist/buildmyiq/hooks/useOffsetPager.js.map +1 -0
- package/dist/buildmyiq/pages/authoring/AuthoringPage.js +4 -4
- package/dist/buildmyiq/pages/authoring/AuthoringPage.js.map +1 -1
- package/dist/buildmyiq/pages/catalog/CatalogPage.js +4 -4
- package/dist/buildmyiq/pages/catalog/CatalogPage.js.map +1 -1
- package/dist/buildmyiq/pages/learning/LessonPlayerPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/learning/LessonPlayerPage.js +218 -200
- package/dist/buildmyiq/pages/learning/LessonPlayerPage.js.map +1 -1
- package/dist/buildmyiq/pages/submissions/BulkGradingPage.js +4 -4
- package/dist/buildmyiq/pages/submissions/BulkGradingPage.js.map +1 -1
- package/dist/buildmyiq/pages/submissions/SubmissionsPage.js +4 -4
- package/dist/buildmyiq/pages/submissions/SubmissionsPage.js.map +1 -1
- package/dist/buildmyiq/pages/tutorReview/TutorReviewPage.js +4 -4
- package/dist/buildmyiq/pages/tutorReview/TutorReviewPage.js.map +1 -1
- package/dist/buildmyiq/types/index.d.ts +5 -5
- package/dist/buildmyiq/types/index.d.ts.map +1 -1
- package/dist/buildmyiq/types/index.js.map +1 -1
- package/dist/stories/CourseCard.stories.d.ts +9 -0
- package/dist/stories/CourseCard.stories.d.ts.map +1 -0
- package/dist/stories/EmptyState.stories.d.ts.map +1 -1
- package/dist/stories/FilterTabs.stories.d.ts +13 -0
- package/dist/stories/FilterTabs.stories.d.ts.map +1 -0
- package/dist/stories/MetricsCard.stories.d.ts +1 -0
- package/dist/stories/MetricsCard.stories.d.ts.map +1 -1
- package/dist/stories/Pagination.stories.d.ts +9 -0
- package/dist/stories/Pagination.stories.d.ts.map +1 -0
- package/dist/stories/StateViews.stories.d.ts +8 -0
- package/dist/stories/StateViews.stories.d.ts.map +1 -0
- package/dist/stories/StatusBadge.stories.d.ts +1 -0
- package/dist/stories/StatusBadge.stories.d.ts.map +1 -1
- package/dist/stories/Tabs.stories.d.ts +12 -0
- package/dist/stories/Tabs.stories.d.ts.map +1 -0
- package/dist/stories/fixtures/courses.d.ts +6 -0
- package/dist/stories/fixtures/courses.d.ts.map +1 -0
- package/package.json +2 -1
- package/dist/buildmyiq/hooks/useCursorPager.d.ts +0 -33
- package/dist/buildmyiq/hooks/useCursorPager.d.ts.map +0 -1
- package/dist/buildmyiq/hooks/useCursorPager.js +0 -25
- package/dist/buildmyiq/hooks/useCursorPager.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuildmyiqAdminRoot.d.ts","sourceRoot":"","sources":["../../src/buildmyiq/BuildmyiqAdminRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BuildmyiqAdminRoot.d.ts","sourceRoot":"","sources":["../../src/buildmyiq/BuildmyiqAdminRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA2BhC,OAAO,KAAK,EACV,kBAAkB,EAQnB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,0GAA0G;IAC1G,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA+lBD,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAsB1D,CAAC;AAEF,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,CAAC"}
|
|
@@ -9,20 +9,21 @@ import { FilterTabs as p } from "./components/FilterTabs.js";
|
|
|
9
9
|
import { Tabs as m } from "./components/Tabs.js";
|
|
10
10
|
import { Pagination as h } from "./components/Pagination.js";
|
|
11
11
|
import { useBuiArchiveCourse as g, useBuiAssessments as _, useBuiCourses as v, useBuiEnrollments as y, useBuiPublishCourse as b, useBuiSubmissions as x } from "./hooks/useBuildmyiqApi.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
12
|
+
import { useOffsetPager as S } from "./hooks/useOffsetPager.js";
|
|
13
|
+
import { BuiPermissionButton as C } from "./components/BuiPermissionButton.js";
|
|
14
|
+
import { useMemo as w, useState as T } from "react";
|
|
15
|
+
import { QueryClient as E, QueryClientProvider as D } from "@tanstack/react-query";
|
|
16
|
+
import { FeatureFlagProvider as O } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
17
|
+
import { PermissionProvider as k } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
18
|
+
import { BookOpen as A, CheckSquare as j, ClipboardCheck as M, GraduationCap as N, Users as P } from "lucide-react";
|
|
19
|
+
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
20
|
+
import { Button as R } from "@burdenoff/fe-libs/ui";
|
|
20
21
|
//#region src/buildmyiq/BuildmyiqAdminRoot.tsx
|
|
21
|
-
var
|
|
22
|
+
var z = new E({ defaultOptions: { queries: {
|
|
22
23
|
staleTime: 30 * 1e3,
|
|
23
24
|
retry: 1,
|
|
24
25
|
refetchOnWindowFocus: !1
|
|
25
|
-
} } }),
|
|
26
|
+
} } }), B = 12, V = [
|
|
26
27
|
{
|
|
27
28
|
value: "ALL",
|
|
28
29
|
label: "All"
|
|
@@ -43,7 +44,7 @@ var R = new T({ defaultOptions: { queries: {
|
|
|
43
44
|
value: "ARCHIVED",
|
|
44
45
|
label: "Archived"
|
|
45
46
|
}
|
|
46
|
-
],
|
|
47
|
+
], H = [
|
|
47
48
|
{
|
|
48
49
|
value: "ALL",
|
|
49
50
|
label: "All"
|
|
@@ -68,7 +69,7 @@ var R = new T({ defaultOptions: { queries: {
|
|
|
68
69
|
value: "EXPIRED",
|
|
69
70
|
label: "Expired"
|
|
70
71
|
}
|
|
71
|
-
],
|
|
72
|
+
], U = [
|
|
72
73
|
{
|
|
73
74
|
value: "ALL",
|
|
74
75
|
label: "All"
|
|
@@ -90,15 +91,15 @@ var R = new T({ defaultOptions: { queries: {
|
|
|
90
91
|
label: "Returned"
|
|
91
92
|
}
|
|
92
93
|
];
|
|
93
|
-
function
|
|
94
|
+
function W({ course: e }) {
|
|
94
95
|
let t = b(), n = g();
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
+
return /* @__PURE__ */ L("div", {
|
|
96
97
|
className: "flex flex-wrap items-center gap-2",
|
|
97
98
|
children: [
|
|
98
|
-
e.status === "DRAFT" && /* @__PURE__ */
|
|
99
|
+
e.status === "DRAFT" && /* @__PURE__ */ I(C, {
|
|
99
100
|
resource: "buildmyiq-course",
|
|
100
101
|
action: "update",
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ I(R, {
|
|
102
103
|
variant: "outline",
|
|
103
104
|
size: "sm",
|
|
104
105
|
onClick: () => t.mutate(e.id),
|
|
@@ -106,10 +107,10 @@ function U({ course: e }) {
|
|
|
106
107
|
children: "Publish"
|
|
107
108
|
})
|
|
108
109
|
}),
|
|
109
|
-
e.status !== "ARCHIVED" && /* @__PURE__ */
|
|
110
|
+
e.status !== "ARCHIVED" && /* @__PURE__ */ I(C, {
|
|
110
111
|
resource: "buildmyiq-course",
|
|
111
112
|
action: "delete",
|
|
112
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ I(R, {
|
|
113
114
|
variant: "outline",
|
|
114
115
|
size: "sm",
|
|
115
116
|
onClick: () => n.mutate(e.id),
|
|
@@ -117,28 +118,28 @@ function U({ course: e }) {
|
|
|
117
118
|
children: "Archive"
|
|
118
119
|
})
|
|
119
120
|
}),
|
|
120
|
-
e.status === "ARCHIVED" && /* @__PURE__ */
|
|
121
|
+
e.status === "ARCHIVED" && /* @__PURE__ */ I("span", {
|
|
121
122
|
className: "text-xs text-text-secondary",
|
|
122
123
|
children: "Archived"
|
|
123
124
|
})
|
|
124
125
|
]
|
|
125
126
|
});
|
|
126
127
|
}
|
|
127
|
-
function
|
|
128
|
-
let [e, t] =
|
|
128
|
+
function G() {
|
|
129
|
+
let [e, t] = T("ALL"), r = S(B), { data: o, isLoading: m, error: g, refetch: _ } = v({
|
|
129
130
|
status: e === "ALL" ? void 0 : e,
|
|
130
|
-
|
|
131
|
-
limit:
|
|
132
|
-
}),
|
|
131
|
+
offset: r.offset,
|
|
132
|
+
limit: B
|
|
133
|
+
}), y = w(() => [
|
|
133
134
|
{
|
|
134
135
|
key: "title",
|
|
135
136
|
header: "Course",
|
|
136
|
-
render: (e) => /* @__PURE__ */
|
|
137
|
+
render: (e) => /* @__PURE__ */ L("div", {
|
|
137
138
|
className: "min-w-0",
|
|
138
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ I("p", {
|
|
139
140
|
className: "font-medium text-text-primary truncate",
|
|
140
141
|
children: e.title
|
|
141
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ I("p", {
|
|
142
143
|
className: "text-xs text-text-secondary",
|
|
143
144
|
children: e.slug
|
|
144
145
|
})]
|
|
@@ -148,12 +149,12 @@ function W() {
|
|
|
148
149
|
{
|
|
149
150
|
key: "status",
|
|
150
151
|
header: "Status",
|
|
151
|
-
render: (e) => /* @__PURE__ */
|
|
152
|
+
render: (e) => /* @__PURE__ */ I(s, { status: e.status })
|
|
152
153
|
},
|
|
153
154
|
{
|
|
154
155
|
key: "level",
|
|
155
156
|
header: "Level",
|
|
156
|
-
render: (e) => /* @__PURE__ */
|
|
157
|
+
render: (e) => /* @__PURE__ */ I(s, { status: e.level })
|
|
157
158
|
},
|
|
158
159
|
{
|
|
159
160
|
key: "lessons",
|
|
@@ -184,65 +185,63 @@ function W() {
|
|
|
184
185
|
key: "actions",
|
|
185
186
|
header: "Actions",
|
|
186
187
|
align: "right",
|
|
187
|
-
render: (e) => /* @__PURE__ */
|
|
188
|
+
render: (e) => /* @__PURE__ */ I(W, { course: e })
|
|
188
189
|
}
|
|
189
|
-
], [])
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
if (b) return /* @__PURE__ */ F(u, { label: "Loading courses…" });
|
|
193
|
-
if (x) return /* @__PURE__ */ F(l, {
|
|
190
|
+
], []);
|
|
191
|
+
if (m) return /* @__PURE__ */ I(u, { label: "Loading courses…" });
|
|
192
|
+
if (g) return /* @__PURE__ */ I(l, {
|
|
194
193
|
title: "Could not load courses",
|
|
195
|
-
message:
|
|
196
|
-
onRetry:
|
|
194
|
+
message: g.message,
|
|
195
|
+
onRetry: _
|
|
197
196
|
});
|
|
198
|
-
let
|
|
199
|
-
return /* @__PURE__ */
|
|
197
|
+
let b = o?.items ?? [];
|
|
198
|
+
return /* @__PURE__ */ L(d, {
|
|
200
199
|
title: "Course catalog",
|
|
201
200
|
description: "Publish, archive and inspect courses.",
|
|
202
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ I("div", {
|
|
203
202
|
className: "mb-4",
|
|
204
|
-
children: /* @__PURE__ */
|
|
205
|
-
options:
|
|
203
|
+
children: /* @__PURE__ */ I(p, {
|
|
204
|
+
options: V,
|
|
206
205
|
value: e,
|
|
207
206
|
onChange: (e) => {
|
|
208
|
-
t(e),
|
|
207
|
+
t(e), r.reset();
|
|
209
208
|
}
|
|
210
209
|
})
|
|
211
|
-
}),
|
|
212
|
-
icon: /* @__PURE__ */
|
|
210
|
+
}), b.length === 0 ? /* @__PURE__ */ I(c, {
|
|
211
|
+
icon: /* @__PURE__ */ I(A, { size: 40 }),
|
|
213
212
|
title: "No courses found",
|
|
214
213
|
description: `There are no ${e === "ALL" ? "" : e.toLowerCase()} courses in this workspace.`
|
|
215
|
-
}) : /* @__PURE__ */
|
|
216
|
-
columns:
|
|
217
|
-
rows:
|
|
214
|
+
}) : /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(f, {
|
|
215
|
+
columns: y,
|
|
216
|
+
rows: b,
|
|
218
217
|
rowKey: (e) => e.id,
|
|
219
218
|
defaultSort: {
|
|
220
219
|
key: "created",
|
|
221
220
|
dir: "desc"
|
|
222
221
|
}
|
|
223
|
-
}), /* @__PURE__ */
|
|
224
|
-
page: r,
|
|
225
|
-
pageSize:
|
|
226
|
-
itemCount:
|
|
227
|
-
hasMore:
|
|
228
|
-
onPageChange:
|
|
222
|
+
}), /* @__PURE__ */ I(h, {
|
|
223
|
+
page: r.page,
|
|
224
|
+
pageSize: B,
|
|
225
|
+
itemCount: b.length,
|
|
226
|
+
hasMore: o?.pageInfo.hasMore ?? !1,
|
|
227
|
+
onPageChange: r.onPageChange
|
|
229
228
|
})] })]
|
|
230
229
|
});
|
|
231
230
|
}
|
|
232
|
-
function
|
|
233
|
-
let [e, t] =
|
|
231
|
+
function K() {
|
|
232
|
+
let [e, t] = T(""), { data: n, isLoading: r, error: i } = v({
|
|
234
233
|
status: "PUBLISHED",
|
|
235
234
|
limit: 100
|
|
236
|
-
}), { data: p, isLoading: m, error: h } = _(e || void 0), g =
|
|
235
|
+
}), { data: p, isLoading: m, error: h } = _(e || void 0), g = w(() => [
|
|
237
236
|
{
|
|
238
237
|
key: "title",
|
|
239
238
|
header: "Assessment",
|
|
240
|
-
render: (e) => /* @__PURE__ */
|
|
239
|
+
render: (e) => /* @__PURE__ */ L("div", {
|
|
241
240
|
className: "min-w-0",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
241
|
+
children: [/* @__PURE__ */ I("p", {
|
|
243
242
|
className: "font-medium text-text-primary truncate",
|
|
244
243
|
children: e.title
|
|
245
|
-
}), /* @__PURE__ */
|
|
244
|
+
}), /* @__PURE__ */ I("p", {
|
|
246
245
|
className: "text-xs text-text-secondary",
|
|
247
246
|
children: e.type
|
|
248
247
|
})]
|
|
@@ -252,7 +251,7 @@ function G() {
|
|
|
252
251
|
{
|
|
253
252
|
key: "status",
|
|
254
253
|
header: "Status",
|
|
255
|
-
render: (e) => /* @__PURE__ */
|
|
254
|
+
render: (e) => /* @__PURE__ */ I(s, { status: e.status })
|
|
256
255
|
},
|
|
257
256
|
{
|
|
258
257
|
key: "questions",
|
|
@@ -280,43 +279,43 @@ function G() {
|
|
|
280
279
|
render: (e) => e.timeLimitMin > 0 ? `${e.timeLimitMin} min` : "—"
|
|
281
280
|
}
|
|
282
281
|
], []);
|
|
283
|
-
if (r) return /* @__PURE__ */
|
|
284
|
-
if (i) return /* @__PURE__ */
|
|
282
|
+
if (r) return /* @__PURE__ */ I(u, { label: "Loading courses…" });
|
|
283
|
+
if (i) return /* @__PURE__ */ I(l, {
|
|
285
284
|
title: "Could not load courses",
|
|
286
285
|
message: i.message
|
|
287
286
|
});
|
|
288
287
|
let y = n?.items ?? [];
|
|
289
|
-
return /* @__PURE__ */
|
|
288
|
+
return /* @__PURE__ */ I(d, {
|
|
290
289
|
title: "Assessments",
|
|
291
290
|
description: "Inspect assessments attached to a published course.",
|
|
292
|
-
action: /* @__PURE__ */
|
|
291
|
+
action: /* @__PURE__ */ L("div", {
|
|
293
292
|
className: "min-w-[16rem]",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ I("label", {
|
|
295
294
|
htmlFor: "bui-admin-course-select",
|
|
296
295
|
className: "sr-only",
|
|
297
296
|
children: "Select course"
|
|
298
|
-
}), /* @__PURE__ */
|
|
297
|
+
}), /* @__PURE__ */ L("select", {
|
|
299
298
|
id: "bui-admin-course-select",
|
|
300
299
|
value: e,
|
|
301
300
|
onChange: (e) => t(e.target.value),
|
|
302
301
|
className: "w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
|
|
303
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ I("option", {
|
|
304
303
|
value: "",
|
|
305
304
|
children: "Choose a course…"
|
|
306
|
-
}), y.map((e) => /* @__PURE__ */
|
|
305
|
+
}), y.map((e) => /* @__PURE__ */ I("option", {
|
|
307
306
|
value: e.id,
|
|
308
307
|
children: e.title
|
|
309
308
|
}, e.id))]
|
|
310
309
|
})]
|
|
311
310
|
}),
|
|
312
|
-
children: e ? m ? /* @__PURE__ */
|
|
311
|
+
children: e ? m ? /* @__PURE__ */ I(u, { label: "Loading assessments…" }) : h ? /* @__PURE__ */ I(l, {
|
|
313
312
|
title: "Could not load assessments",
|
|
314
313
|
message: h.message
|
|
315
|
-
}) : p?.length === 0 ? /* @__PURE__ */
|
|
316
|
-
icon: /* @__PURE__ */
|
|
314
|
+
}) : p?.length === 0 ? /* @__PURE__ */ I(c, {
|
|
315
|
+
icon: /* @__PURE__ */ I(M, { size: 40 }),
|
|
317
316
|
title: "No assessments",
|
|
318
317
|
description: "This course has no assessments yet."
|
|
319
|
-
}) : /* @__PURE__ */
|
|
318
|
+
}) : /* @__PURE__ */ I(f, {
|
|
320
319
|
columns: g,
|
|
321
320
|
rows: p ?? [],
|
|
322
321
|
rowKey: (e) => e.id,
|
|
@@ -324,23 +323,23 @@ function G() {
|
|
|
324
323
|
key: "title",
|
|
325
324
|
dir: "asc"
|
|
326
325
|
}
|
|
327
|
-
}) : /* @__PURE__ */
|
|
328
|
-
icon: /* @__PURE__ */
|
|
326
|
+
}) : /* @__PURE__ */ I(c, {
|
|
327
|
+
icon: /* @__PURE__ */ I(M, { size: 40 }),
|
|
329
328
|
title: "Select a course",
|
|
330
329
|
description: "Choose a published course above to view its assessments."
|
|
331
330
|
})
|
|
332
331
|
});
|
|
333
332
|
}
|
|
334
|
-
function
|
|
335
|
-
let [e, t] =
|
|
333
|
+
function q() {
|
|
334
|
+
let [e, t] = T("ALL"), n = S(B), { data: i, isLoading: a, error: m, refetch: g } = y({
|
|
336
335
|
status: e === "ALL" ? void 0 : e,
|
|
337
|
-
|
|
338
|
-
limit:
|
|
339
|
-
}),
|
|
336
|
+
offset: n.offset,
|
|
337
|
+
limit: B
|
|
338
|
+
}), _ = w(() => [
|
|
340
339
|
{
|
|
341
340
|
key: "learner",
|
|
342
341
|
header: "Learner",
|
|
343
|
-
render: (e) => /* @__PURE__ */
|
|
342
|
+
render: (e) => /* @__PURE__ */ I("span", {
|
|
344
343
|
className: "font-mono text-xs text-text-secondary",
|
|
345
344
|
children: e.learnerId
|
|
346
345
|
})
|
|
@@ -348,7 +347,7 @@ function K() {
|
|
|
348
347
|
{
|
|
349
348
|
key: "course",
|
|
350
349
|
header: "Course ID",
|
|
351
|
-
render: (e) => /* @__PURE__ */
|
|
350
|
+
render: (e) => /* @__PURE__ */ I("span", {
|
|
352
351
|
className: "font-mono text-xs text-text-secondary",
|
|
353
352
|
children: e.courseId
|
|
354
353
|
})
|
|
@@ -356,7 +355,7 @@ function K() {
|
|
|
356
355
|
{
|
|
357
356
|
key: "status",
|
|
358
357
|
header: "Status",
|
|
359
|
-
render: (e) => /* @__PURE__ */
|
|
358
|
+
render: (e) => /* @__PURE__ */ I(s, { status: e.status })
|
|
360
359
|
},
|
|
361
360
|
{
|
|
362
361
|
key: "progress",
|
|
@@ -380,70 +379,68 @@ function K() {
|
|
|
380
379
|
{
|
|
381
380
|
key: "lastActive",
|
|
382
381
|
header: "Last Active",
|
|
383
|
-
render: (e) => e.lastActiveAt ?
|
|
382
|
+
render: (e) => e.lastActiveAt ? J(e.lastActiveAt) : "—",
|
|
384
383
|
sortValue: (e) => e.lastActiveAt ? new Date(e.lastActiveAt).getTime() : 0,
|
|
385
384
|
hideOnMobile: !0
|
|
386
385
|
}
|
|
387
|
-
], [])
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
if (v) return /* @__PURE__ */ F(u, { label: "Loading enrollments…" });
|
|
391
|
-
if (b) return /* @__PURE__ */ F(l, {
|
|
386
|
+
], []);
|
|
387
|
+
if (a) return /* @__PURE__ */ I(u, { label: "Loading enrollments…" });
|
|
388
|
+
if (m) return /* @__PURE__ */ I(l, {
|
|
392
389
|
title: "Could not load enrollments",
|
|
393
|
-
message:
|
|
394
|
-
onRetry:
|
|
390
|
+
message: m.message,
|
|
391
|
+
onRetry: g
|
|
395
392
|
});
|
|
396
|
-
let
|
|
397
|
-
return /* @__PURE__ */
|
|
393
|
+
let v = i?.items ?? [];
|
|
394
|
+
return /* @__PURE__ */ L(d, {
|
|
398
395
|
title: "Enrollments",
|
|
399
396
|
description: "Workspace-wide learner enrollment overview.",
|
|
400
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ I("div", {
|
|
401
398
|
className: "mb-4",
|
|
402
|
-
children: /* @__PURE__ */
|
|
403
|
-
options:
|
|
399
|
+
children: /* @__PURE__ */ I(p, {
|
|
400
|
+
options: H,
|
|
404
401
|
value: e,
|
|
405
402
|
onChange: (e) => {
|
|
406
|
-
t(e),
|
|
403
|
+
t(e), n.reset();
|
|
407
404
|
}
|
|
408
405
|
})
|
|
409
|
-
}),
|
|
410
|
-
icon: /* @__PURE__ */
|
|
406
|
+
}), v.length === 0 ? /* @__PURE__ */ I(c, {
|
|
407
|
+
icon: /* @__PURE__ */ I(P, { size: 40 }),
|
|
411
408
|
title: "No enrollments",
|
|
412
409
|
description: `There are no ${e === "ALL" ? "" : e.toLowerCase()} enrollments in this workspace.`
|
|
413
|
-
}) : /* @__PURE__ */
|
|
414
|
-
columns:
|
|
415
|
-
rows:
|
|
410
|
+
}) : /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(f, {
|
|
411
|
+
columns: _,
|
|
412
|
+
rows: v,
|
|
416
413
|
rowKey: (e) => e.id,
|
|
417
414
|
defaultSort: {
|
|
418
415
|
key: "enrolled",
|
|
419
416
|
dir: "desc"
|
|
420
417
|
}
|
|
421
|
-
}), /* @__PURE__ */
|
|
422
|
-
page: n,
|
|
423
|
-
pageSize:
|
|
424
|
-
itemCount:
|
|
425
|
-
hasMore:
|
|
426
|
-
onPageChange:
|
|
418
|
+
}), /* @__PURE__ */ I(h, {
|
|
419
|
+
page: n.page,
|
|
420
|
+
pageSize: B,
|
|
421
|
+
itemCount: v.length,
|
|
422
|
+
hasMore: i?.pageInfo.hasMore ?? !1,
|
|
423
|
+
onPageChange: n.onPageChange
|
|
427
424
|
})] })]
|
|
428
425
|
});
|
|
429
426
|
}
|
|
430
|
-
function
|
|
427
|
+
function J(e) {
|
|
431
428
|
let t = typeof e == "string" ? new Date(e) : e, n = /* @__PURE__ */ new Date(), r = t.getTime() - n.getTime(), i = r >= 0, a = Math.floor(Math.abs(r) / 1e3), o = Math.floor(a / 60), s = Math.floor(o / 60), c = Math.floor(s / 24), l = (e, t) => {
|
|
432
429
|
let n = `${e} ${t}${e === 1 ? "" : "s"}`;
|
|
433
430
|
return i ? `in ${n}` : `${n} ago`;
|
|
434
431
|
};
|
|
435
432
|
return a < 60 ? i ? "soon" : "just now" : o < 60 ? l(o, "min") : s < 24 ? l(s, "hour") : l(c, "day");
|
|
436
433
|
}
|
|
437
|
-
function
|
|
438
|
-
let [e, t] =
|
|
434
|
+
function Y() {
|
|
435
|
+
let [e, t] = T("ALL"), n = S(B), { data: i, isLoading: m, error: g, refetch: _ } = x({
|
|
439
436
|
status: e === "ALL" ? void 0 : e,
|
|
440
|
-
|
|
441
|
-
limit:
|
|
442
|
-
}),
|
|
437
|
+
offset: n.offset,
|
|
438
|
+
limit: B
|
|
439
|
+
}), v = w(() => [
|
|
443
440
|
{
|
|
444
441
|
key: "learner",
|
|
445
442
|
header: "Learner",
|
|
446
|
-
render: (e) => /* @__PURE__ */
|
|
443
|
+
render: (e) => /* @__PURE__ */ I("span", {
|
|
447
444
|
className: "font-mono text-xs text-text-secondary",
|
|
448
445
|
children: e.learnerId
|
|
449
446
|
})
|
|
@@ -451,7 +448,7 @@ function J() {
|
|
|
451
448
|
{
|
|
452
449
|
key: "assessment",
|
|
453
450
|
header: "Assessment ID",
|
|
454
|
-
render: (e) => /* @__PURE__ */
|
|
451
|
+
render: (e) => /* @__PURE__ */ I("span", {
|
|
455
452
|
className: "font-mono text-xs text-text-secondary",
|
|
456
453
|
children: e.assessmentId
|
|
457
454
|
})
|
|
@@ -465,7 +462,7 @@ function J() {
|
|
|
465
462
|
{
|
|
466
463
|
key: "status",
|
|
467
464
|
header: "Status",
|
|
468
|
-
render: (e) => /* @__PURE__ */
|
|
465
|
+
render: (e) => /* @__PURE__ */ I(s, { status: e.status })
|
|
469
466
|
},
|
|
470
467
|
{
|
|
471
468
|
key: "score",
|
|
@@ -491,121 +488,119 @@ function J() {
|
|
|
491
488
|
key: "actions",
|
|
492
489
|
header: "Review",
|
|
493
490
|
align: "right",
|
|
494
|
-
render: () => /* @__PURE__ */
|
|
491
|
+
render: () => /* @__PURE__ */ I(R, {
|
|
495
492
|
variant: "ghost",
|
|
496
493
|
size: "sm",
|
|
497
494
|
disabled: !0,
|
|
498
495
|
children: "Open"
|
|
499
496
|
})
|
|
500
497
|
}
|
|
501
|
-
], [])
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
if (y) return /* @__PURE__ */ F(u, { label: "Loading submissions…" });
|
|
505
|
-
if (b) return /* @__PURE__ */ F(l, {
|
|
498
|
+
], []);
|
|
499
|
+
if (m) return /* @__PURE__ */ I(u, { label: "Loading submissions…" });
|
|
500
|
+
if (g) return /* @__PURE__ */ I(l, {
|
|
506
501
|
title: "Could not load submissions",
|
|
507
|
-
message:
|
|
508
|
-
onRetry:
|
|
502
|
+
message: g.message,
|
|
503
|
+
onRetry: _
|
|
509
504
|
});
|
|
510
|
-
let
|
|
511
|
-
return /* @__PURE__ */
|
|
505
|
+
let y = i?.items ?? [];
|
|
506
|
+
return /* @__PURE__ */ L(d, {
|
|
512
507
|
title: "Submission review",
|
|
513
508
|
description: "Review learner submissions and grading status.",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ I("div", {
|
|
515
510
|
className: "mb-4",
|
|
516
|
-
children: /* @__PURE__ */
|
|
517
|
-
options:
|
|
511
|
+
children: /* @__PURE__ */ I(p, {
|
|
512
|
+
options: U,
|
|
518
513
|
value: e,
|
|
519
514
|
onChange: (e) => {
|
|
520
|
-
t(e),
|
|
515
|
+
t(e), n.reset();
|
|
521
516
|
}
|
|
522
517
|
})
|
|
523
|
-
}),
|
|
524
|
-
icon: /* @__PURE__ */
|
|
518
|
+
}), y.length === 0 ? /* @__PURE__ */ I(c, {
|
|
519
|
+
icon: /* @__PURE__ */ I(j, { size: 40 }),
|
|
525
520
|
title: "No submissions",
|
|
526
521
|
description: `There are no ${e === "ALL" ? "" : e.toLowerCase()} submissions in this workspace.`
|
|
527
|
-
}) : /* @__PURE__ */
|
|
528
|
-
columns:
|
|
529
|
-
rows:
|
|
522
|
+
}) : /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(f, {
|
|
523
|
+
columns: v,
|
|
524
|
+
rows: y,
|
|
530
525
|
rowKey: (e) => e.id,
|
|
531
526
|
defaultSort: {
|
|
532
527
|
key: "submitted",
|
|
533
528
|
dir: "desc"
|
|
534
529
|
}
|
|
535
|
-
}), /* @__PURE__ */
|
|
536
|
-
page: n,
|
|
537
|
-
pageSize:
|
|
538
|
-
itemCount:
|
|
539
|
-
hasMore:
|
|
540
|
-
onPageChange:
|
|
530
|
+
}), /* @__PURE__ */ I(h, {
|
|
531
|
+
page: n.page,
|
|
532
|
+
pageSize: B,
|
|
533
|
+
itemCount: y.length,
|
|
534
|
+
hasMore: i?.pageInfo.hasMore ?? !1,
|
|
535
|
+
onPageChange: n.onPageChange
|
|
541
536
|
})] })]
|
|
542
537
|
});
|
|
543
538
|
}
|
|
544
|
-
function
|
|
545
|
-
let [e, n] =
|
|
539
|
+
function X() {
|
|
540
|
+
let [e, n] = T("courses"), r = w(() => [
|
|
546
541
|
{
|
|
547
542
|
value: "courses",
|
|
548
543
|
label: "Courses",
|
|
549
|
-
icon: /* @__PURE__ */
|
|
544
|
+
icon: /* @__PURE__ */ I(A, { size: 18 })
|
|
550
545
|
},
|
|
551
546
|
{
|
|
552
547
|
value: "assessments",
|
|
553
548
|
label: "Assessments",
|
|
554
|
-
icon: /* @__PURE__ */
|
|
549
|
+
icon: /* @__PURE__ */ I(M, { size: 18 })
|
|
555
550
|
},
|
|
556
551
|
{
|
|
557
552
|
value: "enrollments",
|
|
558
553
|
label: "Enrollments",
|
|
559
|
-
icon: /* @__PURE__ */
|
|
554
|
+
icon: /* @__PURE__ */ I(P, { size: 18 })
|
|
560
555
|
},
|
|
561
556
|
{
|
|
562
557
|
value: "submissions",
|
|
563
558
|
label: "Submissions",
|
|
564
|
-
icon: /* @__PURE__ */
|
|
559
|
+
icon: /* @__PURE__ */ I(j, { size: 18 })
|
|
565
560
|
}
|
|
566
561
|
], []);
|
|
567
|
-
return /* @__PURE__ */
|
|
562
|
+
return /* @__PURE__ */ L(t, {
|
|
568
563
|
title: "BuildMyIQ Admin",
|
|
569
564
|
description: "Course, assessment, enrollment and submission governance.",
|
|
570
|
-
actions: /* @__PURE__ */
|
|
565
|
+
actions: /* @__PURE__ */ L("span", {
|
|
571
566
|
className: "inline-flex items-center gap-2 text-sm text-text-secondary",
|
|
572
|
-
children: [/* @__PURE__ */
|
|
567
|
+
children: [/* @__PURE__ */ I(N, { size: 18 }), "Workspace-scoped"]
|
|
573
568
|
}),
|
|
574
|
-
children: [/* @__PURE__ */
|
|
569
|
+
children: [/* @__PURE__ */ I(m, {
|
|
575
570
|
items: r,
|
|
576
571
|
value: e,
|
|
577
572
|
onChange: (e) => n(e)
|
|
578
|
-
}), /* @__PURE__ */
|
|
573
|
+
}), /* @__PURE__ */ L("div", {
|
|
579
574
|
className: "mt-6",
|
|
580
575
|
children: [
|
|
581
|
-
e === "courses" && /* @__PURE__ */
|
|
582
|
-
e === "assessments" && /* @__PURE__ */
|
|
583
|
-
e === "enrollments" && /* @__PURE__ */
|
|
584
|
-
e === "submissions" && /* @__PURE__ */
|
|
576
|
+
e === "courses" && /* @__PURE__ */ I(G, {}),
|
|
577
|
+
e === "assessments" && /* @__PURE__ */ I(K, {}),
|
|
578
|
+
e === "enrollments" && /* @__PURE__ */ I(q, {}),
|
|
579
|
+
e === "submissions" && /* @__PURE__ */ I(Y, {})
|
|
585
580
|
]
|
|
586
581
|
})]
|
|
587
582
|
});
|
|
588
583
|
}
|
|
589
|
-
var
|
|
584
|
+
var Z = (t) => {
|
|
590
585
|
let n = t;
|
|
591
|
-
return /* @__PURE__ */
|
|
592
|
-
client:
|
|
593
|
-
children: /* @__PURE__ */
|
|
586
|
+
return /* @__PURE__ */ I(D, {
|
|
587
|
+
client: z,
|
|
588
|
+
children: /* @__PURE__ */ I(O, {
|
|
594
589
|
workspaceId: t.workspaceId ?? null,
|
|
595
590
|
gateway: "global",
|
|
596
591
|
defaultEnabled: !0,
|
|
597
|
-
children: /* @__PURE__ */
|
|
592
|
+
children: /* @__PURE__ */ I(k, {
|
|
598
593
|
scopeId: t.workspaceId ?? null,
|
|
599
594
|
gateway: "workspace",
|
|
600
|
-
children: /* @__PURE__ */
|
|
595
|
+
children: /* @__PURE__ */ I(e, {
|
|
601
596
|
...n,
|
|
602
|
-
children: /* @__PURE__ */
|
|
597
|
+
children: /* @__PURE__ */ I(X, {})
|
|
603
598
|
})
|
|
604
599
|
})
|
|
605
600
|
})
|
|
606
601
|
});
|
|
607
602
|
};
|
|
608
603
|
//#endregion
|
|
609
|
-
export {
|
|
604
|
+
export { Z as BuildmyiqAdminRoot };
|
|
610
605
|
|
|
611
606
|
//# sourceMappingURL=BuildmyiqAdminRoot.js.map
|