touchstudy-core 0.1.84 → 0.1.85
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/abc/index.d.ts +2 -0
- package/dist/abc.js +4 -0
- package/dist/abc.js.map +1 -0
- package/dist/abc.modern.js +4 -0
- package/dist/abc.modern.js.map +1 -0
- package/dist/containers/Login/apiClient/index.d.ts +2 -5
- package/dist/containers/Login/configs/types.d.ts +11 -0
- package/dist/containers/Login/hooks/useLogin.d.ts +2 -4
- package/dist/index.js +29 -18
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +29 -18
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/ErrorHandler.d.ts +0 -6
- package/dist/components/LabelRequired.d.ts +0 -8
- package/dist/components/Selectors/InActiveAcademySelector.d.ts +0 -16
- package/dist/components/Selectors/TimeZoneSelector.d.ts +0 -9
- package/dist/components/Selectors/configs/enums.d.ts +0 -6
- package/dist/components/Selects/styles.d.ts +0 -6
- package/dist/containers/Classes/apiClients/classService.d.ts +0 -16
- package/dist/containers/Classes/apiClients/teacherService.d.ts +0 -2
- package/dist/containers/Classes/components/ClassForm.d.ts +0 -4
- package/dist/containers/Classes/components/CorrectAnswerSelector.d.ts +0 -7
- package/dist/containers/Classes/components/LessonFormBody.d.ts +0 -4
- package/dist/containers/Classes/components/LessonFormDialog.d.ts +0 -14
- package/dist/containers/Classes/components/LessonList.d.ts +0 -27
- package/dist/containers/Classes/components/SelectDialog.d.ts +0 -30
- package/dist/containers/Classes/components/StudentList.d.ts +0 -21
- package/dist/containers/Classes/components/TeacherList.d.ts +0 -21
- package/dist/containers/Classes/components/TeacherSelector.d.ts +0 -11
- package/dist/containers/Classes/configs/constants.d.ts +0 -70
- package/dist/containers/Classes/configs/interfaces.d.ts +0 -23
- package/dist/containers/Classes/configs/types.d.ts +0 -215
- package/dist/containers/Classes/hooks/useClassDetail.d.ts +0 -105
- package/dist/containers/Classes/hooks/useClassList.d.ts +0 -20
- package/dist/containers/Classes/hooks/useLessonClassList.d.ts +0 -20
- package/dist/containers/Classes/hooks/useStudentClassList.d.ts +0 -22
- package/dist/containers/Classes/hooks/useTab.d.ts +0 -5
- package/dist/containers/Classes/hooks/useTeacherClassList.d.ts +0 -22
- package/dist/containers/Classes/hooks/useTeacherList.d.ts +0 -6
- package/dist/containers/Classes/views/ClassDetail.d.ts +0 -10
- package/dist/containers/Classes/views/ClassList.d.ts +0 -10
- package/dist/containers/ExamResult/components/Dialog/PrintDialog.d.ts +0 -6
- package/dist/containers/ExamResult/views/ExamResultView.d.ts +0 -11
- package/dist/containers/ExamResult/views/PrintPdfExamResult.d.ts +0 -12
- package/dist/containers/Textbooks/components/ChapterNameDialog.d.ts +0 -10
- package/dist/containers/Users/apiClient/userService.d.ts +0 -9
- package/dist/containers/Users/components/Dialogs/DeleteUserCsvDialog.d.ts +0 -10
- package/dist/containers/Users/components/Dialogs/RecentUserActionDialog.d.ts +0 -9
- package/dist/containers/Users/components/Dialogs/UserDialog.d.ts +0 -12
- package/dist/containers/Users/configs/constants.d.ts +0 -37
- package/dist/containers/Users/configs/types.d.ts +0 -11
- package/dist/containers/Users/hooks/useExportUsersCsv.d.ts +0 -5
- package/dist/containers/Users/hooks/useRecentUserAction.d.ts +0 -10
- package/dist/containers/Users/hooks/useUserList.d.ts +0 -40
- package/dist/containers/Users/views/UserList.d.ts +0 -7
- package/dist/test/performance_login.d.ts +0 -5
- package/dist/tests/performances/do-exam-session-list-student.d.ts +0 -19
- package/dist/tests/performances/do-exam-session-request-answer-one-time.d.ts +0 -19
- package/dist/tests/performances/do-exam-session-skip-answer.d.ts +0 -19
- package/dist/tests/performances/do-exam-session2.d.ts +0 -19
- package/dist/tests/performances/do-exam.d.ts +0 -15
- package/dist/tests/performances/join-exam.d.ts +0 -13
- package/dist/tests/performances/login.d.ts +0 -20
- package/dist/tests/performances/ramping-vus.d.ts +0 -7
- package/dist/utilities.d.ts +0 -1
- package/dist/utils/enums/UserSortColumn.d.ts +0 -11
- package/dist/utils/enums/orderBy.d.ts +0 -4
- package/dist/utils/hooks/useCheckExam.d.ts +0 -5
- package/dist/utils/toLocalTime.d.ts +0 -1
- package/dist/utils/types/user.d.ts +0 -3
- package/dist/utils/types/users.d.ts +0 -17
- /package/dist/utils/types/{PagingResponse.d.ts → pagingResponse.d.ts} +0 -0
package/dist/index.modern.js
CHANGED
@@ -798,16 +798,11 @@ var BlockLogin = function BlockLogin(_ref3) {
|
|
798
798
|
onSubmit: onSubmit
|
799
799
|
}, function (_ref4) {
|
800
800
|
var errors = _ref4.errors,
|
801
|
-
values = _ref4.values,
|
802
801
|
setFieldValue = _ref4.setFieldValue;
|
803
|
-
console.log({
|
804
|
-
errors: errors,
|
805
|
-
values: values
|
806
|
-
});
|
807
802
|
useEffect(function () {
|
808
|
-
if (
|
803
|
+
if (isEmail) setFieldValue("otp", "");
|
804
|
+
if (!isOTP && !isEmail) {
|
809
805
|
setFieldValue("email", "");
|
810
|
-
} else {
|
811
806
|
setFieldValue("otp", "");
|
812
807
|
}
|
813
808
|
}, [isOTP, isEmail]);
|
@@ -843,8 +838,9 @@ var BlockLogin = function BlockLogin(_ref3) {
|
|
843
838
|
fontSize: "14px",
|
844
839
|
fontWeight: 700,
|
845
840
|
color: blue[700]
|
846
|
-
}, t("sign_in_with_email"))))), (isEmail || isOTP) && React__default.createElement(Stack, null,
|
841
|
+
}, t("sign_in_with_email"))))), (isEmail || isOTP) && React__default.createElement(Stack, null, React__default.createElement(Stack, {
|
847
842
|
flexDirection: "column",
|
843
|
+
display: isOTP ? "none" : "flex",
|
848
844
|
gap: 1
|
849
845
|
}, React__default.createElement(Typography, {
|
850
846
|
fontWeight: 700,
|
@@ -860,8 +856,9 @@ var BlockLogin = function BlockLogin(_ref3) {
|
|
860
856
|
fontSize: "10px",
|
861
857
|
lineHeight: "11.93px",
|
862
858
|
color: !(errors !== null && errors !== void 0 && errors.email) ? "#97A1AF" : "#F34B4B"
|
863
|
-
}, errors === null || errors === void 0 ? void 0 : errors.email))
|
859
|
+
}, errors === null || errors === void 0 ? void 0 : errors.email)), React__default.createElement(Stack, {
|
864
860
|
flexDirection: "column",
|
861
|
+
display: !isOTP ? "none" : "flex",
|
865
862
|
gap: 1
|
866
863
|
}, React__default.createElement(Typography, {
|
867
864
|
fontWeight: 700,
|
@@ -900,10 +897,18 @@ var BlockLogin = function BlockLogin(_ref3) {
|
|
900
897
|
color: blue[700]
|
901
898
|
}, t("sign_in_with_google_account"))), React__default.createElement(Stack, {
|
902
899
|
flexDirection: "row",
|
903
|
-
justifyContent: "end",
|
900
|
+
justifyContent: isOTP ? "space-between" : "end",
|
904
901
|
gap: 1,
|
905
902
|
mt: 2
|
906
|
-
}, React__default.createElement(Button, {
|
903
|
+
}, isOTP && React__default.createElement(Button, {
|
904
|
+
variant: "contained",
|
905
|
+
color: "secondary",
|
906
|
+
className: "bg-secondary",
|
907
|
+
onClick: function onClick() {
|
908
|
+
handleSwitchEmail(true);
|
909
|
+
handleSwitchOTP(false);
|
910
|
+
}
|
911
|
+
}, t("back")), React__default.createElement(Button, {
|
907
912
|
variant: "contained",
|
908
913
|
color: "primary",
|
909
914
|
type: "submit",
|
@@ -940,10 +945,14 @@ var signInWithEmailApi = function signInWithEmailApi(_ref2) {
|
|
940
945
|
var signInWithOTPApi = function signInWithOTPApi(_ref3) {
|
941
946
|
var academyDomain = _ref3.academyDomain,
|
942
947
|
otp = _ref3.otp,
|
948
|
+
email = _ref3.email,
|
949
|
+
reCaptcha = _ref3.reCaptcha,
|
943
950
|
role = _ref3.role;
|
944
951
|
return api.post((academyDomain ? SIGN_IN_URL : SIGN_IN_SUPER_ADMIN_URL) + "/otp", {
|
945
952
|
otp: otp,
|
946
|
-
|
953
|
+
email: email,
|
954
|
+
role: role,
|
955
|
+
reCaptcha: reCaptcha
|
947
956
|
});
|
948
957
|
};
|
949
958
|
var signInWithKeyApi = function signInWithKeyApi(_ref4) {
|
@@ -1030,6 +1039,9 @@ var useLogin$1 = function useLogin(_ref) {
|
|
1030
1039
|
var handleSubmit = function handleSubmit(values) {
|
1031
1040
|
try {
|
1032
1041
|
var _temp5 = function _temp5() {
|
1042
|
+
setRefreshReCaptcha(function (b) {
|
1043
|
+
return !b;
|
1044
|
+
});
|
1033
1045
|
dispatch(setLoading(false));
|
1034
1046
|
};
|
1035
1047
|
if (!tokenReCaptcha) return Promise.resolve();
|
@@ -1039,11 +1051,13 @@ var useLogin$1 = function useLogin(_ref) {
|
|
1039
1051
|
var _temp4 = _catch(function () {
|
1040
1052
|
function _temp3() {
|
1041
1053
|
var _temp = function () {
|
1042
|
-
if (otp) {
|
1054
|
+
if (email && otp) {
|
1043
1055
|
return Promise.resolve(signInWithOTPApi({
|
1044
1056
|
academyDomain: academyDomain,
|
1057
|
+
email: email,
|
1045
1058
|
otp: otp,
|
1046
|
-
role: role
|
1059
|
+
role: role,
|
1060
|
+
reCaptcha: tokenReCaptcha
|
1047
1061
|
})).then(function (res) {
|
1048
1062
|
var loginResponse = res === null || res === void 0 ? void 0 : res.data;
|
1049
1063
|
var isFirstLogin = loginResponse.isFirstLogin,
|
@@ -1060,7 +1074,7 @@ var useLogin$1 = function useLogin(_ref) {
|
|
1060
1074
|
if (_temp && _temp.then) return _temp.then(function () {});
|
1061
1075
|
}
|
1062
1076
|
var _temp2 = function () {
|
1063
|
-
if (email) {
|
1077
|
+
if (email && !otp) {
|
1064
1078
|
return Promise.resolve(signInWithEmailApi({
|
1065
1079
|
academyDomain: academyDomain,
|
1066
1080
|
email: email,
|
@@ -1069,9 +1083,6 @@ var useLogin$1 = function useLogin(_ref) {
|
|
1069
1083
|
toast.success(t("please_check_your_mailbox"));
|
1070
1084
|
handleSwitchOTP(true);
|
1071
1085
|
handleSwitchEmail(false);
|
1072
|
-
setRefreshReCaptcha(function (b) {
|
1073
|
-
return !b;
|
1074
|
-
});
|
1075
1086
|
});
|
1076
1087
|
}
|
1077
1088
|
}();
|