@nualang/nualang-ui-components 0.1.1309 → 0.1.1311

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.
@@ -41,7 +41,10 @@ export default function GroupFeedbackDialog({
41
41
  return map;
42
42
  }, [submissionsForGroup]);
43
43
  const totalDiscussions = discussionsInGroup.length;
44
- const submittedCount = submissionsForGroup.length > 0 ? 1 : 0;
44
+ const submittedCount = discussionsInGroup.filter(discussion => {
45
+ const meetingId = discussion.meetingID || discussion.meetingId;
46
+ return Boolean(submissionsByMeetingId[meetingId]);
47
+ }).length;
45
48
  const progress = totalDiscussions > 0 ? Math.round(submittedCount / totalDiscussions * 100) : 0;
46
49
  const ratio = totalDiscussions > 0 ? submittedCount / totalDiscussions : 0;
47
50
  const ringColor = ratio === 0 ? grey[500] : ratio > 0 && ratio <= 1 / 3 ? red[600] : ratio > 1 / 3 && ratio <= 2 / 3 ? orange[600] : ratio > 2 / 3 && ratio < 1 ? green[600] : green[600];
@@ -7,6 +7,8 @@ import PropTypes from "prop-types";
7
7
  import { Box, Typography, Divider, Avatar, Skeleton } from "@mui/material";
8
8
  import ErrorIcon from "@mui/icons-material/Error";
9
9
  import { red } from "@mui/material/colors";
10
+ import { useMediaQuery } from "@mui/material";
11
+ import { useTheme } from "@mui/material/styles";
10
12
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
13
  function TranscriptViewer({
12
14
  conversation = {},
@@ -87,7 +89,8 @@ function TranscriptViewer({
87
89
  variant: "subtitle2",
88
90
  fontWeight: "bold",
89
91
  sx: {
90
- mr: 1
92
+ mr: 1,
93
+ whiteSpace: "nowrap"
91
94
  },
92
95
  children: `${sentence.user}:`
93
96
  }), /*#__PURE__*/_jsx(Typography, {
@@ -119,6 +122,8 @@ export default function RecordingDialog({
119
122
  attendeesData,
120
123
  hasBadLanguage
121
124
  }) {
125
+ const theme = useTheme();
126
+ const isSmallScreen = useMediaQuery(theme.breakpoints.down("sm"));
122
127
  return /*#__PURE__*/_jsx(_Fragment, {
123
128
  children: attendeesData.length > 0 && /*#__PURE__*/_jsx(ResponsiveDialog, {
124
129
  open: open,
@@ -196,7 +201,7 @@ export default function RecordingDialog({
196
201
  },
197
202
  onContextMenu: e => e.preventDefault()
198
203
  })
199
- }), /*#__PURE__*/_jsx(Divider, {
204
+ }), !isSmallScreen && /*#__PURE__*/_jsx(Divider, {
200
205
  orientation: "vertical",
201
206
  variant: "middle",
202
207
  flexItem: true,
@@ -204,7 +209,10 @@ export default function RecordingDialog({
204
209
  paddingLeft: "20px"
205
210
  }
206
211
  }), /*#__PURE__*/_jsx(Grid, {
207
- size: 4.5,
212
+ size: {
213
+ sx: 12,
214
+ md: 4.5
215
+ },
208
216
  children: /*#__PURE__*/_jsx(TranscriptViewer, {
209
217
  t: t,
210
218
  attendeesData: attendeesData,
@@ -991,31 +991,26 @@ function Classroom({
991
991
  pt: "8px",
992
992
  children: [/*#__PURE__*/_jsx("div", {
993
993
  className: classes.grow
994
- }), /*#__PURE__*/_jsxs(Box, {
995
- sx: {
996
- display: "flex",
997
- alignItems: "center",
998
- justifyContent: "space-between",
999
- mb: 2
1000
- },
1001
- children: [/*#__PURE__*/_jsx(Typography, {
1002
- variant: "headline",
1003
- color: "inherit",
1004
- fontSize: 24,
1005
- children: t("discussions")
1006
- }), /*#__PURE__*/_jsx(Tooltip, {
1007
- title: t("refresh_discuss"),
1008
- placement: "left",
1009
- children: /*#__PURE__*/_jsx(IconButton, {
994
+ }), /*#__PURE__*/_jsx(Tooltip, {
995
+ title: t("refresh_discuss"),
996
+ placement: "left",
997
+ children: /*#__PURE__*/_jsx(IconButton, {
998
+ sx: {
999
+ position: "absolute",
1000
+ right: theme.spacing(),
1001
+ marginRight: theme.spacing(2),
1002
+ zIndex: 1,
1010
1003
  size: "large",
1011
- "aria-label": "Refresh",
1012
- onClick: refetchData,
1013
- id: "discussRefreshScheduled",
1014
- children: /*#__PURE__*/_jsx(Refresh, {
1015
- fontSize: "inherit"
1016
- })
1004
+ marginTop: "5px"
1005
+ },
1006
+ size: "large",
1007
+ "aria-label": "Refresh",
1008
+ onClick: refetchData,
1009
+ id: "discussRefreshScheduled",
1010
+ children: /*#__PURE__*/_jsx(Refresh, {
1011
+ fontSize: "inherit"
1017
1012
  })
1018
- })]
1013
+ })
1019
1014
  }), /*#__PURE__*/_jsx(_Fragment, {
1020
1015
  children: isCreator && createdDiscussions?.length > 0 && /*#__PURE__*/_jsx("div", {
1021
1016
  id: "discussGroupedDiscussions",
@@ -183,8 +183,9 @@ const MeetingPromptsList = withStyles(({
183
183
  }), /*#__PURE__*/_jsxs(List, {
184
184
  children: [sortedScheduleListData.slice(0, cardsToShow).map((discussion, i) => {
185
185
  const totalDiscussions = meetingCounts[discussion?.groupedId] || 0;
186
- const hasSubmissions = groupedRecordings[discussion.groupedId]?.length > 0;
187
- const submittedCount = hasSubmissions ? 1 : 0;
186
+ const recordingsForGroup = groupedRecordings[discussion.groupedId] || [];
187
+ const submittedMeetingIds = new Set(recordingsForGroup.map(rec => rec.meetingId || rec.meetingID).filter(Boolean));
188
+ const submittedCount = submittedMeetingIds.size;
188
189
  const progress = totalDiscussions > 0 ? Math.round(submittedCount / totalDiscussions * 100) : 0;
189
190
  return /*#__PURE__*/_jsx(Card, {
190
191
  sx: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nualang/nualang-ui-components",
3
- "version": "0.1.1309",
3
+ "version": "0.1.1311",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "files": [