1
0
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:
Leo
2019-12-02 11:56:46 +08:00
committed by Daniel Pan
parent d81d05ea2a
commit 0dfc17ce2c
2 changed files with 18 additions and 12 deletions

View File

@@ -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 = () => {