feat(election): add access control for election details and voting options based on user permissions.

This commit is contained in:
fsociety
2024-10-25 13:30:39 +02:00
parent 3936165a0e
commit 421d60e42b
8 changed files with 1049 additions and 926 deletions

View File

@@ -48,8 +48,23 @@ on([
<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>
@if($isAllowed)
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
<livewire:einundzwanzig-pleb-table/>
</div>
@else
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
<div class="bg-white dark:bg-[#1B1B1B] shadow overflow-hidden sm:rounded-lg">
<div class="px-4 py-5 sm:px-6">
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">Mitglieder</h3>
<p class="mt-1 max-w">
Du bist nicht berechtigt, Mitglieder zu bearbeiten.
</p>
</div>
</div>
</div>
@endif
</div>
@endvolt
</x-layouts.app>