Update Command Menu Item entity (#18391)
Closes https://github.com/twentyhq/core-team-issues/issues/2256
This commit is contained in:
+11
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
Field,
|
||||
Float,
|
||||
HideField,
|
||||
ObjectType,
|
||||
registerEnumType,
|
||||
@@ -10,6 +11,7 @@ import {
|
||||
IsDateString,
|
||||
IsEnum,
|
||||
IsNotEmpty,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
@@ -53,6 +55,15 @@ export class CommandMenuItemDTO {
|
||||
@Field({ nullable: true })
|
||||
icon?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
shortLabel?: string;
|
||||
|
||||
@IsNumber()
|
||||
@Field(() => Float)
|
||||
position: number;
|
||||
|
||||
@IsBoolean()
|
||||
@Field()
|
||||
isPinned: boolean;
|
||||
|
||||
+12
-1
@@ -1,9 +1,10 @@
|
||||
import { Field, InputType } from '@nestjs/graphql';
|
||||
import { Field, Float, InputType } from '@nestjs/graphql';
|
||||
|
||||
import {
|
||||
IsBoolean,
|
||||
IsEnum,
|
||||
IsNotEmpty,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
@@ -34,6 +35,16 @@ export class CreateCommandMenuItemInput {
|
||||
@Field({ nullable: true })
|
||||
icon?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
shortLabel?: string;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
@Field(() => Float, { nullable: true })
|
||||
position?: number;
|
||||
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
|
||||
+12
-1
@@ -1,9 +1,10 @@
|
||||
import { Field, InputType } from '@nestjs/graphql';
|
||||
import { Field, Float, InputType } from '@nestjs/graphql';
|
||||
|
||||
import {
|
||||
IsBoolean,
|
||||
IsEnum,
|
||||
IsNotEmpty,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
@@ -29,6 +30,16 @@ export class UpdateCommandMenuItemInput {
|
||||
@Field({ nullable: true })
|
||||
icon?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
shortLabel?: string;
|
||||
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
@Field(() => Float, { nullable: true })
|
||||
position?: number;
|
||||
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
|
||||
+7
-2
@@ -17,8 +17,7 @@ import { SyncableEntity } from 'src/engine/workspace-manager/types/syncable-enti
|
||||
|
||||
export enum CommandMenuItemAvailabilityType {
|
||||
GLOBAL = 'GLOBAL',
|
||||
SINGLE_RECORD = 'SINGLE_RECORD',
|
||||
BULK_RECORDS = 'BULK_RECORDS',
|
||||
RECORD_SELECTION = 'RECORD_SELECTION',
|
||||
}
|
||||
|
||||
@Entity({ name: 'commandMenuItem', schema: 'core' })
|
||||
@@ -63,6 +62,12 @@ export class CommandMenuItemEntity
|
||||
@Column({ nullable: true, type: 'varchar' })
|
||||
icon: string | null;
|
||||
|
||||
@Column({ nullable: true, type: 'varchar' })
|
||||
shortLabel: string | null;
|
||||
|
||||
@Column({ nullable: false, type: 'double precision', default: 0 })
|
||||
position: number;
|
||||
|
||||
@Column({ default: false })
|
||||
isPinned: boolean;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user