Event identifiers for anonymizations
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Models\Event;
|
||||
use App\Models\Tenant;
|
||||
use App\RelationModels\EventEatingHabits;
|
||||
use App\RelationModels\EventLocalGroups;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class CreateEventCommand {
|
||||
private CreateEventRequest $request;
|
||||
@@ -27,6 +28,7 @@ class CreateEventCommand {
|
||||
$event = Event::create([
|
||||
'tenant' => app('tenant')->slug,
|
||||
'name' => $this->request->name,
|
||||
'identifier' => Str::random(10),
|
||||
'location' => $this->request->location,
|
||||
'postal_code' => $this->request->postalCode,
|
||||
'email' => $this->request->email,
|
||||
|
||||
@@ -18,13 +18,13 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class SignupController extends CommonController {
|
||||
public function __invoke(int $eventId, Request $request) {
|
||||
public function __invoke(string $eventId, Request $request) {
|
||||
$availableEvents = [];
|
||||
foreach ($this->events->getAvailable(false) as $event) {
|
||||
$availableEvents[] = $event->toResource()->toArray($request);
|
||||
};
|
||||
|
||||
$event = $this->events->getById($eventId, false)?->toResource()->toArray($request);
|
||||
$event = $this->events->getByIdentifier($eventId, false)?->toResource()->toArray($request);
|
||||
|
||||
$participantData = [
|
||||
'firstname' => '',
|
||||
|
||||
@@ -69,7 +69,7 @@ console.log(props.events)
|
||||
|
||||
<div style="margin-top: 20px; display: flex; justify-content: flex-end;">
|
||||
<a
|
||||
:href="'/event/' + event.id + '/signup'"
|
||||
:href="'/event/' + event.identifier + '/signup'"
|
||||
style="
|
||||
display: inline-block;
|
||||
padding: 10px 24px;
|
||||
|
||||
Reference in New Issue
Block a user