Feat/filter available field definition v2 (#2547)
* Added react-dev-inspector * Add field relation type parsing and filter available fields for record table and show page * Revert "Added react-dev-inspector" This reverts commit 7a78964c2c3996ce2e27f6f8d0c0b5e1f3283e17.
This commit is contained in:
@ -109,7 +109,9 @@ export const usePersistField = () => {
|
||||
variables: {
|
||||
where: { id: entityId },
|
||||
data: {
|
||||
[fieldName]: valueToPersist?.id ?? null,
|
||||
// TODO: find a more elegant way to do this ?
|
||||
// Maybe have a link between the RELATION field and the UUID field ?
|
||||
[`${fieldName}Id`]: valueToPersist?.id ?? null,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@ -4,6 +4,11 @@ import { AvatarType } from '@/users/components/Avatar';
|
||||
import { FieldMetadata } from './FieldMetadata';
|
||||
import { FieldType } from './FieldType';
|
||||
|
||||
export type FieldDefinitionRelationType =
|
||||
| 'TO_ONE_OBJECT'
|
||||
| 'FROM_NAMY_OBJECTS'
|
||||
| 'TO_MANY_OBJECTS';
|
||||
|
||||
export type FieldDefinition<T extends FieldMetadata> = {
|
||||
fieldMetadataId: string;
|
||||
label: string;
|
||||
@ -17,4 +22,5 @@ export type FieldDefinition<T extends FieldMetadata> = {
|
||||
pictureUrl?: string;
|
||||
avatarType: AvatarType;
|
||||
};
|
||||
relationType?: FieldDefinitionRelationType;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user