@extends('layouts.app') @section('title', 'Informasi Sekolah') @section('content') @php $itemsData = $items->map(fn ($i) => [ 'id' => $i->id, 'title' => $i->title, 'category' => $i->category ?? 'umum', 'event_date' => $i->event_date?->toDateString(), 'is_today' => $i->event_date?->isToday(), 'content' => $i->content ?? '', 'is_published' => (bool) $i->is_published, 'author' => $i->creator?->name ?? '-', 'time' => $i->created_at->diffForHumans(), ])->values(); $todayCount = $items->filter(fn ($i) => $i->event_date?->isToday())->count(); $draftCount = $items->where('is_published', false)->count(); $topCategoryRaw = $items->groupBy('category')->sortByDesc->count()->keys()->first(); $topCategoryLabel = $topCategoryRaw ? ucfirst($topCategoryRaw) : '—'; @endphp
{{-- Breadcrumb --}} {{-- Hero --}}

Informasi Sekolah

Pengumuman kegiatan sekolah yang tampil di aplikasi Wali Murid (S1WON DIGI)

{{ $items->count() }} informasi {{ $todayCount }} hari ini
@if(session('success'))
{{ session('success') }}
@endif {{-- KPI --}}
{{ $items->count() }}
Total Informasi
{{ $todayCount }}
Terbit Hari Ini
{{ $draftCount }}
Draft
{{ $topCategoryLabel }}
Kategori Terbanyak
{{-- Filter --}}

Menampilkan dari {{ $items->count() }} informasi

{{-- ===== Form ===== --}}

Tambah Informasi

@csrf

Judul singkat yang tampil di beranda wali murid.

{{-- ===== Daftar ===== --}}
{{-- Empty state --}}

@endsection