Event addons bookable
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user