@extends('backend.layout') @section('content')
{{ __('Ticket Details') }} - #{{ $ticket->ticket_number }}

{{ $ticket->subject }}

@if ($ticket->status != 3)
@csrf
@endif
@if ($ticket->status == 1) {{ __('Pending') }} @elseif($ticket->status == 2) {{ __('Open') }} @else {{ __('Closed') }} @endif {{ $ticket->created_at->format('d-m-Y') }} {{ date('h.i A', strtotime($ticket->created_at)) }}

{{ $ticket->description }}

@if ($ticket->attachment) {{ __('Download Attachment') }} @endif
{{ __('Replies') }}
@if (count($ticket->messages) > 0) @foreach ($ticket->messages as $reply) @if (!$reply->vendor_id) @php $admin = App\Models\Admin::find($ticket->admin_id); @endphp
...
{{ $admin->username }}
{{ $admin->id == 1 ? 'Super Admin' : $admin->role->name }}

{!! $reply->reply !!}

@if ($reply->file) {{ __('Download') }} @endif
@else @php $vendor = App\Models\Vendor::findOrFail($ticket->vendor_id); @endphp
@if ($vendor->photo) user-photo @else user-photo @endif
{{ $vendor->username }}
{{ __('Vendor') }}

{!! $reply->reply !!}

@if ($reply->file) {{ __('Download') }} @endif
@endif @endforeach @endif
@if ($ticket->status != 3)
{{ __('Reply to Ticket') }}
@csrf

{{ __('Upload only ZIP Files, Max File Size is 5 MB') }}

@endif
@endsection @section('script') @endsection