authscape-usermanagement 1.0.5 → 1.0.6
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/index.js +5 -4
- package/package.json +1 -1
- package/src/UserEditor.js +7 -3
- package/src/UserManagement.js +2 -3
package/index.js
CHANGED
|
@@ -411,7 +411,7 @@ function UserEditor(_ref) {
|
|
|
411
411
|
while (1) switch (_context5.prev = _context5.next) {
|
|
412
412
|
case 0:
|
|
413
413
|
userCustomFields = [];
|
|
414
|
-
customFields.forEach(function (customField) {
|
|
414
|
+
customFields && customFields.forEach(function (customField) {
|
|
415
415
|
userCustomFields.push({
|
|
416
416
|
name: customField.name,
|
|
417
417
|
value: data[customField.name]
|
|
@@ -468,7 +468,7 @@ function UserEditor(_ref) {
|
|
|
468
468
|
paddingRight: 2,
|
|
469
469
|
paddingTop: 2
|
|
470
470
|
}
|
|
471
|
-
}, renderSystemField(fields), renderCustomField(customFields)), tabValue === 1 && /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
471
|
+
}, renderSystemField(fields), customFields != null && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, renderCustomField(customFields))), tabValue === 1 && /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
472
472
|
spacing: 2,
|
|
473
473
|
sx: {
|
|
474
474
|
paddingLeft: 2,
|
|
@@ -699,7 +699,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
699
699
|
Object.defineProperty(exports, "__esModule", {
|
|
700
700
|
value: true
|
|
701
701
|
});
|
|
702
|
-
exports
|
|
702
|
+
exports["default"] = UserManagement;
|
|
703
703
|
var _react = _interopRequireWildcard(require("react"));
|
|
704
704
|
var _system = require("@mui/system");
|
|
705
705
|
var _material = require("@mui/material");
|
|
@@ -792,7 +792,8 @@ function UserManagement(_ref) {
|
|
|
792
792
|
}];
|
|
793
793
|
return /*#__PURE__*/_react["default"].createElement(_system.Box, null, /*#__PURE__*/_react["default"].createElement(_system.Box, {
|
|
794
794
|
sx: {
|
|
795
|
-
textAlign: "right"
|
|
795
|
+
textAlign: "right",
|
|
796
|
+
paddingBottom: 2
|
|
796
797
|
}
|
|
797
798
|
}, /*#__PURE__*/_react["default"].createElement(_material.Button, {
|
|
798
799
|
variant: "contained",
|
package/package.json
CHANGED
package/src/UserEditor.js
CHANGED
|
@@ -350,7 +350,7 @@ export function UserEditor({userId = null, customFields = null, onSaved = null})
|
|
|
350
350
|
|
|
351
351
|
let userCustomFields = [];
|
|
352
352
|
|
|
353
|
-
customFields.forEach(customField => {
|
|
353
|
+
customFields && customFields.forEach(customField => {
|
|
354
354
|
|
|
355
355
|
userCustomFields.push({
|
|
356
356
|
name: customField.name,
|
|
@@ -395,8 +395,12 @@ export function UserEditor({userId = null, customFields = null, onSaved = null})
|
|
|
395
395
|
<Grid spacing={2} sx={{paddingLeft:2, paddingRight:2, paddingTop:2}}>
|
|
396
396
|
|
|
397
397
|
{renderSystemField(fields)}
|
|
398
|
-
|
|
399
|
-
|
|
398
|
+
|
|
399
|
+
{customFields != null &&
|
|
400
|
+
<>
|
|
401
|
+
{renderCustomField(customFields)}
|
|
402
|
+
</>
|
|
403
|
+
}
|
|
400
404
|
</Grid>
|
|
401
405
|
}
|
|
402
406
|
|
package/src/UserManagement.js
CHANGED
|
@@ -11,7 +11,7 @@ import DialogContentText from '@mui/material/DialogContentText';
|
|
|
11
11
|
import DialogTitle from '@mui/material/DialogTitle';
|
|
12
12
|
import { EditableDatagrid, FileUploader } from 'authscape';
|
|
13
13
|
|
|
14
|
-
export function UserManagement({customFields = null, onUploadCompleted = null}) {
|
|
14
|
+
export default function UserManagement({customFields = null, onUploadCompleted = null}) {
|
|
15
15
|
|
|
16
16
|
const [showUserDetails, setShowUserDetails] = useState(null);
|
|
17
17
|
|
|
@@ -73,7 +73,7 @@ export function UserManagement({customFields = null, onUploadCompleted = null})
|
|
|
73
73
|
return (
|
|
74
74
|
<Box>
|
|
75
75
|
|
|
76
|
-
<Box sx={{textAlign:"right"}}>
|
|
76
|
+
<Box sx={{textAlign:"right", paddingBottom:2}}>
|
|
77
77
|
<Button variant="contained" sx={{width:200}} onClick={async () => {
|
|
78
78
|
|
|
79
79
|
setShowUserDetails(-1);
|
|
@@ -97,7 +97,6 @@ export function UserManagement({customFields = null, onUploadCompleted = null})
|
|
|
97
97
|
// invoiceId: invoiceId
|
|
98
98
|
}}
|
|
99
99
|
onRowClick={(row) => {
|
|
100
|
-
|
|
101
100
|
setShowUserDetails(row.id);
|
|
102
101
|
}} />
|
|
103
102
|
|