Browse Source

update

master
Gunawan19621 1 year ago
parent
commit
22a3362588
  1. 12
      app/Http/Controllers/HomeController.php
  2. 37
      resources/views/dashboard/Disposal/index.blade.php
  3. 47
      resources/views/layouts/navbar.blade.php
  4. 4
      resources/views/layouts/navbar_list.blade.php
  5. 1
      routes/web.php

12
app/Http/Controllers/HomeController.php

@ -20,6 +20,18 @@ class HomeController extends Controller
return view('dashboard.index', $data); return view('dashboard.index', $data);
} }
public function notification()
{
$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('layouts.navbar_list', $data);
}
public function indexUser() public function indexUser()
{ {
$data = [ $data = [

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

@ -26,43 +26,6 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="table-responsive"> <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 Transfer</th>
<th>Asal Gudang</th>
<th>Tujuan Gudang</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>kode dari Peti</td>
<td>Gunawan</td>
<td>13-11-2023</td>
<td>Gudang A</td>
<td>Gudang B</td>
<td class="text-center">
<a href="#" title="Edit">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form action="#" 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>
</tbody>
</table> --}}
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> <table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<thead> <thead>
<tr> <tr>

47
resources/views/layouts/navbar.blade.php

@ -18,53 +18,42 @@
<!-- Nav Item - Alerts --> <!-- Nav Item - Alerts -->
<li class="nav-item dropdown no-arrow mx-1"> <li class="nav-item dropdown no-arrow mx-1">
@php
$notification = \App\Models\asset_status::whereNull('enter_at')
->whereDate('est_pengembalian', \Carbon\Carbon::today())
->get();
$totalNotification = $notification->count();
@endphp
<a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" <a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false"> aria-haspopup="true" aria-expanded="false">
<i class="fas fa-bell fa-fw"></i> <i class="fas fa-bell fa-fw"></i>
<!-- Counter - Alerts --> <!-- Counter - Alerts -->
<span class="badge badge-danger badge-counter">3+</span> <span class="badge badge-danger badge-counter">{{ $totalNotification }}</span>
</a> </a>
<!-- Dropdown - Alerts --> <!-- Dropdown - Alerts -->
<div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in" <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="alertsDropdown"> aria-labelledby="alertsDropdown">
<h6 class="dropdown-header"> <h6 class="dropdown-header">
Alerts Center Notifikasi Siopas
</h6> </h6>
<a class="dropdown-item d-flex align-items-center" href="#"> @foreach ($notification as $data_notification)
<a class="dropdown-item d-flex align-items-center"
href="{{ route('dashboard.pengembalian.edit', $data_notification->id) }}">
<div class="mr-3"> <div class="mr-3">
<div class="icon-circle bg-primary"> <div class="icon-circle bg-primary">
<i class="fas fa-download text-white"></i> <i class="fas fa-download text-white"></i>
</div> </div>
</div> </div>
<div> <div>
<div class="small text-gray-500">December 12, 2019</div> <div class="small text-gray-500">
<span class="font-weight-bold">A new monthly report is ready to {{ \Carbon\Carbon::parse($data_notification->exit_at)->format('F j, Y') }}</div>
download!</span> <span class="font-weight-bold">Peti dengan kode
{{ $data_notification->peti->fix_lot }} berhasil di pinjam</span>
</div> </div>
</a> </a>
<a class="dropdown-item d-flex align-items-center" href="#"> @endforeach
<div class="mr-3"> <a class="dropdown-item text-center small text-gray-500"
<div class="icon-circle bg-success"> href="{{ route('dashboard.navbarList.notification') }}">Show All
<i class="fas fa-upload text-white"></i>
</div>
</div>
<div>
<div class="small text-gray-500">December 7, 2019</div>
$290.29 has been deposited into your account!
</div>
</a>
<a class="dropdown-item d-flex align-items-center" href="#">
<div class="mr-3">
<div class="icon-circle bg-warning">
<i class="fas fa-exclamation-triangle text-white"></i>
</div>
</div>
<div>
<div class="small text-gray-500">December 2, 2019</div>
Spending Alert: We've noticed unusually high spending for your account.
</div>
</a>
<a class="dropdown-item text-center small text-gray-500" href="#">Show All
Alerts</a> Alerts</a>
</div> </div>
</li> </li>

4
resources/views/layouts/navbar_list.blade.php

@ -0,0 +1,4 @@
@extends('layouts.main')
@section('content')
<p>Halaman Notification</p>
@endsection

1
routes/web.php

@ -46,6 +46,7 @@ Route::middleware('auth')->group(function () {
Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(function () { Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(function () {
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home.admin'); Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home.admin');
Route::get('/home/navbarList', [App\Http\Controllers\HomeController::class, 'notification'])->name('navbarList.notification');
Route::get('/homeuser', [App\Http\Controllers\HomeController::class, 'indexUser'])->name('home.user'); Route::get('/homeuser', [App\Http\Controllers\HomeController::class, 'indexUser'])->name('home.user');
//Halaman Peminjaman //Halaman Peminjaman

Loading…
Cancel
Save