<?php
/**
 * File			: sidebar.php
 * Description  : View untuk menu samping (sidebar)
 * Created By	: Hendi
 * Created Date : 14 Mar 2021
 * Last Update  : 06 Apr 2021
**/
?>
<ul class="nav">
	<li class="nav-item active">
		<a class="nav-link level-1" href="<?= base_url('/dashboard') ?>">
			<i class="material-icons">dashboard</i>
			<p>Dashboard</p>
		</a>
	</li>
	<?php 
    # Admin
    if (session()->get('is_loggedin') && session()->get('level_id') == '1') 
    { 
    ?>
    <li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/transaksi') ?>">
			<i class="material-icons">content_paste</i>
			<p>Transaksi</p>
		</a>
	</li>
	<li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/antrian') ?>">
			<i class="material-icons">fact_check</i>
			<p>Antrian</p>
		</a>
	</li>
	<li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/history') ?>">
			<i class="material-icons">history</i>
			<p>History</p>
		</a>
	</li>
    <li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/laporan') ?>">
			<i class="material-icons">library_books</i>
			<p>Laporan</p>
		</a>
	</li>
	<li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/menu') ?>">
			<i class="material-icons">list_alt</i>
			<p>Menu</p>
		</a>
	</li>
	<li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/user') ?>">
			<i class="material-icons">person</i>
			<p>User</p>
		</a>
	</li>
	<?php 
    }
    # Store Manager dan Supervisor
    elseif (session()->get('is_loggedin') && (session()->get('level_id') == '2' || session()->get('level_id') == '3')) 
    { 
    ?>
    <li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/history') ?>">
			<i class="material-icons">history</i>
			<p>History</p>
		</a>
	</li>
    <li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/laporan') ?>">
			<i class="material-icons">library_books</i>
			<p>Laporan</p>
		</a>
	</li>
	<?php 
    }
    # Koki
    if (session()->get('is_loggedin') && session()->get('level_id') == '4') 
    { 
    ?>
    <li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/antrian') ?>">
			<i class="material-icons">fact_check</i>
			<p>Antrian</p>
		</a>
	</li>
	<li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/history') ?>">
			<i class="material-icons">history</i>
			<p>History</p>
		</a>
	</li>
    <?php 
    }
    # Kasir
    elseif (session()->get('is_loggedin') && session()->get('level_id') == '5') 
    { 
    ?>
    <li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/transaksi') ?>">
			<i class="material-icons">content_paste</i>
			<p>Transaksi</p>
		</a>
	</li>
    <li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/laporan') ?>">
			<i class="material-icons">library_books</i>
			<p>Laporan</p>
		</a>
	</li>
	<li class="nav-item">
		<a class="nav-link level-1" href="<?= base_url('/menu') ?>">
			<i class="material-icons">list_alt</i>
			<p>Menu</p>
		</a>
	</li>
	<?php 
    }
    ?>
</ul>