mirror of
https://github.com/hexastack/hexabot
synced 2024-11-27 22:42:11 +00:00
fix(frontend): add contentEntity normalization logic
This commit is contained in:
parent
d169bdbe92
commit
b3426e3f50
@ -165,8 +165,8 @@ export const Contents = () => {
|
||||
field: "entity",
|
||||
headerName: t("label.entity"),
|
||||
flex: 1,
|
||||
valueGetter: (row: IContent) => {
|
||||
const contentType = getEntityFromCache(row.id);
|
||||
valueGetter: (entityId) => {
|
||||
const contentType = getEntityFromCache(entityId);
|
||||
|
||||
return contentType?.name;
|
||||
},
|
||||
|
@ -164,10 +164,14 @@ export const ContentTypeEntity = new schema.Entity(
|
||||
},
|
||||
);
|
||||
|
||||
export const ContentEntity = new schema.Entity(EntityType.CONTENT, undefined, {
|
||||
idAttribute: ({ id }) => id,
|
||||
processStrategy: processCommonStrategy,
|
||||
});
|
||||
export const ContentEntity = new schema.Entity(
|
||||
EntityType.CONTENT,
|
||||
{ entity: ContentTypeEntity },
|
||||
{
|
||||
idAttribute: ({ id }) => id,
|
||||
processStrategy: processCommonStrategy,
|
||||
},
|
||||
);
|
||||
|
||||
export const SettingEntity = new schema.Entity(EntityType.SETTING, {
|
||||
idAttribute: ({ id }) => id,
|
||||
|
Loading…
Reference in New Issue
Block a user