1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 00:43:53 +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

@@ -9,7 +9,7 @@ import toaster from '../toast';
const propTypes = {
toggle: PropTypes.func.isRequired,
groupID: PropTypes.number.isRequired,
onDepartChanged: PropTypes.func.isRequired,
onSetQuota: PropTypes.func.isRequired,
};
class SetGroupQuotaDialog extends React.Component {
@@ -30,7 +30,7 @@ class SetGroupQuotaDialog extends React.Component {
let newQuota = this.state.quota == -2 ? this.state.quota : this.state.quota * 1000000;
seafileAPI.orgAdminSetGroupQuota(orgID, this.props.groupID, newQuota).then((res) => {
this.props.toggle();
this.props.onDepartChanged();
this.props.onSetQuota(res.data);
}).catch(error => {
let errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);
@@ -74,6 +74,7 @@ class SetGroupQuotaDialog extends React.Component {
{ this.state.errMessage && <p className="error">{this.state.errMessage}</p> }
</ModalBody>
<ModalFooter>
<Button color="secondary" onClick={this.props.toggle}>{gettext('Cancel')}</Button>
<Button color="primary" onClick={this.setGroupQuota}>{gettext('Submit')}</Button>
</ModalFooter>
</Modal>