Browse Source

update role 2

master
Gunawan19621 12 months ago
parent
commit
c8d4c53133
  1. 27
      app/Exports/StokOpNameExport.php
  2. 13
      app/Http/Controllers/Auth/RedirectAuthController.php
  3. 28
      app/Http/Controllers/HomeController.php
  4. 6
      app/Http/Controllers/PeminjamanController.php
  5. 8
      app/Http/Controllers/StokOpNameController.php
  6. 120
      resources/views/dashboard/Disposal/index.blade.php
  7. 82
      resources/views/dashboard/History/Peminjaman/index.blade.php
  8. 180
      resources/views/dashboard/History/Pengembalian/index.blade.php
  9. 110
      resources/views/dashboard/Master_Data/Manajemen_Peti/Kondisi_Peti/index.blade.php
  10. 2
      resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php
  11. 4
      resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/index.blade.php
  12. 5
      resources/views/dashboard/Master_Data/Report/Pattern_lot_peti/index.blade.php
  13. 3
      resources/views/dashboard/Master_Data/Report/Stok_opname/index.blade.php
  14. 4
      resources/views/dashboard/Master_Data/Warehouse/index.blade.php
  15. 143
      resources/views/dashboard/Peminjaman/index.blade.php
  16. 193
      resources/views/dashboard/Pengembalian/index.blade.php
  17. 551
      resources/views/dashboard/index.blade.php
  18. 118
      resources/views/pages/layouts/sidebar_user.blade.php
  19. 24
      resources/views/pages/user/Master_Data/Customer/index.blade.php
  20. 38
      resources/views/pages/user/Master_Data/Manajemen_Peti/Peti/index.blade.php
  21. 62
      resources/views/pages/user/Master_Data/Manajemen_Peti/Type_peti/index.blade.php
  22. 20
      resources/views/pages/user/Master_Data/Manajemen_Peti/kondisi_peti/index.blade.php
  23. 38
      resources/views/pages/user/Master_Data/Manajemen_Peti/tipe_peti/index.blade.php
  24. 59
      resources/views/pages/user/Master_Data/User/index.blade.php
  25. 4
      resources/views/pages/user/Master_Data/Warehouse/index.blade.php
  26. 65
      resources/views/pages/user/Peminjaman/index.blade.php
  27. 88
      resources/views/pages/user/Pengembalian/index.blade.php
  28. 42
      resources/views/pages/user/dashboard/disposal/index.blade.php
  29. 288
      resources/views/pages/user/dashboard/index.blade.php
  30. 194
      resources/views/pages/user/index.blade.php

27
app/Exports/StokOpNameExport.php

@ -12,12 +12,14 @@ class StokOpNameExport implements FromCollection, WithHeadings
protected $stokOpnames;
protected $todayStokOpnames;
protected $yesterdayStokOpnames;
protected $gudangStokOpnames;
public function __construct($stokOpnames, $todayStokOpnames, $yesterdayStokOpnames)
public function __construct($stokOpnames, $todayStokOpnames, $yesterdayStokOpnames, $gudangStokOpnames)
{
$this->stokOpnames = $stokOpnames;
$this->todayStokOpnames = $todayStokOpnames;
$this->yesterdayStokOpnames = $yesterdayStokOpnames;
$this->gudangStokOpnames = $gudangStokOpnames;
}
public function collection()
@ -36,6 +38,11 @@ class StokOpNameExport implements FromCollection, WithHeadings
->where('tipe_peti_id', $data_StokOpname->tipe_peti_id)
->first();
$gudangData = $this->gudangStokOpnames
->where('customer_id', $data_StokOpname->customer_id)
->where('tipe_peti_id', $data_StokOpname->tipe_peti_id)
->keyBy('warehouse_id');
$data->push([
'No' => $nomor++,
'Customer' => $data_StokOpname->customer->name,
@ -44,11 +51,10 @@ class StokOpNameExport implements FromCollection, WithHeadings
'Bagging Stok' => $yesterdayStokOpname ? $yesterdayStokOpname->total_petis : '-',
'Add' => $todayStokOpname ? $todayStokOpname->total_petis : '0',
'Total' => $data_StokOpname->total_petis ?? '0',
'DI ISTW' => 'Belum',
'Gudang A' => 'Belum',
'Gudang B' => 'Belum',
'Gudang C' => 'Belum',
'Stok Opname' => 'Belum',
'Jakarta' => $gudangData->get(1)->total_petis ?? '0',
'Bekasi' => $gudangData->get(2)->total_petis ?? '0',
'Semarang' => $gudangData->get(3)->total_petis ?? '0',
'Surabaya' => $gudangData->get(4)->total_petis ?? '0',
'Total Stok' => $data_StokOpname->total_petis ?? '0',
]);
}
@ -66,11 +72,10 @@ class StokOpNameExport implements FromCollection, WithHeadings
'Bagging Stok',
'Add',
'Total',
'DI ISTW',
'Gudang A',
'Gudang B',
'Gudang C',
'Stok Opname',
'Jakarta',
'Bekasi',
'Semarang',
'Surabaya',
'Total Stok',
];
}

13
app/Http/Controllers/Auth/RedirectAuthController.php

@ -11,12 +11,13 @@ class RedirectAuthController extends Controller
public function redirectAuth()
{
if (Auth::check()) {
if (Auth::user()->role_id == 1) {
// Admin
return redirect()->route('dashboard.home.admin');
} else {
return redirect()->route('dashboard.home.user');
}
return redirect()->route('dashboard.home.admin');
// if (Auth::user()->role_id == 1) {
// // Admin
// return redirect()->route('dashboard.home.admin');
// } else {
// return redirect()->route('dashboard.home.user');
// }
} else {
// Tidak ada akun atau kesalahan login
return redirect()->route('login')->with('error', 'Kesalahan email atau password.');

28
app/Http/Controllers/HomeController.php

@ -7,7 +7,7 @@ use Illuminate\Support\Facades\Auth;
class HomeController extends Controller
{
//halaman Admin
public function index()
{
$data = [
@ -20,6 +20,21 @@ class HomeController extends Controller
return view('dashboard.index', $data);
}
//halaman User
// public function indexUser()
// {
// $data = [
// 'reminder' => \App\Models\asset_status::whereNull('enter_at')->count(),
// 'jumlahPeti' => \App\Models\Peti::count(),
// 'jumlahPeminjaman' => \App\Models\asset_status::count(),
// 'jumlahPengembalian' => \App\Models\asset_status::whereNotNull('enter_at')->count(),
// 'active' => 'menu-admin',
// ];
// return view('pages.user.index', $data);
// }
public function notification()
{
$data = [
@ -32,17 +47,6 @@ class HomeController extends Controller
return view('layouts.navbar_list', $data);
}
public function indexUser()
{
$data = [
'reminder' => \App\Models\asset_status::whereNull('enter_at')->count(),
'jumlahPeminjaman' => \App\Models\asset_status::count(),
'jumlahPengembalian' => \App\Models\asset_status::whereNotNull('enter_at')->count(),
'active' => 'menu-user',
];
return view('pages.user.index', $data);
}
//data pertahun untuk bar chart
public function generateChartData()

6
app/Http/Controllers/PeminjamanController.php

@ -39,18 +39,12 @@ class PeminjamanController extends Controller
$subquery->where('status', '!=', 0);
})->orWhereDoesntHave('assetStatuses');
})->where('status', 'aktif')->get();
// $petiTransfer = Peti::where('id', $PetiId)
// ->leftJoin('category', 'product.category', '=', 'category.id')
// ->select('product.id','category.name')->first();
$data = [
// 'peti' => Peti::all(),
'peminjaman' => asset_status::get(),
'warehouse' => m_warehouse::get(),
'peti_block' => $petiWithStatusNotZeroOrEmptyAndActive,
// 'peti_block' => Peti::whereNotIn('id', asset_status::where('status', 0)->pluck('peti_id')->toArray())
// ->where('status', 'AKTIF') // Sesuaikan dengan nama kolom yang benar
// ->get(),
'customer' => Customer::get(),
'existingPeti' => asset_status::pluck('peti_id')->toArray(),
'active' => 'menu-peminjaman',

8
app/Http/Controllers/StokOpNameController.php

@ -71,6 +71,12 @@ class StokOpNameController extends Controller
->groupBy('customer_id', 'tipe_peti_id')
->get();
return Excel::download(new StokOpNameExport($stokOpnames, $todayStokOpnames, $yesterdayStokOpnames), 'stok_opname.xlsx');
// Total Peti Berdasarkan Gudang
$gudangStokOpnames = Peti::with('customer', 'tipe_peti', 'warehouse')
->select('customer_id', 'tipe_peti_id', 'warehouse_id', DB::raw('COUNT(*) as total_petis'))
->groupBy('customer_id', 'tipe_peti_id', 'warehouse_id')
->get();
return Excel::download(new StokOpNameExport($stokOpnames, $todayStokOpnames, $yesterdayStokOpnames, $gudangStokOpnames), 'stok_opname.xlsx');
}
}

