112 lines
4.8 KiB
PHP
112 lines
4.8 KiB
PHP
@extends('layout.main')
|
|
|
|
@section('judul')
|
|
Data Riwayat Analisis
|
|
@endsection
|
|
|
|
@section('isi')
|
|
<div class="alert alert-warning" role="alert">
|
|
<i class="fas fa-exclamation-circle"></i> <!-- Icon perhatian -->
|
|
Anda dapat melihat informasi saran penanganan dan saran untuk penanganan lanjutan.
|
|
Silahkan lakukan penanganan pertama terlebih dahulu, kemudian lakukan penanganan Lanjutan sehari setelahnya.
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<div class="card-tools">
|
|
<button type="button" class="btn btn-tool" data-card-widget="collapse" data-toggle="tooltip" title="Collapse">
|
|
<i class="fas fa-minus"></i>
|
|
</button>
|
|
<button type="button" class="btn btn-tool" data-card-widget="remove" data-toggle="tooltip" title="Remove">
|
|
<i class="fas fa-times"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<table id="example" class="table table-sm table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align: center;">No</th>
|
|
<th style="text-align: center;">Id Riwayat</th>
|
|
<th style="text-align: center;">Username</th>
|
|
<th style="text-align: center;">Waktu dan Tanggal</th>
|
|
<th style="text-align: center;">Gejala Dipilih</th>
|
|
<th style="text-align: center;">Nama Penyakit</th>
|
|
<th style="text-align: center;">Hasil</th>
|
|
<th style="text-align: center;">Saran Penanganan Pertama</th>
|
|
<th style="text-align: center;">Saran Penanganan Lanjutan</th>
|
|
<th style="text-align: center;">Aksi</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@php $no = 1 @endphp <!-- Inisialisasi nomor urut -->
|
|
@foreach($riwayat as $r)
|
|
<tr>
|
|
<td>{{ $no++ }}</td>
|
|
<td>{{$r->id_riwayat}}</td>
|
|
<td>{{$r->username}}</td>
|
|
<td>{{$r->datetime}}</td>
|
|
<td>{{$r->jawabanDenganInfo}}</td>
|
|
<td>{{$r->penyakitTerbanyak}}</td>
|
|
<td>{{$r->cfkTerakhirPersen}}%</td>
|
|
<td>
|
|
<ol>
|
|
@foreach (explode("\n", $r->saranPenanganan) as $saran)
|
|
<li>{{ substr($saran, 0, 15) }}{{ strlen($saran) > 15 ? '...' : '' }}</li>
|
|
@endforeach
|
|
</ol>
|
|
</td>
|
|
<td>
|
|
<ol>
|
|
@foreach (explode("\n", $r->saran_penanganan_lanjutan) as $saran_lanjutan)
|
|
<li>{{ substr($saran_lanjutan, 0, 15) }}{{ strlen($saran_lanjutan) > 15 ? '...' : '' }}</li>
|
|
@endforeach
|
|
</ol>
|
|
</td>
|
|
|
|
<td>
|
|
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#detailModal{{$r->id_riwayat}}">Detail</button>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal Section -->
|
|
@foreach($riwayat as $r)
|
|
<div class="modal fade" id="detailModal{{$r->id_riwayat}}" tabindex="-1" role="dialog" aria-labelledby="detailModalLabel{{$r->id_riwayat}}" aria-hidden="true">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="detailModalLabel{{$r->id_riwayat}}">Detail Riwayat Analisis</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>Nama Penyakit: {{$r->penyakitTerbanyak}}</p>
|
|
<p>Saran Penanganan pertama:</p>
|
|
<ol>
|
|
@foreach (explode("\n", $r->saranPenanganan) as $saran)
|
|
<li>{{ $saran }}</li>
|
|
@endforeach
|
|
</ol>
|
|
<p>Saran Penanganan Lanjutan:</p>
|
|
<ol>
|
|
@foreach (explode("\n", $r->saran_penanganan_lanjutan) as $saran_lanjutan)
|
|
<li>{{ $saran_lanjutan }}</li>
|
|
@endforeach
|
|
</ol>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
<!-- End of Modal Section -->
|
|
@endsection
|