updated table structure for photobooth/sparkbooth settings. now there's a separate table for it. update all references and tests. also fixed the notification panel and the lightbox in the guest app.
This commit is contained in:
@@ -7,13 +7,13 @@ use App\Enums\GuestNotificationDeliveryStatus;
|
||||
use App\Enums\GuestNotificationState;
|
||||
use App\Enums\GuestNotificationType;
|
||||
use App\Events\GuestPhotoUploaded;
|
||||
use App\Jobs\ProcessPhotoSecurityScan;
|
||||
use App\Models\Event;
|
||||
use App\Models\EventJoinToken;
|
||||
use App\Models\EventMediaAsset;
|
||||
use App\Models\GuestNotification;
|
||||
use App\Models\Photo;
|
||||
use App\Models\PhotoShareLink;
|
||||
use App\Jobs\ProcessPhotoSecurityScan;
|
||||
use App\Services\Analytics\JoinTokenAnalyticsRecorder;
|
||||
use App\Services\EventJoinTokenService;
|
||||
use App\Services\EventTasksCacheService;
|
||||
@@ -44,6 +44,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
class EventPublicController extends BaseController
|
||||
{
|
||||
private const SIGNED_URL_TTL_SECONDS = 1800;
|
||||
|
||||
private const BRANDING_SIGNED_TTL_SECONDS = 3600;
|
||||
|
||||
public function __construct(
|
||||
@@ -952,7 +953,7 @@ class EventPublicController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<int, array|mixed> $sources
|
||||
* @param array<int, array|mixed> $sources
|
||||
*/
|
||||
private function firstStringFromSources(array $sources, array $keys): ?string
|
||||
{
|
||||
@@ -969,7 +970,7 @@ class EventPublicController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<int, array|mixed> $sources
|
||||
* @param array<int, array|mixed> $sources
|
||||
*/
|
||||
private function firstNumberFromSources(array $sources, array $keys): ?float
|
||||
{
|
||||
@@ -1778,6 +1779,7 @@ class EventPublicController extends BaseController
|
||||
$branding = $this->buildGalleryBranding($event);
|
||||
$settings = $this->normalizeSettings($event->settings ?? []);
|
||||
$engagementMode = $settings['engagement_mode'] ?? 'tasks';
|
||||
$event->loadMissing('photoboothSetting');
|
||||
|
||||
if ($joinToken) {
|
||||
$this->joinTokenService->incrementUsage($joinToken);
|
||||
@@ -1792,7 +1794,7 @@ class EventPublicController extends BaseController
|
||||
'updated_at' => $event->updated_at,
|
||||
'type' => $eventTypeData,
|
||||
'join_token' => $joinToken?->token,
|
||||
'photobooth_enabled' => (bool) $event->photobooth_enabled,
|
||||
'photobooth_enabled' => (bool) ($event->photoboothSetting?->enabled),
|
||||
'branding' => $branding,
|
||||
'guest_upload_visibility' => Arr::get($event->settings ?? [], 'guest_upload_visibility', 'review'),
|
||||
'engagement_mode' => $engagementMode,
|
||||
@@ -2558,7 +2560,7 @@ class EventPublicController extends BaseController
|
||||
$lastPage = (int) ceil($total / $perPage);
|
||||
$hasMore = $page < $lastPage;
|
||||
|
||||
$etag = sha1($baseHash . ':' . $page . ':' . $perPage . ':' . $seedValue);
|
||||
$etag = sha1($baseHash.':'.$page.':'.$perPage.':'.$seedValue);
|
||||
$reqEtag = $request->headers->get('If-None-Match');
|
||||
|
||||
if ($reqEtag && $reqEtag === $etag) {
|
||||
|
||||
Reference in New Issue
Block a user