@nualang/nualang-ui-components 0.1.1310 → 0.1.1312
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 =
|
|
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 = {},
|
|
@@ -66,7 +68,7 @@ function TranscriptViewer({
|
|
|
66
68
|
onClick: () => goToTimestamp(sentence.start_time, sentence.end_time),
|
|
67
69
|
sx: theme => ({
|
|
68
70
|
display: "flex",
|
|
69
|
-
|
|
71
|
+
flexDirection: "column",
|
|
70
72
|
mb: 1,
|
|
71
73
|
cursor: "pointer",
|
|
72
74
|
p: 1,
|
|
@@ -75,23 +77,33 @@ function TranscriptViewer({
|
|
|
75
77
|
backgroundColor: theme.palette.mode === "dark" ? theme.palette.primary.main : "#f9f9f9"
|
|
76
78
|
}
|
|
77
79
|
}),
|
|
78
|
-
children: [/*#__PURE__*/
|
|
79
|
-
alt: sentence?.username,
|
|
80
|
-
src: userImage,
|
|
80
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
81
81
|
sx: {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
}), sentence?.user && /*#__PURE__*/_jsx(Typography, {
|
|
87
|
-
variant: "subtitle2",
|
|
88
|
-
fontWeight: "bold",
|
|
89
|
-
sx: {
|
|
90
|
-
mr: 1
|
|
82
|
+
display: "flex",
|
|
83
|
+
alignItems: "center",
|
|
84
|
+
mb: 0.5
|
|
91
85
|
},
|
|
92
|
-
children:
|
|
86
|
+
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
87
|
+
alt: sentence?.username,
|
|
88
|
+
src: userImage,
|
|
89
|
+
sx: {
|
|
90
|
+
width: 24,
|
|
91
|
+
height: 24,
|
|
92
|
+
mr: 1
|
|
93
|
+
}
|
|
94
|
+
}), sentence?.user && /*#__PURE__*/_jsx(Typography, {
|
|
95
|
+
variant: "subtitle2",
|
|
96
|
+
fontWeight: "bold",
|
|
97
|
+
sx: {
|
|
98
|
+
whiteSpace: "nowrap"
|
|
99
|
+
},
|
|
100
|
+
children: sentence.user
|
|
101
|
+
})]
|
|
93
102
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
94
103
|
variant: "body2",
|
|
104
|
+
sx: {
|
|
105
|
+
ml: 4
|
|
106
|
+
},
|
|
95
107
|
children: sentence.text
|
|
96
108
|
})]
|
|
97
109
|
}, `conversation-${i}`);
|
|
@@ -119,6 +131,8 @@ export default function RecordingDialog({
|
|
|
119
131
|
attendeesData,
|
|
120
132
|
hasBadLanguage
|
|
121
133
|
}) {
|
|
134
|
+
const theme = useTheme();
|
|
135
|
+
const isSmallScreen = useMediaQuery(theme.breakpoints.down("sm"));
|
|
122
136
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
123
137
|
children: attendeesData.length > 0 && /*#__PURE__*/_jsx(ResponsiveDialog, {
|
|
124
138
|
open: open,
|
|
@@ -196,7 +210,7 @@ export default function RecordingDialog({
|
|
|
196
210
|
},
|
|
197
211
|
onContextMenu: e => e.preventDefault()
|
|
198
212
|
})
|
|
199
|
-
}), /*#__PURE__*/_jsx(Divider, {
|
|
213
|
+
}), !isSmallScreen && /*#__PURE__*/_jsx(Divider, {
|
|
200
214
|
orientation: "vertical",
|
|
201
215
|
variant: "middle",
|
|
202
216
|
flexItem: true,
|
|
@@ -204,7 +218,10 @@ export default function RecordingDialog({
|
|
|
204
218
|
paddingLeft: "20px"
|
|
205
219
|
}
|
|
206
220
|
}), /*#__PURE__*/_jsx(Grid, {
|
|
207
|
-
size:
|
|
221
|
+
size: {
|
|
222
|
+
sx: 12,
|
|
223
|
+
md: 4.5
|
|
224
|
+
},
|
|
208
225
|
children: /*#__PURE__*/_jsx(TranscriptViewer, {
|
|
209
226
|
t: t,
|
|
210
227
|
attendeesData: attendeesData,
|
|
@@ -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
|
|
187
|
-
const
|
|
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: {
|