Synchronization between Core Views and Workspace Views (#13461)

Closes https://github.com/twentyhq/core-team-issues/issues/1248

- Create listeners on each CRUD operation for all view related objects
and update the core views accordingly

Some fields have to be parsed since we changed the data model a little
bit when switching to core views.
This commit is contained in:
Raphaël Bosi
2025-07-28 14:41:27 +02:00
committed by GitHub
parent 400dd6d969
commit 7cf778b579
19 changed files with 1461 additions and 15 deletions
@@ -0,0 +1,12 @@
export type RelationFilterValue = {
isCurrentWorkspaceMemberSelected?: boolean;
selectedRecordIds: string[];
};
export type ViewFilterValue =
| string
| string[]
| RelationFilterValue
| Record<string, unknown>
| null
| undefined;
@@ -14,6 +14,7 @@ import {
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
import { ViewFilterValue } from 'src/engine/metadata-modules/view/types/view-filter-value.type';
import { View } from 'src/engine/metadata-modules/view/view.entity';
@Entity({ name: 'viewFilter', schema: 'core' })
@@ -31,7 +32,7 @@ export class ViewFilter {
operand: string;
@Column({ nullable: false, type: 'jsonb' })
value: JSON;
value: ViewFilterValue;
@Column({ nullable: true, type: 'uuid' })
viewFilterGroupId?: string | null;