Fix 500 on authenticated pages by correcting Afia route.
Deploy Ladill Servers / deploy (push) Successful in 22s
Deploy Ladill Servers / deploy (push) Successful in 22s
Point Afia chat at servers.afia.chat, add missing input-error component, and fix stale layout/order route names. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
@props(['messages'])
|
||||||
|
|
||||||
|
@if ($messages)
|
||||||
|
<ul {{ $attributes->merge(['class' => 'text-sm text-red-600 space-y-1']) }}>
|
||||||
|
@foreach ((array) $messages as $message)
|
||||||
|
<li>{{ $message }}</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
@endif
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
])->all();
|
])->all();
|
||||||
$statusColors['approved'] = 'bg-amber-50 text-amber-700 border-amber-200';
|
$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';
|
$backLabel = $order->product?->type === 'dedicated' ? 'Dedicated Servers' : 'VPS';
|
||||||
$serverOrder = (array) ($order->meta['server_order'] ?? []);
|
$serverOrder = (array) ($order->meta['server_order'] ?? []);
|
||||||
$selectionSummary = (array) ($serverOrder['selection_summary'] ?? []);
|
$selectionSummary = (array) ($serverOrder['selection_summary'] ?? []);
|
||||||
|
|||||||
@@ -36,9 +36,9 @@
|
|||||||
@endphp
|
@endphp
|
||||||
@include('partials.mobile-bottom-nav', [
|
@include('partials.mobile-bottom-nav', [
|
||||||
'homeUrl' => route('servers.dashboard'),
|
'homeUrl' => route('servers.dashboard'),
|
||||||
'homeActive' => request()->routeIs('servers.dashboard') || request()->routeIs('hosting.index'),
|
'homeActive' => request()->routeIs('servers.dashboard'),
|
||||||
'searchUrl' => route('servers.dashboard'),
|
'searchUrl' => route('servers.search'),
|
||||||
'searchActive' => request()->routeIs('hosting.*'),
|
'searchActive' => request()->routeIs('servers.search'),
|
||||||
'notificationsUrl' => route('notifications.index'),
|
'notificationsUrl' => route('notifications.index'),
|
||||||
'notificationsActive' => request()->routeIs('notifications.*'),
|
'notificationsActive' => request()->routeIs('notifications.*'),
|
||||||
'unreadUrl' => route('notifications.unread'),
|
'unreadUrl' => route('notifications.unread'),
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
@php
|
@php
|
||||||
$afiaProduct = $afiaProduct ?? (request()->routeIs('email.*') ? 'email' : 'hosting');
|
$afiaProduct = $afiaProduct ?? 'servers';
|
||||||
$afiaGreeting = $afiaProduct === 'email'
|
$afiaGreeting = "Hi, I'm Afia 👋 Ask me anything about servers — choosing VPS or dedicated, ordering, SSH access, server panel, or billing…";
|
||||||
? "Hi, I'm Afia 👋 Ask me anything about email — setting up a domain, verifying DNS, creating mailboxes, IMAP/SMTP settings 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?'];
|
||||||
: "Hi, I'm Afia 👋 Ask me anything about hosting — choosing a plan, linking a domain, using the control panel, SSL, or renewals…";
|
$afiaSubtitle = 'Servers assistant';
|
||||||
$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';
|
|
||||||
@endphp
|
@endphp
|
||||||
{{-- Afia — Ladill AI assistant slide-over. Opened via $dispatch('afia-open'). --}}
|
{{-- Afia — Ladill AI assistant slide-over. Opened via $dispatch('afia-open'). --}}
|
||||||
<div x-data="afia({
|
<div x-data="afia({
|
||||||
chatUrl: '{{ $afiaProduct === 'email' ? route('email.afia.chat') : route('hosting.afia.chat') }}',
|
chatUrl: '{{ route('servers.afia.chat') }}',
|
||||||
csrf: '{{ csrf_token() }}',
|
csrf: '{{ csrf_token() }}',
|
||||||
greeting: @js($afiaGreeting),
|
greeting: @js($afiaGreeting),
|
||||||
suggestions: @js($afiaSuggestions),
|
suggestions: @js($afiaSuggestions),
|
||||||
|
|||||||
Reference in New Issue
Block a user