Fix Event & EventType resource issues and apply formatting

- Fix EventType deletion error handling (constraint violations)
- Fix Event update error (package_id column missing)
- Fix Event Type dropdown options (JSON display issue)
- Fix EventPackagesRelationManager query error
- Add missing translations for deletion errors
- Apply Pint formatting
This commit is contained in:
Codex Agent
2026-01-21 10:34:06 +01:00
parent 198fbf6751
commit fa33e7cbcf
112 changed files with 334 additions and 280 deletions

View File

@@ -3,7 +3,6 @@
namespace App\Services\Analytics;
use App\Models\Event;
use App\Models\Photo;
use Illuminate\Support\Facades\DB;
class EventAnalyticsService
@@ -17,7 +16,7 @@ class EventAnalyticsService
// Adjust for timezone if necessary, but for now we'll use UTC or server time
// Ideally we should use the event's timezone if stored, or client's.
// We'll return data in ISO format buckets.
$stats = $event->photos()
->selectRaw('DATE_FORMAT(created_at, "%Y-%m-%d %H:00:00") as hour, count(*) as count')
->groupBy('hour')

View File

@@ -5,7 +5,6 @@ namespace App\Services\Analytics;
use App\Models\EventJoinToken;
use App\Models\EventJoinTokenEvent;
use Illuminate\Http\Request;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
class JoinTokenAnalyticsRecorder
@@ -109,4 +108,3 @@ class JoinTokenAnalyticsRecorder
return Str::substr($token, 0, 6).'…'.Str::substr($token, -4);
}
}

View File

@@ -19,6 +19,7 @@ class EmotionImportService
$headers = fgetcsv($handle, 0, ',');
if (! $headers) {
fclose($handle);
return [0, 0];
}

View File

@@ -192,4 +192,3 @@ class PhotoSecurityScanner
}
}
}

View File

@@ -8,8 +8,6 @@ use App\Models\EventStorageAssignment;
use App\Models\MediaStorageTarget;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
class EventStorageManager
{

View File

@@ -60,4 +60,3 @@ class StorageHealthService
}
}
}