973b35989e
Moves calendar event details from the bespoke side-panel page to the standard record page layout system. - Adds standard calendar event record page metadata, fields view, widgets, tests, snapshots, and upgrade command for existing workspaces. - Opens calendar events through the generic ViewRecord side-panel path. - Adds participants and call recordings as standard field widgets. - Removes the old custom calendar event side-panel page and related side-panel enum/config entry. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/21857?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> https://github.com/user-attachments/assets/c1f88cac-1615-478c-a3dd-87d0c61ab9a8 <img width="3024" height="1658" alt="CleanShot 2026-06-19 at 19 01 27@2x" src="https://github.com/user-attachments/assets/c3df5705-ff08-446e-ac3c-6ccb11cf21ec" /> <img width="3024" height="1658" alt="CleanShot 2026-06-19 at 19 01 19@2x" src="https://github.com/user-attachments/assets/633525db-310c-4462-8458-a72068cc1432" />
48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
import { CalendarEventParticipantsResponseStatus } from '@/activities/calendar/components/CalendarEventParticipantsResponseStatus';
|
|
import { type CalendarEventParticipant } from '@/activities/calendar/types/CalendarEventParticipant';
|
|
import { useFindManyRecords } from '@/object-record/hooks/useFindManyRecords';
|
|
|
|
const CALENDAR_EVENT_PARTICIPANT_OBJECT_NAME_SINGULAR =
|
|
'calendarEventParticipant';
|
|
|
|
type CalendarEventParticipantsFieldWidgetProps = {
|
|
recordId: string;
|
|
};
|
|
|
|
type CalendarEventParticipantRecord = CalendarEventParticipant & {
|
|
__typename: 'CalendarEventParticipant';
|
|
};
|
|
|
|
export const CalendarEventParticipantsFieldWidget = ({
|
|
recordId,
|
|
}: CalendarEventParticipantsFieldWidgetProps) => {
|
|
const { records: calendarEventParticipants } =
|
|
useFindManyRecords<CalendarEventParticipantRecord>({
|
|
objectNameSingular: CALENDAR_EVENT_PARTICIPANT_OBJECT_NAME_SINGULAR,
|
|
filter: {
|
|
calendarEventId: {
|
|
eq: recordId,
|
|
},
|
|
},
|
|
recordGqlFields: {
|
|
id: true,
|
|
person: true,
|
|
workspaceMember: true,
|
|
isOrganizer: true,
|
|
responseStatus: true,
|
|
handle: true,
|
|
displayName: true,
|
|
},
|
|
});
|
|
|
|
if (calendarEventParticipants.length === 0) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<CalendarEventParticipantsResponseStatus
|
|
participants={calendarEventParticipants}
|
|
/>
|
|
);
|
|
};
|