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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user