mario-education 2.4.515-release → 2.4.516-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,12 +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
- optionDate?: string;
9
- }
10
2
  interface STUDENT {
11
3
  email: string;
12
4
  gradeLevel: string;
@@ -15,7 +7,7 @@ interface STUDENT {
15
7
  actionScore: number;
16
8
  }
17
9
  interface PROPS_FILTER {
18
- filters?: FILTER;
10
+ filters?: any;
19
11
  handleChangeStartDate?: Function;
20
12
  handleChangeEndDate?: Function;
21
13
  handleChangeInputSearch?: Function;
@@ -40,6 +32,7 @@ interface PROPS_FILTER {
40
32
  handleDownloadCsv?: any;
41
33
  onChangeOptionDate?: Function;
42
34
  renderOption?: string;
35
+ isSelectMulti?: boolean;
43
36
  }
44
- 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 }: 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;
45
38
  export default CustomFilterComponent;
@@ -2,14 +2,23 @@ interface FILTER {
2
2
  startDate?: number | null;
3
3
  endDate?: number | null;
4
4
  isFavorite?: boolean;
5
+ studentId?: number;
6
+ flag?: string;
5
7
  optionDate?: string;
6
8
  }
9
+ interface STUDENT {
10
+ email: string;
11
+ gradeLevel: string;
12
+ id: number;
13
+ studentName: string;
14
+ actionScore: number;
15
+ }
7
16
  interface PROPS_FILTER {
8
17
  filters?: FILTER;
9
18
  handleChangeStartDate?: Function;
10
19
  handleChangeEndDate?: Function;
11
20
  handleChangeInputSearch: Function;
12
- inputSearch: any;
21
+ inputSearch?: any;
13
22
  isShowSelectRight?: boolean;
14
23
  handleChangeStatus?: Function;
15
24
  placeholderSearch?: string;
@@ -27,6 +36,10 @@ interface PROPS_FILTER {
27
36
  onChangeGrade?: Function;
28
37
  onChangeOptionDate?: Function;
29
38
  renderOption?: string;
39
+ isSelectMulti?: boolean;
40
+ studentList?: STUDENT[];
41
+ onSelectStudent?: Function;
42
+ isDetailSurvey?: boolean;
30
43
  }
31
- declare const CustomFilterMobile: ({ filters, handleChangeStartDate, handleChangeEndDate, handleChangeInputSearch, inputSearch, handleChangeStatus, placeholderSearch, handleSelectFavorite, onShowFilter, isShowFilter, isShowCalendar, onShowFilterCalendar, optionCustomSelect, handleChangeCustomSelect, toggleKeyCustom, toggleContentCustom, handleToggleCustom, handleDownloadCsv, onChangeGrade, onChangeOptionDate, renderOption }: 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;
32
45
  export default CustomFilterMobile;
@@ -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>>;
@@ -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,14 +332,15 @@ export interface FILTER_SURVEY {
330
332
  isSchedule?: boolean;
331
333
  flag?: string;
332
334
  isMyFavorite?: boolean;
333
- grade?: string;
335
+ grade?: string[];
334
336
  optionDate?: string;
337
+ studentId?: number;
335
338
  }
336
339
  export interface FILTER_SURVEY_DETAIL {
337
340
  searchString?: string;
338
341
  startDate?: number | null;
339
342
  endDate?: number | null;
340
- grade?: string;
343
+ grade?: string[];
341
344
  optionDate?: string;
342
345
  }
343
346
  export interface SURVEY_RESPONSE {
@@ -598,6 +601,7 @@ export interface FORM_SURVEY {
598
601
  studentIds: number[];
599
602
  staffIds: string[];
600
603
  summarizeQuestions: QuestionSummarizeType[];
604
+ id?: number;
601
605
  }
602
606
  export interface STUDENT_SURVEY {
603
607
  email: string;
@@ -637,6 +641,7 @@ export interface HOOK_FAVORITE_PROPS {
637
641
  handleresetFilterStudent?: Function;
638
642
  handleresetFilterStaff?: Function;
639
643
  students?: STUDENT_SURVEY_RESPONSE;
644
+ favoriteId?: number;
640
645
  }
641
646
  export interface STAFF_SURVEY {
642
647
  email: string;
@@ -839,4 +844,38 @@ export interface IBarChartQuestion {
839
844
  templateName: string;
840
845
  studentAnswers: IStudentAnswers[];
841
846
  }
847
+ export interface ILabelBoxSurvey {
848
+ calendar: ICalenDarLabelBox;
849
+ calendarTime?: ICalendarTimeLabelBox;
850
+ gender: IGenderLabelBox;
851
+ grade: [string];
852
+ bandScore: number;
853
+ favoriteSurvey?: number;
854
+ academicYearId: number;
855
+ showBy?: IShowByLabelBox;
856
+ }
857
+ export interface PROPS_FILTERS_COMPONENT_SURVEY {
858
+ teacherId?: number;
859
+ studentUserId?: string;
860
+ studentId?: number;
861
+ teacherUserId?: string;
862
+ studentDefault?: Student;
863
+ handleChangeLastYear?: Function;
864
+ filter?: DashboardFilter;
865
+ name: string;
866
+ icon: string;
867
+ handleChangeFilters: Function;
868
+ option?: any[];
869
+ defautl?: number;
870
+ onChangeFilters?: (filters: IFilter) => void;
871
+ academicYearId?: number;
872
+ btnStyle?: any;
873
+ changeCurrentTeacherUserId?: (userId: string) => void;
874
+ setLabelBox: Function;
875
+ labelBox: ILabelBoxSurvey;
876
+ }
877
+ export interface GRADES_OPTION {
878
+ label: string;
879
+ value: string;
880
+ }
842
881
  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,7 +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;
50
+ handleChangeGrade: (grade: string[]) => void;
51
51
  onChangeOptionDate: (option: string) => void;
52
+ dataStudents: never[];
53
+ handleChangeStudent: (studentId: any) => void;
54
+ onEditSurvey: (id: number) => void;
55
+ handlePublishSurvey: (surveyId: any) => Promise<void>;
52
56
  };
53
57
  export default useListSurvey;
@@ -60,9 +60,15 @@ declare const useSurveyDetail: () => {
60
60
  filters: FILTER_SURVEY_DETAIL;
61
61
  handleChangeEndDate: (date: MaterialUiPickersDate | null) => void;
62
62
  handleChangeStartDate: (date: MaterialUiPickersDate | null) => void;
63
- handleChangeGrade: (grade: string) => void;
63
+ handleChangeGrade: (grade: string[]) => void;
64
64
  onChangeOptionDate: (option: string) => void;
65
65
  handleChangeInputSearch: (event: React.ChangeEvent<HTMLInputElement>) => void;
66
66
  inputSearch: import("react").MutableRefObject<any>;
67
+ handleChangeStudent: (student: any) => void;
68
+ dataStudentSurvey: never[];
69
+ isShowFilter: boolean;
70
+ handleShowFilter: () => void;
71
+ isShowFilterCalendar: boolean;
72
+ handleShowFilterCalendar: () => void;
67
73
  };
68
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;