diff --git a/Frontend/src/pages/registration_administration/components/RegistrationActions.jsx b/Frontend/src/pages/registration_administration/components/RegistrationActions.jsx index 55bd9237..1380ceca 100644 --- a/Frontend/src/pages/registration_administration/components/RegistrationActions.jsx +++ b/Frontend/src/pages/registration_administration/components/RegistrationActions.jsx @@ -12,13 +12,24 @@ export default function RegistrationActions({ selected, refresh }) { const anySelected = selected.pending.length > 0 || selected.accepted.length > 0 || - selected.cancelled.length > 0 + selected.cancelled.length > 0 || + selected.waiting > 0 const anyApprovable = - selected.pending.length > 0 || selected.cancelled.length > 0 + selected.pending.length > 0 || + selected.cancelled.length > 0 || + selected.waiting.length > 0 const anyRejectable = - selected.accepted.length > 0 || selected.cancelled.length > 0 - const anyDeletable = - selected.pending.length > 0 || selected.accepted.length > 0 + selected.accepted.length > 0 || + selected.cancelled.length > 0 || + selected.waiting.length > 0 + const anyCancellable = + selected.pending.length > 0 || + selected.accepted.length > 0 || + selected.waiting.length > 0 + const anyWaitlistable = + selected.pending.length > 0 || + selected.accepted.length > 0 || + selected.cancelled.length > 0 const { mutate: updateRegistrationMutation } = useMutation({ mutationFn: updateRegistration, onError: (data) => { @@ -60,6 +71,7 @@ export default function RegistrationActions({ selected, refresh }) { ...selected.pending, ...selected.accepted, ...selected.cancelled, + ...selected.waiting, ] .map((user) => user + '@worldcubeassociation.org') .join(',')}`} @@ -75,7 +87,11 @@ export default function RegistrationActions({ selected, refresh }) { positive onClick={() => changeStatus( - [...selected.pending, ...selected.cancelled], + [ + ...selected.pending, + ...selected.cancelled, + ...selected.waiting, + ], 'accepted' ) } @@ -87,25 +103,50 @@ export default function RegistrationActions({ selected, refresh }) { + )} + {anyWaitlistable && ( + )} - {anyDeletable && ( + {anyCancellable && ( )} diff --git a/Frontend/src/watch.mjs b/Frontend/src/watch.mjs index 96341405..79e76464 100644 --- a/Frontend/src/watch.mjs +++ b/Frontend/src/watch.mjs @@ -39,7 +39,8 @@ const context = await esbuild.context({ ], define: { // Make sure you are running a version of the Monolith on port 3000 if needed - 'process.env.WCA_URL': `"http://localhost:3000"`, + // 'process.env.WCA_URL': `"http://localhost:3000"`, + 'process.env.WCA_URL': `"https://staging.worldcubeassociation.org"`, 'process.env.API_URL': '"http://localhost:3001/api/v1"', 'process.env.NODE_ENV': '"development"', },