mario-education 2.4.26-admin → 2.4.27-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 -1
- package/dist/MarioFramework.Education/ClientApp/src/containers/Classes/components/StudentItemSelector.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/BarAndAreaChart.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/ColumnChartAndPercent.d.ts +2 -6
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/HeaderChart/HeaderChart.d.ts +2 -1
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/LineChart.d.ts +9 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/types.d.ts +10 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/utils.d.ts +5 -3
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useBehavior.d.ts +4 -2
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useChartDatas.d.ts +7 -2
- package/dist/MarioFramework.Education/ClientApp/src/utils/type.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.js +582 -335
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +582 -335
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19641,6 +19641,40 @@ var CompareTeacher = function CompareTeacher() {
|
|
|
19641
19641
|
}, "No compare result."))));
|
|
19642
19642
|
};
|
|
19643
19643
|
|
|
19644
|
+
var LegalGenderType;
|
|
19645
|
+
|
|
19646
|
+
(function (LegalGenderType) {
|
|
19647
|
+
LegalGenderType[LegalGenderType["Male"] = 0] = "Male";
|
|
19648
|
+
LegalGenderType[LegalGenderType["Female"] = 1] = "Female";
|
|
19649
|
+
})(LegalGenderType || (LegalGenderType = {}));
|
|
19650
|
+
|
|
19651
|
+
var MtssType;
|
|
19652
|
+
|
|
19653
|
+
(function (MtssType) {
|
|
19654
|
+
MtssType[MtssType["Tier1"] = 0] = "Tier1";
|
|
19655
|
+
MtssType[MtssType["Tier2"] = 1] = "Tier2";
|
|
19656
|
+
MtssType[MtssType["Tier3"] = 2] = "Tier3";
|
|
19657
|
+
})(MtssType || (MtssType = {}));
|
|
19658
|
+
|
|
19659
|
+
var FILTER_YEAR;
|
|
19660
|
+
|
|
19661
|
+
(function (FILTER_YEAR) {
|
|
19662
|
+
FILTER_YEAR[FILTER_YEAR["THIS_YEAR"] = 0] = "THIS_YEAR";
|
|
19663
|
+
FILTER_YEAR[FILTER_YEAR["LAST_YEAR"] = 1] = "LAST_YEAR";
|
|
19664
|
+
FILTER_YEAR[FILTER_YEAR["LAST_QUARTER"] = 2] = "LAST_QUARTER";
|
|
19665
|
+
FILTER_YEAR[FILTER_YEAR["LAST_MONTH"] = 3] = "LAST_MONTH";
|
|
19666
|
+
FILTER_YEAR[FILTER_YEAR["LAST_DAY"] = 4] = "LAST_DAY";
|
|
19667
|
+
})(FILTER_YEAR || (FILTER_YEAR = {}));
|
|
19668
|
+
|
|
19669
|
+
var TYPECHART;
|
|
19670
|
+
|
|
19671
|
+
(function (TYPECHART) {
|
|
19672
|
+
TYPECHART[TYPECHART["AREA"] = 0] = "AREA";
|
|
19673
|
+
TYPECHART[TYPECHART["BAR"] = 1] = "BAR";
|
|
19674
|
+
TYPECHART[TYPECHART["LINE"] = 2] = "LINE";
|
|
19675
|
+
TYPECHART[TYPECHART["BOTH"] = 3] = "BOTH";
|
|
19676
|
+
})(TYPECHART || (TYPECHART = {}));
|
|
19677
|
+
|
|
19644
19678
|
var styles$1 = {"dashboard-card":"_1Jgr2","quantity-table":"_3Thdy","size-icon":"_1WLBo","block-dashboard":"_10Pgm","size-arrow":"_3jPb_","color-down":"_1c43y","color-up":"_F1afY","box-filter":"_1kqUQ","title-card":"_10hbz","value-card":"_2rmw_","deviant-card":"_1tdQu","filter-card":"_2BvFN","box-skill-item":"_2TBTW","numerical-order":"_3XXJp","backoround-top-skill":"_LCuWQ","color-filter":"_3x9D7","btn-filter":"_2In63","block-collapse":"_1Vhg_","form-date-picker":"_6yLxd","bock-filter-left":"_h74SO","bock-filter-right":"_3e2pi","form-filter-right":"_ntUB6","form-filter-left":"_1DlZ4","bock-filter-wrap":"_1tYDM","title-card-box":"_3hSow","box-item":"_1yuC9","image-no-data":"_2PMoX","image-grade":"_3ZX0b","chart-data":"_2asi-","apexcharts-datalabels":"_muT01","apexcharts-pie-label":"_35BzZ","image-custom":"_3pkbc","image-special-need":"_16MpB","title-dashboard":"_CHu-i","box-chart":"_3Y-Dd","block-filter-right":"_1YJnk","shadow-lg":"_2eMbe","chart-header-wrapper":"_6ZvFg","devide-component":"_24CNV","header-chart":"_2vtSi","header-left":"_IpsVf","icon-chart":"_gzxWe","header-right":"_37IcR","header-title":"_2G6Wz","button-export":"_3xpNv","button-content":"_3H5Ly","button-icon":"_J_n-D","icon-config":"_3AALV","headẻ-chart":"_g5-bn","btn-show-chart":"_2htKu","checkbox-chart":"_1qXAT","column-chart-percent":"_3NgrB","chart-background":"_32fu3","custom-marker":"_DmMzw","mark-custom":"_1eUXn","item-legend":"_3hrrC","label-legend-custom":"_Q-iiW","mark-legend":"_cD4ey","label-chart":"_24PRg","percent":"_2HWhv","listItem":"_2Hdbu","item":"_3RJ2T","student-by-age":"_38ikt","total-student":"_1TnWs","pie-chart":"_3BTJi","options-gender":"_1Ws0m","legend":"_2HnO_","text-lengend":"_2BFJw","student-by-grade":"_2az-l","bubble-chart-custom":"_2j8fp","x-axis-custom-wrap":"_1BN5z","axis-content":"_1rYav","legend-wrap":"_3-zAs","list-percent":"_1PPhv","percent-item":"_1rjWR","chart-custom":"_f-Ti4","chart-buddle":"_TPa6x","title-grade":"_1hZ_V","title-chart":"_pFFg9"};
|
|
19645
19679
|
|
|
19646
19680
|
var CheckboxCustom = function CheckboxCustom(_ref) {
|
|
@@ -19693,6 +19727,201 @@ var CheckboxCustom = function CheckboxCustom(_ref) {
|
|
|
19693
19727
|
}));
|
|
19694
19728
|
};
|
|
19695
19729
|
|
|
19730
|
+
var PlusButton = function PlusButton(_ref) {
|
|
19731
|
+
var _ref$isActive = _ref.isActive,
|
|
19732
|
+
isActive = _ref$isActive === void 0 ? false : _ref$isActive;
|
|
19733
|
+
return React__default.createElement("div", {
|
|
19734
|
+
style: {
|
|
19735
|
+
transform: isActive ? "rotate(45deg)" : ""
|
|
19736
|
+
}
|
|
19737
|
+
}, React__default.createElement("svg", {
|
|
19738
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19739
|
+
width: "24",
|
|
19740
|
+
height: "24",
|
|
19741
|
+
viewBox: "0 0 24 24",
|
|
19742
|
+
fill: "none"
|
|
19743
|
+
}, React__default.createElement("rect", {
|
|
19744
|
+
width: "24",
|
|
19745
|
+
height: "24",
|
|
19746
|
+
rx: "12",
|
|
19747
|
+
fill: !isActive ? "#808080" : "#D9D9D9"
|
|
19748
|
+
}), React__default.createElement("path", {
|
|
19749
|
+
"fill-rule": "evenodd",
|
|
19750
|
+
"clip-rule": "evenodd",
|
|
19751
|
+
d: "M12.7143 7H11.2857V11.2857H7V12.7143H11.2857V17H12.7143V12.7143H17V11.2857H12.7143V7Z",
|
|
19752
|
+
fill: "white"
|
|
19753
|
+
})));
|
|
19754
|
+
};
|
|
19755
|
+
|
|
19756
|
+
var HeaderChart = function HeaderChart(_ref) {
|
|
19757
|
+
var title = _ref.title,
|
|
19758
|
+
isOpen = _ref.isOpen,
|
|
19759
|
+
onToggle = _ref.onToggle,
|
|
19760
|
+
_ref$isShowChangeChar = _ref.isShowChangeChart,
|
|
19761
|
+
isShowChangeChart = _ref$isShowChangeChar === void 0 ? false : _ref$isShowChangeChar,
|
|
19762
|
+
_ref$typeChart = _ref.typeChart,
|
|
19763
|
+
typeChart = _ref$typeChart === void 0 ? TYPECHART.BAR : _ref$typeChart,
|
|
19764
|
+
onChangeChart = _ref.onChangeChart,
|
|
19765
|
+
options = _ref.options;
|
|
19766
|
+
return React__default.createElement("div", {
|
|
19767
|
+
className: "d-flex justify-content-between align-items-center " + styles$1["header-chart"] + " "
|
|
19768
|
+
}, React__default.createElement("div", {
|
|
19769
|
+
className: "" + styles$1["header-left"]
|
|
19770
|
+
}, React__default.createElement("span", {
|
|
19771
|
+
className: styles$1["header-title"] + " pr-2"
|
|
19772
|
+
}, title), React__default.createElement("i", {
|
|
19773
|
+
className: styles$1["icon-chart"] + " fal fa-info-circle cursor-pointer"
|
|
19774
|
+
})), React__default.createElement("div", {
|
|
19775
|
+
className: "" + styles$1["header-right"]
|
|
19776
|
+
}, isOpen && isShowChangeChart && (options === null || options === void 0 ? void 0 : options.length) && React__default.createElement("div", {
|
|
19777
|
+
className: "d-flex align-items-center d-inline-block pr-4"
|
|
19778
|
+
}, React__default.createElement("div", {
|
|
19779
|
+
className: "d-flex align-items-center px-2 " + styles$1["checkbox-chart"]
|
|
19780
|
+
}, React__default.createElement("div", {
|
|
19781
|
+
className: "pr-4 d-flex",
|
|
19782
|
+
onClick: function onClick() {
|
|
19783
|
+
return onChangeChart(options[0].value);
|
|
19784
|
+
},
|
|
19785
|
+
style: {
|
|
19786
|
+
cursor: "pointer"
|
|
19787
|
+
}
|
|
19788
|
+
}, React__default.createElement(CheckboxCustom, {
|
|
19789
|
+
width: 16,
|
|
19790
|
+
height: 16,
|
|
19791
|
+
isActive: typeChart === options[0].value || typeChart === TYPECHART.BOTH,
|
|
19792
|
+
className: "pr-2"
|
|
19793
|
+
}), React__default.createElement("label", {
|
|
19794
|
+
className: "" + styles$1["label-chart"],
|
|
19795
|
+
style: {
|
|
19796
|
+
color: "#252733",
|
|
19797
|
+
marginBottom: 0,
|
|
19798
|
+
cursor: "pointer"
|
|
19799
|
+
}
|
|
19800
|
+
}, "Ridge charts"))), React__default.createElement("div", {
|
|
19801
|
+
className: "d-inline-block px-2 " + styles$1["checkbox-chart"]
|
|
19802
|
+
}, React__default.createElement("div", {
|
|
19803
|
+
className: "pr-4 d-flex",
|
|
19804
|
+
onClick: function onClick() {
|
|
19805
|
+
return onChangeChart(options[1].value);
|
|
19806
|
+
},
|
|
19807
|
+
style: {
|
|
19808
|
+
cursor: "pointer"
|
|
19809
|
+
}
|
|
19810
|
+
}, React__default.createElement(CheckboxCustom, {
|
|
19811
|
+
width: 16,
|
|
19812
|
+
height: 16,
|
|
19813
|
+
isActive: typeChart === options[1].value || typeChart === TYPECHART.BOTH,
|
|
19814
|
+
className: "pr-2"
|
|
19815
|
+
}), React__default.createElement("label", {
|
|
19816
|
+
className: "" + styles$1["label-chart"],
|
|
19817
|
+
style: {
|
|
19818
|
+
color: "#252733",
|
|
19819
|
+
marginBottom: 0,
|
|
19820
|
+
cursor: "pointer"
|
|
19821
|
+
}
|
|
19822
|
+
}, options[1].value === TYPECHART.BAR ? "Bar charts" : "Line charts")))), React__default.createElement("i", {
|
|
19823
|
+
className: "fas fa-ellipsis-v pr-4 " + styles$1["icon-config"]
|
|
19824
|
+
}), React__default.createElement("div", {
|
|
19825
|
+
onClick: onToggle,
|
|
19826
|
+
className: styles$1["btn-show-chart"],
|
|
19827
|
+
style: {
|
|
19828
|
+
cursor: "pointer"
|
|
19829
|
+
}
|
|
19830
|
+
}, React__default.createElement(PlusButton, {
|
|
19831
|
+
isActive: isOpen
|
|
19832
|
+
}))));
|
|
19833
|
+
};
|
|
19834
|
+
|
|
19835
|
+
var useBehavior = function useBehavior(initialTypeChart) {
|
|
19836
|
+
var _useState = React.useState(""),
|
|
19837
|
+
teacherUserId = _useState[0],
|
|
19838
|
+
setTeacherUserId = _useState[1];
|
|
19839
|
+
|
|
19840
|
+
var _useState2 = React.useState(initialTypeChart.map(function () {
|
|
19841
|
+
return false;
|
|
19842
|
+
})),
|
|
19843
|
+
chartIsOpened = _useState2[0],
|
|
19844
|
+
setChartIsOpened = _useState2[1];
|
|
19845
|
+
|
|
19846
|
+
var _useState3 = React.useState(initialTypeChart),
|
|
19847
|
+
typeChartList = _useState3[0],
|
|
19848
|
+
setTypeChartList = _useState3[1];
|
|
19849
|
+
|
|
19850
|
+
var onToggle = function onToggle(idx) {
|
|
19851
|
+
var newStateChart = [].concat(chartIsOpened);
|
|
19852
|
+
newStateChart[idx] = !newStateChart[idx];
|
|
19853
|
+
setChartIsOpened(newStateChart);
|
|
19854
|
+
};
|
|
19855
|
+
|
|
19856
|
+
var onChangeChart = function onChangeChart(idx, type) {
|
|
19857
|
+
switch (type) {
|
|
19858
|
+
case TYPECHART.AREA:
|
|
19859
|
+
if (typeChartList[idx] === TYPECHART.BAR || typeChartList[idx] === TYPECHART.LINE) {
|
|
19860
|
+
setTypeChartList(typeChartList.map(function (cur, index) {
|
|
19861
|
+
return index === idx ? TYPECHART.BOTH : cur;
|
|
19862
|
+
}));
|
|
19863
|
+
return;
|
|
19864
|
+
}
|
|
19865
|
+
|
|
19866
|
+
if (typeChartList[idx] === TYPECHART.BOTH) {
|
|
19867
|
+
setTypeChartList(typeChartList.map(function (cur, index) {
|
|
19868
|
+
return index === idx ? initialTypeChart[idx] : cur;
|
|
19869
|
+
}));
|
|
19870
|
+
}
|
|
19871
|
+
|
|
19872
|
+
return;
|
|
19873
|
+
|
|
19874
|
+
case TYPECHART.BAR:
|
|
19875
|
+
if (typeChartList[idx] === TYPECHART.AREA) {
|
|
19876
|
+
setTypeChartList(typeChartList.map(function (cur, index) {
|
|
19877
|
+
return index === idx ? TYPECHART.BOTH : cur;
|
|
19878
|
+
}));
|
|
19879
|
+
return;
|
|
19880
|
+
}
|
|
19881
|
+
|
|
19882
|
+
if (typeChartList[idx] === TYPECHART.BOTH) {
|
|
19883
|
+
setTypeChartList(typeChartList.map(function (cur, index) {
|
|
19884
|
+
return index === idx ? TYPECHART.AREA : cur;
|
|
19885
|
+
}));
|
|
19886
|
+
}
|
|
19887
|
+
|
|
19888
|
+
return;
|
|
19889
|
+
|
|
19890
|
+
case TYPECHART.LINE:
|
|
19891
|
+
if (typeChartList[idx] === TYPECHART.AREA) {
|
|
19892
|
+
setTypeChartList(typeChartList.map(function (cur, index) {
|
|
19893
|
+
return index === idx ? TYPECHART.BOTH : cur;
|
|
19894
|
+
}));
|
|
19895
|
+
return;
|
|
19896
|
+
}
|
|
19897
|
+
|
|
19898
|
+
if (typeChartList[idx] === TYPECHART.BOTH) {
|
|
19899
|
+
setTypeChartList(typeChartList.map(function (cur, index) {
|
|
19900
|
+
return index === idx ? TYPECHART.AREA : cur;
|
|
19901
|
+
}));
|
|
19902
|
+
}
|
|
19903
|
+
|
|
19904
|
+
return;
|
|
19905
|
+
|
|
19906
|
+
default:
|
|
19907
|
+
return;
|
|
19908
|
+
}
|
|
19909
|
+
};
|
|
19910
|
+
|
|
19911
|
+
var changeCurrentTeacherUserId = function changeCurrentTeacherUserId(userId) {
|
|
19912
|
+
setTeacherUserId(userId);
|
|
19913
|
+
};
|
|
19914
|
+
|
|
19915
|
+
return {
|
|
19916
|
+
chartIsOpened: chartIsOpened,
|
|
19917
|
+
onToggle: onToggle,
|
|
19918
|
+
onChangeChart: onChangeChart,
|
|
19919
|
+
typeChartList: typeChartList,
|
|
19920
|
+
teacherUserId: teacherUserId,
|
|
19921
|
+
changeCurrentTeacherUserId: changeCurrentTeacherUserId
|
|
19922
|
+
};
|
|
19923
|
+
};
|
|
19924
|
+
|
|
19696
19925
|
var INITIAL_BEST_FRIENDS = {
|
|
19697
19926
|
friends: 0,
|
|
19698
19927
|
couldBeFriends: 0,
|
|
@@ -25445,31 +25674,6 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
25445
25674
|
})));
|
|
25446
25675
|
});
|
|
25447
25676
|
|
|
25448
|
-
var LegalGenderType;
|
|
25449
|
-
|
|
25450
|
-
(function (LegalGenderType) {
|
|
25451
|
-
LegalGenderType[LegalGenderType["Male"] = 0] = "Male";
|
|
25452
|
-
LegalGenderType[LegalGenderType["Female"] = 1] = "Female";
|
|
25453
|
-
})(LegalGenderType || (LegalGenderType = {}));
|
|
25454
|
-
|
|
25455
|
-
var MtssType;
|
|
25456
|
-
|
|
25457
|
-
(function (MtssType) {
|
|
25458
|
-
MtssType[MtssType["Tier1"] = 0] = "Tier1";
|
|
25459
|
-
MtssType[MtssType["Tier2"] = 1] = "Tier2";
|
|
25460
|
-
MtssType[MtssType["Tier3"] = 2] = "Tier3";
|
|
25461
|
-
})(MtssType || (MtssType = {}));
|
|
25462
|
-
|
|
25463
|
-
var FILTER_YEAR;
|
|
25464
|
-
|
|
25465
|
-
(function (FILTER_YEAR) {
|
|
25466
|
-
FILTER_YEAR[FILTER_YEAR["THIS_YEAR"] = 0] = "THIS_YEAR";
|
|
25467
|
-
FILTER_YEAR[FILTER_YEAR["LAST_YEAR"] = 1] = "LAST_YEAR";
|
|
25468
|
-
FILTER_YEAR[FILTER_YEAR["LAST_QUARTER"] = 2] = "LAST_QUARTER";
|
|
25469
|
-
FILTER_YEAR[FILTER_YEAR["LAST_MONTH"] = 3] = "LAST_MONTH";
|
|
25470
|
-
FILTER_YEAR[FILTER_YEAR["LAST_DAY"] = 4] = "LAST_DAY";
|
|
25471
|
-
})(FILTER_YEAR || (FILTER_YEAR = {}));
|
|
25472
|
-
|
|
25473
25677
|
var gradeOptions = function gradeOptions(grades, studentUserId) {
|
|
25474
25678
|
var result = !studentUserId ? GRAGE_DEFAULT : GRAGE_DEFAULT.filter(function (val) {
|
|
25475
25679
|
return grades.indexOf(val) != -1;
|
|
@@ -25494,7 +25698,8 @@ var learningStrategyChartOptions = function learningStrategyChartOptions(labelNa
|
|
|
25494
25698
|
horizontal: true,
|
|
25495
25699
|
dataLabels: {
|
|
25496
25700
|
position: "top"
|
|
25497
|
-
}
|
|
25701
|
+
},
|
|
25702
|
+
borderRadius: 5
|
|
25498
25703
|
}
|
|
25499
25704
|
},
|
|
25500
25705
|
stroke: {
|
|
@@ -25521,6 +25726,8 @@ var learningStrategyChartOptions = function learningStrategyChartOptions(labelNa
|
|
|
25521
25726
|
}
|
|
25522
25727
|
},
|
|
25523
25728
|
yaxis: {
|
|
25729
|
+
min: 0,
|
|
25730
|
+
max: 100,
|
|
25524
25731
|
labels: {
|
|
25525
25732
|
show: true,
|
|
25526
25733
|
align: "left",
|
|
@@ -25646,6 +25853,11 @@ var studentByAgeOptions = function studentByAgeOptions(series) {
|
|
|
25646
25853
|
dataLabels: {
|
|
25647
25854
|
enabled: false
|
|
25648
25855
|
},
|
|
25856
|
+
plotOptions: {
|
|
25857
|
+
bar: {
|
|
25858
|
+
borderRadius: 5
|
|
25859
|
+
}
|
|
25860
|
+
},
|
|
25649
25861
|
grid: {
|
|
25650
25862
|
borderColor: "#F6F6F6"
|
|
25651
25863
|
},
|
|
@@ -25830,7 +26042,7 @@ var getConvertMinuteToHour = function getConvertMinuteToHour(timeSecond) {
|
|
|
25830
26042
|
|
|
25831
26043
|
return hTime;
|
|
25832
26044
|
};
|
|
25833
|
-
var readinesToLearnoptions = function readinesToLearnoptions(
|
|
26045
|
+
var readinesToLearnoptions = function readinesToLearnoptions(seriesName) {
|
|
25834
26046
|
return {
|
|
25835
26047
|
chart: {
|
|
25836
26048
|
height: 450,
|
|
@@ -25852,6 +26064,9 @@ var readinesToLearnoptions = function readinesToLearnoptions(data, seriesName) {
|
|
|
25852
26064
|
tickPlacement: "between",
|
|
25853
26065
|
labels: {
|
|
25854
26066
|
show: false
|
|
26067
|
+
},
|
|
26068
|
+
tooltip: {
|
|
26069
|
+
enabled: false
|
|
25855
26070
|
}
|
|
25856
26071
|
},
|
|
25857
26072
|
yaxis: {
|
|
@@ -25860,7 +26075,7 @@ var readinesToLearnoptions = function readinesToLearnoptions(data, seriesName) {
|
|
|
25860
26075
|
tickAmount: 10,
|
|
25861
26076
|
labels: {
|
|
25862
26077
|
formatter: function formatter(value) {
|
|
25863
|
-
return value + "%";
|
|
26078
|
+
return Math.round(value) !== value ? value.toFixed(2) + "%" : value + "%";
|
|
25864
26079
|
}
|
|
25865
26080
|
}
|
|
25866
26081
|
},
|
|
@@ -25870,16 +26085,16 @@ var readinesToLearnoptions = function readinesToLearnoptions(data, seriesName) {
|
|
|
25870
26085
|
show: false
|
|
25871
26086
|
},
|
|
25872
26087
|
y: {
|
|
25873
|
-
formatter:
|
|
25874
|
-
var _data$opts$seriesInde;
|
|
25875
|
-
|
|
25876
|
-
return (_data$opts$seriesInde = data[opts.seriesIndex]) === null || _data$opts$seriesInde === void 0 ? void 0 : _data$opts$seriesInde.studentPercentQuestion[opts.dataPointIndex].studentName;
|
|
25877
|
-
},
|
|
26088
|
+
formatter: undefined,
|
|
25878
26089
|
title: {
|
|
25879
26090
|
formatter: function formatter() {
|
|
25880
|
-
return "
|
|
26091
|
+
return "Percent";
|
|
25881
26092
|
}
|
|
25882
26093
|
}
|
|
26094
|
+
},
|
|
26095
|
+
z: {
|
|
26096
|
+
formatter: undefined,
|
|
26097
|
+
title: "Student: "
|
|
25883
26098
|
}
|
|
25884
26099
|
},
|
|
25885
26100
|
labels: seriesName,
|
|
@@ -25908,7 +26123,7 @@ var convertDataToSeriesBullderChart = function convertDataToSeriesBullderChart(d
|
|
|
25908
26123
|
return {
|
|
25909
26124
|
name: i.questionText.replace("<p>", "").replace("</p>", ""),
|
|
25910
26125
|
data: ((_i$studentPercentQues = i.studentPercentQuestion) === null || _i$studentPercentQues === void 0 ? void 0 : _i$studentPercentQues.map(function (question) {
|
|
25911
|
-
return [getRandomArbitrary((index + 1) * 1000 - 330, (index + 1) * 1000 + 330), question.percentQuestion];
|
|
26126
|
+
return [getRandomArbitrary((index + 1) * 1000 - 330, (index + 1) * 1000 + 330), question.percentQuestion, question.studentName];
|
|
25912
26127
|
})) || []
|
|
25913
26128
|
};
|
|
25914
26129
|
});
|
|
@@ -25922,6 +26137,11 @@ var optionColumnChartAndPercents = function optionColumnChartAndPercents(months,
|
|
|
25922
26137
|
show: false
|
|
25923
26138
|
}
|
|
25924
26139
|
},
|
|
26140
|
+
plotOptions: {
|
|
26141
|
+
bar: {
|
|
26142
|
+
borderRadius: 5
|
|
26143
|
+
}
|
|
26144
|
+
},
|
|
25925
26145
|
dataLabels: {
|
|
25926
26146
|
enabled: false
|
|
25927
26147
|
},
|
|
@@ -25993,7 +26213,7 @@ var optionColumnChartAndPercents = function optionColumnChartAndPercents(months,
|
|
|
25993
26213
|
}
|
|
25994
26214
|
};
|
|
25995
26215
|
};
|
|
25996
|
-
var
|
|
26216
|
+
var optionLineChart = function optionLineChart(months, activeData) {
|
|
25997
26217
|
return {
|
|
25998
26218
|
chart: {
|
|
25999
26219
|
height: 350,
|
|
@@ -26006,14 +26226,14 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData) {
|
|
|
26006
26226
|
enabled: false
|
|
26007
26227
|
},
|
|
26008
26228
|
fill: {
|
|
26009
|
-
opacity:
|
|
26229
|
+
opacity: 1
|
|
26010
26230
|
},
|
|
26011
26231
|
colors: COLOR_CHART_AND_PERCENTS.filter(function (_, index) {
|
|
26012
26232
|
return activeData[index];
|
|
26013
26233
|
}),
|
|
26014
26234
|
stroke: {
|
|
26015
|
-
curve: "
|
|
26016
|
-
show:
|
|
26235
|
+
curve: "smooth",
|
|
26236
|
+
show: true,
|
|
26017
26237
|
colors: COLOR_CHART_AND_PERCENTS.filter(function (_, index) {
|
|
26018
26238
|
return activeData[index];
|
|
26019
26239
|
}),
|
|
@@ -26073,37 +26293,122 @@ var optionBarChartAndArea = function optionBarChartAndArea(months, activeData) {
|
|
|
26073
26293
|
}
|
|
26074
26294
|
};
|
|
26075
26295
|
};
|
|
26076
|
-
var
|
|
26077
|
-
return
|
|
26078
|
-
|
|
26079
|
-
|
|
26080
|
-
|
|
26081
|
-
|
|
26082
|
-
|
|
26083
|
-
|
|
26084
|
-
|
|
26085
|
-
|
|
26086
|
-
|
|
26087
|
-
|
|
26088
|
-
|
|
26089
|
-
|
|
26090
|
-
|
|
26091
|
-
|
|
26092
|
-
|
|
26093
|
-
|
|
26094
|
-
|
|
26095
|
-
|
|
26096
|
-
|
|
26097
|
-
|
|
26098
|
-
}
|
|
26099
|
-
|
|
26100
|
-
|
|
26101
|
-
|
|
26102
|
-
|
|
26103
|
-
return
|
|
26104
|
-
})
|
|
26105
|
-
|
|
26106
|
-
|
|
26296
|
+
var optionBarChartAndArea = function optionBarChartAndArea(months, activeData) {
|
|
26297
|
+
return {
|
|
26298
|
+
chart: {
|
|
26299
|
+
height: 350,
|
|
26300
|
+
stacked: false,
|
|
26301
|
+
toolbar: {
|
|
26302
|
+
show: false
|
|
26303
|
+
}
|
|
26304
|
+
},
|
|
26305
|
+
plotOptions: {
|
|
26306
|
+
bar: {
|
|
26307
|
+
borderRadius: 5
|
|
26308
|
+
}
|
|
26309
|
+
},
|
|
26310
|
+
dataLabels: {
|
|
26311
|
+
enabled: false
|
|
26312
|
+
},
|
|
26313
|
+
fill: {
|
|
26314
|
+
opacity: 0.5
|
|
26315
|
+
},
|
|
26316
|
+
colors: COLOR_CHART_AND_PERCENTS.filter(function (_, index) {
|
|
26317
|
+
return activeData[index];
|
|
26318
|
+
}),
|
|
26319
|
+
stroke: {
|
|
26320
|
+
curve: "smooth",
|
|
26321
|
+
show: false,
|
|
26322
|
+
colors: COLOR_CHART_AND_PERCENTS.filter(function (_, index) {
|
|
26323
|
+
return activeData[index];
|
|
26324
|
+
}),
|
|
26325
|
+
width: 3,
|
|
26326
|
+
dashArray: 0
|
|
26327
|
+
},
|
|
26328
|
+
xaxis: {
|
|
26329
|
+
categories: months,
|
|
26330
|
+
labels: {
|
|
26331
|
+
show: true,
|
|
26332
|
+
style: {
|
|
26333
|
+
colors: ["#808080"],
|
|
26334
|
+
fontSize: "16px",
|
|
26335
|
+
fontFamily: "Roboto",
|
|
26336
|
+
fontWeight: 400,
|
|
26337
|
+
cssClass: "apexcharts-yaxis-label"
|
|
26338
|
+
}
|
|
26339
|
+
}
|
|
26340
|
+
},
|
|
26341
|
+
yaxis: {
|
|
26342
|
+
tickAmount: 2,
|
|
26343
|
+
min: 0,
|
|
26344
|
+
max: 100,
|
|
26345
|
+
labels: {
|
|
26346
|
+
show: true,
|
|
26347
|
+
align: "right",
|
|
26348
|
+
minWidth: 0,
|
|
26349
|
+
maxWidth: 160,
|
|
26350
|
+
style: {
|
|
26351
|
+
colors: ["#808080"],
|
|
26352
|
+
fontSize: "16px",
|
|
26353
|
+
fontFamily: "Roboto",
|
|
26354
|
+
fontWeight: 400,
|
|
26355
|
+
cssClass: "apexcharts-yaxis-label"
|
|
26356
|
+
},
|
|
26357
|
+
formatter: function formatter(value) {
|
|
26358
|
+
return value + "%";
|
|
26359
|
+
},
|
|
26360
|
+
offsetX: 0,
|
|
26361
|
+
offsetY: 0,
|
|
26362
|
+
rotate: 0
|
|
26363
|
+
},
|
|
26364
|
+
decimalsInFloat: 0
|
|
26365
|
+
},
|
|
26366
|
+
tooltip: {
|
|
26367
|
+
y: {
|
|
26368
|
+
formatter: function formatter(value) {
|
|
26369
|
+
return value.toFixed(2) + "%";
|
|
26370
|
+
}
|
|
26371
|
+
},
|
|
26372
|
+
onDatasetHover: {
|
|
26373
|
+
highlightDataSeries: true
|
|
26374
|
+
}
|
|
26375
|
+
},
|
|
26376
|
+
legend: {
|
|
26377
|
+
show: false
|
|
26378
|
+
}
|
|
26379
|
+
};
|
|
26380
|
+
};
|
|
26381
|
+
var convertDataToDataChart = function convertDataToDataChart(data) {
|
|
26382
|
+
return data.reduce(function (acc, cur) {
|
|
26383
|
+
return [].concat(acc, cur.resultQuestion.map(function (i) {
|
|
26384
|
+
var quests = i.questionText.split("</p>");
|
|
26385
|
+
return quests[0].replace("<p>", "").trim();
|
|
26386
|
+
}).filter(function (i) {
|
|
26387
|
+
return !!i && !acc.includes(i);
|
|
26388
|
+
}));
|
|
26389
|
+
}, []);
|
|
26390
|
+
};
|
|
26391
|
+
var convertToSeriesColumnChartAndPercent = function convertToSeriesColumnChartAndPercent(dataCharts, data) {
|
|
26392
|
+
return dataCharts.map(function (dataName) {
|
|
26393
|
+
return {
|
|
26394
|
+
name: dataName,
|
|
26395
|
+
data: data.map(function (i) {
|
|
26396
|
+
var questionItem = i.resultQuestion.find(function (question) {
|
|
26397
|
+
return question.questionText.includes(dataName);
|
|
26398
|
+
});
|
|
26399
|
+
return !!questionItem ? questionItem.avgOfStudentChoice : 0;
|
|
26400
|
+
})
|
|
26401
|
+
};
|
|
26402
|
+
});
|
|
26403
|
+
};
|
|
26404
|
+
var convertToAvg = function convertToAvg(dataCharts, data, months) {
|
|
26405
|
+
return dataCharts.map(function (dataName) {
|
|
26406
|
+
return Number((data.map(function (i) {
|
|
26407
|
+
var questionItem = i.resultQuestion.find(function (question) {
|
|
26408
|
+
return question.questionText.includes(dataName);
|
|
26409
|
+
});
|
|
26410
|
+
return !!questionItem ? questionItem.avgOfStudentChoice : 0;
|
|
26411
|
+
}).reduce(function (acc, curr) {
|
|
26107
26412
|
return acc + curr;
|
|
26108
26413
|
}, 0) / months.length).toFixed(2));
|
|
26109
26414
|
});
|
|
@@ -26113,10 +26418,10 @@ var seriesNameBubbleChartCustom = function seriesNameBubbleChartCustom(series) {
|
|
|
26113
26418
|
return i.questionText.replace("<p>", "").replace("</p>", "");
|
|
26114
26419
|
});
|
|
26115
26420
|
};
|
|
26116
|
-
var mergeBarChartAndArea = function mergeBarChartAndArea(series) {
|
|
26421
|
+
var mergeBarChartAndArea = function mergeBarChartAndArea(series, isHasLineChart) {
|
|
26117
26422
|
var barChartSeries = series.map(function (i) {
|
|
26118
26423
|
return _extends({}, i, {
|
|
26119
|
-
type: "bar"
|
|
26424
|
+
type: isHasLineChart ? "line" : "bar"
|
|
26120
26425
|
});
|
|
26121
26426
|
});
|
|
26122
26427
|
var areaChartSeries = series.map(function (i) {
|
|
@@ -26127,9 +26432,9 @@ var mergeBarChartAndArea = function mergeBarChartAndArea(series) {
|
|
|
26127
26432
|
return [].concat(barChartSeries, areaChartSeries);
|
|
26128
26433
|
};
|
|
26129
26434
|
var getLastQuarterRange = function getLastQuarterRange() {
|
|
26130
|
-
var
|
|
26131
|
-
var start = moment().quarter(
|
|
26132
|
-
var end = moment().quarter(
|
|
26435
|
+
var lastQuarter = moment().utc().quarter() - 1;
|
|
26436
|
+
var start = lastQuarter ? moment().utc().quarter(lastQuarter).startOf("quarter").valueOf() : moment().add(-1, "years").utc().quarter(4).startOf("quarter").valueOf();
|
|
26437
|
+
var end = lastQuarter ? moment().utc().quarter(lastQuarter).endOf("quarter").valueOf() : moment().add(-1, "years").utc().quarter(4).endOf("quarter").valueOf();
|
|
26133
26438
|
return {
|
|
26134
26439
|
start: start,
|
|
26135
26440
|
end: end
|
|
@@ -26138,30 +26443,89 @@ var getLastQuarterRange = function getLastQuarterRange() {
|
|
|
26138
26443
|
var filterYearData = [{
|
|
26139
26444
|
label: "This Year",
|
|
26140
26445
|
value: FILTER_YEAR.THIS_YEAR,
|
|
26141
|
-
startDate: moment().startOf("year").valueOf(),
|
|
26142
|
-
endDate: moment().endOf("day").valueOf()
|
|
26446
|
+
startDate: moment().utc().startOf("year").valueOf(),
|
|
26447
|
+
endDate: moment().utc().endOf("day").valueOf()
|
|
26143
26448
|
}, {
|
|
26144
26449
|
label: "Last Year",
|
|
26145
26450
|
value: FILTER_YEAR.LAST_YEAR,
|
|
26146
|
-
startDate: moment().add(-1, "years").startOf("year").valueOf(),
|
|
26147
|
-
endDate: moment().add(-1, "years").endOf("year").valueOf()
|
|
26451
|
+
startDate: moment().utc().add(-1, "years").startOf("year").valueOf(),
|
|
26452
|
+
endDate: moment().utc().add(-1, "years").endOf("year").valueOf()
|
|
26148
26453
|
}, {
|
|
26149
26454
|
label: "Last Quarter",
|
|
26150
26455
|
value: FILTER_YEAR.LAST_QUARTER,
|
|
26151
26456
|
startDate: getLastQuarterRange().start,
|
|
26152
26457
|
endDate: getLastQuarterRange().end
|
|
26153
26458
|
}, {
|
|
26154
|
-
label: "Last 30
|
|
26459
|
+
label: "Last 30 Day",
|
|
26155
26460
|
value: FILTER_YEAR.LAST_MONTH,
|
|
26156
|
-
startDate: moment().add(-
|
|
26157
|
-
endDate: moment().
|
|
26461
|
+
startDate: moment().utc().add(-30, "days").startOf("day").valueOf(),
|
|
26462
|
+
endDate: moment().utc().endOf("day").valueOf()
|
|
26158
26463
|
}, {
|
|
26159
26464
|
label: "Last Day",
|
|
26160
26465
|
value: FILTER_YEAR.LAST_DAY,
|
|
26161
|
-
startDate: moment().add(-1, "days").startOf("day").valueOf(),
|
|
26162
|
-
endDate: moment().add(-1, "days").endOf("day").valueOf()
|
|
26466
|
+
startDate: moment().utc().add(-1, "days").startOf("day").valueOf(),
|
|
26467
|
+
endDate: moment().utc().add(-1, "days").endOf("day").valueOf()
|
|
26163
26468
|
}];
|
|
26164
26469
|
|
|
26470
|
+
var BubbleChartCustom = function BubbleChartCustom(_ref) {
|
|
26471
|
+
var data = _ref.data;
|
|
26472
|
+
if (!data) return React__default.createElement("div", {
|
|
26473
|
+
className: "flex justify-content-center align-items-center",
|
|
26474
|
+
style: {
|
|
26475
|
+
height: 450
|
|
26476
|
+
}
|
|
26477
|
+
}, React__default.createElement("div", null, "No Data"));
|
|
26478
|
+
var seriesName = seriesNameBubbleChartCustom(data);
|
|
26479
|
+
return React__default.createElement("div", {
|
|
26480
|
+
className: styles$1["bubble-chart-custom"]
|
|
26481
|
+
}, React__default.createElement("div", {
|
|
26482
|
+
className: styles$1["chart-custom"]
|
|
26483
|
+
}, React__default.createElement("div", {
|
|
26484
|
+
className: styles$1["list-percent"]
|
|
26485
|
+
}, PERCENT.map(function (i, index) {
|
|
26486
|
+
return React__default.createElement("div", {
|
|
26487
|
+
className: "" + styles$1["percent-item"],
|
|
26488
|
+
key: index
|
|
26489
|
+
}, i, "%");
|
|
26490
|
+
})), React__default.createElement("div", {
|
|
26491
|
+
className: styles$1["chart-buddle"]
|
|
26492
|
+
}, React__default.createElement("div", null, React__default.createElement(Chart, {
|
|
26493
|
+
options: readinesToLearnoptions(seriesName),
|
|
26494
|
+
type: "scatter",
|
|
26495
|
+
series: convertDataToSeriesBullderChart(data),
|
|
26496
|
+
width: "100%",
|
|
26497
|
+
height: 450
|
|
26498
|
+
}))), React__default.createElement("div", {
|
|
26499
|
+
className: styles$1["x-axis-custom-wrap"]
|
|
26500
|
+
}, React__default.createElement("div", {
|
|
26501
|
+
className: styles$1["axis-content"]
|
|
26502
|
+
}, seriesName.map(function (i, index) {
|
|
26503
|
+
return React__default.createElement("div", {
|
|
26504
|
+
key: index
|
|
26505
|
+
}, i);
|
|
26506
|
+
}))), React__default.createElement("div", {
|
|
26507
|
+
className: styles$1["legend-wrap"]
|
|
26508
|
+
}, seriesName.map(function (i, index) {
|
|
26509
|
+
return React__default.createElement("div", {
|
|
26510
|
+
className: "" + styles$1["item"],
|
|
26511
|
+
key: index
|
|
26512
|
+
}, React__default.createElement("div", {
|
|
26513
|
+
className: "" + styles$1["mark-custom"],
|
|
26514
|
+
style: {
|
|
26515
|
+
backgroundColor: COLOR_CHART_BUBBLE[index]
|
|
26516
|
+
}
|
|
26517
|
+
}), React__default.createElement("label", {
|
|
26518
|
+
className: "" + styles$1["label-legend-custom"]
|
|
26519
|
+
}, i));
|
|
26520
|
+
}))));
|
|
26521
|
+
};
|
|
26522
|
+
|
|
26523
|
+
function propsAreEqual(prevProps, nextProps) {
|
|
26524
|
+
return JSON.stringify(prevProps === null || prevProps === void 0 ? void 0 : prevProps.data) === JSON.stringify(nextProps === null || nextProps === void 0 ? void 0 : nextProps.data);
|
|
26525
|
+
}
|
|
26526
|
+
|
|
26527
|
+
var BubbleChartCustom$1 = React__default.memo(BubbleChartCustom, propsAreEqual);
|
|
26528
|
+
|
|
26165
26529
|
var AreaChart = function AreaChart(_ref) {
|
|
26166
26530
|
var series = _ref.series,
|
|
26167
26531
|
months = _ref.months,
|
|
@@ -26191,8 +26555,10 @@ var BarChart = function BarChart(_ref) {
|
|
|
26191
26555
|
var BarAndAreaChart = function BarAndAreaChart(_ref) {
|
|
26192
26556
|
var series = _ref.series,
|
|
26193
26557
|
months = _ref.months,
|
|
26194
|
-
activeColumn = _ref.activeColumn
|
|
26195
|
-
|
|
26558
|
+
activeColumn = _ref.activeColumn,
|
|
26559
|
+
_ref$isHasLineChart = _ref.isHasLineChart,
|
|
26560
|
+
isHasLineChart = _ref$isHasLineChart === void 0 ? false : _ref$isHasLineChart;
|
|
26561
|
+
var newseries = mergeBarChartAndArea(series, isHasLineChart);
|
|
26196
26562
|
return React__default.createElement(Chart, {
|
|
26197
26563
|
options: optionBarChartAndArea(months, activeColumn),
|
|
26198
26564
|
type: "line",
|
|
@@ -26202,18 +26568,31 @@ var BarAndAreaChart = function BarAndAreaChart(_ref) {
|
|
|
26202
26568
|
});
|
|
26203
26569
|
};
|
|
26204
26570
|
|
|
26205
|
-
var
|
|
26206
|
-
|
|
26207
|
-
|
|
26208
|
-
|
|
26209
|
-
|
|
26210
|
-
|
|
26211
|
-
|
|
26571
|
+
var LineChart = function LineChart(_ref) {
|
|
26572
|
+
var series = _ref.series,
|
|
26573
|
+
months = _ref.months,
|
|
26574
|
+
activeColumn = _ref.activeColumn;
|
|
26575
|
+
return React__default.createElement(Chart, {
|
|
26576
|
+
options: optionLineChart(months, activeColumn),
|
|
26577
|
+
type: "line",
|
|
26578
|
+
series: series,
|
|
26579
|
+
width: "100%",
|
|
26580
|
+
height: 450
|
|
26581
|
+
});
|
|
26582
|
+
};
|
|
26212
26583
|
|
|
26213
26584
|
var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
|
|
26214
26585
|
var data = _ref.data,
|
|
26215
26586
|
_ref$typeChart = _ref.typeChart,
|
|
26216
|
-
typeChart = _ref$typeChart === void 0 ? TYPECHART.BAR : _ref$typeChart
|
|
26587
|
+
typeChart = _ref$typeChart === void 0 ? TYPECHART.BAR : _ref$typeChart,
|
|
26588
|
+
_ref$isHasLineChart = _ref.isHasLineChart,
|
|
26589
|
+
isHasLineChart = _ref$isHasLineChart === void 0 ? false : _ref$isHasLineChart;
|
|
26590
|
+
if (!data) return React__default.createElement("div", {
|
|
26591
|
+
className: "flex justify-content-center align-items-center",
|
|
26592
|
+
style: {
|
|
26593
|
+
height: 450
|
|
26594
|
+
}
|
|
26595
|
+
}, React__default.createElement("div", null, "No Data"));
|
|
26217
26596
|
|
|
26218
26597
|
var _useState = React.useState([]),
|
|
26219
26598
|
activeColumn = _useState[0],
|
|
@@ -26299,6 +26678,11 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
|
|
|
26299
26678
|
activeColumn: activeColumn,
|
|
26300
26679
|
series: series
|
|
26301
26680
|
}), typeChart === TYPECHART.BOTH && React__default.createElement(BarAndAreaChart, {
|
|
26681
|
+
months: months,
|
|
26682
|
+
activeColumn: activeColumn,
|
|
26683
|
+
series: series,
|
|
26684
|
+
isHasLineChart: isHasLineChart
|
|
26685
|
+
}), typeChart === TYPECHART.LINE && React__default.createElement(LineChart, {
|
|
26302
26686
|
months: months,
|
|
26303
26687
|
activeColumn: activeColumn,
|
|
26304
26688
|
series: series
|
|
@@ -26325,226 +26709,23 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
|
|
|
26325
26709
|
})));
|
|
26326
26710
|
};
|
|
26327
26711
|
|
|
26328
|
-
var propsAreEqual = function propsAreEqual(preProps, nextProps) {
|
|
26712
|
+
var propsAreEqual$1 = function propsAreEqual(preProps, nextProps) {
|
|
26329
26713
|
return JSON.stringify(preProps) === JSON.stringify(nextProps);
|
|
26330
26714
|
};
|
|
26331
26715
|
|
|
26332
|
-
var ColumnChartAndPercent$1 = React__default.memo(ColumnChartAndPercent, propsAreEqual);
|
|
26333
|
-
|
|
26334
|
-
var PlusButton = function PlusButton(_ref) {
|
|
26335
|
-
var _ref$isActive = _ref.isActive,
|
|
26336
|
-
isActive = _ref$isActive === void 0 ? false : _ref$isActive;
|
|
26337
|
-
return React__default.createElement("div", {
|
|
26338
|
-
style: {
|
|
26339
|
-
transform: isActive ? "rotate(45deg)" : ""
|
|
26340
|
-
}
|
|
26341
|
-
}, React__default.createElement("svg", {
|
|
26342
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
26343
|
-
width: "24",
|
|
26344
|
-
height: "24",
|
|
26345
|
-
viewBox: "0 0 24 24",
|
|
26346
|
-
fill: "none"
|
|
26347
|
-
}, React__default.createElement("rect", {
|
|
26348
|
-
width: "24",
|
|
26349
|
-
height: "24",
|
|
26350
|
-
rx: "12",
|
|
26351
|
-
fill: !isActive ? "#808080" : "#D9D9D9"
|
|
26352
|
-
}), React__default.createElement("path", {
|
|
26353
|
-
"fill-rule": "evenodd",
|
|
26354
|
-
"clip-rule": "evenodd",
|
|
26355
|
-
d: "M12.7143 7H11.2857V11.2857H7V12.7143H11.2857V17H12.7143V12.7143H17V11.2857H12.7143V7Z",
|
|
26356
|
-
fill: "white"
|
|
26357
|
-
})));
|
|
26358
|
-
};
|
|
26359
|
-
|
|
26360
|
-
var HeaderChart = function HeaderChart(_ref) {
|
|
26361
|
-
var title = _ref.title,
|
|
26362
|
-
isOpen = _ref.isOpen,
|
|
26363
|
-
onToggle = _ref.onToggle,
|
|
26364
|
-
_ref$isShowChangeChar = _ref.isShowChangeChart,
|
|
26365
|
-
isShowChangeChart = _ref$isShowChangeChar === void 0 ? false : _ref$isShowChangeChar,
|
|
26366
|
-
_ref$typeChart = _ref.typeChart,
|
|
26367
|
-
typeChart = _ref$typeChart === void 0 ? TYPECHART.BAR : _ref$typeChart,
|
|
26368
|
-
onChangeChart = _ref.onChangeChart;
|
|
26369
|
-
return React__default.createElement("div", {
|
|
26370
|
-
className: "d-flex justify-content-between align-items-center " + styles$1["header-chart"] + " "
|
|
26371
|
-
}, React__default.createElement("div", {
|
|
26372
|
-
className: "" + styles$1["header-left"]
|
|
26373
|
-
}, React__default.createElement("span", {
|
|
26374
|
-
className: styles$1["header-title"] + " pr-2"
|
|
26375
|
-
}, title), React__default.createElement("i", {
|
|
26376
|
-
className: styles$1["icon-chart"] + " fal fa-info-circle cursor-pointer"
|
|
26377
|
-
})), React__default.createElement("div", {
|
|
26378
|
-
className: "" + styles$1["header-right"]
|
|
26379
|
-
}, isOpen && isShowChangeChart && React__default.createElement("div", {
|
|
26380
|
-
className: "d-flex align-items-center d-inline-block pr-4"
|
|
26381
|
-
}, React__default.createElement("div", {
|
|
26382
|
-
className: "d-flex align-items-center px-2 " + styles$1["checkbox-chart"]
|
|
26383
|
-
}, React__default.createElement("div", {
|
|
26384
|
-
className: "pr-4 d-flex",
|
|
26385
|
-
onClick: function onClick() {
|
|
26386
|
-
return onChangeChart(TYPECHART.AREA);
|
|
26387
|
-
},
|
|
26388
|
-
style: {
|
|
26389
|
-
cursor: "pointer"
|
|
26390
|
-
}
|
|
26391
|
-
}, React__default.createElement(CheckboxCustom, {
|
|
26392
|
-
width: 16,
|
|
26393
|
-
height: 16,
|
|
26394
|
-
isActive: typeChart === TYPECHART.AREA || typeChart === TYPECHART.BOTH,
|
|
26395
|
-
className: "pr-2"
|
|
26396
|
-
}), React__default.createElement("label", {
|
|
26397
|
-
className: "" + styles$1["label-chart"],
|
|
26398
|
-
style: {
|
|
26399
|
-
color: "#252733",
|
|
26400
|
-
marginBottom: 0,
|
|
26401
|
-
cursor: "pointer"
|
|
26402
|
-
}
|
|
26403
|
-
}, "Ridge charts"))), React__default.createElement("div", {
|
|
26404
|
-
className: "d-inline-block px-2 " + styles$1["checkbox-chart"]
|
|
26405
|
-
}, React__default.createElement("div", {
|
|
26406
|
-
className: "pr-4 d-flex",
|
|
26407
|
-
onClick: function onClick() {
|
|
26408
|
-
return onChangeChart(TYPECHART.BAR);
|
|
26409
|
-
},
|
|
26410
|
-
style: {
|
|
26411
|
-
cursor: "pointer"
|
|
26412
|
-
}
|
|
26413
|
-
}, React__default.createElement(CheckboxCustom, {
|
|
26414
|
-
width: 16,
|
|
26415
|
-
height: 16,
|
|
26416
|
-
isActive: typeChart === TYPECHART.BAR || typeChart === TYPECHART.BOTH,
|
|
26417
|
-
className: "pr-2"
|
|
26418
|
-
}), React__default.createElement("label", {
|
|
26419
|
-
className: "" + styles$1["label-chart"],
|
|
26420
|
-
style: {
|
|
26421
|
-
color: "#252733",
|
|
26422
|
-
marginBottom: 0,
|
|
26423
|
-
cursor: "pointer"
|
|
26424
|
-
}
|
|
26425
|
-
}, "Line charts")))), React__default.createElement("i", {
|
|
26426
|
-
className: "fas fa-ellipsis-v pr-4 " + styles$1["icon-config"]
|
|
26427
|
-
}), React__default.createElement("div", {
|
|
26428
|
-
onClick: onToggle,
|
|
26429
|
-
className: styles$1["btn-show-chart"],
|
|
26430
|
-
style: {
|
|
26431
|
-
cursor: "pointer"
|
|
26432
|
-
}
|
|
26433
|
-
}, React__default.createElement(PlusButton, {
|
|
26434
|
-
isActive: isOpen
|
|
26435
|
-
}))));
|
|
26436
|
-
};
|
|
26437
|
-
|
|
26438
|
-
var INITIAL_CHART_STATUS = [false, false, false, false, false, false, false, false, false];
|
|
26439
|
-
var INITIAL_TYPE_CHART = [TYPECHART.BAR, TYPECHART.BAR, TYPECHART.BAR, TYPECHART.BAR, TYPECHART.BAR, TYPECHART.BAR, TYPECHART.BAR, TYPECHART.BAR, TYPECHART.BAR];
|
|
26440
|
-
|
|
26441
|
-
var useBehavior = function useBehavior() {
|
|
26442
|
-
var _useState = React.useState([].concat(INITIAL_CHART_STATUS)),
|
|
26443
|
-
chartIsOpened = _useState[0],
|
|
26444
|
-
setChartIsOpened = _useState[1];
|
|
26445
|
-
|
|
26446
|
-
var _useState2 = React.useState(INITIAL_TYPE_CHART),
|
|
26447
|
-
typeChartList = _useState2[0],
|
|
26448
|
-
setTypeChartList = _useState2[1];
|
|
26449
|
-
|
|
26450
|
-
var onToggle = function onToggle(idx) {
|
|
26451
|
-
var newStateChart = [].concat(chartIsOpened);
|
|
26452
|
-
newStateChart[idx] = !newStateChart[idx];
|
|
26453
|
-
setChartIsOpened(newStateChart);
|
|
26454
|
-
};
|
|
26455
|
-
|
|
26456
|
-
var onChangeChart = function onChangeChart(idx, type) {
|
|
26457
|
-
if (type !== typeChartList[idx] && typeChartList[idx] !== TYPECHART.BOTH) {
|
|
26458
|
-
setTypeChartList(typeChartList.map(function (cur, index) {
|
|
26459
|
-
return index === idx ? TYPECHART.BOTH : cur;
|
|
26460
|
-
}));
|
|
26461
|
-
return;
|
|
26462
|
-
}
|
|
26463
|
-
|
|
26464
|
-
if (typeChartList[idx] === TYPECHART.BOTH && type === TYPECHART.AREA) {
|
|
26465
|
-
setTypeChartList(typeChartList.map(function (cur, index) {
|
|
26466
|
-
return index === idx ? TYPECHART.BAR : cur;
|
|
26467
|
-
}));
|
|
26468
|
-
return;
|
|
26469
|
-
}
|
|
26470
|
-
|
|
26471
|
-
if (typeChartList[idx] === TYPECHART.BOTH && type === TYPECHART.BAR) {
|
|
26472
|
-
setTypeChartList(typeChartList.map(function (cur, index) {
|
|
26473
|
-
return index === idx ? TYPECHART.AREA : cur;
|
|
26474
|
-
}));
|
|
26475
|
-
return;
|
|
26476
|
-
}
|
|
26477
|
-
|
|
26478
|
-
setTypeChartList(typeChartList.map(function (cur, index) {
|
|
26479
|
-
return index === idx ? type : cur;
|
|
26480
|
-
}));
|
|
26481
|
-
};
|
|
26482
|
-
|
|
26483
|
-
return {
|
|
26484
|
-
chartIsOpened: chartIsOpened,
|
|
26485
|
-
onToggle: onToggle,
|
|
26486
|
-
onChangeChart: onChangeChart,
|
|
26487
|
-
typeChartList: typeChartList
|
|
26488
|
-
};
|
|
26489
|
-
};
|
|
26490
|
-
|
|
26491
|
-
var BubbleChartCustom = function BubbleChartCustom(_ref) {
|
|
26492
|
-
var data = _ref.data;
|
|
26493
|
-
var seriesName = seriesNameBubbleChartCustom(data);
|
|
26494
|
-
return React__default.createElement("div", {
|
|
26495
|
-
className: styles$1["bubble-chart-custom"]
|
|
26496
|
-
}, React__default.createElement("div", {
|
|
26497
|
-
className: styles$1["chart-custom"]
|
|
26498
|
-
}, React__default.createElement("div", {
|
|
26499
|
-
className: styles$1["list-percent"]
|
|
26500
|
-
}, PERCENT.map(function (i, index) {
|
|
26501
|
-
return React__default.createElement("div", {
|
|
26502
|
-
className: "" + styles$1["percent-item"],
|
|
26503
|
-
key: index
|
|
26504
|
-
}, i, "%");
|
|
26505
|
-
})), React__default.createElement("div", {
|
|
26506
|
-
className: styles$1["chart-buddle"]
|
|
26507
|
-
}, React__default.createElement("div", null, React__default.createElement(Chart, {
|
|
26508
|
-
options: readinesToLearnoptions(data, seriesName),
|
|
26509
|
-
type: "scatter",
|
|
26510
|
-
series: convertDataToSeriesBullderChart(data),
|
|
26511
|
-
width: "100%",
|
|
26512
|
-
height: 450
|
|
26513
|
-
}))), React__default.createElement("div", {
|
|
26514
|
-
className: styles$1["x-axis-custom-wrap"]
|
|
26515
|
-
}, React__default.createElement("div", {
|
|
26516
|
-
className: styles$1["axis-content"]
|
|
26517
|
-
}, seriesName.map(function (i, index) {
|
|
26518
|
-
return React__default.createElement("div", {
|
|
26519
|
-
key: index
|
|
26520
|
-
}, i);
|
|
26521
|
-
}))), React__default.createElement("div", {
|
|
26522
|
-
className: styles$1["legend-wrap"]
|
|
26523
|
-
}, seriesName.map(function (i, index) {
|
|
26524
|
-
return React__default.createElement("div", {
|
|
26525
|
-
className: "" + styles$1["item"],
|
|
26526
|
-
key: index
|
|
26527
|
-
}, React__default.createElement("div", {
|
|
26528
|
-
className: "" + styles$1["mark-custom"],
|
|
26529
|
-
style: {
|
|
26530
|
-
backgroundColor: COLOR_CHART_BUBBLE[index]
|
|
26531
|
-
}
|
|
26532
|
-
}), React__default.createElement("label", {
|
|
26533
|
-
className: "" + styles$1["label-legend-custom"]
|
|
26534
|
-
}, i));
|
|
26535
|
-
}))));
|
|
26536
|
-
};
|
|
26537
|
-
|
|
26538
|
-
function propsAreEqual$1(prevProps, nextProps) {
|
|
26539
|
-
return JSON.stringify(prevProps === null || prevProps === void 0 ? void 0 : prevProps.data) === JSON.stringify(nextProps === null || nextProps === void 0 ? void 0 : nextProps.data);
|
|
26540
|
-
}
|
|
26541
|
-
|
|
26542
|
-
var BubbleChartCustom$1 = React__default.memo(BubbleChartCustom, propsAreEqual$1);
|
|
26716
|
+
var ColumnChartAndPercent$1 = React__default.memo(ColumnChartAndPercent, propsAreEqual$1);
|
|
26543
26717
|
|
|
26544
26718
|
var CustomPieChart = function CustomPieChart(_ref) {
|
|
26545
26719
|
var data = _ref.data;
|
|
26720
|
+
if (!data) return React__default.createElement("div", {
|
|
26721
|
+
className: "flex justify-content-center align-items-center",
|
|
26722
|
+
style: {
|
|
26723
|
+
height: 450
|
|
26724
|
+
}
|
|
26725
|
+
}, React__default.createElement("div", null, "No Data"));
|
|
26546
26726
|
var series = Object.values(data).reverse();
|
|
26547
|
-
var femalePropotion =
|
|
26727
|
+
var femalePropotion = series[0] / (series[0] + series[1]) * 100;
|
|
26728
|
+
var roundFemalePropotion = Math.round(femalePropotion) !== femalePropotion ? femalePropotion.toFixed(2) : femalePropotion;
|
|
26548
26729
|
return React__default.createElement("div", {
|
|
26549
26730
|
className: styles$1["pie-chart"]
|
|
26550
26731
|
}, series.filter(function (i) {
|
|
@@ -26572,7 +26753,7 @@ var CustomPieChart = function CustomPieChart(_ref) {
|
|
|
26572
26753
|
className: styles$1["text-lengend"]
|
|
26573
26754
|
}, series[1]), React__default.createElement("div", {
|
|
26574
26755
|
className: styles$1["text-lengend"]
|
|
26575
|
-
}, "(",
|
|
26756
|
+
}, "(", 100 - Number(roundFemalePropotion), "%)")), React__default.createElement("div", {
|
|
26576
26757
|
className: styles$1["legend"]
|
|
26577
26758
|
}, React__default.createElement("div", {
|
|
26578
26759
|
className: styles$1["mark-custom"],
|
|
@@ -26585,7 +26766,7 @@ var CustomPieChart = function CustomPieChart(_ref) {
|
|
|
26585
26766
|
className: styles$1["text-lengend"]
|
|
26586
26767
|
}, series[0]), React__default.createElement("div", {
|
|
26587
26768
|
className: styles$1["text-lengend"]
|
|
26588
|
-
}, "(",
|
|
26769
|
+
}, "(", roundFemalePropotion, "%)")))) : React__default.createElement("img", {
|
|
26589
26770
|
className: "" + styles$1["image-no-data"],
|
|
26590
26771
|
src: "images/no-data-haft-pie.png"
|
|
26591
26772
|
}));
|
|
@@ -26593,6 +26774,12 @@ var CustomPieChart = function CustomPieChart(_ref) {
|
|
|
26593
26774
|
|
|
26594
26775
|
var StudentByAge = function StudentByAge(_ref) {
|
|
26595
26776
|
var data = _ref.data;
|
|
26777
|
+
if (!data) return React__default.createElement("div", {
|
|
26778
|
+
className: "flex justify-content-center align-items-center",
|
|
26779
|
+
style: {
|
|
26780
|
+
height: 450
|
|
26781
|
+
}
|
|
26782
|
+
}, React__default.createElement("div", null, "No Data"));
|
|
26596
26783
|
var series = convertDataStudentByAgeToSeries(data);
|
|
26597
26784
|
var totalStudent = totalStudentByAge(data);
|
|
26598
26785
|
return React__default.createElement("div", {
|
|
@@ -26637,6 +26824,12 @@ var StudentByAgeAndGender$1 = React__default.memo(StudentByAgeAndGender, propsAr
|
|
|
26637
26824
|
|
|
26638
26825
|
var StudentByGrade = function StudentByGrade(_ref) {
|
|
26639
26826
|
var data = _ref.data;
|
|
26827
|
+
if (!data) return React__default.createElement("div", {
|
|
26828
|
+
className: "flex justify-content-center align-items-center",
|
|
26829
|
+
style: {
|
|
26830
|
+
height: 450
|
|
26831
|
+
}
|
|
26832
|
+
}, React__default.createElement("div", null, "No Data"));
|
|
26640
26833
|
var series = convertDataToSeriesStudentByGrade(data);
|
|
26641
26834
|
var totalStudent = findTotalStudentByGrade(data);
|
|
26642
26835
|
return React__default.createElement("div", {
|
|
@@ -27125,7 +27318,8 @@ var useChartDatas = function useChartDatas() {
|
|
|
27125
27318
|
data: topLearningStrategies
|
|
27126
27319
|
});
|
|
27127
27320
|
},
|
|
27128
|
-
isShowChangeChart: false
|
|
27321
|
+
isShowChangeChart: false,
|
|
27322
|
+
options: []
|
|
27129
27323
|
}, {
|
|
27130
27324
|
id: "Readiness_to_learn",
|
|
27131
27325
|
label: "Readiness to learn",
|
|
@@ -27134,7 +27328,8 @@ var useChartDatas = function useChartDatas() {
|
|
|
27134
27328
|
data: readinessToLearning
|
|
27135
27329
|
});
|
|
27136
27330
|
},
|
|
27137
|
-
isShowChangeChart: false
|
|
27331
|
+
isShowChangeChart: false,
|
|
27332
|
+
options: []
|
|
27138
27333
|
}, {
|
|
27139
27334
|
id: "1_to_1",
|
|
27140
27335
|
label: "1 To 1",
|
|
@@ -27145,7 +27340,14 @@ var useChartDatas = function useChartDatas() {
|
|
|
27145
27340
|
typeChart: typeChart
|
|
27146
27341
|
});
|
|
27147
27342
|
},
|
|
27148
|
-
isShowChangeChart: true
|
|
27343
|
+
isShowChangeChart: true,
|
|
27344
|
+
options: [{
|
|
27345
|
+
label: "Ridge charts",
|
|
27346
|
+
value: TYPECHART.AREA
|
|
27347
|
+
}, {
|
|
27348
|
+
label: "Bar charts",
|
|
27349
|
+
value: TYPECHART.BAR
|
|
27350
|
+
}]
|
|
27149
27351
|
}, {
|
|
27150
27352
|
id: "class_reflection",
|
|
27151
27353
|
label: "Class Reflection",
|
|
@@ -27153,10 +27355,18 @@ var useChartDatas = function useChartDatas() {
|
|
|
27153
27355
|
return React__default.createElement(ColumnChartAndPercent$1, {
|
|
27154
27356
|
data: chartClassReflection.overviewQuestionChoice,
|
|
27155
27357
|
typeChart: typeChart,
|
|
27156
|
-
id: "class_reflection"
|
|
27358
|
+
id: "class_reflection",
|
|
27359
|
+
isHasLineChart: true
|
|
27157
27360
|
});
|
|
27158
27361
|
},
|
|
27159
|
-
isShowChangeChart: true
|
|
27362
|
+
isShowChangeChart: true,
|
|
27363
|
+
options: [{
|
|
27364
|
+
label: "Ridge charts",
|
|
27365
|
+
value: TYPECHART.AREA
|
|
27366
|
+
}, {
|
|
27367
|
+
label: "Line charts",
|
|
27368
|
+
value: TYPECHART.LINE
|
|
27369
|
+
}]
|
|
27160
27370
|
}, {
|
|
27161
27371
|
id: "conference",
|
|
27162
27372
|
label: "Conference",
|
|
@@ -27167,7 +27377,14 @@ var useChartDatas = function useChartDatas() {
|
|
|
27167
27377
|
id: "conference"
|
|
27168
27378
|
});
|
|
27169
27379
|
},
|
|
27170
|
-
isShowChangeChart: true
|
|
27380
|
+
isShowChangeChart: true,
|
|
27381
|
+
options: [{
|
|
27382
|
+
label: "Ridge charts",
|
|
27383
|
+
value: TYPECHART.AREA
|
|
27384
|
+
}, {
|
|
27385
|
+
label: "Bar charts",
|
|
27386
|
+
value: TYPECHART.BAR
|
|
27387
|
+
}]
|
|
27171
27388
|
}, {
|
|
27172
27389
|
id: "safety",
|
|
27173
27390
|
label: "Safety",
|
|
@@ -27175,10 +27392,18 @@ var useChartDatas = function useChartDatas() {
|
|
|
27175
27392
|
return React__default.createElement(ColumnChartAndPercent$1, {
|
|
27176
27393
|
data: safety.overviewQuestionChoice,
|
|
27177
27394
|
typeChart: typeChart,
|
|
27178
|
-
id: "safety"
|
|
27395
|
+
id: "safety",
|
|
27396
|
+
isHasLineChart: true
|
|
27179
27397
|
});
|
|
27180
27398
|
},
|
|
27181
|
-
isShowChangeChart: true
|
|
27399
|
+
isShowChangeChart: true,
|
|
27400
|
+
options: [{
|
|
27401
|
+
label: "Ridge charts",
|
|
27402
|
+
value: TYPECHART.AREA
|
|
27403
|
+
}, {
|
|
27404
|
+
label: "Line charts",
|
|
27405
|
+
value: TYPECHART.LINE
|
|
27406
|
+
}]
|
|
27182
27407
|
}, {
|
|
27183
27408
|
id: "Student_by_age",
|
|
27184
27409
|
label: "Student by age",
|
|
@@ -27188,7 +27413,8 @@ var useChartDatas = function useChartDatas() {
|
|
|
27188
27413
|
studentByGenderData: studentByGender
|
|
27189
27414
|
});
|
|
27190
27415
|
},
|
|
27191
|
-
isShowChangeChart: false
|
|
27416
|
+
isShowChangeChart: false,
|
|
27417
|
+
options: []
|
|
27192
27418
|
}, {
|
|
27193
27419
|
id: "student_by_grade",
|
|
27194
27420
|
label: "Students by Grade",
|
|
@@ -27197,8 +27423,12 @@ var useChartDatas = function useChartDatas() {
|
|
|
27197
27423
|
data: studentByGrade
|
|
27198
27424
|
});
|
|
27199
27425
|
},
|
|
27200
|
-
isShowChangeChart: false
|
|
27426
|
+
isShowChangeChart: false,
|
|
27427
|
+
options: []
|
|
27201
27428
|
}];
|
|
27429
|
+
var initialTypeChart = chartDashBoards.map(function (i) {
|
|
27430
|
+
return i.options.length > 0 ? i.options[1].value : TYPECHART.BAR;
|
|
27431
|
+
});
|
|
27202
27432
|
var totalCardData = [{
|
|
27203
27433
|
icon: "images/icon_chart.png",
|
|
27204
27434
|
title: "Total 1-to-1:",
|
|
@@ -27242,7 +27472,8 @@ var useChartDatas = function useChartDatas() {
|
|
|
27242
27472
|
LIST_FILTERS_LEFT: LIST_FILTERS_LEFT,
|
|
27243
27473
|
LIST_FILTERS_RIGHT: LIST_FILTERS_RIGHT,
|
|
27244
27474
|
totalCardData: totalCardData,
|
|
27245
|
-
onChangeFilters: onChangeFilters
|
|
27475
|
+
onChangeFilters: onChangeFilters,
|
|
27476
|
+
initialTypeChart: initialTypeChart
|
|
27246
27477
|
};
|
|
27247
27478
|
};
|
|
27248
27479
|
|
|
@@ -27251,7 +27482,9 @@ var StudentItemSelector = function StudentItemSelector(_ref) {
|
|
|
27251
27482
|
onChange = _ref.onChange,
|
|
27252
27483
|
externalStudentIds = _ref.externalStudentIds,
|
|
27253
27484
|
studentDefault = _ref.studentDefault,
|
|
27254
|
-
teacherUserId = _ref.teacherUserId
|
|
27485
|
+
teacherUserId = _ref.teacherUserId,
|
|
27486
|
+
_ref$placeholder = _ref.placeholder,
|
|
27487
|
+
placeholder = _ref$placeholder === void 0 ? "Search student" : _ref$placeholder;
|
|
27255
27488
|
var dispatch = reactRedux.useDispatch();
|
|
27256
27489
|
|
|
27257
27490
|
var _useState = React.useState([]),
|
|
@@ -27329,7 +27562,7 @@ var StudentItemSelector = function StudentItemSelector(_ref) {
|
|
|
27329
27562
|
return setSearchString(inputValue);
|
|
27330
27563
|
},
|
|
27331
27564
|
isLoading: isLoading,
|
|
27332
|
-
placeholder:
|
|
27565
|
+
placeholder: placeholder,
|
|
27333
27566
|
defaultValue: value,
|
|
27334
27567
|
onChange: onChange,
|
|
27335
27568
|
isClearable: true
|
|
@@ -27384,16 +27617,18 @@ var TeacherItemSelector = function TeacherItemSelector(_ref) {
|
|
|
27384
27617
|
};
|
|
27385
27618
|
|
|
27386
27619
|
var SelectFilter = function SelectFilter(_ref) {
|
|
27387
|
-
var
|
|
27388
|
-
studentUserId = _ref.studentUserId,
|
|
27620
|
+
var studentUserId = _ref.studentUserId,
|
|
27389
27621
|
studentId = _ref.studentId,
|
|
27390
|
-
teacherUserId = _ref.teacherUserId,
|
|
27391
27622
|
studentDefault = _ref.studentDefault,
|
|
27392
27623
|
handleChangeFilters = _ref.handleChangeFilters,
|
|
27393
27624
|
name = _ref.name,
|
|
27394
27625
|
icon = _ref.icon,
|
|
27395
27626
|
option = _ref.option,
|
|
27396
|
-
onChangeFilters = _ref.onChangeFilters
|
|
27627
|
+
onChangeFilters = _ref.onChangeFilters,
|
|
27628
|
+
btnStyle = _ref.btnStyle,
|
|
27629
|
+
filter = _ref.filter,
|
|
27630
|
+
teacherUserId = _ref.teacherUserId,
|
|
27631
|
+
changeCurrentTeacherUserId = _ref.changeCurrentTeacherUserId;
|
|
27397
27632
|
|
|
27398
27633
|
var _useState = React.useState(false),
|
|
27399
27634
|
isOpenCollapse = _useState[0],
|
|
@@ -27664,6 +27899,7 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
27664
27899
|
}, React__default.createElement(TeacherItemSelector, {
|
|
27665
27900
|
onChange: function onChange(e) {
|
|
27666
27901
|
handleChangeFilters(e);
|
|
27902
|
+
!!changeCurrentTeacherUserId && changeCurrentTeacherUserId(e.teacherUserId || "");
|
|
27667
27903
|
|
|
27668
27904
|
if (!(e !== null && e !== void 0 && e.label)) {
|
|
27669
27905
|
setTeacherName("");
|
|
@@ -27671,7 +27907,7 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
27671
27907
|
setTeacherName(e.label);
|
|
27672
27908
|
}
|
|
27673
27909
|
},
|
|
27674
|
-
defaultValue: teacherId,
|
|
27910
|
+
defaultValue: filter === null || filter === void 0 ? void 0 : filter.teacherId,
|
|
27675
27911
|
studentUserId: studentUserId || ""
|
|
27676
27912
|
})));
|
|
27677
27913
|
}
|
|
@@ -27682,7 +27918,8 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
27682
27918
|
className: styles["block-filter-component"] + " "
|
|
27683
27919
|
}, React__default.createElement("button", {
|
|
27684
27920
|
onClick: handleToggleCollapse,
|
|
27685
|
-
className: styles["btn-filter"] + " d-flex align-items-center cursor-pointer"
|
|
27921
|
+
className: styles["btn-filter"] + " d-flex align-items-center cursor-pointer",
|
|
27922
|
+
style: btnStyle
|
|
27686
27923
|
}, React__default.createElement("img", {
|
|
27687
27924
|
src: "" + icon,
|
|
27688
27925
|
alt: name
|
|
@@ -27696,14 +27933,14 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
27696
27933
|
|
|
27697
27934
|
if (!(e !== null && e !== void 0 && e.label)) {
|
|
27698
27935
|
setStudentName("");
|
|
27699
|
-
setTeacherName("");
|
|
27700
27936
|
} else {
|
|
27701
27937
|
setStudentName(e.label);
|
|
27702
27938
|
}
|
|
27703
27939
|
},
|
|
27704
27940
|
value: studentId,
|
|
27705
27941
|
studentDefault: studentDefault,
|
|
27706
|
-
teacherUserId: teacherUserId
|
|
27942
|
+
teacherUserId: teacherUserId,
|
|
27943
|
+
placeholder: "Type 2 characters to search"
|
|
27707
27944
|
})));
|
|
27708
27945
|
}
|
|
27709
27946
|
|
|
@@ -27740,13 +27977,16 @@ var Dashboard = function Dashboard() {
|
|
|
27740
27977
|
LIST_FILTERS_LEFT = _useChartDatas.LIST_FILTERS_LEFT,
|
|
27741
27978
|
LIST_FILTERS_RIGHT = _useChartDatas.LIST_FILTERS_RIGHT,
|
|
27742
27979
|
totalCardData = _useChartDatas.totalCardData,
|
|
27743
|
-
onChangeFilters = _useChartDatas.onChangeFilters
|
|
27980
|
+
onChangeFilters = _useChartDatas.onChangeFilters,
|
|
27981
|
+
initialTypeChart = _useChartDatas.initialTypeChart;
|
|
27744
27982
|
|
|
27745
|
-
var _useBehavior = useBehavior(),
|
|
27983
|
+
var _useBehavior = useBehavior(initialTypeChart),
|
|
27746
27984
|
chartIsOpened = _useBehavior.chartIsOpened,
|
|
27747
27985
|
_onToggle = _useBehavior.onToggle,
|
|
27748
27986
|
_onChangeChart = _useBehavior.onChangeChart,
|
|
27749
|
-
typeChartList = _useBehavior.typeChartList
|
|
27987
|
+
typeChartList = _useBehavior.typeChartList,
|
|
27988
|
+
teacherUserId = _useBehavior.teacherUserId,
|
|
27989
|
+
changeCurrentTeacherUserId = _useBehavior.changeCurrentTeacherUserId;
|
|
27750
27990
|
|
|
27751
27991
|
return React__default.createElement("div", {
|
|
27752
27992
|
className: "" + styles$1["block-dashboard"]
|
|
@@ -27792,7 +28032,13 @@ var Dashboard = function Dashboard() {
|
|
|
27792
28032
|
filter: filter,
|
|
27793
28033
|
studentId: e.studentId || 0,
|
|
27794
28034
|
studentDefault: e.studentDefault,
|
|
27795
|
-
onChangeFilters: onChangeFilters
|
|
28035
|
+
onChangeFilters: onChangeFilters,
|
|
28036
|
+
teacherUserId: teacherUserId,
|
|
28037
|
+
changeCurrentTeacherUserId: changeCurrentTeacherUserId,
|
|
28038
|
+
btnStyle: e.name === FILTER_NAME.StudentName ? {
|
|
28039
|
+
minWidth: 220,
|
|
28040
|
+
justifyContent: "center"
|
|
28041
|
+
} : {}
|
|
27796
28042
|
});
|
|
27797
28043
|
}))), React__default.createElement("div", {
|
|
27798
28044
|
className: "d-flex align-items-center justify-content-between flex-wrap mb-3"
|
|
@@ -27819,7 +28065,8 @@ var Dashboard = function Dashboard() {
|
|
|
27819
28065
|
onChangeChart: function onChangeChart(type) {
|
|
27820
28066
|
return _onChangeChart(index, type);
|
|
27821
28067
|
},
|
|
27822
|
-
isOpen: chartIsOpened[index]
|
|
28068
|
+
isOpen: chartIsOpened[index],
|
|
28069
|
+
options: chartDashBoard.options
|
|
27823
28070
|
}), React__default.createElement(reactstrap.Collapse, {
|
|
27824
28071
|
isOpen: chartIsOpened[index]
|
|
27825
28072
|
}, chartDashBoard.children(typeChartList[index])));
|