mario-education 2.4.46-admin → 2.4.49-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.
- package/dist/MarioFramework.Education/ClientApp/src/components/Select/SelectFilter.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/utils.d.ts +1 -1
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/configs/questionDetailSchema.d.ts +4 -4
- package/dist/index.css +1 -1
- package/dist/index.js +60 -101
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +60 -101
- package/dist/index.modern.js.map +1 -1
- package/package.json +3 -6
package/dist/index.modern.js
CHANGED
|
@@ -18,8 +18,7 @@ import { FaCheck, FaTimes, FaRegEdit } from 'react-icons/fa';
|
|
|
18
18
|
import { Editor } from '@tinymce/tinymce-react';
|
|
19
19
|
import Chart from 'react-apexcharts';
|
|
20
20
|
import { FiChevronDown, FiChevronUp } from 'react-icons/fi';
|
|
21
|
-
import
|
|
22
|
-
import MomentUtils from '@date-io/moment';
|
|
21
|
+
import 'react-datepicker/dist/react-datepicker.css';
|
|
23
22
|
import jsPDF from 'jspdf';
|
|
24
23
|
import html2canvas from 'html2canvas';
|
|
25
24
|
|
|
@@ -26115,12 +26114,38 @@ var getConvertMinuteToHour = function getConvertMinuteToHour(timeSecond) {
|
|
|
26115
26114
|
|
|
26116
26115
|
return hTime;
|
|
26117
26116
|
};
|
|
26118
|
-
var readinesToLearnoptions = function readinesToLearnoptions(seriesName) {
|
|
26117
|
+
var readinesToLearnoptions = function readinesToLearnoptions(seriesName, data) {
|
|
26118
|
+
var history = useHistory();
|
|
26119
|
+
var listStudentWithId = [];
|
|
26120
|
+
data === null || data === void 0 ? void 0 : data.forEach(function (element) {
|
|
26121
|
+
var _element$studentPerce;
|
|
26122
|
+
|
|
26123
|
+
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
|
+
});
|
|
26131
|
+
});
|
|
26119
26132
|
return {
|
|
26120
26133
|
chart: {
|
|
26121
26134
|
height: 450,
|
|
26122
26135
|
toolbar: {
|
|
26123
26136
|
show: false
|
|
26137
|
+
},
|
|
26138
|
+
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);
|
|
26148
|
+
}
|
|
26124
26149
|
}
|
|
26125
26150
|
},
|
|
26126
26151
|
dataLabels: {
|
|
@@ -26195,7 +26220,7 @@ var convertDataToSeriesBullderChart = function convertDataToSeriesBullderChart(d
|
|
|
26195
26220
|
return {
|
|
26196
26221
|
name: i.questionText.replace("<p>", "").replace("</p>", ""),
|
|
26197
26222
|
data: ((_i$studentPercentQues = i.studentPercentQuestion) === null || _i$studentPercentQues === void 0 ? void 0 : _i$studentPercentQues.map(function (question) {
|
|
26198
|
-
return [getRandomArbitrary((index + 1) * 1000 - 330, (index + 1) * 1000 + 330), question.percentQuestion, question.studentName];
|
|
26223
|
+
return [getRandomArbitrary((index + 1) * 1000 - 330, (index + 1) * 1000 + 330), question.percentQuestion, question.studentName, question.studentId];
|
|
26199
26224
|
})) || []
|
|
26200
26225
|
};
|
|
26201
26226
|
});
|
|
@@ -26390,7 +26415,7 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData, n
|
|
|
26390
26415
|
},
|
|
26391
26416
|
fill: {
|
|
26392
26417
|
opacity: newseries === null || newseries === void 0 ? void 0 : newseries.map(function (item) {
|
|
26393
|
-
if ((item === null || item === void 0 ? void 0 : item.type) ==
|
|
26418
|
+
if ((item === null || item === void 0 ? void 0 : item.type) == "area") {
|
|
26394
26419
|
return 0.2;
|
|
26395
26420
|
}
|
|
26396
26421
|
|
|
@@ -26407,7 +26432,7 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData, n
|
|
|
26407
26432
|
return activeData[index];
|
|
26408
26433
|
}),
|
|
26409
26434
|
width: newseries === null || newseries === void 0 ? void 0 : newseries.map(function (item) {
|
|
26410
|
-
if ((item === null || item === void 0 ? void 0 : item.type) ==
|
|
26435
|
+
if ((item === null || item === void 0 ? void 0 : item.type) == "area") {
|
|
26411
26436
|
return 2;
|
|
26412
26437
|
}
|
|
26413
26438
|
|
|
@@ -26580,7 +26605,7 @@ var BubbleChartCustom = function BubbleChartCustom(_ref) {
|
|
|
26580
26605
|
})), React.createElement("div", {
|
|
26581
26606
|
className: styles$1["chart-buddle"]
|
|
26582
26607
|
}, React.createElement("div", null, React.createElement(Chart, {
|
|
26583
|
-
options: readinesToLearnoptions(seriesName),
|
|
26608
|
+
options: readinesToLearnoptions(seriesName, data),
|
|
26584
26609
|
type: "scatter",
|
|
26585
26610
|
series: convertDataToSeriesBullderChart(data),
|
|
26586
26611
|
width: "100%",
|
|
@@ -28033,29 +28058,18 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28033
28058
|
setIsOpenCollapse(!isOpenCollapse);
|
|
28034
28059
|
};
|
|
28035
28060
|
|
|
28036
|
-
var onChangeYear = function onChangeYear(item) {
|
|
28037
|
-
!!onChangeFilters && onChangeFilters({
|
|
28038
|
-
startDate: item.startDate,
|
|
28039
|
-
endDate: item.endDate
|
|
28040
|
-
});
|
|
28041
|
-
setLabelBox(_extends({}, labelBox, {
|
|
28042
|
-
calendar: {
|
|
28043
|
-
value: item.value,
|
|
28044
|
-
label: item.label
|
|
28045
|
-
}
|
|
28046
|
-
}));
|
|
28047
|
-
};
|
|
28048
|
-
|
|
28049
28061
|
var handleChangeStartDate = function handleChangeStartDate(date) {
|
|
28050
28062
|
!!onChangeFilters && onChangeFilters({
|
|
28051
28063
|
startDate: moment(date).startOf("day").valueOf()
|
|
28052
28064
|
});
|
|
28065
|
+
setIsOpenCollapse(false);
|
|
28053
28066
|
};
|
|
28054
28067
|
|
|
28055
28068
|
var handleChangeEndDate = function handleChangeEndDate(date) {
|
|
28056
28069
|
!!onChangeFilters && onChangeFilters({
|
|
28057
28070
|
endDate: moment(date).endOf("day").valueOf()
|
|
28058
28071
|
});
|
|
28072
|
+
setIsOpenCollapse(false);
|
|
28059
28073
|
};
|
|
28060
28074
|
|
|
28061
28075
|
var onChangeGender = function onChangeGender(item) {
|
|
@@ -28075,15 +28089,15 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28075
28089
|
grade: grade.value
|
|
28076
28090
|
}));
|
|
28077
28091
|
|
|
28078
|
-
if (grade.value
|
|
28092
|
+
if (grade.value == -1) {
|
|
28079
28093
|
!!onChangeFilters && onChangeFilters({
|
|
28080
28094
|
grade: []
|
|
28081
28095
|
});
|
|
28096
|
+
} else {
|
|
28097
|
+
!!onChangeFilters && onChangeFilters({
|
|
28098
|
+
grade: [grade.label]
|
|
28099
|
+
});
|
|
28082
28100
|
}
|
|
28083
|
-
|
|
28084
|
-
!!onChangeFilters && onChangeFilters({
|
|
28085
|
-
grade: [grade.label]
|
|
28086
|
-
});
|
|
28087
28101
|
};
|
|
28088
28102
|
|
|
28089
28103
|
var onChangeBandScore = function onChangeBandScore(score) {
|
|
@@ -28095,11 +28109,11 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28095
28109
|
!!onChangeFilters && onChangeFilters({
|
|
28096
28110
|
bandScore: ""
|
|
28097
28111
|
});
|
|
28112
|
+
} else {
|
|
28113
|
+
!!onChangeFilters && onChangeFilters({
|
|
28114
|
+
bandScore: score.label
|
|
28115
|
+
});
|
|
28098
28116
|
}
|
|
28099
|
-
|
|
28100
|
-
!!onChangeFilters && onChangeFilters({
|
|
28101
|
-
bandScore: score.label
|
|
28102
|
-
});
|
|
28103
28117
|
};
|
|
28104
28118
|
|
|
28105
28119
|
var handleClickOutSide = function handleClickOutSide(event) {
|
|
@@ -28113,45 +28127,6 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28113
28127
|
}, []);
|
|
28114
28128
|
|
|
28115
28129
|
var renderSelectFilter = function renderSelectFilter() {
|
|
28116
|
-
if (name === FILTER_NAME.Calendar) {
|
|
28117
|
-
return React.createElement("div", {
|
|
28118
|
-
key: "" + name,
|
|
28119
|
-
className: styles["block-filter-component"] + " ",
|
|
28120
|
-
ref: ref
|
|
28121
|
-
}, React.createElement("button", {
|
|
28122
|
-
onClick: handleToggleCollapse,
|
|
28123
|
-
className: styles["btn-filter"] + " d-flex align-items-center cursor-pointer"
|
|
28124
|
-
}, React.createElement("img", {
|
|
28125
|
-
src: "" + icon,
|
|
28126
|
-
alt: labelBox.calendar.label
|
|
28127
|
-
}), React.createElement("p", {
|
|
28128
|
-
className: styles["color-filter"] + " my-0 mx-2"
|
|
28129
|
-
}, labelBox.calendar.label), !isOpenCollapse ? React.createElement(FiChevronDown, null) : React.createElement(FiChevronUp, null)), React.createElement("div", {
|
|
28130
|
-
className: styles["select-filter-component"] + " " + (!isOpenCollapse && "" + styles["hidden"])
|
|
28131
|
-
}, React.createElement(Form, {
|
|
28132
|
-
className: "" + styles["box-select"]
|
|
28133
|
-
}, filterYearData.map(function (item) {
|
|
28134
|
-
return React.createElement(FormGroup, {
|
|
28135
|
-
check: true,
|
|
28136
|
-
className: "my-2 px-3"
|
|
28137
|
-
}, React.createElement(Input, {
|
|
28138
|
-
id: item.label + "filterYear",
|
|
28139
|
-
name: "filterYear",
|
|
28140
|
-
value: item.value,
|
|
28141
|
-
type: "radio",
|
|
28142
|
-
className: "" + styles["radio-btn"],
|
|
28143
|
-
checked: labelBox.calendar.value === item.value,
|
|
28144
|
-
onChange: function onChange() {
|
|
28145
|
-
return onChangeYear(item);
|
|
28146
|
-
}
|
|
28147
|
-
}), React.createElement(Label, {
|
|
28148
|
-
check: true,
|
|
28149
|
-
"for": item.label + "filterYear",
|
|
28150
|
-
className: "" + styles["box-select-label"]
|
|
28151
|
-
}, React.createElement("p", null, item.label)));
|
|
28152
|
-
}))));
|
|
28153
|
-
}
|
|
28154
|
-
|
|
28155
28130
|
if (name === FILTER_NAME.StartDate) {
|
|
28156
28131
|
return React.createElement("div", {
|
|
28157
28132
|
key: "" + name,
|
|
@@ -28165,23 +28140,15 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28165
28140
|
alt: labelBox.calendar.label
|
|
28166
28141
|
}), React.createElement("p", {
|
|
28167
28142
|
className: styles["color-filter"] + " my-0 mx-2"
|
|
28168
|
-
}, "Start Date", !!(filter !== null && filter !== void 0 && filter.startDate) && ": " + moment(filter === null || filter === void 0 ? void 0 : filter.startDate).format("DD/MM/YYYY"))), React.createElement("div", {
|
|
28143
|
+
}, "Start Date", !!(filter !== null && filter !== void 0 && filter.startDate) && ": " + moment(filter === null || filter === void 0 ? void 0 : filter.startDate).format("DD/MM/YYYY"))), isOpenCollapse && React.createElement("div", {
|
|
28169
28144
|
className: "" + styles["date-picker"]
|
|
28170
|
-
}, React.createElement(
|
|
28171
|
-
|
|
28172
|
-
|
|
28173
|
-
|
|
28174
|
-
|
|
28175
|
-
|
|
28176
|
-
|
|
28177
|
-
id: "date-picker-dialog",
|
|
28178
|
-
format: "MM/dd/yyyy",
|
|
28179
|
-
onChange: handleChangeStartDate,
|
|
28180
|
-
value: filter === null || filter === void 0 ? void 0 : filter.startDate,
|
|
28181
|
-
KeyboardButtonProps: {
|
|
28182
|
-
"aria-label": "change date"
|
|
28183
|
-
}
|
|
28184
|
-
}))));
|
|
28145
|
+
}, React.createElement(DatePicker, {
|
|
28146
|
+
selected: moment(filter === null || filter === void 0 ? void 0 : filter.startDate).toDate(),
|
|
28147
|
+
onChange: function onChange(date) {
|
|
28148
|
+
return handleChangeStartDate(date);
|
|
28149
|
+
},
|
|
28150
|
+
inline: true
|
|
28151
|
+
})));
|
|
28185
28152
|
}
|
|
28186
28153
|
|
|
28187
28154
|
if (name === FILTER_NAME.EndDate) {
|
|
@@ -28197,23 +28164,15 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28197
28164
|
alt: labelBox.calendar.label
|
|
28198
28165
|
}), React.createElement("p", {
|
|
28199
28166
|
className: styles["color-filter"] + " my-0 mx-2"
|
|
28200
|
-
}, "End Date", !!(filter !== null && filter !== void 0 && filter.endDate) && ": " + moment(filter === null || filter === void 0 ? void 0 : filter.endDate).format("DD/MM/YYYY"))), React.createElement("div", {
|
|
28167
|
+
}, "End Date", !!(filter !== null && filter !== void 0 && filter.endDate) && ": " + moment(filter === null || filter === void 0 ? void 0 : filter.endDate).format("DD/MM/YYYY"))), isOpenCollapse && React.createElement("div", {
|
|
28201
28168
|
className: "" + styles["date-picker"]
|
|
28202
|
-
}, React.createElement(
|
|
28203
|
-
|
|
28204
|
-
|
|
28205
|
-
|
|
28206
|
-
|
|
28207
|
-
|
|
28208
|
-
|
|
28209
|
-
id: "date-picker-dialog",
|
|
28210
|
-
format: "MM/dd/yyyy",
|
|
28211
|
-
onChange: handleChangeEndDate,
|
|
28212
|
-
value: filter === null || filter === void 0 ? void 0 : filter.endDate,
|
|
28213
|
-
KeyboardButtonProps: {
|
|
28214
|
-
"aria-label": "change date"
|
|
28215
|
-
}
|
|
28216
|
-
}))));
|
|
28169
|
+
}, React.createElement(DatePicker, {
|
|
28170
|
+
selected: moment(filter === null || filter === void 0 ? void 0 : filter.endDate).toDate(),
|
|
28171
|
+
onChange: function onChange(date) {
|
|
28172
|
+
return handleChangeEndDate(date);
|
|
28173
|
+
},
|
|
28174
|
+
inline: true
|
|
28175
|
+
})));
|
|
28217
28176
|
}
|
|
28218
28177
|
|
|
28219
28178
|
if (name === FILTER_NAME.Gender) {
|
|
@@ -28362,7 +28321,7 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28362
28321
|
}, React.createElement(TeacherItemSelector, {
|
|
28363
28322
|
onChange: function onChange(e) {
|
|
28364
28323
|
handleChangeFilters(e);
|
|
28365
|
-
!!changeCurrentTeacherUserId && changeCurrentTeacherUserId(e.teacherUserId || "");
|
|
28324
|
+
!!changeCurrentTeacherUserId && changeCurrentTeacherUserId((e === null || e === void 0 ? void 0 : e.teacherUserId) || "");
|
|
28366
28325
|
|
|
28367
28326
|
if (!(e !== null && e !== void 0 && e.label)) {
|
|
28368
28327
|
setTeacherName("");
|