change issues sort by user and compare user with current_user

This commit is contained in:
sylor_huang@126.com 2020-05-20 09:22:12 +08:00
parent 037d85b6b7
commit 8c7cb56c9a
1 changed files with 2 additions and 5 deletions

View File

@ -151,16 +151,13 @@ class order extends Component {
isSpin: true,
});
let option_id = e.key === "all" ? undefined : e.key;
// this.setState({
// ["${id}s"]: name,
// });
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){
if(this.state.select_params.author_id && (parseInt(this.state.select_params.author_id) === current_user.user_id)){
this.state.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){
}else if(this.state.select_params.assigned_to_id && (parseInt(this.state.select_params.assigned_to_id) === current_user.user_id)){
this.state.assigned_to_id = current_user.user_id;
}else{
this.setState({