mario-education 2.4.517-feedback → 2.4.517-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.
@@ -14,6 +14,7 @@ interface headerProps {
14
14
  classFontSize: string;
15
15
  button?: any;
16
16
  isLarge?: boolean;
17
+ onDraft?: Function | null;
17
18
  }
18
- declare const CustomHeaderComponent: ({ title, contentButton, iconButton, isGoback, isGreyBackground, status, handleChangePage, isDisableButton, isPreviewSurvey, handlePreview, onHandleGoBack, borderNone, classFontSize, button, isLarge }: headerProps) => JSX.Element;
19
+ declare const CustomHeaderComponent: ({ title, contentButton, iconButton, isGoback, isGreyBackground, status, handleChangePage, isDisableButton, isPreviewSurvey, handlePreview, onHandleGoBack, borderNone, classFontSize, button, isLarge, onDraft }: headerProps) => JSX.Element;
19
20
  export default CustomHeaderComponent;
@@ -0,0 +1,4 @@
1
+ import "react-datepicker/dist/react-datepicker.css";
2
+ import { PROPS_FILTERS_COMPONENT_SURVEY } from "../../containers/SurveyDashboard/configs/types";
3
+ declare const SelectFilterSurvey: ({ studentUserId, studentId, studentDefault, handleChangeFilters, name, icon, option, onChangeFilters, btnStyle, filter, teacherUserId, changeCurrentTeacherUserId, labelBox, setLabelBox }: PROPS_FILTERS_COMPONENT_SURVEY) => JSX.Element;
4
+ export default SelectFilterSurvey;
@@ -1,11 +1,4 @@
1
1
  import { SURVEY_LIST } from "../../containers/SurveyDashboard/configs/types";
2
- interface FILTER {
3
- startDate?: number | null;
4
- endDate?: number | null;
5
- isFavorite?: boolean;
6
- studentId?: number;
7
- flag?: string;
8
- }
9
2
  interface STUDENT {
10
3
  email: string;
11
4
  gradeLevel: string;
@@ -14,7 +7,7 @@ interface STUDENT {
14
7
  actionScore: number;
15
8
  }
16
9
  interface PROPS_FILTER {
17
- filters?: FILTER;
10
+ filters?: any;
18
11
  handleChangeStartDate?: Function;
19
12
  handleChangeEndDate?: Function;
20
13
  handleChangeInputSearch?: Function;
@@ -35,7 +28,11 @@ interface PROPS_FILTER {
35
28
  academicOption?: any;
36
29
  handleChangeAcademicYear?: Function;
37
30
  valueAcademicYear?: object;
31
+ onChangeGrade?: Function;
38
32
  handleDownloadCsv?: any;
33
+ onChangeOptionDate?: Function;
34
+ renderOption?: string;
35
+ isSelectMulti?: boolean;
39
36
  }
40
- declare const CustomFilterComponent: ({ filters, handleChangeStartDate, handleChangeEndDate, handleChangeInputSearch, inputSearch, isShowSelectRight, handleChangeStatus, placeholderSearch, handleSelectFavorite, studentList, onSelectStudent, toggleKeyCustom, handleToggleCustom, toggleContentCustom, optionCustomSelect, handleChangeCustomSelect, surveyOptions, handleChangeSurveyOption, academicOption, handleChangeAcademicYear, valueAcademicYear, handleDownloadCsv }: PROPS_FILTER) => JSX.Element;
37
+ declare const CustomFilterComponent: ({ filters, handleChangeStartDate, handleChangeEndDate, handleChangeInputSearch, inputSearch, isShowSelectRight, handleChangeStatus, placeholderSearch, handleSelectFavorite, studentList, onSelectStudent, toggleKeyCustom, handleToggleCustom, toggleContentCustom, optionCustomSelect, handleChangeCustomSelect, surveyOptions, handleChangeSurveyOption, academicOption, handleChangeAcademicYear, valueAcademicYear, handleDownloadCsv, onChangeGrade, onChangeOptionDate, renderOption, isSelectMulti, }: PROPS_FILTER) => JSX.Element;
41
38
  export default CustomFilterComponent;
@@ -2,13 +2,23 @@ interface FILTER {
2
2
  startDate?: number | null;
3
3
  endDate?: number | null;
4
4
  isFavorite?: boolean;
5
+ studentId?: number;
6
+ flag?: string;
7
+ optionDate?: string;
8
+ }
9
+ interface STUDENT {
10
+ email: string;
11
+ gradeLevel: string;
12
+ id: number;
13
+ studentName: string;
14
+ actionScore: number;
5
15
  }
6
16
  interface PROPS_FILTER {
7
17
  filters?: FILTER;
8
18
  handleChangeStartDate?: Function;
9
19
  handleChangeEndDate?: Function;
10
20
  handleChangeInputSearch: Function;
11
- inputSearch: any;
21
+ inputSearch?: any;
12
22
  isShowSelectRight?: boolean;
13
23
  handleChangeStatus?: Function;
14
24
  placeholderSearch?: string;
@@ -23,6 +33,13 @@ interface PROPS_FILTER {
23
33
  toggleContentCustom?: string;
24
34
  handleToggleCustom?: Function;
25
35
  handleDownloadCsv?: any;
36
+ onChangeGrade?: Function;
37
+ onChangeOptionDate?: Function;
38
+ renderOption?: string;
39
+ isSelectMulti?: boolean;
40
+ studentList?: STUDENT[];
41
+ onSelectStudent?: Function;
42
+ isDetailSurvey?: boolean;
26
43
  }
27
- declare const CustomFilterMobile: ({ filters, handleChangeStartDate, handleChangeEndDate, handleChangeInputSearch, inputSearch, handleChangeStatus, placeholderSearch, handleSelectFavorite, onShowFilter, isShowFilter, isShowCalendar, onShowFilterCalendar, optionCustomSelect, handleChangeCustomSelect, toggleKeyCustom, toggleContentCustom, handleToggleCustom, handleDownloadCsv }: PROPS_FILTER) => JSX.Element;
44
+ declare const CustomFilterMobile: ({ filters, handleChangeStartDate, handleChangeEndDate, handleChangeInputSearch, inputSearch, handleChangeStatus, placeholderSearch, handleSelectFavorite, onShowFilter, isShowFilter, isShowCalendar, onShowFilterCalendar, optionCustomSelect, handleChangeCustomSelect, toggleKeyCustom, toggleContentCustom, handleToggleCustom, handleDownloadCsv, onChangeGrade, onChangeOptionDate, renderOption, isSelectMulti, studentList, onSelectStudent, isDetailSurvey }: PROPS_FILTER) => JSX.Element;
28
45
  export default CustomFilterMobile;
@@ -31,6 +31,7 @@ export interface IChat {
31
31
  text?: string;
32
32
  time: string;
33
33
  isUser: boolean;
34
+ isSystem?: boolean;
34
35
  options?: string[];
35
36
  }
36
37
  export interface IPrompt {
@@ -16,6 +16,7 @@ export declare const shareSurvey: (data: any) => void;
16
16
  export declare const importCsv: (formData: FormData) => Promise<import("axios").AxiosResponse<any>>;
17
17
  export declare const downloadTemplateFile: () => Promise<import("axios").AxiosResponse<any>>;
18
18
  export declare const updateSurvey: (surveyId: number, model: any) => Promise<import("axios").AxiosResponse<any>>;
19
+ export declare const publishSurvey: (surveyId: number) => Promise<import("axios").AxiosResponse<any>>;
19
20
  export declare const deleteSurvey: (surveyId: number) => Promise<import("axios").AxiosResponse<any>>;
20
21
  export declare const getListExternal: (surveyId: number, params: any) => Promise<import("axios").AxiosResponse<any>>;
21
22
  export declare const getListQuestionSurvey: (surveyId: number) => Promise<import("axios").AxiosResponse<any>>;
@@ -25,9 +26,9 @@ export declare const getDashboardFlagSurvey: (filters: FILTER_OVERVIEW_SURVEY) =
25
26
  export declare const getDashboardTemplateSurvey: (filters: FILTER_OVERVIEW_SURVEY) => Promise<import("axios").AxiosResponse<any>>;
26
27
  export declare const getSurveysExport: (filter: FILTER_SURVEY) => Promise<import("axios").AxiosResponse<any>>;
27
28
  export declare const getStudentSurveysExport: (surveyId: number) => Promise<import("axios").AxiosResponse<any>>;
28
- export declare const getRatingsOfQuestions: (surveyId: number) => Promise<import("axios").AxiosResponse<any>>;
29
- export declare const getTotalByQuestion: (surveyId: number, questionId: number) => Promise<import("axios").AxiosResponse<any>>;
30
- export declare const getResponsesDistribution: (surveyId: number) => Promise<import("axios").AxiosResponse<any>>;
29
+ export declare const getRatingsOfQuestions: (surveyId: number, params: any) => Promise<import("axios").AxiosResponse<any>>;
30
+ export declare const getTotalByQuestion: (surveyId: number, params: any) => Promise<import("axios").AxiosResponse<any>>;
31
+ export declare const getResponsesDistribution: (surveyId: number, params: any) => Promise<import("axios").AxiosResponse<any>>;
31
32
  export declare const getAllTeachers: (studentUserId?: string | undefined) => Promise<import("axios").AxiosResponse<any>>;
32
33
  export declare const getRatingLabelSurvey: (isAdmin?: boolean | undefined) => Promise<import("axios").AxiosResponse<any>>;
33
- export declare const getAnswerChart: (surveyId: number, isQuestionDropDown: boolean) => Promise<import("axios").AxiosResponse<any>>;
34
+ export declare const getAnswerChart: (surveyId: number, params: any) => Promise<import("axios").AxiosResponse<any>>;
@@ -1,3 +1,3 @@
1
1
  import { CARD_ITEM_PROPS } from "../../configs/typeCardItem";
2
- declare const CardSurveyMobile: ({ surveyName, students, status, id, statusDetail, avatar, customItemName, customItemIcon, colorStatusDetail, customIconStatus, handleClickAction }: CARD_ITEM_PROPS) => JSX.Element;
2
+ declare const CardSurveyMobile: ({ surveyName, students, status, id, statusDetail, avatar, customItemName, customItemIcon, colorStatusDetail, customIconStatus, handleClickAction, isDraft }: CARD_ITEM_PROPS) => JSX.Element;
3
3
  export default CardSurveyMobile;
@@ -1,4 +1,4 @@
1
- import { IStudentByAge, ITopMostSurveyUsed, FlagTab, FilterStudentFlag } from "./types";
1
+ import { IStudentByAge, ITopMostSurveyUsed, FlagTab, FilterStudentFlag, GRADES_OPTION } from "./types";
2
2
  import { IAnswer } from "./questionModelType";
3
3
  export declare const colors: string[];
4
4
  export declare const INITIAL_BEST_FRIENDS: {
@@ -20,6 +20,8 @@ export declare const LEARNING_STRATEGY_INIT: {
20
20
  learningStrategies: never[];
21
21
  };
22
22
  export declare const GRAGE_DEFAULT: string[];
23
+ export declare const GRADE_DEFAULT_SURVEY: string[];
24
+ export declare const GRADE_SURVEY: GRADES_OPTION[];
23
25
  export declare const INITIAl_COLUNM_CHART_AND_PERCENT: {
24
26
  overviewQuestionChoice: never[];
25
27
  type: string;
@@ -14,4 +14,5 @@ export interface CARD_ITEM_PROPS {
14
14
  customItemIcon?: HTMLProps<HTMLButtonElement>;
15
15
  customIconStatus?: HTMLProps<HTMLButtonElement>;
16
16
  handleClickAction?: any;
17
+ isDraft?: boolean;
17
18
  }
@@ -1,4 +1,5 @@
1
- import { ISeries } from "../../Dashboard/configs/types";
1
+ import { IFilter, Student } from "../../../utils/type";
2
+ import { ISeries, IShowByLabelBox } from "../../Dashboard/configs/types";
2
3
  import { QuestionSummarizeType } from "../../ExternalSurvey/constant/types";
3
4
  import { QuestionType } from "./constants";
4
5
  import { QUESTION_ADDITIONAL } from "./questionModelType";
@@ -298,6 +299,7 @@ export interface SURVEY_LIST {
298
299
  createdBy: string;
299
300
  studentIds?: number[];
300
301
  anonymousKey: string;
302
+ isDraft: boolean;
301
303
  }
302
304
  export interface FILTER_OVERVIEW_SURVEY {
303
305
  startDate: number;
@@ -330,6 +332,17 @@ export interface FILTER_SURVEY {
330
332
  isSchedule?: boolean;
331
333
  flag?: string;
332
334
  isMyFavorite?: boolean;
335
+ grade?: string[];
336
+ optionDate?: string;
337
+ studentId?: number;
338
+ }
339
+ export interface FILTER_SURVEY_DETAIL {
340
+ searchString?: string;
341
+ startDate?: number | null;
342
+ endDate?: number | null;
343
+ grade?: string[];
344
+ optionDate?: string;
345
+ studentId?: number;
333
346
  }
334
347
  export interface SURVEY_RESPONSE {
335
348
  currentPage: number;
@@ -589,6 +602,7 @@ export interface FORM_SURVEY {
589
602
  studentIds: number[];
590
603
  staffIds: string[];
591
604
  summarizeQuestions: QuestionSummarizeType[];
605
+ id?: number;
592
606
  }
593
607
  export interface STUDENT_SURVEY {
594
608
  email: string;
@@ -628,6 +642,7 @@ export interface HOOK_FAVORITE_PROPS {
628
642
  handleresetFilterStudent?: Function;
629
643
  handleresetFilterStaff?: Function;
630
644
  students?: STUDENT_SURVEY_RESPONSE;
645
+ favoriteId?: number;
631
646
  }
632
647
  export interface STAFF_SURVEY {
633
648
  email: string;
@@ -830,4 +845,38 @@ export interface IBarChartQuestion {
830
845
  templateName: string;
831
846
  studentAnswers: IStudentAnswers[];
832
847
  }
848
+ export interface ILabelBoxSurvey {
849
+ calendar: ICalenDarLabelBox;
850
+ calendarTime?: ICalendarTimeLabelBox;
851
+ gender: IGenderLabelBox;
852
+ grade: [string];
853
+ bandScore: number;
854
+ favoriteSurvey?: number;
855
+ academicYearId: number;
856
+ showBy?: IShowByLabelBox;
857
+ }
858
+ export interface PROPS_FILTERS_COMPONENT_SURVEY {
859
+ teacherId?: number;
860
+ studentUserId?: string;
861
+ studentId?: number;
862
+ teacherUserId?: string;
863
+ studentDefault?: Student;
864
+ handleChangeLastYear?: Function;
865
+ filter?: DashboardFilter;
866
+ name: string;
867
+ icon: string;
868
+ handleChangeFilters: Function;
869
+ option?: any[];
870
+ defautl?: number;
871
+ onChangeFilters?: (filters: IFilter) => void;
872
+ academicYearId?: number;
873
+ btnStyle?: any;
874
+ changeCurrentTeacherUserId?: (userId: string) => void;
875
+ setLabelBox: Function;
876
+ labelBox: ILabelBoxSurvey;
877
+ }
878
+ export interface GRADES_OPTION {
879
+ label: string;
880
+ value: string;
881
+ }
833
882
  export {};
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { PROPS_FILTERS_COMPONENT } from "../../../utils/type";
2
+ import { PROPS_FILTERS_COMPONENT_SURVEY } from "../configs/types";
3
3
  declare const useChartDatas: () => {
4
4
  user: any;
5
5
  filter: import("../configs/types").DashboardFilter;
6
- LIST_FILTERS_LEFT: PROPS_FILTERS_COMPONENT[];
7
- LIST_FILTERS_RIGHT: PROPS_FILTERS_COMPONENT[];
6
+ LIST_FILTERS_LEFT: PROPS_FILTERS_COMPONENT_SURVEY[];
7
+ LIST_FILTERS_RIGHT: PROPS_FILTERS_COMPONENT_SURVEY[];
8
8
  totalCardData: ({
9
9
  icon: string;
10
10
  title: string;
@@ -25,7 +25,7 @@ declare const useListSurveyDetail: () => {
25
25
  setOpenModelSelectTemplate: import("react").Dispatch<import("react").SetStateAction<boolean>>;
26
26
  handleInsertQuestion: () => void;
27
27
  handleToggleButtonHeader: () => boolean;
28
- handleCreateSurvey: () => Promise<void>;
28
+ handleCreateSurvey: (isDraft?: boolean | undefined) => Promise<void>;
29
29
  handleCloseModelEdit: () => void;
30
30
  setContentModelQuestion: import("react").Dispatch<import("react").SetStateAction<CONTENT_MODEL_QUESTION>>;
31
31
  handleSelectQuestion: (question: import("../configs/types").QUESTION_TEMPLATE) => void;
@@ -1,5 +1,5 @@
1
1
  import { FILTER_SURVEY, HOOK_FAVORITE_PROPS, SURVEY_RESPONSE } from "../configs/types";
2
- declare const useListFavoriteSurvey: ({ setDataFormCreateSurvey, handleresetFilterStudent, handleresetFilterStaff, students }: HOOK_FAVORITE_PROPS) => {
2
+ declare const useListFavoriteSurvey: ({ setDataFormCreateSurvey, handleresetFilterStudent, handleresetFilterStaff, students, favoriteId }: HOOK_FAVORITE_PROPS) => {
3
3
  filterFavorite: FILTER_SURVEY;
4
4
  favoriteItem: SURVEY_RESPONSE | undefined;
5
5
  handleChangeRowsPerPageFavorite: (event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { FILTER_SURVEY, SURVEY_RESPONSE, TOTAL_TYPE } from "../configs/types";
2
+ import { FILTER_SURVEY, SURVEY_LIST, SURVEY_RESPONSE, TOTAL_TYPE } from "../configs/types";
3
3
  import { TYPE_SURVEY_OPTION } from "../configs/constants";
4
4
  import { MaterialUiPickersDate } from "@material-ui/pickers/typings/date";
5
5
  declare const useListSurvey: (pageSize?: number | undefined) => {
6
- itemSelectedId: number;
6
+ itemSelected: SURVEY_LIST | null;
7
7
  itemSelectedStudentId: number;
8
8
  changeFilters: (updatedFilters: any) => void;
9
9
  filters: FILTER_SURVEY;
@@ -32,7 +32,7 @@ declare const useListSurvey: (pageSize?: number | undefined) => {
32
32
  anchorEl: HTMLButtonElement | null;
33
33
  popoverId: string | undefined;
34
34
  openPopover: boolean;
35
- handleClickAction: (event: React.MouseEvent<HTMLButtonElement>, id: number, studentId?: number | undefined) => void;
35
+ handleClickAction: (event: React.MouseEvent<HTMLButtonElement>, survey: SURVEY_LIST, studentId?: number | undefined) => void;
36
36
  handleCloseAction: () => void;
37
37
  handleDownloadCsv: () => void;
38
38
  handleDownloadCsvSurvey: (id: number) => void;
@@ -47,5 +47,11 @@ declare const useListSurvey: (pageSize?: number | undefined) => {
47
47
  goToTemplateSurvey: () => void;
48
48
  goToDashboardSurvey: () => void;
49
49
  goToSurveyList: () => void;
50
+ handleChangeGrade: (grade: string[]) => void;
51
+ onChangeOptionDate: (option: string) => void;
52
+ dataStudents: never[];
53
+ handleChangeStudent: (studentId?: number | undefined) => void;
54
+ onEditSurvey: (id: number) => void;
55
+ handlePublishSurvey: (surveyId: any) => Promise<void>;
50
56
  };
51
57
  export default useListSurvey;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { DETAIL, IBarChartQuestion, IQuestionDto, IQuestionResponse, IStudentDetail, IStudentQuestionResponse, STUDENT_SURVEY_DETAIL } from "../configs/types";
2
+ import { DETAIL, FILTER_SURVEY_DETAIL, IBarChartQuestion, IQuestionDto, IQuestionResponse, IStudentDetail, IStudentQuestionResponse, STUDENT_SURVEY_DETAIL } from "../configs/types";
3
3
  import { IReadinessToLearning } from "../../MyStudent/components/NewOverview/Chat/types/types";
4
+ import { MaterialUiPickersDate } from "@material-ui/pickers/typings/date";
4
5
  declare const useSurveyDetail: () => {
5
6
  detailSurvey: DETAIL | null | undefined;
6
7
  onHandleGoBack: () => void;
@@ -56,5 +57,18 @@ declare const useSurveyDetail: () => {
56
57
  categoryDropdownOptions: string[];
57
58
  categoryDropdownChose: string;
58
59
  setCategoryDropdownChose: import("react").Dispatch<import("react").SetStateAction<string>>;
60
+ filters: FILTER_SURVEY_DETAIL;
61
+ handleChangeEndDate: (date: MaterialUiPickersDate | null) => void;
62
+ handleChangeStartDate: (date: MaterialUiPickersDate | null) => void;
63
+ handleChangeGrade: (grade: string[]) => void;
64
+ onChangeOptionDate: (option: string) => void;
65
+ handleChangeInputSearch: (event: React.ChangeEvent<HTMLInputElement>) => void;
66
+ inputSearch: import("react").MutableRefObject<any>;
67
+ handleChangeStudent: (studentId?: number | undefined) => void;
68
+ dataStudentSurvey: never[];
69
+ isShowFilter: boolean;
70
+ handleShowFilter: () => void;
71
+ isShowFilterCalendar: boolean;
72
+ handleShowFilterCalendar: () => void;
59
73
  };
60
74
  export default useSurveyDetail;
package/dist/index.css CHANGED
@@ -167,13 +167,13 @@ tbody._b-AXV tr {
167
167
  max-width: 218px;
168
168
  }
169
169
 
170
- ._1cx7c > input {
170
+ ._1cx7c>input {
171
171
  border: none;
172
172
  outline: none;
173
173
  box-shadow: none;
174
174
  }
175
175
 
176
- ._1cx7c > input:focus {
176
+ ._1cx7c>input:focus {
177
177
  outline: none;
178
178
  box-shadow: none;
179
179
  }
@@ -1366,6 +1366,20 @@ tbody._b-AXV tr {
1366
1366
  }
1367
1367
  }
1368
1368
 
1369
+ @media (max-width: 767px) {
1370
+ ._3QFAQ {
1371
+ height: auto;
1372
+ flex-direction: column;
1373
+ border-radius: 8px;
1374
+ width: auto;
1375
+ border: none;
1376
+ }
1377
+
1378
+ ._37Lm- {
1379
+ padding: 20px;
1380
+ }
1381
+ }
1382
+
1369
1383
  /* CSS */
1370
1384
  ._3m2ZU input::-webkit-calendar-picker-indicator {
1371
1385
  display: none;
@@ -1416,6 +1430,7 @@ datalist option:focus {
1416
1430
  height: 40px;
1417
1431
 
1418
1432
  }
1433
+
1419
1434
  ._G7wNn {
1420
1435
  font-size: 18px;
1421
1436
  margin-right: 8px;
@@ -5154,6 +5169,11 @@ h6._3zOGW {
5154
5169
  color: #242424 !important;
5155
5170
  }
5156
5171
 
5172
+ ._32Wr6._5PwwG {
5173
+ background: #EEE8A9 !important;
5174
+ color: #242424 !important;
5175
+ }
5176
+
5157
5177
  ._2WxS_ {
5158
5178
  padding: 4px 20px !important;
5159
5179
  border-radius: 70px;
@@ -12975,6 +12995,13 @@ p._1YLGi {
12975
12995
  border-radius: 12px;
12976
12996
  height: 50px;
12977
12997
  width: 100%; }
12998
+ @media (max-width: 767px) {
12999
+ ._1SOsh {
13000
+ height: auto;
13001
+ flex-direction: column;
13002
+ padding: 8px;
13003
+ border-radius: 8px;
13004
+ width: auto; } }
12978
13005
  ._1SOsh ._Od6MC {
12979
13006
  position: absolute;
12980
13007
  left: 10px;