mario-education 2.4.315-release → 2.4.317-release
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,7 +5,7 @@ declare const useTemplateCateList: () => {
|
|
|
5
5
|
changeFilters: (updatedFilters: any) => void;
|
|
6
6
|
getData: () => Promise<void>;
|
|
7
7
|
removeData: (id: number) => void;
|
|
8
|
-
handleSort: () => void;
|
|
8
|
+
handleSort: (colId: string) => void;
|
|
9
9
|
updateOrderTemplateSurvey: (data: any) => Promise<void>;
|
|
10
10
|
setRef: (node: any) => any;
|
|
11
11
|
};
|
package/dist/index.js
CHANGED
|
@@ -13221,13 +13221,11 @@ var useQuestionList$1 = function useQuestionList(isDefaultQuestion, isDefaultCla
|
|
|
13221
13221
|
try {
|
|
13222
13222
|
var _temp10 = _catch(function () {
|
|
13223
13223
|
return Promise.resolve(remove$2(id)).then(function () {
|
|
13224
|
+
getData();
|
|
13224
13225
|
dispatch(marioCore.setAlert({
|
|
13225
13226
|
type: "success",
|
|
13226
13227
|
message: "Remove question successfully"
|
|
13227
13228
|
}));
|
|
13228
|
-
changeFilters({
|
|
13229
|
-
currentPage: 1
|
|
13230
|
-
});
|
|
13231
13229
|
});
|
|
13232
13230
|
}, function (err) {
|
|
13233
13231
|
var _err$response3, _err$response3$data;
|
|
@@ -13491,6 +13489,7 @@ var QuestionBankList = function QuestionBankList(_ref) {
|
|
|
13491
13489
|
}, React__default.createElement("div", {
|
|
13492
13490
|
className: "ag-theme-balham w-100"
|
|
13493
13491
|
}, React__default.createElement(react.AgGridReact, {
|
|
13492
|
+
key: JSON.stringify(filters),
|
|
13494
13493
|
defaultColDef: defaultColDef,
|
|
13495
13494
|
sortingOrder: ['desc', 'asc'],
|
|
13496
13495
|
domLayout: "autoHeight",
|
|
@@ -18493,9 +18492,7 @@ var useTemplateCateList = function useTemplateCateList() {
|
|
|
18493
18492
|
dispatch(marioCore.setLoading(true));
|
|
18494
18493
|
|
|
18495
18494
|
var _temp4 = _catch(function () {
|
|
18496
|
-
return Promise.resolve(getSurvey(
|
|
18497
|
-
sortBy: "OrderDefaultSurvey"
|
|
18498
|
-
}))).then(function (res) {
|
|
18495
|
+
return Promise.resolve(getSurvey(filters)).then(function (res) {
|
|
18499
18496
|
var _res$data = res.data,
|
|
18500
18497
|
items = _res$data.items,
|
|
18501
18498
|
totalItems = _res$data.totalItems;
|
|
@@ -18548,11 +18545,12 @@ var useTemplateCateList = function useTemplateCateList() {
|
|
|
18548
18545
|
}
|
|
18549
18546
|
}, [dispatch, filters]);
|
|
18550
18547
|
|
|
18551
|
-
var handleSort = function handleSort() {
|
|
18552
|
-
filters.
|
|
18553
|
-
sortOrder: "ASC"
|
|
18554
|
-
}
|
|
18555
|
-
sortOrder: "
|
|
18548
|
+
var handleSort = function handleSort(colId) {
|
|
18549
|
+
changeFilters(filters.sortBy == colId ? {
|
|
18550
|
+
sortOrder: filters.sortOrder != "ASC" ? "ASC" : "DESC"
|
|
18551
|
+
} : {
|
|
18552
|
+
sortOrder: "ASC",
|
|
18553
|
+
sortBy: colId
|
|
18556
18554
|
});
|
|
18557
18555
|
};
|
|
18558
18556
|
|
|
@@ -18728,13 +18726,16 @@ var TemplateSurveyList = function TemplateSurveyList() {
|
|
|
18728
18726
|
};
|
|
18729
18727
|
|
|
18730
18728
|
var columnDefs = [{
|
|
18729
|
+
field: 'name',
|
|
18731
18730
|
headerName: t('name'),
|
|
18731
|
+
sortingOrder: ['asc', 'desc'],
|
|
18732
18732
|
cellRendererFramework: function cellRendererFramework(params) {
|
|
18733
18733
|
return renderName(params, openModal);
|
|
18734
18734
|
}
|
|
18735
18735
|
}, {
|
|
18736
|
-
field: '
|
|
18736
|
+
field: 'numberOfQuestions',
|
|
18737
18737
|
headerName: t('number_of_questions'),
|
|
18738
|
+
sortingOrder: ['asc', 'desc'],
|
|
18738
18739
|
cellRendererFramework: function cellRendererFramework(params) {
|
|
18739
18740
|
return renderNumberOfQuestion(params);
|
|
18740
18741
|
}
|
|
@@ -18825,7 +18826,12 @@ var TemplateSurveyList = function TemplateSurveyList() {
|
|
|
18825
18826
|
animateRows: true,
|
|
18826
18827
|
modules: [masterDetail.MasterDetailModule, clientSideRowModel.ClientSideRowModelModule],
|
|
18827
18828
|
onRowDragEnd: onRowDragEnd,
|
|
18828
|
-
onSortChanged:
|
|
18829
|
+
onSortChanged: function onSortChanged(event) {
|
|
18830
|
+
var _event$api$getSortMod = event.api.getSortModel(),
|
|
18831
|
+
sortModel = _event$api$getSortMod[0];
|
|
18832
|
+
|
|
18833
|
+
handleSort(sortModel.colId);
|
|
18834
|
+
}
|
|
18829
18835
|
}))), React__default.createElement(reactstrap.Col, {
|
|
18830
18836
|
md: 12
|
|
18831
18837
|
}, React__default.createElement(marioCore.CustomPagination, {
|
|
@@ -69567,9 +69573,9 @@ var StudentWellness = function StudentWellness(_ref) {
|
|
|
69567
69573
|
percent: safetyPercent,
|
|
69568
69574
|
diffPercent: safetyDiffPercent,
|
|
69569
69575
|
numberOfStudent: (studentSkillQuestion === null || studentSkillQuestion === void 0 ? void 0 : studentSkillQuestion.studentSafetyQuestionCount) || 0,
|
|
69570
|
-
numberOfStudentText: t("
|
|
69576
|
+
numberOfStudentText: t("marked_themselves_as_unsafe"),
|
|
69571
69577
|
percentOfStudent: (studentSkillQuestion === null || studentSkillQuestion === void 0 ? void 0 : studentSkillQuestion.studentPercentageUnsafe) || 0,
|
|
69572
|
-
percentOfStudentText: t("
|
|
69578
|
+
percentOfStudentText: t("of_students_are_not_feeling_safe"),
|
|
69573
69579
|
onSeeMore: function onSeeMore() {
|
|
69574
69580
|
return handleClickSeeMore(studentSkillQuestion.responseStudentSafety, "safety");
|
|
69575
69581
|
},
|
|
@@ -69585,9 +69591,9 @@ var StudentWellness = function StudentWellness(_ref) {
|
|
|
69585
69591
|
percent: stressPercent,
|
|
69586
69592
|
diffPercent: stressDiffPercent,
|
|
69587
69593
|
numberOfStudent: (studentSkillQuestion === null || studentSkillQuestion === void 0 ? void 0 : studentSkillQuestion.studentStressQuestionCount) || 0,
|
|
69588
|
-
numberOfStudentText: t("
|
|
69594
|
+
numberOfStudentText: t("flagged_with_high_stress"),
|
|
69589
69595
|
percentOfStudent: (studentSkillQuestion === null || studentSkillQuestion === void 0 ? void 0 : studentSkillQuestion.studentPercentageStress) || 0,
|
|
69590
|
-
percentOfStudentText: t("
|
|
69596
|
+
percentOfStudentText: t("of_students_are_highly_stressed"),
|
|
69591
69597
|
onSeeMore: function onSeeMore() {
|
|
69592
69598
|
return handleClickSeeMore(studentSkillQuestion.responseStudentStress, "stress");
|
|
69593
69599
|
},
|