@foreach ($comments as $comment) @php $empGoogleTranslate = App\Models\Setting::where('key', 'emp_google_translate')->value('value') @endphp {{--Admin Reply status--}} @if($comment->user_id != null) @if ($comment->user_id == '741741741')
@if (setting('bot_image') == null) default @else default @endif
{{ setting('bot_name') }} {{ lang('Bot') }}
@if(\Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('Y-m-d') == now()->timezone(timeZoneData())->format('Y-m-d')) {{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('h:i A') }} ({{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->diffForHumans() }}) @if($ticket->tickettype != 'emalitoticket' && $comment->lastseen == null) {{lang('Sent')}} @endif @else {{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('D, d M Y, h:i A') }} ({{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->diffForHumans() }}) @if($ticket->tickettype != 'emalitoticket' && $comment->lastseen == null) {{lang('Sent')}} @endif @endif @if($ticket->tickettype != 'emalitoticket') @if($comment->lastseen != null) {{lang('Seen')}} {{lang(\Carbon\Carbon::parse($comment->lastseen)->timezone(timeZoneData())->diffForHumans())}}@endif @endif {{-- --}}
{!! $comment->comment !!}
{{-- translate button html --}} @if($empGoogleTranslate == 'on') @endif
@else @if ($loop->first)
@if ($comment->user != null) @if ($comment->user->image == null) default @else {{$comment->user->image}} @endif @else default @endif
@if($comment->user != null)
{{ $comment->user->name }}@if(!empty($comment->user->getRoleNames()[0])){{ $comment->user->getRoleNames()[0] }}@endif
@else
~
@endif @if(\Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('Y-m-d') == now()->timezone(timeZoneData())->format('Y-m-d')) {{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('h:i A') }} ({{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->diffForHumans() }}) @if($ticket->tickettype != 'emalitoticket' && $comment->lastseen == null) {{lang('Sent')}} @endif @else {{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('D, d M Y, h:i A') }} ({{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->diffForHumans() }}) @if($ticket->tickettype != 'emalitoticket' && $comment->lastseen == null) {{lang('Sent')}} @endif @endif @if($ticket->tickettype != 'emalitoticket' && $comment->lastseen != null) {{lang('Seen')}} {{lang(\Carbon\Carbon::parse($comment->lastseen)->timezone(timeZoneData())->diffForHumans())}} @endif {{-- --}}
{!! $comment->comment !!}
@csrf
{{--
--}}
{{lang('The file size should not be more than', 'filesetting')}} {{setting('USER_FILE_UPLOAD_MAX_SIZE')}}{{lang('MB', 'filesetting')}}
@foreach ($comment->getMedia('comments') as $commentss) @endforeach
@if(setting('ticketrating') == 'off')
rating_on_off == 'on') checked="" @endif> ({{lang('If you Enable this switch, you stop rating page to the customer')}})
@endif
@if (Auth::id() == $comment->user_id)
@foreach ($comment->getMedia('comments') as $commentss) @php $a = explode('.', $commentss->file_name); $aa = $a[1]; @endphp
@if($aa == 'jpg' || $aa == 'jpeg' || $aa == 'JPG') @elseif($aa == 'pdf') @elseif($aa == 'csv') @elseif($aa == 'png') @else @endif

{{ $a[0] }}

.{{ $a[1] }}
{{-- --}}
@endforeach
@else
@foreach ($comment->getMedia('comments') as $commentss) @php $a = explode('.', $commentss->file_name); $aa = $a[1]; @endphp
@if($aa == 'jpg' || $aa == 'jpeg' || $aa == 'JPG') @elseif($aa == 'pdf') @elseif($aa == 'csv') @elseif($aa == 'png') @else @endif

{{ $a[0] }}

