add test batches

This commit is contained in:
root
2026-06-08 23:45:55 -04:00
parent c792b8be05
commit 8d4d610b82
1480 changed files with 22587 additions and 10762 deletions
+6 -6
View File
@@ -16,19 +16,19 @@ class EventListService
$activeOnly = $filters['active'] ?? null;
$allowedSorts = ['created_at', 'expiration_date', 'event_name'];
if (! in_array($sortBy, $allowedSorts, true)) {
if (!in_array($sortBy, $allowedSorts, true)) {
$sortBy = 'created_at';
}
$query = Event::query();
if (! empty($filters['school_year'])) {
if (!empty($filters['school_year'])) {
$query->where('school_year', (string) $filters['school_year']);
}
if (! empty($filters['semester'])) {
if (!empty($filters['semester'])) {
$query->where('semester', (string) $filters['semester']);
}
if (! empty($filters['q'])) {
if (!empty($filters['q'])) {
$term = trim((string) $filters['q']);
$query->where('event_name', 'like', "%{$term}%");
}
@@ -67,10 +67,10 @@ class EventListService
private function activeCount(array $filters): int
{
$query = Event::query()->whereDate('expiration_date', '>=', now()->toDateString());
if (! empty($filters['school_year'])) {
if (!empty($filters['school_year'])) {
$query->where('school_year', (string) $filters['school_year']);
}
if (! empty($filters['semester'])) {
if (!empty($filters['semester'])) {
$query->where('semester', (string) $filters['semester']);
}