feat: rename comment thread into activity (#939)
* feat: rename commentThread into activity server * feat: rename commentThread into activity front * feat: migration only create tables feat: migration only create tables * Update activities * fix: rebase partial fix * fix: all rebase problems and drop activity target alter * fix: lint * Update migration * Update migration * Fix conflicts * Fix conflicts --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -10,11 +10,7 @@ type OwnProps = {
|
||||
| Partial<
|
||||
Pick<
|
||||
Person,
|
||||
| 'id'
|
||||
| 'firstName'
|
||||
| 'lastName'
|
||||
| 'displayName'
|
||||
| '_commentThreadCount'
|
||||
'id' | 'firstName' | 'lastName' | 'displayName' | '_activityCount'
|
||||
>
|
||||
>
|
||||
| null
|
||||
|
||||
@ -101,12 +101,12 @@ export function useSetPeopleEntityTable() {
|
||||
if (
|
||||
currentNameCell.firstName !== person.firstName ||
|
||||
currentNameCell.lastName !== person.lastName ||
|
||||
currentNameCell.commentCount !== person._commentThreadCount
|
||||
currentNameCell.commentCount !== person._activityCount
|
||||
) {
|
||||
set(peopleNameCellFamilyState(person.id), {
|
||||
firstName: person.firstName ?? null,
|
||||
lastName: person.lastName ?? null,
|
||||
commentCount: person._commentThreadCount,
|
||||
commentCount: person._activityCount,
|
||||
displayName: person.displayName ?? null,
|
||||
});
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ export const GET_PEOPLE = gql`
|
||||
jobTitle
|
||||
linkedinUrl
|
||||
createdAt
|
||||
_commentThreadCount
|
||||
_activityCount
|
||||
company {
|
||||
id
|
||||
name
|
||||
@ -107,7 +107,7 @@ export const GET_PERSON_NAMES_AND_COMMENT_COUNT = gql`
|
||||
firstName
|
||||
lastName
|
||||
displayName
|
||||
_commentThreadCount
|
||||
_activityCount
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -129,7 +129,7 @@ export const GET_PERSON_COMMENT_COUNT = gql`
|
||||
query GetPersonCommentCountById($id: String!) {
|
||||
person: findUniquePerson(id: $id) {
|
||||
id
|
||||
_commentThreadCount
|
||||
_activityCount
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@ -15,7 +15,7 @@ export const GET_PERSON = gql`
|
||||
jobTitle
|
||||
linkedinUrl
|
||||
phone
|
||||
_commentThreadCount
|
||||
_activityCount
|
||||
company {
|
||||
id
|
||||
name
|
||||
|
||||
@ -21,7 +21,7 @@ export function EditablePeopleFullNameCell() {
|
||||
<EditablePeopleFullName
|
||||
person={{
|
||||
id: currentRowEntityId ?? undefined,
|
||||
_commentThreadCount: commentCount ?? undefined,
|
||||
_activityCount: commentCount ?? undefined,
|
||||
firstName,
|
||||
lastName,
|
||||
displayName: displayName ?? undefined,
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
import { useOpenCreateActivityDrawerForSelectedRowIds } from '@/activities/hooks/useOpenCreateActivityDrawerForSelectedRowIds';
|
||||
import { TableActionBarButtonToggleComments } from '@/ui/table/action-bar/components/TableActionBarButtonOpenComments';
|
||||
import { CommentableType } from '~/generated/graphql';
|
||||
|
||||
export function TableActionBarButtonCreateActivityPeople() {
|
||||
const openCreateActivityRightDrawer =
|
||||
useOpenCreateActivityDrawerForSelectedRowIds();
|
||||
|
||||
async function handleButtonClick() {
|
||||
openCreateActivityRightDrawer(CommentableType.Person);
|
||||
}
|
||||
|
||||
return <TableActionBarButtonToggleComments onClick={handleButtonClick} />;
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
import { useOpenCreateCommentThreadDrawerForSelectedRowIds } from '@/activities/hooks/useOpenCreateCommentDrawerForSelectedRowIds';
|
||||
import { TableActionBarButtonToggleComments } from '@/ui/table/action-bar/components/TableActionBarButtonOpenComments';
|
||||
import { CommentableType } from '~/generated/graphql';
|
||||
|
||||
export function TableActionBarButtonCreateCommentThreadPeople() {
|
||||
const openCreateCommentThreadRightDrawer =
|
||||
useOpenCreateCommentThreadDrawerForSelectedRowIds();
|
||||
|
||||
async function handleButtonClick() {
|
||||
openCreateCommentThreadRightDrawer(CommentableType.Person);
|
||||
}
|
||||
|
||||
return <TableActionBarButtonToggleComments onClick={handleButtonClick} />;
|
||||
}
|
||||
Reference in New Issue
Block a user