Remove non positive integer constraint on Nav Menu Item 2/2 (#18090)
Follow up https://github.com/twentyhq/twenty/pull/18081
This commit is contained in:
@@ -1045,7 +1045,7 @@ export type CreateNavigationMenuItemInput = {
|
||||
icon?: InputMaybe<Scalars['String']>;
|
||||
link?: InputMaybe<Scalars['String']>;
|
||||
name?: InputMaybe<Scalars['String']>;
|
||||
position?: InputMaybe<Scalars['Int']>;
|
||||
position?: InputMaybe<Scalars['Float']>;
|
||||
targetObjectMetadataId?: InputMaybe<Scalars['UUID']>;
|
||||
targetRecordId?: InputMaybe<Scalars['UUID']>;
|
||||
userWorkspaceId?: InputMaybe<Scalars['UUID']>;
|
||||
@@ -4590,7 +4590,7 @@ export type UpdateNavigationMenuItemInput = {
|
||||
icon?: InputMaybe<Scalars['String']>;
|
||||
link?: InputMaybe<Scalars['String']>;
|
||||
name?: InputMaybe<Scalars['String']>;
|
||||
position?: InputMaybe<Scalars['Int']>;
|
||||
position?: InputMaybe<Scalars['Float']>;
|
||||
};
|
||||
|
||||
export type UpdateObjectPayload = {
|
||||
|
||||
+4
-5
@@ -1,6 +1,6 @@
|
||||
import { Field, InputType, Int } from '@nestjs/graphql';
|
||||
import { Field, InputType } from '@nestjs/graphql';
|
||||
|
||||
import { IsInt, IsOptional, IsString, IsUUID, Min } from 'class-validator';
|
||||
import { IsNumber, IsOptional, IsString, IsUUID } from 'class-validator';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
|
||||
@@ -46,9 +46,8 @@ export class CreateNavigationMenuItemInput {
|
||||
@Field(() => UUIDScalarType, { nullable: true })
|
||||
folderId?: string;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
@Field(() => Int, { nullable: true })
|
||||
@Field({ nullable: true })
|
||||
position?: number;
|
||||
}
|
||||
|
||||
+4
-6
@@ -1,13 +1,12 @@
|
||||
import { Field, InputType, Int } from '@nestjs/graphql';
|
||||
import { Field, InputType } from '@nestjs/graphql';
|
||||
|
||||
import { Type } from 'class-transformer';
|
||||
import {
|
||||
IsInt,
|
||||
IsNotEmpty,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
Min,
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
|
||||
@@ -20,10 +19,9 @@ export class UpdateNavigationMenuItemInput {
|
||||
@Field(() => UUIDScalarType, { nullable: true })
|
||||
folderId?: string | null;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
@Field(() => Int, { nullable: true })
|
||||
@Field({ nullable: true })
|
||||
position?: number;
|
||||
|
||||
@IsOptional()
|
||||
|
||||
Reference in New Issue
Block a user