Support oft parent groups
This commit is contained in:
1 parent
c4ca101594
commit
a5e4e55df5
86 files changed
+1936
-80
No files matched your search
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Domains\Event\Actions\UpdateEvent;
|
||||
|
||||
use App\Repositories\EventParticipantRepository;
|
||||
|
||||
class UpdateEventCommand {
|
||||
public UpdateEventRequest $request;
|
||||
public function __construct(UpdateEventRequest $request) {
|
||||
@@ -26,6 +28,14 @@ class UpdateEventCommand {
|
||||
$this->request->event->registration_allowed = $this->request->registrationAllowed;
|
||||
$this->request->event->short_registration = $this->request->shortRegistration;
|
||||
$this->request->event->swimming_permission_required = $this->request->swimmingPermissionRequired;
|
||||
|
||||
// Umstellen zwischen Local und Parent Group nur ohne Anmeldungen -- sonst stünden in einer Veranstaltung
|
||||
// beide Arten von Antworten nebeneinander.
|
||||
if ($this->request->participantGroupType !== null
|
||||
&& !new EventParticipantRepository()->existsForEvent($this->request->event)) {
|
||||
$this->request->event->participant_group_type = $this->request->participantGroupType->value;
|
||||
}
|
||||
|
||||
$this->request->event->save();
|
||||
|
||||
$this->request->event->resetAllowedEatingHabits();
|
||||
|
||||
Reference in new issue
Block a user