mario-education 2.4.52-admin → 2.4.55-admin

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.
@@ -26114,19 +26114,22 @@ var getConvertMinuteToHour = function getConvertMinuteToHour(timeSecond) {
26114
26114
 
26115
26115
  return hTime;
26116
26116
  };
26117
+
26118
+ var handleViewSeriesActive = function handleViewSeriesActive(active) {
26119
+ var _active$filter;
26120
+
26121
+ var item = ((_active$filter = active.filter(function (r) {
26122
+ return r == true;
26123
+ })) === null || _active$filter === void 0 ? void 0 : _active$filter.length) || 0;
26124
+ return Array.from(Array(item).keys());
26125
+ };
26126
+
26117
26127
  var readinesToLearnoptions = function readinesToLearnoptions(seriesName, data) {
26118
26128
  var history = useHistory();
26119
- var listStudentWithId = [];
26120
26129
  data === null || data === void 0 ? void 0 : data.forEach(function (element) {
26121
26130
  var _element$studentPerce;
26122
26131
 
26123
26132
  element === null || element === void 0 ? void 0 : (_element$studentPerce = element.studentPercentQuestion) === null || _element$studentPerce === void 0 ? void 0 : _element$studentPerce.forEach(function (item) {
26124
- if (!(listStudentWithId !== null && listStudentWithId !== void 0 && listStudentWithId.map(function (i) {
26125
- return i === null || i === void 0 ? void 0 : i.studentId;
26126
- }).includes(item.studentId))) listStudentWithId.push({
26127
- studentName: item.studentName,
26128
- studentId: item.studentId
26129
- });
26130
26133
  });
26131
26134
  });
26132
26135
  return {
@@ -26136,15 +26139,13 @@ var readinesToLearnoptions = function readinesToLearnoptions(seriesName, data) {
26136
26139
  show: false
26137
26140
  },
26138
26141
  events: {
26139
- markerClick: function markerClick(_e, _chart, options) {
26140
- var _listStudentWithId$fi;
26141
-
26142
- var currentStudentId = (_listStudentWithId$fi = listStudentWithId.find(function (i) {
26143
- var _options$w, _options$w$globals;
26144
-
26145
- return i.studentName.toLowerCase().trim() == (options === null || options === void 0 ? void 0 : (_options$w = options.w) === null || _options$w === void 0 ? void 0 : (_options$w$globals = _options$w.globals) === null || _options$w$globals === void 0 ? void 0 : _options$w$globals.seriesZ[options === null || options === void 0 ? void 0 : options.dataPointIndex][options === null || options === void 0 ? void 0 : options.dataPointIndex].toLowerCase().trim());
26146
- })) === null || _listStudentWithId$fi === void 0 ? void 0 : _listStudentWithId$fi.studentId;
26147
- history.push("/student-detail/overview/" + currentStudentId);
26142
+ dataPointSelection: function dataPointSelection(_event, chartContext, config) {
26143
+ var studentName = chartContext.data.threeDSeries[config.dataPointIndex];
26144
+ var series = config.w.config.series[config.seriesIndex].data;
26145
+ var student = series.find(function (r) {
26146
+ return r.includes(studentName);
26147
+ });
26148
+ !!student && history.push("/student-detail/overview/" + student[student.length - 1]);
26148
26149
  }
26149
26150
  }
26150
26151
  },
@@ -26479,6 +26480,7 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData, n
26479
26480
  decimalsInFloat: 0
26480
26481
  },
26481
26482
  tooltip: {
26483
+ enabledOnSeries: handleViewSeriesActive(activeData),
26482
26484
  y: {
26483
26485
  formatter: function formatter(value) {
26484
26486
  return value.toFixed(2) + "%";
@@ -27071,7 +27073,7 @@ var getBandScore = function getBandScore() {
27071
27073
  };
27072
27074
 
27073
27075
  var TITLE$s = "Dashboard";
27074
- var DEFAULT_START_DATE = moment().endOf("day").valueOf().valueOf() > moment().startOf("month").month("Aug").valueOf() ? moment().startOf("month").month("Aug").valueOf() : moment().startOf("month").month("Aug").subtract(1, "year").valueOf();
27076
+ var DEFAULT_START_DATE = moment().subtract(3, 'months').startOf("day").valueOf();
27075
27077
  var DEFAULT_END_DATE = moment().endOf("day").valueOf();
27076
27078
 
27077
27079
  var useDashboard = function useDashboard() {
@@ -27209,9 +27211,14 @@ var useDashboard = function useDashboard() {
27209
27211
  };
27210
27212
 
27211
27213
  useEffect(function () {
27212
- setActiveColumnOneToOne([true].concat(dataConvertedOneToOne.map(function (_i) {
27213
- return false;
27214
- }).splice(0, dataConvertedOneToOne.length - 2)));
27214
+ if (activeColumnOneToOne.filter(function (r) {
27215
+ return r === true;
27216
+ }).length == 0) {
27217
+ setActiveColumnOneToOne([true].concat(dataConvertedOneToOne.map(function (_i) {
27218
+ return false;
27219
+ }).splice(0, dataConvertedOneToOne.length - 2)));
27220
+ }
27221
+
27215
27222
  setAvgOneToOne(newAvgOneToOne === null || newAvgOneToOne === void 0 ? void 0 : newAvgOneToOne.map(function (_, index) {
27216
27223
  return activeColumnOneToOne[index] ? newAvgOneToOne[index] : 0;
27217
27224
  }));
@@ -27252,12 +27259,17 @@ var useDashboard = function useDashboard() {
27252
27259
  };
27253
27260
 
27254
27261
  useEffect(function () {
27262
+ if (activeColumnClassReflection.filter(function (r) {
27263
+ return r === true;
27264
+ }).length == 0) {
27265
+ setActiveColumnClassReflection([true].concat(dataConvertedClassReflection.map(function (_i) {
27266
+ return false;
27267
+ }).splice(0, dataConvertedClassReflection.length - 2)));
27268
+ }
27269
+
27255
27270
  setSeriesClassReflection(newSeriesClassReflection === null || newSeriesClassReflection === void 0 ? void 0 : newSeriesClassReflection.filter(function (_, idx) {
27256
27271
  return activeColumnClassReflection[idx];
27257
27272
  }));
27258
- setActiveColumnClassReflection([true].concat(dataConvertedClassReflection.map(function (_i) {
27259
- return false;
27260
- }).splice(0, dataConvertedClassReflection.length - 2)));
27261
27273
  setAvgClassReflection(newAvgClassReflection === null || newAvgClassReflection === void 0 ? void 0 : newAvgClassReflection.map(function (_, index) {
27262
27274
  return activeColumnClassReflection[index] ? newAvgClassReflection[index] : 0;
27263
27275
  }));
@@ -27295,12 +27307,17 @@ var useDashboard = function useDashboard() {
27295
27307
  };
27296
27308
 
27297
27309
  useEffect(function () {
27310
+ if (activeColumnConference.filter(function (r) {
27311
+ return r === true;
27312
+ }).length == 0) {
27313
+ setActiveColumnConference([true].concat(dataConvertedConference === null || dataConvertedConference === void 0 ? void 0 : dataConvertedConference.map(function (_i) {
27314
+ return false;
27315
+ }).splice(0, dataConvertedConference.length - 2)));
27316
+ }
27317
+
27298
27318
  setSeriesConference(newSeriesConference === null || newSeriesConference === void 0 ? void 0 : newSeriesConference.filter(function (_, idx) {
27299
27319
  return activeColumnConference[idx];
27300
27320
  }));
27301
- setActiveColumnConference([true].concat(dataConvertedConference === null || dataConvertedConference === void 0 ? void 0 : dataConvertedConference.map(function (_i) {
27302
- return false;
27303
- }).splice(0, dataConvertedConference.length - 2)));
27304
27321
  setAvgConference(newAvgConference === null || newAvgConference === void 0 ? void 0 : newAvgConference.map(function (_, idx) {
27305
27322
  return activeColumnConference[idx] ? newAvgConference[idx] : 0;
27306
27323
  }));
@@ -27618,14 +27635,6 @@ var useChartDatas = function useChartDatas() {
27618
27635
  name: FILTER_NAME.EndDate,
27619
27636
  icon: "/images/calendar.svg",
27620
27637
  handleChangeFilters: handleChangeFilters
27621
- }, {
27622
- name: FILTER_NAME.StartDate,
27623
- icon: "/images/calendar.svg",
27624
- handleChangeFilters: handleChangeFilters
27625
- }, {
27626
- name: FILTER_NAME.EndDate,
27627
- icon: "/images/calendar.svg",
27628
- handleChangeFilters: handleChangeFilters
27629
27638
  }, {
27630
27639
  name: FILTER_NAME.Gender,
27631
27640
  icon: "/images/gender-icon.svg",
@@ -28155,7 +28164,9 @@ var SelectFilter = function SelectFilter(_ref) {
28155
28164
  onChange: function onChange(date) {
28156
28165
  return handleChangeStartDate(date);
28157
28166
  },
28158
- inline: true
28167
+ inline: true,
28168
+ maxDate: moment(filter === null || filter === void 0 ? void 0 : filter.endDate).toDate(),
28169
+ minDate: moment(filter === null || filter === void 0 ? void 0 : filter.endDate).subtract(3, "months").toDate()
28159
28170
  })));
28160
28171
  }
28161
28172
 
@@ -28179,7 +28190,9 @@ var SelectFilter = function SelectFilter(_ref) {
28179
28190
  onChange: function onChange(date) {
28180
28191
  return handleChangeEndDate(date);
28181
28192
  },
28182
- inline: true
28193
+ inline: true,
28194
+ maxDate: moment(filter === null || filter === void 0 ? void 0 : filter.startDate).add(3, "months").toDate(),
28195
+ minDate: moment(filter === null || filter === void 0 ? void 0 : filter.startDate).toDate()
28183
28196
  })));
28184
28197
  }
28185
28198