@extends('layout') @inject('carbon', 'Carbon\Carbon') @section('content')

Clients & Engagement

Gestion des questionnaires

@include('shared.navbar')
@include('quiz._search')
Ajouter un questionnaire
Génerer
@foreach($responses as $reservation_id => $responseGroup) @php $isFirst = $loop->first; $collapseId = 'collapse' . $reservation_id; $lang = $responseGroup->first()->lang === 'Français' ? 'fr' : 'en'; @endphp

Reference ID: {{ $responseGroup->first()->reference_id }}

Check-in: {{ $carbon::create($responseGroup->first()->check_in)->format('d/m/Y') }}

Check-out: {{ $carbon::create($responseGroup->first()->check_out)->format('d/m/Y') }}

Total Price: {{ number_format($responseGroup->first()->total_price_converted ? (float) $responseGroup->first()->total_price_converted : (float) $responseGroup->first()->total_price, 2, ',', ' ') }} TND

@if(!empty($responseGroup->first()->mail))

Client: {{ $responseGroup->first()->f_name }} {{ $responseGroup->first()->l_name }}

Email: {{ $responseGroup->first()->mail }}

@endif

Logement: {{ $responseGroup->first()->name }}


    @php $sumNotes = 0; $selectedOptions = request()->get('options', []); $selectedQuestion = request()->get('question', []); @endphp @foreach($responseGroup as $response)
  • Question:
    {{ __('messages.' . $response->question->question, [], $lang) }}
    Réponse: @if($response->option)
    @php $sumNotes += $response->option->note; @endphp {{ __('messages.' . $response->option->option_text, [], $lang) }}
    @else {{ __($response->text_response, [], $lang) }} @endif
  • @endforeach
    Noté {{ number_format($sumNotes / $maxSumOption / 2 * 10, 1, ',') }} sur 5
@endforeach
{{ $responses->appends(request()->query())->links('pagination::bootstrap-5') }}
@endsection