{{--
Welcome Parthiban!
--}}
{{-- --}} search
Dashboard
{{--
--}} {{--
--}}
Notifications

See all your notification

View All Notification {{-- --}}
@php $isAdmin = auth()->user()->role_id == 1; $notifQuery = \App\Models\UserNotification::where('user_id', auth()->id())->where( 'is_deleted', false, ); if ($isAdmin) { $notifQuery->whereHas('notification', function ($q) { $q->where(function ($q2) { $q2->whereIn('type', [ 'quotation_approval_request', 'client_approval_request', 'product_approval_request', ])->where('sender_id', '!=', auth()->id()); })->orWhereIn('type', [ 'quotation_followup_set', 'sales_followup_set', 'quotation_expiry', // ← add 'payment_due', // ← add ]); }); } else { $notifQuery->whereHas('notification', function ($q) { $q->whereIn('type', [ 'quotation_expiry', 'quotation_approved', 'quotation_rejected', 'client_approved', 'client_rejected', 'product_approved', 'product_rejected', ]); }); } $unreadCount = (clone $notifQuery)->where('is_read', false)->count(); $recentNotifs = (clone $notifQuery) ->with('notification.sender') ->orderByDesc('created_at') ->limit(5) ->get(); @endphp @forelse($recentNotifs as $userNotif) @php $notif = $userNotif->notification; @endphp
avatar
{{ optional($notif->sender)->name ?? 'System' }} {{ $notif->title }} @if (!$userNotif->is_read) @endif

{{ Str::limit($notif->body, 60) }}

{{ $userNotif->created_at->diffForHumans() }}
@empty
No notifications
@endforelse
Profile Change Password
Logout
Confirm Logout

Are you sure you want to log out of the admin panel?

For security reasons, ensure all changes are saved before continuing.

Confirm Logout