@extends('template.layouts.template-base') @section('title', 'Notifications') @section('styles') @endsection @section('content')
{{-- Header --}} {{-- Main Container --}}
{{-- Tab Navigation --}}
@php $tabs = [ 'order' => 'Order', 'payment' => 'Payment', 'low_stock' => 'Inventory', 'new_user' => 'New User', ]; @endphp @foreach($tabs as $key => $label) {{ $label }} @if(($unreadCounts[$key] ?? 0) > 0) ({{ $unreadCounts[$key] }}) @else (0) @endif @endforeach
{{-- Notification List --}}
@forelse($notifications as $date => $group) @if($date !== 'Today')
{{ $date }}
@endif @foreach($group as $notification)
{{ strtoupper(substr($notification->type, 0, 1)) }}
{{ $notification->title }} {{ $notification->created_at->format('h:i A') }}

{{ $notification->message }}

@endforeach @empty
No {{ $tabs[$type] ?? '' }} notifications found.
@endforelse
{{-- Delete Confirm Modal --}} {{-- Success Toast --}}
@endsection @section('scripts') @endsection