109 lines
4.2 KiB
PHP
109 lines
4.2 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>{{ $judul }}</title>
|
|
<!-- Fonts and icons -->
|
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet" />
|
|
<!-- Nucleo Icons -->
|
|
<link href="../css/nucleo-icons.css" rel="stylesheet" />
|
|
<link href="../css/nucleo-svg.css" rel="stylesheet" />
|
|
<!-- Font Awesome Icons -->
|
|
<script src="https://kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
|
|
<link href="../css/nucleo-svg.css" rel="stylesheet" />
|
|
<!-- CSS Files -->
|
|
<link id="pagestyle" href="../css/argon-dashboard.css?v=2.0.4" rel="stylesheet" />
|
|
|
|
<style>
|
|
/* Gaya CSS untuk tampilan cetak */
|
|
@media print {
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
font-size: 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 18px;
|
|
margin-bottom: 10px;
|
|
text-align: center;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
th, td {
|
|
padding: 5px;
|
|
border: 1px solid #000;
|
|
}
|
|
|
|
/* Gaya CSS untuk tampilan cetak */
|
|
@media print {
|
|
#printButton {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1 >{{ $judul }}</h1>
|
|
|
|
<table>
|
|
<div class="table-responsive p-0">
|
|
<table class="table table-bordered table-hover table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">No</th>
|
|
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Kode</th>
|
|
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Nama Penduduk</th>
|
|
@foreach ($datakriterias as $kriteria)
|
|
<th class="text-center text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">{{ $kriteria->nama_kriteria }}</th>
|
|
@endforeach
|
|
</tr>
|
|
</thead>
|
|
<tbody id="tabelkriteria">
|
|
@forelse ($alternatifs as $alternatif)
|
|
<tr>
|
|
<td class="text-center">{{ $loop->iteration }}</td>
|
|
<td class="text-center">{{ $alternatif->kode }}</td>
|
|
<td class="text-center">{{ $alternatif->nama }}</td>
|
|
@foreach (range(1, 10) as $i)
|
|
<td class="text-center">
|
|
@if (isset($alternatif["p$i"]))
|
|
@foreach ($datasubkriterias as $subkriteria)
|
|
@if ($alternatif["p$i"] == $subkriteria['id_subkriteria'])
|
|
{{ $subkriteria['nama_subkriteria'] }}
|
|
@break
|
|
@endif
|
|
@endforeach
|
|
@endif
|
|
</td>
|
|
@endforeach
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="{{ count($datakriterias) + 4 }}" class="text-center">Tidak ada data</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
<button id="printButton" class="btn btn-primary btn-sm print-button" style="margin-left: 20px;" onclick="printPage()">
|
|
<i class="fa fa-print"></i> Print
|
|
</button>
|
|
|
|
<script>
|
|
function printPage() {
|
|
window.print();
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |