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

{{ $ticket->subject }}

@if ($ticket->status == 1) {{ __('Pending') }} @elseif($ticket->status == 2) {{ __('Open') }} @else {{ __('Closed') }} @endif {{ date('dS F Y, h.i A', strtotime($ticket->created_at)) }}
@php $px = '16px'; @endphp

{!! $ticket->description !!}

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

{!! $reply->reply !!}

@if ($reply->file) {{ __('Download') }} @endif
@else @php $vendor = App\Models\Vendor::where('id', $ticket->user_id)->first(); @endphp
@if ($vendor) @if ($vendor->photo != null) user-photo @else user-photo @endif @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
@error('reply')

{{ $message }}

@enderror
@error('file')

{{ $message }}

@enderror

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

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