@extends('master_pdf') @section('title', 'Resultados: '.$poll->getShop->name.' - '.$poll->title) @section('content')

{{ $poll->title }}

Restaurante: {{ $poll->getShop->name }}

Rango de fecha: {{ $date_from }} / {{ $date_end }}

Resumen

ID Titulo Preguntas Participaciones Creada
{{ $poll->id }} {{ $poll->title }} {{ $poll->getOptions->count() }} {{ $poll->getParticipations->count() }} {{ $poll->created_at }}

Preguntas

@foreach($poll->getOptions as $option) @endforeach
Pregunta Valoración máxima Puntos Promedio
{{ $option->title }} {{ $option->number_answers }} @if($option->otype == "0") {{ $pis[$option->id] }} @endif @if($option->otype == "0" && $poll->getParticipations->whereBetween('created_at', [$date_from.' 00:00:00', $date_end.' 23:59:59', ])->count() > 0) {{ round($pis[$option->id] / $poll->getParticipations->whereBetween('created_at', [$date_from.' 00:00:00', $date_end.' 23:59:59', ])->count(), 2) }} @endif
@if($show_list == "1")

Participaciones

@foreach($poll->getParticipations->whereBetween('created_at', [$date_from.' 00:00:00', $date_end.' 23:59:59', ]) as $participation)
@foreach($poll->getOptions as $option) @endforeach
Participación ID: {{ $participation->id }}
Pregunta Respuesta
{{ $option->title }} {{ json_decode($participation->participation, true)['field_id_'.$option->id] }}
@endforeach @endif @endsection