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 }} {{-- MODIFIKASI NOTIF --}} {{-- check query notif --}} @if ($d->notif != '') @php // get notif - FILTER PERIODE AKTIF if (in_array('superv', $users_rules)) { // SPV $query = "SELECT COUNT(*) AS 'notif' FROM trs_phone_bill JOIN mst_periode ON trs_phone_bill.periode_id = mst_periode.periode_id WHERE approve_spv = 'pending' AND input_bill_status = 'posted' AND mst_periode.isactive = '1'"; } elseif (in_array('heahrd', $users_rules)) { // Head HRD $query = "SELECT COUNT(*) AS 'notif' FROM trs_phone_bill JOIN mst_periode ON trs_phone_bill.periode_id = mst_periode.periode_id WHERE approve_head_hrd = 'pending' AND approve_spv = 'approved' AND input_bill_status = 'posted' AND mst_periode.isactive = '1'"; } else { $query = $d->notif; } $data_notif = DB::select($query); $notif = 0; if (!empty($data_notif)) { $notif = $data_notif[0]->notif; } @endphp {{ $notif }} @endif
    • @endforeach
  • @endif @endforeach