<aside class="left-sidebar">
	<div class="scroll-sidebar">
		<nav class="sidebar-nav">
			<ul id="sidebarnav">
				<?php
					if( in_array(session()->get('level'), [0,1,2]) )  { // super user / tsm
				?>
				<li class="nav-small-cap">--- MAIN MENU</li>
				<li> <a class="waves-effect waves-dark" href='<?=base_url();?>' aria-expanded="false"> <i class="fas fa-tachometer-alt"></i> <span class='hide-menu'>Dashboard</span></a></li>
				<!--
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fa-solid fa-clapperboard"></i> <span class='hide-menu'>Kanban</span></a>
					<ul aria-expanded="true" class="collapse">
						<li><a href='#' onclick="window.open('<?=base_url();?>kanban/board/create', '_blank', 'width=800,height=500')">New Board</a></li>
						<li><a href="<?=base_url();?>kanban/" >Board List</a></li>
					</ul>
				</li>
				-->
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fas fa-cow"></i> <span class="hide-menu">Activity</span></a>
					<ul aria-expanded="true" class="collapse">
						<li><a href="<?=base_url();?>activities/create" >New Activity</a></li>
						<li><a href="<?=base_url();?>activities">Activity List</a></li>
						<li><a href="<?=base_url();?>activities/count">Activity Count</a></li>
						<li><a href="<?=base_url();?>activities/export">Activity Export</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fa-solid fa-cart-flatbed"></i> <span class="hide-menu"> Inventory</span></a>
					<ul aria-expanded="true" class="collapse">
						<li><a href="<?=base_url();?>invtrans/create">New Transactions</a></li>
						<li><a href="<?=base_url();?>invtrans/user/<?=$_SESSION['userid'];?>">Transactions</a></li>
						<li><a href="<?=base_url();?>invtrans/reportusage/">Sparepart Usage</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fa-solid fa-bug"></i><span class='hide-menu'>Bug N Feature</span> </a> 
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>bugs">Bug List</a></li>
						<li><a href="<?=base_url();?>bugs/count">Bug Count</a></li>
					</ul>
				</li>
				<li> <a class="waves-effect waves-dark" href='<?=base_url();?>guidebook' aria-expanded="false"> <i class="fa-solid fa-book"></i><span class='hide-menu'>Guidebook</span> </a> </li>
				<li> <a class="waves-effect waves-dark" href='https://clqms.services-summit.my.id/' aria-expanded="false"> <i class="fa-solid fa-microscope"></i><span class='hide-menu'>CLQMS</span> </a> </li>
				
				<li class="nav-small-cap">--- Master Data</li>
				<li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"> <i class="fas fa-user"></i><span class="hide-menu">User</span></a>
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>userposition">Position</a></li>
						<li><a href="<?=base_url();?>userdepartment">Department</a></li>
						<li><a href="#">Role</a></li>
						<li><a href="<?=base_url();?>users">Users</a></li>
						<li><a href="<?=base_url();?>mailgroups">Mail Group</a></li>
						<li><a href="<?=base_url();?>offices">Offices</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fa-solid fa-store"></i><span class="hide-menu">Vendor</span></a>
					<ul aria-expanded="true" class="collapse">
						<li><a href="<?=base_url();?>vendors">Vendor </a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"> <i class="fas fa-boxes"></i><span class="hide-menu">Product</span></a>
					<ul aria-expanded="false" class="collapse">

						<li><a href="<?=base_url();?>producttype">Product Type</a></li>
						<li><a href="<?=base_url();?>productservice">Product Service</a></li>
						<li><a href="<?=base_url();?>productcatalog">Product Catalog</a></li>
						<li><a href="<?=base_url();?>productalias">Product Alias</a></li>
						<li><a href="<?=base_url();?>producttemp">Product Temp</a></li>
						<li><a href="<?=base_url();?>unitgroup">Unit Group</a></li>
						<li><a href="<?=base_url();?>products">Products</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fa-solid fa-map-location-dot"></i><span class="hide-menu">Area</span></a>
					<ul aria-expanded="true" class="collapse">
						<li><a href="<?=base_url();?>zones">Geographical Area</a></li>
						<li><a href="<?=base_url();?>areas">User Defined Area</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fa-solid fa-address-book"></i><span class="hide-menu">Contact</span></a>
					<ul aria-expanded="true" class="collapse">
						<li><a href="<?=base_url();?>contacts">Contact</a></li>
						<li><a href="<?=base_url();?>emails">Email</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"> <i class="far fa-hospital"></i><span class="hide-menu"> Account</span></a>
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>accounts">Accounts</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"> <i class="fa-solid fa-house-user"></i><span class="hide-menu">Sites</span> </a>
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>sites">Sites</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"> <i class="fa-solid fa-warehouse"></i></i><span class="hide-menu"> Inventory</span></a>
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>invcounters">Counters</a></li>
						<li><a href="<?=base_url();?>invtrans">Transactions</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"> <i class="fas fa-paw"></i><span class="hide-menu">Activity</span></a>
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>acttype">Activity Type</a></li>
						<li><a href="<?=base_url();?>acttext">Activity Text</a></li>
					</ul>
				</li>
				<?php 
				} else if( session()->get('level') == '4' ) { // PS
				/*
				- Activity
				*/
				?>
				<li class="nav-small-cap">--- MAIN MENU</li>
				<li> <a class="waves-effect waves-dark" href='<?=base_url();?>' aria-expanded="false"> <i class="fas fa-tachometer-alt"></i><span class='hide-menu'>Dashboard</span> </a> </li>			
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fas fa-cow"></i> <span class="hide-menu">Activity</span> </a>
					<ul aria-expanded="true" class="collapse">
						<li><a href="<?=base_url();?>activities/create" >New Activity</a></li>
						<li><a href="<?=base_url();?>activities">Activity List</a></li>
						<li><a href="<?=base_url();?>activities/count">Activity Count</a></li>
						<li><a href="<?=base_url();?>activities/export">Activity Export</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fa-solid fa-bug"></i><span class='hide-menu'>Bug N Feature</span> </a> 
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>bugs">Bug List</a></li>
						<li><a href="<?=base_url();?>bugs/count">Bug Count</a></li>
					</ul>
				</li>
				<li> <a class="waves-effect waves-dark" href='<?=base_url();?>guidebook' aria-expanded="false"> <i class="fa-solid fa-book"></i><span class='hide-menu'>Guidebook</span> </a> </li>
				<li> <a class="waves-effect waves-dark" href='https://clqms.services-summit.my.id/' aria-expanded="false"> <i class="fa-solid fa-microscope"></i><span class='hide-menu'>CLQMS</span> </a> </li>
				<?php 
				} else if( session()->get('level') == '4' ) { // PS
				/*
				- Activity
				- All Menu Product
				- Menu Site - Account + Site
				- Menu User - Conctacs & Mail Group
				*/
				?>
				<li class="nav-small-cap">--- MAIN MENU</li>
				<li> <a class="waves-effect waves-dark" href='<?=base_url();?>' aria-expanded="false"> <i class="fas fa-tachometer-alt"></i><span class='hide-menu'>Dashboard</span> </a> </li>			
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fas fa-cow"></i> <span class="hide-menu">Activity</span> </a>
					<ul aria-expanded="true" class="collapse">
						<!--
						<li>
							<a href='<?=base_url();?>activities/create' onclick="window.open(this.href, 'Create Site','width=900,height=600,toolbar=1,resizable=0'); return false;">
								New Activity
							</a>
						</li>
						-->
						<li><a href="<?=base_url();?>activities/create" >New Activity</a></li>
						<li><a href="<?=base_url();?>activities">Activity List</a></li>
						<li><a href="<?=base_url();?>activities/count">Activity Count</a></li>
						<li><a href="<?=base_url();?>activities/export">Activity Export</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fa-solid fa-cart-flatbed"></i> <span class="hide-menu"> Inventory</span></a>
					<ul aria-expanded="true" class="collapse">
						<li><a href="<?=base_url();?>invtrans/create">New Transactions</a></li>
						<li><a href="<?=base_url();?>invtrans/user/<?=$_SESSION['userid'];?>">Transactions</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fa-solid fa-bug"></i><span class='hide-menu'>Bug N Feature</span> </a> 
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>bugs">Bug List</a></li>
						<li><a href="<?=base_url();?>bugs/count">Bug Count</a></li>
					</ul>
				</li>
				<li class="nav-small-cap">--- Master Data</li>
				<li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"> <i class="fas fa-user"></i><span class="hide-menu">User</span> </a>
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>contacts">Contacts</a></li>
						<li><a href="<?=base_url();?>mailgroups">Mail Group</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"> <i class="fas fa-boxes"></i><span class="hide-menu">Product</span> </a>
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>vendors"> <!--<i class="fa-solid fa-shield-halved"></i>-->Vendor </a></li>
						<li><a href="<?=base_url();?>producttype">Product Type</a></li>
						<li><a href="<?=base_url();?>productalias">Product Alias</a></li>
						<li><a href="<?=base_url();?>productservice">Product Service</a></li>
						<li><a href="<?=base_url();?>productcatalog">Product Catalog</a></li>
						<li><a href="<?=base_url();?>products">Products</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"> <i class="far fa-hospital"></i><span class="hide-menu">Sites</span> </a>
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>accounts">Accounts</a></li>
						<li><a href="<?=base_url();?>sites">Sites</a></li>
					</ul>
				</li>
				<li> <a class="waves-effect waves-dark" href='<?=base_url();?>guidebook' aria-expanded="false"> <i class="fa-solid fa-book"></i><span class='hide-menu'>Guidebook</span> </a> </li>
				<li> <a class="waves-effect waves-dark" href='https://clqms.services-summit.my.id/' aria-expanded="false"> <i class="fa-solid fa-microscope"></i><span class='hide-menu'>CLQMS</span> </a> </li>
				<?php
				} else { // TSO IVD
				?>
				<li class="nav-small-cap">--- MAIN MENU</li>
				<li> <a class="waves-effect waves-dark" href='<?=base_url();?>' aria-expanded="false"> <i class="fas fa-tachometer-alt"></i><span class='hide-menu'>Dashboard</span> </a> </li>			
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fas fa-cow"></i> <span class="hide-menu">Activity</span> </a>
					<ul aria-expanded="true" class="collapse">
						<!-- <li>
							<a href='<?=base_url();?>activities/create' onclick="window.open(this.href, 'Create Site','width=900,height=600,toolbar=1,resizable=0'); return false;">
								New Activity
							</a>
						</li> -->
						<li><a href="<?=base_url();?>activities/create">New Activity</a></li>
						<li><a href="<?=base_url();?>activities">Activity List</a></li>
						<li><a href="<?=base_url();?>activities/count">Activity Count</a></li>
						<li><a href="<?=base_url();?>activities/export">Activity Export</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fa-solid fa-cart-flatbed"></i> <span class="hide-menu"> Inventory</span></a>
					<ul aria-expanded="true" class="collapse">
						<li><a href="<?=base_url();?>invtrans/create">New Transactions</a></li>
						<li><a href="<?=base_url();?>invtrans/user/<?=$_SESSION['userid'];?>">Transactions</a></li>
					</ul>
				</li>
				<li> <a class="has-arrow waves-effect waves-dark" href='javascript:void(0)' aria-expanded="false"> <i class="fa-solid fa-bug"></i><span class='hide-menu'>Bug N Feature</span> </a> 
					<ul aria-expanded="false" class="collapse">
						<li><a href="<?=base_url();?>bugs">Bug List</a></li>
						<li><a href="<?=base_url();?>bugs/count">Bug Count</a></li>
					</ul>
				<li> <a class="waves-effect waves-dark" href='<?=base_url();?>guidebook' aria-expanded="false"> <i class="fa-solid fa-book"></i><span class='hide-menu'>Guidebook</span> </a> </li>
				<li> <a class="waves-effect waves-dark" href='https://clqms.services-summit.my.id/' aria-expanded="false"> <i class="fa-solid fa-microscope"></i><span class='hide-menu'>CLQMS</span> </a> </li>
				<?php
				} 
				?>
			</ul>
		</nav>
	</div>
</aside>