mario-education 2.4.48-admin → 2.4.52-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.
|
@@ -97,7 +97,7 @@ export declare const studentByGradeConvert: (newData: IStudentByGrade[]) => {
|
|
|
97
97
|
}[];
|
|
98
98
|
export declare const findTotalStudentByGrade: (data: IStudentByGrade[]) => number;
|
|
99
99
|
export declare const getConvertMinuteToHour: (timeSecond: any) => string;
|
|
100
|
-
export declare const readinesToLearnoptions: (seriesName: string[]) => ApexOptions;
|
|
100
|
+
export declare const readinesToLearnoptions: (seriesName: string[], data: any) => ApexOptions;
|
|
101
101
|
export declare const convertDataToSeriesBullderChart: (data: IReadinessToLearning[]) => {
|
|
102
102
|
name: string;
|
|
103
103
|
data: import("react").ReactText[][];
|
package/dist/index.js
CHANGED
|
@@ -26117,12 +26117,38 @@ var getConvertMinuteToHour = function getConvertMinuteToHour(timeSecond) {
|
|
|
26117
26117
|
|
|
26118
26118
|
return hTime;
|
|
26119
26119
|
};
|
|
26120
|
-
var readinesToLearnoptions = function readinesToLearnoptions(seriesName) {
|
|
26120
|
+
var readinesToLearnoptions = function readinesToLearnoptions(seriesName, data) {
|
|
26121
|
+
var history = reactRouterDom.useHistory();
|
|
26122
|
+
var listStudentWithId = [];
|
|
26123
|
+
data === null || data === void 0 ? void 0 : data.forEach(function (element) {
|
|
26124
|
+
var _element$studentPerce;
|
|
26125
|
+
|
|
26126
|
+
element === null || element === void 0 ? void 0 : (_element$studentPerce = element.studentPercentQuestion) === null || _element$studentPerce === void 0 ? void 0 : _element$studentPerce.forEach(function (item) {
|
|
26127
|
+
if (!(listStudentWithId !== null && listStudentWithId !== void 0 && listStudentWithId.map(function (i) {
|
|
26128
|
+
return i === null || i === void 0 ? void 0 : i.studentId;
|
|
26129
|
+
}).includes(item.studentId))) listStudentWithId.push({
|
|
26130
|
+
studentName: item.studentName,
|
|
26131
|
+
studentId: item.studentId
|
|
26132
|
+
});
|
|
26133
|
+
});
|
|
26134
|
+
});
|
|
26121
26135
|
return {
|
|
26122
26136
|
chart: {
|
|
26123
26137
|
height: 450,
|
|
26124
26138
|
toolbar: {
|
|
26125
26139
|
show: false
|
|
26140
|
+
},
|
|
26141
|
+
events: {
|
|
26142
|
+
markerClick: function markerClick(_e, _chart, options) {
|
|
26143
|
+
var _listStudentWithId$fi;
|
|
26144
|
+
|
|
26145
|
+
var currentStudentId = (_listStudentWithId$fi = listStudentWithId.find(function (i) {
|
|
26146
|
+
var _options$w, _options$w$globals;
|
|
26147
|
+
|
|
26148
|
+
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());
|
|
26149
|
+
})) === null || _listStudentWithId$fi === void 0 ? void 0 : _listStudentWithId$fi.studentId;
|
|
26150
|
+
history.push("/student-detail/overview/" + currentStudentId);
|
|
26151
|
+
}
|
|
26126
26152
|
}
|
|
26127
26153
|
},
|
|
26128
26154
|
dataLabels: {
|
|
@@ -26197,7 +26223,7 @@ var convertDataToSeriesBullderChart = function convertDataToSeriesBullderChart(d
|
|
|
26197
26223
|
return {
|
|
26198
26224
|
name: i.questionText.replace("<p>", "").replace("</p>", ""),
|
|
26199
26225
|
data: ((_i$studentPercentQues = i.studentPercentQuestion) === null || _i$studentPercentQues === void 0 ? void 0 : _i$studentPercentQues.map(function (question) {
|
|
26200
|
-
return [getRandomArbitrary((index + 1) * 1000 - 330, (index + 1) * 1000 + 330), question.percentQuestion, question.studentName];
|
|
26226
|
+
return [getRandomArbitrary((index + 1) * 1000 - 330, (index + 1) * 1000 + 330), question.percentQuestion, question.studentName, question.studentId];
|
|
26201
26227
|
})) || []
|
|
26202
26228
|
};
|
|
26203
26229
|
});
|
|
@@ -26392,7 +26418,7 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData, n
|
|
|
26392
26418
|
},
|
|
26393
26419
|
fill: {
|
|
26394
26420
|
opacity: newseries === null || newseries === void 0 ? void 0 : newseries.map(function (item) {
|
|
26395
|
-
if ((item === null || item === void 0 ? void 0 : item.type) ==
|
|
26421
|
+
if ((item === null || item === void 0 ? void 0 : item.type) == "area") {
|
|
26396
26422
|
return 0.2;
|
|
26397
26423
|
}
|
|
26398
26424
|
|
|
@@ -26409,7 +26435,7 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData, n
|
|
|
26409
26435
|
return activeData[index];
|
|
26410
26436
|
}),
|
|
26411
26437
|
width: newseries === null || newseries === void 0 ? void 0 : newseries.map(function (item) {
|
|
26412
|
-
if ((item === null || item === void 0 ? void 0 : item.type) ==
|
|
26438
|
+
if ((item === null || item === void 0 ? void 0 : item.type) == "area") {
|
|
26413
26439
|
return 2;
|
|
26414
26440
|
}
|
|
26415
26441
|
|
|
@@ -26582,7 +26608,7 @@ var BubbleChartCustom = function BubbleChartCustom(_ref) {
|
|
|
26582
26608
|
})), React__default.createElement("div", {
|
|
26583
26609
|
className: styles$1["chart-buddle"]
|
|
26584
26610
|
}, React__default.createElement("div", null, React__default.createElement(Chart, {
|
|
26585
|
-
options: readinesToLearnoptions(seriesName),
|
|
26611
|
+
options: readinesToLearnoptions(seriesName, data),
|
|
26586
26612
|
type: "scatter",
|
|
26587
26613
|
series: convertDataToSeriesBullderChart(data),
|
|
26588
26614
|
width: "100%",
|
|
@@ -27595,6 +27621,14 @@ var useChartDatas = function useChartDatas() {
|
|
|
27595
27621
|
name: FILTER_NAME.EndDate,
|
|
27596
27622
|
icon: "/images/calendar.svg",
|
|
27597
27623
|
handleChangeFilters: handleChangeFilters
|
|
27624
|
+
}, {
|
|
27625
|
+
name: FILTER_NAME.StartDate,
|
|
27626
|
+
icon: "/images/calendar.svg",
|
|
27627
|
+
handleChangeFilters: handleChangeFilters
|
|
27628
|
+
}, {
|
|
27629
|
+
name: FILTER_NAME.EndDate,
|
|
27630
|
+
icon: "/images/calendar.svg",
|
|
27631
|
+
handleChangeFilters: handleChangeFilters
|
|
27598
27632
|
}, {
|
|
27599
27633
|
name: FILTER_NAME.Gender,
|
|
27600
27634
|
icon: "/images/gender-icon.svg",
|