Add profile pictures to people and fix account/workspace deletion (#984)
* Fix LinkedIn URL not redirecting to the right url * add avatars for people and seeds * Fix delete account/workspace * Add people picture on other pages * Change style of delete button * Revert modal to previous size * Fix tests
This commit is contained in:
@ -10,7 +10,12 @@ type OwnProps = {
|
||||
| Partial<
|
||||
Pick<
|
||||
Person,
|
||||
'id' | 'firstName' | 'lastName' | 'displayName' | '_activityCount'
|
||||
| 'id'
|
||||
| 'firstName'
|
||||
| 'lastName'
|
||||
| 'displayName'
|
||||
| 'avatarUrl'
|
||||
| '_activityCount'
|
||||
>
|
||||
>
|
||||
| null
|
||||
@ -44,6 +49,7 @@ export function EditablePeopleFullName({
|
||||
<PersonChip
|
||||
name={`${person?.firstName ?? ''} ${person?.lastName ?? ''}`}
|
||||
id={person?.id ?? ''}
|
||||
pictureUrl={person?.avatarUrl ?? ''}
|
||||
/>
|
||||
</NoEditModeContainer>
|
||||
}
|
||||
|
||||
@ -108,6 +108,7 @@ export function useSetPeopleEntityTable() {
|
||||
lastName: person.lastName ?? null,
|
||||
commentCount: person._activityCount,
|
||||
displayName: person.displayName ?? null,
|
||||
avatarUrl: person.avatarUrl ?? null,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,6 +30,7 @@ export const GET_PEOPLE = gql`
|
||||
displayName
|
||||
jobTitle
|
||||
linkedinUrl
|
||||
avatarUrl
|
||||
createdAt
|
||||
_activityCount
|
||||
company {
|
||||
@ -69,6 +70,7 @@ export function useFilteredSearchPeopleQuery({
|
||||
id: entity.id,
|
||||
entityType: CommentableType.Person,
|
||||
name: `${entity.firstName} ${entity.lastName}`,
|
||||
avatarUrl: entity.avatarUrl,
|
||||
avatarType: 'rounded',
|
||||
} as CommentableEntityForSelect),
|
||||
searchFilter,
|
||||
|
||||
@ -14,6 +14,7 @@ export const GET_PERSON = gql`
|
||||
city
|
||||
jobTitle
|
||||
linkedinUrl
|
||||
avatarUrl
|
||||
phone
|
||||
_activityCount
|
||||
company {
|
||||
|
||||
@ -6,6 +6,7 @@ export const peopleNameCellFamilyState = atomFamily<
|
||||
lastName: string | null;
|
||||
commentCount: number | null;
|
||||
displayName: string | null;
|
||||
avatarUrl: string | null;
|
||||
},
|
||||
string
|
||||
>({
|
||||
@ -15,5 +16,6 @@ export const peopleNameCellFamilyState = atomFamily<
|
||||
lastName: null,
|
||||
commentCount: null,
|
||||
displayName: null,
|
||||
avatarUrl: null,
|
||||
},
|
||||
});
|
||||
|
||||
@ -13,9 +13,8 @@ export function EditablePeopleFullNameCell() {
|
||||
|
||||
const [updatePerson] = useUpdateOnePersonMutation();
|
||||
|
||||
const { commentCount, firstName, lastName, displayName } = useRecoilValue(
|
||||
peopleNameCellFamilyState(currentRowEntityId ?? ''),
|
||||
);
|
||||
const { commentCount, firstName, lastName, displayName, avatarUrl } =
|
||||
useRecoilValue(peopleNameCellFamilyState(currentRowEntityId ?? ''));
|
||||
|
||||
return (
|
||||
<EditablePeopleFullName
|
||||
@ -25,6 +24,7 @@ export function EditablePeopleFullNameCell() {
|
||||
firstName,
|
||||
lastName,
|
||||
displayName: displayName ?? undefined,
|
||||
avatarUrl: avatarUrl,
|
||||
}}
|
||||
onSubmit={(newFirstValue, newSecondValue) =>
|
||||
updatePerson({
|
||||
|
||||
Reference in New Issue
Block a user