@local-civics/mgmt-ui 0.1.139 → 0.1.140
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 +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
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
|
{
|
|
@@ -3319,7 +3320,8 @@ const Pathway = (props) => {
|
|
|
3319
3320
|
const { classes } = useStyles();
|
|
3320
3321
|
const [tab, setTab] = React.useState("lessons");
|
|
3321
3322
|
const numberOfStudents = props.students.length;
|
|
3322
|
-
|
|
3323
|
+
numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
|
|
3324
|
+
const numberOfBadgesEarned = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length : 0;
|
|
3323
3325
|
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
3326
|
core.Badge,
|
|
3325
3327
|
{
|
|
@@ -3328,7 +3330,7 @@ const Pathway = (props) => {
|
|
|
3328
3330
|
size: "lg"
|
|
3329
3331
|
},
|
|
3330
3332
|
"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.
|
|
3333
|
+
)), /* @__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
3334
|
SplitButton,
|
|
3333
3335
|
{
|
|
3334
3336
|
href: props.href,
|
|
@@ -3338,8 +3340,8 @@ const Pathway = (props) => {
|
|
|
3338
3340
|
))))), /* @__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
3341
|
{
|
|
3340
3342
|
title: props.trial ? "BADGES SUBMITTED" : "PATHWAY COMPLETION",
|
|
3341
|
-
value: props.trial ?
|
|
3342
|
-
unit: props.trial ? "" : "
|
|
3343
|
+
value: props.trial ? 0 : numberOfBadgesEarned,
|
|
3344
|
+
unit: props.trial ? "" : ""
|
|
3343
3345
|
}
|
|
3344
3346
|
] }), !props.trial && /* @__PURE__ */ React__namespace.createElement(
|
|
3345
3347
|
core.Select,
|