main_logo {{ @$setup_app->appname }}

    {{-- LOOPING GMENU --}} @foreach ($gmenu as $g) @if ($g->gmenu == 'blankx') {{-- Query DMenu --}} @php $querydmenu = DB::table('sys_dmenu') ->join('sys_auth', 'sys_dmenu.dmenu', '=', 'sys_auth.dmenu') ->whereIn('sys_auth.idroles', $users_rules) ->where('sys_dmenu.isactive', '1') ->where('sys_dmenu.show', '1') ->where('sys_auth.isactive', '1') ->where('sys_dmenu.gmenu', $g->gmenu) ->select('sys_dmenu.*') ->distinct() ->orderBy('sys_dmenu.urut', 'asc') ->get(); @endphp @foreach ($querydmenu as $d)
  • {{ $d->name }} {{-- check query notif --}} @if ($d->notif != '') @php // get notif $data_notif = DB::select($d->notif); foreach ($data_notif as $n) { $notif = $n->notif; } @endphp {{ $notif }} @endif
  • @endforeach @else
  • name == $title_group ? 'aria-expanded=true' : '' }}>
    {{ $g->name }}
      {{-- Query DMenu --}} @php $querydmenu = DB::table('sys_dmenu') ->join('sys_auth', 'sys_dmenu.dmenu', '=', 'sys_auth.dmenu') ->whereIn('sys_auth.idroles', $users_rules) ->where('sys_dmenu.isactive', '1') ->where('sys_dmenu.show', '1') ->where('sys_auth.isactive', '1') ->where('sys_dmenu.gmenu', $g->gmenu) ->select('sys_dmenu.*') ->distinct() ->orderBy('sys_dmenu.urut', 'asc') ->get(); @endphp @foreach ($querydmenu as $d)
    • {{ $d->name }} {{-- check query notif --}} @if ($d->notif != '') @php // get notif $data_notif = DB::select($d->notif); foreach ($data_notif as $n) { $notif = $n->notif; } @endphp {{ $notif }} {{-- @endif --}} @elseif ($d->name == 'Approval') @php // get notif $beasiswa = DB::table('trs_pengajuan_beasiswa as tb') ->leftJoin( 'mst_periode_beasiswa as periode', 'tb.id_periode', '=', 'periode.id_periode', ) ->select(DB::raw('COUNT(*) as notif')) ->where('periode.isactive', '1'); $user = DB::table('users') ->where('username', session('username')) ->first(); if ($user->idroles == 'hrdcek') { $beasiswa->where('tb.is_approved_by_hrd', '0'); } elseif ($user->idroles == 'headhr') { $beasiswa ->where('tb.is_approved_by_hrd', '1') ->where('tb.is_approved_by_headhrd', '0'); } elseif ($user->idroles == 'sp') { $beasiswa ->where('tb.is_approved_by_headhrd', '1') ->where('tb.is_approved_by_sp', '0'); } $notif = $beasiswa->first()->notif ?? 0; @endphp {{ $notif }} @endif
    • @endforeach
  • @endif @endforeach