Add shortcut metadata to data models & CommandMenu (#7977)
Resolves https://github.com/twentyhq/twenty/issues/7503 --------- Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
@ -51,6 +51,11 @@ export class CreateObjectInput {
|
||||
@Field({ nullable: true })
|
||||
icon?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
shortcut?: string;
|
||||
|
||||
@HideField()
|
||||
dataSourceId: string;
|
||||
|
||||
|
||||
@ -53,6 +53,9 @@ export class ObjectMetadataDTO {
|
||||
@Field({ nullable: true })
|
||||
icon: string;
|
||||
|
||||
@Field({ nullable: true })
|
||||
shortcut: string;
|
||||
|
||||
@FilterableField()
|
||||
isCustom: boolean;
|
||||
|
||||
|
||||
@ -47,6 +47,11 @@ export class UpdateObjectPayload {
|
||||
@Field({ nullable: true })
|
||||
icon?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
shortcut?: string;
|
||||
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
|
||||
@ -69,6 +69,9 @@ export class ObjectMetadataEntity implements ObjectMetadataInterface {
|
||||
@Column({ default: true })
|
||||
isAuditLogged: boolean;
|
||||
|
||||
@Column({ nullable: true })
|
||||
shortcut: string;
|
||||
|
||||
@Column({ nullable: true, type: 'uuid' })
|
||||
labelIdentifierFieldMetadataId?: string | null;
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ interface WorkspaceEntityOptions {
|
||||
labelPlural: string;
|
||||
description?: string;
|
||||
icon?: string;
|
||||
shortcut?: string;
|
||||
labelIdentifierStandardId?: string;
|
||||
imageIdentifierStandardId?: string;
|
||||
}
|
||||
@ -44,6 +45,7 @@ export function WorkspaceEntity(
|
||||
options.labelIdentifierStandardId ?? BASE_OBJECT_STANDARD_FIELD_IDS.id,
|
||||
imageIdentifierStandardId: options.imageIdentifierStandardId ?? null,
|
||||
icon: options.icon,
|
||||
shortcut: options.shortcut,
|
||||
isAuditLogged,
|
||||
isSystem,
|
||||
gate,
|
||||
|
||||
@ -36,6 +36,11 @@ export interface WorkspaceEntityMetadataArgs {
|
||||
*/
|
||||
readonly icon?: string;
|
||||
|
||||
/**
|
||||
* Entity shortcut.
|
||||
*/
|
||||
readonly shortcut?: string;
|
||||
|
||||
/**
|
||||
* Is audit logged.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user