@extends('backend.layouts.master') @section('title') Evaluations @endsection @section('css') @endsection @section('body') @endsection @section('content')
Evaluations
@can('evaluation_export') Export Data {{--
--}} @endcan
@foreach ($questions as $question) @endforeach {{-- --}} @foreach ($answers->flatten()->groupBy(function ($answer) { return $answer->created_at->toDateTimeString(); }) as $submissionAnswers) @php $user = $submissionAnswers->first()->user ?? null; $totalScore = 0; @endphp @foreach ($questions as $question) @php $answer = $submissionAnswers->firstWhere( 'question_id', $question->id, ); @endphp @endforeach {{-- --}} {{-- --}} @endforeach
{{ $question->text }}Date Nom Prénom Domaine Spécialité Email Téléphone Gouvernorat PaysScore
type === 'choix') data-order="{{ $answer->choice->score ?? 0 }}" @endif> @if ($answer) @if ($question->type === 'choix') {{ $answer->choice?->label ?? 'Non répondu' }} @php $totalScore += $answer->choice?->score ?? 0; @endphp @else {{ $answer->text_answer ?? 'Non répondu' }} @endif @else Non répondu @endif {{ $submissionAnswers->first()->created_at->format('d/m/Y H:i') ?? '-' }} {{ $user->firstname ?? '' }} {{ $user->name ?? '' }} {{ $user->domain ?? '' }} {{ $user->specialty ?? '' }} {{ $user->email ?? '' }} {{ $user->phone ?? '' }} {{ $user->gouvernorat ?? '' }} {{ $user->country ?? '' }}Domaine Spécialité Email Téléphone Gouvernorat Pays{{ $totalScore }}
@endsection @section('scripts') @endsection