@extends('adminlte::page') @section('title', 'Communications') @section('content_header')

Communications

New Communication
@include('partials.datatables') @stop @section('content')

Filters & Search

Communications List

{{ $communications->total() }} total
@if($communications->count() > 0)
@foreach($communications as $communication) @php $type = strtolower($communication->communication_type); $icons = [ 'email' => 'envelope', 'phone' => 'phone', 'meeting' => 'handshake', 'note' => 'sticky-note', 'letter' => 'file-alt', 'message' => 'comment-dots', 'whatsapp' => 'whatsapp', ]; $icon = $icons[$type] ?? 'comments'; $typeColors = [ 'email' => 'info', 'phone' => 'warning', 'meeting' => 'secondary', 'note' => 'secondary', 'letter' => 'secondary', 'message' => 'primary', 'whatsapp' => 'success', ]; $color = $typeColors[$type] ?? 'secondary'; @endphp @endforeach
Subject Case Type From/To Date Priority Actions
@if(!$communication->is_read) @endif @if($communication->replies->count() > 0) @endif {{ Str::limit($communication->subject ?: strip_tags($communication->content), 80) }} @if($communication->parent_id)
Re: {{ Str::limit($communication->parent->subject ?? 'Previous message', 40) }} @endif
@if($communication->case) {{ $communication->case->case_number }} @else — @endif {{ ucfirst($type) }} @if($communication->direction) {{ ucfirst($communication->direction) }} @endif
{{ $communication->user->name ?? 'Unknown' }}
@if($communication->to_phone) → {{ $communication->to_phone }} @endif
{{ $communication->communication_date->format('Y-m-d') }} {{ $communication->communication_date->format('H:i') }} @php $priorityColors = [ 'low' => 'success', 'medium' => 'info', 'high' => 'warning', 'urgent' => 'danger' ]; $color = $priorityColors[$communication->priority] ?? 'secondary'; @endphp {{ ucfirst($communication->priority) }} @if($communication->external_status) WA: {{ $communication->external_status }} @endif
@csrf @method('DELETE')
@else
No communications found

Start a conversation by creating a new communication.

New Communication
@endif
@stop @section('css') @stop @section('js') @stop