From 1217bdac4173ca27a4949d113766ad5e5c596fc3 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Sat, 6 Jun 2026 19:39:27 +0000 Subject: [PATCH] Fix 500 on authenticated pages by correcting Afia route. Point Afia chat at servers.afia.chat, add missing input-error component, and fix stale layout/order route names. Co-authored-by: Cursor --- resources/views/components/input-error.blade.php | 9 +++++++++ resources/views/hosting/server-order.blade.php | 2 +- resources/views/layouts/hosting.blade.php | 6 +++--- resources/views/partials/afia.blade.php | 14 +++++--------- 4 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 resources/views/components/input-error.blade.php diff --git a/resources/views/components/input-error.blade.php b/resources/views/components/input-error.blade.php new file mode 100644 index 0000000..9e6da21 --- /dev/null +++ b/resources/views/components/input-error.blade.php @@ -0,0 +1,9 @@ +@props(['messages']) + +@if ($messages) + +@endif diff --git a/resources/views/hosting/server-order.blade.php b/resources/views/hosting/server-order.blade.php index 119f4f9..117bc83 100644 --- a/resources/views/hosting/server-order.blade.php +++ b/resources/views/hosting/server-order.blade.php @@ -22,7 +22,7 @@ ])->all(); $statusColors['approved'] = 'bg-amber-50 text-amber-700 border-amber-200'; - $backRoute = $order->product?->type === 'dedicated' ? route('hosting.dedicated') : route('hosting.vps'); + $backRoute = $order->product?->type === 'dedicated' ? route('servers.dedicated') : route('servers.vps'); $backLabel = $order->product?->type === 'dedicated' ? 'Dedicated Servers' : 'VPS'; $serverOrder = (array) ($order->meta['server_order'] ?? []); $selectionSummary = (array) ($serverOrder['selection_summary'] ?? []); diff --git a/resources/views/layouts/hosting.blade.php b/resources/views/layouts/hosting.blade.php index 0b9e88f..7464f6e 100644 --- a/resources/views/layouts/hosting.blade.php +++ b/resources/views/layouts/hosting.blade.php @@ -36,9 +36,9 @@ @endphp @include('partials.mobile-bottom-nav', [ 'homeUrl' => route('servers.dashboard'), - 'homeActive' => request()->routeIs('servers.dashboard') || request()->routeIs('hosting.index'), - 'searchUrl' => route('servers.dashboard'), - 'searchActive' => request()->routeIs('hosting.*'), + 'homeActive' => request()->routeIs('servers.dashboard'), + 'searchUrl' => route('servers.search'), + 'searchActive' => request()->routeIs('servers.search'), 'notificationsUrl' => route('notifications.index'), 'notificationsActive' => request()->routeIs('notifications.*'), 'unreadUrl' => route('notifications.unread'), diff --git a/resources/views/partials/afia.blade.php b/resources/views/partials/afia.blade.php index adc2c23..a0b5058 100644 --- a/resources/views/partials/afia.blade.php +++ b/resources/views/partials/afia.blade.php @@ -1,16 +1,12 @@ @php - $afiaProduct = $afiaProduct ?? (request()->routeIs('email.*') ? 'email' : 'hosting'); - $afiaGreeting = $afiaProduct === 'email' - ? "Hi, I'm Afia 👋 Ask me anything about email — setting up a domain, verifying DNS, creating mailboxes, IMAP/SMTP settings or billing…" - : "Hi, I'm Afia 👋 Ask me anything about hosting — choosing a plan, linking a domain, using the control panel, SSL, or renewals…"; - $afiaSuggestions = $afiaProduct === 'email' - ? ['How do I set up email for my domain?', 'What DNS records do I need to verify?', 'How do I create a mailbox?', 'What are my IMAP and SMTP settings?'] - : ['How do I link a domain to my hosting?', 'How do I open the control panel?', 'How do I renew my hosting plan?', 'How do I install WordPress?']; - $afiaSubtitle = $afiaProduct === 'email' ? 'Email assistant' : 'Hosting assistant'; + $afiaProduct = $afiaProduct ?? 'servers'; + $afiaGreeting = "Hi, I'm Afia 👋 Ask me anything about servers — choosing VPS or dedicated, ordering, SSH access, server panel, or billing…"; + $afiaSuggestions = ['What is the difference between VPS and dedicated?', 'How do I order a VPS?', 'How do I access my server panel?', 'How do I renew my server?']; + $afiaSubtitle = 'Servers assistant'; @endphp {{-- Afia — Ladill AI assistant slide-over. Opened via $dispatch('afia-open'). --}}