mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 01:44:13 +00:00
Fix create wiki with department owner name (#6400)
* 01 fix add wiki department id change to email * 02 fix wiki with same name
This commit is contained in:
@@ -10,7 +10,7 @@ import { SeahubSelect } from '../common/select';
|
||||
const propTypes = {
|
||||
toggleCancel: PropTypes.func.isRequired,
|
||||
addWiki: PropTypes.func.isRequired,
|
||||
currentDeptID: PropTypes.string,
|
||||
currentDeptEmail: PropTypes.string,
|
||||
};
|
||||
|
||||
class AddWikiDialog extends React.Component {
|
||||
@@ -36,12 +36,13 @@ class AddWikiDialog extends React.Component {
|
||||
let obj = {};
|
||||
obj.value = departments[i].name;
|
||||
obj.id = departments[i].id;
|
||||
obj.email = departments[i].email;
|
||||
obj.label = departments[i].name;
|
||||
options.push(obj);
|
||||
}
|
||||
this.setState({ options });
|
||||
if (this.props.currentDeptID) {
|
||||
const selectedOption = options.find(op => op.id == this.props.currentDeptID);
|
||||
if (this.props.currentDeptEmail) {
|
||||
const selectedOption = options.find(op => op.email == this.props.currentDeptEmail);
|
||||
this.setState({ selectedOption });
|
||||
}
|
||||
}).catch(error => {
|
||||
|
Reference in New Issue
Block a user