Fix: Persist hide empty groups setting on backend (BREAKING: deploy server first) (#16385)

Closes #13754 and [core team issue
#414](https://github.com/twentyhq/core-team-issues/issues/414)
This commit is contained in:
Abdul Rahman
2025-12-10 19:10:29 +05:30
committed by GitHub
parent 20f2ca6864
commit 1839f8e946
22 changed files with 119 additions and 19 deletions
@@ -59,6 +59,11 @@ export class CreateViewInput {
@Field({ nullable: true, defaultValue: false })
isCompact?: boolean;
@IsOptional()
@IsBoolean()
@Field({ nullable: true, defaultValue: false })
shouldHideEmptyGroups?: boolean;
@IsOptional()
@IsEnum(ViewOpenRecordIn)
@Field(() => ViewOpenRecordIn, {
@@ -92,4 +92,9 @@ export class UpdateViewInput {
@IsUUID()
@Field(() => UUIDScalarType, { nullable: true })
mainGroupByFieldMetadataId?: string | null;
@IsOptional()
@IsBoolean()
@Field({ nullable: true })
shouldHideEmptyGroups?: boolean;
}
@@ -65,6 +65,9 @@ export class ViewDTO {
@Field(() => UUIDScalarType, { nullable: true })
mainGroupByFieldMetadataId?: string | null;
@Field({ nullable: false, defaultValue: false })
shouldHideEmptyGroups: boolean;
@Field(() => UUIDScalarType, { nullable: true })
calendarFieldMetadataId?: string | null;
@@ -152,6 +152,9 @@ export class ViewEntity extends SyncableEntity implements Required<ViewEntity> {
@JoinColumn({ name: 'mainGroupByFieldMetadataId' })
mainGroupByFieldMetadata: Relation<FieldMetadataEntity>;
@Column({ nullable: false, default: false, type: 'boolean' })
shouldHideEmptyGroups: boolean;
@Column({ nullable: false, type: 'uuid' })
workspaceId: string;