mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 14:35:45 +01:00
Implemented editing of users
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
// @flow
|
||||
import React from "react";
|
||||
import UserRow from "./UserRow";
|
||||
import { editUser } from "../modules/users";
|
||||
import type { User } from "../types/User";
|
||||
|
||||
type Props = {
|
||||
entries: [{ loading: boolean, error: Error, user: User }],
|
||||
deleteUser: string => void
|
||||
deleteUser: string => void,
|
||||
editUser: User => void
|
||||
};
|
||||
|
||||
class UserTable extends React.Component<Props> {
|
||||
render() {
|
||||
const { deleteUser } = this.props;
|
||||
const { deleteUser, editUser } = this.props;
|
||||
const entries = this.props.entries;
|
||||
return (
|
||||
<table>
|
||||
@@ -25,7 +27,12 @@ class UserTable extends React.Component<Props> {
|
||||
<tbody>
|
||||
{entries.map((entry, index) => {
|
||||
return (
|
||||
<UserRow key={index} entry={entry} deleteUser={deleteUser} />
|
||||
<UserRow
|
||||
key={index}
|
||||
entry={entry}
|
||||
deleteUser={deleteUser}
|
||||
editUser={editUser}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user