mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
add pro check for list departments (#4329)
This commit is contained in:
@@ -37,18 +37,20 @@ class TransferDialog extends React.Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
seafileAPI.listDepartments().then((res) => {
|
||||
for (let i = 0 ; i < res.data.length; i++) {
|
||||
let obj = {};
|
||||
obj.value = res.data[i].name;
|
||||
obj.email = res.data[i].email;
|
||||
obj.label = res.data[i].name;
|
||||
this.options.push(obj);
|
||||
}
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
});
|
||||
if (isPro) {
|
||||
seafileAPI.listDepartments().then((res) => {
|
||||
for (let i = 0 ; i < res.data.length; i++) {
|
||||
let obj = {};
|
||||
obj.value = res.data[i].name;
|
||||
obj.email = res.data[i].email;
|
||||
obj.label = res.data[i].name;
|
||||
this.options.push(obj);
|
||||
}
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onClick = () => {
|
||||
|
Reference in New Issue
Block a user