4702 rename calendareventattendee to calendareventparticipant (#4761)
Closes #4702
This commit is contained in:
@ -115,7 +115,7 @@ export const CalendarEventRow = ({
|
||||
: format(startsAt, 'HH:mm');
|
||||
const endTimeLabel = calendarEvent.isFullDay ? '' : format(endsAt, 'HH:mm');
|
||||
|
||||
const isCurrentWorkspaceMemberAttending = calendarEvent.attendees?.some(
|
||||
const isCurrentWorkspaceMemberAttending = calendarEvent.participants?.some(
|
||||
({ workspaceMemberId }) => workspaceMemberId === currentWorkspaceMember?.id,
|
||||
);
|
||||
const showTitle = calendarEvent.visibility === 'SHARE_EVERYTHING';
|
||||
@ -154,19 +154,19 @@ export const CalendarEventRow = ({
|
||||
</StyledVisibilityCard>
|
||||
)}
|
||||
</StyledLabels>
|
||||
{!!calendarEvent.attendees?.length && (
|
||||
{!!calendarEvent.participants?.length && (
|
||||
<AvatarGroup
|
||||
avatars={calendarEvent.attendees.map((attendee) => (
|
||||
avatars={calendarEvent.participants.map((participant) => (
|
||||
<Avatar
|
||||
key={[attendee.workspaceMemberId, attendee.displayName]
|
||||
key={[participant.workspaceMemberId, participant.displayName]
|
||||
.filter(isDefined)
|
||||
.join('-')}
|
||||
avatarUrl={
|
||||
attendee.workspaceMemberId === currentWorkspaceMember?.id
|
||||
participant.workspaceMemberId === currentWorkspaceMember?.id
|
||||
? currentWorkspaceMember?.avatarUrl
|
||||
: undefined
|
||||
}
|
||||
placeholder={attendee.displayName}
|
||||
placeholder={participant.displayName}
|
||||
type="rounded"
|
||||
/>
|
||||
))}
|
||||
|
||||
@ -10,7 +10,7 @@ import { sortDesc } from '~/utils/sort';
|
||||
|
||||
type CalendarEventGeneric = Omit<
|
||||
CalendarEvent,
|
||||
'attendees' | 'externalCreatedAt'
|
||||
'participants' | 'externalCreatedAt'
|
||||
>;
|
||||
|
||||
export const useCalendarEvents = <T extends CalendarEventGeneric>(
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const timelineCalendarEventAttendeeFragment = gql`
|
||||
fragment TimelineCalendarEventAttendeeFragment on TimelineCalendarEventAttendee {
|
||||
personId
|
||||
workspaceMemberId
|
||||
firstName
|
||||
lastName
|
||||
displayName
|
||||
avatarUrl
|
||||
handle
|
||||
}
|
||||
`;
|
||||
@ -1,6 +1,6 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
import { timelineCalendarEventAttendeeFragment } from '@/activities/calendar/queries/fragments/timelineCalendarEventAttendeeFragment';
|
||||
import { timelineCalendarEventParticipantFragment } from '@/activities/calendar/queries/fragments/timelineCalendarEventParticipantFragment';
|
||||
|
||||
export const timelineCalendarEventFragment = gql`
|
||||
fragment TimelineCalendarEventFragment on TimelineCalendarEvent {
|
||||
@ -12,9 +12,9 @@ export const timelineCalendarEventFragment = gql`
|
||||
endsAt
|
||||
isFullDay
|
||||
visibility
|
||||
attendees {
|
||||
...TimelineCalendarEventAttendeeFragment
|
||||
participants {
|
||||
...TimelineCalendarEventParticipantFragment
|
||||
}
|
||||
}
|
||||
${timelineCalendarEventAttendeeFragment}
|
||||
${timelineCalendarEventParticipantFragment}
|
||||
`;
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const timelineCalendarEventParticipantFragment = gql`
|
||||
fragment TimelineCalendarEventParticipantFragment on TimelineCalendarEventParticipant {
|
||||
personId
|
||||
workspaceMemberId
|
||||
firstName
|
||||
lastName
|
||||
displayName
|
||||
avatarUrl
|
||||
handle
|
||||
}
|
||||
`;
|
||||
@ -14,7 +14,7 @@ export type CalendarEvent = {
|
||||
startsAt: string;
|
||||
title?: string;
|
||||
visibility: 'METADATA' | 'SHARE_EVERYTHING';
|
||||
attendees?: {
|
||||
participants?: {
|
||||
displayName: string;
|
||||
workspaceMemberId?: string;
|
||||
}[];
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const RENEW_TOKEN = gql`
|
||||
mutation RenewToken($refreshToken: String!) {
|
||||
renewToken(refreshToken: $refreshToken) {
|
||||
mutation RenewToken($appToken: String!) {
|
||||
renewToken(appToken: $appToken) {
|
||||
tokens {
|
||||
...AuthTokensFragment
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ const renewTokenMutation = async (
|
||||
>({
|
||||
mutation: RenewTokenDocument,
|
||||
variables: {
|
||||
refreshToken: refreshToken,
|
||||
appToken: refreshToken,
|
||||
},
|
||||
fetchPolicy: 'network-only',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user