mario-education 2.2.6 → 2.3.0
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.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { api, BASE_URL, setAlert, CustomSelector, LinkEditButton, DeleteButtonIcon, EmptyDataAlert, CommonModal, RequiredLabel, ErrorHandler, useFilters, setLoading, setClassList, setModal, QuitPrompt, AddButton, CustomPagination, setConferenceRubricList, SearchBoxContainer, getTextFromHTML, generateRandomString, QuestionCategorySelector, DetailActionButtons, SuggestionCategorySelector, CreatableSelector, setSuggestionList, setStrategyList, UploadFileButton, systemStudentBadge, setBadgeList, getFileUrl, setGoalExampleList, setSubjectList, setLearningSupportCategoryList, apiUpload, utcToLocalTime, DATE_FORMAT, setSemesterList, setBandScoreList, EditButtonIcon, setSchoolBlankDayList, SearchBox, CustomTab, SkillList, QUESTION_TYPES, EMOTIONS, QUESTION_TYPES_OPTIONS, setQuestionList, setQuestionByCategory, setSelectQuestion, setResetQuestionList, setMoveItemQuestion, setEditItemQuesion, DEFAULT_FILTER, setReflectionList, setReflectionResultList, DATE_RESULT, StarRatingSelector, editorConfig, TINY_MCE_API_KEY, QuestionTypeSelector, setAssessmentList, FULL_DATE_RESULT, setFeedbackList, setTutorialScreenList, setQuestionCateList, setAssignmentList, setSessionTemplateList, setSessionTemplateGeneralClassList, setCustomAlertList, systemCertificateUpload, setCertificateList,
|
|
1
|
+
import { api, BASE_URL, setAlert, CustomSelector, LinkEditButton, DeleteButtonIcon, EmptyDataAlert, CommonModal, RequiredLabel, ErrorHandler, useFilters, setLoading, setClassList, setModal, QuitPrompt, AddButton, CustomPagination, setConferenceRubricList, SearchBoxContainer, getTextFromHTML, generateRandomString, QuestionCategorySelector, DetailActionButtons, SuggestionCategorySelector, CreatableSelector, setSuggestionList, setStrategyList, UploadFileButton, systemStudentBadge, setBadgeList, getFileUrl, setGoalExampleList, setSubjectList, setLearningSupportCategoryList, apiUpload, utcToLocalTime, DATE_FORMAT, setSemesterList, setBandScoreList, EditButtonIcon, setSchoolBlankDayList, SearchBox, CustomTab, SkillList, QUESTION_TYPES, EMOTIONS, QUESTION_TYPES_OPTIONS, setQuestionList, setQuestionByCategory, setSelectQuestion, setResetQuestionList, setMoveItemQuestion, setEditItemQuesion, DEFAULT_FILTER, setReflectionList, setReflectionResultList, DATE_RESULT, StarRatingSelector, editorConfig, TINY_MCE_API_KEY, QuestionTypeSelector, setAssessmentList, FULL_DATE_RESULT, setFeedbackList, setTutorialScreenList, setQuestionCateList, setAssignmentList, setSessionTemplateList, setSessionTemplateGeneralClassList, setCustomAlertList, systemCertificateUpload, setCertificateList, LICENSE_AGGRID } from 'mario-core';
|
|
2
2
|
import { LicenseManager } from '@ag-grid-enterprise/core';
|
|
3
3
|
import React, { useState, useRef, useCallback, useEffect, forwardRef, useMemo, Fragment, memo } from 'react';
|
|
4
4
|
import { useDispatch, useSelector } from 'react-redux';
|
|
@@ -5410,7 +5410,7 @@ var SemesterDetailModal = function SemesterDetailModal(props, ref) {
|
|
|
5410
5410
|
})), React.createElement(Col, {
|
|
5411
5411
|
md: 6
|
|
5412
5412
|
}, React.createElement(DatePicker, {
|
|
5413
|
-
value: utcToLocalTime(values.startTime, "
|
|
5413
|
+
value: !!values.startTime ? utcToLocalTime(values.startTime, "Do MMMM YYYY") : "",
|
|
5414
5414
|
todayButton: "Today",
|
|
5415
5415
|
peekNextMonth: true,
|
|
5416
5416
|
showMonthDropdown: true,
|
|
@@ -5441,7 +5441,7 @@ var SemesterDetailModal = function SemesterDetailModal(props, ref) {
|
|
|
5441
5441
|
})), React.createElement(Col, {
|
|
5442
5442
|
md: 6
|
|
5443
5443
|
}, React.createElement(DatePicker, {
|
|
5444
|
-
value: utcToLocalTime(values.endTime, "
|
|
5444
|
+
value: !!values.endTime ? utcToLocalTime(values.endTime, "Do MMMM YYYY") : "",
|
|
5445
5445
|
todayButton: "Today",
|
|
5446
5446
|
peekNextMonth: true,
|
|
5447
5447
|
showMonthDropdown: true,
|
|
@@ -6057,9 +6057,9 @@ var SemesterList = function SemesterList() {
|
|
|
6057
6057
|
}
|
|
6058
6058
|
})), React.createElement("td", {
|
|
6059
6059
|
className: "align-middle"
|
|
6060
|
-
}, utcToLocalTime(record.startTime, "
|
|
6060
|
+
}, utcToLocalTime(record.startTime, "Do MMMM YYYY")), React.createElement("td", {
|
|
6061
6061
|
className: "align-middle"
|
|
6062
|
-
}, utcToLocalTime(record.endTime, "
|
|
6062
|
+
}, utcToLocalTime(record.endTime, "Do MMMM YYYY")), React.createElement("td", {
|
|
6063
6063
|
className: "text-center align-middle"
|
|
6064
6064
|
}, React.createElement(DeleteButtonIcon, {
|
|
6065
6065
|
onClick: function onClick() {
|
|
@@ -7241,9 +7241,9 @@ var SchoolBlankDayList = function SchoolBlankDayList() {
|
|
|
7241
7241
|
}
|
|
7242
7242
|
})), React.createElement("td", {
|
|
7243
7243
|
className: "align-middle"
|
|
7244
|
-
}, utcToLocalTime(record.startTime,
|
|
7244
|
+
}, utcToLocalTime(record.startTime, "Do MMMM YYYY")), React.createElement("td", {
|
|
7245
7245
|
className: "align-middle"
|
|
7246
|
-
}, utcToLocalTime(record.endTime,
|
|
7246
|
+
}, utcToLocalTime(record.endTime, "Do MMMM YYYY")), React.createElement("td", {
|
|
7247
7247
|
className: "text-center align-middle"
|
|
7248
7248
|
}, React.createElement(DeleteButtonIcon, {
|
|
7249
7249
|
onClick: function onClick() {
|
|
@@ -11729,109 +11729,6 @@ var TutorialScreenContainer = function TutorialScreenContainer() {
|
|
|
11729
11729
|
});
|
|
11730
11730
|
};
|
|
11731
11731
|
|
|
11732
|
-
var QuestionBankList$1 = function QuestionBankList(_ref) {
|
|
11733
|
-
var isDefaultQuestion = _ref.isDefaultQuestion,
|
|
11734
|
-
isDefaultQuestionGeneral = _ref.isDefaultQuestionGeneral;
|
|
11735
|
-
|
|
11736
|
-
var _useQuestionList = useQuestionList(isDefaultQuestion, isDefaultQuestionGeneral),
|
|
11737
|
-
totalItems = _useQuestionList.totalItems,
|
|
11738
|
-
gridOptions = _useQuestionList.gridOptions,
|
|
11739
|
-
setRef = _useQuestionList.setRef,
|
|
11740
|
-
goToDetail = _useQuestionList.goToDetail,
|
|
11741
|
-
filters = _useQuestionList.filters,
|
|
11742
|
-
changeFilters = _useQuestionList.changeFilters,
|
|
11743
|
-
updateOrderQuestions = _useQuestionList.updateOrderQuestions;
|
|
11744
|
-
|
|
11745
|
-
var onRowDragEnd = function onRowDragEnd(e) {
|
|
11746
|
-
var dataAfterDrag = e.node.parent.childrenAfterFilter.map(function (item, index) {
|
|
11747
|
-
return {
|
|
11748
|
-
id: item.data.id,
|
|
11749
|
-
orderDrag: ++index
|
|
11750
|
-
};
|
|
11751
|
-
});
|
|
11752
|
-
updateOrderQuestions(dataAfterDrag, isDefaultQuestionGeneral);
|
|
11753
|
-
};
|
|
11754
|
-
|
|
11755
|
-
return React.createElement("div", {
|
|
11756
|
-
className: "animated fadeIn"
|
|
11757
|
-
}, React.createElement(Row, {
|
|
11758
|
-
className: "my-2"
|
|
11759
|
-
}, React.createElement(Col, {
|
|
11760
|
-
md: 8
|
|
11761
|
-
}, React.createElement(SearchBoxContainer, {
|
|
11762
|
-
text: "Create question",
|
|
11763
|
-
onClick: function onClick() {
|
|
11764
|
-
return goToDetail();
|
|
11765
|
-
},
|
|
11766
|
-
initValue: filters.searchString,
|
|
11767
|
-
onSearch: function onSearch(searchString) {
|
|
11768
|
-
return changeFilters({
|
|
11769
|
-
searchString: searchString
|
|
11770
|
-
});
|
|
11771
|
-
},
|
|
11772
|
-
placeholder: "Type something to Search question"
|
|
11773
|
-
})), isDefaultQuestion && React.createElement(Col, {
|
|
11774
|
-
md: 2
|
|
11775
|
-
}, React.createElement(DefaultQuestionStudentTeacherFilter, {
|
|
11776
|
-
isDefaultQuestionTeacher: filters.isDefaultQuestionTeacher,
|
|
11777
|
-
onChange: function onChange(e) {
|
|
11778
|
-
return changeFilters({
|
|
11779
|
-
isDefaultQuestionTeacher: e ? e.value : null
|
|
11780
|
-
});
|
|
11781
|
-
}
|
|
11782
|
-
})), isDefaultQuestionGeneral && React.createElement(Col, {
|
|
11783
|
-
md: 2
|
|
11784
|
-
}, React.createElement(DefaultQuestionStudentTeacherFilter, {
|
|
11785
|
-
isDefaultQuestionTeacher: filters.isDefaultQuestionGeneralClassTeacher,
|
|
11786
|
-
onChange: function onChange(e) {
|
|
11787
|
-
return changeFilters({
|
|
11788
|
-
isDefaultQuestionGeneralClassTeacher: e ? e.value : null
|
|
11789
|
-
});
|
|
11790
|
-
},
|
|
11791
|
-
isDefaultGeneralClass: true
|
|
11792
|
-
})), React.createElement(Col, {
|
|
11793
|
-
md: isDefaultQuestion || isDefaultQuestionGeneral ? 2 : 4,
|
|
11794
|
-
className: "d-flex align-items-center justify-content-end"
|
|
11795
|
-
}, "Total of questions: ", totalItems)), React.createElement(Row, {
|
|
11796
|
-
className: "mb-2"
|
|
11797
|
-
}, React.createElement(Col, {
|
|
11798
|
-
md: 12,
|
|
11799
|
-
className: "mb-2"
|
|
11800
|
-
}, React.createElement("div", {
|
|
11801
|
-
className: "ag-theme-balham w-100"
|
|
11802
|
-
}, React.createElement(AgGridReact, {
|
|
11803
|
-
domLayout: "autoHeight",
|
|
11804
|
-
gridOptions: gridOptions,
|
|
11805
|
-
masterDetail: true,
|
|
11806
|
-
onGridReady: function onGridReady(params) {
|
|
11807
|
-
setRef(params.api);
|
|
11808
|
-
},
|
|
11809
|
-
rowDragManaged: true,
|
|
11810
|
-
animateRows: true,
|
|
11811
|
-
modules: [MasterDetailModule, ClientSideRowModelModule],
|
|
11812
|
-
onRowDragEnd: onRowDragEnd
|
|
11813
|
-
}))), React.createElement(Col, {
|
|
11814
|
-
md: 12
|
|
11815
|
-
}, React.createElement(CustomPagination, {
|
|
11816
|
-
filters: filters,
|
|
11817
|
-
totalRecordCount: totalItems,
|
|
11818
|
-
changePageSize: function changePageSize(pageSize) {
|
|
11819
|
-
return changeFilters({
|
|
11820
|
-
pageSize: pageSize
|
|
11821
|
-
});
|
|
11822
|
-
},
|
|
11823
|
-
changePage: function changePage(currentPage) {
|
|
11824
|
-
return changeFilters({
|
|
11825
|
-
currentPage: currentPage
|
|
11826
|
-
});
|
|
11827
|
-
}
|
|
11828
|
-
}))));
|
|
11829
|
-
};
|
|
11830
|
-
|
|
11831
|
-
QuestionBankList$1.defaultProps = {
|
|
11832
|
-
isDefaultQuestion: false
|
|
11833
|
-
};
|
|
11834
|
-
|
|
11835
11732
|
var schema$c = object({
|
|
11836
11733
|
name: string().required("Name is required")
|
|
11837
11734
|
});
|
|
@@ -12260,25 +12157,7 @@ var QuestionCateList = function QuestionCateList() {
|
|
|
12260
12157
|
var tabs$3 = [{
|
|
12261
12158
|
path: "/admin/question/question-list",
|
|
12262
12159
|
title: "Question list",
|
|
12263
|
-
component: QuestionBankList
|
|
12264
|
-
}, {
|
|
12265
|
-
path: "/admin/question/default-question-list",
|
|
12266
|
-
title: "Default question list",
|
|
12267
|
-
component: function component() {
|
|
12268
|
-
return React.createElement(QuestionBankList$1, {
|
|
12269
|
-
isDefaultQuestion: true,
|
|
12270
|
-
isDefaultQuestionGeneral: false
|
|
12271
|
-
});
|
|
12272
|
-
}
|
|
12273
|
-
}, {
|
|
12274
|
-
path: "/admin/question/default-question-general-list",
|
|
12275
|
-
title: "Default question general class list",
|
|
12276
|
-
component: function component() {
|
|
12277
|
-
return React.createElement(QuestionBankList$1, {
|
|
12278
|
-
isDefaultQuestion: false,
|
|
12279
|
-
isDefaultQuestionGeneral: true
|
|
12280
|
-
});
|
|
12281
|
-
}
|
|
12160
|
+
component: QuestionBankList
|
|
12282
12161
|
}, {
|
|
12283
12162
|
path: "/admin/question/question-category",
|
|
12284
12163
|
title: "Question category",
|
|
@@ -17265,107 +17144,6 @@ var DashboardCard = function DashboardCard(_ref) {
|
|
|
17265
17144
|
}, children));
|
|
17266
17145
|
};
|
|
17267
17146
|
|
|
17268
|
-
var colors = ["#1C77AC", "#00979B", "#8B0000", "#87E0E0", "#2EB82E"];
|
|
17269
|
-
var levels = [{
|
|
17270
|
-
name: "No progress",
|
|
17271
|
-
field: "noProgress"
|
|
17272
|
-
}, {
|
|
17273
|
-
name: "Slight",
|
|
17274
|
-
field: "slight"
|
|
17275
|
-
}, {
|
|
17276
|
-
name: "Moderate",
|
|
17277
|
-
field: "moderate"
|
|
17278
|
-
}, {
|
|
17279
|
-
name: "Significant",
|
|
17280
|
-
field: "significant"
|
|
17281
|
-
}, {
|
|
17282
|
-
name: "Achieved",
|
|
17283
|
-
field: "achieved"
|
|
17284
|
-
}];
|
|
17285
|
-
|
|
17286
|
-
var GoalProgressReport = function GoalProgressReport(_ref) {
|
|
17287
|
-
var data = _ref.data;
|
|
17288
|
-
var series = useMemo(function () {
|
|
17289
|
-
if (!data) return [];
|
|
17290
|
-
|
|
17291
|
-
try {
|
|
17292
|
-
return levels.map(function (level) {
|
|
17293
|
-
return {
|
|
17294
|
-
name: level.name,
|
|
17295
|
-
data: data.map(function (item) {
|
|
17296
|
-
return item[level.field];
|
|
17297
|
-
})
|
|
17298
|
-
};
|
|
17299
|
-
});
|
|
17300
|
-
} catch (_unused) {
|
|
17301
|
-
return [];
|
|
17302
|
-
}
|
|
17303
|
-
}, [data]);
|
|
17304
|
-
var categories = useMemo(function () {
|
|
17305
|
-
if (!data) return [];
|
|
17306
|
-
|
|
17307
|
-
try {
|
|
17308
|
-
return data.map(function (item) {
|
|
17309
|
-
return item.createdAt;
|
|
17310
|
-
});
|
|
17311
|
-
} catch (_unused2) {
|
|
17312
|
-
return [];
|
|
17313
|
-
}
|
|
17314
|
-
}, [data]);
|
|
17315
|
-
if (!data) return React.createElement(Loading$1, null);
|
|
17316
|
-
var options = {
|
|
17317
|
-
chart: {
|
|
17318
|
-
type: "bar",
|
|
17319
|
-
height: 350,
|
|
17320
|
-
stacked: true,
|
|
17321
|
-
stackType: "100%",
|
|
17322
|
-
toolbar: {
|
|
17323
|
-
show: false
|
|
17324
|
-
}
|
|
17325
|
-
},
|
|
17326
|
-
plotOptions: {
|
|
17327
|
-
bar: {
|
|
17328
|
-
horizontal: false,
|
|
17329
|
-
columnWidth: "80%"
|
|
17330
|
-
}
|
|
17331
|
-
},
|
|
17332
|
-
colors: colors,
|
|
17333
|
-
responsive: [{
|
|
17334
|
-
breakpoint: 480,
|
|
17335
|
-
options: {
|
|
17336
|
-
legend: {
|
|
17337
|
-
position: "bottom",
|
|
17338
|
-
offsetX: -10,
|
|
17339
|
-
offsetY: 0
|
|
17340
|
-
}
|
|
17341
|
-
}
|
|
17342
|
-
}],
|
|
17343
|
-
xaxis: {
|
|
17344
|
-
categories: categories
|
|
17345
|
-
},
|
|
17346
|
-
fill: {
|
|
17347
|
-
opacity: 1
|
|
17348
|
-
},
|
|
17349
|
-
legend: {
|
|
17350
|
-
position: "right",
|
|
17351
|
-
offsetX: 0,
|
|
17352
|
-
offsetY: 50,
|
|
17353
|
-
onItemClick: {
|
|
17354
|
-
toggleDataSeries: false
|
|
17355
|
-
},
|
|
17356
|
-
onItemHover: {
|
|
17357
|
-
highlightDataSeries: false
|
|
17358
|
-
}
|
|
17359
|
-
}
|
|
17360
|
-
};
|
|
17361
|
-
return React.createElement("div", null, React.createElement(ReactApexChart, {
|
|
17362
|
-
options: options,
|
|
17363
|
-
series: series,
|
|
17364
|
-
type: "bar",
|
|
17365
|
-
height: 350
|
|
17366
|
-
}));
|
|
17367
|
-
};
|
|
17368
|
-
|
|
17369
17147
|
var Loading = function Loading() {
|
|
17370
17148
|
return React.createElement("div", {
|
|
17371
17149
|
className: "d-flex align-items-center justify-content-center"
|
|
@@ -17387,14 +17165,14 @@ var Loading = function Loading() {
|
|
|
17387
17165
|
}, "Loading...")));
|
|
17388
17166
|
};
|
|
17389
17167
|
|
|
17390
|
-
var colors
|
|
17168
|
+
var colors = ["rgba(129, 236, 236, 0.8)", "rgba(116, 185, 255, 0.8)", "rgba(250, 177, 160, 0.8)", "rgba(255, 234, 167, 0.8)", "rgba(178, 190, 195, 0.8)", "rgba(85, 239, 196, 0.8)", "rgba(120, 111, 166, 0.8)", "rgba(243, 166, 131, 0.8)"];
|
|
17391
17169
|
|
|
17392
17170
|
var getColors = function getColors(length) {
|
|
17393
|
-
if (colors
|
|
17394
|
-
var newColors = [].concat(colors
|
|
17171
|
+
if (colors.length >= length) return colors;
|
|
17172
|
+
var newColors = [].concat(colors);
|
|
17395
17173
|
|
|
17396
17174
|
while (newColors.length < length) {
|
|
17397
|
-
newColors = [].concat(newColors, colors
|
|
17175
|
+
newColors = [].concat(newColors, colors);
|
|
17398
17176
|
}
|
|
17399
17177
|
|
|
17400
17178
|
return newColors;
|
|
@@ -17429,6 +17207,7 @@ var HighImpact = function HighImpact(_ref) {
|
|
|
17429
17207
|
}, [data]);
|
|
17430
17208
|
if (!data) return React.createElement(Loading, null);
|
|
17431
17209
|
var series = [{
|
|
17210
|
+
name: "",
|
|
17432
17211
|
data: ratings
|
|
17433
17212
|
}];
|
|
17434
17213
|
var options = {
|
|
@@ -17485,7 +17264,7 @@ var HighImpact = function HighImpact(_ref) {
|
|
|
17485
17264
|
})));
|
|
17486
17265
|
};
|
|
17487
17266
|
|
|
17488
|
-
var colors$
|
|
17267
|
+
var colors$1 = ["#1abc9c", "#c0392b"];
|
|
17489
17268
|
|
|
17490
17269
|
var LoginCouting = function LoginCouting(_ref) {
|
|
17491
17270
|
var data = _ref.data;
|
|
@@ -17502,11 +17281,11 @@ var LoginCouting = function LoginCouting(_ref) {
|
|
|
17502
17281
|
var series = [{
|
|
17503
17282
|
name: "Teacher",
|
|
17504
17283
|
data: teacherCount,
|
|
17505
|
-
color: colors$
|
|
17284
|
+
color: colors$1[0]
|
|
17506
17285
|
}, {
|
|
17507
17286
|
name: "Student",
|
|
17508
17287
|
data: studentCount,
|
|
17509
|
-
color: colors$
|
|
17288
|
+
color: colors$1[1]
|
|
17510
17289
|
}];
|
|
17511
17290
|
var options = {
|
|
17512
17291
|
chart: {
|
|
@@ -17523,7 +17302,7 @@ var LoginCouting = function LoginCouting(_ref) {
|
|
|
17523
17302
|
markers: {
|
|
17524
17303
|
size: 4,
|
|
17525
17304
|
colors: ["#fff"],
|
|
17526
|
-
strokeColors: colors$
|
|
17305
|
+
strokeColors: colors$1,
|
|
17527
17306
|
strokeWidth: 2,
|
|
17528
17307
|
strokeOpacity: 0.9,
|
|
17529
17308
|
strokeDashArray: 0,
|
|
@@ -17555,17 +17334,12 @@ var LoginCouting = function LoginCouting(_ref) {
|
|
|
17555
17334
|
}));
|
|
17556
17335
|
};
|
|
17557
17336
|
|
|
17558
|
-
var colors$
|
|
17337
|
+
var colors$2 = ["#00cec9", "#00b894"];
|
|
17559
17338
|
|
|
17560
17339
|
var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
17561
17340
|
var data = _ref.data;
|
|
17562
17341
|
if (!data) return React.createElement(Loading, null);
|
|
17563
17342
|
var series = [{
|
|
17564
|
-
name: "Teacher",
|
|
17565
|
-
data: data.map(function (item) {
|
|
17566
|
-
return item.teacherRating;
|
|
17567
|
-
})
|
|
17568
|
-
}, {
|
|
17569
17343
|
name: "Student",
|
|
17570
17344
|
data: data.map(function (item) {
|
|
17571
17345
|
return item.studentRating;
|
|
@@ -17582,7 +17356,7 @@ var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
|
17582
17356
|
show: false
|
|
17583
17357
|
}
|
|
17584
17358
|
},
|
|
17585
|
-
colors: colors$
|
|
17359
|
+
colors: colors$2,
|
|
17586
17360
|
plotOptions: {
|
|
17587
17361
|
bar: {
|
|
17588
17362
|
horizontal: false,
|
|
@@ -17620,14 +17394,17 @@ var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
|
17620
17394
|
}));
|
|
17621
17395
|
};
|
|
17622
17396
|
|
|
17623
|
-
var colors$
|
|
17397
|
+
var colors$3 = ["#00b894", "#00cec9", "#0984e3"];
|
|
17624
17398
|
|
|
17625
17399
|
var Quantity = function Quantity(_ref) {
|
|
17626
17400
|
var data = _ref.data;
|
|
17627
17401
|
if (!data) return React.createElement(Loading, null);
|
|
17628
17402
|
var teacherPercentage = data.teacherPercentage,
|
|
17629
17403
|
studentPercentage = data.studentPercentage,
|
|
17630
|
-
assistantPercentage = data.assistantPercentage
|
|
17404
|
+
assistantPercentage = data.assistantPercentage,
|
|
17405
|
+
numberOfTeachers = data.numberOfTeachers,
|
|
17406
|
+
numberOfStudents = data.numberOfStudents,
|
|
17407
|
+
numberOfAssistants = data.numberOfAssistants;
|
|
17631
17408
|
var series = [teacherPercentage, studentPercentage, assistantPercentage].map(function (number) {
|
|
17632
17409
|
return Number(number.toFixed(2));
|
|
17633
17410
|
});
|
|
@@ -17637,7 +17414,7 @@ var Quantity = function Quantity(_ref) {
|
|
|
17637
17414
|
type: "pie"
|
|
17638
17415
|
},
|
|
17639
17416
|
labels: ["Teachers", "Students", "Assistants"],
|
|
17640
|
-
colors: colors$
|
|
17417
|
+
colors: colors$3,
|
|
17641
17418
|
legend: {
|
|
17642
17419
|
show: false
|
|
17643
17420
|
},
|
|
@@ -17652,16 +17429,16 @@ var Quantity = function Quantity(_ref) {
|
|
|
17652
17429
|
};
|
|
17653
17430
|
var details = [{
|
|
17654
17431
|
label: "Teachers",
|
|
17655
|
-
color: colors$
|
|
17656
|
-
value:
|
|
17432
|
+
color: colors$3[0],
|
|
17433
|
+
value: numberOfTeachers
|
|
17657
17434
|
}, {
|
|
17658
17435
|
label: "Students",
|
|
17659
|
-
color: colors$
|
|
17660
|
-
value:
|
|
17436
|
+
color: colors$3[1],
|
|
17437
|
+
value: numberOfStudents
|
|
17661
17438
|
}, {
|
|
17662
17439
|
label: "Assistants",
|
|
17663
|
-
color: colors$
|
|
17664
|
-
value:
|
|
17440
|
+
color: colors$3[2],
|
|
17441
|
+
value: numberOfAssistants
|
|
17665
17442
|
}];
|
|
17666
17443
|
return React.createElement("div", {
|
|
17667
17444
|
className: "d-flex h-100"
|
|
@@ -17675,8 +17452,6 @@ var Quantity = function Quantity(_ref) {
|
|
|
17675
17452
|
bordered: true,
|
|
17676
17453
|
size: "sm"
|
|
17677
17454
|
}, React.createElement("tbody", null, details.map(function (item) {
|
|
17678
|
-
var _item$value;
|
|
17679
|
-
|
|
17680
17455
|
return React.createElement("tr", {
|
|
17681
17456
|
key: item.label
|
|
17682
17457
|
}, React.createElement("td", null, item.label), React.createElement("td", {
|
|
@@ -17686,8 +17461,8 @@ var Quantity = function Quantity(_ref) {
|
|
|
17686
17461
|
style: {
|
|
17687
17462
|
backgroundColor: item.color
|
|
17688
17463
|
}
|
|
17689
|
-
})), React.createElement("td", null,
|
|
17690
|
-
}))))), React.createElement("div", {
|
|
17464
|
+
})), React.createElement("td", null, item.value));
|
|
17465
|
+
}))), React.createElement("p", null, "The number of user for each role"))), React.createElement("div", {
|
|
17691
17466
|
className: "d-flex align-items-end"
|
|
17692
17467
|
}, React.createElement(ReactApexChart, {
|
|
17693
17468
|
options: options,
|
|
@@ -17697,95 +17472,12 @@ var Quantity = function Quantity(_ref) {
|
|
|
17697
17472
|
})));
|
|
17698
17473
|
};
|
|
17699
17474
|
|
|
17700
|
-
var colors$5 = ["#f0932b", "#22a6b3", "#6ab04c"];
|
|
17701
|
-
var categories = ["Before intervention", "During intervention", "After intervention"];
|
|
17702
|
-
|
|
17703
|
-
var findGradeLabel = function findGradeLabel(value, bandScores) {
|
|
17704
|
-
var sortedBandScores = bandScores === null || bandScores === void 0 ? void 0 : bandScores.sort(function (item1, item2) {
|
|
17705
|
-
return item1.value - item2.value;
|
|
17706
|
-
});
|
|
17707
|
-
|
|
17708
|
-
if ((sortedBandScores === null || sortedBandScores === void 0 ? void 0 : sortedBandScores.length) > 0) {
|
|
17709
|
-
for (var i = 0; i < sortedBandScores.length; i++) {
|
|
17710
|
-
var _sortedBandScores$i, _sortedBandScores;
|
|
17711
|
-
|
|
17712
|
-
if (((_sortedBandScores$i = sortedBandScores[i]) === null || _sortedBandScores$i === void 0 ? void 0 : _sortedBandScores$i.value) <= value && value <= ((_sortedBandScores = sortedBandScores[i + 1]) === null || _sortedBandScores === void 0 ? void 0 : _sortedBandScores.value)) {
|
|
17713
|
-
var _sortedBandScores$i2, _sortedBandScores2, _sortedBandScores3;
|
|
17714
|
-
|
|
17715
|
-
if (value - ((_sortedBandScores$i2 = sortedBandScores[i]) === null || _sortedBandScores$i2 === void 0 ? void 0 : _sortedBandScores$i2.value) <= ((_sortedBandScores2 = sortedBandScores[i + 1]) === null || _sortedBandScores2 === void 0 ? void 0 : _sortedBandScores2.value) - value) {
|
|
17716
|
-
var _sortedBandScores$i3;
|
|
17717
|
-
|
|
17718
|
-
return (_sortedBandScores$i3 = sortedBandScores[i]) === null || _sortedBandScores$i3 === void 0 ? void 0 : _sortedBandScores$i3.label;
|
|
17719
|
-
}
|
|
17720
|
-
|
|
17721
|
-
return (_sortedBandScores3 = sortedBandScores[i + 1]) === null || _sortedBandScores3 === void 0 ? void 0 : _sortedBandScores3.label;
|
|
17722
|
-
}
|
|
17723
|
-
}
|
|
17724
|
-
}
|
|
17725
|
-
|
|
17726
|
-
return "";
|
|
17727
|
-
};
|
|
17728
|
-
|
|
17729
|
-
var Grade = function Grade(_ref) {
|
|
17730
|
-
var data = _ref.data;
|
|
17731
|
-
if (!data) return React.createElement(Loading, null);
|
|
17732
|
-
var series = [{
|
|
17733
|
-
data: [data.beforeIntervention, data.duringIntervention, data.afterIntervention]
|
|
17734
|
-
}];
|
|
17735
|
-
var options = {
|
|
17736
|
-
chart: {
|
|
17737
|
-
height: 350,
|
|
17738
|
-
type: "bar",
|
|
17739
|
-
toolbar: {
|
|
17740
|
-
show: false
|
|
17741
|
-
}
|
|
17742
|
-
},
|
|
17743
|
-
colors: colors$5,
|
|
17744
|
-
plotOptions: {
|
|
17745
|
-
bar: {
|
|
17746
|
-
columnWidth: "45%",
|
|
17747
|
-
distributed: true
|
|
17748
|
-
}
|
|
17749
|
-
},
|
|
17750
|
-
dataLabels: {
|
|
17751
|
-
enabled: false
|
|
17752
|
-
},
|
|
17753
|
-
legend: {
|
|
17754
|
-
show: false
|
|
17755
|
-
},
|
|
17756
|
-
xaxis: {
|
|
17757
|
-
categories: categories
|
|
17758
|
-
},
|
|
17759
|
-
yaxis: {
|
|
17760
|
-
max: Math.max.apply(Math, data.bandScores.map(function (item) {
|
|
17761
|
-
return item.value;
|
|
17762
|
-
})),
|
|
17763
|
-
min: Math.min.apply(Math, data.bandScores.map(function (item) {
|
|
17764
|
-
return item.value;
|
|
17765
|
-
})),
|
|
17766
|
-
labels: {
|
|
17767
|
-
formatter: function formatter(val) {
|
|
17768
|
-
return findGradeLabel(val, data.bandScores);
|
|
17769
|
-
}
|
|
17770
|
-
}
|
|
17771
|
-
}
|
|
17772
|
-
};
|
|
17773
|
-
return React.createElement("div", null, React.createElement(ReactApexChart, {
|
|
17774
|
-
options: options,
|
|
17775
|
-
series: series,
|
|
17776
|
-
type: "bar",
|
|
17777
|
-
height: 350
|
|
17778
|
-
}));
|
|
17779
|
-
};
|
|
17780
|
-
|
|
17781
17475
|
var Dashboard = function Dashboard() {
|
|
17782
17476
|
var _useDashboard = useDashboard(),
|
|
17783
17477
|
loginCounting = _useDashboard.loginCounting,
|
|
17784
17478
|
quantity = _useDashboard.quantity,
|
|
17785
|
-
goalProgress = _useDashboard.goalProgress,
|
|
17786
17479
|
highImpact = _useDashboard.highImpact,
|
|
17787
|
-
perceivedImpact = _useDashboard.perceivedImpact
|
|
17788
|
-
grade = _useDashboard.grade;
|
|
17480
|
+
perceivedImpact = _useDashboard.perceivedImpact;
|
|
17789
17481
|
|
|
17790
17482
|
var cards = [{
|
|
17791
17483
|
label: "High-impact learning strategies of current school year",
|
|
@@ -17798,7 +17490,7 @@ var Dashboard = function Dashboard() {
|
|
|
17798
17490
|
data: perceivedImpact
|
|
17799
17491
|
})
|
|
17800
17492
|
}, {
|
|
17801
|
-
label: "Students & teachers
|
|
17493
|
+
label: "Students & teachers logins per day",
|
|
17802
17494
|
children: React.createElement(LoginCouting, {
|
|
17803
17495
|
data: loginCounting
|
|
17804
17496
|
})
|
|
@@ -17807,16 +17499,6 @@ var Dashboard = function Dashboard() {
|
|
|
17807
17499
|
children: React.createElement(Quantity, {
|
|
17808
17500
|
data: quantity
|
|
17809
17501
|
})
|
|
17810
|
-
}, {
|
|
17811
|
-
label: "Goal progress",
|
|
17812
|
-
children: React.createElement(GoalProgressReport, {
|
|
17813
|
-
data: goalProgress
|
|
17814
|
-
})
|
|
17815
|
-
}, {
|
|
17816
|
-
label: "Grades",
|
|
17817
|
-
children: React.createElement(Grade, {
|
|
17818
|
-
data: grade
|
|
17819
|
-
})
|
|
17820
17502
|
}];
|
|
17821
17503
|
return React.createElement("div", null, React.createElement("h4", {
|
|
17822
17504
|
className: "mb-5"
|