mario-education 2.4.31-admin → 2.4.32-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/components/Questions/QuestionList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/components/Questions/QuestionSelector.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/ColumnChartAndPercent.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/HeaderChart/HeaderChart.d.ts +2 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/utils.d.ts +1 -1
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useBehavior.d.ts +2 -2
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useChartDatas.d.ts +16 -9
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/configs/questionDetailSchema.d.ts +4 -4
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/hooks/useQuestionDetail.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSurvey/components/TemplateCateModal.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSurvey/hooks/useTemplateCateDetail.d.ts +35 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSurvey/hooks/useTemplateCateList.d.ts +9 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSurvey/views/TemplateSurveyList.d.ts +3 -0
- package/dist/MarioFramework.Education/ClientApp/src/services/questionCategoryService.d.ts +5 -0
- package/dist/MarioFramework.Education/ClientApp/src/utils/constants.d.ts +3 -1
- package/dist/index.css +4 -0
- package/dist/index.js +1163 -253
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1164 -254
- package/dist/index.modern.js.map +1 -1
- package/package.json +6 -3
package/dist/index.js
CHANGED
|
@@ -21,6 +21,8 @@ var fa = require('react-icons/fa');
|
|
|
21
21
|
var tinymceReact = require('@tinymce/tinymce-react');
|
|
22
22
|
var Chart = _interopDefault(require('react-apexcharts'));
|
|
23
23
|
var fi = require('react-icons/fi');
|
|
24
|
+
var pickers = require('@material-ui/pickers');
|
|
25
|
+
var MomentUtils = _interopDefault(require('@date-io/moment'));
|
|
24
26
|
var jsPDF = _interopDefault(require('jspdf'));
|
|
25
27
|
var html2canvas = _interopDefault(require('html2canvas'));
|
|
26
28
|
|
|
@@ -1054,6 +1056,8 @@ var FILTER_NAME;
|
|
|
1054
1056
|
FILTER_NAME["BandScore"] = "Current Grade";
|
|
1055
1057
|
FILTER_NAME["StudentName"] = "Student name";
|
|
1056
1058
|
FILTER_NAME["TeacherName"] = "Teacher name";
|
|
1059
|
+
FILTER_NAME["StartDate"] = "Start Date";
|
|
1060
|
+
FILTER_NAME["EndDate"] = "End Date";
|
|
1057
1061
|
})(FILTER_NAME || (FILTER_NAME = {}));
|
|
1058
1062
|
|
|
1059
1063
|
var header$1 = "Conference rubric";
|
|
@@ -1151,7 +1155,7 @@ var ConferenceRubricList = function ConferenceRubricList() {
|
|
|
1151
1155
|
}))));
|
|
1152
1156
|
};
|
|
1153
1157
|
|
|
1154
|
-
var styles = {"test":"_3ybTi","body-question-right":"_1H0W8","body-question":"_b-AXV","badge-icon":"_1fgfO","input-color-picker":"_2YR4l","question-list-session-template":"_114IY","delete-column-question-list-sesstion-template":"_qE7J0","conference-rubric-skill-column":"_2BV3o","conference-rubric-additional-row":"_1P4F2","conference-rubric-row-test":"_1SRmg","emotional-response":"_ZDINp","star-rating":"_Kzkzd","list-teacher-compare":"_Q0sF1","teacher-item":"_gu_yD","teacher-item-selected":"_33tYy","btn-filter":"_2VZin","color-filter":"_2M0vR","block-filter-component":"_1d6uY","select-filter-component":"_1XSIo","hidden":"_3o8gR","box-select":"_3ru37","radio-btn":"_1tQvL","box-select-label":"_3VNX5"};
|
|
1158
|
+
var styles = {"test":"_3ybTi","body-question-right":"_1H0W8","body-question":"_b-AXV","badge-icon":"_1fgfO","input-color-picker":"_2YR4l","question-list-session-template":"_114IY","delete-column-question-list-sesstion-template":"_qE7J0","conference-rubric-skill-column":"_2BV3o","conference-rubric-additional-row":"_1P4F2","conference-rubric-row-test":"_1SRmg","emotional-response":"_ZDINp","star-rating":"_Kzkzd","list-teacher-compare":"_Q0sF1","teacher-item":"_gu_yD","teacher-item-selected":"_33tYy","btn-filter":"_2VZin","color-filter":"_2M0vR","block-filter-component":"_1d6uY","select-filter-component":"_1XSIo","hidden":"_3o8gR","box-select":"_3ru37","radio-btn":"_1tQvL","box-select-label":"_3VNX5","date-picker":"_I8kqz"};
|
|
1155
1159
|
|
|
1156
1160
|
var ToggleInput = function ToggleInput(_ref) {
|
|
1157
1161
|
var value = _ref.value,
|
|
@@ -1300,7 +1304,8 @@ var QuestionList = function QuestionList(_ref) {
|
|
|
1300
1304
|
onRemove = _ref.onRemove,
|
|
1301
1305
|
isTeacherQuestion = _ref.isTeacherQuestion,
|
|
1302
1306
|
onChangeMandatory = _ref.onChangeMandatory,
|
|
1303
|
-
extraQuestionMandatory = _ref.extraQuestionMandatory
|
|
1307
|
+
extraQuestionMandatory = _ref.extraQuestionMandatory,
|
|
1308
|
+
isHiddenMandatory = _ref.isHiddenMandatory;
|
|
1304
1309
|
return React__default.createElement("div", {
|
|
1305
1310
|
className: "overflow-y-auto " + styles["question-list-session-template"] + " mt-2"
|
|
1306
1311
|
}, !!questions && !!questions.length ? React__default.createElement(reactstrap.Table, {
|
|
@@ -1312,7 +1317,7 @@ var QuestionList = function QuestionList(_ref) {
|
|
|
1312
1317
|
}, React__default.createElement("tbody", null, questions.map(function (question) {
|
|
1313
1318
|
return React__default.createElement("tr", {
|
|
1314
1319
|
key: question.id
|
|
1315
|
-
}, React__default.createElement("td", null, marioCore.getTextFromHTML(question.text)), React__default.createElement("td", null, question.isDefaultQuestion ? question.isMandatory ? React__default.createElement("i", null, "Mandatory") : "" : React__default.createElement(reactstrap.CustomInput, {
|
|
1320
|
+
}, React__default.createElement("td", null, marioCore.getTextFromHTML(question.text)), !isHiddenMandatory ? React__default.createElement("td", null, question.isDefaultQuestion ? question.isMandatory ? React__default.createElement("i", null, "Mandatory") : "" : React__default.createElement(reactstrap.CustomInput, {
|
|
1316
1321
|
id: "mandatory-" + (isTeacherQuestion ? "teacher" : "student") + "-" + question.text,
|
|
1317
1322
|
type: "checkbox",
|
|
1318
1323
|
label: "Mandatory",
|
|
@@ -1320,7 +1325,7 @@ var QuestionList = function QuestionList(_ref) {
|
|
|
1320
1325
|
onChange: function onChange() {
|
|
1321
1326
|
return onChangeMandatory(question.id, isTeacherQuestion);
|
|
1322
1327
|
}
|
|
1323
|
-
})), !question.isDefaultQuestion && React__default.createElement("td", {
|
|
1328
|
+
})) : null, !question.isDefaultQuestion && React__default.createElement("td", {
|
|
1324
1329
|
className: "text-center " + styles["delete-column-question-list-sesstion-template"]
|
|
1325
1330
|
}, React__default.createElement(marioCore.DeleteButtonIcon, {
|
|
1326
1331
|
onClick: function onClick() {
|
|
@@ -1418,7 +1423,8 @@ var QuestionSelector = function QuestionSelector(_ref) {
|
|
|
1418
1423
|
var value = _ref.value,
|
|
1419
1424
|
categoryId = _ref.categoryId,
|
|
1420
1425
|
onChange = _ref.onChange,
|
|
1421
|
-
externalQuestionIds = _ref.externalQuestionIds
|
|
1426
|
+
externalQuestionIds = _ref.externalQuestionIds,
|
|
1427
|
+
isDefaultQuestionSurvey = _ref.isDefaultQuestionSurvey;
|
|
1422
1428
|
|
|
1423
1429
|
var _useState = React.useState([]),
|
|
1424
1430
|
questions = _useState[0],
|
|
@@ -1428,7 +1434,8 @@ var QuestionSelector = function QuestionSelector(_ref) {
|
|
|
1428
1434
|
try {
|
|
1429
1435
|
var _temp2 = _catch(function () {
|
|
1430
1436
|
return Promise.resolve(get$2({
|
|
1431
|
-
categoryId: categoryId
|
|
1437
|
+
categoryId: categoryId,
|
|
1438
|
+
isDefaultQuestionSurvey: isDefaultQuestionSurvey
|
|
1432
1439
|
})).then(function (res) {
|
|
1433
1440
|
var _res$data;
|
|
1434
1441
|
|
|
@@ -12481,7 +12488,8 @@ var initValue$g = {
|
|
|
12481
12488
|
isSurvey: true,
|
|
12482
12489
|
subQuestions: [],
|
|
12483
12490
|
isMandatory: false,
|
|
12484
|
-
isBeforeSession: false
|
|
12491
|
+
isBeforeSession: false,
|
|
12492
|
+
isDefaultQuestionSurvey: false
|
|
12485
12493
|
};
|
|
12486
12494
|
var TITLE$h = "Question detail";
|
|
12487
12495
|
|
|
@@ -12721,7 +12729,19 @@ var QuestionDetail = function QuestionDetail() {
|
|
|
12721
12729
|
text: errors.text
|
|
12722
12730
|
})))), React__default.createElement(reactstrap.Col, {
|
|
12723
12731
|
md: 4
|
|
12724
|
-
}, React__default.createElement(reactstrap.Row, null, React__default.createElement(reactstrap.Col, {
|
|
12732
|
+
}, React__default.createElement(reactstrap.Row, null, [marioCore.QUESTION_TYPES.RATING, marioCore.QUESTION_TYPES.SUMMARIZE, marioCore.QUESTION_TYPES.TEXT_INPUT, marioCore.QUESTION_TYPES.SINGLE_CHOICE].includes(values.type) && React__default.createElement(reactstrap.Col, {
|
|
12733
|
+
md: 12,
|
|
12734
|
+
className: "mb-1"
|
|
12735
|
+
}, React__default.createElement(reactstrap.CustomInput, {
|
|
12736
|
+
type: "checkbox",
|
|
12737
|
+
id: "question-default-survey-checkbox",
|
|
12738
|
+
label: "Is default question survey",
|
|
12739
|
+
checked: values.isDefaultQuestionSurvey,
|
|
12740
|
+
onChange: function onChange() {
|
|
12741
|
+
setFieldValue("isDefaultQuestionSurvey", !values.isDefaultQuestionSurvey);
|
|
12742
|
+
setEditedTrue();
|
|
12743
|
+
}
|
|
12744
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
12725
12745
|
md: 12,
|
|
12726
12746
|
className: "mb-1"
|
|
12727
12747
|
}, React__default.createElement(reactstrap.Row, null, [marioCore.QUESTION_TYPES.EMOTIONAL, marioCore.QUESTION_TYPES.LEARNING_STRATEGY, marioCore.QUESTION_TYPES.RATING, marioCore.QUESTION_TYPES.SUMMARIZE, marioCore.QUESTION_TYPES.TEXT_INPUT_WITH_SUGGESTIONS, marioCore.QUESTION_TYPES.TEXT_INPUT].includes(values.type) && React__default.createElement(React__default.Fragment, null, React__default.createElement(reactstrap.Col, {
|
|
@@ -14420,6 +14440,7 @@ var QuestionCateModal = function QuestionCateModal(props, ref) {
|
|
|
14420
14440
|
var QuestionCateModal$1 = React.forwardRef(QuestionCateModal);
|
|
14421
14441
|
|
|
14422
14442
|
var QUESTION_CATE_URL = marioCore.BASE_URL + "/api/questioncategory";
|
|
14443
|
+
var CATE_SURVEY_URL = marioCore.BASE_URL + "/api/questioncategory/template-survey";
|
|
14423
14444
|
var get$m = function get(filter) {
|
|
14424
14445
|
return marioCore.api.get(QUESTION_CATE_URL, {
|
|
14425
14446
|
params: filter
|
|
@@ -14437,6 +14458,23 @@ var update$h = function update(data) {
|
|
|
14437
14458
|
var remove$h = function remove(id) {
|
|
14438
14459
|
return marioCore.api["delete"](QUESTION_CATE_URL + "/" + id);
|
|
14439
14460
|
};
|
|
14461
|
+
var getSurvey = function getSurvey(filter) {
|
|
14462
|
+
return marioCore.api.get(CATE_SURVEY_URL, {
|
|
14463
|
+
params: filter
|
|
14464
|
+
});
|
|
14465
|
+
};
|
|
14466
|
+
var getSurveyById = function getSurveyById(id) {
|
|
14467
|
+
return marioCore.api.get(CATE_SURVEY_URL + "/" + id);
|
|
14468
|
+
};
|
|
14469
|
+
var createSurvey = function createSurvey(data) {
|
|
14470
|
+
return marioCore.api.post(CATE_SURVEY_URL, data);
|
|
14471
|
+
};
|
|
14472
|
+
var updateSurvey = function updateSurvey(data) {
|
|
14473
|
+
return marioCore.api.put(CATE_SURVEY_URL + "/" + data.id, data);
|
|
14474
|
+
};
|
|
14475
|
+
var removeSurvey = function removeSurvey(id) {
|
|
14476
|
+
return marioCore.api["delete"](CATE_SURVEY_URL + "/" + id);
|
|
14477
|
+
};
|
|
14440
14478
|
|
|
14441
14479
|
var initValue$k = {
|
|
14442
14480
|
name: "",
|
|
@@ -14671,16 +14709,556 @@ var QuestionCateList = function QuestionCateList() {
|
|
|
14671
14709
|
filters = _useQuestionCateList.filters,
|
|
14672
14710
|
changeFilters = _useQuestionCateList.changeFilters;
|
|
14673
14711
|
|
|
14674
|
-
var _useQuestionCateDetai = useQuestionCateDetail(),
|
|
14675
|
-
id = _useQuestionCateDetai.id,
|
|
14676
|
-
setId = _useQuestionCateDetai.setId,
|
|
14677
|
-
questionCateDetail = _useQuestionCateDetai.questionCateDetail,
|
|
14678
|
-
confirmData = _useQuestionCateDetai.confirmData,
|
|
14679
|
-
reset = _useQuestionCateDetai.reset,
|
|
14680
|
-
edited = _useQuestionCateDetai.edited,
|
|
14681
|
-
setEdited = _useQuestionCateDetai.setEdited,
|
|
14682
|
-
setEditedTrue = _useQuestionCateDetai.setEditedTrue,
|
|
14683
|
-
setEditedFalse = _useQuestionCateDetai.setEditedFalse;
|
|
14712
|
+
var _useQuestionCateDetai = useQuestionCateDetail(),
|
|
14713
|
+
id = _useQuestionCateDetai.id,
|
|
14714
|
+
setId = _useQuestionCateDetai.setId,
|
|
14715
|
+
questionCateDetail = _useQuestionCateDetai.questionCateDetail,
|
|
14716
|
+
confirmData = _useQuestionCateDetai.confirmData,
|
|
14717
|
+
reset = _useQuestionCateDetai.reset,
|
|
14718
|
+
edited = _useQuestionCateDetai.edited,
|
|
14719
|
+
setEdited = _useQuestionCateDetai.setEdited,
|
|
14720
|
+
setEditedTrue = _useQuestionCateDetai.setEditedTrue,
|
|
14721
|
+
setEditedFalse = _useQuestionCateDetai.setEditedFalse;
|
|
14722
|
+
|
|
14723
|
+
var openModal = function openModal(questionCateId) {
|
|
14724
|
+
questionCateId ? setId(questionCateId) : setId(0);
|
|
14725
|
+
modal && modal.current && modal.current.toggle();
|
|
14726
|
+
};
|
|
14727
|
+
|
|
14728
|
+
var onConfirm = function onConfirm(values) {
|
|
14729
|
+
confirmData(values, function () {
|
|
14730
|
+
modal && modal.current && modal.current.toggle();
|
|
14731
|
+
getData();
|
|
14732
|
+
});
|
|
14733
|
+
setEditedFalse();
|
|
14734
|
+
};
|
|
14735
|
+
|
|
14736
|
+
var onRemove = function onRemove(id) {
|
|
14737
|
+
removeData(id);
|
|
14738
|
+
};
|
|
14739
|
+
|
|
14740
|
+
var onCancel = function onCancel() {
|
|
14741
|
+
return reset();
|
|
14742
|
+
};
|
|
14743
|
+
|
|
14744
|
+
return React__default.createElement("div", null, React__default.createElement(QuestionCateModal$1, {
|
|
14745
|
+
ref: modal,
|
|
14746
|
+
header: !!id ? "Edit category" : "Create category",
|
|
14747
|
+
confirmText: !!id ? "Update" : "Create",
|
|
14748
|
+
onConfirm: onConfirm,
|
|
14749
|
+
onCancel: onCancel,
|
|
14750
|
+
questionCateDetail: questionCateDetail,
|
|
14751
|
+
questionCateList: questionCateList,
|
|
14752
|
+
edited: edited,
|
|
14753
|
+
setEdited: setEdited,
|
|
14754
|
+
setEditedTrue: setEditedTrue,
|
|
14755
|
+
setEditedFalse: setEditedFalse
|
|
14756
|
+
}), React__default.createElement(marioCore.QuitPrompt, {
|
|
14757
|
+
when: edited
|
|
14758
|
+
}), React__default.createElement(reactstrap.Row, {
|
|
14759
|
+
className: "my-2"
|
|
14760
|
+
}, React__default.createElement(reactstrap.Col, {
|
|
14761
|
+
md: 4
|
|
14762
|
+
}, React__default.createElement(marioCore.AddButton, {
|
|
14763
|
+
text: "Create category",
|
|
14764
|
+
onClick: function onClick() {
|
|
14765
|
+
return openModal();
|
|
14766
|
+
}
|
|
14767
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
14768
|
+
md: 4,
|
|
14769
|
+
className: "d-flex align-items-center justify-content-end"
|
|
14770
|
+
}, "Total of category: ", totalItems)), React__default.createElement(reactstrap.Row, {
|
|
14771
|
+
className: "mb-2"
|
|
14772
|
+
}, React__default.createElement(reactstrap.Col, {
|
|
14773
|
+
md: 8
|
|
14774
|
+
}, questionCateList && questionCateList.length > 0 ? React__default.createElement(reactstrap.Table, {
|
|
14775
|
+
bordered: true,
|
|
14776
|
+
hover: true,
|
|
14777
|
+
striped: true,
|
|
14778
|
+
responsive: true,
|
|
14779
|
+
size: "sm"
|
|
14780
|
+
}, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", {
|
|
14781
|
+
className: "align-top"
|
|
14782
|
+
}, "Name"), React__default.createElement("th", {
|
|
14783
|
+
className: "align-top"
|
|
14784
|
+
}, "Number of question"), React__default.createElement("th", {
|
|
14785
|
+
className: "text-center"
|
|
14786
|
+
}, "Action"))), React__default.createElement("tbody", null, questionCateList.map(function (record) {
|
|
14787
|
+
return React__default.createElement("tr", {
|
|
14788
|
+
key: record.id
|
|
14789
|
+
}, React__default.createElement("td", {
|
|
14790
|
+
className: "align-middle"
|
|
14791
|
+
}, React__default.createElement(marioCore.LinkEditButton, {
|
|
14792
|
+
label: record.name,
|
|
14793
|
+
onClick: function onClick() {
|
|
14794
|
+
return openModal(record.id);
|
|
14795
|
+
}
|
|
14796
|
+
})), React__default.createElement("td", {
|
|
14797
|
+
className: "align-middle"
|
|
14798
|
+
}, record.numberOfQuestions), React__default.createElement("td", {
|
|
14799
|
+
className: "text-center align-middle"
|
|
14800
|
+
}, React__default.createElement(marioCore.DeleteButtonIcon, {
|
|
14801
|
+
onClick: function onClick() {
|
|
14802
|
+
return onRemove(record.id);
|
|
14803
|
+
}
|
|
14804
|
+
})));
|
|
14805
|
+
}))) : React__default.createElement(marioCore.EmptyDataAlert, {
|
|
14806
|
+
label: "question category"
|
|
14807
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
14808
|
+
md: 8,
|
|
14809
|
+
className: "text-right"
|
|
14810
|
+
}, React__default.createElement(marioCore.CustomPagination, {
|
|
14811
|
+
totalRecordCount: totalItems,
|
|
14812
|
+
filters: filters,
|
|
14813
|
+
changePageSize: function changePageSize(pageSize) {
|
|
14814
|
+
return changeFilters({
|
|
14815
|
+
pageSize: pageSize
|
|
14816
|
+
});
|
|
14817
|
+
},
|
|
14818
|
+
changePage: function changePage(currentPage) {
|
|
14819
|
+
return changeFilters({
|
|
14820
|
+
currentPage: currentPage
|
|
14821
|
+
});
|
|
14822
|
+
}
|
|
14823
|
+
}))));
|
|
14824
|
+
};
|
|
14825
|
+
|
|
14826
|
+
var schema$f = yup.object({
|
|
14827
|
+
name: yup.string().required("Name is required")
|
|
14828
|
+
});
|
|
14829
|
+
|
|
14830
|
+
var QuestionCateModal$2 = function QuestionCateModal(props, ref) {
|
|
14831
|
+
var header = props.header,
|
|
14832
|
+
confirmText = props.confirmText,
|
|
14833
|
+
onConfirm = props.onConfirm,
|
|
14834
|
+
questionCateDetail = props.questionCateDetail,
|
|
14835
|
+
onCancel = props.onCancel,
|
|
14836
|
+
edited = props.edited,
|
|
14837
|
+
setEdited = props.setEdited,
|
|
14838
|
+
setEditedTrue = props.setEditedTrue,
|
|
14839
|
+
setEditedFalse = props.setEditedFalse,
|
|
14840
|
+
categoryId = props.categoryId,
|
|
14841
|
+
setCategoryId = props.setCategoryId,
|
|
14842
|
+
questionSelectorValue = props.questionSelectorValue,
|
|
14843
|
+
setTemporaryQuestion = props.setTemporaryQuestion,
|
|
14844
|
+
addQuestion = props.addQuestion,
|
|
14845
|
+
listQuestions = props.listQuestions,
|
|
14846
|
+
removeQuestion = props.removeQuestion;
|
|
14847
|
+
return React__default.createElement(formik.Formik, {
|
|
14848
|
+
initialValues: questionCateDetail,
|
|
14849
|
+
enableReinitialize: true,
|
|
14850
|
+
validationSchema: schema$f,
|
|
14851
|
+
onSubmit: function onSubmit(values, actions) {
|
|
14852
|
+
onConfirm(values);
|
|
14853
|
+
actions.resetForm();
|
|
14854
|
+
}
|
|
14855
|
+
}, function (formikProps) {
|
|
14856
|
+
var values = formikProps.values,
|
|
14857
|
+
touched = formikProps.touched,
|
|
14858
|
+
errors = formikProps.errors,
|
|
14859
|
+
handleChange = formikProps.handleChange,
|
|
14860
|
+
handleBlur = formikProps.handleBlur,
|
|
14861
|
+
handleSubmit = formikProps.handleSubmit;
|
|
14862
|
+
return React__default.createElement(marioCore.CommonModal, {
|
|
14863
|
+
header: header,
|
|
14864
|
+
confirmText: confirmText,
|
|
14865
|
+
onConfirm: handleSubmit,
|
|
14866
|
+
onCancel: onCancel,
|
|
14867
|
+
ref: ref,
|
|
14868
|
+
edited: edited,
|
|
14869
|
+
setEdited: setEdited,
|
|
14870
|
+
setEditedFalse: setEditedFalse,
|
|
14871
|
+
size: "lg"
|
|
14872
|
+
}, React__default.createElement(reactstrap.Row, null, React__default.createElement(reactstrap.Col, {
|
|
14873
|
+
md: 12,
|
|
14874
|
+
className: "mb-3"
|
|
14875
|
+
}, React__default.createElement(marioCore.RequiredLabel, {
|
|
14876
|
+
text: "Name"
|
|
14877
|
+
}), React__default.createElement(reactstrap.Input, {
|
|
14878
|
+
name: "name",
|
|
14879
|
+
placeholder: "Name",
|
|
14880
|
+
value: values.name,
|
|
14881
|
+
onChange: function onChange(e) {
|
|
14882
|
+
handleChange(e);
|
|
14883
|
+
setEditedTrue();
|
|
14884
|
+
},
|
|
14885
|
+
onBlur: handleBlur("name")
|
|
14886
|
+
}), touched.name && errors.name && React__default.createElement(marioCore.ErrorHandler, {
|
|
14887
|
+
text: errors.name
|
|
14888
|
+
})), React__default.createElement(reactstrap.Col, {
|
|
14889
|
+
md: 12,
|
|
14890
|
+
className: "mb-3"
|
|
14891
|
+
}, React__default.createElement("label", null, "Question Category"), React__default.createElement(marioCore.QuestionCategorySelector, {
|
|
14892
|
+
id: categoryId,
|
|
14893
|
+
onChange: function onChange(e) {
|
|
14894
|
+
setCategoryId(e.value);
|
|
14895
|
+
setEditedTrue();
|
|
14896
|
+
},
|
|
14897
|
+
placeholder: "Select question category"
|
|
14898
|
+
}))), React__default.createElement(reactstrap.Row, {
|
|
14899
|
+
className: "mb-3"
|
|
14900
|
+
}, React__default.createElement(reactstrap.Col, {
|
|
14901
|
+
md: 12
|
|
14902
|
+
}, React__default.createElement("label", null, "Select Question"), React__default.createElement(QuestionSelector, {
|
|
14903
|
+
categoryId: categoryId,
|
|
14904
|
+
value: questionSelectorValue,
|
|
14905
|
+
onChange: function onChange(e) {
|
|
14906
|
+
setTemporaryQuestion(e);
|
|
14907
|
+
setEditedTrue();
|
|
14908
|
+
},
|
|
14909
|
+
externalQuestionIds: listQuestions.map(function (item) {
|
|
14910
|
+
return item.id;
|
|
14911
|
+
}),
|
|
14912
|
+
isDefaultQuestionSurvey: true
|
|
14913
|
+
}))), React__default.createElement(reactstrap.Row, null, React__default.createElement(reactstrap.Col, {
|
|
14914
|
+
md: 4,
|
|
14915
|
+
className: "float-right"
|
|
14916
|
+
}, React__default.createElement(reactstrap.Button, {
|
|
14917
|
+
color: "success",
|
|
14918
|
+
className: "h-100 w-100",
|
|
14919
|
+
onClick: addQuestion
|
|
14920
|
+
}, "Add questions"))), React__default.createElement(reactstrap.Row, {
|
|
14921
|
+
className: "mb-3"
|
|
14922
|
+
}, React__default.createElement(reactstrap.Col, {
|
|
14923
|
+
md: 12
|
|
14924
|
+
}, React__default.createElement(QuestionList, {
|
|
14925
|
+
isHiddenMandatory: true,
|
|
14926
|
+
questions: listQuestions,
|
|
14927
|
+
onRemove: removeQuestion,
|
|
14928
|
+
onChangeMandatory: function onChangeMandatory() {}
|
|
14929
|
+
}))));
|
|
14930
|
+
});
|
|
14931
|
+
};
|
|
14932
|
+
|
|
14933
|
+
var TemplateCateModal = React.forwardRef(QuestionCateModal$2);
|
|
14934
|
+
|
|
14935
|
+
var initValue$l = {
|
|
14936
|
+
name: "",
|
|
14937
|
+
questionIds: []
|
|
14938
|
+
};
|
|
14939
|
+
|
|
14940
|
+
var useTemplateCateDetail = function useTemplateCateDetail() {
|
|
14941
|
+
var dispatch = reactRedux.useDispatch();
|
|
14942
|
+
|
|
14943
|
+
var _useState = React.useState(0),
|
|
14944
|
+
id = _useState[0],
|
|
14945
|
+
setId = _useState[1];
|
|
14946
|
+
|
|
14947
|
+
var _useState2 = React.useState(initValue$l),
|
|
14948
|
+
questionCateDetail = _useState2[0],
|
|
14949
|
+
setQuestionCateDetail = _useState2[1];
|
|
14950
|
+
|
|
14951
|
+
var _useState3 = React.useState(false),
|
|
14952
|
+
edited = _useState3[0],
|
|
14953
|
+
setEdited = _useState3[1];
|
|
14954
|
+
|
|
14955
|
+
var _useState4 = React.useState(0),
|
|
14956
|
+
categoryId = _useState4[0],
|
|
14957
|
+
setCategoryId = _useState4[1];
|
|
14958
|
+
|
|
14959
|
+
var _useState5 = React.useState(null),
|
|
14960
|
+
temporaryQuestion = _useState5[0],
|
|
14961
|
+
setTemporaryQuestion = _useState5[1];
|
|
14962
|
+
|
|
14963
|
+
var _useState6 = React.useState([]),
|
|
14964
|
+
listQuestions = _useState6[0],
|
|
14965
|
+
setListQuestions = _useState6[1];
|
|
14966
|
+
|
|
14967
|
+
var setEditedTrue = function setEditedTrue() {
|
|
14968
|
+
try {
|
|
14969
|
+
localStorage.setItem(window.location.href, "true");
|
|
14970
|
+
setEdited(true);
|
|
14971
|
+
return Promise.resolve();
|
|
14972
|
+
} catch (e) {
|
|
14973
|
+
return Promise.reject(e);
|
|
14974
|
+
}
|
|
14975
|
+
};
|
|
14976
|
+
|
|
14977
|
+
var setEditedFalse = function setEditedFalse() {
|
|
14978
|
+
try {
|
|
14979
|
+
!!localStorage.getItem(window.location.href) && localStorage.removeItem(window.location.href);
|
|
14980
|
+
setEdited(false);
|
|
14981
|
+
return Promise.resolve();
|
|
14982
|
+
} catch (e) {
|
|
14983
|
+
return Promise.reject(e);
|
|
14984
|
+
}
|
|
14985
|
+
};
|
|
14986
|
+
|
|
14987
|
+
React.useEffect(function () {
|
|
14988
|
+
!!id ? getData() : setQuestionCateDetail(initValue$l);
|
|
14989
|
+
}, [id]);
|
|
14990
|
+
React.useEffect(function () {
|
|
14991
|
+
setEditedFalse();
|
|
14992
|
+
}, []);
|
|
14993
|
+
|
|
14994
|
+
var reset = function reset() {
|
|
14995
|
+
setQuestionCateDetail(initValue$l);
|
|
14996
|
+
setId(0);
|
|
14997
|
+
};
|
|
14998
|
+
|
|
14999
|
+
var getData = React.useCallback(function () {
|
|
15000
|
+
try {
|
|
15001
|
+
var _temp3 = function _temp3() {
|
|
15002
|
+
dispatch(marioCore.setLoading(false));
|
|
15003
|
+
};
|
|
15004
|
+
|
|
15005
|
+
dispatch(marioCore.setLoading(true));
|
|
15006
|
+
|
|
15007
|
+
var _temp4 = _catch(function () {
|
|
15008
|
+
return Promise.resolve(getSurveyById(id)).then(function (res) {
|
|
15009
|
+
var data = {
|
|
15010
|
+
id: res.data.id,
|
|
15011
|
+
name: res.data.name,
|
|
15012
|
+
questionIds: res.data.questionList.map(function (item) {
|
|
15013
|
+
return item === null || item === void 0 ? void 0 : item.id;
|
|
15014
|
+
})
|
|
15015
|
+
};
|
|
15016
|
+
setQuestionCateDetail(data);
|
|
15017
|
+
setListQuestions(res.data.questionList);
|
|
15018
|
+
});
|
|
15019
|
+
}, function (err) {
|
|
15020
|
+
var _err$response, _err$response$data;
|
|
15021
|
+
|
|
15022
|
+
dispatch(marioCore.setAlert({
|
|
15023
|
+
type: "danger",
|
|
15024
|
+
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
|
|
15025
|
+
}));
|
|
15026
|
+
});
|
|
15027
|
+
|
|
15028
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
15029
|
+
} catch (e) {
|
|
15030
|
+
return Promise.reject(e);
|
|
15031
|
+
}
|
|
15032
|
+
}, [id]);
|
|
15033
|
+
var confirmData = React.useCallback(function (values, cb) {
|
|
15034
|
+
try {
|
|
15035
|
+
var _temp7 = function _temp7() {
|
|
15036
|
+
dispatch(marioCore.setLoading(false));
|
|
15037
|
+
};
|
|
15038
|
+
|
|
15039
|
+
dispatch(marioCore.setLoading(true));
|
|
15040
|
+
|
|
15041
|
+
var _temp8 = _catch(function () {
|
|
15042
|
+
var next = !!id ? updateSurvey : createSurvey;
|
|
15043
|
+
values.questionIds = listQuestions.map(function (item) {
|
|
15044
|
+
return item.id;
|
|
15045
|
+
});
|
|
15046
|
+
return Promise.resolve(next(values)).then(function () {
|
|
15047
|
+
dispatch(marioCore.setAlert({
|
|
15048
|
+
type: "success",
|
|
15049
|
+
message: (!!id ? "Update" : "Create") + " question category successfully"
|
|
15050
|
+
}));
|
|
15051
|
+
cb && cb();
|
|
15052
|
+
!!id && setId(0);
|
|
15053
|
+
});
|
|
15054
|
+
}, function (err) {
|
|
15055
|
+
var _err$response2, _err$response2$data;
|
|
15056
|
+
|
|
15057
|
+
dispatch(marioCore.setAlert({
|
|
15058
|
+
type: "danger",
|
|
15059
|
+
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
|
|
15060
|
+
}));
|
|
15061
|
+
});
|
|
15062
|
+
|
|
15063
|
+
return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp7) : _temp7(_temp8));
|
|
15064
|
+
} catch (e) {
|
|
15065
|
+
return Promise.reject(e);
|
|
15066
|
+
}
|
|
15067
|
+
}, [id, listQuestions]);
|
|
15068
|
+
var questionSelectorValue = React.useMemo(function () {
|
|
15069
|
+
if (!temporaryQuestion) return null;
|
|
15070
|
+
var pureText = marioCore.getTextFromHTML(temporaryQuestion.text);
|
|
15071
|
+
var shortenPureText = pureText.length < 100 ? pureText : pureText.slice(0, 100) + "...";
|
|
15072
|
+
return {
|
|
15073
|
+
id: temporaryQuestion.id,
|
|
15074
|
+
value: temporaryQuestion.id,
|
|
15075
|
+
label: shortenPureText,
|
|
15076
|
+
text: temporaryQuestion.text
|
|
15077
|
+
};
|
|
15078
|
+
}, [temporaryQuestion]);
|
|
15079
|
+
var addQuestion = React.useCallback(function () {
|
|
15080
|
+
if (!temporaryQuestion) return;
|
|
15081
|
+
var question = {
|
|
15082
|
+
id: temporaryQuestion.id,
|
|
15083
|
+
text: temporaryQuestion.text
|
|
15084
|
+
};
|
|
15085
|
+
setListQuestions([].concat(listQuestions, [question]));
|
|
15086
|
+
setTemporaryQuestion(null);
|
|
15087
|
+
setEditedTrue();
|
|
15088
|
+
}, [listQuestions, temporaryQuestion]);
|
|
15089
|
+
var removeQuestion = React.useCallback(function (questionId) {
|
|
15090
|
+
dispatch(marioCore.setModal({
|
|
15091
|
+
isOpen: true,
|
|
15092
|
+
type: "warning",
|
|
15093
|
+
message: "Do you want to remove this question?",
|
|
15094
|
+
onConfirm: function onConfirm() {
|
|
15095
|
+
setListQuestions(listQuestions.filter(function (question) {
|
|
15096
|
+
return question.id !== questionId;
|
|
15097
|
+
}));
|
|
15098
|
+
}
|
|
15099
|
+
}));
|
|
15100
|
+
setEditedTrue();
|
|
15101
|
+
}, [listQuestions]);
|
|
15102
|
+
return {
|
|
15103
|
+
id: id,
|
|
15104
|
+
setId: setId,
|
|
15105
|
+
questionCateDetail: questionCateDetail,
|
|
15106
|
+
confirmData: confirmData,
|
|
15107
|
+
initValue: initValue$l,
|
|
15108
|
+
reset: reset,
|
|
15109
|
+
edited: edited,
|
|
15110
|
+
setEdited: setEdited,
|
|
15111
|
+
setEditedTrue: setEditedTrue,
|
|
15112
|
+
setEditedFalse: setEditedFalse,
|
|
15113
|
+
categoryId: categoryId,
|
|
15114
|
+
setCategoryId: setCategoryId,
|
|
15115
|
+
questionSelectorValue: questionSelectorValue,
|
|
15116
|
+
setTemporaryQuestion: setTemporaryQuestion,
|
|
15117
|
+
addQuestion: addQuestion,
|
|
15118
|
+
listQuestions: listQuestions,
|
|
15119
|
+
setListQuestions: setListQuestions,
|
|
15120
|
+
removeQuestion: removeQuestion
|
|
15121
|
+
};
|
|
15122
|
+
};
|
|
15123
|
+
|
|
15124
|
+
var TITLE$m = "Question category list";
|
|
15125
|
+
|
|
15126
|
+
var useTemplateCateList = function useTemplateCateList() {
|
|
15127
|
+
var questionCateList = reactRedux.useSelector(function (state) {
|
|
15128
|
+
return state.questionCate.questionCateList;
|
|
15129
|
+
});
|
|
15130
|
+
var totalItems = reactRedux.useSelector(function (state) {
|
|
15131
|
+
return state.questionCate.totalItems;
|
|
15132
|
+
});
|
|
15133
|
+
|
|
15134
|
+
var _useFilters = marioCore.useFilters(),
|
|
15135
|
+
filters = _useFilters.filters,
|
|
15136
|
+
changeFilters = _useFilters.changeFilters;
|
|
15137
|
+
|
|
15138
|
+
var dispatch = reactRedux.useDispatch();
|
|
15139
|
+
var getData = React.useCallback(function () {
|
|
15140
|
+
try {
|
|
15141
|
+
var _temp3 = function _temp3() {
|
|
15142
|
+
dispatch(marioCore.setLoading(false));
|
|
15143
|
+
};
|
|
15144
|
+
|
|
15145
|
+
dispatch(marioCore.setLoading(true));
|
|
15146
|
+
|
|
15147
|
+
var _temp4 = _catch(function () {
|
|
15148
|
+
return Promise.resolve(getSurvey(filters)).then(function (res) {
|
|
15149
|
+
var _res$data = res.data,
|
|
15150
|
+
items = _res$data.items,
|
|
15151
|
+
totalItems = _res$data.totalItems;
|
|
15152
|
+
dispatch(marioCore.setQuestionCateList({
|
|
15153
|
+
questionCateList: items,
|
|
15154
|
+
totalItems: totalItems
|
|
15155
|
+
}));
|
|
15156
|
+
});
|
|
15157
|
+
}, function (err) {
|
|
15158
|
+
var _err$response, _err$response$data;
|
|
15159
|
+
|
|
15160
|
+
dispatch(marioCore.setAlert({
|
|
15161
|
+
type: "danger",
|
|
15162
|
+
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
|
|
15163
|
+
}));
|
|
15164
|
+
});
|
|
15165
|
+
|
|
15166
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
15167
|
+
} catch (e) {
|
|
15168
|
+
return Promise.reject(e);
|
|
15169
|
+
}
|
|
15170
|
+
}, [dispatch, filters]);
|
|
15171
|
+
var removeData = React.useCallback(function (id) {
|
|
15172
|
+
dispatch(marioCore.setLoading(true));
|
|
15173
|
+
|
|
15174
|
+
try {
|
|
15175
|
+
dispatch(marioCore.setModal({
|
|
15176
|
+
isOpen: true,
|
|
15177
|
+
type: "warning",
|
|
15178
|
+
message: "Do you want to remove this category?",
|
|
15179
|
+
onConfirm: function () {
|
|
15180
|
+
try {
|
|
15181
|
+
var _temp6 = _catch(function () {
|
|
15182
|
+
return Promise.resolve(removeSurvey(id)).then(function () {
|
|
15183
|
+
dispatch(marioCore.setAlert({
|
|
15184
|
+
type: "success",
|
|
15185
|
+
message: "Remove category successfully"
|
|
15186
|
+
}));
|
|
15187
|
+
changeFilters({
|
|
15188
|
+
currentPage: 1
|
|
15189
|
+
});
|
|
15190
|
+
});
|
|
15191
|
+
}, function (err) {
|
|
15192
|
+
var _err$response2, _err$response2$data;
|
|
15193
|
+
|
|
15194
|
+
dispatch(marioCore.setAlert({
|
|
15195
|
+
type: "danger",
|
|
15196
|
+
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
|
|
15197
|
+
}));
|
|
15198
|
+
});
|
|
15199
|
+
|
|
15200
|
+
return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
|
|
15201
|
+
} catch (e) {
|
|
15202
|
+
return Promise.reject(e);
|
|
15203
|
+
}
|
|
15204
|
+
}
|
|
15205
|
+
}));
|
|
15206
|
+
} catch (err) {
|
|
15207
|
+
var _err$response3, _err$response3$data;
|
|
15208
|
+
|
|
15209
|
+
dispatch(marioCore.setAlert({
|
|
15210
|
+
type: "danger",
|
|
15211
|
+
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
|
|
15212
|
+
}));
|
|
15213
|
+
}
|
|
15214
|
+
|
|
15215
|
+
dispatch(marioCore.setLoading(false));
|
|
15216
|
+
}, [filters]);
|
|
15217
|
+
React.useEffect(function () {
|
|
15218
|
+
document.title = TITLE$m;
|
|
15219
|
+
}, []);
|
|
15220
|
+
React.useEffect(function () {
|
|
15221
|
+
getData();
|
|
15222
|
+
}, [filters]);
|
|
15223
|
+
return {
|
|
15224
|
+
questionCateList: questionCateList,
|
|
15225
|
+
totalItems: totalItems,
|
|
15226
|
+
filters: filters,
|
|
15227
|
+
changeFilters: changeFilters,
|
|
15228
|
+
getData: getData,
|
|
15229
|
+
removeData: removeData
|
|
15230
|
+
};
|
|
15231
|
+
};
|
|
15232
|
+
|
|
15233
|
+
var TemplateSurveyList = function TemplateSurveyList() {
|
|
15234
|
+
var modal = React.useRef();
|
|
15235
|
+
|
|
15236
|
+
var _useTemplateCateList = useTemplateCateList(),
|
|
15237
|
+
questionCateList = _useTemplateCateList.questionCateList,
|
|
15238
|
+
totalItems = _useTemplateCateList.totalItems,
|
|
15239
|
+
getData = _useTemplateCateList.getData,
|
|
15240
|
+
removeData = _useTemplateCateList.removeData,
|
|
15241
|
+
filters = _useTemplateCateList.filters,
|
|
15242
|
+
changeFilters = _useTemplateCateList.changeFilters;
|
|
15243
|
+
|
|
15244
|
+
var _useTemplateCateDetai = useTemplateCateDetail(),
|
|
15245
|
+
id = _useTemplateCateDetai.id,
|
|
15246
|
+
setId = _useTemplateCateDetai.setId,
|
|
15247
|
+
questionCateDetail = _useTemplateCateDetai.questionCateDetail,
|
|
15248
|
+
confirmData = _useTemplateCateDetai.confirmData,
|
|
15249
|
+
reset = _useTemplateCateDetai.reset,
|
|
15250
|
+
edited = _useTemplateCateDetai.edited,
|
|
15251
|
+
setEdited = _useTemplateCateDetai.setEdited,
|
|
15252
|
+
setEditedTrue = _useTemplateCateDetai.setEditedTrue,
|
|
15253
|
+
setEditedFalse = _useTemplateCateDetai.setEditedFalse,
|
|
15254
|
+
categoryId = _useTemplateCateDetai.categoryId,
|
|
15255
|
+
setCategoryId = _useTemplateCateDetai.setCategoryId,
|
|
15256
|
+
questionSelectorValue = _useTemplateCateDetai.questionSelectorValue,
|
|
15257
|
+
setTemporaryQuestion = _useTemplateCateDetai.setTemporaryQuestion,
|
|
15258
|
+
addQuestion = _useTemplateCateDetai.addQuestion,
|
|
15259
|
+
listQuestions = _useTemplateCateDetai.listQuestions,
|
|
15260
|
+
setListQuestions = _useTemplateCateDetai.setListQuestions,
|
|
15261
|
+
removeQuestion = _useTemplateCateDetai.removeQuestion;
|
|
14684
15262
|
|
|
14685
15263
|
var openModal = function openModal(questionCateId) {
|
|
14686
15264
|
questionCateId ? setId(questionCateId) : setId(0);
|
|
@@ -14690,6 +15268,8 @@ var QuestionCateList = function QuestionCateList() {
|
|
|
14690
15268
|
var onConfirm = function onConfirm(values) {
|
|
14691
15269
|
confirmData(values, function () {
|
|
14692
15270
|
modal && modal.current && modal.current.toggle();
|
|
15271
|
+
setListQuestions([]);
|
|
15272
|
+
setCategoryId(0);
|
|
14693
15273
|
getData();
|
|
14694
15274
|
});
|
|
14695
15275
|
setEditedFalse();
|
|
@@ -14703,9 +15283,9 @@ var QuestionCateList = function QuestionCateList() {
|
|
|
14703
15283
|
return reset();
|
|
14704
15284
|
};
|
|
14705
15285
|
|
|
14706
|
-
return React__default.createElement("div", null, React__default.createElement(
|
|
15286
|
+
return React__default.createElement("div", null, React__default.createElement(TemplateCateModal, {
|
|
14707
15287
|
ref: modal,
|
|
14708
|
-
header: !!id ? "Edit
|
|
15288
|
+
header: !!id ? "Edit template" : "Create template",
|
|
14709
15289
|
confirmText: !!id ? "Update" : "Create",
|
|
14710
15290
|
onConfirm: onConfirm,
|
|
14711
15291
|
onCancel: onCancel,
|
|
@@ -14714,7 +15294,14 @@ var QuestionCateList = function QuestionCateList() {
|
|
|
14714
15294
|
edited: edited,
|
|
14715
15295
|
setEdited: setEdited,
|
|
14716
15296
|
setEditedTrue: setEditedTrue,
|
|
14717
|
-
setEditedFalse: setEditedFalse
|
|
15297
|
+
setEditedFalse: setEditedFalse,
|
|
15298
|
+
categoryId: categoryId,
|
|
15299
|
+
setCategoryId: setCategoryId,
|
|
15300
|
+
questionSelectorValue: questionSelectorValue,
|
|
15301
|
+
setTemporaryQuestion: setTemporaryQuestion,
|
|
15302
|
+
addQuestion: addQuestion,
|
|
15303
|
+
listQuestions: listQuestions,
|
|
15304
|
+
removeQuestion: removeQuestion
|
|
14718
15305
|
}), React__default.createElement(marioCore.QuitPrompt, {
|
|
14719
15306
|
when: edited
|
|
14720
15307
|
}), React__default.createElement(reactstrap.Row, {
|
|
@@ -14722,7 +15309,7 @@ var QuestionCateList = function QuestionCateList() {
|
|
|
14722
15309
|
}, React__default.createElement(reactstrap.Col, {
|
|
14723
15310
|
md: 4
|
|
14724
15311
|
}, React__default.createElement(marioCore.AddButton, {
|
|
14725
|
-
text: "Create
|
|
15312
|
+
text: "Create template",
|
|
14726
15313
|
onClick: function onClick() {
|
|
14727
15314
|
return openModal();
|
|
14728
15315
|
}
|
|
@@ -14765,7 +15352,7 @@ var QuestionCateList = function QuestionCateList() {
|
|
|
14765
15352
|
}
|
|
14766
15353
|
})));
|
|
14767
15354
|
}))) : React__default.createElement(marioCore.EmptyDataAlert, {
|
|
14768
|
-
label: "
|
|
15355
|
+
label: "template survey"
|
|
14769
15356
|
})), React__default.createElement(reactstrap.Col, {
|
|
14770
15357
|
md: 8,
|
|
14771
15358
|
className: "text-right"
|
|
@@ -14811,6 +15398,10 @@ var tabs$3 = [{
|
|
|
14811
15398
|
path: "/admin/question/question-category",
|
|
14812
15399
|
title: "Question category",
|
|
14813
15400
|
component: QuestionCateList
|
|
15401
|
+
}, {
|
|
15402
|
+
path: "/admin/question/template-survey",
|
|
15403
|
+
title: "Template Survey",
|
|
15404
|
+
component: TemplateSurveyList
|
|
14814
15405
|
}];
|
|
14815
15406
|
var title$4 = "Question bank";
|
|
14816
15407
|
|
|
@@ -14982,7 +15573,7 @@ var SemesterSelector = function SemesterSelector(_ref) {
|
|
|
14982
15573
|
}));
|
|
14983
15574
|
};
|
|
14984
15575
|
|
|
14985
|
-
var schema$
|
|
15576
|
+
var schema$g = yup.object({
|
|
14986
15577
|
beginDate: yup.string().required("Begin date is required"),
|
|
14987
15578
|
endDate: yup.string().required("End date is required"),
|
|
14988
15579
|
timeSemester: yup.string().required("Time Semester is required"),
|
|
@@ -15018,7 +15609,7 @@ var AssignmentDetailModal = function AssignmentDetailModal(props, ref) {
|
|
|
15018
15609
|
return React__default.createElement(formik.Formik, {
|
|
15019
15610
|
initialValues: assignmentDetail,
|
|
15020
15611
|
enableReinitialize: true,
|
|
15021
|
-
validationSchema: schema$
|
|
15612
|
+
validationSchema: schema$g,
|
|
15022
15613
|
onSubmit: function onSubmit(values, actions) {
|
|
15023
15614
|
onConfirm(values);
|
|
15024
15615
|
actions.resetForm();
|
|
@@ -15234,7 +15825,7 @@ var getAllSemesters = function getAllSemesters() {
|
|
|
15234
15825
|
return marioCore.api.get(marioCore.BASE_URL + "/api/Semester/all");
|
|
15235
15826
|
};
|
|
15236
15827
|
|
|
15237
|
-
var initValue$
|
|
15828
|
+
var initValue$m = {
|
|
15238
15829
|
assessmentId: 0,
|
|
15239
15830
|
assessment: null,
|
|
15240
15831
|
studentIds: [],
|
|
@@ -15254,7 +15845,7 @@ var useAssignmentDetail = function useAssignmentDetail() {
|
|
|
15254
15845
|
id = _useState[0],
|
|
15255
15846
|
setId = _useState[1];
|
|
15256
15847
|
|
|
15257
|
-
var _useState2 = React.useState(initValue$
|
|
15848
|
+
var _useState2 = React.useState(initValue$m),
|
|
15258
15849
|
assignmentDetail = _useState2[0],
|
|
15259
15850
|
setAssignmentDetail = _useState2[1];
|
|
15260
15851
|
|
|
@@ -15283,14 +15874,14 @@ var useAssignmentDetail = function useAssignmentDetail() {
|
|
|
15283
15874
|
};
|
|
15284
15875
|
|
|
15285
15876
|
React.useEffect(function () {
|
|
15286
|
-
!!id ? getData() : setAssignmentDetail(initValue$
|
|
15877
|
+
!!id ? getData() : setAssignmentDetail(initValue$m);
|
|
15287
15878
|
}, [id]);
|
|
15288
15879
|
React.useEffect(function () {
|
|
15289
15880
|
setEditedFalse();
|
|
15290
15881
|
}, []);
|
|
15291
15882
|
|
|
15292
15883
|
var reset = function reset() {
|
|
15293
|
-
setAssignmentDetail(initValue$
|
|
15884
|
+
setAssignmentDetail(initValue$m);
|
|
15294
15885
|
setId(0);
|
|
15295
15886
|
};
|
|
15296
15887
|
|
|
@@ -15405,7 +15996,7 @@ var useAssignmentDetail = function useAssignmentDetail() {
|
|
|
15405
15996
|
assignmentDetail: assignmentDetail,
|
|
15406
15997
|
confirmData: confirmData,
|
|
15407
15998
|
onRemoveStudent: onRemoveStudent,
|
|
15408
|
-
initValue: initValue$
|
|
15999
|
+
initValue: initValue$m,
|
|
15409
16000
|
reset: reset,
|
|
15410
16001
|
edited: edited,
|
|
15411
16002
|
setEdited: setEdited,
|
|
@@ -15414,7 +16005,7 @@ var useAssignmentDetail = function useAssignmentDetail() {
|
|
|
15414
16005
|
};
|
|
15415
16006
|
};
|
|
15416
16007
|
|
|
15417
|
-
var TITLE$
|
|
16008
|
+
var TITLE$n = "Assignment list";
|
|
15418
16009
|
|
|
15419
16010
|
var useAssignmentList = function useAssignmentList() {
|
|
15420
16011
|
var assignmentList = reactRedux.useSelector(function (state) {
|
|
@@ -15511,7 +16102,7 @@ var useAssignmentList = function useAssignmentList() {
|
|
|
15511
16102
|
dispatch(marioCore.setLoading(false));
|
|
15512
16103
|
}, [filters]);
|
|
15513
16104
|
React.useEffect(function () {
|
|
15514
|
-
document.title = TITLE$
|
|
16105
|
+
document.title = TITLE$n;
|
|
15515
16106
|
}, []);
|
|
15516
16107
|
React.useEffect(function () {
|
|
15517
16108
|
getData();
|
|
@@ -15748,7 +16339,7 @@ var useAssignmentResultList = function useAssignmentResultList() {
|
|
|
15748
16339
|
};
|
|
15749
16340
|
};
|
|
15750
16341
|
|
|
15751
|
-
var initValue$
|
|
16342
|
+
var initValue$n = {
|
|
15752
16343
|
questionResponses: [],
|
|
15753
16344
|
answerTexts: []
|
|
15754
16345
|
};
|
|
@@ -15760,7 +16351,7 @@ var useReflectionResultDetail$1 = function useReflectionResultDetail() {
|
|
|
15760
16351
|
id = _useState[0],
|
|
15761
16352
|
setId = _useState[1];
|
|
15762
16353
|
|
|
15763
|
-
var _useState2 = React.useState(initValue$
|
|
16354
|
+
var _useState2 = React.useState(initValue$n),
|
|
15764
16355
|
assignmentResultDetail = _useState2[0],
|
|
15765
16356
|
setAssignmentResultDetail = _useState2[1];
|
|
15766
16357
|
|
|
@@ -15961,7 +16552,7 @@ var getRandomQuestion = function getRandomQuestion(data) {
|
|
|
15961
16552
|
return marioCore.api.post(QUESTION_URL$2 + "/random", data);
|
|
15962
16553
|
};
|
|
15963
16554
|
|
|
15964
|
-
var TITLE$
|
|
16555
|
+
var TITLE$o = "Session template list";
|
|
15965
16556
|
var SESSION_TEMPLATE_URL$1 = "/admin/session-template-learning-support";
|
|
15966
16557
|
var CREATE_TEMPLATE_URL = "/admin/create-session-template-learning-support";
|
|
15967
16558
|
|
|
@@ -16065,7 +16656,7 @@ var useSessionTemplateList = function useSessionTemplateList() {
|
|
|
16065
16656
|
history.push(url);
|
|
16066
16657
|
}, []);
|
|
16067
16658
|
React.useEffect(function () {
|
|
16068
|
-
document.title = TITLE$
|
|
16659
|
+
document.title = TITLE$o;
|
|
16069
16660
|
}, []);
|
|
16070
16661
|
React.useEffect(function () {
|
|
16071
16662
|
getData();
|
|
@@ -16212,7 +16803,7 @@ var remove$k = function remove(id) {
|
|
|
16212
16803
|
return marioCore.api["delete"](SESSION_TEMPLATE_GENERAL_CLASS_URL + "/" + id);
|
|
16213
16804
|
};
|
|
16214
16805
|
|
|
16215
|
-
var TITLE$
|
|
16806
|
+
var TITLE$p = "Session template general class list";
|
|
16216
16807
|
var SESSION_TEMPLATE_GENERAL_CLASS_URL$1 = "/admin/session-template/general-class";
|
|
16217
16808
|
var CREATE_TEMPLATE_GENERAL_CLASS_URL = "/admin/create-session-template-general-class";
|
|
16218
16809
|
|
|
@@ -16302,7 +16893,7 @@ var useSessionTemplateGeneralClassList = function useSessionTemplateGeneralClass
|
|
|
16302
16893
|
history.push(url);
|
|
16303
16894
|
}, []);
|
|
16304
16895
|
React.useEffect(function () {
|
|
16305
|
-
document.title = TITLE$
|
|
16896
|
+
document.title = TITLE$p;
|
|
16306
16897
|
}, []);
|
|
16307
16898
|
React.useEffect(function () {
|
|
16308
16899
|
getData();
|
|
@@ -16706,7 +17297,7 @@ var SkillSelector$1 = function SkillSelector(_ref) {
|
|
|
16706
17297
|
});
|
|
16707
17298
|
};
|
|
16708
17299
|
|
|
16709
|
-
var schema$
|
|
17300
|
+
var schema$h = yup.object({
|
|
16710
17301
|
name: yup.string().required("Name is required"),
|
|
16711
17302
|
isConference: yup.boolean().required("Is conference is required"),
|
|
16712
17303
|
conferenceRubricId: yup.number().nullable().test("Test conference rubric id", "Conference rubric is required", function () {
|
|
@@ -16735,7 +17326,7 @@ var useAddQuestion = function useAddQuestion() {
|
|
|
16735
17326
|
};
|
|
16736
17327
|
};
|
|
16737
17328
|
|
|
16738
|
-
var initValue$
|
|
17329
|
+
var initValue$o = {
|
|
16739
17330
|
name: "",
|
|
16740
17331
|
isConference: false,
|
|
16741
17332
|
conferenceRubricId: null,
|
|
@@ -16785,7 +17376,7 @@ var useSessionTemplateDetail = function useSessionTemplateDetail(id) {
|
|
|
16785
17376
|
isTeacherQuestion = _useState7[0],
|
|
16786
17377
|
setIsTeacherQuestion = _useState7[1];
|
|
16787
17378
|
|
|
16788
|
-
var _useState8 = React.useState(initValue$
|
|
17379
|
+
var _useState8 = React.useState(initValue$o),
|
|
16789
17380
|
sessionTemplateDetail = _useState8[0],
|
|
16790
17381
|
setSessionTemplateDetail = _useState8[1];
|
|
16791
17382
|
|
|
@@ -17094,7 +17685,7 @@ var SessionTemplateDetail = function SessionTemplateDetail() {
|
|
|
17094
17685
|
return React__default.createElement(formik.Formik, {
|
|
17095
17686
|
initialValues: sessionTemplateDetail,
|
|
17096
17687
|
enableReinitialize: true,
|
|
17097
|
-
validationSchema: schema$
|
|
17688
|
+
validationSchema: schema$h,
|
|
17098
17689
|
onSubmit: function onSubmit(values) {
|
|
17099
17690
|
confirmData(values);
|
|
17100
17691
|
setEdited(false);
|
|
@@ -17376,7 +17967,7 @@ var SubjectSelector = function SubjectSelector(_ref) {
|
|
|
17376
17967
|
});
|
|
17377
17968
|
};
|
|
17378
17969
|
|
|
17379
|
-
var initValue$
|
|
17970
|
+
var initValue$p = {
|
|
17380
17971
|
name: "",
|
|
17381
17972
|
subjectId: 0,
|
|
17382
17973
|
questionTeacherIds: [],
|
|
@@ -17427,7 +18018,7 @@ var useSessionTemplateGeneralClassDetail = function useSessionTemplateGeneralCla
|
|
|
17427
18018
|
extraStudentMandatory = _useState9[0],
|
|
17428
18019
|
setExtraStudentMandatory = _useState9[1];
|
|
17429
18020
|
|
|
17430
|
-
var _useState10 = React.useState(initValue$
|
|
18021
|
+
var _useState10 = React.useState(initValue$p),
|
|
17431
18022
|
sessionTemplateGeneralClassDetail = _useState10[0],
|
|
17432
18023
|
setSessionTemplateGeneralClassDetail = _useState10[1];
|
|
17433
18024
|
|
|
@@ -17647,7 +18238,7 @@ var useSessionTemplateGeneralClassDetail = function useSessionTemplateGeneralCla
|
|
|
17647
18238
|
};
|
|
17648
18239
|
|
|
17649
18240
|
var LINK_TO_DEFAULT_QUESTION_GENERAL_CLASS = "/admin/question/default-question-general-list";
|
|
17650
|
-
var schema$
|
|
18241
|
+
var schema$i = yup.object({
|
|
17651
18242
|
name: yup.string().trim().required("Name is required"),
|
|
17652
18243
|
subjectId: yup.number().required("Subject is required").test("Test subject", "Subject is required", function (value) {
|
|
17653
18244
|
return value > 0;
|
|
@@ -17731,7 +18322,7 @@ var SessionTemplateGeneralClassDetail = function SessionTemplateGeneralClassDeta
|
|
|
17731
18322
|
return React__default.createElement(formik.Formik, {
|
|
17732
18323
|
initialValues: sessionTemplateGeneralClassDetail,
|
|
17733
18324
|
enableReinitialize: true,
|
|
17734
|
-
validationSchema: schema$
|
|
18325
|
+
validationSchema: schema$i,
|
|
17735
18326
|
onSubmit: function onSubmit(values) {
|
|
17736
18327
|
confirmData(values);
|
|
17737
18328
|
setEdited(false);
|
|
@@ -17938,7 +18529,7 @@ var SessionTemplateGeneralClassDetail = function SessionTemplateGeneralClassDeta
|
|
|
17938
18529
|
});
|
|
17939
18530
|
};
|
|
17940
18531
|
|
|
17941
|
-
var schema$
|
|
18532
|
+
var schema$j = yup.object({
|
|
17942
18533
|
learningSupportCategoryId: yup.number().test("testLearningSupportCategoryId", "Invalid category", function (number) {
|
|
17943
18534
|
return !!number && number >= 1;
|
|
17944
18535
|
}),
|
|
@@ -17968,7 +18559,7 @@ var CustomAlertDetailModal = function CustomAlertDetailModal(props, ref) {
|
|
|
17968
18559
|
return React__default.createElement(formik.Formik, {
|
|
17969
18560
|
initialValues: customAlertDetail,
|
|
17970
18561
|
enableReinitialize: true,
|
|
17971
|
-
validationSchema: schema$
|
|
18562
|
+
validationSchema: schema$j,
|
|
17972
18563
|
onSubmit: function onSubmit(values, actions) {
|
|
17973
18564
|
onConfirm(values);
|
|
17974
18565
|
actions.resetForm();
|
|
@@ -18123,7 +18714,7 @@ var removeStudent$1 = function removeStudent(customAlertStudentId) {
|
|
|
18123
18714
|
return marioCore.api["delete"](CUSTOM_ALERT_URL + "/customAlertStudents/" + customAlertStudentId);
|
|
18124
18715
|
};
|
|
18125
18716
|
|
|
18126
|
-
var initValue$
|
|
18717
|
+
var initValue$q = {
|
|
18127
18718
|
learningSupportCategoryId: 0,
|
|
18128
18719
|
numberOfSessions: 0,
|
|
18129
18720
|
beginDate: "",
|
|
@@ -18138,7 +18729,7 @@ var useCustomAlertDetail = function useCustomAlertDetail() {
|
|
|
18138
18729
|
id = _useState[0],
|
|
18139
18730
|
setId = _useState[1];
|
|
18140
18731
|
|
|
18141
|
-
var _useState2 = React.useState(initValue$
|
|
18732
|
+
var _useState2 = React.useState(initValue$q),
|
|
18142
18733
|
customAlertDetail = _useState2[0],
|
|
18143
18734
|
setCustomAlertDetail = _useState2[1];
|
|
18144
18735
|
|
|
@@ -18167,14 +18758,14 @@ var useCustomAlertDetail = function useCustomAlertDetail() {
|
|
|
18167
18758
|
};
|
|
18168
18759
|
|
|
18169
18760
|
React.useEffect(function () {
|
|
18170
|
-
!!id ? getData() : setCustomAlertDetail(initValue$
|
|
18761
|
+
!!id ? getData() : setCustomAlertDetail(initValue$q);
|
|
18171
18762
|
}, [id]);
|
|
18172
18763
|
React.useEffect(function () {
|
|
18173
18764
|
setEditedFalse();
|
|
18174
18765
|
}, []);
|
|
18175
18766
|
|
|
18176
18767
|
var reset = function reset() {
|
|
18177
|
-
setCustomAlertDetail(initValue$
|
|
18768
|
+
setCustomAlertDetail(initValue$q);
|
|
18178
18769
|
setId(0);
|
|
18179
18770
|
};
|
|
18180
18771
|
|
|
@@ -18282,7 +18873,7 @@ var useCustomAlertDetail = function useCustomAlertDetail() {
|
|
|
18282
18873
|
customAlertDetail: customAlertDetail,
|
|
18283
18874
|
confirmData: confirmData,
|
|
18284
18875
|
onRemoveStudent: onRemoveStudent,
|
|
18285
|
-
initValue: initValue$
|
|
18876
|
+
initValue: initValue$q,
|
|
18286
18877
|
reset: reset,
|
|
18287
18878
|
edited: edited,
|
|
18288
18879
|
setEdited: setEdited,
|
|
@@ -18291,7 +18882,7 @@ var useCustomAlertDetail = function useCustomAlertDetail() {
|
|
|
18291
18882
|
};
|
|
18292
18883
|
};
|
|
18293
18884
|
|
|
18294
|
-
var TITLE$
|
|
18885
|
+
var TITLE$q = "Custom alert list";
|
|
18295
18886
|
|
|
18296
18887
|
var useCustomAlertList = function useCustomAlertList() {
|
|
18297
18888
|
var customAlertList = reactRedux.useSelector(function (state) {
|
|
@@ -18379,7 +18970,7 @@ var useCustomAlertList = function useCustomAlertList() {
|
|
|
18379
18970
|
dispatch(marioCore.setLoading(false));
|
|
18380
18971
|
}, [filters]);
|
|
18381
18972
|
React.useEffect(function () {
|
|
18382
|
-
document.title = TITLE$
|
|
18973
|
+
document.title = TITLE$q;
|
|
18383
18974
|
}, []);
|
|
18384
18975
|
React.useEffect(function () {
|
|
18385
18976
|
getData();
|
|
@@ -18542,7 +19133,7 @@ var CustomAlertList = function CustomAlertList() {
|
|
|
18542
19133
|
|
|
18543
19134
|
var certificate = {"certificate-item":"_3DVMZ","add-breakpoint":"_3zOGW","box-item":"_3DQwX"};
|
|
18544
19135
|
|
|
18545
|
-
var schema$
|
|
19136
|
+
var schema$k = yup.object({
|
|
18546
19137
|
name: yup.string().required("Name is required"),
|
|
18547
19138
|
certificateItems: yup.array().test("Text label required", "Text is required", function (value) {
|
|
18548
19139
|
return value === null || value === void 0 ? void 0 : value.every(function (item) {
|
|
@@ -18567,7 +19158,7 @@ var CertificateDetailModal = function CertificateDetailModal(props, ref) {
|
|
|
18567
19158
|
return React__default.createElement(formik.Formik, {
|
|
18568
19159
|
initialValues: certificateDetail,
|
|
18569
19160
|
enableReinitialize: true,
|
|
18570
|
-
validationSchema: schema$
|
|
19161
|
+
validationSchema: schema$k,
|
|
18571
19162
|
onSubmit: function onSubmit(values, actions) {
|
|
18572
19163
|
var _values$certificateIt;
|
|
18573
19164
|
|
|
@@ -18873,7 +19464,7 @@ var initItemValue = {
|
|
|
18873
19464
|
text: "",
|
|
18874
19465
|
breakPointCertification: []
|
|
18875
19466
|
};
|
|
18876
|
-
var initValue$
|
|
19467
|
+
var initValue$r = {
|
|
18877
19468
|
name: "",
|
|
18878
19469
|
description: "",
|
|
18879
19470
|
imageUrl: "",
|
|
@@ -18895,7 +19486,7 @@ var useCertificateDetail = function useCertificateDetail() {
|
|
|
18895
19486
|
file = _useState2[0],
|
|
18896
19487
|
setFile = _useState2[1];
|
|
18897
19488
|
|
|
18898
|
-
var _useState3 = React.useState(initValue$
|
|
19489
|
+
var _useState3 = React.useState(initValue$r),
|
|
18899
19490
|
certificateDetail = _useState3[0],
|
|
18900
19491
|
setCertificateDetail = _useState3[1];
|
|
18901
19492
|
|
|
@@ -18924,7 +19515,7 @@ var useCertificateDetail = function useCertificateDetail() {
|
|
|
18924
19515
|
};
|
|
18925
19516
|
|
|
18926
19517
|
React.useEffect(function () {
|
|
18927
|
-
!!id ? getData() : setCertificateDetail(initValue$
|
|
19518
|
+
!!id ? getData() : setCertificateDetail(initValue$r);
|
|
18928
19519
|
}, [id]);
|
|
18929
19520
|
React.useEffect(function () {
|
|
18930
19521
|
setEditedFalse();
|
|
@@ -19012,7 +19603,7 @@ var useCertificateDetail = function useCertificateDetail() {
|
|
|
19012
19603
|
certificateDetail: certificateDetail,
|
|
19013
19604
|
initItemValue: initItemValue,
|
|
19014
19605
|
confirmData: confirmData,
|
|
19015
|
-
initValue: initValue$
|
|
19606
|
+
initValue: initValue$r,
|
|
19016
19607
|
setFile: setFile,
|
|
19017
19608
|
edited: edited,
|
|
19018
19609
|
setEdited: setEdited,
|
|
@@ -19021,7 +19612,7 @@ var useCertificateDetail = function useCertificateDetail() {
|
|
|
19021
19612
|
};
|
|
19022
19613
|
};
|
|
19023
19614
|
|
|
19024
|
-
var TITLE$
|
|
19615
|
+
var TITLE$r = "Certificate list";
|
|
19025
19616
|
|
|
19026
19617
|
var useCertificateList = function useCertificateList() {
|
|
19027
19618
|
var certificateList = reactRedux.useSelector(function (state) {
|
|
@@ -19104,7 +19695,7 @@ var useCertificateList = function useCertificateList() {
|
|
|
19104
19695
|
dispatch(marioCore.setLoading(false));
|
|
19105
19696
|
}, [filters]);
|
|
19106
19697
|
React.useEffect(function () {
|
|
19107
|
-
document.title = TITLE$
|
|
19698
|
+
document.title = TITLE$r;
|
|
19108
19699
|
}, []);
|
|
19109
19700
|
React.useEffect(function () {
|
|
19110
19701
|
getData();
|
|
@@ -19252,7 +19843,7 @@ var CertificateList = function CertificateList() {
|
|
|
19252
19843
|
}))));
|
|
19253
19844
|
};
|
|
19254
19845
|
|
|
19255
|
-
var TITLE$
|
|
19846
|
+
var TITLE$s = "Certificate list";
|
|
19256
19847
|
|
|
19257
19848
|
var useCertificateList$1 = function useCertificateList() {
|
|
19258
19849
|
var dispatch = reactRedux.useDispatch();
|
|
@@ -19340,7 +19931,7 @@ var useCertificateList$1 = function useCertificateList() {
|
|
|
19340
19931
|
}
|
|
19341
19932
|
}, [listWaiting]);
|
|
19342
19933
|
React.useEffect(function () {
|
|
19343
|
-
document.title = TITLE$
|
|
19934
|
+
document.title = TITLE$s;
|
|
19344
19935
|
getListWaiting();
|
|
19345
19936
|
getListApproved();
|
|
19346
19937
|
}, []);
|
|
@@ -19807,16 +20398,35 @@ var HeaderChart = function HeaderChart(_ref) {
|
|
|
19807
20398
|
_ref$typeChart = _ref.typeChart,
|
|
19808
20399
|
typeChart = _ref$typeChart === void 0 ? TYPECHART.BAR : _ref$typeChart,
|
|
19809
20400
|
onChangeChart = _ref.onChangeChart,
|
|
19810
|
-
options = _ref.options
|
|
20401
|
+
options = _ref.options,
|
|
20402
|
+
contentTooltip = _ref.contentTooltip,
|
|
20403
|
+
index = _ref.index;
|
|
20404
|
+
|
|
20405
|
+
var _useState = React.useState(false),
|
|
20406
|
+
openTooltip = _useState[0],
|
|
20407
|
+
setOpenTooltip = _useState[1];
|
|
20408
|
+
|
|
20409
|
+
var handleOpenTooltip = function handleOpenTooltip() {
|
|
20410
|
+
setOpenTooltip(!openTooltip);
|
|
20411
|
+
};
|
|
20412
|
+
|
|
19811
20413
|
return React__default.createElement("div", {
|
|
19812
|
-
className: "d-flex justify-content-between align-items-center " + styles$1["header-chart"] + " "
|
|
20414
|
+
className: "d-flex justify-content-between align-items-center " + styles$1["header-chart"] + " ",
|
|
20415
|
+
onClick: onToggle
|
|
19813
20416
|
}, React__default.createElement("div", {
|
|
19814
20417
|
className: "" + styles$1["header-left"]
|
|
19815
20418
|
}, React__default.createElement("span", {
|
|
19816
20419
|
className: styles$1["header-title"] + " pr-2"
|
|
19817
20420
|
}, title), React__default.createElement("i", {
|
|
19818
|
-
className: styles$1["icon-chart"] + " fal fa-info-circle cursor-pointer"
|
|
19819
|
-
|
|
20421
|
+
className: styles$1["icon-chart"] + " fal fa-info-circle cursor-pointer",
|
|
20422
|
+
id: "tooltip-" + index
|
|
20423
|
+
}), React__default.createElement(reactstrap.Tooltip, {
|
|
20424
|
+
placement: "right",
|
|
20425
|
+
isOpen: openTooltip,
|
|
20426
|
+
target: "tooltip-" + index,
|
|
20427
|
+
toggle: handleOpenTooltip,
|
|
20428
|
+
innerClassName: "" + styles$1["tooltip"]
|
|
20429
|
+
}, contentTooltip)), React__default.createElement("div", {
|
|
19820
20430
|
className: "" + styles$1["header-right"]
|
|
19821
20431
|
}, isOpen && isShowChangeChart && (options === null || options === void 0 ? void 0 : options.length) && React__default.createElement("div", {
|
|
19822
20432
|
className: "d-flex align-items-center d-inline-block pr-4"
|
|
@@ -19882,9 +20492,9 @@ var useBehavior = function useBehavior(initialTypeChart) {
|
|
|
19882
20492
|
teacherUserId = _useState[0],
|
|
19883
20493
|
setTeacherUserId = _useState[1];
|
|
19884
20494
|
|
|
19885
|
-
var _useState2 = React.useState(initialTypeChart.map(function () {
|
|
20495
|
+
var _useState2 = React.useState([true].concat(initialTypeChart.map(function () {
|
|
19886
20496
|
return false;
|
|
19887
|
-
})),
|
|
20497
|
+
}).splice(0, initialTypeChart.length - 2))),
|
|
19888
20498
|
chartIsOpened = _useState2[0],
|
|
19889
20499
|
setChartIsOpened = _useState2[1];
|
|
19890
20500
|
|
|
@@ -19898,7 +20508,7 @@ var useBehavior = function useBehavior(initialTypeChart) {
|
|
|
19898
20508
|
setChartIsOpened(newStateChart);
|
|
19899
20509
|
};
|
|
19900
20510
|
|
|
19901
|
-
var onChangeChart = function onChangeChart(idx, type) {
|
|
20511
|
+
var onChangeChart = function onChangeChart(idx, type, options) {
|
|
19902
20512
|
switch (type) {
|
|
19903
20513
|
case TYPECHART.AREA:
|
|
19904
20514
|
if (typeChartList[idx] === TYPECHART.BAR || typeChartList[idx] === TYPECHART.LINE) {
|
|
@@ -19910,7 +20520,7 @@ var useBehavior = function useBehavior(initialTypeChart) {
|
|
|
19910
20520
|
|
|
19911
20521
|
if (typeChartList[idx] === TYPECHART.BOTH) {
|
|
19912
20522
|
setTypeChartList(typeChartList.map(function (cur, index) {
|
|
19913
|
-
return index === idx ?
|
|
20523
|
+
return index === idx ? options[1].value : cur;
|
|
19914
20524
|
}));
|
|
19915
20525
|
}
|
|
19916
20526
|
|
|
@@ -25730,7 +26340,7 @@ var gradeOptions = function gradeOptions(grades, studentUserId) {
|
|
|
25730
26340
|
};
|
|
25731
26341
|
});
|
|
25732
26342
|
};
|
|
25733
|
-
var learningStrategyChartOptions = function learningStrategyChartOptions(labelNames, usageCountList) {
|
|
26343
|
+
var learningStrategyChartOptions = function learningStrategyChartOptions(labelNames, usageCountList, screenWidth) {
|
|
25734
26344
|
return {
|
|
25735
26345
|
chart: {
|
|
25736
26346
|
type: "bar",
|
|
@@ -25787,7 +26397,7 @@ var learningStrategyChartOptions = function learningStrategyChartOptions(labelNa
|
|
|
25787
26397
|
show: true,
|
|
25788
26398
|
align: "left",
|
|
25789
26399
|
minWidth: 0,
|
|
25790
|
-
maxWidth:
|
|
26400
|
+
maxWidth: screenWidth,
|
|
25791
26401
|
style: {
|
|
25792
26402
|
colors: [],
|
|
25793
26403
|
fontSize: "14px",
|
|
@@ -26629,9 +27239,6 @@ var BarAndAreaChart = function BarAndAreaChart(_ref) {
|
|
|
26629
27239
|
_ref$isHasLineChart = _ref.isHasLineChart,
|
|
26630
27240
|
isHasLineChart = _ref$isHasLineChart === void 0 ? false : _ref$isHasLineChart;
|
|
26631
27241
|
var newseries = mergeBarChartAndArea(series, isHasLineChart);
|
|
26632
|
-
console.log({
|
|
26633
|
-
newseries: newseries
|
|
26634
|
-
});
|
|
26635
27242
|
return React__default.createElement(Chart, {
|
|
26636
27243
|
options: optionBarChartAndArea(months, activeColumn, newseries),
|
|
26637
27244
|
series: newseries,
|
|
@@ -26663,7 +27270,8 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
|
|
|
26663
27270
|
activeColumn = _ref.activeColumn,
|
|
26664
27271
|
series = _ref.series,
|
|
26665
27272
|
avg = _ref.avg,
|
|
26666
|
-
months = _ref.months
|
|
27273
|
+
months = _ref.months,
|
|
27274
|
+
isPDF = _ref.isPDF;
|
|
26667
27275
|
if (!data) return React__default.createElement("div", {
|
|
26668
27276
|
className: "flex justify-content-center align-items-center",
|
|
26669
27277
|
style: {
|
|
@@ -26672,7 +27280,7 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
|
|
|
26672
27280
|
}, React__default.createElement("div", null, "No Data"));
|
|
26673
27281
|
return React__default.createElement("div", {
|
|
26674
27282
|
className: "w-100 h-100 " + styles$1["column-chart-percent"]
|
|
26675
|
-
}, React__default.createElement("div", {
|
|
27283
|
+
}, !isPDF && React__default.createElement("div", {
|
|
26676
27284
|
className: "w-full d-flex gap-2 flex-wrap " + styles$1["listItem"]
|
|
26677
27285
|
}, data.map(function (month, index) {
|
|
26678
27286
|
return React__default.createElement("div", {
|
|
@@ -26720,7 +27328,7 @@ var ColumnChartAndPercent = function ColumnChartAndPercent(_ref) {
|
|
|
26720
27328
|
months: months,
|
|
26721
27329
|
activeColumn: activeColumn,
|
|
26722
27330
|
series: series
|
|
26723
|
-
})), React__default.createElement("div", {
|
|
27331
|
+
})), !isPDF && React__default.createElement("div", {
|
|
26724
27332
|
className: "w-100 d-flex gap-2 flex-wrap " + styles$1["listItem"]
|
|
26725
27333
|
}, data.map(function (month, index) {
|
|
26726
27334
|
return React__default.createElement("div", {
|
|
@@ -26929,16 +27537,17 @@ var TopLearningStrategy = function TopLearningStrategy(_ref) {
|
|
|
26929
27537
|
});
|
|
26930
27538
|
var maxData = Math.max.apply(Math, usageCount);
|
|
26931
27539
|
var serieslearningStrategy = [{
|
|
26932
|
-
name: "Usage
|
|
27540
|
+
name: "Perceived Usage",
|
|
26933
27541
|
data: learningStrategies === null || learningStrategies === void 0 ? void 0 : learningStrategies.map(function (i) {
|
|
26934
27542
|
return average(i.usagePoint);
|
|
26935
27543
|
})
|
|
26936
27544
|
}, {
|
|
26937
|
-
name: "
|
|
27545
|
+
name: "Total Number of Times Selected",
|
|
26938
27546
|
data: learningStrategies === null || learningStrategies === void 0 ? void 0 : learningStrategies.map(function (i) {
|
|
26939
27547
|
return i.usageCount / maxData * 100;
|
|
26940
27548
|
})
|
|
26941
27549
|
}];
|
|
27550
|
+
var screenWidth = (window.innerWidth - 256) / 100 * 30;
|
|
26942
27551
|
return React__default.createElement("div", {
|
|
26943
27552
|
className: "h-100 w-100 " + styles$1["chart-background"]
|
|
26944
27553
|
}, React__default.createElement("div", {
|
|
@@ -26946,7 +27555,7 @@ var TopLearningStrategy = function TopLearningStrategy(_ref) {
|
|
|
26946
27555
|
}, serieslearningStrategy.some(function (i) {
|
|
26947
27556
|
return i.data;
|
|
26948
27557
|
}) ? React__default.createElement(Chart, {
|
|
26949
|
-
options: learningStrategyChartOptions(labelNames, usageCount),
|
|
27558
|
+
options: learningStrategyChartOptions(labelNames, usageCount, screenWidth),
|
|
26950
27559
|
series: serieslearningStrategy,
|
|
26951
27560
|
type: "bar",
|
|
26952
27561
|
width: "100%",
|
|
@@ -27026,7 +27635,7 @@ var getBandScore = function getBandScore() {
|
|
|
27026
27635
|
return marioCore.api.get("" + BAND_SCORE);
|
|
27027
27636
|
};
|
|
27028
27637
|
|
|
27029
|
-
var TITLE$
|
|
27638
|
+
var TITLE$t = "Dashboard";
|
|
27030
27639
|
var DEFAULT_START_DATE = moment().startOf("year").valueOf();
|
|
27031
27640
|
var DEFAULT_END_DATE = moment().endOf("day").valueOf();
|
|
27032
27641
|
|
|
@@ -27165,12 +27774,14 @@ var useDashboard = function useDashboard() {
|
|
|
27165
27774
|
};
|
|
27166
27775
|
|
|
27167
27776
|
React.useEffect(function () {
|
|
27168
|
-
|
|
27169
|
-
|
|
27170
|
-
|
|
27171
|
-
}));
|
|
27777
|
+
setActiveColumnOneToOne([true].concat(dataConvertedOneToOne.map(function (_i) {
|
|
27778
|
+
return false;
|
|
27779
|
+
}).splice(0, dataConvertedOneToOne.length - 2)));
|
|
27172
27780
|
setAvgOneToOne(newAvgOneToOne === null || newAvgOneToOne === void 0 ? void 0 : newAvgOneToOne.map(function (_, index) {
|
|
27173
|
-
return newAvgOneToOne[index];
|
|
27781
|
+
return activeColumnOneToOne[index] ? newAvgOneToOne[index] : 0;
|
|
27782
|
+
}));
|
|
27783
|
+
setSeriesOneToOne(newSeriesOneToOne === null || newSeriesOneToOne === void 0 ? void 0 : newSeriesOneToOne.filter(function (_, idx) {
|
|
27784
|
+
return activeColumnOneToOne[idx];
|
|
27174
27785
|
}));
|
|
27175
27786
|
}, [chartOneToOneData.overviewQuestionChoice]);
|
|
27176
27787
|
|
|
@@ -27206,12 +27817,14 @@ var useDashboard = function useDashboard() {
|
|
|
27206
27817
|
};
|
|
27207
27818
|
|
|
27208
27819
|
React.useEffect(function () {
|
|
27209
|
-
setSeriesClassReflection(newSeriesClassReflection)
|
|
27210
|
-
|
|
27211
|
-
return true;
|
|
27820
|
+
setSeriesClassReflection(newSeriesClassReflection === null || newSeriesClassReflection === void 0 ? void 0 : newSeriesClassReflection.filter(function (_, idx) {
|
|
27821
|
+
return activeColumnClassReflection[idx];
|
|
27212
27822
|
}));
|
|
27823
|
+
setActiveColumnClassReflection([true].concat(dataConvertedClassReflection.map(function (_i) {
|
|
27824
|
+
return false;
|
|
27825
|
+
}).splice(0, dataConvertedClassReflection.length - 2)));
|
|
27213
27826
|
setAvgClassReflection(newAvgClassReflection === null || newAvgClassReflection === void 0 ? void 0 : newAvgClassReflection.map(function (_, index) {
|
|
27214
|
-
return newAvgClassReflection[index];
|
|
27827
|
+
return activeColumnClassReflection[index] ? newAvgClassReflection[index] : 0;
|
|
27215
27828
|
}));
|
|
27216
27829
|
}, [chartClassReflection.overviewQuestionChoice]);
|
|
27217
27830
|
|
|
@@ -27247,12 +27860,14 @@ var useDashboard = function useDashboard() {
|
|
|
27247
27860
|
};
|
|
27248
27861
|
|
|
27249
27862
|
React.useEffect(function () {
|
|
27250
|
-
setSeriesConference(newSeriesConference)
|
|
27251
|
-
|
|
27252
|
-
return true;
|
|
27863
|
+
setSeriesConference(newSeriesConference === null || newSeriesConference === void 0 ? void 0 : newSeriesConference.filter(function (_, idx) {
|
|
27864
|
+
return activeColumnConference[idx];
|
|
27253
27865
|
}));
|
|
27866
|
+
setActiveColumnConference([true].concat(dataConvertedConference === null || dataConvertedConference === void 0 ? void 0 : dataConvertedConference.map(function (_i) {
|
|
27867
|
+
return false;
|
|
27868
|
+
}).splice(0, dataConvertedConference.length - 2)));
|
|
27254
27869
|
setAvgConference(newAvgConference === null || newAvgConference === void 0 ? void 0 : newAvgConference.map(function (_, idx) {
|
|
27255
|
-
return newAvgConference[idx];
|
|
27870
|
+
return activeColumnConference[idx] ? newAvgConference[idx] : 0;
|
|
27256
27871
|
}));
|
|
27257
27872
|
}, [chartConference === null || chartConference === void 0 ? void 0 : chartConference.overviewQuestionChoice]);
|
|
27258
27873
|
|
|
@@ -27399,7 +28014,7 @@ var useDashboard = function useDashboard() {
|
|
|
27399
28014
|
|
|
27400
28015
|
var getData = React.useCallback(function () {
|
|
27401
28016
|
try {
|
|
27402
|
-
document.title = TITLE$
|
|
28017
|
+
document.title = TITLE$t;
|
|
27403
28018
|
dispatch(marioCore.setLoading(true));
|
|
27404
28019
|
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"), 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 () {
|
|
27405
28020
|
dispatch(marioCore.setLoading(false));
|
|
@@ -27564,6 +28179,14 @@ var useChartDatas = function useChartDatas() {
|
|
|
27564
28179
|
name: FILTER_NAME.Calendar,
|
|
27565
28180
|
icon: "/images/calendar.svg",
|
|
27566
28181
|
handleChangeFilters: handleChangeFilters
|
|
28182
|
+
}, {
|
|
28183
|
+
name: FILTER_NAME.StartDate,
|
|
28184
|
+
icon: "/images/calendar.svg",
|
|
28185
|
+
handleChangeFilters: handleChangeFilters
|
|
28186
|
+
}, {
|
|
28187
|
+
name: FILTER_NAME.EndDate,
|
|
28188
|
+
icon: "/images/calendar.svg",
|
|
28189
|
+
handleChangeFilters: handleChangeFilters
|
|
27567
28190
|
}, {
|
|
27568
28191
|
name: FILTER_NAME.Gender,
|
|
27569
28192
|
icon: "/images/gender-icon.svg",
|
|
@@ -27599,29 +28222,31 @@ var useChartDatas = function useChartDatas() {
|
|
|
27599
28222
|
studentId: filter.studentId
|
|
27600
28223
|
}];
|
|
27601
28224
|
var chartDashBoards = [{
|
|
27602
|
-
id: "
|
|
27603
|
-
label: "
|
|
28225
|
+
id: "readiness_to_learn",
|
|
28226
|
+
label: "Readiness to Learn",
|
|
27604
28227
|
children: function children(_) {
|
|
27605
|
-
return React__default.createElement(
|
|
27606
|
-
data:
|
|
28228
|
+
return React__default.createElement(BubbleChartCustom$1, {
|
|
28229
|
+
data: readinessToLearning
|
|
27607
28230
|
});
|
|
27608
28231
|
},
|
|
27609
28232
|
isShowChangeChart: false,
|
|
27610
|
-
options: []
|
|
28233
|
+
options: [],
|
|
28234
|
+
contentTooltip: "The represenation of individual student responses to their own feelings of Energy, Focus, Happiness, Safety, and Stress at the time administered. Note that scores are set on a 1-100 scale with the exception of Stress which optimum stress is set at '0' to get a sense of High Stress vs Low Stress."
|
|
27611
28235
|
}, {
|
|
27612
|
-
id: "
|
|
27613
|
-
label: "
|
|
28236
|
+
id: "high_impact_learning_strategie",
|
|
28237
|
+
label: "High Impact Learning Strategies",
|
|
27614
28238
|
children: function children(_) {
|
|
27615
|
-
return React__default.createElement(
|
|
27616
|
-
data:
|
|
28239
|
+
return React__default.createElement(TopLearningStrategy$1, {
|
|
28240
|
+
data: topLearningStrategies
|
|
27617
28241
|
});
|
|
27618
28242
|
},
|
|
27619
28243
|
isShowChangeChart: false,
|
|
27620
|
-
options: []
|
|
28244
|
+
options: [],
|
|
28245
|
+
contentTooltip: "Both the composite of individual students reporting their percieved use of John Hattie's High Impact Learning Strategies measured against the actual application with a teacher in total."
|
|
27621
28246
|
}, {
|
|
27622
28247
|
id: "1_to_1",
|
|
27623
28248
|
label: "1 To 1",
|
|
27624
|
-
children: function children(typeChart) {
|
|
28249
|
+
children: function children(typeChart, isPDF) {
|
|
27625
28250
|
return React__default.createElement(ColumnChartAndPercent$1, {
|
|
27626
28251
|
data: dataConvertedOneToOne,
|
|
27627
28252
|
id: "1_to_1",
|
|
@@ -27630,7 +28255,8 @@ var useChartDatas = function useChartDatas() {
|
|
|
27630
28255
|
activeColumn: activeColumnOneToOne,
|
|
27631
28256
|
series: seriesOneToOne,
|
|
27632
28257
|
avg: avgOneToOne,
|
|
27633
|
-
months: monthsOneToOne
|
|
28258
|
+
months: monthsOneToOne,
|
|
28259
|
+
isPDF: isPDF
|
|
27634
28260
|
});
|
|
27635
28261
|
},
|
|
27636
28262
|
isShowChangeChart: true,
|
|
@@ -27640,11 +28266,12 @@ var useChartDatas = function useChartDatas() {
|
|
|
27640
28266
|
}, {
|
|
27641
28267
|
label: "Bar charts",
|
|
27642
28268
|
value: TYPECHART.BAR
|
|
27643
|
-
}]
|
|
28269
|
+
}],
|
|
28270
|
+
contentTooltip: "The composite results of the survey completed by individual students seeking their own perception of performance in the 6 key areas followed by 3 specific areas of well being over time."
|
|
27644
28271
|
}, {
|
|
27645
28272
|
id: "class_reflection",
|
|
27646
|
-
label: "
|
|
27647
|
-
children: function children(typeChart) {
|
|
28273
|
+
label: "Reflection",
|
|
28274
|
+
children: function children(typeChart, isPDF) {
|
|
27648
28275
|
return React__default.createElement(ColumnChartAndPercent$1, {
|
|
27649
28276
|
data: dataConvertedClassReflection,
|
|
27650
28277
|
typeChart: typeChart,
|
|
@@ -27654,7 +28281,8 @@ var useChartDatas = function useChartDatas() {
|
|
|
27654
28281
|
activeColumn: activeColumnClassReflection,
|
|
27655
28282
|
series: seriesClassRefection,
|
|
27656
28283
|
avg: avgClassReflection,
|
|
27657
|
-
months: monthsClassReflection
|
|
28284
|
+
months: monthsClassReflection,
|
|
28285
|
+
isPDF: isPDF
|
|
27658
28286
|
});
|
|
27659
28287
|
},
|
|
27660
28288
|
isShowChangeChart: true,
|
|
@@ -27664,11 +28292,12 @@ var useChartDatas = function useChartDatas() {
|
|
|
27664
28292
|
}, {
|
|
27665
28293
|
label: "Line charts",
|
|
27666
28294
|
value: TYPECHART.LINE
|
|
27667
|
-
}]
|
|
28295
|
+
}],
|
|
28296
|
+
contentTooltip: "The result of surveys sent to any individual (external or internal) that connects with the student to assist in measuring the individual student's: Productivity, Happiness, Energy, Focus, and Stress over time."
|
|
27668
28297
|
}, {
|
|
27669
28298
|
id: "conference",
|
|
27670
|
-
label: "
|
|
27671
|
-
children: function children(typeChart) {
|
|
28299
|
+
label: "Conferences",
|
|
28300
|
+
children: function children(typeChart, isPDF) {
|
|
27672
28301
|
return React__default.createElement(ColumnChartAndPercent$1, {
|
|
27673
28302
|
data: dataConvertedConference,
|
|
27674
28303
|
typeChart: typeChart,
|
|
@@ -27677,7 +28306,8 @@ var useChartDatas = function useChartDatas() {
|
|
|
27677
28306
|
activeColumn: activeColumnConference,
|
|
27678
28307
|
series: seriesConference,
|
|
27679
28308
|
avg: avgConference,
|
|
27680
|
-
months: monthsConference
|
|
28309
|
+
months: monthsConference,
|
|
28310
|
+
isPDF: isPDF
|
|
27681
28311
|
});
|
|
27682
28312
|
},
|
|
27683
28313
|
isShowChangeChart: true,
|
|
@@ -27687,11 +28317,12 @@ var useChartDatas = function useChartDatas() {
|
|
|
27687
28317
|
}, {
|
|
27688
28318
|
label: "Bar charts",
|
|
27689
28319
|
value: TYPECHART.BAR
|
|
27690
|
-
}]
|
|
28320
|
+
}],
|
|
28321
|
+
contentTooltip: "The composite representation of individual aggregate scores located at the bottom of individual Conferences conducted between Teachers and Students over time. Note that scores of 'Not Applicable' do not get measured."
|
|
27691
28322
|
}, {
|
|
27692
28323
|
id: "safety",
|
|
27693
28324
|
label: "Safety",
|
|
27694
|
-
children: function children(typeChart) {
|
|
28325
|
+
children: function children(typeChart, isPDF) {
|
|
27695
28326
|
return React__default.createElement(ColumnChartAndPercent$1, {
|
|
27696
28327
|
data: dataConvertedSafety,
|
|
27697
28328
|
typeChart: typeChart,
|
|
@@ -27701,7 +28332,8 @@ var useChartDatas = function useChartDatas() {
|
|
|
27701
28332
|
activeColumn: activeColumnSafety,
|
|
27702
28333
|
series: seriesSafety,
|
|
27703
28334
|
avg: avgSafety,
|
|
27704
|
-
months: monthsSafety
|
|
28335
|
+
months: monthsSafety,
|
|
28336
|
+
isPDF: isPDF
|
|
27705
28337
|
});
|
|
27706
28338
|
},
|
|
27707
28339
|
isShowChangeChart: true,
|
|
@@ -27711,10 +28343,11 @@ var useChartDatas = function useChartDatas() {
|
|
|
27711
28343
|
}, {
|
|
27712
28344
|
label: "Line charts",
|
|
27713
28345
|
value: TYPECHART.LINE
|
|
27714
|
-
}]
|
|
28346
|
+
}],
|
|
28347
|
+
contentTooltip: "The visual represenation of all the responses from the question asking students to rate their perceived level of safety for themselves at your school over time."
|
|
27715
28348
|
}, {
|
|
27716
28349
|
id: "Student_by_age",
|
|
27717
|
-
label: "Student by
|
|
28350
|
+
label: "Student by Age",
|
|
27718
28351
|
children: function children(_, columnFlex) {
|
|
27719
28352
|
return React__default.createElement(StudentByAgeAndGender$1, {
|
|
27720
28353
|
columnFlex: columnFlex,
|
|
@@ -27723,20 +28356,22 @@ var useChartDatas = function useChartDatas() {
|
|
|
27723
28356
|
});
|
|
27724
28357
|
},
|
|
27725
28358
|
isShowChangeChart: false,
|
|
27726
|
-
options: []
|
|
28359
|
+
options: [],
|
|
28360
|
+
contentTooltip: "The specific represenation of students by gender and grade level at your school."
|
|
27727
28361
|
}, {
|
|
27728
28362
|
id: "student_by_grade",
|
|
27729
|
-
label: "Students by
|
|
28363
|
+
label: "Students by Designation",
|
|
27730
28364
|
children: function children(_) {
|
|
27731
28365
|
return React__default.createElement(StudentByGrade$1, {
|
|
27732
28366
|
data: studentByGrade
|
|
27733
28367
|
});
|
|
27734
28368
|
},
|
|
27735
28369
|
isShowChangeChart: false,
|
|
27736
|
-
options: []
|
|
28370
|
+
options: [],
|
|
28371
|
+
contentTooltip: "The composite representation of students by individual grades in your school with specific designations."
|
|
27737
28372
|
}];
|
|
27738
28373
|
var initialTypeChart = chartDashBoards.map(function (i) {
|
|
27739
|
-
return i.options.length > 0 ? i.options[
|
|
28374
|
+
return i.options.length > 0 ? i.options[0].value : TYPECHART.AREA;
|
|
27740
28375
|
});
|
|
27741
28376
|
var totalCardData = [{
|
|
27742
28377
|
icon: "images/icon_chart.png",
|
|
@@ -27791,7 +28426,19 @@ var useChartDatas = function useChartDatas() {
|
|
|
27791
28426
|
topLearningStrategies: topLearningStrategies,
|
|
27792
28427
|
chartClassReflection: chartClassReflection,
|
|
27793
28428
|
chartConference: chartConference,
|
|
27794
|
-
safety: safety
|
|
28429
|
+
safety: safety,
|
|
28430
|
+
dataConvertedOneToOne: dataConvertedOneToOne,
|
|
28431
|
+
activeColumnOneToOne: activeColumnOneToOne,
|
|
28432
|
+
avgOneToOne: avgOneToOne,
|
|
28433
|
+
dataConvertedClassReflection: dataConvertedClassReflection,
|
|
28434
|
+
activeColumnClassReflection: activeColumnClassReflection,
|
|
28435
|
+
avgClassReflection: avgClassReflection,
|
|
28436
|
+
dataConvertedConference: dataConvertedConference,
|
|
28437
|
+
activeColumnConference: activeColumnConference,
|
|
28438
|
+
avgConference: avgConference,
|
|
28439
|
+
dataConvertedSafety: dataConvertedSafety,
|
|
28440
|
+
activeColumnSafety: activeColumnSafety,
|
|
28441
|
+
avgSafety: avgSafety
|
|
27795
28442
|
};
|
|
27796
28443
|
};
|
|
27797
28444
|
|
|
@@ -27992,8 +28639,19 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
27992
28639
|
}));
|
|
27993
28640
|
};
|
|
27994
28641
|
|
|
28642
|
+
var handleChangeStartDate = function handleChangeStartDate(date) {
|
|
28643
|
+
!!onChangeFilters && onChangeFilters({
|
|
28644
|
+
startDate: moment(date).startOf("day").valueOf()
|
|
28645
|
+
});
|
|
28646
|
+
};
|
|
28647
|
+
|
|
28648
|
+
var handleChangeEndDate = function handleChangeEndDate(date) {
|
|
28649
|
+
!!onChangeFilters && onChangeFilters({
|
|
28650
|
+
endDate: moment(date).endOf("day").valueOf()
|
|
28651
|
+
});
|
|
28652
|
+
};
|
|
28653
|
+
|
|
27995
28654
|
var onChangeGender = function onChangeGender(item) {
|
|
27996
|
-
console.log("item", item);
|
|
27997
28655
|
!!onChangeFilters && onChangeFilters({
|
|
27998
28656
|
gender: item.value === -1 ? [LegalGenderType.None, LegalGenderType.Male, LegalGenderType.Female] : [item.value]
|
|
27999
28657
|
});
|
|
@@ -28076,6 +28734,62 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
28076
28734
|
}))));
|
|
28077
28735
|
}
|
|
28078
28736
|
|
|
28737
|
+
if (name === FILTER_NAME.StartDate) {
|
|
28738
|
+
return React__default.createElement("div", {
|
|
28739
|
+
key: "" + name,
|
|
28740
|
+
className: "" + styles["block-filter-component"]
|
|
28741
|
+
}, React__default.createElement("button", {
|
|
28742
|
+
onClick: handleToggleCollapse,
|
|
28743
|
+
className: styles["btn-filter"] + " d-flex align-items-center cursor-pointer"
|
|
28744
|
+
}, React__default.createElement("p", {
|
|
28745
|
+
className: styles["color-filter"] + " my-0 mx-2"
|
|
28746
|
+
}, "Start Date", !!(filter !== null && filter !== void 0 && filter.startDate) && ": " + moment(filter === null || filter === void 0 ? void 0 : filter.startDate).format("DD/MM/YYYY"))), React__default.createElement("div", {
|
|
28747
|
+
className: "" + styles["date-picker"]
|
|
28748
|
+
}, React__default.createElement(pickers.MuiPickersUtilsProvider, {
|
|
28749
|
+
utils: MomentUtils
|
|
28750
|
+
}, React__default.createElement(pickers.KeyboardDatePicker, {
|
|
28751
|
+
open: isOpenCollapse,
|
|
28752
|
+
onClose: handleToggleCollapse,
|
|
28753
|
+
variant: "dialog",
|
|
28754
|
+
disableToolbar: true,
|
|
28755
|
+
id: "date-picker-dialog",
|
|
28756
|
+
format: "MM/dd/yyyy",
|
|
28757
|
+
onChange: handleChangeStartDate,
|
|
28758
|
+
value: filter === null || filter === void 0 ? void 0 : filter.startDate,
|
|
28759
|
+
KeyboardButtonProps: {
|
|
28760
|
+
"aria-label": "change date"
|
|
28761
|
+
}
|
|
28762
|
+
}))));
|
|
28763
|
+
}
|
|
28764
|
+
|
|
28765
|
+
if (name === FILTER_NAME.EndDate) {
|
|
28766
|
+
return React__default.createElement("div", {
|
|
28767
|
+
key: "" + name,
|
|
28768
|
+
className: "" + styles["block-filter-component"]
|
|
28769
|
+
}, React__default.createElement("button", {
|
|
28770
|
+
onClick: handleToggleCollapse,
|
|
28771
|
+
className: styles["btn-filter"] + " d-flex align-items-center cursor-pointer"
|
|
28772
|
+
}, React__default.createElement("p", {
|
|
28773
|
+
className: styles["color-filter"] + " my-0 mx-2"
|
|
28774
|
+
}, "End Date", !!(filter !== null && filter !== void 0 && filter.endDate) && ": " + moment(filter === null || filter === void 0 ? void 0 : filter.endDate).format("DD/MM/YYYY"))), React__default.createElement("div", {
|
|
28775
|
+
className: "" + styles["date-picker"]
|
|
28776
|
+
}, React__default.createElement(pickers.MuiPickersUtilsProvider, {
|
|
28777
|
+
utils: MomentUtils
|
|
28778
|
+
}, React__default.createElement(pickers.KeyboardDatePicker, {
|
|
28779
|
+
open: isOpenCollapse,
|
|
28780
|
+
onClose: handleToggleCollapse,
|
|
28781
|
+
variant: "dialog",
|
|
28782
|
+
disableToolbar: true,
|
|
28783
|
+
id: "date-picker-dialog",
|
|
28784
|
+
format: "MM/dd/yyyy",
|
|
28785
|
+
onChange: handleChangeEndDate,
|
|
28786
|
+
value: filter === null || filter === void 0 ? void 0 : filter.endDate,
|
|
28787
|
+
KeyboardButtonProps: {
|
|
28788
|
+
"aria-label": "change date"
|
|
28789
|
+
}
|
|
28790
|
+
}))));
|
|
28791
|
+
}
|
|
28792
|
+
|
|
28079
28793
|
if (name === FILTER_NAME.Gender) {
|
|
28080
28794
|
return React__default.createElement("div", {
|
|
28081
28795
|
key: "" + name,
|
|
@@ -28298,7 +29012,19 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28298
29012
|
topLearningStrategies = props.topLearningStrategies,
|
|
28299
29013
|
chartClassReflection = props.chartClassReflection,
|
|
28300
29014
|
chartConference = props.chartConference,
|
|
28301
|
-
safety = props.safety
|
|
29015
|
+
safety = props.safety,
|
|
29016
|
+
dataConvertedOneToOne = props.dataConvertedOneToOne,
|
|
29017
|
+
activeColumnOneToOne = props.activeColumnOneToOne,
|
|
29018
|
+
avgOneToOne = props.avgOneToOne,
|
|
29019
|
+
dataConvertedClassReflection = props.dataConvertedClassReflection,
|
|
29020
|
+
activeColumnClassReflection = props.activeColumnClassReflection,
|
|
29021
|
+
avgClassReflection = props.avgClassReflection,
|
|
29022
|
+
dataConvertedConference = props.dataConvertedConference,
|
|
29023
|
+
activeColumnConference = props.activeColumnConference,
|
|
29024
|
+
avgConference = props.avgConference,
|
|
29025
|
+
dataConvertedSafety = props.dataConvertedSafety,
|
|
29026
|
+
activeColumnSafety = props.activeColumnSafety,
|
|
29027
|
+
avgSafety = props.avgSafety;
|
|
28302
29028
|
var dispatch = reactRedux.useDispatch();
|
|
28303
29029
|
var chartHightImpactLearningStrategie = selectedToPDF.find(function (i) {
|
|
28304
29030
|
return i.id === "high_impact_learning_strategie";
|
|
@@ -28408,71 +29134,87 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28408
29134
|
var _safety$overviewQuest;
|
|
28409
29135
|
|
|
28410
29136
|
if (safety.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
|
|
28411
|
-
var _sortedResultQuestion, _sortedResultQuestion2,
|
|
29137
|
+
var _sortedResultQuestion, _sortedResultQuestion2, _safety$overviewQuest2;
|
|
28412
29138
|
|
|
28413
29139
|
var sortedResultQuestions = safety.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
|
|
28414
29140
|
return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
|
|
28415
29141
|
});
|
|
28416
29142
|
var bestResultQuestion1 = ((_sortedResultQuestion = sortedResultQuestions[0]) === null || _sortedResultQuestion === void 0 ? void 0 : _sortedResultQuestion.questionText.slice(3, (_sortedResultQuestion2 = sortedResultQuestions[0]) === null || _sortedResultQuestion2 === void 0 ? void 0 : _sortedResultQuestion2.questionText.indexOf("</p>"))) || "";
|
|
28417
|
-
var bestResultQuestion2 = ((_sortedResultQuestion3 = sortedResultQuestions[1]) === null || _sortedResultQuestion3 === void 0 ? void 0 : _sortedResultQuestion3.questionText.slice(3, (_sortedResultQuestion4 = sortedResultQuestions[1]) === null || _sortedResultQuestion4 === void 0 ? void 0 : _sortedResultQuestion4.questionText.indexOf("</p>"))) || "";
|
|
28418
|
-
var bestResultQuestion3 = ((_sortedResultQuestion5 = sortedResultQuestions[2]) === null || _sortedResultQuestion5 === void 0 ? void 0 : _sortedResultQuestion5.questionText.slice(3, (_sortedResultQuestion6 = sortedResultQuestions[2]) === null || _sortedResultQuestion6 === void 0 ? void 0 : _sortedResultQuestion6.questionText.indexOf("</p>"))) || "";
|
|
28419
29143
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28420
29144
|
doc.text(safety.overviewQuestionChoice[i].month, left, line + 20);
|
|
28421
29145
|
|
|
28422
29146
|
if (bestResultQuestion1 != "") {
|
|
28423
|
-
var
|
|
29147
|
+
var _sortedResultQuestion3;
|
|
28424
29148
|
|
|
28425
29149
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28426
29150
|
doc.text(bestResultQuestion1, left + 10, line + 30);
|
|
28427
29151
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28428
|
-
doc.text(((
|
|
29152
|
+
doc.text(((_sortedResultQuestion3 = sortedResultQuestions[0]) === null || _sortedResultQuestion3 === void 0 ? void 0 : _sortedResultQuestion3.avgOfStudentChoice.toFixed(1)) + "%", left + (bestResultQuestion1 === null || bestResultQuestion1 === void 0 ? void 0 : bestResultQuestion1.length) * 4 + 15, line + 30);
|
|
28429
29153
|
doc.setDrawColor(0);
|
|
28430
29154
|
doc.setFillColor(64, 210, 204);
|
|
28431
29155
|
doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
|
|
28432
29156
|
}
|
|
28433
29157
|
|
|
28434
|
-
if (bestResultQuestion2 != "") {
|
|
28435
|
-
var _sortedResultQuestion8;
|
|
28436
|
-
|
|
28437
|
-
doc.setFont("Helvetica", "normal", "bold");
|
|
28438
|
-
doc.text(bestResultQuestion2, left + 10, line + 40);
|
|
28439
|
-
doc.setFont("Helvetica", "normal", "normal");
|
|
28440
|
-
doc.text(((_sortedResultQuestion8 = sortedResultQuestions[1]) === null || _sortedResultQuestion8 === void 0 ? void 0 : _sortedResultQuestion8.avgOfStudentChoice.toFixed(1)) + "%", left + (bestResultQuestion2 === null || bestResultQuestion2 === void 0 ? void 0 : bestResultQuestion2.length) * 4 + 15, line + 40);
|
|
28441
|
-
doc.setDrawColor(0);
|
|
28442
|
-
doc.setFillColor(120, 182, 226);
|
|
28443
|
-
doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
|
|
28444
|
-
}
|
|
28445
|
-
|
|
28446
|
-
if (bestResultQuestion3 != "") {
|
|
28447
|
-
var _sortedResultQuestion9;
|
|
28448
|
-
|
|
28449
|
-
doc.setFont("Helvetica", "normal", "bold");
|
|
28450
|
-
doc.text(bestResultQuestion3, left + 10, line + 50);
|
|
28451
|
-
doc.setFont("Helvetica", "normal", "normal");
|
|
28452
|
-
doc.text(((_sortedResultQuestion9 = sortedResultQuestions[2]) === null || _sortedResultQuestion9 === void 0 ? void 0 : _sortedResultQuestion9.avgOfStudentChoice.toFixed(1)) + "%", left + (bestResultQuestion3 === null || bestResultQuestion3 === void 0 ? void 0 : bestResultQuestion3.length) * 4 + 15, line + 50);
|
|
28453
|
-
doc.setDrawColor(0);
|
|
28454
|
-
doc.setFillColor(255, 176, 79);
|
|
28455
|
-
doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
|
|
28456
|
-
}
|
|
28457
|
-
|
|
28458
29158
|
if ((bestResultQuestion1 === null || bestResultQuestion1 === void 0 ? void 0 : bestResultQuestion1.length) * 5 + 5 + 10 > 100) {
|
|
28459
29159
|
left = left + (bestResultQuestion1 === null || bestResultQuestion1 === void 0 ? void 0 : bestResultQuestion1.length) * 5 + 20;
|
|
28460
|
-
} else if ((bestResultQuestion2 === null || bestResultQuestion2 === void 0 ? void 0 : bestResultQuestion2.length) * 5 + 5 + 10 > 100) {
|
|
28461
|
-
left = left + (bestResultQuestion2 === null || bestResultQuestion2 === void 0 ? void 0 : bestResultQuestion2.length) * 5 + 20;
|
|
28462
|
-
} else if ((bestResultQuestion3 === null || bestResultQuestion3 === void 0 ? void 0 : bestResultQuestion3.length) * 5 + 5 + 10 > 100) {
|
|
28463
|
-
left = left + (bestResultQuestion3 === null || bestResultQuestion3 === void 0 ? void 0 : bestResultQuestion3.length) * 5 + 20;
|
|
28464
29160
|
} else {
|
|
28465
29161
|
left = left + 100;
|
|
28466
29162
|
}
|
|
28467
29163
|
|
|
28468
|
-
if (left +
|
|
29164
|
+
if (left + (safety === null || safety === void 0 ? void 0 : (_safety$overviewQuest2 = safety.overviewQuestionChoice[i + 1]) === null || _safety$overviewQuest2 === void 0 ? void 0 : _safety$overviewQuest2.month.length) * 20 > WIDTH_PAPER) {
|
|
28469
29165
|
left = 20;
|
|
28470
|
-
line +=
|
|
29166
|
+
line += 30;
|
|
28471
29167
|
}
|
|
28472
29168
|
}
|
|
28473
29169
|
}
|
|
28474
29170
|
|
|
28475
|
-
doc.
|
|
29171
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29172
|
+
left = 20;
|
|
29173
|
+
|
|
29174
|
+
for (var i = 0; i < dataConvertedSafety.length; i++) {
|
|
29175
|
+
if (activeColumnSafety[i]) {
|
|
29176
|
+
doc.setDrawColor(0);
|
|
29177
|
+
doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
|
|
29178
|
+
doc.roundedRect(left, line + 60, 5, 5, 1, 1, "F");
|
|
29179
|
+
doc.setTextColor("#252733");
|
|
29180
|
+
doc.text(dataConvertedSafety[i], left + 7, line + 65);
|
|
29181
|
+
} else {
|
|
29182
|
+
doc.setDrawColor(0);
|
|
29183
|
+
doc.setFillColor("#CCCCCC");
|
|
29184
|
+
doc.roundedRect(left, line + 60, 5, 5, 1, 1, "F");
|
|
29185
|
+
doc.setTextColor("#CCCCCC");
|
|
29186
|
+
doc.text(dataConvertedSafety[i], left + 7, line + 65);
|
|
29187
|
+
}
|
|
29188
|
+
|
|
29189
|
+
left = left + dataConvertedSafety[i].length * 3 + 15;
|
|
29190
|
+
}
|
|
29191
|
+
|
|
29192
|
+
left = 20;
|
|
29193
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 70, 420, 140);
|
|
29194
|
+
|
|
29195
|
+
for (var i = 0; i < dataConvertedSafety.length; i++) {
|
|
29196
|
+
if (activeColumnSafety[i]) {
|
|
29197
|
+
doc.setDrawColor(0);
|
|
29198
|
+
doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
|
|
29199
|
+
doc.roundedRect(left, line + 215, 5, 5, 1, 1, "F");
|
|
29200
|
+
doc.setTextColor("#252733");
|
|
29201
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29202
|
+
doc.text(dataConvertedSafety[i], left + 7, line + 220);
|
|
29203
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
29204
|
+
doc.text(avgSafety[i] + "%", left, line + 227);
|
|
29205
|
+
} else {
|
|
29206
|
+
doc.setDrawColor(0);
|
|
29207
|
+
doc.setFillColor("#CCCCCC");
|
|
29208
|
+
doc.roundedRect(left, line + 215, 5, 5, 1, 1, "F");
|
|
29209
|
+
doc.setTextColor("#CCCCCC");
|
|
29210
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29211
|
+
doc.text(dataConvertedSafety[i], left + 7, line + 220);
|
|
29212
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
29213
|
+
doc.text("0.00%", left, line + 227);
|
|
29214
|
+
}
|
|
29215
|
+
|
|
29216
|
+
left = left + dataConvertedSafety[i].length * 3 + 15;
|
|
29217
|
+
}
|
|
28476
29218
|
});
|
|
28477
29219
|
});
|
|
28478
29220
|
}
|
|
@@ -28485,7 +29227,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28485
29227
|
if (!!chartConferecePDF) {
|
|
28486
29228
|
var _selectedToPDF4;
|
|
28487
29229
|
|
|
28488
|
-
var line =
|
|
29230
|
+
var line = 70;
|
|
28489
29231
|
var left = 20;
|
|
28490
29232
|
if (selectedToPDF.indexOf(chartConferecePDF) != 0 && ((_selectedToPDF4 = selectedToPDF[selectedToPDF.indexOf(chartConferecePDF) - 1]) === null || _selectedToPDF4 === void 0 ? void 0 : _selectedToPDF4.id) != null) doc.addPage();
|
|
28491
29233
|
return Promise.resolve(createImageHeader()).then(function () {
|
|
@@ -28500,87 +29242,87 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28500
29242
|
var _chartConference$over;
|
|
28501
29243
|
|
|
28502
29244
|
if (chartConference.overviewQuestionChoice[i].resultQuestion[0].questionId != 0 || chartConference.overviewQuestionChoice[i].resultQuestion[0].questionText != "") {
|
|
28503
|
-
var
|
|
29245
|
+
var _sortedResultQuestion4, _sortedResultQuestion5, _sortedResultQuestion6, _sortedResultQuestion7, _sortedResultQuestion8, _sortedResultQuestion9, _chartConference$over2;
|
|
28504
29246
|
|
|
28505
29247
|
var sortedResultQuestions = chartConference.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
|
|
28506
29248
|
return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
|
|
28507
29249
|
});
|
|
28508
|
-
var resultQuestion1 = ((
|
|
28509
|
-
var resultQuestion2 = ((
|
|
28510
|
-
var resultQuestion3 = ((
|
|
28511
|
-
var resultQuestion4 = ((
|
|
28512
|
-
var resultQuestion5 = ((
|
|
28513
|
-
var resultQuestion6 = ((
|
|
29250
|
+
var resultQuestion1 = ((_sortedResultQuestion4 = sortedResultQuestions[0]) === null || _sortedResultQuestion4 === void 0 ? void 0 : _sortedResultQuestion4.questionText) || "";
|
|
29251
|
+
var resultQuestion2 = ((_sortedResultQuestion5 = sortedResultQuestions[1]) === null || _sortedResultQuestion5 === void 0 ? void 0 : _sortedResultQuestion5.questionText) || "";
|
|
29252
|
+
var resultQuestion3 = ((_sortedResultQuestion6 = sortedResultQuestions[2]) === null || _sortedResultQuestion6 === void 0 ? void 0 : _sortedResultQuestion6.questionText) || "";
|
|
29253
|
+
var resultQuestion4 = ((_sortedResultQuestion7 = sortedResultQuestions[3]) === null || _sortedResultQuestion7 === void 0 ? void 0 : _sortedResultQuestion7.questionText) || "";
|
|
29254
|
+
var resultQuestion5 = ((_sortedResultQuestion8 = sortedResultQuestions[4]) === null || _sortedResultQuestion8 === void 0 ? void 0 : _sortedResultQuestion8.questionText) || "";
|
|
29255
|
+
var resultQuestion6 = ((_sortedResultQuestion9 = sortedResultQuestions[5]) === null || _sortedResultQuestion9 === void 0 ? void 0 : _sortedResultQuestion9.questionText) || "";
|
|
28514
29256
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28515
29257
|
doc.text(chartConference.overviewQuestionChoice[i].month, left, line + 20);
|
|
28516
29258
|
|
|
28517
29259
|
if (resultQuestion1 != "") {
|
|
28518
|
-
var
|
|
29260
|
+
var _sortedResultQuestion10;
|
|
28519
29261
|
|
|
28520
29262
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28521
29263
|
doc.text(resultQuestion1, left + 10, line + 30);
|
|
28522
29264
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28523
|
-
doc.text(((
|
|
29265
|
+
doc.text(((_sortedResultQuestion10 = sortedResultQuestions[0]) === null || _sortedResultQuestion10 === void 0 ? void 0 : _sortedResultQuestion10.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 17, line + 30);
|
|
28524
29266
|
doc.setDrawColor(0);
|
|
28525
29267
|
doc.setFillColor(64, 210, 204);
|
|
28526
29268
|
doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
|
|
28527
29269
|
}
|
|
28528
29270
|
|
|
28529
29271
|
if (resultQuestion2 != "") {
|
|
28530
|
-
var
|
|
29272
|
+
var _sortedResultQuestion11;
|
|
28531
29273
|
|
|
28532
29274
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28533
29275
|
doc.text(resultQuestion2, left + 10, line + 40);
|
|
28534
29276
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28535
|
-
doc.text(((
|
|
29277
|
+
doc.text(((_sortedResultQuestion11 = sortedResultQuestions[1]) === null || _sortedResultQuestion11 === void 0 ? void 0 : _sortedResultQuestion11.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 17, line + 40);
|
|
28536
29278
|
doc.setDrawColor(0);
|
|
28537
29279
|
doc.setFillColor(120, 182, 226);
|
|
28538
29280
|
doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
|
|
28539
29281
|
}
|
|
28540
29282
|
|
|
28541
29283
|
if (resultQuestion3 != "") {
|
|
28542
|
-
var
|
|
29284
|
+
var _sortedResultQuestion12;
|
|
28543
29285
|
|
|
28544
29286
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28545
29287
|
doc.text(resultQuestion3, left + 10, line + 50);
|
|
28546
29288
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28547
|
-
doc.text(((
|
|
29289
|
+
doc.text(((_sortedResultQuestion12 = sortedResultQuestions[2]) === null || _sortedResultQuestion12 === void 0 ? void 0 : _sortedResultQuestion12.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 17, line + 50);
|
|
28548
29290
|
doc.setDrawColor(0);
|
|
28549
29291
|
doc.setFillColor(255, 176, 79);
|
|
28550
29292
|
doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
|
|
28551
29293
|
}
|
|
28552
29294
|
|
|
28553
29295
|
if (resultQuestion4 != "") {
|
|
28554
|
-
var
|
|
29296
|
+
var _sortedResultQuestion13;
|
|
28555
29297
|
|
|
28556
29298
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28557
29299
|
doc.text(resultQuestion4, left + 10, line + 60);
|
|
28558
29300
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28559
|
-
doc.text(((
|
|
29301
|
+
doc.text(((_sortedResultQuestion13 = sortedResultQuestions[2]) === null || _sortedResultQuestion13 === void 0 ? void 0 : _sortedResultQuestion13.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 17, line + 60);
|
|
28560
29302
|
doc.setDrawColor(0);
|
|
28561
29303
|
doc.setFillColor(206, 74, 73);
|
|
28562
29304
|
doc.roundedRect(left, line + 55, 5, 5, 1, 1, "F");
|
|
28563
29305
|
}
|
|
28564
29306
|
|
|
28565
29307
|
if (resultQuestion5 != "") {
|
|
28566
|
-
var
|
|
29308
|
+
var _sortedResultQuestion14;
|
|
28567
29309
|
|
|
28568
29310
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28569
29311
|
doc.text(resultQuestion5, left + 10, line + 70);
|
|
28570
29312
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28571
|
-
doc.text(((
|
|
29313
|
+
doc.text(((_sortedResultQuestion14 = sortedResultQuestions[2]) === null || _sortedResultQuestion14 === void 0 ? void 0 : _sortedResultQuestion14.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 17, line + 70);
|
|
28572
29314
|
doc.setDrawColor(0);
|
|
28573
29315
|
doc.setFillColor(27, 183, 177);
|
|
28574
29316
|
doc.roundedRect(left, line + 65, 5, 5, 1, 1, "F");
|
|
28575
29317
|
}
|
|
28576
29318
|
|
|
28577
29319
|
if (resultQuestion6 != "") {
|
|
28578
|
-
var
|
|
29320
|
+
var _sortedResultQuestion15;
|
|
28579
29321
|
|
|
28580
29322
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28581
29323
|
doc.text(resultQuestion6, left + 10, line + 80);
|
|
28582
29324
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28583
|
-
doc.text(((
|
|
29325
|
+
doc.text(((_sortedResultQuestion15 = sortedResultQuestions[2]) === null || _sortedResultQuestion15 === void 0 ? void 0 : _sortedResultQuestion15.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion6 === null || resultQuestion6 === void 0 ? void 0 : resultQuestion6.length) * 3 + 17, line + 80);
|
|
28584
29326
|
doc.setDrawColor(0);
|
|
28585
29327
|
doc.setFillColor(75, 146, 206);
|
|
28586
29328
|
doc.roundedRect(left, line + 75, 5, 5, 1, 1, "F");
|
|
@@ -28602,14 +29344,60 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28602
29344
|
left = left + 100;
|
|
28603
29345
|
}
|
|
28604
29346
|
|
|
28605
|
-
if (left +
|
|
29347
|
+
if (left + (chartConference === null || chartConference === void 0 ? void 0 : (_chartConference$over2 = chartConference.overviewQuestionChoice[i + 1]) === null || _chartConference$over2 === void 0 ? void 0 : _chartConference$over2.month.length) * 20 > WIDTH_PAPER) {
|
|
28606
29348
|
left = 20;
|
|
28607
|
-
line +=
|
|
29349
|
+
line += 80;
|
|
28608
29350
|
}
|
|
28609
29351
|
}
|
|
28610
29352
|
}
|
|
28611
29353
|
|
|
28612
|
-
doc.
|
|
29354
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29355
|
+
left = 20;
|
|
29356
|
+
|
|
29357
|
+
for (var i = 0; i < dataConvertedConference.length; i++) {
|
|
29358
|
+
if (activeColumnConference[i]) {
|
|
29359
|
+
doc.setDrawColor(0);
|
|
29360
|
+
doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
|
|
29361
|
+
doc.roundedRect(left, line + 95, 5, 5, 1, 1, "F");
|
|
29362
|
+
doc.setTextColor("#252733");
|
|
29363
|
+
doc.text(dataConvertedConference[i], left + 7, line + 100);
|
|
29364
|
+
} else {
|
|
29365
|
+
doc.setDrawColor(0);
|
|
29366
|
+
doc.setFillColor("#CCCCCC");
|
|
29367
|
+
doc.roundedRect(left, line + 95, 5, 5, 1, 1, "F");
|
|
29368
|
+
doc.setTextColor("#CCCCCC");
|
|
29369
|
+
doc.text(dataConvertedConference[i], left + 7, line + 100);
|
|
29370
|
+
}
|
|
29371
|
+
|
|
29372
|
+
left = left + dataConvertedConference[i].length * 3 + 15;
|
|
29373
|
+
}
|
|
29374
|
+
|
|
29375
|
+
left = 20;
|
|
29376
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 105, 420, 140);
|
|
29377
|
+
|
|
29378
|
+
for (var i = 0; i < dataConvertedConference.length; i++) {
|
|
29379
|
+
if (activeColumnConference[i]) {
|
|
29380
|
+
doc.setDrawColor(0);
|
|
29381
|
+
doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
|
|
29382
|
+
doc.roundedRect(left, line + 250, 5, 5, 1, 1, "F");
|
|
29383
|
+
doc.setTextColor("#252733");
|
|
29384
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29385
|
+
doc.text(dataConvertedConference[i], left + 7, line + 255);
|
|
29386
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
29387
|
+
doc.text(avgConference[i] + "%", left, line + 262);
|
|
29388
|
+
} else {
|
|
29389
|
+
doc.setDrawColor(0);
|
|
29390
|
+
doc.setFillColor("#CCCCCC");
|
|
29391
|
+
doc.roundedRect(left, line + 250, 5, 5, 1, 1, "F");
|
|
29392
|
+
doc.setTextColor("#CCCCCC");
|
|
29393
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29394
|
+
doc.text(dataConvertedConference[i], left + 7, line + 255);
|
|
29395
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
29396
|
+
doc.text("0.00%", left, line + 262);
|
|
29397
|
+
}
|
|
29398
|
+
|
|
29399
|
+
left = left + dataConvertedConference[i].length * 3 + 15;
|
|
29400
|
+
}
|
|
28613
29401
|
});
|
|
28614
29402
|
});
|
|
28615
29403
|
}
|
|
@@ -28622,7 +29410,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28622
29410
|
if (!!chartClassReflectionPDF) {
|
|
28623
29411
|
var _selectedToPDF5;
|
|
28624
29412
|
|
|
28625
|
-
var line =
|
|
29413
|
+
var line = 70;
|
|
28626
29414
|
var left = 20;
|
|
28627
29415
|
if (selectedToPDF.indexOf(chartClassReflectionPDF) != 0 && ((_selectedToPDF5 = selectedToPDF[selectedToPDF.indexOf(chartClassReflectionPDF) - 1]) === null || _selectedToPDF5 === void 0 ? void 0 : _selectedToPDF5.id) != null) doc.addPage();
|
|
28628
29416
|
return Promise.resolve(createImageHeader()).then(function () {
|
|
@@ -28637,74 +29425,74 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28637
29425
|
var _chartClassReflection;
|
|
28638
29426
|
|
|
28639
29427
|
if (chartClassReflection.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
|
|
28640
|
-
var
|
|
29428
|
+
var _sortedResultQuestion16, _sortedResultQuestion17, _sortedResultQuestion18, _sortedResultQuestion19, _sortedResultQuestion20, _sortedResultQuestion21, _sortedResultQuestion22, _sortedResultQuestion23, _sortedResultQuestion24, _sortedResultQuestion25, _chartClassReflection2;
|
|
28641
29429
|
|
|
28642
29430
|
var sortedResultQuestions = chartClassReflection.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
|
|
28643
29431
|
return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
|
|
28644
29432
|
});
|
|
28645
|
-
var resultQuestion1 = ((
|
|
28646
|
-
var resultQuestion2 = ((
|
|
28647
|
-
var resultQuestion3 = ((
|
|
28648
|
-
var resultQuestion4 = ((
|
|
28649
|
-
var resultQuestion5 = ((
|
|
29433
|
+
var resultQuestion1 = ((_sortedResultQuestion16 = sortedResultQuestions[0]) === null || _sortedResultQuestion16 === void 0 ? void 0 : _sortedResultQuestion16.questionText.slice(3, (_sortedResultQuestion17 = sortedResultQuestions[0]) === null || _sortedResultQuestion17 === void 0 ? void 0 : _sortedResultQuestion17.questionText.indexOf("</p>"))) || "";
|
|
29434
|
+
var resultQuestion2 = ((_sortedResultQuestion18 = sortedResultQuestions[1]) === null || _sortedResultQuestion18 === void 0 ? void 0 : _sortedResultQuestion18.questionText.slice(3, (_sortedResultQuestion19 = sortedResultQuestions[1]) === null || _sortedResultQuestion19 === void 0 ? void 0 : _sortedResultQuestion19.questionText.indexOf("</p>"))) || "";
|
|
29435
|
+
var resultQuestion3 = ((_sortedResultQuestion20 = sortedResultQuestions[2]) === null || _sortedResultQuestion20 === void 0 ? void 0 : _sortedResultQuestion20.questionText.slice(3, (_sortedResultQuestion21 = sortedResultQuestions[2]) === null || _sortedResultQuestion21 === void 0 ? void 0 : _sortedResultQuestion21.questionText.indexOf("</p>"))) || "";
|
|
29436
|
+
var resultQuestion4 = ((_sortedResultQuestion22 = sortedResultQuestions[3]) === null || _sortedResultQuestion22 === void 0 ? void 0 : _sortedResultQuestion22.questionText.slice(3, (_sortedResultQuestion23 = sortedResultQuestions[3]) === null || _sortedResultQuestion23 === void 0 ? void 0 : _sortedResultQuestion23.questionText.indexOf("</p>"))) || "";
|
|
29437
|
+
var resultQuestion5 = ((_sortedResultQuestion24 = sortedResultQuestions[4]) === null || _sortedResultQuestion24 === void 0 ? void 0 : _sortedResultQuestion24.questionText.slice(3, (_sortedResultQuestion25 = sortedResultQuestions[4]) === null || _sortedResultQuestion25 === void 0 ? void 0 : _sortedResultQuestion25.questionText.indexOf("</p>"))) || "";
|
|
28650
29438
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28651
29439
|
doc.text(chartClassReflection.overviewQuestionChoice[i].month, left, line + 20);
|
|
28652
29440
|
|
|
28653
29441
|
if (resultQuestion1 != "") {
|
|
28654
|
-
var
|
|
29442
|
+
var _sortedResultQuestion26;
|
|
28655
29443
|
|
|
28656
29444
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28657
29445
|
doc.text(resultQuestion1, left + 10, line + 30);
|
|
28658
29446
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28659
|
-
doc.text(((
|
|
29447
|
+
doc.text(((_sortedResultQuestion26 = sortedResultQuestions[0]) === null || _sortedResultQuestion26 === void 0 ? void 0 : _sortedResultQuestion26.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 15, line + 30);
|
|
28660
29448
|
doc.setDrawColor(0);
|
|
28661
29449
|
doc.setFillColor(64, 210, 204);
|
|
28662
29450
|
doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
|
|
28663
29451
|
}
|
|
28664
29452
|
|
|
28665
29453
|
if (resultQuestion2 != "") {
|
|
28666
|
-
var
|
|
29454
|
+
var _sortedResultQuestion27;
|
|
28667
29455
|
|
|
28668
29456
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28669
29457
|
doc.text(resultQuestion2, left + 10, line + 40);
|
|
28670
29458
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28671
|
-
doc.text(((
|
|
29459
|
+
doc.text(((_sortedResultQuestion27 = sortedResultQuestions[1]) === null || _sortedResultQuestion27 === void 0 ? void 0 : _sortedResultQuestion27.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 15, line + 40);
|
|
28672
29460
|
doc.setDrawColor(0);
|
|
28673
29461
|
doc.setFillColor(120, 182, 226);
|
|
28674
29462
|
doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
|
|
28675
29463
|
}
|
|
28676
29464
|
|
|
28677
29465
|
if (resultQuestion3 != "") {
|
|
28678
|
-
var
|
|
29466
|
+
var _sortedResultQuestion28;
|
|
28679
29467
|
|
|
28680
29468
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28681
29469
|
doc.text(resultQuestion3, left + 10, line + 50);
|
|
28682
29470
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28683
|
-
doc.text(((
|
|
29471
|
+
doc.text(((_sortedResultQuestion28 = sortedResultQuestions[2]) === null || _sortedResultQuestion28 === void 0 ? void 0 : _sortedResultQuestion28.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 15, line + 50);
|
|
28684
29472
|
doc.setDrawColor(0);
|
|
28685
29473
|
doc.setFillColor(255, 176, 79);
|
|
28686
29474
|
doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
|
|
28687
29475
|
}
|
|
28688
29476
|
|
|
28689
29477
|
if (resultQuestion4 != "") {
|
|
28690
|
-
var
|
|
29478
|
+
var _sortedResultQuestion29;
|
|
28691
29479
|
|
|
28692
29480
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28693
29481
|
doc.text(resultQuestion4, left + 10, line + 60);
|
|
28694
29482
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28695
|
-
doc.text(((
|
|
29483
|
+
doc.text(((_sortedResultQuestion29 = sortedResultQuestions[3]) === null || _sortedResultQuestion29 === void 0 ? void 0 : _sortedResultQuestion29.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 15, line + 60);
|
|
28696
29484
|
doc.setDrawColor(0);
|
|
28697
29485
|
doc.setFillColor(206, 74, 73);
|
|
28698
29486
|
doc.roundedRect(left, line + 55, 5, 5, 1, 1, "F");
|
|
28699
29487
|
}
|
|
28700
29488
|
|
|
28701
29489
|
if (resultQuestion5 != "") {
|
|
28702
|
-
var
|
|
29490
|
+
var _sortedResultQuestion30;
|
|
28703
29491
|
|
|
28704
29492
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28705
29493
|
doc.text(resultQuestion5, left + 10, line + 70);
|
|
28706
29494
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28707
|
-
doc.text(((
|
|
29495
|
+
doc.text(((_sortedResultQuestion30 = sortedResultQuestions[4]) === null || _sortedResultQuestion30 === void 0 ? void 0 : _sortedResultQuestion30.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 15, line + 70);
|
|
28708
29496
|
doc.setDrawColor(0);
|
|
28709
29497
|
doc.setFillColor(27, 183, 177);
|
|
28710
29498
|
doc.roundedRect(left, line + 65, 5, 5, 1, 1, "F");
|
|
@@ -28724,14 +29512,64 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28724
29512
|
left = left + 80;
|
|
28725
29513
|
}
|
|
28726
29514
|
|
|
28727
|
-
|
|
29515
|
+
console.log({
|
|
29516
|
+
left: left
|
|
29517
|
+
});
|
|
29518
|
+
|
|
29519
|
+
if (left + (chartClassReflection === null || chartClassReflection === void 0 ? void 0 : (_chartClassReflection2 = chartClassReflection.overviewQuestionChoice[i + 1]) === null || _chartClassReflection2 === void 0 ? void 0 : _chartClassReflection2.month.length) * 20 > WIDTH_PAPER) {
|
|
28728
29520
|
left = 20;
|
|
28729
|
-
line +=
|
|
29521
|
+
line += 55;
|
|
28730
29522
|
}
|
|
28731
29523
|
}
|
|
28732
29524
|
}
|
|
28733
29525
|
|
|
28734
|
-
doc.
|
|
29526
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29527
|
+
left = 20;
|
|
29528
|
+
|
|
29529
|
+
for (var i = 0; i < dataConvertedClassReflection.length; i++) {
|
|
29530
|
+
if (activeColumnClassReflection[i]) {
|
|
29531
|
+
doc.setDrawColor(0);
|
|
29532
|
+
doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
|
|
29533
|
+
doc.roundedRect(left, line + 95, 5, 5, 1, 1, "F");
|
|
29534
|
+
doc.setTextColor("#252733");
|
|
29535
|
+
doc.text(dataConvertedClassReflection[i], left + 7, line + 100);
|
|
29536
|
+
} else {
|
|
29537
|
+
doc.setDrawColor(0);
|
|
29538
|
+
doc.setFillColor("#CCCCCC");
|
|
29539
|
+
doc.roundedRect(left, line + 95, 5, 5, 1, 1, "F");
|
|
29540
|
+
doc.setTextColor("#CCCCCC");
|
|
29541
|
+
doc.text(dataConvertedClassReflection[i], left + 7, line + 100);
|
|
29542
|
+
}
|
|
29543
|
+
|
|
29544
|
+
left = left + dataConvertedClassReflection[i].length * 3 + 15;
|
|
29545
|
+
}
|
|
29546
|
+
|
|
29547
|
+
left = 20;
|
|
29548
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 105, 420, 140);
|
|
29549
|
+
|
|
29550
|
+
for (var i = 0; i < dataConvertedClassReflection.length; i++) {
|
|
29551
|
+
if (activeColumnClassReflection[i]) {
|
|
29552
|
+
doc.setDrawColor(0);
|
|
29553
|
+
doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
|
|
29554
|
+
doc.roundedRect(left, line + 250, 5, 5, 1, 1, "F");
|
|
29555
|
+
doc.setTextColor("#252733");
|
|
29556
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29557
|
+
doc.text(dataConvertedClassReflection[i], left + 7, line + 255);
|
|
29558
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
29559
|
+
doc.text(avgClassReflection[i] + "%", left, line + 262);
|
|
29560
|
+
} else {
|
|
29561
|
+
doc.setDrawColor(0);
|
|
29562
|
+
doc.setFillColor("#CCCCCC");
|
|
29563
|
+
doc.roundedRect(left, line + 250, 5, 5, 1, 1, "F");
|
|
29564
|
+
doc.setTextColor("#CCCCCC");
|
|
29565
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29566
|
+
doc.text(dataConvertedClassReflection[i], left + 7, line + 255);
|
|
29567
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
29568
|
+
doc.text("0.00%", left, line + 262);
|
|
29569
|
+
}
|
|
29570
|
+
|
|
29571
|
+
left = left + dataConvertedClassReflection[i].length * 3 + 15;
|
|
29572
|
+
}
|
|
28735
29573
|
});
|
|
28736
29574
|
});
|
|
28737
29575
|
}
|
|
@@ -28744,7 +29582,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28744
29582
|
if (!!chartOneToOne) {
|
|
28745
29583
|
var _selectedToPDF6;
|
|
28746
29584
|
|
|
28747
|
-
var line =
|
|
29585
|
+
var line = 70;
|
|
28748
29586
|
var left = 20;
|
|
28749
29587
|
if (selectedToPDF.indexOf(chartOneToOne) != 0 && ((_selectedToPDF6 = selectedToPDF[selectedToPDF.indexOf(chartOneToOne) - 1]) === null || _selectedToPDF6 === void 0 ? void 0 : _selectedToPDF6.id) != null) doc.addPage();
|
|
28750
29588
|
return Promise.resolve(createImageHeader()).then(function () {
|
|
@@ -28759,126 +29597,126 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28759
29597
|
var _chartOneToOneData$ov;
|
|
28760
29598
|
|
|
28761
29599
|
if (chartOneToOneData.overviewQuestionChoice[i].resultQuestion[0].questionId != 0) {
|
|
28762
|
-
var _sortedResultQuestion37, _sortedResultQuestion38, _sortedResultQuestion39, _sortedResultQuestion40, _sortedResultQuestion41, _sortedResultQuestion42, _sortedResultQuestion43, _sortedResultQuestion44, _sortedResultQuestion45, _sortedResultQuestion46, _sortedResultQuestion47, _sortedResultQuestion48,
|
|
29600
|
+
var _sortedResultQuestion31, _sortedResultQuestion32, _sortedResultQuestion33, _sortedResultQuestion34, _sortedResultQuestion35, _sortedResultQuestion36, _sortedResultQuestion37, _sortedResultQuestion38, _sortedResultQuestion39, _sortedResultQuestion40, _sortedResultQuestion41, _sortedResultQuestion42, _sortedResultQuestion43, _sortedResultQuestion44, _sortedResultQuestion45, _sortedResultQuestion46, _sortedResultQuestion47, _sortedResultQuestion48, _chartOneToOneData$ov2;
|
|
28763
29601
|
|
|
28764
29602
|
var sortedResultQuestions = chartOneToOneData.overviewQuestionChoice[i].resultQuestion.sort(function (a, b) {
|
|
28765
29603
|
return a.avgOfStudentChoice < b.avgOfStudentChoice ? 1 : -1;
|
|
28766
29604
|
});
|
|
28767
|
-
var resultQuestion1 = ((
|
|
28768
|
-
var resultQuestion2 = ((
|
|
28769
|
-
var resultQuestion3 = ((
|
|
28770
|
-
var resultQuestion4 = ((
|
|
28771
|
-
var resultQuestion5 = ((
|
|
28772
|
-
var resultQuestion6 = ((
|
|
28773
|
-
var resultQuestion7 = ((
|
|
28774
|
-
var resultQuestion8 = ((
|
|
28775
|
-
var resultQuestion9 = ((
|
|
29605
|
+
var resultQuestion1 = ((_sortedResultQuestion31 = sortedResultQuestions[0]) === null || _sortedResultQuestion31 === void 0 ? void 0 : _sortedResultQuestion31.questionText.slice(3, (_sortedResultQuestion32 = sortedResultQuestions[0]) === null || _sortedResultQuestion32 === void 0 ? void 0 : _sortedResultQuestion32.questionText.indexOf("</p>"))) || "";
|
|
29606
|
+
var resultQuestion2 = ((_sortedResultQuestion33 = sortedResultQuestions[1]) === null || _sortedResultQuestion33 === void 0 ? void 0 : _sortedResultQuestion33.questionText.slice(3, (_sortedResultQuestion34 = sortedResultQuestions[1]) === null || _sortedResultQuestion34 === void 0 ? void 0 : _sortedResultQuestion34.questionText.indexOf("</p>"))) || "";
|
|
29607
|
+
var resultQuestion3 = ((_sortedResultQuestion35 = sortedResultQuestions[2]) === null || _sortedResultQuestion35 === void 0 ? void 0 : _sortedResultQuestion35.questionText.slice(3, (_sortedResultQuestion36 = sortedResultQuestions[2]) === null || _sortedResultQuestion36 === void 0 ? void 0 : _sortedResultQuestion36.questionText.indexOf("</p>"))) || "";
|
|
29608
|
+
var resultQuestion4 = ((_sortedResultQuestion37 = sortedResultQuestions[3]) === null || _sortedResultQuestion37 === void 0 ? void 0 : _sortedResultQuestion37.questionText.slice(3, (_sortedResultQuestion38 = sortedResultQuestions[3]) === null || _sortedResultQuestion38 === void 0 ? void 0 : _sortedResultQuestion38.questionText.indexOf("</p>"))) || "";
|
|
29609
|
+
var resultQuestion5 = ((_sortedResultQuestion39 = sortedResultQuestions[4]) === null || _sortedResultQuestion39 === void 0 ? void 0 : _sortedResultQuestion39.questionText.slice(3, (_sortedResultQuestion40 = sortedResultQuestions[4]) === null || _sortedResultQuestion40 === void 0 ? void 0 : _sortedResultQuestion40.questionText.indexOf("</p>"))) || "";
|
|
29610
|
+
var resultQuestion6 = ((_sortedResultQuestion41 = sortedResultQuestions[5]) === null || _sortedResultQuestion41 === void 0 ? void 0 : _sortedResultQuestion41.questionText.slice(3, (_sortedResultQuestion42 = sortedResultQuestions[5]) === null || _sortedResultQuestion42 === void 0 ? void 0 : _sortedResultQuestion42.questionText.indexOf("</p>"))) || "";
|
|
29611
|
+
var resultQuestion7 = ((_sortedResultQuestion43 = sortedResultQuestions[6]) === null || _sortedResultQuestion43 === void 0 ? void 0 : _sortedResultQuestion43.questionText.slice(3, (_sortedResultQuestion44 = sortedResultQuestions[6]) === null || _sortedResultQuestion44 === void 0 ? void 0 : _sortedResultQuestion44.questionText.indexOf("</p>"))) || "";
|
|
29612
|
+
var resultQuestion8 = ((_sortedResultQuestion45 = sortedResultQuestions[7]) === null || _sortedResultQuestion45 === void 0 ? void 0 : _sortedResultQuestion45.questionText.slice(3, (_sortedResultQuestion46 = sortedResultQuestions[7]) === null || _sortedResultQuestion46 === void 0 ? void 0 : _sortedResultQuestion46.questionText.indexOf("</p>"))) || "";
|
|
29613
|
+
var resultQuestion9 = ((_sortedResultQuestion47 = sortedResultQuestions[8]) === null || _sortedResultQuestion47 === void 0 ? void 0 : _sortedResultQuestion47.questionText.slice(3, (_sortedResultQuestion48 = sortedResultQuestions[8]) === null || _sortedResultQuestion48 === void 0 ? void 0 : _sortedResultQuestion48.questionText.indexOf("</p>"))) || "";
|
|
28776
29614
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28777
29615
|
doc.text(chartOneToOneData.overviewQuestionChoice[i].month, left, line + 20);
|
|
28778
29616
|
|
|
28779
29617
|
if (resultQuestion1 != "") {
|
|
28780
|
-
var
|
|
29618
|
+
var _sortedResultQuestion49;
|
|
28781
29619
|
|
|
28782
29620
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28783
29621
|
doc.text(resultQuestion1, left + 10, line + 30);
|
|
28784
29622
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28785
|
-
doc.text(((
|
|
29623
|
+
doc.text(((_sortedResultQuestion49 = sortedResultQuestions[0]) === null || _sortedResultQuestion49 === void 0 ? void 0 : _sortedResultQuestion49.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion1 === null || resultQuestion1 === void 0 ? void 0 : resultQuestion1.length) * 3 + 17, line + 30);
|
|
28786
29624
|
doc.setDrawColor(0);
|
|
28787
29625
|
doc.setFillColor(64, 210, 204);
|
|
28788
29626
|
doc.roundedRect(left, line + 25, 5, 5, 1, 1, "F");
|
|
28789
29627
|
}
|
|
28790
29628
|
|
|
28791
29629
|
if (resultQuestion2 != "") {
|
|
28792
|
-
var
|
|
29630
|
+
var _sortedResultQuestion50;
|
|
28793
29631
|
|
|
28794
29632
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28795
29633
|
doc.text(resultQuestion2, left + 10, line + 40);
|
|
28796
29634
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28797
|
-
doc.text(((
|
|
29635
|
+
doc.text(((_sortedResultQuestion50 = sortedResultQuestions[1]) === null || _sortedResultQuestion50 === void 0 ? void 0 : _sortedResultQuestion50.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion2 === null || resultQuestion2 === void 0 ? void 0 : resultQuestion2.length) * 3 + 17, line + 40);
|
|
28798
29636
|
doc.setDrawColor(0);
|
|
28799
29637
|
doc.setFillColor(120, 182, 226);
|
|
28800
29638
|
doc.roundedRect(left, line + 35, 5, 5, 1, 1, "F");
|
|
28801
29639
|
}
|
|
28802
29640
|
|
|
28803
29641
|
if (resultQuestion3 != "") {
|
|
28804
|
-
var
|
|
29642
|
+
var _sortedResultQuestion51;
|
|
28805
29643
|
|
|
28806
29644
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28807
29645
|
doc.text(resultQuestion3, left + 10, line + 50);
|
|
28808
29646
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28809
|
-
doc.text(((
|
|
29647
|
+
doc.text(((_sortedResultQuestion51 = sortedResultQuestions[2]) === null || _sortedResultQuestion51 === void 0 ? void 0 : _sortedResultQuestion51.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion3 === null || resultQuestion3 === void 0 ? void 0 : resultQuestion3.length) * 3 + 17, line + 50);
|
|
28810
29648
|
doc.setDrawColor(0);
|
|
28811
29649
|
doc.setFillColor(255, 176, 79);
|
|
28812
29650
|
doc.roundedRect(left, line + 45, 5, 5, 1, 1, "F");
|
|
28813
29651
|
}
|
|
28814
29652
|
|
|
28815
29653
|
if (resultQuestion4 != "") {
|
|
28816
|
-
var
|
|
29654
|
+
var _sortedResultQuestion52;
|
|
28817
29655
|
|
|
28818
29656
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28819
29657
|
doc.text(resultQuestion4, left + 10, line + 60);
|
|
28820
29658
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28821
|
-
doc.text(((
|
|
29659
|
+
doc.text(((_sortedResultQuestion52 = sortedResultQuestions[3]) === null || _sortedResultQuestion52 === void 0 ? void 0 : _sortedResultQuestion52.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion4 === null || resultQuestion4 === void 0 ? void 0 : resultQuestion4.length) * 3 + 17, line + 60);
|
|
28822
29660
|
doc.setDrawColor(0);
|
|
28823
29661
|
doc.setFillColor(206, 74, 73);
|
|
28824
29662
|
doc.roundedRect(left, line + 55, 5, 5, 1, 1, "F");
|
|
28825
29663
|
}
|
|
28826
29664
|
|
|
28827
29665
|
if (resultQuestion5 != "") {
|
|
28828
|
-
var
|
|
29666
|
+
var _sortedResultQuestion53;
|
|
28829
29667
|
|
|
28830
29668
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28831
29669
|
doc.text(resultQuestion5, left + 10, line + 70);
|
|
28832
29670
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28833
|
-
doc.text(((
|
|
29671
|
+
doc.text(((_sortedResultQuestion53 = sortedResultQuestions[4]) === null || _sortedResultQuestion53 === void 0 ? void 0 : _sortedResultQuestion53.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion5 === null || resultQuestion5 === void 0 ? void 0 : resultQuestion5.length) * 3 + 17, line + 70);
|
|
28834
29672
|
doc.setDrawColor(0);
|
|
28835
29673
|
doc.setFillColor(27, 183, 177);
|
|
28836
29674
|
doc.roundedRect(left, line + 65, 5, 5, 1, 1, "F");
|
|
28837
29675
|
}
|
|
28838
29676
|
|
|
28839
29677
|
if (resultQuestion6 != "") {
|
|
28840
|
-
var
|
|
29678
|
+
var _sortedResultQuestion54;
|
|
28841
29679
|
|
|
28842
29680
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28843
29681
|
doc.text(resultQuestion6, left + 10, line + 80);
|
|
28844
29682
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28845
|
-
doc.text(((
|
|
29683
|
+
doc.text(((_sortedResultQuestion54 = sortedResultQuestions[5]) === null || _sortedResultQuestion54 === void 0 ? void 0 : _sortedResultQuestion54.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion6 === null || resultQuestion6 === void 0 ? void 0 : resultQuestion6.length) * 3 + 17, line + 80);
|
|
28846
29684
|
doc.setDrawColor(0);
|
|
28847
29685
|
doc.setFillColor(75, 146, 206);
|
|
28848
29686
|
doc.roundedRect(left, line + 75, 5, 5, 1, 1, "F");
|
|
28849
29687
|
}
|
|
28850
29688
|
|
|
28851
29689
|
if (resultQuestion7 != "") {
|
|
28852
|
-
var
|
|
29690
|
+
var _sortedResultQuestion55;
|
|
28853
29691
|
|
|
28854
29692
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28855
29693
|
doc.text(resultQuestion7, left + 10, line + 90);
|
|
28856
29694
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28857
|
-
doc.text(((
|
|
29695
|
+
doc.text(((_sortedResultQuestion55 = sortedResultQuestions[6]) === null || _sortedResultQuestion55 === void 0 ? void 0 : _sortedResultQuestion55.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion7 === null || resultQuestion7 === void 0 ? void 0 : resultQuestion7.length) * 3 + 17, line + 90);
|
|
28858
29696
|
doc.setDrawColor(0);
|
|
28859
29697
|
doc.setFillColor(240, 148, 34);
|
|
28860
29698
|
doc.roundedRect(left, line + 85, 5, 5, 1, 1, "F");
|
|
28861
29699
|
}
|
|
28862
29700
|
|
|
28863
29701
|
if (resultQuestion8 != "") {
|
|
28864
|
-
var
|
|
29702
|
+
var _sortedResultQuestion56;
|
|
28865
29703
|
|
|
28866
29704
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28867
29705
|
doc.text(resultQuestion8, left + 10, line + 100);
|
|
28868
29706
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28869
|
-
doc.text(((
|
|
29707
|
+
doc.text(((_sortedResultQuestion56 = sortedResultQuestions[7]) === null || _sortedResultQuestion56 === void 0 ? void 0 : _sortedResultQuestion56.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion8 === null || resultQuestion8 === void 0 ? void 0 : resultQuestion8.length) * 3 + 17, line + 100);
|
|
28870
29708
|
doc.setDrawColor(0);
|
|
28871
29709
|
doc.setFillColor(162, 51, 51);
|
|
28872
29710
|
doc.roundedRect(left, line + 95, 5, 5, 1, 1, "F");
|
|
28873
29711
|
}
|
|
28874
29712
|
|
|
28875
29713
|
if (resultQuestion9 != "") {
|
|
28876
|
-
var
|
|
29714
|
+
var _sortedResultQuestion57;
|
|
28877
29715
|
|
|
28878
29716
|
doc.setFont("Helvetica", "normal", "bold");
|
|
28879
29717
|
doc.text(resultQuestion9, left + 10, line + 110);
|
|
28880
29718
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28881
|
-
doc.text(((
|
|
29719
|
+
doc.text(((_sortedResultQuestion57 = sortedResultQuestions[8]) === null || _sortedResultQuestion57 === void 0 ? void 0 : _sortedResultQuestion57.avgOfStudentChoice.toFixed(1)) + "%", left + (resultQuestion9 === null || resultQuestion9 === void 0 ? void 0 : resultQuestion9.length) * 3 + 17, line + 110);
|
|
28882
29720
|
doc.setDrawColor(0);
|
|
28883
29721
|
doc.setFillColor(11, 153, 148);
|
|
28884
29722
|
doc.roundedRect(left, line + 105, 5, 5, 1, 1, "F");
|
|
@@ -28886,14 +29724,60 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28886
29724
|
|
|
28887
29725
|
left = left + 100;
|
|
28888
29726
|
|
|
28889
|
-
if (left +
|
|
29727
|
+
if (left + (chartOneToOneData === null || chartOneToOneData === void 0 ? void 0 : (_chartOneToOneData$ov2 = chartOneToOneData.overviewQuestionChoice[i + 1]) === null || _chartOneToOneData$ov2 === void 0 ? void 0 : _chartOneToOneData$ov2.month.length) * 10 > WIDTH_PAPER) {
|
|
28890
29728
|
left = 20;
|
|
28891
29729
|
line += 110;
|
|
28892
29730
|
}
|
|
28893
29731
|
}
|
|
28894
29732
|
}
|
|
28895
29733
|
|
|
28896
|
-
doc.
|
|
29734
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29735
|
+
left = 20;
|
|
29736
|
+
|
|
29737
|
+
for (var i = 0; i < dataConvertedOneToOne.length; i++) {
|
|
29738
|
+
if (activeColumnOneToOne[i]) {
|
|
29739
|
+
doc.setDrawColor(0);
|
|
29740
|
+
doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
|
|
29741
|
+
doc.roundedRect(left, line + 130, 5, 5, 1, 1, "F");
|
|
29742
|
+
doc.setTextColor("#252733");
|
|
29743
|
+
doc.text(dataConvertedOneToOne[i], left + 7, line + 135);
|
|
29744
|
+
} else {
|
|
29745
|
+
doc.setDrawColor(0);
|
|
29746
|
+
doc.setFillColor("#CCCCCC");
|
|
29747
|
+
doc.roundedRect(left, line + 130, 5, 5, 1, 1, "F");
|
|
29748
|
+
doc.setTextColor("#CCCCCC");
|
|
29749
|
+
doc.text(dataConvertedOneToOne[i], left + 7, line + 135);
|
|
29750
|
+
}
|
|
29751
|
+
|
|
29752
|
+
left = left + dataConvertedOneToOne[i].length * 3 + 15;
|
|
29753
|
+
}
|
|
29754
|
+
|
|
29755
|
+
left = 20;
|
|
29756
|
+
doc.addImage(canvas.toDataURL("image/png", 1.0), 15, line + 140, 420, 170);
|
|
29757
|
+
|
|
29758
|
+
for (var i = 0; i < dataConvertedOneToOne.length; i++) {
|
|
29759
|
+
if (activeColumnOneToOne[i]) {
|
|
29760
|
+
doc.setDrawColor(0);
|
|
29761
|
+
doc.setFillColor(COLOR_CHART_AND_PERCENTS[i]);
|
|
29762
|
+
doc.roundedRect(left, line + 315, 5, 5, 1, 1, "F");
|
|
29763
|
+
doc.setTextColor("#252733");
|
|
29764
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29765
|
+
doc.text(dataConvertedOneToOne[i], left + 7, line + 320);
|
|
29766
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
29767
|
+
doc.text(avgOneToOne[i] + "%", left, line + 327);
|
|
29768
|
+
} else {
|
|
29769
|
+
doc.setDrawColor(0);
|
|
29770
|
+
doc.setFillColor("#CCCCCC");
|
|
29771
|
+
doc.roundedRect(left, line + 315, 5, 5, 1, 1, "F");
|
|
29772
|
+
doc.setTextColor("#CCCCCC");
|
|
29773
|
+
doc.setFont("Helvetica", "normal", "normal");
|
|
29774
|
+
doc.text(dataConvertedOneToOne[i], left + 7, line + 320);
|
|
29775
|
+
doc.setFont("Helvetica", "normal", "bold");
|
|
29776
|
+
doc.text("0.00%", left, line + 327);
|
|
29777
|
+
}
|
|
29778
|
+
|
|
29779
|
+
left = left + dataConvertedOneToOne[i].length * 3 + 15;
|
|
29780
|
+
}
|
|
28897
29781
|
});
|
|
28898
29782
|
});
|
|
28899
29783
|
}
|
|
@@ -28906,7 +29790,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28906
29790
|
if (!!chartReadinessToLearn) {
|
|
28907
29791
|
var _selectedToPDF7;
|
|
28908
29792
|
|
|
28909
|
-
var line =
|
|
29793
|
+
var line = 70;
|
|
28910
29794
|
var left = 20;
|
|
28911
29795
|
if (selectedToPDF.indexOf(chartReadinessToLearn) != 0 && ((_selectedToPDF7 = selectedToPDF[selectedToPDF.indexOf(chartReadinessToLearn) - 1]) === null || _selectedToPDF7 === void 0 ? void 0 : _selectedToPDF7.id) != null) doc.addPage();
|
|
28912
29796
|
return Promise.resolve(createImageHeader()).then(function () {
|
|
@@ -28935,7 +29819,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28935
29819
|
try {
|
|
28936
29820
|
var imageLogo = document.getElementById("header-logo");
|
|
28937
29821
|
return Promise.resolve(html2canvas(imageLogo)).then(function (imageLogoCanvas) {
|
|
28938
|
-
doc.addImage(imageLogoCanvas.toDataURL("image/png", 1.0), "png", 20, 20,
|
|
29822
|
+
doc.addImage(imageLogoCanvas.toDataURL("image/png", 1.0), "png", 20, 20, 90, 25);
|
|
28939
29823
|
});
|
|
28940
29824
|
} catch (e) {
|
|
28941
29825
|
return Promise.reject(e);
|
|
@@ -28947,7 +29831,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28947
29831
|
|
|
28948
29832
|
var _temp15 = function () {
|
|
28949
29833
|
if (!!chartHightImpactLearningStrategie) {
|
|
28950
|
-
var line =
|
|
29834
|
+
var line = 70;
|
|
28951
29835
|
var left = 20;
|
|
28952
29836
|
if (selectedToPDF.indexOf(chartHightImpactLearningStrategie) != 0 && selectedToPDF[selectedToPDF.indexOf(chartHightImpactLearningStrategie) - 1].id != null) doc.addPage();
|
|
28953
29837
|
return Promise.resolve(createImageHeader()).then(function () {
|
|
@@ -28973,7 +29857,7 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
28973
29857
|
doc.text(topLearningStrategies.learningStrategies[j].learningStrategyName, left, line + 20);
|
|
28974
29858
|
doc.setFont("Helvetica", "normal", "normal");
|
|
28975
29859
|
doc.text("Usage count: " + topLearningStrategies.learningStrategies[j].usageCount || "0", left, line + 30);
|
|
28976
|
-
doc.text("Usage point: " + avgSumUsagePoint, left, line + 40);
|
|
29860
|
+
doc.text("Usage point: " + avgSumUsagePoint.toFixed(2), left, line + 40);
|
|
28977
29861
|
left = left + (((_topLearningStrategie4 = topLearningStrategies.learningStrategies[j].learningStrategyName) === null || _topLearningStrategie4 === void 0 ? void 0 : _topLearningStrategie4.length) * 4 > 45 ? ((_topLearningStrategie5 = topLearningStrategies.learningStrategies[j].learningStrategyName) === null || _topLearningStrategie5 === void 0 ? void 0 : _topLearningStrategie5.length) * 4 : 60) + 15;
|
|
28978
29862
|
|
|
28979
29863
|
if (left + ((_topLearningStrategie6 = topLearningStrategies.learningStrategies[j + 1]) === null || _topLearningStrategie6 === void 0 ? void 0 : (_topLearningStrategie7 = _topLearningStrategie6.learningStrategyName) === null || _topLearningStrategie7 === void 0 ? void 0 : _topLearningStrategie7.length) * 5 + 15 > WIDTH_PAPER) {
|
|
@@ -29017,25 +29901,25 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
29017
29901
|
id: chartOneToOne.id
|
|
29018
29902
|
}, chartOneToOne.children(typeChartList[initialData.map(function (i) {
|
|
29019
29903
|
return i.id;
|
|
29020
|
-
}).indexOf(chartOneToOne === null || chartOneToOne === void 0 ? void 0 : chartOneToOne.id)]))), !!chartClassReflectionPDF && React__default.createElement("div", {
|
|
29904
|
+
}).indexOf(chartOneToOne === null || chartOneToOne === void 0 ? void 0 : chartOneToOne.id)], true))), !!chartClassReflectionPDF && React__default.createElement("div", {
|
|
29021
29905
|
className: "" + styles$1["chart-to-canvas"]
|
|
29022
29906
|
}, React__default.createElement("div", {
|
|
29023
29907
|
id: chartClassReflectionPDF.id
|
|
29024
29908
|
}, chartClassReflectionPDF.children(typeChartList[initialData.map(function (i) {
|
|
29025
29909
|
return i.id;
|
|
29026
|
-
}).indexOf(chartClassReflectionPDF === null || chartClassReflectionPDF === void 0 ? void 0 : chartClassReflectionPDF.id)]))), !!chartConferecePDF && React__default.createElement("div", {
|
|
29910
|
+
}).indexOf(chartClassReflectionPDF === null || chartClassReflectionPDF === void 0 ? void 0 : chartClassReflectionPDF.id)], true))), !!chartConferecePDF && React__default.createElement("div", {
|
|
29027
29911
|
className: "" + styles$1["chart-to-canvas"]
|
|
29028
29912
|
}, React__default.createElement("div", {
|
|
29029
29913
|
id: chartConferecePDF.id
|
|
29030
29914
|
}, chartConferecePDF.children(typeChartList[initialData.map(function (i) {
|
|
29031
29915
|
return i.id;
|
|
29032
|
-
}).indexOf(chartConferecePDF === null || chartConferecePDF === void 0 ? void 0 : chartConferecePDF.id)]))), !!chartSafety && React__default.createElement("div", {
|
|
29916
|
+
}).indexOf(chartConferecePDF === null || chartConferecePDF === void 0 ? void 0 : chartConferecePDF.id)], true))), !!chartSafety && React__default.createElement("div", {
|
|
29033
29917
|
className: "" + styles$1["chart-to-canvas"]
|
|
29034
29918
|
}, React__default.createElement("div", {
|
|
29035
29919
|
id: chartSafety.id
|
|
29036
29920
|
}, chartSafety.children(typeChartList[initialData.map(function (i) {
|
|
29037
29921
|
return i.id;
|
|
29038
|
-
}).indexOf(chartSafety === null || chartSafety === void 0 ? void 0 : chartSafety.id)]))), !!chartStudentByAge && React__default.createElement("div", {
|
|
29922
|
+
}).indexOf(chartSafety === null || chartSafety === void 0 ? void 0 : chartSafety.id)], true))), !!chartStudentByAge && React__default.createElement("div", {
|
|
29039
29923
|
className: "" + styles$1["chart-to-canvas"]
|
|
29040
29924
|
}, React__default.createElement("div", {
|
|
29041
29925
|
id: chartStudentByAge.id
|
|
@@ -29075,7 +29959,19 @@ var Dashboard = function Dashboard() {
|
|
|
29075
29959
|
topLearningStrategies = _useChartDatas.topLearningStrategies,
|
|
29076
29960
|
chartClassReflection = _useChartDatas.chartClassReflection,
|
|
29077
29961
|
chartConference = _useChartDatas.chartConference,
|
|
29078
|
-
safety = _useChartDatas.safety
|
|
29962
|
+
safety = _useChartDatas.safety,
|
|
29963
|
+
dataConvertedOneToOne = _useChartDatas.dataConvertedOneToOne,
|
|
29964
|
+
activeColumnOneToOne = _useChartDatas.activeColumnOneToOne,
|
|
29965
|
+
avgOneToOne = _useChartDatas.avgOneToOne,
|
|
29966
|
+
dataConvertedClassReflection = _useChartDatas.dataConvertedClassReflection,
|
|
29967
|
+
activeColumnClassReflection = _useChartDatas.activeColumnClassReflection,
|
|
29968
|
+
avgClassReflection = _useChartDatas.avgClassReflection,
|
|
29969
|
+
dataConvertedConference = _useChartDatas.dataConvertedConference,
|
|
29970
|
+
activeColumnConference = _useChartDatas.activeColumnConference,
|
|
29971
|
+
avgConference = _useChartDatas.avgConference,
|
|
29972
|
+
dataConvertedSafety = _useChartDatas.dataConvertedSafety,
|
|
29973
|
+
activeColumnSafety = _useChartDatas.activeColumnSafety,
|
|
29974
|
+
avgSafety = _useChartDatas.avgSafety;
|
|
29079
29975
|
|
|
29080
29976
|
var _useBehavior = useBehavior(initialTypeChart),
|
|
29081
29977
|
chartIsOpened = _useBehavior.chartIsOpened,
|
|
@@ -29134,7 +30030,19 @@ var Dashboard = function Dashboard() {
|
|
|
29134
30030
|
topLearningStrategies: topLearningStrategies,
|
|
29135
30031
|
chartClassReflection: chartClassReflection,
|
|
29136
30032
|
chartConference: chartConference,
|
|
29137
|
-
safety: safety
|
|
30033
|
+
safety: safety,
|
|
30034
|
+
dataConvertedOneToOne: dataConvertedOneToOne,
|
|
30035
|
+
activeColumnOneToOne: activeColumnOneToOne,
|
|
30036
|
+
avgOneToOne: avgOneToOne,
|
|
30037
|
+
dataConvertedClassReflection: dataConvertedClassReflection,
|
|
30038
|
+
activeColumnClassReflection: activeColumnClassReflection,
|
|
30039
|
+
avgClassReflection: avgClassReflection,
|
|
30040
|
+
dataConvertedConference: dataConvertedConference,
|
|
30041
|
+
activeColumnConference: activeColumnConference,
|
|
30042
|
+
avgConference: avgConference,
|
|
30043
|
+
dataConvertedSafety: dataConvertedSafety,
|
|
30044
|
+
activeColumnSafety: activeColumnSafety,
|
|
30045
|
+
avgSafety: avgSafety
|
|
29138
30046
|
}))), React__default.createElement("div", {
|
|
29139
30047
|
className: "d-flex align-items-center justify-content-between"
|
|
29140
30048
|
}, React__default.createElement("div", {
|
|
@@ -29209,10 +30117,12 @@ var Dashboard = function Dashboard() {
|
|
|
29209
30117
|
isShowChangeChart: chartDashBoard.isShowChangeChart,
|
|
29210
30118
|
typeChart: typeChartList[index],
|
|
29211
30119
|
onChangeChart: function onChangeChart(type) {
|
|
29212
|
-
return _onChangeChart(index, type);
|
|
30120
|
+
return _onChangeChart(index, type, chartDashBoard === null || chartDashBoard === void 0 ? void 0 : chartDashBoard.options);
|
|
29213
30121
|
},
|
|
29214
30122
|
isOpen: chartIsOpened[index],
|
|
29215
|
-
options: chartDashBoard.options
|
|
30123
|
+
options: chartDashBoard.options,
|
|
30124
|
+
contentTooltip: chartDashBoard === null || chartDashBoard === void 0 ? void 0 : chartDashBoard.contentTooltip,
|
|
30125
|
+
index: index
|
|
29216
30126
|
}), React__default.createElement(reactstrap.Collapse, {
|
|
29217
30127
|
isOpen: chartIsOpened[index]
|
|
29218
30128
|
}, chartDashBoard.children(typeChartList[index])));
|