@extends('backend.template.layouts.template-base') @section('title', 'Notifications') @section('content')
{{-- ── Page Header ──────────────────────────────────────────────────────── --}}

Notifications

@if($unreadCount > 0)

{{ $unreadCount }} unread notification{{ $unreadCount > 1 ? 's' : '' }}

@endif
{{-- ── Notification Sound ───────────────────────────────────────────────── --}}
🔊 Notification Sound

Choose the tone played when a new order or admin alert arrives. Saved to your account — applies on any device you log into.

{{-- ── Filter Tabs ───────────────────────────────────────────────────────── --}}
@foreach($tabs as $key => $tab) {{ $tab['label'] }} @if($tab['count'] > 0) {{ $tab['count'] }} @endif @endforeach
{{-- ── Notification List ─────────────────────────────────────────────────── --}}
@forelse($notifications as $n)
data && !empty($n->data['url'])) data-url="{{ $n->data['url'] }}" style="cursor:pointer;" @endif>
@php $badgeClasses = [ 'new_order' => 'badge-type-order', 'low_stock' => 'badge-type-stock', 'payment' => 'badge-type-payment', 'new_user' => 'badge-type-user', 'cancelled' => 'badge-type-cancel', 'general' => 'badge-type-general', ]; $typeLabels = [ 'new_order' => 'Order', 'low_stock' => 'Stock Alert', 'payment' => 'Payment', 'new_user' => 'New User', 'cancelled' => 'Cancelled', 'general' => 'General', ]; @endphp {{ $typeLabels[$n->type] ?? ucfirst($n->type) }} @if(!$n->is_read) New @endif
{{ $n->title }}

{{ $n->message }}

{{ $n->created_at->diffForHumans() }}
@empty
No notifications found
@endforelse
{{-- ── Pagination ────────────────────────────────────────────────────────── --}} @if($notifications->hasPages())
{{ $notifications->links() }}
@endif
{{-- ── Delete confirmation modal ──────────────────────────────────────────── --}} @endsection @section('scripts') @endsection