@local-civics/mgmt-ui 0.1.150 → 0.1.152
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 +6 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -367,10 +367,16 @@ type StudentProps = {
|
|
|
367
367
|
percentageOfLessonsCompleted: number;
|
|
368
368
|
numberOfLessonsCompleted: number;
|
|
369
369
|
badges: Item$c[];
|
|
370
|
+
lessons: LessonItem$1[];
|
|
370
371
|
answers: Item$b[];
|
|
371
372
|
reflections: Item$a[];
|
|
372
373
|
onBackClick: () => void;
|
|
373
374
|
};
|
|
375
|
+
type LessonItem$1 = {
|
|
376
|
+
lessonId: string;
|
|
377
|
+
lessonName: string;
|
|
378
|
+
isComplete: boolean;
|
|
379
|
+
};
|
|
374
380
|
declare const Student: (props: StudentProps) => JSX.Element;
|
|
375
381
|
|
|
376
382
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1480,7 +1480,8 @@ function Table$7(props) {
|
|
|
1480
1480
|
|
|
1481
1481
|
const Student = (props) => {
|
|
1482
1482
|
const [tab, setTab] = React.useState("badges");
|
|
1483
|
-
const
|
|
1483
|
+
const numberOfBadgesCompleted = props.badges.length > 0 ? props.badges.filter((b) => b.isComplete).length : 0;
|
|
1484
|
+
const TEMPORARY_numberOfLessonsCompleted = props.lessons.filter((l) => l.isComplete).length;
|
|
1484
1485
|
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, { gutter: "md" }, /* @__PURE__ */ React__namespace.createElement(core.Grid.Col, { sm: "auto" }, /* @__PURE__ */ React__namespace.createElement(core.UnstyledButton, { onClick: props.onBackClick }, /* @__PURE__ */ React__namespace.createElement(
|
|
1485
1486
|
core.Badge,
|
|
1486
1487
|
{
|
|
@@ -1503,12 +1504,12 @@ const Student = (props) => {
|
|
|
1503
1504
|
},
|
|
1504
1505
|
{
|
|
1505
1506
|
title: "LESSON COMPLETION",
|
|
1506
|
-
value:
|
|
1507
|
+
value: TEMPORARY_numberOfLessonsCompleted,
|
|
1507
1508
|
unit: ""
|
|
1508
1509
|
},
|
|
1509
1510
|
{
|
|
1510
1511
|
title: "BADGE COMPLETION",
|
|
1511
|
-
value:
|
|
1512
|
+
value: numberOfBadgesCompleted,
|
|
1512
1513
|
unit: ""
|
|
1513
1514
|
}
|
|
1514
1515
|
] }), /* @__PURE__ */ React__namespace.createElement(core.Stack, { spacing: 0 }, /* @__PURE__ */ React__namespace.createElement(
|