Files
SCM-Manager/scm-ui/src/config/components/table/PermissionRoleTable.js

33 lines
740 B
JavaScript
Raw Normal View History

2019-05-08 09:34:07 +02:00
// @flow
import React from "react";
import { translate } from "react-i18next";
import type { Role } from "@scm-manager/ui-types";
type Props = {
t: string => string,
roles: Role[]
};
2019-05-08 13:13:50 +02:00
class PermissionRoleTable extends React.Component<Props> {
2019-05-08 09:34:07 +02:00
render() {
const { roles, t } = this.props;
return (
<table className="card-table table is-hoverable is-fullwidth">
<thead>
<tr>
2019-05-08 13:13:50 +02:00
<th>{t("role.form.name")}</th>
<th>{t("role.form.permissions")}</th>
2019-05-08 09:34:07 +02:00
</tr>
</thead>
<tbody>
{roles.map((role, index) => {
return <p key={index}>role</p>;
})}
</tbody>
</table>
);
}
}
2019-05-08 13:13:50 +02:00
export default translate("config")(PermissionRoleTable);