@extends('layouts.survey') @section('title', $project->name . ' Survey') @section('trail')
Respondent
Language
3 Questions
4 Your Info
5 Thank You
@endsection @push('styles') @endpush @section('content') @php $totalQ = count($questions); @endphp
@csrf {{-- Progress Bar --}}
Question 1 of {{ $totalQ }} 0% complete
@for($i = 1; $i <= $totalQ; $i++)
@endfor
{{-- Questions --}} @foreach($questions as $q)
{{ $q->order }}
@php $typeLabels = ['radio'=>'Single Choice','checkbox'=>'Multiple Choice','text'=>'Open Text','idea'=>'Your Idea']; $typeClass = ['radio'=>'q-type-radio','checkbox'=>'q-type-checkbox','text'=>'q-type-text','idea'=>'q-type-idea']; @endphp {{ $typeLabels[$q->question_type] ?? 'Text' }} @if($q->is_required) Required @endif
{{ $language === 'bn' && $q->question_text_bn ? $q->question_text_bn : $q->question_text }}
@if($language === 'bn' && $q->question_text_bn)
{{ $q->question_text }}
@endif
@if($q->question_type === 'radio') @foreach($q->options ?? [] as $opt) @endforeach @elseif($q->question_type === 'checkbox') @foreach($q->options ?? [] as $opt) @endforeach @elseif($q->question_type === 'idea')
{{ $language === 'bn' ? 'আপনার সেরা ধারণা শেয়ার করুন — যত বিস্তারিত হবে তত ভালো!' : 'Share your best idea — the more detail, the better!' }}
@else {{-- text --}} @endif
{{-- Nav: Previous / Next --}}
{{ $loop->iteration }} / {{ $totalQ }} @if($loop->last) @else @endif
@endforeach {{-- Collector / Respondent Info Slide --}}
@auth {{ $language === 'bn' ? 'তথ্য সংগ্রহকারীর বিবরণ' : 'Submission Details' }} @else {{ $language === 'bn' ? 'আপনার পরিচয়' : 'About You' }} @endauth
@auth {{ $language === 'bn' ? 'জমা দেওয়ার আগে আপনার বিবরণ পূরণ করুন।' : 'Fill in your details before submitting.' }} @else {{ $language === 'bn' ? 'জমা দেওয়ার আগে আপনার নাম ও ফোন নম্বর দিন।' : 'Please provide your name and mobile number before submitting.' }} @endauth
@auth {{-- ── EMPLOYEE-COLLECTED FLOW ──────────────────────────── --}}
{{ $language === 'bn' ? 'কর্মী (সংগ্রহকারী)' : 'Employee (Collector)' }}
{{ $language === 'bn' ? 'উত্তরদাতার বিবরণ' : 'Respondent Details' }}
{{ $language === 'bn' ? 'সংগ্রহের তথ্য' : 'Collection Details' }}
@else {{-- ── PUBLIC SELF-SUBMISSION FLOW ─────────────────────── --}}
{{ $language === 'bn' ? 'আপনার তথ্য সম্পূর্ণ গোপনীয় থাকবে এবং শুধুমাত্র গবেষণার উদ্দেশ্যে ব্যবহৃত হবে।' : 'Your information is kept private and used solely for research purposes.' }}
@endauth
@endsection @push('scripts') @endpush