Skip to content

Commit

Permalink
'update'
Browse files Browse the repository at this point in the history
  • Loading branch information
Haxorsprogramming committed Apr 4, 2022
1 parent d24d754 commit c391a7d
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 6 deletions.
6 changes: 6 additions & 0 deletions app/Http/Controllers/C_Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ public function berandaPage()
$dr = ['status' => 'sukses'];
return view('main.berandaPage');
}

public function infoAplikasi()
{
return view('main.infoAplikasi');
}

function setAwal()
{
$dataAwal = array();
Expand Down
17 changes: 17 additions & 0 deletions app/Http/Controllers/C_Laporan.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Models\M_Pengujian;

class C_Laporan extends Controller
{
public function dataLaporan()
{
$dataPengujian = M_Pengujian::all();
$dr = ['dataPengujian' => $dataPengujian];
return view('main.laporan.laporanData', $dr);
}
}
8 changes: 8 additions & 0 deletions app/Models/M_Pengujian.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Illuminate\Database\Eloquent\Model;

use App\Models\M_Nilai_Kombinasi;

class M_Pengujian extends Model
{
protected $table = "tbl_pengujian";
Expand All @@ -14,4 +16,10 @@ class M_Pengujian extends Model
'min_supp',
'min_confidence'
];

public function totalPolaProduk($kdPengujian, $confidence)
{
return M_Nilai_Kombinasi::where('kd_pengujian', $kdPengujian) -> where('support', '>=', $confidence) -> count();
}

}
2 changes: 1 addition & 1 deletion database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function run()
{
$this -> call([S_User::class, S_Kategori::class]);
Artisan::call('importDataProduk');
Artisan::call('createFakePenjualan tf=100');
Artisan::call('createFakePenjualan tf=200');
// Artisan::call('importDataPenjualan');
}

Expand Down
6 changes: 3 additions & 3 deletions resources/views/layout/headerApp.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<div class="dropdown d-inline-block">
<button type="button" class="btn header-item waves-effect" id="page-header-user-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img class="rounded-circle header-profile-user" src="{{ asset('ladun/apaxy/') }}/images/users/avatar-1.jpg" alt="Header Avatar">
<span class="d-none d-sm-inline-block ml-1">Shane</span>
<span class="d-none d-sm-inline-block ml-1">Administrator</span>
<i class="mdi mdi-chevron-down d-none d-sm-inline-block"></i>
</button>
<div class="dropdown-menu dropdown-menu-right">
Expand Down Expand Up @@ -141,12 +141,12 @@
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)">
<a class="nav-link" href="javascript:void(0)" onclick="renderPage('app/laporan/data', 'Laporan Apriori')">
<i class="mdi mdi-storefront mr-2"></i>Laporan
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)">
<a class="nav-link" href="javascript:void(0)" onclick="renderPage('app/info-aplikasi', 'Informasi Aplikasi')">
<i class="mdi mdi-storefront mr-2"></i>Info Aplikasi
</a>
</li>
Expand Down
7 changes: 7 additions & 0 deletions resources/views/main/infoAplikasi.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h4 class="header-title">Pengembang Aplikasi</h4>
</div>
</div>
</div>
51 changes: 51 additions & 0 deletions resources/views/main/laporan/laporanData.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h4 class="header-title">Laporan Analisa</h4>
<div class="table-responsive">
<table class="table mb-0 table-hover" id="tblLaporan">
<thead>
<tr>
<th>#</th>
<th>Kd Pengujian</th>
<th>Nama Penguji</th>
<th>Waktu Pengujian</th>
<th>Support</th>
<th>Confidence</th>
<th>Total Pola Produk</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@foreach($dataPengujian as $pengujian)
<tr>
<td>{{ $loop -> iteration }}</td>
<td>{{ substr($pengujian -> kd_pengujian, 0, 5) }}</td>
<td>{{ $pengujian -> nama_penguji }}</td>
<td>{{ $pengujian -> created_at }}</td>
<td>{{ $pengujian -> min_supp }}</td>
<td>{{ $pengujian -> min_confidence }}</td>
<td>{{ $pengujian -> totalPolaProduk($pengujian -> kd_pengujian, $pengujian -> min_confidence) }}</td>
<td>
<a href="javascript:void(0)" onclick="keDetail('{{ $pengujian -> kd_pengujian }}')" class="btn btn-primary btn-sm">Detail</a>&nbsp;
<a href="{{ url('/apriori/analisa/cetak/') }}/{{ $pengujian -> kd_pengujian }}" target="new" class="btn btn-success btn-sm">Cetak</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>

</div>
</div>
</div>

<script>
$("#tblLaporan").dataTable();
function keDetail(kdPengujian)
{
renderPage('app/apriori/analisa/hasil/'+kdPengujian, 'Hasil Analisa');
}
</script>
8 changes: 6 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use App\Http\Controllers\C_Produk;
use App\Http\Controllers\C_Penjualan;
use App\Http\Controllers\C_Apriori;

use App\Http\Controllers\C_Laporan;

Route::get('/', [C_Auth::class, 'loginPage']);
Route::post('/auth/login/proses', [C_Auth::class, 'loginProses']);
Expand All @@ -27,4 +27,8 @@
Route::get('/app/apriori/setup', [C_Apriori::class, 'setupPerhitunganApriori']);
Route::post('/app/apriori/analisa/proses', [C_Apriori::class, 'prosesAnalisaApriori']);
Route::get('/app/apriori/analisa/hasil/{kdPengujian}', [C_Apriori::class, 'hasilAnalisa']);
Route::get('/apriori/analisa/cetak/{kdPengujian}', [C_Apriori::class, 'cetakAnalisa']);
Route::get('/apriori/analisa/cetak/{kdPengujian}', [C_Apriori::class, 'cetakAnalisa']);

Route::get('/app/laporan/data', [C_Laporan::class, 'dataLaporan']);

Route::get('/app/info-aplikasi', [C_Dashboard::class, 'infoAplikasi']);

0 comments on commit c391a7d

Please sign in to comment.