diff --git a/Frontend/src/pages/register/components/CompetingStep.jsx b/Frontend/src/pages/register/components/CompetingStep.jsx index f643e625..1e1a4102 100644 --- a/Frontend/src/pages/register/components/CompetingStep.jsx +++ b/Frontend/src/pages/register/components/CompetingStep.jsx @@ -3,7 +3,14 @@ import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query' import { EventSelector, UiIcon } from '@thewca/wca-components' import { dinero, toDecimal } from 'dinero.js' import React, { useContext, useEffect, useState } from 'react' -import { Button, Divider, Dropdown, Popup, TextArea } from 'semantic-ui-react' +import { + Button, + Divider, + Dropdown, + Message, + Popup, + TextArea, +} from 'semantic-ui-react' import { CompetitionContext } from '../../../api/helper/context/competition_context' import { UserContext } from '../../../api/helper/context/user_context' import { getSingleRegistration } from '../../../api/registration/get/get_registrations' @@ -128,6 +135,12 @@ export default function CompetingStep({ nextStep }) { ) : ( <> + {!competitionInfo['registration_opened?'] && ( + + Registration is not open yet, but you can still register as a + competition organizer or delegate. + + )}
You can register for {competitionInfo.name}
@@ -183,24 +196,26 @@ export default function CompetingStep({ nextStep }) {
Guests
-
- setGuests(data.value)} - selection - options={[ - ...new Array( - (competitionInfo.guests_per_registration_limit ?? 99) + 1 // Arrays start at 0 - ), - ].map((_, index) => { - return { - key: `registration-guest-dropdown-${index}`, - text: index, - value: index, - } - })} - /> -
+ {competitionInfo.guest_entry_status !== 'restricted' && ( +
+ setGuests(data.value)} + selection + options={[ + ...new Array( + (competitionInfo.guests_per_registration_limit ?? 99) + 1 // Arrays start at 0 + ), + ].map((_, index) => { + return { + key: `registration-guest-dropdown-${index}`, + text: index, + value: index, + } + })} + /> +
+ )}
{registration?.competing?.registration_status ? ( @@ -216,7 +231,10 @@ export default function CompetingStep({ nextStep }) {