{{-- resources/views/pages/expert-questions/create.blade.php --}} @extends('layouts.app') @section('css') @endsection @section('js') @endsection @push('pageTitle') {{ isset($expertQuestion) ? __('labels.edit_question') : __('labels.ask_expert') }} @endpush @section('content') @include('components.common.page-header', [ 'pageTitle' => isset($expertQuestion) ? __('labels.edit_question') : __('labels.ask_expert'), 'actionButton' => [ 'url' => route('expert-questions.index'), 'text' => __('labels.back_to_questions'), ], ]) @include('components.common.flush-message') @include('components.common.validation-errors') {{-- Expert Selection Step --}} @if(!isset($expertQuestion))
{{ __('labels.select_expert') }}
{{-- Step Indicator --}}
1
{{ __('labels.choose_category') }}
2
{{ __('labels.choose_expert') }}
3
{{ __('labels.ask_question') }}
{{-- Step 1: Category Selection --}}
{{ __('messages.select_category_to_see_experts') }}
{{-- Step 2: Experts List (Hidden until category selected) --}}
@endif {{-- Question Form --}}
@csrf @if(isset($expertQuestion)) @method('PUT') @endif
{{ __('labels.ask_question') }}
{{ __('labels.selected_category') }}
{{ $expertQuestion->category->name ?? '' }} @if(!isset($expertQuestion)) @endif
{{ __('labels.selected_expert') }} @if(!isset($expertQuestion)) @endif
@if(isset($expertQuestion?->expert)) @if(isset($expertQuestion?->expert?->user?->profile_image)) Expert @else
{{ $expertQuestion?->expert?->user?->name ? strtoupper(substr($expertQuestion?->expert?->user?->name, 0, 1)) : '?' }}
@endif @else Expert @endif
{{ $expertQuestion->expert->user->name ?? __('labels.expert_name') }}
{{ $expertQuestion->expert->bio ?? '' }}
{{ $expertQuestion->expert->company ?? '' }}
{{ $expertQuestion->expert->total_answers ?? '0' }} answers {{ $expertQuestion->expert->helpful_votes ?? '0' }} helpful
{{ $expertQuestion->expert->experience_years ?? '0' }} years experience
@error('title')
{{ $message }}
@enderror {{ __('messages.question_title_help') }}
@error('question')
{{ $message }}
@enderror {{-- {{ __('messages.question_details') }} --}}
{{-- File Manager --}} @isset($expertQuestion->assets) @include('components.form.file-manager.existing-files', [ 'readonly' => isset($readonly) && $readonly, 'assets' => $expertQuestion->assets, ]) @endisset @if (!isset($readonly) || !$readonly) @include('components.form.file-manager.upload-files') @endif @if (!isset($readonly) || !$readonly)
{{ __('labels.cancel') }}
@endif
@endsection