mario-education 2.4.602-feedback → 2.4.604-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.
- package/dist/index.js +33 -22
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +33 -22
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30771,7 +30771,7 @@ var useDashboard = function useDashboard() {
|
|
|
30771
30771
|
} catch (e) {
|
|
30772
30772
|
return Promise.reject(e);
|
|
30773
30773
|
}
|
|
30774
|
-
}, [debouncedFilter, language]);
|
|
30774
|
+
}, [debouncedFilter, debouncedAcademicYear, language]);
|
|
30775
30775
|
|
|
30776
30776
|
var handleFilterStudent = function handleFilterStudent(option) {
|
|
30777
30777
|
if (option != null) {
|
|
@@ -30958,7 +30958,7 @@ var useDashboard = function useDashboard() {
|
|
|
30958
30958
|
};
|
|
30959
30959
|
|
|
30960
30960
|
React.useEffect(function () {
|
|
30961
|
-
if (!!academicYear && academicYear.length > 0) {
|
|
30961
|
+
if (!!academicYear && academicYear.length > 0 && filter.academicYearId != 0) {
|
|
30962
30962
|
getDataWithLoading(callApi(getAllTotalTime, setListTotalTime, []), 'dataStatics');
|
|
30963
30963
|
getDataWithLoading(callApi(getOverviewQuestionChart, handleSetDataChartOneToOne, [], "OneToOne"), 'dataOverview');
|
|
30964
30964
|
getDataWithLoading(callApi(getVeryLowMetric, handleChangeMetric, []), 'dataMetric');
|
|
@@ -31186,8 +31186,6 @@ var Loading = function Loading(_ref) {
|
|
|
31186
31186
|
};
|
|
31187
31187
|
|
|
31188
31188
|
var StudentMultiSelector = function StudentMultiSelector(_ref) {
|
|
31189
|
-
var _grades$filter$, _grades$filter;
|
|
31190
|
-
|
|
31191
31189
|
var student = _ref.student,
|
|
31192
31190
|
setStudent = _ref.setStudent,
|
|
31193
31191
|
studentData = _ref.studentData,
|
|
@@ -31201,17 +31199,16 @@ var StudentMultiSelector = function StudentMultiSelector(_ref) {
|
|
|
31201
31199
|
t = _useTranslation.t;
|
|
31202
31200
|
|
|
31203
31201
|
var classes = useAutoCompleteStyle();
|
|
31204
|
-
var studentList =
|
|
31205
|
-
|
|
31206
|
-
|
|
31207
|
-
|
|
31208
|
-
|
|
31209
|
-
|
|
31210
|
-
|
|
31211
|
-
return
|
|
31212
|
-
})
|
|
31213
|
-
}
|
|
31214
|
-
|
|
31202
|
+
var studentList = React.useMemo(function () {
|
|
31203
|
+
if (!grades || grades.length === 0) return studentData || [];
|
|
31204
|
+
var selectedGrades = grades.filter(function (g) {
|
|
31205
|
+
return g !== 'All';
|
|
31206
|
+
});
|
|
31207
|
+
if (selectedGrades.length === 0) return studentData || [];
|
|
31208
|
+
return (studentData || []).filter(function (s) {
|
|
31209
|
+
return s.gradeLevel && selectedGrades.includes(s.gradeLevel);
|
|
31210
|
+
});
|
|
31211
|
+
}, [studentData, grades]);
|
|
31215
31212
|
return React__default.createElement(core$1.Grid, null, React__default.createElement(core$1.FormControl, {
|
|
31216
31213
|
fullWidth: true
|
|
31217
31214
|
}, React__default.createElement(Autocomplete, {
|
|
@@ -31838,7 +31835,10 @@ var useStyles$6 = core$1.makeStyles({
|
|
|
31838
31835
|
selectOutlined: {
|
|
31839
31836
|
height: 48,
|
|
31840
31837
|
display: 'flex',
|
|
31841
|
-
alignItems: 'center'
|
|
31838
|
+
alignItems: 'center',
|
|
31839
|
+
'& .MuiSelect-select:focus': {
|
|
31840
|
+
backgroundColor: 'transparent'
|
|
31841
|
+
}
|
|
31842
31842
|
}
|
|
31843
31843
|
});
|
|
31844
31844
|
|
|
@@ -31876,6 +31876,7 @@ var DesktopFilterComponent = function DesktopFilterComponent(_ref) {
|
|
|
31876
31876
|
t = _useTranslation.t;
|
|
31877
31877
|
|
|
31878
31878
|
var classesSelect = useStyles$6();
|
|
31879
|
+
var applyRef = React.useRef(false);
|
|
31879
31880
|
|
|
31880
31881
|
var handleToggle = function handleToggle(grade) {
|
|
31881
31882
|
setSelected(function (prev) {
|
|
@@ -31886,10 +31887,24 @@ var DesktopFilterComponent = function DesktopFilterComponent(_ref) {
|
|
|
31886
31887
|
};
|
|
31887
31888
|
|
|
31888
31889
|
var handleApplyFilterGrade = function handleApplyFilterGrade() {
|
|
31890
|
+
applyRef.current = true;
|
|
31889
31891
|
onChangeFilterGrade(selected);
|
|
31890
31892
|
setOpen(false);
|
|
31891
31893
|
};
|
|
31892
31894
|
|
|
31895
|
+
var handleOpen = function handleOpen() {
|
|
31896
|
+
applyRef.current = false;
|
|
31897
|
+
setOpen(true);
|
|
31898
|
+
};
|
|
31899
|
+
|
|
31900
|
+
var handleClose = function handleClose() {
|
|
31901
|
+
setOpen(false);
|
|
31902
|
+
|
|
31903
|
+
if (!applyRef.current) {
|
|
31904
|
+
setSelected(gradeFilter);
|
|
31905
|
+
}
|
|
31906
|
+
};
|
|
31907
|
+
|
|
31893
31908
|
var unDisabled = React.useMemo(function () {
|
|
31894
31909
|
return (loadingComplete === null || loadingComplete === void 0 ? void 0 : loadingComplete.allStudent) && (loadingComplete === null || loadingComplete === void 0 ? void 0 : loadingComplete.dataChart) && (loadingComplete === null || loadingComplete === void 0 ? void 0 : loadingComplete.dataConversationGoal) && (loadingComplete === null || loadingComplete === void 0 ? void 0 : loadingComplete.dataDistribution) && (loadingComplete === null || loadingComplete === void 0 ? void 0 : loadingComplete.dataMetric) && (loadingComplete === null || loadingComplete === void 0 ? void 0 : loadingComplete.dataOverview) && (loadingComplete === null || loadingComplete === void 0 ? void 0 : loadingComplete.dataStatics) && (loadingComplete === null || loadingComplete === void 0 ? void 0 : loadingComplete.dataStudentPressure) && (loadingComplete === null || loadingComplete === void 0 ? void 0 : loadingComplete.gradeList) && (loadingComplete === null || loadingComplete === void 0 ? void 0 : loadingComplete.skillQuestion) && (loadingComplete === null || loadingComplete === void 0 ? void 0 : loadingComplete.summarizeReport);
|
|
31895
31910
|
}, [loadingComplete]);
|
|
@@ -31909,12 +31924,8 @@ var DesktopFilterComponent = function DesktopFilterComponent(_ref) {
|
|
|
31909
31924
|
htmlFor: "filter_grade_dashboard_label"
|
|
31910
31925
|
}, t("grade")), React__default.createElement(core$1.Select, {
|
|
31911
31926
|
open: open,
|
|
31912
|
-
onOpen:
|
|
31913
|
-
|
|
31914
|
-
},
|
|
31915
|
-
onClose: function onClose() {
|
|
31916
|
-
return setOpen(false);
|
|
31917
|
-
},
|
|
31927
|
+
onOpen: handleOpen,
|
|
31928
|
+
onClose: handleClose,
|
|
31918
31929
|
labelId: "filter_grade_dashboard_label",
|
|
31919
31930
|
id: "filter_grade_dashboard",
|
|
31920
31931
|
multiple: true,
|