Allow Card field update and card drag on new record board (#3661)
This commit is contained in:
@ -1,9 +1,25 @@
|
||||
import { isArray } from '@sniptt/guards';
|
||||
|
||||
export const getActivitySummary = (activityBody: string) => {
|
||||
const noteBody = activityBody ? JSON.parse(activityBody) : [];
|
||||
|
||||
return (
|
||||
noteBody[0]?.content?.text ||
|
||||
noteBody[0]?.content?.map((content: any) => content?.text).join(' ') ||
|
||||
''
|
||||
);
|
||||
if (!noteBody.length) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const firstNoteBlockContent = noteBody[0].content;
|
||||
|
||||
if (!firstNoteBlockContent) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (firstNoteBlockContent.text) {
|
||||
return noteBody[0].content.text;
|
||||
}
|
||||
|
||||
if (isArray(firstNoteBlockContent)) {
|
||||
return firstNoteBlockContent.map((content: any) => content.text).join(' ');
|
||||
}
|
||||
|
||||
return '';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user