'', 'activeFilter' => 'all', 'projects' => fn() => \App\Models\ProjectProposal::query() ->with([ 'einundzwanzigPleb.profile', 'votes', ]) ->orderBy('created_at', 'desc') ->get(), 'isAllowed' => false, 'currentPubkey' => null, 'currentPleb' => null, ]); $projects = computed(function () { return $this->projects ->when($this->search, function ($collection) { return $collection->filter(function ($project) { return str_contains(strtolower($project->name), strtolower($this->search)) || str_contains(strtolower($project->description), strtolower($this->search)) || str_contains(strtolower($project->einundzwanzigPleb->profile->name), strtolower($this->search)); }); }); }); on([ 'nostrLoggedIn' => function ($pubkey) { $this->currentPubkey = $pubkey; $this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first(); $this->isAllowed = true; }, 'nostrLoggedOut' => function () { $this->isAllowed = false; $this->currentPubkey = null; $this->currentPleb = null; }, ]); $confirmDelete = function ($id) { $notification = new Notification($this); $notification->confirm([ 'title' => 'Projektunterstützung löschen', 'message' => 'Bist du sicher, dass du diese Projektunterstützung löschen möchtest?', 'accept' => [ 'label' => 'Ja, löschen', 'method' => 'delete', 'params' => $id, ], ]); }; $delete = function ($id) { \App\Models\ProjectProposal::query()->findOrFail($id)->delete(); $this->projects = \App\Models\ProjectProposal::query() ->with([ 'einundzwanzigPleb.profile', 'votes', ]) ->orderBy('created_at', 'desc') ->get(); }; ?> @volt

Einundzwanzig Projektunterstützungen

@if($currentPleb && $currentPleb->association_status->value > 1) @endif
{{ $this->projects->count() }}Projekte
@foreach($this->projects as $project) @endforeach
@endvolt