@local-civics/mgmt-ui 0.1.139 → 0.1.141
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 +3 -2
- package/dist/index.js +16 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -389,8 +389,9 @@ type HomeProps = {
|
|
|
389
389
|
};
|
|
390
390
|
onDashboardClick: () => void;
|
|
391
391
|
onClassesClick: () => void;
|
|
392
|
-
|
|
392
|
+
onPathwaysClick: () => void;
|
|
393
393
|
onBadgesClick: () => void;
|
|
394
|
+
onLessonsClick: () => void;
|
|
394
395
|
};
|
|
395
396
|
/**
|
|
396
397
|
* Home
|
|
@@ -761,7 +762,7 @@ type PathwayClass = {
|
|
|
761
762
|
*/
|
|
762
763
|
type PathwayProps = {
|
|
763
764
|
loading: boolean;
|
|
764
|
-
|
|
765
|
+
title: string;
|
|
765
766
|
description: string;
|
|
766
767
|
classes: PathwayClass[];
|
|
767
768
|
lessons: Item[];
|
package/dist/index.js
CHANGED
|
@@ -283,6 +283,7 @@ const data = [
|
|
|
283
283
|
{ label: "Home", icon: icons.IconHome2 },
|
|
284
284
|
{ label: "Dashboard", icon: icons.IconGauge },
|
|
285
285
|
{ label: "Classes", icon: icons.IconCategory2 },
|
|
286
|
+
{ label: "Pathways", icon: icons.IconRoute },
|
|
286
287
|
{ label: "Badges", icon: icons.IconAlbum },
|
|
287
288
|
{ label: "Lessons", icon: icons.IconLambda },
|
|
288
289
|
{
|
|
@@ -1704,9 +1705,9 @@ const Home = (props) => {
|
|
|
1704
1705
|
)), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, null, /* @__PURE__ */ React__namespace.createElement(
|
|
1705
1706
|
CardGradient,
|
|
1706
1707
|
{
|
|
1707
|
-
title: "
|
|
1708
|
-
description: "
|
|
1709
|
-
onClick: props.
|
|
1708
|
+
title: "Pathways",
|
|
1709
|
+
description: "Curated learning experiences for skill-building.",
|
|
1710
|
+
onClick: props.onPathwaysClick
|
|
1710
1711
|
}
|
|
1711
1712
|
)), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, null, /* @__PURE__ */ React__namespace.createElement(
|
|
1712
1713
|
CardGradient,
|
|
@@ -1715,6 +1716,13 @@ const Home = (props) => {
|
|
|
1715
1716
|
description: "Project-sized skills acquisition and standards alignment.",
|
|
1716
1717
|
onClick: props.onBadgesClick
|
|
1717
1718
|
}
|
|
1719
|
+
)), /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, null, /* @__PURE__ */ React__namespace.createElement(
|
|
1720
|
+
CardGradient,
|
|
1721
|
+
{
|
|
1722
|
+
title: "Lessons",
|
|
1723
|
+
description: "Explore units of instruction and/or see corresponding class progress.",
|
|
1724
|
+
onClick: props.onLessonsClick
|
|
1725
|
+
}
|
|
1718
1726
|
)))));
|
|
1719
1727
|
};
|
|
1720
1728
|
|
|
@@ -3319,7 +3327,8 @@ const Pathway = (props) => {
|
|
|
3319
3327
|
const { classes } = useStyles();
|
|
3320
3328
|
const [tab, setTab] = React.useState("lessons");
|
|
3321
3329
|
const numberOfStudents = props.students.length;
|
|
3322
|
-
|
|
3330
|
+
numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
|
|
3331
|
+
const numberOfBadgesEarned = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length : 0;
|
|
3323
3332
|
return /* @__PURE__ */ React__namespace.createElement(core.Container, { size: "lg", py: "xl" }, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Grid, null, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { sm: "auto" }, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React__namespace.createElement(
|
|
3324
3333
|
core.Badge,
|
|
3325
3334
|
{
|
|
@@ -3328,7 +3337,7 @@ const Pathway = (props) => {
|
|
|
3328
3337
|
size: "lg"
|
|
3329
3338
|
},
|
|
3330
3339
|
"Back"
|
|
3331
|
-
)), /* @__PURE__ */ React__namespace.createElement(core.Group, null, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(core.Title, { order: 2, className: classes.title, mt: "md" }, props.
|
|
3340
|
+
)), /* @__PURE__ */ React__namespace.createElement(core.Group, null, /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(core.Title, { order: 2, className: classes.title, mt: "md" }, props.title || "Pathway"), /* @__PURE__ */ React__namespace.createElement(core.Text, { color: "dimmed", className: classes.description, mt: "sm" }, props.description || "No description")), !props.trial && /* @__PURE__ */ React__namespace.createElement(core.Stack, { ml: "auto" }, /* @__PURE__ */ React__namespace.createElement(
|
|
3332
3341
|
SplitButton,
|
|
3333
3342
|
{
|
|
3334
3343
|
href: props.href,
|
|
@@ -3338,8 +3347,8 @@ const Pathway = (props) => {
|
|
|
3338
3347
|
))))), /* @__PURE__ */ React__namespace.createElement("div", null, /* @__PURE__ */ React__namespace.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React__namespace.createElement(core.LoadingOverlay, { visible: props.loading, overlayBlur: 2 }), /* @__PURE__ */ React__namespace.createElement(core.Stack, null, /* @__PURE__ */ React__namespace.createElement(StatsGroup, { data: [
|
|
3339
3348
|
{
|
|
3340
3349
|
title: props.trial ? "BADGES SUBMITTED" : "PATHWAY COMPLETION",
|
|
3341
|
-
value: props.trial ?
|
|
3342
|
-
unit: props.trial ? "" : "
|
|
3350
|
+
value: props.trial ? 0 : numberOfBadgesEarned,
|
|
3351
|
+
unit: props.trial ? "" : ""
|
|
3343
3352
|
}
|
|
3344
3353
|
] }), !props.trial && /* @__PURE__ */ React__namespace.createElement(
|
|
3345
3354
|
core.Select,
|