{{ __('messages.tickets') }} @can('add tickets unknown') @livewire('add-button-component', ['link_route' => route('control.tickets.create'), 'value' => __('messages.new ticket')]) @endcan
@if (session()->has('message'))
{{ session('message') }}
@endif
{{ __('messages.search') }}
.defer {{ __('messages.type') }} ticket_type_id @foreach (\App\Models\TicketType::all() as $type) @endforeach
.defer ticket_status_id {{ __('messages.Status') }} @foreach (\App\Models\TicketStatus::all() as $status) @endforeach
.defer message {{ __('messages.message') }}
{{--
.defer {{__('messages.type')}} account_type Account Type
.defer account_id {{__('messages.Account name')}} @if ($account_type == 'App\\Models\\Customer') @foreach (\App\Models\Customer::whereHas('tickets')->get() as $customer) @endforeach @elseif ($account_type == "App\\Models\\LeadCustomer") @foreach (\App\Models\LeadCustomer::whereHas('tickets')->get() as $lead) @endforeach @elseif ($account_type == "App\\Models\\Corporate") @foreach (\App\Models\LeadCustomer::whereHas('tickets')->get() as $corporate) @endforeach @else @endif
--}}
# {{ __('messages.ID No') }} {{ __('messages.message') }} {{ __('messages.type') }} {{ trans_choice('messages.Sources', 1) }} {{ __('messages.Status') }} {{ __('messages.Account name') }} {{ __('messages.Updated By') }} {{ __('messages.Updated At') }} {{ __('messages.Created by') }} {{ __('messages.Created at') }}   @forelse ($tickets as $key =>$ticket) #{{ $tickets->firstItem() + $key }} {{ __('messages.ID No') }}{{ $ticket->id }} {{ __('messages.message') }} @php $all_msg =$ticket->ticket_users()->where("user_id" , auth()->id())->groupBy('msg')->pluck("msg"); // $msg =$ticket->ticket_users()->where("user_id" , auth()->id())->first()->msg; @endphp @foreach ($all_msg as $msg) @if ($msg =="to") {{$msg}} @else {{$msg}} @endif @endforeach {{ __('messages.type') }} {{ $ticket->ticket_type_id ? $ticket->ticket_type->name : '-' }} {{ trans_choice('messages.Sources', 1) }} {{ $ticket->ticket_source_id ? $ticket->ticket_source->name : '-' }} {{ __('messages.Status') }} md:max-w-4xl

ticket_status_id) style="background-color:{{ $ticket->ticket_status->color }}" @endif> {{ $ticket->ticket_status_id ? $ticket->ticket_status->name : '-' }}

Show Status History Details m-0 # {{ __('messages.from') }} {{ __('messages.to') }} {{ __('messages.By') }} {{ __('messages.comment') }} {{ __('messages.Created At') }} @forelse ($ticket->ticket_status_histories as $key =>$ticket_status_history) #{{ ++$key }} {{ __('messages.from') }} status_from_id) style="background-color:{{ $ticket_status_history->from_status->color }} @endif "> {{ $ticket_status_history->status_from_id ? $ticket_status_history->from_status->name : '-' }} {{ __('messages.to') }} status_to_id) style="background-color:{{ $ticket_status_history->to_status->color }} @endif "> {{ $ticket_status_history->status_to_id ? $ticket_status_history->to_status->name : '-' }} {{ __('messages.By') }} {{ $ticket_status_history->last_updated_by ? $ticket_status_history->last_updated_by_user->name : '' }} {{ __('messages.comment') }} @if ($ticket_status_history->comment_id) @if ($ticket_status_history->comment_detail->url) {{ $ticket_status_history->comment_detail->comment }} @else {{ $ticket_status_history->comment_detail->comment }} @endif @endif {{ __('messages.Created At') }} {{ $ticket_status_history->created_at }} @empty {{ __('messages.Empty Result') }} @endforelse
{{ __('messages.Account name') }} @switch($ticket->account_type) @case('App\Models\Customer') {{ $ticket->account->name }} @break @case('App\Models\LeadCustomer') {{ $ticket->account->name }} @break @case('App\Models\Corporate') {{ $ticket->account->name }} @break @endswitch {{ __('messages.Updated By') }} @php $last_history = $ticket ->ticket_status_histories() ->latest() ->first(); @endphp {{ $last_history->last_updated_by_user ? $last_history->last_updated_by_user->name : '-' }} {{ __('messages.Updated At') }} {{ date_format($last_history->updated_at, 'M j, Y, g:i a') }} {{ __('messages.Created by') }} {{ $ticket->last_updated_by_user ? $ticket->last_updated_by_user->name : '-' }} {{ __('messages.Created At ') }} {{ date_format($ticket->created_at, 'M j, Y, g:i a') }}
@can('edit tickets') @endcan @can('delete tickets') {{ trans_choice('messages.tickets_q', 1) }} {{ $ticket->id }} @endcan
@empty {{ __('messages.Empty Result') }} @endforelse
{{ $tickets->links() }}