@extends('layouts.main') @section('content')

Manajemen Rombongan

@if(session('success')) @endif @if(session('error')) @endif
Total Rombongan
{{ $rombongans->count() }}
Rombongan Aktif
{{ $rombongans->where('status', 'active')->count() }}
Total Anggota
{{ $rombongans->sum('active_members_count') }}
Rombongan Penuh
{{ $rombongans->filter(function($r) { return $r->active_members_count >= $r->max_members; })->count() }}
Data Rombongan
Tambah Rombongan
@forelse($rombongans as $index => $rombongan) @empty @endforelse
No Nama Rombongan Kode Ketua Anggota Kapasitas Status Dibuat Aksi
{{ $index + 1 }}
{{ strtoupper(substr($rombongan->name, 0, 2)) }}
{{ $rombongan->name }}
@if($rombongan->description) {{ Str::limit($rombongan->description, 40) }} @endif
{{ $rombongan->code }}
@if($rombongan->ketua->photo) Ketua @else
{{ strtoupper(substr($rombongan->ketua->name, 0, 2)) }}
@endif
{{ $rombongan->ketua->name }}
{{ $rombongan->ketua->email }}
{{ $rombongan->active_members_count }} orang @php $percentage = ($rombongan->active_members_count / $rombongan->max_members) * 100; @endphp
{{ $rombongan->active_members_count }}/{{ $rombongan->max_members }}
@if($rombongan->status === 'active') Aktif @else Tidak Aktif @endif
{{ $rombongan->created_at->format('d/m/Y') }}
{{ $rombongan->created_at->format('H:i') }}

Belum ada rombongan yang dibuat

Tambah Rombongan Pertama
@endsection