mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 11:51:27 +00:00
Fix transfer group or repo bug (#6934)
* 01 fix transfer repo to other user * 02 fix transfer group to other users * 03 group no repo style
This commit is contained in:
@@ -5,6 +5,7 @@ import { gettext } from '../../utils/constants';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import UserSelect from '../user-select';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import toaster from '../toast';
|
||||
|
||||
import '../../css/transfer-group-dialog.css';
|
||||
|
||||
@@ -34,10 +35,15 @@ class TransferGroupDialog extends React.Component {
|
||||
};
|
||||
|
||||
transferGroup = () => {
|
||||
const email = this.state.selectedOption && this.state.selectedOption.email;
|
||||
let selectedOption = this.state.selectedOption;
|
||||
let email;
|
||||
if (selectedOption && selectedOption[0]) {
|
||||
email = selectedOption[0].email;
|
||||
}
|
||||
if (email) {
|
||||
seafileAPI.transferGroup(this.props.groupID, email).then((res) => {
|
||||
this.props.toggleTransferGroupDialog();
|
||||
toaster.success(gettext('Group has been transfered'));
|
||||
}).catch((error) => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
this.setState({ errMessage: errMessage });
|
||||
|
Reference in New Issue
Block a user