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. 59
      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);
}
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()
{
$data = [

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

@ -26,43 +26,6 @@
</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 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">
<thead>
<tr>

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

@ -18,53 +18,42 @@
<!-- Nav Item - Alerts -->
<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"
aria-haspopup="true" aria-expanded="false">
<i class="fas fa-bell fa-fw"></i>
<!-- Counter - Alerts -->
<span class="badge badge-danger badge-counter">3+</span>
<span class="badge badge-danger badge-counter">{{ $totalNotification }}</span>
</a>
<!-- Dropdown - Alerts -->
<div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="alertsDropdown">
<h6 class="dropdown-header">
Alerts Center
Notifikasi Siopas
</h6>
<a class="dropdown-item d-flex align-items-center" href="#">
<div class="mr-3">
<div class="icon-circle bg-primary">
<i class="fas fa-download text-white"></i>
@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="icon-circle bg-primary">
<i class="fas fa-download text-white"></i>
</div>
</div>
</div>
<div>
<div class="small text-gray-500">December 12, 2019</div>
<span class="font-weight-bold">A new monthly report is ready to
download!</span>
</div>
</a>
<a class="dropdown-item d-flex align-items-center" href="#">
<div class="mr-3">
<div class="icon-circle bg-success">
<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 class="small text-gray-500">
{{ \Carbon\Carbon::parse($data_notification->exit_at)->format('F j, Y') }}</div>
<span class="font-weight-bold">Peti dengan kode
{{ $data_notification->peti->fix_lot }} berhasil di pinjam</span>
</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
</a>
@endforeach
<a class="dropdown-item text-center small text-gray-500"
href="{{ route('dashboard.navbarList.notification') }}">Show All
Alerts</a>
</div>
</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::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');
//Halaman Peminjaman

Loading…
Cancel
Save