mario-education 2.4.105-beta → 2.4.106-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/ReadinessToLearn.d.ts +7 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/components/AgGridComponents.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/configs/constants.d.ts +4 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/hooks/useQuestionDetail.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchCounselor/hooks/useSwitchAssistant.d.ts +18 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/components/SwitchCounselorModal.d.ts +4 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/hooks/useSwitchCounselor.d.ts +18 -0
- package/dist/index.js +126 -23
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +127 -24
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/apiClient/index.d.ts +0 -7
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/components/SelectorTemplate.d.ts +0 -3
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/components/TemplateDialogModal.d.ts +0 -3
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/configs/types.d.ts +0 -12
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/hooks/useTemplateBuilder.d.ts +0 -9
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/hooks/useTemplateDetail.d.ts +0 -20
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/hooks/useTemplateList.d.ts +0 -9
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/hooks/useTemplateStart.d.ts +0 -9
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/views/TemplateBuilderPage.d.ts +0 -3
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/views/TemplateContainer.d.ts +0 -3
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/views/TemplateIEPList.d.ts +0 -3
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/views/TemplateStartBuild.d.ts +0 -3
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/views/TemplateSystemList.d.ts +0 -3
- /package/dist/MarioFramework.Education/ClientApp/src/utils/{serviceType.interface.d.ts → servicetype.interface.d.ts} +0 -0
|
@@ -8,4 +8,5 @@ export declare const renderQuestionText: (params: any) => JSX.Element;
|
|
|
8
8
|
export declare const renderActions: ({ params, edit, remove }: ActionProps) => JSX.Element;
|
|
9
9
|
export declare const renderCategory: (params: any) => JSX.Element;
|
|
10
10
|
export declare const renderType: (params: any) => JSX.Element;
|
|
11
|
+
export declare const renderUserQuestion: (params: any) => JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -24,6 +24,7 @@ declare type QuestionDetail = {
|
|
|
24
24
|
subQuestions: string[];
|
|
25
25
|
isBeforeSession: boolean;
|
|
26
26
|
isDefaultQuestionSurvey: boolean;
|
|
27
|
+
userForQuestion?: string;
|
|
27
28
|
};
|
|
28
29
|
declare const useQuestionDetail: (id?: number | undefined, type?: number | undefined) => {
|
|
29
30
|
questionDetail: QuestionDetail;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IOptions, IStudentAssistantItem } from "../utils/type.interface";
|
|
3
|
+
declare const useSwitchAssistant: () => {
|
|
4
|
+
userList: IStudentAssistantItem[];
|
|
5
|
+
totalItems: number;
|
|
6
|
+
filters: import("mario-core").Filter;
|
|
7
|
+
changeFilters: (updatedFilters: any) => void;
|
|
8
|
+
modal: import("react").MutableRefObject<any>;
|
|
9
|
+
userChoiced: IStudentAssistantItem;
|
|
10
|
+
options: IOptions[];
|
|
11
|
+
setAssistantChangeId: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
12
|
+
assistantChangeId: string;
|
|
13
|
+
removeData: (teacherUserId: string, studentId: number) => Promise<void>;
|
|
14
|
+
resetData: () => void;
|
|
15
|
+
choiceUser: (userChoiced: IStudentAssistantItem) => void;
|
|
16
|
+
onDeleteAssistant: (studentId: number) => Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
export default useSwitchAssistant;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IOptions, IStudentCounselorItem } from "../utils/type.interface";
|
|
3
|
+
declare const useSwitchCounselor: () => {
|
|
4
|
+
userList: IStudentCounselorItem[];
|
|
5
|
+
totalItems: number;
|
|
6
|
+
filters: import("mario-core").Filter;
|
|
7
|
+
changeFilters: (updatedFilters: any) => void;
|
|
8
|
+
modal: import("react").MutableRefObject<any>;
|
|
9
|
+
userChoiced: IStudentCounselorItem;
|
|
10
|
+
options: IOptions[];
|
|
11
|
+
setCounselorChangeId: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
12
|
+
counselorChangeId: string;
|
|
13
|
+
removeData: (counselorId: string, studentId: number) => Promise<void>;
|
|
14
|
+
resetData: () => void;
|
|
15
|
+
choiceUser: (userChoiced: IStudentCounselorItem) => void;
|
|
16
|
+
onDeleteCounselor: (studentId: number) => Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
export default useSwitchCounselor;
|
package/dist/index.js
CHANGED
|
@@ -19,9 +19,9 @@ var masterDetail = require('@ag-grid-enterprise/master-detail');
|
|
|
19
19
|
var clientSideRowModel = require('@ag-grid-community/client-side-row-model');
|
|
20
20
|
var fa = require('react-icons/fa');
|
|
21
21
|
var tinymceReact = require('@tinymce/tinymce-react');
|
|
22
|
+
var fi = require('react-icons/fi');
|
|
22
23
|
var Chart = _interopDefault(require('react-apexcharts'));
|
|
23
24
|
require('react-datepicker/dist/react-datepicker.css');
|
|
24
|
-
var fi = require('react-icons/fi');
|
|
25
25
|
var jsPDF = _interopDefault(require('jspdf'));
|
|
26
26
|
var html2canvas = _interopDefault(require('html2canvas'));
|
|
27
27
|
|
|
@@ -12692,6 +12692,17 @@ var TYPE_QUESTION;
|
|
|
12692
12692
|
TYPE_QUESTION[TYPE_QUESTION["Survey"] = 4] = "Survey";
|
|
12693
12693
|
})(TYPE_QUESTION || (TYPE_QUESTION = {}));
|
|
12694
12694
|
|
|
12695
|
+
var userForQuestion = [{
|
|
12696
|
+
value: "TeacherAndStudent",
|
|
12697
|
+
label: "Teacher and student"
|
|
12698
|
+
}, {
|
|
12699
|
+
value: "Teacher",
|
|
12700
|
+
label: "Teacher"
|
|
12701
|
+
}, {
|
|
12702
|
+
value: "Student",
|
|
12703
|
+
label: "Student"
|
|
12704
|
+
}];
|
|
12705
|
+
|
|
12695
12706
|
var subgridStyle = {
|
|
12696
12707
|
overflowY: "auto",
|
|
12697
12708
|
overflowX: "hidden",
|
|
@@ -12814,12 +12825,19 @@ var renderCategory = function renderCategory(params) {
|
|
|
12814
12825
|
return React__default.createElement("div", null, params === null || params === void 0 ? void 0 : (_params$data8 = params.data) === null || _params$data8 === void 0 ? void 0 : (_params$data8$categor = _params$data8.category) === null || _params$data8$categor === void 0 ? void 0 : _params$data8$categor.name);
|
|
12815
12826
|
};
|
|
12816
12827
|
var renderType = function renderType(params) {
|
|
12828
|
+
var _params$data10;
|
|
12829
|
+
|
|
12817
12830
|
var type = marioCore.QUESTION_TYPES_OPTIONS.find(function (option) {
|
|
12818
12831
|
var _params$data9;
|
|
12819
12832
|
|
|
12820
12833
|
return option.value === (params === null || params === void 0 ? void 0 : (_params$data9 = params.data) === null || _params$data9 === void 0 ? void 0 : _params$data9.type);
|
|
12821
12834
|
});
|
|
12822
|
-
return type ? React__default.createElement("div", null, type.label) : React__default.createElement("div", null);
|
|
12835
|
+
return type ? React__default.createElement("div", null, type.label) : React__default.createElement("div", null, params === null || params === void 0 ? void 0 : (_params$data10 = params.data) === null || _params$data10 === void 0 ? void 0 : _params$data10.type);
|
|
12836
|
+
};
|
|
12837
|
+
var renderUserQuestion = function renderUserQuestion(params) {
|
|
12838
|
+
var _params$data11;
|
|
12839
|
+
|
|
12840
|
+
return React__default.createElement("div", null, params === null || params === void 0 ? void 0 : (_params$data11 = params.data) === null || _params$data11 === void 0 ? void 0 : _params$data11.userForQuestion);
|
|
12823
12841
|
};
|
|
12824
12842
|
|
|
12825
12843
|
var QUESTION_URL$1 = "/admin/question-bank";
|
|
@@ -12887,6 +12905,12 @@ var useQuestionList$1 = function useQuestionList(isDefaultQuestion, isDefaultCla
|
|
|
12887
12905
|
dispatch(marioCore.setLoading(true));
|
|
12888
12906
|
|
|
12889
12907
|
var _temp4 = _catch(function () {
|
|
12908
|
+
var filter = filters;
|
|
12909
|
+
|
|
12910
|
+
if (!!isDefaultClassReflection && !isDefaultQuestion) {
|
|
12911
|
+
delete filter.isDefaultQuestion;
|
|
12912
|
+
}
|
|
12913
|
+
|
|
12890
12914
|
return Promise.resolve(get$2(filters)).then(function (res) {
|
|
12891
12915
|
var _res$data = res.data,
|
|
12892
12916
|
items = _res$data.items,
|
|
@@ -12979,7 +13003,7 @@ var useQuestionList$1 = function useQuestionList(isDefaultQuestion, isDefaultCla
|
|
|
12979
13003
|
|
|
12980
13004
|
if (isDefaultQuestion && !isDefaultClassReflection) {
|
|
12981
13005
|
type = TYPE_QUESTION.OneToOne;
|
|
12982
|
-
} else if (
|
|
13006
|
+
} else if (isDefaultClassReflection) {
|
|
12983
13007
|
type = TYPE_QUESTION.ClassReflection;
|
|
12984
13008
|
} else if (isDefaultConference) {
|
|
12985
13009
|
type = TYPE_QUESTION.Conference;
|
|
@@ -13014,24 +13038,47 @@ var useQuestionList$1 = function useQuestionList(isDefaultQuestion, isDefaultCla
|
|
|
13014
13038
|
cellRendererFramework: function cellRendererFramework(params) {
|
|
13015
13039
|
return renderCategory(params);
|
|
13016
13040
|
}
|
|
13017
|
-
}, {
|
|
13018
|
-
width: 80,
|
|
13019
|
-
headerComponentParams: {
|
|
13020
|
-
template: "<div class=\"text-center w-100\">Actions</div>"
|
|
13021
|
-
},
|
|
13022
|
-
cellStyle: {
|
|
13023
|
-
textAlign: "center"
|
|
13024
|
-
},
|
|
13025
|
-
cellRendererFramework: function cellRendererFramework(params) {
|
|
13026
|
-
return renderActions({
|
|
13027
|
-
params: params,
|
|
13028
|
-
edit: goToDetail,
|
|
13029
|
-
remove: removeData
|
|
13030
|
-
});
|
|
13031
|
-
}
|
|
13032
13041
|
}];
|
|
13033
13042
|
var gridOptions = {
|
|
13034
|
-
columnDefs: isDefaultQuestion
|
|
13043
|
+
columnDefs: isDefaultQuestion && !isDefaultClassReflection ? [].concat(columnDefs, [{
|
|
13044
|
+
width: 80,
|
|
13045
|
+
headerComponentParams: {
|
|
13046
|
+
template: "<div class=\"text-center w-100\">Actions</div>"
|
|
13047
|
+
},
|
|
13048
|
+
cellStyle: {
|
|
13049
|
+
textAlign: "center"
|
|
13050
|
+
},
|
|
13051
|
+
cellRendererFramework: function cellRendererFramework(params) {
|
|
13052
|
+
return renderActions({
|
|
13053
|
+
params: params,
|
|
13054
|
+
edit: goToDetail,
|
|
13055
|
+
remove: removeData
|
|
13056
|
+
});
|
|
13057
|
+
}
|
|
13058
|
+
}, {
|
|
13059
|
+
headerName: "Order",
|
|
13060
|
+
rowDrag: true
|
|
13061
|
+
}]) : isDefaultClassReflection ? [].concat(columnDefs, [{
|
|
13062
|
+
headerName: "User for",
|
|
13063
|
+
cellRendererFramework: function cellRendererFramework(params) {
|
|
13064
|
+
return renderUserQuestion(params);
|
|
13065
|
+
}
|
|
13066
|
+
}, {
|
|
13067
|
+
width: 80,
|
|
13068
|
+
headerComponentParams: {
|
|
13069
|
+
template: "<div class=\"text-center w-100\">Actions</div>"
|
|
13070
|
+
},
|
|
13071
|
+
cellStyle: {
|
|
13072
|
+
textAlign: "center"
|
|
13073
|
+
},
|
|
13074
|
+
cellRendererFramework: function cellRendererFramework(params) {
|
|
13075
|
+
return renderActions({
|
|
13076
|
+
params: params,
|
|
13077
|
+
edit: goToDetail,
|
|
13078
|
+
remove: removeData
|
|
13079
|
+
});
|
|
13080
|
+
}
|
|
13081
|
+
}, {
|
|
13035
13082
|
headerName: "Order",
|
|
13036
13083
|
rowDrag: true
|
|
13037
13084
|
}]) : columnDefs,
|
|
@@ -14636,7 +14683,7 @@ var AdditionalComponent = function AdditionalComponent(_ref) {
|
|
|
14636
14683
|
numberOfStars: numberOfStars,
|
|
14637
14684
|
setFieldValue: setFieldValue
|
|
14638
14685
|
});
|
|
14639
|
-
if ([marioCore.QUESTION_TYPES.SINGLE_CHOICE, marioCore.QUESTION_TYPES.MULTIPLE_CHOICE, marioCore.QUESTION_TYPES.EMOTIONAL].includes(type)) return React__default.createElement(AnswerList, {
|
|
14686
|
+
if ([marioCore.QUESTION_TYPES.SINGLE_CHOICE, marioCore.QUESTION_TYPES.MULTIPLE_CHOICE, marioCore.QUESTION_TYPES.EMOTIONAL, marioCore.QUESTION_TYPES.DROPDOWN].includes(type)) return React__default.createElement(AnswerList, {
|
|
14640
14687
|
type: type,
|
|
14641
14688
|
answers: answers,
|
|
14642
14689
|
isSurvey: isSurvey,
|
|
@@ -14795,7 +14842,8 @@ var initValue$g = {
|
|
|
14795
14842
|
subQuestions: [],
|
|
14796
14843
|
isMandatory: false,
|
|
14797
14844
|
isBeforeSession: false,
|
|
14798
|
-
isDefaultQuestionSurvey: false
|
|
14845
|
+
isDefaultQuestionSurvey: false,
|
|
14846
|
+
userForQuestion: "TeacherAndStudent"
|
|
14799
14847
|
};
|
|
14800
14848
|
var TITLE$m = "Question detail";
|
|
14801
14849
|
|
|
@@ -14960,6 +15008,54 @@ var useQuestionDetail$1 = function useQuestionDetail(id, type) {
|
|
|
14960
15008
|
};
|
|
14961
15009
|
};
|
|
14962
15010
|
|
|
15011
|
+
var UserForQuestionSelect = function UserForQuestionSelect(_ref) {
|
|
15012
|
+
var _userForQuestion$find;
|
|
15013
|
+
|
|
15014
|
+
var value = _ref.value,
|
|
15015
|
+
_onChange = _ref.onChange;
|
|
15016
|
+
|
|
15017
|
+
var _useState = React.useState(false),
|
|
15018
|
+
isToggleModel = _useState[0],
|
|
15019
|
+
setIsToggleModel = _useState[1];
|
|
15020
|
+
|
|
15021
|
+
return React__default.createElement("div", null, React__default.createElement("div", {
|
|
15022
|
+
className: styles["block-filter-component"] + " "
|
|
15023
|
+
}, React__default.createElement("button", {
|
|
15024
|
+
onClick: function onClick() {
|
|
15025
|
+
return setIsToggleModel(!isToggleModel);
|
|
15026
|
+
},
|
|
15027
|
+
className: styles["btn-filter"] + " d-flex align-items-center cursor-pointer"
|
|
15028
|
+
}, React__default.createElement("p", {
|
|
15029
|
+
className: " my-0 mx-2"
|
|
15030
|
+
}, ((_userForQuestion$find = userForQuestion.find(function (r) {
|
|
15031
|
+
return r.value == value;
|
|
15032
|
+
})) === null || _userForQuestion$find === void 0 ? void 0 : _userForQuestion$find.label) || "Teacher and student"), !isToggleModel ? React__default.createElement(fi.FiChevronDown, null) : React__default.createElement(fi.FiChevronUp, null)), React__default.createElement("div", {
|
|
15033
|
+
className: styles["select-filter-component"] + " " + (!isToggleModel && "" + styles["hidden"])
|
|
15034
|
+
}, React__default.createElement(reactstrap.Form, {
|
|
15035
|
+
className: "" + styles["box-select"]
|
|
15036
|
+
}, userForQuestion.map(function (item) {
|
|
15037
|
+
return React__default.createElement(reactstrap.FormGroup, {
|
|
15038
|
+
check: true,
|
|
15039
|
+
className: "my-2 px-3",
|
|
15040
|
+
key: item.label
|
|
15041
|
+
}, React__default.createElement(reactstrap.Input, {
|
|
15042
|
+
id: item.label + "userForQuestion",
|
|
15043
|
+
name: "userForQuestion",
|
|
15044
|
+
value: item.value,
|
|
15045
|
+
type: "radio",
|
|
15046
|
+
className: "" + styles["radio-btn"],
|
|
15047
|
+
checked: value === item.value,
|
|
15048
|
+
onChange: function onChange() {
|
|
15049
|
+
return _onChange("userForQuestion", item.value);
|
|
15050
|
+
}
|
|
15051
|
+
}), React__default.createElement(reactstrap.Label, {
|
|
15052
|
+
check: true,
|
|
15053
|
+
"for": item.label + "userForQuestion",
|
|
15054
|
+
className: "" + styles["box-select-label"]
|
|
15055
|
+
}, React__default.createElement("p", null, item.label)));
|
|
15056
|
+
})))));
|
|
15057
|
+
};
|
|
15058
|
+
|
|
14963
15059
|
var CREATE_QUESTION_HEADER = "create_question";
|
|
14964
15060
|
var EDIT_QUESTION_HEADER = "edit_question";
|
|
14965
15061
|
var EMOTIONALS_LENGTH = marioCore.EMOTIONS.length;
|
|
@@ -15011,7 +15107,7 @@ var QuestionDetail = function QuestionDetail() {
|
|
|
15011
15107
|
handleSubmit = formikProps.handleSubmit;
|
|
15012
15108
|
|
|
15013
15109
|
var onChangeQuestionType = function onChangeQuestionType(e) {
|
|
15014
|
-
if (![marioCore.QUESTION_TYPES.EMOTIONAL, marioCore.QUESTION_TYPES.LEARNING_STRATEGY, marioCore.QUESTION_TYPES.RATING, marioCore.QUESTION_TYPES.SUMMARIZE, marioCore.QUESTION_TYPES.TEXT_INPUT].includes(e.value)) {
|
|
15110
|
+
if (![marioCore.QUESTION_TYPES.EMOTIONAL, marioCore.QUESTION_TYPES.LEARNING_STRATEGY, marioCore.QUESTION_TYPES.RATING, marioCore.QUESTION_TYPES.SUMMARIZE, marioCore.QUESTION_TYPES.TEXT_INPUT, marioCore.QUESTION_TYPES.DROPDOWN].includes(e.value)) {
|
|
15015
15111
|
setFieldValue("isDefaultQuestion", false);
|
|
15016
15112
|
}
|
|
15017
15113
|
|
|
@@ -15064,7 +15160,14 @@ var QuestionDetail = function QuestionDetail() {
|
|
|
15064
15160
|
value: values.categoryId
|
|
15065
15161
|
}), touched.categoryId && errors.categoryId && React__default.createElement(marioCore.ErrorHandler, {
|
|
15066
15162
|
text: errors.categoryId
|
|
15067
|
-
})))
|
|
15163
|
+
}))), parseInt(type) == TYPE_QUESTION.ClassReflection && React__default.createElement(reactstrap.Col, {
|
|
15164
|
+
md: 6
|
|
15165
|
+
}, React__default.createElement(marioCore.RequiredLabel, {
|
|
15166
|
+
text: t("user_for_question")
|
|
15167
|
+
}), React__default.createElement(UserForQuestionSelect, {
|
|
15168
|
+
onChange: setFieldValue,
|
|
15169
|
+
value: values.userForQuestion || ""
|
|
15170
|
+
}))), React__default.createElement(reactstrap.Row, {
|
|
15068
15171
|
className: "mb-2"
|
|
15069
15172
|
}, React__default.createElement(reactstrap.Col, {
|
|
15070
15173
|
md: 12,
|