mario-education 2.4.562-feedback → 2.4.563-feedback

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,6 +111,7 @@ export declare type TotalCardItem = {
111
111
  value: number;
112
112
  lastMonthValue: number;
113
113
  totalStudent?: number;
114
+ percent?: number;
114
115
  };
115
116
  export interface IGeneralTip {
116
117
  id: number;
@@ -19,12 +19,14 @@ declare const useHome: () => {
19
19
  value: number;
20
20
  lastMonthValue: number;
21
21
  totalStudent: number;
22
+ percent: number;
22
23
  } | {
23
24
  id: string;
24
25
  title: string;
25
26
  value: number;
26
27
  lastMonthValue: number;
27
28
  totalStudent?: undefined;
29
+ percent?: undefined;
28
30
  })[];
29
31
  schoolInfo: import("../common/interface").ISchoolInfo;
30
32
  avgQuestionLastMonth: import("../common/interface").IQuestionResponseLastMonth[];
@@ -6,12 +6,14 @@ declare const useSchoolUsage: () => {
6
6
  value: number;
7
7
  lastMonthValue: number;
8
8
  totalStudent: number;
9
+ percent: number;
9
10
  } | {
10
11
  id: string;
11
12
  title: string;
12
13
  value: number;
13
14
  lastMonthValue: number;
14
15
  totalStudent?: undefined;
16
+ percent?: undefined;
15
17
  })[];
16
18
  schoolInfo: ISchoolInfo;
17
19
  getTotalTime: () => Promise<void>;
package/dist/index.js CHANGED
@@ -72625,6 +72625,8 @@ var getAllTotalStatic = function getAllTotalStatic(filter) {
72625
72625
  };
72626
72626
 
72627
72627
  var useSchoolUsage = function useSchoolUsage() {
72628
+ var _listTotalTime$totalC, _listTotalTime$totalS;
72629
+
72628
72630
  var dispatch = reactRedux.useDispatch();
72629
72631
 
72630
72632
  var _useState = React.useState(INITIAl_HOMEPAGE_STATIC),
@@ -72684,7 +72686,8 @@ var useSchoolUsage = function useSchoolUsage() {
72684
72686
  title: 'Total Check-ins',
72685
72687
  value: listTotalTime === null || listTotalTime === void 0 ? void 0 : listTotalTime.totalCheckIn,
72686
72688
  lastMonthValue: listTotalTime.totalCheckInLastMonth,
72687
- totalStudent: listTotalTime.totalStudent
72689
+ totalStudent: listTotalTime.totalStudent,
72690
+ percent: ((_listTotalTime$totalC = listTotalTime === null || listTotalTime === void 0 ? void 0 : listTotalTime.totalCheckIn) != null ? _listTotalTime$totalC : 0) / ((_listTotalTime$totalS = listTotalTime.totalStudent) != null ? _listTotalTime$totalS : 0) * 100
72688
72691
  }, {
72689
72692
  id: "total_conversations_time",
72690
72693
  title: 'Total Conversation time',
@@ -74357,6 +74360,8 @@ var BorderLinearProgress = core$1.withStyles(function (theme) {
74357
74360
  })(core$1.LinearProgress);
74358
74361
 
74359
74362
  var TotalCard$2 = function TotalCard(_ref) {
74363
+ var _card$percent;
74364
+
74360
74365
  var card = _ref.card;
74361
74366
  var id = card.id;
74362
74367
 
@@ -74411,7 +74416,7 @@ var TotalCard$2 = function TotalCard(_ref) {
74411
74416
  className: "" + styles$b["title-card"]
74412
74417
  }, t(id)), renderIcon(id)), card.id === 'total_check_ins' ? React__default.createElement(BorderLinearProgress, {
74413
74418
  variant: "determinate",
74414
- value: 50
74419
+ value: (_card$percent = card === null || card === void 0 ? void 0 : card.percent) != null ? _card$percent : 0
74415
74420
  }) : null, React__default.createElement("div", {
74416
74421
  className: "d-flex align-items-center w-100"
74417
74422
  }, React__default.createElement("p", {
@@ -74459,7 +74464,7 @@ var SchoolUsage = function SchoolUsage(_ref) {
74459
74464
  variant: "h4",
74460
74465
  component: "h4",
74461
74466
  className: classes.title
74462
- }, t('school_usage')), totalCardData.map(function (item) {
74467
+ }, t('school_monthly_usage')), totalCardData.map(function (item) {
74463
74468
  return React__default.createElement(TotalCard$2, {
74464
74469
  key: item.id,
74465
74470
  card: item