Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/object metadata item identifiers #2865

Merged
merged 7 commits into from
Dec 8, 2023

Conversation

lucasbordeau
Copy link
Contributor

  • Updated metadata graphql schema and fixed typing issues (with Enum => MultiSelect mostly)
  • Added seeds for identifier fields on company and person object metadata
  • Added a new hook to create a mapper to generate record identifier from a record

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left comments. Could you update the PR with main (it's also mixed with the previous one)

}) => {
return (record: any): ObjectRecordIdentifier => {
switch (objectMetadataItem.nameSingular) {
case CoreObjectNameSingular.WorkspaceMember:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be replaced by a dynamic computation:

  • workspaceMember case: for FullName field types: firstName + ' ' + lastName
  • opportunity: OK to keep it hardcoded, this is temporary and Opportunity will soon get their own name field

? getLogoUrlFromDomainName(imageIdentifierFieldValue ?? '')
: imageIdentifierFieldValue ?? null;

console.log({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log

@@ -0,0 +1,6 @@
export enum CoreObjectNameSingular {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@@ -74,7 +80,31 @@ export const seedObjectMetadata = async (
workspaceId: SeedWorkspaceId,
isActive: true,
isSystem: false,
labelIdentifierFieldMetadataId: SeedPersonFieldMetadataIds.Email,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you'll likely get conflict with @Weiko work here!

@charlesBochet charlesBochet merged commit e895464 into main Dec 8, 2023
9 of 13 checks passed
@charlesBochet charlesBochet deleted the feat/object-metadata-item-identifiers branch December 8, 2023 11:29
@charlesBochet charlesBochet mentioned this pull request Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants