93 lines
4.5 KiB
PHP
Executable File
93 lines
4.5 KiB
PHP
Executable File
@extends('layouts.app')
|
|
@section('title', 'Detail Survei')
|
|
@section('content')
|
|
|
|
<!-- button back -->
|
|
<a href="{{ URL::to('admin/surveys') }}" class="mb-3 badge text-bg-light text-primary">
|
|
<i class="ti ti-arrow-left"> </i> Kembali
|
|
</a>
|
|
|
|
<!-- Surveys -->
|
|
<div class="row d-flex align-items-strech">
|
|
<div class="col-lg-12 mx-auto">
|
|
<div class="card">
|
|
<div class="card-header text-white bg-primary">
|
|
<h3 class="form-label mt-2 text-white border-bottom pb-3">{{ $survey->name }}</h3>
|
|
<pre for="description" class="mt-3">{{ $survey->description }}</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12 col-lg-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<table class="table table-responsive table-bordered text-nowrap mb-0 align-middle">
|
|
<thead class="text-dark fs-4">
|
|
<tr>
|
|
<th class="border-bottom-0" width="45px">
|
|
<h6 class="fw-semibold mb-0 text-center">No.</h6>
|
|
</th>
|
|
<th class="border-bottom-0">
|
|
<h6 class="fw-semibold mb-0">Pertanyaan</h6>
|
|
</th>
|
|
<th class="border-bottom-0" width="100px">
|
|
<h6 class="fw-semibold mb-0 text-center">Tipe</h6>
|
|
</th>
|
|
@forelse ($questionSurveys->first()->questionAnswers as $answer)
|
|
<th class="border-bottom-0" width="300px">
|
|
<h6 class="fw-semibold mb-0 text-wrap text-break text-center">{{ $answer->users->name }}</h6>
|
|
</th>
|
|
@empty
|
|
<th class="border-bottom-0" width="100px">
|
|
<h6 class="fw-semibold mb-0 text-center">Jawaban</h6>
|
|
</th>
|
|
@endforelse
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse ($questionSurveys as $question)
|
|
<tr>
|
|
<td class="border-bottom-0" width="45px">
|
|
<h6 class="fw-normal mb-0 text-center">{{ ($questionSurveys->currentPage()-1) * $questionSurveys->perPage() + $loop->index + 1 }}</h6>
|
|
</td>
|
|
<td class="border-bottom-0" width="400px">
|
|
<h6 class="fw-normal mb-0 text-wrap">{{ $question->name }}</h6>
|
|
</td>
|
|
<td class="border-bottom-0" width="100px">
|
|
<h6 class="fw-normal mb-0">
|
|
{{ $question->type }}
|
|
@if ($question->questionDetails && $question->type == 'Skala')
|
|
<hr>
|
|
{{ json_decode($question->questionDetails->question_value)[0] }} = {{ json_decode($question->questionDetails->question_label)[0] }}
|
|
<br>
|
|
{{ json_decode($question->questionDetails->question_value)[1] }} = {{ json_decode($question->questionDetails->question_label)[1] }}
|
|
@endif
|
|
</h6>
|
|
</td>
|
|
@forelse ($question->questionAnswers as $row)
|
|
<td class="border-bottom-0" width="300px">
|
|
<h6 class="fw-normal mb-0 text-wrap text-break text-center">{{ $row->answer }}</h6>
|
|
</td>
|
|
@empty
|
|
<td class="border-bottom-0" width="100px">
|
|
<h6 class="fw-normal mb-0 text-center">Jawaban Kosong</h6>
|
|
</td>
|
|
@endforelse
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<th class="border-bottom-0" width="100px" colspan="3">
|
|
<h6 class="fw-normal mb-0 text-center">Survey Kosong</h6>
|
|
</th>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@stop
|