Add workspace favorites behind feature flag (#6904)
- make member nullable on favorites - add potential relation with view entity - add a new type of favorite list in front : workspace favorite - build a new component for retrieving workspace favorite to display + refacto the existing one Bonus: - removing activities seed since this is deprecated
This commit is contained in:
@ -4,7 +4,6 @@ import { v4 } from 'uuid';
|
||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
||||
import { activitiesAllView } from 'src/engine/workspace-manager/standard-objects-prefill-data/views/activities-all.view';
|
||||
import { companiesAllView } from 'src/engine/workspace-manager/standard-objects-prefill-data/views/companies-all.view';
|
||||
import { notesAllView } from 'src/engine/workspace-manager/standard-objects-prefill-data/views/notes-all.view';
|
||||
import { opportunitiesAllView } from 'src/engine/workspace-manager/standard-objects-prefill-data/views/opportunities-all.view';
|
||||
@ -30,7 +29,6 @@ export const viewPrefillData = async (
|
||||
await peopleAllView(objectMetadataMap),
|
||||
await opportunitiesAllView(objectMetadataMap),
|
||||
await opportunitiesByStageView(objectMetadataMap),
|
||||
await activitiesAllView(objectMetadataMap),
|
||||
await notesAllView(objectMetadataMap),
|
||||
await tasksAllView(objectMetadataMap),
|
||||
await tasksByStatusView(objectMetadataMap),
|
||||
@ -128,4 +126,6 @@ export const viewPrefillData = async (
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
|
||||
return viewDefinitionsWithId;
|
||||
};
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
||||
import {
|
||||
ACTIVITY_STANDARD_FIELD_IDS,
|
||||
BASE_OBJECT_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 activitiesAllView = async (
|
||||
objectMetadataMap: Record<string, ObjectMetadataEntity>,
|
||||
) => {
|
||||
return {
|
||||
name: 'All',
|
||||
objectMetadataId: objectMetadataMap[STANDARD_OBJECT_IDS.activity].id,
|
||||
type: 'table',
|
||||
key: 'INDEX',
|
||||
position: 1,
|
||||
icon: 'IconList',
|
||||
kanbanFieldMetadataId: '',
|
||||
filters: [],
|
||||
fields: [
|
||||
{
|
||||
fieldMetadataId:
|
||||
objectMetadataMap[STANDARD_OBJECT_IDS.activity].fields[
|
||||
ACTIVITY_STANDARD_FIELD_IDS.title
|
||||
],
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
size: 210,
|
||||
},
|
||||
{
|
||||
fieldMetadataId:
|
||||
objectMetadataMap[STANDARD_OBJECT_IDS.activity].fields[
|
||||
ACTIVITY_STANDARD_FIELD_IDS.type
|
||||
],
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
},
|
||||
{
|
||||
fieldMetadataId:
|
||||
objectMetadataMap[STANDARD_OBJECT_IDS.activity].fields[
|
||||
ACTIVITY_STANDARD_FIELD_IDS.body
|
||||
],
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
size: 150,
|
||||
},
|
||||
{
|
||||
fieldMetadataId:
|
||||
objectMetadataMap[STANDARD_OBJECT_IDS.activity].fields[
|
||||
BASE_OBJECT_STANDARD_FIELD_IDS.createdAt
|
||||
],
|
||||
position: 0,
|
||||
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.activity].fields[
|
||||
BASE_OBJECT_STANDARD_FIELD_IDS.updatedAt
|
||||
],
|
||||
position: 0,
|
||||
isVisible: true,
|
||||
size: 210,
|
||||
},
|
||||
*/
|
||||
],
|
||||
};
|
||||
};
|
||||
@ -203,6 +203,7 @@ export const FAVORITE_STANDARD_FIELD_IDS = {
|
||||
workflow: '20202020-b11b-4dc8-999a-6bd0a947b463',
|
||||
task: '20202020-1b1b-4b3b-8b1b-7f8d6a1d7d5c',
|
||||
note: '20202020-1f25-43fe-8b00-af212fdde824',
|
||||
view: '20202020-5a93-4fa9-acce-e73481a0bbdf',
|
||||
custom: '20202020-855a-4bc8-9861-79deef37011f',
|
||||
};
|
||||
|
||||
@ -380,6 +381,7 @@ export const VIEW_STANDARD_FIELD_IDS = {
|
||||
viewFields: '20202020-542b-4bdc-b177-b63175d48edf',
|
||||
viewFilters: '20202020-ff23-4154-b63c-21fb36cd0967',
|
||||
viewSorts: '20202020-891b-45c3-9fe1-80a75b4aa043',
|
||||
favorites: '20202020-c818-4a86-8284-9ec0ef0a59a5',
|
||||
};
|
||||
|
||||
export const WEBHOOK_STANDARD_FIELD_IDS = {
|
||||
|
||||
Reference in New Issue
Block a user