@extends('voyager::master') @section('page_title', __('voyager::generic.viewing').' '.$dataType->getTranslatedAttribute('display_name_plural')) @section('page_header')
@can('delete', app($dataType->model_name)) @include('voyager::partials.bulk-delete') @endcan @can('edit', app($dataType->model_name)) @if(isset($dataType->order_column) && isset($dataType->order_display_column)) {{ __('voyager::bread.order') }} @endif @endcan @can('delete', app($dataType->model_name)) @if($usesSoftDeletes) @endif @endcan @foreach($actions as $action) @if (method_exists($action, 'massAction')) @include('voyager::bread.partials.actions', ['action' => $action, 'data' => null]) @endif @endforeach @include('voyager::multilingual.language-selector')
@stop @section('content')
@include('voyager::alerts') @if ($isServerSide) @endif {{--@php /*$types = [ "replied"=>, "waiting"=> , "new"=> ];*/ @endphp--}}
{{-- @foreach($types as $type => $name)--}} {{__('hotdesk.comment_ticket') . __('hotdesk.comment_replied')}} {{ fa_number(App\Models\Comment::query()->where('reply_to', '<>' ,0)->count()) }} {{__('hotdesk.comment_ticket') . __('hotdesk.comment_waiting')}} {{ fa_number(App\Models\Comment::query()->where('reply_to', '=' ,0)->where('client_id' , '<>' , null)->count()) }} {{__('hotdesk.comment_ticket') . __('hotdesk.comment_new')}} {{ fa_number(App\Models\Comment::query()->where('is_active', '=' ,0)->count()) }} {{-- @endforeach--}}
@if($showCheckboxColumn) @endif @foreach($dataType->browseRows as $row) @if($row->field == "support_belongsto_user_relationship") @endif @endforeach @foreach($dataTypeContent as $data) @if($showCheckboxColumn) @endif @foreach($dataType->browseRows as $row) @php if ($data->{$row->field.'_browse'}) { $data->{$row->field} = $data->{$row->field.'_browse'}; } @endphp @if($row->field == "support_belongsto_user_relationship") @endif @endforeach @endforeach
{{__('hotdesk.support_picture')}} @if ($isServerSide) @endif {{ $row->getTranslatedAttribute('display_name') }} @if ($isServerSide) @if ($row->isCurrentSortField($orderBy)) @if ($sortOrder == 'asc') @else @endif @endif @endif {{ __('voyager::generic.actions') }} فعال کردن
@php $user_avatar = ''; if($data->user()->exists()){ if (\Illuminate\Support\Str::startsWith($data->user->avatar, 'http://') || \Illuminate\Support\Str::startsWith($data->user->avatar, 'https://')) { $user_avatar = $data->user->avatar; } else { $user_avatar = Voyager::image($data->user->avatar); } } @endphp
@if (isset($row->details->view)) @include($row->details->view, ['row' => $row, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, 'content' => $data->{$row->field}, 'action' => 'browse', 'view' => 'browse', 'options' => $row->details]) @elseif($row->type == 'image') @elseif($row->type == 'relationship') @include('voyager::formfields.relationship', ['view' => 'browse','options' => $row->details]) @elseif($row->type == 'select_multiple') @if(property_exists($row->details, 'relationship')) @foreach($data->{$row->field} as $item) {{ $item->{$row->field} }} @endforeach @elseif(property_exists($row->details, 'options')) @if (!empty(json_decode($data->{$row->field}))) @foreach(json_decode($data->{$row->field}) as $item) @if (@$row->details->options->{$item}) {{ $row->details->options->{$item} . (!$loop->last ? ', ' : '') }} @endif @endforeach @else {{ __('voyager::generic.none') }} @endif @endif @elseif($row->type == 'multiple_checkbox' && property_exists($row->details, 'options')) @if (@count(json_decode($data->{$row->field})) > 0) @foreach(json_decode($data->{$row->field}) as $item) @if (@$row->details->options->{$item}) {{ $row->details->options->{$item} . (!$loop->last ? ', ' : '') }} @endif @endforeach @else {{ __('voyager::generic.none') }} @endif @elseif(($row->type == 'select_dropdown' || $row->type == 'radio_btn') && property_exists($row->details, 'options')) @if($row->field=='status') @php $types = [ "replied"=> "green", "waiting"=> "yellow", "new"=> "red", "closed"=> "gray" ]; @endphp {!! $row->details->options->{$data->{$row->field}} ?? '' !!} @else {!! $row->details->options->{$data->{$row->field}} ?? '' !!} @endif @elseif($row->type == 'date' || $row->type == 'timestamp') @if ( property_exists($row->details, 'format') && !is_null($data->{$row->field}) ) @if(Auth::user()->Locale =='fa') {{ \Morilog\Jalali\Jalalian::forge($data->messages()->orderby('created_at','desc')->first()->{$row->field})->ago() }} @else {{ \Carbon\Carbon::parse($data->messages()->orderby('created_at','desc')->first()->{$row->field})->diffForHumans() }} @endif @else @if(Auth::user()->Locale =='fa') {{ \Morilog\Jalali\Jalalian::forge($data->messages()->orderby('created_at','desc')->first()->{$row->field})->ago() }} @else {{ \Carbon\Carbon::parse($data->messages()->orderby('created_at','desc')->first()->{$row->field})->diffForHumans() }} @endif @endif @elseif($row->type == 'checkbox') @if(property_exists($row->details, 'on') && property_exists($row->details, 'off')) @if($data->{$row->field}) {{ $row->details->on }} @else {{ $row->details->off }} @endif @else {{ $data->{$row->field} }} @endif @elseif($row->type == 'color') {{ $data->{$row->field} }} @elseif($row->type == 'text') @if($row->field=='message_count') {{ $data->{$row->field} }} {{__('hotdesk.support_new_message')}} @else @include('voyager::multilingual.input-hidden-bread-browse')
{{ mb_strlen( $data->{$row->field} ) > 200 ? mb_substr($data->{$row->field}, 0, 200) . ' ...' : $data->{$row->field} }}
@endif @elseif($row->type == 'text_area') @include('voyager::multilingual.input-hidden-bread-browse')
{{ mb_strlen( $data->{$row->field} ) > 200 ? mb_substr($data->{$row->field}, 0, 200) . ' ...' : $data->{$row->field} }}
@elseif($row->type == 'file' && !empty($data->{$row->field}) ) @include('voyager::multilingual.input-hidden-bread-browse') @if(json_decode($data->{$row->field}) !== null) @foreach(json_decode($data->{$row->field}) as $file) {{ $file->original_name ?: '' }}
@endforeach @else Download @endif @elseif($row->type == 'rich_text_box') @include('voyager::multilingual.input-hidden-bread-browse')
{{ mb_strlen( strip_tags($data->{$row->field}, '') ) > 200 ? mb_substr(strip_tags($data->{$row->field}, ''), 0, 200) . ' ...' : strip_tags($data->{$row->field}, '') }}
@elseif($row->type == 'coordinates') @include('voyager::partials.coordinates-static-image') @elseif($row->type == 'multiple_images') @php $images = json_decode($data->{$row->field}); @endphp @if($images) @php $images = array_slice($images, 0, 3); @endphp @foreach($images as $image) @endforeach @endif @elseif($row->type == 'media_picker') @php if (is_array($data->{$row->field})) { $files = $data->{$row->field}; } else { $files = json_decode($data->{$row->field}); } @endphp @if ($files) @if (property_exists($row->details, 'show_as_images') && $row->details->show_as_images) @foreach (array_slice($files, 0, 3) as $file) @endforeach @else
    @foreach (array_slice($files, 0, 3) as $file)
  • {{ $file }}
  • @endforeach
