Event addons bookable

This commit is contained in:
2026-08-12 16:45:02 +02:00
parent e95de52768
commit 0ee952212b
25 changed files with 656 additions and 24 deletions
@@ -2,6 +2,8 @@
namespace App\Domains\Event\Controllers;
use App\Domains\Event\Actions\SetEventAddons\SetEventAddonsCommand;
use App\Domains\Event\Actions\SetEventAddons\SetEventAddonsRequest;
use App\Domains\Event\Actions\SetParticipationFees\SetParticipationFeesCommand;
use App\Domains\Event\Actions\SetParticipationFees\SetParticipationFeesRequest;
use App\Domains\Event\Actions\SetParticipationOptions\SetParticipationOptionsCommand;
@@ -155,6 +157,17 @@ class DetailsController extends CommonController {
return response()->json(['status' => $response->success ? 'success' : 'error', 'message' => $response->message]);
}
public function updateEventAddons(int $eventId, Request $request): JsonResponse
{
$event = $this->events->getById($eventId);
$setRequest = new SetEventAddonsRequest($event, (array)$request->input('addons', []));
$setCommand = new SetEventAddonsCommand($setRequest);
$response = $setCommand->execute();
return response()->json(['status' => $response->success ? 'success' : 'error', 'message' => $response->message]);
}
public function downloadPdfList(string $eventId, string $listType, Request $request): Response
{
$event = $this->events->getByIdentifier($eventId);