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

Communication Details

Edit Back
@stop @section('content')

{{ $communication->subject }}

@php $priorityColors = [ 'low' => 'success', 'medium' => 'info', 'high' => 'warning', 'urgent' => 'danger' ]; $color = $priorityColors[$communication->priority] ?? 'secondary'; @endphp {{ ucfirst($communication->priority) }} Priority {{ ucfirst($communication->communication_type) }} {{ ucfirst($communication->direction) }}
From: {{ $communication->user->name ?? 'Unknown' }}
Date: {{ $communication->communication_date->format('M j, Y g:i A') }}
@if($communication->duration) Duration: {{ $communication->duration }} minutes
@endif
@if($communication->case) Case: {{ $communication->case->case_number }} - {{ $communication->case->title }}
@if($communication->case->client) Client: {{ $communication->case->client->display_name }}
@endif @endif @if($communication->participants && count($communication->participants) > 0) Participants:
@foreach($communication->participants as $participant) {{ $participant['name'] ?? 'Unknown' }} @endforeach @endif

{!! nl2br(e($communication->content)) !!}
@if($communication->replies->count() > 0)

Replies ({{ $communication->replies->count() }})

@foreach($communication->replies as $reply)
{{ $reply->user->name ?? 'Unknown' }} {{ $reply->communication_date->format('M j, Y g:i A') }} @if($reply->priority !== 'medium') {{ ucfirst($reply->priority) }} @endif
@csrf @method('DELETE')
{!! nl2br(e($reply->content)) !!}
@if(!$loop->last)
@endif @endforeach
@endif

Reply

@csrf
@error('content') {{ $message }} @enderror
@error('priority') {{ $message }} @enderror
@if($communication->case)

Case Information

Case Number: {{ $communication->case->case_number }}
Title: {{ $communication->case->title }}
Status: {{ ucfirst($communication->case->status) }}
Priority: {{ ucfirst($communication->case->priority) }}
@if($communication->case->client) Client: {{ $communication->case->client->display_name }}
@endif @if($communication->case->primaryLawyer) Primary Lawyer: {{ $communication->case->primaryLawyer->name }}
@endif
View Case New Communication
@endif @if($communication->case)

Related Communications

@php $relatedComms = $communication->case->communications() ->where('id', '!=', $communication->id) ->latest('communication_date') ->limit(5) ->get(); @endphp @if($relatedComms->count() > 0) @foreach($relatedComms as $related)
{{ $related->subject }}
{{ $related->communication_date->format('M j, Y') }} - {{ ucfirst($related->communication_type) }}
@endforeach View All Case Communications @else

No other communications for this case.

@endif
@endif

Actions

@if(!$communication->is_read) @endif Edit Communication
@csrf @method('DELETE')
@stop @section('css') @stop @section('js') @stop