@if($ticket->purchasecode != null )
@php
$aaa = Str::length($ticket->purchasecode);
@endphp
@if ($aaa != 36 )
@if (decrypt($ticket->purchasecode) != 'undefined')
{{lang('Purchase Code')}} :
@if(!empty(Auth::user()->getRoleNames()[0]) && Auth::user()->getRoleNames()[0] == 'superadmin')
{{decrypt($ticket->purchasecode)}}
@else
@if(setting('purchasecode_on') == 'on')
{{decrypt($ticket->purchasecode)}}
@else
{{ Str::padLeft(Str::substr(decrypt($ticket->purchasecode), -4), Str::length(decrypt($ticket->purchasecode)), Str::padLeft('*', 1)) }}
@endif
@endif
{{lang('View Details')}}
@if($ticket->purchasecodesupport == 'Supported')
{{lang('Support Active')}}
@elseif($ticket->purchasecodesupport == 'Expired')
{{lang('Support Expired')}}
@else
@endif
@endif
@else
{{lang('Purchase Code')}} :
@if(!empty(Auth::user()->getRoleNames()[0]) && Auth::user()->getRoleNames()[0] == 'superadmin')
{{$ticket->purchasecode}}
@else
@if(setting('purchasecode_on') == 'on')
{{$ticket->purchasecode}}
@else
{{ Str::padLeft(Str::substr($ticket->purchasecode, -4), Str::length($ticket->purchasecode), Str::padLeft('*', 1)) }}
@endif
@endif
{{lang('View Details')}}
@if($ticket->purchasecodesupport == 'Supported')
{{lang('Support Active')}}
@elseif($ticket->purchasecodesupport == 'Expired')
{{lang('Support Expired')}}
@else
@endif
@endif
@endif
@if($ticket->cust->logintype == 'envatosociallogin')
@if($ticket->usernameverify != null)
@if($ticket->usernameverify == 'verified')
@if(Auth::user()->getRoleNames()[0] == 'superadmin')
{{lang('The username in purchase details and the current logged-in username do not match. This customer’s username has been verified and is valid.')}}
{{lang('Unverifiy')}}
@endif
@else
{{lang('The username in purchase details and the current logged-in username do not match. This customer seems invalid, please take appropriate action.')}}
@if(Auth::user()->getRoleNames()[0] == 'superadmin')
{{lang('Verify')}}
@endif
@endif
@else
{{lang('The username in purchase details and the current logged-in username do not match. Verify customer details and proceed to the next step.')}}
{{lang('Valid User')}}
{{lang('Invalid User')}}
@endif
@endif
@if($ticket->ticketassignmutliples->isNotEmpty() && $ticket->selfassignuser_id == null)
@php
$toassignusers = $ticket->ticketassignmutliples;
$condition = false;
@endphp
@foreach ($toassignusers as $toassignuser)
@if($toassignuser->toassignuser->id == Auth::id())
@php $condition = true; @endphp
@endif
@endforeach
@if($condition)
{{lang('This ticket is assigned to you please respond.')}}
×
@else
{{lang('This ticket has already been assigned to another employee.')}}
@endif
@elseif($ticket->ticketassignmutliples->isEmpty() && $ticket->selfassignuser_id != null)
@if($ticket->selfassignuser_id != Auth::id())
{{lang('This ticket has already been assigned to another employee.')}}
@else
{{lang('This ticket has been selfassigned by you, please respond.')}}
×
@endif
@else
@endif
{!! $ticket->message !!}
@if($ticket->emailticketfile != null)
@if($ticket->emailticketfile == 'mismatch')
{{lang('Upload Failed')}}
@else
@php
$arraytype = explode(',', $ticket->emailticketfile);
@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 ($ticket->getMedia('ticket') as $ticketss)
@php
$a = explode('.', $ticketss->file_name);
$aa = $a[1];
@endphp
@if($aa == 'jpg' || $aa == 'jpeg' || $aa == 'JPG')
@elseif($aa == 'pdf')
@elseif($aa == 'csv')
@elseif($aa == 'png')
@else
@endif
@endforeach
@php $customfields = $ticket->ticket_customfield()->get(); @endphp
@if($customfields->isNotEmpty())
@foreach ($customfields as $customfield)
@if($customfield->fieldtypes == 'textarea')
@if($customfield->privacymode == '1')
@php
$extrafieldds = decrypt($customfield->values);
@endphp
@else
@endif
@endif
@endforeach
@endif
{{-- Reply Ticket Display --}}
@if($ticket->ticketassignmutliples->isNotEmpty() && $ticket->selfassignuser_id == null)
@if(!empty(Auth::user()->getRoleNames()[0]) && Auth::user()->getRoleNames()[0] == 'superadmin')
@include('admin.viewticket.showticketdata.showticketinclude')
@elseif(in_array(Auth::id(), $array))
@include('admin.viewticket.showticketdata.showticketinclude')
@else
@endif
@elseif($ticket->ticketassignmutliples->isEmpty() && $ticket->selfassignuser_id != null)
@if(!empty(Auth::user()->getRoleNames()[0]) && Auth::user()->getRoleNames()[0] == 'superadmin')
@include('admin.viewticket.showticketdata.showticketinclude')
@elseif($ticket->selfassignuser_id == Auth::id())
@include('admin.viewticket.showticketdata.showticketinclude')
@else
@endif
@else
@include('admin.viewticket.showticketdata.showticketinclude')
@endif
{{-- End Reply Ticket Display --}}
{{-- Comments Display --}}
@if($comments->isNOtEmpty())
{{ csrf_field() }}
@include('admin.viewticket.showticketdata')
@endif
{{-- End Comments Display --}}
@if($ticket->ticketassignmutliples->isNotEmpty() && $ticket->selfassignuser_id == null)
@if(!empty(Auth::user()->getRoleNames()[0]) && Auth::user()->getRoleNames()[0] == 'superadmin')
@include('admin.viewticket.showticketdata.ticketinfooter')
@elseif(in_array(Auth::id(), $array))
@include('admin.viewticket.showticketdata.ticketinfooter')
@else
@include('admin.viewticket.showticketdata.ticketinfo')
@endif
@elseif($ticket->ticketassignmutliples->isEmpty() && $ticket->selfassignuser_id != null)
@if(!empty(Auth::user()->getRoleNames()[0]) && Auth::user()->getRoleNames()[0] == 'superadmin')
@include('admin.viewticket.showticketdata.ticketinfooter')
@elseif($ticket->selfassignuser_id == Auth::id())
@include('admin.viewticket.showticketdata.ticketinfooter')
@else
@include('admin.viewticket.showticketdata.ticketinfo')
@endif
@else
@include('admin.viewticket.showticketdata.ticketinfooter')
@endif
@if($ticket->user_id == null)
@if($ticket->cust != null)
@if ($ticket->cust->image == null)
@else
@endif
{{$ticket->created_at->timezone(setting('default_timezone'))->format(setting('date_format'))}}
{{$ticket->created_at->timezone(setting('default_timezone'))->format(setting('time_format'))}}
@endif
@endif
@if($ticket->user_id != null)
@if($ticket->users != null)
@if ($ticket->users->image == null)
@else
@endif
{{lang('Created By')}}
{{$ticket->users->name}}
@if(!empty($ticket->users->getRoleNames()[0]))
({{$ticket->users->getRoleNames()[0]}})
@endif
{{$ticket->created_at->timezone(setting('default_timezone'))->format(setting('date_format'))}}
{{$ticket->created_at->timezone(setting('default_timezone'))->format(setting('time_format'))}}
@endif
@endif
@if($ticket->selfassignuser_id != null)
@if($ticket->selfassign != null)
@if ($ticket->selfassign->image == null)
@else
@endif
{{$ticket->selfassign->name}}
@if(!empty($ticket->selfassign->getRoleNames()[0]))
({{$ticket->selfassign->getRoleNames()[0]}})
@endif
{{lang('Self Assigned')}}
@endif
@endif
@if($ticket->selfassignuser_id == null)
@if($ticket->myassignuser != null)
@if ($ticket->myassignuser->image == null)
@else
@endif
{{$ticket->myassignuser->name}}
@if(!empty($ticket->myassignuser->getRoleNames()[0]))
({{$ticket->myassignuser->getRoleNames()[0]}})
@endif
{{lang('Assigner')}}
@endif
@php $toassignusers = $ticket->ticketassignmutliples; @endphp
@if($toassignusers->isNOtEmpty())
@foreach ($toassignusers as $toassignuser)
@if($toassignuser->toassignuser != null)
@if ($toassignuser->toassignuser->image == null)
@else
@endif
@endif
@endforeach
@endif
@endif
@if($ticket->closedby_user != null)
@if ($ticket->closedusers->image == null)
@else
@endif
{{$ticket->updated_at->timezone(setting('default_timezone'))->format(setting('date_format'))}}
{{$ticket->updated_at->timezone(setting('default_timezone'))->format(setting('time_format'))}}
@endif
@if ($ticket->cust->image == null)
@else
@endif
@if($ticket->cust->voilated == 'on')
{{lang('Voilation')}}
@endif
{{$ticket->cust->username}}
{{$ticket->cust->firstname}} {{$ticket->cust->lastname}}
{{ $ticket->cust->email }}
@php $emptynote = $ticket->ticketnote()->get() @endphp
@if($emptynote->isNOtEmpty())
@foreach ($ticket->ticketnote()->latest()->get() as $note)
@if($note->user_id == Auth::id() || Auth::user()->getRoleNames()[0] == 'superadmin')
@endif
{{$note->ticketnotes}}
{{$note->users->name}} @if(!empty($note->users->getRoleNames()[0])) ({{$note->users->getRoleNames()[0]}}) @endif
@endforeach
@else
{{lang('Don’t have any notes yet')}}
{{lang('Add your notes here')}}
@endif