From 987f7dce0c82670d0078b9e872a9ca6216336700 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Sun, 7 Jun 2026 18:54:59 +0000 Subject: [PATCH] Fix leftover Events routes breaking SSO and dashboard. Replace events.* route names with mini.* defaults, remove unused topbar search, and align deploy script with ladill-mini paths. Co-authored-by: Cursor --- .../Controllers/Auth/SsoLoginController.php | 10 ++-- app/Http/Controllers/Qr/TeamController.php | 2 +- composer.json | 4 +- config/services.php | 2 +- deploy/deploy.sh | 4 +- resources/views/partials/afia.blade.php | 14 +++--- resources/views/partials/topbar-qr.blade.php | 50 +------------------ resources/views/partials/topbar.blade.php | 2 +- 8 files changed, 21 insertions(+), 67 deletions(-) diff --git a/app/Http/Controllers/Auth/SsoLoginController.php b/app/Http/Controllers/Auth/SsoLoginController.php index 39c6a74..a5cebe2 100644 --- a/app/Http/Controllers/Auth/SsoLoginController.php +++ b/app/Http/Controllers/Auth/SsoLoginController.php @@ -21,14 +21,14 @@ class SsoLoginController extends Controller { public function connect(Request $request): RedirectResponse { - $intended = (string) $request->query('redirect', route('events.dashboard')); + $intended = (string) $request->query('redirect', route('mini.dashboard')); if (Auth::check()) { - return $this->safeRedirect($intended, route('events.dashboard')); + return $this->safeRedirect($intended, route('mini.dashboard')); } if ($this->attemptSilentRefresh($request, $intended)) { - return $this->safeRedirect($intended, route('events.dashboard')); + return $this->safeRedirect($intended, route('mini.dashboard')); } $verifier = Str::random(64); @@ -63,7 +63,7 @@ class SsoLoginController extends Controller public function callback(Request $request): RedirectResponse { - $intended = (string) $request->session()->get('sso.intended', route('events.dashboard')); + $intended = (string) $request->session()->get('sso.intended', route('mini.dashboard')); if ($request->filled('error')) { if (in_array($request->query('error'), ['login_required', 'interaction_required', 'consent_required'], true) @@ -118,7 +118,7 @@ class SsoLoginController extends Controller Auth::login($user, remember: true); $request->session()->regenerate(); - return $this->safeRedirect($intended, route('events.dashboard')); + return $this->safeRedirect($intended, route('mini.dashboard')); } public function logout(Request $request): RedirectResponse diff --git a/app/Http/Controllers/Qr/TeamController.php b/app/Http/Controllers/Qr/TeamController.php index 4077080..4891ee5 100644 --- a/app/Http/Controllers/Qr/TeamController.php +++ b/app/Http/Controllers/Qr/TeamController.php @@ -88,7 +88,7 @@ class TeamController extends Controller $request->session()->put('ladill_account', (int) $validated['account']); - return redirect()->route('events.dashboard'); + return redirect()->route('mini.dashboard'); } private function canManage(Request $request): bool diff --git a/composer.json b/composer.json index 298759b..c997075 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "$schema": "https://getcomposer.org/schema.json", - "name": "ladill/events", + "name": "ladill/mini", "type": "project", - "description": "Ladill Events — tickets, attendees, badges & programmes at events.ladill.com", + "description": "Ladill Mini — payment QR codes and wallet payouts at mini.ladill.com", "keywords": [ "laravel", "framework" diff --git a/config/services.php b/config/services.php index 836a7d1..458dd4d 100644 --- a/config/services.php +++ b/config/services.php @@ -23,7 +23,7 @@ return [ 'issuer' => 'https://'.config('app.auth_domain'), 'client_id' => env('LADILL_SSO_CLIENT_ID'), 'client_secret' => env('LADILL_SSO_CLIENT_SECRET'), - 'redirect' => rtrim((string) env('APP_URL', 'https://events.ladill.com'), '/').'/sso/callback', + 'redirect' => rtrim((string) env('APP_URL', 'https://mini.ladill.com'), '/').'/sso/callback', ], 'ladill_webmail' => [ diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 4aca844..47fca9d 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -2,7 +2,7 @@ # Fast on-host release deploy (same model as climpme/web/deploy/deploy.sh). set -Eeuo pipefail -APP_ROOT="${LADILL_APP_ROOT:-/var/www/ladill-events}" +APP_ROOT="${LADILL_APP_ROOT:-/var/www/ladill-mini}" RELEASES_DIR="$APP_ROOT/releases" SHARED_DIR="$APP_ROOT/shared" CURRENT_LINK="$APP_ROOT/current" @@ -236,7 +236,7 @@ if [ -L "$CURRENT_LINK" ] && [ -f "$CURRENT_LINK/artisan" ]; then (cd "$CURRENT_LINK" && php artisan queue:restart) || true fi if command -v supervisorctl >/dev/null 2>&1; then - supervisorctl restart ladill-events-worker:* 2>/dev/null || true + supervisorctl restart ladill-mini-worker:* 2>/dev/null || true fi log "Cleaning old releases" diff --git a/resources/views/partials/afia.blade.php b/resources/views/partials/afia.blade.php index dbbd5ed..9fe4d66 100644 --- a/resources/views/partials/afia.blade.php +++ b/resources/views/partials/afia.blade.php @@ -1,15 +1,15 @@ @php - $afiaGreeting = "Hi, I'm Afia 👋 Ask me about QR codes — creating a Business or WiFi code, styling and downloads, scan stats, or wallet billing…"; + $afiaGreeting = "Hi, I'm Afia 👋 Ask me about payment QRs — creating one, accepting payments, payouts, or the 5% platform fee…"; $afiaSuggestions = [ - 'How do I create a Business QR code?', - 'What is the difference between Link and List of Links?', - 'How do I download a print-ready PNG?', - 'Why is my wallet balance low?', + 'How do I create a payment QR?', + 'How do customers pay me?', + 'When do payouts reach my wallet?', + 'What is the platform fee?', ]; @endphp {{-- Afia — Ladill AI assistant slide-over. Opened via $dispatch('afia-open'). --}}

Afia

-

QR Plus assistant

+

Mini assistant

diff --git a/resources/views/partials/topbar-qr.blade.php b/resources/views/partials/topbar-qr.blade.php index 65c6773..a971c79 100644 --- a/resources/views/partials/topbar-qr.blade.php +++ b/resources/views/partials/topbar-qr.blade.php @@ -13,52 +13,6 @@ @include('partials.mobile-topbar-title') -
@@ -170,9 +124,9 @@
- QR Settings + Settings Account Settings - Dashboard + Dashboard
@csrf diff --git a/resources/views/partials/topbar.blade.php b/resources/views/partials/topbar.blade.php index aa08809..8e982e2 100644 --- a/resources/views/partials/topbar.blade.php +++ b/resources/views/partials/topbar.blade.php @@ -258,7 +258,7 @@ class="absolute right-0 z-20 mt-2 w-48 rounded-xl border border-slate-200 bg-white p-1 shadow-lg"> Profile Account Settings - Dashboard + Dashboard @csrf