@extends('front.layouts.master-auth') @section('content')

{{ $support->title ?: __('Support Ticket #') . $support->id }}

@if($support->status == 'pending') @lang('Waiting') @elseif($support->status == 'open') @lang('Open') @else @lang('Closed') @endif
@lang('Tickets Page')
@php $supportUserOnline = false; if(auth()->user()->last_login) { try { $supportUserOnline = \Carbon\Carbon::parse(auth()->user()->last_login)->diffInMinutes(now()) < 10; } catch (\Exception $e) { $supportUserOnline = false; } } @endphp
{{ auth()->user()->name }} {{ localized_friendly_time($support->created_at) }}
{{ $support->body }} @if($support->image) @endif
@if(count($support->threads) > 0) @php $lastDate = null; @endphp @foreach($support->threads as $thread) @php $threadDate = \Carbon\Carbon::parse($thread->created_at)->format('Y-m-d'); if ($threadDate !== $lastDate) { $lastDate = $threadDate; $dateCarbon = \Carbon\Carbon::parse($threadDate); if ($dateCarbon->isToday()) { $dateLabel = 'اليوم'; } elseif ($dateCarbon->isYesterday()) { $dateLabel = 'أمس'; } else { $dateLabel = $dateCarbon->format('d/m/Y'); } } else { $dateLabel = null; } @endphp @if($dateLabel)
{{ $dateLabel }}
@endif @if($thread->senderable_type == 'App\Models\Admin')
فريق الدعم {{ \Carbon\Carbon::parse($thread->created_at)->format('h:i A') }}
{{ $thread->message }} @if(count($thread->images) > 0)
@foreach($thread->images as $image)
Admin Reply Image
الرد
@endforeach
@endif
@else
{{ auth()->user()->name }} {{ \Carbon\Carbon::parse($thread->created_at)->format('h:i A') }}
{{ $thread->message }} @if(count($thread->images) > 0)
@foreach($thread->images as $image) @endforeach
@endif
@endif @endforeach @endif
@if($support->status == 'open')
@csrf
@elseif($support->status == 'closed')
@lang('This ticket is closed. You cannot add new replies.')
@else
@lang('This ticket is pending. You can reply once it is opened by support team.')
@endif

@lang('Details')

@lang('Type'): @if($support->type) {{ getTrans($support->type->display_name, lang()) }} @else @lang('General') @endif
@lang('Created'): {{ localized_friendly_time($support->created_at) }}
@lang('Last Updated'): {{ localized_friendly_time($support->updated_at) }}
@endsection