touchstudy-core 0.1.64 → 0.1.66
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/Selectors/styles.d.ts +6 -0
- package/dist/containers/ExamResult/components/GradesByTerritory/index.d.ts +3 -1
- package/dist/containers/ExamResult/components/ProtractedProblem/index.d.ts +1 -0
- package/dist/containers/ExamResult/components/Vulnerable/index.d.ts +1 -0
- package/dist/containers/ExamResult/configs/constants.d.ts +1 -0
- package/dist/containers/ExamResult/configs/functions.d.ts +1 -0
- package/dist/containers/ExamResult/configs/types.d.ts +5 -2
- package/dist/containers/ExamResult/hooks/useExamResult.d.ts +2 -0
- package/dist/containers/ExamResult/views/ExamResultV2.d.ts +1 -0
- package/dist/containers/Textbooks/configs/types.d.ts +1 -6
- package/dist/index.css +34 -30
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1117 -334
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1110 -331
- package/dist/index.modern.js.map +1 -1
- package/dist/layouts/Header.d.ts +1 -1
- package/dist/services/examService.d.ts +1 -0
- package/dist/tests/performances/do-exam-session-skip-answer.d.ts +19 -0
- package/dist/tests/performances/do-exam-session.d.ts +20 -0
- package/dist/tests/performances/do-exam-session2.d.ts +19 -0
- package/dist/tests/performances/do-exam.d.ts +15 -0
- package/dist/tests/performances/join-exam.d.ts +13 -0
- package/dist/tests/performances/login.d.ts +20 -0
- package/dist/tests/performances/ramping-vus.d.ts +7 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/enums/examStatus.d.ts +6 -0
- package/dist/utils/enums/index.d.ts +2 -1
- package/dist/utils/enums/orderBy.d.ts +4 -0
- package/dist/utils/helpers.d.ts +10 -0
- package/dist/utils/hooks/useCheckExam.d.ts +5 -0
- package/dist/utils/hooks/useCountDownTimer.d.ts +11 -0
- package/dist/utils/hooks/useLoadMore.d.ts +9 -0
- package/dist/utils/hooks/useSwitchAcademy.d.ts +1 -0
- package/dist/utils/hooks/useVirtualizeList.d.ts +9 -0
- package/dist/utils/times.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -14,7 +14,7 @@ import { gapi } from 'gapi-script';
|
|
14
14
|
import 'moment/locale/ko.js';
|
15
15
|
import 'moment/locale/en-au.js';
|
16
16
|
import Pusher from 'pusher-js';
|
17
|
-
import { IoClose, IoCloseOutline, IoSearch } from 'react-icons/io5';
|
17
|
+
import { IoClose, IoCloseCircle, IoLogOut, IoCloseOutline, IoSearch, IoChevronUp, IoChevronDown } from 'react-icons/io5';
|
18
18
|
import i18n from 'i18next';
|
19
19
|
import Box$1 from '@mui/material/Box';
|
20
20
|
import Popover from '@mui/material/Popover';
|
@@ -23,10 +23,10 @@ import IconButton$1 from '@mui/material/IconButton';
|
|
23
23
|
import { GoArrowSwitch } from 'react-icons/go';
|
24
24
|
import { toast } from 'react-toastify';
|
25
25
|
export { ToastContainer, toast } from 'react-toastify';
|
26
|
-
import { IoIosLogOut, IoMdArrowBack } from 'react-icons/io';
|
27
26
|
import Select, { components } from 'react-select';
|
28
27
|
import { FaCaretDown, FaTrash, FaPlus, FaSave, FaPencilAlt, FaPlusCircle, FaTimes, FaSortUp, FaSortDown, FaEye } from 'react-icons/fa';
|
29
28
|
import { PiDotsNineLight } from 'react-icons/pi';
|
29
|
+
import { IoMdArrowBack } from 'react-icons/io';
|
30
30
|
import _ from 'lodash';
|
31
31
|
import { FaPencil } from 'react-icons/fa6';
|
32
32
|
import CreatableSelect from 'react-select/creatable';
|
@@ -103,6 +103,7 @@ var Language;
|
|
103
103
|
Language["en"] = "en";
|
104
104
|
})(Language || (Language = {}));
|
105
105
|
var PrintHeaderClassName = "print-header";
|
106
|
+
var PrintTitleClassName = "print-title";
|
106
107
|
var PrintContentClassName = "print-content";
|
107
108
|
var PrintContainerClassName = "print-container";
|
108
109
|
|
@@ -144,7 +145,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
144
145
|
return target;
|
145
146
|
}
|
146
147
|
|
147
|
-
var styles = {"lighter":"#F0FFF6","light":"#
|
148
|
+
var styles = {"lighter":"#F0FFF6","light":"#89F0B2","less_dark":"#3DC674","dark":"#349056","darker":"#18442A","gray_50":"#FBFBF9","gray_100":"#EAEAE5","gray_300":"#D0D0C8","gray_500":"#9A9A98","gray_700":"#5D5D5B","gray_900":"#363634","btn-login-google":"_2HqmH","block-login":"_wWIyO","box-login":"_38Lo1","btn-primary":"_rd4Uy","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-menu-flag":"_XK8oS","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","content-text":"_3S4f2","dropdown-content-language":"_3ajui","dropdown-item-language":"_3Y_y4","dropdown-item-language-active":"_CzNMi","dropdown-academy":"_3CMVp","image-academy":"_2ibYC","academy-btn":"_1JMRU","switch-icon":"_N4FNf","dropdown-content-academy":"_31Dr0","dropdown-academy-item":"_3bjcz","noGutters":"_31ZQk","custom-col-2":"_3yXyK","custom-col-3":"_1RsJQ","custom-col-5":"_L42CP","custom-col-10":"_2u6eL","custom-row":"_8x7OP","custom-col":"_1JmTh","custom-col-4":"_3HO1e","custom-col-8":"_Oy31M","custom-col-12":"_3aUKo","custom-container":"_39LRs","form-label":"__Ut-u","form-control":"_2k4dX","btn-outline-primary":"_2PWdX","sort-icons":"_mQvLF","active":"_3oAH-","form-select":"_3W3aw","truncate":"_3NJzN","headers":"_3xnI5","logo-container":"_3YG70","tabBox":"_1CQPn","routerBox":"_3hx2T","tabText":"_3UyhW","router-link-active":"_1TGKA","router-link":"_1AqMh","userImg":"_2RI6G","disabled-link":"_3aVHg","line-clamp":"_3fpky"};
|
148
149
|
|
149
150
|
// A type of promise-like that resolves synchronously and supports only one observer
|
150
151
|
const _Pact = /*#__PURE__*/(function() {
|
@@ -1026,8 +1027,9 @@ var useLanguage = function useLanguage(history) {
|
|
1026
1027
|
var search = window.location.search;
|
1027
1028
|
var searchParams = new URLSearchParams(search);
|
1028
1029
|
if (!languageItem) {
|
1030
|
+
var _navigator$language, _navigator$language$s;
|
1029
1031
|
var storedLanguage = getLanguage();
|
1030
|
-
var browserLanguage = navigator.language;
|
1032
|
+
var browserLanguage = (_navigator$language = navigator.language) === null || _navigator$language === void 0 ? void 0 : (_navigator$language$s = _navigator$language.split("-")) === null || _navigator$language$s === void 0 ? void 0 : _navigator$language$s[0];
|
1031
1033
|
var defaultLanguageCode = storedLanguage || browserLanguage;
|
1032
1034
|
languageItem = LANGUAGES.find(function (i) {
|
1033
1035
|
return i.code === defaultLanguageCode;
|
@@ -1383,7 +1385,6 @@ var Loading = function Loading() {
|
|
1383
1385
|
var isLoading = useSelector(function (state) {
|
1384
1386
|
return state.common.isLoading;
|
1385
1387
|
});
|
1386
|
-
localStorage.setItem("LAST_TIME_REQUETST", moment().utc().format("YYYY-MM-DD HH:mm:ss"));
|
1387
1388
|
return isLoading ? React__default.createElement("div", {
|
1388
1389
|
style: loadingStyle
|
1389
1390
|
}, React__default.createElement("div", {
|
@@ -1861,7 +1862,7 @@ var student_status = "학생별 현황";
|
|
1861
1862
|
var user_manager = "사용자 목록";
|
1862
1863
|
var recent_exam_results = "최근 시험 결과";
|
1863
1864
|
var instructor_name = "강사이름";
|
1864
|
-
var
|
1865
|
+
var institute_name = "학원 이름";
|
1865
1866
|
var total_students = "총 학생수";
|
1866
1867
|
var total_class = "반 수";
|
1867
1868
|
var total_number_students = "총 학생수";
|
@@ -1893,10 +1894,11 @@ var yes = "예";
|
|
1893
1894
|
var no = "아니요";
|
1894
1895
|
var cancel = "취소";
|
1895
1896
|
var confirmation = "확인";
|
1896
|
-
var student_name = "
|
1897
|
+
var student_name = "학생 이름";
|
1897
1898
|
var full_pool_time = "전체풀이시간";
|
1898
1899
|
var number_question = "{{number}}번";
|
1899
1900
|
var number_answer = "{{number}}번";
|
1901
|
+
var answer_no = "{{number}}번";
|
1900
1902
|
var answer_rate = "정답률";
|
1901
1903
|
var seconds = "초";
|
1902
1904
|
var search_placeholder = "시험 이름으로 검색하기";
|
@@ -1910,14 +1912,15 @@ var correct_answer_for_each_student = "학생별 정답 여부";
|
|
1910
1912
|
var information_by_question = "문항별 정보";
|
1911
1913
|
var no_data = "데이터 없음";
|
1912
1914
|
var internet_connection_was_lost = "인터넷 연결이 끊어졌습니다";
|
1915
|
+
var internet_connection_is_back = "인터넷 연결이 다시 돌아왔습니다";
|
1913
1916
|
var problem = "문제";
|
1914
|
-
var number_problem = "{{number}}
|
1917
|
+
var number_problem = "문제 {{number}}";
|
1915
1918
|
var problems = "문제";
|
1916
1919
|
var problem_solving_time = "문제풀이 시간";
|
1917
1920
|
var minutes = "분";
|
1918
1921
|
var correct_rate = "정답률";
|
1919
1922
|
var title = "제목";
|
1920
|
-
var
|
1923
|
+
var exam_duration = "시험 시간";
|
1921
1924
|
var answer_count = "답변 수";
|
1922
1925
|
var question_count = "문제 갯수";
|
1923
1926
|
var multi_choice = "여러 개임";
|
@@ -1935,7 +1938,8 @@ var select_placeholder = "선택하다...";
|
|
1935
1938
|
var view_exam = "시험 보기";
|
1936
1939
|
var back = "뒤쪽에";
|
1937
1940
|
var edit = "편집하기";
|
1938
|
-
var
|
1941
|
+
var date_format_exam = "YYYY년 MM월";
|
1942
|
+
var date_format = "YYYY년 MM월 DD일";
|
1939
1943
|
var date_time_format = "YYYY년 MM월 DD일 HH:mm";
|
1940
1944
|
var date_time_format_12h = "YYYY-MM-DD HH:mm A";
|
1941
1945
|
var full_date_time_format = "YYYY년 MMMM월 DD일 HH:mm:ss";
|
@@ -2183,8 +2187,8 @@ var class_information = "수업정보";
|
|
2183
2187
|
var teachers = "교사";
|
2184
2188
|
var lessons = "수업";
|
2185
2189
|
var new_test = "새로운 시험";
|
2186
|
-
var
|
2187
|
-
var
|
2190
|
+
var manage_saved_exams = "저장된 시험 관리";
|
2191
|
+
var manage_textbook = "교과서 관리";
|
2188
2192
|
var my_question = "내 질문";
|
2189
2193
|
var update_class = "수업 업데이트";
|
2190
2194
|
var create_class = "수업 만들기";
|
@@ -2210,7 +2214,7 @@ var tricky_problems = "까다로웠던 문제";
|
|
2210
2214
|
var issues_vulnerable = "내가 취약한 문제";
|
2211
2215
|
var grades_by_area = "영역별 성적";
|
2212
2216
|
var problems_that_took_a_long_time = "시간이 오래 걸린 문제";
|
2213
|
-
var my_time = "
|
2217
|
+
var my_time = "내 시간";
|
2214
2218
|
var top_time = "상위권 시간";
|
2215
2219
|
var easy_problem = "쉬운 문제";
|
2216
2220
|
var trick_problem = "함정 문제";
|
@@ -2225,8 +2229,8 @@ var chosen = "정답";
|
|
2225
2229
|
var sign_in_with_your_google_account = "Google 계정으로 로그인";
|
2226
2230
|
var it_will_be_generated_automatically_if_not_provided = "제공되지 않으면 자동으로 생성됩니다";
|
2227
2231
|
var academy_not_found = "아카데미를 찾을 수 없습니다";
|
2228
|
-
var
|
2229
|
-
var
|
2232
|
+
var all_notice = "전체 공지";
|
2233
|
+
var institute_notice = "학원 공지";
|
2230
2234
|
var class_notice = "수업 공지";
|
2231
2235
|
var create_account_demo = "계정 데모 만들기";
|
2232
2236
|
var update_data_demo = "데이터 데모 업데이트";
|
@@ -2252,7 +2256,7 @@ var next = "다음";
|
|
2252
2256
|
var complete_processing = "완료 처리";
|
2253
2257
|
var creation_date = "생성 날짜";
|
2254
2258
|
var total_use = "총 사용량";
|
2255
|
-
var
|
2259
|
+
var duration = "지속";
|
2256
2260
|
var code_header = "암호";
|
2257
2261
|
var total_number_of_students_participating = "참여한 총 학생 수";
|
2258
2262
|
var create = "생성하기";
|
@@ -2472,6 +2476,33 @@ var full_name_is_required = "성명은 필수 항목입니다";
|
|
2472
2476
|
var email_is_required = "이메일은 필수입니다";
|
2473
2477
|
var not_found = "찾을 수 없음";
|
2474
2478
|
var enter_text_to_confirm_delete = "삭제를 확인하려면 \"{{text}}\" 를 입력하세요";
|
2479
|
+
var begin_exam = "시험 시작";
|
2480
|
+
var scheduled = "오늘 수업";
|
2481
|
+
var attended = "출석 완료";
|
2482
|
+
var today_classes = "오늘의 수업";
|
2483
|
+
var print_all = "전체 출력";
|
2484
|
+
var exam = "시험";
|
2485
|
+
var me = "나";
|
2486
|
+
var teacher_name = "선생님 성함";
|
2487
|
+
var class_schedule = "수업 시간표";
|
2488
|
+
var summary = "요약";
|
2489
|
+
var load_exam = "시험 로드";
|
2490
|
+
var exam_name = "시험 이름";
|
2491
|
+
var student_phone_number_header = "학생 전화번호";
|
2492
|
+
var parent_phone_number_header = "학부모 전화번호";
|
2493
|
+
var cases = "{{number}}건";
|
2494
|
+
var my_classes = "내 수업";
|
2495
|
+
var choose = "선택하다";
|
2496
|
+
var additional_duration = "추가 기간";
|
2497
|
+
var enter_textbook_name_to_search = "검색할 교재명을 입력하세요";
|
2498
|
+
var select_class_placeholder = "수업을 선택하세요...";
|
2499
|
+
var user_name = "유저 이름";
|
2500
|
+
var vulnerable_detail = "다른 학생들의 정답률은 높은데, 나는 정답을 맞추지 못한 문제들입니다.";
|
2501
|
+
var protracted_problem_detail = "정답 문제 중 풀이 시간을 비교합니다.";
|
2502
|
+
var number_of_correct_answers = "정답 수";
|
2503
|
+
var total_solve_time = "총 풀이 시간";
|
2504
|
+
var number_of_answer = "{{ number }} 개";
|
2505
|
+
var time_comparison = "시간 비교";
|
2475
2506
|
var lang_ko = {
|
2476
2507
|
problem_solving: problem_solving,
|
2477
2508
|
my_story: my_story,
|
@@ -2487,7 +2518,7 @@ var lang_ko = {
|
|
2487
2518
|
user_manager: user_manager,
|
2488
2519
|
recent_exam_results: recent_exam_results,
|
2489
2520
|
instructor_name: instructor_name,
|
2490
|
-
|
2521
|
+
institute_name: institute_name,
|
2491
2522
|
total_students: total_students,
|
2492
2523
|
total_class: total_class,
|
2493
2524
|
total_number_students: total_number_students,
|
@@ -2525,6 +2556,7 @@ var lang_ko = {
|
|
2525
2556
|
full_pool_time: full_pool_time,
|
2526
2557
|
number_question: number_question,
|
2527
2558
|
number_answer: number_answer,
|
2559
|
+
answer_no: answer_no,
|
2528
2560
|
answer_rate: answer_rate,
|
2529
2561
|
seconds: seconds,
|
2530
2562
|
search_placeholder: search_placeholder,
|
@@ -2538,6 +2570,7 @@ var lang_ko = {
|
|
2538
2570
|
information_by_question: information_by_question,
|
2539
2571
|
no_data: no_data,
|
2540
2572
|
internet_connection_was_lost: internet_connection_was_lost,
|
2573
|
+
internet_connection_is_back: internet_connection_is_back,
|
2541
2574
|
problem: problem,
|
2542
2575
|
number_problem: number_problem,
|
2543
2576
|
problems: problems,
|
@@ -2545,7 +2578,7 @@ var lang_ko = {
|
|
2545
2578
|
minutes: minutes,
|
2546
2579
|
correct_rate: correct_rate,
|
2547
2580
|
title: title,
|
2548
|
-
|
2581
|
+
exam_duration: exam_duration,
|
2549
2582
|
answer_count: answer_count,
|
2550
2583
|
question_count: question_count,
|
2551
2584
|
multi_choice: multi_choice,
|
@@ -2564,6 +2597,7 @@ var lang_ko = {
|
|
2564
2597
|
back: back,
|
2565
2598
|
edit: edit,
|
2566
2599
|
"delete": "삭제하기",
|
2600
|
+
date_format_exam: date_format_exam,
|
2567
2601
|
date_format: date_format,
|
2568
2602
|
date_time_format: date_time_format,
|
2569
2603
|
date_time_format_12h: date_time_format_12h,
|
@@ -2798,8 +2832,8 @@ var lang_ko = {
|
|
2798
2832
|
teachers: teachers,
|
2799
2833
|
lessons: lessons,
|
2800
2834
|
new_test: new_test,
|
2801
|
-
|
2802
|
-
|
2835
|
+
manage_saved_exams: manage_saved_exams,
|
2836
|
+
manage_textbook: manage_textbook,
|
2803
2837
|
my_question: my_question,
|
2804
2838
|
update_class: update_class,
|
2805
2839
|
create_class: create_class,
|
@@ -2840,8 +2874,8 @@ var lang_ko = {
|
|
2840
2874
|
sign_in_with_your_google_account: sign_in_with_your_google_account,
|
2841
2875
|
it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided,
|
2842
2876
|
academy_not_found: academy_not_found,
|
2843
|
-
|
2844
|
-
|
2877
|
+
all_notice: all_notice,
|
2878
|
+
institute_notice: institute_notice,
|
2845
2879
|
class_notice: class_notice,
|
2846
2880
|
create_account_demo: create_account_demo,
|
2847
2881
|
update_data_demo: update_data_demo,
|
@@ -2870,7 +2904,7 @@ var lang_ko = {
|
|
2870
2904
|
complete_processing: complete_processing,
|
2871
2905
|
creation_date: creation_date,
|
2872
2906
|
total_use: total_use,
|
2873
|
-
|
2907
|
+
duration: duration,
|
2874
2908
|
code_header: code_header,
|
2875
2909
|
total_number_of_students_participating: total_number_of_students_participating,
|
2876
2910
|
create: create,
|
@@ -3091,11 +3125,39 @@ var lang_ko = {
|
|
3091
3125
|
full_name_is_required: full_name_is_required,
|
3092
3126
|
email_is_required: email_is_required,
|
3093
3127
|
not_found: not_found,
|
3094
|
-
enter_text_to_confirm_delete: enter_text_to_confirm_delete
|
3128
|
+
enter_text_to_confirm_delete: enter_text_to_confirm_delete,
|
3129
|
+
begin_exam: begin_exam,
|
3130
|
+
scheduled: scheduled,
|
3131
|
+
attended: attended,
|
3132
|
+
today_classes: today_classes,
|
3133
|
+
print_all: print_all,
|
3134
|
+
exam: exam,
|
3135
|
+
me: me,
|
3136
|
+
teacher_name: teacher_name,
|
3137
|
+
class_schedule: class_schedule,
|
3138
|
+
summary: summary,
|
3139
|
+
load_exam: load_exam,
|
3140
|
+
exam_name: exam_name,
|
3141
|
+
student_phone_number_header: student_phone_number_header,
|
3142
|
+
parent_phone_number_header: parent_phone_number_header,
|
3143
|
+
cases: cases,
|
3144
|
+
my_classes: my_classes,
|
3145
|
+
choose: choose,
|
3146
|
+
additional_duration: additional_duration,
|
3147
|
+
enter_textbook_name_to_search: enter_textbook_name_to_search,
|
3148
|
+
"type_at_least_{number}_characters_to_search": "검색하려면 최소 {{ number }}자를 입력하세요",
|
3149
|
+
select_class_placeholder: select_class_placeholder,
|
3150
|
+
user_name: user_name,
|
3151
|
+
vulnerable_detail: vulnerable_detail,
|
3152
|
+
protracted_problem_detail: protracted_problem_detail,
|
3153
|
+
number_of_correct_answers: number_of_correct_answers,
|
3154
|
+
total_solve_time: total_solve_time,
|
3155
|
+
number_of_answer: number_of_answer,
|
3156
|
+
time_comparison: time_comparison
|
3095
3157
|
};
|
3096
3158
|
|
3097
3159
|
var problem_solving$1 = "Problem Solving";
|
3098
|
-
var my_story$1 = "
|
3160
|
+
var my_story$1 = "Exam History";
|
3099
3161
|
var search_find$1 = "Search and find";
|
3100
3162
|
var enter_test_code$1 = "Enter test code";
|
3101
3163
|
var login_success$1 = "Login Success";
|
@@ -3108,7 +3170,7 @@ var student_status$1 = "Student Status";
|
|
3108
3170
|
var user_manager$1 = "User Manager";
|
3109
3171
|
var recent_exam_results$1 = "Recent exam";
|
3110
3172
|
var instructor_name$1 = "Instructor name";
|
3111
|
-
var
|
3173
|
+
var institute_name$1 = "Institute name";
|
3112
3174
|
var total_students$1 = "Total students";
|
3113
3175
|
var total_class$1 = "Total Class";
|
3114
3176
|
var total_number_students$1 = "Total number of students";
|
@@ -3124,10 +3186,10 @@ var time_remaining$1 = "Time remaining";
|
|
3124
3186
|
var number_results$1 = "{{number}} Results";
|
3125
3187
|
var number_result$1 = "{{number}} Result";
|
3126
3188
|
var mins_mins_seconds_seconds$1 = "{{mins}}m {{seconds}}s";
|
3127
|
-
var mins_mins$1 = "{{mins}}
|
3189
|
+
var mins_mins$1 = "{{mins}} Minutes";
|
3128
3190
|
var class_name$1 = "Class name";
|
3129
3191
|
var create_new_exam$1 = "Create exam";
|
3130
|
-
var live_exam$1 = "Live
|
3192
|
+
var live_exam$1 = "Live Exam";
|
3131
3193
|
var there_are_no_recent_exams$1 = "There are no recent exams";
|
3132
3194
|
var you_have_started_an_exam_with_code_code_do_you_want_to_continue$1 = "You have started an exam with code {{code}}, do you want to continue?";
|
3133
3195
|
var here$1 = "here";
|
@@ -3144,6 +3206,7 @@ var student_name$1 = "Student name";
|
|
3144
3206
|
var full_pool_time$1 = "Full pool time";
|
3145
3207
|
var number_question$1 = "No.{{number}}";
|
3146
3208
|
var number_answer$1 = "No.{{number}}";
|
3209
|
+
var answer_no$1 = "Ans.{{number}}";
|
3147
3210
|
var answer_rate$1 = "Answer rate";
|
3148
3211
|
var seconds$1 = "s";
|
3149
3212
|
var search_placeholder$1 = "Search by exam name";
|
@@ -3156,7 +3219,8 @@ var question_time_for_each_student$1 = "Question time for each student";
|
|
3156
3219
|
var correct_answer_for_each_student$1 = "Correct answer for each student";
|
3157
3220
|
var information_by_question$1 = "Information by question";
|
3158
3221
|
var no_data$1 = "No data";
|
3159
|
-
var internet_connection_was_lost$1 = "
|
3222
|
+
var internet_connection_was_lost$1 = "The internet connection was lost";
|
3223
|
+
var internet_connection_is_back$1 = "The internet connection is back";
|
3160
3224
|
var problem$1 = "Problem";
|
3161
3225
|
var number_problem$1 = "No.{{number}}";
|
3162
3226
|
var problems$1 = "Problems";
|
@@ -3212,7 +3276,7 @@ var email$1 = "Email";
|
|
3212
3276
|
var is_paid$1 = "Is paid";
|
3213
3277
|
var payment_time$1 = "Payment time";
|
3214
3278
|
var payments$1 = "Payments";
|
3215
|
-
var
|
3279
|
+
var exam_duration$1 = "Exam Duration";
|
3216
3280
|
var answer_count$1 = "Answer count";
|
3217
3281
|
var question_count$1 = "Question count";
|
3218
3282
|
var multi_choice$1 = "Is multiple";
|
@@ -3221,8 +3285,9 @@ var view_exam$1 = "View exam";
|
|
3221
3285
|
var update_exam$1 = "Update exam";
|
3222
3286
|
var create_exam$1 = "Create exam";
|
3223
3287
|
var back$1 = "Back";
|
3224
|
-
var
|
3225
|
-
var
|
3288
|
+
var date_format_exam$1 = "MMMM YYYY";
|
3289
|
+
var date_format$1 = "MMM.D YYYY";
|
3290
|
+
var date_time_format$1 = "HH:mm MMM.D YYYY ";
|
3226
3291
|
var date_time_format_12h$1 = "MM-DD-YYYY HH:mm A";
|
3227
3292
|
var full_date_time_format$1 = "MMM Do YYYY HH:mm:ss";
|
3228
3293
|
var total_questions$1 = "Total questions";
|
@@ -3290,8 +3355,8 @@ var button$1 = {
|
|
3290
3355
|
close: "Close",
|
3291
3356
|
send: "Send"
|
3292
3357
|
};
|
3293
|
-
var question_and_answer$1 = "
|
3294
|
-
var problem_number_question$1 = "
|
3358
|
+
var question_and_answer$1 = "My Q&As";
|
3359
|
+
var problem_number_question$1 = "Question {{number}}";
|
3295
3360
|
var teacher_in_charge$1 = "Teacher In Charge";
|
3296
3361
|
var counselor$1 = "Counselor";
|
3297
3362
|
var new_question$1 = "New Question";
|
@@ -3306,7 +3371,7 @@ var no_academies_available$1 = "No academies available";
|
|
3306
3371
|
var not_allow_register$1 = "Not allow to register role";
|
3307
3372
|
var credentials_invalid$1 = "Credentials is invalid";
|
3308
3373
|
var role_is_invalid$1 = "Role is invalid";
|
3309
|
-
var today$1 = "
|
3374
|
+
var today$1 = "Today";
|
3310
3375
|
var user_is_disabled$1 = "User is disabled";
|
3311
3376
|
var cover_image$1 = "Cover image";
|
3312
3377
|
var notification$1 = "Notification";
|
@@ -3361,7 +3426,7 @@ var enter_subject_name_to_search$1 = "Enter subject name to search subjects";
|
|
3361
3426
|
var enter_textbook_title$1 = "Enter textbook title";
|
3362
3427
|
var chapter_name_placeholder$1 = "Enter chapter name";
|
3363
3428
|
var subchapter_name_placeholder$1 = "Enter subchapter name";
|
3364
|
-
var article_number$1 = "
|
3429
|
+
var article_number$1 = "Passage";
|
3365
3430
|
var question_count_format$1 = "No.{{number}}";
|
3366
3431
|
var select_category$1 = "Select category";
|
3367
3432
|
var update_textbook$1 = "Update textbook";
|
@@ -3375,14 +3440,14 @@ var add_new_chapter_to_textbook$1 = "Add new chapter to the textbook";
|
|
3375
3440
|
var add_new_subchapter_to_parent_chapter$1 = "Add new subchapter to the parent chapter ({{ chapterName }})";
|
3376
3441
|
var add$1 = "Add";
|
3377
3442
|
var add_new_article_to_chapter$1 = "Add new article to the chapter ({{ chapterName }})";
|
3378
|
-
var score_format$1 = "{{score}}
|
3443
|
+
var score_format$1 = "{{score}} Points";
|
3379
3444
|
var round$1 = "{{number}} round";
|
3380
3445
|
var number_grade$1 = "Grade {{number}}";
|
3381
3446
|
var print$1 = "Print";
|
3382
3447
|
var school$1 = "School";
|
3383
|
-
var grade$1 = "
|
3384
|
-
var student_phone_number$1 = "Student
|
3385
|
-
var parent_phone_number$1 = "Parent
|
3448
|
+
var grade$1 = "Year";
|
3449
|
+
var student_phone_number$1 = "Student Number";
|
3450
|
+
var parent_phone_number$1 = "Parent Number";
|
3386
3451
|
var update_textbook_title$1 = "Update textbook title";
|
3387
3452
|
var invalid_weekly_day_time$1 = "Invalid weekly day time";
|
3388
3453
|
var no_image$1 = "No image";
|
@@ -3401,7 +3466,7 @@ var switch_academy$1 = "Switch Academy";
|
|
3401
3466
|
var there_are_no_lessons_this_week$1 = "There are no lessons this week";
|
3402
3467
|
var today_lessons$1 = "Today lessons";
|
3403
3468
|
var update_message$1 = "Update message";
|
3404
|
-
var attachment$1 = "
|
3469
|
+
var attachment$1 = "Add File";
|
3405
3470
|
var confirm_delete_message$1 = "Are you sure to delete this message?";
|
3406
3471
|
var download$1 = "Download";
|
3407
3472
|
var full_exam$1 = "Full exam";
|
@@ -3427,8 +3492,8 @@ var my_problem_solving_order$1 = "My problem solving order";
|
|
3427
3492
|
var top_rankings_problem_solving_order$1 = "Top rankings problem solving order";
|
3428
3493
|
var comparison_of_top_rankings_and_problem_solving_order$1 = "Comparison of top rankings and problem-solving order";
|
3429
3494
|
var my_answers$1 = "My answers";
|
3430
|
-
var request_for_consultation$1 = "
|
3431
|
-
var ask_a_question_with_a_problem$1 = "Ask
|
3495
|
+
var request_for_consultation$1 = "Consultation";
|
3496
|
+
var ask_a_question_with_a_problem$1 = "Ask with Question ";
|
3432
3497
|
var live$1 = "live";
|
3433
3498
|
var user_email$1 = "User email";
|
3434
3499
|
var user_academy$1 = {
|
@@ -3456,9 +3521,9 @@ var lessons$1 = "Lessons";
|
|
3456
3521
|
var update_class$1 = "Update class";
|
3457
3522
|
var create_class$1 = "Create class";
|
3458
3523
|
var new_test$1 = "New Test";
|
3459
|
-
var
|
3460
|
-
var
|
3461
|
-
var my_question$1 = "My
|
3524
|
+
var manage_saved_exams$1 = "Manage saved exams";
|
3525
|
+
var manage_textbook$1 = "Manage Textbook";
|
3526
|
+
var my_question$1 = "My Q&As";
|
3462
3527
|
var problem_number$1 = "Problem number";
|
3463
3528
|
var solve_time$1 = "Solve time";
|
3464
3529
|
var comparison_of_top_rankings$1 = "Comparison of top rankings";
|
@@ -3495,8 +3560,8 @@ var chosen$1 = "Answer";
|
|
3495
3560
|
var sign_in_with_your_google_account$1 = "Sign in with your Google Account";
|
3496
3561
|
var it_will_be_generated_automatically_if_not_provided$1 = "It will be generated automatically if not provided";
|
3497
3562
|
var academy_not_found$1 = "Academy not found";
|
3498
|
-
var
|
3499
|
-
var
|
3563
|
+
var all_notice$1 = "All notice";
|
3564
|
+
var institute_notice$1 = "Institute Notice";
|
3500
3565
|
var class_notice$1 = "Class Notice";
|
3501
3566
|
var create_account_demo$1 = "Create Account Demo";
|
3502
3567
|
var update_data_demo$1 = "Update Data Demo";
|
@@ -3522,7 +3587,7 @@ var next$1 = "Next";
|
|
3522
3587
|
var complete_processing$1 = "Complete processing";
|
3523
3588
|
var creation_date$1 = "Creation date";
|
3524
3589
|
var total_use$1 = "Total use";
|
3525
|
-
var
|
3590
|
+
var duration$1 = "Duration";
|
3526
3591
|
var code_header$1 = "Code";
|
3527
3592
|
var total_number_of_students_participating$1 = "Total number of students participating";
|
3528
3593
|
var create$1 = "Create";
|
@@ -3538,7 +3603,7 @@ var time_heatmap_for_each_problem$1 = "Time heatmap for each problem";
|
|
3538
3603
|
var learn_more$1 = "Learn more";
|
3539
3604
|
var total_number_of_problems$1 = "Total number of problems";
|
3540
3605
|
var time_limit$1 = "time_limit";
|
3541
|
-
var add_questions$1 = "Add
|
3606
|
+
var add_questions$1 = "Add Passage";
|
3542
3607
|
var start_exam$1 = "Start Exam";
|
3543
3608
|
var copy_test_code$1 = "Copy Test Code";
|
3544
3609
|
var student_has_joined$1 = "Student has joined:";
|
@@ -3719,6 +3784,33 @@ var full_name_is_required$1 = "Full name is required";
|
|
3719
3784
|
var email_is_required$1 = "Email is required";
|
3720
3785
|
var not_found$1 = "Not found";
|
3721
3786
|
var enter_text_to_confirm_delete$1 = "Enter \"{{text}}\" to confirm delete";
|
3787
|
+
var begin_exam$1 = "Begin Exam";
|
3788
|
+
var scheduled$1 = "Scheduled";
|
3789
|
+
var attended$1 = "Attended";
|
3790
|
+
var today_classes$1 = "Today's Classes";
|
3791
|
+
var print_all$1 = "Print All";
|
3792
|
+
var exam$1 = "Exam";
|
3793
|
+
var me$1 = "Me";
|
3794
|
+
var teacher_name$1 = "Teacher Name";
|
3795
|
+
var class_schedule$1 = "Class Schedule";
|
3796
|
+
var summary$1 = "Summary";
|
3797
|
+
var load_exam$1 = "Load Exam";
|
3798
|
+
var exam_name$1 = "Exam Name";
|
3799
|
+
var student_phone_number_header$1 = "Stud. Number";
|
3800
|
+
var parent_phone_number_header$1 = "Prnt. Number";
|
3801
|
+
var cases$1 = "{{number}} Results";
|
3802
|
+
var my_classes$1 = "My Classes";
|
3803
|
+
var choose$1 = "Choose";
|
3804
|
+
var additional_duration$1 = "Additional duration";
|
3805
|
+
var enter_textbook_name_to_search$1 = "Enter textbook name to search";
|
3806
|
+
var select_class_placeholder$1 = "Select class...";
|
3807
|
+
var user_name$1 = "Username";
|
3808
|
+
var vulnerable_detail$1 = "Other students had a high percentage of correct answers, but I could not answer these questions correctly.";
|
3809
|
+
var protracted_problem_detail$1 = "Compare the solution time among the correct answers.";
|
3810
|
+
var number_of_correct_answers$1 = "Number of correct answers";
|
3811
|
+
var total_solve_time$1 = "Total solve time";
|
3812
|
+
var number_of_answer$1 = "{{ number }}";
|
3813
|
+
var time_comparison$1 = "Time comparison";
|
3722
3814
|
var lang_en = {
|
3723
3815
|
problem_solving: problem_solving$1,
|
3724
3816
|
my_story: my_story$1,
|
@@ -3734,7 +3826,7 @@ var lang_en = {
|
|
3734
3826
|
user_manager: user_manager$1,
|
3735
3827
|
recent_exam_results: recent_exam_results$1,
|
3736
3828
|
instructor_name: instructor_name$1,
|
3737
|
-
|
3829
|
+
institute_name: institute_name$1,
|
3738
3830
|
total_students: total_students$1,
|
3739
3831
|
total_class: total_class$1,
|
3740
3832
|
total_number_students: total_number_students$1,
|
@@ -3772,6 +3864,7 @@ var lang_en = {
|
|
3772
3864
|
full_pool_time: full_pool_time$1,
|
3773
3865
|
number_question: number_question$1,
|
3774
3866
|
number_answer: number_answer$1,
|
3867
|
+
answer_no: answer_no$1,
|
3775
3868
|
answer_rate: answer_rate$1,
|
3776
3869
|
seconds: seconds$1,
|
3777
3870
|
search_placeholder: search_placeholder$1,
|
@@ -3785,6 +3878,7 @@ var lang_en = {
|
|
3785
3878
|
information_by_question: information_by_question$1,
|
3786
3879
|
no_data: no_data$1,
|
3787
3880
|
internet_connection_was_lost: internet_connection_was_lost$1,
|
3881
|
+
internet_connection_is_back: internet_connection_is_back$1,
|
3788
3882
|
problem: problem$1,
|
3789
3883
|
number_problem: number_problem$1,
|
3790
3884
|
problems: problems$1,
|
@@ -3841,7 +3935,7 @@ var lang_en = {
|
|
3841
3935
|
is_paid: is_paid$1,
|
3842
3936
|
payment_time: payment_time$1,
|
3843
3937
|
payments: payments$1,
|
3844
|
-
|
3938
|
+
exam_duration: exam_duration$1,
|
3845
3939
|
answer_count: answer_count$1,
|
3846
3940
|
question_count: question_count$1,
|
3847
3941
|
multi_choice: multi_choice$1,
|
@@ -3850,6 +3944,7 @@ var lang_en = {
|
|
3850
3944
|
update_exam: update_exam$1,
|
3851
3945
|
create_exam: create_exam$1,
|
3852
3946
|
back: back$1,
|
3947
|
+
date_format_exam: date_format_exam$1,
|
3853
3948
|
date_format: date_format$1,
|
3854
3949
|
date_time_format: date_time_format$1,
|
3855
3950
|
date_time_format_12h: date_time_format_12h$1,
|
@@ -4071,8 +4166,8 @@ var lang_en = {
|
|
4071
4166
|
update_class: update_class$1,
|
4072
4167
|
create_class: create_class$1,
|
4073
4168
|
new_test: new_test$1,
|
4074
|
-
|
4075
|
-
|
4169
|
+
manage_saved_exams: manage_saved_exams$1,
|
4170
|
+
manage_textbook: manage_textbook$1,
|
4076
4171
|
my_question: my_question$1,
|
4077
4172
|
problem_number: problem_number$1,
|
4078
4173
|
solve_time: solve_time$1,
|
@@ -4110,8 +4205,8 @@ var lang_en = {
|
|
4110
4205
|
sign_in_with_your_google_account: sign_in_with_your_google_account$1,
|
4111
4206
|
it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided$1,
|
4112
4207
|
academy_not_found: academy_not_found$1,
|
4113
|
-
|
4114
|
-
|
4208
|
+
all_notice: all_notice$1,
|
4209
|
+
institute_notice: institute_notice$1,
|
4115
4210
|
class_notice: class_notice$1,
|
4116
4211
|
create_account_demo: create_account_demo$1,
|
4117
4212
|
update_data_demo: update_data_demo$1,
|
@@ -4140,7 +4235,7 @@ var lang_en = {
|
|
4140
4235
|
complete_processing: complete_processing$1,
|
4141
4236
|
creation_date: creation_date$1,
|
4142
4237
|
total_use: total_use$1,
|
4143
|
-
|
4238
|
+
duration: duration$1,
|
4144
4239
|
code_header: code_header$1,
|
4145
4240
|
total_number_of_students_participating: total_number_of_students_participating$1,
|
4146
4241
|
create: create$1,
|
@@ -4338,7 +4433,35 @@ var lang_en = {
|
|
4338
4433
|
full_name_is_required: full_name_is_required$1,
|
4339
4434
|
email_is_required: email_is_required$1,
|
4340
4435
|
not_found: not_found$1,
|
4341
|
-
enter_text_to_confirm_delete: enter_text_to_confirm_delete$1
|
4436
|
+
enter_text_to_confirm_delete: enter_text_to_confirm_delete$1,
|
4437
|
+
begin_exam: begin_exam$1,
|
4438
|
+
scheduled: scheduled$1,
|
4439
|
+
attended: attended$1,
|
4440
|
+
today_classes: today_classes$1,
|
4441
|
+
print_all: print_all$1,
|
4442
|
+
exam: exam$1,
|
4443
|
+
me: me$1,
|
4444
|
+
teacher_name: teacher_name$1,
|
4445
|
+
class_schedule: class_schedule$1,
|
4446
|
+
summary: summary$1,
|
4447
|
+
load_exam: load_exam$1,
|
4448
|
+
exam_name: exam_name$1,
|
4449
|
+
student_phone_number_header: student_phone_number_header$1,
|
4450
|
+
parent_phone_number_header: parent_phone_number_header$1,
|
4451
|
+
cases: cases$1,
|
4452
|
+
my_classes: my_classes$1,
|
4453
|
+
choose: choose$1,
|
4454
|
+
additional_duration: additional_duration$1,
|
4455
|
+
enter_textbook_name_to_search: enter_textbook_name_to_search$1,
|
4456
|
+
"type_at_least_{number}_characters_to_search": "Type at least {{ number }} characters to search",
|
4457
|
+
select_class_placeholder: select_class_placeholder$1,
|
4458
|
+
user_name: user_name$1,
|
4459
|
+
vulnerable_detail: vulnerable_detail$1,
|
4460
|
+
protracted_problem_detail: protracted_problem_detail$1,
|
4461
|
+
number_of_correct_answers: number_of_correct_answers$1,
|
4462
|
+
total_solve_time: total_solve_time$1,
|
4463
|
+
number_of_answer: number_of_answer$1,
|
4464
|
+
time_comparison: time_comparison$1
|
4342
4465
|
};
|
4343
4466
|
|
4344
4467
|
i18n.use(initReactI18next).init({
|
@@ -4527,6 +4650,36 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4527
4650
|
return Promise.reject(e);
|
4528
4651
|
}
|
4529
4652
|
};
|
4653
|
+
var handleLogOutAcademy = function handleLogOutAcademy(selectedAcademy, callback) {
|
4654
|
+
try {
|
4655
|
+
var _temp7 = function _temp7() {
|
4656
|
+
dispatch(setLoading(false));
|
4657
|
+
callback();
|
4658
|
+
};
|
4659
|
+
dispatch(setLoading(true));
|
4660
|
+
var academyDomain = selectedAcademy ? selectedAcademy.domain : undefined;
|
4661
|
+
var _temp6 = _catch(function () {
|
4662
|
+
return Promise.resolve(switchAcademy(0)).then(function (res) {
|
4663
|
+
var data = res.data;
|
4664
|
+
var requestBody = {
|
4665
|
+
accessToken: data.accessToken,
|
4666
|
+
email: user.email,
|
4667
|
+
academyId: 0,
|
4668
|
+
role: role
|
4669
|
+
};
|
4670
|
+
academyDomain && localStorage.setItem(ACADEMY_DOMAIN, academyDomain);
|
4671
|
+
!academyDomain && localStorage.removeItem(ACADEMY_DOMAIN);
|
4672
|
+
return Promise.resolve(handleLoginAccessToken(requestBody, false, user.academyDomain ? academyDomain : undefined)).then(function () {});
|
4673
|
+
});
|
4674
|
+
}, function (error) {
|
4675
|
+
academyDomain && localStorage.removeItem(ACADEMY_DOMAIN);
|
4676
|
+
toast.error(getErrorMessage(t, error));
|
4677
|
+
});
|
4678
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6));
|
4679
|
+
} catch (e) {
|
4680
|
+
return Promise.reject(e);
|
4681
|
+
}
|
4682
|
+
};
|
4530
4683
|
useEffect(function () {
|
4531
4684
|
getAcademies();
|
4532
4685
|
}, [user === null || user === void 0 ? void 0 : user.academyDomain, user === null || user === void 0 ? void 0 : user.email]);
|
@@ -4544,7 +4697,8 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4544
4697
|
dropdownOpen: dropdownOpen,
|
4545
4698
|
academyList: academyList,
|
4546
4699
|
toggleDropdown: toggleDropdown,
|
4547
|
-
handleSwitchAcademy: handleSwitchAcademy
|
4700
|
+
handleSwitchAcademy: handleSwitchAcademy,
|
4701
|
+
handleLogOutAcademy: handleLogOutAcademy
|
4548
4702
|
};
|
4549
4703
|
};
|
4550
4704
|
|
@@ -4552,23 +4706,25 @@ var MenuItemCustom = styled(MenuItem)(function () {
|
|
4552
4706
|
return {
|
4553
4707
|
'&.Mui-selected': {
|
4554
4708
|
backgroundColor: styles.light
|
4555
|
-
}
|
4709
|
+
},
|
4710
|
+
padding: "12px 8px"
|
4556
4711
|
};
|
4557
4712
|
});
|
4558
4713
|
var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
4559
|
-
var _user$roles
|
4714
|
+
var _user$roles;
|
4560
4715
|
var role = _ref.role,
|
4561
4716
|
history = _ref.history,
|
4562
4717
|
homeAcademyUrl = _ref.homeAcademyUrl,
|
4563
4718
|
homeUrl = _ref.homeUrl,
|
4564
|
-
|
4565
|
-
|
4719
|
+
hideAcademyName = _ref.hideAcademyName,
|
4720
|
+
onSignOut = _ref.onSignOut;
|
4566
4721
|
var theme = useTheme();
|
4567
4722
|
var isLargerThanLg = useMediaQuery(theme.breakpoints.up("lg"));
|
4568
4723
|
var _useSwitchAcademy = useSwitchAcademy(role, history, homeAcademyUrl, homeUrl),
|
4569
4724
|
academyList = _useSwitchAcademy.academyList,
|
4570
4725
|
handleSwitchAcademy = _useSwitchAcademy.handleSwitchAcademy,
|
4571
|
-
selectedAcademy = _useSwitchAcademy.selectedAcademy
|
4726
|
+
selectedAcademy = _useSwitchAcademy.selectedAcademy,
|
4727
|
+
handleLogOutAcademy = _useSwitchAcademy.handleLogOutAcademy;
|
4572
4728
|
var user = useSelector(function (state) {
|
4573
4729
|
var _state$common;
|
4574
4730
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
@@ -4590,8 +4746,6 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4590
4746
|
handleClose();
|
4591
4747
|
handleSwitchAcademy(data);
|
4592
4748
|
};
|
4593
|
-
var firstLetter = selectedAcademy === null || selectedAcademy === void 0 ? void 0 : (_selectedAcademy$name = selectedAcademy.name) === null || _selectedAcademy$name === void 0 ? void 0 : (_selectedAcademy$name2 = _selectedAcademy$name.charAt(0)) === null || _selectedAcademy$name2 === void 0 ? void 0 : _selectedAcademy$name2.toUpperCase();
|
4594
|
-
if (!academyList.length) return React__default.createElement(Fragment$1, null);
|
4595
4749
|
var popoverStyle = {
|
4596
4750
|
mx: 1,
|
4597
4751
|
bgcolor: open ? "action.selected" : undefined
|
@@ -4612,7 +4766,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4612
4766
|
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.image ? React__default.createElement("img", {
|
4613
4767
|
src: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.image,
|
4614
4768
|
alt: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.name
|
4615
|
-
}) : React__default.createElement("span", null
|
4769
|
+
}) : React__default.createElement("span", null)), isLargerThanLg && React__default.createElement(Grid, {
|
4616
4770
|
item: true,
|
4617
4771
|
xs: 0,
|
4618
4772
|
lg: 8
|
@@ -4624,16 +4778,40 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4624
4778
|
display: "flex",
|
4625
4779
|
alignItems: "center"
|
4626
4780
|
}
|
4627
|
-
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.name ? React__default.createElement(
|
4781
|
+
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.name ? React__default.createElement(Stack, {
|
4782
|
+
flexDirection: "column",
|
4783
|
+
gap: "2px"
|
4784
|
+
}, React__default.createElement(Typography, {
|
4628
4785
|
textAlign: "start",
|
4629
4786
|
className: "" + styles["line-clamp"],
|
4630
4787
|
sx: {
|
4631
4788
|
fontSize: 14,
|
4632
|
-
fontWeight:
|
4789
|
+
fontWeight: 900,
|
4633
4790
|
lineHeight: '1.5em',
|
4634
4791
|
color: styles.gray_900
|
4635
4792
|
}
|
4636
|
-
},
|
4793
|
+
}, user === null || user === void 0 ? void 0 : user.fullName), React__default.createElement(Typography, {
|
4794
|
+
textAlign: "start",
|
4795
|
+
className: "" + styles["line-clamp"],
|
4796
|
+
sx: {
|
4797
|
+
fontSize: 14,
|
4798
|
+
fontWeight: 500,
|
4799
|
+
lineHeight: '1.5em',
|
4800
|
+
color: styles.gray_500
|
4801
|
+
}
|
4802
|
+
}, selectedAcademy.name)) : React__default.createElement(Stack, {
|
4803
|
+
flexDirection: "column",
|
4804
|
+
gap: "2px"
|
4805
|
+
}, React__default.createElement(Typography, {
|
4806
|
+
textAlign: "start",
|
4807
|
+
className: "" + styles["line-clamp"],
|
4808
|
+
sx: {
|
4809
|
+
fontSize: 14,
|
4810
|
+
fontWeight: 900,
|
4811
|
+
lineHeight: '1.5em',
|
4812
|
+
color: styles.gray_900
|
4813
|
+
}
|
4814
|
+
}), React__default.createElement(Typography, {
|
4637
4815
|
textAlign: "start",
|
4638
4816
|
className: "" + styles["line-clamp"],
|
4639
4817
|
sx: {
|
@@ -4642,7 +4820,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4642
4820
|
lineHeight: '1.5em',
|
4643
4821
|
color: styles.gray_500
|
4644
4822
|
}
|
4645
|
-
}, t("no_academy_selected")))), React__default.createElement(Grid, {
|
4823
|
+
}, t("no_academy_selected"))))), React__default.createElement(Grid, {
|
4646
4824
|
item: true,
|
4647
4825
|
xs: 6,
|
4648
4826
|
lg: 2,
|
@@ -4664,6 +4842,11 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4664
4842
|
open: !!open,
|
4665
4843
|
anchorEl: open,
|
4666
4844
|
onClose: handleClose,
|
4845
|
+
sx: {
|
4846
|
+
"& .MuiPopover-paper": {
|
4847
|
+
padding: "8px !important"
|
4848
|
+
}
|
4849
|
+
},
|
4667
4850
|
anchorOrigin: {
|
4668
4851
|
vertical: "bottom",
|
4669
4852
|
horizontal: "right"
|
@@ -4689,25 +4872,31 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4689
4872
|
}, React__default.createElement(MenuList, {
|
4690
4873
|
sx: {
|
4691
4874
|
maxHeight: 240,
|
4692
|
-
overflowY: "auto"
|
4875
|
+
overflowY: "auto",
|
4876
|
+
padding: 0
|
4693
4877
|
}
|
4694
4878
|
}, academyList.map(function (option) {
|
4695
|
-
var _option$name$charAt;
|
4696
4879
|
return React__default.createElement(MenuItemCustom, {
|
4697
4880
|
key: option.id,
|
4698
4881
|
selected: option.id === (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id),
|
4699
4882
|
sx: {
|
4700
4883
|
whiteSpace: "wrap",
|
4701
|
-
borderRadius: "6px"
|
4884
|
+
borderRadius: "6px",
|
4885
|
+
display: "flex",
|
4886
|
+
gap: "8px"
|
4702
4887
|
},
|
4703
4888
|
onClick: function onClick() {
|
4704
4889
|
return option.id !== (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id) && handleChangeAcademy(option);
|
4705
4890
|
}
|
4706
4891
|
}, React__default.createElement(Stack, {
|
4707
4892
|
flexDirection: "row",
|
4708
|
-
|
4893
|
+
justifyContent: "space-between",
|
4894
|
+
alignItems: "center",
|
4709
4895
|
position: "relative",
|
4710
4896
|
width: "100%"
|
4897
|
+
}, React__default.createElement(Stack, {
|
4898
|
+
flexDirection: "row",
|
4899
|
+
gap: "12px"
|
4711
4900
|
}, React__default.createElement(Stack, {
|
4712
4901
|
className: styles["image-academy"] + " " + styles["image-academy--item"],
|
4713
4902
|
minWidth: "40px"
|
@@ -4715,7 +4904,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4715
4904
|
component: "img",
|
4716
4905
|
alt: option.name,
|
4717
4906
|
src: option.image
|
4718
|
-
}) : React__default.createElement("span", null
|
4907
|
+
}) : React__default.createElement("span", null)), React__default.createElement(Box$1, {
|
4719
4908
|
sx: {
|
4720
4909
|
position: "relative",
|
4721
4910
|
display: "flex",
|
@@ -4729,8 +4918,20 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4729
4918
|
lineHeight: '1.5em',
|
4730
4919
|
fontWeight: 600
|
4731
4920
|
}
|
4732
|
-
}, option.name))))
|
4733
|
-
|
4921
|
+
}, option.name))), option.id === (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id) && React__default.createElement("div", {
|
4922
|
+
onClick: function onClick() {
|
4923
|
+
return handleLogOutAcademy(selectedAcademy, handleClose);
|
4924
|
+
}
|
4925
|
+
}, React__default.createElement(IoCloseCircle, {
|
4926
|
+
size: 18,
|
4927
|
+
color: styles.dark
|
4928
|
+
}))));
|
4929
|
+
})), React__default.createElement(Stack, {
|
4930
|
+
sx: {
|
4931
|
+
borderTop: "1px solid " + styles.gray_100,
|
4932
|
+
my: "8px"
|
4933
|
+
}
|
4934
|
+
}), React__default.createElement(MenuItemCustom, {
|
4734
4935
|
sx: {
|
4735
4936
|
whiteSpace: "wrap",
|
4736
4937
|
borderRadius: "6px"
|
@@ -4744,16 +4945,16 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4744
4945
|
alignItems: "center",
|
4745
4946
|
className: "" + styles["userImg"],
|
4746
4947
|
onClick: onSignOut
|
4747
|
-
}, React__default.createElement(
|
4748
|
-
size:
|
4749
|
-
color:
|
4948
|
+
}, React__default.createElement(IoLogOut, {
|
4949
|
+
size: 18,
|
4950
|
+
color: styles.less_dark
|
4750
4951
|
}), React__default.createElement(Typography, {
|
4751
4952
|
sx: {
|
4752
4953
|
typography: "body2",
|
4753
|
-
p: "8px",
|
4754
4954
|
borderRadius: "4px",
|
4755
4955
|
fontSize: 14,
|
4756
|
-
fontWeight: 700
|
4956
|
+
fontWeight: 700,
|
4957
|
+
color: styles.less_dark
|
4757
4958
|
}
|
4758
4959
|
}, t("logout"))))));
|
4759
4960
|
};
|
@@ -4827,6 +5028,7 @@ var customStyles = {
|
|
4827
5028
|
|
4828
5029
|
var DropdownIndicator = function DropdownIndicator(props) {
|
4829
5030
|
return React__default.createElement(components.DropdownIndicator, Object.assign({}, props), React__default.createElement(FaCaretDown, {
|
5031
|
+
size: 20,
|
4830
5032
|
color: styles.darker
|
4831
5033
|
}));
|
4832
5034
|
};
|
@@ -4965,6 +5167,7 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4965
5167
|
return React__default.createElement(Stack, null, React__default.createElement(Stack, {
|
4966
5168
|
display: "flex",
|
4967
5169
|
gap: "4px",
|
5170
|
+
justifyItems: "center",
|
4968
5171
|
flexDirection: "column"
|
4969
5172
|
}, React__default.createElement("div", {
|
4970
5173
|
style: {
|
@@ -4975,7 +5178,9 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4975
5178
|
sx: {
|
4976
5179
|
fontWeight: 700,
|
4977
5180
|
fontSize: "14px",
|
4978
|
-
color: styles.
|
5181
|
+
color: styles.less_dark,
|
5182
|
+
display: 'flex',
|
5183
|
+
justifyContent: "center"
|
4979
5184
|
}
|
4980
5185
|
}, t("edit"))), React__default.createElement(Stack, {
|
4981
5186
|
border: "1px solid #E4E7EC"
|
@@ -4988,7 +5193,9 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4988
5193
|
sx: {
|
4989
5194
|
fontWeight: 700,
|
4990
5195
|
fontSize: "14px",
|
4991
|
-
color: styles.
|
5196
|
+
color: styles.less_dark,
|
5197
|
+
display: 'flex',
|
5198
|
+
justifyContent: "center"
|
4992
5199
|
}
|
4993
5200
|
}, t("delete")))));
|
4994
5201
|
};
|
@@ -5027,13 +5234,14 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5027
5234
|
className: " " + styles$1["name-sender"],
|
5028
5235
|
display: "flex",
|
5029
5236
|
alignItems: "center",
|
5237
|
+
justifyContent: "end",
|
5030
5238
|
flexDirection: "row"
|
5031
5239
|
}, React__default.createElement(iconPersonNoActive, null), React__default.createElement(Typography, {
|
5032
5240
|
fontWeight: 700,
|
5033
5241
|
fontSize: 14,
|
5034
5242
|
padding: "4px",
|
5035
5243
|
lineHeight: "16.71px",
|
5036
|
-
color: styles.
|
5244
|
+
color: styles.gray_700
|
5037
5245
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName)), React__default.createElement(Stack, {
|
5038
5246
|
display: "flex",
|
5039
5247
|
flexDirection: "row",
|
@@ -5066,11 +5274,7 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5066
5274
|
placement: "top"
|
5067
5275
|
}, React__default.createElement("div", {
|
5068
5276
|
onClick: handleOpenTooltip
|
5069
|
-
}, React__default.createElement(iconMore, null))))), contentType ? React__default.createElement(
|
5070
|
-
borderRadius: "6px",
|
5071
|
-
padding: "12px",
|
5072
|
-
bgcolor: styles.darker
|
5073
|
-
}, React__default.createElement("img", {
|
5277
|
+
}, React__default.createElement(iconMore, null))))), contentType ? React__default.createElement("img", {
|
5074
5278
|
onClick: toggleImageDialog,
|
5075
5279
|
src: content,
|
5076
5280
|
style: {
|
@@ -5078,17 +5282,21 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5078
5282
|
position: "relative",
|
5079
5283
|
objectFit: "contain"
|
5080
5284
|
}
|
5081
|
-
})
|
5285
|
+
}) : React__default.createElement("div", {
|
5082
5286
|
className: styles$1["wrap-content"] + " " + styles$1["content-chat-receiver"],
|
5083
|
-
|
5084
|
-
"float": "inline-end"
|
5085
|
-
|
5086
|
-
|
5287
|
+
style: {
|
5288
|
+
"float": "inline-end",
|
5289
|
+
maxWidth: 400,
|
5290
|
+
background: styles.less_dark
|
5291
|
+
}
|
5087
5292
|
}, React__default.createElement(Typography, {
|
5088
5293
|
fontWeight: 500,
|
5089
5294
|
fontSize: "14px",
|
5090
5295
|
lineHeight: "16.71px",
|
5091
|
-
color: "#
|
5296
|
+
color: "#fff",
|
5297
|
+
sx: {
|
5298
|
+
wordBreak: "break-word"
|
5299
|
+
}
|
5092
5300
|
}, content))))));
|
5093
5301
|
};
|
5094
5302
|
|
@@ -5123,33 +5331,29 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
5123
5331
|
fontWeight: 500,
|
5124
5332
|
fontSize: 14,
|
5125
5333
|
lineHeight: "16.71px",
|
5126
|
-
color: styles.
|
5127
|
-
}, t("
|
5334
|
+
color: styles.gray_700
|
5335
|
+
}, t("teacher")), React__default.createElement(Typography, {
|
5128
5336
|
fontWeight: 700,
|
5129
5337
|
fontSize: 14,
|
5130
5338
|
lineHeight: "16.71px",
|
5131
|
-
color: styles.
|
5339
|
+
color: styles.gray_700
|
5132
5340
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName)) : React__default.createElement(Fragment$1, null, React__default.createElement(Typography, {
|
5133
5341
|
fontWeight: 700,
|
5134
5342
|
fontSize: 14,
|
5135
5343
|
lineHeight: "16.71px",
|
5136
|
-
color: styles.
|
5344
|
+
color: styles.gray_700
|
5137
5345
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName), React__default.createElement(Typography, {
|
5138
5346
|
fontWeight: 500,
|
5139
5347
|
fontSize: 14,
|
5140
5348
|
lineHeight: "16.71px",
|
5141
|
-
color: styles.
|
5349
|
+
color: styles.gray_700
|
5142
5350
|
}, t("student")))), React__default.createElement(Box, {
|
5143
5351
|
padding: "4px 0px"
|
5144
5352
|
}), React__default.createElement(Stack, {
|
5145
5353
|
display: "flex",
|
5146
5354
|
flexDirection: "row",
|
5147
5355
|
gap: "8px"
|
5148
|
-
}, contentType ? React__default.createElement(
|
5149
|
-
borderRadius: "6px",
|
5150
|
-
padding: "12px",
|
5151
|
-
bgcolor: styles.darker
|
5152
|
-
}, React__default.createElement("img", {
|
5356
|
+
}, contentType ? React__default.createElement("img", {
|
5153
5357
|
onClick: toggleImageDialog,
|
5154
5358
|
src: content,
|
5155
5359
|
style: {
|
@@ -5157,13 +5361,19 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
5157
5361
|
position: "relative",
|
5158
5362
|
objectFit: "contain"
|
5159
5363
|
}
|
5160
|
-
})
|
5161
|
-
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"]
|
5364
|
+
}) : React__default.createElement("div", {
|
5365
|
+
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"],
|
5366
|
+
style: {
|
5367
|
+
maxWidth: 400
|
5368
|
+
}
|
5162
5369
|
}, React__default.createElement(Typography, {
|
5163
|
-
fontWeight:
|
5370
|
+
fontWeight: 500,
|
5164
5371
|
fontSize: "14px",
|
5165
5372
|
lineHeight: "16.71px",
|
5166
|
-
color:
|
5373
|
+
color: styles.gray_700,
|
5374
|
+
sx: {
|
5375
|
+
wordBreak: "break-word"
|
5376
|
+
}
|
5167
5377
|
}, content)))));
|
5168
5378
|
};
|
5169
5379
|
|
@@ -5701,7 +5911,7 @@ var InputChat = function InputChat(_ref) {
|
|
5701
5911
|
fullWidth: true,
|
5702
5912
|
className: styles$1["btn-send"],
|
5703
5913
|
sx: {
|
5704
|
-
bgcolor: isCompleted ? styles.light + " !important" : styles.
|
5914
|
+
bgcolor: isCompleted ? styles.light + " !important" : styles.less_dark
|
5705
5915
|
},
|
5706
5916
|
disabled: isCompleted,
|
5707
5917
|
onClick: handleSubmit
|
@@ -5722,13 +5932,13 @@ var InputChat = function InputChat(_ref) {
|
|
5722
5932
|
borderWidth: "1px"
|
5723
5933
|
}
|
5724
5934
|
}, React__default.createElement(iconPlusCircle, {
|
5725
|
-
color: styles.
|
5935
|
+
color: styles.less_dark
|
5726
5936
|
}), React__default.createElement(Typography, {
|
5727
5937
|
fontWeight: 700,
|
5728
5938
|
fontSize: "13px",
|
5729
5939
|
lineHeight: "15.51px",
|
5730
5940
|
sx: {
|
5731
|
-
color: styles.
|
5941
|
+
color: styles.less_dark
|
5732
5942
|
}
|
5733
5943
|
}, t("attachment")), React__default.createElement("input", {
|
5734
5944
|
type: "file",
|
@@ -5762,6 +5972,31 @@ var ellipsisText = function ellipsisText(text, maxLength) {
|
|
5762
5972
|
if (!text) return text;
|
5763
5973
|
return (text === null || text === void 0 ? void 0 : text.length) > maxLength ? text.slice(0, maxLength) + " ..." : text;
|
5764
5974
|
};
|
5975
|
+
var getOrdinalSuffix = function getOrdinalSuffix(number, lang) {
|
5976
|
+
var suffixes = {
|
5977
|
+
en: ['th', 'st', 'nd', 'rd'],
|
5978
|
+
ko: ['']
|
5979
|
+
};
|
5980
|
+
switch (lang) {
|
5981
|
+
case 'en':
|
5982
|
+
var j = number % 10;
|
5983
|
+
var k = number % 100;
|
5984
|
+
if (j === 1 && k !== 11) {
|
5985
|
+
return suffixes.en[1];
|
5986
|
+
}
|
5987
|
+
if (j === 2 && k !== 12) {
|
5988
|
+
return suffixes.en[2];
|
5989
|
+
}
|
5990
|
+
if (j === 3 && k !== 13) {
|
5991
|
+
return suffixes.en[3];
|
5992
|
+
}
|
5993
|
+
return suffixes.en[0];
|
5994
|
+
case 'ko':
|
5995
|
+
return suffixes.ko[0];
|
5996
|
+
default:
|
5997
|
+
return '';
|
5998
|
+
}
|
5999
|
+
};
|
5765
6000
|
var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
5766
6001
|
var uniqueCategories = new Set();
|
5767
6002
|
var filterCategories = categories.filter(function (category) {
|
@@ -5781,6 +6016,24 @@ var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
|
5781
6016
|
});
|
5782
6017
|
return questionsByCategory;
|
5783
6018
|
};
|
6019
|
+
var totalSolveTimeCategories = function totalSolveTimeCategories(inputData, categories) {
|
6020
|
+
var uniqueCategories = new Set();
|
6021
|
+
var filterCategories = categories.filter(function (category) {
|
6022
|
+
if (!uniqueCategories.has(category.name)) {
|
6023
|
+
uniqueCategories.add(category.name);
|
6024
|
+
return true;
|
6025
|
+
}
|
6026
|
+
return false;
|
6027
|
+
});
|
6028
|
+
var questionsByCategory = filterCategories.map(function (category) {
|
6029
|
+
return _extends({}, category, {
|
6030
|
+
totalSolveTime: inputData.questions.reduce(function (init, question) {
|
6031
|
+
return question.category.name === category.name ? init += question.duration : init;
|
6032
|
+
}, 0)
|
6033
|
+
});
|
6034
|
+
});
|
6035
|
+
return questionsByCategory;
|
6036
|
+
};
|
5784
6037
|
var formatTimeSecond = function formatTimeSecond(duration, t) {
|
5785
6038
|
duration = Math.round(duration);
|
5786
6039
|
return "" + (duration < 60 ? "" + duration + t("seconds") : t("mins_mins_seconds_seconds", {
|
@@ -5832,7 +6085,6 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5832
6085
|
display: "flex",
|
5833
6086
|
alignItems: "center",
|
5834
6087
|
gap: "24px",
|
5835
|
-
border: "1px solid #EBEBFF",
|
5836
6088
|
borderRadius: "6px"
|
5837
6089
|
}, React__default.createElement(Box, {
|
5838
6090
|
display: "flex",
|
@@ -5840,21 +6092,21 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5840
6092
|
flexDirection: "row",
|
5841
6093
|
gap: "8px"
|
5842
6094
|
}, React__default.createElement(iconPersonNoActive, {
|
5843
|
-
color: styles.
|
6095
|
+
color: styles.gray_700
|
5844
6096
|
}), isTabletUp && React__default.createElement(Typography, {
|
5845
6097
|
fontWeight: 500,
|
5846
6098
|
fontSize: "14px",
|
5847
6099
|
lineHeight: "16.71px",
|
5848
|
-
color: styles.
|
5849
|
-
}, t("
|
5850
|
-
fontWeight:
|
6100
|
+
color: styles.gray_700
|
6101
|
+
}, t("teacher"))), React__default.createElement(Typography, {
|
6102
|
+
fontWeight: 500,
|
5851
6103
|
fontSize: "14px",
|
5852
6104
|
lineHeight: "16.71px",
|
5853
|
-
color: styles.
|
6105
|
+
color: styles.gray_700
|
5854
6106
|
}, ellipsisText(teacherName || "", 15))), !!examTitle && React__default.createElement(Box, {
|
5855
6107
|
display: "flex",
|
5856
6108
|
alignItems: "start",
|
5857
|
-
color: styles.
|
6109
|
+
color: styles.gray_700,
|
5858
6110
|
gap: "6px",
|
5859
6111
|
flexDirection: "column"
|
5860
6112
|
}, React__default.createElement(Typography, {
|
@@ -5868,13 +6120,16 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5868
6120
|
}, React__default.createElement(Typography, {
|
5869
6121
|
fontWeight: 600,
|
5870
6122
|
fontSize: "12px",
|
5871
|
-
lineHeight: "14.2px"
|
5872
|
-
|
6123
|
+
lineHeight: "14.2px",
|
6124
|
+
sx: {
|
6125
|
+
color: styles.gray_700
|
6126
|
+
}
|
6127
|
+
}, "LIVE " + t('exam')), filterDurationExam && React__default.createElement(Typography, {
|
5873
6128
|
fontWeight: 500,
|
5874
6129
|
fontSize: "12px",
|
5875
6130
|
lineHeight: "14.32px",
|
5876
6131
|
sx: {
|
5877
|
-
color:
|
6132
|
+
color: styles.gray_500
|
5878
6133
|
}
|
5879
6134
|
}, (!!filterDurationExam.hours() ? filterDurationExam.hours() + " " + t("hour") : "") + " " + (!!filterDurationExam.minutes() ? filterDurationExam.minutes() + " " + t("minute") : "") + " " + (!!filterDurationExam.seconds() ? filterDurationExam.seconds() + " " + t("second") : "")))), React__default.createElement(Box, {
|
5880
6135
|
display: "flex",
|
@@ -5896,16 +6151,16 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5896
6151
|
fontWeight: 700,
|
5897
6152
|
fontSize: "12px",
|
5898
6153
|
lineHeight: "14.32px",
|
5899
|
-
color: styles.
|
6154
|
+
color: styles.less_dark
|
5900
6155
|
}, t("points", {
|
5901
|
-
number: score
|
6156
|
+
number: score || 0
|
5902
6157
|
})), React__default.createElement(Typography, {
|
5903
6158
|
fontWeight: 700,
|
5904
6159
|
fontSize: "12px",
|
5905
6160
|
lineHeight: "14.32px",
|
5906
|
-
color:
|
6161
|
+
color: styles.gray_300
|
5907
6162
|
}, "/", t("points", {
|
5908
|
-
number: totalScore
|
6163
|
+
number: totalScore || 0
|
5909
6164
|
}))), React__default.createElement(Typography, {
|
5910
6165
|
fontWeight: 500,
|
5911
6166
|
fontSize: "12px",
|
@@ -5964,7 +6219,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5964
6219
|
color: styles.darker
|
5965
6220
|
}, examTitle ? React__default.createElement(Typography, {
|
5966
6221
|
fontWeight: 600,
|
5967
|
-
fontSize: "
|
6222
|
+
fontSize: "11px",
|
5968
6223
|
lineHeight: "14.32px"
|
5969
6224
|
}, ellipsisText(examTitle || "", 10)) : React__default.createElement(Box, {
|
5970
6225
|
display: "flex",
|
@@ -5998,12 +6253,12 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5998
6253
|
borderColor: styles.less_dark,
|
5999
6254
|
borderRadius: "6px"
|
6000
6255
|
}, React__default.createElement(iconChecked, {
|
6001
|
-
color: styles.
|
6256
|
+
color: styles.less_dark
|
6002
6257
|
}), React__default.createElement(Typography, {
|
6003
6258
|
fontWeight: 700,
|
6004
6259
|
fontSize: "13px",
|
6005
6260
|
lineHeight: "15.51px",
|
6006
|
-
color: styles.
|
6261
|
+
color: styles.less_dark
|
6007
6262
|
}, t('complete_processing')))) : React__default.createElement("div", null));
|
6008
6263
|
};
|
6009
6264
|
return React__default.createElement(Grid, {
|
@@ -6018,9 +6273,9 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
6018
6273
|
}, React__default.createElement(Typography, {
|
6019
6274
|
fontWeight: 800,
|
6020
6275
|
fontSize: "20px",
|
6021
|
-
color: styles.
|
6276
|
+
color: styles.less_dark,
|
6022
6277
|
lineHeight: "23.87px"
|
6023
|
-
}, t("question_and_answer"))), renderHeader(), React__default.createElement(ConfirmDialog, {
|
6278
|
+
}, isStudent ? t("question_and_answer") : t("q&a"))), renderHeader(), React__default.createElement(ConfirmDialog, {
|
6024
6279
|
open: openDialog,
|
6025
6280
|
toggle: toggleDialog,
|
6026
6281
|
text: t("are_you_sure_you_want_to_complete_this_conversation"),
|
@@ -6755,17 +7010,14 @@ var BpIcon = styled('span')(function (_ref) {
|
|
6755
7010
|
};
|
6756
7011
|
});
|
6757
7012
|
var BpCheckedIcon = styled(BpIcon)({
|
6758
|
-
backgroundColor:
|
7013
|
+
backgroundColor: "#fff",
|
6759
7014
|
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
|
6760
7015
|
'&::before': {
|
6761
7016
|
display: 'block',
|
6762
7017
|
width: 16,
|
6763
7018
|
height: 16,
|
6764
|
-
backgroundImage:
|
7019
|
+
backgroundImage: "radial-gradient(" + styles.less_dark + " 36%,transparent 40%)",
|
6765
7020
|
content: '""'
|
6766
|
-
},
|
6767
|
-
'input:hover ~ &': {
|
6768
|
-
backgroundColor: styles.dark
|
6769
7021
|
}
|
6770
7022
|
});
|
6771
7023
|
var QuestionView = function QuestionView(_ref2) {
|
@@ -6825,7 +7077,7 @@ var QuestionView = function QuestionView(_ref2) {
|
|
6825
7077
|
mb: "16px"
|
6826
7078
|
}, React__default.createElement(FormControl, {
|
6827
7079
|
style: {
|
6828
|
-
width: "
|
7080
|
+
width: "168px"
|
6829
7081
|
}
|
6830
7082
|
}, React__default.createElement(ScoreSelector, {
|
6831
7083
|
value: question.score,
|
@@ -7080,7 +7332,7 @@ var ArticleGroupView = function ArticleGroupView(_ref) {
|
|
7080
7332
|
}, React__default.createElement(FormGroup, null, React__default.createElement(FormLabel, {
|
7081
7333
|
htmlFor: "question_count",
|
7082
7334
|
className: styles$2["question-label"] + " form-label"
|
7083
|
-
}, t("
|
7335
|
+
}, t("questions")), React__default.createElement(QuestionCountSelector, {
|
7084
7336
|
id: "question_count",
|
7085
7337
|
value: questionCount,
|
7086
7338
|
onChange: handleChangeQuestionCount,
|
@@ -7379,9 +7631,11 @@ var ChapterBox = function ChapterBox(_ref) {
|
|
7379
7631
|
onUpdateArticleQuestion: onUpdateArticleQuestion,
|
7380
7632
|
onRemoveChapter: onRemoveChapter
|
7381
7633
|
});
|
7382
|
-
}), data.subChapters.length === 0 && data.articles.map(function (article) {
|
7634
|
+
}), data.subChapters.length === 0 && data.articles.map(function (article, index) {
|
7383
7635
|
var _article$category;
|
7384
|
-
return React__default.createElement(Stack,
|
7636
|
+
return React__default.createElement(Stack, {
|
7637
|
+
key: index
|
7638
|
+
}, React__default.createElement(Stack, {
|
7385
7639
|
display: "flex",
|
7386
7640
|
flexDirection: "row",
|
7387
7641
|
gap: "8px",
|
@@ -7456,6 +7710,14 @@ var deleteTextbookApi = function deleteTextbookApi(textbookId, role) {
|
|
7456
7710
|
});
|
7457
7711
|
};
|
7458
7712
|
|
7713
|
+
var ExamStatus$1;
|
7714
|
+
(function (ExamStatus) {
|
7715
|
+
ExamStatus[ExamStatus["Default"] = 0] = "Default";
|
7716
|
+
ExamStatus[ExamStatus["Pending"] = 1] = "Pending";
|
7717
|
+
ExamStatus[ExamStatus["InProgress"] = 2] = "InProgress";
|
7718
|
+
ExamStatus[ExamStatus["Completed"] = 3] = "Completed";
|
7719
|
+
})(ExamStatus$1 || (ExamStatus$1 = {}));
|
7720
|
+
|
7459
7721
|
var OrderType;
|
7460
7722
|
(function (OrderType) {
|
7461
7723
|
OrderType["ASC"] = "ASC";
|
@@ -7466,7 +7728,8 @@ var OrderType;
|
|
7466
7728
|
|
7467
7729
|
var index = {
|
7468
7730
|
__proto__: null,
|
7469
|
-
get OrderType () { return OrderType; }
|
7731
|
+
get OrderType () { return OrderType; },
|
7732
|
+
get ExamStatus () { return ExamStatus$1; }
|
7470
7733
|
};
|
7471
7734
|
|
7472
7735
|
var TextbookSortBy;
|
@@ -7480,20 +7743,13 @@ var ExamType;
|
|
7480
7743
|
ExamType["Normal"] = "Normal";
|
7481
7744
|
ExamType["Standard"] = "Standard";
|
7482
7745
|
})(ExamType || (ExamType = {}));
|
7483
|
-
var ExamStatus$
|
7746
|
+
var ExamStatus$2;
|
7484
7747
|
(function (ExamStatus) {
|
7485
7748
|
ExamStatus["Default"] = "Default";
|
7486
7749
|
ExamStatus["Pending"] = "Pending";
|
7487
7750
|
ExamStatus["InProgress"] = "InProgress";
|
7488
7751
|
ExamStatus["Completed"] = "Completed";
|
7489
|
-
})(ExamStatus$
|
7490
|
-
var ExamStatusNumber;
|
7491
|
-
(function (ExamStatusNumber) {
|
7492
|
-
ExamStatusNumber[ExamStatusNumber["Default"] = 0] = "Default";
|
7493
|
-
ExamStatusNumber[ExamStatusNumber["Pending"] = 1] = "Pending";
|
7494
|
-
ExamStatusNumber[ExamStatusNumber["InProgress"] = 2] = "InProgress";
|
7495
|
-
ExamStatusNumber[ExamStatusNumber["Completed"] = 3] = "Completed";
|
7496
|
-
})(ExamStatusNumber || (ExamStatusNumber = {}));
|
7752
|
+
})(ExamStatus$2 || (ExamStatus$2 = {}));
|
7497
7753
|
|
7498
7754
|
var TEXTBOOK_HEADERS = [{
|
7499
7755
|
title: "#"
|
@@ -7525,7 +7781,7 @@ var DEFAULT_EXAM_REQUEST = {
|
|
7525
7781
|
subjectId: 0
|
7526
7782
|
};
|
7527
7783
|
var TEXTBOOK_PAGE_TITLE = "textbooks";
|
7528
|
-
var TEXT_BOOK_SEARCH_PLACEHOLDER = "
|
7784
|
+
var TEXT_BOOK_SEARCH_PLACEHOLDER = "enter_textbook_name_to_search";
|
7529
7785
|
var TextbookDefaultQuery = {
|
7530
7786
|
pageSize: 12,
|
7531
7787
|
currentPage: 1,
|
@@ -8877,6 +9133,9 @@ var useExamDetailView = function useExamDetailView(props) {
|
|
8877
9133
|
var exam = props.exam,
|
8878
9134
|
selectedSubject = props.selectedSubject,
|
8879
9135
|
onChangeExam = props.onChangeExam;
|
9136
|
+
console.log({
|
9137
|
+
exam: exam
|
9138
|
+
});
|
8880
9139
|
var _useTranslation = useTranslation(),
|
8881
9140
|
t = _useTranslation.t;
|
8882
9141
|
var handleChangeQuestionCount = function handleChangeQuestionCount(article, questionCount, answerCount) {
|
@@ -9154,7 +9413,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9154
9413
|
}, React__default.createElement("label", {
|
9155
9414
|
className: styles["form-label"] + " " + styles$2["question-label"],
|
9156
9415
|
htmlFor: "title"
|
9157
|
-
}, t("
|
9416
|
+
}, t("exam_name")), React__default.createElement("input", {
|
9158
9417
|
disabled: isDisabled,
|
9159
9418
|
className: "" + styles["form-control"],
|
9160
9419
|
value: exam.title,
|
@@ -9168,7 +9427,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9168
9427
|
}, React__default.createElement("label", {
|
9169
9428
|
className: styles["form-label"] + " " + styles$2["question-label"],
|
9170
9429
|
htmlFor: "duration"
|
9171
|
-
}, t("
|
9430
|
+
}, t("exam_duration")), React__default.createElement(CustomSelect, {
|
9172
9431
|
inputId: "duration",
|
9173
9432
|
value: exam.duration,
|
9174
9433
|
options: durationOptions,
|
@@ -9211,8 +9470,12 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9211
9470
|
}, React__default.createElement(Button, {
|
9212
9471
|
variant: 'outlined',
|
9213
9472
|
sx: {
|
9214
|
-
color: styles.
|
9215
|
-
|
9473
|
+
color: styles.less_dark,
|
9474
|
+
border: 'none',
|
9475
|
+
'&:hover': {
|
9476
|
+
border: "none",
|
9477
|
+
bgcolor: "#FFF"
|
9478
|
+
}
|
9216
9479
|
},
|
9217
9480
|
disabled: isDisabled,
|
9218
9481
|
className: "w-100 d-flex justify-content-center align-items-center " + styles$2["question-btn"] + " mt-3",
|
@@ -10062,6 +10325,14 @@ var getCheckStatusExam = function getCheckStatusExam(examCode) {
|
|
10062
10325
|
var toNumberOrder = function toNumberOrder(value) {
|
10063
10326
|
return "The " + value + (value % 10 === 1 ? 'st' : value % 10 === 2 ? 'nd' : value % 10 === 3 ? 'rd' : 'th');
|
10064
10327
|
};
|
10328
|
+
var formatDuration = function formatDuration(t, duration) {
|
10329
|
+
if (!duration) return "0" + t("seconds");
|
10330
|
+
var totalTime = Math.round(duration);
|
10331
|
+
return totalTime > 60 ? t("mins_mins_seconds_seconds", {
|
10332
|
+
mins: Math.floor(totalTime / 60),
|
10333
|
+
seconds: totalTime % 60
|
10334
|
+
}) : "" + Math.round(duration) + t("seconds");
|
10335
|
+
};
|
10065
10336
|
|
10066
10337
|
var ORDER_NUMBERS = {
|
10067
10338
|
1: "the_first",
|
@@ -10769,6 +11040,7 @@ var CATEGORY_RESPONSES = [{
|
|
10769
11040
|
percentageAmongStudents: 40
|
10770
11041
|
}];
|
10771
11042
|
var DEFAULT_LINE_CHART_OPTIONS = {
|
11043
|
+
colors: ["#3DC674", "#C3099A"],
|
10772
11044
|
chart: {
|
10773
11045
|
type: "line",
|
10774
11046
|
toolbar: {
|
@@ -11112,6 +11384,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11112
11384
|
}
|
11113
11385
|
}
|
11114
11386
|
}),
|
11387
|
+
colors: ['#3DC674', '#C3099A'],
|
11115
11388
|
xaxis: _extends({}, DEFAULT_LINE_CHART_OPTIONS.xaxis, {
|
11116
11389
|
categories: ["."].concat(Array.from({
|
11117
11390
|
length: questionLength
|
@@ -11136,13 +11409,13 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11136
11409
|
var series = (_allSeries$dataChartI = allSeries[dataChartIndex]) != null ? _allSeries$dataChartI : defaultSeries(t);
|
11137
11410
|
var handleExportPdf = function handleExportPdf() {
|
11138
11411
|
try {
|
11139
|
-
var
|
11412
|
+
var _temp26 = function _temp26(_result) {
|
11140
11413
|
if (_exit) return _result;
|
11141
11414
|
dispatch(setLoading(false));
|
11142
11415
|
};
|
11143
11416
|
var _exit = false;
|
11144
11417
|
dispatch(setLoading(true));
|
11145
|
-
var
|
11418
|
+
var _temp25 = _catch(function () {
|
11146
11419
|
var canvas = document.querySelector("#canvas");
|
11147
11420
|
var headerCanvas = document.querySelector("#header-canvas");
|
11148
11421
|
if (!canvas || !headerCanvas) {
|
@@ -11164,7 +11437,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11164
11437
|
var imgWidth = WIDTH_PAPER;
|
11165
11438
|
var chartWidth = WIDTH_PAPER - 20;
|
11166
11439
|
return Promise.resolve(html2canvas(headerCanvas)).then(function (header) {
|
11167
|
-
function
|
11440
|
+
function _temp24() {
|
11168
11441
|
doc.save("download.pdf");
|
11169
11442
|
}
|
11170
11443
|
var imgHeaderHeight = header.height * imgWidth / header.width;
|
@@ -11172,16 +11445,16 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11172
11445
|
doc.addImage(imgHeaderData, 'PNG', 0, 0, imgWidth, imgHeaderHeight);
|
11173
11446
|
line += imgHeaderHeight;
|
11174
11447
|
if (line > HEIGHT_PAPER) breakPage();
|
11175
|
-
var
|
11448
|
+
var _temp23 = function () {
|
11176
11449
|
if (canvas && canvas.childElementCount > 0) {
|
11177
11450
|
var _index = 0;
|
11178
|
-
var
|
11451
|
+
var _temp22 = _for(function () {
|
11179
11452
|
return _index < canvas.childElementCount;
|
11180
11453
|
}, function () {
|
11181
11454
|
return _index++;
|
11182
11455
|
}, function () {
|
11183
|
-
function
|
11184
|
-
function
|
11456
|
+
function _temp21() {
|
11457
|
+
function _temp19() {
|
11185
11458
|
line += 20;
|
11186
11459
|
}
|
11187
11460
|
var printChartTitle = function printChartTitle() {
|
@@ -11196,73 +11469,100 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11196
11469
|
return Promise.reject(e);
|
11197
11470
|
}
|
11198
11471
|
};
|
11199
|
-
var
|
11472
|
+
var _temp18 = function () {
|
11200
11473
|
if (printContainerEls.length) {
|
11201
|
-
var
|
11202
|
-
function
|
11203
|
-
|
11204
|
-
|
11205
|
-
|
11206
|
-
|
11207
|
-
|
11208
|
-
|
11209
|
-
|
11210
|
-
|
11211
|
-
|
11212
|
-
line += printHeaderHeight;
|
11213
|
-
return Promise.resolve();
|
11214
|
-
} catch (e) {
|
11215
|
-
return Promise.reject(e);
|
11216
|
-
}
|
11217
|
-
};
|
11218
|
-
var printContents = printContainerEl.querySelectorAll("." + PrintContentClassName);
|
11219
|
-
if (!printContents.length) return;
|
11220
|
-
var _temp12 = _forTo(printContents, function (j) {
|
11221
|
-
var rowItem = printContents[j];
|
11222
|
-
return Promise.resolve(html2canvas(rowItem)).then(function (rowItemCanvas) {
|
11223
|
-
function _temp11() {
|
11224
|
-
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
11225
|
-
line += height;
|
11474
|
+
var _temp17 = _forTo(printContainerEls, function (i) {
|
11475
|
+
function _temp16() {
|
11476
|
+
function _temp14() {
|
11477
|
+
var printTitle = function printTitle() {
|
11478
|
+
try {
|
11479
|
+
if (!printTitleHeight || !printTitleData) return Promise.resolve();
|
11480
|
+
doc.addImage(printTitleData, 'PNG', 0, line, chartWidth, printTitleHeight);
|
11481
|
+
line += printTitleHeight;
|
11482
|
+
return Promise.resolve();
|
11483
|
+
} catch (e) {
|
11484
|
+
return Promise.reject(e);
|
11226
11485
|
}
|
11227
|
-
|
11228
|
-
|
11229
|
-
if (
|
11230
|
-
|
11231
|
-
|
11232
|
-
|
11233
|
-
|
11234
|
-
|
11235
|
-
|
11236
|
-
|
11237
|
-
|
11238
|
-
|
11239
|
-
|
11240
|
-
|
11241
|
-
|
11486
|
+
};
|
11487
|
+
var printHeader = function printHeader(top) {
|
11488
|
+
if (top === void 0) {
|
11489
|
+
top = 0;
|
11490
|
+
}
|
11491
|
+
try {
|
11492
|
+
if (!printHeaderData || !printHeaderHeight) return Promise.resolve();
|
11493
|
+
line += top;
|
11494
|
+
if (line + printHeaderHeight > HEIGHT_PAPER) breakPage();
|
11495
|
+
doc.addImage(printHeaderData, 'PNG', 10, line, chartWidth, printHeaderHeight);
|
11496
|
+
line += printHeaderHeight;
|
11497
|
+
return Promise.resolve();
|
11498
|
+
} catch (e) {
|
11499
|
+
return Promise.reject(e);
|
11500
|
+
}
|
11501
|
+
};
|
11502
|
+
var printContents = printContainerEl.querySelectorAll("." + PrintContentClassName);
|
11503
|
+
if (!printContents.length) return;
|
11504
|
+
printTitle();
|
11505
|
+
var _temp12 = _forTo(printContents, function (j) {
|
11506
|
+
var rowItem = printContents[j];
|
11507
|
+
return Promise.resolve(html2canvas(rowItem)).then(function (rowItemCanvas) {
|
11508
|
+
function _temp11() {
|
11509
|
+
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
11510
|
+
line += height;
|
11242
11511
|
}
|
11243
|
-
|
11244
|
-
|
11512
|
+
var height = rowItemCanvas.height * chartWidth / rowItemCanvas.width;
|
11513
|
+
var data = rowItemCanvas.toDataURL('image/png');
|
11514
|
+
if (i === 0 && j === 0 && line + height + (printHeaderHeight || 0) + ((chartTitleHeight || 0) + 10) + 20 > HEIGHT_PAPER) breakPage();
|
11515
|
+
i === 0 && j === 0 && printChartTitle();
|
11516
|
+
var _temp10 = function () {
|
11517
|
+
if (line + height + 20 > HEIGHT_PAPER) {
|
11518
|
+
breakPage();
|
11519
|
+
return Promise.resolve(printHeader()).then(function () {});
|
11520
|
+
} else {
|
11521
|
+
var _temp27 = function () {
|
11522
|
+
if (j === 0) {
|
11523
|
+
return Promise.resolve(printHeader(10)).then(function () {});
|
11524
|
+
}
|
11525
|
+
}();
|
11526
|
+
if (_temp27 && _temp27.then) return _temp27.then(function () {});
|
11527
|
+
}
|
11528
|
+
}();
|
11529
|
+
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
|
11530
|
+
});
|
11245
11531
|
});
|
11246
|
-
|
11247
|
-
|
11532
|
+
if (_temp12 && _temp12.then) return _temp12.then(function () {});
|
11533
|
+
}
|
11534
|
+
var _temp13 = function () {
|
11535
|
+
if (printHeaderEl) {
|
11536
|
+
return Promise.resolve(html2canvas(printHeaderEl)).then(function (_html2canvas3) {
|
11537
|
+
printHeaderCanvas = _html2canvas3;
|
11538
|
+
printHeaderHeight = printHeaderCanvas.height * chartWidth / printHeaderCanvas.width;
|
11539
|
+
printHeaderData = printHeaderCanvas.toDataURL('image/png');
|
11540
|
+
});
|
11541
|
+
}
|
11542
|
+
}();
|
11543
|
+
return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
|
11248
11544
|
}
|
11249
11545
|
var printContainerEl = printContainerEls[i];
|
11546
|
+
var printTitleEl = printContainerEl.querySelector("." + PrintTitleClassName);
|
11250
11547
|
var printHeaderEl = printContainerEl.querySelector("." + PrintHeaderClassName);
|
11548
|
+
var printTitleCanvas = null;
|
11549
|
+
var printTitleHeight = null;
|
11550
|
+
var printTitleData = "";
|
11251
11551
|
var printHeaderCanvas = null;
|
11252
11552
|
var printHeaderHeight = null;
|
11253
11553
|
var printHeaderData = "";
|
11254
|
-
var
|
11255
|
-
if (
|
11256
|
-
return Promise.resolve(html2canvas(
|
11257
|
-
|
11258
|
-
|
11259
|
-
|
11554
|
+
var _temp15 = function () {
|
11555
|
+
if (printTitleEl) {
|
11556
|
+
return Promise.resolve(html2canvas(printTitleEl)).then(function (_html2canvas2) {
|
11557
|
+
printTitleCanvas = _html2canvas2;
|
11558
|
+
printTitleHeight = printTitleCanvas.height * chartWidth / printTitleCanvas.width;
|
11559
|
+
printTitleData = printTitleCanvas.toDataURL('image/png');
|
11260
11560
|
});
|
11261
11561
|
}
|
11262
11562
|
}();
|
11263
|
-
return
|
11563
|
+
return _temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15);
|
11264
11564
|
});
|
11265
|
-
if (
|
11565
|
+
if (_temp17 && _temp17.then) return _temp17.then(function () {});
|
11266
11566
|
} else {
|
11267
11567
|
return Promise.resolve(html2canvas(chart)).then(function (chartCanvas) {
|
11268
11568
|
var imgBodyHeight = chartCanvas.height * chartWidth / chartCanvas.width;
|
@@ -11275,7 +11575,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11275
11575
|
});
|
11276
11576
|
}
|
11277
11577
|
}();
|
11278
|
-
return
|
11578
|
+
return _temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18);
|
11279
11579
|
}
|
11280
11580
|
var chart = canvas.children.item(_index);
|
11281
11581
|
if (chart.getAttribute("id") === "header-canvas") return;
|
@@ -11284,7 +11584,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11284
11584
|
var printChartTitleCanvas = null;
|
11285
11585
|
var chartTitleHeight = null;
|
11286
11586
|
var chartTitleData = "";
|
11287
|
-
var
|
11587
|
+
var _temp20 = function () {
|
11288
11588
|
if (chartTitle && printContainerEls.length) {
|
11289
11589
|
return Promise.resolve(html2canvas(chartTitle)).then(function (_html2canvas) {
|
11290
11590
|
printChartTitleCanvas = _html2canvas;
|
@@ -11293,12 +11593,12 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11293
11593
|
});
|
11294
11594
|
}
|
11295
11595
|
}();
|
11296
|
-
return
|
11596
|
+
return _temp20 && _temp20.then ? _temp20.then(_temp21) : _temp21(_temp20);
|
11297
11597
|
});
|
11298
|
-
if (
|
11598
|
+
if (_temp22 && _temp22.then) return _temp22.then(function () {});
|
11299
11599
|
}
|
11300
11600
|
}();
|
11301
|
-
return
|
11601
|
+
return _temp23 && _temp23.then ? _temp23.then(_temp24) : _temp24(_temp23);
|
11302
11602
|
});
|
11303
11603
|
}, function (error) {
|
11304
11604
|
console.log({
|
@@ -11306,7 +11606,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11306
11606
|
});
|
11307
11607
|
toast.error(getErrorMessage(t, error));
|
11308
11608
|
});
|
11309
|
-
return Promise.resolve(
|
11609
|
+
return Promise.resolve(_temp25 && _temp25.then ? _temp25.then(_temp26) : _temp26(_temp25));
|
11310
11610
|
} catch (e) {
|
11311
11611
|
return Promise.reject(e);
|
11312
11612
|
}
|
@@ -12453,7 +12753,7 @@ Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==t
|
|
12453
12753
|
|
12454
12754
|
var ReactApexChart = unwrapExports(reactApexcharts_min);
|
12455
12755
|
|
12456
|
-
var styles$4 = {"lighter":"#F0FFF6","light":"#
|
12756
|
+
var styles$4 = {"lighter":"#F0FFF6","light":"#89F0B2","less_dark":"#3DC674","dark":"#349056","darker":"#18442A","gray_50":"#FBFBF9","gray_100":"#EAEAE5","gray_300":"#D0D0C8","gray_500":"#9A9A98","gray_700":"#5D5D5B","gray_900":"#363634","titleBox":"_1dveO","title":"_mxRxf","point":"_2fD-F","buttonGroup":"_2DGl3","btnFeedback":"_xGW1x","btnTerminate":"_3mLu2","myanswer":"_eDBpS","titleMyAnswer1":"_2fMq3","titleMyAnswer2":"_3gEYh","contentMyAnswer":"_2K_sx","myAnswerItem":"_2qiLh","time":"_6TCOK","timeCol":"_hmseC","answer-response":"_3GfJt","answer-response-0":"_3ut64","answer-response-1":"_2VtpD","answer-response-2":"_58lQU","answer-response-3":"_1ucMY","answer-response-4":"_1qkxy","answerCorrect":"_2jIeT","answerIncorrect":"_to2v0","answerNograss":"_1JSte","answerEasy":"_2_uTU","answerDiscrimination":"_1DBoA","answerTrap":"_1q3tD","answerNoTime":"_3iItu","questionOrder":"_1fNkS","myTimeLabel":"_1Z_F3","myPoolTime":"_4KwG0","topTimeLabel":"_245H-","topTime":"_3tZqw","meanTimeLabel":"_PlPLY","meanTime":"_12a7R","compareChart":"_3MW16","prevChart":"_1fNkb","chart":"_3K4oY","nextChart":"_3YKBp","titleChart":"_13BVP","titleCompareGrass":"_o1txm","tableCompareGrass":"_bT5nf","thcolumn1":"_3Umg0","tdcolumn1":"_3dRMF","tdcolumn3":"_2tcBP","classification":"_1AFeb","wrapperProblem":"_oTqG7","titleProblem":"_35eIx","titleProblemClose":"_3t4HO","titleTrickyProblem":"_1-oxK","wrongQuestions":"_2dpMR","question":"_1lSOX","assignedQuestions":"_1ONUt","wrapperContent":"_nPoR0","content":"_2zmZn","contentColumn1":"_334SY","span1":"_3Lf-U","span2":"_ZpMot","contentColumn2":"_16P3l","duration":"_1kT28","topDuration":"_1fVRi","overallCorrectRate":"_3jLGe","answer":"_VsZ0K","contentVulnerable":"_QxKMy","wrappContentProblem":"_nnqpW","contentProblem":"_3Z1nV","labelProblem":"_36Xpx","name":"_3ZJQW","percent":"_2J3MK","slider":"_1MPdO","track":"_3CV_y","noData":"__g-ff","loading":"_3j485","table-responsive":"_2O6RX","form-label":"_1RYOQ","form-control":"_3VRVT","form-label-dialog":"_3oCSh","btn-cancel":"_3USKq","btn-register":"_3y_iD","pdfBtnBox":"_3xZHo","pdfBtn":"_1DtWq","form-select":"_1a_vw"};
|
12457
12757
|
|
12458
12758
|
var iconStarQuestion = function iconStarQuestion(_ref) {
|
12459
12759
|
var _ref$width = _ref.width,
|
@@ -12997,7 +13297,9 @@ function MyAnswer(_ref) {
|
|
12997
13297
|
sx: {
|
12998
13298
|
fontSize: "13px",
|
12999
13299
|
fontWeight: 600,
|
13000
|
-
color: "#97A1AF"
|
13300
|
+
color: "#97A1AF",
|
13301
|
+
display: "flex",
|
13302
|
+
alignItems: "center"
|
13001
13303
|
}
|
13002
13304
|
}, t("problem_number"))), React__default.createElement("div", {
|
13003
13305
|
className: styles["custom-col-2"],
|
@@ -13009,7 +13311,9 @@ function MyAnswer(_ref) {
|
|
13009
13311
|
sx: {
|
13010
13312
|
fontSize: "13px",
|
13011
13313
|
fontWeight: 600,
|
13012
|
-
color: "#97A1AF"
|
13314
|
+
color: "#97A1AF",
|
13315
|
+
display: "flex",
|
13316
|
+
alignItems: "center"
|
13013
13317
|
}
|
13014
13318
|
}, t("answer"))), React__default.createElement("div", {
|
13015
13319
|
className: styles["custom-col-2"],
|
@@ -13021,7 +13325,9 @@ function MyAnswer(_ref) {
|
|
13021
13325
|
sx: {
|
13022
13326
|
fontSize: "13px",
|
13023
13327
|
fontWeight: 600,
|
13024
|
-
color: "#97A1AF"
|
13328
|
+
color: "#97A1AF",
|
13329
|
+
display: "flex",
|
13330
|
+
alignItems: "center"
|
13025
13331
|
}
|
13026
13332
|
}, t("solve_time"))), React__default.createElement("div", {
|
13027
13333
|
className: styles["custom-col-2"],
|
@@ -13034,7 +13340,9 @@ function MyAnswer(_ref) {
|
|
13034
13340
|
sx: {
|
13035
13341
|
fontSize: "13px",
|
13036
13342
|
fontWeight: 600,
|
13037
|
-
color: "#97A1AF"
|
13343
|
+
color: "#97A1AF",
|
13344
|
+
display: "flex",
|
13345
|
+
alignItems: "center"
|
13038
13346
|
}
|
13039
13347
|
}, t("comparison_of_top_rankings"))), React__default.createElement("div", {
|
13040
13348
|
className: styles["custom-col-2"],
|
@@ -13047,7 +13355,9 @@ function MyAnswer(_ref) {
|
|
13047
13355
|
sx: {
|
13048
13356
|
fontSize: "13px",
|
13049
13357
|
fontWeight: 600,
|
13050
|
-
color: "#97A1AF"
|
13358
|
+
color: "#97A1AF",
|
13359
|
+
display: "flex",
|
13360
|
+
alignItems: "center"
|
13051
13361
|
}
|
13052
13362
|
}, t("total_correct_rate")))), React__default.createElement("div", {
|
13053
13363
|
className: styles$4["titleMyAnswer2"]
|
@@ -13227,48 +13537,6 @@ var CompareGrass = function CompareGrass(_ref) {
|
|
13227
13537
|
}, t("problem_classification")))), isPrint ? renderPrintTableBody(effectSize) : React__default.createElement("tbody", null, renderTableBody(effectSize))))));
|
13228
13538
|
};
|
13229
13539
|
|
13230
|
-
var iconUpArrow = function iconUpArrow(_ref) {
|
13231
|
-
var _ref$width = _ref.width,
|
13232
|
-
width = _ref$width === void 0 ? "24" : _ref$width,
|
13233
|
-
_ref$height = _ref.height,
|
13234
|
-
height = _ref$height === void 0 ? "24" : _ref$height,
|
13235
|
-
color = _ref.color;
|
13236
|
-
return React__default.createElement("svg", {
|
13237
|
-
xmlns: "http://www.w3.org/2000/svg",
|
13238
|
-
width: width,
|
13239
|
-
height: height,
|
13240
|
-
viewBox: "0 0 24 24",
|
13241
|
-
fill: color
|
13242
|
-
}, React__default.createElement("path", {
|
13243
|
-
d: "M5.25 15.375L12 8.625L18.75 15.375",
|
13244
|
-
stroke: "#CED2DA",
|
13245
|
-
strokeWidth: "2",
|
13246
|
-
strokeLinecap: "round",
|
13247
|
-
strokeLinejoin: "round"
|
13248
|
-
}));
|
13249
|
-
};
|
13250
|
-
|
13251
|
-
var iconDownArrow = function iconDownArrow(_ref) {
|
13252
|
-
var _ref$width = _ref.width,
|
13253
|
-
width = _ref$width === void 0 ? "24" : _ref$width,
|
13254
|
-
_ref$height = _ref.height,
|
13255
|
-
height = _ref$height === void 0 ? "24" : _ref$height,
|
13256
|
-
color = _ref.color;
|
13257
|
-
return React__default.createElement("svg", {
|
13258
|
-
xmlns: "http://www.w3.org/2000/svg",
|
13259
|
-
width: width,
|
13260
|
-
height: height,
|
13261
|
-
viewBox: "0 0 24 24",
|
13262
|
-
fill: color
|
13263
|
-
}, React__default.createElement("path", {
|
13264
|
-
d: "M5.25 8.625L12 15.375L18.75 8.625",
|
13265
|
-
stroke: "#CED2DA",
|
13266
|
-
strokeWidth: "2",
|
13267
|
-
strokeLinecap: "round",
|
13268
|
-
strokeLinejoin: "round"
|
13269
|
-
}));
|
13270
|
-
};
|
13271
|
-
|
13272
13540
|
var iconX = function iconX(_ref) {
|
13273
13541
|
var _ref$width = _ref.width,
|
13274
13542
|
width = _ref$width === void 0 ? "15" : _ref$width,
|
@@ -13404,7 +13672,13 @@ var TrickyProblem = function TrickyProblem(_ref) {
|
|
13404
13672
|
fontSize: "14px",
|
13405
13673
|
fontWeight: 700
|
13406
13674
|
}
|
13407
|
-
}, t("tricky_problems")), isOpen ? React__default.createElement(
|
13675
|
+
}, t("tricky_problems")), isOpen ? React__default.createElement(IoChevronUp, {
|
13676
|
+
size: 24,
|
13677
|
+
color: styles$4.gray_300
|
13678
|
+
}) : React__default.createElement(IoChevronDown, {
|
13679
|
+
size: 24,
|
13680
|
+
color: styles$4.gray_300
|
13681
|
+
})), isOpen && React__default.createElement(Fragment$1, null, isPrint ? renderPrintProblems() : renderProblems()));
|
13408
13682
|
};
|
13409
13683
|
|
13410
13684
|
var ProtractedProblem = function ProtractedProblem(_ref) {
|
@@ -13412,10 +13686,55 @@ var ProtractedProblem = function ProtractedProblem(_ref) {
|
|
13412
13686
|
data = _ref.data,
|
13413
13687
|
openProblem = _ref.openProblem,
|
13414
13688
|
changeOpen = _ref.changeOpen,
|
13415
|
-
isPrint = _ref.isPrint
|
13689
|
+
isPrint = _ref.isPrint,
|
13690
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13416
13691
|
var _useTranslation = useTranslation(),
|
13417
13692
|
t = _useTranslation.t;
|
13418
13693
|
var isOpen = openProblem === keyOpen;
|
13694
|
+
var renderTableBody = function renderTableBody(data) {
|
13695
|
+
return data.map(function (item, index) {
|
13696
|
+
var time = item.topDuration - item.duration;
|
13697
|
+
var isBetter = time > 0;
|
13698
|
+
return React__default.createElement("tr", {
|
13699
|
+
id: "print-item",
|
13700
|
+
key: item.id,
|
13701
|
+
style: index < data.length - 1 ? {
|
13702
|
+
borderBottom: "1px solid #e4e7ec"
|
13703
|
+
} : {}
|
13704
|
+
}, React__default.createElement("td", {
|
13705
|
+
className: styles$4["tdcolumn1"],
|
13706
|
+
style: {
|
13707
|
+
color: styles$4.gray_900,
|
13708
|
+
fontSize: "13px",
|
13709
|
+
fontWeight: 500
|
13710
|
+
}
|
13711
|
+
}, t("number_problem", {
|
13712
|
+
number: item.questionOrder + 1
|
13713
|
+
})), React__default.createElement("td", {
|
13714
|
+
style: {
|
13715
|
+
textAlign: "center",
|
13716
|
+
color: styles$4.gray_700,
|
13717
|
+
fontSize: "13px",
|
13718
|
+
fontWeight: 500
|
13719
|
+
}
|
13720
|
+
}, item.duration ? formatTimeSecond(item.duration, t) : ""), React__default.createElement("td", {
|
13721
|
+
className: styles$4["tdcolumn3"],
|
13722
|
+
style: {
|
13723
|
+
textAlign: "center",
|
13724
|
+
color: styles$4.gray_700,
|
13725
|
+
fontSize: "13px",
|
13726
|
+
fontWeight: 500
|
13727
|
+
}
|
13728
|
+
}, item.topDuration ? formatTimeSecond(item.topDuration, t) : ""), React__default.createElement("td", {
|
13729
|
+
style: {
|
13730
|
+
textAlign: "center",
|
13731
|
+
color: isBetter ? styles$4.dark : "red",
|
13732
|
+
fontSize: "13px",
|
13733
|
+
fontWeight: 600
|
13734
|
+
}
|
13735
|
+
}, item.topDuration && item.duration ? "" + (isBetter ? "" : "+") + formatTimeSecond(Math.abs(time), t) : ""));
|
13736
|
+
});
|
13737
|
+
};
|
13419
13738
|
var renderQuestions = function renderQuestions(data) {
|
13420
13739
|
return data.map(function (item) {
|
13421
13740
|
return React__default.createElement("div", {
|
@@ -13445,30 +13764,72 @@ var ProtractedProblem = function ProtractedProblem(_ref) {
|
|
13445
13764
|
var renderPrintQuestions = function renderPrintQuestions() {
|
13446
13765
|
var chunkedData = _.chunk(data, 5);
|
13447
13766
|
return chunkedData.map(function (i, index) {
|
13448
|
-
return React__default.createElement("
|
13767
|
+
return React__default.createElement("tbody", {
|
13449
13768
|
key: index,
|
13450
13769
|
className: PrintContentClassName
|
13451
|
-
}, renderQuestions(i));
|
13770
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderQuestions(i));
|
13452
13771
|
});
|
13453
13772
|
};
|
13454
13773
|
return React__default.createElement("div", {
|
13455
13774
|
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
13456
13775
|
}, React__default.createElement("div", {
|
13457
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
13776
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13458
13777
|
onClick: function onClick() {
|
13459
13778
|
return changeOpen(isOpen ? "" : keyOpen);
|
13460
13779
|
}
|
13780
|
+
}, React__default.createElement(Stack, {
|
13781
|
+
flexDirection: "row",
|
13782
|
+
gap: "24px",
|
13783
|
+
alignItems: "center"
|
13461
13784
|
}, React__default.createElement(Typography, {
|
13462
13785
|
sx: {
|
13463
13786
|
color: !isOpen ? "#97A1AF" : "#414E62",
|
13464
13787
|
fontSize: "14px",
|
13465
13788
|
fontWeight: 700
|
13466
13789
|
}
|
13467
|
-
}, t("problems_that_took_a_long_time")),
|
13468
|
-
|
13469
|
-
|
13790
|
+
}, t("problems_that_took_a_long_time")), React__default.createElement(Typography, {
|
13791
|
+
sx: {
|
13792
|
+
color: styles$4.gray_300,
|
13793
|
+
fontSize: "11px",
|
13794
|
+
fontWeight: 500
|
13795
|
+
}
|
13796
|
+
}, t("protracted_problem_detail"))), isOpen ? React__default.createElement(IoChevronUp, {
|
13797
|
+
size: 24,
|
13798
|
+
color: styles$4.gray_300
|
13799
|
+
}) : React__default.createElement(IoChevronDown, {
|
13800
|
+
size: 24,
|
13801
|
+
color: styles$4.gray_300
|
13802
|
+
})), isOpen && React__default.createElement(Fragment$1, null, data.length ? React__default.createElement("div", {
|
13803
|
+
className: styles$4["tableCompareGrass"]
|
13804
|
+
}, React__default.createElement("div", {
|
13805
|
+
className: styles$4["table-responsive"]
|
13806
|
+
}, React__default.createElement(Table, {
|
13807
|
+
style: {
|
13808
|
+
width: "100%",
|
13809
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
13810
|
+
}
|
13811
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
13812
|
+
style: {
|
13813
|
+
borderBottom: "1px solid #E4E7EC"
|
13814
|
+
},
|
13815
|
+
className: isPrint ? PrintHeaderClassName : ""
|
13816
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
13817
|
+
className: styles$4["thcolumn1"]
|
13818
|
+
}, t("problem_number")), React__default.createElement("th", {
|
13819
|
+
style: {
|
13820
|
+
textAlign: "center"
|
13821
|
+
}
|
13822
|
+
}, t("my_time")), React__default.createElement("th", {
|
13823
|
+
style: {
|
13824
|
+
textAlign: "center"
|
13825
|
+
}
|
13826
|
+
}, t("top_time")), React__default.createElement("th", {
|
13827
|
+
style: {
|
13828
|
+
textAlign: "center"
|
13829
|
+
}
|
13830
|
+
}, t("time_comparison")))), isPrint ? renderPrintQuestions() : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(data) : renderQuestions(data))))) : React__default.createElement("div", {
|
13470
13831
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13471
|
-
}, t("no_data"))))
|
13832
|
+
}, t("no_data"))));
|
13472
13833
|
};
|
13473
13834
|
|
13474
13835
|
var Vulnerable = function Vulnerable(_ref) {
|
@@ -13476,7 +13837,8 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13476
13837
|
keyOpen = _ref.keyOpen,
|
13477
13838
|
openProblem = _ref.openProblem,
|
13478
13839
|
changeOpen = _ref.changeOpen,
|
13479
|
-
isPrint = _ref.isPrint
|
13840
|
+
isPrint = _ref.isPrint,
|
13841
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13480
13842
|
var _useTranslation = useTranslation(),
|
13481
13843
|
t = _useTranslation.t;
|
13482
13844
|
var isOpen = openProblem === keyOpen;
|
@@ -13485,12 +13847,65 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13485
13847
|
}).sort(function (q1, q2) {
|
13486
13848
|
return q2.overallCorrectRate === q1.overallCorrectRate ? q1.questionOrder - q2.questionOrder : q2.overallCorrectRate - q1.overallCorrectRate;
|
13487
13849
|
});
|
13850
|
+
var renderTableBody = function renderTableBody(data) {
|
13851
|
+
return data.map(function (item, index) {
|
13852
|
+
return React__default.createElement("tr", {
|
13853
|
+
id: "print-item",
|
13854
|
+
key: item.id,
|
13855
|
+
style: index < data.length - 1 ? {
|
13856
|
+
borderBottom: "1px solid #e4e7ec"
|
13857
|
+
} : {}
|
13858
|
+
}, React__default.createElement("td", {
|
13859
|
+
className: styles$4["tdcolumn1"],
|
13860
|
+
style: {
|
13861
|
+
color: styles$4.gray_900,
|
13862
|
+
fontSize: "13px",
|
13863
|
+
fontWeight: 600
|
13864
|
+
}
|
13865
|
+
}, React__default.createElement(Typography, {
|
13866
|
+
color: styles$4.gray_900,
|
13867
|
+
fontSize: "13px",
|
13868
|
+
fontWeight: 600
|
13869
|
+
}, t("problem") + " " + (item.questionOrder + 1))), React__default.createElement("td", {
|
13870
|
+
style: {
|
13871
|
+
textAlign: "center",
|
13872
|
+
color: styles$4.dark,
|
13873
|
+
fontSize: "13px",
|
13874
|
+
fontWeight: 600
|
13875
|
+
}
|
13876
|
+
}, item.overallCorrectRate.toFixed(2) ? item.overallCorrectRate.toFixed(2) + "%" : ""), React__default.createElement("td", {
|
13877
|
+
className: styles$4["tdcolumn3"],
|
13878
|
+
style: {
|
13879
|
+
color: "red",
|
13880
|
+
fontSize: "13px",
|
13881
|
+
fontWeight: 500
|
13882
|
+
}
|
13883
|
+
}, item.selectedAnswers ? t("number_answer", {
|
13884
|
+
number: item.selectedAnswers
|
13885
|
+
}) : ""), React__default.createElement("td", {
|
13886
|
+
style: {
|
13887
|
+
textAlign: "center",
|
13888
|
+
color: styles$4.gray_700
|
13889
|
+
}
|
13890
|
+
}, item.correctAnswers ? t("number_answer", {
|
13891
|
+
number: item.correctAnswers
|
13892
|
+
}) : ""), React__default.createElement("td", {
|
13893
|
+
style: {
|
13894
|
+
textAlign: "center",
|
13895
|
+
color: styles$4.gray_700
|
13896
|
+
}
|
13897
|
+
}, item.category.name ? item.category.name : ""));
|
13898
|
+
});
|
13899
|
+
};
|
13488
13900
|
var renderQuestions = function renderQuestions(questions) {
|
13489
13901
|
return questions.map(function (question) {
|
13490
|
-
return React__default.createElement(
|
13902
|
+
return React__default.createElement(Grid, {
|
13903
|
+
container: true,
|
13491
13904
|
className: styles$4["content"],
|
13492
13905
|
key: question.id
|
13493
|
-
}, React__default.createElement(
|
13906
|
+
}, React__default.createElement(Grid, {
|
13907
|
+
item: true,
|
13908
|
+
xs: 1.5,
|
13494
13909
|
className: styles$4["contentColumn1"]
|
13495
13910
|
}, React__default.createElement("div", null, React__default.createElement("span", {
|
13496
13911
|
className: styles$4["span1"]
|
@@ -13498,7 +13913,9 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13498
13913
|
className: styles$4["span2"]
|
13499
13914
|
}, t("number_question", {
|
13500
13915
|
number: question.questionOrder + 1
|
13501
|
-
})))), React__default.createElement(
|
13916
|
+
})))), React__default.createElement(Grid, {
|
13917
|
+
item: true,
|
13918
|
+
xs: 10.5,
|
13502
13919
|
className: styles$4["contentColumn2"]
|
13503
13920
|
}, React__default.createElement("div", null, React__default.createElement("span", {
|
13504
13921
|
className: styles$4["span1"]
|
@@ -13518,30 +13935,76 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13518
13935
|
var renderPrintQuestions = function renderPrintQuestions(questions) {
|
13519
13936
|
var chunkedQuestions = _.chunk(questions, 5);
|
13520
13937
|
return chunkedQuestions.map(function (i, index) {
|
13521
|
-
return React__default.createElement("
|
13938
|
+
return React__default.createElement("tbody", {
|
13522
13939
|
key: index,
|
13523
13940
|
className: PrintContentClassName
|
13524
|
-
}, renderQuestions(i));
|
13941
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderQuestions(i));
|
13525
13942
|
});
|
13526
13943
|
};
|
13527
13944
|
return React__default.createElement("div", {
|
13528
13945
|
className: styles$4["wrapperProblem"] + " " + PrintContainerClassName
|
13529
13946
|
}, React__default.createElement("div", {
|
13530
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
13947
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13531
13948
|
onClick: function onClick() {
|
13532
13949
|
return changeOpen(isOpen ? "" : keyOpen);
|
13533
13950
|
}
|
13951
|
+
}, React__default.createElement(Stack, {
|
13952
|
+
flexDirection: "row",
|
13953
|
+
gap: "24px",
|
13954
|
+
alignItems: "center"
|
13534
13955
|
}, React__default.createElement(Typography, {
|
13535
13956
|
sx: {
|
13536
13957
|
color: !isOpen ? "#97A1AF" : "#414E62",
|
13537
13958
|
fontSize: "14px",
|
13538
13959
|
fontWeight: 700
|
13539
13960
|
}
|
13540
|
-
}, t("issues_vulnerable")),
|
13541
|
-
|
13542
|
-
|
13961
|
+
}, t("issues_vulnerable")), React__default.createElement(Typography, {
|
13962
|
+
sx: {
|
13963
|
+
color: styles$4.gray_300,
|
13964
|
+
fontSize: "11px",
|
13965
|
+
fontWeight: 500
|
13966
|
+
}
|
13967
|
+
}, t("vulnerable_detail"))), isOpen ? React__default.createElement(IoChevronUp, {
|
13968
|
+
size: 24,
|
13969
|
+
color: styles$4.gray_300
|
13970
|
+
}) : React__default.createElement(IoChevronDown, {
|
13971
|
+
size: 24,
|
13972
|
+
color: styles$4.gray_300
|
13973
|
+
})), isOpen && React__default.createElement(Fragment$1, null, incorrectQuestions.length ? React__default.createElement("div", {
|
13974
|
+
className: styles$4["tableCompareGrass"]
|
13975
|
+
}, React__default.createElement("div", {
|
13976
|
+
className: styles$4["table-responsive"]
|
13977
|
+
}, React__default.createElement(Table, {
|
13978
|
+
style: {
|
13979
|
+
width: "100%",
|
13980
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
13981
|
+
}
|
13982
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
13983
|
+
style: {
|
13984
|
+
borderBottom: "1px solid #E4E7EC"
|
13985
|
+
},
|
13986
|
+
className: isPrint ? PrintHeaderClassName : ""
|
13987
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
13988
|
+
className: styles$4["thcolumn1"]
|
13989
|
+
}, t("problem_number")), React__default.createElement("th", {
|
13990
|
+
style: {
|
13991
|
+
textAlign: "center"
|
13992
|
+
}
|
13993
|
+
}, t("total_correct_rate")), React__default.createElement("th", {
|
13994
|
+
style: {
|
13995
|
+
textAlign: "center"
|
13996
|
+
}
|
13997
|
+
}, t("my_wrong_answer")), React__default.createElement("th", {
|
13998
|
+
style: {
|
13999
|
+
textAlign: "center"
|
14000
|
+
}
|
14001
|
+
}, t("answer")), React__default.createElement("th", {
|
14002
|
+
style: {
|
14003
|
+
textAlign: "center"
|
14004
|
+
}
|
14005
|
+
}, t("_category")))), isPrint ? renderPrintQuestions(incorrectQuestions) : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(incorrectQuestions) : renderQuestions(incorrectQuestions))))) : React__default.createElement("div", {
|
13543
14006
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13544
|
-
}, t("no_data"))))
|
14007
|
+
}, t("no_data"))));
|
13545
14008
|
};
|
13546
14009
|
|
13547
14010
|
var GradesByTerritory = function GradesByTerritory(_ref) {
|
@@ -13549,10 +14012,64 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13549
14012
|
data = _ref.data,
|
13550
14013
|
openProblem = _ref.openProblem,
|
13551
14014
|
changeOpen = _ref.changeOpen,
|
13552
|
-
isPrint = _ref.isPrint
|
14015
|
+
isPrint = _ref.isPrint,
|
14016
|
+
resultData = _ref.resultData,
|
14017
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13553
14018
|
var _useTranslation = useTranslation(),
|
13554
14019
|
t = _useTranslation.t;
|
14020
|
+
var formattedData = totalSolveTimeCategories(resultData, data);
|
13555
14021
|
var isOpen = openProblem === keyOpen;
|
14022
|
+
var renderTableBody = function renderTableBody(data) {
|
14023
|
+
return data.map(function (item, index) {
|
14024
|
+
return React__default.createElement("tr", {
|
14025
|
+
id: "print-item",
|
14026
|
+
key: item.id,
|
14027
|
+
style: index < data.length - 1 ? {
|
14028
|
+
borderBottom: "1px solid #e4e7ec"
|
14029
|
+
} : {}
|
14030
|
+
}, React__default.createElement("td", {
|
14031
|
+
className: styles$4["tdcolumn1"],
|
14032
|
+
style: {
|
14033
|
+
color: styles$4.gray_900,
|
14034
|
+
fontSize: "13px",
|
14035
|
+
fontWeight: 600
|
14036
|
+
}
|
14037
|
+
}, item.name), React__default.createElement("td", {
|
14038
|
+
style: {
|
14039
|
+
textAlign: "center",
|
14040
|
+
color: styles$4.gray_900,
|
14041
|
+
fontSize: "13px",
|
14042
|
+
fontWeight: 600
|
14043
|
+
}
|
14044
|
+
}, item.percentageAmongStudents.toFixed(2), "%"), React__default.createElement("td", {
|
14045
|
+
className: styles$4["tdcolumn3"],
|
14046
|
+
style: {
|
14047
|
+
textAlign: "center",
|
14048
|
+
color: styles$4.gray_700,
|
14049
|
+
fontSize: "13px",
|
14050
|
+
fontWeight: 500
|
14051
|
+
}
|
14052
|
+
}, item.totalCorrectQuestions ? t("number_of_answer", {
|
14053
|
+
number: item.totalCorrectQuestions
|
14054
|
+
}) : ""), React__default.createElement("td", {
|
14055
|
+
style: {
|
14056
|
+
textAlign: "center",
|
14057
|
+
color: styles$4.gray_700,
|
14058
|
+
fontSize: "13px",
|
14059
|
+
fontWeight: 500
|
14060
|
+
}
|
14061
|
+
}, item.totalQuestions ? t("number_of_answer", {
|
14062
|
+
number: item.totalQuestions
|
14063
|
+
}) : ""), React__default.createElement("td", {
|
14064
|
+
style: {
|
14065
|
+
textAlign: "center",
|
14066
|
+
color: styles$4.gray_700,
|
14067
|
+
fontSize: "13px",
|
14068
|
+
fontWeight: 500
|
14069
|
+
}
|
14070
|
+
}, item.totalSolveTime ? formatDuration(t, item.totalSolveTime) : ""));
|
14071
|
+
});
|
14072
|
+
};
|
13556
14073
|
var renderCategories = function renderCategories(data) {
|
13557
14074
|
return data.map(function (item) {
|
13558
14075
|
var trackStyle = {
|
@@ -13576,18 +14093,18 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13576
14093
|
});
|
13577
14094
|
};
|
13578
14095
|
var renderPrintCategories = function renderPrintCategories() {
|
13579
|
-
var chunkedCategories = _.chunk(
|
14096
|
+
var chunkedCategories = _.chunk(formattedData, 10);
|
13580
14097
|
return chunkedCategories.map(function (i, index) {
|
13581
|
-
return React__default.createElement("
|
14098
|
+
return React__default.createElement("tbody", {
|
13582
14099
|
key: index,
|
13583
14100
|
className: PrintContentClassName
|
13584
|
-
}, renderCategories(i));
|
14101
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderCategories(i));
|
13585
14102
|
});
|
13586
14103
|
};
|
13587
14104
|
return React__default.createElement("div", {
|
13588
14105
|
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
13589
14106
|
}, React__default.createElement("div", {
|
13590
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
14107
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13591
14108
|
onClick: function onClick() {
|
13592
14109
|
return changeOpen(isOpen ? "" : keyOpen);
|
13593
14110
|
}
|
@@ -13597,9 +14114,45 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13597
14114
|
fontSize: "14px",
|
13598
14115
|
fontWeight: 700
|
13599
14116
|
}
|
13600
|
-
}, t("grades_by_area")), isOpen ? React__default.createElement(
|
13601
|
-
|
13602
|
-
|
14117
|
+
}, t("grades_by_area")), isOpen ? React__default.createElement(IoChevronUp, {
|
14118
|
+
size: 24,
|
14119
|
+
color: styles$4.gray_300
|
14120
|
+
}) : React__default.createElement(IoChevronDown, {
|
14121
|
+
size: 24,
|
14122
|
+
color: styles$4.gray_300
|
14123
|
+
})), isOpen && React__default.createElement(Fragment$1, null, formattedData.length ? React__default.createElement("div", {
|
14124
|
+
className: styles$4["tableCompareGrass"]
|
14125
|
+
}, React__default.createElement("div", {
|
14126
|
+
className: styles$4["table-responsive"]
|
14127
|
+
}, React__default.createElement(Table, {
|
14128
|
+
style: {
|
14129
|
+
width: "100%",
|
14130
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
14131
|
+
}
|
14132
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
14133
|
+
style: {
|
14134
|
+
borderBottom: "1px solid #E4E7EC"
|
14135
|
+
},
|
14136
|
+
className: isPrint ? PrintHeaderClassName : ""
|
14137
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
14138
|
+
className: styles$4["thcolumn1"]
|
14139
|
+
}, t("categories")), React__default.createElement("th", {
|
14140
|
+
style: {
|
14141
|
+
textAlign: "center"
|
14142
|
+
}
|
14143
|
+
}, t("correct_rate")), React__default.createElement("th", {
|
14144
|
+
style: {
|
14145
|
+
textAlign: "center"
|
14146
|
+
}
|
14147
|
+
}, t("number_of_correct_answers")), React__default.createElement("th", {
|
14148
|
+
style: {
|
14149
|
+
textAlign: "center"
|
14150
|
+
}
|
14151
|
+
}, t("total_number_of_problems")), React__default.createElement("th", {
|
14152
|
+
style: {
|
14153
|
+
textAlign: "center"
|
14154
|
+
}
|
14155
|
+
}, t("total_solve_time")))), isPrint ? renderPrintCategories() : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(formattedData) : renderCategories(formattedData))))) : React__default.createElement("div", {
|
13603
14156
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13604
14157
|
}, t("no_data"))));
|
13605
14158
|
};
|
@@ -13809,7 +14362,8 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13809
14362
|
history = _ref.history,
|
13810
14363
|
examSessionId = _ref.examSessionId,
|
13811
14364
|
studentId = _ref.studentId,
|
13812
|
-
code = _ref.code
|
14365
|
+
code = _ref.code,
|
14366
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13813
14367
|
var _useTab = useTab(),
|
13814
14368
|
selected = _useTab.selected,
|
13815
14369
|
handleChangeTab = _useTab.handleChangeTab;
|
@@ -13910,7 +14464,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13910
14464
|
fontWeight: 600,
|
13911
14465
|
color: styles.gray_500
|
13912
14466
|
}
|
13913
|
-
}, t("
|
14467
|
+
}, t("students")), React__default.createElement(Typography, {
|
13914
14468
|
sx: {
|
13915
14469
|
fontSize: "14px",
|
13916
14470
|
fontWeight: 600,
|
@@ -13954,7 +14508,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13954
14508
|
}, React__default.createElement("button", {
|
13955
14509
|
className: styles$4["pdfBtn"] + " " + styles["truncate"],
|
13956
14510
|
onClick: handleExportPdf
|
13957
|
-
}, React__default.createElement(iconPrintFill, null), React__default.createElement("p", null, t("
|
14511
|
+
}, React__default.createElement(iconPrintFill, null), React__default.createElement("p", null, t("print_all"))))))), React__default.createElement(Grid, {
|
13958
14512
|
item: true,
|
13959
14513
|
xs: 12
|
13960
14514
|
}, React__default.createElement(Box, {
|
@@ -13964,7 +14518,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13964
14518
|
alignItems: "center",
|
13965
14519
|
display: "flex",
|
13966
14520
|
overflow: "scroll",
|
13967
|
-
bgcolor: styles.
|
14521
|
+
bgcolor: styles.gray_50,
|
13968
14522
|
borderTop: "1px solid #E4E7EC",
|
13969
14523
|
borderBottom: "1px solid #E4E7EC"
|
13970
14524
|
}, React__default.createElement(Stack, {
|
@@ -14044,16 +14598,20 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14044
14598
|
keyOpen: "Vulnerable",
|
14045
14599
|
data: resultData,
|
14046
14600
|
openProblem: openProblem,
|
14047
|
-
changeOpen: setOpenProblem
|
14601
|
+
changeOpen: setOpenProblem,
|
14602
|
+
isMyStoryStudent: isMyStoryStudent
|
14048
14603
|
}), React__default.createElement(ProtractedProblem, {
|
14049
14604
|
keyOpen: "ProtractedProblem",
|
14050
14605
|
data: longTimeSpend,
|
14051
14606
|
openProblem: openProblem,
|
14052
|
-
changeOpen: setOpenProblem
|
14607
|
+
changeOpen: setOpenProblem,
|
14608
|
+
isMyStoryStudent: isMyStoryStudent
|
14053
14609
|
}), React__default.createElement(GradesByTerritory, {
|
14054
14610
|
keyOpen: "GradesByTerritory",
|
14055
14611
|
data: categoryResponses,
|
14612
|
+
resultData: resultData,
|
14056
14613
|
openProblem: openProblem,
|
14614
|
+
isMyStoryStudent: isMyStoryStudent,
|
14057
14615
|
changeOpen: setOpenProblem
|
14058
14616
|
}))), React__default.createElement(Grid, {
|
14059
14617
|
item: true,
|
@@ -14211,10 +14769,11 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14211
14769
|
gap: "12px",
|
14212
14770
|
marginTop: "24px"
|
14213
14771
|
}, React__default.createElement(Typography, {
|
14772
|
+
className: "chart-title",
|
14214
14773
|
sx: {
|
14215
|
-
fontSize: "
|
14774
|
+
fontSize: "18px",
|
14216
14775
|
fontWeight: 700,
|
14217
|
-
color: styles.
|
14776
|
+
color: styles.gray_500
|
14218
14777
|
}
|
14219
14778
|
}, t(TabList[2].label)), React__default.createElement(CompareGrass, {
|
14220
14779
|
effectSize: effectSize,
|
@@ -14242,19 +14801,23 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14242
14801
|
data: resultData,
|
14243
14802
|
openProblem: "Vulnerable",
|
14244
14803
|
changeOpen: setOpenProblem,
|
14804
|
+
isMyStoryStudent: isMyStoryStudent,
|
14245
14805
|
isPrint: true
|
14246
14806
|
}), React__default.createElement(ProtractedProblem, {
|
14247
14807
|
keyOpen: "ProtractedProblem",
|
14248
14808
|
data: longTimeSpend,
|
14249
14809
|
openProblem: "ProtractedProblem",
|
14250
14810
|
changeOpen: setOpenProblem,
|
14251
|
-
isPrint: true
|
14811
|
+
isPrint: true,
|
14812
|
+
isMyStoryStudent: isMyStoryStudent
|
14252
14813
|
}), React__default.createElement(GradesByTerritory, {
|
14253
14814
|
keyOpen: "GradesByTerritory",
|
14254
14815
|
data: categoryResponses,
|
14816
|
+
resultData: resultData,
|
14255
14817
|
openProblem: "GradesByTerritory",
|
14256
14818
|
changeOpen: setOpenProblem,
|
14257
|
-
isPrint: true
|
14819
|
+
isPrint: true,
|
14820
|
+
isMyStoryStudent: isMyStoryStudent
|
14258
14821
|
})))), React__default.createElement(CreateNewQuestionDialog$1, {
|
14259
14822
|
examSessionId: resultData === null || resultData === void 0 ? void 0 : resultData.examSessionId,
|
14260
14823
|
handleCreateQuestion: handleCreateQuestion,
|
@@ -14289,12 +14852,25 @@ var timeSpanToLocalMoment = function timeSpanToLocalMoment(time, date) {
|
|
14289
14852
|
var value = date ? moment.utc(date).startOf("day").add(totalSeconds, "seconds").local() : moment().startOf("day").add(totalSeconds, "seconds");
|
14290
14853
|
return value;
|
14291
14854
|
};
|
14855
|
+
var convertHHMMSStoSeconds = function convertHHMMSStoSeconds(time) {
|
14856
|
+
var times = time.split(":");
|
14857
|
+
return +times[0] * 60 * 60 + +times[1] * 60 + +times[2];
|
14858
|
+
};
|
14859
|
+
var getRemainTime = function getRemainTime(startTime, duration) {
|
14860
|
+
var timePass = diffFromNow(startTime, "second");
|
14861
|
+
var durationInNumber = convertHHMMSStoSeconds(duration);
|
14862
|
+
if (typeof timePass !== "number") return null;
|
14863
|
+
if (timePass > durationInNumber) return 0;
|
14864
|
+
return durationInNumber - timePass;
|
14865
|
+
};
|
14292
14866
|
|
14293
14867
|
var times = {
|
14294
14868
|
__proto__: null,
|
14295
14869
|
getLocalDayOfWeek: getLocalDayOfWeek,
|
14296
14870
|
getUtcDayOfWeek: getUtcDayOfWeek,
|
14297
|
-
timeSpanToLocalMoment: timeSpanToLocalMoment
|
14871
|
+
timeSpanToLocalMoment: timeSpanToLocalMoment,
|
14872
|
+
convertHHMMSStoSeconds: convertHHMMSStoSeconds,
|
14873
|
+
getRemainTime: getRemainTime
|
14298
14874
|
};
|
14299
14875
|
|
14300
14876
|
var SIGN_IN_SUPER_ADMIN_URL = SUPER_ADMIN_BASE_URL + "/api/auth/login";
|
@@ -14899,8 +15475,8 @@ var Header = function Header(_ref) {
|
|
14899
15475
|
homeUrl: homeRoute.path,
|
14900
15476
|
role: role,
|
14901
15477
|
history: history,
|
14902
|
-
|
14903
|
-
|
15478
|
+
onSignOut: onSignOut,
|
15479
|
+
hideAcademyName: !isLargerThanXL && headerTabs.length > 6
|
14904
15480
|
})), React__default.createElement(Stack, {
|
14905
15481
|
display: "flex",
|
14906
15482
|
flexGrow: 1,
|
@@ -14947,23 +15523,7 @@ var Header = function Header(_ref) {
|
|
14947
15523
|
})), React__default.createElement(Stack, {
|
14948
15524
|
direction: "row",
|
14949
15525
|
alignItems: "center"
|
14950
|
-
}, React__default.createElement(
|
14951
|
-
color: styles.gray_700,
|
14952
|
-
className: "fw-bold me-3 text-nowrap flex-shrink-1",
|
14953
|
-
sx: {
|
14954
|
-
minWidth: "60px",
|
14955
|
-
maxWidth: {
|
14956
|
-
md: "100px",
|
14957
|
-
xs: "60px"
|
14958
|
-
},
|
14959
|
-
fontSize: {
|
14960
|
-
md: "16px",
|
14961
|
-
xs: "14px"
|
14962
|
-
},
|
14963
|
-
overflow: "hidden",
|
14964
|
-
textOverflow: "ellipsis"
|
14965
|
-
}
|
14966
|
-
}, user === null || user === void 0 ? void 0 : user.fullName), React__default.createElement(Link, {
|
15526
|
+
}, React__default.createElement(Link, {
|
14967
15527
|
"aria-current": "page",
|
14968
15528
|
to: homeRoute.path,
|
14969
15529
|
className: "border-none"
|
@@ -15076,7 +15636,11 @@ var AcademyCard = function AcademyCard(_ref) {
|
|
15076
15636
|
}), createElement(CardContent, null, createElement(Typography$1, {
|
15077
15637
|
variant: "h6",
|
15078
15638
|
component: "div"
|
15079
|
-
}, academy.name)), createElement(CardActions,
|
15639
|
+
}, academy.name)), createElement(CardActions, {
|
15640
|
+
sx: {
|
15641
|
+
padding: "16px"
|
15642
|
+
}
|
15643
|
+
}, createElement(Button$1, {
|
15080
15644
|
sx: {
|
15081
15645
|
bgColor: theme.palette.main_theme.dark
|
15082
15646
|
},
|
@@ -15133,5 +15697,220 @@ var AcademyList = function AcademyList(_ref) {
|
|
15133
15697
|
}, React__default.createElement("span", null, t("no_academy_available"), "."))))));
|
15134
15698
|
};
|
15135
15699
|
|
15136
|
-
|
15700
|
+
var ONE_SECOND_IN_MILLISECONDS = 1000;
|
15701
|
+
var useCountDownTimer = function useCountDownTimer(props) {
|
15702
|
+
var startTime = props.startTime,
|
15703
|
+
status = props.status,
|
15704
|
+
code = props.code,
|
15705
|
+
duration = props.duration,
|
15706
|
+
fetchedCount = props.fetchedCount,
|
15707
|
+
onFinish = props.onFinish;
|
15708
|
+
var _useState = useState(),
|
15709
|
+
remainTime = _useState[0],
|
15710
|
+
setRemainTime = _useState[1];
|
15711
|
+
var checkStatusRef = useRef(null);
|
15712
|
+
var requestRef = useRef(null);
|
15713
|
+
var checkLiveExamStatus = useCallback(function () {
|
15714
|
+
try {
|
15715
|
+
!!checkStatusRef.current && clearTimeout(checkStatusRef.current);
|
15716
|
+
if (!code || status === ExamStatus$1.Completed) {
|
15717
|
+
return Promise.resolve();
|
15718
|
+
}
|
15719
|
+
var _temp = _catch(function () {
|
15720
|
+
return Promise.resolve(getCheckStatusExam(code)).then(function (res) {
|
15721
|
+
if (res.data.data.status === ExamStatus$1.Completed) {
|
15722
|
+
clearInterval(checkStatusRef.current);
|
15723
|
+
onFinish();
|
15724
|
+
} else {
|
15725
|
+
checkStatusRef.current = setTimeout(checkLiveExamStatus, ONE_SECOND_IN_MILLISECONDS);
|
15726
|
+
}
|
15727
|
+
});
|
15728
|
+
}, function (error) {
|
15729
|
+
console.log({
|
15730
|
+
error: error
|
15731
|
+
});
|
15732
|
+
});
|
15733
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
15734
|
+
} catch (e) {
|
15735
|
+
return Promise.reject(e);
|
15736
|
+
}
|
15737
|
+
}, [code, status, onFinish]);
|
15738
|
+
useEffect(function () {
|
15739
|
+
if (status !== ExamStatus$1.InProgress) return;
|
15740
|
+
var animate = function animate() {
|
15741
|
+
if (!startTime || !duration) return;
|
15742
|
+
if (typeof remainTime === "number" && remainTime <= 0) {
|
15743
|
+
onFinish();
|
15744
|
+
return;
|
15745
|
+
}
|
15746
|
+
var remain = getRemainTime(startTime, duration);
|
15747
|
+
if (typeof remain !== "number") {
|
15748
|
+
setRemainTime(undefined);
|
15749
|
+
return;
|
15750
|
+
}
|
15751
|
+
if (remain <= 0) {
|
15752
|
+
setRemainTime(0);
|
15753
|
+
checkLiveExamStatus();
|
15754
|
+
return;
|
15755
|
+
}
|
15756
|
+
setRemainTime(remain || 0);
|
15757
|
+
requestRef.current = requestAnimationFrame(animate);
|
15758
|
+
};
|
15759
|
+
requestRef.current = requestAnimationFrame(animate);
|
15760
|
+
return function () {
|
15761
|
+
!!requestRef.current && cancelAnimationFrame(requestRef.current);
|
15762
|
+
!!checkStatusRef.current && clearTimeout(checkStatusRef.current);
|
15763
|
+
setRemainTime(undefined);
|
15764
|
+
};
|
15765
|
+
}, [startTime, duration, fetchedCount, checkLiveExamStatus]);
|
15766
|
+
useEffect(function () {
|
15767
|
+
if (typeof remainTime === "number" && remainTime <= 0) onFinish();
|
15768
|
+
}, [remainTime, onFinish]);
|
15769
|
+
return remainTime;
|
15770
|
+
};
|
15771
|
+
|
15772
|
+
var EXAM_SESSION_URL$1 = BASE_URL + "/api/examSession";
|
15773
|
+
var getCheckStatusExam$1 = function getCheckStatusExam(examCode) {
|
15774
|
+
return api.get(EXAM_SESSION_URL$1 + "/" + examCode + "/status");
|
15775
|
+
};
|
15776
|
+
|
15777
|
+
var useCheckExam = function useCheckExam(code, status) {
|
15778
|
+
var _useState = useState({}),
|
15779
|
+
isCheckExam = _useState[0],
|
15780
|
+
setCheckExam = _useState[1];
|
15781
|
+
var isCheck = !code ? false : isCheckExam[code];
|
15782
|
+
var checkExam = function checkExam() {
|
15783
|
+
try {
|
15784
|
+
if (!code || isCheck) return Promise.resolve();
|
15785
|
+
if (status === ExamStatus$1.Completed) {
|
15786
|
+
setCheckExam(function (state) {
|
15787
|
+
var _extends2;
|
15788
|
+
return _extends({}, state, (_extends2 = {}, _extends2[code] = true, _extends2));
|
15789
|
+
});
|
15790
|
+
return Promise.resolve();
|
15791
|
+
}
|
15792
|
+
var _temp = _catch(function () {
|
15793
|
+
return Promise.resolve(getCheckStatusExam$1(code)).then(function () {
|
15794
|
+
setCheckExam(function (state) {
|
15795
|
+
var _extends3;
|
15796
|
+
return _extends({}, state, (_extends3 = {}, _extends3[code] = true, _extends3));
|
15797
|
+
});
|
15798
|
+
});
|
15799
|
+
}, function (error) {
|
15800
|
+
console.log({
|
15801
|
+
error: error
|
15802
|
+
});
|
15803
|
+
});
|
15804
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
15805
|
+
} catch (e) {
|
15806
|
+
return Promise.reject(e);
|
15807
|
+
}
|
15808
|
+
};
|
15809
|
+
useEffect(function () {
|
15810
|
+
checkExam();
|
15811
|
+
}, [code]);
|
15812
|
+
return {
|
15813
|
+
isCheck: isCheck
|
15814
|
+
};
|
15815
|
+
};
|
15816
|
+
|
15817
|
+
var useLoadMore = function useLoadMore(props) {
|
15818
|
+
var onLoadMore = props.onLoadMore,
|
15819
|
+
loading = props.loading;
|
15820
|
+
var observerTarget = useRef(null);
|
15821
|
+
useEffect(function () {
|
15822
|
+
var currentTarget = observerTarget.current;
|
15823
|
+
var observer = new IntersectionObserver(function (entries) {
|
15824
|
+
if (entries[0].isIntersecting && !loading) {
|
15825
|
+
onLoadMore();
|
15826
|
+
}
|
15827
|
+
}, {
|
15828
|
+
threshold: 1
|
15829
|
+
});
|
15830
|
+
if (observerTarget.current) {
|
15831
|
+
observer.observe(observerTarget.current);
|
15832
|
+
}
|
15833
|
+
return function () {
|
15834
|
+
if (currentTarget) {
|
15835
|
+
observer.unobserve(currentTarget);
|
15836
|
+
}
|
15837
|
+
};
|
15838
|
+
}, [observerTarget, loading, onLoadMore]);
|
15839
|
+
return {
|
15840
|
+
observerTarget: observerTarget
|
15841
|
+
};
|
15842
|
+
};
|
15843
|
+
|
15844
|
+
var useVirtualizeList = function useVirtualizeList(totalItems, rowHeight, offsetRow, minRows) {
|
15845
|
+
if (offsetRow === void 0) {
|
15846
|
+
offsetRow = 1;
|
15847
|
+
}
|
15848
|
+
var _useState = useState(-1),
|
15849
|
+
startIndex = _useState[0],
|
15850
|
+
setStartIndex = _useState[1];
|
15851
|
+
var _useState2 = useState(-1),
|
15852
|
+
endIndex = _useState2[0],
|
15853
|
+
setEndIndex = _useState2[1];
|
15854
|
+
var containerRef = useRef(null);
|
15855
|
+
var handleScroll = useCallback(function () {
|
15856
|
+
if (containerRef.current) {
|
15857
|
+
var _containerRef$current = containerRef.current,
|
15858
|
+
scrollTop = _containerRef$current.scrollTop,
|
15859
|
+
clientHeight = _containerRef$current.clientHeight;
|
15860
|
+
var itemsPerPage = Math.ceil(clientHeight / rowHeight);
|
15861
|
+
var newStartIndex = Math.max(Math.floor(scrollTop / rowHeight) - offsetRow, 0);
|
15862
|
+
var newEndIndex = Math.min(newStartIndex + itemsPerPage + offsetRow, totalItems - 1);
|
15863
|
+
if (minRows) {
|
15864
|
+
if (totalItems <= minRows) {
|
15865
|
+
newStartIndex = -1;
|
15866
|
+
newEndIndex = -1;
|
15867
|
+
} else {
|
15868
|
+
var total = newEndIndex - newStartIndex;
|
15869
|
+
var diff = minRows - total;
|
15870
|
+
if (diff > 0) {
|
15871
|
+
var valS = diff / 2;
|
15872
|
+
var valE = diff - valS;
|
15873
|
+
if (newStartIndex < valS) {
|
15874
|
+
valE += valS - newStartIndex;
|
15875
|
+
newStartIndex = 0;
|
15876
|
+
}
|
15877
|
+
if (newEndIndex + valE > totalItems - 1) {
|
15878
|
+
valS += newEndIndex + valE - totalItems + 1;
|
15879
|
+
}
|
15880
|
+
newStartIndex = Math.max(newStartIndex - valS, 0);
|
15881
|
+
newEndIndex = Math.min(newEndIndex + valE, totalItems - 1);
|
15882
|
+
}
|
15883
|
+
}
|
15884
|
+
}
|
15885
|
+
setStartIndex(newStartIndex);
|
15886
|
+
setEndIndex(newEndIndex);
|
15887
|
+
}
|
15888
|
+
}, [totalItems, rowHeight, offsetRow]);
|
15889
|
+
useEffect(function () {
|
15890
|
+
var container = containerRef.current;
|
15891
|
+
if (container) {
|
15892
|
+
container.addEventListener("scroll", handleScroll);
|
15893
|
+
}
|
15894
|
+
return function () {
|
15895
|
+
if (container) {
|
15896
|
+
container.removeEventListener("scroll", handleScroll);
|
15897
|
+
}
|
15898
|
+
};
|
15899
|
+
}, [handleScroll]);
|
15900
|
+
var handleChangeStartIndex = function handleChangeStartIndex(index) {
|
15901
|
+
setStartIndex(index);
|
15902
|
+
};
|
15903
|
+
var handleChangeEndIndex = function handleChangeEndIndex(index) {
|
15904
|
+
setEndIndex(index);
|
15905
|
+
};
|
15906
|
+
return {
|
15907
|
+
startIndex: startIndex,
|
15908
|
+
endIndex: endIndex,
|
15909
|
+
containerRef: containerRef,
|
15910
|
+
handleChangeStartIndex: handleChangeStartIndex,
|
15911
|
+
handleChangeEndIndex: handleChangeEndIndex
|
15912
|
+
};
|
15913
|
+
};
|
15914
|
+
|
15915
|
+
export { ACADEMY_DOMAIN, ACCESS_TOKEN, AcademyHeaders, AcademyList, AnswerCountSelector, ArticleCategorySelector, ArticleGroupView, BASE_URL, ChatContainer, ChatItemType, types as ChatTypes, CommonDialog, ConfirmDialog, index$1 as CoreHooks, CustomAsyncSelect, CustomCreatable, CustomPagination, CustomSelect, CustomSelectOption, DATE_MIN_VALUE, DATE_TIME_MIN_VALUE, DEFAULT_PAGING_RESPONSE, DefaultErrorMessage, EXAM_CHANNEL, EXAM_STUDENT_CHANNEL, index as Enums, ExamDetailView, ExamEvent, ExamResultV2, Header, InputText, LANGUAGES, Language, LayoutContext, Loading, Login, SignIn as LoginWithPassword, NotFound, PUSHER_CONFIG, QuestionCountSelector, Role, SUPER_ADMIN_BASE_URL, ScoreSelector, SubjectSelector, index$2 as Textbook, TextbookViewDetail as TextbookDetail, TextbookList, TheAcademyDropdown, TheLanguageDropdown, index$3 as Types, api, apiUpload, canAccess as canAccessRoute, diffFromNow, formatTime, getAcademyDomain, getAccessToken, getErrorMessage, getOrdinalSuffix, i18n, minutesToTimeSpan, setAlert, setLanguage, setLoading, setReFetchUserAcademies, setReadyRegisterPusher, setUser, store, times as timeUtils, toISOString, useAutoAcademyDomain, useCategorySelect, useChatContainer, useCheckExam, useCountDownTimer, useGoogleSignOut, useLanguage, useLoadMore, useLogin, usePusherConversation, useSubjectSelect, useSwitchAcademy, useVirtualizeList, utcToLocalTime };
|
15137
15916
|
//# sourceMappingURL=index.modern.js.map
|