@extends('layouts.app') @section('content')
{{ $survey->categoryLabel() }} • {{ $survey->is_anonymous ? 'Anonymous' : 'بالاسم' }}

{{ $survey->title }}

@if($survey->description)

{{ $survey->description }}

@endif
@if(session('success'))
{{ session('success') }}
@endif
@csrf @foreach($survey->questions as $q) @if(!$q->is_active) @continue @endif
{{ $q->typeLabel() }} @if($q->is_required) مطلوب @endif
{{ $q->question_text }}
@if(($q->config['help_text'] ?? null))
{{ $q->config['help_text'] }}
@endif
@php $name = 'q_'.$q->id; @endphp @if($q->question_type === 'text') @endif @if($q->question_type === 'scale') @php $min = (int)($q->config['scale_min'] ?? 1); $max = (int)($q->config['scale_max'] ?? 5); $left = $q->config['scale_left_label'] ?? 'ضعيف'; $right = $q->config['scale_right_label'] ?? 'ممتاز'; @endphp
{{ $left }} {{ $right }}
@endif @if($q->question_type === 'single')
@foreach($q->options as $o) @if(!$o->is_active) @continue @endif @endforeach
@endif @if($q->question_type === 'multi')
@foreach($q->options as $o) @if(!$o->is_active) @continue @endif @endforeach
@endif
@endforeach
@endsection