mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
added component for comma separated lists
This commit is contained in:
@@ -104,5 +104,8 @@
|
||||
"community": "Community",
|
||||
"enterprise": "Enterprise"
|
||||
}
|
||||
},
|
||||
"commaSeparatedList": {
|
||||
"lastDivider": "und"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,5 +105,8 @@
|
||||
"community": "Community",
|
||||
"enterprise": "Enterprise"
|
||||
}
|
||||
},
|
||||
"commaSeparatedList": {
|
||||
"lastDivider": "and"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,5 +89,8 @@
|
||||
"passwordConfirmFailed": "Las contraseñas deben ser identicas",
|
||||
"submit": "Guardar",
|
||||
"changedSuccessfully": "Contraseña cambiada correctamente"
|
||||
},
|
||||
"commaSeparatedList": {
|
||||
"lastDivider": "y"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import { Changeset } from "@scm-manager/ui-types";
|
||||
import styled from "styled-components";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useBinder } from "@scm-manager/ui-extensions";
|
||||
import { Image } from "@scm-manager/ui-components";
|
||||
import { Image, CommaSeparatedList } from "@scm-manager/ui-components";
|
||||
|
||||
type Props = {
|
||||
changeset: Changeset;
|
||||
@@ -104,14 +104,14 @@ const ContributorTable: FC<Props> = ({ changeset }) => {
|
||||
</td>
|
||||
</tr>
|
||||
{getTrailersByType().map(trailer => (
|
||||
<tr>
|
||||
<tr key={trailer.type}>
|
||||
<SizedTd>{t("changeset.trailer.type." + trailer.type) + ":"}</SizedTd>
|
||||
<td className="shorten-text is-marginless">
|
||||
{trailer.persons
|
||||
.map(person => (
|
||||
<Contributor person={person} />
|
||||
))
|
||||
.reduce((prev, curr) => [prev, ", ", curr])}
|
||||
<CommaSeparatedList>
|
||||
{trailer.persons.map(person => (
|
||||
<Contributor key={person.name} person={person} />
|
||||
))}
|
||||
</CommaSeparatedList>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user