@extends('admin.layouts.app') @section('title','Notice Board') @section('breadcrumb') / Notice Board @endsection @section('content')
Reset
All Notices
{{ $notices->total() }} total
@forelse($notices as $i => $notice) @empty @endforelse
S.N.TitlePosted Date Flash StartFlash EndTarget Flashing?StatusActions
{{ ($notices->currentPage()-1)*$notices->perPage()+$i+1 }}
{{ $notice->title }}
{{ Str::limit($notice->description,60) }}
{{ $notice->created_at->format('d M Y') }} {{ $notice->flash_start_date?->format('d M Y') ?? '—' }} {{ $notice->flash_end_date?->format('d M Y') ?? '—' }} @php $targetLabels = [ 'all' => ['All Users','primary'], 'department' => [$notice->targetDepartment?->name ?? 'Dept','info'], 'role' => [$notice->targetRole?->name ?? 'Role','warning'], 'specific_user' => [$notice->targetUser?->name ?? 'User','secondary'], ]; [$label,$color] = $targetLabels[$notice->flash_to] ?? ['Unknown','secondary']; @endphp {{ $label }} @if($notice->isFlashingNow()) Live @else Not Flashing @endif
status==='active'?'checked':'' }} data-url="{{ route('admin.notices.toggle-status',$notice) }}" @if(!auth()->user()->hasPermission('notices.edit')) disabled @endif>
@if(auth()->user()->hasPermission('notices.edit')) @endif @if(auth()->user()->hasPermission('notices.delete')) @endif

No notices posted yet

@if(auth()->user()->hasPermission('notices.create')) Post First Notice @endif
@if($notices->hasPages()) @endif
@endsection @push('scripts') @endpush