File tree Expand file tree Collapse file tree
services/registration/src/routes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -282,9 +282,15 @@ applicationRouter.route("/actions/choose-application-branch").post(
282282 }
283283
284284 if ( existingApplication ) {
285- throw new BadRequestError (
286- "You already have an active/pending application. Delete it first to submit a new one."
287- ) ;
285+ const isRejectedParticipant =
286+ existingApplication . applicationBranch . applicationGroup ===
287+ ApplicationGroupType . PARTICIPANT && existingApplication . status === StatusType . DENIED ;
288+ // Allows rejected applicants to apply as volunteer even though they already have an active application
289+ if ( ! isRejectedParticipant || req . body . applicationBranch !== ApplicationGroupType . VOLUNTEER ) {
290+ throw new BadRequestError (
291+ "You already have an active/pending application. Delete it first to submit a new one."
292+ ) ;
293+ }
288294 // const forbiddenStatuses = [StatusType.APPLIED, StatusType.ACCEPTED, StatusType.CONFIRMED];
289295 // if (forbiddenStatuses.includes(existingApplication.status)) {
290296 // throw new BadRequestError(
@@ -575,7 +581,8 @@ applicationRouter.route("/:id/actions/update-status").post(
575581 ) {
576582 updateBody . confirmationSubmitTime = new Date ( ) ;
577583 } else if (
578- ( existingApplication . status === StatusType . ACCEPTED || existingApplication . status === StatusType . CONFIRMED ) &&
584+ ( existingApplication . status === StatusType . ACCEPTED ||
585+ existingApplication . status === StatusType . CONFIRMED ) &&
579586 newStatus === StatusType . NOT_ATTENDING
580587 ) {
581588 // pass
You can’t perform that action at this time.
0 commit comments