| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <ul class="breadcrumbs">
- <?php $segments = ''; ?>
- @foreach(Request::segments() as $segment)
- <?php $segments .= '/'.$segment; ?>
- <li style="text-transform: uppercase;">
- <a class="text-info" href="#">{{ substr($segment,0, 30) }}</a>
- </li>
- @endforeach
- </ul>
- <?php
- $tahunProgramAktif = \App\Model\TahunProgram::where('status',1)->first();
- if(!empty($tahunProgramAktif)){
- $user = Auth::user();
- $read = \App\Model\MetadataProgramNotificationRead::where('id_user',$user->id)->pluck('id_metadata_program_notification');
- $getStatus = \App\Model\Privillage\Role::where('id',Auth::user()->role_id)->value('akses');
- if($getStatus == 'administrator'){
- $metadataProgramNotification = \App\Model\MetadataProgramNotification::where('id_tahun_program',$tahunProgramAktif->id)
- ->where('readable_admin',1)
- ->whereNotIn('id',$read)
- ->get();
- }else{
- $metadataProgramNotification = \App\Model\MetadataProgramNotification::where('id_tahun_program',$tahunProgramAktif->id)
- ->where('readable',1)
- ->where('id_upt',$user->upt)
- ->whereNotIn('id',$read)
- ->get();
- }
- }
- ?>
- <!-- User -->
- <ul class="navbar-nav align-items-center d-none d-md-flex user-inf">
- @if(!empty($tahunProgramAktif))
- <li class="nav-item dropdown" style="border-bottom: 0 none;">
- <a href="#" class="mailBx" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <div class="notifed" id="notificationCount">{{$metadataProgramNotification->count()}}</div>
- <i class="ni ni-bell-55 text-info"></i>
- </a>
- <div class="dropdown-menu dropdown-menu-arrow dropdown-menu-right" style="top: 20px; height: 330px; overflow-y: scroll;">
- @foreach($tahunProgramAktif->tahunProgramDetail as $detail)
- <button class="dropdown-item btn btn-block btnNotification" id="btnNotification" title="{{!empty($detail->templateProgramDetail)?$detail->templateProgramDetail->nama:'-'}}" data-toggle="modal"
- data-target="#notificationModal"
- data-id-tahun-program-detail="{{$detail->id}}"
- style="position: relative;">
- @if(!empty($detail->templateProgramDetail))
- {{(strlen($detail->templateProgramDetail->nama)<=40)?$detail->templateProgramDetail->nama:substr($detail->templateProgramDetail->nama,0,40).' ...'}}
- @else
- -
- @endif
- <div id="notificationDetailCount{{$detail->id}}" class="notifed" style="right: 5px; top: 10px;">{{$metadataProgramNotification->where('id_tahun_program',$tahunProgramAktif->id)->where('id_template_program_detail',$detail->id_template_program_detail)->count()}}</div></button>
- @endforeach
- </div>
- </li>
- @endif
- <li class="nav-item dropdown" style="border-bottom: 0 none;">
- <a class="nav-link pr-0" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <div class="media align-items-center">
- <span class="avatar avatar-sm rounded-circle">
- <img alt="Image placeholder" src="{{url('images/user/'.Auth::user()->profile_photo)}}">
- </span>
- <div class="media-body ml-2 d-none d-lg-block">
- <span class="mb-0 text-sm font-weight-bold text-adm">{{Auth::user()->name}}</span>
- </div>
- </div>
- </a>
- <div class="dropdown-menu dropdown-menu-arrow dropdown-menu-right">
- <div class=" dropdown-header noti-title">
- <?php $getInformation = \App\Model\Setting\UPT::where('office_id',Auth::user()->upt)->distinct()->value('office_name'); ?>
- <h6 class="text-overflow m-0">
- @if($getInformation)
- {{$getInformation}}
- @else
- Administrator
- @endif
- </h6>
- </div>
- <div class="dropdown-divider"></div>
- <a href="{{ route('ubahPassword') }}" class="dropdown-item">
- <i class="fas fa-key"></i>
- <span>Ubah Kata Sandi</span>
- </a>
- <a href="{{ url('logout') }}"
- onclick="event.preventDefault();
- document.getElementById('logout-form').submit();" class="dropdown-item">
- <i class="ni ni-button-power"></i>
- <span>Keluar</span>
- </a>
- <form id="logout-form" action="{{ url('logout') }}" method="POST" style="display: none;">
- @csrf
- </form>
- </div>
- </li>
- </ul>
|