touchstudy-core 0.1.152 → 0.1.154
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/components/Chats/configs/types.d.ts +3 -2
- package/dist/containers/Classes/components/StudentList.d.ts +3 -0
- package/dist/containers/Classes/views/ClassDetail.d.ts +1 -0
- package/dist/containers/ExamResult/configs/types.d.ts +3 -1
- package/dist/containers/PreparedExam/components/Textbook.d.ts +4 -1
- package/dist/containers/PreparedExam/components/dialogs/ChapterProblemSolvingResultsDialog.d.ts +4 -1
- package/dist/containers/PreparedExam/components/dialogs/TextbookDrawer.d.ts +2 -1
- package/dist/containers/PreparedExam/views/PreparedItem.d.ts +4 -1
- package/dist/containers/StudentInfoDrawer/components/Exam/DrawerExamResultTab.d.ts +3 -0
- package/dist/containers/StudentInfoDrawer/components/Exam/ExamResultDrawer.d.ts +3 -0
- package/dist/containers/StudentInfoDrawer/components/Textbook/DrawerTextbookResultTab.d.ts +3 -0
- package/dist/containers/StudentInfoDrawer/configs/interfaces.d.ts +3 -0
- package/dist/containers/Users/views/UserList.d.ts +1 -0
- package/dist/index.js +99 -51
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +99 -51
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -15173,8 +15173,9 @@ var useVirtualList = function useVirtualList(studentId, defaultFilter, getItemsA
|
|
15173
15173
|
return;
|
15174
15174
|
}
|
15175
15175
|
setFilter(function (state) {
|
15176
|
+
var _filter$currentPage;
|
15176
15177
|
return !state ? state : _extends({}, state, {
|
15177
|
-
currentPage: 1
|
15178
|
+
currentPage: ((_filter$currentPage = filter.currentPage) != null ? _filter$currentPage : 0) + 1
|
15178
15179
|
});
|
15179
15180
|
});
|
15180
15181
|
}, [filter === null || filter === void 0 ? void 0 : filter.currentPage, totalPages]);
|
@@ -19437,7 +19438,6 @@ var PrintExamResult = function PrintExamResult(_ref) {
|
|
19437
19438
|
sx: textStyle
|
19438
19439
|
}, t$1(TabList$2[0].label)), chapterId ? textbookResult && React__default.createElement(TextbookMyAnswer, {
|
19439
19440
|
data: textbookResult,
|
19440
|
-
categories: categoryResponses,
|
19441
19441
|
isStudent: isStudent
|
19442
19442
|
}) : resultData && React__default.createElement(MyAnswer, {
|
19443
19443
|
data: resultData,
|
@@ -20392,7 +20392,7 @@ var useExamResult = function useExamResult(props) {
|
|
20392
20392
|
studentId = _props$studentId === void 0 ? 0 : _props$studentId,
|
20393
20393
|
code = props.code,
|
20394
20394
|
chapterId = props.chapterId,
|
20395
|
-
|
20395
|
+
onViewQA = props.onViewQA;
|
20396
20396
|
var _useTranslation = useTranslation(),
|
20397
20397
|
t = _useTranslation.t;
|
20398
20398
|
var _useTab = useTab(),
|
@@ -20442,7 +20442,7 @@ var useExamResult = function useExamResult(props) {
|
|
20442
20442
|
var handleViewQAndA = function handleViewQAndA(e, note) {
|
20443
20443
|
e.stopPropagation();
|
20444
20444
|
if (!note.examSessionId || !note.questionId) return;
|
20445
|
-
|
20445
|
+
onViewQA === null || onViewQA === void 0 ? void 0 : onViewQA(note.userId, note.examSessionId, note.questionId);
|
20446
20446
|
};
|
20447
20447
|
var fileExamName = !resultData ? "" : "Exam-Result_" + resultData.student.fullName + "_" + resultData.title + "_(" + utcToLocalTime(resultData.startTime, "MM-DD-YYYY HH:mm") + ")";
|
20448
20448
|
var fileTextbookName = !textbookResult ? "" : "Textbook-Result_" + textbookResult.chapterName + "_(" + utcToLocalTime(textbookResult.startTime, "MM-DD-YYYY HH:mm") + ")";
|
@@ -20469,9 +20469,12 @@ var useExamResult = function useExamResult(props) {
|
|
20469
20469
|
};
|
20470
20470
|
|
20471
20471
|
var ExamResultV2 = function ExamResultV2(props) {
|
20472
|
-
var
|
20473
|
-
|
20474
|
-
|
20472
|
+
var role = props.role,
|
20473
|
+
isMyStoryStudent = props.isMyStoryStudent,
|
20474
|
+
onViewQA = props.onViewQA,
|
20475
|
+
chapterId = props.chapterId,
|
20476
|
+
studentId = props.studentId;
|
20477
|
+
var isAdminSite = role === Role.Admin;
|
20475
20478
|
var _useExamResult = useExamResult(props),
|
20476
20479
|
t = _useExamResult.t,
|
20477
20480
|
fileName = _useExamResult.fileName,
|
@@ -20589,7 +20592,13 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20589
20592
|
onItemClick: handleOpenNoteDrawer,
|
20590
20593
|
isLoading: isLoadingNotes
|
20591
20594
|
};
|
20592
|
-
var questionActions = [{
|
20595
|
+
var questionActions = chapterId ? [{
|
20596
|
+
label: "ask_a_question",
|
20597
|
+
textStyle: {
|
20598
|
+
color: "#3dc674"
|
20599
|
+
},
|
20600
|
+
onClick: handleOpenQuestionDialog
|
20601
|
+
}] : [{
|
20593
20602
|
label: "write_a_note_of_incorrect_answers",
|
20594
20603
|
textStyle: {
|
20595
20604
|
color: "#3dc674"
|
@@ -20608,6 +20617,14 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20608
20617
|
onOpenContextMenu: handleOpenQuestionContextMenu,
|
20609
20618
|
isStudent: isStudent
|
20610
20619
|
};
|
20620
|
+
var handleViewTextbookQA = function handleViewTextbookQA() {
|
20621
|
+
if (!studentId) return;
|
20622
|
+
onViewQA === null || onViewQA === void 0 ? void 0 : onViewQA(+studentId, textbookResult === null || textbookResult === void 0 ? void 0 : textbookResult.studentTextbookSessionId, undefined, true);
|
20623
|
+
};
|
20624
|
+
var handleViewExamQA = function handleViewExamQA() {
|
20625
|
+
if (!resultData) return;
|
20626
|
+
onViewQA === null || onViewQA === void 0 ? void 0 : onViewQA(resultData.student.id, resultData.examSessionId);
|
20627
|
+
};
|
20611
20628
|
return React__default.createElement(Fragment$1, null, React__default.createElement(LoadingComponent, {
|
20612
20629
|
isLoading: !!isLoading
|
20613
20630
|
}), timelyOrderQuestions[dataChartIndex] && longTimeSpend && effectSize ? React__default.createElement("div", {
|
@@ -20754,7 +20771,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20754
20771
|
direction: "row",
|
20755
20772
|
gap: "8px",
|
20756
20773
|
alignItems: "center"
|
20757
|
-
}, React__default.createElement(Button, {
|
20774
|
+
}, !isAdminSite && React__default.createElement(Button, {
|
20758
20775
|
variant: "outlined",
|
20759
20776
|
sx: {
|
20760
20777
|
color: styles.less_dark,
|
@@ -20770,7 +20787,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20770
20787
|
size: "14px"
|
20771
20788
|
})),
|
20772
20789
|
onClick: function onClick(e) {
|
20773
|
-
return isStudent ? handleOpenQuestionDialog(e) :
|
20790
|
+
return isStudent ? handleOpenQuestionDialog(e) : handleViewExamQA();
|
20774
20791
|
}
|
20775
20792
|
}, t(isStudent ? "ask_a_question2" : "check_q&a")), React__default.createElement(Button, {
|
20776
20793
|
variant: "outlined",
|
@@ -20828,7 +20845,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20828
20845
|
direction: "row",
|
20829
20846
|
gap: "8px",
|
20830
20847
|
alignItems: "center"
|
20831
|
-
}, React__default.createElement(Button, {
|
20848
|
+
}, !isAdminSite && React__default.createElement(Button, {
|
20832
20849
|
variant: "outlined",
|
20833
20850
|
sx: {
|
20834
20851
|
color: styles.less_dark,
|
@@ -20844,7 +20861,7 @@ var ExamResultV2 = function ExamResultV2(props) {
|
|
20844
20861
|
size: "14px"
|
20845
20862
|
})),
|
20846
20863
|
onClick: function onClick(e) {
|
20847
|
-
return handleOpenQuestionDialog(e);
|
20864
|
+
return isStudent ? handleOpenQuestionDialog(e) : handleViewTextbookQA();
|
20848
20865
|
}
|
20849
20866
|
}, t(isStudent ? "ask_a_question2" : "check_q&a")), React__default.createElement(Button, {
|
20850
20867
|
variant: "outlined",
|
@@ -21231,12 +21248,14 @@ var PrintExamResultView = function PrintExamResultView(_ref) {
|
|
21231
21248
|
|
21232
21249
|
var ExamResultDrawer = function ExamResultDrawer(_ref) {
|
21233
21250
|
var _BRIEF_GRADE_OPTIONS$;
|
21234
|
-
var
|
21251
|
+
var role = _ref.role,
|
21252
|
+
history = _ref.history,
|
21235
21253
|
open = _ref.open,
|
21236
21254
|
anchor = _ref.anchor,
|
21237
21255
|
width = _ref.width,
|
21238
21256
|
student = _ref.student,
|
21239
21257
|
data = _ref.data,
|
21258
|
+
onViewQA = _ref.onViewQA,
|
21240
21259
|
onClose = _ref.onClose;
|
21241
21260
|
var _useTranslation = useTranslation(),
|
21242
21261
|
t = _useTranslation.t;
|
@@ -21245,16 +21264,6 @@ var ExamResultDrawer = function ExamResultDrawer(_ref) {
|
|
21245
21264
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.language;
|
21246
21265
|
});
|
21247
21266
|
var search = window.location.search;
|
21248
|
-
var searchParams = new URLSearchParams(search);
|
21249
|
-
var handleViewExamQuestion = function handleViewExamQuestion(studentId, examSessionId, questionId) {
|
21250
|
-
searchParams.set("sId", "" + studentId);
|
21251
|
-
examSessionId && searchParams.set("eId", "" + examSessionId);
|
21252
|
-
questionId && searchParams.set("qId", "" + questionId);
|
21253
|
-
pushTo(history, {
|
21254
|
-
pathname: "/teacher/question-and-answers",
|
21255
|
-
search: searchParams.toString()
|
21256
|
-
});
|
21257
|
-
};
|
21258
21267
|
var studentId = student === null || student === void 0 ? void 0 : student.id;
|
21259
21268
|
var code = data === null || data === void 0 ? void 0 : data.code;
|
21260
21269
|
var examSessionId = data === null || data === void 0 ? void 0 : data.id;
|
@@ -21354,21 +21363,24 @@ var ExamResultDrawer = function ExamResultDrawer(_ref) {
|
|
21354
21363
|
pb: 4
|
21355
21364
|
}
|
21356
21365
|
}, examSessionId && React__default.createElement(ExamResultV2, {
|
21366
|
+
role: role,
|
21357
21367
|
history: history,
|
21358
21368
|
searchParams: search,
|
21359
21369
|
code: code,
|
21360
21370
|
examSessionId: examSessionId,
|
21361
21371
|
studentId: studentId,
|
21362
|
-
|
21372
|
+
onViewQA: onViewQA
|
21363
21373
|
})));
|
21364
21374
|
};
|
21365
21375
|
|
21366
21376
|
var DrawerExamResultTab = function DrawerExamResultTab(_ref) {
|
21367
|
-
var
|
21377
|
+
var role = _ref.role,
|
21378
|
+
history = _ref.history,
|
21368
21379
|
student = _ref.student,
|
21369
21380
|
selectedTab = _ref.selectedTab,
|
21370
21381
|
value = _ref.value,
|
21371
|
-
studentId = _ref.studentId
|
21382
|
+
studentId = _ref.studentId,
|
21383
|
+
onViewQA = _ref.onViewQA;
|
21372
21384
|
var _useVirtualList = useVirtualList(studentId, EXAM_SESSION_DEFAULT_FILTER, getExamSessionListApi),
|
21373
21385
|
items = _useVirtualList.items,
|
21374
21386
|
selectedItem = _useVirtualList.selectedItem,
|
@@ -21403,13 +21415,15 @@ var DrawerExamResultTab = function DrawerExamResultTab(_ref) {
|
|
21403
21415
|
onItemClick: handleChangeSelectedItem,
|
21404
21416
|
listHeight: 0
|
21405
21417
|
})), React__default.createElement(ExamResultDrawer, {
|
21418
|
+
role: role,
|
21406
21419
|
open: !!selectedItem,
|
21407
21420
|
data: selectedItem,
|
21408
21421
|
student: student,
|
21409
21422
|
anchor: "right",
|
21410
21423
|
width: "80dvw",
|
21411
21424
|
onClose: handleCloseDrawer,
|
21412
|
-
history: history
|
21425
|
+
history: history,
|
21426
|
+
onViewQA: onViewQA
|
21413
21427
|
}));
|
21414
21428
|
};
|
21415
21429
|
|
@@ -22418,11 +22432,13 @@ var ChapterDetail = function ChapterDetail(_ref) {
|
|
22418
22432
|
|
22419
22433
|
var ChapterProblemSolvingResultsDialog = function ChapterProblemSolvingResultsDialog(_ref) {
|
22420
22434
|
var t = _ref.t,
|
22435
|
+
role = _ref.role,
|
22421
22436
|
onClose = _ref.onClose,
|
22422
22437
|
open = _ref.open,
|
22423
22438
|
history = _ref.history,
|
22424
22439
|
chapterId = _ref.chapterId,
|
22425
|
-
studentId = _ref.studentId
|
22440
|
+
studentId = _ref.studentId,
|
22441
|
+
onViewQA = _ref.onViewQA;
|
22426
22442
|
return React__default.createElement(Dialog, {
|
22427
22443
|
onClose: onClose,
|
22428
22444
|
open: open,
|
@@ -22454,11 +22470,13 @@ var ChapterProblemSolvingResultsDialog = function ChapterProblemSolvingResultsDi
|
|
22454
22470
|
}, React__default.createElement(Stack, {
|
22455
22471
|
mx: "24px"
|
22456
22472
|
}, React__default.createElement(ExamResultV2, {
|
22473
|
+
role: role,
|
22457
22474
|
history: history,
|
22458
22475
|
searchParams: "",
|
22459
22476
|
chapterId: chapterId,
|
22460
22477
|
studentId: studentId,
|
22461
|
-
isMyStoryStudent: false
|
22478
|
+
isMyStoryStudent: false,
|
22479
|
+
onViewQA: onViewQA
|
22462
22480
|
})), React__default.createElement(DialogActions, {
|
22463
22481
|
sx: {
|
22464
22482
|
display: "flex",
|
@@ -22734,7 +22752,8 @@ var TextbookDrawer = function TextbookDrawer(_ref) {
|
|
22734
22752
|
studentId = _ref.studentId,
|
22735
22753
|
anchor = _ref.anchor,
|
22736
22754
|
navigate = _ref.navigate,
|
22737
|
-
onClose = _ref.onClose
|
22755
|
+
onClose = _ref.onClose,
|
22756
|
+
onViewQA = _ref.onViewQA;
|
22738
22757
|
var isStudent = role === Role.Student;
|
22739
22758
|
var _useTextbookDrawer = useTextbookDrawer({
|
22740
22759
|
isStudent: isStudent,
|
@@ -23008,12 +23027,14 @@ var TextbookDrawer = function TextbookDrawer(_ref) {
|
|
23008
23027
|
});
|
23009
23028
|
}))))), React__default.createElement(ChapterProblemSolvingResultsDialog, {
|
23010
23029
|
t: t,
|
23030
|
+
role: role,
|
23011
23031
|
theme: theme,
|
23012
23032
|
history: history,
|
23013
23033
|
chapterId: chapterSelected === null || chapterSelected === void 0 ? void 0 : chapterSelected.id,
|
23014
23034
|
studentId: studentId,
|
23015
23035
|
open: isOpenChapterDialog,
|
23016
|
-
onClose: handleCloseChapterDialog
|
23036
|
+
onClose: handleCloseChapterDialog,
|
23037
|
+
onViewQA: onViewQA
|
23017
23038
|
}), React__default.createElement(StartPageDialog, {
|
23018
23039
|
options: startPageOptions,
|
23019
23040
|
t: t,
|
@@ -23362,6 +23383,7 @@ var TextbookInfoDrawer = function TextbookInfoDrawer(_ref) {
|
|
23362
23383
|
var Textbook = function Textbook(_ref) {
|
23363
23384
|
var _textbook$createdBy, _textbook$createdBy2;
|
23364
23385
|
var t = _ref.t,
|
23386
|
+
role = _ref.role,
|
23365
23387
|
user = _ref.user,
|
23366
23388
|
theme = _ref.theme,
|
23367
23389
|
textbook = _ref.textbook,
|
@@ -23370,7 +23392,8 @@ var Textbook = function Textbook(_ref) {
|
|
23370
23392
|
navigate = _ref.navigate,
|
23371
23393
|
preparedType = _ref.preparedType,
|
23372
23394
|
preparedFilterType = _ref.preparedFilterType,
|
23373
|
-
getTextbookList = _ref.getTextbookList
|
23395
|
+
getTextbookList = _ref.getTextbookList,
|
23396
|
+
onViewQA = _ref.onViewQA;
|
23374
23397
|
var isTabletUp = useMediaQuery(theme.breakpoints.up("lg"));
|
23375
23398
|
var _useDrawer = useDrawer(),
|
23376
23399
|
isOpenDialog = _useDrawer.isOpenDialog,
|
@@ -23510,15 +23533,16 @@ var Textbook = function Textbook(_ref) {
|
|
23510
23533
|
}, React__default.createElement(IoTrash, {
|
23511
23534
|
size: "20px"
|
23512
23535
|
}), t("delete_test"))), isOpenDialog && React__default.createElement(TextbookDrawer, {
|
23513
|
-
role:
|
23536
|
+
role: role,
|
23514
23537
|
isOpen: isOpenDialog,
|
23515
23538
|
onClose: handleCloseDialog,
|
23516
23539
|
textbookId: textbook.id,
|
23517
23540
|
navigate: navigate,
|
23518
23541
|
width: !isTabletUp ? "100dvw" : "50dvw",
|
23519
|
-
anchor: "right"
|
23542
|
+
anchor: "right",
|
23543
|
+
onViewQA: onViewQA
|
23520
23544
|
}), openDetailDialog && React__default.createElement(TextbookInfoDrawer, {
|
23521
|
-
role:
|
23545
|
+
role: role,
|
23522
23546
|
user: user,
|
23523
23547
|
isSuperAdmin: isSuperAdmin,
|
23524
23548
|
isOpen: openDetailDialog,
|
@@ -23537,9 +23561,11 @@ var Textbook = function Textbook(_ref) {
|
|
23537
23561
|
};
|
23538
23562
|
|
23539
23563
|
var PreparedItem = function PreparedItem(_ref) {
|
23540
|
-
var
|
23564
|
+
var role = _ref.role,
|
23565
|
+
preparedType = _ref.preparedType,
|
23541
23566
|
preparedFilterType = _ref.preparedFilterType,
|
23542
|
-
navigate = _ref.navigate
|
23567
|
+
navigate = _ref.navigate,
|
23568
|
+
onViewQA = _ref.onViewQA;
|
23543
23569
|
var _useExpand = useExpand(),
|
23544
23570
|
expanded = _useExpand.expanded,
|
23545
23571
|
handleCloseExpand = _useExpand.handleCloseExpand,
|
@@ -24067,6 +24093,7 @@ var PreparedItem = function PreparedItem(_ref) {
|
|
24067
24093
|
}, textbookList === null || textbookList === void 0 ? void 0 : textbookList.map(function (textbook) {
|
24068
24094
|
return React__default.createElement(Textbook, {
|
24069
24095
|
t: t,
|
24096
|
+
role: role,
|
24070
24097
|
user: user,
|
24071
24098
|
theme: theme,
|
24072
24099
|
textbook: textbook,
|
@@ -24075,7 +24102,8 @@ var PreparedItem = function PreparedItem(_ref) {
|
|
24075
24102
|
navigate: navigate,
|
24076
24103
|
getTextbookList: getTextbookList,
|
24077
24104
|
preparedType: preparedType,
|
24078
|
-
preparedFilterType: preparedFilterType
|
24105
|
+
preparedFilterType: preparedFilterType,
|
24106
|
+
onViewQA: onViewQA
|
24079
24107
|
});
|
24080
24108
|
}), React__default.createElement(Stack, {
|
24081
24109
|
display: "flex",
|
@@ -24090,10 +24118,12 @@ var PreparedItem = function PreparedItem(_ref) {
|
|
24090
24118
|
};
|
24091
24119
|
|
24092
24120
|
var DrawerTextbookResultTab = function DrawerTextbookResultTab(_ref) {
|
24093
|
-
var
|
24121
|
+
var role = _ref.role,
|
24122
|
+
history = _ref.history,
|
24094
24123
|
studentId = _ref.studentId,
|
24095
24124
|
selectedTab = _ref.selectedTab,
|
24096
|
-
value = _ref.value
|
24125
|
+
value = _ref.value,
|
24126
|
+
onViewQA = _ref.onViewQA;
|
24097
24127
|
var _useVirtualList = useVirtualList(studentId, TEXTBOOK_DEFAULT_FILTER, getTextbookListApi),
|
24098
24128
|
items = _useVirtualList.items,
|
24099
24129
|
selectedItem = _useVirtualList.selectedItem,
|
@@ -24128,14 +24158,15 @@ var DrawerTextbookResultTab = function DrawerTextbookResultTab(_ref) {
|
|
24128
24158
|
onItemClick: handleChangeSelectedItem,
|
24129
24159
|
listHeight: 0
|
24130
24160
|
})), React__default.createElement(TextbookDrawer, {
|
24131
|
-
role:
|
24161
|
+
role: role,
|
24132
24162
|
navigate: history,
|
24133
24163
|
isOpen: !!selectedItem,
|
24134
24164
|
width: "80dvw",
|
24135
24165
|
onClose: handleCloseDrawer,
|
24136
24166
|
textbookId: selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.id,
|
24137
24167
|
studentId: studentId,
|
24138
|
-
anchor: "right"
|
24168
|
+
anchor: "right",
|
24169
|
+
onViewQA: onViewQA
|
24139
24170
|
}));
|
24140
24171
|
};
|
24141
24172
|
|
@@ -24767,7 +24798,9 @@ var StudentInfoDrawer = function StudentInfoDrawer(props) {
|
|
24767
24798
|
studentId = props.studentId,
|
24768
24799
|
anchor = props.anchor,
|
24769
24800
|
width = props.width,
|
24770
|
-
history = props.history
|
24801
|
+
history = props.history,
|
24802
|
+
role = props.role,
|
24803
|
+
onViewQA = props.onViewQA;
|
24771
24804
|
var _useStudentInfoDrawer = useStudentInfoDrawer(props),
|
24772
24805
|
loadedTabs = _useStudentInfoDrawer.loadedTabs,
|
24773
24806
|
isLoading = _useStudentInfoDrawer.isLoading,
|
@@ -24811,21 +24844,26 @@ var StudentInfoDrawer = function StudentInfoDrawer(props) {
|
|
24811
24844
|
data: studentInfo,
|
24812
24845
|
isLoading: isLoading
|
24813
24846
|
}), loadedTabs[DrawerTab.Exam] && React__default.createElement(DrawerExamResultTab, {
|
24847
|
+
role: role,
|
24814
24848
|
value: DrawerTab.Exam,
|
24815
24849
|
selectedTab: selectedTab,
|
24816
24850
|
studentId: studentId,
|
24817
24851
|
student: studentInfo,
|
24818
|
-
history: history
|
24852
|
+
history: history,
|
24853
|
+
onViewQA: onViewQA
|
24819
24854
|
}), loadedTabs[DrawerTab.Textbook] && React__default.createElement(DrawerTextbookResultTab, {
|
24855
|
+
role: role,
|
24820
24856
|
value: DrawerTab.Textbook,
|
24821
24857
|
selectedTab: selectedTab,
|
24822
24858
|
studentId: studentId,
|
24823
|
-
history: history
|
24859
|
+
history: history,
|
24860
|
+
onViewQA: onViewQA
|
24824
24861
|
}))));
|
24825
24862
|
};
|
24826
24863
|
|
24827
24864
|
var StudentList = function StudentList(_ref) {
|
24828
|
-
var
|
24865
|
+
var role = _ref.role,
|
24866
|
+
history = _ref.history,
|
24829
24867
|
onAdd = _ref.onAdd,
|
24830
24868
|
paging = _ref.paging,
|
24831
24869
|
classList = _ref.classList,
|
@@ -24839,7 +24877,8 @@ var StudentList = function StudentList(_ref) {
|
|
24839
24877
|
handleSort = _ref.handleSort,
|
24840
24878
|
handleChangeSearchText = _ref.handleChangeSearchText,
|
24841
24879
|
handleChangePage = _ref.handleChangePage,
|
24842
|
-
handleRemoveStudentFromClass = _ref.handleRemoveStudentFromClass
|
24880
|
+
handleRemoveStudentFromClass = _ref.handleRemoveStudentFromClass,
|
24881
|
+
onViewQA = _ref.onViewQA;
|
24843
24882
|
var _useState = useState(),
|
24844
24883
|
selectedViewStudent = _useState[0],
|
24845
24884
|
setSelectedViewStudent = _useState[1];
|
@@ -24969,13 +25008,15 @@ var StudentList = function StudentList(_ref) {
|
|
24969
25008
|
onConfirm: handleRemoveStudentFromClass,
|
24970
25009
|
isDelete: true
|
24971
25010
|
}), React__default.createElement(StudentInfoDrawer, {
|
25011
|
+
role: role,
|
24972
25012
|
open: !!selectedViewStudent,
|
24973
25013
|
studentId: (selectedViewStudent === null || selectedViewStudent === void 0 ? void 0 : selectedViewStudent.studentId) || 0,
|
24974
25014
|
onClose: handleCloseStudentInfo,
|
24975
25015
|
anchor: "right",
|
24976
25016
|
width: "80dvw",
|
24977
25017
|
history: history,
|
24978
|
-
inert: true
|
25018
|
+
inert: true,
|
25019
|
+
onViewQA: onViewQA
|
24979
25020
|
}));
|
24980
25021
|
};
|
24981
25022
|
|
@@ -26553,7 +26594,8 @@ var ClassDetail = function ClassDetail(_ref) {
|
|
26553
26594
|
var id = _ref.id,
|
26554
26595
|
history = _ref.history,
|
26555
26596
|
classListUrl = _ref.classListUrl,
|
26556
|
-
role = _ref.role
|
26597
|
+
role = _ref.role,
|
26598
|
+
onViewQA = _ref.onViewQA;
|
26557
26599
|
var classId = !id || Number.isNaN(+id) ? 0 : +id;
|
26558
26600
|
var _useClassDetail = useClassDetail({
|
26559
26601
|
history: history,
|
@@ -26668,10 +26710,13 @@ var ClassDetail = function ClassDetail(_ref) {
|
|
26668
26710
|
value: selected,
|
26669
26711
|
index: TabList$1[1].value
|
26670
26712
|
}, !!classId && selected === TabList$1[1].value && React__default.createElement(StudentList, Object.assign({
|
26713
|
+
role: role,
|
26671
26714
|
disabled: isDisabled && !isTeacher,
|
26672
26715
|
onAdd: handleOpenSelectDialog,
|
26673
26716
|
history: history
|
26674
|
-
}, studentListProps
|
26717
|
+
}, studentListProps, {
|
26718
|
+
onViewQA: onViewQA
|
26719
|
+
}))), React__default.createElement(CustomTabPanel, {
|
26675
26720
|
value: selected,
|
26676
26721
|
index: TabList$1[2].value
|
26677
26722
|
}, !!classId && selected === TabList$1[2].value && React__default.createElement(TeacherList, Object.assign({
|
@@ -28404,7 +28449,8 @@ var UserRow = function UserRow(_ref) {
|
|
28404
28449
|
|
28405
28450
|
var UserList = function UserList(_ref) {
|
28406
28451
|
var role = _ref.role,
|
28407
|
-
history = _ref.history
|
28452
|
+
history = _ref.history,
|
28453
|
+
onViewQA = _ref.onViewQA;
|
28408
28454
|
var isSuperAdmin = useSelector(function (state) {
|
28409
28455
|
var _state$common, _state$common$user;
|
28410
28456
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : (_state$common$user = _state$common.user) === null || _state$common$user === void 0 ? void 0 : _state$common$user.isSuperAdmin;
|
@@ -28610,12 +28656,14 @@ var UserList = function UserList(_ref) {
|
|
28610
28656
|
onClose: handleCloseRecentUserActionDialog,
|
28611
28657
|
recentUserActions: recentUserActions
|
28612
28658
|
}), React__default.createElement(StudentInfoDrawer, {
|
28659
|
+
role: role,
|
28613
28660
|
open: !!selectedStudent,
|
28614
28661
|
studentId: selectedStudent === null || selectedStudent === void 0 ? void 0 : selectedStudent.id,
|
28615
28662
|
width: "80dvw",
|
28616
28663
|
anchor: "right",
|
28617
28664
|
onClose: handleCloseStudentInfo,
|
28618
28665
|
history: history,
|
28666
|
+
onViewQA: onViewQA,
|
28619
28667
|
inert: true
|
28620
28668
|
}), (isAdmin || isSuperAdmin) && React__default.createElement(DeleteUserCsvDialog, {
|
28621
28669
|
open: isOpenDeleteUserCsv,
|