forked from Gitlink/forgeplus-react
change order.js getOption methods
This commit is contained in:
parent
8c7cb56c9a
commit
4168db36d1
|
@ -154,21 +154,19 @@ class order extends Component {
|
||||||
this.state.select_params[`${id}`] = option_id;
|
this.state.select_params[`${id}`] = option_id;
|
||||||
this.state.select_params.page = 1;
|
this.state.select_params.page = 1;
|
||||||
this.state[`${id}s`] = name;
|
this.state[`${id}s`] = name;
|
||||||
if(current_user){
|
if (current_user) {
|
||||||
if(this.state.select_params.author_id && (parseInt(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;
|
this.state.author_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)){
|
} else {
|
||||||
|
this.state.author_id = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
this.state.assigned_to_id = current_user.user_id;
|
||||||
}else{
|
} else {
|
||||||
this.setState({
|
this.state.assigned_to_id = undefined;
|
||||||
author_id: undefined,
|
|
||||||
assigned_to_id: undefined
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("author_id", this.state.author_id)
|
|
||||||
console.log("assigned_to_id", this.state.assigned_to_id)
|
|
||||||
|
|
||||||
this.getIssueList();
|
this.getIssueList();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue