102 lines
4.9 KiB
PHP
102 lines
4.9 KiB
PHP
@include('components.theme.pages.header')
|
|
<section>
|
|
<div class="row mb-4">
|
|
<div class="col-md-8">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h6 class="m-0 font-weight-bold text-primary">Analisa Kriteria</h6>
|
|
</div>
|
|
<div class="card-body">
|
|
<form method="post" action="{{ route('analisa.kriteria.tabel') }}">
|
|
@csrf
|
|
<?php
|
|
$jumlah = \App\Models\Kriteria::count();
|
|
foreach (\App\Models\Kriteria::all() as $key => $value) {
|
|
$pilihan_kriteria[] = $value['nama_kriteria'];
|
|
}
|
|
|
|
$n = $jumlah;
|
|
?>
|
|
<table class="table table-bordered">
|
|
<thead class="thead-light">
|
|
<tr>
|
|
<th colspan="2" class="align-middle text-center">Kriteria manakah yang lebih
|
|
penting ?</th>
|
|
<th>Nilai Perbandingan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$urut = 0;
|
|
|
|
for ($x = 0; $x <= ($n - 2); $x++) {
|
|
for ($y = ($x + 1); $y <= ($n - 1); $y++) {
|
|
$urut++;
|
|
?>
|
|
<tr>
|
|
<td>
|
|
<div class="custom-control custom-radio">
|
|
<input type="radio" class="custom-control-input"
|
|
name="pilih<?php echo $urut ?>"
|
|
id="pilih1<?php echo $urut ?>" value="1" checked="">
|
|
<label class="custom-control-label"
|
|
for="pilih1<?php echo $urut ?>"><?php echo $pilihan_kriteria[$x] ?></label>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="custom-control custom-radio">
|
|
<input type="radio" class="custom-control-input"
|
|
name="pilih<?php echo $urut ?>"
|
|
id="pilih2<?php echo $urut ?>" value="2">
|
|
<label class="custom-control-label"
|
|
for="pilih2<?php echo $urut ?>"><?php echo $pilihan_kriteria[$y] ?></label>
|
|
</div>
|
|
</td>
|
|
<td width="20%">
|
|
<?php
|
|
$nilai = getNilaiPerbandinganKriteria($x, $y);
|
|
?>
|
|
<input type="text" class="form-control" name="bobot<?php echo $urut ?>" value="<?php echo $nilai ?>" required>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<button type="submit" class="btn btn-primary"> Selanjutnya <span
|
|
class="fas fa-arrow-right"></span></button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h6 class="m-0 font-weight-bold text-primary">Skala Perbandingan</h6>
|
|
</div>
|
|
<div class="card-body">
|
|
<table class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Nilai</th>
|
|
<th class="align-middle">Tingkat Kepentingan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach (\App\Models\Nilai::all() as $key => $value) : ?>
|
|
<tr>
|
|
<td class="text-center"><?php echo $value['jum_nilai'] ?></td>
|
|
<td><?php echo $value['ket_nilai'] ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@include('components.theme.pages.footer')
|