120
resources/views/dashboard/Disposal/index.blade.php

@ -10,69 +10,73 @@
}
</style>
@include('layouts.components.alert-prompt')
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Disposal</h5>
</div>
<div class="col-6 text-right">
<a href="{{ route('dashboard.disposal.create') }}" class="btn btn-success btn-icon-split">
<span class="text">Disposal Peti</span>
</a>
</a>
@if (auth()->user()->role_id == 1)
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Disposal</h5>
</div>
<div class="col-6 text-right">
<a href="{{ route('dashboard.disposal.create') }}" class="btn btn-success btn-icon-split">
<span class="text">Disposal Peti</span>
</a>
</a>
</div>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th class="text-center">No</th>
<th>Kode Peti</th>
<th>Nama Customer</th>
<th>Tanggal Disposal</th>
<th>Alasan Disposal</th>
<th>Status Peti</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@php
$nodisposal = 1;
@endphp
@forelse ($disposal as $data_disposal)
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<td>{{ $nodisposal++ }}</td>
<td>{{ $data_disposal->peti->fix_lot }}</td>
<td>{{ $data_disposal->customer->name }}</td>
<td>{{ \Carbon\Carbon::parse($data_disposal->date_disposal)->format('d/m/Y') }}</td>
<td>{{ $data_disposal->description }}</td>
<td>{{ $data_disposal->status_disposal }}</td>
<td class="text-center">
<a href="{{ route('dashboard.disposal.edit', $data_disposal->id) }}" title="Edit">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form action="{{ route('dashboard.disposal.destroy', $data_disposal->id) }}"
method="POST" style="display: inline;">
@csrf
@method('DELETE')
<button type="submit"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"
title="Delete" style="border: none; background: none; cursor: pointer;">
<i class="fa fa-trash text-danger" style="font-size: 20px"></i>
</button>
</form>
</td>
<th class="text-center">No</th>
<th>Kode Peti</th>
<th>Nama Customer</th>
<th>Tanggal Disposal</th>
<th>Alasan Disposal</th>
<th>Status Peti</th>
<th class="text-center">Action</th>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</thead>
<tbody>
@php
$nodisposal = 1;
@endphp
@forelse ($disposal as $data_disposal)
<tr>
<td>{{ $nodisposal++ }}</td>
<td>{{ $data_disposal->peti->fix_lot }}</td>
<td>{{ $data_disposal->customer->name }}</td>
<td>{{ \Carbon\Carbon::parse($data_disposal->date_disposal)->format('d/m/Y') }}</td>
<td>{{ $data_disposal->description }}</td>
<td>{{ $data_disposal->status_disposal }}</td>
<td class="text-center">
<a href="{{ route('dashboard.disposal.edit', $data_disposal->id) }}" title="Edit">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form action="{{ route('dashboard.disposal.destroy', $data_disposal->id) }}"
method="POST" style="display: inline;">
@csrf
@method('DELETE')
<button type="submit"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"
title="Delete" style="border: none; background: none; cursor: pointer;">
<i class="fa fa-trash text-danger" style="font-size: 20px"></i>
</button>
</form>
</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
@elseif (auth()->user()->role_id == 2)
@include('pages.user.dashboard.disposal.index')
@endif
@endsection

82
resources/views/dashboard/History/Peminjaman/index.blade.php

@ -9,53 +9,49 @@
white-space: nowrap;
}
</style>
@if (auth()->user()->role_id == 1)
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Histori Peminjaman</h5>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Histori Peminjaman</h5>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th class="text-center">No</th>
<th>Kode Peti</th>
<th>Nama Customer</th>
<th>Kode</th>
<th>Tgl Peminjaman</th>
<th>PJ Peminjaman</th>
<th>WH Peminjam</th>
</tr>
</thead>
<tbody>
@php
$no_peminjaman = 1;
@endphp
@forelse ($peminjaman as $data_peminjaman)
<tr>
<th class="text-center">No</th>
<th>Kode Peti</th>
<th>Nama Customer</th>
<th>Kode</th>
<th>Tgl Peminjaman</th>
<th>PJ Peminjaman</th>
<th>WH Peminjam</th>
<td class="text-center">{{ $no_peminjaman++ }}</td>
<td>{{ $data_peminjaman->peti->fix_lot }}</td>
<td>{{ $data_peminjaman->peti->customer->name }}</td>
<td>{{ $data_peminjaman->peti->customer->code_customer }} -
{{ $data_peminjaman->peti->tipe_peti->type }}</td>
<td>{{ \Carbon\Carbon::parse($data_peminjaman->exit_at)->format('d/m/Y') }}</td>
<td>{{ $data_peminjaman->exit_pic }}</td>
<td>{{ $data_peminjaman->warehouse->name }}</td>
</tr>
</thead>
<tbody>
@php
$no_peminjaman = 1;
@endphp
@forelse ($peminjaman as $data_peminjaman)
<tr>
<td class="text-center">{{ $no_peminjaman++ }}</td>
<td>{{ $data_peminjaman->peti->fix_lot }}</td>
<td>{{ $data_peminjaman->peti->customer->name }}</td>
<td>{{ $data_peminjaman->peti->customer->code_customer }} -
{{ $data_peminjaman->peti->tipe_peti->type }}</td>
<td>{{ \Carbon\Carbon::parse($data_peminjaman->exit_at)->format('d/m/Y') }}</td>
<td>{{ $data_peminjaman->exit_pic }}</td>
<td>{{ $data_peminjaman->warehouse->name }}</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
@else
@include('pages.user.Peminjaman.index')
@endif
</div>
@endsection

180
resources/views/dashboard/History/Pengembalian/index.blade.php

@ -9,100 +9,96 @@
white-space: nowrap;
}
</style>
@if (auth()->user()->role_id == 1)
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Pengembalian</h5>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Pengembalian</h5>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th>No</th>
<th>Kode Peti</th>
<th>Customer</th>
<th>Tgl Peinjaman</th>
<th>Estimasi Pengembalian</th>
<th>PJ Peminjaman</th>
<th>Asal WH Peminjaman</th>
<th>Tgl Pengembalian</th>
<th>PJ Pengembalian</th>
<th>Tujuan WH Pengembalian</th>
<th>Kondisi Peti</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@php
$no_peminjaman = 1;
@endphp
@forelse ($peminjaman as $data)
@if ($data->enter_warehouse !== null)
<tr>
<td>{{ $no_peminjaman++ }}</td>
<td>{{ $data->peti->fix_lot }}</td>
<td>{{ $data->peti->customer->name }}</td>
<td>{{ \Carbon\Carbon::parse($data->exit_at)->format('d/m/Y') }}</td>
<td>{{ \Carbon\Carbon::parse($data->est_pengembalian)->format('d/m/Y') }}</td>
<td>{{ $data->exit_pic }}</td>
<td>
@if ($data->exit_warehouse)
{{ $data->warehouse->name }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_at)
{{ \Carbon\Carbon::parse($data->enter_at)->format('d-m-Y') }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_pic)
{{ $data->enter_pic }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_warehouse)
{{ $data->warehouseEnter->name }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->kondisi_peti)
{{ $data->kondisi_peti->nama_kondisi }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_warehouse === null)
Not Return
@else
Return
@endif
</td>
</tr>
@endif
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th>No</th>
<th>Kode Peti</th>
<th>Customer</th>
<th>Tgl Peinjaman</th>
<th>Estimasi Pengembalian</th>
<th>PJ Peminjaman</th>
<th>Asal WH Peminjaman</th>
<th>Tgl Pengembalian</th>
<th>PJ Pengembalian</th>
<th>Tujuan WH Pengembalian</th>
<th>Kondisi Peti</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@php
$no_peminjaman = 1;
@endphp
@forelse ($peminjaman as $data)
@if ($data->enter_warehouse !== null)
<tr>
<td>{{ $no_peminjaman++ }}</td>
<td>{{ $data->peti->fix_lot }}</td>
<td>{{ $data->peti->customer->name }}</td>
<td>{{ \Carbon\Carbon::parse($data->exit_at)->format('d/m/Y') }}</td>
<td>{{ \Carbon\Carbon::parse($data->est_pengembalian)->format('d/m/Y') }}</td>
<td>{{ $data->exit_pic }}</td>
<td>
@if ($data->exit_warehouse)
{{ $data->warehouse->name }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_at)
{{ \Carbon\Carbon::parse($data->enter_at)->format('d-m-Y') }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_pic)
{{ $data->enter_pic }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_warehouse)
{{ $data->warehouseEnter->name }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->kondisi_peti)
{{ $data->kondisi_peti->nama_kondisi }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_warehouse === null)
Not Return
@else
Return
@endif
</td>
</tr>
@endif
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
@else
@include('pages.user.Pengembalian.index')
@endif
</div>
@endsection

110
resources/views/dashboard/Master_Data/Manajemen_Peti/Kondisi_Peti/index.blade.php

@ -1,64 +1,70 @@
@extends('layouts.main')
@section('content')
@include('layouts.components.alert-prompt')
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Kondisi Peti</h5>
</div>
<div class="col-6 text-right">
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal" data-target="#tambahDataModal">
<span class="text">Tambah Kondisi Peti</span>
</a>
@if (auth()->user()->role_id == 1)
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Kondisi Peti</h5>
</div>
<div class="col-6 text-right">
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal"
data-target="#tambahDataModal">
<span class="text">Tambah Kondisi Peti</span>
</a>
</div>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th class="text-center" style="width: 20px">No</th>
<th>Kondisi Peti</th>
<th>Deskripsi</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@php
$nokondisi = 1;
@endphp
@forelse ($kondisiPeti as $data_kondisiPeti)
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<td class="text-center">{{ $nokondisi++ }}</td>
<td>{{ $data_kondisiPeti->nama_kondisi }}</td>
<td>{{ $data_kondisiPeti->deskripsi_kondisi }}</td>
<td class="text-center">
<a href="#" data-toggle="modal"
data-target="#editDataModal{{ $data_kondisiPeti->id }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form action="{{ route('dashboard.kondisipeti.destroy', $data_kondisiPeti->id) }}"
method="POST" style="display: inline;">
@csrf
@method('DELETE')
<button type="submit"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"
style="border: none; background: none; cursor: pointer;">
<i class="fa fa-trash text-danger" style="font-size: 20px"></i>
</button>
</form>
</td>
<th class="text-center" style="width: 20px">No</th>
<th>Kondisi Peti</th>
<th>Deskripsi</th>
<th class="text-center">Action</th>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</thead>
<tbody>
@php
$nokondisi = 1;
@endphp
@forelse ($kondisiPeti as $data_kondisiPeti)
<tr>
<td class="text-center">{{ $nokondisi++ }}</td>
<td>{{ $data_kondisiPeti->nama_kondisi }}</td>
<td>{{ $data_kondisiPeti->deskripsi_kondisi }}</td>
<td class="text-center">
<a href="#" data-toggle="modal"
data-target="#editDataModal{{ $data_kondisiPeti->id }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form action="{{ route('dashboard.kondisipeti.destroy', $data_kondisiPeti->id) }}"
method="POST" style="display: inline;">
@csrf
@method('DELETE')
<button type="submit"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"
style="border: none; background: none; cursor: pointer;">
<i class="fa fa-trash text-danger" style="font-size: 20px"></i>
</button>
</form>
</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
@elseif (auth()->user()->role_id == 2)
@include('pages.user.master_data.manajemen_peti.kondisi_peti.index')
@endif
<!-- Tambah Data Modal-->
<div class="modal fade" id="tambahDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"

2
resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php

@ -100,7 +100,7 @@
</div>
</div>
</div>
@else
@elseif (auth()->user()->role_id == 2)
@include('pages.user.Master_Data.Manajemen_Peti.Peti.index')
@endif

4
resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/index.blade.php

@ -64,7 +64,7 @@
</div>
</div>
</div>
@else
@include('pages.user.Master_Data.Manajemen_Peti.Type_peti.index')
@elseif (auth()->user()->role_id == 2)
@include('pages.user.master_data.manajemen_peti.tipe_peti.index')
@endif
@endsection

5
resources/views/dashboard/Master_Data/Report/Pattern_lot_peti/index.blade.php

@ -17,9 +17,6 @@
<h5 class="m-0 font-weight-bold text-primary mt-2">Report Pettern Lot Peti</h5>
</div>
<div class="col-6 text-right">
{{-- <a href="#" class="btn btn-success btn-icon-split ml-auto" target="_blank">
<span class="text">Cetak PDF</span>
</a> --}}
<a href="{{ route('dashboard.Pettern_Lot_Peti.export') }}" class="btn btn-info btn-icon-split ml-auto"
target="_blank">
<span class="text">Cetak Exel</span>
@ -42,6 +39,7 @@
<th>LOT NO</th>
<th>PACKING NO</th>
<th>FIX LOT</th>
<th>STATUS</th>
</tr>
</thead>
<tbody>
@ -63,6 +61,7 @@
<a
href="{{ route('dashboard.Pettern_Lot_Peti.show', $data_peti->id) }}">{{ $data_peti->fix_lot }}</a>
</td>
<td>{{ $data_peti->status }}</td>
</tr>
@empty
<p>Data Kosong</p>

3
resources/views/dashboard/Master_Data/Report/Stok_opname/index.blade.php

@ -9,7 +9,6 @@
white-space: nowrap;
}
</style>
{{-- <p>Halaman Stop Op Name</p> --}}
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
@ -17,8 +16,6 @@
<h5 class="m-0 font-weight-bold text-primary mt-2">Report Stok Opname</h5>
</div>
<div class="col-6 text-right">
{{-- <a href="#" class="btn btn-success btn-icon-split ml-auto" target="_blank">
<span class="text">Cetak PDF</span> --}}
</a>
<a href="{{ route('dashboard.StokOpname.export') }}" class="btn btn-info btn-icon-split ml-auto"
target="_blank">

4
resources/views/dashboard/Master_Data/Warehouse/index.blade.php

@ -65,8 +65,8 @@
</div>
</div>
@else
@include('pages.user.Master_Data.Warehouse.index')
@elseif(auth()->user()->role_id == 2)
@include('pages.user.master_data.warehouse.index')
@endif
<!-- Modal Tambah-->

143
resources/views/dashboard/Peminjaman/index.blade.php

@ -11,82 +11,77 @@
</style>
@include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1)
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Peminjaman</h5>
</div>
<div class="col-6 text-right">
<a href="{{ route('dashboard.peminjaman.create') }}" class="btn btn-success btn-icon-split">
<span class="text">Tambah Peminjaman</span>
</a>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Peminjaman</h5>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th class="text-center">No</th>
<th>Kode Peti</th>
<th>Nama Customer</th>
<th>Kode</th>
<th>Tgl Peminjaman</th>
<th>PJ Peminjaman</th>
<th>Tujuan WH Peminjam</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@php
$no_peminjaman = 1;
@endphp
@forelse ($peminjaman as $data_peminjaman)
@if ($data_peminjaman->enter_warehouse == null)
<tr>
<td class="text-center">{{ $no_peminjaman++ }}</td>
<td>{{ $data_peminjaman->peti->fix_lot }}</td>
<td>{{ $data_peminjaman->peti->customer->name }}</td>
<td>{{ $data_peminjaman->peti->customer->code_customer }} -
{{ $data_peminjaman->peti->tipe_peti->type }}</td>
<td>{{ \Carbon\Carbon::parse($data_peminjaman->exit_at)->format('d/m/Y') }}</td>
<td>{{ $data_peminjaman->exit_pic }}</td>
<td>{{ $data_peminjaman->warehouse->name }}</td>
<td class="text-center">
<a href="{{ route('dashboard.pengembalian.edit', $data_peminjaman->id) }}"
title="Pengembalian">
<i class="fa fa-reply mr-2" style="font-size: 20px"></i>
</a>
<a href="{{ route('dashboard.peminjaman.edit', $data_peminjaman->id) }}"
title="Edit">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form
action="{{ route('dashboard.peminjaman.destroy', $data_peminjaman->id) }}"
method="POST" style="display: inline;">
@csrf
@method('DELETE')
<button type="submit"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"
title="Delete" style="border: none; background: none; cursor: pointer;">
<i class="fa fa-trash text-danger" style="font-size: 20px"></i>
</button>
</form>
</td>
</tr>
@endif
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
<div class="col-6 text-right">
<a href="{{ route('dashboard.peminjaman.create') }}" class="btn btn-success btn-icon-split">
<span class="text">Tambah Peminjaman</span>
</a>
</div>
</div>
</div>
@else
@include('pages.user.Peminjaman.index')
@endif
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th class="text-center">No</th>
<th>Kode Peti</th>
<th>Nama Customer</th>
<th>Kode</th>
<th>Tgl Peminjaman</th>
<th>PJ Peminjaman</th>
<th>Tujuan WH Peminjam</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@php
$no_peminjaman = 1;
@endphp
@forelse ($peminjaman as $data_peminjaman)
@if ($data_peminjaman->enter_warehouse == null)
<tr>
<td class="text-center">{{ $no_peminjaman++ }}</td>
<td>{{ $data_peminjaman->peti->fix_lot }}</td>
<td>{{ $data_peminjaman->peti->customer->name }}</td>
<td>{{ $data_peminjaman->peti->customer->code_customer }} -
{{ $data_peminjaman->peti->tipe_peti->type }}</td>
<td>{{ \Carbon\Carbon::parse($data_peminjaman->exit_at)->format('d/m/Y') }}</td>
<td>{{ $data_peminjaman->exit_pic }}</td>
<td>{{ $data_peminjaman->warehouse->name }}</td>
<td class="text-center">
<a href="{{ route('dashboard.pengembalian.edit', $data_peminjaman->id) }}"
title="Pengembalian">
<i class="fa fa-reply mr-2" style="font-size: 20px"></i>
</a>
<a href="{{ route('dashboard.peminjaman.edit', $data_peminjaman->id) }}"
title="Edit">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form action="{{ route('dashboard.peminjaman.destroy', $data_peminjaman->id) }}"
method="POST" style="display: inline;">
@csrf
@method('DELETE')
<button type="submit"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"
title="Delete" style="border: none; background: none; cursor: pointer;">
<i class="fa fa-trash text-danger" style="font-size: 20px"></i>
</button>
</form>
</td>
</tr>
@endif
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
@endsection

