1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 02:10:24 +00:00

[org admin - departments] redesigned it (#6070)

This commit is contained in:
llj
2024-05-12 08:17:02 +08:00
committed by GitHub
parent d62a566e20
commit 67e09a4295
19 changed files with 1198 additions and 986 deletions

View File

@@ -10,7 +10,7 @@ const propTypes = {
groupName: PropTypes.string,
groupID: PropTypes.number.isRequired,
toggle: PropTypes.func.isRequired,
onDepartChanged: PropTypes.func.isRequired
onDeleteDepartment: PropTypes.func.isRequired
};
class DeleteDepartDialog extends React.Component {
@@ -20,9 +20,10 @@ class DeleteDepartDialog extends React.Component {
}
deleteDepart = () => {
const { groupID } = this.props;
this.props.toggle();
seafileAPI.orgAdminDeleteDepartGroup(orgID, this.props.groupID).then((res) => {
this.props.onDepartChanged();
seafileAPI.orgAdminDeleteDepartGroup(orgID, groupID).then((res) => {
this.props.onDeleteDepartment(groupID);
}).catch(error => {
let errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);