mario-teacher-student-client 2.2.3-beta → 2.2.5-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/components/Input/TextFieldComponent.d.ts +2 -1
- package/dist/components/QuestionTypes/QuestionComponent.d.ts +1 -0
- package/dist/containers/ExternalSurvey/components/QuestionConduct.d.ts +1 -0
- package/dist/containers/Surveys/apiClient/surveyService.d.ts +1 -0
- package/dist/containers/Surveys/hook/useListSurvey.d.ts +1 -0
- package/dist/index.css +5 -1
- package/dist/index.js +94 -98
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +94 -98
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ interface Props {
|
|
|
6
6
|
isPageResult?: boolean;
|
|
7
7
|
isPageSessionResult?: boolean;
|
|
8
8
|
isUserChangeSession?: boolean;
|
|
9
|
+
isMultiline?: boolean;
|
|
9
10
|
}
|
|
10
|
-
declare const TextFieldComponent: ({ questionId, valueText, onChangeQuestionAnswer, isPageResult, isPageSessionResult, isUserChangeSession }: Props) => JSX.Element;
|
|
11
|
+
declare const TextFieldComponent: ({ questionId, valueText, onChangeQuestionAnswer, isPageResult, isPageSessionResult, isUserChangeSession, isMultiline }: Props) => JSX.Element;
|
|
11
12
|
export default TextFieldComponent;
|
|
@@ -10,3 +10,4 @@ export declare const getDetailSurvey: (surveyId: number) => Promise<import("axio
|
|
|
10
10
|
export declare const getSurveyCountStudent: () => Promise<import("axios").AxiosResponse<any>>;
|
|
11
11
|
export declare const getAllEduTeacher: () => Promise<import("axios").AxiosResponse<any>>;
|
|
12
12
|
export declare const shareSurvey: (data: any) => void;
|
|
13
|
+
export declare const updateSurvey: (surveyId: number, model: any) => Promise<import("axios").AxiosResponse<any>>;
|
|
@@ -7,5 +7,6 @@ declare const useListSurvey: () => {
|
|
|
7
7
|
setListSurvey: import("react").Dispatch<import("react").SetStateAction<SURVEY_RESPONSE | undefined>>;
|
|
8
8
|
isTeacher: any;
|
|
9
9
|
listTotal: TOTAL_TYPE[];
|
|
10
|
+
handleUpdateFavorite: (surveyId: number, isFavorite: boolean) => Promise<void>;
|
|
10
11
|
};
|
|
11
12
|
export default useListSurvey;
|
package/dist/index.css
CHANGED
|
@@ -15000,7 +15000,8 @@ h4._3lNz0 {
|
|
|
15000
15000
|
.__12h2 {
|
|
15001
15001
|
padding: 16px;
|
|
15002
15002
|
border-radius: 50px;
|
|
15003
|
-
width:
|
|
15003
|
+
width: 140px;
|
|
15004
|
+
margin: 0 auto !important; }
|
|
15004
15005
|
|
|
15005
15006
|
th > ._3tbAL ._3N7z7 {
|
|
15006
15007
|
font-size: 1.4rem !important; }
|
|
@@ -15149,6 +15150,9 @@ th > ._3tbAL ._3N7z7 {
|
|
|
15149
15150
|
._1Oqku ._2zK6C {
|
|
15150
15151
|
color: #ffffff; }
|
|
15151
15152
|
|
|
15153
|
+
._2BJFc {
|
|
15154
|
+
margin-right: 10px; }
|
|
15155
|
+
|
|
15152
15156
|
._1Oqku:disabled {
|
|
15153
15157
|
background: #6b6b6b; }
|
|
15154
15158
|
|
package/dist/index.js
CHANGED
|
@@ -8409,7 +8409,8 @@ var TextFieldComponent = function TextFieldComponent(_ref) {
|
|
|
8409
8409
|
onChangeQuestionAnswer = _ref.onChangeQuestionAnswer,
|
|
8410
8410
|
isPageResult = _ref.isPageResult,
|
|
8411
8411
|
isPageSessionResult = _ref.isPageSessionResult,
|
|
8412
|
-
isUserChangeSession = _ref.isUserChangeSession
|
|
8412
|
+
isUserChangeSession = _ref.isUserChangeSession,
|
|
8413
|
+
isMultiline = _ref.isMultiline;
|
|
8413
8414
|
var classes = useStyles$5();
|
|
8414
8415
|
var currentUser = reactRedux.useSelector(function (state) {
|
|
8415
8416
|
var _state$common;
|
|
@@ -8443,6 +8444,7 @@ var TextFieldComponent = function TextFieldComponent(_ref) {
|
|
|
8443
8444
|
className: classes.root
|
|
8444
8445
|
}, React__default.createElement(core.Box, null, React__default.createElement(core.OutlinedInput, {
|
|
8445
8446
|
fullWidth: true,
|
|
8447
|
+
multiline: !!isMultiline,
|
|
8446
8448
|
value: inputValue,
|
|
8447
8449
|
onChange: function onChange(event) {
|
|
8448
8450
|
return onChangeQuestionAnswer === null || onChangeQuestionAnswer === void 0 ? void 0 : onChangeQuestionAnswer(questionId, event.target.value);
|
|
@@ -8793,7 +8795,8 @@ var QuestionComponent = function QuestionComponent(_ref) {
|
|
|
8793
8795
|
isRedToRed = _ref$isRedToRed === void 0 ? false : _ref$isRedToRed,
|
|
8794
8796
|
isUserChangeSession = _ref.isUserChangeSession,
|
|
8795
8797
|
_ref$questionAnswer = _ref.questionAnswer,
|
|
8796
|
-
questionAnswer = _ref$questionAnswer === void 0 ? [] : _ref$questionAnswer
|
|
8798
|
+
questionAnswer = _ref$questionAnswer === void 0 ? [] : _ref$questionAnswer,
|
|
8799
|
+
isMultiline = _ref.isMultiline;
|
|
8797
8800
|
var defaultFontSmall = 12;
|
|
8798
8801
|
var defaultFontLarge = 20;
|
|
8799
8802
|
var defaultFont = reactRedux.useSelector(function (state) {
|
|
@@ -8833,6 +8836,7 @@ var QuestionComponent = function QuestionComponent(_ref) {
|
|
|
8833
8836
|
|
|
8834
8837
|
case QuestionType.TextInput:
|
|
8835
8838
|
return React__default.createElement(TextFieldComponent, {
|
|
8839
|
+
isMultiline: isMultiline,
|
|
8836
8840
|
questionId: questionId,
|
|
8837
8841
|
valueText: valueText,
|
|
8838
8842
|
onChangeQuestionAnswer: onChangeQuestionAnswer,
|
|
@@ -13611,6 +13615,7 @@ var SurveyIndex = function SurveyIndex() {
|
|
|
13611
13615
|
borderRadius: "4px"
|
|
13612
13616
|
}
|
|
13613
13617
|
}, React__default.createElement(TextFieldComponent, {
|
|
13618
|
+
isMultiline: true,
|
|
13614
13619
|
questionId: item.id,
|
|
13615
13620
|
valueText: item === null || item === void 0 ? void 0 : item.answer,
|
|
13616
13621
|
isPageResult: false,
|
|
@@ -61883,7 +61888,7 @@ var CustomHeaderComponent = function CustomHeaderComponent(_ref) {
|
|
|
61883
61888
|
}, contentButton), !!iconButton && iconButton)));
|
|
61884
61889
|
};
|
|
61885
61890
|
|
|
61886
|
-
var styles$O = {"icon-add-header":"_3msvE","sup-require":"_3cLXA","span-title":"_2zJd0","checked-favorite":"_-DbRo","model-confirm-publish":"_3LneM","btn-cancel":"_3YQho","btn-send-survey":"_17NxN","content-confirm-model":"_xXGSG","dialog-title":"_SCqos","box-email-content":"_I7jVk","title-content":"_2qWnj","input-mail-content":"_2DLVt","list-chip-email":"_1NjUv","box-chip-email":"_LXTJT","chip-email-default":"_3vu3m","chip-email-checked":"_2SfCN","table-desktop":"_1F8xx","data-grid":"_3TDU4","MuiDataGrid-columnSeparator":"_3ig99","block-list-survey":"_U4jvh","box-filter":"_20SVW","block-total":"_2RcnX","filter-select":"_2WWzW","box-filter-left":"_MEKLd","filter-item":"_3KQ0G","btn-favorite-text":"_2HxpA","box-filter-right":"_wfMx1","search-input-icon":"_2pk-H","inputInput":"_TfkuE","table-border":"_OEcTC","time-Date":"_3N7z7","time-Hours-Minute":"_1jOw7","table-row":"_2jcL8","arrow-icon":"_10hwb","table-cell":"_3YpBx","btn-function":"__J0jK","avatar_user":"_2nLvF","data-grid-content":"_3sCAB","row_name":"_2fnqB","innerHtml":"_3r42i","table-class-type":"_3tbAL","btn-open":"_1Vgmy","date-schedule":"_1m1n9","row-status":"_oItGm","pending":"_3Yw4h","replied":"_1zClB","actionneeded":"_2K_LM","actionneed":"_1T4kH","bg-yellow":"_S8XOD","bg-green":"_3M-Iu","bg-red":"_1kk0-","noscheduled":"_Qmz2t","scheduled":"_HLo9e","completed":"_3U4Kw","session":"__12h2","schedule-now":"_w2de6","block-filter":"_3boYk","block-filter-right":"_Jb-VQ","title-filter":"_EkM6A","create-survey-container":"_13Als","box-create-survey":"_3ZeD0","box-form-input":"_2_Lbs","form-input-title":"_2eMwZ","check-box-btn":"_2SP5U","stepper":"_2dIQT","step-label":"_2fUwq","dialog-select-template":"_3N8Q3","icon-btn":"_1rTF7","icon-remove":"_2vYxh","title-btn":"_82x3C","title-box-model":"_3wglS","box-content-select":"_3nfCh","title-content-select":"_1mLDw","description-content-select":"_Hg1l5","box-function":"_3aIy7","cancel_btn":"_33pHa","confirm_btn":"_1Oqku","confirm_btn_title":"_lxY0i","confirm_btn_icon":"_2zK6C","box-function-flex":"_3MS9Q","box-collapse":"_82XGO","box-collapse-top":"_7DXq2","box-collapse-right":"_3ZAAk","collapse-chip":"_3vGgC","collapse-left-title":"_1a4Re","box-collapse-content-item":"_37Ftp","block-review-detail":"_1Lmrp","title-block":"_25k4D","block-content-review":"_2MyxF","box-content":"_2M2ub","block-template-review":"_26NEY","block-template-left":"_lrxw0","name-template-left":"_1ubim","select-right":"_3b0L0","description-template-left":"_1erRk","additional-box":"_3d0rZ","space-content":"_3rWo3","table-title":"_2v5b5","table-status":"_3Zgbw","Close":"_3_Z98","Active":"_1UqNT","box-header-select":"_1wJqN","header-select-name":"_Q-qNa","header-select-icon":"_3UAh4","list-question-select":"_AgPAZ","new-survey":"_3RD_x","title":"_21CPc","box-survey":"_1ikO6","avt-user":"_38Qdy","infor":"_2W6Cn","content-text":"_3fS-4","name":"_2V9ri","time":"_3LxCt"};
|
|
61891
|
+
var styles$O = {"icon-add-header":"_3msvE","sup-require":"_3cLXA","span-title":"_2zJd0","checked-favorite":"_-DbRo","model-confirm-publish":"_3LneM","btn-cancel":"_3YQho","btn-send-survey":"_17NxN","content-confirm-model":"_xXGSG","dialog-title":"_SCqos","box-email-content":"_I7jVk","title-content":"_2qWnj","input-mail-content":"_2DLVt","list-chip-email":"_1NjUv","box-chip-email":"_LXTJT","chip-email-default":"_3vu3m","chip-email-checked":"_2SfCN","table-desktop":"_1F8xx","data-grid":"_3TDU4","MuiDataGrid-columnSeparator":"_3ig99","block-list-survey":"_U4jvh","box-filter":"_20SVW","block-total":"_2RcnX","filter-select":"_2WWzW","box-filter-left":"_MEKLd","filter-item":"_3KQ0G","btn-favorite-text":"_2HxpA","box-filter-right":"_wfMx1","search-input-icon":"_2pk-H","inputInput":"_TfkuE","table-border":"_OEcTC","time-Date":"_3N7z7","time-Hours-Minute":"_1jOw7","table-row":"_2jcL8","arrow-icon":"_10hwb","table-cell":"_3YpBx","btn-function":"__J0jK","avatar_user":"_2nLvF","data-grid-content":"_3sCAB","row_name":"_2fnqB","innerHtml":"_3r42i","table-class-type":"_3tbAL","btn-open":"_1Vgmy","date-schedule":"_1m1n9","row-status":"_oItGm","pending":"_3Yw4h","replied":"_1zClB","actionneeded":"_2K_LM","actionneed":"_1T4kH","bg-yellow":"_S8XOD","bg-green":"_3M-Iu","bg-red":"_1kk0-","noscheduled":"_Qmz2t","scheduled":"_HLo9e","completed":"_3U4Kw","session":"__12h2","schedule-now":"_w2de6","block-filter":"_3boYk","block-filter-right":"_Jb-VQ","title-filter":"_EkM6A","create-survey-container":"_13Als","box-create-survey":"_3ZeD0","box-form-input":"_2_Lbs","form-input-title":"_2eMwZ","check-box-btn":"_2SP5U","stepper":"_2dIQT","step-label":"_2fUwq","dialog-select-template":"_3N8Q3","icon-btn":"_1rTF7","icon-remove":"_2vYxh","title-btn":"_82x3C","title-box-model":"_3wglS","box-content-select":"_3nfCh","title-content-select":"_1mLDw","description-content-select":"_Hg1l5","box-function":"_3aIy7","cancel_btn":"_33pHa","confirm_btn":"_1Oqku","confirm_btn_title":"_lxY0i","confirm_btn_icon":"_2zK6C","mid_btn":"_2BJFc","box-function-flex":"_3MS9Q","box-collapse":"_82XGO","box-collapse-top":"_7DXq2","box-collapse-right":"_3ZAAk","collapse-chip":"_3vGgC","collapse-left-title":"_1a4Re","box-collapse-content-item":"_37Ftp","block-review-detail":"_1Lmrp","title-block":"_25k4D","block-content-review":"_2MyxF","box-content":"_2M2ub","block-template-review":"_26NEY","block-template-left":"_lrxw0","name-template-left":"_1ubim","select-right":"_3b0L0","description-template-left":"_1erRk","additional-box":"_3d0rZ","space-content":"_3rWo3","table-title":"_2v5b5","table-status":"_3Zgbw","Close":"_3_Z98","Active":"_1UqNT","box-header-select":"_1wJqN","header-select-name":"_Q-qNa","header-select-icon":"_3UAh4","list-question-select":"_AgPAZ","new-survey":"_3RD_x","title":"_21CPc","box-survey":"_1ikO6","avt-user":"_38Qdy","infor":"_2W6Cn","content-text":"_3fS-4","name":"_2V9ri","time":"_3LxCt"};
|
|
61887
61892
|
|
|
61888
61893
|
var CardTotal = function CardTotal(_ref) {
|
|
61889
61894
|
var title = _ref.title,
|
|
@@ -61944,6 +61949,9 @@ var getAllEduTeacher$2 = function getAllEduTeacher() {
|
|
|
61944
61949
|
var shareSurvey$1 = function shareSurvey(data) {
|
|
61945
61950
|
marioCore.api.post(EXTERNAL_SURVEY$1 + "/share-survey", data);
|
|
61946
61951
|
};
|
|
61952
|
+
var updateSurvey$1 = function updateSurvey(surveyId, model) {
|
|
61953
|
+
return marioCore.api.put(SURVEY_API + "/setting-survey/" + surveyId, model);
|
|
61954
|
+
};
|
|
61947
61955
|
|
|
61948
61956
|
var STEP_MODEL = ["Select student", "Create a survey", "Review"];
|
|
61949
61957
|
var lableStep = function lableStep(activeStep) {
|
|
@@ -62110,6 +62118,28 @@ var useListSurvey = function useListSurvey() {
|
|
|
62110
62118
|
return Promise.reject(e);
|
|
62111
62119
|
}
|
|
62112
62120
|
}, []);
|
|
62121
|
+
var handleUpdateFavorite = React.useCallback(function (surveyId, isFavorite) {
|
|
62122
|
+
try {
|
|
62123
|
+
var _temp10 = _catch(function () {
|
|
62124
|
+
return Promise.resolve(updateSurvey$1(surveyId, {
|
|
62125
|
+
isFavorite: isFavorite
|
|
62126
|
+
})).then(function () {
|
|
62127
|
+
getListSurvey();
|
|
62128
|
+
});
|
|
62129
|
+
}, function (err) {
|
|
62130
|
+
var _err$response3, _err$response3$data;
|
|
62131
|
+
|
|
62132
|
+
dispatch(marioCore.setAlert({
|
|
62133
|
+
type: "danger",
|
|
62134
|
+
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
|
|
62135
|
+
}));
|
|
62136
|
+
});
|
|
62137
|
+
|
|
62138
|
+
return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(function () {}) : void 0);
|
|
62139
|
+
} catch (e) {
|
|
62140
|
+
return Promise.reject(e);
|
|
62141
|
+
}
|
|
62142
|
+
}, [filters]);
|
|
62113
62143
|
React.useEffect(function () {
|
|
62114
62144
|
getListSurvey();
|
|
62115
62145
|
}, [filters]);
|
|
@@ -62123,7 +62153,8 @@ var useListSurvey = function useListSurvey() {
|
|
|
62123
62153
|
listSurvey: listSurvey,
|
|
62124
62154
|
setListSurvey: setListSurvey,
|
|
62125
62155
|
isTeacher: isTeacher,
|
|
62126
|
-
listTotal: listTotal
|
|
62156
|
+
listTotal: listTotal,
|
|
62157
|
+
handleUpdateFavorite: handleUpdateFavorite
|
|
62127
62158
|
};
|
|
62128
62159
|
};
|
|
62129
62160
|
|
|
@@ -62182,7 +62213,8 @@ var ListSurveys = function ListSurveys() {
|
|
|
62182
62213
|
changeFilters = _useListSurvey.changeFilters,
|
|
62183
62214
|
listSurvey = _useListSurvey.listSurvey,
|
|
62184
62215
|
isTeacher = _useListSurvey.isTeacher,
|
|
62185
|
-
listTotal = _useListSurvey.listTotal
|
|
62216
|
+
listTotal = _useListSurvey.listTotal,
|
|
62217
|
+
handleUpdateFavorite = _useListSurvey.handleUpdateFavorite;
|
|
62186
62218
|
|
|
62187
62219
|
var handleChangeStartDate = function handleChangeStartDate(date) {
|
|
62188
62220
|
changeFilters(_extends({}, filters, {
|
|
@@ -62437,15 +62469,16 @@ var ListSurveys = function ListSurveys() {
|
|
|
62437
62469
|
}, React__default.createElement(core.Typography, {
|
|
62438
62470
|
className: styles$O["table-status"] + " " + styles$O[e.status]
|
|
62439
62471
|
}, e.status)), React__default.createElement(core.TableCell, {
|
|
62440
|
-
align: "center"
|
|
62441
|
-
style: {
|
|
62442
|
-
fontWeight: 700,
|
|
62443
|
-
fontSize: 14,
|
|
62444
|
-
textTransform: "uppercase"
|
|
62445
|
-
}
|
|
62472
|
+
align: "center"
|
|
62446
62473
|
}, e.isFavorite ? React__default.createElement(StarIcon, {
|
|
62474
|
+
onClick: function onClick() {
|
|
62475
|
+
return handleUpdateFavorite(e.id, !e.isFavorite);
|
|
62476
|
+
},
|
|
62447
62477
|
className: "" + styles$O["checked-favorite"]
|
|
62448
62478
|
}) : React__default.createElement(StarBorderIcon, {
|
|
62479
|
+
onClick: function onClick() {
|
|
62480
|
+
return handleUpdateFavorite(e.id, !e.isFavorite);
|
|
62481
|
+
},
|
|
62449
62482
|
className: "" + styles$O["checked-favorite"]
|
|
62450
62483
|
})), React__default.createElement(core.TableCell, {
|
|
62451
62484
|
component: "th",
|
|
@@ -62941,14 +62974,9 @@ var tablePendingSurvey = [{
|
|
|
62941
62974
|
align: "left"
|
|
62942
62975
|
}, {
|
|
62943
62976
|
name: "Day left",
|
|
62944
|
-
tableWidth:
|
|
62977
|
+
tableWidth: 15,
|
|
62945
62978
|
sortName: "DayLeft",
|
|
62946
62979
|
align: "center"
|
|
62947
|
-
}, {
|
|
62948
|
-
name: "Favorite",
|
|
62949
|
-
tableWidth: 10,
|
|
62950
|
-
sortName: "Favorite",
|
|
62951
|
-
align: "center"
|
|
62952
62980
|
}, {
|
|
62953
62981
|
name: "",
|
|
62954
62982
|
tableWidth: 5,
|
|
@@ -62967,48 +62995,33 @@ var tableCompleteSurvey = [{
|
|
|
62967
62995
|
align: "left"
|
|
62968
62996
|
}, {
|
|
62969
62997
|
name: "Flag",
|
|
62970
|
-
tableWidth:
|
|
62998
|
+
tableWidth: 20,
|
|
62971
62999
|
sortName: null,
|
|
62972
63000
|
align: "center"
|
|
62973
|
-
}, {
|
|
62974
|
-
name: "Favorite",
|
|
62975
|
-
tableWidth: 10,
|
|
62976
|
-
sortName: "Favorite",
|
|
62977
|
-
align: "center"
|
|
62978
63001
|
}, {
|
|
62979
63002
|
name: "",
|
|
62980
|
-
tableWidth:
|
|
63003
|
+
tableWidth: 10,
|
|
62981
63004
|
sortName: null,
|
|
62982
63005
|
align: "center"
|
|
62983
63006
|
}];
|
|
62984
63007
|
var tableActionNeedSurvey = [{
|
|
62985
63008
|
name: "Student name",
|
|
62986
|
-
tableWidth:
|
|
63009
|
+
tableWidth: 45,
|
|
62987
63010
|
sortName: "Name",
|
|
62988
63011
|
align: "left"
|
|
62989
63012
|
}, {
|
|
62990
63013
|
name: "Flag",
|
|
62991
|
-
tableWidth:
|
|
63014
|
+
tableWidth: 20,
|
|
62992
63015
|
sortName: null,
|
|
62993
63016
|
align: "center"
|
|
62994
|
-
}, {
|
|
62995
|
-
name: "Session",
|
|
62996
|
-
tableWidth: 15,
|
|
62997
|
-
sortName: "session",
|
|
62998
|
-
align: "left"
|
|
62999
63017
|
}, {
|
|
63000
63018
|
name: "Date",
|
|
63001
|
-
tableWidth:
|
|
63019
|
+
tableWidth: 25,
|
|
63002
63020
|
sortName: "Date",
|
|
63003
63021
|
align: "left"
|
|
63004
|
-
}, {
|
|
63005
|
-
name: "Favorite",
|
|
63006
|
-
tableWidth: 10,
|
|
63007
|
-
sortName: "Favorite",
|
|
63008
|
-
align: "center"
|
|
63009
63022
|
}, {
|
|
63010
63023
|
name: "",
|
|
63011
|
-
tableWidth:
|
|
63024
|
+
tableWidth: 10,
|
|
63012
63025
|
sortName: null,
|
|
63013
63026
|
align: "center"
|
|
63014
63027
|
}];
|
|
@@ -63162,21 +63175,6 @@ var PendingSurvey = function PendingSurvey() {
|
|
|
63162
63175
|
}, React__default.createElement(core.Typography, {
|
|
63163
63176
|
className: styles$O["row-status"] + " " + styles$O[dayLeftCellBgColor(row.dayLeft)]
|
|
63164
63177
|
}, row.dayLeft)), React__default.createElement(core.TableCell, {
|
|
63165
|
-
align: "center",
|
|
63166
|
-
component: "th",
|
|
63167
|
-
scope: "row",
|
|
63168
|
-
height: 80,
|
|
63169
|
-
className: "" + styles$O["table-class-type"],
|
|
63170
|
-
style: {
|
|
63171
|
-
fontWeight: 700,
|
|
63172
|
-
fontSize: 14,
|
|
63173
|
-
textTransform: "uppercase"
|
|
63174
|
-
}
|
|
63175
|
-
}, row.isFavorite ? React__default.createElement(StarIcon, {
|
|
63176
|
-
className: "" + styles$O["checked-favorite"]
|
|
63177
|
-
}) : React__default.createElement(StarBorderIcon, {
|
|
63178
|
-
className: "" + styles$O["checked-favorite"]
|
|
63179
|
-
})), React__default.createElement(core.TableCell, {
|
|
63180
63178
|
align: "center",
|
|
63181
63179
|
component: "th",
|
|
63182
63180
|
scope: "row",
|
|
@@ -63219,7 +63217,8 @@ var RepliedSurvey = function RepliedSurvey() {
|
|
|
63219
63217
|
inputSearch = _useListSurveyDetail.inputSearch,
|
|
63220
63218
|
handleSort = _useListSurveyDetail.handleSort,
|
|
63221
63219
|
handleChangePage = _useListSurveyDetail.handleChangePage,
|
|
63222
|
-
handleChangeRowsPerPage = _useListSurveyDetail.handleChangeRowsPerPage
|
|
63220
|
+
handleChangeRowsPerPage = _useListSurveyDetail.handleChangeRowsPerPage,
|
|
63221
|
+
sessionBackground = _useListSurveyDetail.sessionBackground;
|
|
63223
63222
|
|
|
63224
63223
|
return React__default.createElement("div", null, React__default.createElement(core.Box, {
|
|
63225
63224
|
pl: 3,
|
|
@@ -63282,17 +63281,9 @@ var RepliedSurvey = function RepliedSurvey() {
|
|
|
63282
63281
|
className: "" + styles$O["table-class-type"]
|
|
63283
63282
|
}, React__default.createElement(core.Typography, {
|
|
63284
63283
|
className: styles$O["row-status"] + " " + styles$O[flagCellBgColor()]
|
|
63285
|
-
},
|
|
63286
|
-
|
|
63287
|
-
|
|
63288
|
-
scope: "row",
|
|
63289
|
-
height: 80,
|
|
63290
|
-
className: "" + styles$O["table-class-type"]
|
|
63291
|
-
}, row.favorite ? React__default.createElement(StarIcon, {
|
|
63292
|
-
className: "" + styles$O["checked-favorite"]
|
|
63293
|
-
}) : React__default.createElement(StarBorderIcon, {
|
|
63294
|
-
className: "" + styles$O["checked-favorite"]
|
|
63295
|
-
})), React__default.createElement(core.TableCell, {
|
|
63284
|
+
}, React__default.createElement(core.Typography, {
|
|
63285
|
+
className: styles$O["session"] + " " + styles$O[sessionBackground(row.actionScore)]
|
|
63286
|
+
}))), React__default.createElement(core.TableCell, {
|
|
63296
63287
|
align: "center",
|
|
63297
63288
|
component: "th",
|
|
63298
63289
|
scope: "row",
|
|
@@ -63364,12 +63355,6 @@ var ActionNeededSurvey = function ActionNeededSurvey() {
|
|
|
63364
63355
|
alt: "",
|
|
63365
63356
|
className: "" + styles$O["avatar_user"]
|
|
63366
63357
|
}), row === null || row === void 0 ? void 0 : row.studentName), React__default.createElement(core.TableCell, {
|
|
63367
|
-
align: "center",
|
|
63368
|
-
component: "th",
|
|
63369
|
-
scope: "row",
|
|
63370
|
-
height: 80,
|
|
63371
|
-
className: "" + styles$O["table-class-type"]
|
|
63372
|
-
}, row.flag), React__default.createElement(core.TableCell, {
|
|
63373
63358
|
align: "right",
|
|
63374
63359
|
component: "th",
|
|
63375
63360
|
scope: "row",
|
|
@@ -63396,16 +63381,6 @@ var ActionNeededSurvey = function ActionNeededSurvey() {
|
|
|
63396
63381
|
scope: "row",
|
|
63397
63382
|
height: 80,
|
|
63398
63383
|
className: "" + styles$O["table-class-type"]
|
|
63399
|
-
}, row.isFavorite ? React__default.createElement(StarIcon, {
|
|
63400
|
-
className: "" + styles$O["checked-favorite"]
|
|
63401
|
-
}) : React__default.createElement(StarBorderIcon, {
|
|
63402
|
-
className: "" + styles$O["checked-favorite"]
|
|
63403
|
-
})), React__default.createElement(core.TableCell, {
|
|
63404
|
-
align: "center",
|
|
63405
|
-
component: "th",
|
|
63406
|
-
scope: "row",
|
|
63407
|
-
height: 80,
|
|
63408
|
-
className: "" + styles$O["table-class-type"]
|
|
63409
63384
|
}, React__default.createElement(core.Button, {
|
|
63410
63385
|
variant: "contained",
|
|
63411
63386
|
className: "" + styles$O["btn-open"],
|
|
@@ -64409,7 +64384,7 @@ var TableSelectStudent = function TableSelectStudent(_ref) {
|
|
|
64409
64384
|
};
|
|
64410
64385
|
|
|
64411
64386
|
var ModelSelectQuestion = function ModelSelectQuestion(_ref) {
|
|
64412
|
-
var _template$questionTem, _template$questionTem2;
|
|
64387
|
+
var _template$questionTem, _template$questionTem2, _template$questionTem3, _template$questionTem4;
|
|
64413
64388
|
|
|
64414
64389
|
var open = _ref.open,
|
|
64415
64390
|
handleClose = _ref.handleClose,
|
|
@@ -64457,7 +64432,7 @@ var ModelSelectQuestion = function ModelSelectQuestion(_ref) {
|
|
|
64457
64432
|
}), React__default.createElement("div", {
|
|
64458
64433
|
className: "" + styles$O["innerHtml"],
|
|
64459
64434
|
dangerouslySetInnerHTML: {
|
|
64460
|
-
__html: r.questionText.replace(/<br\s*\/?>/gi,
|
|
64435
|
+
__html: r.questionText.replace(/<br\s*\/?>/gi, "\n")
|
|
64461
64436
|
}
|
|
64462
64437
|
}));
|
|
64463
64438
|
})), React__default.createElement(core.Grid, {
|
|
@@ -64470,6 +64445,16 @@ var ModelSelectQuestion = function ModelSelectQuestion(_ref) {
|
|
|
64470
64445
|
return handleClose();
|
|
64471
64446
|
}
|
|
64472
64447
|
}, "Cancel"), React__default.createElement("button", {
|
|
64448
|
+
className: styles$O["confirm_btn"] + " " + styles$O["mid_btn"],
|
|
64449
|
+
disabled: (template === null || template === void 0 ? void 0 : (_template$questionTem3 = template.questionTemplates) === null || _template$questionTem3 === void 0 ? void 0 : _template$questionTem3.length) === (selectQuestion === null || selectQuestion === void 0 ? void 0 : selectQuestion.length),
|
|
64450
|
+
onClick: function onClick() {
|
|
64451
|
+
return handleSelectTemplate(template);
|
|
64452
|
+
}
|
|
64453
|
+
}, React__default.createElement(core.Typography, {
|
|
64454
|
+
className: "" + styles$O["confirm_btn_title"]
|
|
64455
|
+
}, "Insert All questions [" + (template === null || template === void 0 ? void 0 : (_template$questionTem4 = template.questionTemplates) === null || _template$questionTem4 === void 0 ? void 0 : _template$questionTem4.length) + "]"), React__default.createElement(AddCircleOutlinedIcon, {
|
|
64456
|
+
className: "" + styles$O["confirm_btn_icon"]
|
|
64457
|
+
})), React__default.createElement("button", {
|
|
64473
64458
|
className: "" + styles$O["confirm_btn"],
|
|
64474
64459
|
disabled: handleCheckInsertQuestion(template, selectQuestion === null || selectQuestion === void 0 ? void 0 : selectQuestion.length),
|
|
64475
64460
|
onClick: function onClick() {
|
|
@@ -66193,7 +66178,8 @@ var QuestionConduct$2 = function QuestionConduct(_ref) {
|
|
|
66193
66178
|
isPageResult = _ref.isPageResult,
|
|
66194
66179
|
isPageSessionResult = _ref.isPageSessionResult,
|
|
66195
66180
|
avatar = _ref.avatar,
|
|
66196
|
-
isUserChangeSession = _ref.isUserChangeSession
|
|
66181
|
+
isUserChangeSession = _ref.isUserChangeSession,
|
|
66182
|
+
isMultiline = _ref.isMultiline;
|
|
66197
66183
|
return React__default.createElement("div", {
|
|
66198
66184
|
className: styles$R["box-question"]
|
|
66199
66185
|
}, !!questionName && React__default.createElement("h2", {
|
|
@@ -66206,6 +66192,7 @@ var QuestionConduct$2 = function QuestionConduct(_ref) {
|
|
|
66206
66192
|
}, React__default.createElement(QuestionComponent, {
|
|
66207
66193
|
questionId: item.id,
|
|
66208
66194
|
avatar: avatar,
|
|
66195
|
+
isMultiline: isMultiline,
|
|
66209
66196
|
questionItemName: item.text,
|
|
66210
66197
|
minText: item === null || item === void 0 ? void 0 : item.fromLabel,
|
|
66211
66198
|
maxText: item === null || item === void 0 ? void 0 : item.toLabel,
|
|
@@ -66319,7 +66306,8 @@ var useExternalSurvey$1 = function useExternalSurvey() {
|
|
|
66319
66306
|
deadline: res.data.deadline,
|
|
66320
66307
|
teacherName: res.data.teacherName,
|
|
66321
66308
|
teacherProfileImage: res.data.teacherProfileImage,
|
|
66322
|
-
dayLeft:
|
|
66309
|
+
dayLeft: res.data.dayLeft,
|
|
66310
|
+
startTime: res.data.startTime
|
|
66323
66311
|
};
|
|
66324
66312
|
setIsDone(res.data.isDone);
|
|
66325
66313
|
setInformationUser(body);
|
|
@@ -66493,8 +66481,6 @@ var SurveyTop$1 = function SurveyTop(_ref) {
|
|
|
66493
66481
|
};
|
|
66494
66482
|
|
|
66495
66483
|
var ExternalSurvey = function ExternalSurvey() {
|
|
66496
|
-
var _questionSummarize$an;
|
|
66497
|
-
|
|
66498
66484
|
var _useExternalSurvey = useExternalSurvey$1(),
|
|
66499
66485
|
listQuestionStudents = _useExternalSurvey.listQuestionStudents,
|
|
66500
66486
|
updateQuestionAnswer = _useExternalSurvey.updateQuestionAnswer,
|
|
@@ -66550,8 +66536,8 @@ var ExternalSurvey = function ExternalSurvey() {
|
|
|
66550
66536
|
setOpenModalSession(true);
|
|
66551
66537
|
};
|
|
66552
66538
|
|
|
66553
|
-
var
|
|
66554
|
-
setOpenModalSession(
|
|
66539
|
+
var handleToggleModalSession = function handleToggleModalSession() {
|
|
66540
|
+
setOpenModalSession(!openModalSession);
|
|
66555
66541
|
};
|
|
66556
66542
|
|
|
66557
66543
|
var screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
@@ -66560,7 +66546,7 @@ var ExternalSurvey = function ExternalSurvey() {
|
|
|
66560
66546
|
}, React__default.createElement(CustomHeaderComponent, {
|
|
66561
66547
|
title: !isDone ? "External survey" : "Completed",
|
|
66562
66548
|
contentButton: !isDone ? "Done" : "",
|
|
66563
|
-
handleChangePage:
|
|
66549
|
+
handleChangePage: handleToggleModalSession,
|
|
66564
66550
|
iconButton: React__default.createElement(SendIcon, {
|
|
66565
66551
|
className: "" + styles$R["icon-done-header"]
|
|
66566
66552
|
})
|
|
@@ -66571,7 +66557,8 @@ var ExternalSurvey = function ExternalSurvey() {
|
|
|
66571
66557
|
name: informationUser.teacherName,
|
|
66572
66558
|
imageUrl: informationUser.teacherProfileImage,
|
|
66573
66559
|
isResultSurvey: false,
|
|
66574
|
-
dayLeft: informationUser.dayLeft
|
|
66560
|
+
dayLeft: informationUser.dayLeft,
|
|
66561
|
+
startTime: informationUser.startTime
|
|
66575
66562
|
}), React__default.createElement("div", {
|
|
66576
66563
|
className: styles$R["block-question"] + " mt-4"
|
|
66577
66564
|
}, React__default.createElement("div", {
|
|
@@ -66601,9 +66588,7 @@ var ExternalSurvey = function ExternalSurvey() {
|
|
|
66601
66588
|
dangerouslySetInnerHTML: {
|
|
66602
66589
|
__html: !!questionSummarize ? questionSummarize.text : ""
|
|
66603
66590
|
}
|
|
66604
|
-
}), React__default.createElement("div", {
|
|
66605
|
-
className: "" + (((_questionSummarize$an = questionSummarize.answer) === null || _questionSummarize$an === void 0 ? void 0 : _questionSummarize$an.length) > 0 && styles$R["box-talk"])
|
|
66606
|
-
}, React__default.createElement("div", {
|
|
66591
|
+
}), React__default.createElement("div", null, React__default.createElement("div", {
|
|
66607
66592
|
style: {
|
|
66608
66593
|
borderRadius: "4px"
|
|
66609
66594
|
}
|
|
@@ -66631,16 +66616,17 @@ var ExternalSurvey = function ExternalSurvey() {
|
|
|
66631
66616
|
}, React__default.createElement(core.Grid, {
|
|
66632
66617
|
xs: 12
|
|
66633
66618
|
}, !isDone ? React__default.createElement(QuestionConduct$2, {
|
|
66619
|
+
isMultiline: true,
|
|
66634
66620
|
avatar: informationUser.studentProfileImage,
|
|
66635
66621
|
questionName: record.templateName,
|
|
66636
66622
|
questionList: record.questions,
|
|
66637
66623
|
onChangeQuestionAnswer: _onChangeQuestionAnswer,
|
|
66638
66624
|
isUserChangeSession: true
|
|
66639
66625
|
}) : React__default.createElement(QuestionConduct$2, {
|
|
66626
|
+
isMultiline: true,
|
|
66640
66627
|
avatar: informationUser.studentProfileImage,
|
|
66641
66628
|
questionName: record.templateName,
|
|
66642
|
-
questionList: record.questions
|
|
66643
|
-
isPageSessionResult: true
|
|
66629
|
+
questionList: record.questions
|
|
66644
66630
|
}))));
|
|
66645
66631
|
}), React__default.createElement("div", {
|
|
66646
66632
|
className: styles$R["talk-conduct"]
|
|
@@ -66656,6 +66642,7 @@ var ExternalSurvey = function ExternalSurvey() {
|
|
|
66656
66642
|
borderRadius: "4px"
|
|
66657
66643
|
}
|
|
66658
66644
|
}, React__default.createElement(TextFieldComponent, {
|
|
66645
|
+
isMultiline: true,
|
|
66659
66646
|
questionId: item.id,
|
|
66660
66647
|
valueText: item === null || item === void 0 ? void 0 : item.answer,
|
|
66661
66648
|
isPageResult: false,
|
|
@@ -66678,7 +66665,7 @@ var ExternalSurvey = function ExternalSurvey() {
|
|
|
66678
66665
|
className: "fas fa-check-circle"
|
|
66679
66666
|
}))), React__default.createElement(core.Dialog, {
|
|
66680
66667
|
open: openModalSession,
|
|
66681
|
-
onClose:
|
|
66668
|
+
onClose: handleToggleModalSession,
|
|
66682
66669
|
className: styles$R["modal-finished"]
|
|
66683
66670
|
}, React__default.createElement(core.DialogTitle, {
|
|
66684
66671
|
id: "alert-dialog-title",
|
|
@@ -66690,12 +66677,21 @@ var ExternalSurvey = function ExternalSurvey() {
|
|
|
66690
66677
|
}, React__default.createElement("h4", {
|
|
66691
66678
|
className: styles$R["tite-body"]
|
|
66692
66679
|
}, checkQuestionAnswer ? "Make sure with your teacher that you talked about everything you needed." : "There are several questions you have not answered yet. Are you sure to complete?"))), React__default.createElement(core.DialogActions, null, React__default.createElement(core.Button, {
|
|
66693
|
-
onClick:
|
|
66680
|
+
onClick: handleToggleModalSession,
|
|
66694
66681
|
color: "primary",
|
|
66695
66682
|
className: styles$R["btn-cancel"]
|
|
66696
66683
|
}, "Cancel"), React__default.createElement(core.Button, {
|
|
66697
66684
|
color: "primary",
|
|
66698
66685
|
autoFocus: true,
|
|
66686
|
+
onClick: function () {
|
|
66687
|
+
try {
|
|
66688
|
+
return Promise.resolve(finishSurvey()).then(function () {
|
|
66689
|
+
handleToggleModalSession();
|
|
66690
|
+
});
|
|
66691
|
+
} catch (e) {
|
|
66692
|
+
return Promise.reject(e);
|
|
66693
|
+
}
|
|
66694
|
+
},
|
|
66699
66695
|
className: styles$R["btn-submit"]
|
|
66700
66696
|
}, React__default.createElement("img", {
|
|
66701
66697
|
src: "/images/send-mess.png"
|