Remove old autobind. Teams page tweaks
This commit is contained in:
3
server/package-lock.json
generated
3
server/package-lock.json
generated
@@ -221,7 +221,8 @@
|
||||
"auto-bind2": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/auto-bind2/-/auto-bind2-1.0.3.tgz",
|
||||
"integrity": "sha512-+br9nya9M8ayHjai7m9rdpRxuEr8xcYRDrIp7HybNe0ixUHbc1kDiWXKMb0ldsfWb9Zi+SqJ9JfjW8nTkYD0QQ=="
|
||||
"integrity": "sha512-+br9nya9M8ayHjai7m9rdpRxuEr8xcYRDrIp7HybNe0ixUHbc1kDiWXKMb0ldsfWb9Zi+SqJ9JfjW8nTkYD0QQ==",
|
||||
"dev": true
|
||||
},
|
||||
"autobind-decorator": {
|
||||
"version": "2.1.0",
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
"dependencies": {
|
||||
"amqplib": "^0.5.1",
|
||||
"app-root-path": "^2.0.1",
|
||||
"auto-bind2": "^1.0.3",
|
||||
"autobind-decorator": "^2.1.0",
|
||||
"aws-sdk": "^2.98.0",
|
||||
"body-parser": "^1.17.1",
|
||||
|
||||
@@ -32,15 +32,15 @@ export class TeamList extends React.Component {
|
||||
return (
|
||||
<Column fillParent>
|
||||
<Column.Item grow>
|
||||
<List items={teams} render={(user, index) => {
|
||||
<List items={teams} render={(team, index) => {
|
||||
return (
|
||||
<List.Item key={user._id || '0'} onClick={(e) => (this.props.onTeamListClick(e, index))}
|
||||
active={user === this.props.selectedTeam}>
|
||||
<List.Icon name={user.administrator ? 'admin' : 'profile'} size={sizeInfo.listIcon} />
|
||||
<List.Item key={team._id || '0'} onClick={(e) => (this.props.onTeamListClick(e, index))}
|
||||
active={team === selectedTeam}>
|
||||
<List.Icon name='team' size={sizeInfo.listIcon} />
|
||||
<List.Text>
|
||||
{ user._id ? user.firstName + ' ' + user.lastName : '[New Team]' }
|
||||
{ team._id ? team.name : '[New Team]' }
|
||||
</List.Text>
|
||||
{ user === selectedTeam && selectionModified ? <List.Icon name='edit' size={sizeInfo.listIcon} /> : null }
|
||||
{ team === selectedTeam && selectionModified ? <List.Icon name='edit' size={sizeInfo.listIcon} /> : null }
|
||||
</List.Item>
|
||||
)
|
||||
}} />
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Teams extends Component {
|
||||
|
||||
api.listTeams().then((list) => {
|
||||
list.items.sort((teamA, teamB) => (teamA.lastName.localeCompare(teamB.lastName)))
|
||||
this.setState({ teams: list.items, selectedTeam: list.items[0] }) // TODO: <- Remove
|
||||
this.setState({ teams: list.items }) // TODO: <- Remove
|
||||
}).catch((error) => {
|
||||
this.setState({
|
||||
messageModal: {
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Users extends Component {
|
||||
|
||||
api.listUsers().then((list) => {
|
||||
list.items.sort((userA, userB) => (userA.lastName.localeCompare(userB.lastName)))
|
||||
this.setState({ users: list.items, selectedUser: list.items[0] }) // TODO: <- Remove
|
||||
this.setState({ users: list.items })
|
||||
}).catch((error) => {
|
||||
this.setState({
|
||||
messageModal: {
|
||||
|
||||
0
website/src/ui/BoundDropdownList.js
Normal file
0
website/src/ui/BoundDropdownList.js
Normal file
0
website/src/ui/BoundList.js
Normal file
0
website/src/ui/BoundList.js
Normal file
Reference in New Issue
Block a user