6aca1dd013
## Context Introduces a new viewFieldGroup entity that allows grouping view fields into sections (e.g. "General", "Additional", "Other") within a view. The page layout fields widget needs a way to organize fields into sections. Today, views have no concept of field grouping. This PR introduces the viewFieldGroup entity which sits between a view and its viewFields, enabling section-based organization. <img width="401" height="724" alt="Layout - V2 (customize visibility)" src="https://github.com/user-attachments/assets/6376e2ab-44db-42bf-9d2c-758f56f6b548" /> --------- Co-authored-by: Charles Bochet <charles@twenty.com>
46 lines
882 B
TypeScript
46 lines
882 B
TypeScript
import { Field, HideField, InputType } from '@nestjs/graphql';
|
|
|
|
import {
|
|
IsBoolean,
|
|
IsNotEmpty,
|
|
IsNumber,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
} from 'class-validator';
|
|
|
|
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
|
|
|
@InputType()
|
|
export class CreateViewFieldGroupInput {
|
|
@IsOptional()
|
|
@IsUUID()
|
|
@Field(() => UUIDScalarType, { nullable: true })
|
|
id?: string;
|
|
|
|
@IsNotEmpty()
|
|
@IsString()
|
|
@Field({ nullable: false })
|
|
name: string;
|
|
|
|
@IsUUID()
|
|
@Field(() => UUIDScalarType, { nullable: false })
|
|
viewId: string;
|
|
|
|
@IsOptional()
|
|
@IsNumber()
|
|
@Field({ nullable: true, defaultValue: 0 })
|
|
position?: number;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
@Field({ nullable: true, defaultValue: true })
|
|
isVisible?: boolean;
|
|
|
|
@HideField()
|
|
universalIdentifier?: string;
|
|
|
|
@HideField()
|
|
applicationId?: string;
|
|
}
|