Bugfix showing late fee for entries on day of deadline.
This commit is contained in:
parent
5be092d2ed
commit
8cd1c8e3ff
|
|
@ -4,6 +4,7 @@ namespace App\Services;
|
||||||
|
|
||||||
use App\Actions\Tabulation\RankAuditionEntries;
|
use App\Actions\Tabulation\RankAuditionEntries;
|
||||||
use App\Models\Entry;
|
use App\Models\Entry;
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
|
||||||
|
|
@ -22,8 +23,9 @@ class EntryService
|
||||||
if ($entry->hasFlag('wave_late_fee')) {
|
if ($entry->hasFlag('wave_late_fee')) {
|
||||||
return false;
|
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
|
public function entryExists(Entry $entry): bool
|
||||||
|
|
@ -44,6 +46,7 @@ class EntryService
|
||||||
if (isset($rankedEntry->score_message)) {
|
if (isset($rankedEntry->score_message)) {
|
||||||
return $rankedEntry->score_message;
|
return $rankedEntry->score_message;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $rankings->find($entry->id)->rank ?? 'No Rank';
|
return $rankings->find($entry->id)->rank ?? 'No Rank';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue