mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-08 10:10:16 +00:00
Swapped the conditional check for association status and public key in both admin.blade.php and index.blade.php. This change ensures that the correct condition is evaluated in the respective files.
41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Livewire\Volt\Component;
|
|
|
|
use function Livewire\Volt\computed;
|
|
use function Livewire\Volt\mount;
|
|
use function Livewire\Volt\state;
|
|
use function Livewire\Volt\with;
|
|
use function Livewire\Volt\updated;
|
|
use function Laravel\Folio\{middleware};
|
|
use function Laravel\Folio\name;
|
|
use function Livewire\Volt\{on};
|
|
|
|
name('association.members.admin');
|
|
|
|
state(['isAllowed' => false]);
|
|
state(['currentPubkey' => null]);
|
|
state(['members' => []]);
|
|
|
|
on([
|
|
'nostrLoggedIn' => function ($pubkey) {
|
|
$this->currentPubkey = $pubkey;
|
|
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()
|
|
->where('pubkey', $pubkey)->first();
|
|
if($this->currentPleb->association_status->value < 3) {
|
|
return redirect()->route('association.profile');
|
|
}
|
|
$this->isAllowed = true;
|
|
},
|
|
]);
|
|
|
|
?>
|
|
|
|
<x-layouts.app title="{{ __('Mitglieder') }}">
|
|
@volt
|
|
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto" x-show="isAllowed" x-data="{isAllowed: $wire.entangle('isAllowed').live}" x-cloak>
|
|
<livewire:einundzwanzig-pleb-table/>
|
|
</div>
|
|
@endvolt
|
|
</x-layouts.app>
|