forked from Gitlink/forgeplus-react
change issues order by author and assigned_user
This commit is contained in:
parent
98a685f37a
commit
b6b8215d5b
|
@ -146,6 +146,7 @@ class order extends Component {
|
|||
};
|
||||
|
||||
getOption = (e, id, name) => {
|
||||
const { current_user } = this.props;
|
||||
this.setState({
|
||||
isSpin: true,
|
||||
});
|
||||
|
@ -156,6 +157,27 @@ class order extends Component {
|
|||
this.state.select_params[`${id}`] = option_id;
|
||||
this.state.select_params.page = 1;
|
||||
this.state[`${id}s`] = name;
|
||||
if(current_user){
|
||||
if(this.state.select_params.author_id && this.state.select_params.author_id === current_user.user_id){
|
||||
this.setState({
|
||||
author_ids: current_user.username,
|
||||
author_id: current_user.user_id
|
||||
});
|
||||
}else if(this.state.select_params.assigned_to_id && this.state.select_params.assigned_to_id === current_user.user_id){
|
||||
this.setState({
|
||||
assigned_to_ids: current_user.username,
|
||||
assigned_to_id: current_user.user_id
|
||||
});
|
||||
}else{
|
||||
this.setState({
|
||||
author_ids: "发布人",
|
||||
author_id: undefined,
|
||||
assigned_to_ids: "指派人",
|
||||
assigned_to_id: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.getIssueList();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue