@local-civics/mgmt-ui 0.1.200 → 0.1.201
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.js +47 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -39
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3791,22 +3791,6 @@ const SplitButton = (props) => {
|
|
|
3791
3791
|
const { classes, theme } = useStyles$1();
|
|
3792
3792
|
theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 5 : 6];
|
|
3793
3793
|
return /* @__PURE__ */ React.createElement(Stack$5, { spacing: "sm" }, /* @__PURE__ */ React.createElement(
|
|
3794
|
-
Button,
|
|
3795
|
-
{
|
|
3796
|
-
component: Link,
|
|
3797
|
-
to: props.href,
|
|
3798
|
-
className: classes.button,
|
|
3799
|
-
variant: "gradient"
|
|
3800
|
-
},
|
|
3801
|
-
"Preview"
|
|
3802
|
-
), /* @__PURE__ */ React.createElement(
|
|
3803
|
-
Button,
|
|
3804
|
-
{
|
|
3805
|
-
leftIcon: /* @__PURE__ */ React.createElement(IconClipboardCopy, { size: 14 }),
|
|
3806
|
-
onClick: props.onCopyLinkClick
|
|
3807
|
-
},
|
|
3808
|
-
"Copy link"
|
|
3809
|
-
), /* @__PURE__ */ React.createElement(
|
|
3810
3794
|
Button,
|
|
3811
3795
|
{
|
|
3812
3796
|
leftIcon: /* @__PURE__ */ React.createElement(IconTableExport, { size: 14 }),
|
|
@@ -3985,25 +3969,41 @@ const useStyles = createStyles((theme) => ({
|
|
|
3985
3969
|
}));
|
|
3986
3970
|
const BadgeTable = ({ badges, students, loading }) => {
|
|
3987
3971
|
const { byBadge } = useFilteredStudents(students);
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3972
|
+
const countFiles = (students2) => students2.reduce((acc, s) => {
|
|
3973
|
+
var _a;
|
|
3974
|
+
return acc + (((_a = s.submissions) == null ? void 0 : _a.length) || 0);
|
|
3975
|
+
}, 0);
|
|
3976
|
+
return /* @__PURE__ */ React.createElement(Accordion, null, badges.map((b) => {
|
|
3977
|
+
const studentsForBadge = byBadge(b.badgeId);
|
|
3978
|
+
const fileCount = countFiles(studentsForBadge);
|
|
3979
|
+
return /* @__PURE__ */ React.createElement(Accordion.Item, { key: b.badgeId, value: b.badgeId }, /* @__PURE__ */ React.createElement(Accordion.Control, null, /* @__PURE__ */ React.createElement(Group, { position: "apart", w: "100%" }, /* @__PURE__ */ React.createElement(Text, null, b.displayName), /* @__PURE__ */ React.createElement(Badge$1, { size: "sm" }, fileCount))), /* @__PURE__ */ React.createElement(Accordion.Panel, null, /* @__PURE__ */ React.createElement(
|
|
3980
|
+
Table,
|
|
3981
|
+
{
|
|
3982
|
+
loading,
|
|
3983
|
+
items: studentsForBadge,
|
|
3984
|
+
hideBadge: true
|
|
3985
|
+
}
|
|
3986
|
+
)));
|
|
3987
|
+
}));
|
|
3996
3988
|
};
|
|
3997
3989
|
const LessonTableWrapper = ({ lessons, students, loading }) => {
|
|
3998
3990
|
const { byLesson } = useFilteredStudents(students);
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
3991
|
+
const countFiles = (students2) => students2.reduce((acc, s) => {
|
|
3992
|
+
var _a;
|
|
3993
|
+
return acc + (((_a = s.submissions) == null ? void 0 : _a.length) || 0);
|
|
3994
|
+
}, 0);
|
|
3995
|
+
return /* @__PURE__ */ React.createElement(Accordion, null, lessons.map((l) => {
|
|
3996
|
+
const studentsForLesson = byLesson(l.lessonName);
|
|
3997
|
+
const fileCount = countFiles(studentsForLesson);
|
|
3998
|
+
return /* @__PURE__ */ React.createElement(Accordion.Item, { key: l.lessonId, value: l.lessonId }, /* @__PURE__ */ React.createElement(Accordion.Control, null, /* @__PURE__ */ React.createElement(Group, { position: "apart", w: "100%" }, /* @__PURE__ */ React.createElement(Text, null, l.lessonName), /* @__PURE__ */ React.createElement(Badge$1, { size: "sm" }, fileCount))), /* @__PURE__ */ React.createElement(Accordion.Panel, null, /* @__PURE__ */ React.createElement(
|
|
3999
|
+
Table,
|
|
4000
|
+
{
|
|
4001
|
+
loading,
|
|
4002
|
+
items: studentsForLesson,
|
|
4003
|
+
hideLesson: true
|
|
4004
|
+
}
|
|
4005
|
+
)));
|
|
4006
|
+
}));
|
|
4007
4007
|
};
|
|
4008
4008
|
const PathwayTable = ({
|
|
4009
4009
|
pathways,
|
|
@@ -4012,13 +4012,21 @@ const PathwayTable = ({
|
|
|
4012
4012
|
loading
|
|
4013
4013
|
}) => {
|
|
4014
4014
|
const { byPathway } = useFilteredStudents(students);
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4015
|
+
const countFiles = (students2) => students2.reduce((acc, s) => {
|
|
4016
|
+
var _a;
|
|
4017
|
+
return acc + (((_a = s.submissions) == null ? void 0 : _a.length) || 0);
|
|
4018
|
+
}, 0);
|
|
4019
|
+
return /* @__PURE__ */ React.createElement(Accordion, null, pathways.map((p) => {
|
|
4020
|
+
const studentsForPathway = byPathway(p.pathwayId, badges);
|
|
4021
|
+
const fileCount = countFiles(studentsForPathway);
|
|
4022
|
+
return /* @__PURE__ */ React.createElement(Accordion.Item, { key: p.pathwayId, value: p.pathwayId }, /* @__PURE__ */ React.createElement(Accordion.Control, null, /* @__PURE__ */ React.createElement(Group, { position: "apart", w: "100%" }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("strong", null, p.title), /* @__PURE__ */ React.createElement("div", null, p.description)), /* @__PURE__ */ React.createElement(Badge$1, { size: "sm" }, fileCount))), /* @__PURE__ */ React.createElement(Accordion.Panel, null, /* @__PURE__ */ React.createElement(
|
|
4023
|
+
Table,
|
|
4024
|
+
{
|
|
4025
|
+
loading,
|
|
4026
|
+
items: studentsForPathway
|
|
4027
|
+
}
|
|
4028
|
+
)));
|
|
4029
|
+
}));
|
|
4022
4030
|
};
|
|
4023
4031
|
const FileLocker = (props) => {
|
|
4024
4032
|
const { classes } = useStyles();
|