@php use Illuminate\Support\Str; $viewer = auth()->user(); $discoverUsers = $discoverUsers ?? collect(); $pendingGroupInvites = $pendingGroupInvites ?? collect(); $pinnedConversations = $pinnedConversations ?? collect(); $recentConversations = $recentConversations ?? collect(); $archivedConversations = $archivedConversations ?? collect(); $activeConversationId = request()->integer('chat'); $activeConversationId = $activeConversationId > 0 ? $activeConversationId : 0; $visibleConversationCount = $pinnedConversations->count() + $recentConversations->count(); $groupConversationCount = $pinnedConversations ->concat($recentConversations) ->where('type', '!=', 'direct') ->count(); $pendingInviteCount = $pendingGroupInvites->count(); @endphp
tomCHAT Recents @if ($visibleConversationCount > 0) {{ $groupConversationCount > 0 ? "{$groupConversationCount} grup aktif ada di riwayat anda." : 'Obrolan terbaru anda.' }} @elseif ($pendingInviteCount > 0) Anda punya {{ $pendingInviteCount }} undangan grup yang menunggu respon. @else Mulai percakapan baru atau buat grup dari sini. @endif
Baru
@if ($pendingGroupInvites->isNotEmpty())
@foreach ($pendingGroupInvites as $invite) @php $inviteConversation = $invite->conversation; $inviteName = $inviteConversation->displayNameFor($viewer); $inviteSearch = implode(' ', [ $inviteName, $inviteConversation->description, $invite->invitedBy?->chatLabel(), $invite->invitedBy?->email, ]); @endphp
{{ $inviteName }}
{{ $inviteName }} Undangan

{{ $invite->invitedBy?->chatLabel() ?? 'Anggota' }} mengundang anda ke grup ini.

@csrf
@csrf
@endforeach
@endif @if ($pinnedConversations->isNotEmpty())
@foreach ($pinnedConversations as $conversation) @include('layouts.admin.body.partials.member-obrolan-conversation-item', [ 'conversation' => $conversation, 'viewer' => $viewer, 'activeConversationId' => $activeConversationId, ]) @endforeach
@endif
@if ($recentConversations->isNotEmpty()) @endif @forelse ($recentConversations as $conversation) @include('layouts.admin.body.partials.member-obrolan-conversation-item', [ 'conversation' => $conversation, 'viewer' => $viewer, 'activeConversationId' => $activeConversationId, ]) @empty
Belum ada riwayat chat

Riwayat obrolan akan tampil di sini setelah percakapan pertama dibuat.

@endforelse
@if ($archivedConversations->isNotEmpty())
@foreach ($archivedConversations as $conversation) @include('layouts.admin.body.partials.member-obrolan-conversation-item', [ 'conversation' => $conversation, 'viewer' => $viewer, 'activeConversationId' => $activeConversationId, ]) @endforeach
@endif
@foreach ($discoverUsers as $candidate) @php $userSearchText = implode(' ', [ $candidate->name, $candidate->username, $candidate->email, ]); @endphp {{ $candidate->chatLabel() }}
{{ $candidate->chatLabel() }}

{{ $candidate->email }}

@endforeach
Tidak ada hasil

Coba nama lain, username, atau potongan pesan yang berbeda.