@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 CHANGED
@@ -761,7 +761,7 @@ type PathwayClass = {
761
761
  */
762
762
  type PathwayProps = {
763
763
  loading: boolean;
764
- displayName: string;
764
+ title: string;
765
765
  description: string;
766
766
  classes: PathwayClass[];
767
767
  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
  {
@@ -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
- const percentageOfBadgesEarned = numberOfStudents > 0 ? props.students.filter((u) => u.isComplete).length / numberOfStudents : 0;
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.displayName || "Badge"), /* @__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(
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 ? props.lessonsCompleted || 0 : percentageOfBadgesEarned,
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,