@extends('layouts.admin.master') @section('content') @if (session('success'))
{{ session('success') }}
@endif
Detail Grup

{{ $conversation->name ?: 'Grup tanpa nama' }}

Dibuat oleh {{ $conversation->creator?->name ?: 'Sistem' }}. Grup ini berisi {{ number_format($conversation->participants->count()) }} anggota dan menampilkan {{ number_format($messages->count()) }} pesan terakhir.

@csrf
@error('name')
{{ $message }}
@enderror
@forelse ($messages as $message)
{{ $message->user?->name ?? 'Anggota' }}
{{ $message->user?->name ?? 'Anggota' }} {{ $message->created_at?->format('d M Y, H:i') }}

{{ $message->body }}

@empty
Belum ada pesan di grup ini. Setelah anggota mulai bercakap, riwayat obrolan akan muncul di sini.
@endforelse
Tambah Anggota
Masukkan anggota baru ke grup
@csrf
@error('participant_ids')
{{ $message }}
@enderror @error('participant_ids.*')
{{ $message }}
@enderror
Anggota Grup
Komposisi peserta aktif
@foreach ($conversation->participants as $participant)
{{ $participant->name }}
{{ $participant->anggota?->nama ?: $participant->name }} {{ $participant->username ?: $participant->email }} {{ $participant->anggota?->nama ?: 'Belum terhubung ke data anggota' }}
@if ((int) $participant->id !== (int) $conversation->created_by)
@csrf @method('DELETE')
@else Pembuat @endif
@endforeach
Zona Hapus
Hapus grup dari sistem

Menghapus grup akan menghapus hubungan anggota dan seluruh riwayat pesan di grup ini.

@csrf @method('DELETE')
@endsection @section('stylesheet') @endsection