mario-education 2.4.7-beta → 2.4.10-beta

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 CHANGED
@@ -7645,32 +7645,35 @@ var SchoolBlankDayList = function SchoolBlankDayList() {
7645
7645
  }))));
7646
7646
  };
7647
7647
 
7648
- var USER_DELETED_URL = marioCore.BASE_URL + "/api/User";
7648
+ var USER_URL$1 = marioCore.BASE_URL + "/api/User";
7649
7649
  var get$d = function get(filter) {
7650
- return marioCore.api.get(USER_DELETED_URL + "/all/deleted", {
7650
+ return marioCore.api.get(USER_URL$1 + "/all/deleted", {
7651
7651
  params: filter
7652
7652
  });
7653
7653
  };
7654
7654
  var remove$c = function remove(id, userChangeId) {
7655
- return marioCore.api["delete"](USER_DELETED_URL + "/hardDelete/" + id, {
7655
+ return marioCore.api["delete"](USER_URL$1 + "/hardDelete/" + id, {
7656
7656
  params: {
7657
7657
  userChangeId: userChangeId
7658
7658
  }
7659
7659
  });
7660
7660
  };
7661
7661
  var getTeacher = function getTeacher() {
7662
- return marioCore.api.get(USER_DELETED_URL + "/all/teacher");
7662
+ return marioCore.api.get(USER_URL$1 + "/all/teacher");
7663
7663
  };
7664
7664
  var getStudentAll = function getStudentAll(filter) {
7665
- return marioCore.api.get(USER_DELETED_URL + "/studentUser/all", {
7665
+ return marioCore.api.get(USER_URL$1 + "/studentUser/all", {
7666
7666
  params: filter
7667
7667
  });
7668
7668
  };
7669
7669
  var changeTeacherOfStudent = function changeTeacherOfStudent(id, teacherUserId) {
7670
- return marioCore.api.put(USER_DELETED_URL + "/change-teacher/" + id, {
7670
+ return marioCore.api.put(USER_URL$1 + "/change-teacher/" + id, {
7671
7671
  teacherUserId: teacherUserId
7672
7672
  });
7673
7673
  };
7674
+ var getTeachersByStudentId = function getTeachersByStudentId(studentId) {
7675
+ return marioCore.api.get(USER_URL$1 + "/teachers/" + studentId);
7676
+ };
7674
7677
 
7675
7678
  var useUserDeletedModal = function useUserDeletedModal() {
7676
7679
  var dispatch = reactRedux.useDispatch();
@@ -8145,15 +8148,12 @@ var useSwitchTeacher = function useSwitchTeacher() {
8145
8148
  React.useEffect(function () {
8146
8149
  document.title = TITLE$c;
8147
8150
  }, []);
8148
- React.useEffect(function () {
8149
- getAllTeacher();
8150
- }, [modal]);
8151
8151
 
8152
- var getAllTeacher = function getAllTeacher() {
8152
+ var getTeachersOfStudent = function getTeachersOfStudent(studentId) {
8153
8153
  try {
8154
8154
  var _temp6 = _catch(function () {
8155
- return Promise.resolve(getTeacher()).then(function (res) {
8156
- setTeacherList(res.data);
8155
+ return Promise.resolve(getTeachersByStudentId(studentId)).then(function (res) {
8156
+ res && setTeacherList(res.data);
8157
8157
  });
8158
8158
  }, function (err) {
8159
8159
  var _err$response2, _err$response2$data;
@@ -8220,6 +8220,9 @@ var useSwitchTeacher = function useSwitchTeacher() {
8220
8220
  React.useEffect(function () {
8221
8221
  getData();
8222
8222
  }, [filters]);
8223
+ React.useEffect(function () {
8224
+ userChoiced.id && getTeachersOfStudent(parseInt(userChoiced.id));
8225
+ }, [userChoiced.id]);
8223
8226
  return {
8224
8227
  userList: userList,
8225
8228
  totalItems: totalItems,
@@ -8391,17 +8394,17 @@ var SwitchTeacherList = function SwitchTeacherList() {
8391
8394
  }));
8392
8395
  };
8393
8396
 
8394
- var USER_URL$1 = marioCore.BASE_URL + "/api/User";
8397
+ var USER_URL$2 = marioCore.BASE_URL + "/api/User";
8395
8398
  var getStudentAssistant = function getStudentAssistant(data) {
8396
- return marioCore.api.get(USER_URL$1 + "/studentAssistant/", {
8399
+ return marioCore.api.get(USER_URL$2 + "/studentAssistant/", {
8397
8400
  params: data
8398
8401
  });
8399
8402
  };
8400
- var getAssistant = function getAssistant() {
8401
- return marioCore.api.get(USER_URL$1 + "/assistants");
8403
+ var getAssistantByStudentId = function getAssistantByStudentId(studentId) {
8404
+ return marioCore.api.get(USER_URL$2 + "/assistants/" + studentId);
8402
8405
  };
8403
8406
  var changeAssistantOfStudent = function changeAssistantOfStudent(id, assistantUserId) {
8404
- return marioCore.api.put(USER_URL$1 + "/change-assistant/" + id, {
8407
+ return marioCore.api.put(USER_URL$2 + "/change-assistant/" + id, {
8405
8408
  assistantUserId: assistantUserId
8406
8409
  });
8407
8410
  };
@@ -8477,11 +8480,11 @@ var useSwitchAssistant = function useSwitchAssistant() {
8477
8480
  }
8478
8481
  }, [dispatch, filters]);
8479
8482
 
8480
- var getAllAssistant = function getAllAssistant() {
8483
+ var getAssistants = function getAssistants(studentId) {
8481
8484
  try {
8482
8485
  var _temp6 = _catch(function () {
8483
- return Promise.resolve(getAssistant()).then(function (res) {
8484
- setAssistantList(res.data);
8486
+ return Promise.resolve(getAssistantByStudentId(studentId)).then(function (res) {
8487
+ res && setAssistantList(res.data);
8485
8488
  });
8486
8489
  }, function (err) {
8487
8490
  var _err$response2, _err$response2$data;
@@ -8573,8 +8576,8 @@ var useSwitchAssistant = function useSwitchAssistant() {
8573
8576
  document.title = TITLE$d;
8574
8577
  }, []);
8575
8578
  React.useEffect(function () {
8576
- getAllAssistant();
8577
- }, [modal]);
8579
+ userChoiced.id && getAssistants(userChoiced.id);
8580
+ }, [userChoiced.id]);
8578
8581
  React.useEffect(function () {
8579
8582
  getStudentAssistantData();
8580
8583
  }, [filters]);
@@ -8738,10 +8741,10 @@ var SwitchAssistantList = function SwitchAssistantList() {
8738
8741
  }));
8739
8742
  };
8740
8743
 
8741
- var USER_URL$2 = marioCore.BASE_URL + "/api/user";
8744
+ var USER_URL$3 = marioCore.BASE_URL + "/api/user";
8742
8745
  var ACCOUNT_URL = marioCore.BASE_URL + "/api/account";
8743
8746
  var getUserList = function getUserList(filter) {
8744
- return marioCore.api.get("" + USER_URL$2, {
8747
+ return marioCore.api.get("" + USER_URL$3, {
8745
8748
  params: filter
8746
8749
  });
8747
8750
  };
@@ -18502,6 +18505,7 @@ var INITIAL_ACTIVITY_FRIENDS = {
18502
18505
  interested: 0,
18503
18506
  curious: 0
18504
18507
  };
18508
+ var LEARNING_STRATEGY_CHART_COLORS = ["#40D2CC", "#1D74C5", "#78B6E2", "#FFC783", "#0D9994"];
18505
18509
 
18506
18510
  var TITLE$r = "Dashboard";
18507
18511
 
@@ -18510,8 +18514,8 @@ var useDashboard = function useDashboard() {
18510
18514
  var now = new Date();
18511
18515
 
18512
18516
  var _useState = React.useState({
18513
- startDate: new Date(now.getFullYear(), now.getMonth(), 1).getTime(),
18514
- endDate: new Date(now.getFullYear(), now.getMonth() + 1, 0).getTime(),
18517
+ startDate: new Date(now.getFullYear(), now.getMonth() - 6, 2).getTime(),
18518
+ endDate: new Date(now.getFullYear(), now.getMonth() + 1, 1).getTime(),
18515
18519
  studentIds: [],
18516
18520
  gender: [LegalGenderType.Male, LegalGenderType.Female]
18517
18521
  }),
@@ -18700,7 +18704,7 @@ var useDashboard = function useDashboard() {
18700
18704
  };
18701
18705
  };
18702
18706
 
18703
- 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-gender":"_31VDE","form-filter-grade":"_1Pm1w","title-card-box":"_3hSow","box-item":"_1yuC9"};
18707
+ 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-gender":"_31VDE","form-filter-grade":"_1Pm1w","title-card-box":"_3hSow","box-item":"_1yuC9","image-no-data":"_2PMoX","chart-data":"_2asi-","apexcharts-datalabels":"_muT01","apexcharts-pie-label":"_35BzZ","image-custom":"_3pkbc","image-special-need":"_16MpB","title-dashboard":"_CHu-i"};
18704
18708
 
18705
18709
  var DashboardCard = function DashboardCard(_ref) {
18706
18710
  var label = _ref.label,
@@ -18718,6 +18722,9 @@ var DashboardCard = function DashboardCard(_ref) {
18718
18722
 
18719
18723
  var ReadinessToLearn = function ReadinessToLearn(_ref) {
18720
18724
  var data = _ref.data;
18725
+ var series = (data === null || data === void 0 ? void 0 : data.map(function (i) {
18726
+ return i.percentQuestion.toFixed(2);
18727
+ })) || [];
18721
18728
  var categories = React.useMemo(function () {
18722
18729
  if (!data) return [];
18723
18730
 
@@ -18740,18 +18747,6 @@ var ReadinessToLearn = function ReadinessToLearn(_ref) {
18740
18747
  show: false
18741
18748
  }
18742
18749
  },
18743
- noData: {
18744
- text: "NO DATA",
18745
- align: "center",
18746
- verticalAlign: "middle",
18747
- offsetX: 0,
18748
- offsetY: 0,
18749
- style: {
18750
- color: undefined,
18751
- fontSize: "14px",
18752
- fontFamily: undefined
18753
- }
18754
- },
18755
18750
  plotOptions: {
18756
18751
  bar: {
18757
18752
  horizontal: false,
@@ -18763,7 +18758,7 @@ var ReadinessToLearn = function ReadinessToLearn(_ref) {
18763
18758
  lineCap: "round"
18764
18759
  },
18765
18760
  labels: (data === null || data === void 0 ? void 0 : data.map(function (i) {
18766
- return i.questionText.replaceAll('<p>', '').replaceAll('</p>', '').trim();
18761
+ return i.questionText.replaceAll("<p>", "").replaceAll("</p>", "").trim();
18767
18762
  })) || [],
18768
18763
  xaxis: {
18769
18764
  categories: categories
@@ -18794,13 +18789,16 @@ var ReadinessToLearn = function ReadinessToLearn(_ref) {
18794
18789
  }
18795
18790
  }
18796
18791
  };
18797
- return React__default.createElement("div", null, React__default.createElement(ReactApexChart, {
18792
+ return React__default.createElement("div", {
18793
+ className: "d-flex justify-content-center"
18794
+ }, series.length > 0 ? React__default.createElement(ReactApexChart, {
18798
18795
  options: options,
18799
- series: (data === null || data === void 0 ? void 0 : data.map(function (i) {
18800
- return i.percentQuestion.toFixed(2);
18801
- })) || [],
18796
+ series: series,
18802
18797
  type: "radialBar",
18803
18798
  height: 350
18799
+ }) : React__default.createElement("img", {
18800
+ className: styles$1["image-no-data"] + " " + styles$1["image-custom"],
18801
+ src: "images/readiness-chart.png"
18804
18802
  }));
18805
18803
  };
18806
18804
 
@@ -18825,14 +18823,101 @@ var Loading = function Loading() {
18825
18823
  }, "Loading...")));
18826
18824
  };
18827
18825
 
18828
- var colors = ["#40D2CC", "#1D74C5", "#78B6E2", "#FFC783", "#0D9994"];
18829
-
18830
- var TopLearningStrategy = function TopLearningStrategy(_ref) {
18831
- var _data$learningStrateg, _data$learningStrateg2;
18832
-
18833
- var data = _ref.data;
18834
- if (!data) return React__default.createElement(Loading, null);
18835
- var options = {
18826
+ var friendCircleItems = function friendCircleItems(_ref) {
18827
+ var _ref$bestFriends = _ref.bestFriends,
18828
+ bestFriends = _ref$bestFriends === void 0 ? 0 : _ref$bestFriends,
18829
+ _ref$friends = _ref.friends,
18830
+ friends = _ref$friends === void 0 ? 0 : _ref$friends,
18831
+ _ref$couldBeFriends = _ref.couldBeFriends,
18832
+ couldBeFriends = _ref$couldBeFriends === void 0 ? 0 : _ref$couldBeFriends,
18833
+ _ref$supportive = _ref.supportive,
18834
+ supportive = _ref$supportive === void 0 ? 0 : _ref$supportive;
18835
+ return [{
18836
+ id: 1,
18837
+ name: "Best Friends",
18838
+ number: bestFriends,
18839
+ background: "#9DECF9",
18840
+ width: 207,
18841
+ height: 207
18842
+ }, {
18843
+ id: 2,
18844
+ name: "Friend",
18845
+ number: friends,
18846
+ background: "#B2F5EA",
18847
+ width: 145,
18848
+ height: 145
18849
+ }, {
18850
+ id: 3,
18851
+ name: "Supportive",
18852
+ number: supportive,
18853
+ background: "#CEEDFF",
18854
+ width: 140,
18855
+ height: 140
18856
+ }, {
18857
+ id: 4,
18858
+ name: "Could be Friend",
18859
+ number: couldBeFriends,
18860
+ background: "#E2E8F0",
18861
+ width: 150,
18862
+ height: 150
18863
+ }];
18864
+ };
18865
+ var activityCircleItems = function activityCircleItems(_ref2) {
18866
+ var _ref2$like = _ref2.like,
18867
+ like = _ref2$like === void 0 ? 0 : _ref2$like,
18868
+ _ref2$love = _ref2.love,
18869
+ love = _ref2$love === void 0 ? 0 : _ref2$love,
18870
+ _ref2$interested = _ref2.interested,
18871
+ interested = _ref2$interested === void 0 ? 0 : _ref2$interested,
18872
+ _ref2$curious = _ref2.curious,
18873
+ curious = _ref2$curious === void 0 ? 0 : _ref2$curious;
18874
+ return [{
18875
+ id: 1,
18876
+ name: "Like",
18877
+ number: like,
18878
+ background: "#9DECF9",
18879
+ width: 207,
18880
+ height: 207
18881
+ }, {
18882
+ id: 2,
18883
+ name: "Love",
18884
+ number: love,
18885
+ background: "#B2F5EA",
18886
+ width: 145,
18887
+ height: 145
18888
+ }, {
18889
+ id: 3,
18890
+ name: "Interested",
18891
+ number: interested,
18892
+ background: "#CEEDFF",
18893
+ width: 148,
18894
+ height: 148
18895
+ }, {
18896
+ id: 4,
18897
+ name: "Curious",
18898
+ number: curious,
18899
+ background: "#E2E8F0",
18900
+ width: 150,
18901
+ height: 150
18902
+ }];
18903
+ };
18904
+ var gradeOptions = function gradeOptions(grades) {
18905
+ return grades.map(function (grade, index) {
18906
+ return {
18907
+ label: grade,
18908
+ value: index
18909
+ };
18910
+ });
18911
+ };
18912
+ var genderOptions = [{
18913
+ value: LegalGenderType.Male,
18914
+ label: "Male"
18915
+ }, {
18916
+ value: LegalGenderType.Female,
18917
+ label: "Female"
18918
+ }];
18919
+ var learningStrategyChartOptions = function learningStrategyChartOptions(labelNames) {
18920
+ return {
18836
18921
  chart: {
18837
18922
  width: 350,
18838
18923
  type: "pie"
@@ -18849,26 +18934,86 @@ var TopLearningStrategy = function TopLearningStrategy(_ref) {
18849
18934
  fontFamily: undefined
18850
18935
  }
18851
18936
  },
18852
- labels: (data === null || data === void 0 ? void 0 : (_data$learningStrateg = data.learningStrategies) === null || _data$learningStrateg === void 0 ? void 0 : _data$learningStrateg.map(function (i) {
18853
- return i.learningStrategyName;
18854
- })) || [],
18855
- colors: colors,
18937
+ labels: labelNames,
18938
+ colors: LEARNING_STRATEGY_CHART_COLORS,
18856
18939
  legend: {
18857
18940
  show: true,
18858
- position: "bottom"
18941
+ position: "bottom",
18942
+ markers: {
18943
+ radius: 2
18944
+ }
18945
+ },
18946
+ tooltip: {
18947
+ enabled: true,
18948
+ enabledOnSeries: undefined,
18949
+ shared: true,
18950
+ followCursor: false,
18951
+ intersect: false,
18952
+ inverseOrder: false,
18953
+ custom: undefined,
18954
+ fillSeriesColor: false,
18955
+ theme: "light",
18956
+ style: {
18957
+ fontSize: "16px",
18958
+ fontFamily: undefined
18959
+ },
18960
+ onDatasetHover: {
18961
+ highlightDataSeries: false
18962
+ },
18963
+ fixed: {
18964
+ enabled: false,
18965
+ position: "topRight",
18966
+ offsetX: 0,
18967
+ offsetY: 0
18968
+ }
18969
+ },
18970
+ stroke: {
18971
+ width: 0
18859
18972
  }
18860
18973
  };
18974
+ };
18975
+
18976
+ var TopLearningStrategy = function TopLearningStrategy(_ref) {
18977
+ var data = _ref.data;
18978
+ if (!data) return React__default.createElement(Loading, null);
18979
+
18980
+ var _useState = React.useState([]),
18981
+ series = _useState[0],
18982
+ setSeries = _useState[1];
18983
+
18984
+ var _useState2 = React.useState([]),
18985
+ labelNames = _useState2[0],
18986
+ setLabelNames = _useState2[1];
18987
+
18988
+ React.useEffect(function () {
18989
+ if (data !== null && data !== void 0 && data.learningStrategies) {
18990
+ var learningStrategies = data.learningStrategies.filter(function (i) {
18991
+ return i.usageCount;
18992
+ }) || [];
18993
+ var usageCounts = learningStrategies.map(function (i) {
18994
+ return i.usageCount;
18995
+ });
18996
+ setSeries(usageCounts);
18997
+ var learningStrategyNames = learningStrategies.map(function (i) {
18998
+ return i.learningStrategyName;
18999
+ });
19000
+ setLabelNames(learningStrategyNames);
19001
+ }
19002
+ }, [data]);
18861
19003
  return React__default.createElement("div", {
18862
19004
  className: "d-flex h-100 justify-content-center"
18863
19005
  }, React__default.createElement("div", {
18864
19006
  className: "d-flex align-items-end justify-content-center"
18865
- }, React__default.createElement(ReactApexChart, {
18866
- options: options,
18867
- series: (data === null || data === void 0 ? void 0 : (_data$learningStrateg2 = data.learningStrategies) === null || _data$learningStrateg2 === void 0 ? void 0 : _data$learningStrateg2.map(function (i) {
18868
- return i.usageCount;
18869
- })) || [],
19007
+ }, series.some(function (i) {
19008
+ return i;
19009
+ }) ? React__default.createElement(ReactApexChart, {
19010
+ options: learningStrategyChartOptions(labelNames),
19011
+ series: series,
18870
19012
  type: "pie",
18871
19013
  height: 350
19014
+ }) : React__default.createElement("img", {
19015
+ className: styles$1["image-no-data"] + " " + styles$1["image-custom"],
19016
+ src: "images/chart-top-learning.png"
18872
19017
  })));
18873
19018
  };
18874
19019
 
@@ -18895,7 +19040,15 @@ var CustomBarChart = function CustomBarChart(_ref) {
18895
19040
  var data = _ref.data,
18896
19041
  question = _ref.question,
18897
19042
  chartName = _ref.chartName;
18898
- var chatMonth = [];
19043
+
19044
+ var _useState = React.useState([]),
19045
+ chatMonth = _useState[0],
19046
+ setChartMonth = _useState[1];
19047
+
19048
+ var _useState2 = React.useState(true),
19049
+ isNoData = _useState2[0],
19050
+ setIsNoData = _useState2[1];
19051
+
18899
19052
  var optionsOne = {
18900
19053
  chart: {
18901
19054
  type: "line",
@@ -18924,21 +19077,27 @@ var CustomBarChart = function CustomBarChart(_ref) {
18924
19077
  markers: {
18925
19078
  size: 5
18926
19079
  },
18927
- colors: ["#082FA2", "#1A55AE", "#3C65E0", "#6D88E8", "#1E80B9", "#1C77AC", "#4992BD", "#77ADCD", "#3DCBCB", "#1DBAB4", "#61CBCB"],
19080
+ colors: ["#40D2CC", "#1D74C5", "#FFB04F", "#78B6E2", "#0D9994", "#1C77AC", "#4992BD", "#77ADCD", "#3DCBCB", "#1DBAB4", "#61CBCB"],
18928
19081
  xaxis: {
18929
19082
  categories: chatMonth
18930
19083
  },
18931
19084
  yaxis: {
19085
+ min: 0,
19086
+ max: 100,
19087
+ tickAmount: 5,
18932
19088
  labels: {
18933
- offsetX: 10,
18934
- show: true
19089
+ offsetX: -20,
19090
+ show: true,
19091
+ formatter: function formatter(val) {
19092
+ return chartName === "Safety" ? val + "%" : "" + val.toFixed(0);
19093
+ }
18935
19094
  }
18936
19095
  }
18937
19096
  };
18938
19097
 
18939
- var _useState = React.useState([]),
18940
- series = _useState[0],
18941
- setSeries = _useState[1];
19098
+ var _useState3 = React.useState([]),
19099
+ series = _useState3[0],
19100
+ setSeries = _useState3[1];
18942
19101
 
18943
19102
  var getData = function getData() {
18944
19103
  try {
@@ -18950,10 +19109,11 @@ var CustomBarChart = function CustomBarChart(_ref) {
18950
19109
  data: []
18951
19110
  };
18952
19111
  })) || [];
19112
+ var listMonth = [];
18953
19113
  data === null || data === void 0 ? void 0 : (_data$overviewQuestio = data.overviewQuestionChoice) === null || _data$overviewQuestio === void 0 ? void 0 : _data$overviewQuestio.map(function (element) {
18954
19114
  var _element$resultQuesti;
18955
19115
 
18956
- chatMonth.push(element.month);
19116
+ listMonth.push(element.month);
18957
19117
  (_element$resultQuesti = element.resultQuestion) === null || _element$resultQuesti === void 0 ? void 0 : _element$resultQuesti.map(function (value) {
18958
19118
  if (value.questionText == "" || !value.questionText || !question) {
18959
19119
  if (!!question) {
@@ -18968,6 +19128,7 @@ var CustomBarChart = function CustomBarChart(_ref) {
18968
19128
 
18969
19129
  var result = (_value$avgOfStudentCh = value.avgOfStudentChoice) === null || _value$avgOfStudentCh === void 0 ? void 0 : _value$avgOfStudentCh.toFixed(2);
18970
19130
  currentData.push(result);
19131
+ setIsNoData(false);
18971
19132
  }
18972
19133
  }
18973
19134
  } else {
@@ -18978,12 +19139,14 @@ var CustomBarChart = function CustomBarChart(_ref) {
18978
19139
  currentData.map(function (r, index) {
18979
19140
  var _value$questionText;
18980
19141
 
18981
- var isCheckContain = (_value$questionText = value.questionText) === null || _value$questionText === void 0 ? void 0 : _value$questionText.includes(r.name);
19142
+ var isCheckContain = (_value$questionText = value.questionText) === null || _value$questionText === void 0 ? void 0 : _value$questionText.toLocaleLowerCase().includes(r.name.toLocaleLowerCase());
18982
19143
  if (isCheckContain) currentData[index].data.push(_result);
19144
+ setIsNoData(false);
18983
19145
  });
18984
19146
  }
18985
19147
  });
18986
19148
  });
19149
+ setChartMonth(listMonth);
18987
19150
  setSeries(!!question ? currentData : [{
18988
19151
  name: chartName || "",
18989
19152
  data: currentData
@@ -18997,17 +19160,27 @@ var CustomBarChart = function CustomBarChart(_ref) {
18997
19160
  React.useEffect(function () {
18998
19161
  getData();
18999
19162
  }, [data]);
19000
- return React__default.createElement("div", null, React__default.createElement(ReactApexChart, {
19163
+ return React__default.createElement("div", null, !isNoData ? React__default.createElement(ReactApexChart, {
19001
19164
  options: optionsOne,
19002
19165
  series: series,
19003
19166
  type: "line",
19004
19167
  width: "100%",
19005
19168
  height: 350
19169
+ }) : React__default.createElement("img", {
19170
+ className: "" + styles$1["image-no-data"],
19171
+ src: "images/line-chart-nodata.png"
19006
19172
  }));
19007
19173
  };
19008
19174
 
19009
19175
  var StudentByGrade = function StudentByGrade(_ref) {
19176
+ var _series$, _series$$data;
19177
+
19010
19178
  var data = _ref.data;
19179
+
19180
+ var _useState = React.useState([]),
19181
+ series = _useState[0],
19182
+ setSeries = _useState[1];
19183
+
19011
19184
  var options = {
19012
19185
  chart: {
19013
19186
  height: 350,
@@ -19017,17 +19190,37 @@ var StudentByGrade = function StudentByGrade(_ref) {
19017
19190
  },
19018
19191
  plotOptions: {
19019
19192
  bar: {
19020
- borderRadius: 4,
19021
- horizontal: true
19193
+ borderRadius: 2,
19194
+ horizontal: true,
19195
+ distributed: true,
19196
+ dataLabels: {
19197
+ position: "top"
19198
+ }
19022
19199
  }
19023
19200
  },
19201
+ legend: {
19202
+ show: false
19203
+ },
19024
19204
  dataLabels: {
19025
- enabled: false
19205
+ enabled: true,
19206
+ offsetY: 16,
19207
+ offsetX: 17,
19208
+ style: {
19209
+ fontSize: "16px",
19210
+ colors: ["#1D74C5", "#78B6E2", "#78B6E2", "#A4D1F0", "#4B92CE"]
19211
+ }
19026
19212
  },
19027
19213
  grid: {
19028
19214
  show: false
19029
19215
  },
19030
- colors: ["#1D74C5", "#2eb85c", "#78B6E2", "#A4D1F0", "#4B92CE"],
19216
+ tooltip: {
19217
+ x: {
19218
+ formatter: function formatter(val) {
19219
+ return val;
19220
+ }
19221
+ }
19222
+ },
19223
+ colors: ["#1D74C5", "#78B6E2", "#78B6E2", "#A4D1F0", "#4B92CE"],
19031
19224
  xaxis: {
19032
19225
  labels: {
19033
19226
  show: false
@@ -19038,19 +19231,37 @@ var StudentByGrade = function StudentByGrade(_ref) {
19038
19231
  axisTicks: {
19039
19232
  show: false
19040
19233
  }
19234
+ },
19235
+ yaxis: {
19236
+ axisBorder: {
19237
+ show: false
19238
+ },
19239
+ axisTicks: {
19240
+ show: false
19241
+ }
19041
19242
  }
19042
19243
  };
19043
- var series = [{
19044
- data: (data === null || data === void 0 ? void 0 : data.map(function (i) {
19045
- return i.quantity;
19046
- })) || []
19047
- }];
19048
- return React__default.createElement("div", null, React__default.createElement(ReactApexChart, {
19244
+ React.useEffect(function () {
19245
+ var result = [];
19246
+ data === null || data === void 0 ? void 0 : data.map(function (i) {
19247
+ result.push(i.quantity);
19248
+ });
19249
+ setSeries([{
19250
+ name: "Student",
19251
+ data: result
19252
+ }]);
19253
+ }, [data]);
19254
+ return React__default.createElement("div", null, (_series$ = series[0]) !== null && _series$ !== void 0 && (_series$$data = _series$.data) !== null && _series$$data !== void 0 && _series$$data.some(function (i) {
19255
+ return i;
19256
+ }) ? React__default.createElement(ReactApexChart, {
19049
19257
  options: options,
19050
19258
  series: series,
19051
19259
  type: "bar",
19052
19260
  width: "100%",
19053
19261
  height: 350
19262
+ }) : React__default.createElement("img", {
19263
+ className: "" + styles$1["image-no-data"],
19264
+ src: "images/grade.png"
19054
19265
  }));
19055
19266
  };
19056
19267
 
@@ -19058,27 +19269,65 @@ var StudentByGender = function StudentByGender(_ref) {
19058
19269
  var data = _ref.data;
19059
19270
  var series = !!data ? [data.male, data.female] : [];
19060
19271
  var options = {
19061
- labels: ["Female", "Male"],
19272
+ labels: ["Male", "Female"],
19062
19273
  colors: ["#A4D1F0", "#40D2CC"],
19274
+ customScale: 0.8,
19063
19275
  legend: {
19064
19276
  show: false
19277
+ },
19278
+ dataLabels: {
19279
+ formatter: function formatter(_val, opts) {
19280
+ return opts.w.config.series[opts.seriesIndex];
19281
+ },
19282
+ dropShadow: {
19283
+ blur: 0,
19284
+ opacity: 0
19285
+ },
19286
+ style: {
19287
+ fontSize: "32px",
19288
+ fontWeight: 'bold',
19289
+ colors: ["#1D74C5", "#0D9994"]
19290
+ }
19291
+ },
19292
+ fill: {
19293
+ colors: ["#D6ECFB", "#CEF7F5"]
19294
+ },
19295
+ stroke: {
19296
+ colors: ["#A4D1F0", "#80E7E2"],
19297
+ width: 3
19065
19298
  }
19066
19299
  };
19067
19300
  return React__default.createElement("div", {
19068
19301
  className: "d-flex h-100 justify-content-center"
19069
19302
  }, React__default.createElement("div", {
19070
19303
  className: "d-flex align-items-end justify-content-center"
19071
- }, React__default.createElement(ReactApexChart, {
19304
+ }, !!(data !== null && data !== void 0 && data.male) && !!(data !== null && data !== void 0 && data.female) ? React__default.createElement(ReactApexChart, {
19072
19305
  options: options,
19073
19306
  series: series,
19074
19307
  type: "pie",
19075
- height: 350,
19308
+ height: 300,
19076
19309
  width: "100%"
19310
+ }) : React__default.createElement("img", {
19311
+ src: "images/no-data-haft-pie.png",
19312
+ style: {
19313
+ height: "300px",
19314
+ margin: "0 auto",
19315
+ display: "block"
19316
+ }
19077
19317
  })));
19078
19318
  };
19079
19319
 
19080
19320
  var StudentWithSpecialNeeds = function StudentWithSpecialNeeds(_ref) {
19081
19321
  var data = _ref.data;
19322
+
19323
+ var _useState = React.useState(true),
19324
+ isNoData = _useState[0],
19325
+ setIsNoData = _useState[1];
19326
+
19327
+ var _useState2 = React.useState([]),
19328
+ series = _useState2[0],
19329
+ setSeries = _useState2[1];
19330
+
19082
19331
  var options = {
19083
19332
  colors: ["#CEF7F5", "#0D9994", "#1CB7B1", "#40D2CC", "#80E7E2"],
19084
19333
  legend: {
@@ -19087,22 +19336,68 @@ var StudentWithSpecialNeeds = function StudentWithSpecialNeeds(_ref) {
19087
19336
  labels: (data === null || data === void 0 ? void 0 : data.map(function (i) {
19088
19337
  return i.nameSpecial;
19089
19338
  })) || [],
19339
+ dataLabels: {
19340
+ offsetX: 100,
19341
+ offsetY: 0,
19342
+ style: {
19343
+ fontSize: "20px",
19344
+ fontWeight: "none"
19345
+ }
19346
+ },
19090
19347
  plotOptions: {
19091
19348
  pie: {
19092
19349
  donut: {
19093
- size: "50px"
19350
+ size: "40px"
19094
19351
  }
19095
19352
  }
19353
+ },
19354
+ stroke: {
19355
+ width: 0
19356
+ },
19357
+ tooltip: {
19358
+ enabled: true,
19359
+ enabledOnSeries: undefined,
19360
+ shared: true,
19361
+ followCursor: false,
19362
+ intersect: false,
19363
+ inverseOrder: false,
19364
+ custom: undefined,
19365
+ fillSeriesColor: false,
19366
+ theme: "light",
19367
+ style: {
19368
+ fontSize: "20px",
19369
+ fontFamily: undefined
19370
+ },
19371
+ onDatasetHover: {
19372
+ highlightDataSeries: false
19373
+ },
19374
+ fixed: {
19375
+ enabled: false,
19376
+ position: "topRight",
19377
+ offsetX: 0,
19378
+ offsetY: 0
19379
+ }
19096
19380
  }
19097
19381
  };
19098
- return React__default.createElement("div", null, React__default.createElement(ReactApexChart, {
19382
+ React.useEffect(function () {
19383
+ var result = [];
19384
+ data === null || data === void 0 ? void 0 : data.map(function (i) {
19385
+ result.push(i.numberSpecial);
19386
+ if (i.numberSpecial > 0) setIsNoData(false);
19387
+ });
19388
+ setSeries(result);
19389
+ }, [data]);
19390
+ return React__default.createElement("div", {
19391
+ className: styles$1["chart-data"] + " d-flex justify-content-center"
19392
+ }, !isNoData ? React__default.createElement(ReactApexChart, {
19099
19393
  options: options,
19100
- series: (data === null || data === void 0 ? void 0 : data.map(function (i) {
19101
- return i.numberSpecial;
19102
- })) || [],
19394
+ series: series,
19103
19395
  type: "donut",
19104
19396
  width: "100%",
19105
- height: 350
19397
+ height: 300
19398
+ }) : React__default.createElement("img", {
19399
+ className: styles$1["image-no-data"] + " " + styles$1["image-special-need"],
19400
+ src: "images/donut-data.png"
19106
19401
  }));
19107
19402
  };
19108
19403
 
@@ -19140,12 +19435,15 @@ var StudentByAge = function StudentByAge(_ref) {
19140
19435
  var series = [{
19141
19436
  data: !!data ? [data === null || data === void 0 ? void 0 : data.threeToFive, data === null || data === void 0 ? void 0 : data.sixToEight, data === null || data === void 0 ? void 0 : data.nineToTwelve, data === null || data === void 0 ? void 0 : data.thirteenToFifteen, data === null || data === void 0 ? void 0 : data.sixteenToEighteen] : []
19142
19437
  }];
19143
- return React__default.createElement("div", null, React__default.createElement(ReactApexChart, {
19438
+ return React__default.createElement("div", null, series[0].data !== [0, 0, 0, 0, 0] ? React__default.createElement(ReactApexChart, {
19144
19439
  options: options,
19145
19440
  series: series,
19146
19441
  type: "bar",
19147
19442
  width: "100%",
19148
19443
  height: 350
19444
+ }) : React__default.createElement("img", {
19445
+ className: "" + styles$1["image-no-data"],
19446
+ src: "images/student-by-age.png"
19149
19447
  }));
19150
19448
  };
19151
19449
 
@@ -19247,100 +19545,6 @@ var CircleChart = function CircleChart(_ref) {
19247
19545
  })));
19248
19546
  };
19249
19547
 
19250
- var friendCircleItems = function friendCircleItems(_ref) {
19251
- var _ref$bestFriends = _ref.bestFriends,
19252
- bestFriends = _ref$bestFriends === void 0 ? 0 : _ref$bestFriends,
19253
- _ref$friends = _ref.friends,
19254
- friends = _ref$friends === void 0 ? 0 : _ref$friends,
19255
- _ref$couldBeFriends = _ref.couldBeFriends,
19256
- couldBeFriends = _ref$couldBeFriends === void 0 ? 0 : _ref$couldBeFriends,
19257
- _ref$supportive = _ref.supportive,
19258
- supportive = _ref$supportive === void 0 ? 0 : _ref$supportive;
19259
- return [{
19260
- id: 1,
19261
- name: "Best Friends",
19262
- number: bestFriends,
19263
- background: "#9DECF9",
19264
- width: 207,
19265
- height: 207
19266
- }, {
19267
- id: 2,
19268
- name: "Friend",
19269
- number: friends,
19270
- background: "#B2F5EA",
19271
- width: 145,
19272
- height: 145
19273
- }, {
19274
- id: 3,
19275
- name: "Supportive",
19276
- number: supportive,
19277
- background: "#CEEDFF",
19278
- width: 140,
19279
- height: 140
19280
- }, {
19281
- id: 4,
19282
- name: "Could be Friend",
19283
- number: couldBeFriends,
19284
- background: "#E2E8F0",
19285
- width: 150,
19286
- height: 150
19287
- }];
19288
- };
19289
- var activityCircleItems = function activityCircleItems(_ref2) {
19290
- var _ref2$like = _ref2.like,
19291
- like = _ref2$like === void 0 ? 0 : _ref2$like,
19292
- _ref2$love = _ref2.love,
19293
- love = _ref2$love === void 0 ? 0 : _ref2$love,
19294
- _ref2$interested = _ref2.interested,
19295
- interested = _ref2$interested === void 0 ? 0 : _ref2$interested,
19296
- _ref2$curious = _ref2.curious,
19297
- curious = _ref2$curious === void 0 ? 0 : _ref2$curious;
19298
- return [{
19299
- id: 1,
19300
- name: "Like",
19301
- number: like,
19302
- background: "#9DECF9",
19303
- width: 207,
19304
- height: 207
19305
- }, {
19306
- id: 2,
19307
- name: "Love",
19308
- number: love,
19309
- background: "#B2F5EA",
19310
- width: 145,
19311
- height: 145
19312
- }, {
19313
- id: 3,
19314
- name: "Interested",
19315
- number: interested,
19316
- background: "#CEEDFF",
19317
- width: 148,
19318
- height: 148
19319
- }, {
19320
- id: 4,
19321
- name: "Curious",
19322
- number: curious,
19323
- background: "#E2E8F0",
19324
- width: 150,
19325
- height: 150
19326
- }];
19327
- };
19328
- var gradeOptions = function gradeOptions(grades) {
19329
- return grades.map(function (grade, index) {
19330
- return {
19331
- label: grade,
19332
- value: index
19333
- };
19334
- });
19335
- };
19336
- var genderOptions = [{
19337
- value: LegalGenderType.Male,
19338
- label: "Male"
19339
- }, {
19340
- value: LegalGenderType.Female,
19341
- label: "Female"
19342
- }];
19343
-
19344
19548
  var InputSelector = function InputSelector(_ref) {
19345
19549
  var onChange = _ref.onChange,
19346
19550
  placeholder = _ref.placeholder,
@@ -19409,7 +19613,7 @@ var Dashboard = function Dashboard() {
19409
19613
  var user = reactRedux.useSelector(function (state) {
19410
19614
  return state.common.user;
19411
19615
  });
19412
- var questionOneToOne = ["Well-being", "Growth", "Relations", "Productivity", "Academic", "Self-Efficacy", "Happiness", "Energy", "Focus", "Mood", "Learning progress"];
19616
+ var questionOneToOne = ["Well-being", "Growth", "Relations", "Productivity", "Academic", "Self-Efficacy", "Happiness", "Energy", "Focus"];
19413
19617
  var questionClassReflection = ["Focus", "Energy", "Happiness", "Stress", "Productivity"];
19414
19618
  var questionConferences = ["Organization", "Self-Awareness", "Self-Directed Learning", "Self-Management", "Self-Management", "Self-Advocacy"];
19415
19619
  var cards = [{
@@ -19542,7 +19746,9 @@ var Dashboard = function Dashboard() {
19542
19746
  };
19543
19747
 
19544
19748
  var handleFormatDate = function handleFormatDate(date) {
19545
- var dateTime = new Date(date).toISOString().slice(0, 10);
19749
+ var _Date, _Date$toISOString;
19750
+
19751
+ var dateTime = !!date ? (_Date = new Date(date)) === null || _Date === void 0 ? void 0 : (_Date$toISOString = _Date.toISOString()) === null || _Date$toISOString === void 0 ? void 0 : _Date$toISOString.slice(0, 10) : "";
19546
19752
  return dateTime;
19547
19753
  };
19548
19754
 
@@ -19566,7 +19772,15 @@ var Dashboard = function Dashboard() {
19566
19772
  className: "" + styles$1["block-dashboard"]
19567
19773
  }, React__default.createElement("div", {
19568
19774
  className: "d-flex align-items-center justify-content-between"
19569
- }, React__default.createElement("h4", null, "Hey ", user.lastName), React__default.createElement("div", {
19775
+ }, React__default.createElement("div", {
19776
+ className: "d-flex align-items-center mx-3"
19777
+ }, React__default.createElement("h4", {
19778
+ className: styles$1["title-dashboard"] + " m-0"
19779
+ }, "Hey ", user.lastName, "!"), React__default.createElement("img", {
19780
+ className: "mx-2",
19781
+ src: "images/waving-hand.png",
19782
+ alt: ""
19783
+ })), React__default.createElement("div", {
19570
19784
  className: "text-center"
19571
19785
  }, React__default.createElement("button", {
19572
19786
  id: "toggler",
@@ -19589,14 +19803,16 @@ var Dashboard = function Dashboard() {
19589
19803
  onChange: function onChange(e) {
19590
19804
  return handleChangeStartTime(e.target.value);
19591
19805
  },
19592
- value: handleFormatDate(filter.startDate)
19806
+ value: handleFormatDate(filter.startDate),
19807
+ max: handleFormatDate(filter.endDate)
19593
19808
  }), React__default.createElement("input", {
19594
19809
  type: "date",
19595
19810
  className: "" + styles$1["form-date-picker"],
19596
19811
  onChange: function onChange(e) {
19597
19812
  return handleChangeEndTime(e.target.value);
19598
19813
  },
19599
- value: handleFormatDate(filter.endDate)
19814
+ value: handleFormatDate(filter.endDate),
19815
+ min: handleFormatDate(filter.startDate)
19600
19816
  })), React__default.createElement("div", {
19601
19817
  className: "" + styles$1["bock-filter-right"]
19602
19818
  }, React__default.createElement("div", {