|
|
|
@ -1,177 +1,157 @@
|
|
|
|
|
@extends('layouts.main') |
|
|
|
|
@section('content') |
|
|
|
|
<div class="container-fluid"> |
|
|
|
|
<div class="d-sm-flex align-items-center justify-content-between mb-4"> |
|
|
|
|
<h1 class="h3 mb-0 text-gray-800">Dashboard</h1> |
|
|
|
|
<a href="#" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i |
|
|
|
|
class="fas fa-download fa-sm text-white-50"></i> Generate Report</a> |
|
|
|
|
</div> |
|
|
|
|
<div class="row"> |
|
|
|
|
<div class="col-xl-3 col-md-6 mb-4"> |
|
|
|
|
<div class="card border-left-primary shadow h-100 py-2"> |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<div class="row no-gutters align-items-center"> |
|
|
|
|
<div class="col mr-2"> |
|
|
|
|
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1" |
|
|
|
|
style="font-size: 14px;"> |
|
|
|
|
<strong>Pengadaan</strong> |
|
|
|
|
</div> |
|
|
|
|
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
|
|
|
|
{{ $jumlahPeti }} |
|
|
|
|
</div> |
|
|
|
|
<div class="d-sm-flex align-items-center justify-content-between mb-4"> |
|
|
|
|
<h1 class="h3 mb-0 text-gray-800">Dashboard</h1> |
|
|
|
|
<a href="#" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i |
|
|
|
|
class="fas fa-download fa-sm text-white-50"></i> Generate Report</a> |
|
|
|
|
</div> |
|
|
|
|
<div class="row"> |
|
|
|
|
<div class="col-xl-3 col-md-6 mb-4"> |
|
|
|
|
<div class="card border-left-primary shadow h-100 py-2"> |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<div class="row no-gutters align-items-center"> |
|
|
|
|
<div class="col mr-2"> |
|
|
|
|
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1" style="font-size: 14px;"> |
|
|
|
|
<strong>Pengadaan</strong> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-auto"> |
|
|
|
|
<i class="fas fa-clipboard-list fa-2x text-gray-300"></i> |
|
|
|
|
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
|
|
|
|
{{ $jumlahPeti }} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-auto"> |
|
|
|
|
<i class="fas fa-clipboard-list fa-2x text-gray-300"></i> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- Earnings (Monthly) Card Example --> |
|
|
|
|
<div class="col-xl-3 col-md-6 mb-4"> |
|
|
|
|
<div class="card border-left-success shadow h-100 py-2"> |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<div class="row no-gutters align-items-center"> |
|
|
|
|
<div class="col mr-2"> |
|
|
|
|
<div class="text-xs font-weight-bold text-success text-uppercase mb-1" |
|
|
|
|
style="font-size: 14px;"> |
|
|
|
|
<strong>Peminjaman</strong> |
|
|
|
|
</div> |
|
|
|
|
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
|
|
|
|
{{ $jumlahPeminjaman }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-auto"> |
|
|
|
|
<i class="fas fa-dollar-sign fa-2x text-gray-300"></i> |
|
|
|
|
<!-- Earnings (Monthly) Card Example --> |
|
|
|
|
<div class="col-xl-3 col-md-6 mb-4"> |
|
|
|
|
<div class="card border-left-success shadow h-100 py-2"> |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<div class="row no-gutters align-items-center"> |
|
|
|
|
<div class="col mr-2"> |
|
|
|
|
<div class="text-xs font-weight-bold text-success text-uppercase mb-1" style="font-size: 14px;"> |
|
|
|
|
<strong>Peminjaman</strong> |
|
|
|
|
</div> |
|
|
|
|
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
|
|
|
|
{{ $jumlahPeminjaman }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-auto"> |
|
|
|
|
<i class="fas fa-dollar-sign fa-2x text-gray-300"></i> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- Earnings (Monthly) Card Example --> |
|
|
|
|
<div class="col-xl-3 col-md-6 mb-4"> |
|
|
|
|
<div class="card border-left-info shadow h-100 py-2"> |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<div class="row no-gutters align-items-center"> |
|
|
|
|
<div class="col mr-2"> |
|
|
|
|
<div class="text-xs font-weight-bold text-info text-uppercase mb-1" |
|
|
|
|
style="font-size: 14px;"> |
|
|
|
|
<strong>Pengembalian</strong> |
|
|
|
|
</div> |
|
|
|
|
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
|
|
|
|
{{ $jumlahPengembalian }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-auto"> |
|
|
|
|
<i class="fas fa-calendar fa-2x text-gray-300"></i> |
|
|
|
|
<!-- Earnings (Monthly) Card Example --> |
|
|
|
|
<div class="col-xl-3 col-md-6 mb-4"> |
|
|
|
|
<div class="card border-left-info shadow h-100 py-2"> |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<div class="row no-gutters align-items-center"> |
|
|
|
|
<div class="col mr-2"> |
|
|
|
|
<div class="text-xs font-weight-bold text-info text-uppercase mb-1" style="font-size: 14px;"> |
|
|
|
|
<strong>Pengembalian</strong> |
|
|
|
|
</div> |
|
|
|
|
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
|
|
|
|
{{ $jumlahPengembalian }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-auto"> |
|
|
|
|
<i class="fas fa-calendar fa-2x text-gray-300"></i> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- Pending Requests Card Example --> |
|
|
|
|
<div class="col-xl-3 col-md-6 mb-4"> |
|
|
|
|
<div class="card border-left-warning shadow h-100 py-2"> |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<div class="row no-gutters align-items-center"> |
|
|
|
|
<div class="col mr-2"> |
|
|
|
|
<div class="text-xs font-weight-bold text-warning text-uppercase mb-1" |
|
|
|
|
style="font-size: 13px;"> |
|
|
|
|
<strong>Reminder Pengembalian</strong> |
|
|
|
|
</div> |
|
|
|
|
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
|
|
|
|
{{ $reminder }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-auto"> |
|
|
|
|
<i class="fas fa-calendar fa-2x text-gray-300"></i> |
|
|
|
|
<!-- Pending Requests Card Example --> |
|
|
|
|
<div class="col-xl-3 col-md-6 mb-4"> |
|
|
|
|
<div class="card border-left-warning shadow h-100 py-2"> |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<div class="row no-gutters align-items-center"> |
|
|
|
|
<div class="col mr-2"> |
|
|
|
|
<div class="text-xs font-weight-bold text-warning text-uppercase mb-1" style="font-size: 13px;"> |
|
|
|
|
<strong>Reminder Pengembalian</strong> |
|
|
|
|
</div> |
|
|
|
|
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
|
|
|
|
{{ $reminder }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-auto"> |
|
|
|
|
<i class="fas fa-calendar fa-2x text-gray-300"></i> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="col-xl-8 col-lg-7"> |
|
|
|
|
<div class="card shadow mb-4"> |
|
|
|
|
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> |
|
|
|
|
<h6 class="m-0 font-weight-bold text-primary">Grafik Peminjaman VS Pengembalian</h6> |
|
|
|
|
</div> |
|
|
|
|
@php |
|
|
|
|
$chartData = app('App\Http\Controllers\HomeController')->generateChartData(); |
|
|
|
|
@endphp |
|
|
|
|
|
|
|
|
|
{{-- <div class="card-body"> |
|
|
|
|
<label for="yearFilter">Pilih Tahun:</label> |
|
|
|
|
<select id="yearFilter" class="form-control"> |
|
|
|
|
@foreach ($chartData['years'] as $year) |
|
|
|
|
@if ($chartData['exitData'][$loop->index] || $chartData['enterData'][$loop->index]) |
|
|
|
|
<option value="{{ $year }}">{{ $year }}</option> |
|
|
|
|
@endif |
|
|
|
|
@endforeach |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<canvas id="ChartAssetStatus" style="max-height: 500px;"></canvas> <!-- Atur tinggi chart --> |
|
|
|
|
</div> --}} |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<label for="yearFilter">Pilih Tahun:</label> |
|
|
|
|
<select id="yearFilter" class="form-control"> |
|
|
|
|
@foreach ($chartData['years'] as $year) |
|
|
|
|
@if ($chartData['exitData'][$loop->index] || $chartData['enterData'][$loop->index]) |
|
|
|
|
<option value="{{ $year }}">{{ $year }}</option> |
|
|
|
|
@endif |
|
|
|
|
@endforeach |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<canvas id="ChartAssetStatus" style="max-height: 500px;"></canvas> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- Area Bar Chart --> |
|
|
|
|
<div class="col-xl-8 col-lg-7"> |
|
|
|
|
<div class="card shadow mb-4"> |
|
|
|
|
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> |
|
|
|
|
<h6 class="m-0 font-weight-bold text-primary">Grafik Peminjaman VS Pengembalian</h6> |
|
|
|
|
</div> |
|
|
|
|
@php |
|
|
|
|
$chartData = app('App\Http\Controllers\HomeController')->generateChartData(); |
|
|
|
|
@endphp |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<label for="yearFilter">Pilih Tahun:</label> |
|
|
|
|
<select id="yearFilter" class="form-control"> |
|
|
|
|
@foreach ($chartData['years'] as $year) |
|
|
|
|
@if ($chartData['exitData'][$loop->index] || $chartData['enterData'][$loop->index]) |
|
|
|
|
<option value="{{ $year }}">{{ $year }}</option> |
|
|
|
|
@endif |
|
|
|
|
@endforeach |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<canvas id="ChartAssetStatus" style="max-height: 500px;"></canvas> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- Pie Chart --> |
|
|
|
|
<div class="col-xl-4 col-lg-5"> |
|
|
|
|
<div class="card shadow mb-4"> |
|
|
|
|
<!-- Card Header - Dropdown --> |
|
|
|
|
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> |
|
|
|
|
<h6 class="m-0 font-weight-bold text-primary">Grafik Pengadaan Barang</h6> |
|
|
|
|
<div class="dropdown no-arrow"> |
|
|
|
|
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" |
|
|
|
|
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
|
|
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i> |
|
|
|
|
</a> |
|
|
|
|
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" |
|
|
|
|
aria-labelledby="dropdownMenuLink"> |
|
|
|
|
<div class="dropdown-header">Dropdown Header:</div> |
|
|
|
|
<a class="dropdown-item" href="#">Action</a> |
|
|
|
|
<a class="dropdown-item" href="#">Another action</a> |
|
|
|
|
<div class="dropdown-divider"></div> |
|
|
|
|
<a class="dropdown-item" href="#">Something else here</a> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<!-- Card Body --> |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<div class="chart-pie pt-4 pb-2"> |
|
|
|
|
<canvas id="myPieChart"></canvas> |
|
|
|
|
</div> |
|
|
|
|
<div class="mt-4 text-center small"> |
|
|
|
|
<span class="mr-2"> |
|
|
|
|
<i class="fas fa-circle text-primary"></i> Direct |
|
|
|
|
</span> |
|
|
|
|
<span class="mr-2"> |
|
|
|
|
<i class="fas fa-circle text-success"></i> Social |
|
|
|
|
</span> |
|
|
|
|
<span class="mr-2"> |
|
|
|
|
<i class="fas fa-circle text-info"></i> Referral |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<!-- Area Pie Chart --> |
|
|
|
|
<div class="col-xl-4 col-lg-5"> |
|
|
|
|
<div class="card shadow mb-4"> |
|
|
|
|
<!-- Card Header - Dropdown --> |
|
|
|
|
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> |
|
|
|
|
<h6 class="m-0 font-weight-bold text-primary">Grafik Pengadaan Peti</h6> |
|
|
|
|
</div> |
|
|
|
|
<!-- Card Body --> |
|
|
|
|
<div class="card-body"> |
|
|
|
|
<div class="chart-pie pt-4 pb-2"> |
|
|
|
|
<canvas id="myPieChartsiopas"></canvas> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
@push('script') |
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> |
|
|
|
|
<script> |
|
|
|
|
// Data untuk grafik pie (gantilah data sesuai kebutuhan Anda) |
|
|
|
|
var data = { |
|
|
|
|
labels: ["Gunawan", "Social", "Referral"], |
|
|
|
|
datasets: [{ |
|
|
|
|
data: [30, 40, 30], // Misalnya, data penggunaan Anda |
|
|
|
|
backgroundColor: ["#4e73df", "#1cc88a", "#36b9cc"], // Warna untuk setiap bagian grafik |
|
|
|
|
}] |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Mengambil elemen canvas untuk grafik pie |
|
|
|
|
var ctx = document.getElementById("myPieChartsiopas").getContext('2d'); |
|
|
|
|
|
|
|
|
|
// Membuat instance grafik pie |
|
|
|
|
var myPieChart = new Chart(ctx, { |
|
|
|
|
type: 'pie', |
|
|
|
|
data: data, |
|
|
|
|
}); |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- script bar chart --> |
|
|
|
|
<script> |
|
|
|
|
document.addEventListener('DOMContentLoaded', function() { |
|
|
|
|
var ctx = document.getElementById('ChartAssetStatus').getContext('2d'); |
|
|
|
|