@extends('admin.layouts.app') @section('title','Notice Board') @section('breadcrumb') / Notice Board @endsection @section('content')
Post and manage notices for users and departments
| S.N. | Title | Posted Date | Flash Start | Flash End | Target | Flashing? | Status | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ ($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>
|
|
|
No notices posted yet @if(auth()->user()->hasPermission('notices.create')) Post First Notice @endif |
||||||||