mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-13 05:26:47 +00:00
real-time-admin-dashboard added
This commit is contained in:
@@ -345,9 +345,14 @@ $signEvent = function ($event) {
|
||||
<div class="sticky top-16">
|
||||
<div
|
||||
class="flex items-center justify-between before:absolute before:inset-0 before:backdrop-blur-md before:bg-gray-50/90 dark:before:bg-[#1B1B1B]/90 before:-z-10 border-b border-gray-200 dark:border-gray-700/60 px-4 sm:px-6 md:px-5 h-16">
|
||||
<div class="flex justify-between items-center">
|
||||
<div class="flex justify-between items-center w-full">
|
||||
<div>
|
||||
<x-badge success label="Die Wahl ist geöffnet bis zum 31.12.2024 um 22:00 Uhr"/>
|
||||
</div>
|
||||
<div>
|
||||
<x-button secondary :href="route('association.election.admin', ['election' => $election])" label="Wahl-Admin"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -399,7 +404,7 @@ $signEvent = function ($event) {
|
||||
</div>
|
||||
</div>
|
||||
<footer class="mt-5">
|
||||
<div class="flex justify-between items-center">
|
||||
<div class="grid grid-cols-3 gap-y-2">
|
||||
@foreach($electionConfig->firstWhere('type', $type)['candidates'] as $c)
|
||||
<div wire:click="vote('{{ $c['pubkey'] }}', '{{ $type }}')"
|
||||
class="{{ $c['votedClass'] }} cursor-pointer text-xs inline-flex font-medium rounded-full text-center px-2.5 py-1">
|
||||
|
||||
@@ -28,8 +28,6 @@ state(['currentPubkey' => null]);
|
||||
state(['votes' => null]);
|
||||
state(['events' => null]);
|
||||
state(['election' => fn() => $election]);
|
||||
state(['ehrenMitgliederCount' => 0]);
|
||||
state(['aktiveMitgliederCount' => 0]);
|
||||
state(['signThisEvent' => '']);
|
||||
state([
|
||||
'plebs' => fn()
|
||||
@@ -66,15 +64,6 @@ state([
|
||||
]);
|
||||
|
||||
mount(function () {
|
||||
$plebsCollection = collect($this->plebs);
|
||||
$this->ehrenMitgliederCount = $plebsCollection->where(
|
||||
'association_status',
|
||||
\App\Enums\AssociationStatus::HONORARY(),
|
||||
)->count();
|
||||
$this->aktiveMitgliederCount = $plebsCollection->where(
|
||||
'association_status',
|
||||
\App\Enums\AssociationStatus::ACTIVE(),
|
||||
)->count();
|
||||
$this->loadEvents();
|
||||
$this->loadVotes();
|
||||
});
|
||||
@@ -198,27 +187,6 @@ $loadEvents = function () {
|
||||
class="fa-sharp-duotone fa-solid {{ $position['icon'] }} w-5 h-5 fill-current text-white mr-4"></i>{{ $position['title'] }}
|
||||
</h2>
|
||||
</header>
|
||||
<div x-ref="chart_{{ $key }}-legend" class="px-5 py-3">
|
||||
<ul class="flex flex-wrap gap-x-4">
|
||||
<li>
|
||||
<button style="display: inline-flex; align-items: center;"><span
|
||||
class="text-gray-800 dark:text-gray-100"
|
||||
style="font-size: 1.88rem; line-height: 1.33; font-weight: 700; margin-right: 8px; pointer-events: none;">0 / {{ $ehrenMitgliederCount }}</span><span
|
||||
class="text-gray-500 dark:text-gray-400"
|
||||
style="font-size: 0.875rem; line-height: 1.5715;">Ehrenmitglieder</span>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button style="display: inline-flex; align-items: center;"><span
|
||||
style="display: flex; align-items: center;"><span
|
||||
class="text-gray-800 dark:text-gray-100"
|
||||
style="font-size: 1.88rem; line-height: 1.33; font-weight: 700; margin-right: 8px; pointer-events: none;">0 / {{ $aktiveMitgliederCount }}</span><span
|
||||
class="text-gray-500 dark:text-gray-400"
|
||||
style="font-size: 0.875rem; line-height: 1.5715;">Aktive Mitglieder</span></span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="grow">
|
||||
<!-- Change the height attribute to adjust the chart height -->
|
||||
<canvas x-ref="chart_{{ $key }}" width="724" height="288"
|
||||
|
||||
Reference in New Issue
Block a user