Replace newFieldDefaultConfiguration with newFieldDefaultVisibility (#18539)

https://github.com/user-attachments/assets/365092cb-0fe1-44f7-9ae6-c6fc5edb98b2

---------

Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
Baptiste Devessier
2026-03-11 13:14:30 +01:00
committed by GitHub
parent e4e7137660
commit ab5fb1f658
24 changed files with 843 additions and 1096 deletions
@@ -1,30 +1,16 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Type } from 'class-transformer';
import {
IsBoolean,
IsIn,
IsNotEmpty,
IsOptional,
IsUUID,
ValidateNested,
} from 'class-validator';
import { type FieldsConfiguration } from 'twenty-shared/types';
import { WidgetConfigurationType } from 'src/engine/metadata-modules/page-layout-widget/enums/widget-configuration-type.type';
@ObjectType('NewFieldDefaultConfiguration')
export class NewFieldDefaultConfigurationDTO {
@Field(() => Boolean)
@IsBoolean()
isVisible: boolean;
@Field(() => String, { nullable: true })
@IsOptional()
@IsUUID()
viewFieldGroupId: string | null;
}
@ObjectType('FieldsConfiguration')
export class FieldsConfigurationDTO implements FieldsConfiguration {
@Field(() => WidgetConfigurationType)
@@ -37,11 +23,10 @@ export class FieldsConfigurationDTO implements FieldsConfiguration {
@IsUUID()
viewId: string | null;
@Field(() => NewFieldDefaultConfigurationDTO, { nullable: true })
@Field(() => Boolean, { nullable: true })
@IsOptional()
@ValidateNested()
@Type(() => NewFieldDefaultConfigurationDTO)
newFieldDefaultConfiguration: NewFieldDefaultConfigurationDTO | null;
@IsBoolean()
newFieldDefaultVisibility: boolean | null;
@Field(() => Boolean, { nullable: true })
@IsOptional()