mario-education 2.4.2 → 2.4.4-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/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/CustomBarChart.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/CustomLineChart.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/ReadinessToLearn.d.ts +7 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/StudentByAge.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/StudentByGender.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/StudentByGrade.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/StudentWithSpecialNeeds.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/TopLearningStrategy.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/TopSkill.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/TotalCard.d.ts +4 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/types.d.ts +13 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useDashboard.d.ts +12 -7
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchAssistant/components/SwitchAssistantModal.d.ts +4 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchAssistant/hooks/useSwitchAssistant.d.ts +17 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchAssistant/utils/constants.d.ts +8 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchAssistant/utils/type.interface.d.ts +36 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchAssistant/views/SwitchAssistantList.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/services/dashboardService.d.ts +5 -0
- package/dist/MarioFramework.Education/ClientApp/src/services/userService.d.ts +5 -0
- package/dist/MarioFramework.Education/ClientApp/src/utils/serviceType.interface.d.ts +8 -0
- package/dist/index.css +106 -0
- package/dist/index.js +1352 -549
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1355 -552
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
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';
|
|
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, Loading as Loading$1, 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';
|
|
5
|
-
import { Table, Row, Col, Input, Label, Button, CustomInput, Card, CardBody, CardTitle, FormGroup, Alert, Progress } from 'reactstrap';
|
|
5
|
+
import { Table, Row, Col, Input, Label, Button, CustomInput, Card, CardBody, CardTitle, FormGroup, Alert, Progress, UncontrolledCollapse } from 'reactstrap';
|
|
6
6
|
import { Formik } from 'formik';
|
|
7
7
|
import { object, string, array, number, boolean } from 'yup';
|
|
8
8
|
import { useHistory, useParams } from 'react-router-dom';
|
|
9
9
|
import DatePicker from 'react-datepicker';
|
|
10
10
|
import { format } from 'date-fns';
|
|
11
11
|
import toDate from 'date-fns/toDate';
|
|
12
|
-
import { AiOutlineSend } from 'react-icons/ai';
|
|
12
|
+
import { AiOutlineSend, AiOutlineArrowUp, AiOutlineArrowDown, AiOutlineFileDone } from 'react-icons/ai';
|
|
13
13
|
import format$1 from 'date-fns/format';
|
|
14
14
|
import { AgGridReact } from '@ag-grid-community/react';
|
|
15
15
|
import { MasterDetailModule } from '@ag-grid-enterprise/master-detail';
|
|
16
16
|
import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';
|
|
17
17
|
import { FaCheck, FaTimes, FaRegEdit } from 'react-icons/fa';
|
|
18
18
|
import { Editor } from '@tinymce/tinymce-react';
|
|
19
|
+
import { FiMoreVertical, FiFilter } from 'react-icons/fi';
|
|
19
20
|
import ReactApexChart from 'react-apexcharts';
|
|
21
|
+
import { IoMdStopwatch } from 'react-icons/io';
|
|
22
|
+
import { BiMessageRoundedDetail } from 'react-icons/bi';
|
|
23
|
+
import { MdScreenShare } from 'react-icons/md';
|
|
20
24
|
|
|
21
25
|
// A type of promise-like that resolves synchronously and supports only one observer
|
|
22
26
|
|
|
@@ -8240,7 +8244,15 @@ var SwitchTeacherModal = function SwitchTeacherModal(props, ref) {
|
|
|
8240
8244
|
}, React.createElement(Row, null, React.createElement(Col, {
|
|
8241
8245
|
md: 12,
|
|
8242
8246
|
className: "mb-2"
|
|
8243
|
-
}, React.createElement("p",
|
|
8247
|
+
}, React.createElement("p", {
|
|
8248
|
+
className: "font-weight-bold"
|
|
8249
|
+
}, "Student Name"), React.createElement("p", null, userChoiced.studentName, " "), React.createElement("p", {
|
|
8250
|
+
className: "font-weight-bold"
|
|
8251
|
+
}, "Student Email"), React.createElement("p", null, userChoiced.emailStudent, " "), React.createElement("p", {
|
|
8252
|
+
className: "font-weight-bold"
|
|
8253
|
+
}, "Current Teacher Name"), React.createElement("p", null, userChoiced.teacherName, " "), React.createElement("p", {
|
|
8254
|
+
className: "font-weight-bold"
|
|
8255
|
+
}, "Current Teacher Email"), React.createElement("p", null, userChoiced.emailTeacher, " "), !!userChoiced && React.createElement(CustomSelector, {
|
|
8244
8256
|
options: options,
|
|
8245
8257
|
value: valueDefault,
|
|
8246
8258
|
placeholder: "Select teacher change",
|
|
@@ -8360,237 +8372,588 @@ var SwitchTeacherList = function SwitchTeacherList() {
|
|
|
8360
8372
|
}));
|
|
8361
8373
|
};
|
|
8362
8374
|
|
|
8363
|
-
var
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
}, {
|
|
8368
|
-
path: "/admin/set-up/subject",
|
|
8369
|
-
title: "Subjects",
|
|
8370
|
-
component: SubjectList
|
|
8371
|
-
}, {
|
|
8372
|
-
path: "/admin/set-up/learning-support-category",
|
|
8373
|
-
title: "Learning support categories",
|
|
8374
|
-
component: LearningSupportCategoryList
|
|
8375
|
-
}, {
|
|
8376
|
-
path: "/admin/set-up/learning-strategy",
|
|
8377
|
-
title: "Learning strategies",
|
|
8378
|
-
component: LearningStrategyList
|
|
8379
|
-
}, {
|
|
8380
|
-
path: "/admin/set-up/goal-example",
|
|
8381
|
-
title: "Goal examples",
|
|
8382
|
-
component: GoalExampleList
|
|
8383
|
-
}, {
|
|
8384
|
-
path: "/admin/set-up/student-badge",
|
|
8385
|
-
title: "Student badges",
|
|
8386
|
-
component: BadgeList
|
|
8387
|
-
}, {
|
|
8388
|
-
path: "/admin/set-up/semester",
|
|
8389
|
-
title: "Semester",
|
|
8390
|
-
component: SemesterList
|
|
8391
|
-
}, {
|
|
8392
|
-
path: "/admin/set-up/blank-days",
|
|
8393
|
-
title: "Blank days",
|
|
8394
|
-
component: SchoolBlankDayList
|
|
8395
|
-
}, {
|
|
8396
|
-
path: "/admin/set-up/csv-import",
|
|
8397
|
-
title: "CSV Import",
|
|
8398
|
-
component: CSVImport
|
|
8399
|
-
}, {
|
|
8400
|
-
path: "/admin/set-up/band-score",
|
|
8401
|
-
title: "Band scores",
|
|
8402
|
-
component: BandScoreList
|
|
8403
|
-
}, {
|
|
8404
|
-
path: "/admin/set-up/current-license",
|
|
8405
|
-
title: "License",
|
|
8406
|
-
component: CurrentLicense
|
|
8407
|
-
}, {
|
|
8408
|
-
path: "/admin/set-up/userDeleted",
|
|
8409
|
-
title: "User deleted",
|
|
8410
|
-
component: UserList
|
|
8411
|
-
}, {
|
|
8412
|
-
path: "/admin/set-up/switch-teacher",
|
|
8413
|
-
title: "Switch Teacher",
|
|
8414
|
-
component: SwitchTeacherList
|
|
8415
|
-
}];
|
|
8416
|
-
var title$1 = "Set up";
|
|
8417
|
-
|
|
8418
|
-
var SetupContainer = function SetupContainer() {
|
|
8419
|
-
return React.createElement(CustomTab, {
|
|
8420
|
-
title: title$1,
|
|
8421
|
-
tabs: tabs
|
|
8375
|
+
var USER_URL$1 = BASE_URL + "/api/User";
|
|
8376
|
+
var getStudentAssistant = function getStudentAssistant(data) {
|
|
8377
|
+
return api.get(USER_URL$1 + "/studentAssistant/", {
|
|
8378
|
+
params: data
|
|
8422
8379
|
});
|
|
8423
8380
|
};
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
label: "Teacher default questions"
|
|
8431
|
-
}];
|
|
8432
|
-
var optionGenerals = [{
|
|
8433
|
-
value: false,
|
|
8434
|
-
label: "Student default general class questions"
|
|
8435
|
-
}, {
|
|
8436
|
-
value: true,
|
|
8437
|
-
label: "Teacher default general class questions"
|
|
8438
|
-
}];
|
|
8439
|
-
|
|
8440
|
-
var DefaultQuestionStudentTeacherFilter = function DefaultQuestionStudentTeacherFilter(_ref) {
|
|
8441
|
-
var isDefaultQuestionTeacher = _ref.isDefaultQuestionTeacher,
|
|
8442
|
-
onChange = _ref.onChange,
|
|
8443
|
-
placeholder = _ref.placeholder,
|
|
8444
|
-
isDefaultGeneralClass = _ref.isDefaultGeneralClass;
|
|
8445
|
-
var value = options$1.find(function (option) {
|
|
8446
|
-
return option.value === isDefaultQuestionTeacher;
|
|
8447
|
-
});
|
|
8448
|
-
|
|
8449
|
-
if (isDefaultGeneralClass) {
|
|
8450
|
-
value = optionGenerals.find(function (optionGeneral) {
|
|
8451
|
-
return optionGeneral.value === isDefaultQuestionTeacher;
|
|
8452
|
-
});
|
|
8453
|
-
}
|
|
8454
|
-
|
|
8455
|
-
var customSelector = {
|
|
8456
|
-
menu: function menu(provided) {
|
|
8457
|
-
return _extends({}, provided, {
|
|
8458
|
-
zIndex: 9
|
|
8459
|
-
});
|
|
8460
|
-
}
|
|
8461
|
-
};
|
|
8462
|
-
return React.createElement(CustomSelector, {
|
|
8463
|
-
isClearable: true,
|
|
8464
|
-
options: isDefaultGeneralClass ? optionGenerals : options$1,
|
|
8465
|
-
placeholder: placeholder,
|
|
8466
|
-
value: value,
|
|
8467
|
-
onChange: onChange,
|
|
8468
|
-
styles: customSelector
|
|
8381
|
+
var getAssistant = function getAssistant() {
|
|
8382
|
+
return api.get(USER_URL$1 + "/assistants");
|
|
8383
|
+
};
|
|
8384
|
+
var changeAssistantOfStudent = function changeAssistantOfStudent(id, assistantUserId) {
|
|
8385
|
+
return api.put(USER_URL$1 + "/change-assistant/" + id, {
|
|
8386
|
+
assistantUserId: assistantUserId
|
|
8469
8387
|
});
|
|
8470
8388
|
};
|
|
8471
8389
|
|
|
8472
|
-
|
|
8473
|
-
|
|
8390
|
+
var INITIAL_USER_CHOICE = {
|
|
8391
|
+
id: 0,
|
|
8392
|
+
emailStudent: "",
|
|
8393
|
+
studentName: "",
|
|
8394
|
+
assistantId: "",
|
|
8395
|
+
emailAssistant: "",
|
|
8396
|
+
assistantName: ""
|
|
8474
8397
|
};
|
|
8475
8398
|
|
|
8476
|
-
var
|
|
8477
|
-
overflowY: "auto",
|
|
8478
|
-
overflowX: "hidden",
|
|
8479
|
-
maxHeight: "300px"
|
|
8480
|
-
};
|
|
8399
|
+
var TITLE$d = "Switch assistant list";
|
|
8481
8400
|
|
|
8482
|
-
var
|
|
8483
|
-
var
|
|
8484
|
-
|
|
8485
|
-
fromLabel = _props$data.fromLabel,
|
|
8486
|
-
toLabel = _props$data.toLabel,
|
|
8487
|
-
answers = _props$data.answers,
|
|
8488
|
-
type = _props$data.type,
|
|
8489
|
-
isSurvey = _props$data.isSurvey,
|
|
8490
|
-
isDefaultQuestion = _props$data.isDefaultQuestion;
|
|
8401
|
+
var useSwitchAssistant = function useSwitchAssistant() {
|
|
8402
|
+
var modal = useRef();
|
|
8403
|
+
var dispatch = useDispatch();
|
|
8491
8404
|
|
|
8492
|
-
var
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
className: "mb-2 pb-2"
|
|
8496
|
-
}, React.createElement(Col, {
|
|
8497
|
-
md: 8
|
|
8498
|
-
}, isSurvey == true && React.createElement("h6", {
|
|
8499
|
-
className: "text-danger"
|
|
8500
|
-
}, "This question is a survey"), React.createElement(Table, {
|
|
8501
|
-
responsive: true,
|
|
8502
|
-
hover: true,
|
|
8503
|
-
bordered: true,
|
|
8504
|
-
striped: true,
|
|
8505
|
-
size: "sm"
|
|
8506
|
-
}, React.createElement("thead", null, React.createElement("tr", null, isEmotional && React.createElement("th", {
|
|
8507
|
-
className: "align-top"
|
|
8508
|
-
}, "Emotion icon"), React.createElement("th", {
|
|
8509
|
-
className: "align-top"
|
|
8510
|
-
}, "Answer"), !isSurvey && !isDefaultQuestion && !isEmotional && React.createElement(React.Fragment, null, React.createElement("th", {
|
|
8511
|
-
className: "text-center"
|
|
8512
|
-
}, "Mark"), React.createElement("th", {
|
|
8513
|
-
className: "text-center"
|
|
8514
|
-
}, "Is correct answer")))), React.createElement("tbody", null, answers.map(function (answer, index) {
|
|
8515
|
-
return React.createElement("tr", {
|
|
8516
|
-
key: answer.id
|
|
8517
|
-
}, isEmotional && React.createElement("td", {
|
|
8518
|
-
className: "align-middle"
|
|
8519
|
-
}, EMOTIONS[index]), React.createElement("td", {
|
|
8520
|
-
className: "align-middle"
|
|
8521
|
-
}, React.createElement("div", {
|
|
8522
|
-
dangerouslySetInnerHTML: {
|
|
8523
|
-
__html: answer.text
|
|
8524
|
-
}
|
|
8525
|
-
})), !isSurvey && !isDefaultQuestion && !isEmotional && React.createElement(React.Fragment, null, React.createElement("td", {
|
|
8526
|
-
className: "text-center align-middle"
|
|
8527
|
-
}, answer.mark), React.createElement("td", {
|
|
8528
|
-
className: "text-center align-middle"
|
|
8529
|
-
}, answer.isCorrectAnswer ? React.createElement(FaCheck, {
|
|
8530
|
-
className: "text-success"
|
|
8531
|
-
}) : React.createElement(FaTimes, {
|
|
8532
|
-
className: "text-danger"
|
|
8533
|
-
}))));
|
|
8534
|
-
}))))));
|
|
8405
|
+
var _useState = useState([]),
|
|
8406
|
+
assistantList = _useState[0],
|
|
8407
|
+
setAssistantList = _useState[1];
|
|
8535
8408
|
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
}, fromLabel), " ", "to ", React.createElement("span", {
|
|
8540
|
-
className: "font-weight-bold"
|
|
8541
|
-
}, toLabel));
|
|
8542
|
-
}
|
|
8409
|
+
var _useState2 = useState([]),
|
|
8410
|
+
userList = _useState2[0],
|
|
8411
|
+
setUserList = _useState2[1];
|
|
8543
8412
|
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
}, React.createElement(Alert, {
|
|
8548
|
-
color: "primary"
|
|
8549
|
-
}, "Number of stars: ", numberOfStars)));
|
|
8550
|
-
}
|
|
8413
|
+
var _useState3 = useState(0),
|
|
8414
|
+
totalItems = _useState3[0],
|
|
8415
|
+
setTotalItems = _useState3[1];
|
|
8551
8416
|
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
color: "secondary"
|
|
8556
|
-
}, "No preview")));
|
|
8557
|
-
};
|
|
8417
|
+
var _useFilters = useFilters(),
|
|
8418
|
+
filters = _useFilters.filters,
|
|
8419
|
+
changeFilters = _useFilters.changeFilters;
|
|
8558
8420
|
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
}, render());
|
|
8563
|
-
};
|
|
8421
|
+
var _useState4 = useState(INITIAL_USER_CHOICE),
|
|
8422
|
+
userChoiced = _useState4[0],
|
|
8423
|
+
setUserChoiced = _useState4[1];
|
|
8564
8424
|
|
|
8565
|
-
var
|
|
8566
|
-
|
|
8425
|
+
var _useState5 = useState(""),
|
|
8426
|
+
assistantChangeId = _useState5[0],
|
|
8427
|
+
setAssistantChangeId = _useState5[1];
|
|
8567
8428
|
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
var
|
|
8571
|
-
|
|
8429
|
+
var getStudentAssistantData = useCallback(function () {
|
|
8430
|
+
try {
|
|
8431
|
+
var _temp3 = function _temp3() {
|
|
8432
|
+
dispatch(setLoading(false));
|
|
8433
|
+
};
|
|
8572
8434
|
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
remove = _ref.remove;
|
|
8576
|
-
return React.createElement("div", null, React.createElement(EditButtonIcon, {
|
|
8577
|
-
onClick: function onClick() {
|
|
8578
|
-
var _params$data2;
|
|
8435
|
+
dispatch(setLoading(true));
|
|
8436
|
+
console.log(filters);
|
|
8579
8437
|
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8438
|
+
var _temp4 = _catch(function () {
|
|
8439
|
+
return Promise.resolve(getStudentAssistant(filters)).then(function (res) {
|
|
8440
|
+
var _res$data = res.data,
|
|
8441
|
+
items = _res$data.items,
|
|
8442
|
+
totalItems = _res$data.totalItems;
|
|
8443
|
+
setUserList(items);
|
|
8444
|
+
setTotalItems(totalItems);
|
|
8445
|
+
});
|
|
8446
|
+
}, function (err) {
|
|
8447
|
+
var _err$response, _err$response$data;
|
|
8587
8448
|
|
|
8588
|
-
|
|
8449
|
+
dispatch(setAlert({
|
|
8450
|
+
type: "danger",
|
|
8451
|
+
message: ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.title) || err.message
|
|
8452
|
+
}));
|
|
8453
|
+
});
|
|
8454
|
+
|
|
8455
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
8456
|
+
} catch (e) {
|
|
8457
|
+
return Promise.reject(e);
|
|
8589
8458
|
}
|
|
8590
|
-
})
|
|
8591
|
-
|
|
8592
|
-
var
|
|
8593
|
-
|
|
8459
|
+
}, [dispatch, filters]);
|
|
8460
|
+
|
|
8461
|
+
var getAllAssistant = function getAllAssistant() {
|
|
8462
|
+
try {
|
|
8463
|
+
var _temp6 = _catch(function () {
|
|
8464
|
+
return Promise.resolve(getAssistant()).then(function (res) {
|
|
8465
|
+
setAssistantList(res.data);
|
|
8466
|
+
});
|
|
8467
|
+
}, function (err) {
|
|
8468
|
+
var _err$response2, _err$response2$data;
|
|
8469
|
+
|
|
8470
|
+
dispatch(setAlert({
|
|
8471
|
+
type: "danger",
|
|
8472
|
+
message: ((_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : _err$response2$data.title) || err.message
|
|
8473
|
+
}));
|
|
8474
|
+
});
|
|
8475
|
+
|
|
8476
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
8477
|
+
} catch (e) {
|
|
8478
|
+
return Promise.reject(e);
|
|
8479
|
+
}
|
|
8480
|
+
};
|
|
8481
|
+
|
|
8482
|
+
var options = useMemo(function () {
|
|
8483
|
+
return assistantList.map(function (record) {
|
|
8484
|
+
return {
|
|
8485
|
+
label: record.name + " - " + record.email,
|
|
8486
|
+
value: record.id
|
|
8487
|
+
};
|
|
8488
|
+
});
|
|
8489
|
+
}, [assistantList]);
|
|
8490
|
+
|
|
8491
|
+
var openModal = function openModal() {
|
|
8492
|
+
modal && modal.current && modal.current.toggle();
|
|
8493
|
+
};
|
|
8494
|
+
|
|
8495
|
+
var resetData = function resetData() {
|
|
8496
|
+
setAssistantChangeId("");
|
|
8497
|
+
setUserChoiced(INITIAL_USER_CHOICE);
|
|
8498
|
+
};
|
|
8499
|
+
|
|
8500
|
+
var choiceUser = function choiceUser(userChoiced) {
|
|
8501
|
+
!!userChoiced && setUserChoiced(userChoiced);
|
|
8502
|
+
setAssistantChangeId(userChoiced.assistantId);
|
|
8503
|
+
openModal();
|
|
8504
|
+
};
|
|
8505
|
+
|
|
8506
|
+
var removeData = function removeData(teacherUserId, studentId) {
|
|
8507
|
+
try {
|
|
8508
|
+
dispatch(setModal({
|
|
8509
|
+
isOpen: true,
|
|
8510
|
+
type: "warning",
|
|
8511
|
+
message: "Do you want to change assistant?",
|
|
8512
|
+
onConfirm: function () {
|
|
8513
|
+
try {
|
|
8514
|
+
var _temp9 = function _temp9() {
|
|
8515
|
+
dispatch(setLoading(false));
|
|
8516
|
+
};
|
|
8517
|
+
|
|
8518
|
+
dispatch(setLoading(true));
|
|
8519
|
+
|
|
8520
|
+
var _temp10 = _catch(function () {
|
|
8521
|
+
return Promise.resolve(changeAssistantOfStudent(studentId, teacherUserId)).then(function () {
|
|
8522
|
+
dispatch(setAlert({
|
|
8523
|
+
type: "success",
|
|
8524
|
+
message: "Change assistant successfully"
|
|
8525
|
+
}));
|
|
8526
|
+
openModal();
|
|
8527
|
+
resetData();
|
|
8528
|
+
changeFilters({
|
|
8529
|
+
currentPage: 1
|
|
8530
|
+
});
|
|
8531
|
+
});
|
|
8532
|
+
}, function (err) {
|
|
8533
|
+
var _err$response3, _err$response3$data;
|
|
8534
|
+
|
|
8535
|
+
dispatch(setAlert({
|
|
8536
|
+
type: "danger",
|
|
8537
|
+
message: ((_err$response3 = err.response) === null || _err$response3 === void 0 ? void 0 : (_err$response3$data = _err$response3.data) === null || _err$response3$data === void 0 ? void 0 : _err$response3$data.title) || err.message
|
|
8538
|
+
}));
|
|
8539
|
+
});
|
|
8540
|
+
|
|
8541
|
+
return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(_temp9) : _temp9(_temp10));
|
|
8542
|
+
} catch (e) {
|
|
8543
|
+
return Promise.reject(e);
|
|
8544
|
+
}
|
|
8545
|
+
}
|
|
8546
|
+
}));
|
|
8547
|
+
return Promise.resolve();
|
|
8548
|
+
} catch (e) {
|
|
8549
|
+
return Promise.reject(e);
|
|
8550
|
+
}
|
|
8551
|
+
};
|
|
8552
|
+
|
|
8553
|
+
useEffect(function () {
|
|
8554
|
+
document.title = TITLE$d;
|
|
8555
|
+
}, []);
|
|
8556
|
+
useEffect(function () {
|
|
8557
|
+
getAllAssistant();
|
|
8558
|
+
}, [modal]);
|
|
8559
|
+
useEffect(function () {
|
|
8560
|
+
getStudentAssistantData();
|
|
8561
|
+
}, [filters]);
|
|
8562
|
+
return {
|
|
8563
|
+
userList: userList,
|
|
8564
|
+
totalItems: totalItems,
|
|
8565
|
+
filters: filters,
|
|
8566
|
+
changeFilters: changeFilters,
|
|
8567
|
+
modal: modal,
|
|
8568
|
+
userChoiced: userChoiced,
|
|
8569
|
+
options: options,
|
|
8570
|
+
setAssistantChangeId: setAssistantChangeId,
|
|
8571
|
+
assistantChangeId: assistantChangeId,
|
|
8572
|
+
removeData: removeData,
|
|
8573
|
+
resetData: resetData,
|
|
8574
|
+
choiceUser: choiceUser
|
|
8575
|
+
};
|
|
8576
|
+
};
|
|
8577
|
+
|
|
8578
|
+
var SwitchAssistantModal = function SwitchAssistantModal(_ref, ref) {
|
|
8579
|
+
var header = _ref.header,
|
|
8580
|
+
removeData = _ref.removeData,
|
|
8581
|
+
resetData = _ref.resetData,
|
|
8582
|
+
userChoiced = _ref.userChoiced,
|
|
8583
|
+
options = _ref.options,
|
|
8584
|
+
assistantChangeId = _ref.assistantChangeId,
|
|
8585
|
+
setAssistantChangeId = _ref.setAssistantChangeId;
|
|
8586
|
+
var valueDefault = options === null || options === void 0 ? void 0 : options.find(function (item) {
|
|
8587
|
+
return item.value == assistantChangeId;
|
|
8588
|
+
});
|
|
8589
|
+
return React.createElement(CommonModal, {
|
|
8590
|
+
header: header,
|
|
8591
|
+
ref: ref,
|
|
8592
|
+
confirmText: "Change Save",
|
|
8593
|
+
onConfirm: function onConfirm() {
|
|
8594
|
+
return removeData(assistantChangeId, userChoiced.id);
|
|
8595
|
+
},
|
|
8596
|
+
onCancel: function onCancel() {
|
|
8597
|
+
resetData();
|
|
8598
|
+
}
|
|
8599
|
+
}, React.createElement(Row, null, React.createElement(Col, {
|
|
8600
|
+
md: 12,
|
|
8601
|
+
className: "mb-2"
|
|
8602
|
+
}, React.createElement("p", {
|
|
8603
|
+
className: "font-weight-bold"
|
|
8604
|
+
}, "Student Name"), React.createElement("p", null, userChoiced.studentName, " "), React.createElement("p", {
|
|
8605
|
+
className: "font-weight-bold"
|
|
8606
|
+
}, "Student Email"), React.createElement("p", null, userChoiced.emailStudent), React.createElement("p", {
|
|
8607
|
+
className: "font-weight-bold"
|
|
8608
|
+
}, "Current Assistant Name"), React.createElement("p", null, userChoiced.assistantName), React.createElement("p", {
|
|
8609
|
+
className: "font-weight-bold"
|
|
8610
|
+
}, "Current Assistant Email"), React.createElement("p", null, userChoiced.emailAssistant), !!userChoiced && React.createElement(CustomSelector, {
|
|
8611
|
+
options: options,
|
|
8612
|
+
value: valueDefault,
|
|
8613
|
+
placeholder: "Select Assistant change",
|
|
8614
|
+
onChange: function onChange(e) {
|
|
8615
|
+
return setAssistantChangeId(e.value);
|
|
8616
|
+
}
|
|
8617
|
+
}))));
|
|
8618
|
+
};
|
|
8619
|
+
|
|
8620
|
+
var SwitchAssistantModal$1 = forwardRef(SwitchAssistantModal);
|
|
8621
|
+
|
|
8622
|
+
var header$5 = "List Students";
|
|
8623
|
+
|
|
8624
|
+
var SwitchAssistantList = function SwitchAssistantList() {
|
|
8625
|
+
var _useSwitchTeacher = useSwitchAssistant(),
|
|
8626
|
+
userList = _useSwitchTeacher.userList,
|
|
8627
|
+
totalItems = _useSwitchTeacher.totalItems,
|
|
8628
|
+
filters = _useSwitchTeacher.filters,
|
|
8629
|
+
changeFilters = _useSwitchTeacher.changeFilters,
|
|
8630
|
+
modal = _useSwitchTeacher.modal,
|
|
8631
|
+
userChoiced = _useSwitchTeacher.userChoiced,
|
|
8632
|
+
options = _useSwitchTeacher.options,
|
|
8633
|
+
setAssistantChangeId = _useSwitchTeacher.setAssistantChangeId,
|
|
8634
|
+
assistantChangeId = _useSwitchTeacher.assistantChangeId,
|
|
8635
|
+
removeData = _useSwitchTeacher.removeData,
|
|
8636
|
+
resetData = _useSwitchTeacher.resetData,
|
|
8637
|
+
choiceUser = _useSwitchTeacher.choiceUser;
|
|
8638
|
+
|
|
8639
|
+
return React.createElement("div", {
|
|
8640
|
+
className: "fadeIn animated"
|
|
8641
|
+
}, React.createElement("h5", {
|
|
8642
|
+
className: "mt-4 mb-2"
|
|
8643
|
+
}, header$5), React.createElement(Row, {
|
|
8644
|
+
className: "my-2"
|
|
8645
|
+
}, React.createElement(Col, {
|
|
8646
|
+
md: 8
|
|
8647
|
+
}, React.createElement(SearchBox, {
|
|
8648
|
+
initValue: filters.searchString,
|
|
8649
|
+
onSearch: function onSearch(searchString) {
|
|
8650
|
+
return changeFilters({
|
|
8651
|
+
searchString: searchString
|
|
8652
|
+
});
|
|
8653
|
+
},
|
|
8654
|
+
placeholder: "Type something to search reflection result"
|
|
8655
|
+
})), React.createElement(Col, {
|
|
8656
|
+
md: 4,
|
|
8657
|
+
className: "d-flex justify-content-end align-items-center"
|
|
8658
|
+
}, "Total of users: ", totalItems)), React.createElement(Row, {
|
|
8659
|
+
className: "mb-2"
|
|
8660
|
+
}, React.createElement(Col, {
|
|
8661
|
+
md: 12
|
|
8662
|
+
}, userList && userList.length > 0 ? React.createElement("div", null, React.createElement(Table, {
|
|
8663
|
+
bordered: true,
|
|
8664
|
+
hover: true,
|
|
8665
|
+
striped: true,
|
|
8666
|
+
responsive: true,
|
|
8667
|
+
size: "sm"
|
|
8668
|
+
}, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", {
|
|
8669
|
+
className: "align-top"
|
|
8670
|
+
}, "Student Name"), React.createElement("th", {
|
|
8671
|
+
className: "align-top"
|
|
8672
|
+
}, "Student Email"), React.createElement("th", {
|
|
8673
|
+
className: "align-top"
|
|
8674
|
+
}, "Current Assistant Name"), React.createElement("th", {
|
|
8675
|
+
className: "align-top"
|
|
8676
|
+
}, "Current Assistant Email"))), React.createElement("tbody", null, !!userList && userList.length > 0 && userList.map(function (record) {
|
|
8677
|
+
return React.createElement("tr", {
|
|
8678
|
+
key: record.id
|
|
8679
|
+
}, React.createElement("td", {
|
|
8680
|
+
className: "align-middle"
|
|
8681
|
+
}, React.createElement(LinkEditButton, {
|
|
8682
|
+
label: "" + record.studentName,
|
|
8683
|
+
onClick: function onClick() {
|
|
8684
|
+
return choiceUser(record);
|
|
8685
|
+
}
|
|
8686
|
+
})), React.createElement("td", {
|
|
8687
|
+
className: "align-middle"
|
|
8688
|
+
}, record.emailStudent), React.createElement("td", {
|
|
8689
|
+
className: "align-middle"
|
|
8690
|
+
}, record.assistantName), React.createElement("td", {
|
|
8691
|
+
className: "align-middle"
|
|
8692
|
+
}, record.emailAssistant));
|
|
8693
|
+
})))) : React.createElement(EmptyDataAlert, {
|
|
8694
|
+
label: "user"
|
|
8695
|
+
})), React.createElement(Col, {
|
|
8696
|
+
md: 12
|
|
8697
|
+
}, React.createElement(CustomPagination, {
|
|
8698
|
+
filters: filters,
|
|
8699
|
+
totalRecordCount: totalItems,
|
|
8700
|
+
changePageSize: function changePageSize(pageSize) {
|
|
8701
|
+
return changeFilters({
|
|
8702
|
+
pageSize: pageSize
|
|
8703
|
+
});
|
|
8704
|
+
},
|
|
8705
|
+
changePage: function changePage(currentPage) {
|
|
8706
|
+
return changeFilters({
|
|
8707
|
+
currentPage: currentPage
|
|
8708
|
+
});
|
|
8709
|
+
}
|
|
8710
|
+
}))), React.createElement(SwitchAssistantModal$1, {
|
|
8711
|
+
ref: modal,
|
|
8712
|
+
header: "Switch Assistant",
|
|
8713
|
+
userChoiced: userChoiced,
|
|
8714
|
+
removeData: removeData,
|
|
8715
|
+
options: options,
|
|
8716
|
+
assistantChangeId: assistantChangeId,
|
|
8717
|
+
setAssistantChangeId: setAssistantChangeId,
|
|
8718
|
+
resetData: resetData
|
|
8719
|
+
}));
|
|
8720
|
+
};
|
|
8721
|
+
|
|
8722
|
+
var tabs = [{
|
|
8723
|
+
path: "/admin/set-up/skill",
|
|
8724
|
+
title: "Skills",
|
|
8725
|
+
component: SkillList
|
|
8726
|
+
}, {
|
|
8727
|
+
path: "/admin/set-up/subject",
|
|
8728
|
+
title: "Subjects",
|
|
8729
|
+
component: SubjectList
|
|
8730
|
+
}, {
|
|
8731
|
+
path: "/admin/set-up/learning-support-category",
|
|
8732
|
+
title: "Learning support categories",
|
|
8733
|
+
component: LearningSupportCategoryList
|
|
8734
|
+
}, {
|
|
8735
|
+
path: "/admin/set-up/learning-strategy",
|
|
8736
|
+
title: "Learning strategies",
|
|
8737
|
+
component: LearningStrategyList
|
|
8738
|
+
}, {
|
|
8739
|
+
path: "/admin/set-up/goal-example",
|
|
8740
|
+
title: "Goal examples",
|
|
8741
|
+
component: GoalExampleList
|
|
8742
|
+
}, {
|
|
8743
|
+
path: "/admin/set-up/student-badge",
|
|
8744
|
+
title: "Student badges",
|
|
8745
|
+
component: BadgeList
|
|
8746
|
+
}, {
|
|
8747
|
+
path: "/admin/set-up/semester",
|
|
8748
|
+
title: "Semester",
|
|
8749
|
+
component: SemesterList
|
|
8750
|
+
}, {
|
|
8751
|
+
path: "/admin/set-up/blank-days",
|
|
8752
|
+
title: "Blank days",
|
|
8753
|
+
component: SchoolBlankDayList
|
|
8754
|
+
}, {
|
|
8755
|
+
path: "/admin/set-up/csv-import",
|
|
8756
|
+
title: "CSV Import",
|
|
8757
|
+
component: CSVImport
|
|
8758
|
+
}, {
|
|
8759
|
+
path: "/admin/set-up/band-score",
|
|
8760
|
+
title: "Band scores",
|
|
8761
|
+
component: BandScoreList
|
|
8762
|
+
}, {
|
|
8763
|
+
path: "/admin/set-up/current-license",
|
|
8764
|
+
title: "License",
|
|
8765
|
+
component: CurrentLicense
|
|
8766
|
+
}, {
|
|
8767
|
+
path: "/admin/set-up/userDeleted",
|
|
8768
|
+
title: "User deleted",
|
|
8769
|
+
component: UserList
|
|
8770
|
+
}, {
|
|
8771
|
+
path: "/admin/set-up/switch-teacher",
|
|
8772
|
+
title: "Switch Teacher",
|
|
8773
|
+
component: SwitchTeacherList
|
|
8774
|
+
}, {
|
|
8775
|
+
path: "/admin/set-up/switch-assistant",
|
|
8776
|
+
title: "Switch assistant",
|
|
8777
|
+
component: SwitchAssistantList
|
|
8778
|
+
}];
|
|
8779
|
+
var title$1 = "Set up";
|
|
8780
|
+
|
|
8781
|
+
var SetupContainer = function SetupContainer() {
|
|
8782
|
+
return React.createElement(CustomTab, {
|
|
8783
|
+
title: title$1,
|
|
8784
|
+
tabs: tabs
|
|
8785
|
+
});
|
|
8786
|
+
};
|
|
8787
|
+
|
|
8788
|
+
var options$1 = [{
|
|
8789
|
+
value: false,
|
|
8790
|
+
label: "Student default questions"
|
|
8791
|
+
}, {
|
|
8792
|
+
value: true,
|
|
8793
|
+
label: "Teacher default questions"
|
|
8794
|
+
}];
|
|
8795
|
+
var optionGenerals = [{
|
|
8796
|
+
value: false,
|
|
8797
|
+
label: "Student default general class questions"
|
|
8798
|
+
}, {
|
|
8799
|
+
value: true,
|
|
8800
|
+
label: "Teacher default general class questions"
|
|
8801
|
+
}];
|
|
8802
|
+
|
|
8803
|
+
var DefaultQuestionStudentTeacherFilter = function DefaultQuestionStudentTeacherFilter(_ref) {
|
|
8804
|
+
var isDefaultQuestionTeacher = _ref.isDefaultQuestionTeacher,
|
|
8805
|
+
onChange = _ref.onChange,
|
|
8806
|
+
placeholder = _ref.placeholder,
|
|
8807
|
+
isDefaultGeneralClass = _ref.isDefaultGeneralClass;
|
|
8808
|
+
var value = options$1.find(function (option) {
|
|
8809
|
+
return option.value === isDefaultQuestionTeacher;
|
|
8810
|
+
});
|
|
8811
|
+
|
|
8812
|
+
if (isDefaultGeneralClass) {
|
|
8813
|
+
value = optionGenerals.find(function (optionGeneral) {
|
|
8814
|
+
return optionGeneral.value === isDefaultQuestionTeacher;
|
|
8815
|
+
});
|
|
8816
|
+
}
|
|
8817
|
+
|
|
8818
|
+
var customSelector = {
|
|
8819
|
+
menu: function menu(provided) {
|
|
8820
|
+
return _extends({}, provided, {
|
|
8821
|
+
zIndex: 9
|
|
8822
|
+
});
|
|
8823
|
+
}
|
|
8824
|
+
};
|
|
8825
|
+
return React.createElement(CustomSelector, {
|
|
8826
|
+
isClearable: true,
|
|
8827
|
+
options: isDefaultGeneralClass ? optionGenerals : options$1,
|
|
8828
|
+
placeholder: placeholder,
|
|
8829
|
+
value: value,
|
|
8830
|
+
onChange: onChange,
|
|
8831
|
+
styles: customSelector
|
|
8832
|
+
});
|
|
8833
|
+
};
|
|
8834
|
+
|
|
8835
|
+
DefaultQuestionStudentTeacherFilter.defaultProps = {
|
|
8836
|
+
placeholder: "Default question filter"
|
|
8837
|
+
};
|
|
8838
|
+
|
|
8839
|
+
var subgridStyle = {
|
|
8840
|
+
overflowY: "auto",
|
|
8841
|
+
overflowX: "hidden",
|
|
8842
|
+
maxHeight: "300px"
|
|
8843
|
+
};
|
|
8844
|
+
|
|
8845
|
+
var QuestionPreview = function QuestionPreview(props) {
|
|
8846
|
+
var _props$data = props.data,
|
|
8847
|
+
numberOfStars = _props$data.numberOfStars,
|
|
8848
|
+
fromLabel = _props$data.fromLabel,
|
|
8849
|
+
toLabel = _props$data.toLabel,
|
|
8850
|
+
answers = _props$data.answers,
|
|
8851
|
+
type = _props$data.type,
|
|
8852
|
+
isSurvey = _props$data.isSurvey,
|
|
8853
|
+
isDefaultQuestion = _props$data.isDefaultQuestion;
|
|
8854
|
+
|
|
8855
|
+
var render = function render() {
|
|
8856
|
+
var isEmotional = QUESTION_TYPES.EMOTIONAL === type;
|
|
8857
|
+
if ([QUESTION_TYPES.SINGLE_CHOICE, QUESTION_TYPES.MULTIPLE_CHOICE, QUESTION_TYPES.EMOTIONAL, QUESTION_TYPES.LEARNING_STRATEGY].includes(type)) return React.createElement(Fragment, null, React.createElement(Row, {
|
|
8858
|
+
className: "mb-2 pb-2"
|
|
8859
|
+
}, React.createElement(Col, {
|
|
8860
|
+
md: 8
|
|
8861
|
+
}, isSurvey == true && React.createElement("h6", {
|
|
8862
|
+
className: "text-danger"
|
|
8863
|
+
}, "This question is a survey"), React.createElement(Table, {
|
|
8864
|
+
responsive: true,
|
|
8865
|
+
hover: true,
|
|
8866
|
+
bordered: true,
|
|
8867
|
+
striped: true,
|
|
8868
|
+
size: "sm"
|
|
8869
|
+
}, React.createElement("thead", null, React.createElement("tr", null, isEmotional && React.createElement("th", {
|
|
8870
|
+
className: "align-top"
|
|
8871
|
+
}, "Emotion icon"), React.createElement("th", {
|
|
8872
|
+
className: "align-top"
|
|
8873
|
+
}, "Answer"), !isSurvey && !isDefaultQuestion && !isEmotional && React.createElement(React.Fragment, null, React.createElement("th", {
|
|
8874
|
+
className: "text-center"
|
|
8875
|
+
}, "Mark"), React.createElement("th", {
|
|
8876
|
+
className: "text-center"
|
|
8877
|
+
}, "Is correct answer")))), React.createElement("tbody", null, answers.map(function (answer, index) {
|
|
8878
|
+
return React.createElement("tr", {
|
|
8879
|
+
key: answer.id
|
|
8880
|
+
}, isEmotional && React.createElement("td", {
|
|
8881
|
+
className: "align-middle"
|
|
8882
|
+
}, EMOTIONS[index]), React.createElement("td", {
|
|
8883
|
+
className: "align-middle"
|
|
8884
|
+
}, React.createElement("div", {
|
|
8885
|
+
dangerouslySetInnerHTML: {
|
|
8886
|
+
__html: answer.text
|
|
8887
|
+
}
|
|
8888
|
+
})), !isSurvey && !isDefaultQuestion && !isEmotional && React.createElement(React.Fragment, null, React.createElement("td", {
|
|
8889
|
+
className: "text-center align-middle"
|
|
8890
|
+
}, answer.mark), React.createElement("td", {
|
|
8891
|
+
className: "text-center align-middle"
|
|
8892
|
+
}, answer.isCorrectAnswer ? React.createElement(FaCheck, {
|
|
8893
|
+
className: "text-success"
|
|
8894
|
+
}) : React.createElement(FaTimes, {
|
|
8895
|
+
className: "text-danger"
|
|
8896
|
+
}))));
|
|
8897
|
+
}))))));
|
|
8898
|
+
|
|
8899
|
+
if ([QUESTION_TYPES.SLIDER, QUESTION_TYPES.RATING].includes(type)) {
|
|
8900
|
+
return React.createElement("span", null, "From ", React.createElement("span", {
|
|
8901
|
+
className: "font-weight-bold"
|
|
8902
|
+
}, fromLabel), " ", "to ", React.createElement("span", {
|
|
8903
|
+
className: "font-weight-bold"
|
|
8904
|
+
}, toLabel));
|
|
8905
|
+
}
|
|
8906
|
+
|
|
8907
|
+
if (QUESTION_TYPES.STAR_RATING === type) {
|
|
8908
|
+
return React.createElement(Row, null, React.createElement(Col, {
|
|
8909
|
+
md: 8
|
|
8910
|
+
}, React.createElement(Alert, {
|
|
8911
|
+
color: "primary"
|
|
8912
|
+
}, "Number of stars: ", numberOfStars)));
|
|
8913
|
+
}
|
|
8914
|
+
|
|
8915
|
+
return React.createElement(Row, null, React.createElement(Col, {
|
|
8916
|
+
md: 8
|
|
8917
|
+
}, React.createElement(Alert, {
|
|
8918
|
+
color: "secondary"
|
|
8919
|
+
}, "No preview")));
|
|
8920
|
+
};
|
|
8921
|
+
|
|
8922
|
+
return React.createElement("div", {
|
|
8923
|
+
className: "animated fadeIn p-2",
|
|
8924
|
+
style: subgridStyle
|
|
8925
|
+
}, render());
|
|
8926
|
+
};
|
|
8927
|
+
|
|
8928
|
+
var renderQuestionText = function renderQuestionText(params) {
|
|
8929
|
+
var _params$data;
|
|
8930
|
+
|
|
8931
|
+
return React.createElement("div", null, getTextFromHTML(params === null || params === void 0 ? void 0 : (_params$data = params.data) === null || _params$data === void 0 ? void 0 : _params$data.text) || "No text");
|
|
8932
|
+
};
|
|
8933
|
+
var renderActions = function renderActions(_ref) {
|
|
8934
|
+
var _params$data3, _params$data4, _params$data5, _params$data6;
|
|
8935
|
+
|
|
8936
|
+
var params = _ref.params,
|
|
8937
|
+
edit = _ref.edit,
|
|
8938
|
+
remove = _ref.remove;
|
|
8939
|
+
return React.createElement("div", null, React.createElement(EditButtonIcon, {
|
|
8940
|
+
onClick: function onClick() {
|
|
8941
|
+
var _params$data2;
|
|
8942
|
+
|
|
8943
|
+
return edit(params === null || params === void 0 ? void 0 : (_params$data2 = params.data) === null || _params$data2 === void 0 ? void 0 : _params$data2.id);
|
|
8944
|
+
}
|
|
8945
|
+
}), !(params !== null && params !== void 0 && (_params$data3 = params.data) !== null && _params$data3 !== void 0 && _params$data3.isDefaultQuestion || params !== null && params !== void 0 && (_params$data4 = params.data) !== null && _params$data4 !== void 0 && _params$data4.isDefaultQuestionGeneralClass) && React.createElement("span", {
|
|
8946
|
+
className: "mx-2"
|
|
8947
|
+
}), !(params !== null && params !== void 0 && (_params$data5 = params.data) !== null && _params$data5 !== void 0 && _params$data5.isDefaultQuestion || params !== null && params !== void 0 && (_params$data6 = params.data) !== null && _params$data6 !== void 0 && _params$data6.isDefaultQuestionGeneralClass) && React.createElement(DeleteButtonIcon, {
|
|
8948
|
+
onClick: function onClick() {
|
|
8949
|
+
var _params$data7;
|
|
8950
|
+
|
|
8951
|
+
return remove(params === null || params === void 0 ? void 0 : (_params$data7 = params.data) === null || _params$data7 === void 0 ? void 0 : _params$data7.id);
|
|
8952
|
+
}
|
|
8953
|
+
}));
|
|
8954
|
+
};
|
|
8955
|
+
var renderCategory = function renderCategory(params) {
|
|
8956
|
+
var _params$data8, _params$data8$categor;
|
|
8594
8957
|
|
|
8595
8958
|
return React.createElement("div", null, params === null || params === void 0 ? void 0 : (_params$data8 = params.data) === null || _params$data8 === void 0 ? void 0 : (_params$data8$categor = _params$data8.category) === null || _params$data8$categor === void 0 ? void 0 : _params$data8$categor.name);
|
|
8596
8959
|
};
|
|
@@ -8605,7 +8968,7 @@ var renderType = function renderType(params) {
|
|
|
8605
8968
|
|
|
8606
8969
|
var QUESTION_URL$1 = "/admin/question-bank";
|
|
8607
8970
|
var CREATE_QUESTION_URL = "/admin/create-question";
|
|
8608
|
-
var TITLE$
|
|
8971
|
+
var TITLE$e = "Question list";
|
|
8609
8972
|
|
|
8610
8973
|
var useQuestionList = function useQuestionList(isDefaultQuestion, isDefaultQuestionGeneralClass) {
|
|
8611
8974
|
var history = useHistory();
|
|
@@ -8760,7 +9123,7 @@ var useQuestionList = function useQuestionList(isDefaultQuestion, isDefaultQuest
|
|
|
8760
9123
|
history.push(url);
|
|
8761
9124
|
}, []);
|
|
8762
9125
|
useEffect(function () {
|
|
8763
|
-
document.title = TITLE$
|
|
9126
|
+
document.title = TITLE$e;
|
|
8764
9127
|
}, []);
|
|
8765
9128
|
useEffect(function () {
|
|
8766
9129
|
getData();
|
|
@@ -9392,7 +9755,7 @@ var useReflectionFormDetail = function useReflectionFormDetail() {
|
|
|
9392
9755
|
};
|
|
9393
9756
|
};
|
|
9394
9757
|
|
|
9395
|
-
var TITLE$
|
|
9758
|
+
var TITLE$f = "Reflection form list";
|
|
9396
9759
|
|
|
9397
9760
|
var useReflectionFormList = function useReflectionFormList() {
|
|
9398
9761
|
var reflectionList = useSelector(function (state) {
|
|
@@ -9482,7 +9845,7 @@ var useReflectionFormList = function useReflectionFormList() {
|
|
|
9482
9845
|
}
|
|
9483
9846
|
}, [dispatch]);
|
|
9484
9847
|
useEffect(function () {
|
|
9485
|
-
document.title = TITLE$
|
|
9848
|
+
document.title = TITLE$f;
|
|
9486
9849
|
}, []);
|
|
9487
9850
|
useEffect(function () {
|
|
9488
9851
|
getData();
|
|
@@ -10545,7 +10908,7 @@ var initValue$e = {
|
|
|
10545
10908
|
isMandatory: false,
|
|
10546
10909
|
isBeforeSession: false
|
|
10547
10910
|
};
|
|
10548
|
-
var TITLE$
|
|
10911
|
+
var TITLE$g = "Question detail";
|
|
10549
10912
|
|
|
10550
10913
|
var useQuestionDetail = function useQuestionDetail(id) {
|
|
10551
10914
|
var editorRef;
|
|
@@ -10571,7 +10934,7 @@ var useQuestionDetail = function useQuestionDetail(id) {
|
|
|
10571
10934
|
};
|
|
10572
10935
|
|
|
10573
10936
|
useEffect(function () {
|
|
10574
|
-
document.title = TITLE$
|
|
10937
|
+
document.title = TITLE$g;
|
|
10575
10938
|
setEdited(false);
|
|
10576
10939
|
if (!!localStorage.getItem(window.location.href)) localStorage.removeItem(window.location.href);
|
|
10577
10940
|
}, []);
|
|
@@ -11235,7 +11598,7 @@ var useAssessmentDetail = function useAssessmentDetail() {
|
|
|
11235
11598
|
};
|
|
11236
11599
|
};
|
|
11237
11600
|
|
|
11238
|
-
var TITLE$
|
|
11601
|
+
var TITLE$h = "Assessment list";
|
|
11239
11602
|
|
|
11240
11603
|
var useAssessmentList = function useAssessmentList() {
|
|
11241
11604
|
var assessmentList = useSelector(function (state) {
|
|
@@ -11318,7 +11681,7 @@ var useAssessmentList = function useAssessmentList() {
|
|
|
11318
11681
|
dispatch(setLoading(false));
|
|
11319
11682
|
}, [filters]);
|
|
11320
11683
|
useEffect(function () {
|
|
11321
|
-
document.title = TITLE$
|
|
11684
|
+
document.title = TITLE$h;
|
|
11322
11685
|
}, []);
|
|
11323
11686
|
useEffect(function () {
|
|
11324
11687
|
getData();
|
|
@@ -11770,7 +12133,7 @@ var useFeedbackDetail = function useFeedbackDetail() {
|
|
|
11770
12133
|
};
|
|
11771
12134
|
};
|
|
11772
12135
|
|
|
11773
|
-
var TITLE$
|
|
12136
|
+
var TITLE$i = "Feedback list";
|
|
11774
12137
|
|
|
11775
12138
|
var useFeedbackList = function useFeedbackList() {
|
|
11776
12139
|
var feedbackList = useSelector(function (state) {
|
|
@@ -11822,7 +12185,7 @@ var useFeedbackList = function useFeedbackList() {
|
|
|
11822
12185
|
}
|
|
11823
12186
|
}, [dispatch, filters]);
|
|
11824
12187
|
useEffect(function () {
|
|
11825
|
-
document.title = TITLE$
|
|
12188
|
+
document.title = TITLE$i;
|
|
11826
12189
|
}, []);
|
|
11827
12190
|
useEffect(function () {
|
|
11828
12191
|
getData();
|
|
@@ -11836,7 +12199,7 @@ var useFeedbackList = function useFeedbackList() {
|
|
|
11836
12199
|
};
|
|
11837
12200
|
};
|
|
11838
12201
|
|
|
11839
|
-
var header$
|
|
12202
|
+
var header$6 = "Feedback";
|
|
11840
12203
|
|
|
11841
12204
|
var FeedbackList = function FeedbackList() {
|
|
11842
12205
|
var history = useHistory();
|
|
@@ -11865,7 +12228,7 @@ var FeedbackList = function FeedbackList() {
|
|
|
11865
12228
|
feedbackDetail: feedbackDetail
|
|
11866
12229
|
}), React.createElement("h5", {
|
|
11867
12230
|
className: "mb-2"
|
|
11868
|
-
}, header$
|
|
12231
|
+
}, header$6), React.createElement(Row, {
|
|
11869
12232
|
className: "my-2"
|
|
11870
12233
|
}, React.createElement(Col, {
|
|
11871
12234
|
md: 8,
|
|
@@ -12163,7 +12526,7 @@ var useTutorialScreenDetail = function useTutorialScreenDetail(typeRole) {
|
|
|
12163
12526
|
};
|
|
12164
12527
|
};
|
|
12165
12528
|
|
|
12166
|
-
var TITLE$
|
|
12529
|
+
var TITLE$j = "Tutorial screen list";
|
|
12167
12530
|
|
|
12168
12531
|
var useTutorialScreenList = function useTutorialScreenList(typeRole) {
|
|
12169
12532
|
var tutorialScreenList = useSelector(function (state) {
|
|
@@ -12248,7 +12611,7 @@ var useTutorialScreenList = function useTutorialScreenList(typeRole) {
|
|
|
12248
12611
|
dispatch(setLoading(false));
|
|
12249
12612
|
}, [filters]);
|
|
12250
12613
|
useEffect(function () {
|
|
12251
|
-
document.title = TITLE$
|
|
12614
|
+
document.title = TITLE$j;
|
|
12252
12615
|
}, []);
|
|
12253
12616
|
useEffect(function () {
|
|
12254
12617
|
getData();
|
|
@@ -12624,7 +12987,7 @@ var useQuestionCateDetail = function useQuestionCateDetail() {
|
|
|
12624
12987
|
};
|
|
12625
12988
|
};
|
|
12626
12989
|
|
|
12627
|
-
var TITLE$
|
|
12990
|
+
var TITLE$k = "Question category list";
|
|
12628
12991
|
|
|
12629
12992
|
var useQuestionCateList = function useQuestionCateList() {
|
|
12630
12993
|
var questionCateList = useSelector(function (state) {
|
|
@@ -12707,7 +13070,7 @@ var useQuestionCateList = function useQuestionCateList() {
|
|
|
12707
13070
|
dispatch(setLoading(false));
|
|
12708
13071
|
}, [filters]);
|
|
12709
13072
|
useEffect(function () {
|
|
12710
|
-
document.title = TITLE$
|
|
13073
|
+
document.title = TITLE$k;
|
|
12711
13074
|
}, []);
|
|
12712
13075
|
useEffect(function () {
|
|
12713
13076
|
getData();
|
|
@@ -12851,6 +13214,24 @@ var tabs$3 = [{
|
|
|
12851
13214
|
path: "/admin/question/question-list",
|
|
12852
13215
|
title: "Question list",
|
|
12853
13216
|
component: QuestionBankList
|
|
13217
|
+
}, {
|
|
13218
|
+
path: "/admin/question/default-question-list",
|
|
13219
|
+
title: "Default question list",
|
|
13220
|
+
component: function component() {
|
|
13221
|
+
return React.createElement(QuestionBankList, {
|
|
13222
|
+
isDefaultQuestion: true,
|
|
13223
|
+
isDefaultQuestionGeneral: false
|
|
13224
|
+
});
|
|
13225
|
+
}
|
|
13226
|
+
}, {
|
|
13227
|
+
path: "/admin/question/default-question-general-list",
|
|
13228
|
+
title: "Default question general class list",
|
|
13229
|
+
component: function component() {
|
|
13230
|
+
return React.createElement(QuestionBankList, {
|
|
13231
|
+
isDefaultQuestion: false,
|
|
13232
|
+
isDefaultQuestionGeneral: true
|
|
13233
|
+
});
|
|
13234
|
+
}
|
|
12854
13235
|
}, {
|
|
12855
13236
|
path: "/admin/question/question-category",
|
|
12856
13237
|
title: "Question category",
|
|
@@ -13458,7 +13839,7 @@ var useAssignmentDetail = function useAssignmentDetail() {
|
|
|
13458
13839
|
};
|
|
13459
13840
|
};
|
|
13460
13841
|
|
|
13461
|
-
var TITLE$
|
|
13842
|
+
var TITLE$l = "Assignment list";
|
|
13462
13843
|
|
|
13463
13844
|
var useAssignmentList = function useAssignmentList() {
|
|
13464
13845
|
var assignmentList = useSelector(function (state) {
|
|
@@ -13555,7 +13936,7 @@ var useAssignmentList = function useAssignmentList() {
|
|
|
13555
13936
|
dispatch(setLoading(false));
|
|
13556
13937
|
}, [filters]);
|
|
13557
13938
|
useEffect(function () {
|
|
13558
|
-
document.title = TITLE$
|
|
13939
|
+
document.title = TITLE$l;
|
|
13559
13940
|
}, []);
|
|
13560
13941
|
useEffect(function () {
|
|
13561
13942
|
getData();
|
|
@@ -14005,7 +14386,7 @@ var getRandomQuestion = function getRandomQuestion(data) {
|
|
|
14005
14386
|
return api.post(QUESTION_URL$2 + "/random", data);
|
|
14006
14387
|
};
|
|
14007
14388
|
|
|
14008
|
-
var TITLE$
|
|
14389
|
+
var TITLE$m = "Session template list";
|
|
14009
14390
|
var SESSION_TEMPLATE_URL$1 = "/admin/session-template-learning-support";
|
|
14010
14391
|
var CREATE_TEMPLATE_URL = "/admin/create-session-template-learning-support";
|
|
14011
14392
|
|
|
@@ -14109,7 +14490,7 @@ var useSessionTemplateList = function useSessionTemplateList() {
|
|
|
14109
14490
|
history.push(url);
|
|
14110
14491
|
}, []);
|
|
14111
14492
|
useEffect(function () {
|
|
14112
|
-
document.title = TITLE$
|
|
14493
|
+
document.title = TITLE$m;
|
|
14113
14494
|
}, []);
|
|
14114
14495
|
useEffect(function () {
|
|
14115
14496
|
getData();
|
|
@@ -14256,7 +14637,7 @@ var remove$j = function remove(id) {
|
|
|
14256
14637
|
return api["delete"](SESSION_TEMPLATE_GENERAL_CLASS_URL + "/" + id);
|
|
14257
14638
|
};
|
|
14258
14639
|
|
|
14259
|
-
var TITLE$
|
|
14640
|
+
var TITLE$n = "Session template general class list";
|
|
14260
14641
|
var SESSION_TEMPLATE_GENERAL_CLASS_URL$1 = "/admin/session-template/general-class";
|
|
14261
14642
|
var CREATE_TEMPLATE_GENERAL_CLASS_URL = "/admin/create-session-template-general-class";
|
|
14262
14643
|
|
|
@@ -14346,7 +14727,7 @@ var useSessionTemplateGeneralClassList = function useSessionTemplateGeneralClass
|
|
|
14346
14727
|
history.push(url);
|
|
14347
14728
|
}, []);
|
|
14348
14729
|
useEffect(function () {
|
|
14349
|
-
document.title = TITLE$
|
|
14730
|
+
document.title = TITLE$n;
|
|
14350
14731
|
}, []);
|
|
14351
14732
|
useEffect(function () {
|
|
14352
14733
|
getData();
|
|
@@ -16335,7 +16716,7 @@ var useCustomAlertDetail = function useCustomAlertDetail() {
|
|
|
16335
16716
|
};
|
|
16336
16717
|
};
|
|
16337
16718
|
|
|
16338
|
-
var TITLE$
|
|
16719
|
+
var TITLE$o = "Custom alert list";
|
|
16339
16720
|
|
|
16340
16721
|
var useCustomAlertList = function useCustomAlertList() {
|
|
16341
16722
|
var customAlertList = useSelector(function (state) {
|
|
@@ -16423,7 +16804,7 @@ var useCustomAlertList = function useCustomAlertList() {
|
|
|
16423
16804
|
dispatch(setLoading(false));
|
|
16424
16805
|
}, [filters]);
|
|
16425
16806
|
useEffect(function () {
|
|
16426
|
-
document.title = TITLE$
|
|
16807
|
+
document.title = TITLE$o;
|
|
16427
16808
|
}, []);
|
|
16428
16809
|
useEffect(function () {
|
|
16429
16810
|
getData();
|
|
@@ -16438,7 +16819,7 @@ var useCustomAlertList = function useCustomAlertList() {
|
|
|
16438
16819
|
};
|
|
16439
16820
|
};
|
|
16440
16821
|
|
|
16441
|
-
var header$
|
|
16822
|
+
var header$7 = "Custom alert";
|
|
16442
16823
|
|
|
16443
16824
|
var CustomAlertList = function CustomAlertList() {
|
|
16444
16825
|
var modal = useRef();
|
|
@@ -16506,7 +16887,7 @@ var CustomAlertList = function CustomAlertList() {
|
|
|
16506
16887
|
when: edited
|
|
16507
16888
|
}), React.createElement("h5", {
|
|
16508
16889
|
className: "mb-2"
|
|
16509
|
-
}, header$
|
|
16890
|
+
}, header$7), React.createElement(Row, {
|
|
16510
16891
|
className: "my-2"
|
|
16511
16892
|
}, React.createElement(Col, {
|
|
16512
16893
|
md: 4
|
|
@@ -17065,7 +17446,7 @@ var useCertificateDetail = function useCertificateDetail() {
|
|
|
17065
17446
|
};
|
|
17066
17447
|
};
|
|
17067
17448
|
|
|
17068
|
-
var TITLE$
|
|
17449
|
+
var TITLE$p = "Certificate list";
|
|
17069
17450
|
|
|
17070
17451
|
var useCertificateList = function useCertificateList() {
|
|
17071
17452
|
var certificateList = useSelector(function (state) {
|
|
@@ -17148,7 +17529,7 @@ var useCertificateList = function useCertificateList() {
|
|
|
17148
17529
|
dispatch(setLoading(false));
|
|
17149
17530
|
}, [filters]);
|
|
17150
17531
|
useEffect(function () {
|
|
17151
|
-
document.title = TITLE$
|
|
17532
|
+
document.title = TITLE$p;
|
|
17152
17533
|
}, []);
|
|
17153
17534
|
useEffect(function () {
|
|
17154
17535
|
getData();
|
|
@@ -17163,7 +17544,7 @@ var useCertificateList = function useCertificateList() {
|
|
|
17163
17544
|
};
|
|
17164
17545
|
};
|
|
17165
17546
|
|
|
17166
|
-
var header$
|
|
17547
|
+
var header$8 = "Certificate";
|
|
17167
17548
|
|
|
17168
17549
|
var CertificateList = function CertificateList() {
|
|
17169
17550
|
var modal = useRef();
|
|
@@ -17222,7 +17603,7 @@ var CertificateList = function CertificateList() {
|
|
|
17222
17603
|
when: edited
|
|
17223
17604
|
}), React.createElement("h5", {
|
|
17224
17605
|
className: "mb-2"
|
|
17225
|
-
}, header$
|
|
17606
|
+
}, header$8), React.createElement(Row, {
|
|
17226
17607
|
className: "my-2"
|
|
17227
17608
|
}, React.createElement(Col, {
|
|
17228
17609
|
md: 4
|
|
@@ -17296,7 +17677,7 @@ var CertificateList = function CertificateList() {
|
|
|
17296
17677
|
}))));
|
|
17297
17678
|
};
|
|
17298
17679
|
|
|
17299
|
-
var TITLE$
|
|
17680
|
+
var TITLE$q = "Certificate list";
|
|
17300
17681
|
|
|
17301
17682
|
var useCertificateList$1 = function useCertificateList() {
|
|
17302
17683
|
var dispatch = useDispatch();
|
|
@@ -17384,7 +17765,7 @@ var useCertificateList$1 = function useCertificateList() {
|
|
|
17384
17765
|
}
|
|
17385
17766
|
}, [listWaiting]);
|
|
17386
17767
|
useEffect(function () {
|
|
17387
|
-
document.title = TITLE$
|
|
17768
|
+
document.title = TITLE$q;
|
|
17388
17769
|
getListWaiting();
|
|
17389
17770
|
getListApproved();
|
|
17390
17771
|
}, []);
|
|
@@ -17730,58 +18111,84 @@ var CompareTeacher = function CompareTeacher() {
|
|
|
17730
18111
|
};
|
|
17731
18112
|
|
|
17732
18113
|
var REPORT_URL = BASE_URL + "/api/report";
|
|
17733
|
-
var
|
|
17734
|
-
return api.get(REPORT_URL + "/
|
|
17735
|
-
|
|
17736
|
-
|
|
17737
|
-
return api.get(REPORT_URL + "/logincouting");
|
|
18114
|
+
var getAllTotalTime = function getAllTotalTime(filter) {
|
|
18115
|
+
return api.get(REPORT_URL + "/dashboard-total-student", {
|
|
18116
|
+
params: filter
|
|
18117
|
+
});
|
|
17738
18118
|
};
|
|
17739
|
-
var
|
|
17740
|
-
return api.get(REPORT_URL + "/
|
|
18119
|
+
var getReadinessToLearning = function getReadinessToLearning(filter) {
|
|
18120
|
+
return api.get(REPORT_URL + "/top-readiness-learn", {
|
|
18121
|
+
params: filter
|
|
18122
|
+
});
|
|
17741
18123
|
};
|
|
17742
|
-
var
|
|
17743
|
-
return api.get(REPORT_URL + "/
|
|
18124
|
+
var getTopLearningStrategies = function getTopLearningStrategies(filter) {
|
|
18125
|
+
return api.get(REPORT_URL + "/top-learning-strategies", {
|
|
18126
|
+
params: filter
|
|
18127
|
+
});
|
|
17744
18128
|
};
|
|
17745
|
-
var
|
|
17746
|
-
return api.get(REPORT_URL + "/
|
|
18129
|
+
var getStudentByGrade = function getStudentByGrade(filter) {
|
|
18130
|
+
return api.get(REPORT_URL + "/student-by-grade", {
|
|
18131
|
+
params: filter
|
|
18132
|
+
});
|
|
17747
18133
|
};
|
|
17748
|
-
var
|
|
17749
|
-
return api.get(REPORT_URL + "/
|
|
18134
|
+
var getOverviewQuestionChart = function getOverviewQuestionChart(filter) {
|
|
18135
|
+
return api.get(REPORT_URL + "/overview-chart", {
|
|
18136
|
+
params: filter
|
|
18137
|
+
});
|
|
17750
18138
|
};
|
|
17751
18139
|
|
|
17752
|
-
var TITLE$
|
|
18140
|
+
var TITLE$r = "Dashboard";
|
|
17753
18141
|
|
|
17754
18142
|
var useDashboard = function useDashboard() {
|
|
17755
18143
|
var dispatch = useDispatch();
|
|
18144
|
+
var now = new Date();
|
|
17756
18145
|
|
|
17757
|
-
var _useState = useState(
|
|
17758
|
-
|
|
17759
|
-
|
|
18146
|
+
var _useState = useState({
|
|
18147
|
+
startDate: new Date(now.getFullYear(), now.getMonth(), 1).getTime(),
|
|
18148
|
+
endDate: new Date(now.getFullYear(), now.getMonth() + 1, 0).getTime(),
|
|
18149
|
+
studentIds: []
|
|
18150
|
+
}),
|
|
18151
|
+
filter = _useState[0],
|
|
18152
|
+
setFilter = _useState[1];
|
|
17760
18153
|
|
|
17761
|
-
var _useState2 = useState(
|
|
17762
|
-
|
|
17763
|
-
|
|
18154
|
+
var _useState2 = useState(),
|
|
18155
|
+
listTotalTime = _useState2[0],
|
|
18156
|
+
setListTotalTime = _useState2[1];
|
|
17764
18157
|
|
|
17765
|
-
var _useState3 = useState(
|
|
17766
|
-
|
|
17767
|
-
|
|
18158
|
+
var _useState3 = useState(),
|
|
18159
|
+
readinessToLearning = _useState3[0],
|
|
18160
|
+
setReadinessToLearning = _useState3[1];
|
|
17768
18161
|
|
|
17769
|
-
var _useState4 = useState(
|
|
17770
|
-
|
|
17771
|
-
|
|
18162
|
+
var _useState4 = useState(),
|
|
18163
|
+
topLearningStrategies = _useState4[0],
|
|
18164
|
+
setTopLearningStrategies = _useState4[1];
|
|
17772
18165
|
|
|
17773
|
-
var _useState5 = useState(
|
|
17774
|
-
|
|
17775
|
-
|
|
18166
|
+
var _useState5 = useState(),
|
|
18167
|
+
studentByGrade = _useState5[0],
|
|
18168
|
+
setStudentByGrade = _useState5[1];
|
|
18169
|
+
|
|
18170
|
+
var _useState6 = useState(),
|
|
18171
|
+
chartOneToOneData = _useState6[0],
|
|
18172
|
+
setChartOneToOneData = _useState6[1];
|
|
18173
|
+
|
|
18174
|
+
var _useState7 = useState(),
|
|
18175
|
+
chartClassReflection = _useState7[0],
|
|
18176
|
+
setChartClassReflection = _useState7[1];
|
|
18177
|
+
|
|
18178
|
+
var _useState8 = useState(),
|
|
18179
|
+
chartConference = _useState8[0],
|
|
18180
|
+
setChartConference = _useState8[1];
|
|
17776
18181
|
|
|
17777
|
-
var
|
|
17778
|
-
|
|
17779
|
-
|
|
18182
|
+
var _useState9 = useState(),
|
|
18183
|
+
learningProgress = _useState9[0],
|
|
18184
|
+
setLearningProgress = _useState9[1];
|
|
17780
18185
|
|
|
17781
|
-
var callApi = useCallback(function (apiCaller, setData, defaultData) {
|
|
18186
|
+
var callApi = useCallback(function (apiCaller, setData, defaultData, type) {
|
|
17782
18187
|
try {
|
|
17783
18188
|
var _temp2 = _catch(function () {
|
|
17784
|
-
return Promise.resolve(apiCaller(
|
|
18189
|
+
return Promise.resolve(type ? apiCaller(_extends({}, filter, {
|
|
18190
|
+
type: type
|
|
18191
|
+
})) : apiCaller(filter)).then(function (res) {
|
|
17785
18192
|
setData(res.data);
|
|
17786
18193
|
});
|
|
17787
18194
|
}, function (err) {
|
|
@@ -17798,45 +18205,130 @@ var useDashboard = function useDashboard() {
|
|
|
17798
18205
|
} catch (e) {
|
|
17799
18206
|
return Promise.reject(e);
|
|
17800
18207
|
}
|
|
17801
|
-
}, []);
|
|
18208
|
+
}, [filter]);
|
|
17802
18209
|
var getData = useCallback(function () {
|
|
17803
18210
|
try {
|
|
17804
|
-
document.title = TITLE$
|
|
18211
|
+
document.title = TITLE$r;
|
|
17805
18212
|
dispatch(setLoading(true));
|
|
17806
|
-
return Promise.resolve(Promise.any([callApi(
|
|
18213
|
+
return Promise.resolve(Promise.any([callApi(getAllTotalTime, setListTotalTime, []), callApi(getReadinessToLearning, setReadinessToLearning, []), callApi(getTopLearningStrategies, setTopLearningStrategies, []), callApi(getStudentByGrade, setStudentByGrade, []), callApi(getOverviewQuestionChart, setChartOneToOneData, [], "OneToOne"), callApi(getOverviewQuestionChart, setChartClassReflection, [], "ClassReflection"), callApi(getOverviewQuestionChart, setChartConference, [], "Conference"), callApi(getOverviewQuestionChart, setLearningProgress, [], "LearningProgress")])).then(function () {
|
|
17807
18214
|
dispatch(setLoading(false));
|
|
17808
18215
|
});
|
|
17809
18216
|
} catch (e) {
|
|
17810
18217
|
return Promise.reject(e);
|
|
17811
18218
|
}
|
|
17812
|
-
}, []);
|
|
18219
|
+
}, [filter]);
|
|
17813
18220
|
useEffect(function () {
|
|
17814
18221
|
getData();
|
|
17815
|
-
}, []);
|
|
18222
|
+
}, [filter]);
|
|
17816
18223
|
return {
|
|
17817
|
-
|
|
17818
|
-
|
|
17819
|
-
|
|
17820
|
-
|
|
17821
|
-
|
|
17822
|
-
|
|
18224
|
+
setFilter: setFilter,
|
|
18225
|
+
filter: filter,
|
|
18226
|
+
listTotalTime: listTotalTime,
|
|
18227
|
+
readinessToLearning: readinessToLearning,
|
|
18228
|
+
topLearningStrategies: topLearningStrategies,
|
|
18229
|
+
studentByGrade: studentByGrade,
|
|
18230
|
+
chartOneToOneData: chartOneToOneData,
|
|
18231
|
+
chartClassReflection: chartClassReflection,
|
|
18232
|
+
chartConference: chartConference,
|
|
18233
|
+
learningProgress: learningProgress
|
|
17823
18234
|
};
|
|
17824
18235
|
};
|
|
17825
18236
|
|
|
17826
|
-
var styles$1 = {"dashboard-card":"_1Jgr2","quantity-table":"_3Thdy"};
|
|
18237
|
+
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"};
|
|
17827
18238
|
|
|
17828
18239
|
var DashboardCard = function DashboardCard(_ref) {
|
|
17829
18240
|
var label = _ref.label,
|
|
17830
18241
|
children = _ref.children;
|
|
17831
18242
|
return React.createElement("div", {
|
|
17832
18243
|
className: styles$1["dashboard-card"]
|
|
18244
|
+
}, React.createElement("div", {
|
|
18245
|
+
className: "d-flex align-items-center justify-content-between"
|
|
17833
18246
|
}, React.createElement("h5", {
|
|
17834
18247
|
className: "mb-2"
|
|
17835
|
-
}, label), React.createElement(
|
|
18248
|
+
}, label), React.createElement(FiMoreVertical, {
|
|
18249
|
+
className: "cursor-pointer"
|
|
18250
|
+
})), React.createElement("div", {
|
|
17836
18251
|
className: "flex-grow-1 d-flex flex-column justify-content-center"
|
|
17837
18252
|
}, children));
|
|
17838
18253
|
};
|
|
17839
18254
|
|
|
18255
|
+
var ReadinessToLearn = function ReadinessToLearn(_ref) {
|
|
18256
|
+
var data = _ref.data;
|
|
18257
|
+
var categories = useMemo(function () {
|
|
18258
|
+
if (!data) return [];
|
|
18259
|
+
|
|
18260
|
+
try {
|
|
18261
|
+
return data.map(function (item) {
|
|
18262
|
+
return item.createdAt;
|
|
18263
|
+
});
|
|
18264
|
+
} catch (_unused) {
|
|
18265
|
+
return [];
|
|
18266
|
+
}
|
|
18267
|
+
}, [data]);
|
|
18268
|
+
if (!data) return React.createElement(Loading$1, null);
|
|
18269
|
+
var options = {
|
|
18270
|
+
chart: {
|
|
18271
|
+
type: "radialBar",
|
|
18272
|
+
height: 350,
|
|
18273
|
+
stacked: true,
|
|
18274
|
+
stackType: "100%",
|
|
18275
|
+
toolbar: {
|
|
18276
|
+
show: false
|
|
18277
|
+
}
|
|
18278
|
+
},
|
|
18279
|
+
noData: {
|
|
18280
|
+
text: "NO DATA",
|
|
18281
|
+
align: "center",
|
|
18282
|
+
verticalAlign: "middle",
|
|
18283
|
+
offsetX: 0,
|
|
18284
|
+
offsetY: 0,
|
|
18285
|
+
style: {
|
|
18286
|
+
color: undefined,
|
|
18287
|
+
fontSize: "14px",
|
|
18288
|
+
fontFamily: undefined
|
|
18289
|
+
}
|
|
18290
|
+
},
|
|
18291
|
+
plotOptions: {
|
|
18292
|
+
bar: {
|
|
18293
|
+
horizontal: false,
|
|
18294
|
+
columnWidth: "80%"
|
|
18295
|
+
}
|
|
18296
|
+
},
|
|
18297
|
+
colors: ["#FFB04F", "#78B6E2", "#F08281", "#40D2CC"],
|
|
18298
|
+
stroke: {
|
|
18299
|
+
lineCap: "round"
|
|
18300
|
+
},
|
|
18301
|
+
labels: (data === null || data === void 0 ? void 0 : data.map(function (i) {
|
|
18302
|
+
return i.questionText;
|
|
18303
|
+
})) || [],
|
|
18304
|
+
xaxis: {
|
|
18305
|
+
categories: categories
|
|
18306
|
+
},
|
|
18307
|
+
fill: {
|
|
18308
|
+
opacity: 1
|
|
18309
|
+
},
|
|
18310
|
+
legend: {
|
|
18311
|
+
position: "bottom",
|
|
18312
|
+
show: true,
|
|
18313
|
+
fontSize: "16px",
|
|
18314
|
+
onItemClick: {
|
|
18315
|
+
toggleDataSeries: true
|
|
18316
|
+
},
|
|
18317
|
+
onItemHover: {
|
|
18318
|
+
highlightDataSeries: false
|
|
18319
|
+
}
|
|
18320
|
+
}
|
|
18321
|
+
};
|
|
18322
|
+
return React.createElement("div", null, React.createElement(ReactApexChart, {
|
|
18323
|
+
options: options,
|
|
18324
|
+
series: (data === null || data === void 0 ? void 0 : data.map(function (i) {
|
|
18325
|
+
return i.percentQuestion.toFixed(2);
|
|
18326
|
+
})) || [],
|
|
18327
|
+
type: "radialBar",
|
|
18328
|
+
height: 350
|
|
18329
|
+
}));
|
|
18330
|
+
};
|
|
18331
|
+
|
|
17840
18332
|
var Loading = function Loading() {
|
|
17841
18333
|
return React.createElement("div", {
|
|
17842
18334
|
className: "d-flex align-items-center justify-content-center"
|
|
@@ -17858,355 +18350,666 @@ var Loading = function Loading() {
|
|
|
17858
18350
|
}, "Loading...")));
|
|
17859
18351
|
};
|
|
17860
18352
|
|
|
17861
|
-
var colors = ["
|
|
17862
|
-
|
|
17863
|
-
var getColors = function getColors(length) {
|
|
17864
|
-
if (colors.length >= length) return colors;
|
|
17865
|
-
var newColors = [].concat(colors);
|
|
17866
|
-
|
|
17867
|
-
while (newColors.length < length) {
|
|
17868
|
-
newColors = [].concat(newColors, colors);
|
|
17869
|
-
}
|
|
18353
|
+
var colors = ["#40D2CC", "#1D74C5", "#78B6E2", "#FFC783", "#0D9994"];
|
|
17870
18354
|
|
|
17871
|
-
|
|
17872
|
-
|
|
18355
|
+
var TopLearningStrategy = function TopLearningStrategy(_ref) {
|
|
18356
|
+
var _data$learningStrateg, _data$learningStrateg2;
|
|
17873
18357
|
|
|
17874
|
-
var HighImpact = function HighImpact(_ref) {
|
|
17875
18358
|
var data = _ref.data;
|
|
17876
|
-
var colors = useMemo(function () {
|
|
17877
|
-
var _Object$keys;
|
|
17878
|
-
|
|
17879
|
-
if (!data) return [];
|
|
17880
|
-
return getColors(((_Object$keys = Object.keys(data)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) || 0);
|
|
17881
|
-
}, [data]);
|
|
17882
|
-
var ratings = useMemo(function () {
|
|
17883
|
-
if (!data) return [];
|
|
17884
|
-
return Object.values(data);
|
|
17885
|
-
}, [data]);
|
|
17886
|
-
var learningStrategies = useMemo(function () {
|
|
17887
|
-
if (!data) return [];
|
|
17888
|
-
|
|
17889
|
-
try {
|
|
17890
|
-
var results = Object.keys(data).map(function (key, index) {
|
|
17891
|
-
return {
|
|
17892
|
-
name: key,
|
|
17893
|
-
color: colors[index]
|
|
17894
|
-
};
|
|
17895
|
-
});
|
|
17896
|
-
return results;
|
|
17897
|
-
} catch (_unused) {
|
|
17898
|
-
return [];
|
|
17899
|
-
}
|
|
17900
|
-
}, [data]);
|
|
17901
18359
|
if (!data) return React.createElement(Loading, null);
|
|
17902
|
-
var series = [{
|
|
17903
|
-
name: "",
|
|
17904
|
-
data: ratings
|
|
17905
|
-
}];
|
|
17906
18360
|
var options = {
|
|
17907
18361
|
chart: {
|
|
17908
|
-
|
|
17909
|
-
type: "
|
|
17910
|
-
toolbar: {
|
|
17911
|
-
show: false
|
|
17912
|
-
}
|
|
17913
|
-
},
|
|
17914
|
-
colors: colors,
|
|
17915
|
-
plotOptions: {
|
|
17916
|
-
bar: {
|
|
17917
|
-
columnWidth: "45%",
|
|
17918
|
-
distributed: true
|
|
17919
|
-
}
|
|
17920
|
-
},
|
|
17921
|
-
dataLabels: {
|
|
17922
|
-
enabled: false
|
|
17923
|
-
},
|
|
17924
|
-
legend: {
|
|
17925
|
-
show: false
|
|
17926
|
-
},
|
|
17927
|
-
xaxis: {
|
|
17928
|
-
categories: learningStrategies.map(function (item) {
|
|
17929
|
-
return item.name.substring(0, 15) + "...";
|
|
17930
|
-
})
|
|
18362
|
+
width: 350,
|
|
18363
|
+
type: "pie"
|
|
17931
18364
|
},
|
|
17932
|
-
|
|
17933
|
-
|
|
17934
|
-
|
|
17935
|
-
|
|
17936
|
-
|
|
18365
|
+
noData: {
|
|
18366
|
+
text: "NO DATA",
|
|
18367
|
+
align: "center",
|
|
18368
|
+
verticalAlign: "middle",
|
|
18369
|
+
offsetX: 0,
|
|
18370
|
+
offsetY: 0,
|
|
18371
|
+
style: {
|
|
18372
|
+
color: undefined,
|
|
18373
|
+
fontSize: "14px",
|
|
18374
|
+
fontFamily: undefined
|
|
17937
18375
|
}
|
|
18376
|
+
},
|
|
18377
|
+
labels: (data === null || data === void 0 ? void 0 : (_data$learningStrateg = data.learningStrategies) === null || _data$learningStrateg === void 0 ? void 0 : _data$learningStrateg.map(function (i) {
|
|
18378
|
+
return i.learningStrategyName;
|
|
18379
|
+
})) || [],
|
|
18380
|
+
colors: colors,
|
|
18381
|
+
legend: {
|
|
18382
|
+
show: true,
|
|
18383
|
+
position: "bottom"
|
|
17938
18384
|
}
|
|
17939
18385
|
};
|
|
17940
|
-
return React.createElement("div",
|
|
18386
|
+
return React.createElement("div", {
|
|
18387
|
+
className: "d-flex h-100"
|
|
18388
|
+
}, React.createElement("div", {
|
|
18389
|
+
className: "d-flex align-items-end"
|
|
18390
|
+
}, React.createElement(ReactApexChart, {
|
|
17941
18391
|
options: options,
|
|
17942
|
-
series:
|
|
17943
|
-
|
|
18392
|
+
series: (data === null || data === void 0 ? void 0 : (_data$learningStrateg2 = data.learningStrategies) === null || _data$learningStrateg2 === void 0 ? void 0 : _data$learningStrateg2.map(function (i) {
|
|
18393
|
+
return i.usageCount;
|
|
18394
|
+
})) || [],
|
|
18395
|
+
type: "pie",
|
|
17944
18396
|
height: 350
|
|
17945
|
-
})), React.createElement("div", {
|
|
17946
|
-
className: "d-flex flex-wrap"
|
|
17947
|
-
}, learningStrategies.map(function (item) {
|
|
17948
|
-
return React.createElement("div", {
|
|
17949
|
-
key: item.name,
|
|
17950
|
-
className: "d-flex align-items-center mb-2 mr-3"
|
|
17951
|
-
}, React.createElement("span", {
|
|
17952
|
-
className: "plain-color-square mr-2",
|
|
17953
|
-
style: {
|
|
17954
|
-
backgroundColor: item.color
|
|
17955
|
-
}
|
|
17956
|
-
}), React.createElement("span", null, item.name));
|
|
17957
18397
|
})));
|
|
17958
18398
|
};
|
|
17959
18399
|
|
|
17960
|
-
var
|
|
17961
|
-
|
|
17962
|
-
|
|
18400
|
+
var TotalCard = function TotalCard(_ref) {
|
|
18401
|
+
var icon = _ref.icon,
|
|
18402
|
+
title = _ref.title,
|
|
18403
|
+
value = _ref.value,
|
|
18404
|
+
isUp = _ref.isUp,
|
|
18405
|
+
deviant = _ref.deviant,
|
|
18406
|
+
filter = _ref.filter;
|
|
18407
|
+
return React.createElement("div", {
|
|
18408
|
+
className: "border p-3 rounded mr-3 mb-3"
|
|
18409
|
+
}, React.createElement("div", {
|
|
18410
|
+
className: "d-flex align-items-center"
|
|
18411
|
+
}, icon, React.createElement("p", {
|
|
18412
|
+
className: styles$1["title-card"] + " m-0 mx-2"
|
|
18413
|
+
}, title)), React.createElement("div", {
|
|
18414
|
+
className: "d-flex align-items-center justify-content-center mt-3"
|
|
18415
|
+
}, React.createElement("p", {
|
|
18416
|
+
className: "" + styles$1["value-card"]
|
|
18417
|
+
}, value), React.createElement("div", {
|
|
18418
|
+
className: styles$1["box-filter"] + " mx-2 d-flex align-items-center p-2 rounded"
|
|
18419
|
+
}, isUp ? React.createElement(AiOutlineArrowUp, {
|
|
18420
|
+
className: styles$1["size-arrow"] + " " + styles$1["color-up"]
|
|
18421
|
+
}) : React.createElement(AiOutlineArrowDown, {
|
|
18422
|
+
className: styles$1["size-arrow"] + " " + styles$1["color-down"]
|
|
18423
|
+
}), React.createElement("div", null, React.createElement("p", {
|
|
18424
|
+
className: styles$1[isUp ? "color-up" : "color-down"] + " " + styles$1["deviant-card"] + " m-0 h6"
|
|
18425
|
+
}, deviant), React.createElement("p", {
|
|
18426
|
+
className: styles$1["filter-card"] + " my-0"
|
|
18427
|
+
}, filter)))));
|
|
18428
|
+
};
|
|
18429
|
+
|
|
18430
|
+
var CustomBarChart = function CustomBarChart(_ref) {
|
|
17963
18431
|
var data = _ref.data;
|
|
17964
|
-
|
|
17965
|
-
var
|
|
17966
|
-
|
|
17967
|
-
|
|
17968
|
-
|
|
17969
|
-
|
|
17970
|
-
|
|
17971
|
-
|
|
17972
|
-
|
|
17973
|
-
|
|
17974
|
-
var
|
|
17975
|
-
|
|
17976
|
-
|
|
17977
|
-
|
|
17978
|
-
|
|
17979
|
-
|
|
17980
|
-
|
|
17981
|
-
|
|
17982
|
-
|
|
17983
|
-
var
|
|
18432
|
+
|
|
18433
|
+
var _useState = useState(600),
|
|
18434
|
+
widthChartOne = _useState[0],
|
|
18435
|
+
setWidthChart = _useState[1];
|
|
18436
|
+
|
|
18437
|
+
var _useState2 = useState(400),
|
|
18438
|
+
heightChartOne = _useState2[0],
|
|
18439
|
+
setHeightChart = _useState2[1];
|
|
18440
|
+
|
|
18441
|
+
var wellbeing = [];
|
|
18442
|
+
var growth = [];
|
|
18443
|
+
var relations = [];
|
|
18444
|
+
var productiviy = [];
|
|
18445
|
+
var academic = [];
|
|
18446
|
+
var selfEfficacy = [];
|
|
18447
|
+
var focus = [];
|
|
18448
|
+
var energy = [];
|
|
18449
|
+
var hapiness = [];
|
|
18450
|
+
var mood = [];
|
|
18451
|
+
var learningProgress = [];
|
|
18452
|
+
var chatMonth = [];
|
|
18453
|
+
|
|
18454
|
+
var _useState3 = useState({
|
|
17984
18455
|
chart: {
|
|
17985
|
-
|
|
17986
|
-
type: "area",
|
|
18456
|
+
type: "line",
|
|
17987
18457
|
toolbar: {
|
|
17988
18458
|
show: false
|
|
18459
|
+
},
|
|
18460
|
+
height: heightChartOne,
|
|
18461
|
+
zoom: {
|
|
18462
|
+
enabled: false
|
|
17989
18463
|
}
|
|
17990
18464
|
},
|
|
17991
|
-
|
|
17992
|
-
|
|
17993
|
-
curve: "straight"
|
|
18465
|
+
dataLabels: {
|
|
18466
|
+
enabled: false
|
|
17994
18467
|
},
|
|
17995
|
-
|
|
17996
|
-
|
|
17997
|
-
|
|
17998
|
-
|
|
17999
|
-
|
|
18000
|
-
|
|
18001
|
-
|
|
18002
|
-
|
|
18003
|
-
shape: "circle",
|
|
18004
|
-
radius: 2,
|
|
18005
|
-
offsetX: 0,
|
|
18006
|
-
offsetY: 0,
|
|
18007
|
-
onClick: undefined,
|
|
18008
|
-
onDblClick: undefined,
|
|
18009
|
-
showNullDataPoints: true,
|
|
18010
|
-
hover: {
|
|
18011
|
-
size: undefined,
|
|
18012
|
-
sizeOffset: 3
|
|
18468
|
+
legend: {
|
|
18469
|
+
position: "top",
|
|
18470
|
+
horizontalAlign: "center",
|
|
18471
|
+
width: 3 * widthChartOne / 5,
|
|
18472
|
+
offsetX: 170,
|
|
18473
|
+
markers: {
|
|
18474
|
+
width: 12,
|
|
18475
|
+
radius: 0
|
|
18013
18476
|
}
|
|
18014
18477
|
},
|
|
18015
|
-
|
|
18016
|
-
|
|
18478
|
+
stroke: {
|
|
18479
|
+
width: 2
|
|
18480
|
+
},
|
|
18481
|
+
markers: {
|
|
18482
|
+
size: 5
|
|
18017
18483
|
},
|
|
18484
|
+
colors: ["#082FA2", "#1A55AE", "#3C65E0", "#6D88E8", "#1E80B9", "#1C77AC", "#4992BD", "#77ADCD", "#3DCBCB", "#1DBAB4", "#61CBCB"],
|
|
18018
18485
|
xaxis: {
|
|
18019
|
-
categories:
|
|
18486
|
+
categories: chatMonth
|
|
18487
|
+
},
|
|
18488
|
+
yaxis: {
|
|
18489
|
+
title: {
|
|
18490
|
+
text: "High",
|
|
18491
|
+
rotate: 0,
|
|
18492
|
+
offsetX: -20,
|
|
18493
|
+
offsetY: -265
|
|
18494
|
+
},
|
|
18495
|
+
labels: {
|
|
18496
|
+
offsetX: 10,
|
|
18497
|
+
show: false
|
|
18498
|
+
}
|
|
18499
|
+
}
|
|
18500
|
+
}),
|
|
18501
|
+
optionsOne = _useState3[0],
|
|
18502
|
+
setOptions = _useState3[1];
|
|
18503
|
+
|
|
18504
|
+
var _useState4 = useState([{
|
|
18505
|
+
name: "Wellbeing",
|
|
18506
|
+
data: [0]
|
|
18507
|
+
}, {
|
|
18508
|
+
name: "Growth",
|
|
18509
|
+
data: [0]
|
|
18510
|
+
}, {
|
|
18511
|
+
name: "Relations",
|
|
18512
|
+
data: [0]
|
|
18513
|
+
}, {
|
|
18514
|
+
name: "Productivity",
|
|
18515
|
+
data: [0]
|
|
18516
|
+
}, {
|
|
18517
|
+
name: "Academic",
|
|
18518
|
+
data: [0]
|
|
18519
|
+
}, {
|
|
18520
|
+
name: "Self-Efficacy",
|
|
18521
|
+
data: [0]
|
|
18522
|
+
}, {
|
|
18523
|
+
name: "Focus",
|
|
18524
|
+
data: [0]
|
|
18525
|
+
}, {
|
|
18526
|
+
name: "Energy",
|
|
18527
|
+
data: [0]
|
|
18528
|
+
}, {
|
|
18529
|
+
name: "Hapiness",
|
|
18530
|
+
data: [0]
|
|
18531
|
+
}, {
|
|
18532
|
+
name: "Mood",
|
|
18533
|
+
data: [0]
|
|
18534
|
+
}, {
|
|
18535
|
+
name: "Learning Progress",
|
|
18536
|
+
data: [0]
|
|
18537
|
+
}]),
|
|
18538
|
+
series = _useState4[0],
|
|
18539
|
+
setSeries = _useState4[1];
|
|
18540
|
+
|
|
18541
|
+
var screenWidthMe = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
18542
|
+
useEffect(function () {
|
|
18543
|
+
if (screenWidthMe > 1400) {
|
|
18544
|
+
setWidthChart(932);
|
|
18545
|
+
setHeightChart(680);
|
|
18546
|
+
}
|
|
18547
|
+
}, []);
|
|
18548
|
+
|
|
18549
|
+
var getData = function getData() {
|
|
18550
|
+
try {
|
|
18551
|
+
!!data && data.overviewQuestionChoice.map(function (element) {
|
|
18552
|
+
chatMonth.push(element.month);
|
|
18553
|
+
element.resultQuestion.map(function (data, index) {
|
|
18554
|
+
if (data.questionText == "") {
|
|
18555
|
+
mood.push(null);
|
|
18556
|
+
learningProgress.push(null);
|
|
18557
|
+
wellbeing.push(null);
|
|
18558
|
+
growth.push(null);
|
|
18559
|
+
academic.push(null);
|
|
18560
|
+
selfEfficacy.push(null);
|
|
18561
|
+
energy.push(null);
|
|
18562
|
+
focus.push(null), hapiness.push(null);
|
|
18563
|
+
relations.push(null);
|
|
18564
|
+
productiviy.push(null);
|
|
18565
|
+
return;
|
|
18566
|
+
} else {
|
|
18567
|
+
var result = data.avgOfStudentChoice.toFixed(2);
|
|
18568
|
+
|
|
18569
|
+
if (index == 0) {
|
|
18570
|
+
wellbeing.push(result);
|
|
18571
|
+
mood.push(0);
|
|
18572
|
+
learningProgress.push(0);
|
|
18573
|
+
} else if (index == 1) {
|
|
18574
|
+
growth.push(result);
|
|
18575
|
+
} else if (index == 2) {
|
|
18576
|
+
relations.push(result);
|
|
18577
|
+
} else if (index == 3) {
|
|
18578
|
+
productiviy.push(result);
|
|
18579
|
+
} else if (index == 4) {
|
|
18580
|
+
academic.push(result);
|
|
18581
|
+
} else if (index == 5) {
|
|
18582
|
+
selfEfficacy.push(result);
|
|
18583
|
+
} else if (index == 6) {
|
|
18584
|
+
energy.push(result);
|
|
18585
|
+
} else if (index == 7) {
|
|
18586
|
+
focus.push(result);
|
|
18587
|
+
} else if (index == 8) {
|
|
18588
|
+
hapiness.push(result);
|
|
18589
|
+
}
|
|
18590
|
+
}
|
|
18591
|
+
});
|
|
18592
|
+
});
|
|
18593
|
+
setOptions({
|
|
18594
|
+
chart: {
|
|
18595
|
+
type: "line",
|
|
18596
|
+
toolbar: {
|
|
18597
|
+
show: false
|
|
18598
|
+
},
|
|
18599
|
+
height: heightChartOne,
|
|
18600
|
+
zoom: {
|
|
18601
|
+
enabled: false
|
|
18602
|
+
}
|
|
18603
|
+
},
|
|
18604
|
+
dataLabels: {
|
|
18605
|
+
enabled: false
|
|
18606
|
+
},
|
|
18607
|
+
legend: {
|
|
18608
|
+
position: "top",
|
|
18609
|
+
horizontalAlign: "center",
|
|
18610
|
+
width: 4 * widthChartOne / 5,
|
|
18611
|
+
offsetX: 100,
|
|
18612
|
+
markers: {
|
|
18613
|
+
width: 12,
|
|
18614
|
+
radius: 0
|
|
18615
|
+
}
|
|
18616
|
+
},
|
|
18617
|
+
markers: {
|
|
18618
|
+
size: 5
|
|
18619
|
+
},
|
|
18620
|
+
colors: ["#082FA2", "#1A55AE", "#3C65E0", "#6D88E8", "#1E80B9", "#1C77AC", "#4992BD", "#77ADCD", "#3DCBCB", "#1DBAB4", "#61CBCB"],
|
|
18621
|
+
xaxis: {
|
|
18622
|
+
categories: chatMonth
|
|
18623
|
+
},
|
|
18624
|
+
yaxis: {
|
|
18625
|
+
labels: {
|
|
18626
|
+
offsetX: 0,
|
|
18627
|
+
show: false
|
|
18628
|
+
}
|
|
18629
|
+
}
|
|
18630
|
+
});
|
|
18631
|
+
setSeries([{
|
|
18632
|
+
name: "Wellbeing",
|
|
18633
|
+
data: wellbeing
|
|
18634
|
+
}, {
|
|
18635
|
+
name: "Growth",
|
|
18636
|
+
data: growth
|
|
18637
|
+
}, {
|
|
18638
|
+
name: "Relations",
|
|
18639
|
+
data: relations
|
|
18640
|
+
}, {
|
|
18641
|
+
name: "Productivity",
|
|
18642
|
+
data: productiviy
|
|
18643
|
+
}, {
|
|
18644
|
+
name: "Academic",
|
|
18645
|
+
data: academic
|
|
18646
|
+
}, {
|
|
18647
|
+
name: "Self-Efficacy",
|
|
18648
|
+
data: selfEfficacy
|
|
18649
|
+
}, {
|
|
18650
|
+
name: "Focus",
|
|
18651
|
+
data: focus
|
|
18652
|
+
}, {
|
|
18653
|
+
name: "Energy",
|
|
18654
|
+
data: energy
|
|
18655
|
+
}, {
|
|
18656
|
+
name: "Hapiness",
|
|
18657
|
+
data: hapiness
|
|
18658
|
+
}, {
|
|
18659
|
+
name: "Mood",
|
|
18660
|
+
data: mood
|
|
18661
|
+
}, {
|
|
18662
|
+
name: "Learning Progress",
|
|
18663
|
+
data: learningProgress
|
|
18664
|
+
}]);
|
|
18665
|
+
return Promise.resolve();
|
|
18666
|
+
} catch (e) {
|
|
18667
|
+
return Promise.reject(e);
|
|
18020
18668
|
}
|
|
18021
18669
|
};
|
|
18670
|
+
|
|
18671
|
+
useEffect(function () {
|
|
18672
|
+
getData();
|
|
18673
|
+
}, [data]);
|
|
18674
|
+
var optionOneToOne = optionsOne;
|
|
18022
18675
|
return React.createElement("div", null, React.createElement(ReactApexChart, {
|
|
18023
|
-
options:
|
|
18676
|
+
options: optionOneToOne,
|
|
18024
18677
|
series: series,
|
|
18025
18678
|
type: "line",
|
|
18679
|
+
width: "100%",
|
|
18026
18680
|
height: 350
|
|
18027
18681
|
}));
|
|
18028
18682
|
};
|
|
18029
18683
|
|
|
18030
|
-
var
|
|
18031
|
-
|
|
18032
|
-
var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
18684
|
+
var StudentByGrade = function StudentByGrade(_ref) {
|
|
18033
18685
|
var data = _ref.data;
|
|
18034
|
-
if (!data) return React.createElement(Loading, null);
|
|
18035
|
-
var series = [{
|
|
18036
|
-
name: "Student",
|
|
18037
|
-
data: data.map(function (item) {
|
|
18038
|
-
return item.studentRating;
|
|
18039
|
-
})
|
|
18040
|
-
}];
|
|
18041
|
-
var categories = data.map(function (item) {
|
|
18042
|
-
return item.learningStrategyName.substring(0, 15) + "...";
|
|
18043
|
-
});
|
|
18044
18686
|
var options = {
|
|
18045
18687
|
chart: {
|
|
18046
|
-
|
|
18047
|
-
height: 350,
|
|
18048
|
-
toolbar: {
|
|
18049
|
-
show: false
|
|
18050
|
-
}
|
|
18688
|
+
height: 350
|
|
18051
18689
|
},
|
|
18052
|
-
colors: colors$2,
|
|
18053
18690
|
plotOptions: {
|
|
18054
18691
|
bar: {
|
|
18055
|
-
|
|
18056
|
-
|
|
18692
|
+
borderRadius: 4,
|
|
18693
|
+
horizontal: true
|
|
18057
18694
|
}
|
|
18058
18695
|
},
|
|
18059
18696
|
dataLabels: {
|
|
18060
18697
|
enabled: false
|
|
18061
|
-
},
|
|
18062
|
-
stroke: {
|
|
18063
|
-
show: true,
|
|
18064
|
-
width: 2,
|
|
18065
|
-
colors: ["transparent"]
|
|
18066
|
-
},
|
|
18067
|
-
xaxis: {
|
|
18068
|
-
categories: categories
|
|
18069
|
-
},
|
|
18070
|
-
fill: {
|
|
18071
|
-
opacity: 1
|
|
18072
|
-
},
|
|
18073
|
-
legend: {
|
|
18074
|
-
onItemClick: {
|
|
18075
|
-
toggleDataSeries: false
|
|
18076
|
-
},
|
|
18077
|
-
onItemHover: {
|
|
18078
|
-
highlightDataSeries: false
|
|
18079
|
-
}
|
|
18080
18698
|
}
|
|
18081
18699
|
};
|
|
18700
|
+
var series = [{
|
|
18701
|
+
data: (data === null || data === void 0 ? void 0 : data.map(function (i) {
|
|
18702
|
+
return i.quantity;
|
|
18703
|
+
})) || []
|
|
18704
|
+
}];
|
|
18082
18705
|
return React.createElement("div", null, React.createElement(ReactApexChart, {
|
|
18083
18706
|
options: options,
|
|
18084
18707
|
series: series,
|
|
18085
18708
|
type: "bar",
|
|
18709
|
+
width: "100%",
|
|
18086
18710
|
height: 350
|
|
18087
18711
|
}));
|
|
18088
18712
|
};
|
|
18089
18713
|
|
|
18090
|
-
var
|
|
18091
|
-
|
|
18092
|
-
var Quantity = function Quantity(_ref) {
|
|
18093
|
-
var data = _ref.data;
|
|
18094
|
-
if (!data) return React.createElement(Loading, null);
|
|
18095
|
-
var teacherPercentage = data.teacherPercentage,
|
|
18096
|
-
studentPercentage = data.studentPercentage,
|
|
18097
|
-
assistantPercentage = data.assistantPercentage,
|
|
18098
|
-
numberOfTeachers = data.numberOfTeachers,
|
|
18099
|
-
numberOfStudents = data.numberOfStudents,
|
|
18100
|
-
numberOfAssistants = data.numberOfAssistants;
|
|
18101
|
-
var series = [teacherPercentage, studentPercentage, assistantPercentage].map(function (number) {
|
|
18102
|
-
return Number(number.toFixed(2));
|
|
18103
|
-
});
|
|
18714
|
+
var StudentByGender = function StudentByGender() {
|
|
18715
|
+
var series = [45, 55];
|
|
18104
18716
|
var options = {
|
|
18105
|
-
|
|
18106
|
-
|
|
18107
|
-
type: "pie"
|
|
18108
|
-
},
|
|
18109
|
-
labels: ["Teachers", "Students", "Assistants"],
|
|
18110
|
-
colors: colors$3,
|
|
18717
|
+
labels: ["Female", "Male"],
|
|
18718
|
+
colors: ["#A4D1F0", "#40D2CC"],
|
|
18111
18719
|
legend: {
|
|
18112
18720
|
show: false
|
|
18113
|
-
}
|
|
18114
|
-
responsive: [{
|
|
18115
|
-
breakpoint: 480,
|
|
18116
|
-
options: {
|
|
18117
|
-
chart: {
|
|
18118
|
-
width: 200
|
|
18119
|
-
}
|
|
18120
|
-
}
|
|
18121
|
-
}]
|
|
18721
|
+
}
|
|
18122
18722
|
};
|
|
18123
|
-
var details = [{
|
|
18124
|
-
label: "Teachers",
|
|
18125
|
-
color: colors$3[0],
|
|
18126
|
-
value: numberOfTeachers
|
|
18127
|
-
}, {
|
|
18128
|
-
label: "Students",
|
|
18129
|
-
color: colors$3[1],
|
|
18130
|
-
value: numberOfStudents
|
|
18131
|
-
}, {
|
|
18132
|
-
label: "Assistants",
|
|
18133
|
-
color: colors$3[2],
|
|
18134
|
-
value: numberOfAssistants
|
|
18135
|
-
}];
|
|
18136
18723
|
return React.createElement("div", {
|
|
18137
18724
|
className: "d-flex h-100"
|
|
18138
18725
|
}, React.createElement("div", {
|
|
18139
|
-
className: "d-flex justify-content-center align-items-end flex-grow-1"
|
|
18140
|
-
}, React.createElement("div", {
|
|
18141
|
-
className: styles$1["quantity-table"]
|
|
18142
|
-
}, React.createElement(Table, {
|
|
18143
|
-
responsive: true,
|
|
18144
|
-
hover: true,
|
|
18145
|
-
bordered: true,
|
|
18146
|
-
size: "sm"
|
|
18147
|
-
}, React.createElement("tbody", null, details.map(function (item) {
|
|
18148
|
-
return React.createElement("tr", {
|
|
18149
|
-
key: item.label
|
|
18150
|
-
}, React.createElement("td", null, item.label), React.createElement("td", {
|
|
18151
|
-
className: "text-center"
|
|
18152
|
-
}, React.createElement("div", {
|
|
18153
|
-
className: "custom-checkbox-square",
|
|
18154
|
-
style: {
|
|
18155
|
-
backgroundColor: item.color
|
|
18156
|
-
}
|
|
18157
|
-
})), React.createElement("td", null, item.value));
|
|
18158
|
-
}))), React.createElement("p", null, "The number of user for each role"))), React.createElement("div", {
|
|
18159
18726
|
className: "d-flex align-items-end"
|
|
18160
18727
|
}, React.createElement(ReactApexChart, {
|
|
18161
18728
|
options: options,
|
|
18162
18729
|
series: series,
|
|
18163
18730
|
type: "pie",
|
|
18164
|
-
|
|
18731
|
+
height: 350,
|
|
18732
|
+
width: "100%"
|
|
18165
18733
|
})));
|
|
18166
18734
|
};
|
|
18167
18735
|
|
|
18736
|
+
var StudentWithSpecialNeeds = function StudentWithSpecialNeeds() {
|
|
18737
|
+
var options = {
|
|
18738
|
+
colors: ["#CEF7F5", "#0D9994", "#1CB7B1", "#40D2CC", "#80E7E2"],
|
|
18739
|
+
legend: {
|
|
18740
|
+
show: false
|
|
18741
|
+
}
|
|
18742
|
+
};
|
|
18743
|
+
var series = [44, 55, 41, 17, 15];
|
|
18744
|
+
return React.createElement("div", null, React.createElement(ReactApexChart, {
|
|
18745
|
+
options: options,
|
|
18746
|
+
series: series,
|
|
18747
|
+
type: "donut",
|
|
18748
|
+
width: "100%",
|
|
18749
|
+
height: 350
|
|
18750
|
+
}));
|
|
18751
|
+
};
|
|
18752
|
+
|
|
18753
|
+
var StudentByAge = function StudentByAge() {
|
|
18754
|
+
var options = {
|
|
18755
|
+
chart: {
|
|
18756
|
+
height: 350
|
|
18757
|
+
},
|
|
18758
|
+
plotOptions: {
|
|
18759
|
+
bar: {
|
|
18760
|
+
columnWidth: "45%",
|
|
18761
|
+
distributed: true
|
|
18762
|
+
}
|
|
18763
|
+
},
|
|
18764
|
+
dataLabels: {
|
|
18765
|
+
enabled: false
|
|
18766
|
+
},
|
|
18767
|
+
legend: {
|
|
18768
|
+
show: false
|
|
18769
|
+
},
|
|
18770
|
+
noData: {
|
|
18771
|
+
text: "NO DATA",
|
|
18772
|
+
offsetX: 0,
|
|
18773
|
+
offsetY: 0
|
|
18774
|
+
}
|
|
18775
|
+
};
|
|
18776
|
+
var series = [{
|
|
18777
|
+
data: []
|
|
18778
|
+
}];
|
|
18779
|
+
return React.createElement("div", null, React.createElement(ReactApexChart, {
|
|
18780
|
+
options: options,
|
|
18781
|
+
series: series,
|
|
18782
|
+
type: "bar",
|
|
18783
|
+
width: "100%",
|
|
18784
|
+
height: 350
|
|
18785
|
+
}));
|
|
18786
|
+
};
|
|
18787
|
+
|
|
18168
18788
|
var Dashboard = function Dashboard() {
|
|
18169
18789
|
var _useDashboard = useDashboard(),
|
|
18170
|
-
|
|
18171
|
-
|
|
18172
|
-
|
|
18173
|
-
|
|
18790
|
+
listTotalTime = _useDashboard.listTotalTime,
|
|
18791
|
+
readinessToLearning = _useDashboard.readinessToLearning,
|
|
18792
|
+
topLearningStrategies = _useDashboard.topLearningStrategies,
|
|
18793
|
+
setFilter = _useDashboard.setFilter,
|
|
18794
|
+
filter = _useDashboard.filter,
|
|
18795
|
+
studentByGrade = _useDashboard.studentByGrade,
|
|
18796
|
+
chartOneToOneData = _useDashboard.chartOneToOneData,
|
|
18797
|
+
chartClassReflection = _useDashboard.chartClassReflection,
|
|
18798
|
+
chartConference = _useDashboard.chartConference,
|
|
18799
|
+
learningProgress = _useDashboard.learningProgress;
|
|
18174
18800
|
|
|
18801
|
+
var user = useSelector(function (state) {
|
|
18802
|
+
return state.common.user;
|
|
18803
|
+
});
|
|
18175
18804
|
var cards = [{
|
|
18176
|
-
label: "
|
|
18177
|
-
children: React.createElement(
|
|
18178
|
-
data:
|
|
18805
|
+
label: "Top learning strategies",
|
|
18806
|
+
children: React.createElement(TopLearningStrategy, {
|
|
18807
|
+
data: topLearningStrategies
|
|
18179
18808
|
})
|
|
18180
18809
|
}, {
|
|
18181
|
-
label: "
|
|
18182
|
-
children: React.createElement(
|
|
18183
|
-
data:
|
|
18810
|
+
label: "Readiness to learn",
|
|
18811
|
+
children: React.createElement(ReadinessToLearn, {
|
|
18812
|
+
data: readinessToLearning
|
|
18813
|
+
})
|
|
18814
|
+
}];
|
|
18815
|
+
var listChartLeft = [{
|
|
18816
|
+
label: "1-to-1",
|
|
18817
|
+
children: React.createElement(CustomBarChart, {
|
|
18818
|
+
data: chartOneToOneData
|
|
18819
|
+
})
|
|
18820
|
+
}, {
|
|
18821
|
+
label: "Class Reflection",
|
|
18822
|
+
children: React.createElement(CustomBarChart, {
|
|
18823
|
+
data: chartClassReflection
|
|
18184
18824
|
})
|
|
18185
18825
|
}, {
|
|
18186
|
-
label: "
|
|
18187
|
-
children: React.createElement(
|
|
18188
|
-
data:
|
|
18826
|
+
label: "Conferences",
|
|
18827
|
+
children: React.createElement(CustomBarChart, {
|
|
18828
|
+
data: chartConference
|
|
18189
18829
|
})
|
|
18190
18830
|
}, {
|
|
18191
|
-
label: "
|
|
18192
|
-
children: React.createElement(
|
|
18193
|
-
data:
|
|
18831
|
+
label: "Learning Progress",
|
|
18832
|
+
children: React.createElement(CustomBarChart, {
|
|
18833
|
+
data: learningProgress
|
|
18834
|
+
})
|
|
18835
|
+
}];
|
|
18836
|
+
var listChartRight = [{
|
|
18837
|
+
label: "Students by Gender",
|
|
18838
|
+
children: React.createElement(StudentByGender, null)
|
|
18839
|
+
}, {
|
|
18840
|
+
label: "Students with Special Needs",
|
|
18841
|
+
children: React.createElement(StudentWithSpecialNeeds, null)
|
|
18842
|
+
}, {
|
|
18843
|
+
label: "Students by Grade",
|
|
18844
|
+
children: React.createElement(StudentByGrade, {
|
|
18845
|
+
data: studentByGrade
|
|
18194
18846
|
})
|
|
18847
|
+
}, {
|
|
18848
|
+
label: "Safety",
|
|
18849
|
+
children: React.createElement(StudentByAge, null)
|
|
18850
|
+
}];
|
|
18851
|
+
var totalCardData = [{
|
|
18852
|
+
icon: React.createElement(BiMessageRoundedDetail, {
|
|
18853
|
+
className: styles$1["size-icon"]
|
|
18854
|
+
}),
|
|
18855
|
+
title: "Total 1-to-1",
|
|
18856
|
+
value: listTotalTime === null || listTotalTime === void 0 ? void 0 : listTotalTime.totalOneToOne,
|
|
18857
|
+
isUp: true,
|
|
18858
|
+
deviant: "2",
|
|
18859
|
+
filter: "this week"
|
|
18860
|
+
}, {
|
|
18861
|
+
icon: React.createElement(IoMdStopwatch, {
|
|
18862
|
+
className: styles$1["size-icon"]
|
|
18863
|
+
}),
|
|
18864
|
+
title: "Total time 1-to-1",
|
|
18865
|
+
value: listTotalTime === null || listTotalTime === void 0 ? void 0 : listTotalTime.totalTimeOneToOne,
|
|
18866
|
+
isUp: true,
|
|
18867
|
+
deviant: "17 min",
|
|
18868
|
+
filter: "this week"
|
|
18869
|
+
}, {
|
|
18870
|
+
icon: React.createElement(BiMessageRoundedDetail, {
|
|
18871
|
+
className: styles$1["size-icon"]
|
|
18872
|
+
}),
|
|
18873
|
+
title: "Total conferences",
|
|
18874
|
+
value: listTotalTime === null || listTotalTime === void 0 ? void 0 : listTotalTime.totalConference,
|
|
18875
|
+
isUp: false,
|
|
18876
|
+
deviant: "-4",
|
|
18877
|
+
filter: "this week"
|
|
18878
|
+
}, {
|
|
18879
|
+
icon: React.createElement(MdScreenShare, {
|
|
18880
|
+
className: styles$1["size-icon"]
|
|
18881
|
+
}),
|
|
18882
|
+
title: "Total time conferences",
|
|
18883
|
+
value: listTotalTime === null || listTotalTime === void 0 ? void 0 : listTotalTime.totalTimeConference,
|
|
18884
|
+
isUp: true,
|
|
18885
|
+
deviant: "8 min",
|
|
18886
|
+
filter: "this week"
|
|
18887
|
+
}, {
|
|
18888
|
+
icon: React.createElement(AiOutlineFileDone, {
|
|
18889
|
+
className: styles$1["size-icon"]
|
|
18890
|
+
}),
|
|
18891
|
+
title: "AVS checkin class reflections",
|
|
18892
|
+
value: listTotalTime === null || listTotalTime === void 0 ? void 0 : listTotalTime.avgClassReflection,
|
|
18893
|
+
isUp: false,
|
|
18894
|
+
deviant: "-15%",
|
|
18895
|
+
filter: "this week"
|
|
18195
18896
|
}];
|
|
18196
|
-
|
|
18197
|
-
|
|
18198
|
-
|
|
18897
|
+
|
|
18898
|
+
var handleChangeStartTime = function handleChangeStartTime(date) {
|
|
18899
|
+
setFilter(_extends({}, filter, {
|
|
18900
|
+
startDate: new Date(date).getTime()
|
|
18901
|
+
}));
|
|
18902
|
+
};
|
|
18903
|
+
|
|
18904
|
+
var handleChangeEndTime = function handleChangeEndTime(date) {
|
|
18905
|
+
setFilter(_extends({}, filter, {
|
|
18906
|
+
endDate: new Date(date).getTime()
|
|
18907
|
+
}));
|
|
18908
|
+
};
|
|
18909
|
+
|
|
18910
|
+
var handleChangeStudentIds = function handleChangeStudentIds(students) {
|
|
18911
|
+
var listStudentId = students.length > 0 && students.map(function (i) {
|
|
18912
|
+
return i.studentId;
|
|
18913
|
+
}) || [];
|
|
18914
|
+
setFilter(_extends({}, filter, {
|
|
18915
|
+
studentIds: listStudentId
|
|
18916
|
+
}));
|
|
18917
|
+
};
|
|
18918
|
+
|
|
18919
|
+
var handleFormatDate = function handleFormatDate(date) {
|
|
18920
|
+
var dateTime = new Date(date).toISOString().slice(0, 10);
|
|
18921
|
+
return dateTime;
|
|
18922
|
+
};
|
|
18923
|
+
|
|
18924
|
+
return React.createElement("div", {
|
|
18925
|
+
className: "" + styles$1["block-dashboard"]
|
|
18926
|
+
}, React.createElement("div", {
|
|
18927
|
+
className: "d-flex align-items-center justify-content-between"
|
|
18928
|
+
}, React.createElement("h4", null, "Hey ", user.lastName), React.createElement("div", {
|
|
18929
|
+
className: "text-center"
|
|
18930
|
+
}, React.createElement("button", {
|
|
18931
|
+
id: "toggler",
|
|
18932
|
+
onClick: function noRefCheck() {},
|
|
18933
|
+
className: styles$1["btn-filter"] + " d-flex align-items-center cursor-pointer"
|
|
18934
|
+
}, React.createElement(FiFilter, {
|
|
18935
|
+
className: "" + styles$1["color-filter"]
|
|
18936
|
+
}), React.createElement("p", {
|
|
18937
|
+
className: styles$1["color-filter"] + " my-0 mx-2"
|
|
18938
|
+
}, "Filter")))), React.createElement("div", {
|
|
18939
|
+
className: "d-flex justify-content-end py-4"
|
|
18940
|
+
}, React.createElement(UncontrolledCollapse, {
|
|
18941
|
+
toggler: "#toggler",
|
|
18942
|
+
className: "" + styles$1["block-collapse"]
|
|
18943
|
+
}, React.createElement("div", {
|
|
18944
|
+
className: "" + styles$1["bock-filter-left"]
|
|
18945
|
+
}, React.createElement("input", {
|
|
18946
|
+
type: "date",
|
|
18947
|
+
className: "" + styles$1["form-date-picker"],
|
|
18948
|
+
onChange: function onChange(e) {
|
|
18949
|
+
return handleChangeStartTime(e.target.value);
|
|
18950
|
+
},
|
|
18951
|
+
value: handleFormatDate(filter.startDate)
|
|
18952
|
+
}), React.createElement("input", {
|
|
18953
|
+
type: "date",
|
|
18954
|
+
className: "" + styles$1["form-date-picker"],
|
|
18955
|
+
onChange: function onChange(e) {
|
|
18956
|
+
return handleChangeEndTime(e.target.value);
|
|
18957
|
+
},
|
|
18958
|
+
value: handleFormatDate(filter.endDate)
|
|
18959
|
+
})), React.createElement("div", {
|
|
18960
|
+
className: "" + styles$1["bock-filter-right"]
|
|
18961
|
+
}, React.createElement(StudentSelector, {
|
|
18962
|
+
onChange: function onChange(e) {
|
|
18963
|
+
handleChangeStudentIds(e);
|
|
18964
|
+
}
|
|
18965
|
+
})))), React.createElement("div", {
|
|
18966
|
+
className: "d-flex align-items-center flex-wrap py-2"
|
|
18967
|
+
}, totalCardData.map(function (item) {
|
|
18968
|
+
return React.createElement(TotalCard, {
|
|
18969
|
+
icon: item.icon,
|
|
18970
|
+
title: item.title,
|
|
18971
|
+
value: item.value,
|
|
18972
|
+
isUp: item.isUp,
|
|
18973
|
+
deviant: item.deviant,
|
|
18974
|
+
filter: item.filter
|
|
18975
|
+
});
|
|
18976
|
+
})), React.createElement(Row, {
|
|
18199
18977
|
className: "mb-2"
|
|
18200
18978
|
}, cards.map(function (card) {
|
|
18201
18979
|
return React.createElement(Col, {
|
|
18202
18980
|
key: card.label,
|
|
18981
|
+
xs: 12,
|
|
18203
18982
|
md: 6,
|
|
18204
18983
|
className: "mb-4"
|
|
18205
18984
|
}, React.createElement(DashboardCard, {
|
|
18206
18985
|
label: card.label,
|
|
18207
18986
|
children: card.children
|
|
18208
18987
|
}));
|
|
18209
|
-
}))
|
|
18988
|
+
})), React.createElement(Row, {
|
|
18989
|
+
className: "my-2"
|
|
18990
|
+
}, React.createElement(Col, {
|
|
18991
|
+
xs: 12,
|
|
18992
|
+
xl: 7
|
|
18993
|
+
}, listChartLeft.map(function (i) {
|
|
18994
|
+
return React.createElement(Col, {
|
|
18995
|
+
key: i.label,
|
|
18996
|
+
className: "mb-4"
|
|
18997
|
+
}, React.createElement(DashboardCard, {
|
|
18998
|
+
label: i.label,
|
|
18999
|
+
children: i.children
|
|
19000
|
+
}));
|
|
19001
|
+
})), React.createElement(Col, {
|
|
19002
|
+
xs: 12,
|
|
19003
|
+
xl: 5
|
|
19004
|
+
}, listChartRight.map(function (i) {
|
|
19005
|
+
return React.createElement(Col, {
|
|
19006
|
+
key: i.label,
|
|
19007
|
+
className: "mb-4"
|
|
19008
|
+
}, React.createElement(DashboardCard, {
|
|
19009
|
+
label: i.label,
|
|
19010
|
+
children: i.children
|
|
19011
|
+
}));
|
|
19012
|
+
}))));
|
|
18210
19013
|
};
|
|
18211
19014
|
|
|
18212
19015
|
LicenseManager.setLicenseKey(LICENSE_AGGRID);
|