diff --git a/apps/web/src/features/ApplicationDecisions/hooks/useUpdateEventDecisions.ts b/apps/web/src/features/ApplicationDecisions/hooks/useUpdateEventDecisions.ts deleted file mode 100644 index 5160b59f..00000000 --- a/apps/web/src/features/ApplicationDecisions/hooks/useUpdateEventDecisions.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { useUpdateEvent } from "@/features/Event/hooks/useUpdateEvent"; -import { type Event } from "@/features/Event/schemas/event"; -import { api } from "@/lib/ky"; -import { toast } from "react-toastify"; - -interface checkAppReviewStatus { - checkAppReviewStatus: (event: Event) => Promise; -} - -export const useCheckAppReviewStatus = ( - eventId: string, -): checkAppReviewStatus => { - const { mutateAsync: updateEvent } = useUpdateEvent(eventId); - - const checkAppReviewStatus = async (event: Event) => { - const { id, application_review_finished } = event; - - await api.post(`events/${eventId}/app-review-decision-status`, { - json: { - eventId: id, - }, - }); - - await updateEvent( - { application_review_finished: application_review_finished }, - { - onError: () => - toast.error( - "Failed to check if application reviews are finished for this event.", - { position: "bottom-right" }, - ), - }, - ); - - return application_review_finished; - }; - - return { checkAppReviewStatus }; -}; diff --git a/apps/web/src/features/Event/schemas/event.ts b/apps/web/src/features/Event/schemas/event.ts index d21e80f5..f941188b 100644 --- a/apps/web/src/features/Event/schemas/event.ts +++ b/apps/web/src/features/Event/schemas/event.ts @@ -19,7 +19,6 @@ export const EventSchema = z.object({ updated_at: z.coerce.date().nullable(), banner: z.url().or(z.literal("")).nullable(), application_review_started: z.boolean(), - application_review_finished: z.boolean(), }); export type Event = z.infer; diff --git a/apps/web/src/features/EventOverview/components/AttendeeOverview.tsx b/apps/web/src/features/EventOverview/components/AttendeeOverview.tsx index 51ba7ca1..c18f584b 100644 --- a/apps/web/src/features/EventOverview/components/AttendeeOverview.tsx +++ b/apps/web/src/features/EventOverview/components/AttendeeOverview.tsx @@ -1,3 +1,3 @@ export default function AttendeeOverview() { - return
Attendee Overview Component
; + return
More here coming soon!
; } diff --git a/apps/web/src/routes/_protected/events/$eventId/dashboard/_admin/application-decisions.tsx b/apps/web/src/routes/_protected/events/$eventId/dashboard/_admin/application-decisions.tsx index 9067305a..2d5ae4eb 100644 --- a/apps/web/src/routes/_protected/events/$eventId/dashboard/_admin/application-decisions.tsx +++ b/apps/web/src/routes/_protected/events/$eventId/dashboard/_admin/application-decisions.tsx @@ -1,8 +1,6 @@ -import { Button } from "@/components/ui/Button"; import { useEvent } from "@/features/Event/hooks/useEvent"; import { createFileRoute } from "@tanstack/react-router"; import { Heading } from "react-aria-components"; -import { toast } from "react-toastify"; export const Route = createFileRoute( "/_protected/events/$eventId/dashboard/_admin/application-decisions", @@ -15,17 +13,6 @@ function RouteComponent() { const { user } = Route.useRouteContext(); const event = useEvent(eventId); - const checkReviewsCompleted = async () => { - if (!event.data) return; - - const isCompleted = true; // TODO: fix. this is being temporarily left in here to get a github workflow to run. - if (isCompleted) { - toast.success( - "All application reviews completed. You can now proceed with calculating decisions.", - ); - } - }; - const loading = !user || event.isLoading; if (loading) { @@ -49,20 +36,6 @@ function RouteComponent() { Application Decisions - - {event.data.application_review_finished ? ( -

Show applications decision page

- ) : ( - <> - - - )} );