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.js
CHANGED
@@ -24,11 +24,11 @@ var MenuItem = _interopDefault(require('@mui/material/MenuItem'));
|
|
24
24
|
var IconButton = _interopDefault(require('@mui/material/IconButton'));
|
25
25
|
var go = require('react-icons/go');
|
26
26
|
var reactToastify = require('react-toastify');
|
27
|
-
var io = require('react-icons/io');
|
28
27
|
var Select = require('react-select');
|
29
28
|
var Select__default = _interopDefault(Select);
|
30
29
|
var fa = require('react-icons/fa');
|
31
30
|
var pi = require('react-icons/pi');
|
31
|
+
var io = require('react-icons/io');
|
32
32
|
var _ = _interopDefault(require('lodash'));
|
33
33
|
var fa6 = require('react-icons/fa6');
|
34
34
|
var CreatableSelect = _interopDefault(require('react-select/creatable'));
|
@@ -98,12 +98,12 @@ var encodeParams = function encodeParams(params) {
|
|
98
98
|
Role["Admin"] = "Admin";
|
99
99
|
Role["AcademyAdmin"] = "AcademyAdmin";
|
100
100
|
})(exports.Role || (exports.Role = {}));
|
101
|
-
var Language;
|
102
101
|
(function (Language) {
|
103
102
|
Language["ko"] = "ko";
|
104
103
|
Language["en"] = "en";
|
105
|
-
})(Language || (Language = {}));
|
104
|
+
})(exports.Language || (exports.Language = {}));
|
106
105
|
var PrintHeaderClassName = "print-header";
|
106
|
+
var PrintTitleClassName = "print-title";
|
107
107
|
var PrintContentClassName = "print-content";
|
108
108
|
var PrintContainerClassName = "print-container";
|
109
109
|
|
@@ -145,7 +145,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
145
145
|
return target;
|
146
146
|
}
|
147
147
|
|
148
|
-
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"};
|
149
149
|
|
150
150
|
// A type of promise-like that resolves synchronously and supports only one observer
|
151
151
|
const _Pact = /*#__PURE__*/(function() {
|
@@ -920,7 +920,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
920
920
|
py: 2,
|
921
921
|
justifyContent: "center",
|
922
922
|
alignItems: "center"
|
923
|
-
}, language !== Language.en ? React__default.createElement(SloganFullLogoKo, {
|
923
|
+
}, language !== exports.Language.en ? React__default.createElement(SloganFullLogoKo, {
|
924
924
|
width: "300px"
|
925
925
|
}) : React__default.createElement(SloganFullLogoEn, {
|
926
926
|
width: "300px"
|
@@ -1027,8 +1027,9 @@ var useLanguage = function useLanguage(history) {
|
|
1027
1027
|
var search = window.location.search;
|
1028
1028
|
var searchParams = new URLSearchParams(search);
|
1029
1029
|
if (!languageItem) {
|
1030
|
+
var _navigator$language, _navigator$language$s;
|
1030
1031
|
var storedLanguage = getLanguage();
|
1031
|
-
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];
|
1032
1033
|
var defaultLanguageCode = storedLanguage || browserLanguage;
|
1033
1034
|
languageItem = LANGUAGES.find(function (i) {
|
1034
1035
|
return i.code === defaultLanguageCode;
|
@@ -1383,7 +1384,6 @@ var Loading = function Loading() {
|
|
1383
1384
|
var isLoading = reactRedux.useSelector(function (state) {
|
1384
1385
|
return state.common.isLoading;
|
1385
1386
|
});
|
1386
|
-
localStorage.setItem("LAST_TIME_REQUETST", moment().utc().format("YYYY-MM-DD HH:mm:ss"));
|
1387
1387
|
return isLoading ? React__default.createElement("div", {
|
1388
1388
|
style: loadingStyle
|
1389
1389
|
}, React__default.createElement("div", {
|
@@ -1860,7 +1860,7 @@ var student_status = "학생별 현황";
|
|
1860
1860
|
var user_manager = "사용자 목록";
|
1861
1861
|
var recent_exam_results = "최근 시험 결과";
|
1862
1862
|
var instructor_name = "강사이름";
|
1863
|
-
var
|
1863
|
+
var institute_name = "학원 이름";
|
1864
1864
|
var total_students = "총 학생수";
|
1865
1865
|
var total_class = "반 수";
|
1866
1866
|
var total_number_students = "총 학생수";
|
@@ -1892,10 +1892,11 @@ var yes = "예";
|
|
1892
1892
|
var no = "아니요";
|
1893
1893
|
var cancel = "취소";
|
1894
1894
|
var confirmation = "확인";
|
1895
|
-
var student_name = "
|
1895
|
+
var student_name = "학생 이름";
|
1896
1896
|
var full_pool_time = "전체풀이시간";
|
1897
1897
|
var number_question = "{{number}}번";
|
1898
1898
|
var number_answer = "{{number}}번";
|
1899
|
+
var answer_no = "{{number}}번";
|
1899
1900
|
var answer_rate = "정답률";
|
1900
1901
|
var seconds = "초";
|
1901
1902
|
var search_placeholder = "시험 이름으로 검색하기";
|
@@ -1909,14 +1910,15 @@ var correct_answer_for_each_student = "학생별 정답 여부";
|
|
1909
1910
|
var information_by_question = "문항별 정보";
|
1910
1911
|
var no_data = "데이터 없음";
|
1911
1912
|
var internet_connection_was_lost = "인터넷 연결이 끊어졌습니다";
|
1913
|
+
var internet_connection_is_back = "인터넷 연결이 다시 돌아왔습니다";
|
1912
1914
|
var problem = "문제";
|
1913
|
-
var number_problem = "{{number}}
|
1915
|
+
var number_problem = "문제 {{number}}";
|
1914
1916
|
var problems = "문제";
|
1915
1917
|
var problem_solving_time = "문제풀이 시간";
|
1916
1918
|
var minutes = "분";
|
1917
1919
|
var correct_rate = "정답률";
|
1918
1920
|
var title = "제목";
|
1919
|
-
var
|
1921
|
+
var exam_duration = "시험 시간";
|
1920
1922
|
var answer_count = "답변 수";
|
1921
1923
|
var question_count = "문제 갯수";
|
1922
1924
|
var multi_choice = "여러 개임";
|
@@ -1934,7 +1936,8 @@ var select_placeholder = "선택하다...";
|
|
1934
1936
|
var view_exam = "시험 보기";
|
1935
1937
|
var back = "뒤쪽에";
|
1936
1938
|
var edit = "편집하기";
|
1937
|
-
var
|
1939
|
+
var date_format_exam = "YYYY년 MM월";
|
1940
|
+
var date_format = "YYYY년 MM월 DD일";
|
1938
1941
|
var date_time_format = "YYYY년 MM월 DD일 HH:mm";
|
1939
1942
|
var date_time_format_12h = "YYYY-MM-DD HH:mm A";
|
1940
1943
|
var full_date_time_format = "YYYY년 MMMM월 DD일 HH:mm:ss";
|
@@ -2182,8 +2185,8 @@ var class_information = "수업정보";
|
|
2182
2185
|
var teachers = "교사";
|
2183
2186
|
var lessons = "수업";
|
2184
2187
|
var new_test = "새로운 시험";
|
2185
|
-
var
|
2186
|
-
var
|
2188
|
+
var manage_saved_exams = "저장된 시험 관리";
|
2189
|
+
var manage_textbook = "교과서 관리";
|
2187
2190
|
var my_question = "내 질문";
|
2188
2191
|
var update_class = "수업 업데이트";
|
2189
2192
|
var create_class = "수업 만들기";
|
@@ -2209,7 +2212,7 @@ var tricky_problems = "까다로웠던 문제";
|
|
2209
2212
|
var issues_vulnerable = "내가 취약한 문제";
|
2210
2213
|
var grades_by_area = "영역별 성적";
|
2211
2214
|
var problems_that_took_a_long_time = "시간이 오래 걸린 문제";
|
2212
|
-
var my_time = "
|
2215
|
+
var my_time = "내 시간";
|
2213
2216
|
var top_time = "상위권 시간";
|
2214
2217
|
var easy_problem = "쉬운 문제";
|
2215
2218
|
var trick_problem = "함정 문제";
|
@@ -2224,8 +2227,8 @@ var chosen = "정답";
|
|
2224
2227
|
var sign_in_with_your_google_account = "Google 계정으로 로그인";
|
2225
2228
|
var it_will_be_generated_automatically_if_not_provided = "제공되지 않으면 자동으로 생성됩니다";
|
2226
2229
|
var academy_not_found = "아카데미를 찾을 수 없습니다";
|
2227
|
-
var
|
2228
|
-
var
|
2230
|
+
var all_notice = "전체 공지";
|
2231
|
+
var institute_notice = "학원 공지";
|
2229
2232
|
var class_notice = "수업 공지";
|
2230
2233
|
var create_account_demo = "계정 데모 만들기";
|
2231
2234
|
var update_data_demo = "데이터 데모 업데이트";
|
@@ -2251,7 +2254,7 @@ var next = "다음";
|
|
2251
2254
|
var complete_processing = "완료 처리";
|
2252
2255
|
var creation_date = "생성 날짜";
|
2253
2256
|
var total_use = "총 사용량";
|
2254
|
-
var
|
2257
|
+
var duration = "지속";
|
2255
2258
|
var code_header = "암호";
|
2256
2259
|
var total_number_of_students_participating = "참여한 총 학생 수";
|
2257
2260
|
var create = "생성하기";
|
@@ -2471,6 +2474,33 @@ var full_name_is_required = "성명은 필수 항목입니다";
|
|
2471
2474
|
var email_is_required = "이메일은 필수입니다";
|
2472
2475
|
var not_found = "찾을 수 없음";
|
2473
2476
|
var enter_text_to_confirm_delete = "삭제를 확인하려면 \"{{text}}\" 를 입력하세요";
|
2477
|
+
var begin_exam = "시험 시작";
|
2478
|
+
var scheduled = "오늘 수업";
|
2479
|
+
var attended = "출석 완료";
|
2480
|
+
var today_classes = "오늘의 수업";
|
2481
|
+
var print_all = "전체 출력";
|
2482
|
+
var exam = "시험";
|
2483
|
+
var me = "나";
|
2484
|
+
var teacher_name = "선생님 성함";
|
2485
|
+
var class_schedule = "수업 시간표";
|
2486
|
+
var summary = "요약";
|
2487
|
+
var load_exam = "시험 로드";
|
2488
|
+
var exam_name = "시험 이름";
|
2489
|
+
var student_phone_number_header = "학생 전화번호";
|
2490
|
+
var parent_phone_number_header = "학부모 전화번호";
|
2491
|
+
var cases = "{{number}}건";
|
2492
|
+
var my_classes = "내 수업";
|
2493
|
+
var choose = "선택하다";
|
2494
|
+
var additional_duration = "추가 기간";
|
2495
|
+
var enter_textbook_name_to_search = "검색할 교재명을 입력하세요";
|
2496
|
+
var select_class_placeholder = "수업을 선택하세요...";
|
2497
|
+
var user_name = "유저 이름";
|
2498
|
+
var vulnerable_detail = "다른 학생들의 정답률은 높은데, 나는 정답을 맞추지 못한 문제들입니다.";
|
2499
|
+
var protracted_problem_detail = "정답 문제 중 풀이 시간을 비교합니다.";
|
2500
|
+
var number_of_correct_answers = "정답 수";
|
2501
|
+
var total_solve_time = "총 풀이 시간";
|
2502
|
+
var number_of_answer = "{{ number }} 개";
|
2503
|
+
var time_comparison = "시간 비교";
|
2474
2504
|
var lang_ko = {
|
2475
2505
|
problem_solving: problem_solving,
|
2476
2506
|
my_story: my_story,
|
@@ -2486,7 +2516,7 @@ var lang_ko = {
|
|
2486
2516
|
user_manager: user_manager,
|
2487
2517
|
recent_exam_results: recent_exam_results,
|
2488
2518
|
instructor_name: instructor_name,
|
2489
|
-
|
2519
|
+
institute_name: institute_name,
|
2490
2520
|
total_students: total_students,
|
2491
2521
|
total_class: total_class,
|
2492
2522
|
total_number_students: total_number_students,
|
@@ -2524,6 +2554,7 @@ var lang_ko = {
|
|
2524
2554
|
full_pool_time: full_pool_time,
|
2525
2555
|
number_question: number_question,
|
2526
2556
|
number_answer: number_answer,
|
2557
|
+
answer_no: answer_no,
|
2527
2558
|
answer_rate: answer_rate,
|
2528
2559
|
seconds: seconds,
|
2529
2560
|
search_placeholder: search_placeholder,
|
@@ -2537,6 +2568,7 @@ var lang_ko = {
|
|
2537
2568
|
information_by_question: information_by_question,
|
2538
2569
|
no_data: no_data,
|
2539
2570
|
internet_connection_was_lost: internet_connection_was_lost,
|
2571
|
+
internet_connection_is_back: internet_connection_is_back,
|
2540
2572
|
problem: problem,
|
2541
2573
|
number_problem: number_problem,
|
2542
2574
|
problems: problems,
|
@@ -2544,7 +2576,7 @@ var lang_ko = {
|
|
2544
2576
|
minutes: minutes,
|
2545
2577
|
correct_rate: correct_rate,
|
2546
2578
|
title: title,
|
2547
|
-
|
2579
|
+
exam_duration: exam_duration,
|
2548
2580
|
answer_count: answer_count,
|
2549
2581
|
question_count: question_count,
|
2550
2582
|
multi_choice: multi_choice,
|
@@ -2563,6 +2595,7 @@ var lang_ko = {
|
|
2563
2595
|
back: back,
|
2564
2596
|
edit: edit,
|
2565
2597
|
"delete": "삭제하기",
|
2598
|
+
date_format_exam: date_format_exam,
|
2566
2599
|
date_format: date_format,
|
2567
2600
|
date_time_format: date_time_format,
|
2568
2601
|
date_time_format_12h: date_time_format_12h,
|
@@ -2797,8 +2830,8 @@ var lang_ko = {
|
|
2797
2830
|
teachers: teachers,
|
2798
2831
|
lessons: lessons,
|
2799
2832
|
new_test: new_test,
|
2800
|
-
|
2801
|
-
|
2833
|
+
manage_saved_exams: manage_saved_exams,
|
2834
|
+
manage_textbook: manage_textbook,
|
2802
2835
|
my_question: my_question,
|
2803
2836
|
update_class: update_class,
|
2804
2837
|
create_class: create_class,
|
@@ -2839,8 +2872,8 @@ var lang_ko = {
|
|
2839
2872
|
sign_in_with_your_google_account: sign_in_with_your_google_account,
|
2840
2873
|
it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided,
|
2841
2874
|
academy_not_found: academy_not_found,
|
2842
|
-
|
2843
|
-
|
2875
|
+
all_notice: all_notice,
|
2876
|
+
institute_notice: institute_notice,
|
2844
2877
|
class_notice: class_notice,
|
2845
2878
|
create_account_demo: create_account_demo,
|
2846
2879
|
update_data_demo: update_data_demo,
|
@@ -2869,7 +2902,7 @@ var lang_ko = {
|
|
2869
2902
|
complete_processing: complete_processing,
|
2870
2903
|
creation_date: creation_date,
|
2871
2904
|
total_use: total_use,
|
2872
|
-
|
2905
|
+
duration: duration,
|
2873
2906
|
code_header: code_header,
|
2874
2907
|
total_number_of_students_participating: total_number_of_students_participating,
|
2875
2908
|
create: create,
|
@@ -3090,11 +3123,39 @@ var lang_ko = {
|
|
3090
3123
|
full_name_is_required: full_name_is_required,
|
3091
3124
|
email_is_required: email_is_required,
|
3092
3125
|
not_found: not_found,
|
3093
|
-
enter_text_to_confirm_delete: enter_text_to_confirm_delete
|
3126
|
+
enter_text_to_confirm_delete: enter_text_to_confirm_delete,
|
3127
|
+
begin_exam: begin_exam,
|
3128
|
+
scheduled: scheduled,
|
3129
|
+
attended: attended,
|
3130
|
+
today_classes: today_classes,
|
3131
|
+
print_all: print_all,
|
3132
|
+
exam: exam,
|
3133
|
+
me: me,
|
3134
|
+
teacher_name: teacher_name,
|
3135
|
+
class_schedule: class_schedule,
|
3136
|
+
summary: summary,
|
3137
|
+
load_exam: load_exam,
|
3138
|
+
exam_name: exam_name,
|
3139
|
+
student_phone_number_header: student_phone_number_header,
|
3140
|
+
parent_phone_number_header: parent_phone_number_header,
|
3141
|
+
cases: cases,
|
3142
|
+
my_classes: my_classes,
|
3143
|
+
choose: choose,
|
3144
|
+
additional_duration: additional_duration,
|
3145
|
+
enter_textbook_name_to_search: enter_textbook_name_to_search,
|
3146
|
+
"type_at_least_{number}_characters_to_search": "검색하려면 최소 {{ number }}자를 입력하세요",
|
3147
|
+
select_class_placeholder: select_class_placeholder,
|
3148
|
+
user_name: user_name,
|
3149
|
+
vulnerable_detail: vulnerable_detail,
|
3150
|
+
protracted_problem_detail: protracted_problem_detail,
|
3151
|
+
number_of_correct_answers: number_of_correct_answers,
|
3152
|
+
total_solve_time: total_solve_time,
|
3153
|
+
number_of_answer: number_of_answer,
|
3154
|
+
time_comparison: time_comparison
|
3094
3155
|
};
|
3095
3156
|
|
3096
3157
|
var problem_solving$1 = "Problem Solving";
|
3097
|
-
var my_story$1 = "
|
3158
|
+
var my_story$1 = "Exam History";
|
3098
3159
|
var search_find$1 = "Search and find";
|
3099
3160
|
var enter_test_code$1 = "Enter test code";
|
3100
3161
|
var login_success$1 = "Login Success";
|
@@ -3107,7 +3168,7 @@ var student_status$1 = "Student Status";
|
|
3107
3168
|
var user_manager$1 = "User Manager";
|
3108
3169
|
var recent_exam_results$1 = "Recent exam";
|
3109
3170
|
var instructor_name$1 = "Instructor name";
|
3110
|
-
var
|
3171
|
+
var institute_name$1 = "Institute name";
|
3111
3172
|
var total_students$1 = "Total students";
|
3112
3173
|
var total_class$1 = "Total Class";
|
3113
3174
|
var total_number_students$1 = "Total number of students";
|
@@ -3123,10 +3184,10 @@ var time_remaining$1 = "Time remaining";
|
|
3123
3184
|
var number_results$1 = "{{number}} Results";
|
3124
3185
|
var number_result$1 = "{{number}} Result";
|
3125
3186
|
var mins_mins_seconds_seconds$1 = "{{mins}}m {{seconds}}s";
|
3126
|
-
var mins_mins$1 = "{{mins}}
|
3187
|
+
var mins_mins$1 = "{{mins}} Minutes";
|
3127
3188
|
var class_name$1 = "Class name";
|
3128
3189
|
var create_new_exam$1 = "Create exam";
|
3129
|
-
var live_exam$1 = "Live
|
3190
|
+
var live_exam$1 = "Live Exam";
|
3130
3191
|
var there_are_no_recent_exams$1 = "There are no recent exams";
|
3131
3192
|
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?";
|
3132
3193
|
var here$1 = "here";
|
@@ -3143,6 +3204,7 @@ var student_name$1 = "Student name";
|
|
3143
3204
|
var full_pool_time$1 = "Full pool time";
|
3144
3205
|
var number_question$1 = "No.{{number}}";
|
3145
3206
|
var number_answer$1 = "No.{{number}}";
|
3207
|
+
var answer_no$1 = "Ans.{{number}}";
|
3146
3208
|
var answer_rate$1 = "Answer rate";
|
3147
3209
|
var seconds$1 = "s";
|
3148
3210
|
var search_placeholder$1 = "Search by exam name";
|
@@ -3155,7 +3217,8 @@ var question_time_for_each_student$1 = "Question time for each student";
|
|
3155
3217
|
var correct_answer_for_each_student$1 = "Correct answer for each student";
|
3156
3218
|
var information_by_question$1 = "Information by question";
|
3157
3219
|
var no_data$1 = "No data";
|
3158
|
-
var internet_connection_was_lost$1 = "
|
3220
|
+
var internet_connection_was_lost$1 = "The internet connection was lost";
|
3221
|
+
var internet_connection_is_back$1 = "The internet connection is back";
|
3159
3222
|
var problem$1 = "Problem";
|
3160
3223
|
var number_problem$1 = "No.{{number}}";
|
3161
3224
|
var problems$1 = "Problems";
|
@@ -3211,7 +3274,7 @@ var email$1 = "Email";
|
|
3211
3274
|
var is_paid$1 = "Is paid";
|
3212
3275
|
var payment_time$1 = "Payment time";
|
3213
3276
|
var payments$1 = "Payments";
|
3214
|
-
var
|
3277
|
+
var exam_duration$1 = "Exam Duration";
|
3215
3278
|
var answer_count$1 = "Answer count";
|
3216
3279
|
var question_count$1 = "Question count";
|
3217
3280
|
var multi_choice$1 = "Is multiple";
|
@@ -3220,8 +3283,9 @@ var view_exam$1 = "View exam";
|
|
3220
3283
|
var update_exam$1 = "Update exam";
|
3221
3284
|
var create_exam$1 = "Create exam";
|
3222
3285
|
var back$1 = "Back";
|
3223
|
-
var
|
3224
|
-
var
|
3286
|
+
var date_format_exam$1 = "MMMM YYYY";
|
3287
|
+
var date_format$1 = "MMM.D YYYY";
|
3288
|
+
var date_time_format$1 = "HH:mm MMM.D YYYY ";
|
3225
3289
|
var date_time_format_12h$1 = "MM-DD-YYYY HH:mm A";
|
3226
3290
|
var full_date_time_format$1 = "MMM Do YYYY HH:mm:ss";
|
3227
3291
|
var total_questions$1 = "Total questions";
|
@@ -3289,8 +3353,8 @@ var button$1 = {
|
|
3289
3353
|
close: "Close",
|
3290
3354
|
send: "Send"
|
3291
3355
|
};
|
3292
|
-
var question_and_answer$1 = "
|
3293
|
-
var problem_number_question$1 = "
|
3356
|
+
var question_and_answer$1 = "My Q&As";
|
3357
|
+
var problem_number_question$1 = "Question {{number}}";
|
3294
3358
|
var teacher_in_charge$1 = "Teacher In Charge";
|
3295
3359
|
var counselor$1 = "Counselor";
|
3296
3360
|
var new_question$1 = "New Question";
|
@@ -3305,7 +3369,7 @@ var no_academies_available$1 = "No academies available";
|
|
3305
3369
|
var not_allow_register$1 = "Not allow to register role";
|
3306
3370
|
var credentials_invalid$1 = "Credentials is invalid";
|
3307
3371
|
var role_is_invalid$1 = "Role is invalid";
|
3308
|
-
var today$1 = "
|
3372
|
+
var today$1 = "Today";
|
3309
3373
|
var user_is_disabled$1 = "User is disabled";
|
3310
3374
|
var cover_image$1 = "Cover image";
|
3311
3375
|
var notification$1 = "Notification";
|
@@ -3360,7 +3424,7 @@ var enter_subject_name_to_search$1 = "Enter subject name to search subjects";
|
|
3360
3424
|
var enter_textbook_title$1 = "Enter textbook title";
|
3361
3425
|
var chapter_name_placeholder$1 = "Enter chapter name";
|
3362
3426
|
var subchapter_name_placeholder$1 = "Enter subchapter name";
|
3363
|
-
var article_number$1 = "
|
3427
|
+
var article_number$1 = "Passage";
|
3364
3428
|
var question_count_format$1 = "No.{{number}}";
|
3365
3429
|
var select_category$1 = "Select category";
|
3366
3430
|
var update_textbook$1 = "Update textbook";
|
@@ -3374,14 +3438,14 @@ var add_new_chapter_to_textbook$1 = "Add new chapter to the textbook";
|
|
3374
3438
|
var add_new_subchapter_to_parent_chapter$1 = "Add new subchapter to the parent chapter ({{ chapterName }})";
|
3375
3439
|
var add$1 = "Add";
|
3376
3440
|
var add_new_article_to_chapter$1 = "Add new article to the chapter ({{ chapterName }})";
|
3377
|
-
var score_format$1 = "{{score}}
|
3441
|
+
var score_format$1 = "{{score}} Points";
|
3378
3442
|
var round$1 = "{{number}} round";
|
3379
3443
|
var number_grade$1 = "Grade {{number}}";
|
3380
3444
|
var print$1 = "Print";
|
3381
3445
|
var school$1 = "School";
|
3382
|
-
var grade$1 = "
|
3383
|
-
var student_phone_number$1 = "Student
|
3384
|
-
var parent_phone_number$1 = "Parent
|
3446
|
+
var grade$1 = "Year";
|
3447
|
+
var student_phone_number$1 = "Student Number";
|
3448
|
+
var parent_phone_number$1 = "Parent Number";
|
3385
3449
|
var update_textbook_title$1 = "Update textbook title";
|
3386
3450
|
var invalid_weekly_day_time$1 = "Invalid weekly day time";
|
3387
3451
|
var no_image$1 = "No image";
|
@@ -3400,7 +3464,7 @@ var switch_academy$1 = "Switch Academy";
|
|
3400
3464
|
var there_are_no_lessons_this_week$1 = "There are no lessons this week";
|
3401
3465
|
var today_lessons$1 = "Today lessons";
|
3402
3466
|
var update_message$1 = "Update message";
|
3403
|
-
var attachment$1 = "
|
3467
|
+
var attachment$1 = "Add File";
|
3404
3468
|
var confirm_delete_message$1 = "Are you sure to delete this message?";
|
3405
3469
|
var download$1 = "Download";
|
3406
3470
|
var full_exam$1 = "Full exam";
|
@@ -3426,8 +3490,8 @@ var my_problem_solving_order$1 = "My problem solving order";
|
|
3426
3490
|
var top_rankings_problem_solving_order$1 = "Top rankings problem solving order";
|
3427
3491
|
var comparison_of_top_rankings_and_problem_solving_order$1 = "Comparison of top rankings and problem-solving order";
|
3428
3492
|
var my_answers$1 = "My answers";
|
3429
|
-
var request_for_consultation$1 = "
|
3430
|
-
var ask_a_question_with_a_problem$1 = "Ask
|
3493
|
+
var request_for_consultation$1 = "Consultation";
|
3494
|
+
var ask_a_question_with_a_problem$1 = "Ask with Question ";
|
3431
3495
|
var live$1 = "live";
|
3432
3496
|
var user_email$1 = "User email";
|
3433
3497
|
var user_academy$1 = {
|
@@ -3455,9 +3519,9 @@ var lessons$1 = "Lessons";
|
|
3455
3519
|
var update_class$1 = "Update class";
|
3456
3520
|
var create_class$1 = "Create class";
|
3457
3521
|
var new_test$1 = "New Test";
|
3458
|
-
var
|
3459
|
-
var
|
3460
|
-
var my_question$1 = "My
|
3522
|
+
var manage_saved_exams$1 = "Manage saved exams";
|
3523
|
+
var manage_textbook$1 = "Manage Textbook";
|
3524
|
+
var my_question$1 = "My Q&As";
|
3461
3525
|
var problem_number$1 = "Problem number";
|
3462
3526
|
var solve_time$1 = "Solve time";
|
3463
3527
|
var comparison_of_top_rankings$1 = "Comparison of top rankings";
|
@@ -3494,8 +3558,8 @@ var chosen$1 = "Answer";
|
|
3494
3558
|
var sign_in_with_your_google_account$1 = "Sign in with your Google Account";
|
3495
3559
|
var it_will_be_generated_automatically_if_not_provided$1 = "It will be generated automatically if not provided";
|
3496
3560
|
var academy_not_found$1 = "Academy not found";
|
3497
|
-
var
|
3498
|
-
var
|
3561
|
+
var all_notice$1 = "All notice";
|
3562
|
+
var institute_notice$1 = "Institute Notice";
|
3499
3563
|
var class_notice$1 = "Class Notice";
|
3500
3564
|
var create_account_demo$1 = "Create Account Demo";
|
3501
3565
|
var update_data_demo$1 = "Update Data Demo";
|
@@ -3521,7 +3585,7 @@ var next$1 = "Next";
|
|
3521
3585
|
var complete_processing$1 = "Complete processing";
|
3522
3586
|
var creation_date$1 = "Creation date";
|
3523
3587
|
var total_use$1 = "Total use";
|
3524
|
-
var
|
3588
|
+
var duration$1 = "Duration";
|
3525
3589
|
var code_header$1 = "Code";
|
3526
3590
|
var total_number_of_students_participating$1 = "Total number of students participating";
|
3527
3591
|
var create$1 = "Create";
|
@@ -3537,7 +3601,7 @@ var time_heatmap_for_each_problem$1 = "Time heatmap for each problem";
|
|
3537
3601
|
var learn_more$1 = "Learn more";
|
3538
3602
|
var total_number_of_problems$1 = "Total number of problems";
|
3539
3603
|
var time_limit$1 = "time_limit";
|
3540
|
-
var add_questions$1 = "Add
|
3604
|
+
var add_questions$1 = "Add Passage";
|
3541
3605
|
var start_exam$1 = "Start Exam";
|
3542
3606
|
var copy_test_code$1 = "Copy Test Code";
|
3543
3607
|
var student_has_joined$1 = "Student has joined:";
|
@@ -3718,6 +3782,33 @@ var full_name_is_required$1 = "Full name is required";
|
|
3718
3782
|
var email_is_required$1 = "Email is required";
|
3719
3783
|
var not_found$1 = "Not found";
|
3720
3784
|
var enter_text_to_confirm_delete$1 = "Enter \"{{text}}\" to confirm delete";
|
3785
|
+
var begin_exam$1 = "Begin Exam";
|
3786
|
+
var scheduled$1 = "Scheduled";
|
3787
|
+
var attended$1 = "Attended";
|
3788
|
+
var today_classes$1 = "Today's Classes";
|
3789
|
+
var print_all$1 = "Print All";
|
3790
|
+
var exam$1 = "Exam";
|
3791
|
+
var me$1 = "Me";
|
3792
|
+
var teacher_name$1 = "Teacher Name";
|
3793
|
+
var class_schedule$1 = "Class Schedule";
|
3794
|
+
var summary$1 = "Summary";
|
3795
|
+
var load_exam$1 = "Load Exam";
|
3796
|
+
var exam_name$1 = "Exam Name";
|
3797
|
+
var student_phone_number_header$1 = "Stud. Number";
|
3798
|
+
var parent_phone_number_header$1 = "Prnt. Number";
|
3799
|
+
var cases$1 = "{{number}} Results";
|
3800
|
+
var my_classes$1 = "My Classes";
|
3801
|
+
var choose$1 = "Choose";
|
3802
|
+
var additional_duration$1 = "Additional duration";
|
3803
|
+
var enter_textbook_name_to_search$1 = "Enter textbook name to search";
|
3804
|
+
var select_class_placeholder$1 = "Select class...";
|
3805
|
+
var user_name$1 = "Username";
|
3806
|
+
var vulnerable_detail$1 = "Other students had a high percentage of correct answers, but I could not answer these questions correctly.";
|
3807
|
+
var protracted_problem_detail$1 = "Compare the solution time among the correct answers.";
|
3808
|
+
var number_of_correct_answers$1 = "Number of correct answers";
|
3809
|
+
var total_solve_time$1 = "Total solve time";
|
3810
|
+
var number_of_answer$1 = "{{ number }}";
|
3811
|
+
var time_comparison$1 = "Time comparison";
|
3721
3812
|
var lang_en = {
|
3722
3813
|
problem_solving: problem_solving$1,
|
3723
3814
|
my_story: my_story$1,
|
@@ -3733,7 +3824,7 @@ var lang_en = {
|
|
3733
3824
|
user_manager: user_manager$1,
|
3734
3825
|
recent_exam_results: recent_exam_results$1,
|
3735
3826
|
instructor_name: instructor_name$1,
|
3736
|
-
|
3827
|
+
institute_name: institute_name$1,
|
3737
3828
|
total_students: total_students$1,
|
3738
3829
|
total_class: total_class$1,
|
3739
3830
|
total_number_students: total_number_students$1,
|
@@ -3771,6 +3862,7 @@ var lang_en = {
|
|
3771
3862
|
full_pool_time: full_pool_time$1,
|
3772
3863
|
number_question: number_question$1,
|
3773
3864
|
number_answer: number_answer$1,
|
3865
|
+
answer_no: answer_no$1,
|
3774
3866
|
answer_rate: answer_rate$1,
|
3775
3867
|
seconds: seconds$1,
|
3776
3868
|
search_placeholder: search_placeholder$1,
|
@@ -3784,6 +3876,7 @@ var lang_en = {
|
|
3784
3876
|
information_by_question: information_by_question$1,
|
3785
3877
|
no_data: no_data$1,
|
3786
3878
|
internet_connection_was_lost: internet_connection_was_lost$1,
|
3879
|
+
internet_connection_is_back: internet_connection_is_back$1,
|
3787
3880
|
problem: problem$1,
|
3788
3881
|
number_problem: number_problem$1,
|
3789
3882
|
problems: problems$1,
|
@@ -3840,7 +3933,7 @@ var lang_en = {
|
|
3840
3933
|
is_paid: is_paid$1,
|
3841
3934
|
payment_time: payment_time$1,
|
3842
3935
|
payments: payments$1,
|
3843
|
-
|
3936
|
+
exam_duration: exam_duration$1,
|
3844
3937
|
answer_count: answer_count$1,
|
3845
3938
|
question_count: question_count$1,
|
3846
3939
|
multi_choice: multi_choice$1,
|
@@ -3849,6 +3942,7 @@ var lang_en = {
|
|
3849
3942
|
update_exam: update_exam$1,
|
3850
3943
|
create_exam: create_exam$1,
|
3851
3944
|
back: back$1,
|
3945
|
+
date_format_exam: date_format_exam$1,
|
3852
3946
|
date_format: date_format$1,
|
3853
3947
|
date_time_format: date_time_format$1,
|
3854
3948
|
date_time_format_12h: date_time_format_12h$1,
|
@@ -4070,8 +4164,8 @@ var lang_en = {
|
|
4070
4164
|
update_class: update_class$1,
|
4071
4165
|
create_class: create_class$1,
|
4072
4166
|
new_test: new_test$1,
|
4073
|
-
|
4074
|
-
|
4167
|
+
manage_saved_exams: manage_saved_exams$1,
|
4168
|
+
manage_textbook: manage_textbook$1,
|
4075
4169
|
my_question: my_question$1,
|
4076
4170
|
problem_number: problem_number$1,
|
4077
4171
|
solve_time: solve_time$1,
|
@@ -4109,8 +4203,8 @@ var lang_en = {
|
|
4109
4203
|
sign_in_with_your_google_account: sign_in_with_your_google_account$1,
|
4110
4204
|
it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided$1,
|
4111
4205
|
academy_not_found: academy_not_found$1,
|
4112
|
-
|
4113
|
-
|
4206
|
+
all_notice: all_notice$1,
|
4207
|
+
institute_notice: institute_notice$1,
|
4114
4208
|
class_notice: class_notice$1,
|
4115
4209
|
create_account_demo: create_account_demo$1,
|
4116
4210
|
update_data_demo: update_data_demo$1,
|
@@ -4139,7 +4233,7 @@ var lang_en = {
|
|
4139
4233
|
complete_processing: complete_processing$1,
|
4140
4234
|
creation_date: creation_date$1,
|
4141
4235
|
total_use: total_use$1,
|
4142
|
-
|
4236
|
+
duration: duration$1,
|
4143
4237
|
code_header: code_header$1,
|
4144
4238
|
total_number_of_students_participating: total_number_of_students_participating$1,
|
4145
4239
|
create: create$1,
|
@@ -4337,7 +4431,35 @@ var lang_en = {
|
|
4337
4431
|
full_name_is_required: full_name_is_required$1,
|
4338
4432
|
email_is_required: email_is_required$1,
|
4339
4433
|
not_found: not_found$1,
|
4340
|
-
enter_text_to_confirm_delete: enter_text_to_confirm_delete$1
|
4434
|
+
enter_text_to_confirm_delete: enter_text_to_confirm_delete$1,
|
4435
|
+
begin_exam: begin_exam$1,
|
4436
|
+
scheduled: scheduled$1,
|
4437
|
+
attended: attended$1,
|
4438
|
+
today_classes: today_classes$1,
|
4439
|
+
print_all: print_all$1,
|
4440
|
+
exam: exam$1,
|
4441
|
+
me: me$1,
|
4442
|
+
teacher_name: teacher_name$1,
|
4443
|
+
class_schedule: class_schedule$1,
|
4444
|
+
summary: summary$1,
|
4445
|
+
load_exam: load_exam$1,
|
4446
|
+
exam_name: exam_name$1,
|
4447
|
+
student_phone_number_header: student_phone_number_header$1,
|
4448
|
+
parent_phone_number_header: parent_phone_number_header$1,
|
4449
|
+
cases: cases$1,
|
4450
|
+
my_classes: my_classes$1,
|
4451
|
+
choose: choose$1,
|
4452
|
+
additional_duration: additional_duration$1,
|
4453
|
+
enter_textbook_name_to_search: enter_textbook_name_to_search$1,
|
4454
|
+
"type_at_least_{number}_characters_to_search": "Type at least {{ number }} characters to search",
|
4455
|
+
select_class_placeholder: select_class_placeholder$1,
|
4456
|
+
user_name: user_name$1,
|
4457
|
+
vulnerable_detail: vulnerable_detail$1,
|
4458
|
+
protracted_problem_detail: protracted_problem_detail$1,
|
4459
|
+
number_of_correct_answers: number_of_correct_answers$1,
|
4460
|
+
total_solve_time: total_solve_time$1,
|
4461
|
+
number_of_answer: number_of_answer$1,
|
4462
|
+
time_comparison: time_comparison$1
|
4341
4463
|
};
|
4342
4464
|
|
4343
4465
|
i18n.use(reactI18next.initReactI18next).init({
|
@@ -4526,6 +4648,36 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4526
4648
|
return Promise.reject(e);
|
4527
4649
|
}
|
4528
4650
|
};
|
4651
|
+
var handleLogOutAcademy = function handleLogOutAcademy(selectedAcademy, callback) {
|
4652
|
+
try {
|
4653
|
+
var _temp7 = function _temp7() {
|
4654
|
+
dispatch(setLoading(false));
|
4655
|
+
callback();
|
4656
|
+
};
|
4657
|
+
dispatch(setLoading(true));
|
4658
|
+
var academyDomain = selectedAcademy ? selectedAcademy.domain : undefined;
|
4659
|
+
var _temp6 = _catch(function () {
|
4660
|
+
return Promise.resolve(switchAcademy(0)).then(function (res) {
|
4661
|
+
var data = res.data;
|
4662
|
+
var requestBody = {
|
4663
|
+
accessToken: data.accessToken,
|
4664
|
+
email: user.email,
|
4665
|
+
academyId: 0,
|
4666
|
+
role: role
|
4667
|
+
};
|
4668
|
+
academyDomain && localStorage.setItem(ACADEMY_DOMAIN, academyDomain);
|
4669
|
+
!academyDomain && localStorage.removeItem(ACADEMY_DOMAIN);
|
4670
|
+
return Promise.resolve(handleLoginAccessToken(requestBody, false, user.academyDomain ? academyDomain : undefined)).then(function () {});
|
4671
|
+
});
|
4672
|
+
}, function (error) {
|
4673
|
+
academyDomain && localStorage.removeItem(ACADEMY_DOMAIN);
|
4674
|
+
reactToastify.toast.error(getErrorMessage(t, error));
|
4675
|
+
});
|
4676
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6));
|
4677
|
+
} catch (e) {
|
4678
|
+
return Promise.reject(e);
|
4679
|
+
}
|
4680
|
+
};
|
4529
4681
|
React.useEffect(function () {
|
4530
4682
|
getAcademies();
|
4531
4683
|
}, [user === null || user === void 0 ? void 0 : user.academyDomain, user === null || user === void 0 ? void 0 : user.email]);
|
@@ -4543,7 +4695,8 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4543
4695
|
dropdownOpen: dropdownOpen,
|
4544
4696
|
academyList: academyList,
|
4545
4697
|
toggleDropdown: toggleDropdown,
|
4546
|
-
handleSwitchAcademy: handleSwitchAcademy
|
4698
|
+
handleSwitchAcademy: handleSwitchAcademy,
|
4699
|
+
handleLogOutAcademy: handleLogOutAcademy
|
4547
4700
|
};
|
4548
4701
|
};
|
4549
4702
|
|
@@ -4551,23 +4704,25 @@ var MenuItemCustom = material.styled(MenuItem)(function () {
|
|
4551
4704
|
return {
|
4552
4705
|
'&.Mui-selected': {
|
4553
4706
|
backgroundColor: styles.light
|
4554
|
-
}
|
4707
|
+
},
|
4708
|
+
padding: "12px 8px"
|
4555
4709
|
};
|
4556
4710
|
});
|
4557
4711
|
var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
4558
|
-
var _user$roles
|
4712
|
+
var _user$roles;
|
4559
4713
|
var role = _ref.role,
|
4560
4714
|
history = _ref.history,
|
4561
4715
|
homeAcademyUrl = _ref.homeAcademyUrl,
|
4562
4716
|
homeUrl = _ref.homeUrl,
|
4563
|
-
|
4564
|
-
|
4717
|
+
hideAcademyName = _ref.hideAcademyName,
|
4718
|
+
onSignOut = _ref.onSignOut;
|
4565
4719
|
var theme = material.useTheme();
|
4566
4720
|
var isLargerThanLg = material.useMediaQuery(theme.breakpoints.up("lg"));
|
4567
4721
|
var _useSwitchAcademy = useSwitchAcademy(role, history, homeAcademyUrl, homeUrl),
|
4568
4722
|
academyList = _useSwitchAcademy.academyList,
|
4569
4723
|
handleSwitchAcademy = _useSwitchAcademy.handleSwitchAcademy,
|
4570
|
-
selectedAcademy = _useSwitchAcademy.selectedAcademy
|
4724
|
+
selectedAcademy = _useSwitchAcademy.selectedAcademy,
|
4725
|
+
handleLogOutAcademy = _useSwitchAcademy.handleLogOutAcademy;
|
4571
4726
|
var user = reactRedux.useSelector(function (state) {
|
4572
4727
|
var _state$common;
|
4573
4728
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
@@ -4589,8 +4744,6 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4589
4744
|
handleClose();
|
4590
4745
|
handleSwitchAcademy(data);
|
4591
4746
|
};
|
4592
|
-
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();
|
4593
|
-
if (!academyList.length) return React__default.createElement(React.Fragment, null);
|
4594
4747
|
var popoverStyle = {
|
4595
4748
|
mx: 1,
|
4596
4749
|
bgcolor: open ? "action.selected" : undefined
|
@@ -4611,7 +4764,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4611
4764
|
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.image ? React__default.createElement("img", {
|
4612
4765
|
src: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.image,
|
4613
4766
|
alt: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.name
|
4614
|
-
}) : React__default.createElement("span", null
|
4767
|
+
}) : React__default.createElement("span", null)), isLargerThanLg && React__default.createElement(material.Grid, {
|
4615
4768
|
item: true,
|
4616
4769
|
xs: 0,
|
4617
4770
|
lg: 8
|
@@ -4623,16 +4776,40 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4623
4776
|
display: "flex",
|
4624
4777
|
alignItems: "center"
|
4625
4778
|
}
|
4626
|
-
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.name ? React__default.createElement(material.
|
4779
|
+
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.name ? React__default.createElement(material.Stack, {
|
4780
|
+
flexDirection: "column",
|
4781
|
+
gap: "2px"
|
4782
|
+
}, React__default.createElement(material.Typography, {
|
4627
4783
|
textAlign: "start",
|
4628
4784
|
className: "" + styles["line-clamp"],
|
4629
4785
|
sx: {
|
4630
4786
|
fontSize: 14,
|
4631
|
-
fontWeight:
|
4787
|
+
fontWeight: 900,
|
4632
4788
|
lineHeight: '1.5em',
|
4633
4789
|
color: styles.gray_900
|
4634
4790
|
}
|
4635
|
-
},
|
4791
|
+
}, user === null || user === void 0 ? void 0 : user.fullName), React__default.createElement(material.Typography, {
|
4792
|
+
textAlign: "start",
|
4793
|
+
className: "" + styles["line-clamp"],
|
4794
|
+
sx: {
|
4795
|
+
fontSize: 14,
|
4796
|
+
fontWeight: 500,
|
4797
|
+
lineHeight: '1.5em',
|
4798
|
+
color: styles.gray_500
|
4799
|
+
}
|
4800
|
+
}, selectedAcademy.name)) : React__default.createElement(material.Stack, {
|
4801
|
+
flexDirection: "column",
|
4802
|
+
gap: "2px"
|
4803
|
+
}, React__default.createElement(material.Typography, {
|
4804
|
+
textAlign: "start",
|
4805
|
+
className: "" + styles["line-clamp"],
|
4806
|
+
sx: {
|
4807
|
+
fontSize: 14,
|
4808
|
+
fontWeight: 900,
|
4809
|
+
lineHeight: '1.5em',
|
4810
|
+
color: styles.gray_900
|
4811
|
+
}
|
4812
|
+
}), React__default.createElement(material.Typography, {
|
4636
4813
|
textAlign: "start",
|
4637
4814
|
className: "" + styles["line-clamp"],
|
4638
4815
|
sx: {
|
@@ -4641,7 +4818,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4641
4818
|
lineHeight: '1.5em',
|
4642
4819
|
color: styles.gray_500
|
4643
4820
|
}
|
4644
|
-
}, t("no_academy_selected")))), React__default.createElement(material.Grid, {
|
4821
|
+
}, t("no_academy_selected"))))), React__default.createElement(material.Grid, {
|
4645
4822
|
item: true,
|
4646
4823
|
xs: 6,
|
4647
4824
|
lg: 2,
|
@@ -4663,6 +4840,11 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4663
4840
|
open: !!open,
|
4664
4841
|
anchorEl: open,
|
4665
4842
|
onClose: handleClose,
|
4843
|
+
sx: {
|
4844
|
+
"& .MuiPopover-paper": {
|
4845
|
+
padding: "8px !important"
|
4846
|
+
}
|
4847
|
+
},
|
4666
4848
|
anchorOrigin: {
|
4667
4849
|
vertical: "bottom",
|
4668
4850
|
horizontal: "right"
|
@@ -4688,25 +4870,31 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4688
4870
|
}, React__default.createElement(material.MenuList, {
|
4689
4871
|
sx: {
|
4690
4872
|
maxHeight: 240,
|
4691
|
-
overflowY: "auto"
|
4873
|
+
overflowY: "auto",
|
4874
|
+
padding: 0
|
4692
4875
|
}
|
4693
4876
|
}, academyList.map(function (option) {
|
4694
|
-
var _option$name$charAt;
|
4695
4877
|
return React__default.createElement(MenuItemCustom, {
|
4696
4878
|
key: option.id,
|
4697
4879
|
selected: option.id === (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id),
|
4698
4880
|
sx: {
|
4699
4881
|
whiteSpace: "wrap",
|
4700
|
-
borderRadius: "6px"
|
4882
|
+
borderRadius: "6px",
|
4883
|
+
display: "flex",
|
4884
|
+
gap: "8px"
|
4701
4885
|
},
|
4702
4886
|
onClick: function onClick() {
|
4703
4887
|
return option.id !== (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id) && handleChangeAcademy(option);
|
4704
4888
|
}
|
4705
4889
|
}, React__default.createElement(material.Stack, {
|
4706
4890
|
flexDirection: "row",
|
4707
|
-
|
4891
|
+
justifyContent: "space-between",
|
4892
|
+
alignItems: "center",
|
4708
4893
|
position: "relative",
|
4709
4894
|
width: "100%"
|
4895
|
+
}, React__default.createElement(material.Stack, {
|
4896
|
+
flexDirection: "row",
|
4897
|
+
gap: "12px"
|
4710
4898
|
}, React__default.createElement(material.Stack, {
|
4711
4899
|
className: styles["image-academy"] + " " + styles["image-academy--item"],
|
4712
4900
|
minWidth: "40px"
|
@@ -4714,7 +4902,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4714
4902
|
component: "img",
|
4715
4903
|
alt: option.name,
|
4716
4904
|
src: option.image
|
4717
|
-
}) : React__default.createElement("span", null
|
4905
|
+
}) : React__default.createElement("span", null)), React__default.createElement(Box, {
|
4718
4906
|
sx: {
|
4719
4907
|
position: "relative",
|
4720
4908
|
display: "flex",
|
@@ -4728,8 +4916,20 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4728
4916
|
lineHeight: '1.5em',
|
4729
4917
|
fontWeight: 600
|
4730
4918
|
}
|
4731
|
-
}, option.name))))
|
4732
|
-
|
4919
|
+
}, option.name))), option.id === (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id) && React__default.createElement("div", {
|
4920
|
+
onClick: function onClick() {
|
4921
|
+
return handleLogOutAcademy(selectedAcademy, handleClose);
|
4922
|
+
}
|
4923
|
+
}, React__default.createElement(io5.IoCloseCircle, {
|
4924
|
+
size: 18,
|
4925
|
+
color: styles.dark
|
4926
|
+
}))));
|
4927
|
+
})), React__default.createElement(material.Stack, {
|
4928
|
+
sx: {
|
4929
|
+
borderTop: "1px solid " + styles.gray_100,
|
4930
|
+
my: "8px"
|
4931
|
+
}
|
4932
|
+
}), React__default.createElement(MenuItemCustom, {
|
4733
4933
|
sx: {
|
4734
4934
|
whiteSpace: "wrap",
|
4735
4935
|
borderRadius: "6px"
|
@@ -4743,16 +4943,16 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4743
4943
|
alignItems: "center",
|
4744
4944
|
className: "" + styles["userImg"],
|
4745
4945
|
onClick: onSignOut
|
4746
|
-
}, React__default.createElement(
|
4747
|
-
size:
|
4748
|
-
color:
|
4946
|
+
}, React__default.createElement(io5.IoLogOut, {
|
4947
|
+
size: 18,
|
4948
|
+
color: styles.less_dark
|
4749
4949
|
}), React__default.createElement(material.Typography, {
|
4750
4950
|
sx: {
|
4751
4951
|
typography: "body2",
|
4752
|
-
p: "8px",
|
4753
4952
|
borderRadius: "4px",
|
4754
4953
|
fontSize: 14,
|
4755
|
-
fontWeight: 700
|
4954
|
+
fontWeight: 700,
|
4955
|
+
color: styles.less_dark
|
4756
4956
|
}
|
4757
4957
|
}, t("logout"))))));
|
4758
4958
|
};
|
@@ -4826,6 +5026,7 @@ var customStyles = {
|
|
4826
5026
|
|
4827
5027
|
var DropdownIndicator = function DropdownIndicator(props) {
|
4828
5028
|
return React__default.createElement(Select.components.DropdownIndicator, Object.assign({}, props), React__default.createElement(fa.FaCaretDown, {
|
5029
|
+
size: 20,
|
4829
5030
|
color: styles.darker
|
4830
5031
|
}));
|
4831
5032
|
};
|
@@ -4964,6 +5165,7 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4964
5165
|
return React__default.createElement(material.Stack, null, React__default.createElement(material.Stack, {
|
4965
5166
|
display: "flex",
|
4966
5167
|
gap: "4px",
|
5168
|
+
justifyItems: "center",
|
4967
5169
|
flexDirection: "column"
|
4968
5170
|
}, React__default.createElement("div", {
|
4969
5171
|
style: {
|
@@ -4974,7 +5176,9 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4974
5176
|
sx: {
|
4975
5177
|
fontWeight: 700,
|
4976
5178
|
fontSize: "14px",
|
4977
|
-
color: styles.
|
5179
|
+
color: styles.less_dark,
|
5180
|
+
display: 'flex',
|
5181
|
+
justifyContent: "center"
|
4978
5182
|
}
|
4979
5183
|
}, t("edit"))), React__default.createElement(material.Stack, {
|
4980
5184
|
border: "1px solid #E4E7EC"
|
@@ -4987,7 +5191,9 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4987
5191
|
sx: {
|
4988
5192
|
fontWeight: 700,
|
4989
5193
|
fontSize: "14px",
|
4990
|
-
color: styles.
|
5194
|
+
color: styles.less_dark,
|
5195
|
+
display: 'flex',
|
5196
|
+
justifyContent: "center"
|
4991
5197
|
}
|
4992
5198
|
}, t("delete")))));
|
4993
5199
|
};
|
@@ -5026,13 +5232,14 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5026
5232
|
className: " " + styles$1["name-sender"],
|
5027
5233
|
display: "flex",
|
5028
5234
|
alignItems: "center",
|
5235
|
+
justifyContent: "end",
|
5029
5236
|
flexDirection: "row"
|
5030
5237
|
}, React__default.createElement(iconPersonNoActive, null), React__default.createElement(material.Typography, {
|
5031
5238
|
fontWeight: 700,
|
5032
5239
|
fontSize: 14,
|
5033
5240
|
padding: "4px",
|
5034
5241
|
lineHeight: "16.71px",
|
5035
|
-
color: styles.
|
5242
|
+
color: styles.gray_700
|
5036
5243
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName)), React__default.createElement(material.Stack, {
|
5037
5244
|
display: "flex",
|
5038
5245
|
flexDirection: "row",
|
@@ -5065,11 +5272,7 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5065
5272
|
placement: "top"
|
5066
5273
|
}, React__default.createElement("div", {
|
5067
5274
|
onClick: handleOpenTooltip
|
5068
|
-
}, React__default.createElement(iconMore, null))))), contentType ? React__default.createElement(
|
5069
|
-
borderRadius: "6px",
|
5070
|
-
padding: "12px",
|
5071
|
-
bgcolor: styles.darker
|
5072
|
-
}, React__default.createElement("img", {
|
5275
|
+
}, React__default.createElement(iconMore, null))))), contentType ? React__default.createElement("img", {
|
5073
5276
|
onClick: toggleImageDialog,
|
5074
5277
|
src: content,
|
5075
5278
|
style: {
|
@@ -5077,17 +5280,21 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5077
5280
|
position: "relative",
|
5078
5281
|
objectFit: "contain"
|
5079
5282
|
}
|
5080
|
-
})
|
5283
|
+
}) : React__default.createElement("div", {
|
5081
5284
|
className: styles$1["wrap-content"] + " " + styles$1["content-chat-receiver"],
|
5082
|
-
|
5083
|
-
"float": "inline-end"
|
5084
|
-
|
5085
|
-
|
5285
|
+
style: {
|
5286
|
+
"float": "inline-end",
|
5287
|
+
maxWidth: 400,
|
5288
|
+
background: styles.less_dark
|
5289
|
+
}
|
5086
5290
|
}, React__default.createElement(material.Typography, {
|
5087
5291
|
fontWeight: 500,
|
5088
5292
|
fontSize: "14px",
|
5089
5293
|
lineHeight: "16.71px",
|
5090
|
-
color: "#
|
5294
|
+
color: "#fff",
|
5295
|
+
sx: {
|
5296
|
+
wordBreak: "break-word"
|
5297
|
+
}
|
5091
5298
|
}, content))))));
|
5092
5299
|
};
|
5093
5300
|
|
@@ -5122,33 +5329,29 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
5122
5329
|
fontWeight: 500,
|
5123
5330
|
fontSize: 14,
|
5124
5331
|
lineHeight: "16.71px",
|
5125
|
-
color: styles.
|
5126
|
-
}, t("
|
5332
|
+
color: styles.gray_700
|
5333
|
+
}, t("teacher")), React__default.createElement(material.Typography, {
|
5127
5334
|
fontWeight: 700,
|
5128
5335
|
fontSize: 14,
|
5129
5336
|
lineHeight: "16.71px",
|
5130
|
-
color: styles.
|
5337
|
+
color: styles.gray_700
|
5131
5338
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName)) : React__default.createElement(React.Fragment, null, React__default.createElement(material.Typography, {
|
5132
5339
|
fontWeight: 700,
|
5133
5340
|
fontSize: 14,
|
5134
5341
|
lineHeight: "16.71px",
|
5135
|
-
color: styles.
|
5342
|
+
color: styles.gray_700
|
5136
5343
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName), React__default.createElement(material.Typography, {
|
5137
5344
|
fontWeight: 500,
|
5138
5345
|
fontSize: 14,
|
5139
5346
|
lineHeight: "16.71px",
|
5140
|
-
color: styles.
|
5347
|
+
color: styles.gray_700
|
5141
5348
|
}, t("student")))), React__default.createElement(material.Box, {
|
5142
5349
|
padding: "4px 0px"
|
5143
5350
|
}), React__default.createElement(material.Stack, {
|
5144
5351
|
display: "flex",
|
5145
5352
|
flexDirection: "row",
|
5146
5353
|
gap: "8px"
|
5147
|
-
}, contentType ? React__default.createElement(
|
5148
|
-
borderRadius: "6px",
|
5149
|
-
padding: "12px",
|
5150
|
-
bgcolor: styles.darker
|
5151
|
-
}, React__default.createElement("img", {
|
5354
|
+
}, contentType ? React__default.createElement("img", {
|
5152
5355
|
onClick: toggleImageDialog,
|
5153
5356
|
src: content,
|
5154
5357
|
style: {
|
@@ -5156,13 +5359,19 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
5156
5359
|
position: "relative",
|
5157
5360
|
objectFit: "contain"
|
5158
5361
|
}
|
5159
|
-
})
|
5160
|
-
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"]
|
5362
|
+
}) : React__default.createElement("div", {
|
5363
|
+
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"],
|
5364
|
+
style: {
|
5365
|
+
maxWidth: 400
|
5366
|
+
}
|
5161
5367
|
}, React__default.createElement(material.Typography, {
|
5162
|
-
fontWeight:
|
5368
|
+
fontWeight: 500,
|
5163
5369
|
fontSize: "14px",
|
5164
5370
|
lineHeight: "16.71px",
|
5165
|
-
color:
|
5371
|
+
color: styles.gray_700,
|
5372
|
+
sx: {
|
5373
|
+
wordBreak: "break-word"
|
5374
|
+
}
|
5166
5375
|
}, content)))));
|
5167
5376
|
};
|
5168
5377
|
|
@@ -5699,7 +5908,7 @@ var InputChat = function InputChat(_ref) {
|
|
5699
5908
|
fullWidth: true,
|
5700
5909
|
className: styles$1["btn-send"],
|
5701
5910
|
sx: {
|
5702
|
-
bgcolor: isCompleted ? styles.light + " !important" : styles.
|
5911
|
+
bgcolor: isCompleted ? styles.light + " !important" : styles.less_dark
|
5703
5912
|
},
|
5704
5913
|
disabled: isCompleted,
|
5705
5914
|
onClick: handleSubmit
|
@@ -5720,13 +5929,13 @@ var InputChat = function InputChat(_ref) {
|
|
5720
5929
|
borderWidth: "1px"
|
5721
5930
|
}
|
5722
5931
|
}, React__default.createElement(iconPlusCircle, {
|
5723
|
-
color: styles.
|
5932
|
+
color: styles.less_dark
|
5724
5933
|
}), React__default.createElement(material.Typography, {
|
5725
5934
|
fontWeight: 700,
|
5726
5935
|
fontSize: "13px",
|
5727
5936
|
lineHeight: "15.51px",
|
5728
5937
|
sx: {
|
5729
|
-
color: styles.
|
5938
|
+
color: styles.less_dark
|
5730
5939
|
}
|
5731
5940
|
}, t("attachment")), React__default.createElement("input", {
|
5732
5941
|
type: "file",
|
@@ -5760,6 +5969,31 @@ var ellipsisText = function ellipsisText(text, maxLength) {
|
|
5760
5969
|
if (!text) return text;
|
5761
5970
|
return (text === null || text === void 0 ? void 0 : text.length) > maxLength ? text.slice(0, maxLength) + " ..." : text;
|
5762
5971
|
};
|
5972
|
+
var getOrdinalSuffix = function getOrdinalSuffix(number, lang) {
|
5973
|
+
var suffixes = {
|
5974
|
+
en: ['th', 'st', 'nd', 'rd'],
|
5975
|
+
ko: ['']
|
5976
|
+
};
|
5977
|
+
switch (lang) {
|
5978
|
+
case 'en':
|
5979
|
+
var j = number % 10;
|
5980
|
+
var k = number % 100;
|
5981
|
+
if (j === 1 && k !== 11) {
|
5982
|
+
return suffixes.en[1];
|
5983
|
+
}
|
5984
|
+
if (j === 2 && k !== 12) {
|
5985
|
+
return suffixes.en[2];
|
5986
|
+
}
|
5987
|
+
if (j === 3 && k !== 13) {
|
5988
|
+
return suffixes.en[3];
|
5989
|
+
}
|
5990
|
+
return suffixes.en[0];
|
5991
|
+
case 'ko':
|
5992
|
+
return suffixes.ko[0];
|
5993
|
+
default:
|
5994
|
+
return '';
|
5995
|
+
}
|
5996
|
+
};
|
5763
5997
|
var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
5764
5998
|
var uniqueCategories = new Set();
|
5765
5999
|
var filterCategories = categories.filter(function (category) {
|
@@ -5779,6 +6013,24 @@ var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
|
5779
6013
|
});
|
5780
6014
|
return questionsByCategory;
|
5781
6015
|
};
|
6016
|
+
var totalSolveTimeCategories = function totalSolveTimeCategories(inputData, categories) {
|
6017
|
+
var uniqueCategories = new Set();
|
6018
|
+
var filterCategories = categories.filter(function (category) {
|
6019
|
+
if (!uniqueCategories.has(category.name)) {
|
6020
|
+
uniqueCategories.add(category.name);
|
6021
|
+
return true;
|
6022
|
+
}
|
6023
|
+
return false;
|
6024
|
+
});
|
6025
|
+
var questionsByCategory = filterCategories.map(function (category) {
|
6026
|
+
return _extends({}, category, {
|
6027
|
+
totalSolveTime: inputData.questions.reduce(function (init, question) {
|
6028
|
+
return question.category.name === category.name ? init += question.duration : init;
|
6029
|
+
}, 0)
|
6030
|
+
});
|
6031
|
+
});
|
6032
|
+
return questionsByCategory;
|
6033
|
+
};
|
5782
6034
|
var formatTimeSecond = function formatTimeSecond(duration, t) {
|
5783
6035
|
duration = Math.round(duration);
|
5784
6036
|
return "" + (duration < 60 ? "" + duration + t("seconds") : t("mins_mins_seconds_seconds", {
|
@@ -5830,7 +6082,6 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5830
6082
|
display: "flex",
|
5831
6083
|
alignItems: "center",
|
5832
6084
|
gap: "24px",
|
5833
|
-
border: "1px solid #EBEBFF",
|
5834
6085
|
borderRadius: "6px"
|
5835
6086
|
}, React__default.createElement(material.Box, {
|
5836
6087
|
display: "flex",
|
@@ -5838,21 +6089,21 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5838
6089
|
flexDirection: "row",
|
5839
6090
|
gap: "8px"
|
5840
6091
|
}, React__default.createElement(iconPersonNoActive, {
|
5841
|
-
color: styles.
|
6092
|
+
color: styles.gray_700
|
5842
6093
|
}), isTabletUp && React__default.createElement(material.Typography, {
|
5843
6094
|
fontWeight: 500,
|
5844
6095
|
fontSize: "14px",
|
5845
6096
|
lineHeight: "16.71px",
|
5846
|
-
color: styles.
|
5847
|
-
}, t("
|
5848
|
-
fontWeight:
|
6097
|
+
color: styles.gray_700
|
6098
|
+
}, t("teacher"))), React__default.createElement(material.Typography, {
|
6099
|
+
fontWeight: 500,
|
5849
6100
|
fontSize: "14px",
|
5850
6101
|
lineHeight: "16.71px",
|
5851
|
-
color: styles.
|
6102
|
+
color: styles.gray_700
|
5852
6103
|
}, ellipsisText(teacherName || "", 15))), !!examTitle && React__default.createElement(material.Box, {
|
5853
6104
|
display: "flex",
|
5854
6105
|
alignItems: "start",
|
5855
|
-
color: styles.
|
6106
|
+
color: styles.gray_700,
|
5856
6107
|
gap: "6px",
|
5857
6108
|
flexDirection: "column"
|
5858
6109
|
}, React__default.createElement(material.Typography, {
|
@@ -5866,13 +6117,16 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5866
6117
|
}, React__default.createElement(material.Typography, {
|
5867
6118
|
fontWeight: 600,
|
5868
6119
|
fontSize: "12px",
|
5869
|
-
lineHeight: "14.2px"
|
5870
|
-
|
6120
|
+
lineHeight: "14.2px",
|
6121
|
+
sx: {
|
6122
|
+
color: styles.gray_700
|
6123
|
+
}
|
6124
|
+
}, "LIVE " + t('exam')), filterDurationExam && React__default.createElement(material.Typography, {
|
5871
6125
|
fontWeight: 500,
|
5872
6126
|
fontSize: "12px",
|
5873
6127
|
lineHeight: "14.32px",
|
5874
6128
|
sx: {
|
5875
|
-
color:
|
6129
|
+
color: styles.gray_500
|
5876
6130
|
}
|
5877
6131
|
}, (!!filterDurationExam.hours() ? filterDurationExam.hours() + " " + t("hour") : "") + " " + (!!filterDurationExam.minutes() ? filterDurationExam.minutes() + " " + t("minute") : "") + " " + (!!filterDurationExam.seconds() ? filterDurationExam.seconds() + " " + t("second") : "")))), React__default.createElement(material.Box, {
|
5878
6132
|
display: "flex",
|
@@ -5894,16 +6148,16 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5894
6148
|
fontWeight: 700,
|
5895
6149
|
fontSize: "12px",
|
5896
6150
|
lineHeight: "14.32px",
|
5897
|
-
color: styles.
|
6151
|
+
color: styles.less_dark
|
5898
6152
|
}, t("points", {
|
5899
|
-
number: score
|
6153
|
+
number: score || 0
|
5900
6154
|
})), React__default.createElement(material.Typography, {
|
5901
6155
|
fontWeight: 700,
|
5902
6156
|
fontSize: "12px",
|
5903
6157
|
lineHeight: "14.32px",
|
5904
|
-
color:
|
6158
|
+
color: styles.gray_300
|
5905
6159
|
}, "/", t("points", {
|
5906
|
-
number: totalScore
|
6160
|
+
number: totalScore || 0
|
5907
6161
|
}))), React__default.createElement(material.Typography, {
|
5908
6162
|
fontWeight: 500,
|
5909
6163
|
fontSize: "12px",
|
@@ -5962,7 +6216,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5962
6216
|
color: styles.darker
|
5963
6217
|
}, examTitle ? React__default.createElement(material.Typography, {
|
5964
6218
|
fontWeight: 600,
|
5965
|
-
fontSize: "
|
6219
|
+
fontSize: "11px",
|
5966
6220
|
lineHeight: "14.32px"
|
5967
6221
|
}, ellipsisText(examTitle || "", 10)) : React__default.createElement(material.Box, {
|
5968
6222
|
display: "flex",
|
@@ -5996,12 +6250,12 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5996
6250
|
borderColor: styles.less_dark,
|
5997
6251
|
borderRadius: "6px"
|
5998
6252
|
}, React__default.createElement(iconChecked, {
|
5999
|
-
color: styles.
|
6253
|
+
color: styles.less_dark
|
6000
6254
|
}), React__default.createElement(material.Typography, {
|
6001
6255
|
fontWeight: 700,
|
6002
6256
|
fontSize: "13px",
|
6003
6257
|
lineHeight: "15.51px",
|
6004
|
-
color: styles.
|
6258
|
+
color: styles.less_dark
|
6005
6259
|
}, t('complete_processing')))) : React__default.createElement("div", null));
|
6006
6260
|
};
|
6007
6261
|
return React__default.createElement(material.Grid, {
|
@@ -6016,9 +6270,9 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
6016
6270
|
}, React__default.createElement(material.Typography, {
|
6017
6271
|
fontWeight: 800,
|
6018
6272
|
fontSize: "20px",
|
6019
|
-
color: styles.
|
6273
|
+
color: styles.less_dark,
|
6020
6274
|
lineHeight: "23.87px"
|
6021
|
-
}, t("question_and_answer"))), renderHeader(), React__default.createElement(ConfirmDialog, {
|
6275
|
+
}, isStudent ? t("question_and_answer") : t("q&a"))), renderHeader(), React__default.createElement(ConfirmDialog, {
|
6022
6276
|
open: openDialog,
|
6023
6277
|
toggle: toggleDialog,
|
6024
6278
|
text: t("are_you_sure_you_want_to_complete_this_conversation"),
|
@@ -6753,17 +7007,14 @@ var BpIcon = material.styled('span')(function (_ref) {
|
|
6753
7007
|
};
|
6754
7008
|
});
|
6755
7009
|
var BpCheckedIcon = material.styled(BpIcon)({
|
6756
|
-
backgroundColor:
|
7010
|
+
backgroundColor: "#fff",
|
6757
7011
|
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
|
6758
7012
|
'&::before': {
|
6759
7013
|
display: 'block',
|
6760
7014
|
width: 16,
|
6761
7015
|
height: 16,
|
6762
|
-
backgroundImage:
|
7016
|
+
backgroundImage: "radial-gradient(" + styles.less_dark + " 36%,transparent 40%)",
|
6763
7017
|
content: '""'
|
6764
|
-
},
|
6765
|
-
'input:hover ~ &': {
|
6766
|
-
backgroundColor: styles.dark
|
6767
7018
|
}
|
6768
7019
|
});
|
6769
7020
|
var QuestionView = function QuestionView(_ref2) {
|
@@ -6823,7 +7074,7 @@ var QuestionView = function QuestionView(_ref2) {
|
|
6823
7074
|
mb: "16px"
|
6824
7075
|
}, React__default.createElement(material.FormControl, {
|
6825
7076
|
style: {
|
6826
|
-
width: "
|
7077
|
+
width: "168px"
|
6827
7078
|
}
|
6828
7079
|
}, React__default.createElement(ScoreSelector, {
|
6829
7080
|
value: question.score,
|
@@ -7078,7 +7329,7 @@ var ArticleGroupView = function ArticleGroupView(_ref) {
|
|
7078
7329
|
}, React__default.createElement(material.FormGroup, null, React__default.createElement(material.FormLabel, {
|
7079
7330
|
htmlFor: "question_count",
|
7080
7331
|
className: styles$2["question-label"] + " form-label"
|
7081
|
-
}, t("
|
7332
|
+
}, t("questions")), React__default.createElement(QuestionCountSelector, {
|
7082
7333
|
id: "question_count",
|
7083
7334
|
value: questionCount,
|
7084
7335
|
onChange: handleChangeQuestionCount,
|
@@ -7377,9 +7628,11 @@ var ChapterBox = function ChapterBox(_ref) {
|
|
7377
7628
|
onUpdateArticleQuestion: onUpdateArticleQuestion,
|
7378
7629
|
onRemoveChapter: onRemoveChapter
|
7379
7630
|
});
|
7380
|
-
}), data.subChapters.length === 0 && data.articles.map(function (article) {
|
7631
|
+
}), data.subChapters.length === 0 && data.articles.map(function (article, index) {
|
7381
7632
|
var _article$category;
|
7382
|
-
return React__default.createElement(material.Stack,
|
7633
|
+
return React__default.createElement(material.Stack, {
|
7634
|
+
key: index
|
7635
|
+
}, React__default.createElement(material.Stack, {
|
7383
7636
|
display: "flex",
|
7384
7637
|
flexDirection: "row",
|
7385
7638
|
gap: "8px",
|
@@ -7454,6 +7707,14 @@ var deleteTextbookApi = function deleteTextbookApi(textbookId, role) {
|
|
7454
7707
|
});
|
7455
7708
|
};
|
7456
7709
|
|
7710
|
+
var ExamStatus$1;
|
7711
|
+
(function (ExamStatus) {
|
7712
|
+
ExamStatus[ExamStatus["Default"] = 0] = "Default";
|
7713
|
+
ExamStatus[ExamStatus["Pending"] = 1] = "Pending";
|
7714
|
+
ExamStatus[ExamStatus["InProgress"] = 2] = "InProgress";
|
7715
|
+
ExamStatus[ExamStatus["Completed"] = 3] = "Completed";
|
7716
|
+
})(ExamStatus$1 || (ExamStatus$1 = {}));
|
7717
|
+
|
7457
7718
|
var OrderType;
|
7458
7719
|
(function (OrderType) {
|
7459
7720
|
OrderType["ASC"] = "ASC";
|
@@ -7464,7 +7725,8 @@ var OrderType;
|
|
7464
7725
|
|
7465
7726
|
var index = {
|
7466
7727
|
__proto__: null,
|
7467
|
-
get OrderType () { return OrderType; }
|
7728
|
+
get OrderType () { return OrderType; },
|
7729
|
+
get ExamStatus () { return ExamStatus$1; }
|
7468
7730
|
};
|
7469
7731
|
|
7470
7732
|
var TextbookSortBy;
|
@@ -7478,20 +7740,13 @@ var ExamType;
|
|
7478
7740
|
ExamType["Normal"] = "Normal";
|
7479
7741
|
ExamType["Standard"] = "Standard";
|
7480
7742
|
})(ExamType || (ExamType = {}));
|
7481
|
-
var ExamStatus$
|
7743
|
+
var ExamStatus$2;
|
7482
7744
|
(function (ExamStatus) {
|
7483
7745
|
ExamStatus["Default"] = "Default";
|
7484
7746
|
ExamStatus["Pending"] = "Pending";
|
7485
7747
|
ExamStatus["InProgress"] = "InProgress";
|
7486
7748
|
ExamStatus["Completed"] = "Completed";
|
7487
|
-
})(ExamStatus$
|
7488
|
-
var ExamStatusNumber;
|
7489
|
-
(function (ExamStatusNumber) {
|
7490
|
-
ExamStatusNumber[ExamStatusNumber["Default"] = 0] = "Default";
|
7491
|
-
ExamStatusNumber[ExamStatusNumber["Pending"] = 1] = "Pending";
|
7492
|
-
ExamStatusNumber[ExamStatusNumber["InProgress"] = 2] = "InProgress";
|
7493
|
-
ExamStatusNumber[ExamStatusNumber["Completed"] = 3] = "Completed";
|
7494
|
-
})(ExamStatusNumber || (ExamStatusNumber = {}));
|
7749
|
+
})(ExamStatus$2 || (ExamStatus$2 = {}));
|
7495
7750
|
|
7496
7751
|
var TEXTBOOK_HEADERS = [{
|
7497
7752
|
title: "#"
|
@@ -7523,7 +7778,7 @@ var DEFAULT_EXAM_REQUEST = {
|
|
7523
7778
|
subjectId: 0
|
7524
7779
|
};
|
7525
7780
|
var TEXTBOOK_PAGE_TITLE = "textbooks";
|
7526
|
-
var TEXT_BOOK_SEARCH_PLACEHOLDER = "
|
7781
|
+
var TEXT_BOOK_SEARCH_PLACEHOLDER = "enter_textbook_name_to_search";
|
7527
7782
|
var TextbookDefaultQuery = {
|
7528
7783
|
pageSize: 12,
|
7529
7784
|
currentPage: 1,
|
@@ -8875,6 +9130,9 @@ var useExamDetailView = function useExamDetailView(props) {
|
|
8875
9130
|
var exam = props.exam,
|
8876
9131
|
selectedSubject = props.selectedSubject,
|
8877
9132
|
onChangeExam = props.onChangeExam;
|
9133
|
+
console.log({
|
9134
|
+
exam: exam
|
9135
|
+
});
|
8878
9136
|
var _useTranslation = reactI18next.useTranslation(),
|
8879
9137
|
t = _useTranslation.t;
|
8880
9138
|
var handleChangeQuestionCount = function handleChangeQuestionCount(article, questionCount, answerCount) {
|
@@ -9152,7 +9410,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9152
9410
|
}, React__default.createElement("label", {
|
9153
9411
|
className: styles["form-label"] + " " + styles$2["question-label"],
|
9154
9412
|
htmlFor: "title"
|
9155
|
-
}, t("
|
9413
|
+
}, t("exam_name")), React__default.createElement("input", {
|
9156
9414
|
disabled: isDisabled,
|
9157
9415
|
className: "" + styles["form-control"],
|
9158
9416
|
value: exam.title,
|
@@ -9166,7 +9424,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9166
9424
|
}, React__default.createElement("label", {
|
9167
9425
|
className: styles["form-label"] + " " + styles$2["question-label"],
|
9168
9426
|
htmlFor: "duration"
|
9169
|
-
}, t("
|
9427
|
+
}, t("exam_duration")), React__default.createElement(CustomSelect, {
|
9170
9428
|
inputId: "duration",
|
9171
9429
|
value: exam.duration,
|
9172
9430
|
options: durationOptions,
|
@@ -9209,8 +9467,12 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9209
9467
|
}, React__default.createElement(material.Button, {
|
9210
9468
|
variant: 'outlined',
|
9211
9469
|
sx: {
|
9212
|
-
color: styles.
|
9213
|
-
|
9470
|
+
color: styles.less_dark,
|
9471
|
+
border: 'none',
|
9472
|
+
'&:hover': {
|
9473
|
+
border: "none",
|
9474
|
+
bgcolor: "#FFF"
|
9475
|
+
}
|
9214
9476
|
},
|
9215
9477
|
disabled: isDisabled,
|
9216
9478
|
className: "w-100 d-flex justify-content-center align-items-center " + styles$2["question-btn"] + " mt-3",
|
@@ -10060,6 +10322,14 @@ var getCheckStatusExam = function getCheckStatusExam(examCode) {
|
|
10060
10322
|
var toNumberOrder = function toNumberOrder(value) {
|
10061
10323
|
return "The " + value + (value % 10 === 1 ? 'st' : value % 10 === 2 ? 'nd' : value % 10 === 3 ? 'rd' : 'th');
|
10062
10324
|
};
|
10325
|
+
var formatDuration = function formatDuration(t, duration) {
|
10326
|
+
if (!duration) return "0" + t("seconds");
|
10327
|
+
var totalTime = Math.round(duration);
|
10328
|
+
return totalTime > 60 ? t("mins_mins_seconds_seconds", {
|
10329
|
+
mins: Math.floor(totalTime / 60),
|
10330
|
+
seconds: totalTime % 60
|
10331
|
+
}) : "" + Math.round(duration) + t("seconds");
|
10332
|
+
};
|
10063
10333
|
|
10064
10334
|
var ORDER_NUMBERS = {
|
10065
10335
|
1: "the_first",
|
@@ -10767,6 +11037,7 @@ var CATEGORY_RESPONSES = [{
|
|
10767
11037
|
percentageAmongStudents: 40
|
10768
11038
|
}];
|
10769
11039
|
var DEFAULT_LINE_CHART_OPTIONS = {
|
11040
|
+
colors: ["#3DC674", "#C3099A"],
|
10770
11041
|
chart: {
|
10771
11042
|
type: "line",
|
10772
11043
|
toolbar: {
|
@@ -11110,6 +11381,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11110
11381
|
}
|
11111
11382
|
}
|
11112
11383
|
}),
|
11384
|
+
colors: ['#3DC674', '#C3099A'],
|
11113
11385
|
xaxis: _extends({}, DEFAULT_LINE_CHART_OPTIONS.xaxis, {
|
11114
11386
|
categories: ["."].concat(Array.from({
|
11115
11387
|
length: questionLength
|
@@ -11134,13 +11406,13 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11134
11406
|
var series = (_allSeries$dataChartI = allSeries[dataChartIndex]) != null ? _allSeries$dataChartI : defaultSeries(t);
|
11135
11407
|
var handleExportPdf = function handleExportPdf() {
|
11136
11408
|
try {
|
11137
|
-
var
|
11409
|
+
var _temp26 = function _temp26(_result) {
|
11138
11410
|
if (_exit) return _result;
|
11139
11411
|
dispatch(setLoading(false));
|
11140
11412
|
};
|
11141
11413
|
var _exit = false;
|
11142
11414
|
dispatch(setLoading(true));
|
11143
|
-
var
|
11415
|
+
var _temp25 = _catch(function () {
|
11144
11416
|
var canvas = document.querySelector("#canvas");
|
11145
11417
|
var headerCanvas = document.querySelector("#header-canvas");
|
11146
11418
|
if (!canvas || !headerCanvas) {
|
@@ -11162,7 +11434,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11162
11434
|
var imgWidth = WIDTH_PAPER;
|
11163
11435
|
var chartWidth = WIDTH_PAPER - 20;
|
11164
11436
|
return Promise.resolve(html2canvas(headerCanvas)).then(function (header) {
|
11165
|
-
function
|
11437
|
+
function _temp24() {
|
11166
11438
|
doc.save("download.pdf");
|
11167
11439
|
}
|
11168
11440
|
var imgHeaderHeight = header.height * imgWidth / header.width;
|
@@ -11170,16 +11442,16 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11170
11442
|
doc.addImage(imgHeaderData, 'PNG', 0, 0, imgWidth, imgHeaderHeight);
|
11171
11443
|
line += imgHeaderHeight;
|
11172
11444
|
if (line > HEIGHT_PAPER) breakPage();
|
11173
|
-
var
|
11445
|
+
var _temp23 = function () {
|
11174
11446
|
if (canvas && canvas.childElementCount > 0) {
|
11175
11447
|
var _index = 0;
|
11176
|
-
var
|
11448
|
+
var _temp22 = _for(function () {
|
11177
11449
|
return _index < canvas.childElementCount;
|
11178
11450
|
}, function () {
|
11179
11451
|
return _index++;
|
11180
11452
|
}, function () {
|
11181
|
-
function
|
11182
|
-
function
|
11453
|
+
function _temp21() {
|
11454
|
+
function _temp19() {
|
11183
11455
|
line += 20;
|
11184
11456
|
}
|
11185
11457
|
var printChartTitle = function printChartTitle() {
|
@@ -11194,73 +11466,100 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11194
11466
|
return Promise.reject(e);
|
11195
11467
|
}
|
11196
11468
|
};
|
11197
|
-
var
|
11469
|
+
var _temp18 = function () {
|
11198
11470
|
if (printContainerEls.length) {
|
11199
|
-
var
|
11200
|
-
function
|
11201
|
-
|
11202
|
-
|
11203
|
-
|
11204
|
-
|
11205
|
-
|
11206
|
-
|
11207
|
-
|
11208
|
-
|
11209
|
-
|
11210
|
-
|
11211
|
-
|
11212
|
-
|
11213
|
-
|
11214
|
-
|
11215
|
-
|
11216
|
-
|
11217
|
-
|
11218
|
-
|
11219
|
-
|
11220
|
-
|
11221
|
-
|
11222
|
-
|
11223
|
-
|
11471
|
+
var _temp17 = _forTo(printContainerEls, function (i) {
|
11472
|
+
function _temp16() {
|
11473
|
+
function _temp14() {
|
11474
|
+
var printTitle = function printTitle() {
|
11475
|
+
try {
|
11476
|
+
if (!printTitleHeight || !printTitleData) return Promise.resolve();
|
11477
|
+
doc.addImage(printTitleData, 'PNG', 0, line, chartWidth, printTitleHeight);
|
11478
|
+
line += printTitleHeight;
|
11479
|
+
return Promise.resolve();
|
11480
|
+
} catch (e) {
|
11481
|
+
return Promise.reject(e);
|
11482
|
+
}
|
11483
|
+
};
|
11484
|
+
var printHeader = function printHeader(top) {
|
11485
|
+
if (top === void 0) {
|
11486
|
+
top = 0;
|
11487
|
+
}
|
11488
|
+
try {
|
11489
|
+
if (!printHeaderData || !printHeaderHeight) return Promise.resolve();
|
11490
|
+
line += top;
|
11491
|
+
if (line + printHeaderHeight > HEIGHT_PAPER) breakPage();
|
11492
|
+
doc.addImage(printHeaderData, 'PNG', 10, line, chartWidth, printHeaderHeight);
|
11493
|
+
line += printHeaderHeight;
|
11494
|
+
return Promise.resolve();
|
11495
|
+
} catch (e) {
|
11496
|
+
return Promise.reject(e);
|
11224
11497
|
}
|
11225
|
-
|
11226
|
-
|
11227
|
-
|
11228
|
-
|
11229
|
-
|
11230
|
-
|
11231
|
-
|
11232
|
-
|
11233
|
-
|
11234
|
-
|
11235
|
-
if (j === 0) {
|
11236
|
-
return Promise.resolve(printHeader(10)).then(function () {});
|
11237
|
-
}
|
11238
|
-
}();
|
11239
|
-
if (_temp25 && _temp25.then) return _temp25.then(function () {});
|
11498
|
+
};
|
11499
|
+
var printContents = printContainerEl.querySelectorAll("." + PrintContentClassName);
|
11500
|
+
if (!printContents.length) return;
|
11501
|
+
printTitle();
|
11502
|
+
var _temp12 = _forTo(printContents, function (j) {
|
11503
|
+
var rowItem = printContents[j];
|
11504
|
+
return Promise.resolve(html2canvas(rowItem)).then(function (rowItemCanvas) {
|
11505
|
+
function _temp11() {
|
11506
|
+
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
11507
|
+
line += height;
|
11240
11508
|
}
|
11241
|
-
|
11242
|
-
|
11509
|
+
var height = rowItemCanvas.height * chartWidth / rowItemCanvas.width;
|
11510
|
+
var data = rowItemCanvas.toDataURL('image/png');
|
11511
|
+
if (i === 0 && j === 0 && line + height + (printHeaderHeight || 0) + ((chartTitleHeight || 0) + 10) + 20 > HEIGHT_PAPER) breakPage();
|
11512
|
+
i === 0 && j === 0 && printChartTitle();
|
11513
|
+
var _temp10 = function () {
|
11514
|
+
if (line + height + 20 > HEIGHT_PAPER) {
|
11515
|
+
breakPage();
|
11516
|
+
return Promise.resolve(printHeader()).then(function () {});
|
11517
|
+
} else {
|
11518
|
+
var _temp27 = function () {
|
11519
|
+
if (j === 0) {
|
11520
|
+
return Promise.resolve(printHeader(10)).then(function () {});
|
11521
|
+
}
|
11522
|
+
}();
|
11523
|
+
if (_temp27 && _temp27.then) return _temp27.then(function () {});
|
11524
|
+
}
|
11525
|
+
}();
|
11526
|
+
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
|
11527
|
+
});
|
11243
11528
|
});
|
11244
|
-
|
11245
|
-
|
11529
|
+
if (_temp12 && _temp12.then) return _temp12.then(function () {});
|
11530
|
+
}
|
11531
|
+
var _temp13 = function () {
|
11532
|
+
if (printHeaderEl) {
|
11533
|
+
return Promise.resolve(html2canvas(printHeaderEl)).then(function (_html2canvas3) {
|
11534
|
+
printHeaderCanvas = _html2canvas3;
|
11535
|
+
printHeaderHeight = printHeaderCanvas.height * chartWidth / printHeaderCanvas.width;
|
11536
|
+
printHeaderData = printHeaderCanvas.toDataURL('image/png');
|
11537
|
+
});
|
11538
|
+
}
|
11539
|
+
}();
|
11540
|
+
return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
|
11246
11541
|
}
|
11247
11542
|
var printContainerEl = printContainerEls[i];
|
11543
|
+
var printTitleEl = printContainerEl.querySelector("." + PrintTitleClassName);
|
11248
11544
|
var printHeaderEl = printContainerEl.querySelector("." + PrintHeaderClassName);
|
11545
|
+
var printTitleCanvas = null;
|
11546
|
+
var printTitleHeight = null;
|
11547
|
+
var printTitleData = "";
|
11249
11548
|
var printHeaderCanvas = null;
|
11250
11549
|
var printHeaderHeight = null;
|
11251
11550
|
var printHeaderData = "";
|
11252
|
-
var
|
11253
|
-
if (
|
11254
|
-
return Promise.resolve(html2canvas(
|
11255
|
-
|
11256
|
-
|
11257
|
-
|
11551
|
+
var _temp15 = function () {
|
11552
|
+
if (printTitleEl) {
|
11553
|
+
return Promise.resolve(html2canvas(printTitleEl)).then(function (_html2canvas2) {
|
11554
|
+
printTitleCanvas = _html2canvas2;
|
11555
|
+
printTitleHeight = printTitleCanvas.height * chartWidth / printTitleCanvas.width;
|
11556
|
+
printTitleData = printTitleCanvas.toDataURL('image/png');
|
11258
11557
|
});
|
11259
11558
|
}
|
11260
11559
|
}();
|
11261
|
-
return
|
11560
|
+
return _temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15);
|
11262
11561
|
});
|
11263
|
-
if (
|
11562
|
+
if (_temp17 && _temp17.then) return _temp17.then(function () {});
|
11264
11563
|
} else {
|
11265
11564
|
return Promise.resolve(html2canvas(chart)).then(function (chartCanvas) {
|
11266
11565
|
var imgBodyHeight = chartCanvas.height * chartWidth / chartCanvas.width;
|
@@ -11273,7 +11572,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11273
11572
|
});
|
11274
11573
|
}
|
11275
11574
|
}();
|
11276
|
-
return
|
11575
|
+
return _temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18);
|
11277
11576
|
}
|
11278
11577
|
var chart = canvas.children.item(_index);
|
11279
11578
|
if (chart.getAttribute("id") === "header-canvas") return;
|
@@ -11282,7 +11581,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11282
11581
|
var printChartTitleCanvas = null;
|
11283
11582
|
var chartTitleHeight = null;
|
11284
11583
|
var chartTitleData = "";
|
11285
|
-
var
|
11584
|
+
var _temp20 = function () {
|
11286
11585
|
if (chartTitle && printContainerEls.length) {
|
11287
11586
|
return Promise.resolve(html2canvas(chartTitle)).then(function (_html2canvas) {
|
11288
11587
|
printChartTitleCanvas = _html2canvas;
|
@@ -11291,12 +11590,12 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11291
11590
|
});
|
11292
11591
|
}
|
11293
11592
|
}();
|
11294
|
-
return
|
11593
|
+
return _temp20 && _temp20.then ? _temp20.then(_temp21) : _temp21(_temp20);
|
11295
11594
|
});
|
11296
|
-
if (
|
11595
|
+
if (_temp22 && _temp22.then) return _temp22.then(function () {});
|
11297
11596
|
}
|
11298
11597
|
}();
|
11299
|
-
return
|
11598
|
+
return _temp23 && _temp23.then ? _temp23.then(_temp24) : _temp24(_temp23);
|
11300
11599
|
});
|
11301
11600
|
}, function (error) {
|
11302
11601
|
console.log({
|
@@ -11304,7 +11603,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11304
11603
|
});
|
11305
11604
|
reactToastify.toast.error(getErrorMessage(t, error));
|
11306
11605
|
});
|
11307
|
-
return Promise.resolve(
|
11606
|
+
return Promise.resolve(_temp25 && _temp25.then ? _temp25.then(_temp26) : _temp26(_temp25));
|
11308
11607
|
} catch (e) {
|
11309
11608
|
return Promise.reject(e);
|
11310
11609
|
}
|
@@ -12451,7 +12750,7 @@ Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==t
|
|
12451
12750
|
|
12452
12751
|
var ReactApexChart = unwrapExports(reactApexcharts_min);
|
12453
12752
|
|
12454
|
-
var styles$4 = {"lighter":"#F0FFF6","light":"#
|
12753
|
+
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"};
|
12455
12754
|
|
12456
12755
|
var iconStarQuestion = function iconStarQuestion(_ref) {
|
12457
12756
|
var _ref$width = _ref.width,
|
@@ -12995,7 +13294,9 @@ function MyAnswer(_ref) {
|
|
12995
13294
|
sx: {
|
12996
13295
|
fontSize: "13px",
|
12997
13296
|
fontWeight: 600,
|
12998
|
-
color: "#97A1AF"
|
13297
|
+
color: "#97A1AF",
|
13298
|
+
display: "flex",
|
13299
|
+
alignItems: "center"
|
12999
13300
|
}
|
13000
13301
|
}, t("problem_number"))), React__default.createElement("div", {
|
13001
13302
|
className: styles["custom-col-2"],
|
@@ -13007,7 +13308,9 @@ function MyAnswer(_ref) {
|
|
13007
13308
|
sx: {
|
13008
13309
|
fontSize: "13px",
|
13009
13310
|
fontWeight: 600,
|
13010
|
-
color: "#97A1AF"
|
13311
|
+
color: "#97A1AF",
|
13312
|
+
display: "flex",
|
13313
|
+
alignItems: "center"
|
13011
13314
|
}
|
13012
13315
|
}, t("answer"))), React__default.createElement("div", {
|
13013
13316
|
className: styles["custom-col-2"],
|
@@ -13019,7 +13322,9 @@ function MyAnswer(_ref) {
|
|
13019
13322
|
sx: {
|
13020
13323
|
fontSize: "13px",
|
13021
13324
|
fontWeight: 600,
|
13022
|
-
color: "#97A1AF"
|
13325
|
+
color: "#97A1AF",
|
13326
|
+
display: "flex",
|
13327
|
+
alignItems: "center"
|
13023
13328
|
}
|
13024
13329
|
}, t("solve_time"))), React__default.createElement("div", {
|
13025
13330
|
className: styles["custom-col-2"],
|
@@ -13032,7 +13337,9 @@ function MyAnswer(_ref) {
|
|
13032
13337
|
sx: {
|
13033
13338
|
fontSize: "13px",
|
13034
13339
|
fontWeight: 600,
|
13035
|
-
color: "#97A1AF"
|
13340
|
+
color: "#97A1AF",
|
13341
|
+
display: "flex",
|
13342
|
+
alignItems: "center"
|
13036
13343
|
}
|
13037
13344
|
}, t("comparison_of_top_rankings"))), React__default.createElement("div", {
|
13038
13345
|
className: styles["custom-col-2"],
|
@@ -13045,7 +13352,9 @@ function MyAnswer(_ref) {
|
|
13045
13352
|
sx: {
|
13046
13353
|
fontSize: "13px",
|
13047
13354
|
fontWeight: 600,
|
13048
|
-
color: "#97A1AF"
|
13355
|
+
color: "#97A1AF",
|
13356
|
+
display: "flex",
|
13357
|
+
alignItems: "center"
|
13049
13358
|
}
|
13050
13359
|
}, t("total_correct_rate")))), React__default.createElement("div", {
|
13051
13360
|
className: styles$4["titleMyAnswer2"]
|
@@ -13225,48 +13534,6 @@ var CompareGrass = function CompareGrass(_ref) {
|
|
13225
13534
|
}, t("problem_classification")))), isPrint ? renderPrintTableBody(effectSize) : React__default.createElement("tbody", null, renderTableBody(effectSize))))));
|
13226
13535
|
};
|
13227
13536
|
|
13228
|
-
var iconUpArrow = function iconUpArrow(_ref) {
|
13229
|
-
var _ref$width = _ref.width,
|
13230
|
-
width = _ref$width === void 0 ? "24" : _ref$width,
|
13231
|
-
_ref$height = _ref.height,
|
13232
|
-
height = _ref$height === void 0 ? "24" : _ref$height,
|
13233
|
-
color = _ref.color;
|
13234
|
-
return React__default.createElement("svg", {
|
13235
|
-
xmlns: "http://www.w3.org/2000/svg",
|
13236
|
-
width: width,
|
13237
|
-
height: height,
|
13238
|
-
viewBox: "0 0 24 24",
|
13239
|
-
fill: color
|
13240
|
-
}, React__default.createElement("path", {
|
13241
|
-
d: "M5.25 15.375L12 8.625L18.75 15.375",
|
13242
|
-
stroke: "#CED2DA",
|
13243
|
-
strokeWidth: "2",
|
13244
|
-
strokeLinecap: "round",
|
13245
|
-
strokeLinejoin: "round"
|
13246
|
-
}));
|
13247
|
-
};
|
13248
|
-
|
13249
|
-
var iconDownArrow = function iconDownArrow(_ref) {
|
13250
|
-
var _ref$width = _ref.width,
|
13251
|
-
width = _ref$width === void 0 ? "24" : _ref$width,
|
13252
|
-
_ref$height = _ref.height,
|
13253
|
-
height = _ref$height === void 0 ? "24" : _ref$height,
|
13254
|
-
color = _ref.color;
|
13255
|
-
return React__default.createElement("svg", {
|
13256
|
-
xmlns: "http://www.w3.org/2000/svg",
|
13257
|
-
width: width,
|
13258
|
-
height: height,
|
13259
|
-
viewBox: "0 0 24 24",
|
13260
|
-
fill: color
|
13261
|
-
}, React__default.createElement("path", {
|
13262
|
-
d: "M5.25 8.625L12 15.375L18.75 8.625",
|
13263
|
-
stroke: "#CED2DA",
|
13264
|
-
strokeWidth: "2",
|
13265
|
-
strokeLinecap: "round",
|
13266
|
-
strokeLinejoin: "round"
|
13267
|
-
}));
|
13268
|
-
};
|
13269
|
-
|
13270
13537
|
var iconX = function iconX(_ref) {
|
13271
13538
|
var _ref$width = _ref.width,
|
13272
13539
|
width = _ref$width === void 0 ? "15" : _ref$width,
|
@@ -13402,7 +13669,13 @@ var TrickyProblem = function TrickyProblem(_ref) {
|
|
13402
13669
|
fontSize: "14px",
|
13403
13670
|
fontWeight: 700
|
13404
13671
|
}
|
13405
|
-
}, t("tricky_problems")), isOpen ? React__default.createElement(
|
13672
|
+
}, t("tricky_problems")), isOpen ? React__default.createElement(io5.IoChevronUp, {
|
13673
|
+
size: 24,
|
13674
|
+
color: styles$4.gray_300
|
13675
|
+
}) : React__default.createElement(io5.IoChevronDown, {
|
13676
|
+
size: 24,
|
13677
|
+
color: styles$4.gray_300
|
13678
|
+
})), isOpen && React__default.createElement(React.Fragment, null, isPrint ? renderPrintProblems() : renderProblems()));
|
13406
13679
|
};
|
13407
13680
|
|
13408
13681
|
var ProtractedProblem = function ProtractedProblem(_ref) {
|
@@ -13410,10 +13683,55 @@ var ProtractedProblem = function ProtractedProblem(_ref) {
|
|
13410
13683
|
data = _ref.data,
|
13411
13684
|
openProblem = _ref.openProblem,
|
13412
13685
|
changeOpen = _ref.changeOpen,
|
13413
|
-
isPrint = _ref.isPrint
|
13686
|
+
isPrint = _ref.isPrint,
|
13687
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13414
13688
|
var _useTranslation = reactI18next.useTranslation(),
|
13415
13689
|
t = _useTranslation.t;
|
13416
13690
|
var isOpen = openProblem === keyOpen;
|
13691
|
+
var renderTableBody = function renderTableBody(data) {
|
13692
|
+
return data.map(function (item, index) {
|
13693
|
+
var time = item.topDuration - item.duration;
|
13694
|
+
var isBetter = time > 0;
|
13695
|
+
return React__default.createElement("tr", {
|
13696
|
+
id: "print-item",
|
13697
|
+
key: item.id,
|
13698
|
+
style: index < data.length - 1 ? {
|
13699
|
+
borderBottom: "1px solid #e4e7ec"
|
13700
|
+
} : {}
|
13701
|
+
}, React__default.createElement("td", {
|
13702
|
+
className: styles$4["tdcolumn1"],
|
13703
|
+
style: {
|
13704
|
+
color: styles$4.gray_900,
|
13705
|
+
fontSize: "13px",
|
13706
|
+
fontWeight: 500
|
13707
|
+
}
|
13708
|
+
}, t("number_problem", {
|
13709
|
+
number: item.questionOrder + 1
|
13710
|
+
})), React__default.createElement("td", {
|
13711
|
+
style: {
|
13712
|
+
textAlign: "center",
|
13713
|
+
color: styles$4.gray_700,
|
13714
|
+
fontSize: "13px",
|
13715
|
+
fontWeight: 500
|
13716
|
+
}
|
13717
|
+
}, item.duration ? formatTimeSecond(item.duration, t) : ""), React__default.createElement("td", {
|
13718
|
+
className: styles$4["tdcolumn3"],
|
13719
|
+
style: {
|
13720
|
+
textAlign: "center",
|
13721
|
+
color: styles$4.gray_700,
|
13722
|
+
fontSize: "13px",
|
13723
|
+
fontWeight: 500
|
13724
|
+
}
|
13725
|
+
}, item.topDuration ? formatTimeSecond(item.topDuration, t) : ""), React__default.createElement("td", {
|
13726
|
+
style: {
|
13727
|
+
textAlign: "center",
|
13728
|
+
color: isBetter ? styles$4.dark : "red",
|
13729
|
+
fontSize: "13px",
|
13730
|
+
fontWeight: 600
|
13731
|
+
}
|
13732
|
+
}, item.topDuration && item.duration ? "" + (isBetter ? "" : "+") + formatTimeSecond(Math.abs(time), t) : ""));
|
13733
|
+
});
|
13734
|
+
};
|
13417
13735
|
var renderQuestions = function renderQuestions(data) {
|
13418
13736
|
return data.map(function (item) {
|
13419
13737
|
return React__default.createElement("div", {
|
@@ -13443,30 +13761,72 @@ var ProtractedProblem = function ProtractedProblem(_ref) {
|
|
13443
13761
|
var renderPrintQuestions = function renderPrintQuestions() {
|
13444
13762
|
var chunkedData = _.chunk(data, 5);
|
13445
13763
|
return chunkedData.map(function (i, index) {
|
13446
|
-
return React__default.createElement("
|
13764
|
+
return React__default.createElement("tbody", {
|
13447
13765
|
key: index,
|
13448
13766
|
className: PrintContentClassName
|
13449
|
-
}, renderQuestions(i));
|
13767
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderQuestions(i));
|
13450
13768
|
});
|
13451
13769
|
};
|
13452
13770
|
return React__default.createElement("div", {
|
13453
13771
|
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
13454
13772
|
}, React__default.createElement("div", {
|
13455
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
13773
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13456
13774
|
onClick: function onClick() {
|
13457
13775
|
return changeOpen(isOpen ? "" : keyOpen);
|
13458
13776
|
}
|
13777
|
+
}, React__default.createElement(material.Stack, {
|
13778
|
+
flexDirection: "row",
|
13779
|
+
gap: "24px",
|
13780
|
+
alignItems: "center"
|
13459
13781
|
}, React__default.createElement(material.Typography, {
|
13460
13782
|
sx: {
|
13461
13783
|
color: !isOpen ? "#97A1AF" : "#414E62",
|
13462
13784
|
fontSize: "14px",
|
13463
13785
|
fontWeight: 700
|
13464
13786
|
}
|
13465
|
-
}, t("problems_that_took_a_long_time")),
|
13466
|
-
|
13467
|
-
|
13787
|
+
}, t("problems_that_took_a_long_time")), React__default.createElement(material.Typography, {
|
13788
|
+
sx: {
|
13789
|
+
color: styles$4.gray_300,
|
13790
|
+
fontSize: "11px",
|
13791
|
+
fontWeight: 500
|
13792
|
+
}
|
13793
|
+
}, t("protracted_problem_detail"))), isOpen ? React__default.createElement(io5.IoChevronUp, {
|
13794
|
+
size: 24,
|
13795
|
+
color: styles$4.gray_300
|
13796
|
+
}) : React__default.createElement(io5.IoChevronDown, {
|
13797
|
+
size: 24,
|
13798
|
+
color: styles$4.gray_300
|
13799
|
+
})), isOpen && React__default.createElement(React.Fragment, null, data.length ? React__default.createElement("div", {
|
13800
|
+
className: styles$4["tableCompareGrass"]
|
13801
|
+
}, React__default.createElement("div", {
|
13802
|
+
className: styles$4["table-responsive"]
|
13803
|
+
}, React__default.createElement(material.Table, {
|
13804
|
+
style: {
|
13805
|
+
width: "100%",
|
13806
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
13807
|
+
}
|
13808
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
13809
|
+
style: {
|
13810
|
+
borderBottom: "1px solid #E4E7EC"
|
13811
|
+
},
|
13812
|
+
className: isPrint ? PrintHeaderClassName : ""
|
13813
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
13814
|
+
className: styles$4["thcolumn1"]
|
13815
|
+
}, t("problem_number")), React__default.createElement("th", {
|
13816
|
+
style: {
|
13817
|
+
textAlign: "center"
|
13818
|
+
}
|
13819
|
+
}, t("my_time")), React__default.createElement("th", {
|
13820
|
+
style: {
|
13821
|
+
textAlign: "center"
|
13822
|
+
}
|
13823
|
+
}, t("top_time")), React__default.createElement("th", {
|
13824
|
+
style: {
|
13825
|
+
textAlign: "center"
|
13826
|
+
}
|
13827
|
+
}, t("time_comparison")))), isPrint ? renderPrintQuestions() : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(data) : renderQuestions(data))))) : React__default.createElement("div", {
|
13468
13828
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13469
|
-
}, t("no_data"))))
|
13829
|
+
}, t("no_data"))));
|
13470
13830
|
};
|
13471
13831
|
|
13472
13832
|
var Vulnerable = function Vulnerable(_ref) {
|
@@ -13474,7 +13834,8 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13474
13834
|
keyOpen = _ref.keyOpen,
|
13475
13835
|
openProblem = _ref.openProblem,
|
13476
13836
|
changeOpen = _ref.changeOpen,
|
13477
|
-
isPrint = _ref.isPrint
|
13837
|
+
isPrint = _ref.isPrint,
|
13838
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13478
13839
|
var _useTranslation = reactI18next.useTranslation(),
|
13479
13840
|
t = _useTranslation.t;
|
13480
13841
|
var isOpen = openProblem === keyOpen;
|
@@ -13483,12 +13844,65 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13483
13844
|
}).sort(function (q1, q2) {
|
13484
13845
|
return q2.overallCorrectRate === q1.overallCorrectRate ? q1.questionOrder - q2.questionOrder : q2.overallCorrectRate - q1.overallCorrectRate;
|
13485
13846
|
});
|
13847
|
+
var renderTableBody = function renderTableBody(data) {
|
13848
|
+
return data.map(function (item, index) {
|
13849
|
+
return React__default.createElement("tr", {
|
13850
|
+
id: "print-item",
|
13851
|
+
key: item.id,
|
13852
|
+
style: index < data.length - 1 ? {
|
13853
|
+
borderBottom: "1px solid #e4e7ec"
|
13854
|
+
} : {}
|
13855
|
+
}, React__default.createElement("td", {
|
13856
|
+
className: styles$4["tdcolumn1"],
|
13857
|
+
style: {
|
13858
|
+
color: styles$4.gray_900,
|
13859
|
+
fontSize: "13px",
|
13860
|
+
fontWeight: 600
|
13861
|
+
}
|
13862
|
+
}, React__default.createElement(material.Typography, {
|
13863
|
+
color: styles$4.gray_900,
|
13864
|
+
fontSize: "13px",
|
13865
|
+
fontWeight: 600
|
13866
|
+
}, t("problem") + " " + (item.questionOrder + 1))), React__default.createElement("td", {
|
13867
|
+
style: {
|
13868
|
+
textAlign: "center",
|
13869
|
+
color: styles$4.dark,
|
13870
|
+
fontSize: "13px",
|
13871
|
+
fontWeight: 600
|
13872
|
+
}
|
13873
|
+
}, item.overallCorrectRate.toFixed(2) ? item.overallCorrectRate.toFixed(2) + "%" : ""), React__default.createElement("td", {
|
13874
|
+
className: styles$4["tdcolumn3"],
|
13875
|
+
style: {
|
13876
|
+
color: "red",
|
13877
|
+
fontSize: "13px",
|
13878
|
+
fontWeight: 500
|
13879
|
+
}
|
13880
|
+
}, item.selectedAnswers ? t("number_answer", {
|
13881
|
+
number: item.selectedAnswers
|
13882
|
+
}) : ""), React__default.createElement("td", {
|
13883
|
+
style: {
|
13884
|
+
textAlign: "center",
|
13885
|
+
color: styles$4.gray_700
|
13886
|
+
}
|
13887
|
+
}, item.correctAnswers ? t("number_answer", {
|
13888
|
+
number: item.correctAnswers
|
13889
|
+
}) : ""), React__default.createElement("td", {
|
13890
|
+
style: {
|
13891
|
+
textAlign: "center",
|
13892
|
+
color: styles$4.gray_700
|
13893
|
+
}
|
13894
|
+
}, item.category.name ? item.category.name : ""));
|
13895
|
+
});
|
13896
|
+
};
|
13486
13897
|
var renderQuestions = function renderQuestions(questions) {
|
13487
13898
|
return questions.map(function (question) {
|
13488
|
-
return React__default.createElement(
|
13899
|
+
return React__default.createElement(material.Grid, {
|
13900
|
+
container: true,
|
13489
13901
|
className: styles$4["content"],
|
13490
13902
|
key: question.id
|
13491
|
-
}, React__default.createElement(
|
13903
|
+
}, React__default.createElement(material.Grid, {
|
13904
|
+
item: true,
|
13905
|
+
xs: 1.5,
|
13492
13906
|
className: styles$4["contentColumn1"]
|
13493
13907
|
}, React__default.createElement("div", null, React__default.createElement("span", {
|
13494
13908
|
className: styles$4["span1"]
|
@@ -13496,7 +13910,9 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13496
13910
|
className: styles$4["span2"]
|
13497
13911
|
}, t("number_question", {
|
13498
13912
|
number: question.questionOrder + 1
|
13499
|
-
})))), React__default.createElement(
|
13913
|
+
})))), React__default.createElement(material.Grid, {
|
13914
|
+
item: true,
|
13915
|
+
xs: 10.5,
|
13500
13916
|
className: styles$4["contentColumn2"]
|
13501
13917
|
}, React__default.createElement("div", null, React__default.createElement("span", {
|
13502
13918
|
className: styles$4["span1"]
|
@@ -13516,30 +13932,76 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13516
13932
|
var renderPrintQuestions = function renderPrintQuestions(questions) {
|
13517
13933
|
var chunkedQuestions = _.chunk(questions, 5);
|
13518
13934
|
return chunkedQuestions.map(function (i, index) {
|
13519
|
-
return React__default.createElement("
|
13935
|
+
return React__default.createElement("tbody", {
|
13520
13936
|
key: index,
|
13521
13937
|
className: PrintContentClassName
|
13522
|
-
}, renderQuestions(i));
|
13938
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderQuestions(i));
|
13523
13939
|
});
|
13524
13940
|
};
|
13525
13941
|
return React__default.createElement("div", {
|
13526
13942
|
className: styles$4["wrapperProblem"] + " " + PrintContainerClassName
|
13527
13943
|
}, React__default.createElement("div", {
|
13528
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
13944
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13529
13945
|
onClick: function onClick() {
|
13530
13946
|
return changeOpen(isOpen ? "" : keyOpen);
|
13531
13947
|
}
|
13948
|
+
}, React__default.createElement(material.Stack, {
|
13949
|
+
flexDirection: "row",
|
13950
|
+
gap: "24px",
|
13951
|
+
alignItems: "center"
|
13532
13952
|
}, React__default.createElement(material.Typography, {
|
13533
13953
|
sx: {
|
13534
13954
|
color: !isOpen ? "#97A1AF" : "#414E62",
|
13535
13955
|
fontSize: "14px",
|
13536
13956
|
fontWeight: 700
|
13537
13957
|
}
|
13538
|
-
}, t("issues_vulnerable")),
|
13539
|
-
|
13540
|
-
|
13958
|
+
}, t("issues_vulnerable")), React__default.createElement(material.Typography, {
|
13959
|
+
sx: {
|
13960
|
+
color: styles$4.gray_300,
|
13961
|
+
fontSize: "11px",
|
13962
|
+
fontWeight: 500
|
13963
|
+
}
|
13964
|
+
}, t("vulnerable_detail"))), isOpen ? React__default.createElement(io5.IoChevronUp, {
|
13965
|
+
size: 24,
|
13966
|
+
color: styles$4.gray_300
|
13967
|
+
}) : React__default.createElement(io5.IoChevronDown, {
|
13968
|
+
size: 24,
|
13969
|
+
color: styles$4.gray_300
|
13970
|
+
})), isOpen && React__default.createElement(React.Fragment, null, incorrectQuestions.length ? React__default.createElement("div", {
|
13971
|
+
className: styles$4["tableCompareGrass"]
|
13972
|
+
}, React__default.createElement("div", {
|
13973
|
+
className: styles$4["table-responsive"]
|
13974
|
+
}, React__default.createElement(material.Table, {
|
13975
|
+
style: {
|
13976
|
+
width: "100%",
|
13977
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
13978
|
+
}
|
13979
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
13980
|
+
style: {
|
13981
|
+
borderBottom: "1px solid #E4E7EC"
|
13982
|
+
},
|
13983
|
+
className: isPrint ? PrintHeaderClassName : ""
|
13984
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
13985
|
+
className: styles$4["thcolumn1"]
|
13986
|
+
}, t("problem_number")), React__default.createElement("th", {
|
13987
|
+
style: {
|
13988
|
+
textAlign: "center"
|
13989
|
+
}
|
13990
|
+
}, t("total_correct_rate")), React__default.createElement("th", {
|
13991
|
+
style: {
|
13992
|
+
textAlign: "center"
|
13993
|
+
}
|
13994
|
+
}, t("my_wrong_answer")), React__default.createElement("th", {
|
13995
|
+
style: {
|
13996
|
+
textAlign: "center"
|
13997
|
+
}
|
13998
|
+
}, t("answer")), React__default.createElement("th", {
|
13999
|
+
style: {
|
14000
|
+
textAlign: "center"
|
14001
|
+
}
|
14002
|
+
}, t("_category")))), isPrint ? renderPrintQuestions(incorrectQuestions) : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(incorrectQuestions) : renderQuestions(incorrectQuestions))))) : React__default.createElement("div", {
|
13541
14003
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13542
|
-
}, t("no_data"))))
|
14004
|
+
}, t("no_data"))));
|
13543
14005
|
};
|
13544
14006
|
|
13545
14007
|
var GradesByTerritory = function GradesByTerritory(_ref) {
|
@@ -13547,10 +14009,64 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13547
14009
|
data = _ref.data,
|
13548
14010
|
openProblem = _ref.openProblem,
|
13549
14011
|
changeOpen = _ref.changeOpen,
|
13550
|
-
isPrint = _ref.isPrint
|
14012
|
+
isPrint = _ref.isPrint,
|
14013
|
+
resultData = _ref.resultData,
|
14014
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13551
14015
|
var _useTranslation = reactI18next.useTranslation(),
|
13552
14016
|
t = _useTranslation.t;
|
14017
|
+
var formattedData = totalSolveTimeCategories(resultData, data);
|
13553
14018
|
var isOpen = openProblem === keyOpen;
|
14019
|
+
var renderTableBody = function renderTableBody(data) {
|
14020
|
+
return data.map(function (item, index) {
|
14021
|
+
return React__default.createElement("tr", {
|
14022
|
+
id: "print-item",
|
14023
|
+
key: item.id,
|
14024
|
+
style: index < data.length - 1 ? {
|
14025
|
+
borderBottom: "1px solid #e4e7ec"
|
14026
|
+
} : {}
|
14027
|
+
}, React__default.createElement("td", {
|
14028
|
+
className: styles$4["tdcolumn1"],
|
14029
|
+
style: {
|
14030
|
+
color: styles$4.gray_900,
|
14031
|
+
fontSize: "13px",
|
14032
|
+
fontWeight: 600
|
14033
|
+
}
|
14034
|
+
}, item.name), React__default.createElement("td", {
|
14035
|
+
style: {
|
14036
|
+
textAlign: "center",
|
14037
|
+
color: styles$4.gray_900,
|
14038
|
+
fontSize: "13px",
|
14039
|
+
fontWeight: 600
|
14040
|
+
}
|
14041
|
+
}, item.percentageAmongStudents.toFixed(2), "%"), React__default.createElement("td", {
|
14042
|
+
className: styles$4["tdcolumn3"],
|
14043
|
+
style: {
|
14044
|
+
textAlign: "center",
|
14045
|
+
color: styles$4.gray_700,
|
14046
|
+
fontSize: "13px",
|
14047
|
+
fontWeight: 500
|
14048
|
+
}
|
14049
|
+
}, item.totalCorrectQuestions ? t("number_of_answer", {
|
14050
|
+
number: item.totalCorrectQuestions
|
14051
|
+
}) : ""), React__default.createElement("td", {
|
14052
|
+
style: {
|
14053
|
+
textAlign: "center",
|
14054
|
+
color: styles$4.gray_700,
|
14055
|
+
fontSize: "13px",
|
14056
|
+
fontWeight: 500
|
14057
|
+
}
|
14058
|
+
}, item.totalQuestions ? t("number_of_answer", {
|
14059
|
+
number: item.totalQuestions
|
14060
|
+
}) : ""), React__default.createElement("td", {
|
14061
|
+
style: {
|
14062
|
+
textAlign: "center",
|
14063
|
+
color: styles$4.gray_700,
|
14064
|
+
fontSize: "13px",
|
14065
|
+
fontWeight: 500
|
14066
|
+
}
|
14067
|
+
}, item.totalSolveTime ? formatDuration(t, item.totalSolveTime) : ""));
|
14068
|
+
});
|
14069
|
+
};
|
13554
14070
|
var renderCategories = function renderCategories(data) {
|
13555
14071
|
return data.map(function (item) {
|
13556
14072
|
var trackStyle = {
|
@@ -13574,18 +14090,18 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13574
14090
|
});
|
13575
14091
|
};
|
13576
14092
|
var renderPrintCategories = function renderPrintCategories() {
|
13577
|
-
var chunkedCategories = _.chunk(
|
14093
|
+
var chunkedCategories = _.chunk(formattedData, 10);
|
13578
14094
|
return chunkedCategories.map(function (i, index) {
|
13579
|
-
return React__default.createElement("
|
14095
|
+
return React__default.createElement("tbody", {
|
13580
14096
|
key: index,
|
13581
14097
|
className: PrintContentClassName
|
13582
|
-
}, renderCategories(i));
|
14098
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderCategories(i));
|
13583
14099
|
});
|
13584
14100
|
};
|
13585
14101
|
return React__default.createElement("div", {
|
13586
14102
|
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
13587
14103
|
}, React__default.createElement("div", {
|
13588
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
14104
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13589
14105
|
onClick: function onClick() {
|
13590
14106
|
return changeOpen(isOpen ? "" : keyOpen);
|
13591
14107
|
}
|
@@ -13595,9 +14111,45 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13595
14111
|
fontSize: "14px",
|
13596
14112
|
fontWeight: 700
|
13597
14113
|
}
|
13598
|
-
}, t("grades_by_area")), isOpen ? React__default.createElement(
|
13599
|
-
|
13600
|
-
|
14114
|
+
}, t("grades_by_area")), isOpen ? React__default.createElement(io5.IoChevronUp, {
|
14115
|
+
size: 24,
|
14116
|
+
color: styles$4.gray_300
|
14117
|
+
}) : React__default.createElement(io5.IoChevronDown, {
|
14118
|
+
size: 24,
|
14119
|
+
color: styles$4.gray_300
|
14120
|
+
})), isOpen && React__default.createElement(React.Fragment, null, formattedData.length ? React__default.createElement("div", {
|
14121
|
+
className: styles$4["tableCompareGrass"]
|
14122
|
+
}, React__default.createElement("div", {
|
14123
|
+
className: styles$4["table-responsive"]
|
14124
|
+
}, React__default.createElement(material.Table, {
|
14125
|
+
style: {
|
14126
|
+
width: "100%",
|
14127
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
14128
|
+
}
|
14129
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
14130
|
+
style: {
|
14131
|
+
borderBottom: "1px solid #E4E7EC"
|
14132
|
+
},
|
14133
|
+
className: isPrint ? PrintHeaderClassName : ""
|
14134
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
14135
|
+
className: styles$4["thcolumn1"]
|
14136
|
+
}, t("categories")), React__default.createElement("th", {
|
14137
|
+
style: {
|
14138
|
+
textAlign: "center"
|
14139
|
+
}
|
14140
|
+
}, t("correct_rate")), React__default.createElement("th", {
|
14141
|
+
style: {
|
14142
|
+
textAlign: "center"
|
14143
|
+
}
|
14144
|
+
}, t("number_of_correct_answers")), React__default.createElement("th", {
|
14145
|
+
style: {
|
14146
|
+
textAlign: "center"
|
14147
|
+
}
|
14148
|
+
}, t("total_number_of_problems")), React__default.createElement("th", {
|
14149
|
+
style: {
|
14150
|
+
textAlign: "center"
|
14151
|
+
}
|
14152
|
+
}, t("total_solve_time")))), isPrint ? renderPrintCategories() : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(formattedData) : renderCategories(formattedData))))) : React__default.createElement("div", {
|
13601
14153
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13602
14154
|
}, t("no_data"))));
|
13603
14155
|
};
|
@@ -13807,7 +14359,8 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13807
14359
|
history = _ref.history,
|
13808
14360
|
examSessionId = _ref.examSessionId,
|
13809
14361
|
studentId = _ref.studentId,
|
13810
|
-
code = _ref.code
|
14362
|
+
code = _ref.code,
|
14363
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13811
14364
|
var _useTab = useTab(),
|
13812
14365
|
selected = _useTab.selected,
|
13813
14366
|
handleChangeTab = _useTab.handleChangeTab;
|
@@ -13908,7 +14461,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13908
14461
|
fontWeight: 600,
|
13909
14462
|
color: styles.gray_500
|
13910
14463
|
}
|
13911
|
-
}, t("
|
14464
|
+
}, t("students")), React__default.createElement(material.Typography, {
|
13912
14465
|
sx: {
|
13913
14466
|
fontSize: "14px",
|
13914
14467
|
fontWeight: 600,
|
@@ -13952,7 +14505,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13952
14505
|
}, React__default.createElement("button", {
|
13953
14506
|
className: styles$4["pdfBtn"] + " " + styles["truncate"],
|
13954
14507
|
onClick: handleExportPdf
|
13955
|
-
}, React__default.createElement(iconPrintFill, null), React__default.createElement("p", null, t("
|
14508
|
+
}, React__default.createElement(iconPrintFill, null), React__default.createElement("p", null, t("print_all"))))))), React__default.createElement(material.Grid, {
|
13956
14509
|
item: true,
|
13957
14510
|
xs: 12
|
13958
14511
|
}, React__default.createElement(material.Box, {
|
@@ -13962,7 +14515,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13962
14515
|
alignItems: "center",
|
13963
14516
|
display: "flex",
|
13964
14517
|
overflow: "scroll",
|
13965
|
-
bgcolor: styles.
|
14518
|
+
bgcolor: styles.gray_50,
|
13966
14519
|
borderTop: "1px solid #E4E7EC",
|
13967
14520
|
borderBottom: "1px solid #E4E7EC"
|
13968
14521
|
}, React__default.createElement(material.Stack, {
|
@@ -14042,16 +14595,20 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14042
14595
|
keyOpen: "Vulnerable",
|
14043
14596
|
data: resultData,
|
14044
14597
|
openProblem: openProblem,
|
14045
|
-
changeOpen: setOpenProblem
|
14598
|
+
changeOpen: setOpenProblem,
|
14599
|
+
isMyStoryStudent: isMyStoryStudent
|
14046
14600
|
}), React__default.createElement(ProtractedProblem, {
|
14047
14601
|
keyOpen: "ProtractedProblem",
|
14048
14602
|
data: longTimeSpend,
|
14049
14603
|
openProblem: openProblem,
|
14050
|
-
changeOpen: setOpenProblem
|
14604
|
+
changeOpen: setOpenProblem,
|
14605
|
+
isMyStoryStudent: isMyStoryStudent
|
14051
14606
|
}), React__default.createElement(GradesByTerritory, {
|
14052
14607
|
keyOpen: "GradesByTerritory",
|
14053
14608
|
data: categoryResponses,
|
14609
|
+
resultData: resultData,
|
14054
14610
|
openProblem: openProblem,
|
14611
|
+
isMyStoryStudent: isMyStoryStudent,
|
14055
14612
|
changeOpen: setOpenProblem
|
14056
14613
|
}))), React__default.createElement(material.Grid, {
|
14057
14614
|
item: true,
|
@@ -14209,10 +14766,11 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14209
14766
|
gap: "12px",
|
14210
14767
|
marginTop: "24px"
|
14211
14768
|
}, React__default.createElement(material.Typography, {
|
14769
|
+
className: "chart-title",
|
14212
14770
|
sx: {
|
14213
|
-
fontSize: "
|
14771
|
+
fontSize: "18px",
|
14214
14772
|
fontWeight: 700,
|
14215
|
-
color: styles.
|
14773
|
+
color: styles.gray_500
|
14216
14774
|
}
|
14217
14775
|
}, t(TabList[2].label)), React__default.createElement(CompareGrass, {
|
14218
14776
|
effectSize: effectSize,
|
@@ -14240,19 +14798,23 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14240
14798
|
data: resultData,
|
14241
14799
|
openProblem: "Vulnerable",
|
14242
14800
|
changeOpen: setOpenProblem,
|
14801
|
+
isMyStoryStudent: isMyStoryStudent,
|
14243
14802
|
isPrint: true
|
14244
14803
|
}), React__default.createElement(ProtractedProblem, {
|
14245
14804
|
keyOpen: "ProtractedProblem",
|
14246
14805
|
data: longTimeSpend,
|
14247
14806
|
openProblem: "ProtractedProblem",
|
14248
14807
|
changeOpen: setOpenProblem,
|
14249
|
-
isPrint: true
|
14808
|
+
isPrint: true,
|
14809
|
+
isMyStoryStudent: isMyStoryStudent
|
14250
14810
|
}), React__default.createElement(GradesByTerritory, {
|
14251
14811
|
keyOpen: "GradesByTerritory",
|
14252
14812
|
data: categoryResponses,
|
14813
|
+
resultData: resultData,
|
14253
14814
|
openProblem: "GradesByTerritory",
|
14254
14815
|
changeOpen: setOpenProblem,
|
14255
|
-
isPrint: true
|
14816
|
+
isPrint: true,
|
14817
|
+
isMyStoryStudent: isMyStoryStudent
|
14256
14818
|
})))), React__default.createElement(CreateNewQuestionDialog$1, {
|
14257
14819
|
examSessionId: resultData === null || resultData === void 0 ? void 0 : resultData.examSessionId,
|
14258
14820
|
handleCreateQuestion: handleCreateQuestion,
|
@@ -14287,12 +14849,25 @@ var timeSpanToLocalMoment = function timeSpanToLocalMoment(time, date) {
|
|
14287
14849
|
var value = date ? moment.utc(date).startOf("day").add(totalSeconds, "seconds").local() : moment().startOf("day").add(totalSeconds, "seconds");
|
14288
14850
|
return value;
|
14289
14851
|
};
|
14852
|
+
var convertHHMMSStoSeconds = function convertHHMMSStoSeconds(time) {
|
14853
|
+
var times = time.split(":");
|
14854
|
+
return +times[0] * 60 * 60 + +times[1] * 60 + +times[2];
|
14855
|
+
};
|
14856
|
+
var getRemainTime = function getRemainTime(startTime, duration) {
|
14857
|
+
var timePass = diffFromNow(startTime, "second");
|
14858
|
+
var durationInNumber = convertHHMMSStoSeconds(duration);
|
14859
|
+
if (typeof timePass !== "number") return null;
|
14860
|
+
if (timePass > durationInNumber) return 0;
|
14861
|
+
return durationInNumber - timePass;
|
14862
|
+
};
|
14290
14863
|
|
14291
14864
|
var times = {
|
14292
14865
|
__proto__: null,
|
14293
14866
|
getLocalDayOfWeek: getLocalDayOfWeek,
|
14294
14867
|
getUtcDayOfWeek: getUtcDayOfWeek,
|
14295
|
-
timeSpanToLocalMoment: timeSpanToLocalMoment
|
14868
|
+
timeSpanToLocalMoment: timeSpanToLocalMoment,
|
14869
|
+
convertHHMMSStoSeconds: convertHHMMSStoSeconds,
|
14870
|
+
getRemainTime: getRemainTime
|
14296
14871
|
};
|
14297
14872
|
|
14298
14873
|
var SIGN_IN_SUPER_ADMIN_URL = SUPER_ADMIN_BASE_URL + "/api/auth/login";
|
@@ -14871,9 +15446,9 @@ var Header = function Header(_ref) {
|
|
14871
15446
|
});
|
14872
15447
|
var logo = React.useMemo(function () {
|
14873
15448
|
if (isTeacher) {
|
14874
|
-
return language === Language.en ? React__default.createElement(teacherFullLogoEn, null) : React__default.createElement(teacherFullLogoKo, null);
|
15449
|
+
return language === exports.Language.en ? React__default.createElement(teacherFullLogoEn, null) : React__default.createElement(teacherFullLogoKo, null);
|
14875
15450
|
} else {
|
14876
|
-
return language === Language.en ? React__default.createElement(studentFullLogoEn, null) : React__default.createElement(studentFullLogoKo, null);
|
15451
|
+
return language === exports.Language.en ? React__default.createElement(studentFullLogoEn, null) : React__default.createElement(studentFullLogoKo, null);
|
14877
15452
|
}
|
14878
15453
|
}, [isTeacher, language]);
|
14879
15454
|
var pathname = location.pathname.toLowerCase();
|
@@ -14897,8 +15472,8 @@ var Header = function Header(_ref) {
|
|
14897
15472
|
homeUrl: homeRoute.path,
|
14898
15473
|
role: role,
|
14899
15474
|
history: history,
|
14900
|
-
|
14901
|
-
|
15475
|
+
onSignOut: onSignOut,
|
15476
|
+
hideAcademyName: !isLargerThanXL && headerTabs.length > 6
|
14902
15477
|
})), React__default.createElement(material.Stack, {
|
14903
15478
|
display: "flex",
|
14904
15479
|
flexGrow: 1,
|
@@ -14945,23 +15520,7 @@ var Header = function Header(_ref) {
|
|
14945
15520
|
})), React__default.createElement(material.Stack, {
|
14946
15521
|
direction: "row",
|
14947
15522
|
alignItems: "center"
|
14948
|
-
}, React__default.createElement(
|
14949
|
-
color: styles.gray_700,
|
14950
|
-
className: "fw-bold me-3 text-nowrap flex-shrink-1",
|
14951
|
-
sx: {
|
14952
|
-
minWidth: "60px",
|
14953
|
-
maxWidth: {
|
14954
|
-
md: "100px",
|
14955
|
-
xs: "60px"
|
14956
|
-
},
|
14957
|
-
fontSize: {
|
14958
|
-
md: "16px",
|
14959
|
-
xs: "14px"
|
14960
|
-
},
|
14961
|
-
overflow: "hidden",
|
14962
|
-
textOverflow: "ellipsis"
|
14963
|
-
}
|
14964
|
-
}, user === null || user === void 0 ? void 0 : user.fullName), React__default.createElement(reactRouterDom.Link, {
|
15523
|
+
}, React__default.createElement(reactRouterDom.Link, {
|
14965
15524
|
"aria-current": "page",
|
14966
15525
|
to: homeRoute.path,
|
14967
15526
|
className: "border-none"
|
@@ -15074,7 +15633,11 @@ var AcademyCard = function AcademyCard(_ref) {
|
|
15074
15633
|
}), React.createElement(CardContent, null, React.createElement(Typography, {
|
15075
15634
|
variant: "h6",
|
15076
15635
|
component: "div"
|
15077
|
-
}, academy.name)), React.createElement(CardActions,
|
15636
|
+
}, academy.name)), React.createElement(CardActions, {
|
15637
|
+
sx: {
|
15638
|
+
padding: "16px"
|
15639
|
+
}
|
15640
|
+
}, React.createElement(Button, {
|
15078
15641
|
sx: {
|
15079
15642
|
bgColor: theme.palette.main_theme.dark
|
15080
15643
|
},
|
@@ -15131,6 +15694,221 @@ var AcademyList = function AcademyList(_ref) {
|
|
15131
15694
|
}, React__default.createElement("span", null, t("no_academy_available"), "."))))));
|
15132
15695
|
};
|
15133
15696
|
|
15697
|
+
var ONE_SECOND_IN_MILLISECONDS = 1000;
|
15698
|
+
var useCountDownTimer = function useCountDownTimer(props) {
|
15699
|
+
var startTime = props.startTime,
|
15700
|
+
status = props.status,
|
15701
|
+
code = props.code,
|
15702
|
+
duration = props.duration,
|
15703
|
+
fetchedCount = props.fetchedCount,
|
15704
|
+
onFinish = props.onFinish;
|
15705
|
+
var _useState = React.useState(),
|
15706
|
+
remainTime = _useState[0],
|
15707
|
+
setRemainTime = _useState[1];
|
15708
|
+
var checkStatusRef = React.useRef(null);
|
15709
|
+
var requestRef = React.useRef(null);
|
15710
|
+
var checkLiveExamStatus = React.useCallback(function () {
|
15711
|
+
try {
|
15712
|
+
!!checkStatusRef.current && clearTimeout(checkStatusRef.current);
|
15713
|
+
if (!code || status === ExamStatus$1.Completed) {
|
15714
|
+
return Promise.resolve();
|
15715
|
+
}
|
15716
|
+
var _temp = _catch(function () {
|
15717
|
+
return Promise.resolve(getCheckStatusExam(code)).then(function (res) {
|
15718
|
+
if (res.data.data.status === ExamStatus$1.Completed) {
|
15719
|
+
clearInterval(checkStatusRef.current);
|
15720
|
+
onFinish();
|
15721
|
+
} else {
|
15722
|
+
checkStatusRef.current = setTimeout(checkLiveExamStatus, ONE_SECOND_IN_MILLISECONDS);
|
15723
|
+
}
|
15724
|
+
});
|
15725
|
+
}, function (error) {
|
15726
|
+
console.log({
|
15727
|
+
error: error
|
15728
|
+
});
|
15729
|
+
});
|
15730
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
15731
|
+
} catch (e) {
|
15732
|
+
return Promise.reject(e);
|
15733
|
+
}
|
15734
|
+
}, [code, status, onFinish]);
|
15735
|
+
React.useEffect(function () {
|
15736
|
+
if (status !== ExamStatus$1.InProgress) return;
|
15737
|
+
var animate = function animate() {
|
15738
|
+
if (!startTime || !duration) return;
|
15739
|
+
if (typeof remainTime === "number" && remainTime <= 0) {
|
15740
|
+
onFinish();
|
15741
|
+
return;
|
15742
|
+
}
|
15743
|
+
var remain = getRemainTime(startTime, duration);
|
15744
|
+
if (typeof remain !== "number") {
|
15745
|
+
setRemainTime(undefined);
|
15746
|
+
return;
|
15747
|
+
}
|
15748
|
+
if (remain <= 0) {
|
15749
|
+
setRemainTime(0);
|
15750
|
+
checkLiveExamStatus();
|
15751
|
+
return;
|
15752
|
+
}
|
15753
|
+
setRemainTime(remain || 0);
|
15754
|
+
requestRef.current = requestAnimationFrame(animate);
|
15755
|
+
};
|
15756
|
+
requestRef.current = requestAnimationFrame(animate);
|
15757
|
+
return function () {
|
15758
|
+
!!requestRef.current && cancelAnimationFrame(requestRef.current);
|
15759
|
+
!!checkStatusRef.current && clearTimeout(checkStatusRef.current);
|
15760
|
+
setRemainTime(undefined);
|
15761
|
+
};
|
15762
|
+
}, [startTime, duration, fetchedCount, checkLiveExamStatus]);
|
15763
|
+
React.useEffect(function () {
|
15764
|
+
if (typeof remainTime === "number" && remainTime <= 0) onFinish();
|
15765
|
+
}, [remainTime, onFinish]);
|
15766
|
+
return remainTime;
|
15767
|
+
};
|
15768
|
+
|
15769
|
+
var EXAM_SESSION_URL$1 = BASE_URL + "/api/examSession";
|
15770
|
+
var getCheckStatusExam$1 = function getCheckStatusExam(examCode) {
|
15771
|
+
return api.get(EXAM_SESSION_URL$1 + "/" + examCode + "/status");
|
15772
|
+
};
|
15773
|
+
|
15774
|
+
var useCheckExam = function useCheckExam(code, status) {
|
15775
|
+
var _useState = React.useState({}),
|
15776
|
+
isCheckExam = _useState[0],
|
15777
|
+
setCheckExam = _useState[1];
|
15778
|
+
var isCheck = !code ? false : isCheckExam[code];
|
15779
|
+
var checkExam = function checkExam() {
|
15780
|
+
try {
|
15781
|
+
if (!code || isCheck) return Promise.resolve();
|
15782
|
+
if (status === ExamStatus$1.Completed) {
|
15783
|
+
setCheckExam(function (state) {
|
15784
|
+
var _extends2;
|
15785
|
+
return _extends({}, state, (_extends2 = {}, _extends2[code] = true, _extends2));
|
15786
|
+
});
|
15787
|
+
return Promise.resolve();
|
15788
|
+
}
|
15789
|
+
var _temp = _catch(function () {
|
15790
|
+
return Promise.resolve(getCheckStatusExam$1(code)).then(function () {
|
15791
|
+
setCheckExam(function (state) {
|
15792
|
+
var _extends3;
|
15793
|
+
return _extends({}, state, (_extends3 = {}, _extends3[code] = true, _extends3));
|
15794
|
+
});
|
15795
|
+
});
|
15796
|
+
}, function (error) {
|
15797
|
+
console.log({
|
15798
|
+
error: error
|
15799
|
+
});
|
15800
|
+
});
|
15801
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
15802
|
+
} catch (e) {
|
15803
|
+
return Promise.reject(e);
|
15804
|
+
}
|
15805
|
+
};
|
15806
|
+
React.useEffect(function () {
|
15807
|
+
checkExam();
|
15808
|
+
}, [code]);
|
15809
|
+
return {
|
15810
|
+
isCheck: isCheck
|
15811
|
+
};
|
15812
|
+
};
|
15813
|
+
|
15814
|
+
var useLoadMore = function useLoadMore(props) {
|
15815
|
+
var onLoadMore = props.onLoadMore,
|
15816
|
+
loading = props.loading;
|
15817
|
+
var observerTarget = React.useRef(null);
|
15818
|
+
React.useEffect(function () {
|
15819
|
+
var currentTarget = observerTarget.current;
|
15820
|
+
var observer = new IntersectionObserver(function (entries) {
|
15821
|
+
if (entries[0].isIntersecting && !loading) {
|
15822
|
+
onLoadMore();
|
15823
|
+
}
|
15824
|
+
}, {
|
15825
|
+
threshold: 1
|
15826
|
+
});
|
15827
|
+
if (observerTarget.current) {
|
15828
|
+
observer.observe(observerTarget.current);
|
15829
|
+
}
|
15830
|
+
return function () {
|
15831
|
+
if (currentTarget) {
|
15832
|
+
observer.unobserve(currentTarget);
|
15833
|
+
}
|
15834
|
+
};
|
15835
|
+
}, [observerTarget, loading, onLoadMore]);
|
15836
|
+
return {
|
15837
|
+
observerTarget: observerTarget
|
15838
|
+
};
|
15839
|
+
};
|
15840
|
+
|
15841
|
+
var useVirtualizeList = function useVirtualizeList(totalItems, rowHeight, offsetRow, minRows) {
|
15842
|
+
if (offsetRow === void 0) {
|
15843
|
+
offsetRow = 1;
|
15844
|
+
}
|
15845
|
+
var _useState = React.useState(-1),
|
15846
|
+
startIndex = _useState[0],
|
15847
|
+
setStartIndex = _useState[1];
|
15848
|
+
var _useState2 = React.useState(-1),
|
15849
|
+
endIndex = _useState2[0],
|
15850
|
+
setEndIndex = _useState2[1];
|
15851
|
+
var containerRef = React.useRef(null);
|
15852
|
+
var handleScroll = React.useCallback(function () {
|
15853
|
+
if (containerRef.current) {
|
15854
|
+
var _containerRef$current = containerRef.current,
|
15855
|
+
scrollTop = _containerRef$current.scrollTop,
|
15856
|
+
clientHeight = _containerRef$current.clientHeight;
|
15857
|
+
var itemsPerPage = Math.ceil(clientHeight / rowHeight);
|
15858
|
+
var newStartIndex = Math.max(Math.floor(scrollTop / rowHeight) - offsetRow, 0);
|
15859
|
+
var newEndIndex = Math.min(newStartIndex + itemsPerPage + offsetRow, totalItems - 1);
|
15860
|
+
if (minRows) {
|
15861
|
+
if (totalItems <= minRows) {
|
15862
|
+
newStartIndex = -1;
|
15863
|
+
newEndIndex = -1;
|
15864
|
+
} else {
|
15865
|
+
var total = newEndIndex - newStartIndex;
|
15866
|
+
var diff = minRows - total;
|
15867
|
+
if (diff > 0) {
|
15868
|
+
var valS = diff / 2;
|
15869
|
+
var valE = diff - valS;
|
15870
|
+
if (newStartIndex < valS) {
|
15871
|
+
valE += valS - newStartIndex;
|
15872
|
+
newStartIndex = 0;
|
15873
|
+
}
|
15874
|
+
if (newEndIndex + valE > totalItems - 1) {
|
15875
|
+
valS += newEndIndex + valE - totalItems + 1;
|
15876
|
+
}
|
15877
|
+
newStartIndex = Math.max(newStartIndex - valS, 0);
|
15878
|
+
newEndIndex = Math.min(newEndIndex + valE, totalItems - 1);
|
15879
|
+
}
|
15880
|
+
}
|
15881
|
+
}
|
15882
|
+
setStartIndex(newStartIndex);
|
15883
|
+
setEndIndex(newEndIndex);
|
15884
|
+
}
|
15885
|
+
}, [totalItems, rowHeight, offsetRow]);
|
15886
|
+
React.useEffect(function () {
|
15887
|
+
var container = containerRef.current;
|
15888
|
+
if (container) {
|
15889
|
+
container.addEventListener("scroll", handleScroll);
|
15890
|
+
}
|
15891
|
+
return function () {
|
15892
|
+
if (container) {
|
15893
|
+
container.removeEventListener("scroll", handleScroll);
|
15894
|
+
}
|
15895
|
+
};
|
15896
|
+
}, [handleScroll]);
|
15897
|
+
var handleChangeStartIndex = function handleChangeStartIndex(index) {
|
15898
|
+
setStartIndex(index);
|
15899
|
+
};
|
15900
|
+
var handleChangeEndIndex = function handleChangeEndIndex(index) {
|
15901
|
+
setEndIndex(index);
|
15902
|
+
};
|
15903
|
+
return {
|
15904
|
+
startIndex: startIndex,
|
15905
|
+
endIndex: endIndex,
|
15906
|
+
containerRef: containerRef,
|
15907
|
+
handleChangeStartIndex: handleChangeStartIndex,
|
15908
|
+
handleChangeEndIndex: handleChangeEndIndex
|
15909
|
+
};
|
15910
|
+
};
|
15911
|
+
|
15134
15912
|
exports.moment = moment;
|
15135
15913
|
Object.defineProperty(exports, 'I18nextProvider', {
|
15136
15914
|
enumerable: true,
|
@@ -15210,6 +15988,7 @@ exports.formatTime = formatTime;
|
|
15210
15988
|
exports.getAcademyDomain = getAcademyDomain;
|
15211
15989
|
exports.getAccessToken = getAccessToken;
|
15212
15990
|
exports.getErrorMessage = getErrorMessage;
|
15991
|
+
exports.getOrdinalSuffix = getOrdinalSuffix;
|
15213
15992
|
exports.i18n = i18n;
|
15214
15993
|
exports.minutesToTimeSpan = minutesToTimeSpan;
|
15215
15994
|
exports.setAlert = setAlert;
|
@@ -15224,11 +16003,15 @@ exports.toISOString = toISOString;
|
|
15224
16003
|
exports.useAutoAcademyDomain = useAutoAcademyDomain;
|
15225
16004
|
exports.useCategorySelect = useCategorySelect;
|
15226
16005
|
exports.useChatContainer = useChatContainer;
|
16006
|
+
exports.useCheckExam = useCheckExam;
|
16007
|
+
exports.useCountDownTimer = useCountDownTimer;
|
15227
16008
|
exports.useGoogleSignOut = useGoogleSignOut;
|
15228
16009
|
exports.useLanguage = useLanguage;
|
16010
|
+
exports.useLoadMore = useLoadMore;
|
15229
16011
|
exports.useLogin = useLogin;
|
15230
16012
|
exports.usePusherConversation = usePusherConversation;
|
15231
16013
|
exports.useSubjectSelect = useSubjectSelect;
|
15232
16014
|
exports.useSwitchAcademy = useSwitchAcademy;
|
16015
|
+
exports.useVirtualizeList = useVirtualizeList;
|
15233
16016
|
exports.utcToLocalTime = utcToLocalTime;
|
15234
16017
|
//# sourceMappingURL=index.js.map
|