'', 'description' => '', 'support_in_sats' => '', 'website' => '', 'accepted' => false, 'sats_paid' => 0, ]; public bool $isAllowed = false; public bool $isAdmin = false; public function mount(): void { if (NostrAuth::check()) { $currentPubkey = NostrAuth::pubkey(); $currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $currentPubkey)->first(); if ($currentPleb && $currentPleb->association_status->value > 1 && $currentPleb->paymentEvents()->where('year', date('Y'))->where('paid', true)->exists()) { $this->isAllowed = true; } if ($currentPleb && in_array($currentPleb->npub, config('einundzwanzig.config.current_board'), true)) { $this->isAdmin = true; } } } public function save(): void { $this->validate([ 'form.name' => 'required|string|max:255', 'form.description' => 'required|string', 'form.support_in_sats' => 'required|integer|min:0', 'form.website' => 'required|url|max:255', ]); ProjectProposal::query()->create([ 'name' => $this->form['name'], 'description' => $this->form['description'], 'support_in_sats' => (int) $this->form['support_in_sats'], 'website' => $this->form['website'], 'accepted' => $this->form['accepted'], 'sats_paid' => $this->form['sats_paid'], 'einundzwanzig_pleb_id' => \App\Models\EinundzwanzigPleb::query()->where('pubkey', NostrAuth::pubkey())->first()->id, ]); $this->redirectRoute('association.projectSupport'); } }; ?>
@if($isAllowed)

Projektförderung anlegen

Formular
Name Website Unterstützung (Sats) @if($isAdmin) Admin Felder
Akzeptiert Sats bezahlt
@endif Speichern
Information

Fülle das Formular aus, um eine neue Projektförderung anzulegen.

@else
Projektförderung kann nicht angelegt werden

Um eine Projektförderung anzulegen, benötigst du:

  • Einen Vereinsstatus von mindestens 2 (Aktives Mitglied)
  • Eine bezahlte Mitgliedschaft für das aktuelle Jahr ({{ date('Y') }})

@if(!NostrAuth::check()) Bitte melde dich zunächst mit Nostr an. @else Bitte kontaktiere den Vorstand, wenn du denkst, dass du berechtigt sein solltest. @endif

@endif