feat: created by email calendar (#6536)
This PR is a followup of #6324 to add support of EMAIL and CALENDAR source for the created by composite field.
This commit is contained in:
12
packages/twenty-server/src/utils/compute-display-name.ts
Normal file
12
packages/twenty-server/src/utils/compute-display-name.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { FullNameMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/full-name.composite-type';
|
||||
import { isDefined } from 'src/utils/is-defined';
|
||||
|
||||
export const computeDisplayName = (
|
||||
name: FullNameMetadata | null | undefined,
|
||||
) => {
|
||||
if (!name) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return Object.values(name).filter(isDefined).join(' ');
|
||||
};
|
||||
Reference in New Issue
Block a user