diff --git a/app/Http/Controllers/Qr/AccountController.php b/app/Http/Controllers/Qr/AccountController.php index 7206c2d..78912c9 100644 --- a/app/Http/Controllers/Qr/AccountController.php +++ b/app/Http/Controllers/Qr/AccountController.php @@ -8,7 +8,6 @@ use App\Services\Billing\BillingClient; use App\Support\Qr\QrCornerStyleCatalog; use App\Support\Qr\QrFrameStyleCatalog; use App\Support\Qr\QrModuleStyleCatalog; -use App\Support\Qr\QrTypeCatalog; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\View\View; @@ -71,7 +70,6 @@ class AccountController extends Controller 'account' => $account, 'settings' => $settings, 'style' => $style, - 'types' => QrTypeCatalog::all(), 'moduleStyles' => QrModuleStyleCatalog::visible(), 'cornerOuterStyles' => QrCornerStyleCatalog::outerStyles(), 'cornerInnerStyles' => QrCornerStyleCatalog::innerStyles(), @@ -87,7 +85,6 @@ class AccountController extends Controller 'notify_email' => ['nullable', 'email', 'max:255'], 'product_updates' => ['nullable', 'boolean'], 'low_balance_alerts' => ['nullable', 'boolean'], - 'default_type' => ['nullable', 'in:'.implode(',', QrTypeCatalog::eventsTypes())], 'default_style' => ['nullable', 'array'], 'default_style.foreground' => ['nullable', 'regex:/^#[0-9a-fA-F]{6}$/'], 'default_style.background' => ['nullable', 'regex:/^#[0-9a-fA-F]{6}$/'], @@ -111,7 +108,6 @@ class AccountController extends Controller 'notify_email' => $data['notify_email'] ?? null, 'product_updates' => $request->boolean('product_updates'), 'low_balance_alerts' => $request->boolean('low_balance_alerts'), - 'default_type' => $data['default_type'] ?? null, 'default_style' => QrSetting::sanitizeDefaultStyle($data['default_style'] ?? null), ], ); diff --git a/app/Http/Controllers/Qr/QrCodeController.php b/app/Http/Controllers/Qr/QrCodeController.php index eee44eb..cc87224 100644 --- a/app/Http/Controllers/Qr/QrCodeController.php +++ b/app/Http/Controllers/Qr/QrCodeController.php @@ -79,7 +79,6 @@ class QrCodeController extends Controller return view('qr-codes.create', [ 'wallet' => $wallet, - 'types' => collect(QrTypeCatalog::all())->only([$requestedType])->all(), 'requestedType' => $requestedType, 'moduleStyles' => QrModuleStyleCatalog::visible(), 'cornerOuterStyles' => QrCornerStyleCatalog::outerStyles(), @@ -89,7 +88,6 @@ class QrCodeController extends Controller 'minTopup' => QrWallet::minTopupGhs(), 'ladillWalletBalance' => $this->platformBilling->balanceMinor($account->public_id) / 100, 'topupUrl' => 'https://'.config('app.account_domain').'/wallet', - 'defaultType' => $qrSettings->resolvedDefaultType(), 'accountDefaultStyle' => $qrSettings->resolvedDefaultStyle(), ]); } diff --git a/public/favicon.ico b/public/favicon.ico index c57a706..f042969 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/resources/views/qr-codes/create.blade.php b/resources/views/qr-codes/create.blade.php index f4e5c4c..4f0ca2e 100644 --- a/resources/views/qr-codes/create.blade.php +++ b/resources/views/qr-codes/create.blade.php @@ -1,9 +1,10 @@ - Create QR Code - @php + $createType = old('type', $requestedType ?? \App\Models\QrCode::TYPE_EVENT); + $isProgramme = $createType === \App\Models\QrCode::TYPE_ITINERARY; $defaultStyle = \App\Support\Qr\QrStyleDefaults::merge(old('style') ?: ($accountDefaultStyle ?? null)); @endphp + {{ $isProgramme ? 'New programme' : 'Create event' }}
@if(session('error')) @@ -23,29 +24,30 @@ {{-- Mobile page header --}}
- - Create QR code + {{ $isProgramme ? 'New programme' : 'Create event' }}
{{-- Desktop page header --}}
@csrf + {{-- Left: Sticky preview (desktop only) --}} -
- -
- @foreach($types as $key => $meta) - - @endforeach -
-
-
@include('qr-codes.partials.type-fields-create')

- Your QR always points to a Ladill short link. Change the destination any time without reprinting. + Attendees scan your Ladill event link — update details anytime without reprinting the QR.

@@ -171,7 +156,7 @@ diff --git a/resources/views/qr/account/settings.blade.php b/resources/views/qr/account/settings.blade.php index 9019875..f3df2f4 100644 --- a/resources/views/qr/account/settings.blade.php +++ b/resources/views/qr/account/settings.blade.php @@ -50,19 +50,6 @@

New code defaults

Pre-fill the create screen so every new QR starts with your brand look.

-
- - - @error('default_type')

{{ $message }}

@enderror -
-
diff --git a/tests/Feature/QrSettingsTest.php b/tests/Feature/QrSettingsTest.php index 8a77249..1a00ad7 100644 --- a/tests/Feature/QrSettingsTest.php +++ b/tests/Feature/QrSettingsTest.php @@ -43,7 +43,6 @@ class QrSettingsTest extends TestCase 'notify_email' => 'alerts@example.com', 'product_updates' => '1', 'low_balance_alerts' => '0', - 'default_type' => QrCode::TYPE_EVENT, 'default_style' => [ 'foreground' => '#112233', 'background' => '#ffffff', @@ -61,7 +60,6 @@ class QrSettingsTest extends TestCase $this->assertSame('alerts@example.com', $settings->notify_email); $this->assertTrue($settings->product_updates); $this->assertFalse($settings->low_balance_alerts); - $this->assertSame(QrCode::TYPE_EVENT, $settings->default_type); $this->assertSame('#112233', $settings->resolvedDefaultStyle()['foreground']); $this->assertSame('scan_me', $settings->resolvedDefaultStyle()['frame_style']); }