From 8cd1c8e3ffeb622f1521759863819c56d45c4630 Mon Sep 17 00:00:00 2001 From: Matt Young Date: Tue, 15 Oct 2024 20:52:04 -0500 Subject: [PATCH] Bugfix showing late fee for entries on day of deadline. --- app/Services/EntryService.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Services/EntryService.php b/app/Services/EntryService.php index 0f719e0..d9cb4b2 100644 --- a/app/Services/EntryService.php +++ b/app/Services/EntryService.php @@ -4,6 +4,7 @@ namespace App\Services; use App\Actions\Tabulation\RankAuditionEntries; use App\Models\Entry; +use Illuminate\Support\Carbon; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Cache; @@ -22,8 +23,9 @@ class EntryService if ($entry->hasFlag('wave_late_fee')) { return false; } + $deadline = Carbon::parse($entry->audition->entry_deadline); - return $entry->created_at > $entry->audition->entry_deadline; + return $entry->created_at->setTimezone('CST')->format('Y-m-d') > $entry->audition->entry_deadline; } public function entryExists(Entry $entry): bool @@ -44,6 +46,7 @@ class EntryService if (isset($rankedEntry->score_message)) { return $rankedEntry->score_message; } + return $rankings->find($entry->id)->rank ?? 'No Rank'; } }