Navbar customization improvements (#17863)
- Add folder icon editing support - And other navbar customization fixes/improvements. --------- Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Devessier <baptiste@devessier.fr> Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
+2
-1
@@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`ALL_UNIVERSAL_FLAT_ENTITY_PROPERTIES_TO_COMPARE_AND_STRINGIFY should match snapshot 1`] = `
|
||||
{
|
||||
@@ -103,6 +103,7 @@ exports[`ALL_UNIVERSAL_FLAT_ENTITY_PROPERTIES_TO_COMPARE_AND_STRINGIFY should ma
|
||||
"folderUniversalIdentifier",
|
||||
"name",
|
||||
"link",
|
||||
"icon",
|
||||
],
|
||||
"propertiesToStringify": [],
|
||||
},
|
||||
|
||||
+1
@@ -1019,6 +1019,7 @@ export const ALL_ENTITY_PROPERTIES_CONFIGURATION_BY_METADATA_NAME = {
|
||||
},
|
||||
name: { toCompare: true, toStringify: false, universalProperty: undefined },
|
||||
link: { toCompare: true, toStringify: false, universalProperty: undefined },
|
||||
icon: { toCompare: true, toStringify: false, universalProperty: undefined },
|
||||
createdAt: {
|
||||
toCompare: false,
|
||||
toStringify: false,
|
||||
|
||||
+1
@@ -5,4 +5,5 @@ export const FLAT_NAVIGATION_MENU_ITEM_EDITABLE_PROPERTIES = [
|
||||
'folderId',
|
||||
'name',
|
||||
'link',
|
||||
'icon',
|
||||
] as const satisfies MetadataEntityPropertyName<'navigationMenuItem'>[];
|
||||
|
||||
+1
@@ -81,6 +81,7 @@ export const fromCreateNavigationMenuItemInputToFlatNavigationMenuItemToCreate =
|
||||
folderUniversalIdentifier,
|
||||
name: createNavigationMenuItemInput.name ?? null,
|
||||
link: createNavigationMenuItemInput.link ?? null,
|
||||
icon: createNavigationMenuItemInput.icon ?? null,
|
||||
position,
|
||||
workspaceId,
|
||||
applicationId: flatApplication.id,
|
||||
|
||||
+1
@@ -13,6 +13,7 @@ export const fromFlatNavigationMenuItemToNavigationMenuItemDto = (
|
||||
folderId: flatNavigationMenuItem.folderId ?? undefined,
|
||||
name: flatNavigationMenuItem.name ?? undefined,
|
||||
link: flatNavigationMenuItem.link ?? undefined,
|
||||
icon: flatNavigationMenuItem.icon ?? undefined,
|
||||
position: flatNavigationMenuItem.position,
|
||||
workspaceId: flatNavigationMenuItem.workspaceId,
|
||||
applicationId: flatNavigationMenuItem.applicationId ?? undefined,
|
||||
|
||||
+1
@@ -82,6 +82,7 @@ export const fromNavigationMenuItemEntityToFlatNavigationMenuItem = ({
|
||||
folderId: navigationMenuItemEntity.folderId,
|
||||
name: navigationMenuItemEntity.name,
|
||||
link: navigationMenuItemEntity.link,
|
||||
icon: navigationMenuItemEntity.icon,
|
||||
position: navigationMenuItemEntity.position,
|
||||
workspaceId: navigationMenuItemEntity.workspaceId,
|
||||
universalIdentifier: navigationMenuItemEntity.universalIdentifier,
|
||||
|
||||
+5
@@ -36,6 +36,11 @@ export class CreateNavigationMenuItemInput {
|
||||
@Field(() => String, { nullable: true })
|
||||
link?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Field(() => String, { nullable: true })
|
||||
icon?: string | null;
|
||||
|
||||
@IsUUID()
|
||||
@IsOptional()
|
||||
@Field(() => UUIDScalarType, { nullable: true })
|
||||
|
||||
+4
@@ -47,6 +47,10 @@ export class NavigationMenuItemDTO {
|
||||
@Field(() => String, { nullable: true })
|
||||
link?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@Field(() => String, { nullable: true })
|
||||
icon?: string | null;
|
||||
|
||||
@IsUUID()
|
||||
@IsOptional()
|
||||
@Field(() => UUIDScalarType, { nullable: true })
|
||||
|
||||
+5
@@ -35,6 +35,11 @@ export class UpdateNavigationMenuItemInput {
|
||||
@IsString()
|
||||
@Field(() => String, { nullable: true })
|
||||
link?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Field(() => String, { nullable: true })
|
||||
icon?: string | null;
|
||||
}
|
||||
|
||||
@InputType()
|
||||
|
||||
+3
@@ -84,6 +84,9 @@ export class NavigationMenuItemEntity
|
||||
@Column({ nullable: true, type: 'text' })
|
||||
link: string | null;
|
||||
|
||||
@Column({ nullable: true, type: 'text' })
|
||||
icon: string | null;
|
||||
|
||||
@ManyToOne(() => NavigationMenuItemEntity, {
|
||||
onDelete: 'CASCADE',
|
||||
nullable: true,
|
||||
|
||||
+2
-1
@@ -898,8 +898,9 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt
|
||||
folderId: null,
|
||||
folderUniversalIdentifier: null,
|
||||
name: null,
|
||||
position: nextPosition,
|
||||
link: null,
|
||||
icon: null,
|
||||
position: nextPosition,
|
||||
workspaceId,
|
||||
applicationId: workspaceCustomApplicationId,
|
||||
applicationUniversalIdentifier:
|
||||
|
||||
Reference in New Issue
Block a user