unified langs + added deletegroup component + renamed editgroup to general

This commit is contained in:
Florian Scholdei
2019-01-23 13:20:57 +01:00
parent 7160aa98f9
commit 5f7432c758
11 changed files with 90 additions and 77 deletions

View File

@@ -0,0 +1,29 @@
//@flow
import React from "react";
import { NavLink } from "@scm-manager/ui-components";
import { translate } from "react-i18next";
import type { Group } from "@scm-manager/ui-types";
type Props = {
t: string => string,
editUrl: string,
group: Group
};
type State = {};
class GeneralGroupNavLink extends React.Component<Props, State> {
render() {
const { t, editUrl } = this.props;
if (!this.isEditable()) {
return null;
}
return <NavLink label={t("singleGroup.menu.editNavLink")} to={editUrl} />;
}
isEditable = () => {
return this.props.group._links.update;
};
}
export default translate("groups")(GeneralGroupNavLink);