2016-12-15 16:10:36 +02:00
|
|
|
const React = require('react');
|
|
|
|
// const ReactIntl = require('react-intl');
|
|
|
|
const ReactRedux = require('react-redux');
|
|
|
|
// const ReactRouter = require('react-router');
|
|
|
|
|
2017-01-18 19:00:59 +02:00
|
|
|
const Row = require('@ui/components/row');
|
|
|
|
const Column= require('@ui/components/column');
|
|
|
|
const Button= require('@ui/components/button');
|
|
|
|
const PropTypes = require('@root/prop-types');
|
|
|
|
const PeopleList = require('@components/people-list');
|
|
|
|
const selectors = require('@state/selectors');
|
|
|
|
|
2016-12-20 21:06:02 +02:00
|
|
|
const Section = require('./section');
|
|
|
|
|
2016-12-15 16:10:36 +02:00
|
|
|
// const {
|
|
|
|
// FormattedMessage
|
|
|
|
// } = ReactIntl;
|
|
|
|
|
|
|
|
const {
|
|
|
|
connect
|
|
|
|
} = ReactRedux;
|
|
|
|
|
2017-01-18 19:00:59 +02:00
|
|
|
const {
|
|
|
|
peopleByOrgIdSelector
|
|
|
|
} = selectors;
|
|
|
|
|
|
|
|
const buttonStyle = {
|
|
|
|
float: 'right'
|
|
|
|
};
|
2016-12-15 16:10:36 +02:00
|
|
|
|
2016-12-20 21:06:02 +02:00
|
|
|
const People = (props) => {
|
2017-01-18 19:00:59 +02:00
|
|
|
|
|
|
|
const {
|
|
|
|
people = []
|
|
|
|
} = props;
|
|
|
|
|
2016-12-20 21:06:02 +02:00
|
|
|
return (
|
|
|
|
<Section {...props}>
|
2017-01-18 19:00:59 +02:00
|
|
|
<Row>
|
|
|
|
<Column smOffset={9} xs={2}>
|
|
|
|
<Button style={buttonStyle}>Invite</Button>
|
|
|
|
</Column>
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
<Row>
|
2017-01-20 17:21:38 +02:00
|
|
|
<Column xs={12}>
|
2017-01-18 19:00:59 +02:00
|
|
|
<PeopleList
|
|
|
|
people={people}
|
|
|
|
/>
|
|
|
|
</Column>
|
|
|
|
</Row>
|
2016-12-20 21:06:02 +02:00
|
|
|
</Section>
|
|
|
|
);
|
2016-12-15 16:10:36 +02:00
|
|
|
};
|
|
|
|
|
2017-01-18 19:00:59 +02:00
|
|
|
People.propTypes = {
|
|
|
|
people: React.PropTypes.arrayOf(PropTypes.person)
|
|
|
|
// toggleCollapsed: React.PropTypes.func
|
|
|
|
};
|
|
|
|
|
|
|
|
const mapStateToProps = (state, {
|
|
|
|
params = {}
|
|
|
|
}) => ({
|
|
|
|
people: peopleByOrgIdSelector(params.org)(state)
|
|
|
|
});
|
2016-12-15 16:10:36 +02:00
|
|
|
|
2017-01-18 19:00:59 +02:00
|
|
|
const mapDispatchToProps = (dispatch) => ({});
|
2016-12-15 16:10:36 +02:00
|
|
|
|
2017-01-18 19:00:59 +02:00
|
|
|
module.exports = connect(
|
|
|
|
mapStateToProps,
|
|
|
|
mapDispatchToProps
|
|
|
|
)(People);
|