@local-civics/mgmt-ui 0.1.172 → 0.1.173
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/index.d.ts +5 -0
- package/dist/index.js +21 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -741,6 +741,7 @@ interface Item$1 {
|
|
|
741
741
|
email: string;
|
|
742
742
|
isComplete?: boolean;
|
|
743
743
|
badges: Item$2[];
|
|
744
|
+
categoryPoints?: Record<string, number>;
|
|
744
745
|
}
|
|
745
746
|
|
|
746
747
|
/**
|
|
@@ -776,6 +777,10 @@ type PathwayProps = {
|
|
|
776
777
|
badges: Item[];
|
|
777
778
|
classId: string;
|
|
778
779
|
students: PathwayUserItem[];
|
|
780
|
+
categories: {
|
|
781
|
+
categoryId: string;
|
|
782
|
+
name: string;
|
|
783
|
+
}[];
|
|
779
784
|
href: string;
|
|
780
785
|
trial?: boolean;
|
|
781
786
|
badgesCompleted?: number;
|
package/dist/index.js
CHANGED
|
@@ -3294,14 +3294,25 @@ function Table$1(props) {
|
|
|
3294
3294
|
highlightOnHover: true,
|
|
3295
3295
|
records: props.items,
|
|
3296
3296
|
idAccessor: "userId",
|
|
3297
|
-
columns: [
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3297
|
+
columns: [
|
|
3298
|
+
{
|
|
3299
|
+
accessor: "name",
|
|
3300
|
+
title: "Student Name",
|
|
3301
|
+
render: (row) => /* @__PURE__ */ React__namespace.createElement(core.Group, { spacing: "sm" }, /* @__PURE__ */ React__namespace.createElement(core.Avatar, { size: 40, src: row.avatar, radius: 40 }), /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "sm", weight: 500 }, row.name), /* @__PURE__ */ React__namespace.createElement(core.Text, { size: "xs", color: "dimmed" }, row.email)))
|
|
3302
|
+
},
|
|
3303
|
+
{
|
|
3304
|
+
accessor: "status",
|
|
3305
|
+
render: (row) => /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, !!row.isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { variant: "filled" }, "Complete"), !row.isComplete && /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "red", variant: "filled" }, "Incomplete"))
|
|
3306
|
+
},
|
|
3307
|
+
...props.categories.map((category) => ({
|
|
3308
|
+
accessor: category.categoryId,
|
|
3309
|
+
title: category.name,
|
|
3310
|
+
render: (row) => {
|
|
3311
|
+
var _a, _b;
|
|
3312
|
+
return /* @__PURE__ */ React__namespace.createElement(core.Badge, { color: "blue", variant: "filled" }, (_b = (_a = row.categoryPoints) == null ? void 0 : _a[category.categoryId]) != null ? _b : 0);
|
|
3313
|
+
}
|
|
3314
|
+
}))
|
|
3315
|
+
],
|
|
3305
3316
|
rowExpansion: {
|
|
3306
3317
|
content: ({ record }) => /* @__PURE__ */ React__namespace.createElement(Stack, { items: record.badges })
|
|
3307
3318
|
}
|
|
@@ -3402,7 +3413,8 @@ const Pathway = (props) => {
|
|
|
3402
3413
|
Table$1,
|
|
3403
3414
|
{
|
|
3404
3415
|
loading: props.loading,
|
|
3405
|
-
items: props.students
|
|
3416
|
+
items: props.students,
|
|
3417
|
+
categories: props.categories
|
|
3406
3418
|
}
|
|
3407
3419
|
)))))));
|
|
3408
3420
|
};
|