mario-teacher-student-client 2.2.5-beta → 2.2.7-beta

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.
Files changed (26) hide show
  1. package/dist/containers/ConductSurvey/components/HeaderSurvey.d.ts +1 -0
  2. package/dist/containers/ConductSurvey/hooks/useConductSurvey.d.ts +1 -0
  3. package/dist/containers/ExternalSurvey/api/externalService.d.ts +2 -1
  4. package/dist/containers/ExternalSurvey/constant/types.d.ts +4 -0
  5. package/dist/containers/ExternalSurvey/hooks/useExternalSurvey.d.ts +2 -0
  6. package/dist/containers/Surveys/apiClient/surveyService.d.ts +1 -0
  7. package/dist/containers/Surveys/components/ExternalSurveyList.d.ts +3 -0
  8. package/dist/containers/Surveys/components/StepComponents/ConfirmShareSurvey.d.ts +4 -0
  9. package/dist/containers/Surveys/components/StepComponents/CreateSurveyComponent.d.ts +1 -1
  10. package/dist/containers/Surveys/components/StepComponents/ModelSelectQuestion.d.ts +1 -1
  11. package/dist/containers/Surveys/components/StepComponents/ModelSelectSurveyTemplate.d.ts +1 -1
  12. package/dist/containers/Surveys/constants/tableColumn.d.ts +11 -0
  13. package/dist/containers/Surveys/constants/types.d.ts +18 -2
  14. package/dist/containers/Surveys/hook/useCreateSurvey.d.ts +9 -7
  15. package/dist/containers/Surveys/hook/useExternalSurvey.d.ts +2 -0
  16. package/dist/containers/Surveys/hook/useExternalSurveyList.d.ts +11 -0
  17. package/dist/containers/Surveys/hook/useFormCreateSurvey.d.ts +19 -0
  18. package/dist/containers/Surveys/hook/useListSurveyDetail.d.ts +1 -1
  19. package/dist/containers/Surveys/hook/useSelectQuestion.d.ts +26 -0
  20. package/dist/containers/Surveys/hook/useSelectStudent.d.ts +15 -0
  21. package/dist/index.css +5 -0
  22. package/dist/index.js +665 -293
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.modern.js +665 -293
  25. package/dist/index.modern.js.map +1 -1
  26. package/package.json +1 -1
@@ -15,6 +15,7 @@ interface Props {
15
15
  isGoback?: boolean;
16
16
  isShowButtonScheduleBackGround?: boolean;
17
17
  onScheduleButton?: Function;
18
+ isDone?: boolean;
18
19
  }
19
20
  declare const HeaderSurvey: FC<Props>;
20
21
  export default HeaderSurvey;
@@ -24,5 +24,6 @@ declare const useConductSurvey: () => {
24
24
  questionIBLearner: string;
25
25
  setQuestionIBLearner: import("react").Dispatch<import("react").SetStateAction<string>>;
26
26
  isSchedule: boolean;
27
+ isDone: boolean;
27
28
  };
28
29
  export default useConductSurvey;
@@ -1,5 +1,6 @@
1
+ import { BODY_TYPE_EXTERNAL } from "../constant/types";
1
2
  export declare const shareSurvey: (data: any) => void;
2
3
  export declare const getAllEduTeacher: () => Promise<import("axios").AxiosResponse<any>>;
3
- export declare const startExternalSurvey: (token: string, email: string) => Promise<import("axios").AxiosResponse<any>>;
4
+ export declare const startExternalSurvey: (body: BODY_TYPE_EXTERNAL) => Promise<import("axios").AxiosResponse<any>>;
4
5
  export declare const updateItemQuestionAnswer: (isAdditional: boolean, body: any) => Promise<import("axios").AxiosResponse<any>>;
5
6
  export declare const finishExternalSurvey: (externalSurveyId: number, email: string) => Promise<import("axios").AxiosResponse<any>>;
@@ -63,3 +63,7 @@ export interface DATA_FORM_EMAIL {
63
63
  emailContent: string;
64
64
  surveyId: number;
65
65
  }
66
+ export interface BODY_TYPE_EXTERNAL {
67
+ token: string;
68
+ externalSurveyId: number;
69
+ }
@@ -12,5 +12,7 @@ declare const useExternalSurvey: () => {
12
12
  questionSummarize: any;
13
13
  setQuestionSummarize: import("react").Dispatch<any>;
14
14
  isDone: boolean;
15
+ externalSurveyId: string;
16
+ surveyId: string;
15
17
  };
16
18
  export default useExternalSurvey;
