<aside class="main-sidebar">
    <section class="sidebar">
        <div class="user-panel">
            <div class="pull-left image">
                <img src="<?=base_url($this->session->userdata('profile_pic'))?>" onerror="this.src='<?=base_url("assets/images/user_avatar.jpg")?>'" class="user-image left-sid" alt="User Image">
            </div>
            <div class="pull-left info">
                <p><?php echo $this->session->userdata('logged_in_admin')['username']; ?></p>
                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
        </div>
        <ul class="sidebar-menu">
            <li><a href="<?= base_url('Dashboard') ?>"><i class="fa fa-wrench" aria-hidden="true">
                </i><span>Dashboard</span></a>
            </li>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-bars" aria-hidden="true"></i>
                    <span>Auto Service Centers</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li>
                        <a href="<?= base_url('Shop/addShop') ?>">
                            <i class="fa fa-circle-o text-aqua"></i>
                            Add Mechanic Shop
                        </a>
                    </li>
                    <li>
                        <a href="<?= base_url('Shop/viewShops') ?>">
                            <i class="fa fa-circle-o text-aqua"></i>
                            View Mechanic Shops
                        </a>
                    </li>
                </ul>
            </li>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-bars" aria-hidden="true"></i>
                    <span>Services</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li>
                        <a href="<?= base_url('Issue/addIssue') ?>">
                            <i class="fa fa-circle-o text-aqua"></i>
                            Add New Issue
                        </a>
                    </li>
                    <li>
                        <a href="<?= base_url('Issue/viewIssues') ?>">
                            <i class="fa fa-circle-o text-aqua"></i>
                            View All Issues
                        </a>
                    </li>
                    <?php if($this->session->userdata['user_type'] != 1){ ?>
                    <li>
                        <a href="<?= base_url('Issue/issueMapping') ?>">
                            <i class="fa fa-circle-o text-aqua"></i>
                            Issue Mapping
                        </a>
                    </li>
                    <?php } ?>
                    <li>
                        <a href="<?= base_url('Issue/viewMappedIssues') ?>">
                            <i class="fa fa-circle-o text-aqua"></i>
                            Manage Mapped Issues
                        </a>
                    </li>
                </ul>
            </li>
            <?php if($this->session->userdata['user_type'] == 1){ ?>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-bars" aria-hidden="true"></i>
                            <span>Mechanic Management</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li>
                            <a href="<?= base_url('Mechanic/addMechanic') ?>">
                                <i class="fa fa-circle-o text-aqua"></i>
                                Add Mechanic
                            </a>
                        </li>
                        <li>
                            <a href="<?= base_url('Mechanic/viewMechanics') ?>">
                                <i class="fa fa-circle-o text-aqua"></i>
                                View Mechanics
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-bars" aria-hidden="true"></i>
                            <span>Customer Management</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li>
                            <a href="<?= base_url('Customer/addCustomerUser') ?>">
                                <i class="fa fa-circle-o text-aqua"></i>
                                Add Customer
                            </a>
                        </li>
                        <li>
                            <a href="<?= base_url('Customer/listCustomerUsers') ?>">
                                <i class="fa fa-circle-o text-aqua"></i>
                                View Customers
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="<?= base_url('Mailtemplate') ?>"><i class="fa fa-book" aria-hidden="true">
                    </i><span>Mail Template</span></a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-bars" aria-hidden="true"></i>
                            <span>Vehicle Management</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li>
                            <a href="<?= base_url('Vehicle/viewVehBrand') ?>">
                                <i class="fa fa-circle-o text-aqua"></i>
                                Vehicle Brand
                            </a>
                        </li>
                        <li>
                            <a href="<?= base_url('Vehicle/viewVehModel') ?>">
                                <i class="fa fa-circle-o text-aqua"></i>
                                Vehicle Models
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="<?= base_url('Orders/listOrders') ?>"><i class="fa fa-book" aria-hidden="true">
                    </i><span>Order Management</span></a>
                </li>
                <li>
                    <a href="<?= base_url('ImportData/import_data') ?>"><i class="fa fa-book" aria-hidden="true">
                    </i><span>Import Data</span></a>
                </li>
            <?php } ?>
            <li>
                <a href="<?= base_url('Bookings/listBookings') ?>"><i class="fa fa-book" aria-hidden="true">
                </i><span>Request Management</span></a>
            </li>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-bars" aria-hidden="true"></i>
                        <span>Product Management</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li>
                        <a href="<?= base_url('Product/addProduct') ?>">
                            <i class="fa fa-circle-o text-aqua"></i>
                            Add New Product
                        </a>
                    </li>
                    <li>
                        <a href="<?= base_url('Product/viewProducts') ?>">
                            <i class="fa fa-circle-o text-aqua"></i>
                            View All Product
                        </a>
                    </li>
                </ul>
            </li>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-bars" aria-hidden="true"></i>
                        <span>Brand Management</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li>
                        <a href="<?= base_url('Brand/addBrand') ?>">
                            <i class="fa fa-circle-o text-aqua"></i>
                            Add New Brand
                        </a>
                    </li>
                    <li>
                        <a href="<?= base_url('Brand/viewBrand') ?>">
                            <i class="fa fa-circle-o text-aqua"></i>
                            View All Brand 
                        </a>
                    </li>
                </ul>
            </li>
            <?php if($this->session->userdata['user_type'] == 1){ ?>
                <li><a href="<?= base_url('Settings') ?>">
                    <i class="fa fa-wrench" aria-hidden="true">
                    </i><span>Settings</span></a>
                </li>
            <?php } ?>
        </ul>
    </section>
</aside>