193
resources/views/dashboard/Pengembalian/index.blade.php

@ -10,107 +10,102 @@
white-space: nowrap;
}
</style>
@if (auth()->user()->role_id == 1)
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Pengembalian</h5>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Pengembalian</h5>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th>No</th>
<th>Kode Peti</th>
<th>Customer</th>
<th>Tgl Peinjaman</th>
<th>Estimasi Pengembalian</th>
<th>PJ Peminjaman</th>
<th>WH Peminjam</th>
<th>Tgl Pengembalian</th>
<th>PJ Pengembalian</th>
<th>WH Pengembalian</th>
<th>Kondisi Peti</th>
<th>Status</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@php
$no_peminjaman = 1;
@endphp
@forelse ($peminjaman as $data)
@if ($data->enter_warehouse !== null)
<tr>
<td>{{ $no_peminjaman++ }}</td>
<td>{{ $data->peti->fix_lot }}</td>
<td>{{ $data->peti->customer->name }}</td>
<td>{{ \Carbon\Carbon::parse($data->exit_at)->format('d/m/Y') }}</td>
<td>{{ \Carbon\Carbon::parse($data->est_pengembalian)->format('d/m/Y') }}</td>
<td>{{ $data->exit_pic }}</td>
<td>
@if ($data->exit_warehouse)
{{ $data->warehouse->name }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_at)
{{ \Carbon\Carbon::parse($data->enter_at)->format('d-m-Y') }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_pic)
{{ $data->enter_pic }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_warehouse)
{{ $data->warehouseEnter->name }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->kondisi_peti)
{{ $data->kondisi_peti->nama_kondisi }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_warehouse === null)
Not Return
@else
Return
@endif
</td>
<td class="text-center">
<a href="{{ route('dashboard.pengembalian.edit', [$data->id]) }}"
title="Edit">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
</td>
</tr>
@endif
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th>No</th>
<th>Kode Peti</th>
<th>Customer</th>
<th>Tgl Peinjaman</th>
<th>Estimasi Pengembalian</th>
<th>PJ Peminjaman</th>
<th>WH Peminjam</th>
<th>Tgl Pengembalian</th>
<th>PJ Pengembalian</th>
<th>WH Pengembalian</th>
<th>Kondisi Peti</th>
<th>Status</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@php
$no_peminjaman = 1;
@endphp
@forelse ($peminjaman as $data)
@if ($data->enter_warehouse !== null)
<tr>
<td>{{ $no_peminjaman++ }}</td>
<td>{{ $data->peti->fix_lot }}</td>
<td>{{ $data->peti->customer->name }}</td>
<td>{{ \Carbon\Carbon::parse($data->exit_at)->format('d/m/Y') }}</td>
<td>{{ \Carbon\Carbon::parse($data->est_pengembalian)->format('d/m/Y') }}</td>
<td>{{ $data->exit_pic }}</td>
<td>
@if ($data->exit_warehouse)
{{ $data->warehouse->name }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_at)
{{ \Carbon\Carbon::parse($data->enter_at)->format('d-m-Y') }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_pic)
{{ $data->enter_pic }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_warehouse)
{{ $data->warehouseEnter->name }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->kondisi_peti)
{{ $data->kondisi_peti->nama_kondisi }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_warehouse === null)
Not Return
@else
Return
@endif
</td>
<td class="text-center">
<a href="{{ route('dashboard.pengembalian.edit', [$data->id]) }}" title="Edit">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
</td>
</tr>
@endif
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
@else
@include('pages.user.Pengembalian.index')
@endif
</div>
@endsection

551
resources/views/dashboard/index.blade.php

