touchstudy-core 0.1.91 → 0.1.93

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.
@@ -2252,6 +2252,7 @@ var weekly_day = "주간";
2252
2252
  var weekly_days = "주간";
2253
2253
  var enter_class_name = "수업 이름을 입력하세요";
2254
2254
  var class_required = "수업 이름은 필수 항목입니다";
2255
+ var class_name_must_be_at_least_N_characters = "클래스 이름은 {{length}}자 이상이어야 합니다";
2255
2256
  var total_teachers = "총 교사 수";
2256
2257
  var start_date_required = "시작일은 필수 항목입니다";
2257
2258
  var end_date_required = "종료일은 필수 항목입니다";
@@ -2489,6 +2490,7 @@ var manage_textbooks = "교과서 관리";
2489
2490
  var my_question = "내 질문";
2490
2491
  var update_class = "수업 업데이트";
2491
2492
  var create_class = "수업 만들기";
2493
+ var view_class = "수업 보기";
2492
2494
  var problem_number = "문제 번호";
2493
2495
  var answer = "정답";
2494
2496
  var correct = "정답";
@@ -2659,6 +2661,7 @@ var update_exam_successfully = "시험을 성공적으로 업데이트했습니
2659
2661
  var create_exam_successfully = "시험을 성공적으로 만들었습니다.";
2660
2662
  var create_notification = "알림 생성";
2661
2663
  var update_notification = "업데이트 알림";
2664
+ var view_notification = "알림 보기";
2662
2665
  var new_notification = "새로운 알림";
2663
2666
  var are_you_sure_to_delete_notification = "알림을 삭제하시겠습니까:";
2664
2667
  var answer_list = "답변 목록";