@endif @if (count($files) > 3) {{ __('voyager::media.files_more', ['count' => (count($files) - 3)]) }} @endif @elseif (is_array($files) && count($files) == 0) {{ trans_choice('voyager::media.files', 0) }} @elseif ($data->{$row->field} != '') @if (property_exists($row->details, 'show_as_images') && $row->details->show_as_images) @else {{ $data->{$row->field} }} @endif @else {{ trans_choice('voyager::media.files', 0) }} @endif @else @include('voyager::multilingual.input-hidden-bread-browse') {{ $data->{$row->field} }} @endif
@php $class = get_class($actions[2]); $action = new $class($dataType, $data); @endphp تایید
@if ($isServerSide)
{{ trans_choice( 'voyager::generic.showing_entries', $dataTypeContent->total(), [ 'from' => $dataTypeContent->firstItem(), 'to' => $dataTypeContent->lastItem(), 'all' => $dataTypeContent->total() ]) }}
{{ $dataTypeContent->appends([ 's' => $search->value, 'filter' => $search->filter, 'key' => $search->key, 'order_by' => $orderBy, 'sort_order' => $sortOrder, 'showSoftDeleted' => $showSoftDeleted, ])->links() }}
@endif

{{__('hotdesk.support_template')}}

{{__('hotdesk.support_templates')}}

@foreach(Auth::user()->messagetemplate()->orderby('created_at','desc')->get() as $messagetemplate)

{{$messagetemplate->content}}

@endforeach
{{-- Single delete modal --}} @stop @section('css') @if(!$dataType->server_side && config('dashboard.data_tables.responsive')) @endif @stop @section('javascript') @if(!$dataType->server_side && config('dashboard.data_tables.responsive')) @endif @stop