mirror of
https://github.com/plankanban/planka.git
synced 2025-07-22 22:59:44 +02:00
fix: Little improvements in users modal
This commit is contained in:
parent
78669da01d
commit
d80a538857
2 changed files with 13 additions and 4 deletions
|
@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
||||||
import { Button, Icon, Radio, Table } from 'semantic-ui-react';
|
import { Button, Icon, Radio, Table } from 'semantic-ui-react';
|
||||||
|
|
||||||
import ActionsPopup from './ActionsPopup';
|
import ActionsPopup from './ActionsPopup';
|
||||||
|
import User from '../../User';
|
||||||
|
|
||||||
import styles from './Item.module.scss';
|
import styles from './Item.module.scss';
|
||||||
|
|
||||||
|
@ -11,6 +12,7 @@ const Item = React.memo(
|
||||||
email,
|
email,
|
||||||
username,
|
username,
|
||||||
name,
|
name,
|
||||||
|
avatarUrl,
|
||||||
organization,
|
organization,
|
||||||
phone,
|
phone,
|
||||||
isAdmin,
|
isAdmin,
|
||||||
|
@ -34,13 +36,16 @@ const Item = React.memo(
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
|
<Table.Cell>
|
||||||
|
<User name={name} avatarUrl={avatarUrl} />
|
||||||
|
</Table.Cell>
|
||||||
<Table.Cell>{name}</Table.Cell>
|
<Table.Cell>{name}</Table.Cell>
|
||||||
<Table.Cell>{username || '-'}</Table.Cell>
|
<Table.Cell>{username || '-'}</Table.Cell>
|
||||||
<Table.Cell>{email}</Table.Cell>
|
<Table.Cell>{email}</Table.Cell>
|
||||||
<Table.Cell collapsing>
|
<Table.Cell>
|
||||||
<Radio toggle checked={isAdmin} onChange={handleIsAdminChange} />
|
<Radio toggle checked={isAdmin} onChange={handleIsAdminChange} />
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell collapsing>
|
<Table.Cell textAlign="right">
|
||||||
<ActionsPopup
|
<ActionsPopup
|
||||||
user={{
|
user={{
|
||||||
email,
|
email,
|
||||||
|
@ -76,6 +81,7 @@ Item.propTypes = {
|
||||||
email: PropTypes.string.isRequired,
|
email: PropTypes.string.isRequired,
|
||||||
username: PropTypes.string,
|
username: PropTypes.string,
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
|
avatarUrl: PropTypes.string,
|
||||||
organization: PropTypes.string,
|
organization: PropTypes.string,
|
||||||
phone: PropTypes.string,
|
phone: PropTypes.string,
|
||||||
isAdmin: PropTypes.bool.isRequired,
|
isAdmin: PropTypes.bool.isRequired,
|
||||||
|
@ -96,6 +102,7 @@ Item.propTypes = {
|
||||||
|
|
||||||
Item.defaultProps = {
|
Item.defaultProps = {
|
||||||
username: undefined,
|
username: undefined,
|
||||||
|
avatarUrl: undefined,
|
||||||
organization: undefined,
|
organization: undefined,
|
||||||
phone: undefined,
|
phone: undefined,
|
||||||
};
|
};
|
||||||
|
|
|
@ -84,10 +84,11 @@ const UsersModal = React.memo(
|
||||||
context: 'title',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Content>
|
<Modal.Content scrolling>
|
||||||
<Table basic="very">
|
<Table unstackable basic="very">
|
||||||
<Table.Header>
|
<Table.Header>
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
|
<Table.HeaderCell />
|
||||||
<Table.HeaderCell width={4}>{t('common.name')}</Table.HeaderCell>
|
<Table.HeaderCell width={4}>{t('common.name')}</Table.HeaderCell>
|
||||||
<Table.HeaderCell width={4}>{t('common.username')}</Table.HeaderCell>
|
<Table.HeaderCell width={4}>{t('common.username')}</Table.HeaderCell>
|
||||||
<Table.HeaderCell width={4}>{t('common.email')}</Table.HeaderCell>
|
<Table.HeaderCell width={4}>{t('common.email')}</Table.HeaderCell>
|
||||||
|
@ -102,6 +103,7 @@ const UsersModal = React.memo(
|
||||||
email={item.email}
|
email={item.email}
|
||||||
username={item.username}
|
username={item.username}
|
||||||
name={item.name}
|
name={item.name}
|
||||||
|
avatarUrl={item.avatarUrl}
|
||||||
organization={item.organization}
|
organization={item.organization}
|
||||||
phone={item.phone}
|
phone={item.phone}
|
||||||
isAdmin={item.isAdmin}
|
isAdmin={item.isAdmin}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue