mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
Move the MemberNameTable component to the scm-ui project to be used in combination with the Autocomplete component
This commit is contained in:
@@ -2,8 +2,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { translate } from "react-i18next";
|
import { translate } from "react-i18next";
|
||||||
import {
|
import {
|
||||||
RemoveEntryOfTableButton,
|
RemoveEntryOfTableButton
|
||||||
LabelWithHelpIcon
|
|
||||||
} from "@scm-manager/ui-components";
|
} from "@scm-manager/ui-components";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -19,10 +18,6 @@ class MemberNameTable extends React.Component<Props, State> {
|
|||||||
const { t } = this.props;
|
const { t } = this.props;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<LabelWithHelpIcon
|
|
||||||
label={t("group.members")}
|
|
||||||
helpText={t("group-form.help.memberHelpText")}
|
|
||||||
/>
|
|
||||||
<table className="table is-hoverable is-fullwidth">
|
<table className="table is-hoverable is-fullwidth">
|
||||||
<tbody>
|
<tbody>
|
||||||
{this.props.members.map(member => {
|
{this.props.members.map(member => {
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
export { default as AddEntryToTableField } from "./AddEntryToTableField.js";
|
export { default as AddEntryToTableField } from "./AddEntryToTableField.js";
|
||||||
export { default as AutocompleteAddEntryToTableField } from "./AutocompleteAddEntryToTableField.js";
|
export { default as AutocompleteAddEntryToTableField } from "./AutocompleteAddEntryToTableField.js";
|
||||||
|
export { default as MemberNameTable } from "./MemberNameTable.js";
|
||||||
export { default as Checkbox } from "./Checkbox.js";
|
export { default as Checkbox } from "./Checkbox.js";
|
||||||
export { default as InputField } from "./InputField.js";
|
export { default as InputField } from "./InputField.js";
|
||||||
export { default as Select } from "./Select.js";
|
export { default as Select } from "./Select.js";
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import React from "react";
|
|||||||
import { translate } from "react-i18next";
|
import { translate } from "react-i18next";
|
||||||
import {
|
import {
|
||||||
AutocompleteAddEntryToTableField,
|
AutocompleteAddEntryToTableField,
|
||||||
|
LabelWithHelpIcon,
|
||||||
|
MemberNameTable,
|
||||||
InputField,
|
InputField,
|
||||||
SubmitButton,
|
SubmitButton,
|
||||||
Textarea
|
Textarea
|
||||||
@@ -10,7 +12,6 @@ import {
|
|||||||
import type { Group, SelectValue } from "@scm-manager/ui-types";
|
import type { Group, SelectValue } from "@scm-manager/ui-types";
|
||||||
|
|
||||||
import * as validator from "./groupValidation";
|
import * as validator from "./groupValidation";
|
||||||
import MemberNameTable from "./MemberNameTable";
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
t: string => string,
|
t: string => string,
|
||||||
@@ -97,6 +98,10 @@ class GroupForm extends React.Component<Props, State> {
|
|||||||
validationError={false}
|
validationError={false}
|
||||||
helpText={t("group-form.help.descriptionHelpText")}
|
helpText={t("group-form.help.descriptionHelpText")}
|
||||||
/>
|
/>
|
||||||
|
<LabelWithHelpIcon
|
||||||
|
label={t("group.members")}
|
||||||
|
helpText={t("group-form.help.memberHelpText")}
|
||||||
|
/>
|
||||||
<MemberNameTable
|
<MemberNameTable
|
||||||
members={group.members}
|
members={group.members}
|
||||||
memberListChanged={this.memberListChanged}
|
memberListChanged={this.memberListChanged}
|
||||||
|
|||||||
Reference in New Issue
Block a user