touchstudy-core 0.1.65 → 0.1.67
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 +1134 -342
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1127 -339
- package/dist/index.modern.js.map +1 -1
- package/dist/layouts/Header.d.ts +1 -1
- package/dist/redux/academies/action.d.ts +2 -0
- package/dist/redux/academies/reducer.d.ts +5 -0
- package/dist/rootReducer.d.ts +6 -0
- 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 +5 -3
- package/dist/tests/performances/do-exam-session2.d.ts +19 -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 +2 -1
- package/dist/utils/hooks/useVirtualizeList.d.ts +9 -0
- package/dist/utils/times.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -14,7 +14,7 @@ import { gapi } from 'gapi-script';
|
|
14
14
|
import 'moment/locale/ko.js';
|
15
15
|
import 'moment/locale/en-au.js';
|
16
16
|
import Pusher from 'pusher-js';
|
17
|
-
import { IoClose, IoCloseOutline, IoSearch } from 'react-icons/io5';
|
17
|
+
import { IoClose, IoCloseCircle, IoLogOut, IoCloseOutline, IoSearch, IoChevronUp, IoChevronDown } from 'react-icons/io5';
|
18
18
|
import i18n from 'i18next';
|
19
19
|
import Box$1 from '@mui/material/Box';
|
20
20
|
import Popover from '@mui/material/Popover';
|
@@ -23,10 +23,10 @@ import IconButton$1 from '@mui/material/IconButton';
|
|
23
23
|
import { GoArrowSwitch } from 'react-icons/go';
|
24
24
|
import { toast } from 'react-toastify';
|
25
25
|
export { ToastContainer, toast } from 'react-toastify';
|
26
|
-
import { IoIosLogOut, IoMdArrowBack } from 'react-icons/io';
|
27
26
|
import Select, { components } from 'react-select';
|
28
27
|
import { FaCaretDown, FaTrash, FaPlus, FaSave, FaPencilAlt, FaPlusCircle, FaTimes, FaSortUp, FaSortDown, FaEye } from 'react-icons/fa';
|
29
28
|
import { PiDotsNineLight } from 'react-icons/pi';
|
29
|
+
import { IoMdArrowBack } from 'react-icons/io';
|
30
30
|
import _ from 'lodash';
|
31
31
|
import { FaPencil } from 'react-icons/fa6';
|
32
32
|
import CreatableSelect from 'react-select/creatable';
|
@@ -103,6 +103,7 @@ var Language;
|
|
103
103
|
Language["en"] = "en";
|
104
104
|
})(Language || (Language = {}));
|
105
105
|
var PrintHeaderClassName = "print-header";
|
106
|
+
var PrintTitleClassName = "print-title";
|
106
107
|
var PrintContentClassName = "print-content";
|
107
108
|
var PrintContainerClassName = "print-container";
|
108
109
|
|
@@ -144,7 +145,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
144
145
|
return target;
|
145
146
|
}
|
146
147
|
|
147
|
-
var styles = {"lighter":"#F0FFF6","light":"#
|
148
|
+
var styles = {"lighter":"#F0FFF6","light":"#89F0B2","less_dark":"#3DC674","dark":"#349056","darker":"#18442A","gray_50":"#FBFBF9","gray_100":"#EAEAE5","gray_300":"#D0D0C8","gray_500":"#9A9A98","gray_700":"#5D5D5B","gray_900":"#363634","btn-login-google":"_2HqmH","block-login":"_wWIyO","box-login":"_38Lo1","btn-primary":"_rd4Uy","dropdown-menu":"_1krbH","header-avatar":"_RQaHE","dropdown-menu-flag":"_XK8oS","dropdown-content":"_3ys4W","dropdown-change":"_ToOW_","item-address":"_3sQlR","item-logout":"_3bqSM","title-address":"_1jgSI","img-avatar":"_35Ttz","item-contact":"_1wc7o","content-text":"_3S4f2","dropdown-content-language":"_3ajui","dropdown-item-language":"_3Y_y4","dropdown-item-language-active":"_CzNMi","dropdown-academy":"_3CMVp","image-academy":"_2ibYC","academy-btn":"_1JMRU","switch-icon":"_N4FNf","dropdown-content-academy":"_31Dr0","dropdown-academy-item":"_3bjcz","noGutters":"_31ZQk","custom-col-2":"_3yXyK","custom-col-3":"_1RsJQ","custom-col-5":"_L42CP","custom-col-10":"_2u6eL","custom-row":"_8x7OP","custom-col":"_1JmTh","custom-col-4":"_3HO1e","custom-col-8":"_Oy31M","custom-col-12":"_3aUKo","custom-container":"_39LRs","form-label":"__Ut-u","form-control":"_2k4dX","btn-outline-primary":"_2PWdX","sort-icons":"_mQvLF","active":"_3oAH-","form-select":"_3W3aw","truncate":"_3NJzN","headers":"_3xnI5","logo-container":"_3YG70","tabBox":"_1CQPn","routerBox":"_3hx2T","tabText":"_3UyhW","router-link-active":"_1TGKA","router-link":"_1AqMh","userImg":"_2RI6G","disabled-link":"_3aVHg","line-clamp":"_3fpky"};
|
148
149
|
|
149
150
|
// A type of promise-like that resolves synchronously and supports only one observer
|
150
151
|
const _Pact = /*#__PURE__*/(function() {
|
@@ -1331,8 +1332,20 @@ var commonReducer = createReducer(initialState, function (builder) {
|
|
1331
1332
|
});
|
1332
1333
|
});
|
1333
1334
|
|
1335
|
+
var setAcademies = createAction("common/setAcademies");
|
1336
|
+
|
1337
|
+
var initialState$1 = {
|
1338
|
+
items: []
|
1339
|
+
};
|
1340
|
+
var commonReducer$1 = createReducer(initialState$1, function (builder) {
|
1341
|
+
builder.addCase(setAcademies, function (state, action) {
|
1342
|
+
state.items = action.payload;
|
1343
|
+
});
|
1344
|
+
});
|
1345
|
+
|
1334
1346
|
var rootReducer = combineReducers({
|
1335
|
-
common: commonReducer
|
1347
|
+
common: commonReducer,
|
1348
|
+
academies: commonReducer$1
|
1336
1349
|
});
|
1337
1350
|
|
1338
1351
|
var store = configureStore({
|
@@ -1861,7 +1874,7 @@ var student_status = "학생별 현황";
|
|
1861
1874
|
var user_manager = "사용자 목록";
|
1862
1875
|
var recent_exam_results = "최근 시험 결과";
|
1863
1876
|
var instructor_name = "강사이름";
|
1864
|
-
var
|
1877
|
+
var institute_name = "학원 이름";
|
1865
1878
|
var total_students = "총 학생수";
|
1866
1879
|
var total_class = "반 수";
|
1867
1880
|
var total_number_students = "총 학생수";
|
@@ -1893,10 +1906,11 @@ var yes = "예";
|
|
1893
1906
|
var no = "아니요";
|
1894
1907
|
var cancel = "취소";
|
1895
1908
|
var confirmation = "확인";
|
1896
|
-
var student_name = "
|
1909
|
+
var student_name = "학생 이름";
|
1897
1910
|
var full_pool_time = "전체풀이시간";
|
1898
1911
|
var number_question = "{{number}}번";
|
1899
1912
|
var number_answer = "{{number}}번";
|
1913
|
+
var answer_no = "{{number}}번";
|
1900
1914
|
var answer_rate = "정답률";
|
1901
1915
|
var seconds = "초";
|
1902
1916
|
var search_placeholder = "시험 이름으로 검색하기";
|
@@ -1912,13 +1926,13 @@ var no_data = "데이터 없음";
|
|
1912
1926
|
var internet_connection_was_lost = "인터넷 연결이 끊어졌습니다";
|
1913
1927
|
var internet_connection_is_back = "인터넷 연결이 다시 돌아왔습니다";
|
1914
1928
|
var problem = "문제";
|
1915
|
-
var number_problem = "{{number}}
|
1929
|
+
var number_problem = "문제 {{number}}";
|
1916
1930
|
var problems = "문제";
|
1917
1931
|
var problem_solving_time = "문제풀이 시간";
|
1918
1932
|
var minutes = "분";
|
1919
1933
|
var correct_rate = "정답률";
|
1920
1934
|
var title = "제목";
|
1921
|
-
var
|
1935
|
+
var exam_duration = "시험 시간";
|
1922
1936
|
var answer_count = "답변 수";
|
1923
1937
|
var question_count = "문제 갯수";
|
1924
1938
|
var multi_choice = "여러 개임";
|
@@ -1936,7 +1950,8 @@ var select_placeholder = "선택하다...";
|
|
1936
1950
|
var view_exam = "시험 보기";
|
1937
1951
|
var back = "뒤쪽에";
|
1938
1952
|
var edit = "편집하기";
|
1939
|
-
var
|
1953
|
+
var date_format_exam = "YYYY년 MM월";
|
1954
|
+
var date_format = "YYYY년 MM월 DD일";
|
1940
1955
|
var date_time_format = "YYYY년 MM월 DD일 HH:mm";
|
1941
1956
|
var date_time_format_12h = "YYYY-MM-DD HH:mm A";
|
1942
1957
|
var full_date_time_format = "YYYY년 MMMM월 DD일 HH:mm:ss";
|
@@ -2184,8 +2199,8 @@ var class_information = "수업정보";
|
|
2184
2199
|
var teachers = "교사";
|
2185
2200
|
var lessons = "수업";
|
2186
2201
|
var new_test = "새로운 시험";
|
2187
|
-
var
|
2188
|
-
var
|
2202
|
+
var manage_saved_exams = "저장된 시험 관리";
|
2203
|
+
var manage_textbook = "교과서 관리";
|
2189
2204
|
var my_question = "내 질문";
|
2190
2205
|
var update_class = "수업 업데이트";
|
2191
2206
|
var create_class = "수업 만들기";
|
@@ -2211,7 +2226,7 @@ var tricky_problems = "까다로웠던 문제";
|
|
2211
2226
|
var issues_vulnerable = "내가 취약한 문제";
|
2212
2227
|
var grades_by_area = "영역별 성적";
|
2213
2228
|
var problems_that_took_a_long_time = "시간이 오래 걸린 문제";
|
2214
|
-
var my_time = "
|
2229
|
+
var my_time = "내 시간";
|
2215
2230
|
var top_time = "상위권 시간";
|
2216
2231
|
var easy_problem = "쉬운 문제";
|
2217
2232
|
var trick_problem = "함정 문제";
|
@@ -2226,8 +2241,8 @@ var chosen = "정답";
|
|
2226
2241
|
var sign_in_with_your_google_account = "Google 계정으로 로그인";
|
2227
2242
|
var it_will_be_generated_automatically_if_not_provided = "제공되지 않으면 자동으로 생성됩니다";
|
2228
2243
|
var academy_not_found = "아카데미를 찾을 수 없습니다";
|
2229
|
-
var
|
2230
|
-
var
|
2244
|
+
var all_notice = "전체 공지";
|
2245
|
+
var institute_notice = "학원 공지";
|
2231
2246
|
var class_notice = "수업 공지";
|
2232
2247
|
var create_account_demo = "계정 데모 만들기";
|
2233
2248
|
var update_data_demo = "데이터 데모 업데이트";
|
@@ -2253,7 +2268,7 @@ var next = "다음";
|
|
2253
2268
|
var complete_processing = "완료 처리";
|
2254
2269
|
var creation_date = "생성 날짜";
|
2255
2270
|
var total_use = "총 사용량";
|
2256
|
-
var
|
2271
|
+
var duration = "지속";
|
2257
2272
|
var code_header = "암호";
|
2258
2273
|
var total_number_of_students_participating = "참여한 총 학생 수";
|
2259
2274
|
var create = "생성하기";
|
@@ -2473,6 +2488,33 @@ var full_name_is_required = "성명은 필수 항목입니다";
|
|
2473
2488
|
var email_is_required = "이메일은 필수입니다";
|
2474
2489
|
var not_found = "찾을 수 없음";
|
2475
2490
|
var enter_text_to_confirm_delete = "삭제를 확인하려면 \"{{text}}\" 를 입력하세요";
|
2491
|
+
var begin_exam = "시험 시작";
|
2492
|
+
var scheduled = "오늘 수업";
|
2493
|
+
var attended = "출석 완료";
|
2494
|
+
var today_classes = "오늘의 수업";
|
2495
|
+
var print_all = "전체 출력";
|
2496
|
+
var exam = "시험";
|
2497
|
+
var me = "나";
|
2498
|
+
var teacher_name = "선생님 성함";
|
2499
|
+
var class_schedule = "수업 시간표";
|
2500
|
+
var summary = "요약";
|
2501
|
+
var load_exam = "시험 로드";
|
2502
|
+
var exam_name = "시험 이름";
|
2503
|
+
var student_phone_number_header = "학생 전화번호";
|
2504
|
+
var parent_phone_number_header = "학부모 전화번호";
|
2505
|
+
var cases = "{{number}}건";
|
2506
|
+
var my_classes = "내 수업";
|
2507
|
+
var choose = "선택하다";
|
2508
|
+
var additional_duration = "추가 기간";
|
2509
|
+
var enter_textbook_name_to_search = "검색할 교재명을 입력하세요";
|
2510
|
+
var select_class_placeholder = "수업을 선택하세요...";
|
2511
|
+
var user_name = "유저 이름";
|
2512
|
+
var vulnerable_detail = "다른 학생들의 정답률은 높은데, 나는 정답을 맞추지 못한 문제들입니다.";
|
2513
|
+
var protracted_problem_detail = "정답 문제 중 풀이 시간을 비교합니다.";
|
2514
|
+
var number_of_correct_answers = "정답 수";
|
2515
|
+
var total_solve_time = "총 풀이 시간";
|
2516
|
+
var number_of_answer = "{{ number }} 개";
|
2517
|
+
var time_comparison = "시간 비교";
|
2476
2518
|
var lang_ko = {
|
2477
2519
|
problem_solving: problem_solving,
|
2478
2520
|
my_story: my_story,
|
@@ -2488,7 +2530,7 @@ var lang_ko = {
|
|
2488
2530
|
user_manager: user_manager,
|
2489
2531
|
recent_exam_results: recent_exam_results,
|
2490
2532
|
instructor_name: instructor_name,
|
2491
|
-
|
2533
|
+
institute_name: institute_name,
|
2492
2534
|
total_students: total_students,
|
2493
2535
|
total_class: total_class,
|
2494
2536
|
total_number_students: total_number_students,
|
@@ -2526,6 +2568,7 @@ var lang_ko = {
|
|
2526
2568
|
full_pool_time: full_pool_time,
|
2527
2569
|
number_question: number_question,
|
2528
2570
|
number_answer: number_answer,
|
2571
|
+
answer_no: answer_no,
|
2529
2572
|
answer_rate: answer_rate,
|
2530
2573
|
seconds: seconds,
|
2531
2574
|
search_placeholder: search_placeholder,
|
@@ -2547,7 +2590,7 @@ var lang_ko = {
|
|
2547
2590
|
minutes: minutes,
|
2548
2591
|
correct_rate: correct_rate,
|
2549
2592
|
title: title,
|
2550
|
-
|
2593
|
+
exam_duration: exam_duration,
|
2551
2594
|
answer_count: answer_count,
|
2552
2595
|
question_count: question_count,
|
2553
2596
|
multi_choice: multi_choice,
|
@@ -2566,6 +2609,7 @@ var lang_ko = {
|
|
2566
2609
|
back: back,
|
2567
2610
|
edit: edit,
|
2568
2611
|
"delete": "삭제하기",
|
2612
|
+
date_format_exam: date_format_exam,
|
2569
2613
|
date_format: date_format,
|
2570
2614
|
date_time_format: date_time_format,
|
2571
2615
|
date_time_format_12h: date_time_format_12h,
|
@@ -2800,8 +2844,8 @@ var lang_ko = {
|
|
2800
2844
|
teachers: teachers,
|
2801
2845
|
lessons: lessons,
|
2802
2846
|
new_test: new_test,
|
2803
|
-
|
2804
|
-
|
2847
|
+
manage_saved_exams: manage_saved_exams,
|
2848
|
+
manage_textbook: manage_textbook,
|
2805
2849
|
my_question: my_question,
|
2806
2850
|
update_class: update_class,
|
2807
2851
|
create_class: create_class,
|
@@ -2842,8 +2886,8 @@ var lang_ko = {
|
|
2842
2886
|
sign_in_with_your_google_account: sign_in_with_your_google_account,
|
2843
2887
|
it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided,
|
2844
2888
|
academy_not_found: academy_not_found,
|
2845
|
-
|
2846
|
-
|
2889
|
+
all_notice: all_notice,
|
2890
|
+
institute_notice: institute_notice,
|
2847
2891
|
class_notice: class_notice,
|
2848
2892
|
create_account_demo: create_account_demo,
|
2849
2893
|
update_data_demo: update_data_demo,
|
@@ -2872,7 +2916,7 @@ var lang_ko = {
|
|
2872
2916
|
complete_processing: complete_processing,
|
2873
2917
|
creation_date: creation_date,
|
2874
2918
|
total_use: total_use,
|
2875
|
-
|
2919
|
+
duration: duration,
|
2876
2920
|
code_header: code_header,
|
2877
2921
|
total_number_of_students_participating: total_number_of_students_participating,
|
2878
2922
|
create: create,
|
@@ -3093,11 +3137,39 @@ var lang_ko = {
|
|
3093
3137
|
full_name_is_required: full_name_is_required,
|
3094
3138
|
email_is_required: email_is_required,
|
3095
3139
|
not_found: not_found,
|
3096
|
-
enter_text_to_confirm_delete: enter_text_to_confirm_delete
|
3140
|
+
enter_text_to_confirm_delete: enter_text_to_confirm_delete,
|
3141
|
+
begin_exam: begin_exam,
|
3142
|
+
scheduled: scheduled,
|
3143
|
+
attended: attended,
|
3144
|
+
today_classes: today_classes,
|
3145
|
+
print_all: print_all,
|
3146
|
+
exam: exam,
|
3147
|
+
me: me,
|
3148
|
+
teacher_name: teacher_name,
|
3149
|
+
class_schedule: class_schedule,
|
3150
|
+
summary: summary,
|
3151
|
+
load_exam: load_exam,
|
3152
|
+
exam_name: exam_name,
|
3153
|
+
student_phone_number_header: student_phone_number_header,
|
3154
|
+
parent_phone_number_header: parent_phone_number_header,
|
3155
|
+
cases: cases,
|
3156
|
+
my_classes: my_classes,
|
3157
|
+
choose: choose,
|
3158
|
+
additional_duration: additional_duration,
|
3159
|
+
enter_textbook_name_to_search: enter_textbook_name_to_search,
|
3160
|
+
"type_at_least_{number}_characters_to_search": "검색하려면 최소 {{ number }}자를 입력하세요",
|
3161
|
+
select_class_placeholder: select_class_placeholder,
|
3162
|
+
user_name: user_name,
|
3163
|
+
vulnerable_detail: vulnerable_detail,
|
3164
|
+
protracted_problem_detail: protracted_problem_detail,
|
3165
|
+
number_of_correct_answers: number_of_correct_answers,
|
3166
|
+
total_solve_time: total_solve_time,
|
3167
|
+
number_of_answer: number_of_answer,
|
3168
|
+
time_comparison: time_comparison
|
3097
3169
|
};
|
3098
3170
|
|
3099
3171
|
var problem_solving$1 = "Problem Solving";
|
3100
|
-
var my_story$1 = "
|
3172
|
+
var my_story$1 = "Exam History";
|
3101
3173
|
var search_find$1 = "Search and find";
|
3102
3174
|
var enter_test_code$1 = "Enter test code";
|
3103
3175
|
var login_success$1 = "Login Success";
|
@@ -3110,7 +3182,7 @@ var student_status$1 = "Student Status";
|
|
3110
3182
|
var user_manager$1 = "User Manager";
|
3111
3183
|
var recent_exam_results$1 = "Recent exam";
|
3112
3184
|
var instructor_name$1 = "Instructor name";
|
3113
|
-
var
|
3185
|
+
var institute_name$1 = "Institute name";
|
3114
3186
|
var total_students$1 = "Total students";
|
3115
3187
|
var total_class$1 = "Total Class";
|
3116
3188
|
var total_number_students$1 = "Total number of students";
|
@@ -3126,10 +3198,10 @@ var time_remaining$1 = "Time remaining";
|
|
3126
3198
|
var number_results$1 = "{{number}} Results";
|
3127
3199
|
var number_result$1 = "{{number}} Result";
|
3128
3200
|
var mins_mins_seconds_seconds$1 = "{{mins}}m {{seconds}}s";
|
3129
|
-
var mins_mins$1 = "{{mins}}
|
3201
|
+
var mins_mins$1 = "{{mins}} Minutes";
|
3130
3202
|
var class_name$1 = "Class name";
|
3131
3203
|
var create_new_exam$1 = "Create exam";
|
3132
|
-
var live_exam$1 = "Live
|
3204
|
+
var live_exam$1 = "Live Exam";
|
3133
3205
|
var there_are_no_recent_exams$1 = "There are no recent exams";
|
3134
3206
|
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?";
|
3135
3207
|
var here$1 = "here";
|
@@ -3146,6 +3218,7 @@ var student_name$1 = "Student name";
|
|
3146
3218
|
var full_pool_time$1 = "Full pool time";
|
3147
3219
|
var number_question$1 = "No.{{number}}";
|
3148
3220
|
var number_answer$1 = "No.{{number}}";
|
3221
|
+
var answer_no$1 = "Ans.{{number}}";
|
3149
3222
|
var answer_rate$1 = "Answer rate";
|
3150
3223
|
var seconds$1 = "s";
|
3151
3224
|
var search_placeholder$1 = "Search by exam name";
|
@@ -3215,7 +3288,7 @@ var email$1 = "Email";
|
|
3215
3288
|
var is_paid$1 = "Is paid";
|
3216
3289
|
var payment_time$1 = "Payment time";
|
3217
3290
|
var payments$1 = "Payments";
|
3218
|
-
var
|
3291
|
+
var exam_duration$1 = "Exam Duration";
|
3219
3292
|
var answer_count$1 = "Answer count";
|
3220
3293
|
var question_count$1 = "Question count";
|
3221
3294
|
var multi_choice$1 = "Is multiple";
|
@@ -3224,8 +3297,9 @@ var view_exam$1 = "View exam";
|
|
3224
3297
|
var update_exam$1 = "Update exam";
|
3225
3298
|
var create_exam$1 = "Create exam";
|
3226
3299
|
var back$1 = "Back";
|
3227
|
-
var
|
3228
|
-
var
|
3300
|
+
var date_format_exam$1 = "MMMM YYYY";
|
3301
|
+
var date_format$1 = "MMM.D YYYY";
|
3302
|
+
var date_time_format$1 = "HH:mm MMM.D YYYY ";
|
3229
3303
|
var date_time_format_12h$1 = "MM-DD-YYYY HH:mm A";
|
3230
3304
|
var full_date_time_format$1 = "MMM Do YYYY HH:mm:ss";
|
3231
3305
|
var total_questions$1 = "Total questions";
|
@@ -3293,8 +3367,8 @@ var button$1 = {
|
|
3293
3367
|
close: "Close",
|
3294
3368
|
send: "Send"
|
3295
3369
|
};
|
3296
|
-
var question_and_answer$1 = "
|
3297
|
-
var problem_number_question$1 = "
|
3370
|
+
var question_and_answer$1 = "My Q&As";
|
3371
|
+
var problem_number_question$1 = "Question {{number}}";
|
3298
3372
|
var teacher_in_charge$1 = "Teacher In Charge";
|
3299
3373
|
var counselor$1 = "Counselor";
|
3300
3374
|
var new_question$1 = "New Question";
|
@@ -3309,7 +3383,7 @@ var no_academies_available$1 = "No academies available";
|
|
3309
3383
|
var not_allow_register$1 = "Not allow to register role";
|
3310
3384
|
var credentials_invalid$1 = "Credentials is invalid";
|
3311
3385
|
var role_is_invalid$1 = "Role is invalid";
|
3312
|
-
var today$1 = "
|
3386
|
+
var today$1 = "Today";
|
3313
3387
|
var user_is_disabled$1 = "User is disabled";
|
3314
3388
|
var cover_image$1 = "Cover image";
|
3315
3389
|
var notification$1 = "Notification";
|
@@ -3364,7 +3438,7 @@ var enter_subject_name_to_search$1 = "Enter subject name to search subjects";
|
|
3364
3438
|
var enter_textbook_title$1 = "Enter textbook title";
|
3365
3439
|
var chapter_name_placeholder$1 = "Enter chapter name";
|
3366
3440
|
var subchapter_name_placeholder$1 = "Enter subchapter name";
|
3367
|
-
var article_number$1 = "
|
3441
|
+
var article_number$1 = "Passage";
|
3368
3442
|
var question_count_format$1 = "No.{{number}}";
|
3369
3443
|
var select_category$1 = "Select category";
|
3370
3444
|
var update_textbook$1 = "Update textbook";
|
@@ -3378,14 +3452,14 @@ var add_new_chapter_to_textbook$1 = "Add new chapter to the textbook";
|
|
3378
3452
|
var add_new_subchapter_to_parent_chapter$1 = "Add new subchapter to the parent chapter ({{ chapterName }})";
|
3379
3453
|
var add$1 = "Add";
|
3380
3454
|
var add_new_article_to_chapter$1 = "Add new article to the chapter ({{ chapterName }})";
|
3381
|
-
var score_format$1 = "{{score}}
|
3455
|
+
var score_format$1 = "{{score}} Points";
|
3382
3456
|
var round$1 = "{{number}} round";
|
3383
3457
|
var number_grade$1 = "Grade {{number}}";
|
3384
3458
|
var print$1 = "Print";
|
3385
3459
|
var school$1 = "School";
|
3386
|
-
var grade$1 = "
|
3387
|
-
var student_phone_number$1 = "Student
|
3388
|
-
var parent_phone_number$1 = "Parent
|
3460
|
+
var grade$1 = "Year";
|
3461
|
+
var student_phone_number$1 = "Student Number";
|
3462
|
+
var parent_phone_number$1 = "Parent Number";
|
3389
3463
|
var update_textbook_title$1 = "Update textbook title";
|
3390
3464
|
var invalid_weekly_day_time$1 = "Invalid weekly day time";
|
3391
3465
|
var no_image$1 = "No image";
|
@@ -3404,7 +3478,7 @@ var switch_academy$1 = "Switch Academy";
|
|
3404
3478
|
var there_are_no_lessons_this_week$1 = "There are no lessons this week";
|
3405
3479
|
var today_lessons$1 = "Today lessons";
|
3406
3480
|
var update_message$1 = "Update message";
|
3407
|
-
var attachment$1 = "
|
3481
|
+
var attachment$1 = "Add File";
|
3408
3482
|
var confirm_delete_message$1 = "Are you sure to delete this message?";
|
3409
3483
|
var download$1 = "Download";
|
3410
3484
|
var full_exam$1 = "Full exam";
|
@@ -3430,8 +3504,8 @@ var my_problem_solving_order$1 = "My problem solving order";
|
|
3430
3504
|
var top_rankings_problem_solving_order$1 = "Top rankings problem solving order";
|
3431
3505
|
var comparison_of_top_rankings_and_problem_solving_order$1 = "Comparison of top rankings and problem-solving order";
|
3432
3506
|
var my_answers$1 = "My answers";
|
3433
|
-
var request_for_consultation$1 = "
|
3434
|
-
var ask_a_question_with_a_problem$1 = "Ask
|
3507
|
+
var request_for_consultation$1 = "Consultation";
|
3508
|
+
var ask_a_question_with_a_problem$1 = "Ask with Question ";
|
3435
3509
|
var live$1 = "live";
|
3436
3510
|
var user_email$1 = "User email";
|
3437
3511
|
var user_academy$1 = {
|
@@ -3459,9 +3533,9 @@ var lessons$1 = "Lessons";
|
|
3459
3533
|
var update_class$1 = "Update class";
|
3460
3534
|
var create_class$1 = "Create class";
|
3461
3535
|
var new_test$1 = "New Test";
|
3462
|
-
var
|
3463
|
-
var
|
3464
|
-
var my_question$1 = "My
|
3536
|
+
var manage_saved_exams$1 = "Manage saved exams";
|
3537
|
+
var manage_textbook$1 = "Manage Textbook";
|
3538
|
+
var my_question$1 = "My Q&As";
|
3465
3539
|
var problem_number$1 = "Problem number";
|
3466
3540
|
var solve_time$1 = "Solve time";
|
3467
3541
|
var comparison_of_top_rankings$1 = "Comparison of top rankings";
|
@@ -3498,8 +3572,8 @@ var chosen$1 = "Answer";
|
|
3498
3572
|
var sign_in_with_your_google_account$1 = "Sign in with your Google Account";
|
3499
3573
|
var it_will_be_generated_automatically_if_not_provided$1 = "It will be generated automatically if not provided";
|
3500
3574
|
var academy_not_found$1 = "Academy not found";
|
3501
|
-
var
|
3502
|
-
var
|
3575
|
+
var all_notice$1 = "All notice";
|
3576
|
+
var institute_notice$1 = "Institute Notice";
|
3503
3577
|
var class_notice$1 = "Class Notice";
|
3504
3578
|
var create_account_demo$1 = "Create Account Demo";
|
3505
3579
|
var update_data_demo$1 = "Update Data Demo";
|
@@ -3525,7 +3599,7 @@ var next$1 = "Next";
|
|
3525
3599
|
var complete_processing$1 = "Complete processing";
|
3526
3600
|
var creation_date$1 = "Creation date";
|
3527
3601
|
var total_use$1 = "Total use";
|
3528
|
-
var
|
3602
|
+
var duration$1 = "Duration";
|
3529
3603
|
var code_header$1 = "Code";
|
3530
3604
|
var total_number_of_students_participating$1 = "Total number of students participating";
|
3531
3605
|
var create$1 = "Create";
|
@@ -3541,7 +3615,7 @@ var time_heatmap_for_each_problem$1 = "Time heatmap for each problem";
|
|
3541
3615
|
var learn_more$1 = "Learn more";
|
3542
3616
|
var total_number_of_problems$1 = "Total number of problems";
|
3543
3617
|
var time_limit$1 = "time_limit";
|
3544
|
-
var add_questions$1 = "Add
|
3618
|
+
var add_questions$1 = "Add Passage";
|
3545
3619
|
var start_exam$1 = "Start Exam";
|
3546
3620
|
var copy_test_code$1 = "Copy Test Code";
|
3547
3621
|
var student_has_joined$1 = "Student has joined:";
|
@@ -3722,6 +3796,33 @@ var full_name_is_required$1 = "Full name is required";
|
|
3722
3796
|
var email_is_required$1 = "Email is required";
|
3723
3797
|
var not_found$1 = "Not found";
|
3724
3798
|
var enter_text_to_confirm_delete$1 = "Enter \"{{text}}\" to confirm delete";
|
3799
|
+
var begin_exam$1 = "Begin Exam";
|
3800
|
+
var scheduled$1 = "Scheduled";
|
3801
|
+
var attended$1 = "Attended";
|
3802
|
+
var today_classes$1 = "Today's Classes";
|
3803
|
+
var print_all$1 = "Print All";
|
3804
|
+
var exam$1 = "Exam";
|
3805
|
+
var me$1 = "Me";
|
3806
|
+
var teacher_name$1 = "Teacher Name";
|
3807
|
+
var class_schedule$1 = "Class Schedule";
|
3808
|
+
var summary$1 = "Summary";
|
3809
|
+
var load_exam$1 = "Load Exam";
|
3810
|
+
var exam_name$1 = "Exam Name";
|
3811
|
+
var student_phone_number_header$1 = "Stud. Number";
|
3812
|
+
var parent_phone_number_header$1 = "Prnt. Number";
|
3813
|
+
var cases$1 = "{{number}} Results";
|
3814
|
+
var my_classes$1 = "My Classes";
|
3815
|
+
var choose$1 = "Choose";
|
3816
|
+
var additional_duration$1 = "Additional duration";
|
3817
|
+
var enter_textbook_name_to_search$1 = "Enter textbook name to search";
|
3818
|
+
var select_class_placeholder$1 = "Select class...";
|
3819
|
+
var user_name$1 = "Username";
|
3820
|
+
var vulnerable_detail$1 = "Other students had a high percentage of correct answers, but I could not answer these questions correctly.";
|
3821
|
+
var protracted_problem_detail$1 = "Compare the solution time among the correct answers.";
|
3822
|
+
var number_of_correct_answers$1 = "Number of correct answers";
|
3823
|
+
var total_solve_time$1 = "Total solve time";
|
3824
|
+
var number_of_answer$1 = "{{ number }}";
|
3825
|
+
var time_comparison$1 = "Time comparison";
|
3725
3826
|
var lang_en = {
|
3726
3827
|
problem_solving: problem_solving$1,
|
3727
3828
|
my_story: my_story$1,
|
@@ -3737,7 +3838,7 @@ var lang_en = {
|
|
3737
3838
|
user_manager: user_manager$1,
|
3738
3839
|
recent_exam_results: recent_exam_results$1,
|
3739
3840
|
instructor_name: instructor_name$1,
|
3740
|
-
|
3841
|
+
institute_name: institute_name$1,
|
3741
3842
|
total_students: total_students$1,
|
3742
3843
|
total_class: total_class$1,
|
3743
3844
|
total_number_students: total_number_students$1,
|
@@ -3775,6 +3876,7 @@ var lang_en = {
|
|
3775
3876
|
full_pool_time: full_pool_time$1,
|
3776
3877
|
number_question: number_question$1,
|
3777
3878
|
number_answer: number_answer$1,
|
3879
|
+
answer_no: answer_no$1,
|
3778
3880
|
answer_rate: answer_rate$1,
|
3779
3881
|
seconds: seconds$1,
|
3780
3882
|
search_placeholder: search_placeholder$1,
|
@@ -3845,7 +3947,7 @@ var lang_en = {
|
|
3845
3947
|
is_paid: is_paid$1,
|
3846
3948
|
payment_time: payment_time$1,
|
3847
3949
|
payments: payments$1,
|
3848
|
-
|
3950
|
+
exam_duration: exam_duration$1,
|
3849
3951
|
answer_count: answer_count$1,
|
3850
3952
|
question_count: question_count$1,
|
3851
3953
|
multi_choice: multi_choice$1,
|
@@ -3854,6 +3956,7 @@ var lang_en = {
|
|
3854
3956
|
update_exam: update_exam$1,
|
3855
3957
|
create_exam: create_exam$1,
|
3856
3958
|
back: back$1,
|
3959
|
+
date_format_exam: date_format_exam$1,
|
3857
3960
|
date_format: date_format$1,
|
3858
3961
|
date_time_format: date_time_format$1,
|
3859
3962
|
date_time_format_12h: date_time_format_12h$1,
|
@@ -4075,8 +4178,8 @@ var lang_en = {
|
|
4075
4178
|
update_class: update_class$1,
|
4076
4179
|
create_class: create_class$1,
|
4077
4180
|
new_test: new_test$1,
|
4078
|
-
|
4079
|
-
|
4181
|
+
manage_saved_exams: manage_saved_exams$1,
|
4182
|
+
manage_textbook: manage_textbook$1,
|
4080
4183
|
my_question: my_question$1,
|
4081
4184
|
problem_number: problem_number$1,
|
4082
4185
|
solve_time: solve_time$1,
|
@@ -4114,8 +4217,8 @@ var lang_en = {
|
|
4114
4217
|
sign_in_with_your_google_account: sign_in_with_your_google_account$1,
|
4115
4218
|
it_will_be_generated_automatically_if_not_provided: it_will_be_generated_automatically_if_not_provided$1,
|
4116
4219
|
academy_not_found: academy_not_found$1,
|
4117
|
-
|
4118
|
-
|
4220
|
+
all_notice: all_notice$1,
|
4221
|
+
institute_notice: institute_notice$1,
|
4119
4222
|
class_notice: class_notice$1,
|
4120
4223
|
create_account_demo: create_account_demo$1,
|
4121
4224
|
update_data_demo: update_data_demo$1,
|
@@ -4144,7 +4247,7 @@ var lang_en = {
|
|
4144
4247
|
complete_processing: complete_processing$1,
|
4145
4248
|
creation_date: creation_date$1,
|
4146
4249
|
total_use: total_use$1,
|
4147
|
-
|
4250
|
+
duration: duration$1,
|
4148
4251
|
code_header: code_header$1,
|
4149
4252
|
total_number_of_students_participating: total_number_of_students_participating$1,
|
4150
4253
|
create: create$1,
|
@@ -4342,7 +4445,35 @@ var lang_en = {
|
|
4342
4445
|
full_name_is_required: full_name_is_required$1,
|
4343
4446
|
email_is_required: email_is_required$1,
|
4344
4447
|
not_found: not_found$1,
|
4345
|
-
enter_text_to_confirm_delete: enter_text_to_confirm_delete$1
|
4448
|
+
enter_text_to_confirm_delete: enter_text_to_confirm_delete$1,
|
4449
|
+
begin_exam: begin_exam$1,
|
4450
|
+
scheduled: scheduled$1,
|
4451
|
+
attended: attended$1,
|
4452
|
+
today_classes: today_classes$1,
|
4453
|
+
print_all: print_all$1,
|
4454
|
+
exam: exam$1,
|
4455
|
+
me: me$1,
|
4456
|
+
teacher_name: teacher_name$1,
|
4457
|
+
class_schedule: class_schedule$1,
|
4458
|
+
summary: summary$1,
|
4459
|
+
load_exam: load_exam$1,
|
4460
|
+
exam_name: exam_name$1,
|
4461
|
+
student_phone_number_header: student_phone_number_header$1,
|
4462
|
+
parent_phone_number_header: parent_phone_number_header$1,
|
4463
|
+
cases: cases$1,
|
4464
|
+
my_classes: my_classes$1,
|
4465
|
+
choose: choose$1,
|
4466
|
+
additional_duration: additional_duration$1,
|
4467
|
+
enter_textbook_name_to_search: enter_textbook_name_to_search$1,
|
4468
|
+
"type_at_least_{number}_characters_to_search": "Type at least {{ number }} characters to search",
|
4469
|
+
select_class_placeholder: select_class_placeholder$1,
|
4470
|
+
user_name: user_name$1,
|
4471
|
+
vulnerable_detail: vulnerable_detail$1,
|
4472
|
+
protracted_problem_detail: protracted_problem_detail$1,
|
4473
|
+
number_of_correct_answers: number_of_correct_answers$1,
|
4474
|
+
total_solve_time: total_solve_time$1,
|
4475
|
+
number_of_answer: number_of_answer$1,
|
4476
|
+
time_comparison: time_comparison$1
|
4346
4477
|
};
|
4347
4478
|
|
4348
4479
|
i18n.use(initReactI18next).init({
|
@@ -4437,13 +4568,20 @@ var TheLanguageDropdown = function TheLanguageDropdown(_ref) {
|
|
4437
4568
|
})));
|
4438
4569
|
};
|
4439
4570
|
|
4440
|
-
var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl, homeUrl) {
|
4571
|
+
var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl, homeUrl, canFetchAcademies) {
|
4441
4572
|
if (role === void 0) {
|
4442
4573
|
role = Role.Student;
|
4443
4574
|
}
|
4575
|
+
if (canFetchAcademies === void 0) {
|
4576
|
+
canFetchAcademies = false;
|
4577
|
+
}
|
4444
4578
|
var dispatch = useDispatch();
|
4445
4579
|
var _useLogin = useLogin(history, homeAcademyUrl, homeUrl),
|
4446
4580
|
handleLoginAccessToken = _useLogin.handleLoginAccessToken;
|
4581
|
+
var academyList = useSelector(function (state) {
|
4582
|
+
var _state$academies;
|
4583
|
+
return state === null || state === void 0 ? void 0 : (_state$academies = state.academies) === null || _state$academies === void 0 ? void 0 : _state$academies.items;
|
4584
|
+
}) || [];
|
4447
4585
|
var _useState = useState(false),
|
4448
4586
|
dropdownOpen = _useState[0],
|
4449
4587
|
setDropdownOpen = _useState[1];
|
@@ -4452,9 +4590,6 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4452
4590
|
return !prevState;
|
4453
4591
|
});
|
4454
4592
|
};
|
4455
|
-
var _useState2 = useState([]),
|
4456
|
-
academyList = _useState2[0],
|
4457
|
-
setAcademyList = _useState2[1];
|
4458
4593
|
var user = useSelector(function (state) {
|
4459
4594
|
var _state$common;
|
4460
4595
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
@@ -4481,7 +4616,7 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4481
4616
|
return Promise.resolve(isSuperAdminUser ? getAcademyList(role) : getUserAcademies(role)).then(function (res) {
|
4482
4617
|
var items = res.data.items || [];
|
4483
4618
|
if (isReFetchUserAcademies) dispatch(setReFetchUserAcademies(false));
|
4484
|
-
|
4619
|
+
dispatch(setAcademies(items));
|
4485
4620
|
var _temp = function () {
|
4486
4621
|
if (!isSuperAdminRole && isSuperAdminUser && role == Role.Admin && items.length > 0) {
|
4487
4622
|
return Promise.resolve(handleSwitchAcademy(items[0], false)).then(function () {});
|
@@ -4531,12 +4666,42 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4531
4666
|
return Promise.reject(e);
|
4532
4667
|
}
|
4533
4668
|
};
|
4669
|
+
var handleLogOutAcademy = function handleLogOutAcademy(selectedAcademy, callback) {
|
4670
|
+
try {
|
4671
|
+
var _temp7 = function _temp7() {
|
4672
|
+
dispatch(setLoading(false));
|
4673
|
+
callback();
|
4674
|
+
};
|
4675
|
+
dispatch(setLoading(true));
|
4676
|
+
var academyDomain = selectedAcademy ? selectedAcademy.domain : undefined;
|
4677
|
+
var _temp6 = _catch(function () {
|
4678
|
+
return Promise.resolve(switchAcademy(0)).then(function (res) {
|
4679
|
+
var data = res.data;
|
4680
|
+
var requestBody = {
|
4681
|
+
accessToken: data.accessToken,
|
4682
|
+
email: user.email,
|
4683
|
+
academyId: 0,
|
4684
|
+
role: role
|
4685
|
+
};
|
4686
|
+
academyDomain && localStorage.setItem(ACADEMY_DOMAIN, academyDomain);
|
4687
|
+
!academyDomain && localStorage.removeItem(ACADEMY_DOMAIN);
|
4688
|
+
return Promise.resolve(handleLoginAccessToken(requestBody, false, user.academyDomain ? academyDomain : undefined)).then(function () {});
|
4689
|
+
});
|
4690
|
+
}, function (error) {
|
4691
|
+
academyDomain && localStorage.removeItem(ACADEMY_DOMAIN);
|
4692
|
+
toast.error(getErrorMessage(t, error));
|
4693
|
+
});
|
4694
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6));
|
4695
|
+
} catch (e) {
|
4696
|
+
return Promise.reject(e);
|
4697
|
+
}
|
4698
|
+
};
|
4534
4699
|
useEffect(function () {
|
4535
|
-
getAcademies();
|
4536
|
-
}, [user === null || user === void 0 ? void 0 : user.academyDomain, user === null || user === void 0 ? void 0 : user.email]);
|
4700
|
+
canFetchAcademies && getAcademies();
|
4701
|
+
}, [canFetchAcademies, user === null || user === void 0 ? void 0 : user.academyDomain, user === null || user === void 0 ? void 0 : user.email]);
|
4537
4702
|
useEffect(function () {
|
4538
|
-
isReFetchUserAcademies && getAcademies(false);
|
4539
|
-
}, [isReFetchUserAcademies]);
|
4703
|
+
canFetchAcademies && isReFetchUserAcademies && getAcademies(false);
|
4704
|
+
}, [canFetchAcademies, isReFetchUserAcademies]);
|
4540
4705
|
var selectedAcademy = useMemo(function () {
|
4541
4706
|
return academyList.find(function (i) {
|
4542
4707
|
var _user$academyDomain;
|
@@ -4548,7 +4713,8 @@ var useSwitchAcademy = function useSwitchAcademy(role, history, homeAcademyUrl,
|
|
4548
4713
|
dropdownOpen: dropdownOpen,
|
4549
4714
|
academyList: academyList,
|
4550
4715
|
toggleDropdown: toggleDropdown,
|
4551
|
-
handleSwitchAcademy: handleSwitchAcademy
|
4716
|
+
handleSwitchAcademy: handleSwitchAcademy,
|
4717
|
+
handleLogOutAcademy: handleLogOutAcademy
|
4552
4718
|
};
|
4553
4719
|
};
|
4554
4720
|
|
@@ -4556,23 +4722,25 @@ var MenuItemCustom = styled(MenuItem)(function () {
|
|
4556
4722
|
return {
|
4557
4723
|
'&.Mui-selected': {
|
4558
4724
|
backgroundColor: styles.light
|
4559
|
-
}
|
4725
|
+
},
|
4726
|
+
padding: "12px 8px"
|
4560
4727
|
};
|
4561
4728
|
});
|
4562
4729
|
var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
4563
|
-
var _user$roles
|
4730
|
+
var _user$roles;
|
4564
4731
|
var role = _ref.role,
|
4565
4732
|
history = _ref.history,
|
4566
4733
|
homeAcademyUrl = _ref.homeAcademyUrl,
|
4567
4734
|
homeUrl = _ref.homeUrl,
|
4568
|
-
|
4569
|
-
|
4735
|
+
hideAcademyName = _ref.hideAcademyName,
|
4736
|
+
onSignOut = _ref.onSignOut;
|
4570
4737
|
var theme = useTheme();
|
4571
4738
|
var isLargerThanLg = useMediaQuery(theme.breakpoints.up("lg"));
|
4572
|
-
var _useSwitchAcademy = useSwitchAcademy(role, history, homeAcademyUrl, homeUrl),
|
4739
|
+
var _useSwitchAcademy = useSwitchAcademy(role, history, homeAcademyUrl, homeUrl, true),
|
4573
4740
|
academyList = _useSwitchAcademy.academyList,
|
4574
4741
|
handleSwitchAcademy = _useSwitchAcademy.handleSwitchAcademy,
|
4575
|
-
selectedAcademy = _useSwitchAcademy.selectedAcademy
|
4742
|
+
selectedAcademy = _useSwitchAcademy.selectedAcademy,
|
4743
|
+
handleLogOutAcademy = _useSwitchAcademy.handleLogOutAcademy;
|
4576
4744
|
var user = useSelector(function (state) {
|
4577
4745
|
var _state$common;
|
4578
4746
|
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
@@ -4594,8 +4762,6 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4594
4762
|
handleClose();
|
4595
4763
|
handleSwitchAcademy(data);
|
4596
4764
|
};
|
4597
|
-
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();
|
4598
|
-
if (!academyList.length) return React__default.createElement(Fragment$1, null);
|
4599
4765
|
var popoverStyle = {
|
4600
4766
|
mx: 1,
|
4601
4767
|
bgcolor: open ? "action.selected" : undefined
|
@@ -4616,7 +4782,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4616
4782
|
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.image ? React__default.createElement("img", {
|
4617
4783
|
src: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.image,
|
4618
4784
|
alt: selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.name
|
4619
|
-
}) : React__default.createElement("span", null
|
4785
|
+
}) : React__default.createElement("span", null)), isLargerThanLg && React__default.createElement(Grid, {
|
4620
4786
|
item: true,
|
4621
4787
|
xs: 0,
|
4622
4788
|
lg: 8
|
@@ -4628,16 +4794,40 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4628
4794
|
display: "flex",
|
4629
4795
|
alignItems: "center"
|
4630
4796
|
}
|
4631
|
-
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.name ? React__default.createElement(
|
4797
|
+
}, selectedAcademy !== null && selectedAcademy !== void 0 && selectedAcademy.name ? React__default.createElement(Stack, {
|
4798
|
+
flexDirection: "column",
|
4799
|
+
gap: "2px"
|
4800
|
+
}, React__default.createElement(Typography, {
|
4632
4801
|
textAlign: "start",
|
4633
4802
|
className: "" + styles["line-clamp"],
|
4634
4803
|
sx: {
|
4635
4804
|
fontSize: 14,
|
4636
|
-
fontWeight:
|
4805
|
+
fontWeight: 900,
|
4806
|
+
lineHeight: '1.5em',
|
4807
|
+
color: styles.gray_900
|
4808
|
+
}
|
4809
|
+
}, user === null || user === void 0 ? void 0 : user.fullName), React__default.createElement(Typography, {
|
4810
|
+
textAlign: "start",
|
4811
|
+
className: "" + styles["line-clamp"],
|
4812
|
+
sx: {
|
4813
|
+
fontSize: 14,
|
4814
|
+
fontWeight: 500,
|
4815
|
+
lineHeight: '1.5em',
|
4816
|
+
color: styles.gray_500
|
4817
|
+
}
|
4818
|
+
}, selectedAcademy.name)) : React__default.createElement(Stack, {
|
4819
|
+
flexDirection: "column",
|
4820
|
+
gap: "2px"
|
4821
|
+
}, React__default.createElement(Typography, {
|
4822
|
+
textAlign: "start",
|
4823
|
+
className: "" + styles["line-clamp"],
|
4824
|
+
sx: {
|
4825
|
+
fontSize: 14,
|
4826
|
+
fontWeight: 900,
|
4637
4827
|
lineHeight: '1.5em',
|
4638
4828
|
color: styles.gray_900
|
4639
4829
|
}
|
4640
|
-
},
|
4830
|
+
}), React__default.createElement(Typography, {
|
4641
4831
|
textAlign: "start",
|
4642
4832
|
className: "" + styles["line-clamp"],
|
4643
4833
|
sx: {
|
@@ -4646,7 +4836,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4646
4836
|
lineHeight: '1.5em',
|
4647
4837
|
color: styles.gray_500
|
4648
4838
|
}
|
4649
|
-
}, t("no_academy_selected")))), React__default.createElement(Grid, {
|
4839
|
+
}, t("no_academy_selected"))))), React__default.createElement(Grid, {
|
4650
4840
|
item: true,
|
4651
4841
|
xs: 6,
|
4652
4842
|
lg: 2,
|
@@ -4668,6 +4858,11 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4668
4858
|
open: !!open,
|
4669
4859
|
anchorEl: open,
|
4670
4860
|
onClose: handleClose,
|
4861
|
+
sx: {
|
4862
|
+
"& .MuiPopover-paper": {
|
4863
|
+
padding: "8px !important"
|
4864
|
+
}
|
4865
|
+
},
|
4671
4866
|
anchorOrigin: {
|
4672
4867
|
vertical: "bottom",
|
4673
4868
|
horizontal: "right"
|
@@ -4693,25 +4888,31 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4693
4888
|
}, React__default.createElement(MenuList, {
|
4694
4889
|
sx: {
|
4695
4890
|
maxHeight: 240,
|
4696
|
-
overflowY: "auto"
|
4891
|
+
overflowY: "auto",
|
4892
|
+
padding: 0
|
4697
4893
|
}
|
4698
4894
|
}, academyList.map(function (option) {
|
4699
|
-
var _option$name$charAt;
|
4700
4895
|
return React__default.createElement(MenuItemCustom, {
|
4701
4896
|
key: option.id,
|
4702
4897
|
selected: option.id === (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id),
|
4703
4898
|
sx: {
|
4704
4899
|
whiteSpace: "wrap",
|
4705
|
-
borderRadius: "6px"
|
4900
|
+
borderRadius: "6px",
|
4901
|
+
display: "flex",
|
4902
|
+
gap: "8px"
|
4706
4903
|
},
|
4707
4904
|
onClick: function onClick() {
|
4708
4905
|
return option.id !== (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id) && handleChangeAcademy(option);
|
4709
4906
|
}
|
4710
4907
|
}, React__default.createElement(Stack, {
|
4711
4908
|
flexDirection: "row",
|
4712
|
-
|
4909
|
+
justifyContent: "space-between",
|
4910
|
+
alignItems: "center",
|
4713
4911
|
position: "relative",
|
4714
4912
|
width: "100%"
|
4913
|
+
}, React__default.createElement(Stack, {
|
4914
|
+
flexDirection: "row",
|
4915
|
+
gap: "12px"
|
4715
4916
|
}, React__default.createElement(Stack, {
|
4716
4917
|
className: styles["image-academy"] + " " + styles["image-academy--item"],
|
4717
4918
|
minWidth: "40px"
|
@@ -4719,7 +4920,7 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4719
4920
|
component: "img",
|
4720
4921
|
alt: option.name,
|
4721
4922
|
src: option.image
|
4722
|
-
}) : React__default.createElement("span", null
|
4923
|
+
}) : React__default.createElement("span", null)), React__default.createElement(Box$1, {
|
4723
4924
|
sx: {
|
4724
4925
|
position: "relative",
|
4725
4926
|
display: "flex",
|
@@ -4733,8 +4934,20 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4733
4934
|
lineHeight: '1.5em',
|
4734
4935
|
fontWeight: 600
|
4735
4936
|
}
|
4736
|
-
}, option.name))))
|
4737
|
-
|
4937
|
+
}, option.name))), option.id === (selectedAcademy === null || selectedAcademy === void 0 ? void 0 : selectedAcademy.id) && React__default.createElement("div", {
|
4938
|
+
onClick: function onClick() {
|
4939
|
+
return handleLogOutAcademy(selectedAcademy, handleClose);
|
4940
|
+
}
|
4941
|
+
}, React__default.createElement(IoCloseCircle, {
|
4942
|
+
size: 18,
|
4943
|
+
color: styles.dark
|
4944
|
+
}))));
|
4945
|
+
})), React__default.createElement(Stack, {
|
4946
|
+
sx: {
|
4947
|
+
borderTop: "1px solid " + styles.gray_100,
|
4948
|
+
my: "8px"
|
4949
|
+
}
|
4950
|
+
}), React__default.createElement(MenuItemCustom, {
|
4738
4951
|
sx: {
|
4739
4952
|
whiteSpace: "wrap",
|
4740
4953
|
borderRadius: "6px"
|
@@ -4748,16 +4961,16 @@ var TheAcademyDropdown = function TheAcademyDropdown(_ref) {
|
|
4748
4961
|
alignItems: "center",
|
4749
4962
|
className: "" + styles["userImg"],
|
4750
4963
|
onClick: onSignOut
|
4751
|
-
}, React__default.createElement(
|
4752
|
-
size:
|
4753
|
-
color:
|
4964
|
+
}, React__default.createElement(IoLogOut, {
|
4965
|
+
size: 18,
|
4966
|
+
color: styles.less_dark
|
4754
4967
|
}), React__default.createElement(Typography, {
|
4755
4968
|
sx: {
|
4756
4969
|
typography: "body2",
|
4757
|
-
p: "8px",
|
4758
4970
|
borderRadius: "4px",
|
4759
4971
|
fontSize: 14,
|
4760
|
-
fontWeight: 700
|
4972
|
+
fontWeight: 700,
|
4973
|
+
color: styles.less_dark
|
4761
4974
|
}
|
4762
4975
|
}, t("logout"))))));
|
4763
4976
|
};
|
@@ -4831,6 +5044,7 @@ var customStyles = {
|
|
4831
5044
|
|
4832
5045
|
var DropdownIndicator = function DropdownIndicator(props) {
|
4833
5046
|
return React__default.createElement(components.DropdownIndicator, Object.assign({}, props), React__default.createElement(FaCaretDown, {
|
5047
|
+
size: 20,
|
4834
5048
|
color: styles.darker
|
4835
5049
|
}));
|
4836
5050
|
};
|
@@ -4969,6 +5183,7 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4969
5183
|
return React__default.createElement(Stack, null, React__default.createElement(Stack, {
|
4970
5184
|
display: "flex",
|
4971
5185
|
gap: "4px",
|
5186
|
+
justifyItems: "center",
|
4972
5187
|
flexDirection: "column"
|
4973
5188
|
}, React__default.createElement("div", {
|
4974
5189
|
style: {
|
@@ -4979,7 +5194,9 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4979
5194
|
sx: {
|
4980
5195
|
fontWeight: 700,
|
4981
5196
|
fontSize: "14px",
|
4982
|
-
color: styles.
|
5197
|
+
color: styles.less_dark,
|
5198
|
+
display: 'flex',
|
5199
|
+
justifyContent: "center"
|
4983
5200
|
}
|
4984
5201
|
}, t("edit"))), React__default.createElement(Stack, {
|
4985
5202
|
border: "1px solid #E4E7EC"
|
@@ -4992,7 +5209,9 @@ var ContentTooltip = function ContentTooltip(_ref) {
|
|
4992
5209
|
sx: {
|
4993
5210
|
fontWeight: 700,
|
4994
5211
|
fontSize: "14px",
|
4995
|
-
color: styles.
|
5212
|
+
color: styles.less_dark,
|
5213
|
+
display: 'flex',
|
5214
|
+
justifyContent: "center"
|
4996
5215
|
}
|
4997
5216
|
}, t("delete")))));
|
4998
5217
|
};
|
@@ -5031,13 +5250,14 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5031
5250
|
className: " " + styles$1["name-sender"],
|
5032
5251
|
display: "flex",
|
5033
5252
|
alignItems: "center",
|
5253
|
+
justifyContent: "end",
|
5034
5254
|
flexDirection: "row"
|
5035
5255
|
}, React__default.createElement(iconPersonNoActive, null), React__default.createElement(Typography, {
|
5036
5256
|
fontWeight: 700,
|
5037
5257
|
fontSize: 14,
|
5038
5258
|
padding: "4px",
|
5039
5259
|
lineHeight: "16.71px",
|
5040
|
-
color: styles.
|
5260
|
+
color: styles.gray_700
|
5041
5261
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName)), React__default.createElement(Stack, {
|
5042
5262
|
display: "flex",
|
5043
5263
|
flexDirection: "row",
|
@@ -5070,11 +5290,7 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5070
5290
|
placement: "top"
|
5071
5291
|
}, React__default.createElement("div", {
|
5072
5292
|
onClick: handleOpenTooltip
|
5073
|
-
}, React__default.createElement(iconMore, null))))), contentType ? React__default.createElement(
|
5074
|
-
borderRadius: "6px",
|
5075
|
-
padding: "12px",
|
5076
|
-
bgcolor: styles.darker
|
5077
|
-
}, React__default.createElement("img", {
|
5293
|
+
}, React__default.createElement(iconMore, null))))), contentType ? React__default.createElement("img", {
|
5078
5294
|
onClick: toggleImageDialog,
|
5079
5295
|
src: content,
|
5080
5296
|
style: {
|
@@ -5082,17 +5298,21 @@ var ChatRightItem = function ChatRightItem(_ref) {
|
|
5082
5298
|
position: "relative",
|
5083
5299
|
objectFit: "contain"
|
5084
5300
|
}
|
5085
|
-
})
|
5301
|
+
}) : React__default.createElement("div", {
|
5086
5302
|
className: styles$1["wrap-content"] + " " + styles$1["content-chat-receiver"],
|
5087
|
-
|
5088
|
-
"float": "inline-end"
|
5089
|
-
|
5090
|
-
|
5303
|
+
style: {
|
5304
|
+
"float": "inline-end",
|
5305
|
+
maxWidth: 400,
|
5306
|
+
background: styles.less_dark
|
5307
|
+
}
|
5091
5308
|
}, React__default.createElement(Typography, {
|
5092
5309
|
fontWeight: 500,
|
5093
5310
|
fontSize: "14px",
|
5094
5311
|
lineHeight: "16.71px",
|
5095
|
-
color: "#
|
5312
|
+
color: "#fff",
|
5313
|
+
sx: {
|
5314
|
+
wordBreak: "break-word"
|
5315
|
+
}
|
5096
5316
|
}, content))))));
|
5097
5317
|
};
|
5098
5318
|
|
@@ -5127,33 +5347,29 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
5127
5347
|
fontWeight: 500,
|
5128
5348
|
fontSize: 14,
|
5129
5349
|
lineHeight: "16.71px",
|
5130
|
-
color: styles.
|
5131
|
-
}, t("
|
5350
|
+
color: styles.gray_700
|
5351
|
+
}, t("teacher")), React__default.createElement(Typography, {
|
5132
5352
|
fontWeight: 700,
|
5133
5353
|
fontSize: 14,
|
5134
5354
|
lineHeight: "16.71px",
|
5135
|
-
color: styles.
|
5355
|
+
color: styles.gray_700
|
5136
5356
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName)) : React__default.createElement(Fragment$1, null, React__default.createElement(Typography, {
|
5137
5357
|
fontWeight: 700,
|
5138
5358
|
fontSize: 14,
|
5139
5359
|
lineHeight: "16.71px",
|
5140
|
-
color: styles.
|
5360
|
+
color: styles.gray_700
|
5141
5361
|
}, sender === null || sender === void 0 ? void 0 : sender.fullName), React__default.createElement(Typography, {
|
5142
5362
|
fontWeight: 500,
|
5143
5363
|
fontSize: 14,
|
5144
5364
|
lineHeight: "16.71px",
|
5145
|
-
color: styles.
|
5365
|
+
color: styles.gray_700
|
5146
5366
|
}, t("student")))), React__default.createElement(Box, {
|
5147
5367
|
padding: "4px 0px"
|
5148
5368
|
}), React__default.createElement(Stack, {
|
5149
5369
|
display: "flex",
|
5150
5370
|
flexDirection: "row",
|
5151
5371
|
gap: "8px"
|
5152
|
-
}, contentType ? React__default.createElement(
|
5153
|
-
borderRadius: "6px",
|
5154
|
-
padding: "12px",
|
5155
|
-
bgcolor: styles.darker
|
5156
|
-
}, React__default.createElement("img", {
|
5372
|
+
}, contentType ? React__default.createElement("img", {
|
5157
5373
|
onClick: toggleImageDialog,
|
5158
5374
|
src: content,
|
5159
5375
|
style: {
|
@@ -5161,13 +5377,19 @@ var ChatLeftItem = function ChatLeftItem(_ref) {
|
|
5161
5377
|
position: "relative",
|
5162
5378
|
objectFit: "contain"
|
5163
5379
|
}
|
5164
|
-
})
|
5165
|
-
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"]
|
5380
|
+
}) : React__default.createElement("div", {
|
5381
|
+
className: styles$1["wrap-content"] + " " + styles$1["content-chat-sender"],
|
5382
|
+
style: {
|
5383
|
+
maxWidth: 400
|
5384
|
+
}
|
5166
5385
|
}, React__default.createElement(Typography, {
|
5167
|
-
fontWeight:
|
5386
|
+
fontWeight: 500,
|
5168
5387
|
fontSize: "14px",
|
5169
5388
|
lineHeight: "16.71px",
|
5170
|
-
color:
|
5389
|
+
color: styles.gray_700,
|
5390
|
+
sx: {
|
5391
|
+
wordBreak: "break-word"
|
5392
|
+
}
|
5171
5393
|
}, content)))));
|
5172
5394
|
};
|
5173
5395
|
|
@@ -5705,7 +5927,7 @@ var InputChat = function InputChat(_ref) {
|
|
5705
5927
|
fullWidth: true,
|
5706
5928
|
className: styles$1["btn-send"],
|
5707
5929
|
sx: {
|
5708
|
-
bgcolor: isCompleted ? styles.light + " !important" : styles.
|
5930
|
+
bgcolor: isCompleted ? styles.light + " !important" : styles.less_dark
|
5709
5931
|
},
|
5710
5932
|
disabled: isCompleted,
|
5711
5933
|
onClick: handleSubmit
|
@@ -5726,13 +5948,13 @@ var InputChat = function InputChat(_ref) {
|
|
5726
5948
|
borderWidth: "1px"
|
5727
5949
|
}
|
5728
5950
|
}, React__default.createElement(iconPlusCircle, {
|
5729
|
-
color: styles.
|
5951
|
+
color: styles.less_dark
|
5730
5952
|
}), React__default.createElement(Typography, {
|
5731
5953
|
fontWeight: 700,
|
5732
5954
|
fontSize: "13px",
|
5733
5955
|
lineHeight: "15.51px",
|
5734
5956
|
sx: {
|
5735
|
-
color: styles.
|
5957
|
+
color: styles.less_dark
|
5736
5958
|
}
|
5737
5959
|
}, t("attachment")), React__default.createElement("input", {
|
5738
5960
|
type: "file",
|
@@ -5766,6 +5988,31 @@ var ellipsisText = function ellipsisText(text, maxLength) {
|
|
5766
5988
|
if (!text) return text;
|
5767
5989
|
return (text === null || text === void 0 ? void 0 : text.length) > maxLength ? text.slice(0, maxLength) + " ..." : text;
|
5768
5990
|
};
|
5991
|
+
var getOrdinalSuffix = function getOrdinalSuffix(number, lang) {
|
5992
|
+
var suffixes = {
|
5993
|
+
en: ['th', 'st', 'nd', 'rd'],
|
5994
|
+
ko: ['']
|
5995
|
+
};
|
5996
|
+
switch (lang) {
|
5997
|
+
case 'en':
|
5998
|
+
var j = number % 10;
|
5999
|
+
var k = number % 100;
|
6000
|
+
if (j === 1 && k !== 11) {
|
6001
|
+
return suffixes.en[1];
|
6002
|
+
}
|
6003
|
+
if (j === 2 && k !== 12) {
|
6004
|
+
return suffixes.en[2];
|
6005
|
+
}
|
6006
|
+
if (j === 3 && k !== 13) {
|
6007
|
+
return suffixes.en[3];
|
6008
|
+
}
|
6009
|
+
return suffixes.en[0];
|
6010
|
+
case 'ko':
|
6011
|
+
return suffixes.ko[0];
|
6012
|
+
default:
|
6013
|
+
return '';
|
6014
|
+
}
|
6015
|
+
};
|
5769
6016
|
var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
5770
6017
|
var uniqueCategories = new Set();
|
5771
6018
|
var filterCategories = categories.filter(function (category) {
|
@@ -5785,6 +6032,24 @@ var formatDataMyAnswer = function formatDataMyAnswer(inputData, categories) {
|
|
5785
6032
|
});
|
5786
6033
|
return questionsByCategory;
|
5787
6034
|
};
|
6035
|
+
var totalSolveTimeCategories = function totalSolveTimeCategories(inputData, categories) {
|
6036
|
+
var uniqueCategories = new Set();
|
6037
|
+
var filterCategories = categories.filter(function (category) {
|
6038
|
+
if (!uniqueCategories.has(category.name)) {
|
6039
|
+
uniqueCategories.add(category.name);
|
6040
|
+
return true;
|
6041
|
+
}
|
6042
|
+
return false;
|
6043
|
+
});
|
6044
|
+
var questionsByCategory = filterCategories.map(function (category) {
|
6045
|
+
return _extends({}, category, {
|
6046
|
+
totalSolveTime: inputData.questions.reduce(function (init, question) {
|
6047
|
+
return question.category.name === category.name ? init += question.duration : init;
|
6048
|
+
}, 0)
|
6049
|
+
});
|
6050
|
+
});
|
6051
|
+
return questionsByCategory;
|
6052
|
+
};
|
5788
6053
|
var formatTimeSecond = function formatTimeSecond(duration, t) {
|
5789
6054
|
duration = Math.round(duration);
|
5790
6055
|
return "" + (duration < 60 ? "" + duration + t("seconds") : t("mins_mins_seconds_seconds", {
|
@@ -5836,7 +6101,6 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5836
6101
|
display: "flex",
|
5837
6102
|
alignItems: "center",
|
5838
6103
|
gap: "24px",
|
5839
|
-
border: "1px solid #EBEBFF",
|
5840
6104
|
borderRadius: "6px"
|
5841
6105
|
}, React__default.createElement(Box, {
|
5842
6106
|
display: "flex",
|
@@ -5844,21 +6108,21 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5844
6108
|
flexDirection: "row",
|
5845
6109
|
gap: "8px"
|
5846
6110
|
}, React__default.createElement(iconPersonNoActive, {
|
5847
|
-
color: styles.
|
6111
|
+
color: styles.gray_700
|
5848
6112
|
}), isTabletUp && React__default.createElement(Typography, {
|
5849
6113
|
fontWeight: 500,
|
5850
6114
|
fontSize: "14px",
|
5851
6115
|
lineHeight: "16.71px",
|
5852
|
-
color: styles.
|
5853
|
-
}, t("
|
5854
|
-
fontWeight:
|
6116
|
+
color: styles.gray_700
|
6117
|
+
}, t("teacher"))), React__default.createElement(Typography, {
|
6118
|
+
fontWeight: 500,
|
5855
6119
|
fontSize: "14px",
|
5856
6120
|
lineHeight: "16.71px",
|
5857
|
-
color: styles.
|
6121
|
+
color: styles.gray_700
|
5858
6122
|
}, ellipsisText(teacherName || "", 15))), !!examTitle && React__default.createElement(Box, {
|
5859
6123
|
display: "flex",
|
5860
6124
|
alignItems: "start",
|
5861
|
-
color: styles.
|
6125
|
+
color: styles.gray_700,
|
5862
6126
|
gap: "6px",
|
5863
6127
|
flexDirection: "column"
|
5864
6128
|
}, React__default.createElement(Typography, {
|
@@ -5872,13 +6136,16 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5872
6136
|
}, React__default.createElement(Typography, {
|
5873
6137
|
fontWeight: 600,
|
5874
6138
|
fontSize: "12px",
|
5875
|
-
lineHeight: "14.2px"
|
5876
|
-
|
6139
|
+
lineHeight: "14.2px",
|
6140
|
+
sx: {
|
6141
|
+
color: styles.gray_700
|
6142
|
+
}
|
6143
|
+
}, "LIVE " + t('exam')), filterDurationExam && React__default.createElement(Typography, {
|
5877
6144
|
fontWeight: 500,
|
5878
6145
|
fontSize: "12px",
|
5879
6146
|
lineHeight: "14.32px",
|
5880
6147
|
sx: {
|
5881
|
-
color:
|
6148
|
+
color: styles.gray_500
|
5882
6149
|
}
|
5883
6150
|
}, (!!filterDurationExam.hours() ? filterDurationExam.hours() + " " + t("hour") : "") + " " + (!!filterDurationExam.minutes() ? filterDurationExam.minutes() + " " + t("minute") : "") + " " + (!!filterDurationExam.seconds() ? filterDurationExam.seconds() + " " + t("second") : "")))), React__default.createElement(Box, {
|
5884
6151
|
display: "flex",
|
@@ -5900,16 +6167,16 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5900
6167
|
fontWeight: 700,
|
5901
6168
|
fontSize: "12px",
|
5902
6169
|
lineHeight: "14.32px",
|
5903
|
-
color: styles.
|
6170
|
+
color: styles.less_dark
|
5904
6171
|
}, t("points", {
|
5905
|
-
number: score
|
6172
|
+
number: score || 0
|
5906
6173
|
})), React__default.createElement(Typography, {
|
5907
6174
|
fontWeight: 700,
|
5908
6175
|
fontSize: "12px",
|
5909
6176
|
lineHeight: "14.32px",
|
5910
|
-
color:
|
6177
|
+
color: styles.gray_300
|
5911
6178
|
}, "/", t("points", {
|
5912
|
-
number: totalScore
|
6179
|
+
number: totalScore || 0
|
5913
6180
|
}))), React__default.createElement(Typography, {
|
5914
6181
|
fontWeight: 500,
|
5915
6182
|
fontSize: "12px",
|
@@ -5968,7 +6235,7 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
5968
6235
|
color: styles.darker
|
5969
6236
|
}, examTitle ? React__default.createElement(Typography, {
|
5970
6237
|
fontWeight: 600,
|
5971
|
-
fontSize: "
|
6238
|
+
fontSize: "11px",
|
5972
6239
|
lineHeight: "14.32px"
|
5973
6240
|
}, ellipsisText(examTitle || "", 10)) : React__default.createElement(Box, {
|
5974
6241
|
display: "flex",
|
@@ -6002,12 +6269,12 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
6002
6269
|
borderColor: styles.less_dark,
|
6003
6270
|
borderRadius: "6px"
|
6004
6271
|
}, React__default.createElement(iconChecked, {
|
6005
|
-
color: styles.
|
6272
|
+
color: styles.less_dark
|
6006
6273
|
}), React__default.createElement(Typography, {
|
6007
6274
|
fontWeight: 700,
|
6008
6275
|
fontSize: "13px",
|
6009
6276
|
lineHeight: "15.51px",
|
6010
|
-
color: styles.
|
6277
|
+
color: styles.less_dark
|
6011
6278
|
}, t('complete_processing')))) : React__default.createElement("div", null));
|
6012
6279
|
};
|
6013
6280
|
return React__default.createElement(Grid, {
|
@@ -6022,9 +6289,9 @@ var ChatHeader = function ChatHeader(_ref) {
|
|
6022
6289
|
}, React__default.createElement(Typography, {
|
6023
6290
|
fontWeight: 800,
|
6024
6291
|
fontSize: "20px",
|
6025
|
-
color: styles.
|
6292
|
+
color: styles.less_dark,
|
6026
6293
|
lineHeight: "23.87px"
|
6027
|
-
}, t("question_and_answer"))), renderHeader(), React__default.createElement(ConfirmDialog, {
|
6294
|
+
}, isStudent ? t("question_and_answer") : t("q&a"))), renderHeader(), React__default.createElement(ConfirmDialog, {
|
6028
6295
|
open: openDialog,
|
6029
6296
|
toggle: toggleDialog,
|
6030
6297
|
text: t("are_you_sure_you_want_to_complete_this_conversation"),
|
@@ -6759,17 +7026,14 @@ var BpIcon = styled('span')(function (_ref) {
|
|
6759
7026
|
};
|
6760
7027
|
});
|
6761
7028
|
var BpCheckedIcon = styled(BpIcon)({
|
6762
|
-
backgroundColor:
|
7029
|
+
backgroundColor: "#fff",
|
6763
7030
|
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
|
6764
7031
|
'&::before': {
|
6765
7032
|
display: 'block',
|
6766
7033
|
width: 16,
|
6767
7034
|
height: 16,
|
6768
|
-
backgroundImage:
|
7035
|
+
backgroundImage: "radial-gradient(" + styles.less_dark + " 36%,transparent 40%)",
|
6769
7036
|
content: '""'
|
6770
|
-
},
|
6771
|
-
'input:hover ~ &': {
|
6772
|
-
backgroundColor: styles.dark
|
6773
7037
|
}
|
6774
7038
|
});
|
6775
7039
|
var QuestionView = function QuestionView(_ref2) {
|
@@ -6829,7 +7093,7 @@ var QuestionView = function QuestionView(_ref2) {
|
|
6829
7093
|
mb: "16px"
|
6830
7094
|
}, React__default.createElement(FormControl, {
|
6831
7095
|
style: {
|
6832
|
-
width: "
|
7096
|
+
width: "168px"
|
6833
7097
|
}
|
6834
7098
|
}, React__default.createElement(ScoreSelector, {
|
6835
7099
|
value: question.score,
|
@@ -7084,7 +7348,7 @@ var ArticleGroupView = function ArticleGroupView(_ref) {
|
|
7084
7348
|
}, React__default.createElement(FormGroup, null, React__default.createElement(FormLabel, {
|
7085
7349
|
htmlFor: "question_count",
|
7086
7350
|
className: styles$2["question-label"] + " form-label"
|
7087
|
-
}, t("
|
7351
|
+
}, t("questions")), React__default.createElement(QuestionCountSelector, {
|
7088
7352
|
id: "question_count",
|
7089
7353
|
value: questionCount,
|
7090
7354
|
onChange: handleChangeQuestionCount,
|
@@ -7383,9 +7647,11 @@ var ChapterBox = function ChapterBox(_ref) {
|
|
7383
7647
|
onUpdateArticleQuestion: onUpdateArticleQuestion,
|
7384
7648
|
onRemoveChapter: onRemoveChapter
|
7385
7649
|
});
|
7386
|
-
}), data.subChapters.length === 0 && data.articles.map(function (article) {
|
7650
|
+
}), data.subChapters.length === 0 && data.articles.map(function (article, index) {
|
7387
7651
|
var _article$category;
|
7388
|
-
return React__default.createElement(Stack,
|
7652
|
+
return React__default.createElement(Stack, {
|
7653
|
+
key: index
|
7654
|
+
}, React__default.createElement(Stack, {
|
7389
7655
|
display: "flex",
|
7390
7656
|
flexDirection: "row",
|
7391
7657
|
gap: "8px",
|
@@ -7460,6 +7726,14 @@ var deleteTextbookApi = function deleteTextbookApi(textbookId, role) {
|
|
7460
7726
|
});
|
7461
7727
|
};
|
7462
7728
|
|
7729
|
+
var ExamStatus$1;
|
7730
|
+
(function (ExamStatus) {
|
7731
|
+
ExamStatus[ExamStatus["Default"] = 0] = "Default";
|
7732
|
+
ExamStatus[ExamStatus["Pending"] = 1] = "Pending";
|
7733
|
+
ExamStatus[ExamStatus["InProgress"] = 2] = "InProgress";
|
7734
|
+
ExamStatus[ExamStatus["Completed"] = 3] = "Completed";
|
7735
|
+
})(ExamStatus$1 || (ExamStatus$1 = {}));
|
7736
|
+
|
7463
7737
|
var OrderType;
|
7464
7738
|
(function (OrderType) {
|
7465
7739
|
OrderType["ASC"] = "ASC";
|
@@ -7470,7 +7744,8 @@ var OrderType;
|
|
7470
7744
|
|
7471
7745
|
var index = {
|
7472
7746
|
__proto__: null,
|
7473
|
-
get OrderType () { return OrderType; }
|
7747
|
+
get OrderType () { return OrderType; },
|
7748
|
+
get ExamStatus () { return ExamStatus$1; }
|
7474
7749
|
};
|
7475
7750
|
|
7476
7751
|
var TextbookSortBy;
|
@@ -7484,20 +7759,13 @@ var ExamType;
|
|
7484
7759
|
ExamType["Normal"] = "Normal";
|
7485
7760
|
ExamType["Standard"] = "Standard";
|
7486
7761
|
})(ExamType || (ExamType = {}));
|
7487
|
-
var ExamStatus$
|
7762
|
+
var ExamStatus$2;
|
7488
7763
|
(function (ExamStatus) {
|
7489
7764
|
ExamStatus["Default"] = "Default";
|
7490
7765
|
ExamStatus["Pending"] = "Pending";
|
7491
7766
|
ExamStatus["InProgress"] = "InProgress";
|
7492
7767
|
ExamStatus["Completed"] = "Completed";
|
7493
|
-
})(ExamStatus$
|
7494
|
-
var ExamStatusNumber;
|
7495
|
-
(function (ExamStatusNumber) {
|
7496
|
-
ExamStatusNumber[ExamStatusNumber["Default"] = 0] = "Default";
|
7497
|
-
ExamStatusNumber[ExamStatusNumber["Pending"] = 1] = "Pending";
|
7498
|
-
ExamStatusNumber[ExamStatusNumber["InProgress"] = 2] = "InProgress";
|
7499
|
-
ExamStatusNumber[ExamStatusNumber["Completed"] = 3] = "Completed";
|
7500
|
-
})(ExamStatusNumber || (ExamStatusNumber = {}));
|
7768
|
+
})(ExamStatus$2 || (ExamStatus$2 = {}));
|
7501
7769
|
|
7502
7770
|
var TEXTBOOK_HEADERS = [{
|
7503
7771
|
title: "#"
|
@@ -7529,7 +7797,7 @@ var DEFAULT_EXAM_REQUEST = {
|
|
7529
7797
|
subjectId: 0
|
7530
7798
|
};
|
7531
7799
|
var TEXTBOOK_PAGE_TITLE = "textbooks";
|
7532
|
-
var TEXT_BOOK_SEARCH_PLACEHOLDER = "
|
7800
|
+
var TEXT_BOOK_SEARCH_PLACEHOLDER = "enter_textbook_name_to_search";
|
7533
7801
|
var TextbookDefaultQuery = {
|
7534
7802
|
pageSize: 12,
|
7535
7803
|
currentPage: 1,
|
@@ -9158,7 +9426,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9158
9426
|
}, React__default.createElement("label", {
|
9159
9427
|
className: styles["form-label"] + " " + styles$2["question-label"],
|
9160
9428
|
htmlFor: "title"
|
9161
|
-
}, t("
|
9429
|
+
}, t("exam_name")), React__default.createElement("input", {
|
9162
9430
|
disabled: isDisabled,
|
9163
9431
|
className: "" + styles["form-control"],
|
9164
9432
|
value: exam.title,
|
@@ -9172,7 +9440,7 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9172
9440
|
}, React__default.createElement("label", {
|
9173
9441
|
className: styles["form-label"] + " " + styles$2["question-label"],
|
9174
9442
|
htmlFor: "duration"
|
9175
|
-
}, t("
|
9443
|
+
}, t("exam_duration")), React__default.createElement(CustomSelect, {
|
9176
9444
|
inputId: "duration",
|
9177
9445
|
value: exam.duration,
|
9178
9446
|
options: durationOptions,
|
@@ -9215,8 +9483,12 @@ var ExamDetailView = function ExamDetailView(_ref) {
|
|
9215
9483
|
}, React__default.createElement(Button, {
|
9216
9484
|
variant: 'outlined',
|
9217
9485
|
sx: {
|
9218
|
-
color: styles.
|
9219
|
-
|
9486
|
+
color: styles.less_dark,
|
9487
|
+
border: 'none',
|
9488
|
+
'&:hover': {
|
9489
|
+
border: "none",
|
9490
|
+
bgcolor: "#FFF"
|
9491
|
+
}
|
9220
9492
|
},
|
9221
9493
|
disabled: isDisabled,
|
9222
9494
|
className: "w-100 d-flex justify-content-center align-items-center " + styles$2["question-btn"] + " mt-3",
|
@@ -10066,6 +10338,14 @@ var getCheckStatusExam = function getCheckStatusExam(examCode) {
|
|
10066
10338
|
var toNumberOrder = function toNumberOrder(value) {
|
10067
10339
|
return "The " + value + (value % 10 === 1 ? 'st' : value % 10 === 2 ? 'nd' : value % 10 === 3 ? 'rd' : 'th');
|
10068
10340
|
};
|
10341
|
+
var formatDuration = function formatDuration(t, duration) {
|
10342
|
+
if (!duration) return "0" + t("seconds");
|
10343
|
+
var totalTime = Math.round(duration);
|
10344
|
+
return totalTime > 60 ? t("mins_mins_seconds_seconds", {
|
10345
|
+
mins: Math.floor(totalTime / 60),
|
10346
|
+
seconds: totalTime % 60
|
10347
|
+
}) : "" + Math.round(duration) + t("seconds");
|
10348
|
+
};
|
10069
10349
|
|
10070
10350
|
var ORDER_NUMBERS = {
|
10071
10351
|
1: "the_first",
|
@@ -10773,6 +11053,7 @@ var CATEGORY_RESPONSES = [{
|
|
10773
11053
|
percentageAmongStudents: 40
|
10774
11054
|
}];
|
10775
11055
|
var DEFAULT_LINE_CHART_OPTIONS = {
|
11056
|
+
colors: ["#3DC674", "#C3099A"],
|
10776
11057
|
chart: {
|
10777
11058
|
type: "line",
|
10778
11059
|
toolbar: {
|
@@ -11116,6 +11397,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11116
11397
|
}
|
11117
11398
|
}
|
11118
11399
|
}),
|
11400
|
+
colors: ['#3DC674', '#C3099A'],
|
11119
11401
|
xaxis: _extends({}, DEFAULT_LINE_CHART_OPTIONS.xaxis, {
|
11120
11402
|
categories: ["."].concat(Array.from({
|
11121
11403
|
length: questionLength
|
@@ -11140,13 +11422,13 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11140
11422
|
var series = (_allSeries$dataChartI = allSeries[dataChartIndex]) != null ? _allSeries$dataChartI : defaultSeries(t);
|
11141
11423
|
var handleExportPdf = function handleExportPdf() {
|
11142
11424
|
try {
|
11143
|
-
var
|
11425
|
+
var _temp26 = function _temp26(_result) {
|
11144
11426
|
if (_exit) return _result;
|
11145
11427
|
dispatch(setLoading(false));
|
11146
11428
|
};
|
11147
11429
|
var _exit = false;
|
11148
11430
|
dispatch(setLoading(true));
|
11149
|
-
var
|
11431
|
+
var _temp25 = _catch(function () {
|
11150
11432
|
var canvas = document.querySelector("#canvas");
|
11151
11433
|
var headerCanvas = document.querySelector("#header-canvas");
|
11152
11434
|
if (!canvas || !headerCanvas) {
|
@@ -11168,7 +11450,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11168
11450
|
var imgWidth = WIDTH_PAPER;
|
11169
11451
|
var chartWidth = WIDTH_PAPER - 20;
|
11170
11452
|
return Promise.resolve(html2canvas(headerCanvas)).then(function (header) {
|
11171
|
-
function
|
11453
|
+
function _temp24() {
|
11172
11454
|
doc.save("download.pdf");
|
11173
11455
|
}
|
11174
11456
|
var imgHeaderHeight = header.height * imgWidth / header.width;
|
@@ -11176,16 +11458,16 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11176
11458
|
doc.addImage(imgHeaderData, 'PNG', 0, 0, imgWidth, imgHeaderHeight);
|
11177
11459
|
line += imgHeaderHeight;
|
11178
11460
|
if (line > HEIGHT_PAPER) breakPage();
|
11179
|
-
var
|
11461
|
+
var _temp23 = function () {
|
11180
11462
|
if (canvas && canvas.childElementCount > 0) {
|
11181
11463
|
var _index = 0;
|
11182
|
-
var
|
11464
|
+
var _temp22 = _for(function () {
|
11183
11465
|
return _index < canvas.childElementCount;
|
11184
11466
|
}, function () {
|
11185
11467
|
return _index++;
|
11186
11468
|
}, function () {
|
11187
|
-
function
|
11188
|
-
function
|
11469
|
+
function _temp21() {
|
11470
|
+
function _temp19() {
|
11189
11471
|
line += 20;
|
11190
11472
|
}
|
11191
11473
|
var printChartTitle = function printChartTitle() {
|
@@ -11200,73 +11482,100 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11200
11482
|
return Promise.reject(e);
|
11201
11483
|
}
|
11202
11484
|
};
|
11203
|
-
var
|
11485
|
+
var _temp18 = function () {
|
11204
11486
|
if (printContainerEls.length) {
|
11205
|
-
var
|
11206
|
-
function
|
11207
|
-
|
11208
|
-
|
11209
|
-
|
11210
|
-
|
11211
|
-
|
11212
|
-
|
11213
|
-
|
11214
|
-
|
11215
|
-
|
11216
|
-
|
11217
|
-
|
11218
|
-
|
11219
|
-
|
11220
|
-
|
11221
|
-
};
|
11222
|
-
var printContents = printContainerEl.querySelectorAll("." + PrintContentClassName);
|
11223
|
-
if (!printContents.length) return;
|
11224
|
-
var _temp12 = _forTo(printContents, function (j) {
|
11225
|
-
var rowItem = printContents[j];
|
11226
|
-
return Promise.resolve(html2canvas(rowItem)).then(function (rowItemCanvas) {
|
11227
|
-
function _temp11() {
|
11228
|
-
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
11229
|
-
line += height;
|
11487
|
+
var _temp17 = _forTo(printContainerEls, function (i) {
|
11488
|
+
function _temp16() {
|
11489
|
+
function _temp14() {
|
11490
|
+
var printTitle = function printTitle() {
|
11491
|
+
try {
|
11492
|
+
if (!printTitleHeight || !printTitleData) return Promise.resolve();
|
11493
|
+
doc.addImage(printTitleData, 'PNG', 0, line, chartWidth, printTitleHeight);
|
11494
|
+
line += printTitleHeight;
|
11495
|
+
return Promise.resolve();
|
11496
|
+
} catch (e) {
|
11497
|
+
return Promise.reject(e);
|
11498
|
+
}
|
11499
|
+
};
|
11500
|
+
var printHeader = function printHeader(top) {
|
11501
|
+
if (top === void 0) {
|
11502
|
+
top = 0;
|
11230
11503
|
}
|
11231
|
-
|
11232
|
-
|
11233
|
-
|
11234
|
-
|
11235
|
-
|
11236
|
-
|
11237
|
-
|
11238
|
-
|
11239
|
-
|
11240
|
-
|
11241
|
-
|
11242
|
-
|
11243
|
-
|
11244
|
-
|
11245
|
-
|
11504
|
+
try {
|
11505
|
+
if (!printHeaderData || !printHeaderHeight) return Promise.resolve();
|
11506
|
+
line += top;
|
11507
|
+
if (line + printHeaderHeight > HEIGHT_PAPER) breakPage();
|
11508
|
+
doc.addImage(printHeaderData, 'PNG', 10, line, chartWidth, printHeaderHeight);
|
11509
|
+
line += printHeaderHeight;
|
11510
|
+
return Promise.resolve();
|
11511
|
+
} catch (e) {
|
11512
|
+
return Promise.reject(e);
|
11513
|
+
}
|
11514
|
+
};
|
11515
|
+
var printContents = printContainerEl.querySelectorAll("." + PrintContentClassName);
|
11516
|
+
if (!printContents.length) return;
|
11517
|
+
printTitle();
|
11518
|
+
var _temp12 = _forTo(printContents, function (j) {
|
11519
|
+
var rowItem = printContents[j];
|
11520
|
+
return Promise.resolve(html2canvas(rowItem)).then(function (rowItemCanvas) {
|
11521
|
+
function _temp11() {
|
11522
|
+
doc.addImage(data, 'PNG', 10, line, chartWidth, height);
|
11523
|
+
line += height;
|
11246
11524
|
}
|
11247
|
-
|
11248
|
-
|
11525
|
+
var height = rowItemCanvas.height * chartWidth / rowItemCanvas.width;
|
11526
|
+
var data = rowItemCanvas.toDataURL('image/png');
|
11527
|
+
if (i === 0 && j === 0 && line + height + (printHeaderHeight || 0) + ((chartTitleHeight || 0) + 10) + 20 > HEIGHT_PAPER) breakPage();
|
11528
|
+
i === 0 && j === 0 && printChartTitle();
|
11529
|
+
var _temp10 = function () {
|
11530
|
+
if (line + height + 20 > HEIGHT_PAPER) {
|
11531
|
+
breakPage();
|
11532
|
+
return Promise.resolve(printHeader()).then(function () {});
|
11533
|
+
} else {
|
11534
|
+
var _temp27 = function () {
|
11535
|
+
if (j === 0) {
|
11536
|
+
return Promise.resolve(printHeader(10)).then(function () {});
|
11537
|
+
}
|
11538
|
+
}();
|
11539
|
+
if (_temp27 && _temp27.then) return _temp27.then(function () {});
|
11540
|
+
}
|
11541
|
+
}();
|
11542
|
+
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
|
11543
|
+
});
|
11249
11544
|
});
|
11250
|
-
|
11251
|
-
|
11545
|
+
if (_temp12 && _temp12.then) return _temp12.then(function () {});
|
11546
|
+
}
|
11547
|
+
var _temp13 = function () {
|
11548
|
+
if (printHeaderEl) {
|
11549
|
+
return Promise.resolve(html2canvas(printHeaderEl)).then(function (_html2canvas3) {
|
11550
|
+
printHeaderCanvas = _html2canvas3;
|
11551
|
+
printHeaderHeight = printHeaderCanvas.height * chartWidth / printHeaderCanvas.width;
|
11552
|
+
printHeaderData = printHeaderCanvas.toDataURL('image/png');
|
11553
|
+
});
|
11554
|
+
}
|
11555
|
+
}();
|
11556
|
+
return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
|
11252
11557
|
}
|
11253
11558
|
var printContainerEl = printContainerEls[i];
|
11559
|
+
var printTitleEl = printContainerEl.querySelector("." + PrintTitleClassName);
|
11254
11560
|
var printHeaderEl = printContainerEl.querySelector("." + PrintHeaderClassName);
|
11561
|
+
var printTitleCanvas = null;
|
11562
|
+
var printTitleHeight = null;
|
11563
|
+
var printTitleData = "";
|
11255
11564
|
var printHeaderCanvas = null;
|
11256
11565
|
var printHeaderHeight = null;
|
11257
11566
|
var printHeaderData = "";
|
11258
|
-
var
|
11259
|
-
if (
|
11260
|
-
return Promise.resolve(html2canvas(
|
11261
|
-
|
11262
|
-
|
11263
|
-
|
11567
|
+
var _temp15 = function () {
|
11568
|
+
if (printTitleEl) {
|
11569
|
+
return Promise.resolve(html2canvas(printTitleEl)).then(function (_html2canvas2) {
|
11570
|
+
printTitleCanvas = _html2canvas2;
|
11571
|
+
printTitleHeight = printTitleCanvas.height * chartWidth / printTitleCanvas.width;
|
11572
|
+
printTitleData = printTitleCanvas.toDataURL('image/png');
|
11264
11573
|
});
|
11265
11574
|
}
|
11266
11575
|
}();
|
11267
|
-
return
|
11576
|
+
return _temp15 && _temp15.then ? _temp15.then(_temp16) : _temp16(_temp15);
|
11268
11577
|
});
|
11269
|
-
if (
|
11578
|
+
if (_temp17 && _temp17.then) return _temp17.then(function () {});
|
11270
11579
|
} else {
|
11271
11580
|
return Promise.resolve(html2canvas(chart)).then(function (chartCanvas) {
|
11272
11581
|
var imgBodyHeight = chartCanvas.height * chartWidth / chartCanvas.width;
|
@@ -11279,7 +11588,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11279
11588
|
});
|
11280
11589
|
}
|
11281
11590
|
}();
|
11282
|
-
return
|
11591
|
+
return _temp18 && _temp18.then ? _temp18.then(_temp19) : _temp19(_temp18);
|
11283
11592
|
}
|
11284
11593
|
var chart = canvas.children.item(_index);
|
11285
11594
|
if (chart.getAttribute("id") === "header-canvas") return;
|
@@ -11288,7 +11597,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11288
11597
|
var printChartTitleCanvas = null;
|
11289
11598
|
var chartTitleHeight = null;
|
11290
11599
|
var chartTitleData = "";
|
11291
|
-
var
|
11600
|
+
var _temp20 = function () {
|
11292
11601
|
if (chartTitle && printContainerEls.length) {
|
11293
11602
|
return Promise.resolve(html2canvas(chartTitle)).then(function (_html2canvas) {
|
11294
11603
|
printChartTitleCanvas = _html2canvas;
|
@@ -11297,12 +11606,12 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11297
11606
|
});
|
11298
11607
|
}
|
11299
11608
|
}();
|
11300
|
-
return
|
11609
|
+
return _temp20 && _temp20.then ? _temp20.then(_temp21) : _temp21(_temp20);
|
11301
11610
|
});
|
11302
|
-
if (
|
11611
|
+
if (_temp22 && _temp22.then) return _temp22.then(function () {});
|
11303
11612
|
}
|
11304
11613
|
}();
|
11305
|
-
return
|
11614
|
+
return _temp23 && _temp23.then ? _temp23.then(_temp24) : _temp24(_temp23);
|
11306
11615
|
});
|
11307
11616
|
}, function (error) {
|
11308
11617
|
console.log({
|
@@ -11310,7 +11619,7 @@ var useExamResult = function useExamResult(searchParam, history, examSessionId,
|
|
11310
11619
|
});
|
11311
11620
|
toast.error(getErrorMessage(t, error));
|
11312
11621
|
});
|
11313
|
-
return Promise.resolve(
|
11622
|
+
return Promise.resolve(_temp25 && _temp25.then ? _temp25.then(_temp26) : _temp26(_temp25));
|
11314
11623
|
} catch (e) {
|
11315
11624
|
return Promise.reject(e);
|
11316
11625
|
}
|
@@ -12457,7 +12766,7 @@ Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==t
|
|
12457
12766
|
|
12458
12767
|
var ReactApexChart = unwrapExports(reactApexcharts_min);
|
12459
12768
|
|
12460
|
-
var styles$4 = {"lighter":"#F0FFF6","light":"#
|
12769
|
+
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"};
|
12461
12770
|
|
12462
12771
|
var iconStarQuestion = function iconStarQuestion(_ref) {
|
12463
12772
|
var _ref$width = _ref.width,
|
@@ -13001,7 +13310,9 @@ function MyAnswer(_ref) {
|
|
13001
13310
|
sx: {
|
13002
13311
|
fontSize: "13px",
|
13003
13312
|
fontWeight: 600,
|
13004
|
-
color: "#97A1AF"
|
13313
|
+
color: "#97A1AF",
|
13314
|
+
display: "flex",
|
13315
|
+
alignItems: "center"
|
13005
13316
|
}
|
13006
13317
|
}, t("problem_number"))), React__default.createElement("div", {
|
13007
13318
|
className: styles["custom-col-2"],
|
@@ -13013,7 +13324,9 @@ function MyAnswer(_ref) {
|
|
13013
13324
|
sx: {
|
13014
13325
|
fontSize: "13px",
|
13015
13326
|
fontWeight: 600,
|
13016
|
-
color: "#97A1AF"
|
13327
|
+
color: "#97A1AF",
|
13328
|
+
display: "flex",
|
13329
|
+
alignItems: "center"
|
13017
13330
|
}
|
13018
13331
|
}, t("answer"))), React__default.createElement("div", {
|
13019
13332
|
className: styles["custom-col-2"],
|
@@ -13025,7 +13338,9 @@ function MyAnswer(_ref) {
|
|
13025
13338
|
sx: {
|
13026
13339
|
fontSize: "13px",
|
13027
13340
|
fontWeight: 600,
|
13028
|
-
color: "#97A1AF"
|
13341
|
+
color: "#97A1AF",
|
13342
|
+
display: "flex",
|
13343
|
+
alignItems: "center"
|
13029
13344
|
}
|
13030
13345
|
}, t("solve_time"))), React__default.createElement("div", {
|
13031
13346
|
className: styles["custom-col-2"],
|
@@ -13038,7 +13353,9 @@ function MyAnswer(_ref) {
|
|
13038
13353
|
sx: {
|
13039
13354
|
fontSize: "13px",
|
13040
13355
|
fontWeight: 600,
|
13041
|
-
color: "#97A1AF"
|
13356
|
+
color: "#97A1AF",
|
13357
|
+
display: "flex",
|
13358
|
+
alignItems: "center"
|
13042
13359
|
}
|
13043
13360
|
}, t("comparison_of_top_rankings"))), React__default.createElement("div", {
|
13044
13361
|
className: styles["custom-col-2"],
|
@@ -13051,7 +13368,9 @@ function MyAnswer(_ref) {
|
|
13051
13368
|
sx: {
|
13052
13369
|
fontSize: "13px",
|
13053
13370
|
fontWeight: 600,
|
13054
|
-
color: "#97A1AF"
|
13371
|
+
color: "#97A1AF",
|
13372
|
+
display: "flex",
|
13373
|
+
alignItems: "center"
|
13055
13374
|
}
|
13056
13375
|
}, t("total_correct_rate")))), React__default.createElement("div", {
|
13057
13376
|
className: styles$4["titleMyAnswer2"]
|
@@ -13231,48 +13550,6 @@ var CompareGrass = function CompareGrass(_ref) {
|
|
13231
13550
|
}, t("problem_classification")))), isPrint ? renderPrintTableBody(effectSize) : React__default.createElement("tbody", null, renderTableBody(effectSize))))));
|
13232
13551
|
};
|
13233
13552
|
|
13234
|
-
var iconUpArrow = function iconUpArrow(_ref) {
|
13235
|
-
var _ref$width = _ref.width,
|
13236
|
-
width = _ref$width === void 0 ? "24" : _ref$width,
|
13237
|
-
_ref$height = _ref.height,
|
13238
|
-
height = _ref$height === void 0 ? "24" : _ref$height,
|
13239
|
-
color = _ref.color;
|
13240
|
-
return React__default.createElement("svg", {
|
13241
|
-
xmlns: "http://www.w3.org/2000/svg",
|
13242
|
-
width: width,
|
13243
|
-
height: height,
|
13244
|
-
viewBox: "0 0 24 24",
|
13245
|
-
fill: color
|
13246
|
-
}, React__default.createElement("path", {
|
13247
|
-
d: "M5.25 15.375L12 8.625L18.75 15.375",
|
13248
|
-
stroke: "#CED2DA",
|
13249
|
-
strokeWidth: "2",
|
13250
|
-
strokeLinecap: "round",
|
13251
|
-
strokeLinejoin: "round"
|
13252
|
-
}));
|
13253
|
-
};
|
13254
|
-
|
13255
|
-
var iconDownArrow = function iconDownArrow(_ref) {
|
13256
|
-
var _ref$width = _ref.width,
|
13257
|
-
width = _ref$width === void 0 ? "24" : _ref$width,
|
13258
|
-
_ref$height = _ref.height,
|
13259
|
-
height = _ref$height === void 0 ? "24" : _ref$height,
|
13260
|
-
color = _ref.color;
|
13261
|
-
return React__default.createElement("svg", {
|
13262
|
-
xmlns: "http://www.w3.org/2000/svg",
|
13263
|
-
width: width,
|
13264
|
-
height: height,
|
13265
|
-
viewBox: "0 0 24 24",
|
13266
|
-
fill: color
|
13267
|
-
}, React__default.createElement("path", {
|
13268
|
-
d: "M5.25 8.625L12 15.375L18.75 8.625",
|
13269
|
-
stroke: "#CED2DA",
|
13270
|
-
strokeWidth: "2",
|
13271
|
-
strokeLinecap: "round",
|
13272
|
-
strokeLinejoin: "round"
|
13273
|
-
}));
|
13274
|
-
};
|
13275
|
-
|
13276
13553
|
var iconX = function iconX(_ref) {
|
13277
13554
|
var _ref$width = _ref.width,
|
13278
13555
|
width = _ref$width === void 0 ? "15" : _ref$width,
|
@@ -13408,7 +13685,13 @@ var TrickyProblem = function TrickyProblem(_ref) {
|
|
13408
13685
|
fontSize: "14px",
|
13409
13686
|
fontWeight: 700
|
13410
13687
|
}
|
13411
|
-
}, t("tricky_problems")), isOpen ? React__default.createElement(
|
13688
|
+
}, t("tricky_problems")), isOpen ? React__default.createElement(IoChevronUp, {
|
13689
|
+
size: 24,
|
13690
|
+
color: styles$4.gray_300
|
13691
|
+
}) : React__default.createElement(IoChevronDown, {
|
13692
|
+
size: 24,
|
13693
|
+
color: styles$4.gray_300
|
13694
|
+
})), isOpen && React__default.createElement(Fragment$1, null, isPrint ? renderPrintProblems() : renderProblems()));
|
13412
13695
|
};
|
13413
13696
|
|
13414
13697
|
var ProtractedProblem = function ProtractedProblem(_ref) {
|
@@ -13416,10 +13699,55 @@ var ProtractedProblem = function ProtractedProblem(_ref) {
|
|
13416
13699
|
data = _ref.data,
|
13417
13700
|
openProblem = _ref.openProblem,
|
13418
13701
|
changeOpen = _ref.changeOpen,
|
13419
|
-
isPrint = _ref.isPrint
|
13702
|
+
isPrint = _ref.isPrint,
|
13703
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13420
13704
|
var _useTranslation = useTranslation(),
|
13421
13705
|
t = _useTranslation.t;
|
13422
13706
|
var isOpen = openProblem === keyOpen;
|
13707
|
+
var renderTableBody = function renderTableBody(data) {
|
13708
|
+
return data.map(function (item, index) {
|
13709
|
+
var time = item.topDuration - item.duration;
|
13710
|
+
var isBetter = time > 0;
|
13711
|
+
return React__default.createElement("tr", {
|
13712
|
+
id: "print-item",
|
13713
|
+
key: item.id,
|
13714
|
+
style: index < data.length - 1 ? {
|
13715
|
+
borderBottom: "1px solid #e4e7ec"
|
13716
|
+
} : {}
|
13717
|
+
}, React__default.createElement("td", {
|
13718
|
+
className: styles$4["tdcolumn1"],
|
13719
|
+
style: {
|
13720
|
+
color: styles$4.gray_900,
|
13721
|
+
fontSize: "13px",
|
13722
|
+
fontWeight: 500
|
13723
|
+
}
|
13724
|
+
}, t("number_problem", {
|
13725
|
+
number: item.questionOrder + 1
|
13726
|
+
})), React__default.createElement("td", {
|
13727
|
+
style: {
|
13728
|
+
textAlign: "center",
|
13729
|
+
color: styles$4.gray_700,
|
13730
|
+
fontSize: "13px",
|
13731
|
+
fontWeight: 500
|
13732
|
+
}
|
13733
|
+
}, item.duration ? formatTimeSecond(item.duration, t) : ""), React__default.createElement("td", {
|
13734
|
+
className: styles$4["tdcolumn3"],
|
13735
|
+
style: {
|
13736
|
+
textAlign: "center",
|
13737
|
+
color: styles$4.gray_700,
|
13738
|
+
fontSize: "13px",
|
13739
|
+
fontWeight: 500
|
13740
|
+
}
|
13741
|
+
}, item.topDuration ? formatTimeSecond(item.topDuration, t) : ""), React__default.createElement("td", {
|
13742
|
+
style: {
|
13743
|
+
textAlign: "center",
|
13744
|
+
color: isBetter ? styles$4.dark : "red",
|
13745
|
+
fontSize: "13px",
|
13746
|
+
fontWeight: 600
|
13747
|
+
}
|
13748
|
+
}, item.topDuration && item.duration ? "" + (isBetter ? "" : "+") + formatTimeSecond(Math.abs(time), t) : ""));
|
13749
|
+
});
|
13750
|
+
};
|
13423
13751
|
var renderQuestions = function renderQuestions(data) {
|
13424
13752
|
return data.map(function (item) {
|
13425
13753
|
return React__default.createElement("div", {
|
@@ -13449,30 +13777,72 @@ var ProtractedProblem = function ProtractedProblem(_ref) {
|
|
13449
13777
|
var renderPrintQuestions = function renderPrintQuestions() {
|
13450
13778
|
var chunkedData = _.chunk(data, 5);
|
13451
13779
|
return chunkedData.map(function (i, index) {
|
13452
|
-
return React__default.createElement("
|
13780
|
+
return React__default.createElement("tbody", {
|
13453
13781
|
key: index,
|
13454
13782
|
className: PrintContentClassName
|
13455
|
-
}, renderQuestions(i));
|
13783
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderQuestions(i));
|
13456
13784
|
});
|
13457
13785
|
};
|
13458
13786
|
return React__default.createElement("div", {
|
13459
13787
|
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
13460
13788
|
}, React__default.createElement("div", {
|
13461
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
13789
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13462
13790
|
onClick: function onClick() {
|
13463
13791
|
return changeOpen(isOpen ? "" : keyOpen);
|
13464
13792
|
}
|
13793
|
+
}, React__default.createElement(Stack, {
|
13794
|
+
flexDirection: "row",
|
13795
|
+
gap: "24px",
|
13796
|
+
alignItems: "center"
|
13465
13797
|
}, React__default.createElement(Typography, {
|
13466
13798
|
sx: {
|
13467
13799
|
color: !isOpen ? "#97A1AF" : "#414E62",
|
13468
13800
|
fontSize: "14px",
|
13469
13801
|
fontWeight: 700
|
13470
13802
|
}
|
13471
|
-
}, t("problems_that_took_a_long_time")),
|
13472
|
-
|
13473
|
-
|
13803
|
+
}, t("problems_that_took_a_long_time")), React__default.createElement(Typography, {
|
13804
|
+
sx: {
|
13805
|
+
color: styles$4.gray_300,
|
13806
|
+
fontSize: "11px",
|
13807
|
+
fontWeight: 500
|
13808
|
+
}
|
13809
|
+
}, t("protracted_problem_detail"))), isOpen ? React__default.createElement(IoChevronUp, {
|
13810
|
+
size: 24,
|
13811
|
+
color: styles$4.gray_300
|
13812
|
+
}) : React__default.createElement(IoChevronDown, {
|
13813
|
+
size: 24,
|
13814
|
+
color: styles$4.gray_300
|
13815
|
+
})), isOpen && React__default.createElement(Fragment$1, null, data.length ? React__default.createElement("div", {
|
13816
|
+
className: styles$4["tableCompareGrass"]
|
13817
|
+
}, React__default.createElement("div", {
|
13818
|
+
className: styles$4["table-responsive"]
|
13819
|
+
}, React__default.createElement(Table, {
|
13820
|
+
style: {
|
13821
|
+
width: "100%",
|
13822
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
13823
|
+
}
|
13824
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
13825
|
+
style: {
|
13826
|
+
borderBottom: "1px solid #E4E7EC"
|
13827
|
+
},
|
13828
|
+
className: isPrint ? PrintHeaderClassName : ""
|
13829
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
13830
|
+
className: styles$4["thcolumn1"]
|
13831
|
+
}, t("problem_number")), React__default.createElement("th", {
|
13832
|
+
style: {
|
13833
|
+
textAlign: "center"
|
13834
|
+
}
|
13835
|
+
}, t("my_time")), React__default.createElement("th", {
|
13836
|
+
style: {
|
13837
|
+
textAlign: "center"
|
13838
|
+
}
|
13839
|
+
}, t("top_time")), React__default.createElement("th", {
|
13840
|
+
style: {
|
13841
|
+
textAlign: "center"
|
13842
|
+
}
|
13843
|
+
}, t("time_comparison")))), isPrint ? renderPrintQuestions() : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(data) : renderQuestions(data))))) : React__default.createElement("div", {
|
13474
13844
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13475
|
-
}, t("no_data"))))
|
13845
|
+
}, t("no_data"))));
|
13476
13846
|
};
|
13477
13847
|
|
13478
13848
|
var Vulnerable = function Vulnerable(_ref) {
|
@@ -13480,7 +13850,8 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13480
13850
|
keyOpen = _ref.keyOpen,
|
13481
13851
|
openProblem = _ref.openProblem,
|
13482
13852
|
changeOpen = _ref.changeOpen,
|
13483
|
-
isPrint = _ref.isPrint
|
13853
|
+
isPrint = _ref.isPrint,
|
13854
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13484
13855
|
var _useTranslation = useTranslation(),
|
13485
13856
|
t = _useTranslation.t;
|
13486
13857
|
var isOpen = openProblem === keyOpen;
|
@@ -13489,12 +13860,65 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13489
13860
|
}).sort(function (q1, q2) {
|
13490
13861
|
return q2.overallCorrectRate === q1.overallCorrectRate ? q1.questionOrder - q2.questionOrder : q2.overallCorrectRate - q1.overallCorrectRate;
|
13491
13862
|
});
|
13863
|
+
var renderTableBody = function renderTableBody(data) {
|
13864
|
+
return data.map(function (item, index) {
|
13865
|
+
return React__default.createElement("tr", {
|
13866
|
+
id: "print-item",
|
13867
|
+
key: item.id,
|
13868
|
+
style: index < data.length - 1 ? {
|
13869
|
+
borderBottom: "1px solid #e4e7ec"
|
13870
|
+
} : {}
|
13871
|
+
}, React__default.createElement("td", {
|
13872
|
+
className: styles$4["tdcolumn1"],
|
13873
|
+
style: {
|
13874
|
+
color: styles$4.gray_900,
|
13875
|
+
fontSize: "13px",
|
13876
|
+
fontWeight: 600
|
13877
|
+
}
|
13878
|
+
}, React__default.createElement(Typography, {
|
13879
|
+
color: styles$4.gray_900,
|
13880
|
+
fontSize: "13px",
|
13881
|
+
fontWeight: 600
|
13882
|
+
}, t("problem") + " " + (item.questionOrder + 1))), React__default.createElement("td", {
|
13883
|
+
style: {
|
13884
|
+
textAlign: "center",
|
13885
|
+
color: styles$4.dark,
|
13886
|
+
fontSize: "13px",
|
13887
|
+
fontWeight: 600
|
13888
|
+
}
|
13889
|
+
}, item.overallCorrectRate.toFixed(2) ? item.overallCorrectRate.toFixed(2) + "%" : ""), React__default.createElement("td", {
|
13890
|
+
className: styles$4["tdcolumn3"],
|
13891
|
+
style: {
|
13892
|
+
color: "red",
|
13893
|
+
fontSize: "13px",
|
13894
|
+
fontWeight: 500
|
13895
|
+
}
|
13896
|
+
}, item.selectedAnswers ? t("number_answer", {
|
13897
|
+
number: item.selectedAnswers
|
13898
|
+
}) : ""), React__default.createElement("td", {
|
13899
|
+
style: {
|
13900
|
+
textAlign: "center",
|
13901
|
+
color: styles$4.gray_700
|
13902
|
+
}
|
13903
|
+
}, item.correctAnswers ? t("number_answer", {
|
13904
|
+
number: item.correctAnswers
|
13905
|
+
}) : ""), React__default.createElement("td", {
|
13906
|
+
style: {
|
13907
|
+
textAlign: "center",
|
13908
|
+
color: styles$4.gray_700
|
13909
|
+
}
|
13910
|
+
}, item.category.name ? item.category.name : ""));
|
13911
|
+
});
|
13912
|
+
};
|
13492
13913
|
var renderQuestions = function renderQuestions(questions) {
|
13493
13914
|
return questions.map(function (question) {
|
13494
|
-
return React__default.createElement(
|
13915
|
+
return React__default.createElement(Grid, {
|
13916
|
+
container: true,
|
13495
13917
|
className: styles$4["content"],
|
13496
13918
|
key: question.id
|
13497
|
-
}, React__default.createElement(
|
13919
|
+
}, React__default.createElement(Grid, {
|
13920
|
+
item: true,
|
13921
|
+
xs: 1.5,
|
13498
13922
|
className: styles$4["contentColumn1"]
|
13499
13923
|
}, React__default.createElement("div", null, React__default.createElement("span", {
|
13500
13924
|
className: styles$4["span1"]
|
@@ -13502,7 +13926,9 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13502
13926
|
className: styles$4["span2"]
|
13503
13927
|
}, t("number_question", {
|
13504
13928
|
number: question.questionOrder + 1
|
13505
|
-
})))), React__default.createElement(
|
13929
|
+
})))), React__default.createElement(Grid, {
|
13930
|
+
item: true,
|
13931
|
+
xs: 10.5,
|
13506
13932
|
className: styles$4["contentColumn2"]
|
13507
13933
|
}, React__default.createElement("div", null, React__default.createElement("span", {
|
13508
13934
|
className: styles$4["span1"]
|
@@ -13522,30 +13948,76 @@ var Vulnerable = function Vulnerable(_ref) {
|
|
13522
13948
|
var renderPrintQuestions = function renderPrintQuestions(questions) {
|
13523
13949
|
var chunkedQuestions = _.chunk(questions, 5);
|
13524
13950
|
return chunkedQuestions.map(function (i, index) {
|
13525
|
-
return React__default.createElement("
|
13951
|
+
return React__default.createElement("tbody", {
|
13526
13952
|
key: index,
|
13527
13953
|
className: PrintContentClassName
|
13528
|
-
}, renderQuestions(i));
|
13954
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderQuestions(i));
|
13529
13955
|
});
|
13530
13956
|
};
|
13531
13957
|
return React__default.createElement("div", {
|
13532
13958
|
className: styles$4["wrapperProblem"] + " " + PrintContainerClassName
|
13533
13959
|
}, React__default.createElement("div", {
|
13534
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
13960
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13535
13961
|
onClick: function onClick() {
|
13536
13962
|
return changeOpen(isOpen ? "" : keyOpen);
|
13537
13963
|
}
|
13964
|
+
}, React__default.createElement(Stack, {
|
13965
|
+
flexDirection: "row",
|
13966
|
+
gap: "24px",
|
13967
|
+
alignItems: "center"
|
13538
13968
|
}, React__default.createElement(Typography, {
|
13539
13969
|
sx: {
|
13540
13970
|
color: !isOpen ? "#97A1AF" : "#414E62",
|
13541
13971
|
fontSize: "14px",
|
13542
13972
|
fontWeight: 700
|
13543
13973
|
}
|
13544
|
-
}, t("issues_vulnerable")),
|
13545
|
-
|
13546
|
-
|
13974
|
+
}, t("issues_vulnerable")), React__default.createElement(Typography, {
|
13975
|
+
sx: {
|
13976
|
+
color: styles$4.gray_300,
|
13977
|
+
fontSize: "11px",
|
13978
|
+
fontWeight: 500
|
13979
|
+
}
|
13980
|
+
}, t("vulnerable_detail"))), isOpen ? React__default.createElement(IoChevronUp, {
|
13981
|
+
size: 24,
|
13982
|
+
color: styles$4.gray_300
|
13983
|
+
}) : React__default.createElement(IoChevronDown, {
|
13984
|
+
size: 24,
|
13985
|
+
color: styles$4.gray_300
|
13986
|
+
})), isOpen && React__default.createElement(Fragment$1, null, incorrectQuestions.length ? React__default.createElement("div", {
|
13987
|
+
className: styles$4["tableCompareGrass"]
|
13988
|
+
}, React__default.createElement("div", {
|
13989
|
+
className: styles$4["table-responsive"]
|
13990
|
+
}, React__default.createElement(Table, {
|
13991
|
+
style: {
|
13992
|
+
width: "100%",
|
13993
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
13994
|
+
}
|
13995
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
13996
|
+
style: {
|
13997
|
+
borderBottom: "1px solid #E4E7EC"
|
13998
|
+
},
|
13999
|
+
className: isPrint ? PrintHeaderClassName : ""
|
14000
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
14001
|
+
className: styles$4["thcolumn1"]
|
14002
|
+
}, t("problem_number")), React__default.createElement("th", {
|
14003
|
+
style: {
|
14004
|
+
textAlign: "center"
|
14005
|
+
}
|
14006
|
+
}, t("total_correct_rate")), React__default.createElement("th", {
|
14007
|
+
style: {
|
14008
|
+
textAlign: "center"
|
14009
|
+
}
|
14010
|
+
}, t("my_wrong_answer")), React__default.createElement("th", {
|
14011
|
+
style: {
|
14012
|
+
textAlign: "center"
|
14013
|
+
}
|
14014
|
+
}, t("answer")), React__default.createElement("th", {
|
14015
|
+
style: {
|
14016
|
+
textAlign: "center"
|
14017
|
+
}
|
14018
|
+
}, t("_category")))), isPrint ? renderPrintQuestions(incorrectQuestions) : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(incorrectQuestions) : renderQuestions(incorrectQuestions))))) : React__default.createElement("div", {
|
13547
14019
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13548
|
-
}, t("no_data"))))
|
14020
|
+
}, t("no_data"))));
|
13549
14021
|
};
|
13550
14022
|
|
13551
14023
|
var GradesByTerritory = function GradesByTerritory(_ref) {
|
@@ -13553,10 +14025,64 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13553
14025
|
data = _ref.data,
|
13554
14026
|
openProblem = _ref.openProblem,
|
13555
14027
|
changeOpen = _ref.changeOpen,
|
13556
|
-
isPrint = _ref.isPrint
|
14028
|
+
isPrint = _ref.isPrint,
|
14029
|
+
resultData = _ref.resultData,
|
14030
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13557
14031
|
var _useTranslation = useTranslation(),
|
13558
14032
|
t = _useTranslation.t;
|
14033
|
+
var formattedData = totalSolveTimeCategories(resultData, data);
|
13559
14034
|
var isOpen = openProblem === keyOpen;
|
14035
|
+
var renderTableBody = function renderTableBody(data) {
|
14036
|
+
return data.map(function (item, index) {
|
14037
|
+
return React__default.createElement("tr", {
|
14038
|
+
id: "print-item",
|
14039
|
+
key: item.id,
|
14040
|
+
style: index < data.length - 1 ? {
|
14041
|
+
borderBottom: "1px solid #e4e7ec"
|
14042
|
+
} : {}
|
14043
|
+
}, React__default.createElement("td", {
|
14044
|
+
className: styles$4["tdcolumn1"],
|
14045
|
+
style: {
|
14046
|
+
color: styles$4.gray_900,
|
14047
|
+
fontSize: "13px",
|
14048
|
+
fontWeight: 600
|
14049
|
+
}
|
14050
|
+
}, item.name), React__default.createElement("td", {
|
14051
|
+
style: {
|
14052
|
+
textAlign: "center",
|
14053
|
+
color: styles$4.gray_900,
|
14054
|
+
fontSize: "13px",
|
14055
|
+
fontWeight: 600
|
14056
|
+
}
|
14057
|
+
}, item.percentageAmongStudents.toFixed(2), "%"), React__default.createElement("td", {
|
14058
|
+
className: styles$4["tdcolumn3"],
|
14059
|
+
style: {
|
14060
|
+
textAlign: "center",
|
14061
|
+
color: styles$4.gray_700,
|
14062
|
+
fontSize: "13px",
|
14063
|
+
fontWeight: 500
|
14064
|
+
}
|
14065
|
+
}, item.totalCorrectQuestions ? t("number_of_answer", {
|
14066
|
+
number: item.totalCorrectQuestions
|
14067
|
+
}) : ""), React__default.createElement("td", {
|
14068
|
+
style: {
|
14069
|
+
textAlign: "center",
|
14070
|
+
color: styles$4.gray_700,
|
14071
|
+
fontSize: "13px",
|
14072
|
+
fontWeight: 500
|
14073
|
+
}
|
14074
|
+
}, item.totalQuestions ? t("number_of_answer", {
|
14075
|
+
number: item.totalQuestions
|
14076
|
+
}) : ""), React__default.createElement("td", {
|
14077
|
+
style: {
|
14078
|
+
textAlign: "center",
|
14079
|
+
color: styles$4.gray_700,
|
14080
|
+
fontSize: "13px",
|
14081
|
+
fontWeight: 500
|
14082
|
+
}
|
14083
|
+
}, item.totalSolveTime ? formatDuration(t, item.totalSolveTime) : ""));
|
14084
|
+
});
|
14085
|
+
};
|
13560
14086
|
var renderCategories = function renderCategories(data) {
|
13561
14087
|
return data.map(function (item) {
|
13562
14088
|
var trackStyle = {
|
@@ -13580,18 +14106,18 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13580
14106
|
});
|
13581
14107
|
};
|
13582
14108
|
var renderPrintCategories = function renderPrintCategories() {
|
13583
|
-
var chunkedCategories = _.chunk(
|
14109
|
+
var chunkedCategories = _.chunk(formattedData, 10);
|
13584
14110
|
return chunkedCategories.map(function (i, index) {
|
13585
|
-
return React__default.createElement("
|
14111
|
+
return React__default.createElement("tbody", {
|
13586
14112
|
key: index,
|
13587
14113
|
className: PrintContentClassName
|
13588
|
-
}, renderCategories(i));
|
14114
|
+
}, isMyStoryStudent ? renderTableBody(i) : renderCategories(i));
|
13589
14115
|
});
|
13590
14116
|
};
|
13591
14117
|
return React__default.createElement("div", {
|
13592
14118
|
className: styles$4["wrapperProblem"] + " " + (isPrint ? PrintContainerClassName : "")
|
13593
14119
|
}, React__default.createElement("div", {
|
13594
|
-
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ?
|
14120
|
+
className: (!isOpen ? styles$4["titleProblemClose"] : styles$4["titleProblem"]) + " " + (isPrint ? PrintTitleClassName : ""),
|
13595
14121
|
onClick: function onClick() {
|
13596
14122
|
return changeOpen(isOpen ? "" : keyOpen);
|
13597
14123
|
}
|
@@ -13601,9 +14127,45 @@ var GradesByTerritory = function GradesByTerritory(_ref) {
|
|
13601
14127
|
fontSize: "14px",
|
13602
14128
|
fontWeight: 700
|
13603
14129
|
}
|
13604
|
-
}, t("grades_by_area")), isOpen ? React__default.createElement(
|
13605
|
-
|
13606
|
-
|
14130
|
+
}, t("grades_by_area")), isOpen ? React__default.createElement(IoChevronUp, {
|
14131
|
+
size: 24,
|
14132
|
+
color: styles$4.gray_300
|
14133
|
+
}) : React__default.createElement(IoChevronDown, {
|
14134
|
+
size: 24,
|
14135
|
+
color: styles$4.gray_300
|
14136
|
+
})), isOpen && React__default.createElement(Fragment$1, null, formattedData.length ? React__default.createElement("div", {
|
14137
|
+
className: styles$4["tableCompareGrass"]
|
14138
|
+
}, React__default.createElement("div", {
|
14139
|
+
className: styles$4["table-responsive"]
|
14140
|
+
}, React__default.createElement(Table, {
|
14141
|
+
style: {
|
14142
|
+
width: "100%",
|
14143
|
+
marginBottom: isMyStoryStudent ? "120px" : 0
|
14144
|
+
}
|
14145
|
+
}, isMyStoryStudent && React__default.createElement("thead", {
|
14146
|
+
style: {
|
14147
|
+
borderBottom: "1px solid #E4E7EC"
|
14148
|
+
},
|
14149
|
+
className: isPrint ? PrintHeaderClassName : ""
|
14150
|
+
}, React__default.createElement("tr", null, React__default.createElement("th", {
|
14151
|
+
className: styles$4["thcolumn1"]
|
14152
|
+
}, t("categories")), React__default.createElement("th", {
|
14153
|
+
style: {
|
14154
|
+
textAlign: "center"
|
14155
|
+
}
|
14156
|
+
}, t("correct_rate")), React__default.createElement("th", {
|
14157
|
+
style: {
|
14158
|
+
textAlign: "center"
|
14159
|
+
}
|
14160
|
+
}, t("number_of_correct_answers")), React__default.createElement("th", {
|
14161
|
+
style: {
|
14162
|
+
textAlign: "center"
|
14163
|
+
}
|
14164
|
+
}, t("total_number_of_problems")), React__default.createElement("th", {
|
14165
|
+
style: {
|
14166
|
+
textAlign: "center"
|
14167
|
+
}
|
14168
|
+
}, t("total_solve_time")))), isPrint ? renderPrintCategories() : React__default.createElement("tbody", null, isMyStoryStudent ? renderTableBody(formattedData) : renderCategories(formattedData))))) : React__default.createElement("div", {
|
13607
14169
|
className: styles$4["noData"] + " " + (isPrint ? PrintContentClassName : "")
|
13608
14170
|
}, t("no_data"))));
|
13609
14171
|
};
|
@@ -13813,7 +14375,8 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13813
14375
|
history = _ref.history,
|
13814
14376
|
examSessionId = _ref.examSessionId,
|
13815
14377
|
studentId = _ref.studentId,
|
13816
|
-
code = _ref.code
|
14378
|
+
code = _ref.code,
|
14379
|
+
isMyStoryStudent = _ref.isMyStoryStudent;
|
13817
14380
|
var _useTab = useTab(),
|
13818
14381
|
selected = _useTab.selected,
|
13819
14382
|
handleChangeTab = _useTab.handleChangeTab;
|
@@ -13914,7 +14477,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13914
14477
|
fontWeight: 600,
|
13915
14478
|
color: styles.gray_500
|
13916
14479
|
}
|
13917
|
-
}, t("
|
14480
|
+
}, t("students")), React__default.createElement(Typography, {
|
13918
14481
|
sx: {
|
13919
14482
|
fontSize: "14px",
|
13920
14483
|
fontWeight: 600,
|
@@ -13958,7 +14521,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13958
14521
|
}, React__default.createElement("button", {
|
13959
14522
|
className: styles$4["pdfBtn"] + " " + styles["truncate"],
|
13960
14523
|
onClick: handleExportPdf
|
13961
|
-
}, React__default.createElement(iconPrintFill, null), React__default.createElement("p", null, t("
|
14524
|
+
}, React__default.createElement(iconPrintFill, null), React__default.createElement("p", null, t("print_all"))))))), React__default.createElement(Grid, {
|
13962
14525
|
item: true,
|
13963
14526
|
xs: 12
|
13964
14527
|
}, React__default.createElement(Box, {
|
@@ -13968,7 +14531,7 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
13968
14531
|
alignItems: "center",
|
13969
14532
|
display: "flex",
|
13970
14533
|
overflow: "scroll",
|
13971
|
-
bgcolor: styles.
|
14534
|
+
bgcolor: styles.gray_50,
|
13972
14535
|
borderTop: "1px solid #E4E7EC",
|
13973
14536
|
borderBottom: "1px solid #E4E7EC"
|
13974
14537
|
}, React__default.createElement(Stack, {
|
@@ -14048,16 +14611,20 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14048
14611
|
keyOpen: "Vulnerable",
|
14049
14612
|
data: resultData,
|
14050
14613
|
openProblem: openProblem,
|
14051
|
-
changeOpen: setOpenProblem
|
14614
|
+
changeOpen: setOpenProblem,
|
14615
|
+
isMyStoryStudent: isMyStoryStudent
|
14052
14616
|
}), React__default.createElement(ProtractedProblem, {
|
14053
14617
|
keyOpen: "ProtractedProblem",
|
14054
14618
|
data: longTimeSpend,
|
14055
14619
|
openProblem: openProblem,
|
14056
|
-
changeOpen: setOpenProblem
|
14620
|
+
changeOpen: setOpenProblem,
|
14621
|
+
isMyStoryStudent: isMyStoryStudent
|
14057
14622
|
}), React__default.createElement(GradesByTerritory, {
|
14058
14623
|
keyOpen: "GradesByTerritory",
|
14059
14624
|
data: categoryResponses,
|
14625
|
+
resultData: resultData,
|
14060
14626
|
openProblem: openProblem,
|
14627
|
+
isMyStoryStudent: isMyStoryStudent,
|
14061
14628
|
changeOpen: setOpenProblem
|
14062
14629
|
}))), React__default.createElement(Grid, {
|
14063
14630
|
item: true,
|
@@ -14215,10 +14782,11 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14215
14782
|
gap: "12px",
|
14216
14783
|
marginTop: "24px"
|
14217
14784
|
}, React__default.createElement(Typography, {
|
14785
|
+
className: "chart-title",
|
14218
14786
|
sx: {
|
14219
|
-
fontSize: "
|
14787
|
+
fontSize: "18px",
|
14220
14788
|
fontWeight: 700,
|
14221
|
-
color: styles.
|
14789
|
+
color: styles.gray_500
|
14222
14790
|
}
|
14223
14791
|
}, t(TabList[2].label)), React__default.createElement(CompareGrass, {
|
14224
14792
|
effectSize: effectSize,
|
@@ -14246,19 +14814,23 @@ var ExamResultV2 = function ExamResultV2(_ref) {
|
|
14246
14814
|
data: resultData,
|
14247
14815
|
openProblem: "Vulnerable",
|
14248
14816
|
changeOpen: setOpenProblem,
|
14817
|
+
isMyStoryStudent: isMyStoryStudent,
|
14249
14818
|
isPrint: true
|
14250
14819
|
}), React__default.createElement(ProtractedProblem, {
|
14251
14820
|
keyOpen: "ProtractedProblem",
|
14252
14821
|
data: longTimeSpend,
|
14253
14822
|
openProblem: "ProtractedProblem",
|
14254
14823
|
changeOpen: setOpenProblem,
|
14255
|
-
isPrint: true
|
14824
|
+
isPrint: true,
|
14825
|
+
isMyStoryStudent: isMyStoryStudent
|
14256
14826
|
}), React__default.createElement(GradesByTerritory, {
|
14257
14827
|
keyOpen: "GradesByTerritory",
|
14258
14828
|
data: categoryResponses,
|
14829
|
+
resultData: resultData,
|
14259
14830
|
openProblem: "GradesByTerritory",
|
14260
14831
|
changeOpen: setOpenProblem,
|
14261
|
-
isPrint: true
|
14832
|
+
isPrint: true,
|
14833
|
+
isMyStoryStudent: isMyStoryStudent
|
14262
14834
|
})))), React__default.createElement(CreateNewQuestionDialog$1, {
|
14263
14835
|
examSessionId: resultData === null || resultData === void 0 ? void 0 : resultData.examSessionId,
|
14264
14836
|
handleCreateQuestion: handleCreateQuestion,
|
@@ -14293,12 +14865,25 @@ var timeSpanToLocalMoment = function timeSpanToLocalMoment(time, date) {
|
|
14293
14865
|
var value = date ? moment.utc(date).startOf("day").add(totalSeconds, "seconds").local() : moment().startOf("day").add(totalSeconds, "seconds");
|
14294
14866
|
return value;
|
14295
14867
|
};
|
14868
|
+
var convertHHMMSStoSeconds = function convertHHMMSStoSeconds(time) {
|
14869
|
+
var times = time.split(":");
|
14870
|
+
return +times[0] * 60 * 60 + +times[1] * 60 + +times[2];
|
14871
|
+
};
|
14872
|
+
var getRemainTime = function getRemainTime(startTime, duration) {
|
14873
|
+
var timePass = diffFromNow(startTime, "second");
|
14874
|
+
var durationInNumber = convertHHMMSStoSeconds(duration);
|
14875
|
+
if (typeof timePass !== "number") return null;
|
14876
|
+
if (timePass > durationInNumber) return 0;
|
14877
|
+
return durationInNumber - timePass;
|
14878
|
+
};
|
14296
14879
|
|
14297
14880
|
var times = {
|
14298
14881
|
__proto__: null,
|
14299
14882
|
getLocalDayOfWeek: getLocalDayOfWeek,
|
14300
14883
|
getUtcDayOfWeek: getUtcDayOfWeek,
|
14301
|
-
timeSpanToLocalMoment: timeSpanToLocalMoment
|
14884
|
+
timeSpanToLocalMoment: timeSpanToLocalMoment,
|
14885
|
+
convertHHMMSStoSeconds: convertHHMMSStoSeconds,
|
14886
|
+
getRemainTime: getRemainTime
|
14302
14887
|
};
|
14303
14888
|
|
14304
14889
|
var SIGN_IN_SUPER_ADMIN_URL = SUPER_ADMIN_BASE_URL + "/api/auth/login";
|
@@ -14903,8 +15488,8 @@ var Header = function Header(_ref) {
|
|
14903
15488
|
homeUrl: homeRoute.path,
|
14904
15489
|
role: role,
|
14905
15490
|
history: history,
|
14906
|
-
|
14907
|
-
|
15491
|
+
onSignOut: onSignOut,
|
15492
|
+
hideAcademyName: !isLargerThanXL && headerTabs.length > 6
|
14908
15493
|
})), React__default.createElement(Stack, {
|
14909
15494
|
display: "flex",
|
14910
15495
|
flexGrow: 1,
|
@@ -14951,23 +15536,7 @@ var Header = function Header(_ref) {
|
|
14951
15536
|
})), React__default.createElement(Stack, {
|
14952
15537
|
direction: "row",
|
14953
15538
|
alignItems: "center"
|
14954
|
-
}, React__default.createElement(
|
14955
|
-
color: styles.gray_700,
|
14956
|
-
className: "fw-bold me-3 text-nowrap flex-shrink-1",
|
14957
|
-
sx: {
|
14958
|
-
minWidth: "60px",
|
14959
|
-
maxWidth: {
|
14960
|
-
md: "100px",
|
14961
|
-
xs: "60px"
|
14962
|
-
},
|
14963
|
-
fontSize: {
|
14964
|
-
md: "16px",
|
14965
|
-
xs: "14px"
|
14966
|
-
},
|
14967
|
-
overflow: "hidden",
|
14968
|
-
textOverflow: "ellipsis"
|
14969
|
-
}
|
14970
|
-
}, user === null || user === void 0 ? void 0 : user.fullName), React__default.createElement(Link, {
|
15539
|
+
}, React__default.createElement(Link, {
|
14971
15540
|
"aria-current": "page",
|
14972
15541
|
to: homeRoute.path,
|
14973
15542
|
className: "border-none"
|
@@ -15080,7 +15649,11 @@ var AcademyCard = function AcademyCard(_ref) {
|
|
15080
15649
|
}), createElement(CardContent, null, createElement(Typography$1, {
|
15081
15650
|
variant: "h6",
|
15082
15651
|
component: "div"
|
15083
|
-
}, academy.name)), createElement(CardActions,
|
15652
|
+
}, academy.name)), createElement(CardActions, {
|
15653
|
+
sx: {
|
15654
|
+
padding: "16px"
|
15655
|
+
}
|
15656
|
+
}, createElement(Button$1, {
|
15084
15657
|
sx: {
|
15085
15658
|
bgColor: theme.palette.main_theme.dark
|
15086
15659
|
},
|
@@ -15137,5 +15710,220 @@ var AcademyList = function AcademyList(_ref) {
|
|
15137
15710
|
}, React__default.createElement("span", null, t("no_academy_available"), "."))))));
|
15138
15711
|
};
|
15139
15712
|
|
15140
|
-
|
15713
|
+
var ONE_SECOND_IN_MILLISECONDS = 1000;
|
15714
|
+
var useCountDownTimer = function useCountDownTimer(props) {
|
15715
|
+
var startTime = props.startTime,
|
15716
|
+
status = props.status,
|
15717
|
+
code = props.code,
|
15718
|
+
duration = props.duration,
|
15719
|
+
fetchedCount = props.fetchedCount,
|
15720
|
+
onFinish = props.onFinish;
|
15721
|
+
var _useState = useState(),
|
15722
|
+
remainTime = _useState[0],
|
15723
|
+
setRemainTime = _useState[1];
|
15724
|
+
var checkStatusRef = useRef(null);
|
15725
|
+
var requestRef = useRef(null);
|
15726
|
+
var checkLiveExamStatus = useCallback(function () {
|
15727
|
+
try {
|
15728
|
+
!!checkStatusRef.current && clearTimeout(checkStatusRef.current);
|
15729
|
+
if (!code || status === ExamStatus$1.Completed) {
|
15730
|
+
return Promise.resolve();
|
15731
|
+
}
|
15732
|
+
var _temp = _catch(function () {
|
15733
|
+
return Promise.resolve(getCheckStatusExam(code)).then(function (res) {
|
15734
|
+
if (res.data.data.status === ExamStatus$1.Completed) {
|
15735
|
+
clearInterval(checkStatusRef.current);
|
15736
|
+
onFinish();
|
15737
|
+
} else {
|
15738
|
+
checkStatusRef.current = setTimeout(checkLiveExamStatus, ONE_SECOND_IN_MILLISECONDS);
|
15739
|
+
}
|
15740
|
+
});
|
15741
|
+
}, function (error) {
|
15742
|
+
console.log({
|
15743
|
+
error: error
|
15744
|
+
});
|
15745
|
+
});
|
15746
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
15747
|
+
} catch (e) {
|
15748
|
+
return Promise.reject(e);
|
15749
|
+
}
|
15750
|
+
}, [code, status, onFinish]);
|
15751
|
+
useEffect(function () {
|
15752
|
+
if (status !== ExamStatus$1.InProgress) return;
|
15753
|
+
var animate = function animate() {
|
15754
|
+
if (!startTime || !duration) return;
|
15755
|
+
if (typeof remainTime === "number" && remainTime <= 0) {
|
15756
|
+
onFinish();
|
15757
|
+
return;
|
15758
|
+
}
|
15759
|
+
var remain = getRemainTime(startTime, duration);
|
15760
|
+
if (typeof remain !== "number") {
|
15761
|
+
setRemainTime(undefined);
|
15762
|
+
return;
|
15763
|
+
}
|
15764
|
+
if (remain <= 0) {
|
15765
|
+
setRemainTime(0);
|
15766
|
+
checkLiveExamStatus();
|
15767
|
+
return;
|
15768
|
+
}
|
15769
|
+
setRemainTime(remain || 0);
|
15770
|
+
requestRef.current = requestAnimationFrame(animate);
|
15771
|
+
};
|
15772
|
+
requestRef.current = requestAnimationFrame(animate);
|
15773
|
+
return function () {
|
15774
|
+
!!requestRef.current && cancelAnimationFrame(requestRef.current);
|
15775
|
+
!!checkStatusRef.current && clearTimeout(checkStatusRef.current);
|
15776
|
+
setRemainTime(undefined);
|
15777
|
+
};
|
15778
|
+
}, [startTime, duration, fetchedCount, checkLiveExamStatus]);
|
15779
|
+
useEffect(function () {
|
15780
|
+
if (typeof remainTime === "number" && remainTime <= 0) onFinish();
|
15781
|
+
}, [remainTime, onFinish]);
|
15782
|
+
return remainTime;
|
15783
|
+
};
|
15784
|
+
|
15785
|
+
var EXAM_SESSION_URL$1 = BASE_URL + "/api/examSession";
|
15786
|
+
var getCheckStatusExam$1 = function getCheckStatusExam(examCode) {
|
15787
|
+
return api.get(EXAM_SESSION_URL$1 + "/" + examCode + "/status");
|
15788
|
+
};
|
15789
|
+
|
15790
|
+
var useCheckExam = function useCheckExam(code, status) {
|
15791
|
+
var _useState = useState({}),
|
15792
|
+
isCheckExam = _useState[0],
|
15793
|
+
setCheckExam = _useState[1];
|
15794
|
+
var isCheck = !code ? false : isCheckExam[code];
|
15795
|
+
var checkExam = function checkExam() {
|
15796
|
+
try {
|
15797
|
+
if (!code || isCheck) return Promise.resolve();
|
15798
|
+
if (status === ExamStatus$1.Completed) {
|
15799
|
+
setCheckExam(function (state) {
|
15800
|
+
var _extends2;
|
15801
|
+
return _extends({}, state, (_extends2 = {}, _extends2[code] = true, _extends2));
|
15802
|
+
});
|
15803
|
+
return Promise.resolve();
|
15804
|
+
}
|
15805
|
+
var _temp = _catch(function () {
|
15806
|
+
return Promise.resolve(getCheckStatusExam$1(code)).then(function () {
|
15807
|
+
setCheckExam(function (state) {
|
15808
|
+
var _extends3;
|
15809
|
+
return _extends({}, state, (_extends3 = {}, _extends3[code] = true, _extends3));
|
15810
|
+
});
|
15811
|
+
});
|
15812
|
+
}, function (error) {
|
15813
|
+
console.log({
|
15814
|
+
error: error
|
15815
|
+
});
|
15816
|
+
});
|
15817
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
15818
|
+
} catch (e) {
|
15819
|
+
return Promise.reject(e);
|
15820
|
+
}
|
15821
|
+
};
|
15822
|
+
useEffect(function () {
|
15823
|
+
checkExam();
|
15824
|
+
}, [code]);
|
15825
|
+
return {
|
15826
|
+
isCheck: isCheck
|
15827
|
+
};
|
15828
|
+
};
|
15829
|
+
|
15830
|
+
var useLoadMore = function useLoadMore(props) {
|
15831
|
+
var onLoadMore = props.onLoadMore,
|
15832
|
+
loading = props.loading;
|
15833
|
+
var observerTarget = useRef(null);
|
15834
|
+
useEffect(function () {
|
15835
|
+
var currentTarget = observerTarget.current;
|
15836
|
+
var observer = new IntersectionObserver(function (entries) {
|
15837
|
+
if (entries[0].isIntersecting && !loading) {
|
15838
|
+
onLoadMore();
|
15839
|
+
}
|
15840
|
+
}, {
|
15841
|
+
threshold: 1
|
15842
|
+
});
|
15843
|
+
if (observerTarget.current) {
|
15844
|
+
observer.observe(observerTarget.current);
|
15845
|
+
}
|
15846
|
+
return function () {
|
15847
|
+
if (currentTarget) {
|
15848
|
+
observer.unobserve(currentTarget);
|
15849
|
+
}
|
15850
|
+
};
|
15851
|
+
}, [observerTarget, loading, onLoadMore]);
|
15852
|
+
return {
|
15853
|
+
observerTarget: observerTarget
|
15854
|
+
};
|
15855
|
+
};
|
15856
|
+
|
15857
|
+
var useVirtualizeList = function useVirtualizeList(totalItems, rowHeight, offsetRow, minRows) {
|
15858
|
+
if (offsetRow === void 0) {
|
15859
|
+
offsetRow = 1;
|
15860
|
+
}
|
15861
|
+
var _useState = useState(-1),
|
15862
|
+
startIndex = _useState[0],
|
15863
|
+
setStartIndex = _useState[1];
|
15864
|
+
var _useState2 = useState(-1),
|
15865
|
+
endIndex = _useState2[0],
|
15866
|
+
setEndIndex = _useState2[1];
|
15867
|
+
var containerRef = useRef(null);
|
15868
|
+
var handleScroll = useCallback(function () {
|
15869
|
+
if (containerRef.current) {
|
15870
|
+
var _containerRef$current = containerRef.current,
|
15871
|
+
scrollTop = _containerRef$current.scrollTop,
|
15872
|
+
clientHeight = _containerRef$current.clientHeight;
|
15873
|
+
var itemsPerPage = Math.ceil(clientHeight / rowHeight);
|
15874
|
+
var newStartIndex = Math.max(Math.floor(scrollTop / rowHeight) - offsetRow, 0);
|
15875
|
+
var newEndIndex = Math.min(newStartIndex + itemsPerPage + offsetRow, totalItems - 1);
|
15876
|
+
if (minRows) {
|
15877
|
+
if (totalItems <= minRows) {
|
15878
|
+
newStartIndex = -1;
|
15879
|
+
newEndIndex = -1;
|
15880
|
+
} else {
|
15881
|
+
var total = newEndIndex - newStartIndex;
|
15882
|
+
var diff = minRows - total;
|
15883
|
+
if (diff > 0) {
|
15884
|
+
var valS = diff / 2;
|
15885
|
+
var valE = diff - valS;
|
15886
|
+
if (newStartIndex < valS) {
|
15887
|
+
valE += valS - newStartIndex;
|
15888
|
+
newStartIndex = 0;
|
15889
|
+
}
|
15890
|
+
if (newEndIndex + valE > totalItems - 1) {
|
15891
|
+
valS += newEndIndex + valE - totalItems + 1;
|
15892
|
+
}
|
15893
|
+
newStartIndex = Math.max(newStartIndex - valS, 0);
|
15894
|
+
newEndIndex = Math.min(newEndIndex + valE, totalItems - 1);
|
15895
|
+
}
|
15896
|
+
}
|
15897
|
+
}
|
15898
|
+
setStartIndex(newStartIndex);
|
15899
|
+
setEndIndex(newEndIndex);
|
15900
|
+
}
|
15901
|
+
}, [totalItems, rowHeight, offsetRow]);
|
15902
|
+
useEffect(function () {
|
15903
|
+
var container = containerRef.current;
|
15904
|
+
if (container) {
|
15905
|
+
container.addEventListener("scroll", handleScroll);
|
15906
|
+
}
|
15907
|
+
return function () {
|
15908
|
+
if (container) {
|
15909
|
+
container.removeEventListener("scroll", handleScroll);
|
15910
|
+
}
|
15911
|
+
};
|
15912
|
+
}, [handleScroll]);
|
15913
|
+
var handleChangeStartIndex = function handleChangeStartIndex(index) {
|
15914
|
+
setStartIndex(index);
|
15915
|
+
};
|
15916
|
+
var handleChangeEndIndex = function handleChangeEndIndex(index) {
|
15917
|
+
setEndIndex(index);
|
15918
|
+
};
|
15919
|
+
return {
|
15920
|
+
startIndex: startIndex,
|
15921
|
+
endIndex: endIndex,
|
15922
|
+
containerRef: containerRef,
|
15923
|
+
handleChangeStartIndex: handleChangeStartIndex,
|
15924
|
+
handleChangeEndIndex: handleChangeEndIndex
|
15925
|
+
};
|
15926
|
+
};
|
15927
|
+
|
15928
|
+
export { ACADEMY_DOMAIN, ACCESS_TOKEN, AcademyHeaders, AcademyList, AnswerCountSelector, ArticleCategorySelector, ArticleGroupView, BASE_URL, ChatContainer, ChatItemType, types as ChatTypes, CommonDialog, ConfirmDialog, index$1 as CoreHooks, CustomAsyncSelect, CustomCreatable, CustomPagination, CustomSelect, CustomSelectOption, DATE_MIN_VALUE, DATE_TIME_MIN_VALUE, DEFAULT_PAGING_RESPONSE, DefaultErrorMessage, EXAM_CHANNEL, EXAM_STUDENT_CHANNEL, index as Enums, ExamDetailView, ExamEvent, ExamResultV2, Header, InputText, LANGUAGES, Language, LayoutContext, Loading, Login, SignIn as LoginWithPassword, NotFound, PUSHER_CONFIG, QuestionCountSelector, Role, SUPER_ADMIN_BASE_URL, ScoreSelector, SubjectSelector, index$2 as Textbook, TextbookViewDetail as TextbookDetail, TextbookList, TheAcademyDropdown, TheLanguageDropdown, index$3 as Types, api, apiUpload, canAccess as canAccessRoute, diffFromNow, formatTime, getAcademyDomain, getAccessToken, getErrorMessage, getOrdinalSuffix, i18n, minutesToTimeSpan, setAlert, setLanguage, setLoading, setReFetchUserAcademies, setReadyRegisterPusher, setUser, store, times as timeUtils, toISOString, useAutoAcademyDomain, useCategorySelect, useChatContainer, useCheckExam, useCountDownTimer, useGoogleSignOut, useLanguage, useLoadMore, useLogin, usePusherConversation, useSubjectSelect, useSwitchAcademy, useVirtualizeList, utcToLocalTime };
|
15141
15929
|
//# sourceMappingURL=index.modern.js.map
|