[WIP] Whole FE migrated (#2517)

* Wip

* WIP

* Removed concole log

* Add relations to workspace init (#2511)

* Add relations to workspace init

* remove logs

* update prefill

* add missing isSystem

* comment relation fields

* Migrate v2 core models to graphql schema (#2509)

* migrate v2 core models to graphql schema

* Migrate to new workspace member schema

* Continue work

* migrated-main

* Finished accountOwner nested field integration on companies

* Introduce bug

* Fix

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
Charles Bochet
2023-11-15 15:46:06 +01:00
committed by GitHub
parent 1f49ed2acf
commit 6129444c5c
129 changed files with 3468 additions and 1497 deletions

View File

@ -0,0 +1,160 @@
const workspaceMemberMetadata = {
nameSingular: 'workspaceMemberV2',
namePlural: 'workspaceMembersV2',
labelSingular: 'Workspace Member',
labelPlural: 'Workspace Members',
targetTableName: 'workspaceMember',
description: 'A workspace member',
icon: 'IconUserCircle',
isActive: true,
isSystem: true,
fields: [
{
isCustom: false,
isActive: true,
type: 'TEXT',
name: 'firstName',
label: 'First name',
targetColumnMap: {
value: 'firstName',
},
description: 'Workspace member first name',
icon: 'IconCircleUser',
isNullable: false,
},
{
isCustom: false,
isActive: true,
type: 'TEXT',
name: 'lastName',
label: 'Last name',
targetColumnMap: {
value: 'lastName',
},
description: 'Workspace member last name',
icon: 'IconCircleUser',
isNullable: false,
},
{
isCustom: false,
isActive: true,
type: 'UUID',
name: 'userId',
label: 'User Id',
targetColumnMap: {
value: 'userId',
},
description: 'Associated User Id',
icon: 'IconCircleUsers',
isNullable: false,
},
{
isCustom: false,
isActive: true,
type: 'BOOLEAN',
name: 'allowImpersonation',
label: 'Admin Access',
targetColumnMap: {
value: 'allowImpersonation',
},
description: 'Allow Admin Access',
icon: 'IconEye',
isNullable: false,
},
{
isCustom: false,
isActive: true,
type: 'TEXT',
name: 'colorScheme',
label: 'Color Scheme',
targetColumnMap: {
value: 'colorScheme',
},
description: 'Preferred color scheme',
icon: 'IconColorSwatch',
isNullable: false,
},
{
isCustom: false,
isActive: true,
type: 'TEXT',
name: 'locale',
label: 'Language',
targetColumnMap: {
value: 'locale',
},
description: 'Preferred language',
icon: 'IconLanguage',
isNullable: false,
},
// Relations
{
isCustom: false,
isActive: true,
type: 'RELATION',
name: 'authoredActivities',
label: 'Authored activities',
targetColumnMap: {},
description: 'Activities created by the workspace member',
icon: 'IconCheckbox',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: 'RELATION',
name: 'assignedActivities',
label: 'Assigned activities',
targetColumnMap: {},
description: 'Activities assigned to the workspace member',
icon: 'IconCheckbox',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: 'RELATION',
name: 'favorites',
label: 'Favorites',
targetColumnMap: {},
description: 'Favorites linked to the workspace member',
icon: 'IconHeart',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: 'RELATION',
name: 'accountOwnerForCompanies',
label: 'Account Owner For Companies',
targetColumnMap: {},
description: 'Account owner for companies',
icon: 'IconBriefcase',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: 'RELATION',
name: 'authoredAttachments',
label: 'Authored attachments',
targetColumnMap: {},
description: 'Attachments created by the workspace member',
icon: 'IconFileImport',
isNullable: true,
},
{
isCustom: false,
isActive: true,
type: 'RELATION',
name: 'authoredComments',
label: 'Authored comments',
targetColumnMap: {},
description: 'Authored comments',
icon: 'IconComment',
isNullable: true,
},
],
};
export default workspaceMemberMetadata;