@nualang/nualang-ui-components 0.1.1235 → 0.1.1236

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.
@@ -210,7 +210,7 @@ function Progress({
210
210
  const [bots, setBots] = (0, _react.useState)([]);
211
211
  const reportFilters = ["percentage_complete", "correct_answer_percentage", "avg_pronunciation_score"];
212
212
  const [filter, setFilter] = (0, _react.useState)(reportFilters[0]);
213
- const reportTypes = isVideoChatEnabled ? ["exercises", "assignments", "discuss"] : ["exercises", "assignments"];
213
+ const reportTypes = isVideoChatEnabled ? ["courses", "assignments", "discuss"] : ["courses", "assignments"];
214
214
  const [reportType, setReportType] = (0, _react.useState)(reportTypes[0]);
215
215
  (0, _react.useEffect)(() => {
216
216
  if (selectedTopic) {
@@ -690,7 +690,7 @@ function TableRow({
690
690
  children: t("view_activity")
691
691
  })]
692
692
  })]
693
- }), reportType === "exercises" && currentView === "all_courses" && courses.map((c, i) => {
693
+ }), reportType === "courses" && currentView === "all_courses" && courses.map((c, i) => {
694
694
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(CourseCellData, {
695
695
  t: t,
696
696
  data: tableData[c.courseId],
@@ -701,7 +701,7 @@ function TableRow({
701
701
  ,
702
702
  filter: filter
703
703
  }, `student-progress-data-cell-${i}`);
704
- }), reportType === "exercises" && currentView === "course" && selectedCourse.sections.map((s, i) => {
704
+ }), reportType === "courses" && currentView === "course" && selectedCourse.sections.map((s, i) => {
705
705
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(SectionCellData, {
706
706
  t: t,
707
707
  data: tableData[selectedCourse.courseId]?.sections[s.sectionId],
@@ -814,7 +814,7 @@ function ProgressTable({
814
814
  }) {
815
815
  const selectedAssignmentTopics = (selectedAssignment?.exercises || [])?.map(e => e.courseSectionTopicId);
816
816
  const assignmentTopics = courses.flatMap(c => c.sections.flatMap(s => s.topics)).filter(t => selectedAssignmentTopics?.includes(`${t.courseSectionId}|${t.topicId}`));
817
- const topics = reportType === "exercises" && selectedCourse && selectedSection ? selectedCourse.sections[selectedCourse.sections.findIndex(s => s.sectionId === selectedSection.sectionId)].topics : [];
817
+ const topics = reportType === "courses" && selectedCourse && selectedSection ? selectedCourse.sections[selectedCourse.sections.findIndex(s => s.sectionId === selectedSection.sectionId)].topics : [];
818
818
  const tableTopics = reportType === "assignments" ? assignmentTopics : topics;
819
819
  const assignmentExercises = reportType === "assignments" && selectedTopic ? (selectedAssignment?.exercises || []).filter(e => e.courseSectionTopicId === `${selectedTopic.courseSectionId}|${selectedTopic.topicId}`) : [];
820
820
  const exercises = ["translation", "listening", "pronunciation"];
@@ -905,7 +905,7 @@ function ProgressTable({
905
905
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("tr", {
906
906
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("th", {
907
907
  scope: "col",
908
- children: [reportType === "exercises" && currentView === "all_courses" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
908
+ children: [reportType === "courses" && currentView === "all_courses" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
909
909
  sx: {
910
910
  width: "100%",
911
911
  justifyContent: "center"
@@ -1214,7 +1214,7 @@ function ProgressTable({
1214
1214
  })]
1215
1215
  })
1216
1216
  })]
1217
- }), reportType === "exercises" && currentView === "all_courses" && courses.map((c, i) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("th", {
1217
+ }), reportType === "courses" && currentView === "all_courses" && courses.map((c, i) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("th", {
1218
1218
  scope: "col",
1219
1219
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
1220
1220
  sx: {
@@ -1252,7 +1252,7 @@ function ProgressTable({
1252
1252
  },
1253
1253
  children: t("view_course")
1254
1254
  })]
1255
- }, i)), reportType === "exercises" && currentView === "course" && selectedCourse.sections.map((s, i) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("th", {
1255
+ }, i)), reportType === "courses" && currentView === "course" && selectedCourse.sections.map((s, i) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("th", {
1256
1256
  scope: "col",
1257
1257
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
1258
1258
  sx: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nualang/nualang-ui-components",
3
- "version": "0.1.1235",
3
+ "version": "0.1.1236",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",