use event id instead of name (#20109)
* use id instead of name to add event * "translated" ids to name
This commit is contained in:
parent
d1ab921c50
commit
e50580c465
2 changed files with 8 additions and 5 deletions
|
@ -312,14 +312,16 @@ export default function EventsSection() {
|
|||
);
|
||||
}}
|
||||
>
|
||||
{chip}
|
||||
{t(`realm-settings:eventTypes.${chip}.name`)}
|
||||
</Chip>
|
||||
))}
|
||||
</ChipGroup>
|
||||
}
|
||||
>
|
||||
{events?.enabledEventTypes?.map((option) => (
|
||||
<SelectOption key={option} value={option} />
|
||||
<SelectOption key={option} value={option}>
|
||||
{t(`realm-settings:eventTypes.${option}.name`)}
|
||||
</SelectOption>
|
||||
))}
|
||||
</Select>
|
||||
)}
|
||||
|
@ -435,7 +437,7 @@ export default function EventsSection() {
|
|||
key={entry}
|
||||
onClick={() => removeFilterValue(key, entry)}
|
||||
>
|
||||
{entry}
|
||||
{t(`realm-settings:eventTypes.${entry}.name`)}
|
||||
</Chip>
|
||||
))
|
||||
)}
|
||||
|
|
|
@ -29,7 +29,8 @@ export function EventsTypeTable({
|
|||
const { t } = useTranslation("realm-settings");
|
||||
|
||||
const data = eventTypes.map((type) => ({
|
||||
id: t(`eventTypes.${type}.name`),
|
||||
id: type,
|
||||
name: t(`eventTypes.${type}.name`),
|
||||
description: t(`eventTypes.${type}.description`),
|
||||
}));
|
||||
return (
|
||||
|
@ -60,7 +61,7 @@ export function EventsTypeTable({
|
|||
}
|
||||
columns={[
|
||||
{
|
||||
name: "id",
|
||||
name: "name",
|
||||
displayKey: "realm-settings:eventType",
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue