'', 'projects' => fn() => \App\Models\ProjectProposal::query() ->with([ 'einundzwanzigPleb.profile', 'votes', ]) ->orderBy('created_at', 'desc') ->get(), 'isAllowed' => false, 'currentPubkey' => null, 'currentPleb' => null, ]); on([ 'nostrLoggedIn' => function ($pubkey) { $this->currentPubkey = $pubkey; $this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first(); if ($this->currentPleb->association_status->value < 2) { return $this->js('alert("Du bist hierzu nicht berechtigt.")'); } $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 > 2) @endif
{{--
--}}
{{ count($projects) }} Projekte
@foreach($projects as $project) @php $boardVotes = $project->votes->filter(function ($vote) { return in_array($vote->einundzwanzigPleb->npub, config('einundzwanzig.config.current_board')); }); $approveCount = $boardVotes->where('value', 1)->count(); $disapproveCount = $boardVotes->where('value', 0)->count(); @endphp @if($approveCount === 3 || $disapproveCount !== 3)
@if(!$project->sats_paid) Meetup 01 @else
Meetup 01
@endif
Eingereicht von: {{ $project->einundzwanzigPleb->profile->name }}

{{ $project->name }}

{!! strip_tags($project->description) !!}
{{ number_format($project->support_in_sats, 0, ',', '.') }} Sats
@if($project->votes->where('value', true)->count() > 0) @endif
@if( ($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id) || ($currentPleb && in_array($currentPleb->npub, config('einundzwanzig.config.current_board'), true)) ) @endif @if(($currentPleb && $currentPleb->association_status->value > 2) || $project->accepted) @endif
@if($project->sats_paid)
Wurde mit {{ number_format($project->sats_paid, 0, ',', '.') }} Sats unterstützt
@endif
@endif @endforeach
@endvolt