Update favorites query and state to work with new backend (#2520)

* wip

* wip

* adding favorite works in the database

* favorites are showing in the left drawer

* update favoorite NavItem link

* wip

* adding favorite works

* everything seems to work

* fix delete bug

* fix update favorite position

* update Favorite type

* Fix

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
bosiraphael
2023-11-15 16:17:50 +01:00
committed by GitHub
parent f49ddec2f6
commit 1fc3124d1e
14 changed files with 317 additions and 192 deletions

View File

@ -11,6 +11,7 @@ export enum SeedFavoriteFieldMetadataIds {
WorkspaceMember = '20202020-1138-4e93-bbff-917a68161abf',
Person = '20202020-0876-4735-8974-ff4d51aafa07',
Company = '20202020-09e1-4384-ae3e-39e7956396fe',
CompanyV2 = '20202020-09e1-4384-ae3e-39e7956396ff',
}
export const seedFavoriteFieldMetadata = async (
@ -86,7 +87,7 @@ export const seedFavoriteFieldMetadata = async (
},
description: 'Favorite person',
icon: 'IconUser',
isNullable: false,
isNullable: true,
},
{
id: SeedFavoriteFieldMetadataIds.Company,
@ -102,7 +103,7 @@ export const seedFavoriteFieldMetadata = async (
},
description: 'Favorite company',
icon: 'IconBuildingSkyscraper',
isNullable: false,
isNullable: true,
},
])
.execute();

View File

@ -105,7 +105,7 @@ export const seedPersonFieldMetadata = async (
isCustom: false,
workspaceId: SeedWorkspaceId,
isActive: true,
type: 'URL',
type: 'TEXT',
name: 'linkedinUrl',
label: 'Linkedin',
targetColumnMap: {
@ -121,7 +121,7 @@ export const seedPersonFieldMetadata = async (
isCustom: false,
workspaceId: SeedWorkspaceId,
isActive: true,
type: 'URL',
type: 'TEXT',
name: 'xUrl',
label: 'X',
targetColumnMap: {