mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-28 07:43:18 +00:00
🧹 Migrate Yarn registry URLs to npm registry: update yarn.lock dependencies for consistency and clean up unused entries.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Livewire\Forms;
|
||||
|
||||
use App\Enums\AssociationStatus;
|
||||
use App\Models\EinundzwanzigPleb;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Form;
|
||||
|
||||
@@ -10,6 +12,26 @@ class ApplicationForm extends Form
|
||||
#[Validate('nullable|string')]
|
||||
public $reason = '';
|
||||
|
||||
#[Validate('boolean')]
|
||||
#[Validate('accepted')]
|
||||
public $check = false;
|
||||
|
||||
public ?EinundzwanzigPleb $currentPleb = null;
|
||||
|
||||
public function setPleb(EinundzwanzigPleb $pleb): void
|
||||
{
|
||||
$this->currentPleb = $pleb;
|
||||
}
|
||||
|
||||
public function apply(AssociationStatus|int $status): void
|
||||
{
|
||||
$this->validate();
|
||||
|
||||
$status = $status instanceof AssociationStatus ? $status : AssociationStatus::from($status);
|
||||
|
||||
$this->currentPleb->update([
|
||||
'association_status' => $status,
|
||||
]);
|
||||
|
||||
$this->reset('check');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user