@php $authUser04 = Auth::guard('web')->user(); if ($authUser04 && $authUser04->image) { $userImage04 = asset('assets/uploads/profile/' . $authUser04->image); } else { $userImage04 = asset('assets/static/img/author/author.jpg'); } $liveChatRoute04 = null; $unreadMsgCount04 = 0; $topbarNotifs04 = collect(); $unreadNotifCount04 = 0; $notifReadRoute04 = '#'; if ($authUser04) { $liveChatRoute04 = $authUser04->user_type == 2 ? 'freelancer.live.chat' : 'client.live.chat'; if ($authUser04->user_type == 2) { $topbarNotifs04 = \App\Models\FreelancerNotification::where('freelancer_id', $authUser04->id)->latest()->limit(15)->get(); $unreadNotifCount04 = \App\Models\FreelancerNotification::where('freelancer_id', $authUser04->id)->where('is_read', 'unread')->count(); $notifReadRoute04 = route('freelancer.notification.read'); if (moduleExists('Chat')) { $unreadMsgCount04 = \Modules\Chat\Entities\LiveChatMessage::whereHas('liveChat', fn($q) => $q->where('freelancer_id', $authUser04->id))->where('from_user', 1)->where('is_seen', 0)->count(); } } else { $topbarNotifs04 = \App\Models\ClientNotification::where('client_id', $authUser04->id)->latest()->limit(15)->get(); $unreadNotifCount04 = \App\Models\ClientNotification::where('client_id', $authUser04->id)->where('is_read', 'unread')->count(); $notifReadRoute04 = route('client.notification.read'); if (moduleExists('Chat')) { $unreadMsgCount04 = \Modules\Chat\Entities\LiveChatMessage::whereHas('liveChat', fn($q) => $q->where('client_id', $authUser04->id))->where('from_user', 2)->where('is_seen', 0)->count(); } } } $notifIconMap04 = [ 'Order' => '', 'Withdraw' => '', 'Deposit' => '', 'New Job' => '', 'Job' => '', 'Proposal' => '', 'Offer' => '', 'Ticket Update' => '', 'Reject Project' => '', 'Activate Project' => '', 'Inactivate Project' => '', ]; $notifIconDefault04 = ''; $notifColorMap04 = [ 'Order' => 'color-mix(in srgb, var(--main-color-one) 10%, transparent)', 'Withdraw' => '#FFF4E8', 'Deposit' => 'color-mix(in srgb, var(--main-color-one) 10%, transparent)', 'New Job' => '#F0F2FF', 'Job' => '#F0F2FF', 'Proposal' => '#F0F2FF', 'Offer' => '#FFF4E8', 'Ticket Update' => '#F0F2FF', 'Reject Project' => '#FFF0F2', 'Activate Project' => 'color-mix(in srgb, var(--main-color-one) 10%, transparent)', 'Inactivate Project' => '#ECEDEF', ]; $notifTextColorMap04 = [ 'Order' => 'var(--main-color-one)', 'Withdraw' => '#FA8C00', 'Deposit' => 'var(--main-color-one)', 'New Job' => '#4F46E5', 'Job' => '#4F46E5', 'Proposal' => '#4F46E5', 'Offer' => '#FA8C00', 'Ticket Update' => '#4F46E5', 'Reject Project' => '#F0416C', 'Activate Project' => 'var(--main-color-one)', 'Inactivate Project' => '#637381', ]; @endphp {{-- Search --}} @if($authUser04) @php $dashRoute04 = $authUser04->user_type == 2 ? route('freelancer.dashboard') : route('client.dashboard'); $logoutRoute04 = $authUser04->user_type == 2 ? route('freelancer.logout') : route('client.logout'); @endphp {{-- Chat --}} @if(moduleExists('Chat')) @if($unreadMsgCount04 > 0) {{ $unreadMsgCount04 > 99 ? '99+' : $unreadMsgCount04 }} @endif @endif {{-- Notification bell --}}
{{-- Dropdown --}}
{{-- Avatar dropdown --}}
@else {{-- Guest --}} @if(moduleExists('Community')) {{ __('Community') }} @endif {{ __('Sign In') }} @endif {{-- Search overlay --}}