@@ -11,3 +11,4 @@ export declare const getSurveyCountStudent: () => Promise<import("axios").AxiosR
11
11
  export declare const getAllEduTeacher: () => Promise<import("axios").AxiosResponse<any>>;
12
12
  export declare const shareSurvey: (data: any) => void;
13
13
  export declare const updateSurvey: (surveyId: number, model: any) => Promise<import("axios").AxiosResponse<any>>;
14
+ export declare const getListExternal: (surveyId: number, params: any) => Promise<import("axios").AxiosResponse<any>>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const ExternalSurveyList: () => JSX.Element;
3
+ export default ExternalSurveyList;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { MODEL_CONFIRM_SURVEY } from "../../constants/types";
3
+ declare const ConfirmShareSurvey: ({ open, handleClose, onOpenModelExternal }: MODEL_CONFIRM_SURVEY) => JSX.Element;
4
+ export default ConfirmShareSurvey;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { CREATE_SURVEY_PROPS } from "../../constants/types";
3
- declare const CreateSurveyComponent: ({ dataFormCreateSurvey, onChangeValueForm, handleChangeDate, handleChangeFavorite, templateSurvey, handleToggleModel, openModelSelectTemplate, handleSelectTemplate, openCollapseId, setOpenCollapseId, handleInsertQuestion, additionalText, handleChangeAdditionalText, handleCreateAddional, handleRemoveQuestion, contentModelQuestion, handleCloseModelEdit, handleChangeModelQuestion, handleSelectQuestion, handleCheckSelectQuestion, handleSelectQuestionCollapse, handleCheckTypeQuestion, handleCheckCountQuestionByType, handleCheckInsertQuestion, handleCheckSelectTemplate }: CREATE_SURVEY_PROPS) => JSX.Element;
3
+ declare const CreateSurveyComponent: ({ dataFormCreateSurvey, onChangeValueForm, handleChangeDate, handleChangeFavorite, templateSurvey, handleToggleModel, openModelSelectTemplate, handleSelectTemplate, openCollapseId, setOpenCollapseId, handleInsertQuestion, additionalText, handleChangeAdditionalText, handleCreateAddional, handleRemoveQuestion, contentModelQuestion, handleCloseModelEdit, handleChangeModelQuestion, handleSelectQuestion, handleCheckSelectQuestion, handleSelectQuestionCollapse, handleCheckTypeQuestion, handleCheckCountQuestionByType, handleCheckInsertQuestion, handleCheckSelectTemplate, handleInsertAllQuestion }: CREATE_SURVEY_PROPS) => JSX.Element;
4
4
  export default CreateSurveyComponent;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { MODEL_SELECT_QUESTION } from "../../constants/types";
3
- declare const ModelSelectQuestion: ({ open, handleClose, template, selectQuestion, handleSelectTemplate, handleSelectQuestion, handleCheckSelectQuestion, handleCheckInsertQuestion }: MODEL_SELECT_QUESTION) => JSX.Element;
3
+ declare const ModelSelectQuestion: ({ open, handleClose, template, selectQuestion, handleSelectTemplate, handleSelectQuestion, handleCheckInsertQuestion, handleInsertAllQuestion }: MODEL_SELECT_QUESTION) => JSX.Element;
4
4
  export default ModelSelectQuestion;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { SELECT_SURVEY_MODEL } from "../../constants/types";
3
- declare const ModelSelectSurveyTemplate: ({ open, handleClose, listTemplate, handleInsertQuestion, handleSelectTemplate, contentModelQuestion, handleCloseModelEdit, handleChangeModelQuestion, handleSelectQuestion, handleCheckSelectQuestion, handleCheckCountQuestionByType, handleCheckTypeQuestion, dataFormCreateSurvey, handleCheckInsertQuestion, handleCheckSelectTemplate }: SELECT_SURVEY_MODEL) => JSX.Element;
3
+ declare const ModelSelectSurveyTemplate: ({ open, handleClose, listTemplate, handleInsertQuestion, handleSelectTemplate, contentModelQuestion, handleCloseModelEdit, handleChangeModelQuestion, handleSelectQuestion, handleCheckCountQuestionByType, handleCheckTypeQuestion, dataFormCreateSurvey, handleCheckInsertQuestion, handleCheckSelectTemplate, handleInsertAllQuestion }: SELECT_SURVEY_MODEL) => JSX.Element;
4
4
  export default ModelSelectSurveyTemplate;
@@ -75,3 +75,14 @@ export declare const tableActionNeedSurvey: ({
75
75
  sortName: null;
76
76
  align: string;
77
77
  })[];
