mario-core 2.10.2-beta → 2.10.2-release
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/Alerts/SandboxAlert.d.ts +3 -0
- package/dist/components/Buttons/SyncButton.d.ts +8 -0
- package/dist/components/Inputs/PasswordInput.d.ts +1 -0
- package/dist/components/Modals/ModelSelectRole.d.ts +7 -0
- package/dist/components/Modals/NotificationLogoutModal.d.ts +3 -0
- package/dist/components/Selectors/constants/constant.d.ts +1 -1
- package/dist/containers/EmailTemplate/hooks/useEmailTemplateDetail.d.ts +1 -0
- package/dist/containers/Login/constant/authConfig.d.ts +38 -0
- package/dist/containers/Login/constant/types.d.ts +34 -0
- package/dist/containers/Login/hooks/useCreatePassword.d.ts +13 -0
- package/dist/containers/Login/hooks/useForgotPassword.d.ts +3 -1
- package/dist/containers/Login/hooks/useLogin.d.ts +11 -4
- package/dist/containers/Login/views/Dashboard.d.ts +2 -1
- package/dist/containers/Login/views/Login.d.ts +1 -0
- package/dist/containers/Login/views/block/BlockAssignTeacherByCode.d.ts +8 -0
- package/dist/containers/Login/views/block/BlockBackground.d.ts +7 -0
- package/dist/containers/Login/views/block/BlockCreatePassword.d.ts +3 -0
- package/dist/containers/Login/views/block/BlockForgetPassword.d.ts +5 -1
- package/dist/containers/Login/views/block/BlockLogin.d.ts +14 -0
- package/dist/containers/Login/views/block/BlockSelectTeacher.d.ts +0 -1
- package/dist/containers/User/components/AssignStudentModal.d.ts +20 -0
- package/dist/containers/User/components/FilterPopover.d.ts +21 -0
- package/dist/containers/User/components/HeaderCell.d.ts +18 -0
- package/dist/containers/User/components/SwitchTeacherModal.d.ts +3 -0
- package/dist/containers/User/components/TableHeader.d.ts +11 -0
- package/dist/containers/User/components/TeacherSelector.d.ts +3 -0
- package/dist/containers/User/components/UploadCSVButton.d.ts +11 -0
- package/dist/containers/User/components/UserDeletedModal.d.ts +3 -0
- package/dist/containers/User/configs/utils.d.ts +8 -0
- package/dist/containers/User/constants/constants.d.ts +21 -0
- package/dist/containers/User/constants/types.d.ts +177 -0
- package/dist/containers/User/hooks/useAssignStudent.d.ts +15 -0
- package/dist/containers/User/hooks/useAssignStudentList.d.ts +15 -0
- package/dist/containers/User/hooks/useAssistantList.d.ts +10 -0
- package/dist/containers/User/hooks/useCSVImport.d.ts +38 -0
- package/dist/containers/User/hooks/useClickOutside.d.ts +2 -0
- package/dist/containers/User/hooks/useCounselorList.d.ts +10 -0
- package/dist/containers/User/hooks/useExportUsersCsv.d.ts +5 -0
- package/dist/containers/User/hooks/useFilterPopover.d.ts +37 -0
- package/dist/containers/User/hooks/useResendMail.d.ts +5 -0
- package/dist/containers/User/hooks/useRosterUserSelector.d.ts +8 -0
- package/dist/containers/User/hooks/useSecondaryTeacherList.d.ts +10 -0
- package/dist/containers/User/hooks/useTableHeader.d.ts +16 -0
- package/dist/containers/User/hooks/useTeacherList.d.ts +10 -0
- package/dist/containers/User/hooks/useUserDeletedList.d.ts +37 -0
- package/dist/containers/User/hooks/useUserDeletedModal.d.ts +14 -0
- package/dist/containers/User/hooks/useUserDetail.d.ts +17 -0
- package/dist/containers/User/hooks/useUserList.d.ts +6 -3
- package/dist/containers/User/hooks/userFilters.d.ts +8 -0
- package/dist/containers/User/views/AssignStudentList.d.ts +3 -0
- package/dist/containers/User/views/RosterUserSelector.d.ts +8 -0
- package/dist/containers/User/views/UserContainer.d.ts +3 -0
- package/dist/containers/User/views/UserDeletedList.d.ts +3 -0
- package/dist/hooks/useLanguages.d.ts +10 -0
- package/dist/index.css +408 -77
- package/dist/index.d.ts +12 -6
- package/dist/index.js +43906 -4457
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +43901 -4465
- package/dist/index.modern.js.map +1 -1
- package/dist/layouts/TheHeader.d.ts +4 -1
- package/dist/layouts/TheHeaderDropdown.d.ts +4 -1
- package/dist/redux/commons/action.d.ts +4 -0
- package/dist/redux/weeklyQuests/action.d.ts +2 -0
- package/dist/redux/weeklyQuests/reducer.d.ts +6 -0
- package/dist/rootReducer.d.ts +5 -0
- package/dist/services/accountService.d.ts +8 -2
- package/dist/services/csvImportService.d.ts +7 -0
- package/dist/services/emailTemplateService.d.ts +1 -0
- package/dist/services/schoolService.d.ts +2 -0
- package/dist/services/userService.d.ts +19 -1
- package/dist/services/weeklyQuestService.d.ts +1 -0
- package/dist/types/Filter.d.ts +6 -0
- package/dist/types/Language.d.ts +8 -0
- package/dist/types/Payload.d.ts +2 -0
- package/dist/types/WeeklyQuest.d.ts +37 -0
- package/dist/types/user.d.ts +3 -0
- package/dist/utils/constants.d.ts +11 -2
- package/dist/utils/getCookieValue.d.ts +2 -0
- package/dist/utils/getStaticFileUrl.d.ts +2 -0
- package/package.json +7 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { LogLevel } from "@azure/msal-browser";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration object to be passed to MSAL instance on creation.
|
|
4
|
+
* For a full list of MSAL.js configuration parameters, visit:
|
|
5
|
+
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/configuration.md
|
|
6
|
+
*/
|
|
7
|
+
export declare const msalConfig: {
|
|
8
|
+
auth: {
|
|
9
|
+
clientId: string;
|
|
10
|
+
authority: string;
|
|
11
|
+
redirectUri: string;
|
|
12
|
+
};
|
|
13
|
+
cache: {
|
|
14
|
+
cacheLocation: string;
|
|
15
|
+
storeAuthStateInCookie: boolean;
|
|
16
|
+
};
|
|
17
|
+
system: {
|
|
18
|
+
loggerOptions: {
|
|
19
|
+
loggerCallback: (level: LogLevel, message: string, containsPii: any) => void;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Scopes you add here will be prompted for user consent during sign-in.
|
|
25
|
+
* By default, MSAL.js will add OIDC scopes (openid, profile, email) to any login request.
|
|
26
|
+
* For more information about OIDC scopes, visit:
|
|
27
|
+
* https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent#openid-connect-scopes
|
|
28
|
+
*/
|
|
29
|
+
export declare const loginRequest: {
|
|
30
|
+
scopes: string[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Add here the scopes to request when obtaining an access token for MS Graph API. For more information, see:
|
|
34
|
+
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/resources-and-scopes.md
|
|
35
|
+
*/
|
|
36
|
+
export declare const graphConfig: {
|
|
37
|
+
graphMeEndpoint: string;
|
|
38
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface ICreatePassword {
|
|
2
|
+
password: string;
|
|
3
|
+
reEnterPassword: string;
|
|
4
|
+
email: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
token: string;
|
|
7
|
+
}
|
|
8
|
+
export declare enum TypeLogin {
|
|
9
|
+
Google = 0,
|
|
10
|
+
ClassLink = 1,
|
|
11
|
+
MicrosoftSSO = 2
|
|
12
|
+
}
|
|
13
|
+
export interface IInformationUser {
|
|
14
|
+
firstName: string;
|
|
15
|
+
lastName: string;
|
|
16
|
+
fullName: string;
|
|
17
|
+
imageUrl: string | null;
|
|
18
|
+
email: string;
|
|
19
|
+
accessToken: string;
|
|
20
|
+
googleId: string;
|
|
21
|
+
}
|
|
22
|
+
export declare enum LoginType {
|
|
23
|
+
Default = 0,
|
|
24
|
+
Google = 1,
|
|
25
|
+
Impersonate = 2
|
|
26
|
+
}
|
|
27
|
+
export interface ISchool {
|
|
28
|
+
schoolName: string;
|
|
29
|
+
schoolLogo: string;
|
|
30
|
+
schoolId: number;
|
|
31
|
+
}
|
|
32
|
+
export interface IDashboard {
|
|
33
|
+
version?: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ICreatePassword } from "../constant/types";
|
|
3
|
+
declare const useCreatePassword: () => {
|
|
4
|
+
createPasswordRequest: (data: ICreatePassword) => Promise<void>;
|
|
5
|
+
isShowNewPassword: boolean;
|
|
6
|
+
setIsShowNewPassword: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
7
|
+
isShowReTypePassword: boolean;
|
|
8
|
+
setIsShowReTypePassword: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
9
|
+
clickHandler: () => Promise<any>;
|
|
10
|
+
handleVerify: () => void;
|
|
11
|
+
initialValues: ICreatePassword;
|
|
12
|
+
};
|
|
13
|
+
export default useCreatePassword;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ICreatePassword } from "../constant/types";
|
|
2
3
|
declare type ForgotPasswordInfo = {
|
|
3
4
|
email: string;
|
|
4
5
|
captcha: string;
|
|
@@ -6,7 +7,7 @@ declare type ForgotPasswordInfo = {
|
|
|
6
7
|
declare const useForgotPassword: () => {
|
|
7
8
|
defaultInfo: ForgotPasswordInfo;
|
|
8
9
|
forgotPasswordRequest: (data: any) => Promise<void>;
|
|
9
|
-
checkResetTokenRequest: (token: string) => Promise<void>;
|
|
10
|
+
checkResetTokenRequest: (token: string, key: string) => Promise<void>;
|
|
10
11
|
validLink: boolean;
|
|
11
12
|
resetPasswordRequest: (data: any) => Promise<void>;
|
|
12
13
|
openLogin: boolean;
|
|
@@ -17,5 +18,6 @@ declare const useForgotPassword: () => {
|
|
|
17
18
|
setIsShowReTypePassword: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
18
19
|
clickHandler: () => Promise<any>;
|
|
19
20
|
handleVerify: () => void;
|
|
21
|
+
initialValues: ICreatePassword;
|
|
20
22
|
};
|
|
21
23
|
export default useForgotPassword;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { TypeLogin, ISchool } from "../constant/types";
|
|
2
3
|
declare type LoginInfo = {
|
|
3
4
|
email: string;
|
|
4
5
|
password: string;
|
|
5
6
|
captcha: string;
|
|
6
7
|
rememberMe: boolean;
|
|
8
|
+
isSessionUserBrowser?: boolean;
|
|
7
9
|
};
|
|
8
10
|
declare const useLogin: () => {
|
|
9
11
|
defaultInfo: LoginInfo;
|
|
@@ -12,12 +14,17 @@ declare const useLogin: () => {
|
|
|
12
14
|
toggle: () => void;
|
|
13
15
|
isShowPassword: boolean;
|
|
14
16
|
setIsShowPassword: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
15
|
-
fnIsCheckLogin: (data: any, token: string, clickHandler
|
|
16
|
-
isLoginGoogle:
|
|
17
|
+
fnIsCheckLogin: (type: TypeLogin, data: any, token: string, clickHandler?: any) => Promise<void>;
|
|
18
|
+
isLoginGoogle: any;
|
|
17
19
|
infoUser: any;
|
|
18
|
-
setInfoUser: import("react").Dispatch<any>;
|
|
19
20
|
submitLogin: (teacherId: number, clickHandler: any) => Promise<void>;
|
|
20
|
-
setIsLoginGoogle: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
21
21
|
googleClientId: string;
|
|
22
|
+
googleRecaptchaId: string;
|
|
23
|
+
handleCancelModelAssign: () => void;
|
|
24
|
+
openModelAssign: boolean;
|
|
25
|
+
fnLoginSSO: (clickHandler?: any) => Promise<void>;
|
|
26
|
+
school: ISchool;
|
|
27
|
+
extensionEmail: string;
|
|
28
|
+
handleLoginWidthClever: () => void;
|
|
22
29
|
};
|
|
23
30
|
export default useLogin;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { ISchool } from "../../constant/types";
|
|
3
|
+
interface Props {
|
|
4
|
+
school: ISchool;
|
|
5
|
+
}
|
|
6
|
+
declare const BlockForgetPassword: ({ school }: Props) => JSX.Element;
|
|
3
7
|
export default BlockForgetPassword;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
+
import { ISchool } from "../../constant/types";
|
|
2
3
|
interface Props {
|
|
3
4
|
defaultInfo?: any;
|
|
4
5
|
userLogin?: any;
|
|
6
|
+
onCancelModelAssign: Function;
|
|
7
|
+
openModelAssign: boolean;
|
|
8
|
+
school: ISchool;
|
|
9
|
+
isShowPassword: boolean;
|
|
10
|
+
setIsShowPassword: Function;
|
|
11
|
+
fnIsCheckLogin: Function;
|
|
12
|
+
isLoginGoogle: boolean;
|
|
13
|
+
submitLogin: Function;
|
|
14
|
+
infoUser: any;
|
|
15
|
+
googleClientId: string;
|
|
16
|
+
fnLoginSSO: Function;
|
|
17
|
+
extensionEmail: string;
|
|
18
|
+
onLoginWidthClever: Function;
|
|
5
19
|
}
|
|
6
20
|
declare const BlockLogin: FC<Props>;
|
|
7
21
|
export default BlockLogin;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IStaffAssign, StudentAssign } from '../constants/types';
|
|
3
|
+
interface IProps {
|
|
4
|
+
openDetailModal: boolean;
|
|
5
|
+
onClose: Function;
|
|
6
|
+
selectedUser: StudentAssign;
|
|
7
|
+
staffBulkAssign: IStaffAssign;
|
|
8
|
+
teacherOptions: any[];
|
|
9
|
+
assistantOptions: any[];
|
|
10
|
+
counselorOptions: any[];
|
|
11
|
+
secondaryTeacherOptions: any[];
|
|
12
|
+
handleChangeTeacherBulk: Function;
|
|
13
|
+
handleChangeCounselorBulk: Function;
|
|
14
|
+
handleChangeStaffBulk: Function;
|
|
15
|
+
handleEditAssignForStudents: Function;
|
|
16
|
+
toggleCollapse: (index: number) => void;
|
|
17
|
+
activeIndex: number;
|
|
18
|
+
}
|
|
19
|
+
declare const AssignStudentModal: FC<IProps>;
|
|
20
|
+
export default AssignStudentModal;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { PopoverProps } from "reactstrap";
|
|
3
|
+
import { FilterOption, SearchBy, UserFilter, UserOrder } from "../constants/types";
|
|
4
|
+
interface Props extends PopoverProps {
|
|
5
|
+
filters?: UserFilter;
|
|
6
|
+
sortBy: UserOrder;
|
|
7
|
+
searchBy?: SearchBy;
|
|
8
|
+
users: string[];
|
|
9
|
+
defaultOptions?: FilterOption[];
|
|
10
|
+
selectedOptions?: string[];
|
|
11
|
+
searchKey: string;
|
|
12
|
+
onChangeSearchKey: (value: string) => void;
|
|
13
|
+
onOptionsChange?: (value?: string[], searchBy?: SearchBy) => void;
|
|
14
|
+
onSearch?: (search: string, searchBy: SearchBy) => void;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
onFilter?: () => void;
|
|
17
|
+
onChangeFilters?: (filter: UserFilter) => void;
|
|
18
|
+
getOption?: (user: any, t?: any) => FilterOption;
|
|
19
|
+
}
|
|
20
|
+
declare const FilterPopover: FC<Props>;
|
|
21
|
+
export default FilterPopover;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { SearchBy, UserColumn, UserFilter, UserOrder } from "../constants/types";
|
|
3
|
+
interface Props {
|
|
4
|
+
data: UserColumn;
|
|
5
|
+
popoverId?: string;
|
|
6
|
+
filters?: UserFilter;
|
|
7
|
+
searchString?: string;
|
|
8
|
+
users: string[];
|
|
9
|
+
selectedOptions?: string[];
|
|
10
|
+
onOptionsChange?: (value?: string[], searchBy?: SearchBy) => void;
|
|
11
|
+
onSearch?: (search: string, searchBy: SearchBy) => void;
|
|
12
|
+
onOpenFilter?: (id: string, searchBy?: SearchBy, searchStringBy?: string, sortBy?: UserOrder) => void;
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
onChangeFilters?: (filter: UserFilter) => void;
|
|
15
|
+
isCenter?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const HeaderCell: FC<Props>;
|
|
18
|
+
export default HeaderCell;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { UserColumn, UserFilter } from "../constants/types";
|
|
3
|
+
interface Props {
|
|
4
|
+
headers: UserColumn[];
|
|
5
|
+
filters: UserFilter;
|
|
6
|
+
fullName?: string;
|
|
7
|
+
onChangeFilters?: (filter: UserFilter) => void;
|
|
8
|
+
isStudentFilter?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const TableHeader: FC<Props>;
|
|
11
|
+
export default TableHeader;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
htmlFor: string;
|
|
4
|
+
isDisabled: boolean;
|
|
5
|
+
text: string;
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
onClick: Function;
|
|
8
|
+
isClassReflection?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const UploadCSVButton: FC<Props>;
|
|
11
|
+
export default UploadCSVButton;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IStaffAssign, StudentFilter, UserColumn, UserFilter, UserOrder } from "./types";
|
|
2
|
+
export declare const userOrders: {
|
|
3
|
+
0: string;
|
|
4
|
+
1: string;
|
|
5
|
+
2: string;
|
|
6
|
+
3: string;
|
|
7
|
+
4: string;
|
|
8
|
+
5: string;
|
|
9
|
+
6: string;
|
|
10
|
+
7: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const UserColumns: UserColumn[];
|
|
13
|
+
export declare const DEFAULT_PAGE_SIZE: {
|
|
14
|
+
label: string;
|
|
15
|
+
value: number;
|
|
16
|
+
};
|
|
17
|
+
export declare const DEFAULT_FILTER: UserFilter;
|
|
18
|
+
export declare const DEFAULT_STUDENT_FILTER: StudentFilter;
|
|
19
|
+
export declare const DEFAULT_FILTER_POPOVER: UserFilter;
|
|
20
|
+
export declare const CSV_PREFIX = "data:text/csv;charset=utf-8,";
|
|
21
|
+
export declare const initialStaffBulk: IStaffAssign;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
export declare type User = {
|
|
2
|
+
id: string;
|
|
3
|
+
firstName: string;
|
|
4
|
+
lastName: string;
|
|
5
|
+
firstInitial: string;
|
|
6
|
+
email: string;
|
|
7
|
+
phoneNumber: string;
|
|
8
|
+
roles: string[];
|
|
9
|
+
dateOfBirth: string;
|
|
10
|
+
createTime: string;
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
profileImageFileName: string;
|
|
13
|
+
fullName: string;
|
|
14
|
+
sourcedId: string;
|
|
15
|
+
rosterUser: RosterUser;
|
|
16
|
+
grade: string;
|
|
17
|
+
};
|
|
18
|
+
export declare type RosterUser = {
|
|
19
|
+
sourcedId: string;
|
|
20
|
+
username: string;
|
|
21
|
+
status: string;
|
|
22
|
+
givenName: string;
|
|
23
|
+
middleName: string;
|
|
24
|
+
familyName: string;
|
|
25
|
+
email: string;
|
|
26
|
+
grades: string;
|
|
27
|
+
role: string;
|
|
28
|
+
};
|
|
29
|
+
export declare type Option = {
|
|
30
|
+
label: string;
|
|
31
|
+
value: string;
|
|
32
|
+
};
|
|
33
|
+
export declare type UserFilter = {
|
|
34
|
+
currentPage?: number;
|
|
35
|
+
pageSize?: number;
|
|
36
|
+
searchString?: string;
|
|
37
|
+
isDescending?: boolean;
|
|
38
|
+
sortBy?: UserOrder;
|
|
39
|
+
searchBy?: SearchBy;
|
|
40
|
+
searchByStrings?: string[];
|
|
41
|
+
};
|
|
42
|
+
export declare type StudentFilter = {
|
|
43
|
+
currentPage?: number;
|
|
44
|
+
pageSize?: number;
|
|
45
|
+
searchString?: string;
|
|
46
|
+
isAssigned?: boolean;
|
|
47
|
+
sortBy?: UserOrder;
|
|
48
|
+
orderBy?: string;
|
|
49
|
+
};
|
|
50
|
+
export declare type UserFilterField = {
|
|
51
|
+
currentPage?: number;
|
|
52
|
+
pageSize?: number;
|
|
53
|
+
searchString?: string;
|
|
54
|
+
isDescending?: boolean;
|
|
55
|
+
searchBy?: SearchBy;
|
|
56
|
+
searchStringBy?: string;
|
|
57
|
+
isStudentFilter?: boolean;
|
|
58
|
+
};
|
|
59
|
+
export declare type UserColumn = {
|
|
60
|
+
isCenter?: boolean;
|
|
61
|
+
name: string;
|
|
62
|
+
sortBy?: UserOrder;
|
|
63
|
+
className?: string;
|
|
64
|
+
searchBy?: SearchBy;
|
|
65
|
+
getOption?: (user: any, t?: any) => FilterOption;
|
|
66
|
+
options?: FilterOption[];
|
|
67
|
+
onSelectAll?: Function;
|
|
68
|
+
isCheckAll?: boolean;
|
|
69
|
+
};
|
|
70
|
+
export declare type StudentAssign = {
|
|
71
|
+
studentId: number;
|
|
72
|
+
id: string;
|
|
73
|
+
email: string;
|
|
74
|
+
fullName: string;
|
|
75
|
+
gradeLevel: string;
|
|
76
|
+
phoneNumber: string;
|
|
77
|
+
isActive?: boolean;
|
|
78
|
+
dateOfBirth?: string;
|
|
79
|
+
profileImageFileName: string;
|
|
80
|
+
quote: string;
|
|
81
|
+
assistantName: string;
|
|
82
|
+
assistantEmail: string;
|
|
83
|
+
counselorName: string;
|
|
84
|
+
counselorEmail: string;
|
|
85
|
+
secondaryTeacherName: string;
|
|
86
|
+
secondaryTeacherEmail: string;
|
|
87
|
+
teachers: Array<ITeachers>;
|
|
88
|
+
};
|
|
89
|
+
export interface ITeachers {
|
|
90
|
+
teacherUserId: string;
|
|
91
|
+
mainTeacherName: string;
|
|
92
|
+
mainTeacherEmail: string;
|
|
93
|
+
mainTeacherId?: number;
|
|
94
|
+
}
|
|
95
|
+
export interface IStaffAssign {
|
|
96
|
+
teacher: {
|
|
97
|
+
id: string;
|
|
98
|
+
email: string;
|
|
99
|
+
}[];
|
|
100
|
+
assistantId: string;
|
|
101
|
+
assistantEmail: string;
|
|
102
|
+
counselorId: string;
|
|
103
|
+
counselorEmail: string;
|
|
104
|
+
secondaryTeacherId: string;
|
|
105
|
+
secondaryTeacherEmail: string;
|
|
106
|
+
}
|
|
107
|
+
export declare type Counselor = {
|
|
108
|
+
id: string;
|
|
109
|
+
counselorId: number;
|
|
110
|
+
firstName: string;
|
|
111
|
+
lastName: string;
|
|
112
|
+
fullName: string;
|
|
113
|
+
email: string;
|
|
114
|
+
};
|
|
115
|
+
export declare type Assistant = {
|
|
116
|
+
id: string;
|
|
117
|
+
assistantId: number;
|
|
118
|
+
firstName: string;
|
|
119
|
+
lastName: string;
|
|
120
|
+
fullName: string;
|
|
121
|
+
email: string;
|
|
122
|
+
};
|
|
123
|
+
export declare type SecondaryTeacher = {
|
|
124
|
+
id: string;
|
|
125
|
+
secondaryTeacherId: number;
|
|
126
|
+
firstName: string;
|
|
127
|
+
lastName: string;
|
|
128
|
+
fullName: string;
|
|
129
|
+
email: string;
|
|
130
|
+
};
|
|
131
|
+
export declare type Teacher = {
|
|
132
|
+
id: string;
|
|
133
|
+
email: string;
|
|
134
|
+
};
|
|
135
|
+
export interface IOptions {
|
|
136
|
+
label: string;
|
|
137
|
+
value: string;
|
|
138
|
+
}
|
|
139
|
+
export declare type AssignStudentDto = {
|
|
140
|
+
id: string;
|
|
141
|
+
mainTeacherUserId?: Array<string>;
|
|
142
|
+
mainTeacherEmail?: Array<string>;
|
|
143
|
+
assistantUserId?: string;
|
|
144
|
+
assistantEmail?: string;
|
|
145
|
+
counselorUserId?: string;
|
|
146
|
+
counselorEmail?: string;
|
|
147
|
+
secondaryTeacherUserId?: string;
|
|
148
|
+
secondaryTeacherEmail?: string;
|
|
149
|
+
};
|
|
150
|
+
export declare type FilterOption = {
|
|
151
|
+
label: string;
|
|
152
|
+
value: string;
|
|
153
|
+
};
|
|
154
|
+
export declare enum UserOrder {
|
|
155
|
+
Id = 0,
|
|
156
|
+
Name = 1,
|
|
157
|
+
Email = 2,
|
|
158
|
+
Age = 3,
|
|
159
|
+
Role = 4,
|
|
160
|
+
Status = 5,
|
|
161
|
+
CreatedAt = 6,
|
|
162
|
+
RosterUser = 7
|
|
163
|
+
}
|
|
164
|
+
export declare enum SearchBy {
|
|
165
|
+
Id = 0,
|
|
166
|
+
Name = 1,
|
|
167
|
+
Email = 2,
|
|
168
|
+
Role = 3,
|
|
169
|
+
RosterUser = 4,
|
|
170
|
+
Status = 5
|
|
171
|
+
}
|
|
172
|
+
export declare enum TeacherType {
|
|
173
|
+
Teacher = 0,
|
|
174
|
+
Assistant = 1,
|
|
175
|
+
Counselor = 2,
|
|
176
|
+
SecondaryTeacher = 3
|
|
177
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IStaffAssign } from "../constants/types";
|
|
2
|
+
declare const useAssignStudent: (teacherSelected?: any, assistantSelected?: object | undefined, counselorSelected?: object | undefined, secondaryTeacherSelected?: object | undefined, callback?: Function | undefined) => {
|
|
3
|
+
handleAssignSingleStudent: (id: string) => void;
|
|
4
|
+
handleAssignMultiStudent: (listUserIds: string[]) => void;
|
|
5
|
+
openModelBulk: boolean;
|
|
6
|
+
handleToggleModel: (listUserIds?: string[] | undefined) => void;
|
|
7
|
+
handleChangeStaffBulk: (name: string, id: string) => void;
|
|
8
|
+
staffBulkAssign: IStaffAssign;
|
|
9
|
+
handleAssignStaffToStudents: (listUserIds: string[], isTeacherExit: boolean) => void;
|
|
10
|
+
handleToggleInactiveModal: (listUserIds?: string[] | undefined) => void;
|
|
11
|
+
openInactiveModal: boolean;
|
|
12
|
+
handleInactiveStudents: (listStudentIds: string[], callback: () => void) => Promise<void>;
|
|
13
|
+
handleChangeTeacherBulk: (value: any[]) => void;
|
|
14
|
+
};
|
|
15
|
+
export default useAssignStudent;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StudentAssign, StudentFilter, UserOrder } from "../constants/types";
|
|
2
|
+
declare const useAssignStudentList: () => {
|
|
3
|
+
handelSort: (sortBy: UserOrder) => void;
|
|
4
|
+
handleRetrievedData: () => void;
|
|
5
|
+
totalItem: number;
|
|
6
|
+
userList: StudentAssign[];
|
|
7
|
+
filters: StudentFilter;
|
|
8
|
+
changeFilters: (updatedFilters: any) => void;
|
|
9
|
+
handleSelectAll: () => void;
|
|
10
|
+
handleClickCheck: (e: any) => void;
|
|
11
|
+
isCheckAll: boolean;
|
|
12
|
+
isCheck: any;
|
|
13
|
+
fullName: string;
|
|
14
|
+
};
|
|
15
|
+
export default useAssignStudentList;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IOptions } from "../constants/types";
|
|
3
|
+
declare const useAssistantList: () => {
|
|
4
|
+
selectedAssistants: object | undefined;
|
|
5
|
+
assistantOptions: IOptions[];
|
|
6
|
+
handleSelectAssistant: (assistantId: string, studentUserId: string) => void;
|
|
7
|
+
handleCreateAssistantOption: (newAssistant: IOptions, studentUserId: string, isSelect?: boolean | undefined) => void;
|
|
8
|
+
setSelectedAssistants: import("react").Dispatch<import("react").SetStateAction<object | undefined>>;
|
|
9
|
+
};
|
|
10
|
+
export default useAssistantList;
|