mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-27 11:03:40 +03:00
Fix missing team member images in calendar event (#5414)
### Work Fixed issue: #5308 ### Before Team member images are absent from Calendar events participant chips. ![Before](https://github.com/twentyhq/twenty/assets/100703401/bd3408ad-4a07-430e-ba23-83cd0775492a) ### After <img width="383" alt="Screenshot 2024-05-14 at 10 53 24" src="https://github.com/twentyhq/twenty/assets/100703401/b65efe8a-64de-4214-a60a-ee87d235953a"> ### Fix explained Redefined recordGqlField to fech Person and WorkspaceMember --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
parent
de228be5ca
commit
e9a7a8a4a3
@ -0,0 +1,33 @@
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
import { RecordGqlOperationSignature } from '@/object-record/graphql/types/RecordGqlOperationSignature';
|
||||
|
||||
export const FIND_ONE_CALENDAR_EVENT_OPERATION_SIGNATURE: RecordGqlOperationSignature =
|
||||
{
|
||||
objectNameSingular: CoreObjectNameSingular.CalendarEvent,
|
||||
variables: {},
|
||||
fields: {
|
||||
conferenceLink: true,
|
||||
description: true,
|
||||
endsAt: true,
|
||||
externalCreatedAt: true,
|
||||
id: true,
|
||||
isCanceled: true,
|
||||
isFullDay: true,
|
||||
location: true,
|
||||
startsAt: true,
|
||||
title: true,
|
||||
visibility: true,
|
||||
calendarEventParticipants: {
|
||||
id: true,
|
||||
person: true,
|
||||
workspaceMember: true,
|
||||
isOrganizer: true,
|
||||
responseStatus: true,
|
||||
handle: true,
|
||||
createdAt: true,
|
||||
calendarEventId: true,
|
||||
updatedAt: true,
|
||||
displayName: true,
|
||||
},
|
||||
},
|
||||
};
|
@ -1,9 +1,9 @@
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { CalendarEventDetails } from '@/activities/calendar/components/CalendarEventDetails';
|
||||
import { FIND_ONE_CALENDAR_EVENT_OPERATION_SIGNATURE } from '@/activities/calendar/graphql/operation-signatures/FindOneCalendarEventOperationSignature';
|
||||
import { viewableCalendarEventIdState } from '@/activities/calendar/states/viewableCalendarEventIdState';
|
||||
import { CalendarEvent } from '@/activities/calendar/types/CalendarEvent';
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
import { useFindOneRecord } from '@/object-record/hooks/useFindOneRecord';
|
||||
import { useSetRecordInStore } from '@/object-record/record-store/hooks/useSetRecordInStore';
|
||||
|
||||
@ -11,8 +11,10 @@ export const RightDrawerCalendarEvent = () => {
|
||||
const { setRecords } = useSetRecordInStore();
|
||||
const viewableCalendarEventId = useRecoilValue(viewableCalendarEventIdState);
|
||||
const { record: calendarEvent } = useFindOneRecord<CalendarEvent>({
|
||||
objectNameSingular: CoreObjectNameSingular.CalendarEvent,
|
||||
objectNameSingular:
|
||||
FIND_ONE_CALENDAR_EVENT_OPERATION_SIGNATURE.objectNameSingular,
|
||||
objectRecordId: viewableCalendarEventId ?? '',
|
||||
recordGqlFields: FIND_ONE_CALENDAR_EVENT_OPERATION_SIGNATURE.fields,
|
||||
onCompleted: (record) => setRecords([record]),
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user