🆕 feat(project): add website field and validation for project proposals form

This commit is contained in:
fsociety
2024-10-24 17:40:51 +02:00
parent 5c4f9b6371
commit 6db38d08f5
4 changed files with 58 additions and 3 deletions

View File

@@ -23,13 +23,32 @@ state([
'votes',
])
->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;
},
]);
?>
<x-layouts.app title="Projekt Unterstützungen">
@volt
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto" x-data="nostrDefault(@this)" x-cloak x-show="isAllowed">
<!-- Page header -->
<div class="sm:flex sm:justify-between sm:items-center mb-5">