From ee0598515a43f88856a7de1766f7c28e87a16c91 Mon Sep 17 00:00:00 2001 From: fsociety Date: Wed, 2 Oct 2024 11:05:05 +0200 Subject: [PATCH] feat: Add presidency election feature to election view This commit adds a new feature to the election view which allows users to vote for the presidency. It also modifies the confirmation message for board member candidates. --- .../election/[Election:year].blade.php | 59 ++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/resources/views/pages/association/election/[Election:year].blade.php b/resources/views/pages/association/election/[Election:year].blade.php index 940d43e..3aa700a 100644 --- a/resources/views/pages/association/election/[Election:year].blade.php +++ b/resources/views/pages/association/election/[Election:year].blade.php @@ -409,9 +409,64 @@ $signEvent = function ($event) {
+

+ Wahl des Präsidiums +

+ @php + $president = $positions['presidency']; + @endphp +
+
+
+
+ +
+
+
+
+

{{ $president['title'] }}

+
+
+ @php + $votedResult = $loadedEvents->filter(fn ($event) => $event['pubkey'] === $currentPubkey)->firstWhere('type', 'presidency'); + @endphp + @if($votedResult) + Du hast "{{ $votedResult['votedFor']['name'] ?? 'error' }}" gewählt + @else + Wähle deinen Kandidaten für das Präsidium. + @endif +
+
+
+
+ @foreach($electionConfig->firstWhere('type', 'presidency')['candidates'] as $c) +
+
+ {{ $c['name'] }} + {{ $c['name'] }} +
+
+ @endforeach +
+
+
+
+ +

+ Bestätigung der Vorstandsmitglieder +

- @foreach($positions as $type => $position) + @foreach(collect($positions)->filter(fn($position, $type) => $type !== 'presidency') as $type => $position) @if($electionConfig->firstWhere('type', $type))
@@ -433,7 +488,7 @@ $signEvent = function ($event) { @if($votedResult) Du hast "{{ $votedResult['votedFor']['name'] ?? 'error' }}" gewählt @else - Klicke auf den Kandidaten, den du wählen möchtest. + Klicke auf den Kandidaten, um seine Position als Vorstandsmitglied zu bestätigen. @endif