<style>
.container {
  min-width: 100%;
  min-height: 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
.tiles {
  width: 100%;
  height: 100%;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
}
.tiles >a {
  text-decoration: none;
}
.tile {
  background: linear-gradient(#6B67B1, #9866AF);
  background-repeat: no-repeat;
  background-size: cover;
  box-sizing: border-box;
  width: 170px;
  height: 140px;
  border: 1px solid rgba(255,255,255,.05);
  transition: .1s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  will-change: all;
  margin-bottom: 10px
}
.tile p {
  padding-bottom: .3em;
  text-align: center;
}
.tile .title, .amount, .icon {
  color: white;
}
.tile .title {
  font-size: 16px;
}
.tile .amount {
  font-size: 10px;
  font-weight: 200;
  opacity: .7;
}
.tile .icon {
  font-size: 32px;
  padding-bottom: .3em;
  padding-top: 10px;
}
.tile:hover,.tile.initial {
  transform: scale(1.05) translate3d( 0, 0, 0);
  background-color: white;
  border: 1px solid transparent;
  border-radius: 3px;
  box-shadow: -13px 11px 25px 1px rgba(0,0,0,0.55);
  transition: .3s;
  color: #938bbc;
}
.tile.initial ,.icon, .title, .amount {
  color: (#938bbc, 9%);
  opacity: 1;
}
</style>
<?php $this->view("includes/Inc_pagehead");?>
<!-- Page Styles Goes Here-->
<?php $this->view("includes/Inc_navigation");?>
<div class="m-grid__item m-grid__item--fluid m-wrapper">
  <!-- BEGIN: Subheader -->
  <div class="m-subheader ">
    <div class="d-flex align-items-center">
      <div class="mr-auto">
        <h3 class="m-subheader__title m-subheader__title--separator">
          Admin Dashboard
        </h3>
      </div>
    </div>
  </div>
  <!-- END: Subheader -->
  <div class="m-content">
    <!--begin:: Widgets/Stats-->
    <div class="container">
      <ul class="tiles">
        <?php if($this->session->userdata('user_role')!='sales_manager' && $this->session->userdata('user_role')!='sales_staff') {?>

          <?php if($this->session->userdata('user_role')!='purchase_manager' && $this->session->userdata('user_role') != 'hr_manager'){?>
          <a  href="<?php echo base_url().'work'?>">
            <li class="tile">
              <i class="fa fa-tasks icon" aria-hidden="true"></i>
              <?php   if($this->session->userdata('user_role')=='supervisor') {?>
                <p class="title">Assigned Projects</p>
                <p class="amount">View All Assigned Projects</p>
              <?php }else{?>
                <p class="title">Projects</p>
                <p class="amount">View All Projects</p>
              <?php } ?>
            </li>
          </a>
        <?php } ?>
          <?php if($this->session->userdata('user_role')!='supervisor' && $this->session->userdata('user_role')!='purchase_manager' && $this->session->userdata('user_role')!='boq_manager' && $this->session->userdata('user_role')!='sales_manager'  && $this->session->userdata('user_role')!='sales_staff'  && $this->session->userdata('user_role') != 'qs_manager' && $this->session->userdata('user_role') != 'qs' && $this->session->userdata('user_role') != 'procurement_engineer' && $this->session->userdata('user_role') != 'project_manager' && $this->session->userdata('user_role') != 'hr_manager' && $this->session->userdata('user_role') != 'operation_manager'){?>
            <?php if ($this->config->item('app_module_client_payments') == 1 ){?>
              <a  href="<?php echo base_url().'client_payments'?>">
              <li class="tile">
                <i class="fa fa-briefcase icon" aria-hidden="true"></i>
                <p class="title">Client Payments</p>
                <p class="amount">Manage Client Payments</p>
              </li>
            </a>
          <?php } ?>
                    <?php } ?>

          <?php if($this->config->item('app_module_user_payments')==1 && $this->session->userdata('user_role')!='purchase_manager' && $this->session->userdata('user_role')!='boq_manager' && $this->session->userdata('user_role')!='sales_manager'  && $this->session->userdata('user_role')!='sales_staff'  && $this->session->userdata('user_role') != 'qs_manager' && $this->session->userdata('user_role') != 'qs' && $this->session->userdata('user_role') != 'procurement_engineer' && $this->session->userdata('user_role') != 'project_manager' && $this->session->userdata('user_role') != 'hr_manager' && $this->session->userdata('user_role') != 'operation_manager'){?>
            <a  href="<?php echo base_url().'user_payments'?>">
              <li class="tile">
                <i class="la la-money icon" aria-hidden="true"></i>
                <?php   if($this->session->userdata('user_role')!='supervisor') {?>
                  <p class="title">User Payments (Petty Cash)</p>
                  <p class="amount">Manage User Payments</p>
                <?php } else {?>
                  <p class="title">Payment Receipts (Petty Cash)</p>
                  <p class="amount">View Payment Receipts</p>
                <?php } ?>
              </li>
            </a>
          <?php } ?>
          <?php if($this->config->item('app_module_purchase_order')==1 && $this->session->userdata('user_role')!='boq_manager' && $this->session->userdata('user_role')!='sales_manager'  && $this->session->userdata('user_role')!='sales_staff'  && $this->session->userdata('user_role') != 'qs_manager' && $this->session->userdata('user_role') != 'qs' && $this->session->userdata('user_role') != 'hr_manager'){?>
            <a  href="<?php echo base_url().'purchase_order'?>">
              <li class="tile">
                <i class="fa fa-edit icon" aria-hidden="true"></i>
                <p class="title">Purchase Orders</p>
                <p class="amount">Manage Purchase Orders</p>
              </li>
            </a>
          <?php } ?>
          <?php if($this->session->userdata('user_role')!='boq_manager' && $this->session->userdata('user_role')!='sales_manager'  && $this->session->userdata('user_role')!='sales_staff'  && $this->session->userdata('user_role') != 'qs_manager' && $this->session->userdata('user_role') != 'qs' && $this->session->userdata('user_role') != 'hr_manager') { ?>
            <a  href="<?php echo base_url().'purchases'?>">
              <li class="tile">
                <i class="fa fa-shopping-cart icon" aria-hidden="true"></i>
                <p class="title">Purchase Bills</p>
                <p class="amount">Manage Purchase Bills</p>
              </li>
            </a>
          <?php } ?>
            <!-- <a  href="<?php echo base_url().'purchase_order/payments'?>">
            <li class="tile">
            <i class="fa fa-money-bill-alt icon" aria-hidden="true"></i>
            <p class="title">Purchase Order Payments</p>
            <p class="amount">Purchase Order Payments</p>
          </li>
        </a> -->
        <?php if($this->session->userdata('user_role')!='boq_manager' && $this->session->userdata('user_role')!='sales_manager'  && $this->session->userdata('user_role')!='sales_staff'  && $this->session->userdata('user_role') != 'qs_manager' && $this->session->userdata('user_role') != 'qs' && $this->session->userdata('user_role') != 'hr_manager') { ?>
        <a href="<?php echo base_url().'purchases/payments'?>">
          <li class="tile">
            <i class="fa fa-money-bill icon" aria-hidden="true"></i>
            <p class="title">Purchase Bill Payments</p>
            <p class="amount">Purchase Payments</p>
          </li>
        </a>
        <?php } ?>
        <?php if($this->config->item('app_module_labours')==1 && $this->session->userdata('user_role')!='purchase_manager' && $this->session->userdata('user_role')!='boq_manager' && $this->session->userdata('user_role')!='sales_manager'  && $this->session->userdata('user_role')!='sales_staff'  && $this->session->userdata('user_role') != 'qs_manager' && $this->session->userdata('user_role') != 'qs' && $this->session->userdata('user_role') != 'procurement_engineer' && $this->session->userdata('user_role') != 'project_manager') { ?>
            <a  href="<?php echo base_url().'labour_wages' ?>">
          <li class="tile">
            <i class="fa fa-users icon" aria-hidden="true"></i>
            <p class="title">Labour Wages</p>
            <p class="amount">View Labours</p>
          </li>
        </a>
      <?php } ?>
      <?php if($this->config->item('app_module_vehicle')==1 && ($this->session->userdata('user_role')=='general_manager' || $this->session->userdata('user_role')=='admin' || $this->session->userdata('user_role')=='auditor' || $this->session->userdata('user_role')=='supervisor')  && $this->session->userdata('user_role')!='sales_staff'  && $this->session->userdata('user_role') != 'qs_manager' && $this->session->userdata('user_role') != 'qs' && $this->session->userdata('user_role') != 'procurement_engineer' && $this->session->userdata('user_role') != 'project_manager'){?>
        <a  href="<?php echo base_url().'vehicle_work_slips' ?>">
          <li class="tile">
            <i class="fa fa-truck icon" aria-hidden="true"></i>
            <p class="title">Vehicle Management</p>
            <p class="amount">View Work Slips</p>
          </li>
        </a>
      <?php } ?>

      <?php if($this->session->userdata('user_role')!='purchase_manager' && $this->session->userdata('user_role')!='boq_manager' && $this->session->userdata('user_role')!='sales_manager'  && $this->session->userdata('user_role')!='sales_staff'  && $this->session->userdata('user_role') != 'qs_manager' && $this->session->userdata('user_role') != 'qs' && $this->session->userdata('user_role') != 'procurement_engineer' && $this->session->userdata('user_role') != 'project_manager' && $this->session->userdata('user_role') != 'hr_manager') { ?>
          <a  href="<?php echo base_url().'expense'?>">
          <li class="tile">
            <i class="fa fa-clipboard-list icon" aria-hidden="true"></i>
            <p class="title">Other Expenses</p>
            <p class="amount">Other Expenses</p>
          </li>
        </a>
      <?php } ?>
      <?php if($this->session->userdata('user_role')!='purchase_manager' && $this->session->userdata('user_role')!='boq_manager' && $this->session->userdata('user_role')!='sales_manager'  && $this->session->userdata('user_role')!='sales_staff' && $this->session->userdata('user_role') != 'hr_manager') { ?>
        <a  href="<?php echo base_url().'subcontracts'?>">
          <li class="tile">
            <i class="fa fa-money-check-alt icon" aria-hidden="true"></i>
            <p class="title">Subcontracts</p>
            <p class="amount">Subcontracts & Payments</p>
          </li>
        </a>
      <?php } ?>
    <?php } ?>
    <?php if($this->config->item('app_module_sales_enquiries')==1 && ($this->session->userdata('user_role')=='sales_staff' || $this->session->userdata('user_role')=='sales_manager' || $this->session->userdata('user_role')=='admin' || $this->session->userdata('user_role')=='general_manager')) {?>
      <a  href="<?php echo base_url().'enquiries'?>">
        <li class="tile">
          <i class="fa fa-edit icon" aria-hidden="true"></i>
          <p class="title">Sales Enquiries</p>
          <p class="amount">Manage Sales Enquiries</p>
        </li>
      </a>
      <a  href="<?php echo base_url().'customers'?>">
        <li class="tile">
          <i class="fa fa-users icon" aria-hidden="true"></i>
          <p class="title">Customers</p>
          <p class="amount">View Customers</p>
        </li>
      </a>
      <a  href="<?php echo base_url().'Services'?>">
        <li class="tile">
          <i class="fa fa-sitemap icon" aria-hidden="true"></i>
          <p class="title">Services</p>
          <p class="amount">View Services</p>
        </li>
      </a>
    <?php } ?>

    <?php if($this->config->item('app_module_sales_invoice')==1 && $this->session->userdata('user_role')!='purchase_manager' && $this->session->userdata('user_role')!='boq_manager' && $this->session->userdata('user_role')!='supervisor'  && $this->session->userdata('user_role')!='sales_staff'  && $this->session->userdata('user_role') != 'qs_manager' && $this->session->userdata('user_role') != 'qs' && $this->session->userdata('user_role') != 'procurement_engineer' && $this->session->userdata('user_role') != 'project_manager' && $this->session->userdata('user_role') != 'hr_manager') { ?>
      <a  href="<?php echo base_url().'sales_invoice'?>">
        <li class="tile">
          <i class="fa fa-database icon" aria-hidden="true"></i>
          <p class="title">Sale Invoices</p>
          <p class="amount">Sale Invoices</p>
        </li>
      </a>
    <?php } ?>

    <?php if($this->session->userdata('user_role')!='boq_manager' && $this->session->userdata('user_role')!='sales_staff') { ?>
      <!-- <a  href="<?php echo base_url().'reports'?>">
        <li class="tile">
          <i class="fa fa-chart-bar icon" aria-hidden="true"></i>
          <p class="title">Reports</p>
          <p class="amount">Reports</p>
        </li>
      </a> -->
    <?php } ?>

    <?php if($this->session->userdata('user_role')!='sales_manager' && $this->session->userdata('user_role') != 'hr_manager') {?>
      <?php   if($this->session->userdata('user_role')=='supervisor' && $this->session->userdata('user_role')!='boq_manager') {?>
        <a  href="<?php echo base_url().'user/profile/'.$this->session->userdata('user_id') ?>">
          <li class="tile">
            <i class="fa fa-chart-pie icon" aria-hidden="true"></i>
            <p class="title">My Transaction Reports</p>
            <p class="amount">Transaction Reports</p>
          </li>
        </a>
      <?php } ?>
      <?php   if($this->session->userdata('user_role')=='admin') {?>
        <a  href="<?php echo base_url().'clients'?>">
          <li class="tile">
            <i class="fa fa-users icon" aria-hidden="true"></i>
            <p class="title">Clients</p>
            <p class="amount">View Clients</p>
          </li>
        </a>
        <a  href="<?php echo base_url().'supplier'?>">
          <li class="tile">
            <i class="fa fa-shopping-bag icon" aria-hidden="true"></i>
            <p class="title">Suppliers</p>
            <p class="amount">View Suppliers</p>
          </li>
        </a>

      <?php } ?>
    <?php } ?>

  </ul>
</div>

</div>
</div>
</div>
<!-- end:: Body -->
<!-- begin::Footer -->
<?php $this->view("includes/Inc_footer");?>
<!-- end::Footer -->
</div>
<!-- end:: Page -->
<?php $this->view("includes/Inc_sidebar");?>
<?php $this->view("includes/Inc_scripts");?>
<!--begin::Page Snippets -->
<script>
$("#dashboard_menu").addClass('m-menu__item--active');
</script>
<script src="<?php echo $this->config->item('Template_template_file_url'); ?>template/assets/app/js/dashboard.js" type="text/javascript"></script>
<!--end::Page Snippets -->
