@extends('layouts.app') @section('css') @endsection @section('content') @include('components.common.page-header', [ 'pageTitle' => __('labels.expert_question'), 'actionButton' => [ 'url' => route('expert-questions.index'), 'text' => __('labels.back_to_list'), 'icon' => 'fa-arrow-left', ], ])
{{-- Header with Title and Actions --}}

{{ $expertQuestion->title }}

{{ __('labels.' . $expertQuestion->status) }} {{ $expertQuestion->created_at->format('M d, Y') }}
@can('update', $expertQuestion) @endcan @can('delete', $expertQuestion) @endcan
{{-- Two Column Layout for Expert and Asker --}}
{{-- Expert Column --}}
{{ __('labels.assigned_expert') }}
Expert
{{ $expertQuestion->expert->user->name ?? __('labels.expert_name') }}
@if ($expertQuestion->expert?->is_verified) {{ __('labels.expert_verified') }} @endif

{{ $expertQuestion->expert->bio ?? '' }}

{{ $expertQuestion->expert->company ?? '' }}

{{ $expertQuestion->expert->total_answers ?? 0 }} {{ __('labels.expert_answers') }}
{{ $expertQuestion->expert->helpful_votes ?? 0 }} {{ __('labels.helpful') }}
{{ $expertQuestion->expert->experience_years ?? 0 }}y {{ __('labels.exp_short') }}
{{-- Asker Column --}}
{{ __('labels.asked_by') }}
Expert
{{ $expertQuestion->asker->name ?? __('labels.unknown_user') }}
{{ $expertQuestion->asker->email ?? '' }}
{{-- Meta Information Grid --}}
{{ __('labels.category') }}
{{ $expertQuestion->category?->name ?? 'Uncategorized' }}
{{ __('labels.stats') }}
{{ $expertQuestion->views_count ?? 0 }} {{ __('labels.views') }}
{{ $expertQuestion->upvote_count ?? 0 }} {{ __('labels.helpful_count') }}
{{ $expertQuestion->downvote_count ?? 0 }} {{ __('labels.not_helpful_count') }}
{{-- Question Details --}}
{{ __('labels.question_details') }}
{!! nl2br(e($expertQuestion->question)) !!}
@isset($expertQuestion->assetQuestions) @include('components.form.file-manager.uploaded-files', [ 'assets' => $expertQuestion->assetQuestions, 'readonly' => true, 'uploadedFileInputName' => 'existing_assets_1', 'titleLabelHtml' => ' ' . __('labels.question_attachments') . ' ' . __('labels.from_questioner') . '', ]) @endisset {{-- Answer Section --}}
{{ __('labels.expert_answer') }}
@if ($expertQuestion->answered_at) {{ date('M d, Y H:i', strtotime($expertQuestion->answered_at)) }} @endif
@if ($expertQuestion->answer)
{!! nl2br(e($expertQuestion->answer)) !!}
@isset($expertQuestion->assetAnswers) @include('components.form.file-manager.uploaded-files', [ 'assets' => $expertQuestion->assetAnswers, 'uploadedFileInputName' => 'existing_assets_2', 'readonly' => true, 'titleLabelHtml' => ' ' . __('labels.answer_attachments') . ' ' . __('labels.from_expert') . '', ]) @endisset @else

{{ __('labels.no_answer_yet') }}

@endif
@can('vote', $expertQuestion) @endcan
@can('answer', $expertQuestion) @endcan {{-- {{ __('labels.reply') }} --}}
@include('components.meta.stats', [ 'created_at' => $expertQuestion->created_at ?? null, 'updated_at' => $expertQuestion->updated_at ?? null, 'answered_at' => $expertQuestion->answered_at ?? null, 'creater' => $expertQuestion->user->name ?? null, 'creator_avatar' => $expertQuestion->user->profile_image ?? null, ])
@include('pages.expert-questions.partials.edit-answer-modal') @include('pages.expert-questions.partials.edit-question-modal') @endsection @section('js') @endsection