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>
|
</Chip>
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{events?.enabledEventTypes?.map((option) => (
|
{events?.enabledEventTypes?.map((option) => (
|
||||||
<SelectOption key={option} value={option} />
|
<SelectOption key={option} value={option}>
|
||||||
|
{t(`realm-settings:eventTypes.${option}.name`)}
|
||||||
|
</SelectOption>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
)}
|
)}
|
||||||
|
@ -435,7 +437,7 @@ export default function EventsSection() {
|
||||||
key={entry}
|
key={entry}
|
||||||
onClick={() => removeFilterValue(key, entry)}
|
onClick={() => removeFilterValue(key, entry)}
|
||||||
>
|
>
|
||||||
{entry}
|
{t(`realm-settings:eventTypes.${entry}.name`)}
|
||||||
</Chip>
|
</Chip>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -29,7 +29,8 @@ export function EventsTypeTable({
|
||||||
const { t } = useTranslation("realm-settings");
|
const { t } = useTranslation("realm-settings");
|
||||||
|
|
||||||
const data = eventTypes.map((type) => ({
|
const data = eventTypes.map((type) => ({
|
||||||
id: t(`eventTypes.${type}.name`),
|
id: type,
|
||||||
|
name: t(`eventTypes.${type}.name`),
|
||||||
description: t(`eventTypes.${type}.description`),
|
description: t(`eventTypes.${type}.description`),
|
||||||
}));
|
}));
|
||||||
return (
|
return (
|
||||||
|
@ -60,7 +61,7 @@ export function EventsTypeTable({
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
name: "id",
|
name: "name",
|
||||||
displayKey: "realm-settings:eventType",
|
displayKey: "realm-settings:eventType",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue