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