Heera/resources/views/layouts/partials/header.blade.php
2024-05-16 09:31:08 +05:45

291 lines
13 KiB
PHP

<header id="page-topbar">
<div class="layout-width">
<div class="navbar-header">
<div class="d-flex">
<!-- LOGO -->
<x-application-logo />
<button type="button" class="btn btn-sm fs-16 header-item vertical-menu-btn topnav-hamburger px-3"
id="topnav-hamburger-icon">
<span class="hamburger-icon">
<span></span>
<span></span>
<span></span>
</span>
</button>
<!-- App Search-->
{{-- <form class="app-search d-none d-md-block">
<div class="position-relative">
<input type="text" class="form-control" placeholder="Search..." autocomplete="off" id="search-options"
value="">
<span class="mdi mdi-magnify search-widget-icon"></span>
<span class="mdi mdi-close-circle search-widget-icon search-widget-icon-close d-none"
id="search-close-options"></span>
</div>
<div class="dropdown-menu dropdown-menu-lg" id="search-dropdown">
<div data-simplebar style="max-height: 320px;">
<!-- item-->
<div class="dropdown-header">
<h6 class="text-overflow text-muted text-uppercase mb-0">Recent Searches</h6>
</div>
<div class="dropdown-item text-wrap bg-transparent">
<a href="index-2.html" class="btn btn-soft-secondary btn-sm rounded-pill">how to setup
<i class="mdi mdi-magnify ms-1"></i></a>
<a href="index-2.html" class="btn btn-soft-secondary btn-sm rounded-pill">buttons <i
class="mdi mdi-magnify ms-1"></i></a>
</div>
<!-- item-->
<div class="dropdown-header mt-2">
<h6 class="text-overflow text-muted text-uppercase mb-1">Pages</h6>
</div>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-bubble-chart-line fs-18 text-muted me-2 align-middle"></i>
<span>Analytics Dashboard</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-lifebuoy-line fs-18 text-muted me-2 align-middle"></i>
<span>Help Center</span>
</a>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-user-settings-line fs-18 text-muted me-2 align-middle"></i>
<span>My account settings</span>
</a>
<!-- item-->
<div class="dropdown-header mt-2">
<h6 class="text-overflow text-muted text-uppercase mb-2">Members</h6>
</div>
<div class="notification-list">
<!-- item -->
<a href="javascript:void(0);" class="dropdown-item notify-item py-2">
<div class="d-flex">
<img src="{{ asset('assets/images/users/avatar-2.jpg') }}" class="rounded-circle avatar-xs me-3"
alt="user-pic">
<div class="flex-grow-1">
<h6 class="m-0">Angela Bernier</h6>
<span class="fs-11 text-muted mb-0">Manager</span>
</div>
</div>
</a>
<!-- item -->
<a href="javascript:void(0);" class="dropdown-item notify-item py-2">
<div class="d-flex">
<img src="{{ asset('assets/images/users/avatar-3.jpg') }}" class="rounded-circle avatar-xs me-3"
alt="user-pic">
<div class="flex-grow-1">
<h6 class="m-0">David Grasso</h6>
<span class="fs-11 text-muted mb-0">Web Designer</span>
</div>
</div>
</a>
<!-- item -->
<a href="javascript:void(0);" class="dropdown-item notify-item py-2">
<div class="d-flex">
<img src="{{ asset('assets/images/users/avatar-5.jpg') }}" class="rounded-circle avatar-xs me-3"
alt="user-pic">
<div class="flex-grow-1">
<h6 class="m-0">Mike Bunch</h6>
<span class="fs-11 text-muted mb-0">React Developer</span>
</div>
</div>
</a>
</div>
</div>
<div class="pb-1 pt-3 text-center">
<a href="pages-search-results.html" class="btn btn-primary btn-sm">View All Results <i
class="ri-arrow-right-line ms-1"></i></a>
</div>
</div>
</form> --}}
</div>
<div class="d-flex align-items-center">
<div class="dropdown d-md-none topbar-head-dropdown header-item">
<button type="button" class="btn btn-icon btn-topbar btn-ghost-secondary rounded-circle"
id="page-header-search-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="bx bx-search fs-22"></i>
</button>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-end p-0"
aria-labelledby="page-header-search-dropdown">
<form class="p-3">
<div class="form-group m-0">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search ..." aria-label="Recipient's username">
<button class="btn btn-primary" type="submit"><i class="mdi mdi-magnify"></i></button>
</div>
</div>
</form>
</div>
</div>
@role('admin')
<div class="dropdown topbar-head-dropdown header-item ms-1">
<button type="button" class="btn btn-icon btn-topbar btn-ghost-secondary rounded-circle"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="bx bx-category-alt fs-22"></i>
</button>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-end p-0">
<div class="p-2">
<div class="row g-0">
<div class="col">
<a class="dropdown-icon-item" href="{{ route('dropdown.index') }}">
{{-- <img src="assets/images/brands/github.png" alt="Github"> --}}
<span>Dropdown</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="{{ route('role.index') }}">
{{-- <img src="assets/images/brands/bitbucket.png" alt="bitbucket"> --}}
<span>Role</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="{{ route('permission.index') }}">
{{-- <img src="assets/images/brands/dribbble.png" alt="dribbble"> --}}
<span>Permission</span>
</a>
</div>
</div>
</div>
</div>
</div>
@endrole
<div class="header-item d-none d-sm-flex ms-1">
<button type="button" class="btn btn-icon btn-topbar btn-ghost-secondary rounded-circle"
data-toggle="fullscreen">
<i class='bx bx-fullscreen fs-22'></i>
</button>
</div>
<div class="header-item d-none d-sm-flex ms-1">
<button type="button" class="btn btn-icon btn-topbar btn-ghost-secondary rounded-circle light-dark-mode">
<i class='bx bx-moon fs-22'></i>
</button>
</div>
<div class="dropdown topbar-head-dropdown header-item ms-1" id="notificationDropdown">
<button type="button" class="btn btn-icon btn-topbar btn-ghost-secondary rounded-circle"
id="page-header-notifications-dropdown" data-bs-toggle="dropdown" data-bs-auto-close="outside"
aria-haspopup="true" aria-expanded="false">
<i class='bx bx-bell fs-22'></i>
<span
class="position-absolute topbar-badge fs-10 translate-middle badge rounded-pill bg-danger">{{ auth()->user()->unreadNotifications->count() }}<span
class="visually-hidden">unread messages</span></span>
</button>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-end p-0"
aria-labelledby="page-header-notifications-dropdown">
<div class="dropdown-head bg-primary bg-pattern rounded-top">
<div class="p-3">
<div class="row align-items-center">
<div class="col">
<h6 class="fs-16 fw-semibold m-0 text-white"> Notifications </h6>
</div>
<div class="dropdown-tabs col-auto">
<a href="{{ route('notification.markAllAsRead') }}">
<span class="badge badge-soft-info fs-13"> Mark As Read</span>
</a>
</div>
</div>
</div>
</div>
<div data-simplebar style="max-height: 300px;" class="pe-2">
@if (auth()->user()->unreadNotifications->count() > 0)
@foreach (auth()->user()->unreadNotifications as $notification)
<div class="text-reset notification-item d-block dropdown-item position-relative">
<div class="d-flex">
<div class="avatar-xs me-3 flex-shrink-0">
<span class="avatar-title bg-info-subtle text-info rounded-circle fs-16">
<i class="bx bx-badge-check"></i>
</span>
</div>
<div class="flex-grow-1">
<a href="#!" class="stretched-link">
<h6 class="lh-base mb-2 mt-0">{!! $notification->data['msg'] !!}
</h6>
</a>
<p class="fs-11 fw-medium text-uppercase text-muted mb-0">
<span><i class="mdi mdi-clock-outline"></i>
{{ $notification->created_at->diffForHumans() }}</span>
</p>
</div>
<div class="fs-15">
<div class="form-check notification-check">
<a class="btn btn-icon btn-sm btn-ghost-danger form-check-input"
href="{{ route('notification.markAsRead', ['id' => $notification->id]) }}"><i
class="ri-close-fill fs-16"></i></a>
</div>
</div>
</div>
</div>
@endforeach
@else
<p class="pt-2 text-center">No Notifications Found</p>
@endif
</div>
<div class="tab-content position-relative" id="notificationItemsTabContent">
<div class="notification-actions" id="notification-actions">
<div class="d-flex text-muted justify-content-center">
Select <div id="select-content" class="text-body fw-semibold px-1">0</div> Result
<button type="button" class="btn btn-link link-danger ms-3 p-0" data-bs-toggle="modal"
data-bs-target="#removeNotificationModal">Remove</button>
</div>
</div>
</div>
</div>
</div>
<div class="dropdown ms-sm-3 header-item topbar-user">
<button type="button" class="btn" id="page-header-user-dropdown" data-bs-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="d-flex align-items-center">
<img class="rounded-circle header-profile-user" src="{{ auth()->user()->profile_pic }}"
alt="Header Avatar">
<span class="ms-xl-2 text-start">
<span class="d-none d-xl-inline-block fw-medium user-name-text ms-1">{{ auth()->user()->name }}</span>
</span>
</span>
</button>
<div class="dropdown-menu dropdown-menu-end">
<!-- item-->
{{-- <h6 class="dropdown-header">Welcome Anna!</h6> --}}
<a class="dropdown-item" href="pages-profile.html"><i
class="mdi mdi-account-circle text-muted fs-16 me-1 align-middle"></i> <span
class="align-middle">Profile</span></a>
<a class="dropdown-item" href="pages-profile-settings.html"><span
class="badge bg-success-subtle text-success float-end mt-1">New</span><i
class="mdi mdi-cog-outline text-muted fs-16 me-1 align-middle"></i> <span
class="align-middle">Settings</span></a>
<a class="dropdown-item" href="{{ route('logout') }}"
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
<i class="mdi mdi-logout text-muted fs-16 me-1 align-middle"></i>
<span class="align-middle" data-key="t-logout">Logout</span>
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
@csrf
</form>
</div>
</div>
</div>
</div>
</div>
</header>