@extends('layouts.admin-page') @section('pageTitle',__('site.view-email')) @section('page-content')
@can('access','view_emails') @endcan @can('access','edit_email') @if($email->sent==0) @endif @endcan @can('access','delete_email')
{{ method_field('DELETE') }} {{ csrf_field() }}
@endcan

{{ $email->subject }}

{{ \Illuminate\Support\Carbon::parse($email->send_date)->diffForHumans() }}

@lang('site.to'): {{ $email->user->name }} ({{ roleName($email->user->role_id) }})

@if($email->sender()->exists())

@lang('site.created-by'): {{ $email->sender->name }} ({{ $email->sender->email }})

@endif @if(!empty($email->cc))

CC: {{ $email->cc }}

@endif
@lang('site.created-on'): {{ \Illuminate\Support\Carbon::parse($email->created_at)->format('d/M/Y') }}
@lang('site.send-date'): {{ \Illuminate\Support\Carbon::parse($email->send_date)->format('d/M/Y') }}
{!! clean( check($email->message) ) !!}
@if($email->emailAttachments()->exists() || $email->invoices()->exists() || $email->emailResources()->exists() || $email->candidates()->exists() )
@lang('site.attachments')

@foreach($email->candidates as $item) @endforeach
# @lang('site.picture') @lang('site.candidate') @lang('site.gender') @lang('site.email') @lang('site.age') @lang('site.profile-type') @lang('site.actions')
{{ $loop->iteration }}
@if(!empty($item->picture) && file_exists($item->picture)) @else @endif
{{ $item->user->name }} {{ gender($item->gender) }} {{ $item->user->email }} {{ getAge(\Illuminate\Support\Carbon::parse($item->date_of_birth)->timestamp) }} @if($email->profile_type=='p') @lang('site.partial') @else @lang('site.full') @endif @can('access','view_candidate')
@endcan
@endif
@endsection