mario-core 2.8.3 → 2.9.1
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/containers/Login/views/block/blockForgetPass.d.ts +7 -0
- package/dist/containers/Notifications/components/NotificationList.d.ts +7 -0
- package/dist/containers/Notifications/hooks/useNotificationList.d.ts +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +88 -27
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +88 -28
- package/dist/index.modern.js.map +1 -1
- package/dist/redux/commons/action.d.ts +1 -0
- package/dist/services/notificationService.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -227,6 +227,7 @@ var setSidebar = createAction("common/setSidebar");
|
|
|
227
227
|
var setAlert = createAction("common/setAlert");
|
|
228
228
|
var reset = createAction("common/reset");
|
|
229
229
|
var showMenuBar = createAction("common/showMenuBar");
|
|
230
|
+
var showFontSize = createAction("common/showFontSize");
|
|
230
231
|
var setCurrentStudentId = createAction("common/setCurrentStudentId");
|
|
231
232
|
var setCurrentStudentUserId = createAction("common/setCurrentStudentUserId");
|
|
232
233
|
var setCurrentStudentName = createAction("common/setCurrentStudentName");
|
|
@@ -319,8 +320,8 @@ var defaultInfo = {
|
|
|
319
320
|
captcha: "",
|
|
320
321
|
rememberMe: false
|
|
321
322
|
};
|
|
322
|
-
var HOMEPAGE_TEACHER = "/
|
|
323
|
-
var HOMEPAGE_STUDENT = "/
|
|
323
|
+
var HOMEPAGE_TEACHER = "/home";
|
|
324
|
+
var HOMEPAGE_STUDENT = "/home";
|
|
324
325
|
var HOMEPAGE_ADMIN = "/admin/dashboard";
|
|
325
326
|
var HOMEPAGE_PARENT = "/parent";
|
|
326
327
|
var HOMEPAGE_DISTRICT = "/admin/schools";
|
|
@@ -1187,6 +1188,9 @@ var getUnReadNotifications = function getUnReadNotifications() {
|
|
|
1187
1188
|
var updateStatusNotification = function updateStatusNotification(id) {
|
|
1188
1189
|
return api.put(NOTIFICATION_URL + "/" + id);
|
|
1189
1190
|
};
|
|
1191
|
+
var updateAllStatus = function updateAllStatus() {
|
|
1192
|
+
return api.put(NOTIFICATION_URL + "/updateAllStatus");
|
|
1193
|
+
};
|
|
1190
1194
|
|
|
1191
1195
|
var useUnReadNotification = function useUnReadNotification() {
|
|
1192
1196
|
var dispatch = useDispatch();
|
|
@@ -4384,6 +4388,10 @@ var useUserDetail = function useUserDetail(id) {
|
|
|
4384
4388
|
});
|
|
4385
4389
|
}
|
|
4386
4390
|
|
|
4391
|
+
if (!id) {
|
|
4392
|
+
alert("Password of " + result.data.email + " is " + ("\"" + result.data.password + "\""));
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4387
4395
|
dispatch(setAlert({
|
|
4388
4396
|
type: "success",
|
|
4389
4397
|
message: (!!id ? "Update" : "Create") + " user successfully"
|
|
@@ -4603,25 +4611,7 @@ var UserDetail = function UserDetail() {
|
|
|
4603
4611
|
className: "animated fadeIn detail-buttons-padding"
|
|
4604
4612
|
}, React.createElement(QuitPrompt, {
|
|
4605
4613
|
when: edited
|
|
4606
|
-
}),
|
|
4607
|
-
className: "pt-2"
|
|
4608
|
-
}, React.createElement(Col, {
|
|
4609
|
-
md: 6
|
|
4610
|
-
}, " "), React.createElement(Col, {
|
|
4611
|
-
md: 5,
|
|
4612
|
-
className: "text-right"
|
|
4613
|
-
}, React.createElement(Button, {
|
|
4614
|
-
color: "primary",
|
|
4615
|
-
onClick: function onClick() {
|
|
4616
|
-
onResetPw(values.email || "");
|
|
4617
|
-
}
|
|
4618
|
-
}, "Send forgot password link"), " ", React.createElement(Button, {
|
|
4619
|
-
color: "success",
|
|
4620
|
-
onClick: function onClick() {
|
|
4621
|
-
getFile();
|
|
4622
|
-
},
|
|
4623
|
-
className: "ml-4"
|
|
4624
|
-
}, "Download user data"), " ")), React.createElement("h5", {
|
|
4614
|
+
}), React.createElement("h5", {
|
|
4625
4615
|
className: "mb-2"
|
|
4626
4616
|
}, header), React.createElement(Row, {
|
|
4627
4617
|
className: "pt-2"
|
|
@@ -4749,7 +4739,22 @@ var UserDetail = function UserDetail() {
|
|
|
4749
4739
|
onChange: function onChange() {
|
|
4750
4740
|
return setFieldValue("isActive", false);
|
|
4751
4741
|
}
|
|
4752
|
-
}))))))
|
|
4742
|
+
})))))), !!id && React.createElement(Row, null, React.createElement(Col, {
|
|
4743
|
+
md: 6
|
|
4744
|
+
}), React.createElement(Col, {
|
|
4745
|
+
md: 6
|
|
4746
|
+
}, React.createElement(Button, {
|
|
4747
|
+
color: "primary",
|
|
4748
|
+
onClick: function onClick() {
|
|
4749
|
+
onResetPw(values.email || "");
|
|
4750
|
+
}
|
|
4751
|
+
}, "Send forgot password link"), React.createElement(Button, {
|
|
4752
|
+
color: "success",
|
|
4753
|
+
onClick: function onClick() {
|
|
4754
|
+
getFile();
|
|
4755
|
+
},
|
|
4756
|
+
className: "ml-4"
|
|
4757
|
+
}, "Download user data")))), React.createElement(Col, {
|
|
4753
4758
|
md: 4
|
|
4754
4759
|
}, React.createElement(Row, null, React.createElement(Col, {
|
|
4755
4760
|
md: 8
|
|
@@ -5245,6 +5250,10 @@ var useNotificationList = function useNotificationList() {
|
|
|
5245
5250
|
filters = _useState[0],
|
|
5246
5251
|
setFilters = _useState[1];
|
|
5247
5252
|
|
|
5253
|
+
var _useState2 = useState(false),
|
|
5254
|
+
toggleUpdateAllStatus = _useState2[0],
|
|
5255
|
+
setToggleUpdateAllStatus = _useState2[1];
|
|
5256
|
+
|
|
5248
5257
|
var changeFilters = function changeFilters(objectValue) {
|
|
5249
5258
|
return setFilters(_extends({}, filters, objectValue));
|
|
5250
5259
|
};
|
|
@@ -5345,6 +5354,40 @@ var useNotificationList = function useNotificationList() {
|
|
|
5345
5354
|
}));
|
|
5346
5355
|
}
|
|
5347
5356
|
}, [notificationList, unReadNotification]);
|
|
5357
|
+
var updateAll = useCallback(function () {
|
|
5358
|
+
try {
|
|
5359
|
+
try {
|
|
5360
|
+
if (notificationList.length === 0) throw new Error("There are no unread messages");
|
|
5361
|
+
dispatch(setModal({
|
|
5362
|
+
isOpen: true,
|
|
5363
|
+
type: "warning",
|
|
5364
|
+
message: "Do you want to mark all notification ?",
|
|
5365
|
+
onConfirm: function () {
|
|
5366
|
+
try {
|
|
5367
|
+
setToggleUpdateAllStatus(true);
|
|
5368
|
+
return Promise.resolve(updateAllStatus()).then(function () {
|
|
5369
|
+
getData();
|
|
5370
|
+
setToggleUpdateAllStatus(false);
|
|
5371
|
+
});
|
|
5372
|
+
} catch (e) {
|
|
5373
|
+
return Promise.reject(e);
|
|
5374
|
+
}
|
|
5375
|
+
}
|
|
5376
|
+
}));
|
|
5377
|
+
} catch (err) {
|
|
5378
|
+
var _err$response3, _err$response3$data;
|
|
5379
|
+
|
|
5380
|
+
dispatch(setAlert({
|
|
5381
|
+
type: "danger",
|
|
5382
|
+
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
|
|
5383
|
+
}));
|
|
5384
|
+
}
|
|
5385
|
+
|
|
5386
|
+
return Promise.resolve();
|
|
5387
|
+
} catch (e) {
|
|
5388
|
+
return Promise.reject(e);
|
|
5389
|
+
}
|
|
5390
|
+
}, [notificationList]);
|
|
5348
5391
|
return {
|
|
5349
5392
|
notificationList: notificationList,
|
|
5350
5393
|
totalItems: totalItems,
|
|
@@ -5352,7 +5395,9 @@ var useNotificationList = function useNotificationList() {
|
|
|
5352
5395
|
filters: filters,
|
|
5353
5396
|
changeFilters: changeFilters,
|
|
5354
5397
|
updateNotification: updateNotification,
|
|
5355
|
-
viewNotification: viewNotification
|
|
5398
|
+
viewNotification: viewNotification,
|
|
5399
|
+
updateAll: updateAll,
|
|
5400
|
+
toggleUpdateAllStatus: toggleUpdateAllStatus
|
|
5356
5401
|
};
|
|
5357
5402
|
};
|
|
5358
5403
|
|
|
@@ -5366,7 +5411,9 @@ var NotificationList = function NotificationList() {
|
|
|
5366
5411
|
filters = _useNotificationList.filters,
|
|
5367
5412
|
changeFilters = _useNotificationList.changeFilters,
|
|
5368
5413
|
updateNotification = _useNotificationList.updateNotification,
|
|
5369
|
-
viewNotification = _useNotificationList.viewNotification
|
|
5414
|
+
viewNotification = _useNotificationList.viewNotification,
|
|
5415
|
+
updateAll = _useNotificationList.updateAll,
|
|
5416
|
+
toggleUpdateAllStatus = _useNotificationList.toggleUpdateAllStatus;
|
|
5370
5417
|
|
|
5371
5418
|
return React.createElement("div", {
|
|
5372
5419
|
className: "animated fadeIn",
|
|
@@ -5400,8 +5447,18 @@ var NotificationList = function NotificationList() {
|
|
|
5400
5447
|
className: "my-2 d-flex justify-content-center"
|
|
5401
5448
|
}, React.createElement(Col, {
|
|
5402
5449
|
md: 12,
|
|
5403
|
-
className: "d-flex justify-content-end"
|
|
5404
|
-
},
|
|
5450
|
+
className: "d-flex justify-content-end align-items-center"
|
|
5451
|
+
}, filters.isRead === false && React.createElement("div", {
|
|
5452
|
+
className: "d-flex align-items-center justify-content-end mx-2"
|
|
5453
|
+
}, "Mark all as read", React.createElement(CustomInput, {
|
|
5454
|
+
checked: toggleUpdateAllStatus,
|
|
5455
|
+
className: "mx-2",
|
|
5456
|
+
type: "checkbox",
|
|
5457
|
+
id: "status-checkbox",
|
|
5458
|
+
onChange: function onChange() {
|
|
5459
|
+
return updateAll();
|
|
5460
|
+
}
|
|
5461
|
+
})), "Total of notifications: ", totalItems)), React.createElement(Row, {
|
|
5405
5462
|
className: "mb-2"
|
|
5406
5463
|
}, React.createElement(Col, {
|
|
5407
5464
|
md: 12
|
|
@@ -6652,7 +6709,8 @@ var initialState = {
|
|
|
6652
6709
|
currentStudentUserId: localStorage.getItem("currentStudentUserId") || "",
|
|
6653
6710
|
currentStudentName: localStorage.getItem("currentStudentName") || "",
|
|
6654
6711
|
turnOffPassWhenChangeMode: false,
|
|
6655
|
-
menuBar: true
|
|
6712
|
+
menuBar: true,
|
|
6713
|
+
defaultFontSize: 16
|
|
6656
6714
|
};
|
|
6657
6715
|
var commonReducer = createReducer(initialState, function (builder) {
|
|
6658
6716
|
builder.addCase(setLoading, function (state, action) {
|
|
@@ -6680,6 +6738,8 @@ var commonReducer = createReducer(initialState, function (builder) {
|
|
|
6680
6738
|
state.turnOffPassWhenChangeMode = action.payload;
|
|
6681
6739
|
}).addCase(showMenuBar, function (state, action) {
|
|
6682
6740
|
state.menuBar = action.payload;
|
|
6741
|
+
}).addCase(showFontSize, function (state, action) {
|
|
6742
|
+
state.defaultFontSize = action.payload;
|
|
6683
6743
|
});
|
|
6684
6744
|
});
|
|
6685
6745
|
|
|
@@ -7590,5 +7650,5 @@ var generateRandomString = (function () {
|
|
|
7590
7650
|
return (Math.random() + 1).toString(36).substring(7);
|
|
7591
7651
|
});
|
|
7592
7652
|
|
|
7593
|
-
export { ACCESS_TOKEN, ANSWER_EDITOR_HEIGHT, AcademicClassSelector, AddButton, BASE_URL, CHAT_CHANNEL, CommonAlert, CommonHeader, CommonModal$1 as CommonModal, CreatableSelector, CustomPagination, CustomSelector, CustomTabs as CustomTab, DATE_FORMAT, DATE_RESULT, DEFAULT_FILTER, Dashboard, DeleteButtonIcon, DetailActionButtons, EMOTIONS, EditButtonIcon, EmailTemplateDetail, EmailTemplateList, EmptyDataAlert, ErrorHandler, FULL_DATE_RESULT, FaqList, InputFile as FileInput, GOOGLE_RECAPTCHA_KEY, GalleryList, Images, LICENSE_AGGRID, LinkEditButton, Loading, Login, MediaList, NOTIFICATION_CHANNEL, NotFound, NotificationList, NotificationModal, QUESTION_TYPES, QUESTION_TYPES_OPTIONS, QuestionCategorySelector, QuestionTypeSelector, QuitPrompt, ReactNotification, RequiredLabel$1 as RequiredLabel, SchoolList, SearchBox$1 as SearchBox, SearchBoxContainer, SkillList, StarRatingSelector, SuggestionCategorySelector, TAB_COLORS, TINY_MCE_API_KEY, TheContent$1 as TheContent, TheLayout, ToggleButton, UploadFileButton, UserDetail, UserList, addTab, answerQuestion, answerQuestionDataPlayer, api, apiUpload, canAccess as canAccessRoute, changeNote, changeTags, clearTab, closeTab, debounce, editTab, editorConfig, firstCheckToken, generateRandomString, getFileUrl, getInfo, getTextFromHTML, isInViewport, reset, setAlert, setAssessmentList, setAssignmentList, setAssistantList, setBadgeList, setBandScoreList, setCertificateList, setClassList, setConferenceRubricList, setCurrentStudentId, setCurrentStudentName, setCurrentStudentUserId, setCustomAlertList, setDataPlayer, setEditItemQuesion, setFeedbackList, setFilterWidget, setGoalExampleList, setImproveMyClass, setLearningSupportCategoryList, setLoading, setMailCategory, setModal, setMoveItemQuestion, setMyStudent, setQuestionByCategory, setQuestionCateList, setQuestionList, setReflectionList, setReflectionResultList, setResetQuestionList, setSchoolBlankDayList, setSelectQuestion, setSemesterList, setSessionPlayer, setSessionTemplateGeneralClassList, setSessionTemplateList, setStartTime, setStrategyList, setStudentIdSelectedByTeacher, setStudentList, setSubjectList, setSuggestionList, setTurnOffPassWhenChangeMode, setTutorialScreenList, setUser, setUserList, showMenuBar, store, systemCertificateUpload, systemStudentBadge, uploadFile, useFilters, useGalleryList, utcToLocalTime };
|
|
7653
|
+
export { ACCESS_TOKEN, ANSWER_EDITOR_HEIGHT, AcademicClassSelector, AddButton, BASE_URL, CHAT_CHANNEL, CommonAlert, CommonHeader, CommonModal$1 as CommonModal, CreatableSelector, CustomPagination, CustomSelector, CustomTabs as CustomTab, DATE_FORMAT, DATE_RESULT, DEFAULT_FILTER, Dashboard, DeleteButtonIcon, DetailActionButtons, EMOTIONS, EditButtonIcon, EmailTemplateDetail, EmailTemplateList, EmptyDataAlert, ErrorHandler, FULL_DATE_RESULT, FaqList, InputFile as FileInput, GOOGLE_RECAPTCHA_KEY, GalleryList, Images, LICENSE_AGGRID, LinkEditButton, Loading, Login, MediaList, NOTIFICATION_CHANNEL, NotFound, NotificationList, NotificationModal, QUESTION_TYPES, QUESTION_TYPES_OPTIONS, QuestionCategorySelector, QuestionTypeSelector, QuitPrompt, ReactNotification, RequiredLabel$1 as RequiredLabel, SchoolList, SearchBox$1 as SearchBox, SearchBoxContainer, SkillList, StarRatingSelector, SuggestionCategorySelector, TAB_COLORS, TINY_MCE_API_KEY, TheContent$1 as TheContent, TheLayout, ToggleButton, UploadFileButton, UserDetail, UserList, addTab, answerQuestion, answerQuestionDataPlayer, api, apiUpload, canAccess as canAccessRoute, changeNote, changeTags, clearTab, closeTab, debounce, editTab, editorConfig, firstCheckToken, generateRandomString, getFileUrl, getInfo, getTextFromHTML, isInViewport, reset, setAlert, setAssessmentList, setAssignmentList, setAssistantList, setBadgeList, setBandScoreList, setCertificateList, setClassList, setConferenceRubricList, setCurrentStudentId, setCurrentStudentName, setCurrentStudentUserId, setCustomAlertList, setDataPlayer, setEditItemQuesion, setFeedbackList, setFilterWidget, setGoalExampleList, setImproveMyClass, setLearningSupportCategoryList, setLoading, setMailCategory, setModal, setMoveItemQuestion, setMyStudent, setQuestionByCategory, setQuestionCateList, setQuestionList, setReflectionList, setReflectionResultList, setResetQuestionList, setSchoolBlankDayList, setSelectQuestion, setSemesterList, setSessionPlayer, setSessionTemplateGeneralClassList, setSessionTemplateList, setStartTime, setStrategyList, setStudentIdSelectedByTeacher, setStudentList, setSubjectList, setSuggestionList, setTurnOffPassWhenChangeMode, setTutorialScreenList, setUser, setUserList, showFontSize, showMenuBar, store, systemCertificateUpload, systemStudentBadge, uploadFile, useFilters, useGalleryList, utcToLocalTime };
|
|
7594
7654
|
//# sourceMappingURL=index.modern.js.map
|