.{{ $a[1] }}
@endforeach
@endif
@if($ticket->status == 'Closed')
@if($ticket->tickettype != 'emalitoticket' && $comment->lastseen == null)
@endif @can('Article Create')
@endcan
@else @if (Auth::id() == $comment->user_id || Auth::user()->getRoleNames()[0] == 'superadmin') @if($comment->display != null || $ticket->status == "Re-Open") @php $hasItems = false; @endphp @if((($comment->lastseen == null || $empGoogleTranslate == 'on') && $ticket->tickettype != 'emalitoticket') || ($ticket->tickettype == 'emalitoticket' && $empGoogleTranslate == 'on'))
@endif @endif @endif @endif
@else
@if($comment->user != null) @if ($comment->user->image == null) default @else {{$comment->user->image}} @endif @else default @endif
@if($comment->user != null)
{{ $comment->user->name }}@if(!empty($comment->user->getRoleNames()[0])){{ $comment->user->getRoleNames()[0] }}@endif
@else
~
@endif @if(\Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('Y-m-d') == now()->timezone(timeZoneData())->format('Y-m-d')) {{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('h:i A') }} ({{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->diffForHumans() }}) @if($ticket->tickettype != 'emalitoticket' && $comment->lastseen == null) {{lang('Sent')}} @endif @else {{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('D, d M Y, h:i A') }} ({{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->diffForHumans() }}) @if($ticket->tickettype != 'emalitoticket' && $comment->lastseen == null) {{lang('Sent')}} @endif @endif @if($ticket->tickettype != 'emalitoticket' && $comment->lastseen != null) {{lang('Seen')}} {{lang(\Carbon\Carbon::parse($comment->lastseen)->timezone(timeZoneData())->diffForHumans())}} @endif {{-- --}}
{!! $comment->comment !!}
@csrf
{{--
--}}
{{lang('The file size should not be more than', 'filesetting')}} {{setting('USER_FILE_UPLOAD_MAX_SIZE')}}{{lang('MB', 'filesetting')}}
@foreach ($comment->getMedia('comments') as $commentss) @endforeach
@if(setting('ticketrating') == 'off')
rating_on_off == 'on') checked="" @endif> ({{lang('If you Enable this switch, you stop rating page to the customer')}})
@endif
@foreach ($comment->getMedia('comments') as $commentss) @php $a = explode('.', $commentss->file_name); $aa = $a[1]; @endphp
@if($aa == 'jpg' || $aa == 'jpeg' || $aa == 'JPG') @elseif($aa == 'pdf') @elseif($aa == 'csv') @elseif($aa == 'png') @else @endif

{{ $a[0] }}

.{{ $a[1] }}
@endforeach
@if (Auth::user()->getRoleNames()[0] == 'superadmin') @if($ticket->status != 'Closed') {{-- @if($comment->lastseen == null) --}} {{--
--}} {{-- @if($comment->lastseen == null || $empGoogleTranslate == 'on') --}} @if((($comment->lastseen == null || $empGoogleTranslate == 'on') && $ticket->tickettype != 'emalitoticket') || ($ticket->tickettype == 'emalitoticket' && $empGoogleTranslate == 'on'))
@endif {{-- @endif --}} @endif @endif @if($ticket->status == 'Closed') @can('Article Create')
@endcan @endif
@endif @endif {{--Admin Reply status end--}} {{--Customer Reply status--}} @else
@if ($comment->cust->image == null) default @else {{$comment->cust->image}} @endif
{{ $comment->cust->username }} {{ $comment->cust->userType }}
@if(\Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('Y-m-d') == now()->timezone(timeZoneData())->format('Y-m-d')) {{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('h:i A') }} ({{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->diffForHumans() }}) @else {{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->format('D, d M Y, h:i A') }} ({{ \Carbon\Carbon::parse($comment->created_at)->timezone(timeZoneData())->diffForHumans() }}) @endif
@if ($ticket->tickettype == 'emalitoticket') @if ($comment->commentfrom == 'guestview') {!! $comment->comment !!} @else {!! nl2br(e($comment->comment)) !!} @endif @else {!! $comment->comment !!} @endif
@if($comment->emailcommentfile != null) @if($comment->emailcommentfile == 'mismatch') {{ lang('Upload Failed') }} @else @php $arraytype = explode(',', $comment->emailcommentfile); @endphp @foreach($arraytype as $arraytypes) @php $arrayextension = explode('.', $arraytypes); $finalextension = $arrayextension[1]; @endphp
@if($finalextension == 'jpg' || $finalextension == 'jpeg' || $finalextension == 'JPG') @elseif($finalextension == 'pdf') @elseif($finalextension == 'csv') @elseif($finalextension == 'png') @else @endif

{{ $arrayextension[0] }}

.{{ $arrayextension[1] }}
@endforeach @endif @endif @foreach ($comment->getMedia('comments') as $commentss) @php $a = explode('.', $commentss->file_name); $aa = $a[1]; @endphp
@if($aa == 'jpg' || $aa == 'jpeg' || $aa == 'JPG') @elseif($aa == 'pdf') @elseif($aa == 'csv') @elseif($aa == 'png') @else @endif

{{ $a[0] }}

.{{ $a[1] }}
@endforeach
{{-- translate button html --}} @if($empGoogleTranslate == 'on') @endif
@endif {{--Customer Reply status end--}} @endforeach {{-- @php if (!$hasItems) { echo ''; } @endphp --}}