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:
Codex Agent
2025-12-18 08:49:56 +01:00
parent ece38fc009
commit 1c4acda332
30 changed files with 734 additions and 538 deletions

View File

@@ -2,7 +2,7 @@
namespace App\Console\Commands;
use App\Models\Event;
use App\Models\EventPhotoboothSetting;
use App\Services\Photobooth\PhotoboothProvisioner;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
@@ -17,12 +17,20 @@ class DeactivateExpiredPhotoboothAccounts extends Command
{
$total = 0;
Event::query()
->where('photobooth_enabled', true)
->whereNotNull('photobooth_expires_at')
->where('photobooth_expires_at', '<=', now())
->chunkById(50, function ($events) use (&$total, $provisioner) {
foreach ($events as $event) {
EventPhotoboothSetting::query()
->where('enabled', true)
->where('mode', 'ftp')
->whereNotNull('expires_at')
->where('expires_at', '<=', now())
->with('event')
->chunkById(50, function ($settings) use (&$total, $provisioner) {
foreach ($settings as $setting) {
$event = $setting->event;
if (! $event) {
continue;
}
try {
$provisioner->disable($event);
$total++;