@@ -3065,6 +3068,7 @@ var lang_ko = {
3065
3068
  weekly_days: weekly_days,
3066
3069
  enter_class_name: enter_class_name,
3067
3070
  class_required: class_required,
3071
+ class_name_must_be_at_least_N_characters: class_name_must_be_at_least_N_characters,
3068
3072
  total_teachers: total_teachers,
3069
3073
  start_date_required: start_date_required,
3070
3074
  end_date_required: end_date_required,
@@ -3288,6 +3292,7 @@ var lang_ko = {
3288
3292
  my_question: my_question,
3289
3293
  update_class: update_class,
3290
3294
  create_class: create_class,
3295
+ view_class: view_class,
3291
3296
  problem_number: problem_number,
3292
3297
  answer: answer,
3293
3298
  correct: correct,
@@ -3463,6 +3468,7 @@ var lang_ko = {
3463
3468
  create_exam_successfully: create_exam_successfully,
3464
3469
  create_notification: create_notification,
3465
3470
  update_notification: update_notification,
3471
+ view_notification: view_notification,
3466
3472
  new_notification: new_notification,
3467
3473
  are_you_sure_to_delete_notification: are_you_sure_to_delete_notification,
3468
3474
  answer_list: answer_list,
@@ -3869,6 +3875,7 @@ var weekly_day$1 = "Weekly day";
3869
3875
  var weekly_days$1 = "Weekly days";
3870
3876
  var enter_class_name$1 = "Enter class name";
3871
3877
  var class_required$1 = "Class name is required";
3878
+ var class_name_must_be_at_least_N_characters$1 = "Class name must be at least {{length}} characters";
3872
3879
  var total_teachers$1 = "Total teachers";
3873
3880
  var start_date_required$1 = "Start date is required";
3874
3881
  var end_date_required$1 = "End date is required";
@@ -4124,6 +4131,7 @@ var teachers$1 = "Teachers";
4124
4131
  var lessons$1 = "Lessons";
4125
4132
  var update_class$1 = "Update class";
4126
4133
  var create_class$1 = "Create class";
4134
+ var view_class$1 = "View class";
4127
4135
  var new_test$1 = "New Test";
4128
4136
  var manage_saved_exams$1 = "Manage saved exams";
4129
4137
  var manage_textbooks$1 = "Manage Textbooks";
@@ -4293,6 +4301,7 @@ var update_exam_successfully$1 = "Update exam successfully";
4293
4301
  var create_exam_successfully$1 = "Create exam successfully";
4294
4302
  var create_notification$1 = "Create Notification";
4295
4303
  var update_notification$1 = "Update Notification";
4304
+ var view_notification$1 = "View Notification";
4296
4305
  var new_notification$1 = "New Notification";
4297
4306
  var are_you_sure_to_delete_notification$1 = "Are you sure to delete notification:";
4298
4307
  var answer_list$1 = "Answer List";
@@ -4527,7 +4536,7 @@ var delete_action$1 = "Delete";
4527
4536
  var edit_action$1 = "Edit";
4528
4537
  var view_action$1 = "View";
4529
4538
  var de_select$1 = "Deselect";
4530
- var select_output$1 = "Select output";
4539
+ var select_output$1 = "Select";
4531
4540
  var print_pdf$1 = "Print PDF";
4532
4541
  var completed$1 = "Completed";
4533
4542
  var in_progress$1 = "In Progress";
@@ -4683,6 +4692,7 @@ var lang_en = {
4683
4692
  weekly_days: weekly_days$1,
4684
4693
  enter_class_name: enter_class_name$1,
4685
4694
  class_required: class_required$1,
4695
+ class_name_must_be_at_least_N_characters: class_name_must_be_at_least_N_characters$1,
4686
4696
  total_teachers: total_teachers$1,
4687
4697
  start_date_required: start_date_required$1,
4688
4698
  end_date_required: end_date_required$1,
@@ -4924,6 +4934,7 @@ var lang_en = {
4924
4934
  lessons: lessons$1,
4925
4935
  update_class: update_class$1,
4926
4936
  create_class: create_class$1,
4937
+ view_class: view_class$1,
4927
4938
  new_test: new_test$1,
4928
4939
  manage_saved_exams: manage_saved_exams$1,
4929
4940
  manage_textbooks: manage_textbooks$1,
@@ -5098,6 +5109,7 @@ var lang_en = {
5098
5109
  create_exam_successfully: create_exam_successfully$1,
5099
5110
  create_notification: create_notification$1,
5100
5111
  update_notification: update_notification$1,
5112
+ view_notification: view_notification$1,
5101
5113
  new_notification: new_notification$1,
5102
5114
  are_you_sure_to_delete_notification: are_you_sure_to_delete_notification$1,
5103
5115
  answer_list: answer_list$1,
@@ -6067,6 +6079,7 @@ var ContentTooltip = function ContentTooltip(_ref) {
6067
6079
  style: {
6068
6080
  padding: "12px 35px"
6069
6081
  },
6082
+ className: "pointer",
6070
6083
  onClick: toggleUpdateDialog
6071
6084
  }, React__default.createElement(Typography, {
6072
6085
  sx: {
@@ -6082,6 +6095,7 @@ var ContentTooltip = function ContentTooltip(_ref) {
6082
6095
  style: {
6083
6096
  padding: "12px 35px"
6084
6097
  },
6098
+ className: "pointer",
6085
6099
  onClick: toggleConfirmDialog
6086
6100
  }, React__default.createElement(Typography, {
6087
6101
  sx: {
@@ -15317,6 +15331,7 @@ var studentNameStyle = {
15317
15331
  lineHeight: 1
15318
15332
  };
15319
15333
  var PrintExamResult = function PrintExamResult(_ref) {
15334
+ var _resultData$courses;
15320
15335
  var resultData = _ref.resultData,
15321
15336
  examTime = _ref.examTime,
15322
15337
  status = _ref.status,
@@ -15335,6 +15350,9 @@ var PrintExamResult = function PrintExamResult(_ref) {
15335
15350
  var _state$common;
15336
15351
  return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.academy;
15337
15352
  });
15353
+ var courses = resultData === null || resultData === void 0 ? void 0 : (_resultData$courses = resultData.courses) === null || _resultData$courses === void 0 ? void 0 : _resultData$courses.map(function (c) {
15354
+ return c.name;
15355
+ }).join(', ');
15338
15356
  return React__default.createElement(Box, {
15339
15357
  sx: {
15340
15358
  minWidth: "768px",
@@ -15373,9 +15391,9 @@ var PrintExamResult = function PrintExamResult(_ref) {
15373
15391
  sx: _extends({}, studentNameStyle, {
15374
15392
  textAlign: "end"
15375
15393
  })
15376
- }, academy.name)), resultData.courseName && React__default.createElement(Stack, null, React__default.createElement(Typography, {
15394
+ }, academy.name)), courses && React__default.createElement(Stack, null, React__default.createElement(Typography, {
15377
15395
  sx: courseNameStyle
15378
- }, resultData.courseName)), React__default.createElement(Box, {
15396
+ }, courses)), React__default.createElement(Box, {
15379
15397
  display: "flex",
15380
15398
  gap: "16px",
15381
15399
  flexDirection: "column"
@@ -15524,6 +15542,7 @@ var PrintExamResult = function PrintExamResult(_ref) {
15524
15542
  };
15525
15543
 
15526
15544
  var ExamResultV2 = function ExamResultV2(_ref) {
15545
+ var _resultData$courses;
15527
15546
  var searchParams = _ref.searchParams,
15528
15547
  history = _ref.history,
15529
15548
  _ref$examSessionId = _ref.examSessionId,
@@ -15574,6 +15593,9 @@ var ExamResultV2 = function ExamResultV2(_ref) {
15574
15593
  handlePrintPdf = _usePrintExamResult.handlePrintPdf,
15575
15594
  setRenderedChart = _usePrintExamResult.setRenderedChart;
15576
15595
  var isTabletUp = useMediaQuery('(min-width:900px)');
15596
+ var courses = resultData === null || resultData === void 0 ? void 0 : (_resultData$courses = resultData.courses) === null || _resultData$courses === void 0 ? void 0 : _resultData$courses.map(function (c) {
15597
+ return c.name;
15598
+ }).join(', ');
15577
15599
  return React__default.createElement(Fragment$1, null, React__default.createElement(LoadingComponent, {
15578
15600
  isLoading: !!isLoading
15579
15601
  }), timelyOrderQuestions[dataChartIndex] && longTimeSpend && resultData && effectSize ? React__default.createElement("div", {
@@ -15585,13 +15607,13 @@ var ExamResultV2 = function ExamResultV2(_ref) {
15585
15607
  padding: "24px"
15586
15608
  }, React__default.createElement(Grid, {
15587
15609
  item: true
15588
- }, resultData.courseName && React__default.createElement(Stack, null, React__default.createElement(Typography, {
15610
+ }, courses && React__default.createElement(Stack, null, React__default.createElement(Typography, {
15589
15611
  sx: {
15590
15612
  fontSize: "14px",
15591
15613
  fontWeight: 600,
15592
15614
  color: styles.less_dark
15593
15615
  }
15594
- }, resultData.courseName)), React__default.createElement(Box, {
15616
+ }, courses)), React__default.createElement(Box, {
15595
15617
  display: "flex",
15596
15618
  gap: "16px",
15597
15619
  flexDirection: "column"
@@ -17777,7 +17799,9 @@ var DEFAULT_LESSON_REQUEST = {
17777
17799
  };
17778
17800
  var ClassSchema = function ClassSchema(t) {
17779
17801
  return object({
17780
- name: string().required(t("class_required")),
17802
+ name: string().required(t("class_required")).trim().min(2, t("class_name_must_be_at_least_N_characters", {
17803
+ length: 2
17804
+ })),
17781
17805
  startDate: date$2().required(t("start_date_required")),
17782
17806
  endDate: date$2().required(t("end_date_required")),
17783
17807
  mainTeacherId: number().required(t("main_teacher_required")),
@@ -20351,7 +20375,7 @@ var ClassDetail = function ClassDetail(_ref) {
20351
20375
  pt: !!id ? "12px" : "0px"
20352
20376
  }, React__default.createElement(Typography, {
20353
20377
  variant: "h4"
20354
- }, t(!id ? "create_class" : "update_class"))), React__default.createElement(Formik, {
20378
+ }, t(!id ? "create_class" : isAdmin ? "update_class" : "view_class"))), React__default.createElement(Formik, {
20355
20379
  initialValues: DEFAULT_CLASS_REQUEST,
20356
20380
  validationSchema: schema,
20357
20381
  onSubmit: handleSubmit
@@ -22267,7 +22291,7 @@ var NotificationDetail = function NotificationDetail(_ref) {
22267
22291
  mb: 2
22268
22292
  }, React__default.createElement(Typography, {
22269
22293
  variant: "h4"
22270
- }, t(!id ? "create_notification" : "update_notification"))), React__default.createElement(Formik, {
22294
+ }, t(!id ? "create_notification" : !isAdmin && (!(detailNotification !== null && detailNotification !== void 0 && detailNotification.isOwned) || isTeacherAdmin) ? "view_notification" : "update_notification"))), React__default.createElement(Formik, {
22271
22295
  initialValues: DEFAULT_NOTIFICATION_REQUEST,
22272
22296
  validationSchema: schema,
22273
22297
  onSubmit: handleSubmit
@@ -22561,11 +22585,13 @@ var NotificationList = function NotificationList(_ref) {
22561
22585
  className: "d-flex"
22562
22586
  }, React__default.createElement(IconButton, {
22563
22587
  color: "default",
22564
- className: "bg-warning text-white me-1",
22588
+ className: "bg-" + (!isAdmin && (isTeacherAdmin || !i.isOwned) ? "primary" : "warning") + " text-white me-1",
22565
22589
  onClick: function onClick() {
22566
22590
  return handleUpdateNotification(i);
22567
22591
  }
22568
- }, React__default.createElement(HiOutlinePencilAlt, {
22592
+ }, !isAdmin && (isTeacherAdmin || !i.isOwned) ? React__default.createElement(FaEye, {
22593
+ size: 12
22594
+ }) : React__default.createElement(HiOutlinePencilAlt, {
22569
22595
  size: 12
22570
22596
  })), React__default.createElement(IconButton, {
22571
22597
  color: "error",