@extends('layouts.account') @section('title', 'Обзор — личный кабинет') @section('content')

Здравствуйте, {{ auth()->user()->displayName() }}

{{-- Приглашение в магазин: доступ даётся только с согласия человека, поэтому оно ждёт его здесь, а не привязывается молча. --}} @if ($invitations->isNotEmpty())
@foreach ($invitations as $invitation)
Вас пригласили работать с магазином «{{ $invitation->seller?->public_name }}»
Роль: {{ $invitation->role->label() }}. {{ $invitation->role->hint() }}
@csrf
@endforeach
@endif
@php($tiles = [ ['Заказы', $recentOrders->count(), 'package', route('account.orders.index')], ['Избранное', $favoritesCount, 'heart', route('account.favorites.index')], ['Корзина', $cartCount, 'shopping-cart', route('account.cart.index')], ]) @foreach ($tiles as [$label, $value, $icon, $href])
{{ $label }}
{{ $value }}
@endforeach
{{-- Rest of the cabinet — the sidebar is hidden on mobile, so surface these here (#kabinet). --}}
{{-- «Адреса доставки» отключены — доставка через «Пункты выдачи». --}} @php($sections = [ ['Профиль', 'user', route('account.profile.edit'), null], ['Сообщения', 'message-circle', route('account.chat.index'), route('account.chat.unread')], ['Уведомления', 'bell', route('account.notifications.index'), route('account.notifications.unread')], ]) {{-- «Пункты выдачи» — тот же гейт, что в сайдбаре; на мобиле сайдбара нет, поэтому сюда. --}} @if (app(\App\Services\Shipping\CarrierRegistry::class)->pickupAvailable() || auth()->user()?->pickupPoints()->exists()) @php(array_splice($sections, 0, 0, [['Пункты выдачи', 'map-pinned', route('account.pickup-points.index'), null]])) @endif {{-- Иконка над подписью, счётчик — на углу иконки (как в нижней навигации). В строку это не помещается: на экране 360 px подписи остаётся ~70 px, а «Уведомления» занимает под 90 и переносу не поддаётся — одно слово. Раньше счётчик просто ложился поверх текста. --}} @foreach ($sections as [$label, $icon, $href, $unread]) @if ($unread) @endif {{ $label }} @endforeach

Последние заказы

@forelse ($recentOrders as $order) @include('account.orders.partials.row') @empty

Заказов пока нет.

@endforelse
@endsection