mario-core 1.2.19-es-prod → 1.2.20-es-prod
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/User/hooks/useUserList.d.ts +1 -1
- package/dist/containers/User/views/Profile.d.ts +15 -0
- package/dist/index.js +21 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +21 -8
- package/dist/index.modern.js.map +1 -1
- package/dist/redux/unreadNotification/action.d.ts +1 -0
- package/dist/types/Payload.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ declare const useUserList: () => {
|
|
|
8
8
|
removeData: (id: string) => void;
|
|
9
9
|
changeFilters: (updatedFilters: any) => void;
|
|
10
10
|
reDirectDetailPage: (id?: number | undefined) => void;
|
|
11
|
-
switchUser: (
|
|
11
|
+
switchUser: (record: any) => Promise<void>;
|
|
12
12
|
classFontSize: string;
|
|
13
13
|
};
|
|
14
14
|
export default useUserList;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import 'react-phone-number-input/style.css';
|
|
3
|
+
interface IProps {
|
|
4
|
+
userDetail: any;
|
|
5
|
+
confirmData: any;
|
|
6
|
+
currentRoles: any;
|
|
7
|
+
goBack: any;
|
|
8
|
+
setEdited: any;
|
|
9
|
+
setEditedTrue: any;
|
|
10
|
+
id?: string;
|
|
11
|
+
onResetPw: any;
|
|
12
|
+
getFile: any;
|
|
13
|
+
}
|
|
14
|
+
declare const Profile: ({ userDetail, confirmData, currentRoles, goBack, setEdited, setEditedTrue, id, onResetPw, getFile }: IProps) => JSX.Element;
|
|
15
|
+
export default Profile;
|
package/dist/index.js
CHANGED
|
@@ -22006,7 +22006,7 @@ var BASE_URL = function () {
|
|
|
22006
22006
|
var url = windowUrl.split("//")[0] + "//" + windowUrl.split("//")[1].split("/")[0];
|
|
22007
22007
|
return url;
|
|
22008
22008
|
}();
|
|
22009
|
-
var isLocalhost = Boolean(window.location.hostname === "localhost" || window.location.hostname.includes("stage") || window.location.hostname
|
|
22009
|
+
var isLocalhost = Boolean(window.location.hostname === "localhost" || window.location.hostname.includes("stage") || window.location.hostname === "[::1]" || window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));
|
|
22010
22010
|
var QUESTION_TYPES_OPTIONS = [{
|
|
22011
22011
|
label: "Single choice",
|
|
22012
22012
|
value: "SingleChoice"
|
|
@@ -22507,20 +22507,19 @@ var getCookieValue = function getCookieValue(name) {
|
|
|
22507
22507
|
return ((_document$cookie$matc = document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)')) === null || _document$cookie$matc === void 0 ? void 0 : _document$cookie$matc.pop()) || '';
|
|
22508
22508
|
};
|
|
22509
22509
|
|
|
22510
|
-
var _sessionStorage$getIt;
|
|
22511
22510
|
var defaultInfo = {
|
|
22512
22511
|
email: "",
|
|
22513
22512
|
password: "",
|
|
22514
22513
|
captcha: "",
|
|
22515
22514
|
rememberMe: false,
|
|
22516
|
-
isSessionUserBrowser:
|
|
22515
|
+
isSessionUserBrowser: !!sessionStorage.getItem(IS_USER_SESSION_BROWSER)
|
|
22517
22516
|
};
|
|
22518
22517
|
var HOMEPAGE_TEACHER = "/home";
|
|
22519
22518
|
var HOMEPAGE_STUDENT = "/home";
|
|
22520
22519
|
var HOMEPAGE_ADMIN = "/admin/home";
|
|
22521
22520
|
var HOMEPAGE_PARENT = "/parent";
|
|
22522
22521
|
var HOMEPAGE_DISTRICT = "/admin/schools";
|
|
22523
|
-
var HOMEPAGE_EDU_TEACHER = "/
|
|
22522
|
+
var HOMEPAGE_EDU_TEACHER = "/my-student?isReadOnly=true";
|
|
22524
22523
|
var TITLE = "Log in";
|
|
22525
22524
|
|
|
22526
22525
|
var useLogin = function useLogin() {
|
|
@@ -27063,16 +27062,30 @@ var useUserList = function useUserList() {
|
|
|
27063
27062
|
}
|
|
27064
27063
|
};
|
|
27065
27064
|
|
|
27066
|
-
var switchUser = React.useCallback(function (
|
|
27065
|
+
var switchUser = React.useCallback(function (record) {
|
|
27067
27066
|
try {
|
|
27068
|
-
var
|
|
27067
|
+
var _exit2 = false;
|
|
27068
|
+
|
|
27069
|
+
var _temp7 = function _temp7(_result) {
|
|
27070
|
+
if (_exit2) return _result;
|
|
27069
27071
|
dispatch(setLoading(false));
|
|
27070
27072
|
};
|
|
27071
27073
|
|
|
27072
27074
|
dispatch(setLoading(true));
|
|
27073
27075
|
|
|
27074
27076
|
var _temp8 = _catch(function () {
|
|
27075
|
-
|
|
27077
|
+
var _record$roles;
|
|
27078
|
+
|
|
27079
|
+
if (record !== null && record !== void 0 && (_record$roles = record.roles) !== null && _record$roles !== void 0 && _record$roles.includes("Parent")) {
|
|
27080
|
+
dispatch(setAlert({
|
|
27081
|
+
type: "danger",
|
|
27082
|
+
message: "Can't impersonate!"
|
|
27083
|
+
}));
|
|
27084
|
+
_exit2 = true;
|
|
27085
|
+
return;
|
|
27086
|
+
}
|
|
27087
|
+
|
|
27088
|
+
return Promise.resolve(switchAccountUser((record === null || record === void 0 ? void 0 : record.id) || '')).then(function (res) {
|
|
27076
27089
|
var data = res.data;
|
|
27077
27090
|
dispatch(setModal({
|
|
27078
27091
|
isOpen: true,
|
|
@@ -27743,7 +27756,7 @@ var UserList = function UserList() {
|
|
|
27743
27756
|
cursor: "pointer"
|
|
27744
27757
|
},
|
|
27745
27758
|
onClick: function onClick() {
|
|
27746
|
-
return switchUser(record
|
|
27759
|
+
return switchUser(record);
|
|
27747
27760
|
}
|
|
27748
27761
|
}), React__default.createElement(DeleteButtonIcon, {
|
|
27749
27762
|
onClick: function onClick() {
|