diff --git a/src/IsaacApiTypesAutoGenerated.tsx b/src/IsaacApiTypesAutoGenerated.tsx index 19256b622c..12fa6ad609 100644 --- a/src/IsaacApiTypesAutoGenerated.tsx +++ b/src/IsaacApiTypesAutoGenerated.tsx @@ -492,6 +492,8 @@ export interface CompetitionEntryDTO { submissionURL?: string; groupName?: string; projectTitle?: string; + yearGroup?: string; + projectDescription?: string; } export interface DetailedEventBookingDTO extends EventBookingDTO { diff --git a/src/app/components/pages/IsaacCompetition/EntryForm/CompetitionEntryForm.tsx b/src/app/components/pages/IsaacCompetition/EntryForm/CompetitionEntryForm.tsx index 3483180dee..d90e136dc8 100644 --- a/src/app/components/pages/IsaacCompetition/EntryForm/CompetitionEntryForm.tsx +++ b/src/app/components/pages/IsaacCompetition/EntryForm/CompetitionEntryForm.tsx @@ -207,7 +207,15 @@ export const CompetitionEntryForm = ({ handleTermsClick }: CompetitionEntryFormP .map((memberId) => Number.parseInt(memberId, 10)) .filter((id) => !Number.isNaN(id)); - reserveUsersOnCompetition(COMPETITON_ID, reservableIds, projectLink, projectTitle, groupName); + reserveUsersOnCompetition( + COMPETITON_ID, + reservableIds, + projectLink, + projectTitle, + groupName, + selectedYearGroup ?? undefined, + projectDescription, + ); } setProjectTitle(""); diff --git a/src/app/components/pages/IsaacCompetition/EntryForm/useReserveUsersOnCompetition.ts b/src/app/components/pages/IsaacCompetition/EntryForm/useReserveUsersOnCompetition.ts index 2b187eec84..ce8a783c76 100644 --- a/src/app/components/pages/IsaacCompetition/EntryForm/useReserveUsersOnCompetition.ts +++ b/src/app/components/pages/IsaacCompetition/EntryForm/useReserveUsersOnCompetition.ts @@ -11,6 +11,8 @@ export const useReserveUsersOnCompetition = () => { submissionLink: string, projectTitle: string, groupName?: string, + yearGroup?: string, + projectDescription?: string, ) => { try { await api.eventBookings.reserveUsersOnCompetition( @@ -19,6 +21,8 @@ export const useReserveUsersOnCompetition = () => { submissionLink, groupName ?? "", projectTitle, + yearGroup ?? "", + projectDescription ?? "", ); dispatch( showSuccessToast("Competition entry submitted", "You have successfully submitted your competition entry"), diff --git a/src/app/services/api.ts b/src/app/services/api.ts index 22f84f30f7..8437dfef8f 100644 --- a/src/app/services/api.ts +++ b/src/app/services/api.ts @@ -480,12 +480,16 @@ export const api = { submissionLink: string, groupName: string, projectTitle: string, + yearGroup: string, + projectDescription: string, ) => { return endpoint.post(`/events/${eventId}/competitionEntries`, { entrantIds: userIds, submissionURL: submissionLink, groupName: groupName, projectTitle: projectTitle, + yearGroup: yearGroup, + projectDescription: projectDescription, }); }, cancelUsersReservationsOnEvent: (eventId: string, userIds: number[]) => {