-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
lucasbordeau
commented
Dec 7, 2023
- 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
There was a problem hiding this 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: |
There was a problem hiding this comment.
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({ |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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!