admin_nav.blade.php 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <div class="aiz-topbar px-15px px-lg-25px d-flex align-items-stretch justify-content-between">
  2. <div class="d-flex">
  3. <div class="aiz-topbar-nav-toggler d-flex align-items-center justify-content-start mr-2 mr-md-3 ml-0" data-toggle="aiz-mobile-nav">
  4. <button class="aiz-mobile-toggler">
  5. <span></span>
  6. </button>
  7. </div>
  8. </div>
  9. <div class="d-flex justify-content-between align-items-stretch flex-grow-xl-1">
  10. <div class="d-flex justify-content-around align-items-center align-items-stretch">
  11. <div class="d-flex justify-content-around align-items-center align-items-stretch">
  12. <div class="aiz-topbar-item">
  13. <div class="d-flex align-items-center">
  14. <a class="btn btn-icon btn-circle btn-light" href="{{ route('home')}}" target="_blank" title="{{ translate('Browse Website') }}">
  15. <i class="las la-globe"></i>
  16. </a>
  17. </div>
  18. </div>
  19. </div>
  20. @if (addon_is_activated('pos_system'))
  21. <div class="d-flex justify-content-around align-items-center align-items-stretch ml-3">
  22. <div class="aiz-topbar-item">
  23. <div class="d-flex align-items-center">
  24. <a class="btn btn-icon btn-circle btn-light" href="{{ route('poin-of-sales.index') }}" target="_blank" title="{{ translate('POS') }}">
  25. <i class="las la-print"></i>
  26. </a>
  27. </div>
  28. </div>
  29. </div>
  30. @endif
  31. <div class="d-flex justify-content-around align-items-center align-items-stretch ml-3">
  32. <div class="aiz-topbar-item">
  33. <div class="d-flex align-items-center">
  34. <a class="btn btn-soft-danger btn-sm d-flex align-items-center" href="{{ route('cache.clear')}}">
  35. <i class="las la-hdd fs-20"></i>
  36. <span class="fw-500 ml-1 mr-0 d-none d-md-block">{{ translate('Clear Cache') }}</span>
  37. </a>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="d-flex justify-content-around align-items-center align-items-stretch">
  43. <div class="aiz-topbar-item ml-2">
  44. <div class="align-items-stretch d-flex dropdown">
  45. <a class="dropdown-toggle no-arrow" data-toggle="dropdown" href="javascript:void(0);" role="button" aria-haspopup="false" aria-expanded="false">
  46. <span class="btn btn-icon p-0 d-flex justify-content-center align-items-center">
  47. <span class="d-flex align-items-center position-relative">
  48. <i class="las la-bell fs-24"></i>
  49. @if(Auth::user()->unreadNotifications->count() > 0)
  50. <span class="badge badge-sm badge-dot badge-circle badge-primary position-absolute absolute-top-right"></span>
  51. @endif
  52. </span>
  53. </span>
  54. </a>
  55. <div class="dropdown-menu dropdown-menu-right dropdown-menu-animated dropdown-menu-lg py-0">
  56. <div class="p-3 bg-light border-bottom">
  57. <h6 class="mb-0">{{ translate('Notifications') }}</h6>
  58. </div>
  59. <div class="px-3 c-scrollbar-light overflow-auto " style="max-height:300px;">
  60. <ul class="list-group list-group-flush">
  61. @forelse(Auth::user()->unreadNotifications->take(20) as $notification)
  62. <li class="list-group-item d-flex justify-content-between align-items- py-3">
  63. <div class="media text-inherit">
  64. <div class="media-body">
  65. @if($notification->type == 'App\Notifications\OrderNotification')
  66. <p class="mb-1 text-truncate-2">
  67. {{translate('Order code: ')}} {{$notification->data['order_code']}} {{ translate('has been '. ucfirst(str_replace('_', ' ', $notification->data['status'])))}}
  68. </p>
  69. <small class="text-muted">
  70. {{ date("F j Y, g:i a", strtotime($notification->created_at)) }}
  71. </small>
  72. @endif
  73. </div>
  74. </div>
  75. </li>
  76. @empty
  77. <li class="list-group-item">
  78. <div class="py-4 text-center fs-16">
  79. {{ translate('No notification found') }}
  80. </div>
  81. </li>
  82. @endforelse
  83. </ul>
  84. </div>
  85. <div class="text-center border-top">
  86. <a href="{{ route('admin.all-notification') }}" class="text-reset d-block py-2">
  87. {{translate('View All Notifications')}}
  88. </a>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. {{-- language --}}
  94. @php
  95. if(Session::has('locale')){
  96. $locale = Session::get('locale', Config::get('app.locale'));
  97. }
  98. else{
  99. $locale = env('DEFAULT_LANGUAGE');
  100. }
  101. @endphp
  102. <div class="aiz-topbar-item ml-2">
  103. <div class="align-items-stretch d-flex dropdown " id="lang-change">
  104. <a class="dropdown-toggle no-arrow" data-toggle="dropdown" href="javascript:void(0);" role="button" aria-haspopup="false" aria-expanded="false">
  105. <span class="btn btn-icon">
  106. <img src="{{ static_asset('assets/img/flags/'.$locale.'.png') }}" height="11">
  107. </span>
  108. </a>
  109. <ul class="dropdown-menu dropdown-menu-right dropdown-menu-animated dropdown-menu-xs">
  110. @foreach (\App\Models\Language::where('status', 1)->get() as $key => $language)
  111. <li>
  112. <a href="javascript:void(0)" data-flag="{{ $language->code }}" class="dropdown-item @if($locale == $language->code) active @endif">
  113. <img src="{{ static_asset('assets/img/flags/'.$language->code.'.png') }}" class="mr-2">
  114. <span class="language">{{ $language->name }}</span>
  115. </a>
  116. </li>
  117. @endforeach
  118. </ul>
  119. </div>
  120. </div>
  121. <div class="aiz-topbar-item ml-2">
  122. <div class="align-items-stretch d-flex dropdown">
  123. <a class="dropdown-toggle no-arrow text-dark" data-toggle="dropdown" href="javascript:void(0);" role="button" aria-haspopup="false" aria-expanded="false">
  124. <span class="d-flex align-items-center">
  125. <span class="avatar avatar-sm mr-md-2">
  126. <img
  127. src="{{ uploaded_asset(Auth::user()->avatar_original) }}"
  128. onerror="this.onerror=null;this.src='{{ static_asset('assets/img/avatar-place.png') }}';"
  129. >
  130. </span>
  131. <span class="d-none d-md-block">
  132. <span class="d-block fw-500">{{Auth::user()->name}}</span>
  133. <span class="d-block small opacity-60">{{Auth::user()->user_type}}</span>
  134. </span>
  135. </span>
  136. </a>
  137. <div class="dropdown-menu dropdown-menu-right dropdown-menu-animated dropdown-menu-md">
  138. <a href="{{ route('profile.index') }}" class="dropdown-item">
  139. <i class="las la-user-circle"></i>
  140. <span>{{translate('Profile')}}</span>
  141. </a>
  142. <a href="{{ route('logout')}}" class="dropdown-item">
  143. <i class="las la-sign-out-alt"></i>
  144. <span>{{translate('Logout')}}</span>
  145. </a>
  146. </div>
  147. </div>
  148. </div><!-- .aiz-topbar-item -->
  149. </div>
  150. </div>
  151. </div><!-- .aiz-topbar -->