@extends('global.app') @section('title', trans('communication.title.texts')) @section('page_stylesheets') @endsection @section('profile_bar')
@if ($recipient->profile_image_filename === 'default-profile.jpg')
{{ strtoupper($recipient->first_name[0] . $recipient->last_name[0]) }}
@else {{ $recipient->first_name . ' ' . $recipient->last_name }} @endif

{{ $recipient->first_name . ' ' . $recipient->last_name }}

@if ($recipient->status) {{ trans('communication.status.active', array( 'role' => studly_case($recipient->role), )) }} @else {{ trans('communication.status.inactive', array( 'role' => studly_case($recipient->role), )) }} @endif
@if(in_array($user->role, array('super', 'admin')) && in_array($recipient->role, array('broker', 'client', 'staff'))) {{ trans('communication.button.profile') }} @endif
{{ trans('communication.label.email') }}

{{ $recipient->email }}

{{ trans('communication.label.phone') }}

{{ $recipient->phone or '(---) ---- --- ---' }}

{{ trans('communication.label.birthday') }}

{{ is_null($recipient->birthday) ? '---------- --, ----' : date('jS F Y', strtotime($recipient->birthday)) }}

{{ trans('communication.label.address') }}

{{ $recipient->address or '. . .' }}

@endsection @section('content') @parent
@include('global.status')

{{ trans('communication.table.title.texts', array( 'name' => $recipient->first_name )) }}

@forelse ($texts as $text)

{{ trans('communication.table.header.from') }}: {{ $text->sender->phone }} - {{ $text->sender->first_name }}

{{ csrf_field() }} {{ method_field('DELETE') }}

{{ $text->message }}
{{ date('F d, Y H:i', strtotime($text->created_at)) }}

@empty

{{ trans('communication.table.message.empty') }}

@endforelse
@endsection @section('modals') @endsection @section('page_scripts') @endsection