add missing props

This commit is contained in:
Florian Scholdei
2019-05-17 15:43:48 +02:00
parent 4d5a86fdb4
commit 358819ca61
7 changed files with 30 additions and 21 deletions

View File

@@ -7,7 +7,9 @@ import injectSheet from "react-jss";
type Props = {
role: RepositoryRole,
// context props
classes: any,
t: string => string
};

View File

@@ -4,7 +4,7 @@ import { translate } from "react-i18next";
import type { RepositoryRole } from "@scm-manager/ui-types";
import ExtensionPoint from "@scm-manager/ui-extensions/lib/ExtensionPoint";
import PermissionRoleDetailsTable from "./PermissionRoleDetailsTable";
import { Button, Subtitle } from "@scm-manager/ui-components";
import { Button } from "@scm-manager/ui-components";
type Props = {
role: RepositoryRole,

View File

@@ -6,6 +6,7 @@ import AvailableVerbs from "./AvailableVerbs";
type Props = {
role: RepositoryRole,
// context props
t: string => string
};
@@ -16,18 +17,18 @@ class PermissionRoleDetailsTable extends React.Component<Props> {
return (
<table className="table content">
<tbody>
<tr>
<th>{t("repositoryRole.name")}</th>
<td>{role.name}</td>
</tr>
<tr>
<th>{t("repositoryRole.type")}</th>
<td>{role.type}</td>
</tr>
<tr>
<th>{t("repositoryRole.verbs")}</th>
<AvailableVerbs role={role} />
</tr>
<tr>
<th>{t("repositoryRole.name")}</th>
<td>{role.name}</td>
</tr>
<tr>
<th>{t("repositoryRole.type")}</th>
<td>{role.type}</td>
</tr>
<tr>
<th>{t("repositoryRole.verbs")}</th>
<AvailableVerbs role={role} />
</tr>
</tbody>
</table>
);

View File

@@ -8,6 +8,7 @@ type Props = {
baseUrl: string,
roles: RepositoryRole[],
// context props
t: string => string
};
@@ -17,16 +18,16 @@ class PermissionRoleTable extends React.Component<Props> {
return (
<table className="card-table table is-hoverable is-fullwidth">
<thead>
<tr>
<th>{t("repositoryRole.form.name")}</th>
</tr>
<tr>
<th>{t("repositoryRole.form.name")}</th>
</tr>
</thead>
<tbody>
{roles.map((role, index) => {
return (
<PermissionRoleRow key={index} baseUrl={baseUrl} role={role} />
);
})}
{roles.map((role, index) => {
return (
<PermissionRoleRow key={index} baseUrl={baseUrl} role={role} />
);
})}
</tbody>
</table>
);

View File

@@ -6,6 +6,8 @@ import { translate } from "react-i18next";
type Props = {
system?: boolean,
// context props
classes: any,
t: string => string
};

View File

@@ -15,11 +15,13 @@ import {
getRepositoryRolesLink,
getRepositoryVerbsLink
} from "../../../modules/indexResource";
import type {History} from "history";
type Props = {
disabled: boolean,
repositoryRolesLink: string,
error?: Error,
history: History,
//dispatch function
addRole: (link: string, role: RepositoryRole, callback?: () => void) => void,

View File

@@ -36,6 +36,7 @@ type Props = {
// context objects
t: string => string,
history: History,
location: any,
// dispatch functions
fetchRolesByPage: (link: string, page: number) => void