{{ $slot }}
@include('layouts.partials.head')
@include('layouts.partials.theme-script') @php $path = '/'.ltrim(request()->path(), '/'); $path = $path === '/' ? '/' : $path; $showAddBarMb = collect(['/transactions', '/budgets', '/goals', '/subscriptions', '/debts']) ->contains(fn ($p) => str_starts_with($path, $p)); $searchRows = collect() ->merge(collect($finance->quickSearchTransactions(5))->map(fn (array $r) => [ 'type' => (string) __('budgets.nav.transactions'), 'name' => (string) ($r['name'] ?? ''), 'href' => url('/transactions'), ])) ->merge(collect($finance->quickSearchBudgets(3))->map(fn (array $r) => [ 'type' => (string) __('budgets.nav.budgets'), 'name' => (string) ($r['name'] ?? ''), 'href' => url('/budgets'), ])) ->merge(collect($finance->quickSearchGoals(3))->map(fn (array $r) => [ 'type' => (string) __('budgets.nav.goals'), 'name' => (string) ($r['name'] ?? ''), 'href' => url('/goals'), ])) ->merge(collect($finance->quickSearchSubscriptions(3))->map(fn (array $r) => [ 'type' => (string) __('budgets.nav.subscriptions'), 'name' => (string) ($r['name'] ?? ''), 'href' => url('/subscriptions'), ])) ->merge(collect($finance->quickSearchDebts(3))->map(fn (array $r) => [ 'type' => (string) __('budgets.nav.debts'), 'name' => (string) ($r['name'] ?? ''), 'href' => url('/debts'), ])) ->filter(fn (array $r) => $r['name'] !== '') ->values() ->all(); $searchPlaceholder = __('budgets.shell.search_placeholder'); $searchEmpty = __('budgets.shell.search_empty'); $notifTitle = __('budgets.shell.notifications_heading'); $notifUnreadSuffix = __('budgets.shell.notifications_unread_suffix'); $hasNotificationsTable = \Illuminate\Support\Facades\Schema::hasTable('notifications'); $notifRows = auth()->check() && $hasNotificationsTable ? auth()->user()->notifications()->latest()->limit(20)->get()->map(function ($n): array { $data = is_array($n->data) ? $n->data : []; return [ 'id' => (string) $n->id, 'title' => (string) ($data['title'] ?? __('budgets.shell.notification_fallback_title')), 'message' => (string) ($data['message'] ?? ''), 'time' => $n->created_at?->diffForHumans(), 'read' => $n->read_at !== null, 'type' => (string) ($data['severity'] ?? 'info'), 'action_url' => (string) ($data['action_url'] ?? '/dashboard'), ]; })->values()->all() : []; @endphp{{ __('budgets.quick_create.eyebrow') }}
{{ $item['label'] }}
{{ $item['helper'] }}