mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 22:20:06 +02:00
adding callback to add member dispatch function and allowing for member not on system to be created
This commit is contained in:
parent
2c61693c21
commit
61db98e842
@ -46,7 +46,11 @@ const Invite = React.createClass({
|
|||||||
parentIndex: this.props.parentIndex,
|
parentIndex: this.props.parentIndex,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.props.addMemember(data);
|
this.props.addMemember(data, () => {
|
||||||
|
this.setState({
|
||||||
|
selectValue: ''
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -88,8 +92,9 @@ const Invite = React.createClass({
|
|||||||
<Row>
|
<Row>
|
||||||
<Column xs={12}>
|
<Column xs={12}>
|
||||||
<form onSubmit={this.handleSubmit}>
|
<form onSubmit={this.handleSubmit}>
|
||||||
<Select
|
<Select.Creatable
|
||||||
onChange={handleSelectChange}
|
onChange={handleSelectChange}
|
||||||
|
onNewOptionClick={handleSelectChange}
|
||||||
options={selectData}
|
options={selectData}
|
||||||
placeholder="Enter an email address or password"
|
placeholder="Enter an email address or password"
|
||||||
style={InputStyle}
|
style={InputStyle}
|
||||||
|
@ -44,7 +44,8 @@ const mapStateToProps = (state, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
addMemember: (member) => dispatch(addMemberToOrg(member)),
|
addMemember: (member, callback) =>
|
||||||
|
dispatch(addMemberToOrg(member, callback)),
|
||||||
handleToggle: () => dispatch(orgHandleInviteToggle()),
|
handleToggle: () => dispatch(orgHandleInviteToggle()),
|
||||||
handleStatusTooltip: (id) => dispatch(orgHandlePeopleStatusTooltip(id)),
|
handleStatusTooltip: (id) => dispatch(orgHandlePeopleStatusTooltip(id)),
|
||||||
handleRoleTooltip: (id) => dispatch(orgHandlePeopleRoleTooltip(id)),
|
handleRoleTooltip: (id) => dispatch(orgHandlePeopleRoleTooltip(id)),
|
||||||
|
@ -44,7 +44,8 @@ const mapStateToProps = (state, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
addMemember: (member) => dispatch(addMemberToProject(member)),
|
addMemember: (member, callback) =>
|
||||||
|
dispatch(addMemberToProject(member, callback)),
|
||||||
handleToggle: () => dispatch(projectHandleInviteToggle()),
|
handleToggle: () => dispatch(projectHandleInviteToggle()),
|
||||||
handleStatusTooltip: (id) => dispatch(projectHandlePeopleStatusTooltip(id)),
|
handleStatusTooltip: (id) => dispatch(projectHandlePeopleStatusTooltip(id)),
|
||||||
handleRoleTooltip: (id) => dispatch(projectHandlePeopleRoleTooltip(id)),
|
handleRoleTooltip: (id) => dispatch(projectHandlePeopleRoleTooltip(id)),
|
||||||
|
Loading…
Reference in New Issue
Block a user