feat: add organization context select box for admin (#2013)

* feat: organization as context

* feat: organization as context with backend filtration

* Update app.conf

* update app.conf and hide organization select for mobile.

---------

Co-authored-by: dplynsky <dplynsky@ptsecurity.com>
Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
Denis Plynskiy
2023-06-29 20:32:34 +03:00
committed by GitHub
parent 91cb5f393a
commit eee9b8b9fe
46 changed files with 207 additions and 76 deletions

View File

@ -427,6 +427,7 @@ class OrganizationEditPage extends React.Component {
this.setState({
organizationName: this.state.organization.name,
});
window.dispatchEvent(new Event(Conf.StorageOrganizationsChangedEvent));
if (willExist) {
this.props.history.push("/organizations");
@ -448,6 +449,7 @@ class OrganizationEditPage extends React.Component {
.then((res) => {
if (res.status === "ok") {
this.props.history.push("/organizations");
window.dispatchEvent(new Event(Conf.StorageOrganizationsChangedEvent));
} else {
Setting.showMessage("error", `${i18next.t("general:Failed to delete")}: ${res.msg}`);
}