mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
Removed creationDate & lastModifiedDate from Group; fixed flow issuses
This commit is contained in:
@@ -26,14 +26,6 @@ class Details extends React.Component<Props> {
|
||||
<td>{t("group.description")}</td>
|
||||
<td>{group.description}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{t("group.creationDate")}</td>
|
||||
<td>{new Date(group.creationDate).toString()}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{t("group.lastModified")}</td>
|
||||
<td>{new Date(group.lastModified).toString()}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{t("group.type")}</td>
|
||||
<td>{group.type}</td>
|
||||
|
||||
@@ -6,9 +6,11 @@ import { translate } from "react-i18next";
|
||||
import GroupForm from "./GroupForm";
|
||||
import { connect } from "react-redux";
|
||||
import { createGroup } from "../modules/groups";
|
||||
import type { Group } from "../types/Group";
|
||||
|
||||
export interface Props {
|
||||
t: string => string;
|
||||
createGroup: Group => void;
|
||||
}
|
||||
|
||||
export interface State {}
|
||||
|
||||
@@ -18,7 +18,18 @@ export interface State {
|
||||
class GroupForm extends React.Component<Props, State> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {};
|
||||
this.state = {
|
||||
group: {
|
||||
name: "",
|
||||
description: "",
|
||||
_embedded: {
|
||||
members: []
|
||||
},
|
||||
_links: {},
|
||||
members: [],
|
||||
type: "",
|
||||
}
|
||||
};
|
||||
}
|
||||
onSubmit = (event: Event) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -4,9 +4,7 @@ import type { User } from "../../users/types/User";
|
||||
|
||||
export type Group = {
|
||||
name: string,
|
||||
creationDate: string,
|
||||
description: string,
|
||||
lastModified: string,
|
||||
type: string,
|
||||
members: string[],
|
||||
_links: Links,
|
||||
|
||||
Reference in New Issue
Block a user