105 lines
4.2 KiB
PHP
105 lines
4.2 KiB
PHP
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
|
|
|
|
<!-- Sidebar Toggle (Topbar) -->
|
|
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
|
|
<i class="fa fa-bars"></i>
|
|
</button>
|
|
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
|
<div class="container-fluid">
|
|
<div class="navbar-brand">@yield('topbar')</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Topbar Navbar -->
|
|
<ul class="navbar-nav ml-auto">
|
|
<!-- Notifikasi Pelamar Baru -->
|
|
@php
|
|
$notifikasi = Auth::user()->unreadNotifications->where('type', 'App\Notifications\PelamarBaruNotification');
|
|
@endphp
|
|
<li class="nav-item dropdown no-arrow mx-1">
|
|
<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 -->
|
|
@if($notifikasi->count() > 0)
|
|
<span class="badge badge-danger badge-counter">{{ $notifikasi->count() }}</span>
|
|
@endif
|
|
</a>
|
|
<!-- Dropdown - Alerts -->
|
|
<div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
|
aria-labelledby="alertsDropdown">
|
|
<h6 class="dropdown-header">
|
|
Notifikasi Pelamar Baru
|
|
</h6>
|
|
@forelse ($notifikasi as $notif)
|
|
<a class="dropdown-item d-flex align-items-center" href="#">
|
|
<div class="mr-3">
|
|
<div class="icon-circle bg-primary">
|
|
<i class="fas fa-user-plus text-white"></i>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="small text-gray-500">{{ $notif->created_at->diffForHumans() }}</div>
|
|
<span class="font-weight-bold">{{ $notif->data['message'] }}</span>
|
|
</div>
|
|
</a>
|
|
@empty
|
|
<a class="dropdown-item text-center small text-gray-500" href="#">Tidak ada notifikasi baru</a>
|
|
@endforelse
|
|
|
|
@if($notifikasi->count() > 0)
|
|
<div class="dropdown-divider"></div>
|
|
<a href="{{ route('notifikasi.baca') }}" class="dropdown-item text-center small text-primary">
|
|
Tandai semua telah dibaca
|
|
</a>
|
|
@endif
|
|
</div>
|
|
</li>
|
|
|
|
<div class="topbar-divider d-none d-sm-block"></div>
|
|
|
|
@auth
|
|
<!-- Nav Item - User Information -->
|
|
<li class="nav-item dropdown no-arrow">
|
|
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
|
|
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<i class="fas fa-user-circle fa-lg text-gray-600 mr-2"></i>
|
|
<span class="mr-2 d-none d-lg-inline text-gray-600 small">{{ Auth::user()->name }}</span>
|
|
{{-- <img class="img-profile rounded-circle" src="img/undraw_profile.svg"> --}}
|
|
</a>
|
|
|
|
<!-- Dropdown - User Information -->
|
|
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
|
aria-labelledby="userDropdown">
|
|
<a class="dropdown-item" href="{{ route('profile') }}">
|
|
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
|
|
Profile
|
|
</a>
|
|
<div class="dropdown-divider"></div>
|
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
|
|
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
|
|
Logout
|
|
</a>
|
|
</div>
|
|
</li>
|
|
@endauth
|
|
|
|
@guest
|
|
<!-- Jika belum login -->
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ route('login') }}">
|
|
<i class="fas fa-sign-in-alt fa-lg text-gray-600 mr-2"></i>
|
|
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Login</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ route('register.user') }}">
|
|
<i class="fas fa-user-plus fa-lg text-gray-600 mr-2"></i>
|
|
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Daftar</span>
|
|
</a>
|
|
</li>
|
|
@endguest
|
|
</ul>
|
|
</nav> |