@boarteam/boar-pack-users-frontend 3.1.5 → 3.2.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boarteam/boar-pack-users-frontend",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Users frontend package for Boar Pack",
|
|
5
5
|
"repository": "git@github.com:boarteam/boar-pack.git",
|
|
6
6
|
"author": "Andrew Balakirev <balakirev.andrey@gmail.com>",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@ant-design/plots": "^2.3.2",
|
|
18
|
-
"@boarteam/boar-pack-common-frontend": "^3.
|
|
18
|
+
"@boarteam/boar-pack-common-frontend": "^3.3.1",
|
|
19
19
|
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
20
20
|
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
|
21
21
|
"@umijs/max": "^4.1.10",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"build": "tsc --project tsconfig.build.json",
|
|
35
35
|
"yalc:push": "yalc push"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "24af6c68291709061a07202da02789783b26f56e"
|
|
38
38
|
}
|
|
@@ -23,9 +23,11 @@ type TUserFilterParams = {
|
|
|
23
23
|
|
|
24
24
|
export const UsersTable = ({
|
|
25
25
|
permissionsConfig = [],
|
|
26
|
+
renderPermissions,
|
|
26
27
|
userPageUrlPrefix = '/admin/users',
|
|
27
28
|
}: {
|
|
28
29
|
permissionsConfig?: PermissionsConfig;
|
|
30
|
+
renderPermissions?: (user: User) => React.ReactNode;
|
|
29
31
|
userPageUrlPrefix?: string | null;
|
|
30
32
|
}) => {
|
|
31
33
|
const columns = useUsersColumns({
|
|
@@ -67,10 +69,12 @@ export const UsersTable = ({
|
|
|
67
69
|
expandable={{
|
|
68
70
|
// hide expandable icon for new records which are not saved yet, since you can't set permissions for them
|
|
69
71
|
rowExpandable: record => !isRecordNew(record),
|
|
70
|
-
expandedRowRender:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
expandedRowRender: renderPermissions
|
|
73
|
+
? record => <>{renderPermissions(record)}</>
|
|
74
|
+
: record => <PermissionsList
|
|
75
|
+
user={record}
|
|
76
|
+
permissionsConfig={permissionsConfig}
|
|
77
|
+
/>,
|
|
74
78
|
}}
|
|
75
79
|
viewOnly={!canManageAll}
|
|
76
80
|
editable={{
|