164 lines
10 KiB
PHP
164 lines
10 KiB
PHP
{{-- @php
|
|
$getMenu = \DB::select("SELECT * from menu m
|
|
join menu_privilege mp on mp.menu_uid = m.menu_uid
|
|
where m.is_active = true and m.has_children
|
|
and mp.p_menu = true and group_id = ".Auth::user()->role_id." order by m.seq");
|
|
@endphp --}}
|
|
<div class="header-navs header-navs-left" id="kt_header_navs">
|
|
|
|
<!--begin::Tab Navs(for tablet and mobile modes)-->
|
|
<ul class="header-tabs p-5 p-lg-0 d-flex d-lg-none nav nav-bold nav-tabs" role="tablist">
|
|
|
|
<!--begin::Item-->
|
|
<li class="nav-item mr-2">
|
|
<a href="#" class="nav-link btn btn-clean active" data-toggle="tab" data-target="#kt_header_tab_1" role="tab">Home</a>
|
|
</li>
|
|
|
|
<!--end::Item-->
|
|
</ul>
|
|
|
|
<!--begin::Tab Navs-->
|
|
|
|
<!--begin::Tab Content-->
|
|
<div class="tab-content">
|
|
|
|
<!--begin::Tab Pane-->
|
|
<div class="tab-pane py-5 p-lg-0 show active" id="kt_header_tab_1">
|
|
|
|
<!--begin::Menu-->
|
|
<div id="kt_header_menu" class="header-menu header-menu-mobile header-menu-layout-default">
|
|
|
|
<!--begin::Nav-->
|
|
<ul class="menu-nav">
|
|
{{-- @foreach ($getMenu as $p)
|
|
@php
|
|
$getSubMenu = \DB::select("SELECT * from menu m
|
|
join menu_privilege mp on mp.menu_uid = m.menu_uid
|
|
where m.is_active = true and m.has_children = false
|
|
and mp.group_id = ".Auth::user()->role_id." and mp.p_menu = true and m.menu_pid = ".$p->menu_uid." order by seq");
|
|
@endphp
|
|
@if($p->url)
|
|
<li class="menu-item menu-item-submenu {{(Request::path() == $p->url) ? "menu-item-active":"" }}" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-{{$p->menu_uid}}" onclick="loadContent('{{ $p->url }}', this, event)" class="menu-link">
|
|
<span class="menu-text">Dashboard</span>
|
|
</a>
|
|
</li>
|
|
@else
|
|
<li class="menu-item menu-item-submenu menu-item-rel" data-menu-toggle="click" aria-haspopup="true">
|
|
<a href="javascript:;" class="menu-link menu-toggle">
|
|
<span class="menu-text">{{ $p->menu }}</span>
|
|
<span class="menu-desc"></span>
|
|
<i class="menu-arrow"></i>
|
|
</a>
|
|
<div class="menu-submenu menu-submenu-classic menu-submenu-left">
|
|
<ul class="menu-subnav">
|
|
@foreach ($getSubMenu as $sb)
|
|
@if($sb->url=='reset_pass')
|
|
<li class="menu-item menu-item-submenu" data-menu-toggle="hover" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-{{$sb->menu_uid}}" class="menu-link menu-toggle" onclick="resetPassword()">
|
|
<span class="svg-icon menu-icon">
|
|
{!! $sb->icon_css !!}
|
|
</span>
|
|
<span class="menu-text">{{ $sb->menu }}</span>
|
|
</a>
|
|
</li>
|
|
@elseif($sb->url=='change_pass')
|
|
<li class="menu-item menu-item-submenu" data-menu-toggle="hover" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-{{$sb->menu_uid}}" class="menu-link menu-toggle" onclick="$('#formChangePass')[0].reset();znModal('mChangePass')">
|
|
<span class="svg-icon menu-icon">
|
|
{!! $sb->icon_css !!}
|
|
</span>
|
|
<span class="menu-text">{{ $sb->menu }}</span>
|
|
</a>
|
|
</li>
|
|
@elseif($sb->url=='change_pp')
|
|
<li class="menu-item menu-item-submenu" data-menu-toggle="hover" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-{{$sb->menu_uid}}" class="menu-link menu-toggle" onclick="modalChangePp()">
|
|
<span class="svg-icon menu-icon">
|
|
{!! $sb->icon_css !!}
|
|
</span>
|
|
<span class="menu-text">{{ $sb->menu }}</span>
|
|
</a>
|
|
</li>
|
|
@else
|
|
<li class="menu-item menu-item-submenu {{(Request::getRequestUri() == '/'.$sb->url) ? "menu-item-active":"" }} " data-menu-toggle="hover" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-{{$sb->menu_uid}}" class="menu-link menu-toggle" onclick="loadContent('{{ $sb->url }}', this, event)">
|
|
<span class="svg-icon menu-icon">
|
|
{!! $sb->icon_css !!}
|
|
</span>
|
|
<span class="menu-text">{{ $sb->menu }}</span>
|
|
</a>
|
|
</li>
|
|
@endif
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
@endif
|
|
@endforeach --}}
|
|
|
|
<li class="menu-item menu-item-submenu {{(Request::path() == 'home') ? "menu-item-active":"" }}" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-000" onclick="loadContent('home', this, event)" class="menu-link">
|
|
<span class="menu-text">Dashboard</span>
|
|
</a>
|
|
</li>
|
|
@if(Auth::user()->role_id==5 || Auth::user()->role_id==6)
|
|
@if(Auth::user()->role_id==6)
|
|
<li class="menu-item menu-item-submenu {{(Request::path() == 'projects') ? "menu-item-active":"" }}" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-001" onclick="loadContent('projects', this, event)" class="menu-link">
|
|
<span class="menu-text">Master Project</span>
|
|
</a>
|
|
</li>
|
|
<li class="menu-item menu-item-submenu {{(Request::path() == 'client') ? "menu-item-active":"" }}" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-002" onclick="loadContent('client', this, event)" class="menu-link">
|
|
<span class="menu-text">Master Client</span>
|
|
</a>
|
|
</li>
|
|
@endif
|
|
@if(Auth::user()->role_id==5 || Auth::user()->role_id==6)
|
|
<li class="menu-item menu-item-submenu {{(Request::path() == 'user') ? "menu-item-active":"" }}" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-003" onclick="loadContent('user', this, event)" class="menu-link">
|
|
<span class="menu-text">Master User</span>
|
|
</a>
|
|
</li>
|
|
@endif
|
|
@endif
|
|
{{-- @if(Auth::user()->role_id==3)
|
|
<li class="menu-item menu-item-submenu {{(Request::path() == 'helpdesk') ? "menu-item-active":"" }}" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-001" onclick="loadContent('helpdesk', this, event)" class="menu-link">
|
|
<span class="menu-text">Master Helpdesk</span>
|
|
</a>
|
|
</li>
|
|
@endif
|
|
@if(Auth::user()->role_id==2)
|
|
<li class="menu-item menu-item-submenu {{(Request::path() == 'approve_helpdesk') ? "menu-item-active":"" }}" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-001" onclick="loadContent('approve_helpdesk', this, event)" class="menu-link">
|
|
<span class="menu-text">Master Approve Helpdesk</span>
|
|
</a>
|
|
</li>
|
|
@endif
|
|
@if(Auth::user()->role_id==4)
|
|
<li class="menu-item menu-item-submenu {{(Request::path() == 'approve_css') ? "menu-item-active":"" }}" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-001" onclick="loadContent('approve_css', this, event)" class="menu-link">
|
|
<span class="menu-text">Master Approve CSS</span>
|
|
</a>
|
|
</li>
|
|
@endif --}}
|
|
<li class="menu-item menu-item-submenu {{(Request::path() == 'laporanProject') ? "menu-item-active":"" }}" aria-haspopup="true">
|
|
<a href="javascript:;" id="sb-004" onclick="loadContent('laporanProject', this, event)" class="menu-link">
|
|
<span class="menu-text">Laporan Task Saya</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<!--end::Nav-->
|
|
</div>
|
|
|
|
<!--end::Menu-->
|
|
</div>
|
|
|
|
<!--begin::Tab Pane-->
|
|
</div>
|
|
|
|
<!--end::Tab Content-->
|
|
</div> |