mario-education 2.5.11-release → 2.5.12-release
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/containers/Homepage/common/interface.d.ts +1 -0
- package/dist/containers/Homepage/hooks/useHome.d.ts +2 -0
- package/dist/containers/Homepage/hooks/useSchoolUsage.d.ts +2 -0
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +9 -4
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
|
@@ -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
|
@@ -72370,7 +72370,7 @@ var getConvertMinuteToHour$1 = function getConvertMinuteToHour(time, usingText)
|
|
|
72370
72370
|
var timeSecond = time * 60;
|
|
72371
72371
|
var hours = Math.floor(timeSecond / 3600);
|
|
72372
72372
|
var minutes = Math.floor(timeSecond % 3600 / 60);
|
|
72373
|
-
var remainingSeconds = timeSecond % 60;
|
|
72373
|
+
var remainingSeconds = Math.floor(timeSecond % 60);
|
|
72374
72374
|
var formattedHours = String(hours).padStart(2, '0');
|
|
72375
72375
|
var formattedMinutes = String(minutes).padStart(2, '0');
|
|
72376
72376
|
var formattedSeconds = String(remainingSeconds).padStart(2, '0');
|
|
@@ -72576,6 +72576,8 @@ var getAllTotalStatic = function getAllTotalStatic(filter) {
|
|
|
72576
72576
|
};
|
|
72577
72577
|
|
|
72578
72578
|
var useSchoolUsage = function useSchoolUsage() {
|
|
72579
|
+
var _listTotalTime$totalC, _listTotalTime$totalS;
|
|
72580
|
+
|
|
72579
72581
|
var dispatch = reactRedux.useDispatch();
|
|
72580
72582
|
|
|
72581
72583
|
var _useState = React.useState(INITIAl_HOMEPAGE_STATIC),
|
|
@@ -72635,7 +72637,8 @@ var useSchoolUsage = function useSchoolUsage() {
|
|
|
72635
72637
|
title: 'Total Check-ins',
|
|
72636
72638
|
value: listTotalTime === null || listTotalTime === void 0 ? void 0 : listTotalTime.totalCheckIn,
|
|
72637
72639
|
lastMonthValue: listTotalTime.totalCheckInLastMonth,
|
|
72638
|
-
totalStudent: listTotalTime.totalStudent
|
|
72640
|
+
totalStudent: listTotalTime.totalStudent,
|
|
72641
|
+
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
|
|
72639
72642
|
}, {
|
|
72640
72643
|
id: "total_conversations_time",
|
|
72641
72644
|
title: 'Total Conversation time',
|
|
@@ -74308,6 +74311,8 @@ var BorderLinearProgress = core$1.withStyles(function (theme) {
|
|
|
74308
74311
|
})(core$1.LinearProgress);
|
|
74309
74312
|
|
|
74310
74313
|
var TotalCard$2 = function TotalCard(_ref) {
|
|
74314
|
+
var _card$percent;
|
|
74315
|
+
|
|
74311
74316
|
var card = _ref.card;
|
|
74312
74317
|
var id = card.id;
|
|
74313
74318
|
|
|
@@ -74362,7 +74367,7 @@ var TotalCard$2 = function TotalCard(_ref) {
|
|
|
74362
74367
|
className: "" + styles$b["title-card"]
|
|
74363
74368
|
}, t(id)), renderIcon(id)), card.id === 'total_check_ins' ? React__default.createElement(BorderLinearProgress, {
|
|
74364
74369
|
variant: "determinate",
|
|
74365
|
-
value:
|
|
74370
|
+
value: (_card$percent = card === null || card === void 0 ? void 0 : card.percent) != null ? _card$percent : 0
|
|
74366
74371
|
}) : null, React__default.createElement("div", {
|
|
74367
74372
|
className: "d-flex align-items-center w-100"
|
|
74368
74373
|
}, React__default.createElement("p", {
|
|
@@ -74410,7 +74415,7 @@ var SchoolUsage = function SchoolUsage(_ref) {
|
|
|
74410
74415
|
variant: "h4",
|
|
74411
74416
|
component: "h4",
|
|
74412
74417
|
className: classes.title
|
|
74413
|
-
}, t('
|
|
74418
|
+
}, t('school_monthly_usage')), totalCardData.map(function (item) {
|
|
74414
74419
|
return React__default.createElement(TotalCard$2, {
|
|
74415
74420
|
key: item.id,
|
|
74416
74421
|
card: item
|