feat: compatible with old kanban (#553)
* feat: compatible with old kanban * feat: replace KanbanV2 to Kanban
This commit is contained in:
parent
dbcbe6aea7
commit
44f23ca920
@ -83,14 +83,17 @@ const useAssociationNames = (collection) => {
|
||||
}
|
||||
const fieldSchema = useFieldSchema();
|
||||
const kanbanSchema = fieldSchema.reduceProperties((buf, schema) => {
|
||||
if (schema['x-component'] === 'KanbanV2') {
|
||||
if (schema['x-component'].startsWith('Kanban')) {
|
||||
return schema;
|
||||
}
|
||||
return buf;
|
||||
}, new Schema({}));
|
||||
const gridSchema: any = kanbanSchema?.properties?.card?.properties?.grid;
|
||||
const appends = [];
|
||||
recursiveProperties(gridSchema, 'CollectionField', associationFields, appends);
|
||||
if (gridSchema) {
|
||||
recursiveProperties(gridSchema, 'CollectionField', associationFields, appends);
|
||||
}
|
||||
|
||||
return uniq(appends);
|
||||
};
|
||||
|
||||
|
@ -99,7 +99,7 @@ export const KanbanCardDesigner = (props: any) => {
|
||||
{
|
||||
type: 'itemGroup',
|
||||
title: t('Display association fields'),
|
||||
children: useAssociatedFormItemInitializerFields({readPretty: true, block: 'KanbanV2'}),
|
||||
children: useAssociatedFormItemInitializerFields({readPretty: true, block: 'Kanban'}),
|
||||
},
|
||||
]}
|
||||
component={<MenuOutlined style={{ cursor: 'pointer', fontSize: 12 }} />}
|
||||
|
Loading…
Reference in New Issue
Block a user