@extends((auth()->user()->user_type !== 'staff') ? 'admin.layouts.app' : 'employee.layouts.app') @section('title', get_setting('site_name').' Notice') @section('content') @php $notificationService = app(\App\Services\HeaderNotificationService::class); $showBranchOnItems = $notificationService->showBranchOnItems(); $branchLabel = $notificationService->branchContextLabel(); @endphp
{{ __('Notifications') }}
@if($branchLabel) {{ __('Branch') }}: {{ $branchLabel }} @endif
{{ $notice->count() }} {{ __('unread') }}
@forelse($notice as $notify) @php $visual = $notificationService->visualForType($notify->type); $employeeName = $notify->staff?->user?->name; $branchName = $notify->staff?->warehouse?->name; @endphp
{{ $notify->type ?: __('Notification') }} {{ $notify->content }} @if($employeeName) {{ $employeeName }} @endif @if($showBranchOnItems && $branchName) {{ $branchName }} @endif @if($notify->created_at) {{ $notify->created_at->diffForHumans() }} @endif
@empty

{{ __('No new notifications') }}

{{ __('You are all caught up for now.') }}
@endforelse
@endsection