mario-education 2.4.99-beta → 2.4.100-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/QuestionBank/components/AgGridComponents.d.ts +0 -1
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/configs/constants.d.ts +0 -4
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/hooks/useQuestionDetail.d.ts +0 -1
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchCounselor/components/SwitchCounselorModal.d.ts +4 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchCounselor/hooks/useSwitchAssistant.d.ts +18 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchCounselor/hooks/useSwitchCounselor.d.ts +18 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchCounselor/utils/constants.d.ts +8 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchCounselor/utils/type.interface.d.ts +53 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchCounselor/views/SwitchCounselorList.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/components/SwitchCounselorModal.d.ts +4 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/components/SwitchSecondaryTeacherModal.d.ts +4 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/hooks/useSwitchCounselor.d.ts +18 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/hooks/useSwitchSecondaryTeacher.d.ts +19 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/utils/constants.d.ts +8 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/utils/type.interface.d.ts +63 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/views/SwitchSecondaryTeacherList.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/services/userService.d.ts +6 -0
- package/dist/index.js +1046 -306
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1047 -307
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -19,9 +19,9 @@ var masterDetail = require('@ag-grid-enterprise/master-detail');
|
|
|
19
19
|
var clientSideRowModel = require('@ag-grid-community/client-side-row-model');
|
|
20
20
|
var fa = require('react-icons/fa');
|
|
21
21
|
var tinymceReact = require('@tinymce/tinymce-react');
|
|
22
|
-
var fi = require('react-icons/fi');
|
|
23
22
|
var Chart = _interopDefault(require('react-apexcharts'));
|
|
24
23
|
require('react-datepicker/dist/react-datepicker.css');
|
|
24
|
+
var fi = require('react-icons/fi');
|
|
25
25
|
var jsPDF = _interopDefault(require('jspdf'));
|
|
26
26
|
var html2canvas = _interopDefault(require('html2canvas'));
|
|
27
27
|
|
|
@@ -5583,7 +5583,12 @@ var CSVType;
|
|
|
5583
5583
|
CSVType["Others"] = "others";
|
|
5584
5584
|
})(CSVType || (CSVType = {}));
|
|
5585
5585
|
|
|
5586
|
-
var
|
|
5586
|
+
var isbButtons = [{
|
|
5587
|
+
text: "Import students",
|
|
5588
|
+
backgroundColor: "#0abde3",
|
|
5589
|
+
type: CSVType.Students
|
|
5590
|
+
}];
|
|
5591
|
+
var othersButtons = [{
|
|
5587
5592
|
text: "Import class reflections",
|
|
5588
5593
|
backgroundColor: "#e74c3c",
|
|
5589
5594
|
type: CSVType.ClassReflection
|
|
@@ -5637,6 +5642,7 @@ var useCSVImport = function useCSVImport() {
|
|
|
5637
5642
|
React.useEffect(function () {
|
|
5638
5643
|
document.title = title;
|
|
5639
5644
|
}, []);
|
|
5645
|
+
var buttons = isCheckDomainIBS ? isbButtons : othersButtons;
|
|
5640
5646
|
var upload = React.useCallback(function (file) {
|
|
5641
5647
|
try {
|
|
5642
5648
|
var _temp8 = function _temp8() {
|
|
@@ -8763,6 +8769,12 @@ var getStudentWithoutAssistant = function getStudentWithoutAssistant(data) {
|
|
|
8763
8769
|
var getAssistantByStudentId = function getAssistantByStudentId(studentId) {
|
|
8764
8770
|
return marioCore.api.get(USER_URL$2 + "/assistants/" + studentId);
|
|
8765
8771
|
};
|
|
8772
|
+
var getCounselorByStudentId = function getCounselorByStudentId(studentId) {
|
|
8773
|
+
return marioCore.api.get(USER_URL$2 + "/counselors/" + studentId);
|
|
8774
|
+
};
|
|
8775
|
+
var getSecondaryTeacherByStudentId = function getSecondaryTeacherByStudentId(studentId) {
|
|
8776
|
+
return marioCore.api.get(USER_URL$2 + "/secondary-teachers/" + studentId);
|
|
8777
|
+
};
|
|
8766
8778
|
var getAssistants = function getAssistants() {
|
|
8767
8779
|
return marioCore.api.get(marioCore.BASE_URL + "/api/assistant");
|
|
8768
8780
|
};
|
|
@@ -8771,6 +8783,16 @@ var changeAssistantOfStudent = function changeAssistantOfStudent(id, assistantUs
|
|
|
8771
8783
|
assistantUserId: assistantUserId
|
|
8772
8784
|
});
|
|
8773
8785
|
};
|
|
8786
|
+
var changeCounselorOfStudent = function changeCounselorOfStudent(id, counselorId) {
|
|
8787
|
+
return marioCore.api.put(USER_URL$2 + "/change-counselor/" + id, {
|
|
8788
|
+
counselorId: counselorId
|
|
8789
|
+
});
|
|
8790
|
+
};
|
|
8791
|
+
var changeSecondaryTeacherOfStudent = function changeSecondaryTeacherOfStudent(id, secondaryTeacherId) {
|
|
8792
|
+
return marioCore.api.put(USER_URL$2 + "/change-secondary-teacher/" + id, {
|
|
8793
|
+
secondaryTeacherId: secondaryTeacherId
|
|
8794
|
+
});
|
|
8795
|
+
};
|
|
8774
8796
|
var assignAssistantOfStudent = function assignAssistantOfStudent(studentId, teacherId, assistantId) {
|
|
8775
8797
|
return marioCore.api.post(TEACHER_URL$1 + "/update/teacher-assign-assistant", {
|
|
8776
8798
|
assistantId: assistantId,
|
|
@@ -8785,6 +8807,20 @@ var removeAssistantForStudent = function removeAssistantForStudent(studentId) {
|
|
|
8785
8807
|
}
|
|
8786
8808
|
});
|
|
8787
8809
|
};
|
|
8810
|
+
var removeCounselorForStudent = function removeCounselorForStudent(studentId) {
|
|
8811
|
+
return marioCore.api["delete"](USER_URL$2 + "/remove-counselor", {
|
|
8812
|
+
params: {
|
|
8813
|
+
studentId: studentId
|
|
8814
|
+
}
|
|
8815
|
+
});
|
|
8816
|
+
};
|
|
8817
|
+
var removeSecondaryTeacherForStudent = function removeSecondaryTeacherForStudent(studentId) {
|
|
8818
|
+
return marioCore.api["delete"](USER_URL$2 + "/remove-secondary-teacher", {
|
|
8819
|
+
params: {
|
|
8820
|
+
studentId: studentId
|
|
8821
|
+
}
|
|
8822
|
+
});
|
|
8823
|
+
};
|
|
8788
8824
|
var assignCounselorOfStudent = function assignCounselorOfStudent(studentId, teacherId, counselorId) {
|
|
8789
8825
|
return marioCore.api.post(TEACHER_URL$1 + "/update/teacher-assign-counselor", {
|
|
8790
8826
|
counselorId: counselorId,
|
|
@@ -11736,209 +11772,988 @@ var AssignSecondaryTeacherList = function AssignSecondaryTeacherList() {
|
|
|
11736
11772
|
}));
|
|
11737
11773
|
};
|
|
11738
11774
|
|
|
11739
|
-
var
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
component: LearningSupportCategoryList
|
|
11751
|
-
}, {
|
|
11752
|
-
path: "/admin/set-up/learning-strategy",
|
|
11753
|
-
title: "Learning strategies",
|
|
11754
|
-
component: LearningStrategyList
|
|
11755
|
-
}, {
|
|
11756
|
-
path: "/admin/set-up/goal-example",
|
|
11757
|
-
title: "Goal examples",
|
|
11758
|
-
component: GoalExampleList
|
|
11759
|
-
}, {
|
|
11760
|
-
path: "/admin/set-up/student-badge",
|
|
11761
|
-
title: "Student badges",
|
|
11762
|
-
component: BadgeList
|
|
11763
|
-
}, {
|
|
11764
|
-
path: "/admin/set-up/semester",
|
|
11765
|
-
title: "Semester",
|
|
11766
|
-
component: SemesterList
|
|
11767
|
-
}, {
|
|
11768
|
-
path: "/admin/set-up/blank-days",
|
|
11769
|
-
title: "Blank days",
|
|
11770
|
-
component: SchoolBlankDayList
|
|
11771
|
-
}, {
|
|
11772
|
-
path: "/admin/set-up/csv-import",
|
|
11773
|
-
title: "CSV Import",
|
|
11774
|
-
component: CSVImport
|
|
11775
|
-
}, {
|
|
11776
|
-
path: "/admin/set-up/band-score",
|
|
11777
|
-
title: "Band scores",
|
|
11778
|
-
component: BandScoreList
|
|
11779
|
-
}, {
|
|
11780
|
-
path: "/admin/set-up/current-license",
|
|
11781
|
-
title: "License",
|
|
11782
|
-
component: CurrentLicense
|
|
11783
|
-
}, {
|
|
11784
|
-
path: "/admin/set-up/userDeleted",
|
|
11785
|
-
title: "User deleted",
|
|
11786
|
-
component: UserList
|
|
11787
|
-
}, {
|
|
11788
|
-
path: "/admin/set-up/switch-teacher",
|
|
11789
|
-
title: "Switch Teacher",
|
|
11790
|
-
component: SwitchTeacherList
|
|
11791
|
-
}, {
|
|
11792
|
-
path: "/admin/set-up/assign-assistant",
|
|
11793
|
-
title: "Assign assistant",
|
|
11794
|
-
component: AssignAssistantList
|
|
11795
|
-
}, {
|
|
11796
|
-
path: "/admin/set-up/switch-assistant",
|
|
11797
|
-
title: "Switch assistant",
|
|
11798
|
-
component: SwitchAssistantList
|
|
11799
|
-
}, {
|
|
11800
|
-
path: "/admin/set-up/assign-counselor",
|
|
11801
|
-
title: "Assign counselor",
|
|
11802
|
-
component: AssignCounselorList
|
|
11803
|
-
}, {
|
|
11804
|
-
path: "/admin/set-up/assign-secondary-teacher",
|
|
11805
|
-
title: "Assign secondary teacher",
|
|
11806
|
-
component: AssignSecondaryTeacherList
|
|
11807
|
-
}, {
|
|
11808
|
-
path: "/admin/set-up/welcome-email-re-send",
|
|
11809
|
-
title: "Welcome Email Re-send",
|
|
11810
|
-
component: WelcomeEmailResend
|
|
11811
|
-
}, {
|
|
11812
|
-
path: "/admin/set-up/question-scaffolding",
|
|
11813
|
-
title: "Question Scaffolding",
|
|
11814
|
-
component: QuestionScaffolding
|
|
11815
|
-
}, {
|
|
11816
|
-
path: "/admin/set-up/training",
|
|
11817
|
-
title: "Training",
|
|
11818
|
-
component: Training
|
|
11819
|
-
}, {
|
|
11820
|
-
path: "/admin/set-up/destination",
|
|
11821
|
-
title: "Destinations",
|
|
11822
|
-
component: Destinations
|
|
11823
|
-
}];
|
|
11824
|
-
var title$1 = "set_up";
|
|
11775
|
+
var SwitchCounselorModal = function SwitchCounselorModal(_ref, ref) {
|
|
11776
|
+
var header = _ref.header,
|
|
11777
|
+
removeData = _ref.removeData,
|
|
11778
|
+
resetData = _ref.resetData,
|
|
11779
|
+
userChoiced = _ref.userChoiced,
|
|
11780
|
+
options = _ref.options,
|
|
11781
|
+
counselorChangeId = _ref.counselorChangeId,
|
|
11782
|
+
setCounselorChangeId = _ref.setCounselorChangeId;
|
|
11783
|
+
var valueDefault = options === null || options === void 0 ? void 0 : options.find(function (item) {
|
|
11784
|
+
return item.value == counselorChangeId;
|
|
11785
|
+
});
|
|
11825
11786
|
|
|
11826
|
-
var SetupContainer = function SetupContainer() {
|
|
11827
11787
|
var _useTranslation = marioCore.useTranslation(),
|
|
11828
11788
|
t = _useTranslation.t;
|
|
11829
11789
|
|
|
11830
|
-
return React__default.createElement(marioCore.
|
|
11831
|
-
|
|
11832
|
-
|
|
11833
|
-
|
|
11790
|
+
return React__default.createElement(marioCore.CommonModal, {
|
|
11791
|
+
header: header,
|
|
11792
|
+
ref: ref,
|
|
11793
|
+
confirmText: t("change_save"),
|
|
11794
|
+
onConfirm: function onConfirm() {
|
|
11795
|
+
return removeData(counselorChangeId, userChoiced.id);
|
|
11796
|
+
},
|
|
11797
|
+
onCancel: function onCancel() {
|
|
11798
|
+
resetData();
|
|
11799
|
+
}
|
|
11800
|
+
}, React__default.createElement(reactstrap.Row, null, React__default.createElement(reactstrap.Col, {
|
|
11801
|
+
md: 12,
|
|
11802
|
+
className: "mb-2"
|
|
11803
|
+
}, React__default.createElement("p", {
|
|
11804
|
+
className: "font-weight-bold"
|
|
11805
|
+
}, t("student_name")), React__default.createElement("p", null, userChoiced.studentName, " "), React__default.createElement("p", {
|
|
11806
|
+
className: "font-weight-bold"
|
|
11807
|
+
}, t("student_email")), React__default.createElement("p", null, userChoiced.emailStudent), React__default.createElement("p", {
|
|
11808
|
+
className: "font-weight-bold"
|
|
11809
|
+
}, t("current_counselor_name")), React__default.createElement("p", null, userChoiced.counselorName), React__default.createElement("p", {
|
|
11810
|
+
className: "font-weight-bold"
|
|
11811
|
+
}, t("current_counselor_email")), React__default.createElement("p", null, userChoiced.emailCounselor), !!userChoiced && React__default.createElement(marioCore.CustomSelector, {
|
|
11812
|
+
options: options,
|
|
11813
|
+
value: valueDefault,
|
|
11814
|
+
placeholder: t("select_counselor_change"),
|
|
11815
|
+
onChange: function onChange(e) {
|
|
11816
|
+
return setCounselorChangeId(e.value);
|
|
11817
|
+
}
|
|
11818
|
+
}))));
|
|
11834
11819
|
};
|
|
11835
11820
|
|
|
11836
|
-
var
|
|
11821
|
+
var SwitchCounselorModal$1 = React.forwardRef(SwitchCounselorModal);
|
|
11837
11822
|
|
|
11838
|
-
|
|
11839
|
-
|
|
11840
|
-
|
|
11841
|
-
|
|
11842
|
-
|
|
11843
|
-
|
|
11844
|
-
|
|
11823
|
+
var INITIAL_USER_CHOICE$2 = {
|
|
11824
|
+
id: 0,
|
|
11825
|
+
emailStudent: "",
|
|
11826
|
+
studentName: "",
|
|
11827
|
+
assistantId: "",
|
|
11828
|
+
emailAssistant: "",
|
|
11829
|
+
assistantName: ""
|
|
11830
|
+
};
|
|
11845
11831
|
|
|
11846
|
-
var
|
|
11847
|
-
value: "TeacherAndStudent",
|
|
11848
|
-
label: "Teacher and student"
|
|
11849
|
-
}, {
|
|
11850
|
-
value: "Teacher",
|
|
11851
|
-
label: "Teacher"
|
|
11852
|
-
}, {
|
|
11853
|
-
value: "Student",
|
|
11854
|
-
label: "Student"
|
|
11855
|
-
}];
|
|
11832
|
+
var TITLE$i = "Switch counselor list";
|
|
11856
11833
|
|
|
11857
|
-
var
|
|
11858
|
-
|
|
11859
|
-
|
|
11860
|
-
maxHeight: "300px"
|
|
11861
|
-
};
|
|
11834
|
+
var useSwitchCounselor = function useSwitchCounselor() {
|
|
11835
|
+
var modal = React.useRef();
|
|
11836
|
+
var dispatch = reactRedux.useDispatch();
|
|
11862
11837
|
|
|
11863
|
-
var
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
fromLabel = _props$data.fromLabel,
|
|
11867
|
-
toLabel = _props$data.toLabel,
|
|
11868
|
-
answers = _props$data.answers,
|
|
11869
|
-
type = _props$data.type,
|
|
11870
|
-
isSurvey = _props$data.isSurvey,
|
|
11871
|
-
isDefaultQuestion = _props$data.isDefaultQuestion;
|
|
11838
|
+
var _useState = React.useState([]),
|
|
11839
|
+
counselorList = _useState[0],
|
|
11840
|
+
setCounselorList = _useState[1];
|
|
11872
11841
|
|
|
11873
|
-
var
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
className: "mb-2 pb-2"
|
|
11877
|
-
}, React__default.createElement(reactstrap.Col, {
|
|
11878
|
-
md: 8
|
|
11879
|
-
}, isSurvey == true && React__default.createElement("h6", {
|
|
11880
|
-
className: "text-danger"
|
|
11881
|
-
}, "This question is a survey"), React__default.createElement(reactstrap.Table, {
|
|
11882
|
-
responsive: true,
|
|
11883
|
-
hover: true,
|
|
11884
|
-
bordered: true,
|
|
11885
|
-
striped: true,
|
|
11886
|
-
size: "sm"
|
|
11887
|
-
}, React__default.createElement("thead", null, React__default.createElement("tr", null, isEmotional && React__default.createElement("th", {
|
|
11888
|
-
className: "align-top"
|
|
11889
|
-
}, "Emotion icon"), React__default.createElement("th", {
|
|
11890
|
-
className: "align-top"
|
|
11891
|
-
}, "Answer"), !isSurvey && !isDefaultQuestion && !isEmotional && React__default.createElement(React__default.Fragment, null, React__default.createElement("th", {
|
|
11892
|
-
className: "text-center"
|
|
11893
|
-
}, "Mark"), React__default.createElement("th", {
|
|
11894
|
-
className: "text-center"
|
|
11895
|
-
}, "Is correct answer")))), React__default.createElement("tbody", null, answers.map(function (answer, index) {
|
|
11896
|
-
return React__default.createElement("tr", {
|
|
11897
|
-
key: answer.id
|
|
11898
|
-
}, isEmotional && React__default.createElement("td", {
|
|
11899
|
-
className: "align-middle"
|
|
11900
|
-
}, marioCore.EMOTIONS[index]), React__default.createElement("td", {
|
|
11901
|
-
className: "align-middle"
|
|
11902
|
-
}, React__default.createElement("div", {
|
|
11903
|
-
dangerouslySetInnerHTML: {
|
|
11904
|
-
__html: answer.text
|
|
11905
|
-
}
|
|
11906
|
-
})), !isSurvey && !isDefaultQuestion && !isEmotional && React__default.createElement(React__default.Fragment, null, React__default.createElement("td", {
|
|
11907
|
-
className: "text-center align-middle"
|
|
11908
|
-
}, answer.mark), React__default.createElement("td", {
|
|
11909
|
-
className: "text-center align-middle"
|
|
11910
|
-
}, answer.isCorrectAnswer ? React__default.createElement(fa.FaCheck, {
|
|
11911
|
-
className: "text-success"
|
|
11912
|
-
}) : React__default.createElement(fa.FaTimes, {
|
|
11913
|
-
className: "text-danger"
|
|
11914
|
-
}))));
|
|
11915
|
-
}))))));
|
|
11842
|
+
var _useState2 = React.useState([]),
|
|
11843
|
+
userList = _useState2[0],
|
|
11844
|
+
setUserList = _useState2[1];
|
|
11916
11845
|
|
|
11917
|
-
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
}, fromLabel), " ", "to ", React__default.createElement("span", {
|
|
11921
|
-
className: "font-weight-bold"
|
|
11922
|
-
}, toLabel));
|
|
11923
|
-
}
|
|
11846
|
+
var _useState3 = React.useState(0),
|
|
11847
|
+
totalItems = _useState3[0],
|
|
11848
|
+
setTotalItems = _useState3[1];
|
|
11924
11849
|
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
}, React__default.createElement(reactstrap.Alert, {
|
|
11929
|
-
color: "primary"
|
|
11930
|
-
}, "Number of stars: ", numberOfStars)));
|
|
11931
|
-
}
|
|
11850
|
+
var _useFilters = marioCore.useFilters(),
|
|
11851
|
+
filters = _useFilters.filters,
|
|
11852
|
+
changeFilters = _useFilters.changeFilters;
|
|
11932
11853
|
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
color: "secondary"
|
|
11937
|
-
}, "No preview")));
|
|
11938
|
-
};
|
|
11854
|
+
var _useState4 = React.useState(INITIAL_USER_CHOICE$2),
|
|
11855
|
+
userChoiced = _useState4[0],
|
|
11856
|
+
setUserChoiced = _useState4[1];
|
|
11939
11857
|
|
|
11940
|
-
|
|
11941
|
-
|
|
11858
|
+
var _useState5 = React.useState(""),
|
|
11859
|
+
counselorChangeId = _useState5[0],
|
|
11860
|
+
setCounselorChangeId = _useState5[1];
|
|
11861
|
+
|
|
11862
|
+
var getStudentCounselorData = React.useCallback(function () {
|
|
11863
|
+
try {
|
|
11864
|
+
var _temp3 = function _temp3() {
|
|
11865
|
+
dispatch(marioCore.setLoading(false));
|
|
11866
|
+
};
|
|
11867
|
+
|
|
11868
|
+
dispatch(marioCore.setLoading(true));
|
|
11869
|
+
|
|
11870
|
+
var _temp4 = _catch(function () {
|
|
11871
|
+
return Promise.resolve(getStudentCounselor(_extends({}, filters, {
|
|
11872
|
+
hasCounselor: true
|
|
11873
|
+
}))).then(function (res) {
|
|
11874
|
+
var _res$data = res.data,
|
|
11875
|
+
items = _res$data.items,
|
|
11876
|
+
totalItems = _res$data.totalItems;
|
|
11877
|
+
setUserList(items);
|
|
11878
|
+
setTotalItems(totalItems);
|
|
11879
|
+
});
|
|
11880
|
+
}, function (err) {
|
|
11881
|
+
var _err$response, _err$response$data;
|
|
11882
|
+
|
|
11883
|
+
dispatch(marioCore.setAlert({
|
|
11884
|
+
type: "danger",
|
|
11885
|
+
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
|
|
11886
|
+
}));
|
|
11887
|
+
});
|
|
11888
|
+
|
|
11889
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
11890
|
+
} catch (e) {
|
|
11891
|
+
return Promise.reject(e);
|
|
11892
|
+
}
|
|
11893
|
+
}, [dispatch, filters]);
|
|
11894
|
+
|
|
11895
|
+
var getCounselors = function getCounselors(studentId) {
|
|
11896
|
+
try {
|
|
11897
|
+
var _temp6 = _catch(function () {
|
|
11898
|
+
return Promise.resolve(getCounselorByStudentId(studentId)).then(function (res) {
|
|
11899
|
+
res && setCounselorList(res.data);
|
|
11900
|
+
});
|
|
11901
|
+
}, function (err) {
|
|
11902
|
+
var _err$response2, _err$response2$data;
|
|
11903
|
+
|
|
11904
|
+
dispatch(marioCore.setAlert({
|
|
11905
|
+
type: "danger",
|
|
11906
|
+
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
|
|
11907
|
+
}));
|
|
11908
|
+
});
|
|
11909
|
+
|
|
11910
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
11911
|
+
} catch (e) {
|
|
11912
|
+
return Promise.reject(e);
|
|
11913
|
+
}
|
|
11914
|
+
};
|
|
11915
|
+
|
|
11916
|
+
var options = React.useMemo(function () {
|
|
11917
|
+
return counselorList.map(function (record) {
|
|
11918
|
+
return {
|
|
11919
|
+
label: record.name + " - " + record.email,
|
|
11920
|
+
value: record.id
|
|
11921
|
+
};
|
|
11922
|
+
});
|
|
11923
|
+
}, [counselorList]);
|
|
11924
|
+
|
|
11925
|
+
var openModal = function openModal() {
|
|
11926
|
+
modal && modal.current && modal.current.toggle();
|
|
11927
|
+
};
|
|
11928
|
+
|
|
11929
|
+
var resetData = function resetData() {
|
|
11930
|
+
setCounselorChangeId("");
|
|
11931
|
+
setUserChoiced(INITIAL_USER_CHOICE$2);
|
|
11932
|
+
};
|
|
11933
|
+
|
|
11934
|
+
var choiceUser = function choiceUser(userChoiced) {
|
|
11935
|
+
var _userChoiced$counselo;
|
|
11936
|
+
|
|
11937
|
+
!!userChoiced && setUserChoiced(userChoiced);
|
|
11938
|
+
setCounselorChangeId(((_userChoiced$counselo = userChoiced.counselorId) === null || _userChoiced$counselo === void 0 ? void 0 : _userChoiced$counselo.toString()) || "");
|
|
11939
|
+
openModal();
|
|
11940
|
+
};
|
|
11941
|
+
|
|
11942
|
+
var removeData = function removeData(counselorId, studentId) {
|
|
11943
|
+
try {
|
|
11944
|
+
dispatch(marioCore.setModal({
|
|
11945
|
+
isOpen: true,
|
|
11946
|
+
type: "warning",
|
|
11947
|
+
message: "Do you want to change counselor?",
|
|
11948
|
+
onConfirm: function () {
|
|
11949
|
+
try {
|
|
11950
|
+
var _temp9 = function _temp9() {
|
|
11951
|
+
dispatch(marioCore.setLoading(false));
|
|
11952
|
+
};
|
|
11953
|
+
|
|
11954
|
+
dispatch(marioCore.setLoading(true));
|
|
11955
|
+
|
|
11956
|
+
var _temp10 = _catch(function () {
|
|
11957
|
+
return Promise.resolve(changeCounselorOfStudent(studentId, counselorId)).then(function () {
|
|
11958
|
+
dispatch(marioCore.setAlert({
|
|
11959
|
+
type: "success",
|
|
11960
|
+
message: "Change counselor successfully"
|
|
11961
|
+
}));
|
|
11962
|
+
openModal();
|
|
11963
|
+
resetData();
|
|
11964
|
+
changeFilters({
|
|
11965
|
+
currentPage: 1
|
|
11966
|
+
});
|
|
11967
|
+
});
|
|
11968
|
+
}, function (err) {
|
|
11969
|
+
var _err$response3, _err$response3$data;
|
|
11970
|
+
|
|
11971
|
+
dispatch(marioCore.setAlert({
|
|
11972
|
+
type: "danger",
|
|
11973
|
+
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
|
|
11974
|
+
}));
|
|
11975
|
+
});
|
|
11976
|
+
|
|
11977
|
+
return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(_temp9) : _temp9(_temp10));
|
|
11978
|
+
} catch (e) {
|
|
11979
|
+
return Promise.reject(e);
|
|
11980
|
+
}
|
|
11981
|
+
}
|
|
11982
|
+
}));
|
|
11983
|
+
return Promise.resolve();
|
|
11984
|
+
} catch (e) {
|
|
11985
|
+
return Promise.reject(e);
|
|
11986
|
+
}
|
|
11987
|
+
};
|
|
11988
|
+
|
|
11989
|
+
var onDeleteCounselor = function onDeleteCounselor(studentId) {
|
|
11990
|
+
try {
|
|
11991
|
+
dispatch(marioCore.setLoading(true));
|
|
11992
|
+
dispatch(marioCore.setModal({
|
|
11993
|
+
isOpen: true,
|
|
11994
|
+
type: "warning",
|
|
11995
|
+
message: "Do you want to remove this Counselor?",
|
|
11996
|
+
onConfirm: function () {
|
|
11997
|
+
try {
|
|
11998
|
+
var _temp12 = _catch(function () {
|
|
11999
|
+
return Promise.resolve(removeCounselorForStudent(studentId)).then(function () {
|
|
12000
|
+
getStudentCounselorData();
|
|
12001
|
+
dispatch(marioCore.setAlert({
|
|
12002
|
+
type: "success",
|
|
12003
|
+
message: "Remove counselor successfully"
|
|
12004
|
+
}));
|
|
12005
|
+
});
|
|
12006
|
+
}, function (err) {
|
|
12007
|
+
var _err$response4, _err$response4$data;
|
|
12008
|
+
|
|
12009
|
+
dispatch(marioCore.setAlert({
|
|
12010
|
+
type: "danger",
|
|
12011
|
+
message: ((_err$response4 = err.response) === null || _err$response4 === void 0 ? void 0 : (_err$response4$data = _err$response4.data) === null || _err$response4$data === void 0 ? void 0 : _err$response4$data.title) || err.message
|
|
12012
|
+
}));
|
|
12013
|
+
});
|
|
12014
|
+
|
|
12015
|
+
return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(function () {}) : void 0);
|
|
12016
|
+
} catch (e) {
|
|
12017
|
+
return Promise.reject(e);
|
|
12018
|
+
}
|
|
12019
|
+
}
|
|
12020
|
+
}));
|
|
12021
|
+
dispatch(marioCore.setLoading(false));
|
|
12022
|
+
return Promise.resolve();
|
|
12023
|
+
} catch (e) {
|
|
12024
|
+
return Promise.reject(e);
|
|
12025
|
+
}
|
|
12026
|
+
};
|
|
12027
|
+
|
|
12028
|
+
React.useEffect(function () {
|
|
12029
|
+
document.title = TITLE$i;
|
|
12030
|
+
}, []);
|
|
12031
|
+
React.useEffect(function () {
|
|
12032
|
+
userChoiced.id && getCounselors(userChoiced.id);
|
|
12033
|
+
}, [userChoiced.id]);
|
|
12034
|
+
React.useEffect(function () {
|
|
12035
|
+
getStudentCounselorData();
|
|
12036
|
+
}, [filters]);
|
|
12037
|
+
return {
|
|
12038
|
+
userList: userList,
|
|
12039
|
+
totalItems: totalItems,
|
|
12040
|
+
filters: filters,
|
|
12041
|
+
changeFilters: changeFilters,
|
|
12042
|
+
modal: modal,
|
|
12043
|
+
userChoiced: userChoiced,
|
|
12044
|
+
options: options,
|
|
12045
|
+
setCounselorChangeId: setCounselorChangeId,
|
|
12046
|
+
counselorChangeId: counselorChangeId,
|
|
12047
|
+
removeData: removeData,
|
|
12048
|
+
resetData: resetData,
|
|
12049
|
+
choiceUser: choiceUser,
|
|
12050
|
+
onDeleteCounselor: onDeleteCounselor
|
|
12051
|
+
};
|
|
12052
|
+
};
|
|
12053
|
+
|
|
12054
|
+
var header$9 = "list_students";
|
|
12055
|
+
|
|
12056
|
+
var SwitchCounselorList = function SwitchCounselorList() {
|
|
12057
|
+
var _useSwitchCounselor = useSwitchCounselor(),
|
|
12058
|
+
userList = _useSwitchCounselor.userList,
|
|
12059
|
+
totalItems = _useSwitchCounselor.totalItems,
|
|
12060
|
+
filters = _useSwitchCounselor.filters,
|
|
12061
|
+
changeFilters = _useSwitchCounselor.changeFilters,
|
|
12062
|
+
modal = _useSwitchCounselor.modal,
|
|
12063
|
+
userChoiced = _useSwitchCounselor.userChoiced,
|
|
12064
|
+
options = _useSwitchCounselor.options,
|
|
12065
|
+
setCounselorChangeId = _useSwitchCounselor.setCounselorChangeId,
|
|
12066
|
+
counselorChangeId = _useSwitchCounselor.counselorChangeId,
|
|
12067
|
+
removeData = _useSwitchCounselor.removeData,
|
|
12068
|
+
resetData = _useSwitchCounselor.resetData,
|
|
12069
|
+
choiceUser = _useSwitchCounselor.choiceUser,
|
|
12070
|
+
onDeleteCounselor = _useSwitchCounselor.onDeleteCounselor;
|
|
12071
|
+
|
|
12072
|
+
var _useTranslation = marioCore.useTranslation(),
|
|
12073
|
+
t = _useTranslation.t;
|
|
12074
|
+
|
|
12075
|
+
return React__default.createElement("div", {
|
|
12076
|
+
className: "fadeIn animated"
|
|
12077
|
+
}, React__default.createElement("h5", {
|
|
12078
|
+
className: "mt-4 mb-2"
|
|
12079
|
+
}, t(header$9)), React__default.createElement(reactstrap.Row, {
|
|
12080
|
+
className: "my-2"
|
|
12081
|
+
}, React__default.createElement(reactstrap.Col, {
|
|
12082
|
+
md: 8
|
|
12083
|
+
}, React__default.createElement(marioCore.SearchBox, {
|
|
12084
|
+
initValue: filters.searchString,
|
|
12085
|
+
onSearch: function onSearch(searchString) {
|
|
12086
|
+
return changeFilters({
|
|
12087
|
+
searchString: searchString
|
|
12088
|
+
});
|
|
12089
|
+
},
|
|
12090
|
+
placeholder: t("type_something_to_search_reflection_result")
|
|
12091
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
12092
|
+
md: 4,
|
|
12093
|
+
className: "d-flex justify-content-end align-items-center"
|
|
12094
|
+
}, t("total_of_users"), ": ", totalItems)), React__default.createElement(reactstrap.Row, {
|
|
12095
|
+
className: "mb-2"
|
|
12096
|
+
}, React__default.createElement(reactstrap.Col, {
|
|
12097
|
+
md: 12
|
|
12098
|
+
}, userList && userList.length > 0 ? React__default.createElement("div", null, React__default.createElement(reactstrap.Table, {
|
|
12099
|
+
bordered: true,
|
|
12100
|
+
hover: true,
|
|
12101
|
+
striped: true,
|
|
12102
|
+
responsive: true,
|
|
12103
|
+
size: "sm"
|
|
12104
|
+
}, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", {
|
|
12105
|
+
className: "align-top"
|
|
12106
|
+
}, t("student_name")), React__default.createElement("th", {
|
|
12107
|
+
className: "align-top"
|
|
12108
|
+
}, t("student_email")), React__default.createElement("th", {
|
|
12109
|
+
className: "align-top"
|
|
12110
|
+
}, t("current_counselor_name")), React__default.createElement("th", {
|
|
12111
|
+
className: "align-top"
|
|
12112
|
+
}, t("current_counselor_email")), React__default.createElement("th", {
|
|
12113
|
+
className: "align-top"
|
|
12114
|
+
}, t("remove_counselor")))), React__default.createElement("tbody", null, !!userList && userList.length > 0 && userList.map(function (record) {
|
|
12115
|
+
return React__default.createElement("tr", {
|
|
12116
|
+
key: record.id
|
|
12117
|
+
}, React__default.createElement("td", {
|
|
12118
|
+
className: "align-middle"
|
|
12119
|
+
}, React__default.createElement(marioCore.LinkEditButton, {
|
|
12120
|
+
label: "" + record.studentName,
|
|
12121
|
+
onClick: function onClick() {
|
|
12122
|
+
return choiceUser(record);
|
|
12123
|
+
}
|
|
12124
|
+
})), React__default.createElement("td", {
|
|
12125
|
+
className: "align-middle"
|
|
12126
|
+
}, record.emailStudent), React__default.createElement("td", {
|
|
12127
|
+
className: "align-middle"
|
|
12128
|
+
}, record.counselorName), React__default.createElement("td", {
|
|
12129
|
+
className: "align-middle"
|
|
12130
|
+
}, record.emailCounselor), React__default.createElement("td", {
|
|
12131
|
+
className: "text-center align-middle"
|
|
12132
|
+
}, React__default.createElement(marioCore.DeleteButtonIcon, {
|
|
12133
|
+
onClick: function onClick() {
|
|
12134
|
+
return onDeleteCounselor(record.id);
|
|
12135
|
+
}
|
|
12136
|
+
})));
|
|
12137
|
+
})))) : React__default.createElement(marioCore.EmptyDataAlert, {
|
|
12138
|
+
label: "user"
|
|
12139
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
12140
|
+
md: 12
|
|
12141
|
+
}, React__default.createElement(marioCore.CustomPagination, {
|
|
12142
|
+
filters: filters,
|
|
12143
|
+
totalRecordCount: totalItems,
|
|
12144
|
+
changePageSize: function changePageSize(pageSize) {
|
|
12145
|
+
return changeFilters({
|
|
12146
|
+
pageSize: pageSize
|
|
12147
|
+
});
|
|
12148
|
+
},
|
|
12149
|
+
changePage: function changePage(currentPage) {
|
|
12150
|
+
return changeFilters({
|
|
12151
|
+
currentPage: currentPage
|
|
12152
|
+
});
|
|
12153
|
+
}
|
|
12154
|
+
}))), React__default.createElement(SwitchCounselorModal$1, {
|
|
12155
|
+
ref: modal,
|
|
12156
|
+
header: t("switch_counselor"),
|
|
12157
|
+
userChoiced: userChoiced,
|
|
12158
|
+
removeData: removeData,
|
|
12159
|
+
options: options,
|
|
12160
|
+
counselorChangeId: counselorChangeId,
|
|
12161
|
+
setCounselorChangeId: setCounselorChangeId,
|
|
12162
|
+
resetData: resetData
|
|
12163
|
+
}));
|
|
12164
|
+
};
|
|
12165
|
+
|
|
12166
|
+
var SwitchSecondaryTeacherModal = function SwitchSecondaryTeacherModal(_ref, ref) {
|
|
12167
|
+
var header = _ref.header,
|
|
12168
|
+
removeData = _ref.removeData,
|
|
12169
|
+
resetData = _ref.resetData,
|
|
12170
|
+
userChoiced = _ref.userChoiced,
|
|
12171
|
+
options = _ref.options,
|
|
12172
|
+
secondaryTeacherChangeId = _ref.secondaryTeacherChangeId,
|
|
12173
|
+
setSecondaryTeacherChangeId = _ref.setSecondaryTeacherChangeId;
|
|
12174
|
+
var valueDefault = options === null || options === void 0 ? void 0 : options.find(function (item) {
|
|
12175
|
+
return item.value == secondaryTeacherChangeId;
|
|
12176
|
+
});
|
|
12177
|
+
|
|
12178
|
+
var _useTranslation = marioCore.useTranslation(),
|
|
12179
|
+
t = _useTranslation.t;
|
|
12180
|
+
|
|
12181
|
+
return React__default.createElement(marioCore.CommonModal, {
|
|
12182
|
+
header: header,
|
|
12183
|
+
ref: ref,
|
|
12184
|
+
confirmText: t("change_save"),
|
|
12185
|
+
onConfirm: function onConfirm() {
|
|
12186
|
+
return removeData(secondaryTeacherChangeId, userChoiced.id);
|
|
12187
|
+
},
|
|
12188
|
+
onCancel: function onCancel() {
|
|
12189
|
+
resetData();
|
|
12190
|
+
}
|
|
12191
|
+
}, React__default.createElement(reactstrap.Row, null, React__default.createElement(reactstrap.Col, {
|
|
12192
|
+
md: 12,
|
|
12193
|
+
className: "mb-2"
|
|
12194
|
+
}, React__default.createElement("p", {
|
|
12195
|
+
className: "font-weight-bold"
|
|
12196
|
+
}, t("student_name")), React__default.createElement("p", null, userChoiced.studentName, " "), React__default.createElement("p", {
|
|
12197
|
+
className: "font-weight-bold"
|
|
12198
|
+
}, t("student_email")), React__default.createElement("p", null, userChoiced.emailStudent), React__default.createElement("p", {
|
|
12199
|
+
className: "font-weight-bold"
|
|
12200
|
+
}, t("current_secondary_teacher_name")), React__default.createElement("p", null, userChoiced.secondaryTeacherName), React__default.createElement("p", {
|
|
12201
|
+
className: "font-weight-bold"
|
|
12202
|
+
}, t("current_secondary_teacher_email")), React__default.createElement("p", null, userChoiced.emailSecondaryTeacher), !!userChoiced && React__default.createElement(marioCore.CustomSelector, {
|
|
12203
|
+
options: options,
|
|
12204
|
+
value: valueDefault,
|
|
12205
|
+
placeholder: t("select_secondary_teacher_change"),
|
|
12206
|
+
onChange: function onChange(e) {
|
|
12207
|
+
return setSecondaryTeacherChangeId(e.value);
|
|
12208
|
+
}
|
|
12209
|
+
}))));
|
|
12210
|
+
};
|
|
12211
|
+
|
|
12212
|
+
var SwitchSecondaryTeacherModal$1 = React.forwardRef(SwitchSecondaryTeacherModal);
|
|
12213
|
+
|
|
12214
|
+
var INITIAL_USER_CHOICE$3 = {
|
|
12215
|
+
id: 0,
|
|
12216
|
+
emailStudent: "",
|
|
12217
|
+
studentName: "",
|
|
12218
|
+
assistantId: "",
|
|
12219
|
+
emailAssistant: "",
|
|
12220
|
+
assistantName: ""
|
|
12221
|
+
};
|
|
12222
|
+
|
|
12223
|
+
var TITLE$j = "Switch counselor list";
|
|
12224
|
+
|
|
12225
|
+
var useSwitchSecondaryTeacher = function useSwitchSecondaryTeacher() {
|
|
12226
|
+
var modal = React.useRef();
|
|
12227
|
+
var dispatch = reactRedux.useDispatch();
|
|
12228
|
+
|
|
12229
|
+
var _useState = React.useState([]),
|
|
12230
|
+
secondaryTeacherList = _useState[0],
|
|
12231
|
+
setSecondaryTeacherList = _useState[1];
|
|
12232
|
+
|
|
12233
|
+
var _useState2 = React.useState([]),
|
|
12234
|
+
userList = _useState2[0],
|
|
12235
|
+
setUserList = _useState2[1];
|
|
12236
|
+
|
|
12237
|
+
var _useState3 = React.useState(0),
|
|
12238
|
+
totalItems = _useState3[0],
|
|
12239
|
+
setTotalItems = _useState3[1];
|
|
12240
|
+
|
|
12241
|
+
var _useFilters = marioCore.useFilters(),
|
|
12242
|
+
filters = _useFilters.filters,
|
|
12243
|
+
changeFilters = _useFilters.changeFilters;
|
|
12244
|
+
|
|
12245
|
+
var _useState4 = React.useState(INITIAL_USER_CHOICE$3),
|
|
12246
|
+
userChoiced = _useState4[0],
|
|
12247
|
+
setUserChoiced = _useState4[1];
|
|
12248
|
+
|
|
12249
|
+
var _useState5 = React.useState(""),
|
|
12250
|
+
secondaryTeacherChangeId = _useState5[0],
|
|
12251
|
+
setSecondaryTeacherChangeId = _useState5[1];
|
|
12252
|
+
|
|
12253
|
+
var getStudentSecondaryTeacherData = React.useCallback(function () {
|
|
12254
|
+
try {
|
|
12255
|
+
var _temp3 = function _temp3() {
|
|
12256
|
+
dispatch(marioCore.setLoading(false));
|
|
12257
|
+
};
|
|
12258
|
+
|
|
12259
|
+
dispatch(marioCore.setLoading(true));
|
|
12260
|
+
|
|
12261
|
+
var _temp4 = _catch(function () {
|
|
12262
|
+
return Promise.resolve(getStudentSecondaryTeacher(_extends({}, filters, {
|
|
12263
|
+
hasSecondaryTeacher: true
|
|
12264
|
+
}))).then(function (res) {
|
|
12265
|
+
var _res$data = res.data,
|
|
12266
|
+
items = _res$data.items,
|
|
12267
|
+
totalItems = _res$data.totalItems;
|
|
12268
|
+
setUserList(items);
|
|
12269
|
+
setTotalItems(totalItems);
|
|
12270
|
+
});
|
|
12271
|
+
}, function (err) {
|
|
12272
|
+
var _err$response, _err$response$data;
|
|
12273
|
+
|
|
12274
|
+
dispatch(marioCore.setAlert({
|
|
12275
|
+
type: "danger",
|
|
12276
|
+
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
|
|
12277
|
+
}));
|
|
12278
|
+
});
|
|
12279
|
+
|
|
12280
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
12281
|
+
} catch (e) {
|
|
12282
|
+
return Promise.reject(e);
|
|
12283
|
+
}
|
|
12284
|
+
}, [dispatch, filters]);
|
|
12285
|
+
|
|
12286
|
+
var getSecondaryTeachers = function getSecondaryTeachers(studentId) {
|
|
12287
|
+
try {
|
|
12288
|
+
var _temp6 = _catch(function () {
|
|
12289
|
+
return Promise.resolve(getSecondaryTeacherByStudentId(studentId)).then(function (res) {
|
|
12290
|
+
res && setSecondaryTeacherList(res.data);
|
|
12291
|
+
});
|
|
12292
|
+
}, function (err) {
|
|
12293
|
+
var _err$response2, _err$response2$data;
|
|
12294
|
+
|
|
12295
|
+
dispatch(marioCore.setAlert({
|
|
12296
|
+
type: "danger",
|
|
12297
|
+
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
|
|
12298
|
+
}));
|
|
12299
|
+
});
|
|
12300
|
+
|
|
12301
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
12302
|
+
} catch (e) {
|
|
12303
|
+
return Promise.reject(e);
|
|
12304
|
+
}
|
|
12305
|
+
};
|
|
12306
|
+
|
|
12307
|
+
var options = React.useMemo(function () {
|
|
12308
|
+
return secondaryTeacherList.map(function (record) {
|
|
12309
|
+
return {
|
|
12310
|
+
label: record.name + " - " + record.email,
|
|
12311
|
+
value: record.id
|
|
12312
|
+
};
|
|
12313
|
+
});
|
|
12314
|
+
}, [secondaryTeacherList]);
|
|
12315
|
+
|
|
12316
|
+
var openModal = function openModal() {
|
|
12317
|
+
modal && modal.current && modal.current.toggle();
|
|
12318
|
+
};
|
|
12319
|
+
|
|
12320
|
+
var resetData = function resetData() {
|
|
12321
|
+
setSecondaryTeacherChangeId("");
|
|
12322
|
+
setUserChoiced(INITIAL_USER_CHOICE$3);
|
|
12323
|
+
};
|
|
12324
|
+
|
|
12325
|
+
var choiceUser = function choiceUser(userChoiced) {
|
|
12326
|
+
var _userChoiced$secondar;
|
|
12327
|
+
|
|
12328
|
+
!!userChoiced && setUserChoiced(userChoiced);
|
|
12329
|
+
setSecondaryTeacherChangeId(((_userChoiced$secondar = userChoiced.secondaryTeacherId) === null || _userChoiced$secondar === void 0 ? void 0 : _userChoiced$secondar.toString()) || "");
|
|
12330
|
+
openModal();
|
|
12331
|
+
};
|
|
12332
|
+
|
|
12333
|
+
var removeData = function removeData(secondaryTeacherId, studentId) {
|
|
12334
|
+
try {
|
|
12335
|
+
dispatch(marioCore.setModal({
|
|
12336
|
+
isOpen: true,
|
|
12337
|
+
type: "warning",
|
|
12338
|
+
message: "Do you want to change secondary teacher?",
|
|
12339
|
+
onConfirm: function () {
|
|
12340
|
+
try {
|
|
12341
|
+
var _temp9 = function _temp9() {
|
|
12342
|
+
dispatch(marioCore.setLoading(false));
|
|
12343
|
+
};
|
|
12344
|
+
|
|
12345
|
+
dispatch(marioCore.setLoading(true));
|
|
12346
|
+
|
|
12347
|
+
var _temp10 = _catch(function () {
|
|
12348
|
+
return Promise.resolve(changeSecondaryTeacherOfStudent(studentId, secondaryTeacherId)).then(function () {
|
|
12349
|
+
dispatch(marioCore.setAlert({
|
|
12350
|
+
type: "success",
|
|
12351
|
+
message: "Change secondary teacher successfully"
|
|
12352
|
+
}));
|
|
12353
|
+
openModal();
|
|
12354
|
+
resetData();
|
|
12355
|
+
changeFilters({
|
|
12356
|
+
currentPage: 1
|
|
12357
|
+
});
|
|
12358
|
+
});
|
|
12359
|
+
}, function (err) {
|
|
12360
|
+
var _err$response3, _err$response3$data;
|
|
12361
|
+
|
|
12362
|
+
dispatch(marioCore.setAlert({
|
|
12363
|
+
type: "danger",
|
|
12364
|
+
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
|
|
12365
|
+
}));
|
|
12366
|
+
});
|
|
12367
|
+
|
|
12368
|
+
return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(_temp9) : _temp9(_temp10));
|
|
12369
|
+
} catch (e) {
|
|
12370
|
+
return Promise.reject(e);
|
|
12371
|
+
}
|
|
12372
|
+
}
|
|
12373
|
+
}));
|
|
12374
|
+
return Promise.resolve();
|
|
12375
|
+
} catch (e) {
|
|
12376
|
+
return Promise.reject(e);
|
|
12377
|
+
}
|
|
12378
|
+
};
|
|
12379
|
+
|
|
12380
|
+
var onDeleteSecondaryTeacher = function onDeleteSecondaryTeacher(studentId) {
|
|
12381
|
+
try {
|
|
12382
|
+
dispatch(marioCore.setLoading(true));
|
|
12383
|
+
dispatch(marioCore.setModal({
|
|
12384
|
+
isOpen: true,
|
|
12385
|
+
type: "warning",
|
|
12386
|
+
message: "Do you want to remove this Secondary teacher?",
|
|
12387
|
+
onConfirm: function () {
|
|
12388
|
+
try {
|
|
12389
|
+
var _temp12 = _catch(function () {
|
|
12390
|
+
return Promise.resolve(removeSecondaryTeacherForStudent(studentId)).then(function () {
|
|
12391
|
+
getStudentSecondaryTeacherData();
|
|
12392
|
+
dispatch(marioCore.setAlert({
|
|
12393
|
+
type: "success",
|
|
12394
|
+
message: "Remove secondary teacher successfully"
|
|
12395
|
+
}));
|
|
12396
|
+
});
|
|
12397
|
+
}, function (err) {
|
|
12398
|
+
var _err$response4, _err$response4$data;
|
|
12399
|
+
|
|
12400
|
+
dispatch(marioCore.setAlert({
|
|
12401
|
+
type: "danger",
|
|
12402
|
+
message: ((_err$response4 = err.response) === null || _err$response4 === void 0 ? void 0 : (_err$response4$data = _err$response4.data) === null || _err$response4$data === void 0 ? void 0 : _err$response4$data.title) || err.message
|
|
12403
|
+
}));
|
|
12404
|
+
});
|
|
12405
|
+
|
|
12406
|
+
return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(function () {}) : void 0);
|
|
12407
|
+
} catch (e) {
|
|
12408
|
+
return Promise.reject(e);
|
|
12409
|
+
}
|
|
12410
|
+
}
|
|
12411
|
+
}));
|
|
12412
|
+
dispatch(marioCore.setLoading(false));
|
|
12413
|
+
return Promise.resolve();
|
|
12414
|
+
} catch (e) {
|
|
12415
|
+
return Promise.reject(e);
|
|
12416
|
+
}
|
|
12417
|
+
};
|
|
12418
|
+
|
|
12419
|
+
React.useEffect(function () {
|
|
12420
|
+
document.title = TITLE$j;
|
|
12421
|
+
}, []);
|
|
12422
|
+
React.useEffect(function () {
|
|
12423
|
+
userChoiced.id && getSecondaryTeachers(userChoiced.id);
|
|
12424
|
+
}, [userChoiced.id]);
|
|
12425
|
+
React.useEffect(function () {
|
|
12426
|
+
getStudentSecondaryTeacherData();
|
|
12427
|
+
}, [filters]);
|
|
12428
|
+
return {
|
|
12429
|
+
userList: userList,
|
|
12430
|
+
totalItems: totalItems,
|
|
12431
|
+
filters: filters,
|
|
12432
|
+
changeFilters: changeFilters,
|
|
12433
|
+
modal: modal,
|
|
12434
|
+
userChoiced: userChoiced,
|
|
12435
|
+
options: options,
|
|
12436
|
+
setSecondaryTeacherChangeId: setSecondaryTeacherChangeId,
|
|
12437
|
+
secondaryTeacherChangeId: secondaryTeacherChangeId,
|
|
12438
|
+
removeData: removeData,
|
|
12439
|
+
resetData: resetData,
|
|
12440
|
+
choiceUser: choiceUser,
|
|
12441
|
+
onDeleteSecondaryTeacher: onDeleteSecondaryTeacher
|
|
12442
|
+
};
|
|
12443
|
+
};
|
|
12444
|
+
|
|
12445
|
+
var header$a = "list_students";
|
|
12446
|
+
|
|
12447
|
+
var SwitchSecondaryTeacherList = function SwitchSecondaryTeacherList() {
|
|
12448
|
+
var _useSwitchCounselor = useSwitchSecondaryTeacher(),
|
|
12449
|
+
userList = _useSwitchCounselor.userList,
|
|
12450
|
+
totalItems = _useSwitchCounselor.totalItems,
|
|
12451
|
+
filters = _useSwitchCounselor.filters,
|
|
12452
|
+
changeFilters = _useSwitchCounselor.changeFilters,
|
|
12453
|
+
modal = _useSwitchCounselor.modal,
|
|
12454
|
+
userChoiced = _useSwitchCounselor.userChoiced,
|
|
12455
|
+
options = _useSwitchCounselor.options,
|
|
12456
|
+
setSecondaryTeacherChangeId = _useSwitchCounselor.setSecondaryTeacherChangeId,
|
|
12457
|
+
secondaryTeacherChangeId = _useSwitchCounselor.secondaryTeacherChangeId,
|
|
12458
|
+
removeData = _useSwitchCounselor.removeData,
|
|
12459
|
+
resetData = _useSwitchCounselor.resetData,
|
|
12460
|
+
choiceUser = _useSwitchCounselor.choiceUser,
|
|
12461
|
+
onDeleteSecondaryTeacher = _useSwitchCounselor.onDeleteSecondaryTeacher;
|
|
12462
|
+
|
|
12463
|
+
var _useTranslation = marioCore.useTranslation(),
|
|
12464
|
+
t = _useTranslation.t;
|
|
12465
|
+
|
|
12466
|
+
return React__default.createElement("div", {
|
|
12467
|
+
className: "fadeIn animated"
|
|
12468
|
+
}, React__default.createElement("h5", {
|
|
12469
|
+
className: "mt-4 mb-2"
|
|
12470
|
+
}, t(header$a)), React__default.createElement(reactstrap.Row, {
|
|
12471
|
+
className: "my-2"
|
|
12472
|
+
}, React__default.createElement(reactstrap.Col, {
|
|
12473
|
+
md: 8
|
|
12474
|
+
}, React__default.createElement(marioCore.SearchBox, {
|
|
12475
|
+
initValue: filters.searchString,
|
|
12476
|
+
onSearch: function onSearch(searchString) {
|
|
12477
|
+
return changeFilters({
|
|
12478
|
+
searchString: searchString
|
|
12479
|
+
});
|
|
12480
|
+
},
|
|
12481
|
+
placeholder: t("type_something_to_search_reflection_result")
|
|
12482
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
12483
|
+
md: 4,
|
|
12484
|
+
className: "d-flex justify-content-end align-items-center"
|
|
12485
|
+
}, t("total_of_users"), ": ", totalItems)), React__default.createElement(reactstrap.Row, {
|
|
12486
|
+
className: "mb-2"
|
|
12487
|
+
}, React__default.createElement(reactstrap.Col, {
|
|
12488
|
+
md: 12
|
|
12489
|
+
}, userList && userList.length > 0 ? React__default.createElement("div", null, React__default.createElement(reactstrap.Table, {
|
|
12490
|
+
bordered: true,
|
|
12491
|
+
hover: true,
|
|
12492
|
+
striped: true,
|
|
12493
|
+
responsive: true,
|
|
12494
|
+
size: "sm"
|
|
12495
|
+
}, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", {
|
|
12496
|
+
className: "align-top"
|
|
12497
|
+
}, t("student_name")), React__default.createElement("th", {
|
|
12498
|
+
className: "align-top"
|
|
12499
|
+
}, t("student_email")), React__default.createElement("th", {
|
|
12500
|
+
className: "align-top"
|
|
12501
|
+
}, t("current_secondary_teacher_name")), React__default.createElement("th", {
|
|
12502
|
+
className: "align-top"
|
|
12503
|
+
}, t("current_secondary_teacher_email")), React__default.createElement("th", {
|
|
12504
|
+
className: "align-top"
|
|
12505
|
+
}, t("remove_secondary_teacher")))), React__default.createElement("tbody", null, !!userList && userList.length > 0 && userList.map(function (record) {
|
|
12506
|
+
return React__default.createElement("tr", {
|
|
12507
|
+
key: record.id
|
|
12508
|
+
}, React__default.createElement("td", {
|
|
12509
|
+
className: "align-middle"
|
|
12510
|
+
}, React__default.createElement(marioCore.LinkEditButton, {
|
|
12511
|
+
label: "" + record.studentName,
|
|
12512
|
+
onClick: function onClick() {
|
|
12513
|
+
return choiceUser(record);
|
|
12514
|
+
}
|
|
12515
|
+
})), React__default.createElement("td", {
|
|
12516
|
+
className: "align-middle"
|
|
12517
|
+
}, record.emailStudent), React__default.createElement("td", {
|
|
12518
|
+
className: "align-middle"
|
|
12519
|
+
}, record.secondaryTeacherName), React__default.createElement("td", {
|
|
12520
|
+
className: "align-middle"
|
|
12521
|
+
}, record.emailSecondaryTeacher), React__default.createElement("td", {
|
|
12522
|
+
className: "text-center align-middle"
|
|
12523
|
+
}, React__default.createElement(marioCore.DeleteButtonIcon, {
|
|
12524
|
+
onClick: function onClick() {
|
|
12525
|
+
return onDeleteSecondaryTeacher(record.id);
|
|
12526
|
+
}
|
|
12527
|
+
})));
|
|
12528
|
+
})))) : React__default.createElement(marioCore.EmptyDataAlert, {
|
|
12529
|
+
label: "user"
|
|
12530
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
12531
|
+
md: 12
|
|
12532
|
+
}, React__default.createElement(marioCore.CustomPagination, {
|
|
12533
|
+
filters: filters,
|
|
12534
|
+
totalRecordCount: totalItems,
|
|
12535
|
+
changePageSize: function changePageSize(pageSize) {
|
|
12536
|
+
return changeFilters({
|
|
12537
|
+
pageSize: pageSize
|
|
12538
|
+
});
|
|
12539
|
+
},
|
|
12540
|
+
changePage: function changePage(currentPage) {
|
|
12541
|
+
return changeFilters({
|
|
12542
|
+
currentPage: currentPage
|
|
12543
|
+
});
|
|
12544
|
+
}
|
|
12545
|
+
}))), React__default.createElement(SwitchSecondaryTeacherModal$1, {
|
|
12546
|
+
ref: modal,
|
|
12547
|
+
header: t("switch_counselor"),
|
|
12548
|
+
userChoiced: userChoiced,
|
|
12549
|
+
removeData: removeData,
|
|
12550
|
+
options: options,
|
|
12551
|
+
secondaryTeacherChangeId: secondaryTeacherChangeId,
|
|
12552
|
+
setSecondaryTeacherChangeId: setSecondaryTeacherChangeId,
|
|
12553
|
+
resetData: resetData
|
|
12554
|
+
}));
|
|
12555
|
+
};
|
|
12556
|
+
|
|
12557
|
+
var tabs = [{
|
|
12558
|
+
path: "/admin/set-up/skill",
|
|
12559
|
+
title: "Skills",
|
|
12560
|
+
component: marioCore.SkillList
|
|
12561
|
+
}, {
|
|
12562
|
+
path: "/admin/set-up/subject",
|
|
12563
|
+
title: "Subjects",
|
|
12564
|
+
component: SubjectList
|
|
12565
|
+
}, {
|
|
12566
|
+
path: "/admin/set-up/learning-support-category",
|
|
12567
|
+
title: "Learning support categories",
|
|
12568
|
+
component: LearningSupportCategoryList
|
|
12569
|
+
}, {
|
|
12570
|
+
path: "/admin/set-up/learning-strategy",
|
|
12571
|
+
title: "Learning strategies",
|
|
12572
|
+
component: LearningStrategyList
|
|
12573
|
+
}, {
|
|
12574
|
+
path: "/admin/set-up/goal-example",
|
|
12575
|
+
title: "Goal examples",
|
|
12576
|
+
component: GoalExampleList
|
|
12577
|
+
}, {
|
|
12578
|
+
path: "/admin/set-up/student-badge",
|
|
12579
|
+
title: "Student badges",
|
|
12580
|
+
component: BadgeList
|
|
12581
|
+
}, {
|
|
12582
|
+
path: "/admin/set-up/semester",
|
|
12583
|
+
title: "Semester",
|
|
12584
|
+
component: SemesterList
|
|
12585
|
+
}, {
|
|
12586
|
+
path: "/admin/set-up/blank-days",
|
|
12587
|
+
title: "Blank days",
|
|
12588
|
+
component: SchoolBlankDayList
|
|
12589
|
+
}, {
|
|
12590
|
+
path: "/admin/set-up/csv-import",
|
|
12591
|
+
title: "CSV Import",
|
|
12592
|
+
component: CSVImport
|
|
12593
|
+
}, {
|
|
12594
|
+
path: "/admin/set-up/band-score",
|
|
12595
|
+
title: "Band scores",
|
|
12596
|
+
component: BandScoreList
|
|
12597
|
+
}, {
|
|
12598
|
+
path: "/admin/set-up/current-license",
|
|
12599
|
+
title: "License",
|
|
12600
|
+
component: CurrentLicense
|
|
12601
|
+
}, {
|
|
12602
|
+
path: "/admin/set-up/userDeleted",
|
|
12603
|
+
title: "User deleted",
|
|
12604
|
+
component: UserList
|
|
12605
|
+
}, {
|
|
12606
|
+
path: "/admin/set-up/switch-teacher",
|
|
12607
|
+
title: "Switch Teacher",
|
|
12608
|
+
component: SwitchTeacherList
|
|
12609
|
+
}, {
|
|
12610
|
+
path: "/admin/set-up/assign-assistant",
|
|
12611
|
+
title: "Assign assistant",
|
|
12612
|
+
component: AssignAssistantList
|
|
12613
|
+
}, {
|
|
12614
|
+
path: "/admin/set-up/switch-assistant",
|
|
12615
|
+
title: "Switch assistant",
|
|
12616
|
+
component: SwitchAssistantList
|
|
12617
|
+
}, {
|
|
12618
|
+
path: "/admin/set-up/assign-counselor",
|
|
12619
|
+
title: "Assign counselor",
|
|
12620
|
+
component: AssignCounselorList
|
|
12621
|
+
}, {
|
|
12622
|
+
path: "/admin/set-up/switch-counselor",
|
|
12623
|
+
title: "Switch counselor",
|
|
12624
|
+
component: SwitchCounselorList
|
|
12625
|
+
}, {
|
|
12626
|
+
path: "/admin/set-up/assign-secondary-teacher",
|
|
12627
|
+
title: "Assign secondary teacher",
|
|
12628
|
+
component: AssignSecondaryTeacherList
|
|
12629
|
+
}, {
|
|
12630
|
+
path: "/admin/set-up/switch-secondary-teacher",
|
|
12631
|
+
title: "Switch secondary teacher",
|
|
12632
|
+
component: SwitchSecondaryTeacherList
|
|
12633
|
+
}, {
|
|
12634
|
+
path: "/admin/set-up/welcome-email-re-send",
|
|
12635
|
+
title: "Welcome Email Re-send",
|
|
12636
|
+
component: WelcomeEmailResend
|
|
12637
|
+
}, {
|
|
12638
|
+
path: "/admin/set-up/question-scaffolding",
|
|
12639
|
+
title: "Question Scaffolding",
|
|
12640
|
+
component: QuestionScaffolding
|
|
12641
|
+
}, {
|
|
12642
|
+
path: "/admin/set-up/training",
|
|
12643
|
+
title: "Training",
|
|
12644
|
+
component: Training
|
|
12645
|
+
}, {
|
|
12646
|
+
path: "/admin/set-up/destination",
|
|
12647
|
+
title: "Destinations",
|
|
12648
|
+
component: Destinations
|
|
12649
|
+
}];
|
|
12650
|
+
var title$1 = "set_up";
|
|
12651
|
+
|
|
12652
|
+
var SetupContainer = function SetupContainer() {
|
|
12653
|
+
var _useTranslation = marioCore.useTranslation(),
|
|
12654
|
+
t = _useTranslation.t;
|
|
12655
|
+
|
|
12656
|
+
return React__default.createElement(marioCore.CustomTab, {
|
|
12657
|
+
title: t(title$1),
|
|
12658
|
+
tabs: tabs
|
|
12659
|
+
});
|
|
12660
|
+
};
|
|
12661
|
+
|
|
12662
|
+
var TYPE_QUESTION;
|
|
12663
|
+
|
|
12664
|
+
(function (TYPE_QUESTION) {
|
|
12665
|
+
TYPE_QUESTION[TYPE_QUESTION["Default"] = 0] = "Default";
|
|
12666
|
+
TYPE_QUESTION[TYPE_QUESTION["OneToOne"] = 1] = "OneToOne";
|
|
12667
|
+
TYPE_QUESTION[TYPE_QUESTION["ClassReflection"] = 2] = "ClassReflection";
|
|
12668
|
+
TYPE_QUESTION[TYPE_QUESTION["Conference"] = 3] = "Conference";
|
|
12669
|
+
TYPE_QUESTION[TYPE_QUESTION["Survey"] = 4] = "Survey";
|
|
12670
|
+
})(TYPE_QUESTION || (TYPE_QUESTION = {}));
|
|
12671
|
+
|
|
12672
|
+
var subgridStyle = {
|
|
12673
|
+
overflowY: "auto",
|
|
12674
|
+
overflowX: "hidden",
|
|
12675
|
+
maxHeight: "300px"
|
|
12676
|
+
};
|
|
12677
|
+
|
|
12678
|
+
var QuestionPreview = function QuestionPreview(props) {
|
|
12679
|
+
var _props$data = props.data,
|
|
12680
|
+
numberOfStars = _props$data.numberOfStars,
|
|
12681
|
+
fromLabel = _props$data.fromLabel,
|
|
12682
|
+
toLabel = _props$data.toLabel,
|
|
12683
|
+
answers = _props$data.answers,
|
|
12684
|
+
type = _props$data.type,
|
|
12685
|
+
isSurvey = _props$data.isSurvey,
|
|
12686
|
+
isDefaultQuestion = _props$data.isDefaultQuestion;
|
|
12687
|
+
|
|
12688
|
+
var render = function render() {
|
|
12689
|
+
var isEmotional = marioCore.QUESTION_TYPES.EMOTIONAL === type;
|
|
12690
|
+
if ([marioCore.QUESTION_TYPES.SINGLE_CHOICE, marioCore.QUESTION_TYPES.MULTIPLE_CHOICE, marioCore.QUESTION_TYPES.EMOTIONAL, marioCore.QUESTION_TYPES.LEARNING_STRATEGY].includes(type)) return React__default.createElement(React.Fragment, null, React__default.createElement(reactstrap.Row, {
|
|
12691
|
+
className: "mb-2 pb-2"
|
|
12692
|
+
}, React__default.createElement(reactstrap.Col, {
|
|
12693
|
+
md: 8
|
|
12694
|
+
}, isSurvey == true && React__default.createElement("h6", {
|
|
12695
|
+
className: "text-danger"
|
|
12696
|
+
}, "This question is a survey"), React__default.createElement(reactstrap.Table, {
|
|
12697
|
+
responsive: true,
|
|
12698
|
+
hover: true,
|
|
12699
|
+
bordered: true,
|
|
12700
|
+
striped: true,
|
|
12701
|
+
size: "sm"
|
|
12702
|
+
}, React__default.createElement("thead", null, React__default.createElement("tr", null, isEmotional && React__default.createElement("th", {
|
|
12703
|
+
className: "align-top"
|
|
12704
|
+
}, "Emotion icon"), React__default.createElement("th", {
|
|
12705
|
+
className: "align-top"
|
|
12706
|
+
}, "Answer"), !isSurvey && !isDefaultQuestion && !isEmotional && React__default.createElement(React__default.Fragment, null, React__default.createElement("th", {
|
|
12707
|
+
className: "text-center"
|
|
12708
|
+
}, "Mark"), React__default.createElement("th", {
|
|
12709
|
+
className: "text-center"
|
|
12710
|
+
}, "Is correct answer")))), React__default.createElement("tbody", null, answers.map(function (answer, index) {
|
|
12711
|
+
return React__default.createElement("tr", {
|
|
12712
|
+
key: answer.id
|
|
12713
|
+
}, isEmotional && React__default.createElement("td", {
|
|
12714
|
+
className: "align-middle"
|
|
12715
|
+
}, marioCore.EMOTIONS[index]), React__default.createElement("td", {
|
|
12716
|
+
className: "align-middle"
|
|
12717
|
+
}, React__default.createElement("div", {
|
|
12718
|
+
dangerouslySetInnerHTML: {
|
|
12719
|
+
__html: answer.text
|
|
12720
|
+
}
|
|
12721
|
+
})), !isSurvey && !isDefaultQuestion && !isEmotional && React__default.createElement(React__default.Fragment, null, React__default.createElement("td", {
|
|
12722
|
+
className: "text-center align-middle"
|
|
12723
|
+
}, answer.mark), React__default.createElement("td", {
|
|
12724
|
+
className: "text-center align-middle"
|
|
12725
|
+
}, answer.isCorrectAnswer ? React__default.createElement(fa.FaCheck, {
|
|
12726
|
+
className: "text-success"
|
|
12727
|
+
}) : React__default.createElement(fa.FaTimes, {
|
|
12728
|
+
className: "text-danger"
|
|
12729
|
+
}))));
|
|
12730
|
+
}))))));
|
|
12731
|
+
|
|
12732
|
+
if ([marioCore.QUESTION_TYPES.SLIDER, marioCore.QUESTION_TYPES.RATING].includes(type)) {
|
|
12733
|
+
return React__default.createElement("span", null, "From ", React__default.createElement("span", {
|
|
12734
|
+
className: "font-weight-bold"
|
|
12735
|
+
}, fromLabel), " ", "to ", React__default.createElement("span", {
|
|
12736
|
+
className: "font-weight-bold"
|
|
12737
|
+
}, toLabel));
|
|
12738
|
+
}
|
|
12739
|
+
|
|
12740
|
+
if (marioCore.QUESTION_TYPES.STAR_RATING === type) {
|
|
12741
|
+
return React__default.createElement(reactstrap.Row, null, React__default.createElement(reactstrap.Col, {
|
|
12742
|
+
md: 8
|
|
12743
|
+
}, React__default.createElement(reactstrap.Alert, {
|
|
12744
|
+
color: "primary"
|
|
12745
|
+
}, "Number of stars: ", numberOfStars)));
|
|
12746
|
+
}
|
|
12747
|
+
|
|
12748
|
+
return React__default.createElement(reactstrap.Row, null, React__default.createElement(reactstrap.Col, {
|
|
12749
|
+
md: 8
|
|
12750
|
+
}, React__default.createElement(reactstrap.Alert, {
|
|
12751
|
+
color: "secondary"
|
|
12752
|
+
}, "No preview")));
|
|
12753
|
+
};
|
|
12754
|
+
|
|
12755
|
+
return React__default.createElement("div", {
|
|
12756
|
+
className: "animated fadeIn p-2",
|
|
11942
12757
|
style: subgridStyle
|
|
11943
12758
|
}, render());
|
|
11944
12759
|
};
|
|
@@ -11983,15 +12798,10 @@ var renderType = function renderType(params) {
|
|
|
11983
12798
|
});
|
|
11984
12799
|
return type ? React__default.createElement("div", null, type.label) : React__default.createElement("div", null);
|
|
11985
12800
|
};
|
|
11986
|
-
var renderUserQuestion = function renderUserQuestion(params) {
|
|
11987
|
-
var _params$data10;
|
|
11988
|
-
|
|
11989
|
-
return React__default.createElement("div", null, params === null || params === void 0 ? void 0 : (_params$data10 = params.data) === null || _params$data10 === void 0 ? void 0 : _params$data10.userForQuestion);
|
|
11990
|
-
};
|
|
11991
12801
|
|
|
11992
12802
|
var QUESTION_URL$1 = "/admin/question-bank";
|
|
11993
12803
|
var CREATE_QUESTION_URL = "/admin/create-question";
|
|
11994
|
-
var TITLE$
|
|
12804
|
+
var TITLE$k = "Question list";
|
|
11995
12805
|
|
|
11996
12806
|
var useQuestionList$1 = function useQuestionList(isDefaultQuestion, isDefaultClassReflection, isDefaultConference, isDefaultSurvey) {
|
|
11997
12807
|
var history = reactRouterDom.useHistory();
|
|
@@ -12054,12 +12864,6 @@ var useQuestionList$1 = function useQuestionList(isDefaultQuestion, isDefaultCla
|
|
|
12054
12864
|
dispatch(marioCore.setLoading(true));
|
|
12055
12865
|
|
|
12056
12866
|
var _temp4 = _catch(function () {
|
|
12057
|
-
var filter = filters;
|
|
12058
|
-
|
|
12059
|
-
if (!!isDefaultClassReflection && !isDefaultQuestion) {
|
|
12060
|
-
delete filter.isDefaultQuestion;
|
|
12061
|
-
}
|
|
12062
|
-
|
|
12063
12867
|
return Promise.resolve(get$2(filters)).then(function (res) {
|
|
12064
12868
|
var _res$data = res.data,
|
|
12065
12869
|
items = _res$data.items,
|
|
@@ -12152,7 +12956,7 @@ var useQuestionList$1 = function useQuestionList(isDefaultQuestion, isDefaultCla
|
|
|
12152
12956
|
|
|
12153
12957
|
if (isDefaultQuestion && !isDefaultClassReflection) {
|
|
12154
12958
|
type = TYPE_QUESTION.OneToOne;
|
|
12155
|
-
} else if (isDefaultClassReflection) {
|
|
12959
|
+
} else if (isDefaultQuestion && isDefaultClassReflection) {
|
|
12156
12960
|
type = TYPE_QUESTION.ClassReflection;
|
|
12157
12961
|
} else if (isDefaultConference) {
|
|
12158
12962
|
type = TYPE_QUESTION.Conference;
|
|
@@ -12162,7 +12966,7 @@ var useQuestionList$1 = function useQuestionList(isDefaultQuestion, isDefaultCla
|
|
|
12162
12966
|
history.push(url + "?type=" + type);
|
|
12163
12967
|
}, []);
|
|
12164
12968
|
React.useEffect(function () {
|
|
12165
|
-
document.title = TITLE$
|
|
12969
|
+
document.title = TITLE$k;
|
|
12166
12970
|
}, []);
|
|
12167
12971
|
React.useEffect(function () {
|
|
12168
12972
|
getData();
|
|
@@ -12204,15 +13008,7 @@ var useQuestionList$1 = function useQuestionList(isDefaultQuestion, isDefaultCla
|
|
|
12204
13008
|
}
|
|
12205
13009
|
}];
|
|
12206
13010
|
var gridOptions = {
|
|
12207
|
-
columnDefs: isDefaultQuestion
|
|
12208
|
-
headerName: "Order",
|
|
12209
|
-
rowDrag: true
|
|
12210
|
-
}]) : isDefaultClassReflection ? [].concat(columnDefs, [{
|
|
12211
|
-
headerName: "User for",
|
|
12212
|
-
cellRendererFramework: function cellRendererFramework(params) {
|
|
12213
|
-
return renderUserQuestion(params);
|
|
12214
|
-
}
|
|
12215
|
-
}, {
|
|
13011
|
+
columnDefs: isDefaultQuestion || isDefaultClassReflection ? [].concat(columnDefs, [{
|
|
12216
13012
|
headerName: "Order",
|
|
12217
13013
|
rowDrag: true
|
|
12218
13014
|
}]) : columnDefs,
|
|
@@ -12788,7 +13584,7 @@ var useReflectionFormDetail = function useReflectionFormDetail() {
|
|
|
12788
13584
|
};
|
|
12789
13585
|
};
|
|
12790
13586
|
|
|
12791
|
-
var TITLE$
|
|
13587
|
+
var TITLE$l = "Reflection form list";
|
|
12792
13588
|
|
|
12793
13589
|
var useReflectionFormList = function useReflectionFormList() {
|
|
12794
13590
|
var reflectionList = reactRedux.useSelector(function (state) {
|
|
@@ -12878,7 +13674,7 @@ var useReflectionFormList = function useReflectionFormList() {
|
|
|
12878
13674
|
}
|
|
12879
13675
|
}, [dispatch]);
|
|
12880
13676
|
React.useEffect(function () {
|
|
12881
|
-
document.title = TITLE$
|
|
13677
|
+
document.title = TITLE$l;
|
|
12882
13678
|
}, []);
|
|
12883
13679
|
React.useEffect(function () {
|
|
12884
13680
|
getData();
|
|
@@ -13976,10 +14772,9 @@ var initValue$g = {
|
|
|
13976
14772
|
subQuestions: [],
|
|
13977
14773
|
isMandatory: false,
|
|
13978
14774
|
isBeforeSession: false,
|
|
13979
|
-
isDefaultQuestionSurvey: false
|
|
13980
|
-
userForQuestion: "TeacherAndStudent"
|
|
14775
|
+
isDefaultQuestionSurvey: false
|
|
13981
14776
|
};
|
|
13982
|
-
var TITLE$
|
|
14777
|
+
var TITLE$m = "Question detail";
|
|
13983
14778
|
|
|
13984
14779
|
var useQuestionDetail$1 = function useQuestionDetail(id, type) {
|
|
13985
14780
|
var editorRef;
|
|
@@ -14044,7 +14839,7 @@ var useQuestionDetail$1 = function useQuestionDetail(id, type) {
|
|
|
14044
14839
|
};
|
|
14045
14840
|
|
|
14046
14841
|
React.useEffect(function () {
|
|
14047
|
-
document.title = TITLE$
|
|
14842
|
+
document.title = TITLE$m;
|
|
14048
14843
|
setEdited(false);
|
|
14049
14844
|
if (!!localStorage.getItem(window.location.href)) localStorage.removeItem(window.location.href);
|
|
14050
14845
|
}, []);
|
|
@@ -14142,54 +14937,6 @@ var useQuestionDetail$1 = function useQuestionDetail(id, type) {
|
|
|
14142
14937
|
};
|
|
14143
14938
|
};
|
|
14144
14939
|
|
|
14145
|
-
var UserForQuestionSelect = function UserForQuestionSelect(_ref) {
|
|
14146
|
-
var _userForQuestion$find;
|
|
14147
|
-
|
|
14148
|
-
var value = _ref.value,
|
|
14149
|
-
_onChange = _ref.onChange;
|
|
14150
|
-
|
|
14151
|
-
var _useState = React.useState(false),
|
|
14152
|
-
isToggleModel = _useState[0],
|
|
14153
|
-
setIsToggleModel = _useState[1];
|
|
14154
|
-
|
|
14155
|
-
return React__default.createElement("div", null, React__default.createElement("div", {
|
|
14156
|
-
className: styles["block-filter-component"] + " "
|
|
14157
|
-
}, React__default.createElement("button", {
|
|
14158
|
-
onClick: function onClick() {
|
|
14159
|
-
return setIsToggleModel(!isToggleModel);
|
|
14160
|
-
},
|
|
14161
|
-
className: styles["btn-filter"] + " d-flex align-items-center cursor-pointer"
|
|
14162
|
-
}, React__default.createElement("p", {
|
|
14163
|
-
className: " my-0 mx-2"
|
|
14164
|
-
}, ((_userForQuestion$find = userForQuestion.find(function (r) {
|
|
14165
|
-
return r.value == value;
|
|
14166
|
-
})) === null || _userForQuestion$find === void 0 ? void 0 : _userForQuestion$find.label) || "Teacher and student"), !isToggleModel ? React__default.createElement(fi.FiChevronDown, null) : React__default.createElement(fi.FiChevronUp, null)), React__default.createElement("div", {
|
|
14167
|
-
className: styles["select-filter-component"] + " " + (!isToggleModel && "" + styles["hidden"])
|
|
14168
|
-
}, React__default.createElement(reactstrap.Form, {
|
|
14169
|
-
className: "" + styles["box-select"]
|
|
14170
|
-
}, userForQuestion.map(function (item) {
|
|
14171
|
-
return React__default.createElement(reactstrap.FormGroup, {
|
|
14172
|
-
check: true,
|
|
14173
|
-
className: "my-2 px-3",
|
|
14174
|
-
key: item.label
|
|
14175
|
-
}, React__default.createElement(reactstrap.Input, {
|
|
14176
|
-
id: item.label + "userForQuestion",
|
|
14177
|
-
name: "userForQuestion",
|
|
14178
|
-
value: item.value,
|
|
14179
|
-
type: "radio",
|
|
14180
|
-
className: "" + styles["radio-btn"],
|
|
14181
|
-
checked: value === item.value,
|
|
14182
|
-
onChange: function onChange() {
|
|
14183
|
-
return _onChange("userForQuestion", item.value);
|
|
14184
|
-
}
|
|
14185
|
-
}), React__default.createElement(reactstrap.Label, {
|
|
14186
|
-
check: true,
|
|
14187
|
-
"for": item.label + "userForQuestion",
|
|
14188
|
-
className: "" + styles["box-select-label"]
|
|
14189
|
-
}, React__default.createElement("p", null, item.label)));
|
|
14190
|
-
})))));
|
|
14191
|
-
};
|
|
14192
|
-
|
|
14193
14940
|
var CREATE_QUESTION_HEADER = "create_question";
|
|
14194
14941
|
var EDIT_QUESTION_HEADER = "edit_question";
|
|
14195
14942
|
var EMOTIONALS_LENGTH = marioCore.EMOTIONS.length;
|
|
@@ -14294,14 +15041,7 @@ var QuestionDetail = function QuestionDetail() {
|
|
|
14294
15041
|
value: values.categoryId
|
|
14295
15042
|
}), touched.categoryId && errors.categoryId && React__default.createElement(marioCore.ErrorHandler, {
|
|
14296
15043
|
text: errors.categoryId
|
|
14297
|
-
}))),
|
|
14298
|
-
md: 6
|
|
14299
|
-
}, React__default.createElement(marioCore.RequiredLabel, {
|
|
14300
|
-
text: t("user_for_question")
|
|
14301
|
-
}), React__default.createElement(UserForQuestionSelect, {
|
|
14302
|
-
onChange: setFieldValue,
|
|
14303
|
-
value: values.userForQuestion || ""
|
|
14304
|
-
}))), React__default.createElement(reactstrap.Row, {
|
|
15044
|
+
})))), React__default.createElement(reactstrap.Row, {
|
|
14305
15045
|
className: "mb-2"
|
|
14306
15046
|
}, React__default.createElement(reactstrap.Col, {
|
|
14307
15047
|
md: 12,
|
|
@@ -14725,7 +15465,7 @@ var useAssessmentDetail = function useAssessmentDetail() {
|
|
|
14725
15465
|
};
|
|
14726
15466
|
};
|
|
14727
15467
|
|
|
14728
|
-
var TITLE$
|
|
15468
|
+
var TITLE$n = "Assessment list";
|
|
14729
15469
|
|
|
14730
15470
|
var useAssessmentList = function useAssessmentList() {
|
|
14731
15471
|
var assessmentList = reactRedux.useSelector(function (state) {
|
|
@@ -14808,7 +15548,7 @@ var useAssessmentList = function useAssessmentList() {
|
|
|
14808
15548
|
dispatch(marioCore.setLoading(false));
|
|
14809
15549
|
}, [filters]);
|
|
14810
15550
|
React.useEffect(function () {
|
|
14811
|
-
document.title = TITLE$
|
|
15551
|
+
document.title = TITLE$n;
|
|
14812
15552
|
}, []);
|
|
14813
15553
|
React.useEffect(function () {
|
|
14814
15554
|
getData();
|
|
@@ -15260,7 +16000,7 @@ var useFeedbackDetail = function useFeedbackDetail() {
|
|
|
15260
16000
|
};
|
|
15261
16001
|
};
|
|
15262
16002
|
|
|
15263
|
-
var TITLE$
|
|
16003
|
+
var TITLE$o = "Feedback list";
|
|
15264
16004
|
|
|
15265
16005
|
var useFeedbackList = function useFeedbackList() {
|
|
15266
16006
|
var feedbackList = reactRedux.useSelector(function (state) {
|
|
@@ -15312,7 +16052,7 @@ var useFeedbackList = function useFeedbackList() {
|
|
|
15312
16052
|
}
|
|
15313
16053
|
}, [dispatch, filters]);
|
|
15314
16054
|
React.useEffect(function () {
|
|
15315
|
-
document.title = TITLE$
|
|
16055
|
+
document.title = TITLE$o;
|
|
15316
16056
|
}, []);
|
|
15317
16057
|
React.useEffect(function () {
|
|
15318
16058
|
getData();
|
|
@@ -15326,7 +16066,7 @@ var useFeedbackList = function useFeedbackList() {
|
|
|
15326
16066
|
};
|
|
15327
16067
|
};
|
|
15328
16068
|
|
|
15329
|
-
var header$
|
|
16069
|
+
var header$b = "Feedback";
|
|
15330
16070
|
|
|
15331
16071
|
var FeedbackList = function FeedbackList() {
|
|
15332
16072
|
var history = reactRouterDom.useHistory();
|
|
@@ -15355,7 +16095,7 @@ var FeedbackList = function FeedbackList() {
|
|
|
15355
16095
|
feedbackDetail: feedbackDetail
|
|
15356
16096
|
}), React__default.createElement("h5", {
|
|
15357
16097
|
className: "mb-2"
|
|
15358
|
-
}, header$
|
|
16098
|
+
}, header$b), React__default.createElement(reactstrap.Row, {
|
|
15359
16099
|
className: "my-2"
|
|
15360
16100
|
}, React__default.createElement(reactstrap.Col, {
|
|
15361
16101
|
md: 8,
|
|
@@ -15653,7 +16393,7 @@ var useTutorialScreenDetail = function useTutorialScreenDetail(typeRole) {
|
|
|
15653
16393
|
};
|
|
15654
16394
|
};
|
|
15655
16395
|
|
|
15656
|
-
var TITLE$
|
|
16396
|
+
var TITLE$p = "Tutorial screen list";
|
|
15657
16397
|
|
|
15658
16398
|
var useTutorialScreenList = function useTutorialScreenList(typeRole) {
|
|
15659
16399
|
var tutorialScreenList = reactRedux.useSelector(function (state) {
|
|
@@ -15738,7 +16478,7 @@ var useTutorialScreenList = function useTutorialScreenList(typeRole) {
|
|
|
15738
16478
|
dispatch(marioCore.setLoading(false));
|
|
15739
16479
|
}, [filters]);
|
|
15740
16480
|
React.useEffect(function () {
|
|
15741
|
-
document.title = TITLE$
|
|
16481
|
+
document.title = TITLE$p;
|
|
15742
16482
|
}, []);
|
|
15743
16483
|
React.useEffect(function () {
|
|
15744
16484
|
getData();
|
|
@@ -15926,7 +16666,7 @@ var tabs$3 = [{
|
|
|
15926
16666
|
title: "Class Reflection Question",
|
|
15927
16667
|
component: function component() {
|
|
15928
16668
|
return React__default.createElement(QuestionBankList, {
|
|
15929
|
-
isDefaultQuestion:
|
|
16669
|
+
isDefaultQuestion: true,
|
|
15930
16670
|
isDefaultClassReflection: true
|
|
15931
16671
|
});
|
|
15932
16672
|
}
|
|
@@ -16155,7 +16895,7 @@ var useQuestionCateDetail = function useQuestionCateDetail() {
|
|
|
16155
16895
|
};
|
|
16156
16896
|
};
|
|
16157
16897
|
|
|
16158
|
-
var TITLE$
|
|
16898
|
+
var TITLE$q = "Question category list";
|
|
16159
16899
|
|
|
16160
16900
|
var useQuestionCateList = function useQuestionCateList() {
|
|
16161
16901
|
var questionCateList = reactRedux.useSelector(function (state) {
|
|
@@ -16315,7 +17055,7 @@ var useQuestionCateList = function useQuestionCateList() {
|
|
|
16315
17055
|
};
|
|
16316
17056
|
|
|
16317
17057
|
React.useEffect(function () {
|
|
16318
|
-
document.title = TITLE$
|
|
17058
|
+
document.title = TITLE$q;
|
|
16319
17059
|
}, []);
|
|
16320
17060
|
React.useEffect(function () {
|
|
16321
17061
|
getData();
|
|
@@ -16766,7 +17506,7 @@ var useTemplateCateDetail = function useTemplateCateDetail() {
|
|
|
16766
17506
|
};
|
|
16767
17507
|
};
|
|
16768
17508
|
|
|
16769
|
-
var TITLE$
|
|
17509
|
+
var TITLE$r = "Question category list";
|
|
16770
17510
|
|
|
16771
17511
|
var useTemplateCateList = function useTemplateCateList() {
|
|
16772
17512
|
var questionCateList = reactRedux.useSelector(function (state) {
|
|
@@ -16860,7 +17600,7 @@ var useTemplateCateList = function useTemplateCateList() {
|
|
|
16860
17600
|
dispatch(marioCore.setLoading(false));
|
|
16861
17601
|
}, [filters]);
|
|
16862
17602
|
React.useEffect(function () {
|
|
16863
|
-
document.title = TITLE$
|
|
17603
|
+
document.title = TITLE$r;
|
|
16864
17604
|
}, []);
|
|
16865
17605
|
React.useEffect(function () {
|
|
16866
17606
|
getData();
|
|
@@ -17645,7 +18385,7 @@ var useAssignmentDetail = function useAssignmentDetail() {
|
|
|
17645
18385
|
};
|
|
17646
18386
|
};
|
|
17647
18387
|
|
|
17648
|
-
var TITLE$
|
|
18388
|
+
var TITLE$s = "Assignment list";
|
|
17649
18389
|
|
|
17650
18390
|
var useAssignmentList = function useAssignmentList() {
|
|
17651
18391
|
var assignmentList = reactRedux.useSelector(function (state) {
|
|
@@ -17742,7 +18482,7 @@ var useAssignmentList = function useAssignmentList() {
|
|
|
17742
18482
|
dispatch(marioCore.setLoading(false));
|
|
17743
18483
|
}, [filters]);
|
|
17744
18484
|
React.useEffect(function () {
|
|
17745
|
-
document.title = TITLE$
|
|
18485
|
+
document.title = TITLE$s;
|
|
17746
18486
|
}, []);
|
|
17747
18487
|
React.useEffect(function () {
|
|
17748
18488
|
getData();
|
|
@@ -18192,7 +18932,7 @@ var getRandomQuestion = function getRandomQuestion(data) {
|
|
|
18192
18932
|
return marioCore.api.post(QUESTION_URL$2 + "/random", data);
|
|
18193
18933
|
};
|
|
18194
18934
|
|
|
18195
|
-
var TITLE$
|
|
18935
|
+
var TITLE$t = "Session template list";
|
|
18196
18936
|
var SESSION_TEMPLATE_URL$1 = "/admin/session-template-learning-support";
|
|
18197
18937
|
var CREATE_TEMPLATE_URL = "/admin/create-session-template-learning-support";
|
|
18198
18938
|
|
|
@@ -18296,7 +19036,7 @@ var useSessionTemplateList = function useSessionTemplateList() {
|
|
|
18296
19036
|
history.push(url);
|
|
18297
19037
|
}, []);
|
|
18298
19038
|
React.useEffect(function () {
|
|
18299
|
-
document.title = TITLE$
|
|
19039
|
+
document.title = TITLE$t;
|
|
18300
19040
|
}, []);
|
|
18301
19041
|
React.useEffect(function () {
|
|
18302
19042
|
getData();
|
|
@@ -18443,7 +19183,7 @@ var remove$k = function remove(id) {
|
|
|
18443
19183
|
return marioCore.api["delete"](SESSION_TEMPLATE_GENERAL_CLASS_URL + "/" + id);
|
|
18444
19184
|
};
|
|
18445
19185
|
|
|
18446
|
-
var TITLE$
|
|
19186
|
+
var TITLE$u = "Session template general class list";
|
|
18447
19187
|
var SESSION_TEMPLATE_GENERAL_CLASS_URL$1 = "/admin/session-template/general-class";
|
|
18448
19188
|
var CREATE_TEMPLATE_GENERAL_CLASS_URL = "/admin/create-session-template-general-class";
|
|
18449
19189
|
|
|
@@ -18533,7 +19273,7 @@ var useSessionTemplateGeneralClassList = function useSessionTemplateGeneralClass
|
|
|
18533
19273
|
history.push(url);
|
|
18534
19274
|
}, []);
|
|
18535
19275
|
React.useEffect(function () {
|
|
18536
|
-
document.title = TITLE$
|
|
19276
|
+
document.title = TITLE$u;
|
|
18537
19277
|
}, []);
|
|
18538
19278
|
React.useEffect(function () {
|
|
18539
19279
|
getData();
|
|
@@ -20526,7 +21266,7 @@ var useCustomAlertDetail = function useCustomAlertDetail() {
|
|
|
20526
21266
|
};
|
|
20527
21267
|
};
|
|
20528
21268
|
|
|
20529
|
-
var TITLE$
|
|
21269
|
+
var TITLE$v = "Custom alert list";
|
|
20530
21270
|
|
|
20531
21271
|
var useCustomAlertList = function useCustomAlertList() {
|
|
20532
21272
|
var customAlertList = reactRedux.useSelector(function (state) {
|
|
@@ -20614,7 +21354,7 @@ var useCustomAlertList = function useCustomAlertList() {
|
|
|
20614
21354
|
dispatch(marioCore.setLoading(false));
|
|
20615
21355
|
}, [filters]);
|
|
20616
21356
|
React.useEffect(function () {
|
|
20617
|
-
document.title = TITLE$
|
|
21357
|
+
document.title = TITLE$v;
|
|
20618
21358
|
}, []);
|
|
20619
21359
|
React.useEffect(function () {
|
|
20620
21360
|
getData();
|
|
@@ -20629,7 +21369,7 @@ var useCustomAlertList = function useCustomAlertList() {
|
|
|
20629
21369
|
};
|
|
20630
21370
|
};
|
|
20631
21371
|
|
|
20632
|
-
var header$
|
|
21372
|
+
var header$c = "custom_alert";
|
|
20633
21373
|
|
|
20634
21374
|
var CustomAlertList = function CustomAlertList() {
|
|
20635
21375
|
var modal = React.useRef();
|
|
@@ -20700,7 +21440,7 @@ var CustomAlertList = function CustomAlertList() {
|
|
|
20700
21440
|
when: edited
|
|
20701
21441
|
}), React__default.createElement("h5", {
|
|
20702
21442
|
className: "mb-2"
|
|
20703
|
-
}, t(header$
|
|
21443
|
+
}, t(header$c)), React__default.createElement(reactstrap.Row, {
|
|
20704
21444
|
className: "my-2"
|
|
20705
21445
|
}, React__default.createElement(reactstrap.Col, {
|
|
20706
21446
|
md: 4
|
|
@@ -21259,7 +21999,7 @@ var useCertificateDetail = function useCertificateDetail() {
|
|
|
21259
21999
|
};
|
|
21260
22000
|
};
|
|
21261
22001
|
|
|
21262
|
-
var TITLE$
|
|
22002
|
+
var TITLE$w = "Certificate list";
|
|
21263
22003
|
|
|
21264
22004
|
var useCertificateList = function useCertificateList() {
|
|
21265
22005
|
var certificateList = reactRedux.useSelector(function (state) {
|
|
@@ -21342,7 +22082,7 @@ var useCertificateList = function useCertificateList() {
|
|
|
21342
22082
|
dispatch(marioCore.setLoading(false));
|
|
21343
22083
|
}, [filters]);
|
|
21344
22084
|
React.useEffect(function () {
|
|
21345
|
-
document.title = TITLE$
|
|
22085
|
+
document.title = TITLE$w;
|
|
21346
22086
|
}, []);
|
|
21347
22087
|
React.useEffect(function () {
|
|
21348
22088
|
getData();
|
|
@@ -21357,7 +22097,7 @@ var useCertificateList = function useCertificateList() {
|
|
|
21357
22097
|
};
|
|
21358
22098
|
};
|
|
21359
22099
|
|
|
21360
|
-
var header$
|
|
22100
|
+
var header$d = "Certificate";
|
|
21361
22101
|
|
|
21362
22102
|
var CertificateList = function CertificateList() {
|
|
21363
22103
|
var modal = React.useRef();
|
|
@@ -21416,7 +22156,7 @@ var CertificateList = function CertificateList() {
|
|
|
21416
22156
|
when: edited
|
|
21417
22157
|
}), React__default.createElement("h5", {
|
|
21418
22158
|
className: "mb-2"
|
|
21419
|
-
}, header$
|
|
22159
|
+
}, header$d), React__default.createElement(reactstrap.Row, {
|
|
21420
22160
|
className: "my-2"
|
|
21421
22161
|
}, React__default.createElement(reactstrap.Col, {
|
|
21422
22162
|
md: 4
|
|
@@ -21490,7 +22230,7 @@ var CertificateList = function CertificateList() {
|
|
|
21490
22230
|
}))));
|
|
21491
22231
|
};
|
|
21492
22232
|
|
|
21493
|
-
var TITLE$
|
|
22233
|
+
var TITLE$x = "Certificate list";
|
|
21494
22234
|
|
|
21495
22235
|
var useCertificateList$1 = function useCertificateList() {
|
|
21496
22236
|
var dispatch = reactRedux.useDispatch();
|
|
@@ -21578,7 +22318,7 @@ var useCertificateList$1 = function useCertificateList() {
|
|
|
21578
22318
|
}
|
|
21579
22319
|
}, [listWaiting]);
|
|
21580
22320
|
React.useEffect(function () {
|
|
21581
|
-
document.title = TITLE$
|
|
22321
|
+
document.title = TITLE$x;
|
|
21582
22322
|
getListWaiting();
|
|
21583
22323
|
getListApproved();
|
|
21584
22324
|
}, []);
|
|
@@ -29349,7 +30089,7 @@ var getLearningStrategiesTableApi = function getLearningStrategiesTableApi(filte
|
|
|
29349
30089
|
});
|
|
29350
30090
|
};
|
|
29351
30091
|
|
|
29352
|
-
var TITLE$
|
|
30092
|
+
var TITLE$y = "Dashboard";
|
|
29353
30093
|
var DEFAULT_START_DATE = moment().subtract(2, 'months').startOf("day").valueOf();
|
|
29354
30094
|
var DEFAULT_END_DATE = moment().endOf("day").valueOf();
|
|
29355
30095
|
|
|
@@ -29837,7 +30577,7 @@ var useDashboard = function useDashboard() {
|
|
|
29837
30577
|
|
|
29838
30578
|
var getData = React.useCallback(function () {
|
|
29839
30579
|
try {
|
|
29840
|
-
document.title = TITLE$
|
|
30580
|
+
document.title = TITLE$y;
|
|
29841
30581
|
dispatch(marioCore.setLoading(true));
|
|
29842
30582
|
return Promise.resolve(Promise.any([callApi(getAllTotalTime, setListTotalTime, []), callApi(getReadinessToLearning, setReadinessToLearning, []), callApi(getTopLearningStrategies, setTopLearningStrategies, []), callApi(getStudentByGrade, setStudentByGrade, []), callApi(getOverviewQuestionChart, setChartCheckInData, [], "CheckIn"), callApi(getOverviewQuestionChart, setChartOneToOneData, [], "OneToOne"), callApi(getOverviewQuestionChart, setChartClassReflection, [], "ClassReflection"), callApi(getOverviewQuestionChart, setChartConference, [], "Conference"), callApi(getOverviewQuestionChart, setLearningProgress, [], "LearningProgress"), callApi(getOverviewQuestionChart, setSafety, [], "Safety"), callApi(getOverviewQuestionChart, setTopSkill, [], "TopSkill"), callApi(getFriendCircleItems, setFriendCircles, INITIAL_BEST_FRIENDS), callApi(getActivityCircleItems, setActivityCircles, INITIAL_ACTIVITY_FRIENDS), callApi(getStudentBySpecialNeed, setStudentBySpecialNeed, []), callApi(getStudentByAge, setStudentByAge, INITIAL_AGE_OF_STUDENT), callApi(getStudentByGender, setStudentByGender, [])])).then(function () {
|
|
29843
30583
|
dispatch(marioCore.setLoading(false));
|