@ -1,376 +1,299 @@
@extends('layouts.main')
@section('content')
<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>
@if (auth()->user()->role_id == 1)
<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>
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;">
{{ $jumlahPeti }}
<div class="col-auto">
<i class="fas fa-clipboard-list fa-2x text-gray-300"></i>
</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>
<!-- 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 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>
<!-- 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 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>
<!-- 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 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>
<!-- Area Bar Chart -->
<div class="col-xl-7 col-lg-7">
<div class="card shadow mb-4" style="max-height: 600px;">
<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" style="height: 80%;"> <!-- Sesuaikan persentase tinggi konten yang diinginkan -->
<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>
<!-- Area Bar Chart -->
<div class="col-xl-7 col-lg-7">
<div class="card shadow mb-4" style="max-height: 600px;">
<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" style="height: 80%;"> <!-- Sesuaikan persentase tinggi konten yang diinginkan -->
<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="width: 100px; height: 68px;"></canvas>
<canvas id="ChartAssetStatus" style="width: 100px; height: 68px;"></canvas>
</div>
</div>
</div>
</div>
<!-- Area Pie Chart -->
<div class="col-xl-5 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>
@php
$chartDataPie = app('App\Http\Controllers\HomeController')->generateChartDataPie();
@endphp
<!-- Area Pie Chart -->
<div class="col-xl-5 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>
@php
$chartDataPie = app('App\Http\Controllers\HomeController')->generateChartDataPie();
@endphp
<div class="card-body">
<label for="yearFilterPie">Pilih Tahun:</label>
<select id="yearFilterPie" class="form-control">
@foreach ($chartDataPie['years'] as $year)
@if (count($chartDataPie['enterData']) > 0 && $chartDataPie['enterData'][$loop->index])
<option value="{{ $year }}">{{ $year }}</option>
@endif
@endforeach
</select>
<div class="card-body">
<label for="yearFilterPie">Pilih Tahun:</label>
<select id="yearFilterPie" class="form-control">
@foreach ($chartDataPie['years'] as $year)
@if (count($chartDataPie['enterData']) > 0 && $chartDataPie['enterData'][$loop->index])
<option value="{{ $year }}">{{ $year }}</option>
@endif
@endforeach
</select>
<canvas id="myPieChartsiopas"></canvas>
<canvas id="myPieChartsiopas"></canvas>
</div>
</div>
</div>
</div>
{{-- <div class="col-xl-5 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>
@php
$chartDataPie = app('App\Http\Controllers\HomeController')->generateChartDataPie();
@endphp
<div class="card-body">
<label for="yearFilterPie">Pilih Tahun:</label>
<select id="yearFilterPie" class="form-control">
@foreach ($chartDataPie['years'] as $year)
@if (count($chartDataPie['enterData']) > 0 && $chartDataPie['enterData'][$loop->index])
<option value="{{ $year }}">{{ $year }}</option>
@endif
@endforeach
</select>
<canvas id="myPieChartsiopas"></canvas>
</div>
</div>
</div> --}}
</div>
@push('script')
<!-- script pie chart -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
// Function to update the pie chart based on selected year
function updatePieChart(selectedYear) {
// Call the controller function to get data for the selected year
var chartDataPie = {!! json_encode(app('App\Http\Controllers\HomeController')->generateChartDataPie()) !!};
var yearIndex = chartDataPie.years.indexOf(selectedYear);
@push('script')
<!-- script pie chart -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
// Function to update the pie chart based on selected year
function updatePieChart(selectedYear) {
// Call the controller function to get data for the selected year
var chartDataPie = {!! json_encode(app('App\Http\Controllers\HomeController')->generateChartDataPie()) !!};
var yearIndex = chartDataPie.years.indexOf(selectedYear);
// Update the pie chart data
myPieChart.data.datasets[0].data = chartDataPie.enterData[yearIndex];
myPieChart.update();
// Update the pie chart data
myPieChart.data.datasets[0].data = chartDataPie.enterData[yearIndex];
myPieChart.update();
// Save selected year to local storage
localStorage.setItem('selectedYearPie', selectedYear);
}
// Save selected year to local storage
localStorage.setItem('selectedYearPie', selectedYear);
}
// Initial chart data
var initialChartDataPie = {!! json_encode(app('App\Http\Controllers\HomeController')->generateChartDataPie()) !!};
// Initial chart data
var initialChartDataPie = {!! json_encode(app('App\Http\Controllers\HomeController')->generateChartDataPie()) !!};
// Get the canvas element for the pie chart
var ctxPie = document.getElementById("myPieChartsiopas").getContext('2d');
// Get the canvas element for the pie chart
var ctxPie = document.getElementById("myPieChartsiopas").getContext('2d');
// Create the initial pie chart instance
var myPieChart = new Chart(ctxPie, {
type: 'pie',
data: {
labels: initialChartDataPie.monthNames,
datasets: [{
data: initialChartDataPie.enterData[0],
backgroundColor: ["#4e73df", "#1cc88a", "#36b9cc", "#ff6384", "#ff9f40", "#9966ff",
"#cc65fe",
"#ffcc29", "#a4e56d", "#ff3d00", "#9c9c9c", "#0d47a1"
],
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
maxHeight: 200,
},
tooltip: {
callbacks: {
label: function(context) {
var label = context.label || '';
if (label) {
label += ' : ';
// Create the initial pie chart instance
var myPieChart = new Chart(ctxPie, {
type: 'pie',
data: {
labels: initialChartDataPie.monthNames,
datasets: [{
data: initialChartDataPie.enterData[0],
backgroundColor: ["#4e73df", "#1cc88a", "#36b9cc", "#ff6384", "#ff9f40", "#9966ff",
"#cc65fe",
"#ffcc29", "#a4e56d", "#ff3d00", "#9c9c9c", "#0d47a1"
],
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
maxHeight: 200,
},
tooltip: {
callbacks: {
label: function(context) {
var label = context.label || '';
if (label) {
label += ' : ';
}
label += Math.round(context.parsed * 1) + ' Peti';
return label;
}
label += Math.round(context.parsed * 1) + ' Peti';
return label;
}
}
}
},
});
// Event listener for year filter change
document.getElementById('yearFilterPie').addEventListener('change', function() {
var selectedYear = this.value;
updatePieChart(selectedYear);
});
// On page load, try to retrieve the selected year from local storage
document.addEventListener('DOMContentLoaded', function() {
var selectedYear = localStorage.getItem('selectedYearPie');
if (selectedYear) {
// If a year is found, set the dropdown value and update the chart
document.getElementById('yearFilterPie').value = selectedYear;
updatePieChart(selectedYear);
}
},
});
});
</script>
// Event listener for year filter change
document.getElementById('yearFilterPie').addEventListener('change', function() {
var selectedYear = this.value;
updatePieChart(selectedYear);
});
<!-- script bar chart -->
<script>
document.addEventListener('DOMContentLoaded', function() {
var ctx = document.getElementById('ChartAssetStatus').getContext('2d');
var myChart;
var chartData = @json($chartData);
// On page load, try to retrieve the selected year from local storage
document.addEventListener('DOMContentLoaded', function() {
var selectedYear = localStorage.getItem('selectedYearPie');
if (selectedYear) {
// If a year is found, set the dropdown value and update the chart
document.getElementById('yearFilterPie').value = selectedYear;
updatePieChart(selectedYear);
}
});
</script>
{{-- <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
// Function to update the pie chart based on selected year
function updatePieChart(selectedYear) {
// Call the controller function to get data for the selected year
var chartDataPie = {!! json_encode(app('App\Http\Controllers\HomeController')->generateChartDataPie()) !!};
var yearIndex = chartDataPie.years.indexOf(selectedYear);
function updateChart(selectedYear) {
var selectedYearIndex = chartData.years.indexOf(selectedYear);
// Update the pie chart data
myPieChart.data.datasets[0].data = chartDataPie.enterData[yearIndex];
myPieChart.update();
}
// Mengambil data berdasarkan tahun yang dipilih
var updatedExitData = chartData.exitData[selectedYearIndex];
var updatedEnterData = chartData.enterData[selectedYearIndex];
// Initial chart data
var initialChartDataPie = {!! json_encode(app('App\Http\Controllers\HomeController')->generateChartDataPie()) !!};
// Memperbarui chart hanya dengan data tahun yang dipilih
myChart.data.labels = chartData.monthNames;
myChart.data.datasets[0].data = updatedExitData;
myChart.data.datasets[1].data = updatedEnterData;
// Get the canvas element for the pie chart
var ctxPie = document.getElementById("myPieChartsiopas").getContext('2d');
myChart.update();
}
// Create the initial pie chart instance
var myPieChart = new Chart(ctxPie, {
type: 'pie',
data: {
labels: initialChartDataPie.monthNames,
datasets: [{
data: initialChartDataPie.enterData[0],
backgroundColor: ["#4e73df", "#1cc88a", "#36b9cc", "#ff6384", "#ff9f40", "#9966ff",
"#cc65fe",
"#ffcc29", "#a4e56d", "#ff3d00", "#9c9c9c", "#0d47a1"
],
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
maxHeight: 200,
myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: chartData.monthNames, // Menggunakan nama bulan sebagai label
datasets: [{
label: 'Peminjaman',
data: chartData.exitData[
0], // Menggunakan data tahun saat ini sebagai awalan
backgroundColor: 'rgba(75, 192, 192, 0.2)',
borderColor: 'rgba(75, 192, 192, 1)',
borderWidth: 1
}, {
label: 'Pengembalian',
data: chartData.enterData[
0], // Menggunakan data tahun saat ini sebagai awalan
backgroundColor: 'rgba(255, 159, 64, 0.2)',
borderColor: 'rgba(255, 159, 64, 1)',
borderWidth: 1
}]
},
tooltip: {
callbacks: {
label: function(context) {
var label = context.label || '';
if (label) {
label += ' : ';
}
label += Math.round(context.parsed * 1) + ' Peti';
return label;
options: {
scales: {
y: {
beginAtZero: true
}
}
}
}
},
});
// Event listener for year filter change
document.getElementById('yearFilterPie').addEventListener('change', function() {
var selectedYear = this.value;
updatePieChart(selectedYear);
});
</script> --}}
<!-- script bar chart -->
<script>
document.addEventListener('DOMContentLoaded', function() {
var ctx = document.getElementById('ChartAssetStatus').getContext('2d');
var myChart;
var chartData = @json($chartData);
});
function updateChart(selectedYear) {
var selectedYearIndex = chartData.years.indexOf(selectedYear);
var yearFilter = document.getElementById('yearFilter');
yearFilter.addEventListener('change', function() {
var selectedYear = yearFilter.value;
updateChart(selectedYear);
// Simpan tahun yang dipilih ke local storage
localStorage.setItem('selectedYear', selectedYear);
});
// Mengambil data berdasarkan tahun yang dipilih
var updatedExitData = chartData.exitData[selectedYearIndex];
var updatedEnterData = chartData.enterData[selectedYearIndex];
// Memperbarui chart hanya dengan data tahun yang dipilih
myChart.data.labels = chartData.monthNames;
myChart.data.datasets[0].data = updatedExitData;
myChart.data.datasets[1].data = updatedEnterData;
myChart.update();
}
myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: chartData.monthNames, // Menggunakan nama bulan sebagai label
datasets: [{
label: 'Peminjaman',
data: chartData.exitData[
0], // Menggunakan data tahun saat ini sebagai awalan
backgroundColor: 'rgba(75, 192, 192, 0.2)',
borderColor: 'rgba(75, 192, 192, 1)',
borderWidth: 1
}, {
label: 'Pengembalian',
data: chartData.enterData[
0], // Menggunakan data tahun saat ini sebagai awalan
backgroundColor: 'rgba(255, 159, 64, 0.2)',
borderColor: 'rgba(255, 159, 64, 1)',
borderWidth: 1
}]
},
options: {
scales: {
y: {
beginAtZero: true
}
}
// Kondisi Pertama: Setelah halaman dimuat
// Coba baca tahun yang disimpan di local storage
var selectedYear = localStorage.getItem('selectedYear');
if (selectedYear) {
yearFilter.value = selectedYear;
updateChart(selectedYear);
} else {
// Jika tidak ada tahun yang disimpan, pilih tahun saat ini
selectedYear = new Date().getFullYear();
yearFilter.value = selectedYear;
updateChart(selectedYear);
}
});
var yearFilter = document.getElementById('yearFilter');
yearFilter.addEventListener('change', function() {
var selectedYear = yearFilter.value;
updateChart(selectedYear);
// Simpan tahun yang dipilih ke local storage
localStorage.setItem('selectedYear', selectedYear);
});
// Kondisi Pertama: Setelah halaman dimuat
// Coba baca tahun yang disimpan di local storage
var selectedYear = localStorage.getItem('selectedYear');
if (selectedYear) {
yearFilter.value = selectedYear;
updateChart(selectedYear);
} else {
// Jika tidak ada tahun yang disimpan, pilih tahun saat ini
selectedYear = new Date().getFullYear();
yearFilter.value = selectedYear;
updateChart(selectedYear);
}
});
</script>
@endpush
</script>
@endpush
@elseif(auth()->user()->role_id == 2)
@include('pages.user.dashboard.index')
@endif
@endsection

118
resources/views/pages/layouts/sidebar_user.blade.php

@ -1,34 +1,74 @@
<!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="{{ route('dashboard.home.user') }}">
<div class="sidebar-brand-icon rotate-n-15">
<i class="fas fa-laugh-wink"></i>
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="{{ route('dashboard.home.admin') }}">
<div class="sidebar-brand-icon">
{{-- <i class="fas fa-laugh-wink"></i> --}}
<img src="{{ asset('assets/img/logo_istw.png') }}" alt="Tachometer Icon" width="70" height="70"
class="mb-2 mt-2">
</div>
<div class="sidebar-brand-text mx-3">SIOPAS</div>
<div class="sidebar-brand-text mx-2 mr-3">SIOPAS</div>
</a>
<!-- Divider -->
<hr class="sidebar-divider my-0">
<!-- Nav Item - Dashboard -->
<li class="nav-item {{ $active == 'menu-user' ? 'active' : '' }}">
<a class="nav-link" href="{{ route('dashboard.home.user') }}">
<li class="nav-item {{ $active == 'menu-admin' ? 'active' : '' }}">
<a class="nav-link" href="{{ route('dashboard.home.admin') }}">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Dashboard</span></a>
</li>
<!-- Divider -->
<hr class="sidebar-divider">
<li class="nav-item {{ $active == 'menu-peminjaman' ? 'active' : '' }}">
<a class="nav-link" href="{{ route('dashboard.peminjaman.index') }}">
<i class="fas fa-fw fa-upload"></i>
<span>Peminjaman</span>
@php
$isTransaksiActive = in_array($active, ['menu-user', 'menu-role']);
@endphp
<!-- Transaction -->
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsetransaktion"
aria-expanded="{{ $isTransaksiActive ? 'true' : 'false' }}" aria-controls="collapsetransaktion">
<i class="fas fa-fw fa-exchange-alt"></i>
<span>Transaksi</span>
</a>
<div id="collapsetransaktion" class="collapse" aria-labelledby="headingTransaktion" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item {{ $active == 'menu-peminjaman' ? 'active' : '' }}"
href="{{ route('dashboard.peminjaman.index') }}">Peminjaman</a>
<a class="collapse-item {{ $active == 'menu-pengembalian' ? 'active' : '' }}"
href="{{ route('dashboard.pengembalian.index') }}">Pengembalian</a>
<a class="collapse-item {{ $active == 'menu-transfer' ? 'active' : '' }}"
href="{{ route('dashboard.transfer.index') }}">Transfer</a>
</div>
</div>
</li>
<li class="nav-item {{ $active == 'menu-pengembalian' ? 'active' : '' }}">
<a class="nav-link" href="{{ route('dashboard.pengembalian.index') }}">
<i class="fas fa-fw fa-download"></i>
<span>Pengembalian</span>
<li class="nav-item {{ $active == 'menu-disposal' ? 'active' : '' }}">
<a class="nav-link" href="{{ route('dashboard.disposal.index') }}">
<i class="fas fa-fw fa-trash"></i>
<span>Disposal</span>
</a>
</li>
<!-- Histories -->
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsehistory"
aria-expanded="{{ $isTransaksiActive ? 'true' : 'false' }}" aria-controls="collapsehistory">
<i class="fas fa-history"></i>
<span>History</span>
</a>
<div id="collapsehistory" class="collapse" aria-labelledby="headingHistory" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item {{ $active == 'history-peminjaman' ? 'active' : '' }}"
href="{{ route('dashboard.history.historyPeminjaman') }}">Peminjaman</a>
<a class="collapse-item {{ $active == 'history-pengembalian' ? 'active' : '' }}"
href="{{ route('dashboard.history.historyPengembalian') }}">Pengembalian</a>
<a class="collapse-item {{ $active == 'history-transfer' ? 'active' : '' }}"
href="{{ route('dashboard.history.historyTransfer') }}">Transfer</a>
</div>
</div>
</li>
<!-- Divider -->
@ -38,6 +78,32 @@
<div class="sidebar-heading">
Master Data
</div>
@php
$isUserActive = in_array($active, ['menu-user', 'menu-role']);
@endphp
{{-- <li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo"
aria-expanded="{{ $isUserActive ? 'true' : 'false' }}" aria-controls="collapseTwo">
<i class="fas fa-fw fa-users"></i>
<span>Manajemen User</span>
</a>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item {{ $active == 'menu-user' ? 'active' : '' }}"
href="{{ route('dashboard.user.index') }}">User</a>
<a class="collapse-item {{ $active == 'menu-role' ? 'active' : '' }}"
href="{{ route('dashboard.role.index') }}">Role</a>
</div>
</div>
</li> --}}
<li class="nav-item {{ $active == 'menu-customer' ? 'active' : '' }}">
<a class="nav-link" href="{{ route('dashboard.customer.index') }}">
<i class="fas fa-fw fa-user"></i>
<span>Customer</span>
</a>
</li>
@php
$isPetiActive = in_array($active, ['menu-user', 'menu-role']);
@endphp
@ -45,13 +111,16 @@
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsepeti"
aria-expanded="{{ $isPetiActive ? 'true' : 'false' }}" aria-controls="collapsepeti">
<i class="fas fa-fw fa-user"></i>
<i class="fas fa-fw fa-box"></i>
<span>Manajemen Peti</span>
</a>
<div id="collapsepeti" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item {{ $active == 'menu-typepeti' ? 'active' : '' }}"
href="{{ route('dashboard.typepeti.index') }}">Tipe Peti</a>
<a class="collapse-item {{ $active == 'menu-kondisipeti' ? 'active' : '' }}"
href="{{ route('dashboard.kondisipeti.index') }}">Kondisi
Peti</a>
<a class="collapse-item {{ $active == 'menu-peti' ? 'active' : '' }}"
href="{{ route('dashboard.peti.index') }}">Peti</a>
</div>
@ -59,7 +128,24 @@
</li>
<li class="nav-item {{ $active == 'menu-warehouse' ? 'active' : '' }}">
<a class="nav-link" href="{{ route('dashboard.warehouse.index') }}">
<i class="fas fa-fw fa-table"></i>
<i class="fas fa-fw fa-warehouse"></i>
<span>Warehouse</span>
</a>
</li>
{{-- <li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsereport"
aria-expanded="{{ $isUserActive ? 'true' : 'false' }}" aria-controls="collapseTwo">
<i class="fas fa-fw fa-file-alt"></i>
<span>Report</span>
</a>
<div id="collapsereport" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item {{ $active == 'menu-Pettern_Lot_Peti' ? 'active' : '' }}"
href="{{ route('dashboard.Pettern_Lot_Peti.index') }}">PATTERN LOT
PETI</a>
<a class="collapse-item {{ $active == 'menu-Stok_Opname' ? 'active' : '' }}"
href="{{ route('dashboard.StokOpname.index') }}">Stok Opname</a>
</div>
</div>
</li> --}}

24
resources/views/pages/user/Master_Data/Customer/index.blade.php

@ -4,11 +4,6 @@
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Customer</h5>
</div>
<div class="col-6 text-right">
<a href="{{ route('dashboard.customer.create') }}" class="btn btn-success btn-icon-split">
<span class="text">+ Tambah data</span>
</a>
</div>
</div>
</div>
<div class="card-body">
@ -21,7 +16,6 @@
<th>Kode Customer</th>
<th>No. Telepon</th>
<th>Alamat</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@ -35,24 +29,6 @@
<td>{{ $data_customer->code_customer }}</td>
<td>{{ $data_customer->no_tlp }}</td>
<td>{{ $data_customer->address }}</td>
<td class="text-center">
<a href="{{ route('dashboard.customer.show', [$data_customer->id]) }}">
<i class="fa fa-eye mr-2" style="font-size: 20px"></i>
</a>
<a href="{{ route('dashboard.customer.edit', [$data_customer->id]) }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form action="{{ route('dashboard.customer.destroy', $data_customer->id) }}"
method="POST" style="display: inline;">
@csrf
@method('DELETE')
<button type="submit"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"
style="border: none; background: none; cursor: pointer;">
<i class="fa fa-trash text-danger" style="font-size: 20px"></i>
</button>
</form>
</td>
</tr>
@empty
<p>Data Kosong</p>

38
resources/views/pages/user/Master_Data/Manajemen_Peti/Peti/index.blade.php

@ -1,14 +1,9 @@
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<div class="col-9">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Peti</h5>
</div>
<div class="col-6 text-right">
<a href="{{ route('dashboard.peti.create') }}" class="btn btn-success btn-icon-split">
<span class="text">Tambah Peti</span>
</a>
</div>
</div>
</div>
<div class="card-body">
@ -17,6 +12,8 @@
<thead>
<tr>
<th class="text-center" style="width: 10px">No</th>
<th><input type="checkbox" class="checkbox " id="selectAll"></th>
<th>Fix Lot</th>
<th>User</th>
<th>Customer</th>
<th>WH</th>
@ -24,10 +21,9 @@
<th>Tipe Peti</th>
<th>Ukuran Peti</th>
<th>Lot No</th>
<th>Status Peti</th>
<th>Kondisi Peti</th>
<th>Packing No</th>
<th>Fix Lot</th>
<th class="text-center">Action</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@ -37,6 +33,8 @@
@forelse ($peti as $data_peti)
<tr>
<td class="text-center">{{ $nopeti++ }}</td>
<td><input type="checkbox" class="checkbox" value="{{ $data_peti->id }}"></td>
<td>{{ $data_peti->fix_lot }}</td>
<td>{{ $data_peti->created_by }}</td>
<td>{{ $data_peti->customer->name }}</td>
<td>{{ $data_peti->warehouse->name }}</td>
@ -44,27 +42,9 @@
<td>{{ $data_peti->tipe_peti->type }}</td>
<td>{{ $data_peti->tipe_peti->size_peti }}</td>
<td>{{ $data_peti->customer->lot_no }}</td>
<td>{{ $data_peti->status_disposal }}</td>
<td>{{ $data_peti->kondisipeti->nama_kondisi }}</td>
<td class="text-right">{{ $data_peti->packing_no }}</td>
<td>{{ $data_peti->fix_lot }}</td>
<td class="text-center">
<a href="{{ route('dashboard.peti.show', [$data_peti->id]) }}">
<i class="fa fa-eye mr-2" style="font-size: 20px"></i>
</a>
<a href="{{ route('dashboard.peti.edit', [$data_peti->id]) }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form action="{{ route('dashboard.peti.destroy', $data_peti->id) }}" method="POST"
style="display: inline;">
@csrf
@method('DELETE')
<button type="submit"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"
style="border: none; background: none; cursor: pointer;">
<i class="fa fa-trash text-danger" style="font-size: 20px"></i>
</button>
</form>
</td>
<td>{{ $data_peti->status }}</td>
</tr>
@empty
<p>Data Kosong</p>

62
resources/views/pages/user/Master_Data/Manajemen_Peti/Type_peti/index.blade.php

@ -1,62 +0,0 @@
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Tipe Peti</h5>
</div>
<div class="col-6 text-right">
<a href="{{ route('dashboard.typepeti.create') }}" class="btn btn-success btn-icon-split">
<span class="text">Tambah Tipe Peti</span>
</a>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th class="text-center" style="width: 20px">No</th>
<th>Tipe Peti</th>
<th>Ukuran Peti</th>
<th>Deskripsi Peti</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@php
$notype = 1;
@endphp
@forelse ($typepeti as $data_typepeti)
<tr>
<td class="text-center">{{ $notype++ }}</td>
<td>{{ $data_typepeti->type }}</td>
<td>{{ $data_typepeti->size_peti }}</td>
<td>{{ $data_typepeti->description }}</td>
<td class="text-center">
<a href="{{ route('dashboard.typepeti.show', [$data_typepeti->id]) }}">
<i class="fa fa-eye mr-2" style="font-size: 20px"></i>
</a>
<a href="{{ route('dashboard.typepeti.edit', [$data_typepeti->id]) }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form action="{{ route('dashboard.typepeti.destroy', $data_typepeti->id) }}"
method="POST" style="display: inline;">
@csrf
@method('DELETE')
<button type="submit"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"
style="border: none; background: none; cursor: pointer;">
<i class="fa fa-trash text-danger" style="font-size: 20px"></i>
</button>
</form>
</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>

20
resources/views/pages/user/Master_Data/Role/index.blade.php → resources/views/pages/user/Master_Data/Manajemen_Peti/kondisi_peti/index.blade.php

@ -2,7 +2,7 @@
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Role</h5>
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Kondisi Peti</h5>
</div>
</div>
</div>
@ -11,22 +11,24 @@
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th class="text-center" style="width: 50px;">No</th>
<th>Nama Role</th>
<th class="text-center" style="width: 20px">No</th>
<th>Kondisi Peti</th>
<th>Deskripsi</th>
</tr>
</thead>
<tbody>
@php
$norole = 1;
$nokondisi = 1;
@endphp
@foreach ($role as $data_role)
@forelse ($kondisiPeti as $data_kondisiPeti)
<tr>
<td class="text-center">{{ $norole++ }}</td>
<td>{{ $data_role->name }}</td>
<td>{{ $data_role->description }}</td>
<td class="text-center">{{ $nokondisi++ }}</td>
<td>{{ $data_kondisiPeti->nama_kondisi }}</td>
<td>{{ $data_kondisiPeti->deskripsi_kondisi }}</td>
</tr>
@endforeach
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>

38
resources/views/pages/user/Master_Data/Manajemen_Peti/tipe_peti/index.blade.php

@ -0,0 +1,38 @@
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Tipe Peti</h5>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th class="text-center" style="width: 20px">No</th>
<th>Tipe Peti</th>
<th>Ukuran Peti</th>
<th>Deskripsi Peti</th>
</tr>
</thead>
<tbody>
@php
$notype = 1;
@endphp
@forelse ($typepeti as $data_typepeti)
<tr>
<td class="text-center">{{ $notype++ }}</td>
<td>{{ $data_typepeti->type }}</td>
<td>{{ $data_typepeti->size_peti }}</td>
<td>{{ $data_typepeti->description }}</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>

59
resources/views/pages/user/Master_Data/User/index.blade.php

@ -1,59 +0,0 @@
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data User</h5>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<th>Email</th>
<th>No. HP</th>
<th>Alamat</th>
<th>Ditugaskan</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>No</th>
<th>Nama</th>
<th>Email</th>
<th>No. HP</th>
<th>Alamat</th>
<th>Ditugaskan</th>
<th class="text-center">Action</th>
</tr>
</tfoot>
<tbody>
@php
$noUser = 1;
@endphp
@forelse ($user as $data)
<tr>
<td class="text-center">{{ $noUser++ }}</td>
<td>{{ $data->fullname }}</td>
<td>{{ $data->email }}</td>
<td>{{ isset($data->no_hp) ? $data->no_hp : '-' }}</td>
<td>{{ isset($data->address) ? $data->address : '-' }}</td>
<td>{{ $data->warehouse->name }}</td>
<td class="text-center">
<a href="{{ route('dashboard.user.show', [$data->id]) }}">
<i class="fa fa-eye mr-2" style="font-size: 20px"></i>
</a>
</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>

4
resources/views/pages/user/Master_Data/Warehouse/index.blade.php

@ -4,6 +4,8 @@
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Gudang</h5>
</div>
<div class="col-6 text-right">
</div>
</div>
</div>
<div class="card-body">
@ -15,6 +17,7 @@
<th>Nama Gudang</th>
<th>Deskripsi</th>
<th>Alamat</th>
{{-- <th class="text-center">Action</th> --}}
</tr>
</thead>
<tbody>
@ -32,6 +35,5 @@
</tbody>
</table>
</div>
</div>
</div>

65
resources/views/pages/user/Peminjaman/index.blade.php

@ -1,65 +0,0 @@
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Peminjaman</h5>
</div>
<div class="col-6 text-right">
<a href="{{ route('dashboard.peminjaman.create') }}" class="btn btn-success btn-icon-split">
<span class="text">Tambah Peminjaman</span>
</a>
</a>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th class="text-center">No</th>
<th>Kode Peti</th>
<th>Nama Customer</th>
<th>Tgl Peminjaman</th>
<th>PJ Peminjaman</th>
<th>Asal Gudang</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@php
$no_peminjaman = 1;
@endphp
@forelse ($peminjaman as $data_peminjaman)
<tr>
<td class="text-center">{{ $no_peminjaman++ }}</td>
<td>{{ $data_peminjaman->peti->customer->code_customer }} -
{{ $data_peminjaman->peti->tipe_peti->type }}</td>
<td>{{ $data_peminjaman->peti->customer->name }}</td>
<td>{{ \Carbon\Carbon::parse($data_peminjaman->exit_at)->format('d/m/Y') }}</td>
<td>{{ $data_peminjaman->exit_pic }}</td>
<td>{{ $data_peminjaman->warehouse->name }}</td>
<td class="text-center">
<a href="{{ route('dashboard.peminjaman.edit', $data_peminjaman->id) }}" title="Edit">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form action="{{ route('dashboard.peminjaman.destroy', $data_peminjaman->id) }}"
method="POST" style="display: inline;">
@csrf
@method('DELETE')
<button type="submit"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"
title="Delete" style="border: none; background: none; cursor: pointer;">
<i class="fa fa-trash text-danger" style="font-size: 20px"></i>
</button>
</form>
</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>

88
resources/views/pages/user/Pengembalian/index.blade.php

@ -1,88 +0,0 @@
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Data Pengembalian</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th>No</th>
<th>Kode Peti</th>
<th>Tgl Peinjaman</th>
<th>Estimasi Pengembalian</th>
<th>PJ Peminjaman</th>
<th>Asal WH Peminjaman</th>
<th>Tgl Pengembalian</th>
<th>PJ Pengembalian</th>
<th>Tujuan WH Pengembalian</th>
<th>Kondisi Peti</th>
<th>Status</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@php
$no_peminjaman = 1;
@endphp
{{-- @foreach ($peminjaman as $data)
@endforeach --}}
@forelse ($peminjaman as $data)
<tr>
<td>{{ $no_peminjaman++ }}</td>
<td>{{ $data->peti->customer->code_customer }} -
{{ $data->peti->tipe_peti->type }}</td>
<td>{{ \Carbon\Carbon::parse($data->exit_at)->format('d/m/Y') }}</td>
<td>{{ \Carbon\Carbon::parse($data->est_pengembalian)->format('d/m/Y') }}</td>
<td>{{ $data->exit_pic }}</td>
<td>{{ $data->warehouse->name }}</td>
<td>
@if ($data->enter_at)
{{ \Carbon\Carbon::parse($data->enter_at)->format('d-m-Y') }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_pic)
{{ $data->enter_pic }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_warehouse)
{{ $data->warehouse->name }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->kondisi_peti)
{{ $data->kondisi_peti }}
@else
<p class="text-center font-weight-bold">-</p>
@endif
</td>
<td>
@if ($data->enter_warehouse === null)
Not Return
@else
Return
@endif
</td>
<td class="text-center">
<a href="{{ route('dashboard.pengembalian.edit', [$data->id]) }}" title="Edit">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>

42
resources/views/pages/user/dashboard/disposal/index.blade.php

@ -0,0 +1,42 @@
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Disposal</h5>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead>
<tr>
<th class="text-center">No</th>
<th>Kode Peti</th>
<th>Nama Customer</th>
<th>Tanggal Disposal</th>
<th>Alasan Disposal</th>
<th>Status Peti</th>
</tr>
</thead>
<tbody>
@php
$nodisposal = 1;
@endphp
@forelse ($disposal as $data_disposal)
<tr>
<td>{{ $nodisposal++ }}</td>
<td>{{ $data_disposal->peti->fix_lot }}</td>
<td>{{ $data_disposal->customer->name }}</td>
<td>{{ \Carbon\Carbon::parse($data_disposal->date_disposal)->format('d/m/Y') }}</td>
<td>{{ $data_disposal->description }}</td>
<td>{{ $data_disposal->status_disposal }}</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>
</div>
</div>
</div>

288
resources/views/pages/user/dashboard/index.blade.php

@ -0,0 +1,288 @@
<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>
<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>
</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>
</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>
</div>
</div>
</div>
</div>
</div>
<!-- Area Bar Chart -->
<div class="col-xl-7 col-lg-7">
<div class="card shadow mb-4" style="max-height: 600px;">
<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" style="height: 80%;"> <!-- Sesuaikan persentase tinggi konten yang diinginkan -->
<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="width: 100px; height: 68px;"></canvas>
</div>
</div>
</div>
<!-- Area Pie Chart -->
<div class="col-xl-5 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>
@php
$chartDataPie = app('App\Http\Controllers\HomeController')->generateChartDataPie();
@endphp
<div class="card-body">
<label for="yearFilterPie">Pilih Tahun:</label>
<select id="yearFilterPie" class="form-control">
@foreach ($chartDataPie['years'] as $year)
@if (count($chartDataPie['enterData']) > 0 && $chartDataPie['enterData'][$loop->index])
<option value="{{ $year }}">{{ $year }}</option>
@endif
@endforeach
</select>
<canvas id="myPieChartsiopas"></canvas>
</div>
</div>
</div>
</div>
@push('script')
<!-- script pie chart -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
// Function to update the pie chart based on selected year
function updatePieChart(selectedYear) {
// Call the controller function to get data for the selected year
var chartDataPie = {!! json_encode(app('App\Http\Controllers\HomeController')->generateChartDataPie()) !!};
var yearIndex = chartDataPie.years.indexOf(selectedYear);
// Update the pie chart data
myPieChart.data.datasets[0].data = chartDataPie.enterData[yearIndex];
myPieChart.update();
// Save selected year to local storage
localStorage.setItem('selectedYearPie', selectedYear);
}
// Initial chart data
var initialChartDataPie = {!! json_encode(app('App\Http\Controllers\HomeController')->generateChartDataPie()) !!};
// Get the canvas element for the pie chart
var ctxPie = document.getElementById("myPieChartsiopas").getContext('2d');
// Create the initial pie chart instance
var myPieChart = new Chart(ctxPie, {
type: 'pie',
data: {
labels: initialChartDataPie.monthNames,
datasets: [{
data: initialChartDataPie.enterData[0],
backgroundColor: ["#4e73df", "#1cc88a", "#36b9cc", "#ff6384", "#ff9f40", "#9966ff",
"#cc65fe",
"#ffcc29", "#a4e56d", "#ff3d00", "#9c9c9c", "#0d47a1"
],
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
maxHeight: 200,
},
tooltip: {
callbacks: {
label: function(context) {
var label = context.label || '';
if (label) {
label += ' : ';
}
label += Math.round(context.parsed * 1) + ' Peti';
return label;
}
}
}
}
},
});
// Event listener for year filter change
document.getElementById('yearFilterPie').addEventListener('change', function() {
var selectedYear = this.value;
updatePieChart(selectedYear);
});
// On page load, try to retrieve the selected year from local storage
document.addEventListener('DOMContentLoaded', function() {
var selectedYear = localStorage.getItem('selectedYearPie');
if (selectedYear) {
// If a year is found, set the dropdown value and update the chart
document.getElementById('yearFilterPie').value = selectedYear;
updatePieChart(selectedYear);
}
});
</script>
<!-- script bar chart -->
<script>
document.addEventListener('DOMContentLoaded', function() {
var ctx = document.getElementById('ChartAssetStatus').getContext('2d');
var myChart;
var chartData = @json($chartData);
function updateChart(selectedYear) {
var selectedYearIndex = chartData.years.indexOf(selectedYear);
// Mengambil data berdasarkan tahun yang dipilih
var updatedExitData = chartData.exitData[selectedYearIndex];
var updatedEnterData = chartData.enterData[selectedYearIndex];
// Memperbarui chart hanya dengan data tahun yang dipilih
myChart.data.labels = chartData.monthNames;
myChart.data.datasets[0].data = updatedExitData;
myChart.data.datasets[1].data = updatedEnterData;
myChart.update();
}
myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: chartData.monthNames, // Menggunakan nama bulan sebagai label
datasets: [{
label: 'Peminjaman',
data: chartData.exitData[
0], // Menggunakan data tahun saat ini sebagai awalan
backgroundColor: 'rgba(75, 192, 192, 0.2)',
borderColor: 'rgba(75, 192, 192, 1)',
borderWidth: 1
}, {
label: 'Pengembalian',
data: chartData.enterData[
0], // Menggunakan data tahun saat ini sebagai awalan
backgroundColor: 'rgba(255, 159, 64, 0.2)',
borderColor: 'rgba(255, 159, 64, 1)',
borderWidth: 1
}]
},
options: {
scales: {
y: {
beginAtZero: true
}
}
}
});
var yearFilter = document.getElementById('yearFilter');
yearFilter.addEventListener('change', function() {
var selectedYear = yearFilter.value;
updateChart(selectedYear);
// Simpan tahun yang dipilih ke local storage
localStorage.setItem('selectedYear', selectedYear);
});
// Kondisi Pertama: Setelah halaman dimuat
// Coba baca tahun yang disimpan di local storage
var selectedYear = localStorage.getItem('selectedYear');
if (selectedYear) {
yearFilter.value = selectedYear;
updateChart(selectedYear);
} else {
// Jika tidak ada tahun yang disimpan, pilih tahun saat ini
selectedYear = new Date().getFullYear();
yearFilter.value = selectedYear;
updateChart(selectedYear);
}
});
</script>
@endpush

194
resources/views/pages/user/index.blade.php

@ -1,194 +0,0 @@
@extends('layouts.main')
@section('content')
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Dashboard</h1>
</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;">
{{ $jumlahAsset }}
</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>
</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>
</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>
</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 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>
@php
$chartData = app('App\Http\Controllers\HomeController')->generateChartData();
@endphp
<div class="card-body">
<canvas id="ChartAssetStatus" style="max-height: 500px;"></canvas> <!-- Atur tinggi chart -->
</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>
</div>
</div>
</div>
</div>
@push('script')
<script>
document.addEventListener('DOMContentLoaded', function() {
var ctx = document.getElementById('ChartAssetStatus').getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: {!! json_encode($chartData['monthNames']) !!},
datasets: [{
label: 'Peminjaman',
data: {!! json_encode($chartData['exitData']) !!},
backgroundColor: 'rgba(75, 192, 192, 0.2)',
borderColor: 'rgba(75, 192, 192, 1)',
borderWidth: 1
}, {
label: 'Pengembalian',
data: {!! json_encode($chartData['enterData']) !!},
backgroundColor: 'rgba(255, 159, 64, 0.2)',
borderColor: 'rgba(255, 159, 64, 1)',
borderWidth: 1
}]
},
options: {
scales: {
y: {
beginAtZero: true
}
}
}
});
});
</script>
@endpush
@endsection
Loading…
Cancel
Save