diff --git a/app/Http/Controllers/Applications/InvitationController.php b/app/Http/Controllers/Applications/InvitationController.php index 4aeebb7..251d00c 100644 --- a/app/Http/Controllers/Applications/InvitationController.php +++ b/app/Http/Controllers/Applications/InvitationController.php @@ -27,6 +27,11 @@ public function store(Request $request) "code" => "The registration period for new dealers has ended, please check back next year.", ]); } + if ($applicationType === ApplicationType::Assistant && !Carbon::parse(config('ef.assistant_end_date'))->isFuture()) { + throw ValidationException::withMessages([ + "code" => "The registration period for new assistants has ended.", + ]); + } $applications = Application::where('type', ApplicationType::Dealer) ->where(function ($q) use ($request) { diff --git a/config/ef.php b/config/ef.php index b8f0274..5be6ab2 100644 --- a/config/ef.php +++ b/config/ef.php @@ -3,6 +3,7 @@ return [ 'reg_end_date' => Carbon::create(2023, 4, 30, 23, 59, 0, 'Europe/Berlin'), + 'assistant_end_date' => Carbon::create(2023, 8, 20, 23, 59, 0, 'Europe/Berlin'), 'dealers_tos_url' => 'https://www.eurofurence.org/EF27/dealersden/', 'idp_url' => 'https://identity.eurofurence.org', 'dealers_email' => 'dealers@eurofurence.org', diff --git a/resources/views/application/invitees.blade.php b/resources/views/application/invitees.blade.php index 5d9d3bb..d6b9b9c 100644 --- a/resources/views/application/invitees.blade.php +++ b/resources/views/application/invitees.blade.php @@ -68,7 +68,7 @@ class="form-text">Ask your share to go to dealers.eurofurence.org and click on J
{{ $assistants_active_count }}/{{ $assistants_count }} Invite assistants to your space