diff --git a/src/components/UserEdit.tsx b/src/components/UserEdit.tsx index 59a93252..7b6ee964 100644 --- a/src/components/UserEdit.tsx +++ b/src/components/UserEdit.tsx @@ -1,7 +1,7 @@ import { Badge, Breadcrumb, - Button, + Button, Card, Col, Divider, Form, @@ -33,6 +33,7 @@ import Column from "antd/lib/table/Column"; import {useOidcUser} from "@axa-fr/react-oidc"; const {Option} = Select; +const {Meta} = Card; const {Title, Paragraph, Text} = Typography; interface TokenDataTable extends PersonalAccessToken { @@ -208,14 +209,15 @@ const UserEdit = () => { } const transformTokenTable = (d: PersonalAccessToken[]): TokenDataTable[] => { - if(!d) { + if (!d) { return [] } return d.map(p => ({ key: p.id, status: Date.parse(p.expiration_date) > Date.now() ? "valid" : "expired", created_by_email: getEmail(p), - ...p} as TokenDataTable)) + ...p + } as TokenDataTable)) } const getEmail = (token: PersonalAccessToken): string => { @@ -271,8 +273,10 @@ const UserEdit = () => { useEffect(() => { if (user.is_current || user.is_service_user) { - dispatch(personalAccessTokenActions.getPersonalAccessTokens.request({getAccessTokenSilently: getTokenSilently, - payload: user.id})) + dispatch(personalAccessTokenActions.getPersonalAccessTokens.request({ + getAccessTokenSilently: getTokenSilently, + payload: user.id + })) } }, [user]) @@ -327,9 +331,14 @@ const UserEdit = () => { }, ]} /> - + +
- {user.name}
{ autoGroupsNames: formUser.autoGroupsNames, }} > - - {!user.is_service_user && - Email} - style={{marginRight: "70px"}} - > - - - } + + {!user.is_service_user && + + Email} + style={{marginRight: "70px"}} + > + + + } Role} + label={Role} style={{marginRight: "50px"}} > - Role - Set a role for the user to assign dashboard access permissions + Role + Set a role for the user to assign access permissions { {/**/} - {/* Auto-assigned groups*/} - {/* Add groups, that will be assigned to peers added by this user*/} + {/* Auto-assigned groups*/} + {/* Add groups, that will be assigned to peers added by this user*/} {/* { } width={460} > - + - {"Invite User"} + {"Invite user"} { > - Name - Set a name to easily identify the user + Name + Set a name to easily identify the user { - Email - Provide the email address of the user + Email + Provide the email address of the user { - Role - Set a role for the user to assign dashboard access permissions + Role + Set a role for the user to assign access permissions { - Auto-assigned groups - Add groups, that will be assigned to peers added by this user + Auto-assigned groups + Add groups, that will be assigned to peers added by this user