@php
$dashboardRoute = 'welcome';
if (Auth::check()) {
if (Auth::user()->role === 'admin') {
$dashboardRoute = 'admin.dashboard';
} elseif (Auth::user()->role === 'seller') {
$dashboardRoute = 'seller.dashboard';
} elseif (Auth::user()->role === 'storekeeper') {
$dashboardRoute = 'storekeeper.dashboard';
}
}
@endphp
@if (Auth::user()->role === 'admin')
{{ __('Admin Dashboard') }}
@elseif (Auth::user()->role === 'seller')
{{ __('Seller Dashboard') }}
@elseif (Auth::user()->role === 'storekeeper')
{{ __('Storekeeper Dashboard') }}
@else
{{ __('Dashboard') }}
@endif
@can('sell-stock')
@if(Auth::user()->role === 'seller')
{{ __('My Sales') }}
{{ __('Available Stock') }}
{{ __('Received Stock') }}
@endif
@endcan
@auth
@if(Auth::user()->role === 'admin' || Auth::user()->role === 'storekeeper' || Auth::user()->role === 'seller')
{{ __('Stock Overview') }}
@endif
{{-- **CORRECTED:** Login History Links for Desktop --}}
@can('view-my-login-history') {{-- Using the correct Gate --}}
{{ __('My Login History') }}
@endcan
@can('view-all-login-history') {{-- Using the correct Gate --}}
{{ __('All Users Login History') }}
@endcan
{{-- END CORRECTED --}}
@endauth