Use AI assistant to create records in the system, added configurable list views

This commit is contained in:
Francisco Gaona
2026-01-31 03:24:46 +01:00
parent 20fc90a3fb
commit f68321c802
18 changed files with 3310 additions and 142 deletions

View File

@@ -1,4 +1,6 @@
import { IsString, IsUUID, IsBoolean, IsOptional, IsObject } from 'class-validator';
import { IsString, IsUUID, IsBoolean, IsOptional, IsObject, IsIn } from 'class-validator';
export type PageLayoutType = 'detail' | 'list';
export class CreatePageLayoutDto {
@IsString()
@@ -7,18 +9,25 @@ export class CreatePageLayoutDto {
@IsUUID()
objectId: string;
@IsIn(['detail', 'list'])
@IsOptional()
layoutType?: PageLayoutType = 'detail';
@IsBoolean()
@IsOptional()
isDefault?: boolean;
@IsObject()
layoutConfig: {
// For detail layouts: grid-based field positions
fields: Array<{
fieldId: string;
x: number;
y: number;
w: number;
h: number;
x?: number;
y?: number;
w?: number;
h?: number;
// For list layouts: field order (optional, defaults to array index)
order?: number;
}>;
relatedLists?: string[];
};
@@ -42,10 +51,11 @@ export class UpdatePageLayoutDto {
layoutConfig?: {
fields: Array<{
fieldId: string;
x: number;
y: number;
w: number;
h: number;
x?: number;
y?: number;
w?: number;
h?: number;
order?: number;
}>;
relatedLists?: string[];
};