mario-education 2.4.520-feedback → 2.4.522-feedback

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.
@@ -50656,18 +50656,20 @@ var getSurveysExport = function getSurveysExport(filter) {
50656
50656
  var getStudentSurveysExport = function getStudentSurveysExport(surveyId) {
50657
50657
  return api.get(SURVEY_API + "/export-csv/" + surveyId);
50658
50658
  };
50659
- var getRatingsOfQuestions = function getRatingsOfQuestions(surveyId) {
50660
- return api.get(SURVEY_API + "/rating-of-questions/" + surveyId);
50659
+ var getRatingsOfQuestions = function getRatingsOfQuestions(surveyId, params) {
50660
+ return api.get(SURVEY_API + "/rating-of-questions/" + surveyId, {
50661
+ params: params
50662
+ });
50661
50663
  };
50662
- var getTotalByQuestion = function getTotalByQuestion(surveyId, questionId) {
50664
+ var getTotalByQuestion = function getTotalByQuestion(surveyId, params) {
50663
50665
  return api.get(SURVEY_API + "/total-by-question/" + surveyId, {
50664
- params: {
50665
- questionId: questionId
50666
- }
50666
+ params: params
50667
50667
  });
50668
50668
  };
50669
- var getResponsesDistribution = function getResponsesDistribution(surveyId) {
50670
- return api.get(SURVEY_API + "/responses-distribution/" + surveyId);
50669
+ var getResponsesDistribution = function getResponsesDistribution(surveyId, params) {
50670
+ return api.get(SURVEY_API + "/responses-distribution/" + surveyId, {
50671
+ params: params
50672
+ });
50671
50673
  };
50672
50674
  var getRatingLabelSurvey = function getRatingLabelSurvey(isAdmin) {
50673
50675
  return api.get(SURVEY_API + "/rating-label-survey", {
@@ -50676,11 +50678,9 @@ var getRatingLabelSurvey = function getRatingLabelSurvey(isAdmin) {
50676
50678
  }
50677
50679
  });
50678
50680
  };
50679
- var getAnswerChart = function getAnswerChart(surveyId, isQuestionDropDown) {
50681
+ var getAnswerChart = function getAnswerChart(surveyId, params) {
50680
50682
  return api.get(EXTERNAL_SURVEY + "/number-answer-question-survey/" + surveyId, {
50681
- params: {
50682
- isQuestionDropDown: isQuestionDropDown
50683
- }
50683
+ params: params
50684
50684
  });
50685
50685
  };
50686
50686
 
@@ -50884,7 +50884,9 @@ var useListSurvey = function useListSurvey(pageSize) {
50884
50884
  status: undefined,
50885
50885
  isFavorite: false,
50886
50886
  isSchedule: false,
50887
- flag: ""
50887
+ flag: "",
50888
+ grade: "",
50889
+ optionDate: ""
50888
50890
  }),
50889
50891
  filters = _useState10[0],
50890
50892
  setFilters = _useState10[1];
@@ -50926,14 +50928,16 @@ var useListSurvey = function useListSurvey(pageSize) {
50926
50928
  var handleChangeStartDate = function handleChangeStartDate(date) {
50927
50929
  changeFilters(_extends({}, filters, {
50928
50930
  startDate: date === null || date === void 0 ? void 0 : date.valueOf(),
50929
- currentPage: 1
50931
+ currentPage: 1,
50932
+ optionDate: ""
50930
50933
  }));
50931
50934
  };
50932
50935
 
50933
50936
  var handleChangeEndDate = function handleChangeEndDate(date) {
50934
50937
  changeFilters(_extends({}, filters, {
50935
50938
  endDate: date === null || date === void 0 ? void 0 : date.valueOf(),
50936
- currentPage: 1
50939
+ currentPage: 1,
50940
+ optionDate: ""
50937
50941
  }));
50938
50942
  };
50939
50943
 
@@ -50959,6 +50963,37 @@ var useListSurvey = function useListSurvey(pageSize) {
50959
50963
  }, 800);
50960
50964
  };
50961
50965
 
50966
+ var handleChangeGrade = function handleChangeGrade(grade) {
50967
+ changeFilters({
50968
+ currentPage: 1,
50969
+ grade: grade
50970
+ });
50971
+ };
50972
+
50973
+ var onChangeOptionDate = function onChangeOptionDate(option) {
50974
+ var startDate = null;
50975
+ var endDate = null;
50976
+
50977
+ switch (option.toLocaleLowerCase()) {
50978
+ case "weeks":
50979
+ startDate = moment().startOf("week").weekday(1).valueOf();
50980
+ endDate = moment().endOf("week").weekday(7).valueOf();
50981
+ break;
50982
+
50983
+ case "months":
50984
+ startDate = moment().startOf("month").valueOf();
50985
+ endDate = moment().endOf("month").valueOf();
50986
+ break;
50987
+ }
50988
+
50989
+ changeFilters(_extends({}, filters, {
50990
+ startDate: startDate,
50991
+ endDate: endDate,
50992
+ currentPage: 1,
50993
+ optionDate: option
50994
+ }));
50995
+ };
50996
+
50962
50997
  var handleChangeStatus = function handleChangeStatus(newValue) {
50963
50998
  changeFilters({
50964
50999
  currentPage: 1,
@@ -51267,7 +51302,9 @@ var useListSurvey = function useListSurvey(pageSize) {
51267
51302
  linkAnonymousSurvey: linkAnonymousSurvey,
51268
51303
  goToTemplateSurvey: goToTemplateSurvey,
51269
51304
  goToDashboardSurvey: goToDashboardSurvey,
51270
- goToSurveyList: goToSurveyList
51305
+ goToSurveyList: goToSurveyList,
51306
+ handleChangeGrade: handleChangeGrade,
51307
+ onChangeOptionDate: onChangeOptionDate
51271
51308
  };
51272
51309
  };
51273
51310
 
@@ -51410,7 +51447,10 @@ var CustomFilterComponent = function CustomFilterComponent(_ref) {
51410
51447
  academicOption = _ref.academicOption,
51411
51448
  handleChangeAcademicYear = _ref.handleChangeAcademicYear,
51412
51449
  valueAcademicYear = _ref.valueAcademicYear,
51413
- handleDownloadCsv = _ref.handleDownloadCsv;
51450
+ handleDownloadCsv = _ref.handleDownloadCsv,
51451
+ onChangeGrade = _ref.onChangeGrade,
51452
+ onChangeOptionDate = _ref.onChangeOptionDate,
51453
+ _renderOption = _ref.renderOption;
51414
51454
 
51415
51455
  var _useTranslation = useTranslation$1(),
51416
51456
  t = _useTranslation.t;
@@ -51427,7 +51467,29 @@ var CustomFilterComponent = function CustomFilterComponent(_ref) {
51427
51467
  className: "" + styles["box-filter-left"]
51428
51468
  }, React__default.createElement(MuiPickersUtilsProvider, {
51429
51469
  utils: MomentUtils
51430
- }, !!handleChangeStartDate && React__default.createElement(KeyboardDatePicker, {
51470
+ }, !!onChangeOptionDate && React__default.createElement(Autocomplete$1, {
51471
+ fullWidth: true,
51472
+ classes: {
51473
+ popper: classes.popper
51474
+ },
51475
+ id: "combo-box-demo",
51476
+ options: ["Weeks", "Months"],
51477
+ className: "" + styles["filter-item"],
51478
+ getOptionLabel: function getOptionLabel(option) {
51479
+ return option;
51480
+ },
51481
+ defaultValue: undefined,
51482
+ value: (filters === null || filters === void 0 ? void 0 : filters.optionDate) || null,
51483
+ onChange: function onChange(_e, newValue) {
51484
+ return onChangeOptionDate(newValue || "");
51485
+ },
51486
+ renderInput: function renderInput(params) {
51487
+ return React__default.createElement(TextField, Object.assign({}, params, {
51488
+ label: t("filter_calendar"),
51489
+ variant: "outlined"
51490
+ }));
51491
+ }
51492
+ }), !!handleChangeStartDate && React__default.createElement(KeyboardDatePicker, {
51431
51493
  fullWidth: true,
51432
51494
  inputVariant: "outlined",
51433
51495
  format: "Do MMM YYYY",
@@ -51520,6 +51582,29 @@ var CustomFilterComponent = function CustomFilterComponent(_ref) {
51520
51582
  variant: "outlined"
51521
51583
  }));
51522
51584
  }
51585
+ }), !!onChangeGrade && React__default.createElement(Autocomplete$1, {
51586
+ fullWidth: true,
51587
+ classes: {
51588
+ popper: classes.popper
51589
+ },
51590
+ id: "combo-box-demo",
51591
+ options: GRAGE_DEFAULT$1,
51592
+ className: "" + styles["filter-item"],
51593
+ getOptionLabel: function getOptionLabel(option) {
51594
+ return option;
51595
+ },
51596
+ renderOption: function renderOption(option) {
51597
+ return React__default.createElement(Typography, null, "" + option + (_renderOption || ""));
51598
+ },
51599
+ onChange: function onChange(_e, newValue) {
51600
+ return onChangeGrade === null || onChangeGrade === void 0 ? void 0 : onChangeGrade(newValue || "");
51601
+ },
51602
+ renderInput: function renderInput(params) {
51603
+ return React__default.createElement(TextField, Object.assign({}, params, {
51604
+ label: t("grade"),
51605
+ variant: "outlined"
51606
+ }));
51607
+ }
51523
51608
  }), !!surveyOptions && React__default.createElement(Autocomplete$1, {
51524
51609
  fullWidth: true,
51525
51610
  classes: {
@@ -51657,7 +51742,10 @@ var CustomFilterMobile = function CustomFilterMobile(_ref) {
51657
51742
  toggleKeyCustom = _ref.toggleKeyCustom,
51658
51743
  toggleContentCustom = _ref.toggleContentCustom,
51659
51744
  handleToggleCustom = _ref.handleToggleCustom,
51660
- handleDownloadCsv = _ref.handleDownloadCsv;
51745
+ handleDownloadCsv = _ref.handleDownloadCsv,
51746
+ onChangeGrade = _ref.onChangeGrade,
51747
+ onChangeOptionDate = _ref.onChangeOptionDate,
51748
+ _renderOption = _ref.renderOption;
51661
51749
 
51662
51750
  var _useTranslation = useTranslation$1(),
51663
51751
  t = _useTranslation.t;
@@ -51701,7 +51789,26 @@ var CustomFilterMobile = function CustomFilterMobile(_ref) {
51701
51789
  "in": isShowCalendar
51702
51790
  }, React__default.createElement(MuiPickersUtilsProvider, {
51703
51791
  utils: MomentUtils
51704
- }, !!handleChangeStartDate && React__default.createElement(KeyboardDatePicker, {
51792
+ }, !!onChangeOptionDate && React__default.createElement(Autocomplete$1, {
51793
+ fullWidth: true,
51794
+ id: "combo-box-demo",
51795
+ options: ["Weeks", "Months"],
51796
+ className: styles["filter-item"] + " " + styles["space-item"],
51797
+ getOptionLabel: function getOptionLabel(option) {
51798
+ return option;
51799
+ },
51800
+ defaultValue: undefined,
51801
+ value: (filters === null || filters === void 0 ? void 0 : filters.optionDate) || null,
51802
+ onChange: function onChange(_e, newValue) {
51803
+ return onChangeOptionDate(newValue || "");
51804
+ },
51805
+ renderInput: function renderInput(params) {
51806
+ return React__default.createElement(TextField, Object.assign({}, params, {
51807
+ label: t("filter_calendar"),
51808
+ variant: "outlined"
51809
+ }));
51810
+ }
51811
+ }), !!handleChangeStartDate && React__default.createElement(KeyboardDatePicker, {
51705
51812
  fullWidth: true,
51706
51813
  inputVariant: "outlined",
51707
51814
  format: "Do MMM YYYY",
@@ -51768,6 +51875,26 @@ var CustomFilterMobile = function CustomFilterMobile(_ref) {
51768
51875
  variant: "outlined"
51769
51876
  }));
51770
51877
  }
51878
+ }), !!onChangeGrade && React__default.createElement(Autocomplete$1, {
51879
+ fullWidth: true,
51880
+ id: "combo-box-demo",
51881
+ options: GRAGE_DEFAULT$1,
51882
+ className: styles["filter-item"] + " " + styles["space-item"],
51883
+ getOptionLabel: function getOptionLabel(option) {
51884
+ return option;
51885
+ },
51886
+ onChange: function onChange(_e, newValue) {
51887
+ return onChangeGrade === null || onChangeGrade === void 0 ? void 0 : onChangeGrade(newValue || "");
51888
+ },
51889
+ renderOption: function renderOption(option) {
51890
+ return React__default.createElement(Typography, null, "" + option + (_renderOption || ""));
51891
+ },
51892
+ renderInput: function renderInput(params) {
51893
+ return React__default.createElement(TextField, Object.assign({}, params, {
51894
+ label: t("grade"),
51895
+ variant: "outlined"
51896
+ }));
51897
+ }
51771
51898
  }), !!handleSelectFavorite && React__default.createElement("div", {
51772
51899
  className: styles["btn-favorite-text"] + " " + styles["space-item"]
51773
51900
  }, React__default.createElement(Checkbox, {
@@ -52163,7 +52290,9 @@ var ListSurveys = function ListSurveys() {
52163
52290
  anonymousKey = _useListSurvey.anonymousKey,
52164
52291
  handleCloseModelLink = _useListSurvey.handleCloseModelLink,
52165
52292
  handleCopyToClipboard = _useListSurvey.handleCopyToClipboard,
52166
- linkAnonymousSurvey = _useListSurvey.linkAnonymousSurvey;
52293
+ linkAnonymousSurvey = _useListSurvey.linkAnonymousSurvey,
52294
+ handleChangeGrade = _useListSurvey.handleChangeGrade,
52295
+ onChangeOptionDate = _useListSurvey.onChangeOptionDate;
52167
52296
 
52168
52297
  var _useFontStyles = useFontStyles(),
52169
52298
  classFontSize = _useFontStyles.classFontSize,
@@ -52213,7 +52342,9 @@ var ListSurveys = function ListSurveys() {
52213
52342
  toggleContentCustom: "session_scheduled",
52214
52343
  optionCustomSelect: flagSurveyOptions,
52215
52344
  handleChangeCustomSelect: handleChangeFlag,
52216
- handleDownloadCsv: handleDownloadCsv
52345
+ handleDownloadCsv: handleDownloadCsv,
52346
+ onChangeGrade: handleChangeGrade,
52347
+ onChangeOptionDate: onChangeOptionDate
52217
52348
  })), React__default.createElement(Grid, {
52218
52349
  className: "" + styles$6["filter-mobile"]
52219
52350
  }, React__default.createElement(CustomFilterMobile, {
@@ -52233,7 +52364,9 @@ var ListSurveys = function ListSurveys() {
52233
52364
  toggleContentCustom: "session_scheduled",
52234
52365
  optionCustomSelect: flagSurveyOptions,
52235
52366
  handleChangeCustomSelect: handleChangeFlag,
52236
- handleDownloadCsv: handleDownloadCsv
52367
+ handleDownloadCsv: handleDownloadCsv,
52368
+ onChangeGrade: handleChangeGrade,
52369
+ onChangeOptionDate: onChangeOptionDate
52237
52370
  }))), React__default.createElement(Grid, {
52238
52371
  className: styles$6["table-desktop"] + " " + styles$6["filter-desktop"] + " pb-5"
52239
52372
  }, React__default.createElement(Grid, {
@@ -52653,6 +52786,84 @@ var useSurveyDetail = function useSurveyDetail() {
52653
52786
  openIndexField = _useState24[0],
52654
52787
  setOpenIndexField = _useState24[1];
52655
52788
 
52789
+ var inputSearch = useRef(null);
52790
+
52791
+ var _useState25 = useState({
52792
+ searchString: "",
52793
+ startDate: null,
52794
+ endDate: null,
52795
+ grade: "",
52796
+ optionDate: ""
52797
+ }),
52798
+ filters = _useState25[0],
52799
+ setFilters = _useState25[1];
52800
+
52801
+ var changeFilters = function changeFilters(updatedFilters) {
52802
+ return setFilters(_extends({}, filters, updatedFilters));
52803
+ };
52804
+
52805
+ var handleChangeStartDate = function handleChangeStartDate(date) {
52806
+ changeFilters(_extends({}, filters, {
52807
+ startDate: date === null || date === void 0 ? void 0 : date.valueOf(),
52808
+ currentPage: 1,
52809
+ optionDate: ""
52810
+ }));
52811
+ };
52812
+
52813
+ var handleChangeEndDate = function handleChangeEndDate(date) {
52814
+ changeFilters(_extends({}, filters, {
52815
+ endDate: date === null || date === void 0 ? void 0 : date.valueOf(),
52816
+ currentPage: 1,
52817
+ optionDate: ""
52818
+ }));
52819
+ };
52820
+
52821
+ var handleChangeGrade = function handleChangeGrade(grade) {
52822
+ changeFilters({
52823
+ currentPage: 1,
52824
+ grade: grade
52825
+ });
52826
+ };
52827
+
52828
+ var onChangeOptionDate = function onChangeOptionDate(option) {
52829
+ var startDate = null;
52830
+ var endDate = null;
52831
+
52832
+ switch (option.toLocaleLowerCase()) {
52833
+ case "weeks":
52834
+ startDate = moment().startOf("week").weekday(1).valueOf();
52835
+ endDate = moment().endOf("week").weekday(7).valueOf();
52836
+ break;
52837
+
52838
+ case "months":
52839
+ startDate = moment().startOf("month").valueOf();
52840
+ endDate = moment().endOf("month").valueOf();
52841
+ break;
52842
+ }
52843
+
52844
+ changeFilters(_extends({}, filters, {
52845
+ startDate: startDate,
52846
+ endDate: endDate,
52847
+ currentPage: 1,
52848
+ optionDate: option
52849
+ }));
52850
+ };
52851
+
52852
+ var handleChangeInputSearch = function handleChangeInputSearch(event) {
52853
+ var inputValue = event.target.value;
52854
+
52855
+ if (!!inputSearch.current) {
52856
+ clearTimeout(inputSearch.current);
52857
+ }
52858
+
52859
+ inputSearch.current = setTimeout(function () {
52860
+ changeFilters({
52861
+ searchString: inputValue,
52862
+ currentPage: 1
52863
+ });
52864
+ }, 800);
52865
+ };
52866
+
52656
52867
  useEffect(function () {
52657
52868
  var cate = Array.from(new Set(textInputQuestions.map(function (d) {
52658
52869
  return d.templateName;
@@ -52683,25 +52894,25 @@ var useSurveyDetail = function useSurveyDetail() {
52683
52894
  }
52684
52895
  };
52685
52896
 
52686
- var _useState25 = useState(''),
52687
- categoryRatingChose = _useState25[0],
52688
- setCategoryRatingChose = _useState25[1];
52897
+ var _useState26 = useState(''),
52898
+ categoryRatingChose = _useState26[0],
52899
+ setCategoryRatingChose = _useState26[1];
52689
52900
 
52690
- var _useState26 = useState([]),
52691
- questionRatingSelected = _useState26[0],
52692
- setQuestionRatingSelected = _useState26[1];
52901
+ var _useState27 = useState([]),
52902
+ questionRatingSelected = _useState27[0],
52903
+ setQuestionRatingSelected = _useState27[1];
52693
52904
 
52694
- var _useState27 = useState(''),
52695
- categoryRatingResponseChose = _useState27[0],
52696
- setCategoryRatingResponseChose = _useState27[1];
52905
+ var _useState28 = useState(''),
52906
+ categoryRatingResponseChose = _useState28[0],
52907
+ setCategoryRatingResponseChose = _useState28[1];
52697
52908
 
52698
- var _useState28 = useState([]),
52699
- categoriesOptions = _useState28[0],
52700
- setCategoriesOptions = _useState28[1];
52909
+ var _useState29 = useState([]),
52910
+ categoriesOptions = _useState29[0],
52911
+ setCategoriesOptions = _useState29[1];
52701
52912
 
52702
- var _useState29 = useState(null),
52703
- questionRatingResponseSelected = _useState29[0],
52704
- setQuestionRatingResponseSelected = _useState29[1];
52913
+ var _useState30 = useState(null),
52914
+ questionRatingResponseSelected = _useState30[0],
52915
+ setQuestionRatingResponseSelected = _useState30[1];
52705
52916
 
52706
52917
  useEffect(function () {
52707
52918
  setCategoryRatingResponseChose(categoriesOptions[0]);
@@ -52715,13 +52926,13 @@ var useSurveyDetail = function useSurveyDetail() {
52715
52926
  }
52716
52927
  }, [ratingQuestions, categoriesOptions]);
52717
52928
 
52718
- var _useState30 = useState(''),
52719
- categoryDropdownChose = _useState30[0],
52720
- setCategoryDropdownChose = _useState30[1];
52929
+ var _useState31 = useState(''),
52930
+ categoryDropdownChose = _useState31[0],
52931
+ setCategoryDropdownChose = _useState31[1];
52721
52932
 
52722
- var _useState31 = useState([]),
52723
- categoryDropdownOptions = _useState31[0],
52724
- setCategoryDropdownOptions = _useState31[1];
52933
+ var _useState32 = useState([]),
52934
+ categoryDropdownOptions = _useState32[0],
52935
+ setCategoryDropdownOptions = _useState32[1];
52725
52936
 
52726
52937
  useEffect(function () {
52727
52938
  var cate = Array.from(new Set(barChartQuestions.map(function (d) {
@@ -52924,7 +53135,7 @@ var useSurveyDetail = function useSurveyDetail() {
52924
53135
  dispatch(setLoading(true));
52925
53136
 
52926
53137
  var _temp12 = _catch(function () {
52927
- return Promise.resolve(getRatingsOfQuestions(parseInt(id))).then(function (res) {
53138
+ return Promise.resolve(getRatingsOfQuestions(parseInt(id), filters)).then(function (res) {
52928
53139
  var ratingQuestions = res.data || [];
52929
53140
  var questionRemoveTags = ratingQuestions.questions.map(function (r) {
52930
53141
  return {
@@ -52986,7 +53197,7 @@ var useSurveyDetail = function useSurveyDetail() {
52986
53197
  } catch (e) {
52987
53198
  return Promise.reject(e);
52988
53199
  }
52989
- }, [id, studentDetail]);
53200
+ }, [id, studentDetail, filters]);
52990
53201
  var handleGetTotalByQuestion = useCallback(function (questionId) {
52991
53202
  try {
52992
53203
  var _temp15 = function _temp15() {
@@ -52996,7 +53207,9 @@ var useSurveyDetail = function useSurveyDetail() {
52996
53207
  dispatch(setLoading(true));
52997
53208
 
52998
53209
  var _temp16 = _catch(function () {
52999
- return Promise.resolve(getTotalByQuestion(parseInt(id), questionId)).then(function (res) {
53210
+ return Promise.resolve(getTotalByQuestion(parseInt(id), _extends({}, filters, {
53211
+ questionId: questionId
53212
+ }))).then(function (res) {
53000
53213
  var data = res.data;
53001
53214
  var dataOverall = [data.totalSent, data.numberOfResponses];
53002
53215
  var totalOverall = dataOverall.reduce(function (acc, currentValue) {
@@ -53021,7 +53234,7 @@ var useSurveyDetail = function useSurveyDetail() {
53021
53234
  } catch (e) {
53022
53235
  return Promise.reject(e);
53023
53236
  }
53024
- }, [id]);
53237
+ }, [id, filters]);
53025
53238
 
53026
53239
  var handleGetDistribution = function handleGetDistribution() {
53027
53240
  try {
@@ -53032,7 +53245,7 @@ var useSurveyDetail = function useSurveyDetail() {
53032
53245
  dispatch(setLoading(true));
53033
53246
 
53034
53247
  var _temp20 = _catch(function () {
53035
- return Promise.resolve(getResponsesDistribution(parseInt(id))).then(function (res) {
53248
+ return Promise.resolve(getResponsesDistribution(parseInt(id), filters)).then(function (res) {
53036
53249
  var data = (res === null || res === void 0 ? void 0 : res.data) || [];
53037
53250
  setDistributionQuestions(data.map(function (_r, index) {
53038
53251
  return "Q # " + (index + 1);
@@ -53093,7 +53306,9 @@ var useSurveyDetail = function useSurveyDetail() {
53093
53306
  dispatch(setLoading(true));
53094
53307
 
53095
53308
  var _temp24 = _catch(function () {
53096
- return Promise.resolve(getAnswerChart(parseInt(id), true)).then(function (res) {
53309
+ return Promise.resolve(getAnswerChart(parseInt(id), _extends({}, filters, {
53310
+ isQuestionDropDown: true
53311
+ }))).then(function (res) {
53097
53312
  var _res$data2;
53098
53313
 
53099
53314
  var data = (_res$data2 = res.data) != null ? _res$data2 : [];
@@ -53112,7 +53327,7 @@ var useSurveyDetail = function useSurveyDetail() {
53112
53327
  } catch (e) {
53113
53328
  return Promise.reject(e);
53114
53329
  }
53115
- }, [id]);
53330
+ }, [id, filters]);
53116
53331
  var handleGetAnswerTextInput = useCallback(function () {
53117
53332
  try {
53118
53333
  var _temp27 = function _temp27() {
@@ -53122,7 +53337,9 @@ var useSurveyDetail = function useSurveyDetail() {
53122
53337
  dispatch(setLoading(true));
53123
53338
 
53124
53339
  var _temp28 = _catch(function () {
53125
- return Promise.resolve(getAnswerChart(parseInt(id), false)).then(function (res) {
53340
+ return Promise.resolve(getAnswerChart(parseInt(id), _extends({}, filters, {
53341
+ isQuestionDropDown: false
53342
+ }))).then(function (res) {
53126
53343
  var _res$data3;
53127
53344
 
53128
53345
  var data = (_res$data3 = res.data) != null ? _res$data3 : [];
@@ -53141,21 +53358,25 @@ var useSurveyDetail = function useSurveyDetail() {
53141
53358
  } catch (e) {
53142
53359
  return Promise.reject(e);
53143
53360
  }
53361
+ }, [id, filters]);
53362
+ useEffect(function () {
53363
+ if (!!id) {
53364
+ getStudentSurveyCount();
53365
+ }
53144
53366
  }, [id]);
53145
53367
  useEffect(function () {
53146
53368
  if (!!id) {
53147
53369
  handleGetRatingsOfQuestions();
53148
- getStudentSurveyCount();
53149
53370
  handleGetDistribution();
53150
53371
  handleGetAnswerChart();
53151
53372
  handleGetAnswerTextInput();
53152
53373
  }
53153
- }, [id]);
53374
+ }, [id, filters]);
53154
53375
  useEffect(function () {
53155
53376
  if (!!(selectQuestion !== null && selectQuestion !== void 0 && selectQuestion.questionId)) {
53156
53377
  handleGetTotalByQuestion(selectQuestion.questionId);
53157
53378
  }
53158
- }, [selectQuestion]);
53379
+ }, [selectQuestion, filters]);
53159
53380
  useEffect(function () {
53160
53381
  !!(studentDetail !== null && studentDetail !== void 0 && studentDetail.studentId) && getDataQuestion();
53161
53382
  }, [studentDetail]);
@@ -53219,7 +53440,14 @@ var useSurveyDetail = function useSurveyDetail() {
53219
53440
  setQuestionRatingSelected: setQuestionRatingSelected,
53220
53441
  categoryDropdownOptions: categoryDropdownOptions,
53221
53442
  categoryDropdownChose: categoryDropdownChose,
53222
- setCategoryDropdownChose: setCategoryDropdownChose
53443
+ setCategoryDropdownChose: setCategoryDropdownChose,
53444
+ filters: filters,
53445
+ handleChangeEndDate: handleChangeEndDate,
53446
+ handleChangeStartDate: handleChangeStartDate,
53447
+ handleChangeGrade: handleChangeGrade,
53448
+ onChangeOptionDate: onChangeOptionDate,
53449
+ handleChangeInputSearch: handleChangeInputSearch,
53450
+ inputSearch: inputSearch
53223
53451
  };
53224
53452
  };
53225
53453
 
@@ -54708,7 +54936,14 @@ var SurveyDetailAdmin = function SurveyDetailAdmin() {
54708
54936
  setQuestionRatingSelected = _useSurveyDetail.setQuestionRatingSelected,
54709
54937
  categoryDropdownOptions = _useSurveyDetail.categoryDropdownOptions,
54710
54938
  categoryDropdownChose = _useSurveyDetail.categoryDropdownChose,
54711
- setCategoryDropdownChose = _useSurveyDetail.setCategoryDropdownChose;
54939
+ setCategoryDropdownChose = _useSurveyDetail.setCategoryDropdownChose,
54940
+ filters = _useSurveyDetail.filters,
54941
+ handleChangeEndDate = _useSurveyDetail.handleChangeEndDate,
54942
+ handleChangeStartDate = _useSurveyDetail.handleChangeStartDate,
54943
+ handleChangeGrade = _useSurveyDetail.handleChangeGrade,
54944
+ onChangeOptionDate = _useSurveyDetail.onChangeOptionDate,
54945
+ handleChangeInputSearch = _useSurveyDetail.handleChangeInputSearch,
54946
+ inputSearch = _useSurveyDetail.inputSearch;
54712
54947
 
54713
54948
  document.title = t("student_survey");
54714
54949
  return React__default.createElement("div", {
@@ -54737,6 +54972,26 @@ var SurveyDetailAdmin = function SurveyDetailAdmin() {
54737
54972
  }, React__default.createElement(TotalStudent, {
54738
54973
  data: [(_detailSurvey$allCoun = detailSurvey === null || detailSurvey === void 0 ? void 0 : detailSurvey.allCount) != null ? _detailSurvey$allCoun : 0, (_detailSurvey$complet = detailSurvey === null || detailSurvey === void 0 ? void 0 : detailSurvey.completedCount) != null ? _detailSurvey$complet : 0]
54739
54974
  })))), React__default.createElement(Grid, {
54975
+ className: styles$6["filter-desktop"] + " " + styles$6["header-survey-detail-container"]
54976
+ }, React__default.createElement(CustomFilterComponent, {
54977
+ handleChangeInputSearch: handleChangeInputSearch,
54978
+ filters: filters,
54979
+ inputSearch: inputSearch,
54980
+ handleChangeStartDate: handleChangeStartDate,
54981
+ handleChangeEndDate: handleChangeEndDate,
54982
+ onChangeGrade: handleChangeGrade,
54983
+ onChangeOptionDate: onChangeOptionDate
54984
+ })), React__default.createElement(Grid, {
54985
+ className: "" + styles$6["filter-mobile"]
54986
+ }, React__default.createElement(CustomFilterMobile, {
54987
+ handleChangeInputSearch: handleChangeInputSearch,
54988
+ filters: filters,
54989
+ inputSearch: inputSearch,
54990
+ handleChangeStartDate: handleChangeStartDate,
54991
+ handleChangeEndDate: handleChangeEndDate,
54992
+ onChangeGrade: handleChangeGrade,
54993
+ onChangeOptionDate: onChangeOptionDate
54994
+ })), React__default.createElement(Grid, {
54740
54995
  className: styles$6["survey-detail"] + " " + styles$6[classFontSize]
54741
54996
  }, React__default.createElement(Grid, {
54742
54997
  className: styles$6["responses-distribution"] + " " + styled['student-survey-questions']