Payment reminder mails

This commit is contained in:
2026-04-18 22:09:57 +02:00
parent ff98f0860c
commit 33a9271013
13 changed files with 157 additions and 10 deletions

View File

@@ -22,8 +22,8 @@ use Illuminate\Http\Response;
use function Symfony\Component\String\b;
class DetailsController extends CommonController {
public function __invoke(int $eventId) {
$event = $this->events->getById($eventId);
public function __invoke(string $eventId) {
$event = $this->events->getByIdentifier($eventId);
return new InertiaProvider('Event/Details', ['event' => $event])->render();
}

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Domains\Event\Controllers;
use App\Domains\Event\Actions\SendMissingPaymentMails\SendMissingPaymentMailsCommand;
use App\Domains\Event\Actions\SendMissingPaymentMails\SendMissingPaymentMailsRequest;
use App\Scopes\CommonController;
use Illuminate\Http\Request;
class PaymentReminderController extends CommonController
{
public function __invoke(string $eventIdentifier, Request $request)
{
$event = $this->events->getByIdentifier($eventIdentifier, true);
$sendPaymentReminderMailsRequest = new SendMissingPaymentMailsRequest(
event: $event,
eventParticipants: $this->eventParticipants,
httpRequest: $request
);
$sendPaymentReminderMailsCommand = new SendMissingPaymentMailsCommand(request: $sendPaymentReminderMailsRequest);
$sendPaymentReminderResponse = $sendPaymentReminderMailsCommand->execute();
return response()->json([
'success' => $sendPaymentReminderResponse->success,
'message' => $sendPaymentReminderResponse->success ?
sprintf('Es wurden %1$s Personen über fehlende Teilnahmebeiträge informiert', $sendPaymentReminderResponse->remindedParticipants) :
'Beim Senden der Benachrichtigungen ist ein Fehler aufgetreten.',
]);
}
}