@gpa-gemstone/common-pages 0.0.104 → 0.0.105
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/ErrorBoundary.d.ts +17 -17
- package/lib/ErrorBoundary.js +91 -68
- package/lib/Note.d.ts +22 -22
- package/lib/Note.js +256 -230
- package/lib/SearchBar.d.ts +37 -37
- package/lib/SearchBar.js +203 -180
- package/lib/SelectionPopup.d.ts +42 -42
- package/lib/SelectionPopup.js +93 -90
- package/lib/Setting.d.ts +8 -8
- package/lib/Setting.js +151 -125
- package/lib/SliceInterfaces.d.ts +76 -76
- package/lib/SliceInterfaces.js +2 -2
- package/lib/StandardSelectPopup.d.ts +20 -20
- package/lib/StandardSelectPopup.js +135 -109
- package/lib/TimeFilter/QuickSelects.d.ts +7 -0
- package/lib/TimeFilter/QuickSelects.js +240 -0
- package/lib/TimeFilter.d.ts +26 -0
- package/lib/TimeFilter.js +270 -0
- package/lib/TimeWindowUtils.d.ts +33 -0
- package/lib/TimeWindowUtils.js +121 -0
- package/lib/ValueList/ByValueList.d.ts +10 -10
- package/lib/ValueList/ByValueList.js +141 -115
- package/lib/ValueList/Group.d.ts +11 -11
- package/lib/ValueList/Group.js +97 -71
- package/lib/ValueList/GroupForm.d.ts +9 -9
- package/lib/ValueList/GroupForm.js +74 -51
- package/lib/ValueList/GroupInfo.d.ts +8 -8
- package/lib/ValueList/GroupInfo.js +95 -69
- package/lib/ValueList/GroupItem.d.ts +9 -9
- package/lib/ValueList/GroupItem.js +142 -116
- package/lib/ValueList/ItemForm.d.ts +9 -9
- package/lib/ValueList/ItemForm.js +82 -59
- package/lib/index.d.ts +12 -11
- package/lib/index.js +50 -45
- package/lib/user/AdditionalField.d.ts +26 -26
- package/lib/user/AdditionalField.js +290 -264
- package/lib/user/ByUser.d.ts +12 -12
- package/lib/user/ByUser.js +174 -148
- package/lib/user/User.d.ts +14 -14
- package/lib/user/User.js +97 -71
- package/lib/user/UserForm.d.ts +12 -12
- package/lib/user/UserForm.js +166 -143
- package/lib/user/UserInfo.d.ts +7 -7
- package/lib/user/UserInfo.js +123 -97
- package/lib/user/UserPermissions.d.ts +8 -8
- package/lib/user/UserPermissions.js +106 -83
- package/package.json +9 -8
package/lib/user/UserInfo.js
CHANGED
@@ -1,97 +1,123 @@
|
|
1
|
-
"use strict";
|
2
|
-
// ******************************************************************************************************
|
3
|
-
// UserInfo.tsx - Gbtc
|
4
|
-
//
|
5
|
-
// Copyright © 2020, Grid Protection Alliance. All Rights Reserved.
|
6
|
-
//
|
7
|
-
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
|
8
|
-
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
|
9
|
-
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
|
10
|
-
// file except in compliance with the License. You may obtain a copy of the License at:
|
11
|
-
//
|
12
|
-
// http://opensource.org/licenses/MIT
|
13
|
-
//
|
14
|
-
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
|
15
|
-
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
|
16
|
-
// License for the specific language governing permissions and limitations.
|
17
|
-
//
|
18
|
-
// Code Modification History:
|
19
|
-
// ----------------------------------------------------------------------------------------------------
|
20
|
-
// 07/14/2021 - C. Lackner
|
21
|
-
// Generated original version of source code.
|
22
|
-
// ******************************************************************************************************
|
23
|
-
var __assign = (this && this.__assign) || function () {
|
24
|
-
__assign = Object.assign || function(t) {
|
25
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
26
|
-
s = arguments[i];
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
28
|
-
t[p] = s[p];
|
29
|
-
}
|
30
|
-
return t;
|
31
|
-
};
|
32
|
-
return __assign.apply(this, arguments);
|
33
|
-
};
|
34
|
-
Object.
|
35
|
-
|
36
|
-
var
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
function
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
var encryptedPwd = (user.Password !== currentUser.Password ? CryptoJS.SHA256(user.Password + "0").toString(CryptoJS.enc.Base64) : user.Password);
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
1
|
+
"use strict";
|
2
|
+
// ******************************************************************************************************
|
3
|
+
// UserInfo.tsx - Gbtc
|
4
|
+
//
|
5
|
+
// Copyright © 2020, Grid Protection Alliance. All Rights Reserved.
|
6
|
+
//
|
7
|
+
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
|
8
|
+
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
|
9
|
+
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
|
10
|
+
// file except in compliance with the License. You may obtain a copy of the License at:
|
11
|
+
//
|
12
|
+
// http://opensource.org/licenses/MIT
|
13
|
+
//
|
14
|
+
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
|
15
|
+
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
|
16
|
+
// License for the specific language governing permissions and limitations.
|
17
|
+
//
|
18
|
+
// Code Modification History:
|
19
|
+
// ----------------------------------------------------------------------------------------------------
|
20
|
+
// 07/14/2021 - C. Lackner
|
21
|
+
// Generated original version of source code.
|
22
|
+
// ******************************************************************************************************
|
23
|
+
var __assign = (this && this.__assign) || function () {
|
24
|
+
__assign = Object.assign || function(t) {
|
25
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
26
|
+
s = arguments[i];
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
28
|
+
t[p] = s[p];
|
29
|
+
}
|
30
|
+
return t;
|
31
|
+
};
|
32
|
+
return __assign.apply(this, arguments);
|
33
|
+
};
|
34
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
35
|
+
if (k2 === undefined) k2 = k;
|
36
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
37
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
38
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
39
|
+
}
|
40
|
+
Object.defineProperty(o, k2, desc);
|
41
|
+
}) : (function(o, m, k, k2) {
|
42
|
+
if (k2 === undefined) k2 = k;
|
43
|
+
o[k2] = m[k];
|
44
|
+
}));
|
45
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
46
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
47
|
+
}) : function(o, v) {
|
48
|
+
o["default"] = v;
|
49
|
+
});
|
50
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
51
|
+
if (mod && mod.__esModule) return mod;
|
52
|
+
var result = {};
|
53
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
54
|
+
__setModuleDefault(result, mod);
|
55
|
+
return result;
|
56
|
+
};
|
57
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
58
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
59
|
+
};
|
60
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
61
|
+
var React = __importStar(require("react"));
|
62
|
+
var CryptoJS = __importStar(require("crypto-js"));
|
63
|
+
var UserForm_1 = __importDefault(require("./UserForm"));
|
64
|
+
var react_interactive_1 = require("@gpa-gemstone/react-interactive");
|
65
|
+
var gpa_symbols_1 = require("@gpa-gemstone/gpa-symbols");
|
66
|
+
var react_redux_1 = require("react-redux");
|
67
|
+
function UserInfo(props) {
|
68
|
+
var dispatch = (0, react_redux_1.useDispatch)();
|
69
|
+
var currentUser = (0, react_redux_1.useSelector)(props.UserSlice.CurrentUser);
|
70
|
+
var _a = React.useState(currentUser), user = _a[0], setUser = _a[1];
|
71
|
+
var _b = React.useState([]), warnings = _b[0], setWarning = _b[1];
|
72
|
+
var _c = React.useState('None'), hover = _c[0], setHover = _c[1];
|
73
|
+
React.useEffect(function () {
|
74
|
+
if (currentUser == null || user == null)
|
75
|
+
return;
|
76
|
+
var encryptedPwd = (user.Password !== currentUser.Password ? CryptoJS.SHA256(user.Password + "0").toString(CryptoJS.enc.Base64) : user.Password);
|
77
|
+
var w = [];
|
78
|
+
if (currentUser.FirstName !== user.FirstName)
|
79
|
+
w.push('Changes to First Name will be lost.');
|
80
|
+
if (currentUser.LastName !== user.LastName)
|
81
|
+
w.push('Changes to Last Name will be lost.');
|
82
|
+
if (currentUser.Phone !== user.Phone)
|
83
|
+
w.push('Changes to Phone will be lost.');
|
84
|
+
if (currentUser.Email !== user.Email)
|
85
|
+
w.push('Changes to Email will be lost.');
|
86
|
+
if (currentUser.ChangePasswordOn !== user.ChangePasswordOn)
|
87
|
+
w.push('Changes to Change Password Date will be lost.');
|
88
|
+
if (currentUser.LockedOut !== user.LockedOut)
|
89
|
+
w.push('Changes to Account Locked Status will be lost.');
|
90
|
+
if (currentUser.Approved !== user.Approved)
|
91
|
+
w.push('Changes Account Approved Status will be lost.');
|
92
|
+
if (currentUser.PhoneConfirmed !== user.PhoneConfirmed)
|
93
|
+
w.push('Changes to Phone Confirmed Status will be lost.');
|
94
|
+
if (currentUser.EmailConfirmed !== user.EmailConfirmed)
|
95
|
+
w.push('Changes to Email confirmed Status will be lost.');
|
96
|
+
if (!currentUser.UseADAuthentication && currentUser.Password !== encryptedPwd)
|
97
|
+
w.push('Changes to Password will be lost.');
|
98
|
+
setWarning(w);
|
99
|
+
}, [currentUser, user]);
|
100
|
+
React.useEffect(function () { setUser(currentUser); }, [currentUser]);
|
101
|
+
function updateUser() {
|
102
|
+
var encryptedPwd = (user.Password !== currentUser.Password ? CryptoJS.SHA256(user.Password + "0").toString(CryptoJS.enc.Base64) : user.Password);
|
103
|
+
dispatch(props.UserSlice.SetCurrentUser(__assign(__assign({}, user), { Name: currentUser.Name, Password: encryptedPwd })));
|
104
|
+
dispatch(props.UserSlice.DBAction({ verb: 'PATCH', record: __assign(__assign({}, user), { Name: currentUser.Name, Password: encryptedPwd }) }));
|
105
|
+
}
|
106
|
+
return (React.createElement("div", { className: "card", style: { marginBottom: 10 } },
|
107
|
+
React.createElement("div", { className: "card-header" },
|
108
|
+
React.createElement("div", { className: "row" },
|
109
|
+
React.createElement("div", { className: "col" },
|
110
|
+
React.createElement("h4", null, "User Information:")))),
|
111
|
+
React.createElement("div", { className: "card-body", style: { height: window.innerHeight - 440, maxHeight: window.innerHeight - 440, overflowY: 'auto' } },
|
112
|
+
React.createElement(UserForm_1.default, { UserAccount: user, Setter: function (u) { return setUser(u); }, Edit: true, UserSlice: props.UserSlice })),
|
113
|
+
React.createElement("div", { className: "card-footer" },
|
114
|
+
React.createElement("div", { className: "btn-group mr-2" },
|
115
|
+
React.createElement("button", { className: "btn btn-primary", onClick: function () { return updateUser(); }, disabled: warnings.length === 0 }, "Update")),
|
116
|
+
React.createElement("div", { className: "btn-group mr-2" },
|
117
|
+
React.createElement("button", { className: "btn btn-default", onClick: function () { return setUser(currentUser); }, disabled: warnings.length === 0, "data-tooltip": 'Clr', onMouseEnter: function () { return setHover('Clear'); }, onMouseLeave: function () { return setHover('None'); } }, "Reset")),
|
118
|
+
React.createElement(react_interactive_1.ToolTip, { Show: hover === 'Clear' && (warnings.length > 0), Position: 'top', Theme: 'dark', Target: "Clr" }, warnings.map(function (t, i) { return React.createElement("p", { key: i },
|
119
|
+
gpa_symbols_1.Warning,
|
120
|
+
" ",
|
121
|
+
t); })))));
|
122
|
+
}
|
123
|
+
exports.default = UserInfo;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
2
|
-
import { ISecurityRoleSlice } from '../SliceInterfaces';
|
3
|
-
interface IProps {
|
4
|
-
UserID: string;
|
5
|
-
RoleSlice: ISecurityRoleSlice;
|
6
|
-
}
|
7
|
-
declare function UserPermission(props: IProps): JSX.Element;
|
8
|
-
export default UserPermission;
|
1
|
+
import * as React from 'react';
|
2
|
+
import { ISecurityRoleSlice } from '../SliceInterfaces';
|
3
|
+
interface IProps {
|
4
|
+
UserID: string;
|
5
|
+
RoleSlice: ISecurityRoleSlice;
|
6
|
+
}
|
7
|
+
declare function UserPermission(props: IProps): React.JSX.Element;
|
8
|
+
export default UserPermission;
|
@@ -1,83 +1,106 @@
|
|
1
|
-
"use strict";
|
2
|
-
// ******************************************************************************************************
|
3
|
-
// UserPermission.tsx - Gbtc
|
4
|
-
//
|
5
|
-
// Copyright © 2020, Grid Protection Alliance. All Rights Reserved.
|
6
|
-
//
|
7
|
-
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
|
8
|
-
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
|
9
|
-
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
|
10
|
-
// file except in compliance with the License. You may obtain a copy of the License at:
|
11
|
-
//
|
12
|
-
// http://opensource.org/licenses/MIT
|
13
|
-
//
|
14
|
-
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
|
15
|
-
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
|
16
|
-
// License for the specific language governing permissions and limitations.
|
17
|
-
//
|
18
|
-
// Code Modification History:
|
19
|
-
// ----------------------------------------------------------------------------------------------------
|
20
|
-
// 07/14/2021 - C. Lackner
|
21
|
-
// Generated original version of source code.
|
22
|
-
// ******************************************************************************************************
|
23
|
-
Object.
|
24
|
-
|
25
|
-
var
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
React.createElement("div", { className: "
|
81
|
-
React.createElement("
|
82
|
-
|
83
|
-
|
1
|
+
"use strict";
|
2
|
+
// ******************************************************************************************************
|
3
|
+
// UserPermission.tsx - Gbtc
|
4
|
+
//
|
5
|
+
// Copyright © 2020, Grid Protection Alliance. All Rights Reserved.
|
6
|
+
//
|
7
|
+
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
|
8
|
+
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
|
9
|
+
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
|
10
|
+
// file except in compliance with the License. You may obtain a copy of the License at:
|
11
|
+
//
|
12
|
+
// http://opensource.org/licenses/MIT
|
13
|
+
//
|
14
|
+
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
|
15
|
+
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
|
16
|
+
// License for the specific language governing permissions and limitations.
|
17
|
+
//
|
18
|
+
// Code Modification History:
|
19
|
+
// ----------------------------------------------------------------------------------------------------
|
20
|
+
// 07/14/2021 - C. Lackner
|
21
|
+
// Generated original version of source code.
|
22
|
+
// ******************************************************************************************************
|
23
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
24
|
+
if (k2 === undefined) k2 = k;
|
25
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
26
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
27
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
28
|
+
}
|
29
|
+
Object.defineProperty(o, k2, desc);
|
30
|
+
}) : (function(o, m, k, k2) {
|
31
|
+
if (k2 === undefined) k2 = k;
|
32
|
+
o[k2] = m[k];
|
33
|
+
}));
|
34
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
35
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
36
|
+
}) : function(o, v) {
|
37
|
+
o["default"] = v;
|
38
|
+
});
|
39
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
40
|
+
if (mod && mod.__esModule) return mod;
|
41
|
+
var result = {};
|
42
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
43
|
+
__setModuleDefault(result, mod);
|
44
|
+
return result;
|
45
|
+
};
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
47
|
+
var React = __importStar(require("react"));
|
48
|
+
var _ = __importStar(require("lodash"));
|
49
|
+
var react_forms_1 = require("@gpa-gemstone/react-forms");
|
50
|
+
var react_redux_1 = require("react-redux");
|
51
|
+
function UserPermission(props) {
|
52
|
+
var dispatch = (0, react_redux_1.useDispatch)();
|
53
|
+
var currentRoles = (0, react_redux_1.useSelector)(props.RoleSlice.Roles);
|
54
|
+
var allRoleStatus = (0, react_redux_1.useSelector)(props.RoleSlice.Status);
|
55
|
+
var availableRoles = (0, react_redux_1.useSelector)(props.RoleSlice.AvailableRoles);
|
56
|
+
var currentRoleStatus = (0, react_redux_1.useSelector)(props.RoleSlice.CurrentRoleStatus);
|
57
|
+
var _a = React.useState([]), workingRoles = _a[0], setWorkingRoles = _a[1];
|
58
|
+
var _b = React.useState(false), changed = _b[0], setChanged = _b[1];
|
59
|
+
React.useEffect(function () {
|
60
|
+
if (allRoleStatus === 'unintiated' || allRoleStatus === 'changed')
|
61
|
+
dispatch(props.RoleSlice.FetchRoles());
|
62
|
+
}, [dispatch, allRoleStatus]);
|
63
|
+
React.useEffect(function () {
|
64
|
+
if (currentRoleStatus === 'unintiated' || currentRoleStatus === 'changed')
|
65
|
+
dispatch(props.RoleSlice.FetchUserRoles(props.UserID));
|
66
|
+
}, [dispatch, currentRoleStatus, props.UserID]);
|
67
|
+
React.useEffect(function () {
|
68
|
+
resetCurrentRoles(availableRoles, currentRoles);
|
69
|
+
}, [currentRoles, availableRoles]);
|
70
|
+
function resetCurrentRoles(avRoles, currRoles) {
|
71
|
+
setChanged(false);
|
72
|
+
setWorkingRoles(avRoles.map(function (src) {
|
73
|
+
var upd = _.cloneDeep(src);
|
74
|
+
upd.Assigned = currRoles.find(function (usrc) { return usrc.ApplicationRoleID === upd.ID; }) !== undefined;
|
75
|
+
return upd;
|
76
|
+
}));
|
77
|
+
}
|
78
|
+
return (React.createElement("div", { className: "card", style: { marginBottom: 10 } },
|
79
|
+
React.createElement("div", { className: "card-header" },
|
80
|
+
React.createElement("div", { className: "row" },
|
81
|
+
React.createElement("div", { className: "col" },
|
82
|
+
React.createElement("h4", null, "User Permissions:")))),
|
83
|
+
React.createElement("div", { className: "card-body" },
|
84
|
+
React.createElement("div", { className: "row" },
|
85
|
+
React.createElement("div", { className: "col" },
|
86
|
+
React.createElement("fieldset", { className: "border", style: { padding: '10px', height: '100%' } },
|
87
|
+
React.createElement("legend", { className: "w-auto", style: { fontSize: 'large' } }, "System Center:"),
|
88
|
+
React.createElement("form", null, workingRoles.map(function (scr, i, array) { return React.createElement(react_forms_1.CheckBox, { key: scr.ID, Record: scr, Field: 'Assigned', Label: scr.Name, Setter: function (record) {
|
89
|
+
scr.Assigned = record.Assigned;
|
90
|
+
var newArray = _.clone(array);
|
91
|
+
setWorkingRoles(newArray);
|
92
|
+
setChanged(true);
|
93
|
+
} }); })))),
|
94
|
+
React.createElement("div", { className: "col" }))),
|
95
|
+
React.createElement("div", { className: "card-footer" },
|
96
|
+
React.createElement("div", { className: "btn-group mr-2" },
|
97
|
+
React.createElement("button", { className: "btn btn-primary", onClick: function () {
|
98
|
+
return dispatch(props.RoleSlice.SetUserRoles({
|
99
|
+
UserId: props.UserID,
|
100
|
+
Roles: workingRoles.filter(function (scr) { return scr.Assigned; }).map(function (scr) { return ({ ID: '00000000-0000-0000-0000-000000000000', ApplicationRoleID: scr.ID, UserAccountID: props.UserID }); })
|
101
|
+
}));
|
102
|
+
}, disabled: !changed }, "Update")),
|
103
|
+
React.createElement("div", { className: "btn-group mr-2" },
|
104
|
+
React.createElement("button", { className: "btn btn-default", onClick: function () { return resetCurrentRoles(availableRoles, currentRoles); }, disabled: !changed }, "Reset")))));
|
105
|
+
}
|
106
|
+
exports.default = UserPermission;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gpa-gemstone/common-pages",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.105",
|
4
4
|
"description": "Common UI pages for GPA products",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"types": "lib/index.d.ts",
|
@@ -41,18 +41,19 @@
|
|
41
41
|
"jest": "^27.0.6",
|
42
42
|
"prettier": "^2.3.2",
|
43
43
|
"ts-jest": "^27.0.4",
|
44
|
-
"typescript": "
|
44
|
+
"typescript": "5.5.3"
|
45
45
|
},
|
46
46
|
"dependencies": {
|
47
|
-
"@gpa-gemstone/application-typings": "0.0.
|
48
|
-
"@gpa-gemstone/gpa-symbols": "0.0.
|
49
|
-
"@gpa-gemstone/helper-functions": "0.0.
|
50
|
-
"@gpa-gemstone/react-forms": "1.1.
|
51
|
-
"@gpa-gemstone/react-interactive": "1.0.
|
52
|
-
"@gpa-gemstone/react-table": "1.2.
|
47
|
+
"@gpa-gemstone/application-typings": "0.0.71",
|
48
|
+
"@gpa-gemstone/gpa-symbols": "0.0.35",
|
49
|
+
"@gpa-gemstone/helper-functions": "0.0.31",
|
50
|
+
"@gpa-gemstone/react-forms": "1.1.61",
|
51
|
+
"@gpa-gemstone/react-interactive": "1.0.120",
|
52
|
+
"@gpa-gemstone/react-table": "1.2.45",
|
53
53
|
"@reduxjs/toolkit": "1.8.3",
|
54
54
|
"crypto-js": "4.0.0",
|
55
55
|
"moment": "^2.29.4",
|
56
|
+
"moment-timezone": "0.5.43",
|
56
57
|
"react": "^18.2.0",
|
57
58
|
"react-redux": "8.0.2",
|
58
59
|
"styled-components": "5.3.3"
|