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:
committed by
GitHub
parent
e4e7137660
commit
ab5fb1f658
+3
-18
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user