MIF_E31211936/resources/views/diagnosed/diagnosed.blade.php

102 lines
4.0 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="description" content="" />
<meta name="author" content="" />
<title>Clean Blog - Start Bootstrap Theme</title>
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
<!-- Font Awesome icons (free version)-->
<script
src="https://use.fontawesome.com/releases/v6.3.0/js/all.js"
crossorigin="anonymous"
></script>
<!-- Google fonts-->
<link
href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic"
rel="stylesheet"
type="text/css"
/>
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800"
rel="stylesheet"
type="text/css"
/>
<!-- Core theme CSS (includes Bootstrap)-->
<link href="../../../assets/css/styles2.css" rel="stylesheet" />
</head>
<body style="background-color: #bd5d38;">
<!-- Main Content-->
<main class="mb-4">
<div class="container px-4 px-lg-5">
<div class="row gx-4 gx-lg-5 justify-content-center">
<div class="col-md-10 col-lg-8 col-xl-7">
<div class="my-5">
<div class="card mb-4">
<div class="card-body" style="background-color: #dee2e6;">
<div style="display: flex; justify-content: space-between; align-items: center;">
@if(empty($results))
<div style="width: 100%; display: flex; justify-content: center; align-items: center;">
<p style="text-align: center;">Silahkan melakukan diagnosa terlebih dahulu.<br /><br /><a class="btn btn-warning" href="/home#experience">Diagnosa</a></p>
</div>
@else
<h2>Gejala yang Dipilih</h2>
<a class="btn btn-warning" href="/home#experience">Kembali</a>
</div>
<ul>
@foreach($selectedSymptoms as $symptom)
<li>{{ $symptom->name }}</li>
@endforeach
</ul>
<h2>Hasil Diagnosa</h2>
<table class="table table-hover">
<thead>
<tr>
<th>Penyakit</th>
<th>Peluang</th>
<th>Solusi</th>
</tr>
</thead>
<tbody>
@foreach($results as $result)
<tr>
<td>{{ $result['disease'] }}</td>
<td>{{ number_format($result['probability'], 2) }}%</td>
<td>{{ $result['solution'] }}</td>
<td>
@if($result['image_path'])
<img src="{{ asset('image_path/' . $result['image_path']) }}" alt="{{ $result['disease'] }}" width="100">
@else
<p>Tidak ada gambar</p>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@endif
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Bootstrap core JS-->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
<!-- Core theme JS-->
<script src="../../../assets/js/scripts2.js"></script>
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *-->
<!-- * * SB Forms JS * *-->
<!-- * * Activate your form at https://startbootstrap.com/solution/contact-forms * *-->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *-->
<script src="https://cdn.startbootstrap.com/sb-forms-latest.js"></script>
</body>
</html>