Add mobile bottom nav and hide header avatar on small screens.
Deploy Ladill POS / deploy (push) Successful in 1m1s
Deploy Ladill POS / deploy (push) Successful in 1m1s
POS now uses the shared Ladill mobile header and bottom navigation pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,6 +27,33 @@
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
@auth
|
||||
@php
|
||||
$navUser = auth()->user();
|
||||
$navInitials = collect(explode(' ', trim((string) $navUser?->name)))
|
||||
->filter()->take(2)
|
||||
->map(fn ($part) => strtoupper(substr($part, 0, 1)))
|
||||
->implode('');
|
||||
$navAvatarUrl = $navUser && method_exists($navUser, 'avatarUrl')
|
||||
? $navUser->avatarUrl()
|
||||
: ($navUser?->avatar_url ?? null);
|
||||
@endphp
|
||||
@include('partials.mobile-bottom-nav', [
|
||||
'homeUrl' => route('pos.dashboard'),
|
||||
'homeActive' => request()->routeIs('pos.dashboard'),
|
||||
'searchUrl' => route('pos.products.index'),
|
||||
'searchActive' => request()->routeIs('pos.products.*'),
|
||||
'notificationsUrl' => route('notifications.index'),
|
||||
'notificationsActive' => request()->routeIs('notifications.*'),
|
||||
'unreadUrl' => route('notifications.unread'),
|
||||
'profileActive' => false,
|
||||
'profileName' => $navUser?->name ?? '',
|
||||
'profileSubtitle' => $navUser?->email ?? '',
|
||||
'profileMenuItems' => \App\Support\UserProfileMenu::items($navUser),
|
||||
'avatarUrl' => $navAvatarUrl,
|
||||
'initials' => $navInitials !== '' ? $navInitials : 'U',
|
||||
])
|
||||
@endauth
|
||||
@include('partials.afia')
|
||||
@include('partials.confirm-prompt')
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user