'', 'activeFilter' => 'all', 'projects' => fn() => \App\Models\ProjectProposal::query() ->with([ 'einundzwanzigPleb.profile', 'votes', ]) ->orderBy('created_at', 'desc') ->get(), 'isAllowed' => false, 'currentPubkey' => null, 'currentPleb' => null, ]); updated([ 'search' => function () { $this->projects = \App\Models\ProjectProposal::query() ->with([ 'einundzwanzigPleb.profile', 'votes', ]) ->where(function ($query) { $query ->where('name', 'ilike', '%'.$this->search.'%') ->orWhere('description', 'ilike', '%'.$this->search.'%') ->orWhereHas('einundzwanzigPleb.profile', function ($q) { $q->where('name', 'ilike', '%'.$this->search.'%'); }); }) ->orderBy('created_at', 'desc') ->get(); }, ]); $projects = computed(function () { return $this->projects; }); 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