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:
+1
@@ -14,4 +14,5 @@ export const FLAT_VIEW_EDITABLE_PROPERTIES = [
|
||||
'calendarFieldMetadataId',
|
||||
'visibility',
|
||||
'mainGroupByFieldMetadataId',
|
||||
'shouldHideEmptyGroups',
|
||||
] as const satisfies (keyof FlatView)[];
|
||||
|
||||
+1
@@ -52,6 +52,7 @@ export const fromCreateViewInputToFlatViewToCreate = ({
|
||||
calendarLayout: createViewInput.calendarLayout ?? null,
|
||||
icon: createViewInput.icon,
|
||||
isCompact: createViewInput.isCompact ?? false,
|
||||
shouldHideEmptyGroups: createViewInput.shouldHideEmptyGroups ?? false,
|
||||
kanbanAggregateOperation: createViewInput.kanbanAggregateOperation ?? null,
|
||||
kanbanAggregateOperationFieldMetadataId:
|
||||
createViewInput.kanbanAggregateOperationFieldMetadataId ?? null,
|
||||
|
||||
+5
@@ -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, {
|
||||
|
||||
+5
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user