78
+ export declare const tableExternalSurvey: ({
79
+ name: string;
80
+ tableWidth: number;
81
+ sortName: string;
82
+ align: string;
83
+ } | {
84
+ name: string;
85
+ tableWidth: number;
86
+ sortName: null;
87
+ align: string;
88
+ })[];
@@ -133,6 +133,7 @@ export interface CREATE_SURVEY_PROPS {
133
133
  handleCheckCountQuestionByType: Function;
134
134
  handleCheckInsertQuestion: Function;
135
135
  handleCheckSelectTemplate: Function;
136
+ handleInsertAllQuestion: Function;
136
137
  }
137
138
  export interface QUESTION_TEMPLATE {
138
139
  questionId: number;
@@ -172,12 +173,12 @@ export interface SELECT_SURVEY_MODEL {
172
173
  handleCloseModelEdit: Function;
173
174
  handleChangeModelQuestion: Function;
174
175
  handleSelectQuestion: Function;
175
- handleCheckSelectQuestion: Function;
176
176
  handleCheckTypeQuestion: Function;
177
177
  handleCheckCountQuestionByType: Function;
178
178
  dataFormCreateSurvey: FORM_SURVEY;
179
179
  handleCheckInsertQuestion: Function;
180
180
  handleCheckSelectTemplate: Function;
181
+ handleInsertAllQuestion: Function;
181
182
  }
182
183
  export interface REVIEW_SURVEY_PROPS {
183
184
  dataFormCreateSurvey: FORM_SURVEY;
@@ -196,8 +197,8 @@ export interface MODEL_SELECT_QUESTION {
196
197
  selectQuestion?: QUESTION_TEMPLATE[];
197
198
  handleSelectTemplate: Function;
198
199
  handleSelectQuestion: Function;
199
- handleCheckSelectQuestion: Function;
200
200
  handleCheckInsertQuestion: Function;
201
+ handleInsertAllQuestion: Function;
201
202
  }
202
203
  export interface CONTENT_MODEL_QUESTION {
203
204
  open: boolean;
@@ -269,6 +270,7 @@ export interface MODEL_CONFIRM_SURVEY {
269
270
  handleEnterAddSender?: Function;
270
271
  emailContent?: string;
271
272
  handleChangeEmailContent?: Function;
273
+ onOpenModelExternal?: Function;
272
274
  }
273
275
  export interface EDU_TEACHER {
274
276
  email: string;
@@ -281,3 +283,17 @@ export interface EDU_TEACHER {
281
283
  profileImageFileName: string;
282
284
  isSelected?: boolean;
283
285
  }
286
+ export interface EXTERNAL_SURVEY {
287
+ id: number;
288
+ email: string;
289
+ startTime: string;
290
+ isDone: boolean;
291
+ status: string;
292
+ }
293
+ export interface EXTERNAL_RES {
294
+ items: EXTERNAL_SURVEY;
295
+ currentPage: number;
296
+ pageSize: number;
297
+ totalItems: number;
298
+ totalPages: number;
299
+ }
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { CONTENT_MODEL_QUESTION, FILTER_STUDENT, FORM_SURVEY, QUESTION_TEMPLATE, STUDENT_SURVEY_RESPONSE, TEMPLATE_SURVEY } from "../constants/types";
3
- import { MaterialUiPickersDate } from "@material-ui/pickers/typings/date";
2
+ import { CONTENT_MODEL_QUESTION, FILTER_STUDENT, FORM_SURVEY, STUDENT_SURVEY_RESPONSE, TEMPLATE_SURVEY } from "../constants/types";
4
3
  declare const useListSurveyDetail: () => {
5
4
  filters: FILTER_STUDENT;
6
5
  students: STUDENT_SURVEY_RESPONSE | undefined;
@@ -15,8 +14,8 @@ declare const useListSurveyDetail: () => {
15
14
  handleSelectStudent: (studentIds: number[]) => void;
16
15
  setDataFormCreateSurvey: import("react").Dispatch<import("react").SetStateAction<FORM_SURVEY>>;
17
16
  onChangeValueForm: (event: any) => void;
18
- handleChangeDate: (date: MaterialUiPickersDate | null) => void;
19
- handleChangeInputSearch: (event: React.ChangeEvent<HTMLInputElement>) => void;
17
+ handleChangeDate: (date: import("@material-ui/pickers/typings/date").MaterialUiPickersDate) => void;
18
+ handleChangeInputSearch: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
20
19
  handleChangeFavorite: () => void;
21
20
  handleChangeGrade: (grade: string) => void;
22
21
  handleSelectTemplate: (template: TEMPLATE_SURVEY) => void;
@@ -30,10 +29,10 @@ declare const useListSurveyDetail: () => {
30
29
  handleCreateSurvey: () => Promise<void>;
31
30
  handleCloseModelEdit: () => void;
32
31
  setContentModelQuestion: import("react").Dispatch<import("react").SetStateAction<CONTENT_MODEL_QUESTION>>;
33
- handleSelectQuestion: (question: QUESTION_TEMPLATE) => void;
34
- handleCheckSelectQuestion: (template: TEMPLATE_SURVEY, question: QUESTION_TEMPLATE) => boolean;
32
+ handleSelectQuestion: (question: import("../constants/types").QUESTION_TEMPLATE) => void;
33
+ handleCheckSelectQuestion: (template: TEMPLATE_SURVEY, question: import("../constants/types").QUESTION_TEMPLATE) => boolean;
35
34
  handleChangeModelQuestion: (template: TEMPLATE_SURVEY) => void;
36
- handleSelectQuestionCollapse: (template: TEMPLATE_SURVEY, question: QUESTION_TEMPLATE) => void;
35
+ handleSelectQuestionCollapse: (template: TEMPLATE_SURVEY, question: import("../constants/types").QUESTION_TEMPLATE) => void;
37
36
  handleCheckTypeQuestion: (template: TEMPLATE_SURVEY) => import("../constants/types").QuestionType[];
38
37
  handleCheckCountQuestionByType: (template: TEMPLATE_SURVEY, type: string) => number;
39
38
  handleChangePagePreview: () => void;
@@ -56,5 +55,8 @@ declare const useListSurveyDetail: () => {
56
55
  emailContent: string;
57
56
  handleShareSurvey: () => Promise<void>;
58
57
  handleDeleteEmail: (email: string) => void;
58
+ handleToggleModelConfirmShare: () => void;
59
+ openModelConfirmShare: boolean;
60
+ handleInsertAllQuestion: (questionTemplate: import("../constants/types").QUESTION_TEMPLATE[]) => void;
59
61
  };
60
62
  export default useListSurveyDetail;
@@ -15,5 +15,7 @@ declare const useExternalSurvey: ({ surveyId }: PropsCustomHook) => {
15
15
  emailContent: string;
16
16
  handleShareSurvey: () => Promise<void>;
17
17
  handleDeleteEmail: (email: string) => void;
18
+ handleToggleModelConfirmShare: () => void;
19
+ openModelConfirmShare: boolean;
18
20
  };
19
21
  export default useExternalSurvey;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { FILTER_SURVEY, EXTERNAL_SURVEY } from "../constants/types";
3
+ declare const useExternalSurveyList: () => {
4
+ filters: FILTER_SURVEY;
5
+ inputSearch: import("react").MutableRefObject<any>;
6
+ externalSurveys: EXTERNAL_SURVEY[];
7
+ handleSort: (e: string) => void;
8
+ handleChangeInputSearch: (e: React.ChangeEvent<HTMLInputElement>) => void;
9
+ goToExternalSurveyResult: (externalSurveyId: number) => void;
10
+ };
11
+ export default useExternalSurveyList;
@@ -0,0 +1,19 @@
1
+ import { MaterialUiPickersDate } from "@material-ui/pickers/typings/date";
2
+ import { FORM_SURVEY } from "../constants/types";
3
+ interface PropsCustomHook {
4
+ dataFormCreateSurvey: FORM_SURVEY;
5
+ setDataFormCreateSurvey: Function;
6
+ setAdditionalText: Function;
7
+ additionalText: string;
8
+ }
9
+ declare const useFormCreateSurvey: ({ dataFormCreateSurvey, setDataFormCreateSurvey, additionalText, setAdditionalText }: PropsCustomHook) => {
10
+ handleToggleButtonHeader: () => boolean;
11
+ handleChangeFavorite: () => void;
12
+ handleCreateAddional: () => void;
13
+ onChangeValueForm: (event: any) => void;
14
+ handleChangeDate: (date: MaterialUiPickersDate | null) => void;
15
+ handleChangeAdditionalText: (event: any) => void;
16
+ handleRemoveQuestion: (questionText: string) => void;
17
+ handleNextStep: (step?: number | undefined) => void;
18
+ };
19
+ export default useFormCreateSurvey;
@@ -13,7 +13,7 @@ declare const useListSurveyDetail: ({ type }: SURVEY_STUDENT_PROPS) => {
13
13
  dayLeftCellBgColor: (dayLeft: number) => "" | "bg-red" | "bg-green" | "bg-yellow";
14
14
  handleStartSurvey: (surveyId: number, studentId: number) => void;
15
15
  goToBookSession: (studentId: number, surveyId: number) => void;
16
- handleShowSession: (status: string, schedule: string, isDone: boolean) => false | "Completed" | "Not Required" | "No Response yet" | "Scheduled";
16
+ handleShowSession: (status: string, schedule: string, isDone: boolean) => false | "Completed" | "Scheduled" | "No Response yet";
17
17
  sessionBackground: (point: number | null) => "bg-red" | "bg-green" | "bg-yellow";
18
18
  };
19
19
  export default useListSurveyDetail;
@@ -0,0 +1,26 @@
1
+ import { CONTENT_MODEL_QUESTION, FORM_SURVEY, QUESTION_TEMPLATE, TEMPLATE_SURVEY } from "../constants/types";
2
+ interface PropsCustomHook {
3
+ dataFormCreateSurvey: FORM_SURVEY;
4
+ templateSurvey: TEMPLATE_SURVEY[];
5
+ setDataFormCreateSurvey: Function;
6
+ contentModelQuestion: CONTENT_MODEL_QUESTION;
7
+ setContentModelQuestion: Function;
8
+ setOpenModelSelectTemplate: Function;
9
+ handleCloseModelEdit: Function;
10
+ openModelSelectTemplate: Boolean;
11
+ }
12
+ declare const useSelectQuestion: ({ dataFormCreateSurvey, templateSurvey, setDataFormCreateSurvey, contentModelQuestion, setContentModelQuestion, setOpenModelSelectTemplate, handleCloseModelEdit, openModelSelectTemplate }: PropsCustomHook) => {
13
+ handleCheckSelectQuestion: (template: TEMPLATE_SURVEY, question: QUESTION_TEMPLATE) => boolean;
14
+ handleCheckCountQuestionByType: (template: TEMPLATE_SURVEY, type: string) => number;
15
+ handleSelectQuestionCollapse: (template: TEMPLATE_SURVEY, question: QUESTION_TEMPLATE) => void;
16
+ handleCheckInsertQuestion: (template: TEMPLATE_SURVEY, countSelectQuestion: number) => boolean;
17
+ handleSelectQuestion: (question: QUESTION_TEMPLATE) => void;
18
+ handleCheckTypeQuestion: (template: TEMPLATE_SURVEY) => import("../constants/types").QuestionType[];
19
+ handleCheckSelectTemplate: (template: TEMPLATE_SURVEY) => boolean;
20
+ handleInsertQuestion: () => void;
21
+ handleSelectTemplate: (template: TEMPLATE_SURVEY) => void;
22
+ handleChangeModelQuestion: (template: TEMPLATE_SURVEY) => void;
23
+ handleToggleModel: () => void;
24
+ handleInsertAllQuestion: (questionTemplate: QUESTION_TEMPLATE[]) => void;
25
+ };
26
+ export default useSelectQuestion;
@@ -0,0 +1,15 @@
1
+ import { FORM_SURVEY, STUDENT_SURVEY_RESPONSE } from "../constants/types";
2
+ interface PropsCustomHook {
3
+ changeFilters: Function;
4
+ inputSearch: any;
5
+ students?: STUDENT_SURVEY_RESPONSE;
6
+ dataFormCreateSurvey: FORM_SURVEY;
7
+ setDataFormCreateSurvey: Function;
8
+ }
9
+ declare const useSelectStudent: ({ changeFilters, inputSearch, students, dataFormCreateSurvey, setDataFormCreateSurvey }: PropsCustomHook) => {
10
+ resizeWidthTable: (percent: number) => number;
11
+ handleChangeGrade: (grade: string) => void;
12
+ handleChangeInputSearch: (event: React.ChangeEvent<HTMLInputElement>) => void;
13
+ handleSelectStudent: (studentIds: number[]) => void;
14
+ };
15
+ export default useSelectStudent;
package/dist/index.css CHANGED
@@ -14997,6 +14997,11 @@ h4._3lNz0 {
14997
14997
  color: #22543d;
14998
14998
  width: 138px !important; }
14999
14999
 
15000
+ ._3tbAL ._suoGk {
15001
+ background-color: #ffd9d7;
15002
+ color: #822727;
15003
+ width: 138px !important; }
15004
+
15000
15005
  .__12h2 {
15001
15006
  padding: 16px;
15002
15007
  border-radius: 50px;