feat: implement group pre-registration feature with approval and rejection workflows
- Add API endpoints for managing group pre-registrations, including approval and rejection. - Create database migration for `group_pre_registrations` table and associated enum for status. - Implement use cases for listing, approving, and rejecting pre-registrations. - Add frontend components for displaying pre-registration details and managing approvals/rejections. - Update shared schemas to include pre-registration data structures and validation. - Remove obsolete `WaitlistNoticeCard` component and replace with `PreRegistrationNoticeCard`.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type {
|
||||
AbsenceDetails,
|
||||
ApproveGroupPreRegistrationResult,
|
||||
AttendeeDto,
|
||||
AttendeeHistory,
|
||||
AttendeeList,
|
||||
@@ -20,6 +21,7 @@ import type {
|
||||
GroupDto,
|
||||
GroupInviteInfoDto,
|
||||
GroupList,
|
||||
GroupPreRegistrationList,
|
||||
GroupRiskSummary,
|
||||
GroupsRiskOverview,
|
||||
GroupWaitlistEntryDto,
|
||||
@@ -36,6 +38,7 @@ import type {
|
||||
ProblemDetails,
|
||||
PromoteGroupWaitlistEntryResult,
|
||||
PublicNotifyAbsence,
|
||||
RejectGroupPreRegistrationResult,
|
||||
RemoveAttendeeResult,
|
||||
RemoveGroupWaitlistEntryResult,
|
||||
SessionStudents,
|
||||
@@ -180,6 +183,23 @@ export const removeGroupWaitlistEntry = (groupId: string, entryId: string) =>
|
||||
method: 'DELETE',
|
||||
})
|
||||
|
||||
export const getGroupPreRegistrations = (groupId: string, page = 1, pageSize = 100) =>
|
||||
apiFetch<GroupPreRegistrationList>(
|
||||
`/api/v1/groups/${groupId}/preregistrations?page=${page}&pageSize=${pageSize}`,
|
||||
)
|
||||
|
||||
export const approveGroupPreRegistration = (groupId: string, entryId: string) =>
|
||||
apiFetch<ApproveGroupPreRegistrationResult>(
|
||||
`/api/v1/groups/${groupId}/preregistrations/${entryId}/approve`,
|
||||
{ method: 'POST' },
|
||||
)
|
||||
|
||||
export const rejectGroupPreRegistration = (groupId: string, entryId: string) =>
|
||||
apiFetch<RejectGroupPreRegistrationResult>(
|
||||
`/api/v1/groups/${groupId}/preregistrations/${entryId}/reject`,
|
||||
{ method: 'POST' },
|
||||
)
|
||||
|
||||
export const removeGroupAttendee = (
|
||||
groupId: string,
|
||||
attendeeId: string,
|
||||
|
||||
Reference in New Issue
Block a user