touchstudy-core 0.1.146 → 0.1.147
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/alert-circle-fill~CSSkoNUz.svg +3 -0
- package/dist/assets/AlertCircleFill.d.ts +3 -0
- package/dist/assets/CalendarFill.d.ts +3 -0
- package/dist/assets/CheckCircleFill.d.ts +3 -0
- package/dist/assets/CheckedCircleFill.d.ts +3 -0
- package/dist/assets/ClockFill.d.ts +3 -0
- package/dist/assets/CloseCircleFill.d.ts +3 -0
- package/dist/assets/IconPerson.d.ts +3 -0
- package/dist/calendar_fill~zEgxFwDs.svg +4 -0
- package/dist/check-circle_fill~bbGHfKpz.svg +3 -0
- package/dist/checked-circle_fill~KLGxfRpW.svg +3 -0
- package/dist/clock_fill~mcRclYYO.svg +3 -0
- package/dist/close-circle_fill~PRVaHJUQ.svg +3 -0
- package/dist/components/Tables/configs/interfaces.d.ts +1 -0
- package/dist/containers/Classes/components/StudentList.d.ts +1 -0
- package/dist/containers/ExamResult/apiClients/index.d.ts +5 -5
- package/dist/containers/ExamResult/hooks/useExamResult.d.ts +6 -6
- package/dist/containers/ExamResult/hooks/useExamResultNote.d.ts +3 -3
- package/dist/containers/Notes/components/NoteItem.d.ts +1 -0
- package/dist/containers/Notes/configs/interfaces.d.ts +1 -0
- package/dist/containers/Notes/styles/styles.d.ts +2 -0
- package/dist/containers/PreparedExam/apiClients/textbookService.d.ts +1 -1
- package/dist/containers/PreparedExam/components/dialogs/ChapterProblemSolvingResultsDialog.d.ts +2 -1
- package/dist/containers/PreparedExam/components/dialogs/TextbookDrawer.d.ts +7 -2
- package/dist/containers/PreparedExam/components/dialogs/TextbookInfoDrawer.d.ts +3 -2
- package/dist/containers/PreparedExam/hooks/useTextbookDrawer.d.ts +3 -1
- package/dist/containers/StudentInfoDrawer/apiClients/courseService.d.ts +3 -0
- package/dist/containers/StudentInfoDrawer/apiClients/examSessionService.d.ts +1 -0
- package/dist/containers/StudentInfoDrawer/apiClients/noteService.d.ts +6 -0
- package/dist/containers/StudentInfoDrawer/apiClients/textbookService.d.ts +1 -0
- package/dist/containers/StudentInfoDrawer/apiClients/userService.d.ts +1 -0
- package/dist/containers/StudentInfoDrawer/components/Attendance/AttendanceCourseTable.d.ts +15 -0
- package/dist/containers/StudentInfoDrawer/components/Attendance/CourseAttendanceItem.d.ts +10 -0
- package/dist/containers/StudentInfoDrawer/components/Attendance/CourseAttendanceList.d.ts +4 -0
- package/dist/containers/StudentInfoDrawer/components/Attendance/DrawerAttendanceTab.d.ts +4 -0
- package/dist/containers/StudentInfoDrawer/components/Attendance/LessonTooltip.d.ts +8 -0
- package/dist/containers/StudentInfoDrawer/components/AttendanceCourseTable.d.ts +15 -0
- package/dist/containers/StudentInfoDrawer/components/CourseAttendanceItem.d.ts +10 -0
- package/dist/containers/StudentInfoDrawer/components/CourseAttendanceList.d.ts +4 -0
- package/dist/containers/StudentInfoDrawer/components/CustomTooltip.d.ts +2 -0
- package/dist/containers/StudentInfoDrawer/components/DrawerAttendanceTab.d.ts +4 -0
- package/dist/containers/StudentInfoDrawer/components/DrawerExamResultTab.d.ts +9 -0
- package/dist/containers/StudentInfoDrawer/components/DrawerHeader.d.ts +9 -0
- package/dist/containers/StudentInfoDrawer/components/DrawerInfoTab.d.ts +9 -0
- package/dist/containers/StudentInfoDrawer/components/DrawerNoteTab.d.ts +8 -0
- package/dist/containers/StudentInfoDrawer/components/DrawerTabContent.d.ts +8 -0
- package/dist/containers/StudentInfoDrawer/components/DrawerTabHeader.d.ts +8 -0
- package/dist/containers/StudentInfoDrawer/components/DrawerTextbookResultTab.d.ts +7 -0
- package/dist/containers/StudentInfoDrawer/components/Exam/DrawerExamResultTab.d.ts +9 -0
- package/dist/containers/StudentInfoDrawer/components/Exam/ExamResultDrawer.d.ts +13 -0
- package/dist/containers/StudentInfoDrawer/components/Exam/ExamResultItem.d.ts +10 -0
- package/dist/containers/StudentInfoDrawer/components/Exam/ExanResultList.d.ts +4 -0
- package/dist/containers/StudentInfoDrawer/components/ExamResultDrawer.d.ts +13 -0
- package/dist/containers/StudentInfoDrawer/components/ExamResultItem.d.ts +10 -0
- package/dist/containers/StudentInfoDrawer/components/ExanResultList.d.ts +4 -0
- package/dist/containers/StudentInfoDrawer/components/LessonTooltip.d.ts +8 -0
- package/dist/containers/StudentInfoDrawer/components/Note/DrawerNoteTab.d.ts +8 -0
- package/dist/containers/StudentInfoDrawer/components/Note/NoteDrawer.d.ts +14 -0
- package/dist/containers/StudentInfoDrawer/components/NoteDrawer.d.ts +13 -0
- package/dist/containers/StudentInfoDrawer/components/Textbook/DrawerTextbookResultTab.d.ts +7 -0
- package/dist/containers/StudentInfoDrawer/components/Textbook/TextbookResultItem.d.ts +10 -0
- package/dist/containers/StudentInfoDrawer/components/Textbook/TextbookResultList.d.ts +4 -0
- package/dist/containers/StudentInfoDrawer/components/TextbookResultItem.d.ts +10 -0
- package/dist/containers/StudentInfoDrawer/components/TextbookResultList.d.ts +4 -0
- package/dist/containers/StudentInfoDrawer/configs/constants.d.ts +6 -0
- package/dist/containers/StudentInfoDrawer/configs/enums.d.ts +12 -0
- package/dist/containers/StudentInfoDrawer/configs/fns.d.ts +26 -0
- package/dist/containers/StudentInfoDrawer/configs/interfaces.d.ts +44 -0
- package/dist/containers/StudentInfoDrawer/configs/types.d.ts +101 -0
- package/dist/containers/StudentInfoDrawer/hooks/useDrawerAttendanceTab.d.ts +8 -0
- package/dist/containers/StudentInfoDrawer/hooks/useDrawerNoteTab.d.ts +28 -0
- package/dist/containers/StudentInfoDrawer/hooks/useStudentInfoDrawer.d.ts +15 -0
- package/dist/containers/StudentInfoDrawer/index.d.ts +2 -0
- package/dist/containers/StudentInfoDrawer/styles/styles.d.ts +2 -0
- package/dist/containers/StudentInfoDrawer/views/StudentInfoDrawer.d.ts +4 -0
- package/dist/containers/Users/components/UserRow.d.ts +14 -0
- package/dist/containers/Users/hooks/useUserList.d.ts +3 -0
- package/dist/containers/Users/views/UserList.d.ts +1 -0
- package/dist/containers/index.d.ts +1 -0
- package/dist/iconPerson~bfprHOKm.svg +4 -0
- package/dist/index.css +333 -333
- package/dist/index.js +20046 -17472
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +20048 -17476
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/functions/formatPhoneNumber.d.ts +2 -0
- package/dist/utils/functions/includePathname.d.ts +1 -0
- package/dist/utils/functions/index.d.ts +3 -2
- package/dist/utils/hooks/useVirtualList.d.ts +20 -0
- package/dist/utils/types/note.d.ts +1 -0
- package/package.json +1 -1
@@ -0,0 +1,10 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { TextbookResponse } from "../configs/types";
|
3
|
+
interface Props {
|
4
|
+
studentId: number;
|
5
|
+
data: TextbookResponse;
|
6
|
+
onItemClick: (data: TextbookResponse) => void;
|
7
|
+
onLoad?: () => void;
|
8
|
+
}
|
9
|
+
declare const TextbookResultItem: FC<Props>;
|
10
|
+
export default TextbookResultItem;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { BaseSearchQuery } from "../../../utils";
|
2
|
+
import { ExamSessionQuery, TextbookQuery } from "./types";
|
3
|
+
export declare const ATTENDANCE_COURSE_DEFAULT_FILTER: BaseSearchQuery<string>;
|
4
|
+
export declare const EXAM_SESSION_DEFAULT_FILTER: ExamSessionQuery;
|
5
|
+
export declare const TEXTBOOK_DEFAULT_FILTER: TextbookQuery;
|
6
|
+
export declare const FormatDate = "YYYY-MM-DD HH:mm:ss";
|
@@ -0,0 +1,26 @@
|
|
1
|
+
export declare const formatGrade: (grade: number, t: any, language?: string | undefined) => string;
|
2
|
+
export declare const formatLessonOrder: (index: number, t: any, language?: string | undefined) => string;
|
3
|
+
export declare const formatTime: (t: any, timeInMilliseconds: number) => any;
|
4
|
+
export declare const a11yProps: (index: number) => {
|
5
|
+
id: string;
|
6
|
+
"aria-controls": string;
|
7
|
+
sx: {
|
8
|
+
position: string;
|
9
|
+
fontSize: string;
|
10
|
+
fontWeight: number;
|
11
|
+
padding: string;
|
12
|
+
color: string;
|
13
|
+
mx: string;
|
14
|
+
"&::after": {
|
15
|
+
content: string;
|
16
|
+
position: string;
|
17
|
+
bottom: number;
|
18
|
+
left: number;
|
19
|
+
width: string;
|
20
|
+
height: string;
|
21
|
+
backgroundColor: string;
|
22
|
+
};
|
23
|
+
};
|
24
|
+
};
|
25
|
+
export declare const subtractTime: (time1: string, time2: string, t: any) => string;
|
26
|
+
export declare const formatTimeHHmm: (time: string) => string;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { BoxProps } from "@mui/material";
|
2
|
+
import { DrawerTab } from "./enums";
|
3
|
+
import { CourseAttendanceResponse, ExamSessionResponse, LessonResponse, TextbookResponse } from "./types";
|
4
|
+
export interface StudentInfoDrawerProps {
|
5
|
+
studentId?: number;
|
6
|
+
open: boolean;
|
7
|
+
inert?: boolean;
|
8
|
+
anchor?: "left" | "top" | "right" | "bottom";
|
9
|
+
onClose?: () => void;
|
10
|
+
width?: number | string;
|
11
|
+
history: any;
|
12
|
+
}
|
13
|
+
export interface TabContentProps {
|
14
|
+
studentId: number;
|
15
|
+
selectedTab: DrawerTab;
|
16
|
+
value: DrawerTab;
|
17
|
+
}
|
18
|
+
export interface CourseAttendanceListProps {
|
19
|
+
studentId: number;
|
20
|
+
data: CourseAttendanceResponse[];
|
21
|
+
containerProps?: BoxProps;
|
22
|
+
isLoading: boolean;
|
23
|
+
listHeight?: number;
|
24
|
+
onLoadMore: () => void;
|
25
|
+
onCheckInLesson: (lesson: LessonResponse, studentId: number) => void;
|
26
|
+
}
|
27
|
+
export interface ExamResultListProps {
|
28
|
+
studentId: number;
|
29
|
+
data: ExamSessionResponse[];
|
30
|
+
containerProps?: BoxProps;
|
31
|
+
isLoading: boolean;
|
32
|
+
listHeight?: number;
|
33
|
+
onLoadMore: () => void;
|
34
|
+
onItemClick: (data: ExamSessionResponse) => void;
|
35
|
+
}
|
36
|
+
export interface TextbookListProps {
|
37
|
+
studentId: number;
|
38
|
+
data: TextbookResponse[];
|
39
|
+
containerProps?: BoxProps;
|
40
|
+
isLoading: boolean;
|
41
|
+
listHeight?: number;
|
42
|
+
onLoadMore: () => void;
|
43
|
+
onItemClick: (data: TextbookResponse) => void;
|
44
|
+
}
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import { BaseSearchQuery, ExamStatus, PreparedType } from "../../../utils";
|
2
|
+
import { StudentAttendanceStatus } from "./enums";
|
3
|
+
export declare type StudentInfo = {
|
4
|
+
id: number;
|
5
|
+
email: string;
|
6
|
+
fullName: string;
|
7
|
+
grade: number;
|
8
|
+
phoneNumber?: string;
|
9
|
+
parentPhoneNumber?: string;
|
10
|
+
schoolName: string;
|
11
|
+
};
|
12
|
+
export declare type CourseAttendanceResponse = {
|
13
|
+
id: number;
|
14
|
+
name: string;
|
15
|
+
mainTeacherName: string;
|
16
|
+
startDate: string;
|
17
|
+
endDate: string;
|
18
|
+
lastAttendanceDate: string;
|
19
|
+
lessons: LessonAttendance[];
|
20
|
+
};
|
21
|
+
export declare type LessonAttendance = {
|
22
|
+
id: number;
|
23
|
+
date: string;
|
24
|
+
startTime: string;
|
25
|
+
endTime: string;
|
26
|
+
mainTeacherName: string;
|
27
|
+
attendance: Attendance[];
|
28
|
+
};
|
29
|
+
export declare type Attendance = {
|
30
|
+
lessonId: number;
|
31
|
+
attendanceTime: string;
|
32
|
+
status: StudentAttendanceStatus;
|
33
|
+
};
|
34
|
+
export declare type LessonResponse = {
|
35
|
+
id: number;
|
36
|
+
courseId: number;
|
37
|
+
courseName: string;
|
38
|
+
date: string;
|
39
|
+
startTime: string;
|
40
|
+
endTime: string;
|
41
|
+
mainTeacherId: number;
|
42
|
+
mainTeacherUserId: number;
|
43
|
+
mainTeacherName: string;
|
44
|
+
isCheckedIn: boolean;
|
45
|
+
};
|
46
|
+
export declare type ExamSessionResponse = {
|
47
|
+
id: number;
|
48
|
+
title: string;
|
49
|
+
duration: string;
|
50
|
+
description: string;
|
51
|
+
questionCount: number;
|
52
|
+
startTime: string;
|
53
|
+
endTime: string;
|
54
|
+
code?: string;
|
55
|
+
createdAt?: string;
|
56
|
+
status?: ExamStatus;
|
57
|
+
totalStudentsJoined?: number;
|
58
|
+
teacher?: CreatedBy;
|
59
|
+
imageUrl?: string;
|
60
|
+
isShared: boolean;
|
61
|
+
sharedUsers: string[];
|
62
|
+
createdById: number;
|
63
|
+
createdBy: CreatedBy;
|
64
|
+
score?: number;
|
65
|
+
totalScore?: number;
|
66
|
+
totalCorrectQuestions?: number;
|
67
|
+
};
|
68
|
+
export declare type CreatedBy = {
|
69
|
+
id: number;
|
70
|
+
email: string;
|
71
|
+
fullName: string;
|
72
|
+
};
|
73
|
+
export declare type ExamSessionQuery = BaseSearchQuery<string> & {
|
74
|
+
statuses?: ExamStatus[];
|
75
|
+
studentId?: number;
|
76
|
+
courseId?: number;
|
77
|
+
teacherId?: number;
|
78
|
+
};
|
79
|
+
export declare type TextbookQuery = BaseSearchQuery<string> & {
|
80
|
+
startYear?: string;
|
81
|
+
endYear?: string;
|
82
|
+
studentId?: number;
|
83
|
+
subjectIds?: number[];
|
84
|
+
months?: number[];
|
85
|
+
preparedType?: PreparedType;
|
86
|
+
preparedFilterType?: string;
|
87
|
+
};
|
88
|
+
export declare type TextbookResponse = {
|
89
|
+
id: number;
|
90
|
+
name: string;
|
91
|
+
coverImage: string;
|
92
|
+
createdAt: string;
|
93
|
+
totalUses: number;
|
94
|
+
completedQuestions: number;
|
95
|
+
totalQuestions: number;
|
96
|
+
lastAnswerTime: string;
|
97
|
+
isPublic: boolean;
|
98
|
+
isPrepared: boolean;
|
99
|
+
isStudying: boolean;
|
100
|
+
totalAnswerTime: number;
|
101
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { CourseAttendanceResponse, LessonResponse } from "../configs/types";
|
2
|
+
declare const useDrawerAttendanceTab: (studentId: number) => {
|
3
|
+
items: CourseAttendanceResponse[];
|
4
|
+
isLoading: boolean;
|
5
|
+
handleLoadMore: () => void;
|
6
|
+
handleCheckInLesson: (lesson: LessonResponse, studentId: number) => Promise<void>;
|
7
|
+
};
|
8
|
+
export default useDrawerAttendanceTab;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { MouseEvent } from "react";
|
2
|
+
import { ClassNoteDialogProps } from "../../Notes";
|
3
|
+
import { NoteResponse } from "../../../utils";
|
4
|
+
import { DrawerNoteTabProps } from "../components/Note/DrawerNoteTab";
|
5
|
+
declare const useDrawerNoteTab: (props: DrawerNoteTabProps) => {
|
6
|
+
noteIdContextMenu: number | undefined;
|
7
|
+
academyNotes: NoteResponse[];
|
8
|
+
isLoadingAcademyNotes: boolean;
|
9
|
+
studentNotes: NoteResponse[];
|
10
|
+
isLoadingStudentNotes: boolean;
|
11
|
+
noteDialogProps: ClassNoteDialogProps;
|
12
|
+
openDeleteNoteDialog: boolean;
|
13
|
+
openNoteViewDrawer: boolean;
|
14
|
+
selectedItem: NoteResponse | undefined;
|
15
|
+
handleLoadMoreAcademyNotes: () => void;
|
16
|
+
handleCloseNoteDrawer: () => void;
|
17
|
+
handleDeleteNote: () => Promise<void>;
|
18
|
+
handleCloseDeleteDialog: () => void;
|
19
|
+
handleLoadMoreStudentNotes: () => void;
|
20
|
+
handleOpenEditNote: (e: MouseEvent<HTMLButtonElement>, note: NoteResponse) => void;
|
21
|
+
handleOpenDeleteNoteDialog: (e: MouseEvent<HTMLButtonElement>, note: NoteResponse) => void;
|
22
|
+
handleCloseTooltip: () => void;
|
23
|
+
handleOpenTooltip: (note: NoteResponse) => void;
|
24
|
+
handleOpenNoteDrawer: (note: NoteResponse) => void;
|
25
|
+
handleOpenCreateAcademyNoteDialog: () => void;
|
26
|
+
handleOpenCreateStudentNoteDialog: () => void;
|
27
|
+
};
|
28
|
+
export default useDrawerNoteTab;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { StudentInfoDrawerProps } from "../configs/interfaces";
|
2
|
+
import { SyntheticEvent } from "react";
|
3
|
+
import { StudentInfo } from "../configs/types";
|
4
|
+
import _ from "lodash";
|
5
|
+
import { DrawerTab } from "../configs/enums";
|
6
|
+
declare const useStudentInfoDrawer: (props: StudentInfoDrawerProps) => {
|
7
|
+
t: any;
|
8
|
+
loadedTabs: any;
|
9
|
+
isLoading: boolean;
|
10
|
+
studentInfo: StudentInfo | undefined;
|
11
|
+
selectedTab: DrawerTab;
|
12
|
+
debounceChangeTab: _.DebouncedFunc<(_: SyntheticEvent, newValue: number) => void>;
|
13
|
+
handleClose: () => void;
|
14
|
+
};
|
15
|
+
export default useStudentInfoDrawer;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { Role } from "../../../utils/constants";
|
3
|
+
import { PagingResponse, User } from "../../../utils";
|
4
|
+
interface Props {
|
5
|
+
paging: PagingResponse;
|
6
|
+
data: User;
|
7
|
+
index: number;
|
8
|
+
role: Role;
|
9
|
+
onDelete: (data: User) => void;
|
10
|
+
onViewOrUpdate: (data: User) => void;
|
11
|
+
onViewInfo: (data: User) => void;
|
12
|
+
}
|
13
|
+
declare const UserRow: FC<Props>;
|
14
|
+
export default UserRow;
|
@@ -32,6 +32,9 @@ declare const useUserList: (role: Role) => {
|
|
32
32
|
textSearchRef: import("react").RefObject<HTMLInputElement>;
|
33
33
|
deleteFile: File | undefined;
|
34
34
|
isOpenDeleteUserCsv: boolean;
|
35
|
+
selectedStudent: User | undefined;
|
36
|
+
handleCloseStudentInfo: () => void;
|
37
|
+
handleChangeSelectedStudent: (student: User) => void;
|
35
38
|
handleToggleDeleteUserCsv: () => void;
|
36
39
|
handleDeleteUserCsv: () => Promise<boolean>;
|
37
40
|
handleChangeDeleteFile: (file?: File | undefined) => void;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M10.395 2.01813C9.78691 1.36156 8.93753 1 8.00003 1C7.05753 1 6.20534 1.35937 5.60003 2.01187C4.98815 2.67156 4.69003 3.56813 4.76003 4.53625C4.89878 6.44625 6.35222 8 8.00003 8C9.64784 8 11.0988 6.44656 11.2397 4.53687C11.3107 3.5775 11.0107 2.68281 10.395 2.01813Z" fill="#97A1AF"/>
|
3
|
+
<path d="M13.4999 15H2.49993C2.35595 15.0019 2.21337 14.9716 2.08255 14.9115C1.95173 14.8513 1.83597 14.7627 1.74368 14.6522C1.54056 14.4094 1.45868 14.0778 1.51931 13.7425C1.78306 12.2794 2.60618 11.0503 3.89993 10.1875C5.04931 9.42156 6.50525 9 7.99993 9C9.49462 9 10.9506 9.42188 12.0999 10.1875C13.3937 11.05 14.2168 12.2791 14.4806 13.7422C14.5412 14.0775 14.4593 14.4091 14.2562 14.6519C14.1639 14.7625 14.0482 14.8511 13.9174 14.9113C13.7865 14.9715 13.6439 15.0018 13.4999 15Z" fill="#97A1AF"/>
|
4
|
+
</svg>
|