touchstudy-core 0.1.86 → 0.1.87
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/CkEditor/CkEditor.d.ts +10 -0
- package/dist/components/CkEditor/config.d.ts +19 -0
- package/dist/components/ErrorHandler.d.ts +6 -0
- package/dist/components/LabelRequired.d.ts +8 -0
- package/dist/components/Selectors/ClassSelector.d.ts +10 -0
- package/dist/components/Selectors/StudentSelector.d.ts +10 -0
- package/dist/containers/Classes/apiClients/classService.d.ts +16 -0
- package/dist/containers/Classes/apiClients/teacherService.d.ts +2 -0
- package/dist/containers/Classes/components/ClassForm.d.ts +4 -0
- package/dist/containers/Classes/components/CorrectAnswerSelector.d.ts +7 -0
- package/dist/containers/Classes/components/LessonFormBody.d.ts +4 -0
- package/dist/containers/Classes/components/LessonFormDialog.d.ts +14 -0
- package/dist/containers/Classes/components/LessonList.d.ts +27 -0
- package/dist/containers/Classes/components/SelectDialog.d.ts +30 -0
- package/dist/containers/Classes/components/StudentList.d.ts +21 -0
- package/dist/containers/Classes/components/TeacherList.d.ts +21 -0
- package/dist/containers/Classes/components/TeacherSelector.d.ts +11 -0
- package/dist/containers/Classes/configs/constants.d.ts +70 -0
- package/dist/containers/Classes/configs/interfaces.d.ts +23 -0
- package/dist/containers/Classes/configs/types.d.ts +215 -0
- package/dist/containers/Classes/hooks/useClassDetail.d.ts +105 -0
- package/dist/containers/Classes/hooks/useClassList.d.ts +20 -0
- package/dist/containers/Classes/hooks/useLessonClassList.d.ts +20 -0
- package/dist/containers/Classes/hooks/useStudentClassList.d.ts +22 -0
- package/dist/containers/Classes/hooks/useTab.d.ts +5 -0
- package/dist/containers/Classes/hooks/useTeacherClassList.d.ts +22 -0
- package/dist/containers/Classes/hooks/useTeacherList.d.ts +6 -0
- package/dist/containers/Classes/views/ClassDetail.d.ts +10 -0
- package/dist/containers/Classes/views/ClassList.d.ts +10 -0
- package/dist/containers/Notifications/apiClients/notificationService.d.ts +6 -0
- package/dist/containers/Notifications/components/NotificationForm.d.ts +4 -0
- package/dist/containers/Notifications/components/SelectFilterType.d.ts +13 -0
- package/dist/containers/Notifications/components/TypeSelector.d.ts +13 -0
- package/dist/containers/Notifications/configs/constants.d.ts +14 -0
- package/dist/containers/Notifications/configs/interfaces.d.ts +10 -0
- package/dist/containers/Notifications/configs/types.d.ts +60 -0
- package/dist/containers/Notifications/hooks/useNotificationDetail.d.ts +23 -0
- package/dist/containers/Notifications/hooks/useNotificationList.d.ts +29 -0
- package/dist/containers/Notifications/views/NotificationDetail.d.ts +9 -0
- package/dist/containers/Notifications/views/NotificationList.d.ts +8 -0
- package/dist/containers/Users/apiClient/userService.d.ts +9 -0
- package/dist/containers/Users/components/Dialogs/DeleteUserCsvDialog.d.ts +10 -0
- package/dist/containers/Users/components/Dialogs/RecentUserActionDialog.d.ts +9 -0
- package/dist/containers/Users/components/Dialogs/UserDialog.d.ts +12 -0
- package/dist/containers/Users/configs/constants.d.ts +37 -0
- package/dist/containers/Users/configs/types.d.ts +11 -0
- package/dist/containers/Users/hooks/useExportUsersCsv.d.ts +5 -0
- package/dist/containers/Users/hooks/useRecentUserAction.d.ts +10 -0
- package/dist/containers/Users/hooks/useUserList.d.ts +40 -0
- package/dist/containers/Users/views/UserList.d.ts +7 -0
- package/dist/index.js +43 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +43 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/services/classService.d.ts +4 -0
- package/dist/services/studentService.d.ts +1 -0
- package/dist/utils/enums/userSortColumn.d.ts +11 -0
- package/dist/utils/toLocalTime.d.ts +1 -0
- package/dist/utils/types/users.d.ts +17 -0
- package/package.json +1 -1
@@ -0,0 +1,20 @@
|
|
1
|
+
import { ChangeEvent } from "react";
|
2
|
+
import { ClassQuery, ClassResponse, ClassSortBy } from "../configs/types";
|
3
|
+
import { PagingResponse } from "../../../utils/types/pagingResponse";
|
4
|
+
declare const useClassList: (history: any, classCreateUrl?: string | undefined, classUpdateUrl?: string | undefined) => {
|
5
|
+
paging: PagingResponse;
|
6
|
+
classList: ClassResponse[];
|
7
|
+
classFilter: ClassQuery;
|
8
|
+
textSearchRef: import("react").RefObject<HTMLInputElement>;
|
9
|
+
selectedClass: ClassResponse | undefined;
|
10
|
+
t: any;
|
11
|
+
handleOpenDeleteClassDialog: (value: ClassResponse) => void;
|
12
|
+
handleCloseConfirmDialog: () => void;
|
13
|
+
handleSort: (key: ClassSortBy) => void;
|
14
|
+
handleChangeSearchText: (e: ChangeEvent<HTMLInputElement>) => void;
|
15
|
+
handleCreateClass: () => void;
|
16
|
+
handleUpdateClass: (value: ClassResponse) => void;
|
17
|
+
handleChangePage: (_: any, page: number) => void;
|
18
|
+
handleDeleteClass: () => Promise<void>;
|
19
|
+
};
|
20
|
+
export default useClassList;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { ChangeEvent } from "react";
|
2
|
+
import { LessonResponse, LessonQuery, LessonSortBy } from "../configs/types";
|
3
|
+
import { PagingResponse } from "../../../utils/types/pagingResponse";
|
4
|
+
export declare type DialogType = "Update" | "Remove" | "Create";
|
5
|
+
declare const useLessonClassList: (courseId: number) => {
|
6
|
+
paging: PagingResponse;
|
7
|
+
classList: LessonResponse[];
|
8
|
+
filter: LessonQuery;
|
9
|
+
selectedLesson: LessonResponse | undefined;
|
10
|
+
openDialog: "Update" | "Remove" | "Create" | undefined;
|
11
|
+
t: any;
|
12
|
+
handleOpenCreateOrUpdateDialog: (value?: LessonResponse | undefined) => void;
|
13
|
+
handleOpenDeleteClassDialog: (value: LessonResponse) => void;
|
14
|
+
handleCloseConfirmDialog: () => void;
|
15
|
+
handleSort: (key: LessonSortBy) => void;
|
16
|
+
handleChangeSearchText: (e: ChangeEvent<HTMLInputElement>) => void;
|
17
|
+
handleChangePage: (_: any, page: number) => void;
|
18
|
+
getLessons: () => Promise<void>;
|
19
|
+
};
|
20
|
+
export default useLessonClassList;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { ChangeEvent } from "react";
|
2
|
+
import { StudentClassQuery, UserClassSortBy, StudentClassResponse } from "../configs/types";
|
3
|
+
import _ from "lodash";
|
4
|
+
import { PagingResponse } from "../../../utils/types/pagingResponse";
|
5
|
+
declare const useStudentClassList: (courseId: number) => {
|
6
|
+
paging: PagingResponse;
|
7
|
+
classList: StudentClassResponse[];
|
8
|
+
filter: StudentClassQuery;
|
9
|
+
selectedStudent: StudentClassResponse | undefined;
|
10
|
+
t: any;
|
11
|
+
textSearchRef: import("react").RefObject<HTMLInputElement>;
|
12
|
+
debounceSearch: _.DebouncedFunc<() => void>;
|
13
|
+
handleOpenDeleteClassDialog: (value: StudentClassResponse) => void;
|
14
|
+
handleCloseConfirmDialog: () => void;
|
15
|
+
handleSort: (key: UserClassSortBy) => void;
|
16
|
+
handleChangeSearchText: (e: ChangeEvent<HTMLInputElement>) => void;
|
17
|
+
handleChangePage: (_: any, page: number) => void;
|
18
|
+
handleRemoveStudentFromClass: () => Promise<void>;
|
19
|
+
getStudents: () => Promise<void>;
|
20
|
+
resetData: () => void;
|
21
|
+
};
|
22
|
+
export default useStudentClassList;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { ChangeEvent } from "react";
|
2
|
+
import { StudentClassQuery, TeacherClassResponse, UserClassSortBy } from "../configs/types";
|
3
|
+
import _ from "lodash";
|
4
|
+
import { PagingResponse } from "../../../utils/types/pagingResponse";
|
5
|
+
declare const useTeacherClassList: (courseId: number) => {
|
6
|
+
paging: PagingResponse;
|
7
|
+
classList: TeacherClassResponse[];
|
8
|
+
filter: StudentClassQuery;
|
9
|
+
selectedTeacher: TeacherClassResponse | undefined;
|
10
|
+
t: any;
|
11
|
+
textSearchRef: import("react").RefObject<HTMLInputElement>;
|
12
|
+
debounceSearch: _.DebouncedFunc<() => void>;
|
13
|
+
handleOpenDeleteClassDialog: (value: TeacherClassResponse) => void;
|
14
|
+
handleCloseConfirmDialog: () => void;
|
15
|
+
handleSort: (key: UserClassSortBy) => void;
|
16
|
+
handleChangeSearchText: (e: ChangeEvent<HTMLInputElement>) => void;
|
17
|
+
handleChangePage: (_: any, page: number) => void;
|
18
|
+
handleRemoveTeacherFromClass: () => Promise<void>;
|
19
|
+
getTeachers: () => Promise<void>;
|
20
|
+
resetData: () => void;
|
21
|
+
};
|
22
|
+
export default useTeacherClassList;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { NotificationQuery, NotificationRequest } from "../configs/types";
|
2
|
+
export declare const get: (query: NotificationQuery) => Promise<import("axios").AxiosResponse<any, any>>;
|
3
|
+
export declare const create: (model: NotificationRequest) => Promise<import("axios").AxiosResponse<any, any>>;
|
4
|
+
export declare const update: (notificationId: number, model: NotificationRequest) => Promise<import("axios").AxiosResponse<any, any>>;
|
5
|
+
export declare const deleteNotificationApi: (notificationId: number) => Promise<import("axios").AxiosResponse<any, any>>;
|
6
|
+
export declare const getById: (id: number) => Promise<import("axios").AxiosResponse<any, any>>;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { Option, TypeNotificationEnum } from "../configs/types";
|
3
|
+
interface Props {
|
4
|
+
value: number[] | undefined;
|
5
|
+
onChange: (val: Option[]) => void;
|
6
|
+
optionTypeNotification: {
|
7
|
+
value: TypeNotificationEnum;
|
8
|
+
label: string;
|
9
|
+
}[];
|
10
|
+
isDisabled?: boolean;
|
11
|
+
}
|
12
|
+
declare const SelectFilterType: FC<Props>;
|
13
|
+
export default SelectFilterType;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { Option, TypeNotificationEnum } from "../configs/types";
|
3
|
+
interface Props {
|
4
|
+
value?: number | null;
|
5
|
+
onChange: (val: Option | null) => void;
|
6
|
+
optionTypeNotification: {
|
7
|
+
value: TypeNotificationEnum;
|
8
|
+
label: string;
|
9
|
+
}[];
|
10
|
+
disabled?: boolean;
|
11
|
+
}
|
12
|
+
declare const TypeSelector: FC<Props>;
|
13
|
+
export default TypeSelector;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import * as yup from "yup";
|
2
|
+
import { NotificationHeaderTable, NotificationQuery, NotificationRequest } from "./types";
|
3
|
+
export declare const NOTIFICATION_HEADERS: NotificationHeaderTable[];
|
4
|
+
export declare const DefaultNotificationFilter: NotificationQuery;
|
5
|
+
export declare const CLASS_QUESTIONS: number[];
|
6
|
+
export declare const DEFAULT_NOTIFICATION_REQUEST: NotificationRequest;
|
7
|
+
export declare const DATE_TIME_FORMAT = "YYYY-MM-DD";
|
8
|
+
export declare const NotificationSchema: (t: any) => yup.ObjectSchema<{
|
9
|
+
name: string;
|
10
|
+
type: number;
|
11
|
+
}, yup.AnyObject, {
|
12
|
+
name: undefined;
|
13
|
+
type: undefined;
|
14
|
+
}, "">;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { FormikProps } from "formik";
|
2
|
+
import { NotificationRequest, NotificationResponse } from "./types";
|
3
|
+
export interface NotificationFormProps {
|
4
|
+
id?: string;
|
5
|
+
formikProp: FormikProps<NotificationRequest>;
|
6
|
+
data?: NotificationResponse;
|
7
|
+
navigate: any;
|
8
|
+
isAdmin: boolean;
|
9
|
+
isTeacherAdmin: boolean;
|
10
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
export declare type NotificationResponse = {
|
2
|
+
id?: number;
|
3
|
+
name: string;
|
4
|
+
type: TypeNotificationEnum;
|
5
|
+
content: string;
|
6
|
+
createdAt: string;
|
7
|
+
isOwned: boolean;
|
8
|
+
notificationTypes: NotificationType[];
|
9
|
+
};
|
10
|
+
export declare type NotificationType = {
|
11
|
+
notificationId: number;
|
12
|
+
courseId: number | null;
|
13
|
+
studentId: number | null;
|
14
|
+
courseName: string;
|
15
|
+
studentName: string;
|
16
|
+
studentEmail: string;
|
17
|
+
};
|
18
|
+
export declare enum TypeNotificationEnum {
|
19
|
+
Default = 0,
|
20
|
+
Academy = 1,
|
21
|
+
Class = 2,
|
22
|
+
Student = 3
|
23
|
+
}
|
24
|
+
export declare const optionTypeNotification: {
|
25
|
+
value: TypeNotificationEnum;
|
26
|
+
label: string;
|
27
|
+
}[];
|
28
|
+
export declare type NotificationRequest = {
|
29
|
+
id?: number | string;
|
30
|
+
name: string;
|
31
|
+
content: string;
|
32
|
+
type: TypeNotificationEnum;
|
33
|
+
studentIds: number[];
|
34
|
+
classIds: number[];
|
35
|
+
};
|
36
|
+
export declare type NotificationQuery = {
|
37
|
+
currentPage: number;
|
38
|
+
pageSize: number;
|
39
|
+
sortColumnName: NotificationSortBy;
|
40
|
+
textSearch?: string;
|
41
|
+
sortColumnDirection: OrderBy;
|
42
|
+
type: number[];
|
43
|
+
};
|
44
|
+
export declare enum NotificationSortBy {
|
45
|
+
CreatedAt = "CreatedAt",
|
46
|
+
Name = "Name",
|
47
|
+
Type = "Type"
|
48
|
+
}
|
49
|
+
export declare enum OrderBy {
|
50
|
+
ASC = "ASC",
|
51
|
+
DESC = "DESC"
|
52
|
+
}
|
53
|
+
export declare type NotificationHeaderTable = {
|
54
|
+
title: string;
|
55
|
+
sortKey?: NotificationSortBy;
|
56
|
+
};
|
57
|
+
export declare type Option = {
|
58
|
+
label: string;
|
59
|
+
value: number;
|
60
|
+
};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/// <reference types="yup" />
|
2
|
+
import { FormikHelpers } from "formik";
|
3
|
+
import { NotificationRequest, NotificationResponse } from "../configs/types";
|
4
|
+
import { Role } from "../../../utils/constants";
|
5
|
+
declare type Props = {
|
6
|
+
navigate: any;
|
7
|
+
id?: string;
|
8
|
+
role: Role;
|
9
|
+
};
|
10
|
+
declare const useNotificationDetail: ({ navigate, id, role }: Props) => {
|
11
|
+
schema: import("yup").ObjectSchema<{
|
12
|
+
name: string;
|
13
|
+
type: number;
|
14
|
+
}, import("yup").AnyObject, {
|
15
|
+
name: undefined;
|
16
|
+
type: undefined;
|
17
|
+
}, "">;
|
18
|
+
isAdmin: boolean;
|
19
|
+
isTeacherAdmin: any;
|
20
|
+
handleSubmit: (values: NotificationRequest, _: FormikHelpers<NotificationRequest>) => Promise<void>;
|
21
|
+
detailNotification: NotificationResponse | undefined;
|
22
|
+
};
|
23
|
+
export default useNotificationDetail;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { ChangeEvent } from "react";
|
2
|
+
import { NotificationQuery, NotificationResponse, NotificationSortBy, Option } from "../configs/types";
|
3
|
+
import { PagingResponse } from "../../../utils/types/pagingResponse";
|
4
|
+
import { Role } from "../../../utils/constants";
|
5
|
+
declare type Props = {
|
6
|
+
navigate: any;
|
7
|
+
role: Role;
|
8
|
+
};
|
9
|
+
declare const useNotificationList: ({ navigate, role }: Props) => {
|
10
|
+
t: any;
|
11
|
+
theme: import("@mui/material").Theme;
|
12
|
+
paging: PagingResponse;
|
13
|
+
isAdmin: boolean;
|
14
|
+
isTeacherAdmin: any;
|
15
|
+
notificationList: NotificationResponse[];
|
16
|
+
notificationFilter: NotificationQuery;
|
17
|
+
textSearchRef: import("react").RefObject<HTMLInputElement>;
|
18
|
+
selectedNotification: NotificationResponse | undefined;
|
19
|
+
handleOpenDeleteNotificationDialog: (value: NotificationResponse) => void;
|
20
|
+
handleCloseConfirmDialog: () => void;
|
21
|
+
handleSort: (key: NotificationSortBy) => void;
|
22
|
+
handleChangeSearchText: (e: ChangeEvent<HTMLInputElement>) => void;
|
23
|
+
handleCreateNotification: () => void;
|
24
|
+
handleUpdateNotification: (value: NotificationResponse) => void;
|
25
|
+
handleChangePage: (_: any, page: number) => void;
|
26
|
+
handleDeleteNotification: () => Promise<void>;
|
27
|
+
onChangeFilterType: (val: Option[]) => void;
|
28
|
+
};
|
29
|
+
export default useNotificationList;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Role } from '../../../utils/constants';
|
3
|
+
declare type Props = {
|
4
|
+
id?: string;
|
5
|
+
navigate: any;
|
6
|
+
role: Role;
|
7
|
+
};
|
8
|
+
declare const NotificationDetail: ({ id, navigate, role }: Props) => React.JSX.Element;
|
9
|
+
export default NotificationDetail;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { UserSearchQuery } from "../../../utils/types/users";
|
2
|
+
import { UserForm } from "../configs/types";
|
3
|
+
export declare const getUserListApi: (query: UserSearchQuery) => Promise<import("axios").AxiosResponse<any, any>>;
|
4
|
+
export declare const getUserTemplateApi: () => Promise<import("axios").AxiosResponse<any, any>>;
|
5
|
+
export declare const exportUserCsvApi: (query: UserSearchQuery) => Promise<import("axios").AxiosResponse<any, any>>;
|
6
|
+
export declare const importUserCsvApi: (data: FormData, isDelete: boolean) => Promise<import("axios").AxiosResponse<any, any>>;
|
7
|
+
export declare const updateUserApi: (data: UserForm, id: number) => Promise<import("axios").AxiosResponse<any, any>>;
|
8
|
+
export declare const createUserApi: (data: UserForm) => Promise<import("axios").AxiosResponse<any, any>>;
|
9
|
+
export declare const deleteUserApi: (id: number) => Promise<import("axios").AxiosResponse<any, any>>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
interface Props {
|
3
|
+
open: boolean;
|
4
|
+
file?: File;
|
5
|
+
onChangeFile: (file?: File) => void;
|
6
|
+
onClose: () => void;
|
7
|
+
onSubmit: () => Promise<boolean>;
|
8
|
+
}
|
9
|
+
declare const DeleteUserCsvDialog: FC<Props>;
|
10
|
+
export default DeleteUserCsvDialog;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { Types } from "../../../..";
|
3
|
+
interface Props {
|
4
|
+
open: boolean;
|
5
|
+
onClose: () => void;
|
6
|
+
recentUserActions?: Types.RecentUserActionResponse[];
|
7
|
+
}
|
8
|
+
declare const RecentUserActionDialog: FC<Props>;
|
9
|
+
export default RecentUserActionDialog;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { UserForm } from "../../configs/types";
|
3
|
+
import { User } from "../../../../utils/types/users";
|
4
|
+
interface Props {
|
5
|
+
open: boolean;
|
6
|
+
data?: User;
|
7
|
+
disabled?: boolean;
|
8
|
+
onClose: () => void;
|
9
|
+
onSubmitForm: (data: UserForm) => void;
|
10
|
+
}
|
11
|
+
declare const UserDialog: FC<Props>;
|
12
|
+
export default UserDialog;
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { Role } from "../../../utils/constants";
|
2
|
+
import { UserSortColumn } from "../../../utils/enums";
|
3
|
+
import * as yup from "yup";
|
4
|
+
import { User, UserSearchQuery } from "../../../utils/types/users";
|
5
|
+
export declare const USER_HEADERS: ({
|
6
|
+
title: string;
|
7
|
+
sortKey?: undefined;
|
8
|
+
} | {
|
9
|
+
title: string;
|
10
|
+
sortKey: UserSortColumn;
|
11
|
+
})[];
|
12
|
+
export declare const DEFAULT_USER_FILTERS: UserSearchQuery;
|
13
|
+
export declare const UserSchema: yup.ObjectSchema<{
|
14
|
+
fullName: string;
|
15
|
+
email: string;
|
16
|
+
phoneNumber: string;
|
17
|
+
schoolName: string | undefined;
|
18
|
+
grade: number | null | undefined;
|
19
|
+
major: string | undefined;
|
20
|
+
parentPhoneNumber: string | undefined;
|
21
|
+
parentName: string | undefined;
|
22
|
+
}, yup.AnyObject, {
|
23
|
+
fullName: undefined;
|
24
|
+
email: undefined;
|
25
|
+
phoneNumber: undefined;
|
26
|
+
schoolName: undefined;
|
27
|
+
grade: undefined;
|
28
|
+
major: undefined;
|
29
|
+
parentPhoneNumber: undefined;
|
30
|
+
parentName: undefined;
|
31
|
+
}, "">;
|
32
|
+
export declare const DEFAULT_USER: User;
|
33
|
+
export declare const ROLES: Role[];
|
34
|
+
export declare const RECENT_USER_ACTION_HEADERS: {
|
35
|
+
title: string;
|
36
|
+
}[];
|
37
|
+
export declare const CSV_PREFIX = "data:text/csv;charset=utf-8,";
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Types } from "../../..";
|
2
|
+
import { Role } from "../../../utils/constants";
|
3
|
+
declare const useRecentUserAction: (role: Role) => {
|
4
|
+
recentUserActions: Types.RecentUserActionResponse[] | undefined;
|
5
|
+
isOpenRecentUserActionDialog: boolean;
|
6
|
+
handleOpenRecentUserActionDialog: () => void;
|
7
|
+
handleCloseRecentUserActionDialog: () => void;
|
8
|
+
getRecentExam: () => Promise<void>;
|
9
|
+
};
|
10
|
+
export default useRecentUserAction;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { ChangeEvent } from "react";
|
2
|
+
import { UserForm } from "../configs/types";
|
3
|
+
import _ from "lodash";
|
4
|
+
import { Enums, Role } from "../../..";
|
5
|
+
import { PagingResponse } from "../../../utils/types/pagingResponse";
|
6
|
+
import { UserSortColumn } from "../../../utils/enums";
|
7
|
+
import { User } from "../../../utils/types/users";
|
8
|
+
declare const useUserList: (role: Role) => {
|
9
|
+
inputFileRef: import("react").RefObject<HTMLInputElement>;
|
10
|
+
paging: PagingResponse;
|
11
|
+
openConfirmDialog: boolean;
|
12
|
+
openUserDialog: boolean;
|
13
|
+
userList: User[];
|
14
|
+
selectedUser: User | undefined;
|
15
|
+
filter: import("../../../utils/types/searchQuery").BaseSearchQuery<Enums.UserSortColumn>;
|
16
|
+
textSearchRef: import("react").RefObject<HTMLInputElement>;
|
17
|
+
deleteFile: File | undefined;
|
18
|
+
isOpenDeleteUserCsv: boolean;
|
19
|
+
handleToggleDeleteUserCsv: () => void;
|
20
|
+
handleDeleteUserCsv: () => Promise<boolean>;
|
21
|
+
handleChangeDeleteFile: (file?: File | undefined) => void;
|
22
|
+
handleChangePage: (_: any, page: number) => void;
|
23
|
+
setUserList: import("react").Dispatch<import("react").SetStateAction<User[]>>;
|
24
|
+
toggleConfirmDialog: () => void;
|
25
|
+
openDeleteDialog: (user: User) => void;
|
26
|
+
handleSort: _.DebouncedFunc<(key: UserSortColumn) => void>;
|
27
|
+
handleChangeSearchText: (e: ChangeEvent<HTMLInputElement>) => void;
|
28
|
+
handleOpenUserDialog: (user: User) => Promise<void>;
|
29
|
+
handleCreateOrUpdateUser: (value: UserForm) => Promise<void>;
|
30
|
+
handleCloseUserDialog: () => void;
|
31
|
+
handleDeleteUser: () => Promise<void>;
|
32
|
+
downloadTemplate: () => Promise<void>;
|
33
|
+
handleChooseFile: () => void;
|
34
|
+
handleChangeFileImport: (e: ChangeEvent<HTMLInputElement>) => Promise<void>;
|
35
|
+
recentUserActions: import("../../../utils/types").RecentUserActionResponse[] | undefined;
|
36
|
+
isOpenRecentUserActionDialog: boolean;
|
37
|
+
handleOpenRecentUserActionDialog: () => void;
|
38
|
+
handleCloseRecentUserActionDialog: () => void;
|
39
|
+
};
|
40
|
+
export default useUserList;
|
package/dist/index.js
CHANGED
@@ -2891,6 +2891,16 @@ var max_is_6 = "최대는 6입니다";
|
|
2891
2891
|
var must_be_number = "숫자여야 합니다.";
|
2892
2892
|
var sign_in_with_google_account = "구글 계정으로 로그인";
|
2893
2893
|
var academy_role = "아카데미 역할";
|
2894
|
+
var academy_management = "아카데미 관리";
|
2895
|
+
var manage_users = "사용자 관리";
|
2896
|
+
var manage_classes = "수업 관리";
|
2897
|
+
var manage_notifications = "알림 관리";
|
2898
|
+
var late = "늦은";
|
2899
|
+
var total_student = "총 학생 수";
|
2900
|
+
var total_teacher = "총 교사 수";
|
2901
|
+
var total_exam = "총 시험 수";
|
2902
|
+
var total_exam_time = "총 시험 시간";
|
2903
|
+
var total_question = "총 질문 수";
|
2894
2904
|
var lang_ko = {
|
2895
2905
|
problem_solving: problem_solving,
|
2896
2906
|
my_story: my_story,
|
@@ -3679,7 +3689,17 @@ var lang_ko = {
|
|
3679
3689
|
max_is_6: max_is_6,
|
3680
3690
|
must_be_number: must_be_number,
|
3681
3691
|
sign_in_with_google_account: sign_in_with_google_account,
|
3682
|
-
academy_role: academy_role
|
3692
|
+
academy_role: academy_role,
|
3693
|
+
academy_management: academy_management,
|
3694
|
+
manage_users: manage_users,
|
3695
|
+
manage_classes: manage_classes,
|
3696
|
+
manage_notifications: manage_notifications,
|
3697
|
+
late: late,
|
3698
|
+
total_student: total_student,
|
3699
|
+
total_teacher: total_teacher,
|
3700
|
+
total_exam: total_exam,
|
3701
|
+
total_exam_time: total_exam_time,
|
3702
|
+
total_question: total_question
|
3683
3703
|
};
|
3684
3704
|
|
3685
3705
|
var problem_solving$1 = "Problem Solving";
|
@@ -3917,7 +3937,7 @@ var check_attendance$1 = "Check attendance";
|
|
3917
3937
|
var attendance_check$1 = "Attendance check";
|
3918
3938
|
var class_date$1 = "Class date";
|
3919
3939
|
var class_time$1 = "Class time";
|
3920
|
-
var attendance$1 = "Attendance
|
3940
|
+
var attendance$1 = "Attendance";
|
3921
3941
|
var attendance_completed$1 = "Attendance completed";
|
3922
3942
|
var none_attendance$1 = "Non-attendance";
|
3923
3943
|
var academy_list$1 = "Academy list";
|
@@ -4478,6 +4498,16 @@ var max_is_6$1 = "Max is 6";
|
|
4478
4498
|
var must_be_number$1 = "Must be number";
|
4479
4499
|
var sign_in_with_google_account$1 = "Sign in with google account";
|
4480
4500
|
var academy_role$1 = "Academy role";
|
4501
|
+
var academy_management$1 = "Academy management";
|
4502
|
+
var manage_users$1 = "Manage users";
|
4503
|
+
var manage_classes$1 = "Manage classes";
|
4504
|
+
var manage_notifications$1 = "Manage notifications";
|
4505
|
+
var late$1 = "Late";
|
4506
|
+
var total_student$1 = "Total Student";
|
4507
|
+
var total_teacher$1 = "Total Teacher";
|
4508
|
+
var total_exam$1 = "Total Exam";
|
4509
|
+
var total_exam_time$1 = "Total Exam Time";
|
4510
|
+
var total_question$1 = "Total Question";
|
4481
4511
|
var lang_en = {
|
4482
4512
|
problem_solving: problem_solving$1,
|
4483
4513
|
my_story: my_story$1,
|
@@ -5267,7 +5297,17 @@ var lang_en = {
|
|
5267
5297
|
max_is_6: max_is_6$1,
|
5268
5298
|
must_be_number: must_be_number$1,
|
5269
5299
|
sign_in_with_google_account: sign_in_with_google_account$1,
|
5270
|
-
academy_role: academy_role$1
|
5300
|
+
academy_role: academy_role$1,
|
5301
|
+
academy_management: academy_management$1,
|
5302
|
+
manage_users: manage_users$1,
|
5303
|
+
manage_classes: manage_classes$1,
|
5304
|
+
manage_notifications: manage_notifications$1,
|
5305
|
+
late: late$1,
|
5306
|
+
total_student: total_student$1,
|
5307
|
+
total_teacher: total_teacher$1,
|
5308
|
+
total_exam: total_exam$1,
|
5309
|
+
total_exam_time: total_exam_time$1,
|
5310
|
+
total_question: total_question$1
|
5271
5311
|
};
|
5272
5312
|
|
5273
5313
|
i18n__default.use(reactI18next.initReactI18next).init({
|