Expand settings beyond QR into a full Events preferences page.
Deploy Ladill Events / deploy (push) Successful in 51s

Add event notification toggles, new-event defaults that pre-fill creation, and tuck QR styling into a secondary section.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-07 13:31:22 +00:00
co-authored by Cursor
parent 8a1d5708a9
commit 30528a0c7f
7 changed files with 340 additions and 73 deletions
+21 -1
View File
@@ -31,7 +31,9 @@ class QrSettingsTest extends TestCase
->get(route('account.settings'))
->assertOk()
->assertSee('favicon.ico', false)
->assertSee('New code defaults')
->assertSee('New event defaults')
->assertSee('QR code defaults')
->assertSee('New registrations')
->assertSee('Notifications');
}
@@ -44,6 +46,17 @@ class QrSettingsTest extends TestCase
'notify_email' => 'alerts@example.com',
'product_updates' => '1',
'low_balance_alerts' => '0',
'notify_registrations' => '1',
'notify_payouts' => '0',
'event_defaults' => [
'currency' => 'USD',
'mode' => 'free',
'badge_size' => '4x6',
'brand_color' => '#aabbcc',
'organizer' => 'CAPBuSS',
'registration_open' => '1',
'badge_fields' => ['Company', 'Title'],
],
'default_style' => [
'foreground' => '#112233',
'background' => '#ffffff',
@@ -61,6 +74,11 @@ class QrSettingsTest extends TestCase
$this->assertSame('alerts@example.com', $settings->notify_email);
$this->assertTrue($settings->product_updates);
$this->assertFalse($settings->low_balance_alerts);
$this->assertTrue($settings->notify_registrations);
$this->assertFalse($settings->notify_payouts);
$this->assertSame('USD', $settings->resolvedEventDefaults()['currency']);
$this->assertSame('free', $settings->resolvedEventDefaults()['mode']);
$this->assertSame('CAPBuSS', $settings->resolvedEventDefaults()['organizer']);
$this->assertSame('#112233', $settings->resolvedDefaultStyle()['foreground']);
$this->assertSame('scan_me', $settings->resolvedDefaultStyle()['frame_style']);
}
@@ -72,6 +90,7 @@ class QrSettingsTest extends TestCase
'user_id' => $user->id,
'default_type' => QrCode::TYPE_EVENT,
'default_style' => ['foreground' => '#aabbcc', 'module_style' => 'dots'],
'event_defaults' => ['mode' => 'contributions', 'organizer' => 'Test Org', 'brand_color' => '#ff00aa'],
]);
Http::fake([
@@ -83,6 +102,7 @@ class QrSettingsTest extends TestCase
->assertOk()
->assertSee('favicon.ico', false)
->assertSee('#aabbcc', false)
->assertSee('Test Org', false)
->assertSee('"event"', false);
}
}