diff --git a/backend/src/events/controllers.ts b/backend/src/events/controllers.ts index 3c9101e9..11559bec 100644 --- a/backend/src/events/controllers.ts +++ b/backend/src/events/controllers.ts @@ -279,6 +279,7 @@ const getEvent = async (eventID: string) => { id: eventID, }, include: { + attendees: true, owner: { select: { profile: true, diff --git a/frontend/src/components/organisms/ManageAttendees.tsx b/frontend/src/components/organisms/ManageAttendees.tsx index 8697eae1..9a4a6371 100644 --- a/frontend/src/components/organisms/ManageAttendees.tsx +++ b/frontend/src/components/organisms/ManageAttendees.tsx @@ -44,6 +44,8 @@ import { BASE_URL_CLIENT } from "@/utils/constants"; import useWebSocket from "react-use-websocket"; import { BASE_WEBSOCKETS_URL } from "@/utils/constants"; import useManageAttendeeState from "@/utils/useManageAttendeeState"; +import ManageSearchIcon from "@mui/icons-material/ManageSearch"; +import MultilineTextField from "../atoms/MultilineTextField"; type attendeeData = { id: number; @@ -54,8 +56,8 @@ type attendeeData = { }; interface AttendeesTableProps { eventid: string; + eventData: any; // the result of the tanstack query for GET /events/:eventid attendeesStatus: string; - tableName: string; rows: attendeeData[]; totalNumberofData: number; paginationModel: GridPaginationModel; @@ -72,10 +74,36 @@ type FormValues = { endTime: Date; }; +interface ViewCancelMessageModalBodyProps { + handleClose: () => void; + eventData?: any; + userid?: string; +} + +const ViewCancelMessageModalBody = ({ + handleClose, + eventData, + userid, +}: ViewCancelMessageModalBodyProps) => { + const eventAttendance = eventData?.attendees?.find( + (attendee: any) => attendee.userId === userid + ); + + return ( +
Volunteers are pending when they have registered for an event @@ -242,6 +339,20 @@ const AttendeesTable = ({ ) : (
)} + + {/* View cancel messages modal */} +