50c912d57f
Fixes #7113 --------- Co-authored-by: Weiko <corentin@twenty.com>
81 lines
2.2 KiB
TypeScript
81 lines
2.2 KiB
TypeScript
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
|
import {
|
|
BASE_OBJECT_STANDARD_FIELD_IDS,
|
|
NOTE_STANDARD_FIELD_IDS,
|
|
} from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
|
|
import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
|
|
|
|
export const notesAllView = (
|
|
objectMetadataMap: Record<string, ObjectMetadataEntity>,
|
|
) => {
|
|
return {
|
|
name: 'All Notes',
|
|
objectMetadataId: objectMetadataMap[STANDARD_OBJECT_IDS.note].id,
|
|
type: 'table',
|
|
key: 'INDEX',
|
|
position: 0,
|
|
icon: 'IconNotes',
|
|
kanbanFieldMetadataId: '',
|
|
filters: [],
|
|
fields: [
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.note].fields[
|
|
NOTE_STANDARD_FIELD_IDS.title
|
|
],
|
|
position: 0,
|
|
isVisible: true,
|
|
size: 210,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.note].fields[
|
|
NOTE_STANDARD_FIELD_IDS.noteTargets
|
|
],
|
|
position: 1,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.note].fields[
|
|
NOTE_STANDARD_FIELD_IDS.body
|
|
],
|
|
position: 2,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.note].fields[
|
|
NOTE_STANDARD_FIELD_IDS.createdBy
|
|
],
|
|
position: 3,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.note].fields[
|
|
BASE_OBJECT_STANDARD_FIELD_IDS.createdAt
|
|
],
|
|
position: 4,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
/*
|
|
TODO: Add later, since we don't have real-time it probably doesn't work well?
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.note].fields[
|
|
BASE_OBJECT_STANDARD_FIELD_IDS.updatedAt
|
|
],
|
|
position: 0,
|
|
isVisible: true,
|
|
size: 210,
|
|
},
|
|
*/
|
|
],
|
|
};
|
|
};
|