touchstudy-core 0.1.165 → 0.1.167
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/Dialogs/CommonDialog.d.ts +1 -0
- package/dist/components/Selectors/QuestionCountSelector.d.ts +0 -1
- package/dist/containers/ExamResult/configs/types.d.ts +2 -0
- package/dist/containers/ExamResult/hooks/useExamResultData.d.ts +1 -0
- package/dist/containers/Notes/configs/interfaces.d.ts +0 -1
- package/dist/containers/PreparedTextbook/configs/constants.d.ts +0 -1
- package/dist/containers/StudentInfoDrawer/apiClients/courseService.d.ts +2 -1
- package/dist/containers/StudentInfoDrawer/components/Attendance/AttedanceFormDialog.d.ts +13 -0
- package/dist/containers/StudentInfoDrawer/components/Attendance/AttendanceCourseTable.d.ts +2 -3
- package/dist/containers/StudentInfoDrawer/components/Attendance/AttendanceFormBody.d.ts +11 -0
- package/dist/containers/StudentInfoDrawer/components/Attendance/AttendanceFormDialog.d.ts +13 -0
- package/dist/containers/StudentInfoDrawer/components/Attendance/CourseAttendanceItem.d.ts +2 -3
- package/dist/containers/StudentInfoDrawer/components/Attendance/DrawerAttendanceTab.d.ts +5 -1
- package/dist/containers/StudentInfoDrawer/components/Attendance/LessonTooltip.d.ts +2 -1
- package/dist/containers/StudentInfoDrawer/components/Note/NoteContent.d.ts +6 -0
- package/dist/containers/StudentInfoDrawer/configs/fns.d.ts +2 -2
- package/dist/containers/StudentInfoDrawer/configs/interfaces.d.ts +3 -3
- package/dist/containers/StudentInfoDrawer/configs/types.d.ts +16 -2
- package/dist/containers/StudentInfoDrawer/hooks/useDrawerAttendanceTab.d.ts +6 -3
- package/dist/containers/StudentInfoDrawer/index.d.ts +5 -1
- package/dist/index.css +8 -0
- package/dist/index.js +860 -633
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +854 -629
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
@@ -101,5 +101,7 @@ export declare type ExamResultV2Props = {
|
|
101
101
|
isMyStoryStudent?: boolean;
|
102
102
|
chapterId?: number;
|
103
103
|
role: Role;
|
104
|
+
showLoading?: boolean;
|
105
|
+
onLoadingChange?: (isLoading: boolean) => void;
|
104
106
|
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
105
107
|
};
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import { BaseSearchQuery } from "../../../utils";
|
2
|
+
import { AttendanceRequest } from "../configs/types";
|
2
3
|
export declare const getAttendanceByStudentIdApi: (studentId: number, query: BaseSearchQuery<string>) => Promise<import("axios").AxiosResponse<any, any>>;
|
3
|
-
export declare const getCheckInLessonsApi: (lessonId: number,
|
4
|
+
export declare const getCheckInLessonsApi: (lessonId: number, attendanceRequest: AttendanceRequest) => Promise<import("axios").AxiosResponse<any, any>>;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { Attendance, AttendanceRequest, LessonResponse } from "../../configs/types";
|
3
|
+
interface Props {
|
4
|
+
lesson: LessonResponse;
|
5
|
+
open: boolean;
|
6
|
+
studentId: number;
|
7
|
+
attendance?: Attendance;
|
8
|
+
onSearchTeachers: (text: string) => void;
|
9
|
+
onClose: () => void;
|
10
|
+
onSubmit: (attendance: AttendanceRequest) => void;
|
11
|
+
}
|
12
|
+
declare const LessonFormDialog: FC<Props>;
|
13
|
+
export default LessonFormDialog;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { FC } from "react";
|
2
|
-
import { LessonAttendance, LessonResponse } from "../../configs/types";
|
2
|
+
import { Attendance, LessonAttendance, LessonResponse } from "../../configs/types";
|
3
3
|
interface AttendanceCourseTableProps {
|
4
4
|
data: LessonAttendance[];
|
5
5
|
containerProps?: any;
|
@@ -8,8 +8,7 @@ interface AttendanceCourseTableProps {
|
|
8
8
|
mainTeacherName: string;
|
9
9
|
courseName: string;
|
10
10
|
courseId: number;
|
11
|
-
|
12
|
-
onCheckInLesson: (lesson: LessonResponse, studentId: number) => void;
|
11
|
+
onCheckInLesson: (lesson: LessonResponse, attendance?: Attendance) => void;
|
13
12
|
}
|
14
13
|
declare const AttendanceCourseTable: FC<AttendanceCourseTableProps>;
|
15
14
|
export default AttendanceCourseTable;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { FormikProps } from "formik";
|
3
|
+
import { Attendance, AttendanceFormRequest, LessonResponse } from "../../configs/types";
|
4
|
+
interface AttendanceFormBodyProps {
|
5
|
+
formikProp: FormikProps<AttendanceFormRequest>;
|
6
|
+
lesson: LessonResponse;
|
7
|
+
attendance?: Attendance;
|
8
|
+
onClose: () => void;
|
9
|
+
}
|
10
|
+
declare const AttendanceFormBody: FC<AttendanceFormBodyProps>;
|
11
|
+
export default AttendanceFormBody;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { Attendance, AttendanceRequest, LessonResponse } from "../../configs/types";
|
3
|
+
interface Props {
|
4
|
+
lesson?: LessonResponse;
|
5
|
+
open: boolean;
|
6
|
+
studentId: number;
|
7
|
+
attendance?: Attendance;
|
8
|
+
zIndex?: number;
|
9
|
+
onClose: () => void;
|
10
|
+
onSubmit: (lesson: LessonResponse, attendance: AttendanceRequest) => Promise<void>;
|
11
|
+
}
|
12
|
+
declare const AttendanceFormDialog: FC<Props>;
|
13
|
+
export default AttendanceFormDialog;
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { FC } from "react";
|
2
|
-
import { CourseAttendanceResponse, LessonResponse } from "../../configs/types";
|
2
|
+
import { Attendance, CourseAttendanceResponse, LessonResponse } from "../../configs/types";
|
3
3
|
interface Props {
|
4
|
-
studentId: number;
|
5
4
|
data: CourseAttendanceResponse;
|
6
|
-
onCheckInLesson: (lesson: LessonResponse,
|
5
|
+
onCheckInLesson: (lesson: LessonResponse, attendance?: Attendance) => void;
|
7
6
|
onLoad?: () => void;
|
8
7
|
}
|
9
8
|
declare const CourseAttendanceItem: FC<Props>;
|
@@ -1,4 +1,8 @@
|
|
1
1
|
import { FC } from "react";
|
2
2
|
import { TabContentProps } from "../../configs/interfaces";
|
3
|
-
|
3
|
+
import { Attendance } from "../../configs/types";
|
4
|
+
interface Props extends TabContentProps {
|
5
|
+
onUpdatedAttendance?: (attendance: Attendance, studentId: number) => void;
|
6
|
+
}
|
7
|
+
declare const DrawerAttendanceTab: FC<Props>;
|
4
8
|
export default DrawerAttendanceTab;
|
@@ -3,6 +3,7 @@ import { Attendance, LessonResponse } from "../../configs/types";
|
|
3
3
|
declare type Props = {
|
4
4
|
lesson: LessonResponse;
|
5
5
|
lessonAttendance?: Attendance;
|
6
|
+
padding?: number | string;
|
6
7
|
};
|
7
|
-
declare const LessonTooltip: ({ lesson, lessonAttendance }: Props) => React.JSX.Element;
|
8
|
+
declare const LessonTooltip: ({ lesson, lessonAttendance, padding }: Props) => React.JSX.Element;
|
8
9
|
export default LessonTooltip;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { moment } from "../../../utils";
|
1
2
|
export declare const formatGrade: (grade: number, t: any, language?: string | undefined) => string;
|
2
3
|
export declare const formatLessonOrder: (index: number, t: any, language?: string | undefined) => string;
|
3
4
|
export declare const formatTime: (t: any, timeInMilliseconds: number) => any;
|
@@ -22,5 +23,4 @@ export declare const a11yProps: (index: number) => {
|
|
22
23
|
};
|
23
24
|
};
|
24
25
|
};
|
25
|
-
export declare const subtractTime: (time1:
|
26
|
-
export declare const formatTimeHHmm: (time: string) => string;
|
26
|
+
export declare const subtractTime: (time1: moment.Moment, time2: moment.Moment, t: any) => string;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { BoxProps } from "@mui/material";
|
2
2
|
import { DrawerTab } from "./enums";
|
3
|
-
import { CourseAttendanceResponse, ExamSessionResponse, LessonResponse, TextbookResponse } from "./types";
|
3
|
+
import { Attendance, CourseAttendanceResponse, ExamSessionResponse, LessonResponse, TextbookResponse } from "./types";
|
4
4
|
import { Role } from "../../../utils";
|
5
5
|
export interface StudentInfoDrawerProps {
|
6
6
|
role: Role;
|
@@ -12,6 +12,7 @@ export interface StudentInfoDrawerProps {
|
|
12
12
|
width?: number | string;
|
13
13
|
history: any;
|
14
14
|
onViewQA?: (studentId: number, sessionId?: number, questionId?: number, isTextbook?: boolean) => void;
|
15
|
+
onUpdatedAttendance?: (attendance: Attendance, studentId: number) => void;
|
15
16
|
}
|
16
17
|
export interface TabContentProps {
|
17
18
|
studentId: number;
|
@@ -19,13 +20,12 @@ export interface TabContentProps {
|
|
19
20
|
value: DrawerTab;
|
20
21
|
}
|
21
22
|
export interface CourseAttendanceListProps {
|
22
|
-
studentId: number;
|
23
23
|
data: CourseAttendanceResponse[];
|
24
24
|
containerProps?: BoxProps;
|
25
25
|
isLoading: boolean;
|
26
26
|
listHeight?: number;
|
27
27
|
onLoadMore: () => void;
|
28
|
-
onCheckInLesson: (lesson: LessonResponse,
|
28
|
+
onCheckInLesson: (lesson: LessonResponse, attendance?: Attendance) => void;
|
29
29
|
}
|
30
30
|
export interface ExamResultListProps {
|
31
31
|
studentId: number;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { BaseSearchQuery, ExamStatus, PreparedType } from "../../../utils";
|
1
|
+
import { BaseSearchQuery, ExamStatus, moment, PreparedType } from "../../../utils";
|
2
2
|
import { StudentAttendanceStatus } from "./enums";
|
3
3
|
export declare type StudentInfo = {
|
4
4
|
id: number;
|
@@ -28,7 +28,7 @@ export declare type LessonAttendance = {
|
|
28
28
|
};
|
29
29
|
export declare type Attendance = {
|
30
30
|
lessonId: number;
|
31
|
-
attendanceTime
|
31
|
+
attendanceTime?: string;
|
32
32
|
status: StudentAttendanceStatus;
|
33
33
|
};
|
34
34
|
export declare type LessonResponse = {
|
@@ -99,3 +99,17 @@ export declare type TextbookResponse = {
|
|
99
99
|
isStudying: boolean;
|
100
100
|
totalAnswerTime: number;
|
101
101
|
};
|
102
|
+
export declare type AttendanceRequest = {
|
103
|
+
studentId: number;
|
104
|
+
status: StudentAttendanceStatus;
|
105
|
+
attendanceTime?: string;
|
106
|
+
};
|
107
|
+
export declare type AttendanceFormRequest = {
|
108
|
+
studentId: number;
|
109
|
+
status: StudentAttendanceStatus;
|
110
|
+
attendanceTime?: moment.Moment;
|
111
|
+
};
|
112
|
+
export declare type AttendanceDialogData = {
|
113
|
+
attendance?: Attendance;
|
114
|
+
lesson: LessonResponse;
|
115
|
+
};
|
@@ -1,8 +1,11 @@
|
|
1
|
-
import { CourseAttendanceResponse, LessonResponse } from "../configs/types";
|
2
|
-
declare const useDrawerAttendanceTab: (studentId: number) => {
|
1
|
+
import { Attendance, AttendanceDialogData, AttendanceRequest, CourseAttendanceResponse, LessonResponse } from "../configs/types";
|
2
|
+
declare const useDrawerAttendanceTab: (studentId: number, onUpdatedAttendance?: ((attendance: Attendance, studentId: number) => void) | undefined) => {
|
3
3
|
items: CourseAttendanceResponse[];
|
4
4
|
isLoading: boolean;
|
5
|
+
openAttendanceDalog: AttendanceDialogData | undefined;
|
5
6
|
handleLoadMore: () => void;
|
6
|
-
handleCheckInLesson: (lesson: LessonResponse,
|
7
|
+
handleCheckInLesson: (lesson: LessonResponse, attendance?: Attendance | undefined) => void;
|
8
|
+
handleCloseAttendanceDialog: () => void;
|
9
|
+
handleUpdateStudentAttendance: (lesson: LessonResponse, attendanceRequest: AttendanceRequest) => Promise<void>;
|
7
10
|
};
|
8
11
|
export default useDrawerAttendanceTab;
|
@@ -1,2 +1,6 @@
|
|
1
|
+
import AttendanceFormDialog from "./components/Attendance/AttendanceFormDialog";
|
1
2
|
import StudentInfoDrawer from "./views/StudentInfoDrawer";
|
2
|
-
|
3
|
+
import { AttendanceRequest, AttendanceDialogData } from "./configs/types";
|
4
|
+
import LessonTooltip from "./components/Attendance/LessonTooltip";
|
5
|
+
export { StudentInfoDrawer, AttendanceFormDialog, LessonTooltip };
|
6
|
+
export type { AttendanceRequest, AttendanceDialogData };
|
package/dist/index.css
CHANGED