From 85cccd1c11684412a00a2eb3b5a150fb6f3c4910 Mon Sep 17 00:00:00 2001 From: fsociety Date: Wed, 23 Oct 2024 16:15:18 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20fix(election):=20handle=20potent?= =?UTF-8?q?ial=20null=20values=20for=20end=5Ftime=20and=20candidates=20in?= =?UTF-8?q?=20election=20views?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../association/election/[Election:year].blade.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/views/pages/association/election/[Election:year].blade.php b/resources/views/pages/association/election/[Election:year].blade.php index 1702d11..c7eed17 100644 --- a/resources/views/pages/association/election/[Election:year].blade.php +++ b/resources/views/pages/association/election/[Election:year].blade.php @@ -42,7 +42,7 @@ mount(function () { ->toArray(); $this->loadEvents(); $this->loadBoardEvents(); - if ($this->election->end_time->isPast() || !config('services.voting')) { + if ($this->election->end_time?->isPast() || !config('services.voting')) { $this->isNotClosed = false; } }); @@ -123,7 +123,7 @@ $loadNostrEvents = function ($kinds) { }; $vote = function ($pubkey, $type, $board = false) { - if ($this->election->end_time->isPast()) { + if ($this->election->end_time?->isPast()) { $this->isNotClosed = false; return; } @@ -138,7 +138,7 @@ $vote = function ($pubkey, $type, $board = false) { }; $checkElection = function () { - if ($this->election->end_time->isPast()) { + if ($this->election->end_time?->isPast()) { $this->isNotClosed = false; } }; @@ -429,7 +429,7 @@ $signEvent = function ($event) {
@if($isNotClosed) + label="Die Wahl ist geöffnet bis zum {{ $election->end_time?->timezone('Europe/Berlin')->format('d.m.Y H:i') }}"/> @else @endif @@ -497,7 +497,7 @@ $signEvent = function ($event) {